From be9bc54673fafa2638f585739faf23f3efc6eb3d Mon Sep 17 00:00:00 2001 From: Batyr Date: Thu, 19 Jun 2025 15:53:29 +0500 Subject: [PATCH] build --- dist/assets/{index-COufBpW6.js => index-C3TeEsDL.js} | 2 +- .../assets/{ui-library-_5RJ9fWZ.js => ui-library-B2qs5YcL.js} | 2 +- dist/index.html | 4 ++-- src/services/service.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename dist/assets/{index-COufBpW6.js => index-C3TeEsDL.js} (99%) rename dist/assets/{ui-library-_5RJ9fWZ.js => ui-library-B2qs5YcL.js} (79%) diff --git a/dist/assets/index-COufBpW6.js b/dist/assets/index-C3TeEsDL.js similarity index 99% rename from dist/assets/index-COufBpW6.js rename to dist/assets/index-C3TeEsDL.js index 5af7b14..cd3cf70 100644 --- a/dist/assets/index-COufBpW6.js +++ b/dist/assets/index-C3TeEsDL.js @@ -1 +1 @@ -var qt=Object.defineProperty;var Yt=(n,e,t)=>e in n?qt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var y=(n,e,t)=>Yt(n,typeof e!="symbol"?e+"":e,t);import{u as I,i as Jt,j as r,H as Qt,F as Xt,a as Zt,b as es,c as ts,d as ss,e as ns,f as is,g as rs,h as as,z as j,k as Ee,l as fe,S as Je,m as gt,n as os,P as be,o as ee,p as ls,q as cs,r as us,s as J,t as Ve,v as ve,w as N,x as Ne,y as V,A as B,L as ne,B as z,C as _,D as q,E as Be,G as Le,I as Oe,J as Pe,K as ce,M as ze,N as ps,O as ye,Q as ds,R as hs,T as ms,U as fs,V as gs,W as xs,X as bs,Y as pe,Z as vs,_ as ys,$ as ie,a0 as ws,a1 as xt,a2 as js,a3 as bt,a4 as ks,a5 as ue,a6 as He,a7 as Ss,a8 as vt,a9 as yt,aa as Ns,ab as Qe,ac as _s,ad as wt,ae as Rs,af as Cs,ag as Ts,ah as Es,ai as Ls,aj as Os,ak as Ps}from"./ui-library-_5RJ9fWZ.js";import{f as Fs,a as b,O as Is,e as ae,u as As,g as Ke,L as Xe,h as $s,i as Ds}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 ke={},Ze;function Ms(){if(Ze)return ke;Ze=1;var n=Fs();return ke.createRoot=n.createRoot,ke.hydrateRoot=n.hydrateRoot,ke}var Vs=Ms();const k=n=>typeof n=="string",he=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},et=n=>n==null?"":""+n,Bs=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},zs=/###/g,tt=n=>n&&n.indexOf("###")>-1?n.replace(zs,"."):n,st=n=>!n||k(n),me=(n,e,t)=>{const s=k(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},Hs=(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]},Ks=(n,e,t)=>{const s=_e(n,t);return s!==void 0?s:_e(e,t)},jt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?k(n[s])||n[s]instanceof String||k(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):jt(n[s],e[s],t):n[s]=e[s]);return n},oe=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Gs={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Us=n=>k(n)?n.replace(/[&<>"'\/]/g,e=>Gs[e]):n;class Ws{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 qs=[" ",",","?","!",";"],Ys=new Ws(20),Js=(n,e,t)=>{e=e||"",t=t||"";const s=qs.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(s.length===0)return!0;const i=Ys.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("_","-"),Qs={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||Qs,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,d;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):k(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||!k(s)?c:De((d=(u=this.data)==null?void 0:u[e])==null?void 0:d[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),nt(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)(k(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?jt(c,s,a):c={...c,...s},nt(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 kt={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 rt={},at=n=>!k(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(),Bs(["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&&!Js(e,s,i);if(o&&!l){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:k(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:k(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,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(d){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 p=m==null?void 0:m.res;const f=(m==null?void 0:m.usedKey)||o,h=(m==null?void 0:m.exactUsedKey)||o,g=["[object Number]","[object Function]","[object RegExp]"],x=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,v=t.count!==void 0&&!k(t.count),S=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=p;w&&!p&&S&&(C=T);const K=at(C),Q=Object.prototype.toString.apply(C);if(w&&C&&K&&g.indexOf(Q)<0&&!(k(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),A=P?[]:{},we=P?h:f;for(const G in C)if(Object.prototype.hasOwnProperty.call(C,G)){const U=`${we}${a}${G}`;S&&!p?A[G]=this.translate(U,{...t,defaultValue:at(T)?T[G]:void 0,joinArrays:!1,ns:l}):A[G]=this.translate(U,{...t,joinArrays:!1,ns:l}),A[G]===U&&(A[G]=C[G])}p=A}}else if(w&&k(x)&&Array.isArray(p))p=p.join(x),p&&(p=this.extendTranslation(p,e,t,s));else{let P=!1,A=!1;!this.isValidLookup(p)&&S&&(P=!0,p=T),this.isValidLookup(p)||(A=!0,p=o);const G=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:p,U=S&&T!==p&&this.options.updateMissing;if(A||P||U){if(this.logger.log(U?"updateKey":"missingKey",u,c,o,U?T:p),a){const D=this.resolve(o,{...t,keySeparator:!1});D&&D.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 $=[];const je=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&je&&je[0])for(let D=0;D{var Ye;const qe=S&&de!==p?de:G;this.options.missingKeyHandler?this.options.missingKeyHandler(D,c,re,qe,U,t):(Ye=this.backendConnector)!=null&&Ye.saveMissing&&this.backendConnector.saveMissing(D,c,re,qe,U,t),this.emit("missingKey",D,c,re,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?$.forEach(D=>{const re=this.pluralResolver.getSuffixes(D,t);E&&t[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(de=>{We([D],o+de,t[`defaultValue${de}`]||T)})}):We($,o,T))}p=this.extendTranslation(p,e,t,m,s),A&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${o}`),(A||P)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,P?p:void 0))}return i?(m.res=p,m.usedParams=this.getUsedParamsDetails(t),m):p}extendTranslation(e,t,s,i,a){var u,d;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=k(e)&&(((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(m){const h=e.match(this.interpolator.nestingRegexp);p=h&&h.length}let f=s.replace&&!k(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 h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;p1&&arguments[1]!==void 0?arguments[1]:{},s,i,a,o,l;return k(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(c,t),d=u.key;i=d;let m=u.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const p=t.count!==void 0&&!k(t.count),f=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(k(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 w,v;this.isValidLookup(s)||(l=x,!rt[`${g[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(l))&&(rt[`${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(S=>{var E;if(this.isValidLookup(s))return;o=S;const R=[d];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(R,d,S,x,t);else{let T;p&&(T=this.pluralResolver.getSuffix(S,t.count,t));const C=`${this.options.pluralSeparator}zero`,K=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(R.push(d+T),t.ordinal&&T.indexOf(K)===0&&R.push(d+T.replace(K,this.options.pluralSeparator)),f&&R.push(d+C)),h){const Q=`${d}${this.options.contextSeparator}${t.context}`;R.push(Q),p&&(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(S,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&&!k(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 ot{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(k(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)),k(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 k(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))):k(e)&&a(this.formatLanguageCode(e)),s.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const lt={zero:0,one:1,two:2,few:3,many:4,other:5},ct={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Xs{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!"),ct;if(!e.match(/-|_/))return ct;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)=>lt[i]-lt[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 ut=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=Ks(n,e,t);return!a&&i&&k(t)&&(a=De(n,t,s),a===void 0&&(a=De(e,t,s))),a},Ae=n=>n.replace(/\$/g,"$$$$");class Zs{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:d,unescapePrefix:m,nestingPrefix:p,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:Us,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=d?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?oe(p):f||oe("$t("),this.nestingSuffix=h?oe(h):g||oe(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||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=h=>{if(h.indexOf(this.formatSeparator)<0){const v=ut(t,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,s,{...i,...t,interpolationkey:h}):v}const g=h.split(this.formatSeparator),x=g.shift().trim(),w=g.join(this.formatSeparator).trim();return this.format(ut(t,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,s,{...i,...t,interpolationkey:x})};this.resetRegExp();const d=(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:h=>Ae(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Ae(this.escape(h)):Ae(h)}].forEach(h=>{for(l=0;a=h.regex.exec(e);){const g=a[1].trim();if(o=u(g),o===void 0)if(typeof d=="function"){const w=d(e,a,i);o=k(w)?w:""}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!k(o)&&!this.useRawValueToEscape&&(o=et(o));const x=h.safeValue(o);if(e=e.replace(a[0],x),m?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=a[0].length):h.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 d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const m=c.split(new RegExp(`${d}[ ]*{`));let p=`{${m[1]}`;c=m[0],p=this.interpolate(p,o);const f=p.match(/'/g),h=p.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!h||h.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${d}${p}`}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&&!k(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 d=i[1].split(this.formatSeparator).map(m=>m.trim());i[1]=d.shift(),c=d,u=!0}if(a=t(l.call(this,i[1].trim(),o),o),a&&i[0]===e&&!k(a))return a;k(a)||(a=et(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),u&&(a=c.reduce((d,m)=>this.format(d,m,s.lng,{...s,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const en=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,""),d=l.trim();t[d]||(t[d]=u),u==="false"&&(t[d]=!1),u==="true"&&(t[d]=!0),isNaN(u)||(t[d]=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 tn{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:d}=en(c);if(this.formats[u]){let p=l;try{const f=((m=i==null?void 0:i.formatParams)==null?void 0:m[i.interpolationkey])||{},h=f.locale||f.lng||i.locale||i.lng||s;p=this.formats[u](l,h,{...d,...i,...f})}catch(f){this.logger.warn(f)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},e)}}const sn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class nn 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 d=!0;t.forEach(m=>{const p=`${u}|${m}`;!s.reload&&this.store.hasResourceBundle(u,m)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,d=!1,o[p]===void 0&&(o[p]=!0),a[p]===void 0&&(a[p]=!0),c[m]===void 0&&(c[m]=!0)))}),d||(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=>{Hs(c.loaded,[a],o),sn(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.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,d)=>{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&&d&&i{this.read.call(this,e,t,s,i+1,a*2,o)},a);return}o(u,d)},c=this.backend[s].bind(this.backend);if(c.length===2){try{const u=c(e,t);u&&typeof u.then=="function"?u.then(d=>l(null,d)).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();k(e)&&(e=this.languageUtils.toResolveHierarchy(e)),k(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,d,m,p;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=(d=this.services)==null?void 0:d.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((p=this.backend)!=null&&p.create){const f={...o,isUpdate:a},h=this.backend.create.bind(this.backend);if(h.length<6)try{let g;h.length===5?g=h(e,t,s,i,f):g=h(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 h(e,t,s,i,l,f)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const pt=()=>({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]),k(n[1])&&(e.defaultValue=n[1]),k(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}}),dt=n=>{var e,t;return k(n.ns)&&(n.ns=[n.ns]),k(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),k(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},Se=()=>{},rn=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=dt(e),this.services={},this.logger=Y,this.modules={external:[]},rn(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&&(k(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=pt();this.options={...i,...this.options,...dt(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=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Y.init(a(this.modules.logger),this.options):Y.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=tn;const m=new ot(this.options);this.store=new it(this.options.resources,this.options);const p=this.services;p.logger=Y,p.resourceStore=this.store,p.languageUtils=m,p.pluralResolver=new Xs(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=a(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Zs(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new nn(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(f){for(var h=arguments.length,g=new Array(h>1?h-1:0),x=1;x1?h-1:0),x=1;x{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Se),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const c=he(),u=()=>{const d=(m,p)=>{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(p),s(m,p)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};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]:Se;const i=k(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(d=>c(d)),(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=he();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=Se),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"&&kt.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=he();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 d,m;!e&&!c&&this.services.languageDetector&&(c=[]);const u=k(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(m=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||m.call(d,u)),this.loadResources(u,p=>{o(p,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,d=new Array(u>2?u-2:0),m=2;m`${c.keyPrefix}${p}${h}`):f=c.keyPrefix?`${c.keyPrefix}${p}${o}`:o,i.t(f,c)};return k(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=he();return this.options.ns?(k(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=he();k(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 ot(pt());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]:Se;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((d,m)=>(d[m]={...c[u][m]},d),{})),{});a.store=new it(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),d=1;d{const n=I(e=>e.lang);return b.useEffect(()=>{F.changeLanguage(n)},[n]),null};var _i="1.3.4";function St(n,e,t){return Math.max(n,Math.min(e,t))}function Ri(n,e,t){return(1-t)*n+t*e}function Ci(n,e,t,s){return Ri(n,e,1-Math.exp(-t*s))}function Ti(n,e){return(n%e+e)%e}var Ei=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=St(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=Ci(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 Li(n,e){let t;return function(...s){let i=this;clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(i,s)},e)}}var Oi=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=Li(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={}}},ht=100/6,te={passive:!1},Pi=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?ht:s===2?this.window.width:1,a=s===1?ht: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)}},mt=n=>Math.min(1,1.001-Math.pow(2,-10*n)),Fi=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:d=!1,orientation:m="vertical",gestureOrientation:p="vertical",touchMultiplier:f=1,wheelMultiplier:h=1,autoResize:g=!0,prevent:x,virtualScroll:w,overscroll:v=!0,autoRaf:S=!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 Ei);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 d=this.options.prevent;if(u.find(x=>{var w,v,S;return x instanceof HTMLElement&&(typeof d=="function"&&(d==null?void 0:d(x))||((w=x.hasAttribute)==null?void 0:w.call(x,"data-lenis-prevent"))||i&&((v=x.hasAttribute)==null?void 0:v.call(x,"data-lenis-prevent-touch"))||a&&((S=x.hasAttribute)==null?void 0:S.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 p=t;this.options.gestureOrientation==="both"?p=Math.abs(t)>Math.abs(e)?t:e:this.options.gestureOrientation==="horizontal"&&(p=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(p)>5;g&&(p=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+p,{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=_i,(!n||n===document.documentElement)&&(n=window),typeof l=="number"&&typeof c!="function"?c=mt: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:d,gestureOrientation:p,orientation:m,touchMultiplier:f,wheelMultiplier:h,autoResize:g,prevent:x,virtualScroll:w,overscroll:v,autoRaf:S,anchors:R,autoToggle:O,allowNestedScroll:E,__experimental__naiveDimensions:T},this.dimensions=new Oi(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 Pi(t,{touchMultiplier:f,wheelMultiplier:h}),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:d=!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 p;if(typeof n=="string"?p=document.querySelector(n):n instanceof HTMLElement&&(n!=null&&n.nodeType)&&(p=n),p){if(this.options.wrapper!==window){const h=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?h.left:h.top}const f=p.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(d){this.targetScroll=this.animatedScroll=this.scroll;const p=n-this.animatedScroll;p>this.limit/2?n=n-this.limit:p<-this.limit/2&&(n=n+this.limit)}}else n=St(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}d||(this.targetScroll=n),typeof i=="number"&&typeof a!="function"?a=mt: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:(p,f)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=p-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=p,this.setScroll(this.scroll),d&&(this.targetScroll=p),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,d,m,p;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,d=n.scrollHeight,m=n.clientWidth,p=n.clientHeight,l=u>m,c=d>p,i.isScrollableX=l,i.isScrollableY=c,i.scrollWidth=u,i.scrollHeight=d,i.clientWidth=m,i.clientHeight=p}else l=i.isScrollableX,c=i.isScrollableY,a=i.hasOverflowX,o=i.hasOverflowY,u=i.scrollWidth,d=i.scrollHeight,m=i.clientWidth,p=i.clientHeight;if(!a&&!o||!l&&!c||f==="vertical"&&(!o||!c)||f==="horizontal"&&(!a||!l))return!1;let h;if(f==="horizontal")h="x";else if(f==="vertical")h="y";else{const O=e!==0,E=t!==0;O&&a&&l&&(h="x"),E&&o&&c&&(h="y")}if(!h)return!1;let g,x,w,v,S;if(h==="x")g=n.scrollLeft,x=u-m,w=e,v=a,S=l;else if(h==="y")g=n.scrollTop,x=d-p,w=t,v=o,S=c;else return!1;return(w>0?g0)&&v&&S}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?Ti(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()}},Ii=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}},Ai=b.createContext(null),ft=new Ii(null),$i=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),[d,m]=b.useState(void 0);b.useImperativeHandle(l,()=>({wrapper:c.current,content:u.current,lenis:d}),[d]),b.useEffect(()=>{const g=new Fi({...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 p=b.useRef([]),f=b.useCallback((g,x)=>{p.current.push({callback:g,priority:x}),p.current.sort((w,v)=>w.priority-v.priority)},[]),h=b.useCallback(g=>{p.current=p.current.filter(x=>x.callback!==g)},[]);return b.useEffect(()=>{if(e&&d)return ft.set({lenis:d,addCallback:f,removeCallback:h}),()=>ft.set(null)},[e,d,f,h]),b.useEffect(()=>{if(!d)return;const g=x=>{var w;for(let v=0;v{d.off("scroll",g)}},[d]),r.jsx(Ai.Provider,{value:{lenis:d,addCallback:f,removeCallback:h},children:e?n:r.jsx("div",{ref:c,className:s,style:a,...o,children:r.jsx("div",{ref:u,children:n})})})});function Di(){return r.jsxs($i,{root:!0,options:{lerp:.07},children:[r.jsx(Qt,{}),r.jsxs("main",{className:"flex flex-col min-h-screen",children:[r.jsx(Ni,{}),r.jsx("div",{className:"flex-auto",children:r.jsx(Is,{})})]}),r.jsx(Xt,{})]})}function Mi(){return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(Zt,{}),r.jsx(es,{}),r.jsx(ts,{}),r.jsx(ss,{}),r.jsx(ns,{}),r.jsx(is,{}),r.jsx(rs,{}),r.jsx(as,{})]})}const Vi=j.object({type:j.string(),company_name:j.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),representative_name:j.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:j.string().min(3,{message:"Должность должна быть не менее 3 символов"}),participants_number:j.string().min(1,{message:"Укажите количество участников"}),country:j.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email_address:j.string().email({message:"Укажите корректный email"}),phone_number:j.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:j.string().optional(),meeting_objective:j.string().min(3,{message:"Укажите цель встречи"}),proposal_description:j.string().optional(),government_agency:j.string().optional(),sector_industry:j.string().optional(),key_services:j.string().optional(),government_experience:j.string().optional(),preferred_meeting_datetime:j.string().optional(),meeting_mode:j.string().optional(),language_preference:j.string().optional(),technical_requirements:j.string().optional(),company_profile:j.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:j.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:j.custom(n=>n instanceof File,{message:"Выберите корректный файл"}).refine(n=>n&&["image/jpeg","image/png","application/pdf"].includes(n.type),{message:"Допускаются только файлы JPG, PNG и PDF"}).optional()}),Bi={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 zi(n){const e=n+"CollectionProvider",[t,s]=Ee(e),[i,a]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:h,children:g}=f,x=ae.useRef(null),w=ae.useRef(new Map).current;return r.jsx(i,{scope:h,itemMap:w,collectionRef:x,children:g})};o.displayName=e;const l=n+"CollectionSlot",c=ae.forwardRef((f,h)=>{const{scope:g,children:x}=f,w=a(l,g),v=fe(h,w.collectionRef);return r.jsx(Je,{ref:v,children:x})});c.displayName=l;const u=n+"CollectionItemSlot",d="data-radix-collection-item",m=ae.forwardRef((f,h)=>{const{scope:g,children:x,...w}=f,v=ae.useRef(null),S=fe(h,v),R=a(u,g);return ae.useEffect(()=>(R.itemMap.set(v,{ref:v,...w}),()=>void R.itemMap.delete(v))),r.jsx(Je,{[d]:"",ref:S,children:x})});m.displayName=u;function p(f){const h=a(n+"CollectionConsumer",f);return ae.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((R,O)=>w.indexOf(R.ref.current)-w.indexOf(O.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:o,Slot:c,ItemSlot:m},p,s]}var Hi=b.createContext(void 0);function _t(n){const e=b.useContext(Hi);return n||e||"ltr"}var $e="rovingFocusGroup.onEntryFocus",Ki={bubbles:!1,cancelable:!0},Ie="RovingFocusGroup",[Me,Rt,Gi]=zi(Ie),[Ui,Ct]=Ee(Ie,[Gi]),[Wi,qi]=Ui(Ie),Tt=b.forwardRef((n,e)=>r.jsx(Me.Provider,{scope:n.__scopeRovingFocusGroup,children:r.jsx(Me.Slot,{scope:n.__scopeRovingFocusGroup,children:r.jsx(Yi,{...n,ref:e})})}));Tt.displayName=Ie;var Yi=b.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=n,p=b.useRef(null),f=fe(e,p),h=_t(a),[g=null,x]=gt({prop:o,defaultProp:l,onChange:c}),[w,v]=b.useState(!1),S=os(u),R=Rt(t),O=b.useRef(!1),[E,T]=b.useState(0);return b.useEffect(()=>{const C=p.current;if(C)return C.addEventListener($e,S),()=>C.removeEventListener($e,S)},[S]),r.jsx(Wi,{scope:t,orientation:s,dir:h,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:w||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&&!w){const Q=new CustomEvent($e,Ki);if(C.currentTarget.dispatchEvent(Q),!Q.defaultPrevented){const P=R().filter($=>$.focusable),A=P.find($=>$.active),we=P.find($=>$.id===g),U=[A,we,...P].filter(Boolean).map($=>$.ref.current);Ot(U,d)}}O.current=!1}),onBlur:ee(n.onBlur,()=>v(!1))})})}),Et="RovingFocusGroupItem",Lt=b.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:i=!1,tabStopId:a,...o}=n,l=ls(),c=a||l,u=qi(Et,t),d=u.currentTabStopId===c,m=Rt(t),{onFocusableItemAdd:p,onFocusableItemRemove:f}=u;return b.useEffect(()=>{if(s)return p(),()=>f()},[s,p,f]),r.jsx(Me.ItemSlot,{scope:t,id:c,focusable:s,active:i,children:r.jsx(be.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ee(n.onMouseDown,h=>{s?u.onItemFocus(c):h.preventDefault()}),onFocus:ee(n.onFocus,()=>u.onItemFocus(c)),onKeyDown:ee(n.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const g=Xi(h,u.orientation,u.dir);if(g!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=m().filter(v=>v.focusable).map(v=>v.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const v=w.indexOf(h.currentTarget);w=u.loop?Zi(w,v+1):w.slice(v+1)}setTimeout(()=>Ot(w))}})})})});Lt.displayName=Et;var Ji={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qi(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Xi(n,e,t){const s=Qi(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Ji[s]}function Ot(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function Zi(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var er=Tt,tr=Lt;function sr(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",[nr,Pt]=Ee(Ge),[ir,rr]=nr(Ge),Ft=b.forwardRef((n,e)=>{const{__scopeRadio:t,name:s,checked:i=!1,required:a,disabled:o,value:l="on",onCheck:c,form:u,...d}=n,[m,p]=b.useState(null),f=fe(e,x=>p(x)),h=b.useRef(!1),g=m?u||!!m.closest("form"):!0;return r.jsxs(ir,{scope:t,checked:i,disabled:o,children:[r.jsx(be.button,{type:"button",role:"radio","aria-checked":i,"data-state":$t(i),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:f,onClick:ee(n.onClick,x=>{i||c==null||c(),g&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),g&&r.jsx(ar,{control:m,bubbles:!h.current,name:s,value:l,checked:i,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});Ft.displayName=Ge;var It="RadioIndicator",At=b.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:s,...i}=n,a=rr(It,t);return r.jsx(cs,{present:s||a.checked,children:r.jsx(be.span,{"data-state":$t(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:e})})});At.displayName=It;var ar=n=>{const{control:e,checked:t,bubbles:s=!0,...i}=n,a=b.useRef(null),o=sr(t),l=us(e);return b.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==t&&m){const p=new Event("click",{bubbles:s});m.call(c,t),c.dispatchEvent(p)}},[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 $t(n){return n?"checked":"unchecked"}var or=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ue="RadioGroup",[lr,Kr]=Ee(Ue,[Ct,Pt]),Dt=Ct(),Mt=Pt(),[cr,ur]=lr(Ue),Vt=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:s,defaultValue:i,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...p}=n,f=Dt(t),h=_t(u),[g,x]=gt({prop:a,defaultProp:i,onChange:m});return r.jsx(cr,{scope:t,name:s,required:o,disabled:l,value:g,onValueChange:x,children:r.jsx(er,{asChild:!0,...f,orientation:c,dir:h,loop:d,children:r.jsx(be.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h,...p,ref:e})})})});Vt.displayName=Ue;var Bt="RadioGroupItem",zt=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:s,...i}=n,a=ur(Bt,t),o=a.disabled||s,l=Dt(t),c=Mt(t),u=b.useRef(null),d=fe(e,u),m=a.value===i.value,p=b.useRef(!1);return b.useEffect(()=>{const f=g=>{or.includes(g.key)&&(p.current=!0)},h=()=>p.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",h)}},[]),r.jsx(tr,{asChild:!0,...l,focusable:!o,active:m,children:r.jsx(Ft,{disabled:o,required:a.required,checked:m,...c,...i,name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:ee(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ee(i.onFocus,()=>{var f;p.current&&((f=u.current)==null||f.click())})})})});zt.displayName=Bt;var pr="RadioGroupIndicator",dr=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...s}=n,i=Mt(t);return r.jsx(At,{...i,...s,ref:e})});dr.displayName=pr;var Ht=Vt,Kt=zt;const xe=b.forwardRef(({className:n,...e},t)=>r.jsx(Ht,{className:J("grid gap-2",n),...e,ref:t}));xe.displayName=Ht.displayName;const Z=b.forwardRef(({className:n,...e},t)=>r.jsx(Kt,{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=Kt.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"}],H=n=>{b.useEffect(()=>{window.scrollTo({behavior:"smooth",top:0})},[n])},hr=({handleNext:n})=>{H();const{control:e,formState:t}=Ve(),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(V,{className:"space-y-3",children:[r.jsx(B,{className:"text-xl",children:s===ne.RU?"Тип:":"Type:"}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:i.onChange,defaultValue:i.value,className:"flex flex-col space-y-4",children:[r.jsxs(V,{className:"flex items-center space-x-3 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"B2B",checked:i.value==="B2B"})}),r.jsx(B,{className:"text-base",children:"B2B"})]}),r.jsxs(V,{className:"flex items-center space-x-3 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"B2G",checked:i.value==="B2G"})}),r.jsx(B,{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"})]})},mr=({handleNext:n,handlePrev:e})=>{H();const t=I(a=>a.lang),{control:s,formState:i}=Ve();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"})]})]})},fr=({handlePrev:n})=>{H();const{control:e,formState:t}=Ve(),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(Be,{className:"animate-spin"}):W[N(s)].button})]})]})},gr=({stage:n,setStage:e,success:t,setSuccess:s})=>{const i=Le({resolver:Oe(Vi),defaultValues:Bi,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 d=new FormData;Object.entries(u).forEach(([p,f])=>{f instanceof File?(console.log(`Добавляем файл: ${p}`,f),d.append(p,f)):f!==void 0&&(console.log(`Добавляем поле: ${p}`,f),d.append(p,f))}),(await ps.post("https://turkmentextile.turkmenexpo.com/app/api/v1/form",d,{headers:{"Content-Type":"multipart/form-data"}})).status===201&&s(!0)}catch(d){console.error("Ошибка при отправке B2B формы:",d)}};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(hr,{handleNext:o})}),r.jsx(ce,{children:n===2&&r.jsx(mr,{handleNext:o,handlePrev:l})}),r.jsx(ce,{children:n===3&&t===!1&&r.jsx(fr,{handlePrev:l})}),t&&r.jsx(ze,{})]})})})};function xr(){H();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(ds,{stage:e}),r.jsx("div",{className:"max-w-[808px] md:mx-auto mx-5",children:r.jsx(gr,{success:s,setSuccess:i,stage:e,setStage:t})})]})}function br(){H();const n=I(e=>e.lang);return r.jsxs("div",{className:J(""),children:[r.jsx(ye,{title:n===ne.RU?"О выставке":"About exhibition"}),r.jsx(hs,{}),r.jsx(ms,{}),r.jsx(fs,{}),r.jsx(gs,{}),r.jsx(xs,{})]})}const vr=j.object({company_name:j.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),rep_name:j.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:j.string().min(3,{message:"Должность должна быть не менее 3 символов"}),country:j.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email:j.string().email({message:"Укажите корректный email"}),phone:j.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:j.string().optional(),visa_support:j.string().optional()}),yr={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 wr(){H();const n=I(o=>o.lang),[e,t]=b.useState(!1),s=Le({resolver:Oe(vr),defaultValues:yr}),i=async o=>{try{await bs(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(V,{className:"space-y-5",children:[r.jsx(B,{className:"text-xl",children:L[N(n)].visa}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:o.onChange,defaultValue:o.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"yes",checked:o.value==="yes"})}),r.jsx(B,{className:"text-base",children:L[N(n)].visa_radio})]}),r.jsxs(V,{className:"flex items-center space-x-5 space-y-0 ",children:[r.jsx(z,{children:r.jsx(Z,{value:"no",checked:o.value==="no"})}),r.jsx(B,{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(Be,{className:"animate-spin"}):L[N(n)].button})]})})}),e&&r.jsx(ze,{delay:.3})]})}const jr=j.object({name:j.string().min(2,"error"),email:j.string().email(),phone:j.string().min(8,"error"),company:j.string().min(2,"error"),msg:j.string().min(5,"error")}),kr={name:"",email:"",phone:"",company:"",msg:""},Sr=({className:n})=>{const{t:e}=pe("contacts"),[t,s]=b.useState(!1),i=Le({resolver:Oe(jr),defaultValues:kr});async function a(l){try{const c=await ys(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(vs,{className:"animate-spin text-white"}):e("button")})]})]})})})};function Nr(){H();const{t:n}=pe("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(Sr,{}),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 _r=[{id:0,title:"Фото",titleEn:"Photo"},{id:1,title:"Видео",titleEn:"Video"}],Rr=({className:n})=>{var w,v,S,R,O;const[e,t]=b.useState(0),{data:s,isPending:i,status:a}=ws(1),{data:o}=xt(1),[l,c]=b.useState(!1),[u,d]=b.useState({id:0,type:"photo"}),m=I(E=>E.lang),p=({id:E,type:T})=>{c(!0),d({id:E,type:T})},{t:f}=pe("main"),[h,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(js,{activeItem:u,setActiveItem:d,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:_r,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=(w=s==null?void 0:s.photos)==null?void 0:w.slice(0,h?1e3:16))==null?void 0:v.map((E,T)=>{var C,K;return r.jsx("div",{onClick:()=>p({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)}):(S=o==null?void 0:o.videos)==null?void 0:S.map((E,T)=>{var C;return r.jsxs("div",{onClick:()=>p({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&&!h&&r.jsx(q,{onClick:()=>g(!0),className:"mx-auto w-[288px] mt-10 text-on_surface",size:"lg",variant:"outline",children:f("media.button")})]})})]})]})},Cr=(n,e)=>{const{data:t,isPending:s}=He({queryKey:["news-inner",n,e],queryFn:()=>Ss(n,e),select:({data:i})=>i.data});return{data:t,isPending:s}};function Tr(){var o;const{id:n}=As(),e=I(l=>l.lang),t=Number(n);H(t);const{data:s,isPending:i}=Cr(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 Er(){H();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 Lr=()=>{const n=I(s=>s.lang),{data:e,isPending:t}=He({queryKey:["participants",n],queryFn:()=>Ns(n),select:({data:s})=>s.data});return{data:e,isPending:t}},Or=({className:n})=>{var u,d,m,p,f;H();const e=I(h=>h.lang),{data:t,isPending:s}=Lr(),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,(d=t==null?void 0:t[2])==null?void 0:d.participants),c=t==null?void 0:t.filter(h=>a===1?h.id===3:a===2?h.id===1:h.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((h,g,x)=>r.jsx(Qe,{...h,arr:x==null?void 0:x.length,index:g,image:h.image??{path:""},image_country:h.image_country??{path:""}})):(f=(p=c==null?void 0:c[0])==null?void 0:p.participants)==null?void 0:f.map((h,g,x)=>r.jsx(Qe,{...h,arr:x==null?void 0:x.length,index:g,image:h.image??{path:""},image_country:h.image_country??{path:""}}))]})]})})},Pr=j.object({space_package:j.string(),company_name:j.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),rep_name:j.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:j.string().min(3,{message:"Должность должна быть не менее 3 символов"}),participants_number:j.preprocess(n=>Number(n),j.number().min(1,"Укажите количество участников")),country:j.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email:j.string().email({message:"Укажите корректный email"}),phone:j.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:j.string().optional(),visa_support:j.string().optional()}),Fr={space_package:"space",company_name:"",rep_name:"",job_title:"",participants_number:1,country:"",email:"",phone:"",website:"",visa_support:""};function Ir(){const n=I(l=>l.lang),[e,t]=b.useState(!1),s=Le({resolver:Oe(Pr),defaultValues:Fr}),i=async l=>{await _s(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(V,{className:"space-y-5",children:[r.jsx(B,{className:"text-xl",children:L[o].h2}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"space",checked:l.value==="space"})}),r.jsx(B,{className:"text-base",children:L[o].radio})]}),r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"package",checked:l.value==="package"})}),r.jsx(B,{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(V,{className:"space-y-5",children:[r.jsx(B,{className:"text-xl",children:L[o].visa}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"yes",checked:l.value==="yes"})}),r.jsx(B,{className:"text-base",children:L[o].visa_radio})]}),r.jsxs(V,{className:"flex items-center space-x-5 space-y-0 ",children:[r.jsx(z,{children:r.jsx(Z,{value:"no",checked:l.value==="no"})}),r.jsx(B,{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(Be,{className:"animate-spin"}):L[o].button})]})})}),e&&r.jsx(ze,{delay:.3})]})}const Gt=()=>{var h;const{t:n}=pe("main"),e=I(g=>g.lang),{pathname:t}=Ke(),[s]=wt({loop:!0},[Rs({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}),d=(g,x)=>t==="/impressions"?g:x,m=(g,x)=>t==="/impressions"?g:x,p={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"?p.ru:p.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:d(i,c)}),r.jsx("div",{className:"text-on_surface_v flex flex-col gap-3",children:(h=m(a,u))==null?void 0:h.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(Xe,{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(Xe,{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})})]})]})})]})},Ut=()=>{var d,m,p;const{t:n}=pe("main"),{pathname:e}=Ke(),[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,h)=>(f==null?void 0:f.fashion_shows_order_id)+(h==null?void 0:h.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:(p=(m=(d=i==null?void 0:i.videos)==null?void 0:d[t])==null?void 0:m.video)==null?void 0:p.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,h)=>{var g;return r.jsx("div",{onClick:()=>s(h+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"})},h)})})})]})]})})},Ar=n=>{const e=I(i=>i.lang),{data:t,isPending:s}=He({queryKey:["designers",e],queryFn:()=>Cs(e,n),select:({data:i})=>i.data});return{data:t,isPending:s}},Wt=()=>{const{pathname:n}=Ke(),e=()=>n!=="/impressions",{data:t,isPending:s}=Ar(e()?2:1),[i,a]=wt({align:"center",skipSnaps:!0,slidesToScroll:2,dragFree:!0}),[o,l]=b.useState(0),{t:c}=pe("main"),[u,d]=b.useState(!1),[m,p]=b.useState(!0),f=b.useCallback(S=>{a&&a.scrollTo(S)},[a]);b.useEffect(()=>{if(!a)return;const S=()=>{l(a==null?void 0:a.selectedScrollSnap()),d(a.canScrollPrev()),p(a.canScrollNext())};return a.on("select",S),()=>{a.off("select",S)}},[a]);const{title:h,text:g,title2:x,text2:w}=c("impressions.designers",{returnObjects:!0}),v=[...(t==null?void 0:t.designers)??[]].sort((S,R)=>(S==null?void 0:S.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()?h:x}),r.jsx("p",{className:"md:text-xl text-lg normal text-on_surface_v",children:e()?g:w}),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((S,R)=>r.jsx(Ts,{...S,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(Es,{})}),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((S,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(Ls,{})})]})]})]})})};function $r(){return H(),r.jsxs("div",{className:"overflow-x-hidden",children:[r.jsx(Gt,{}),r.jsx(Ut,{}),r.jsx(Wt,{})]})}function Dr(){return H(),r.jsxs("div",{className:"overflow-x-hidden",children:[r.jsx(Gt,{}),r.jsx(Ut,{}),r.jsx(Wt,{})]})}const M=({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"})}),Mr=$s([{element:r.jsx(Di,{}),path:"/",children:[{element:r.jsx(Mi,{}),path:"",errorElement:r.jsx(M,{})},{element:r.jsx(br,{}),path:"about",errorElement:r.jsx(M,{})},{element:r.jsx(xr,{}),path:"B2B-B2G",errorElement:r.jsx(M,{})},{element:r.jsx(wr,{}),path:"become-sponsor",errorElement:r.jsx(M,{})},{element:r.jsx(Ir,{}),path:"stend-form",errorElement:r.jsx(M,{})},{element:r.jsx(Nr,{}),path:"contacts",errorElement:r.jsx(M,{})},{element:r.jsx(Er,{}),path:"news",errorElement:r.jsx(M,{})},{element:r.jsx(Tr,{}),path:"news/:id",errorElement:r.jsx(M,{})},{element:r.jsx(Or,{}),path:"participants",errorElement:r.jsx(M,{})},{element:r.jsx(Rr,{}),path:"media",errorElement:r.jsx(M,{})},{element:r.jsx($r,{}),path:"impressions",errorElement:r.jsx(M,{})},{element:r.jsx(Dr,{}),path:"impressions-tm",errorElement:r.jsx(M,{})}]}]),Vr=new Os;Vs.createRoot(document.getElementById("root")).render(r.jsx(b.StrictMode,{children:r.jsx(Ps,{client:Vr,children:r.jsx(Ds,{router:Mr})})})); +var qt=Object.defineProperty;var Yt=(n,e,t)=>e in n?qt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var y=(n,e,t)=>Yt(n,typeof e!="symbol"?e+"":e,t);import{u as I,i as Jt,j as r,H as Qt,F as Xt,a as Zt,b as es,c as ts,d as ss,e as ns,f as is,g as rs,h as as,z as j,k as Ee,l as fe,S as Je,m as gt,n as os,P as be,o as ee,p as ls,q as cs,r as us,s as J,t as Ve,v as ve,w as N,x as Ne,y as V,A as B,L as ne,B as z,C as _,D as q,E as Be,G as Le,I as Oe,J as Pe,K as ce,M as ze,N as ps,O as ye,Q as ds,R as hs,T as ms,U as fs,V as gs,W as xs,X as bs,Y as pe,Z as vs,_ as ys,$ as ie,a0 as ws,a1 as xt,a2 as js,a3 as bt,a4 as ks,a5 as ue,a6 as He,a7 as Ss,a8 as vt,a9 as yt,aa as Ns,ab as Qe,ac as _s,ad as wt,ae as Rs,af as Cs,ag as Ts,ah as Es,ai as Ls,aj as Os,ak as Ps}from"./ui-library-B2qs5YcL.js";import{f as Fs,a as b,O as Is,e as ae,u as As,g as Ke,L as Xe,h as $s,i as Ds}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 ke={},Ze;function Ms(){if(Ze)return ke;Ze=1;var n=Fs();return ke.createRoot=n.createRoot,ke.hydrateRoot=n.hydrateRoot,ke}var Vs=Ms();const k=n=>typeof n=="string",he=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},et=n=>n==null?"":""+n,Bs=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},zs=/###/g,tt=n=>n&&n.indexOf("###")>-1?n.replace(zs,"."):n,st=n=>!n||k(n),me=(n,e,t)=>{const s=k(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},Hs=(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]},Ks=(n,e,t)=>{const s=_e(n,t);return s!==void 0?s:_e(e,t)},jt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?k(n[s])||n[s]instanceof String||k(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):jt(n[s],e[s],t):n[s]=e[s]);return n},oe=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Gs={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Us=n=>k(n)?n.replace(/[&<>"'\/]/g,e=>Gs[e]):n;class Ws{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 qs=[" ",",","?","!",";"],Ys=new Ws(20),Js=(n,e,t)=>{e=e||"",t=t||"";const s=qs.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(s.length===0)return!0;const i=Ys.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("_","-"),Qs={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||Qs,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,d;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):k(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||!k(s)?c:De((d=(u=this.data)==null?void 0:u[e])==null?void 0:d[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),nt(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)(k(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?jt(c,s,a):c={...c,...s},nt(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 kt={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 rt={},at=n=>!k(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(),Bs(["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&&!Js(e,s,i);if(o&&!l){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:k(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:k(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,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(d){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 p=m==null?void 0:m.res;const f=(m==null?void 0:m.usedKey)||o,h=(m==null?void 0:m.exactUsedKey)||o,g=["[object Number]","[object Function]","[object RegExp]"],x=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,v=t.count!==void 0&&!k(t.count),S=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=p;w&&!p&&S&&(C=T);const K=at(C),Q=Object.prototype.toString.apply(C);if(w&&C&&K&&g.indexOf(Q)<0&&!(k(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),A=P?[]:{},we=P?h:f;for(const G in C)if(Object.prototype.hasOwnProperty.call(C,G)){const U=`${we}${a}${G}`;S&&!p?A[G]=this.translate(U,{...t,defaultValue:at(T)?T[G]:void 0,joinArrays:!1,ns:l}):A[G]=this.translate(U,{...t,joinArrays:!1,ns:l}),A[G]===U&&(A[G]=C[G])}p=A}}else if(w&&k(x)&&Array.isArray(p))p=p.join(x),p&&(p=this.extendTranslation(p,e,t,s));else{let P=!1,A=!1;!this.isValidLookup(p)&&S&&(P=!0,p=T),this.isValidLookup(p)||(A=!0,p=o);const G=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:p,U=S&&T!==p&&this.options.updateMissing;if(A||P||U){if(this.logger.log(U?"updateKey":"missingKey",u,c,o,U?T:p),a){const D=this.resolve(o,{...t,keySeparator:!1});D&&D.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 $=[];const je=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&je&&je[0])for(let D=0;D{var Ye;const qe=S&&de!==p?de:G;this.options.missingKeyHandler?this.options.missingKeyHandler(D,c,re,qe,U,t):(Ye=this.backendConnector)!=null&&Ye.saveMissing&&this.backendConnector.saveMissing(D,c,re,qe,U,t),this.emit("missingKey",D,c,re,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?$.forEach(D=>{const re=this.pluralResolver.getSuffixes(D,t);E&&t[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(de=>{We([D],o+de,t[`defaultValue${de}`]||T)})}):We($,o,T))}p=this.extendTranslation(p,e,t,m,s),A&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${o}`),(A||P)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,P?p:void 0))}return i?(m.res=p,m.usedParams=this.getUsedParamsDetails(t),m):p}extendTranslation(e,t,s,i,a){var u,d;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=k(e)&&(((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(m){const h=e.match(this.interpolator.nestingRegexp);p=h&&h.length}let f=s.replace&&!k(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 h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;p1&&arguments[1]!==void 0?arguments[1]:{},s,i,a,o,l;return k(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(c,t),d=u.key;i=d;let m=u.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const p=t.count!==void 0&&!k(t.count),f=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(k(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 w,v;this.isValidLookup(s)||(l=x,!rt[`${g[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(l))&&(rt[`${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(S=>{var E;if(this.isValidLookup(s))return;o=S;const R=[d];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(R,d,S,x,t);else{let T;p&&(T=this.pluralResolver.getSuffix(S,t.count,t));const C=`${this.options.pluralSeparator}zero`,K=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(R.push(d+T),t.ordinal&&T.indexOf(K)===0&&R.push(d+T.replace(K,this.options.pluralSeparator)),f&&R.push(d+C)),h){const Q=`${d}${this.options.contextSeparator}${t.context}`;R.push(Q),p&&(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(S,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&&!k(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 ot{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(k(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)),k(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 k(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))):k(e)&&a(this.formatLanguageCode(e)),s.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const lt={zero:0,one:1,two:2,few:3,many:4,other:5},ct={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Xs{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!"),ct;if(!e.match(/-|_/))return ct;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)=>lt[i]-lt[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 ut=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=Ks(n,e,t);return!a&&i&&k(t)&&(a=De(n,t,s),a===void 0&&(a=De(e,t,s))),a},Ae=n=>n.replace(/\$/g,"$$$$");class Zs{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:d,unescapePrefix:m,nestingPrefix:p,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:Us,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=d?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?oe(p):f||oe("$t("),this.nestingSuffix=h?oe(h):g||oe(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||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=h=>{if(h.indexOf(this.formatSeparator)<0){const v=ut(t,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,s,{...i,...t,interpolationkey:h}):v}const g=h.split(this.formatSeparator),x=g.shift().trim(),w=g.join(this.formatSeparator).trim();return this.format(ut(t,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,s,{...i,...t,interpolationkey:x})};this.resetRegExp();const d=(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:h=>Ae(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Ae(this.escape(h)):Ae(h)}].forEach(h=>{for(l=0;a=h.regex.exec(e);){const g=a[1].trim();if(o=u(g),o===void 0)if(typeof d=="function"){const w=d(e,a,i);o=k(w)?w:""}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!k(o)&&!this.useRawValueToEscape&&(o=et(o));const x=h.safeValue(o);if(e=e.replace(a[0],x),m?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=a[0].length):h.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 d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const m=c.split(new RegExp(`${d}[ ]*{`));let p=`{${m[1]}`;c=m[0],p=this.interpolate(p,o);const f=p.match(/'/g),h=p.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!h||h.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${d}${p}`}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&&!k(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 d=i[1].split(this.formatSeparator).map(m=>m.trim());i[1]=d.shift(),c=d,u=!0}if(a=t(l.call(this,i[1].trim(),o),o),a&&i[0]===e&&!k(a))return a;k(a)||(a=et(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),u&&(a=c.reduce((d,m)=>this.format(d,m,s.lng,{...s,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const en=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,""),d=l.trim();t[d]||(t[d]=u),u==="false"&&(t[d]=!1),u==="true"&&(t[d]=!0),isNaN(u)||(t[d]=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 tn{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:d}=en(c);if(this.formats[u]){let p=l;try{const f=((m=i==null?void 0:i.formatParams)==null?void 0:m[i.interpolationkey])||{},h=f.locale||f.lng||i.locale||i.lng||s;p=this.formats[u](l,h,{...d,...i,...f})}catch(f){this.logger.warn(f)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},e)}}const sn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class nn 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 d=!0;t.forEach(m=>{const p=`${u}|${m}`;!s.reload&&this.store.hasResourceBundle(u,m)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,d=!1,o[p]===void 0&&(o[p]=!0),a[p]===void 0&&(a[p]=!0),c[m]===void 0&&(c[m]=!0)))}),d||(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=>{Hs(c.loaded,[a],o),sn(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.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,d)=>{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&&d&&i{this.read.call(this,e,t,s,i+1,a*2,o)},a);return}o(u,d)},c=this.backend[s].bind(this.backend);if(c.length===2){try{const u=c(e,t);u&&typeof u.then=="function"?u.then(d=>l(null,d)).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();k(e)&&(e=this.languageUtils.toResolveHierarchy(e)),k(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,d,m,p;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=(d=this.services)==null?void 0:d.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((p=this.backend)!=null&&p.create){const f={...o,isUpdate:a},h=this.backend.create.bind(this.backend);if(h.length<6)try{let g;h.length===5?g=h(e,t,s,i,f):g=h(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 h(e,t,s,i,l,f)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const pt=()=>({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]),k(n[1])&&(e.defaultValue=n[1]),k(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}}),dt=n=>{var e,t;return k(n.ns)&&(n.ns=[n.ns]),k(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),k(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},Se=()=>{},rn=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=dt(e),this.services={},this.logger=Y,this.modules={external:[]},rn(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&&(k(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=pt();this.options={...i,...this.options,...dt(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=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Y.init(a(this.modules.logger),this.options):Y.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=tn;const m=new ot(this.options);this.store=new it(this.options.resources,this.options);const p=this.services;p.logger=Y,p.resourceStore=this.store,p.languageUtils=m,p.pluralResolver=new Xs(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=a(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Zs(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new nn(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(f){for(var h=arguments.length,g=new Array(h>1?h-1:0),x=1;x1?h-1:0),x=1;x{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Se),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const c=he(),u=()=>{const d=(m,p)=>{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(p),s(m,p)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};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]:Se;const i=k(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(d=>c(d)),(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=he();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=Se),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"&&kt.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=he();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 d,m;!e&&!c&&this.services.languageDetector&&(c=[]);const u=k(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(m=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||m.call(d,u)),this.loadResources(u,p=>{o(p,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,d=new Array(u>2?u-2:0),m=2;m`${c.keyPrefix}${p}${h}`):f=c.keyPrefix?`${c.keyPrefix}${p}${o}`:o,i.t(f,c)};return k(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=he();return this.options.ns?(k(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=he();k(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 ot(pt());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]:Se;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((d,m)=>(d[m]={...c[u][m]},d),{})),{});a.store=new it(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),d=1;d{const n=I(e=>e.lang);return b.useEffect(()=>{F.changeLanguage(n)},[n]),null};var _i="1.3.4";function St(n,e,t){return Math.max(n,Math.min(e,t))}function Ri(n,e,t){return(1-t)*n+t*e}function Ci(n,e,t,s){return Ri(n,e,1-Math.exp(-t*s))}function Ti(n,e){return(n%e+e)%e}var Ei=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=St(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=Ci(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 Li(n,e){let t;return function(...s){let i=this;clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(i,s)},e)}}var Oi=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=Li(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={}}},ht=100/6,te={passive:!1},Pi=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?ht:s===2?this.window.width:1,a=s===1?ht: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)}},mt=n=>Math.min(1,1.001-Math.pow(2,-10*n)),Fi=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:d=!1,orientation:m="vertical",gestureOrientation:p="vertical",touchMultiplier:f=1,wheelMultiplier:h=1,autoResize:g=!0,prevent:x,virtualScroll:w,overscroll:v=!0,autoRaf:S=!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 Ei);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 d=this.options.prevent;if(u.find(x=>{var w,v,S;return x instanceof HTMLElement&&(typeof d=="function"&&(d==null?void 0:d(x))||((w=x.hasAttribute)==null?void 0:w.call(x,"data-lenis-prevent"))||i&&((v=x.hasAttribute)==null?void 0:v.call(x,"data-lenis-prevent-touch"))||a&&((S=x.hasAttribute)==null?void 0:S.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 p=t;this.options.gestureOrientation==="both"?p=Math.abs(t)>Math.abs(e)?t:e:this.options.gestureOrientation==="horizontal"&&(p=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(p)>5;g&&(p=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+p,{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=_i,(!n||n===document.documentElement)&&(n=window),typeof l=="number"&&typeof c!="function"?c=mt: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:d,gestureOrientation:p,orientation:m,touchMultiplier:f,wheelMultiplier:h,autoResize:g,prevent:x,virtualScroll:w,overscroll:v,autoRaf:S,anchors:R,autoToggle:O,allowNestedScroll:E,__experimental__naiveDimensions:T},this.dimensions=new Oi(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 Pi(t,{touchMultiplier:f,wheelMultiplier:h}),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:d=!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 p;if(typeof n=="string"?p=document.querySelector(n):n instanceof HTMLElement&&(n!=null&&n.nodeType)&&(p=n),p){if(this.options.wrapper!==window){const h=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?h.left:h.top}const f=p.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(d){this.targetScroll=this.animatedScroll=this.scroll;const p=n-this.animatedScroll;p>this.limit/2?n=n-this.limit:p<-this.limit/2&&(n=n+this.limit)}}else n=St(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}d||(this.targetScroll=n),typeof i=="number"&&typeof a!="function"?a=mt: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:(p,f)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=p-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=p,this.setScroll(this.scroll),d&&(this.targetScroll=p),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,d,m,p;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,d=n.scrollHeight,m=n.clientWidth,p=n.clientHeight,l=u>m,c=d>p,i.isScrollableX=l,i.isScrollableY=c,i.scrollWidth=u,i.scrollHeight=d,i.clientWidth=m,i.clientHeight=p}else l=i.isScrollableX,c=i.isScrollableY,a=i.hasOverflowX,o=i.hasOverflowY,u=i.scrollWidth,d=i.scrollHeight,m=i.clientWidth,p=i.clientHeight;if(!a&&!o||!l&&!c||f==="vertical"&&(!o||!c)||f==="horizontal"&&(!a||!l))return!1;let h;if(f==="horizontal")h="x";else if(f==="vertical")h="y";else{const O=e!==0,E=t!==0;O&&a&&l&&(h="x"),E&&o&&c&&(h="y")}if(!h)return!1;let g,x,w,v,S;if(h==="x")g=n.scrollLeft,x=u-m,w=e,v=a,S=l;else if(h==="y")g=n.scrollTop,x=d-p,w=t,v=o,S=c;else return!1;return(w>0?g0)&&v&&S}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?Ti(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()}},Ii=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}},Ai=b.createContext(null),ft=new Ii(null),$i=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),[d,m]=b.useState(void 0);b.useImperativeHandle(l,()=>({wrapper:c.current,content:u.current,lenis:d}),[d]),b.useEffect(()=>{const g=new Fi({...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 p=b.useRef([]),f=b.useCallback((g,x)=>{p.current.push({callback:g,priority:x}),p.current.sort((w,v)=>w.priority-v.priority)},[]),h=b.useCallback(g=>{p.current=p.current.filter(x=>x.callback!==g)},[]);return b.useEffect(()=>{if(e&&d)return ft.set({lenis:d,addCallback:f,removeCallback:h}),()=>ft.set(null)},[e,d,f,h]),b.useEffect(()=>{if(!d)return;const g=x=>{var w;for(let v=0;v{d.off("scroll",g)}},[d]),r.jsx(Ai.Provider,{value:{lenis:d,addCallback:f,removeCallback:h},children:e?n:r.jsx("div",{ref:c,className:s,style:a,...o,children:r.jsx("div",{ref:u,children:n})})})});function Di(){return r.jsxs($i,{root:!0,options:{lerp:.07},children:[r.jsx(Qt,{}),r.jsxs("main",{className:"flex flex-col min-h-screen",children:[r.jsx(Ni,{}),r.jsx("div",{className:"flex-auto",children:r.jsx(Is,{})})]}),r.jsx(Xt,{})]})}function Mi(){return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(Zt,{}),r.jsx(es,{}),r.jsx(ts,{}),r.jsx(ss,{}),r.jsx(ns,{}),r.jsx(is,{}),r.jsx(rs,{}),r.jsx(as,{})]})}const Vi=j.object({type:j.string(),company_name:j.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),representative_name:j.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:j.string().min(3,{message:"Должность должна быть не менее 3 символов"}),participants_number:j.string().min(1,{message:"Укажите количество участников"}),country:j.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email_address:j.string().email({message:"Укажите корректный email"}),phone_number:j.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:j.string().optional(),meeting_objective:j.string().min(3,{message:"Укажите цель встречи"}),proposal_description:j.string().optional(),government_agency:j.string().optional(),sector_industry:j.string().optional(),key_services:j.string().optional(),government_experience:j.string().optional(),preferred_meeting_datetime:j.string().optional(),meeting_mode:j.string().optional(),language_preference:j.string().optional(),technical_requirements:j.string().optional(),company_profile:j.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:j.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:j.custom(n=>n instanceof File,{message:"Выберите корректный файл"}).refine(n=>n&&["image/jpeg","image/png","application/pdf"].includes(n.type),{message:"Допускаются только файлы JPG, PNG и PDF"}).optional()}),Bi={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 zi(n){const e=n+"CollectionProvider",[t,s]=Ee(e),[i,a]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:h,children:g}=f,x=ae.useRef(null),w=ae.useRef(new Map).current;return r.jsx(i,{scope:h,itemMap:w,collectionRef:x,children:g})};o.displayName=e;const l=n+"CollectionSlot",c=ae.forwardRef((f,h)=>{const{scope:g,children:x}=f,w=a(l,g),v=fe(h,w.collectionRef);return r.jsx(Je,{ref:v,children:x})});c.displayName=l;const u=n+"CollectionItemSlot",d="data-radix-collection-item",m=ae.forwardRef((f,h)=>{const{scope:g,children:x,...w}=f,v=ae.useRef(null),S=fe(h,v),R=a(u,g);return ae.useEffect(()=>(R.itemMap.set(v,{ref:v,...w}),()=>void R.itemMap.delete(v))),r.jsx(Je,{[d]:"",ref:S,children:x})});m.displayName=u;function p(f){const h=a(n+"CollectionConsumer",f);return ae.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((R,O)=>w.indexOf(R.ref.current)-w.indexOf(O.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:o,Slot:c,ItemSlot:m},p,s]}var Hi=b.createContext(void 0);function _t(n){const e=b.useContext(Hi);return n||e||"ltr"}var $e="rovingFocusGroup.onEntryFocus",Ki={bubbles:!1,cancelable:!0},Ie="RovingFocusGroup",[Me,Rt,Gi]=zi(Ie),[Ui,Ct]=Ee(Ie,[Gi]),[Wi,qi]=Ui(Ie),Tt=b.forwardRef((n,e)=>r.jsx(Me.Provider,{scope:n.__scopeRovingFocusGroup,children:r.jsx(Me.Slot,{scope:n.__scopeRovingFocusGroup,children:r.jsx(Yi,{...n,ref:e})})}));Tt.displayName=Ie;var Yi=b.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=n,p=b.useRef(null),f=fe(e,p),h=_t(a),[g=null,x]=gt({prop:o,defaultProp:l,onChange:c}),[w,v]=b.useState(!1),S=os(u),R=Rt(t),O=b.useRef(!1),[E,T]=b.useState(0);return b.useEffect(()=>{const C=p.current;if(C)return C.addEventListener($e,S),()=>C.removeEventListener($e,S)},[S]),r.jsx(Wi,{scope:t,orientation:s,dir:h,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:w||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&&!w){const Q=new CustomEvent($e,Ki);if(C.currentTarget.dispatchEvent(Q),!Q.defaultPrevented){const P=R().filter($=>$.focusable),A=P.find($=>$.active),we=P.find($=>$.id===g),U=[A,we,...P].filter(Boolean).map($=>$.ref.current);Ot(U,d)}}O.current=!1}),onBlur:ee(n.onBlur,()=>v(!1))})})}),Et="RovingFocusGroupItem",Lt=b.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:i=!1,tabStopId:a,...o}=n,l=ls(),c=a||l,u=qi(Et,t),d=u.currentTabStopId===c,m=Rt(t),{onFocusableItemAdd:p,onFocusableItemRemove:f}=u;return b.useEffect(()=>{if(s)return p(),()=>f()},[s,p,f]),r.jsx(Me.ItemSlot,{scope:t,id:c,focusable:s,active:i,children:r.jsx(be.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ee(n.onMouseDown,h=>{s?u.onItemFocus(c):h.preventDefault()}),onFocus:ee(n.onFocus,()=>u.onItemFocus(c)),onKeyDown:ee(n.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const g=Xi(h,u.orientation,u.dir);if(g!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=m().filter(v=>v.focusable).map(v=>v.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const v=w.indexOf(h.currentTarget);w=u.loop?Zi(w,v+1):w.slice(v+1)}setTimeout(()=>Ot(w))}})})})});Lt.displayName=Et;var Ji={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qi(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Xi(n,e,t){const s=Qi(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Ji[s]}function Ot(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function Zi(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var er=Tt,tr=Lt;function sr(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",[nr,Pt]=Ee(Ge),[ir,rr]=nr(Ge),Ft=b.forwardRef((n,e)=>{const{__scopeRadio:t,name:s,checked:i=!1,required:a,disabled:o,value:l="on",onCheck:c,form:u,...d}=n,[m,p]=b.useState(null),f=fe(e,x=>p(x)),h=b.useRef(!1),g=m?u||!!m.closest("form"):!0;return r.jsxs(ir,{scope:t,checked:i,disabled:o,children:[r.jsx(be.button,{type:"button",role:"radio","aria-checked":i,"data-state":$t(i),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:f,onClick:ee(n.onClick,x=>{i||c==null||c(),g&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),g&&r.jsx(ar,{control:m,bubbles:!h.current,name:s,value:l,checked:i,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});Ft.displayName=Ge;var It="RadioIndicator",At=b.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:s,...i}=n,a=rr(It,t);return r.jsx(cs,{present:s||a.checked,children:r.jsx(be.span,{"data-state":$t(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:e})})});At.displayName=It;var ar=n=>{const{control:e,checked:t,bubbles:s=!0,...i}=n,a=b.useRef(null),o=sr(t),l=us(e);return b.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==t&&m){const p=new Event("click",{bubbles:s});m.call(c,t),c.dispatchEvent(p)}},[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 $t(n){return n?"checked":"unchecked"}var or=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ue="RadioGroup",[lr,Kr]=Ee(Ue,[Ct,Pt]),Dt=Ct(),Mt=Pt(),[cr,ur]=lr(Ue),Vt=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:s,defaultValue:i,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...p}=n,f=Dt(t),h=_t(u),[g,x]=gt({prop:a,defaultProp:i,onChange:m});return r.jsx(cr,{scope:t,name:s,required:o,disabled:l,value:g,onValueChange:x,children:r.jsx(er,{asChild:!0,...f,orientation:c,dir:h,loop:d,children:r.jsx(be.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h,...p,ref:e})})})});Vt.displayName=Ue;var Bt="RadioGroupItem",zt=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:s,...i}=n,a=ur(Bt,t),o=a.disabled||s,l=Dt(t),c=Mt(t),u=b.useRef(null),d=fe(e,u),m=a.value===i.value,p=b.useRef(!1);return b.useEffect(()=>{const f=g=>{or.includes(g.key)&&(p.current=!0)},h=()=>p.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",h)}},[]),r.jsx(tr,{asChild:!0,...l,focusable:!o,active:m,children:r.jsx(Ft,{disabled:o,required:a.required,checked:m,...c,...i,name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:ee(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ee(i.onFocus,()=>{var f;p.current&&((f=u.current)==null||f.click())})})})});zt.displayName=Bt;var pr="RadioGroupIndicator",dr=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...s}=n,i=Mt(t);return r.jsx(At,{...i,...s,ref:e})});dr.displayName=pr;var Ht=Vt,Kt=zt;const xe=b.forwardRef(({className:n,...e},t)=>r.jsx(Ht,{className:J("grid gap-2",n),...e,ref:t}));xe.displayName=Ht.displayName;const Z=b.forwardRef(({className:n,...e},t)=>r.jsx(Kt,{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=Kt.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"}],H=n=>{b.useEffect(()=>{window.scrollTo({behavior:"smooth",top:0})},[n])},hr=({handleNext:n})=>{H();const{control:e,formState:t}=Ve(),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(V,{className:"space-y-3",children:[r.jsx(B,{className:"text-xl",children:s===ne.RU?"Тип:":"Type:"}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:i.onChange,defaultValue:i.value,className:"flex flex-col space-y-4",children:[r.jsxs(V,{className:"flex items-center space-x-3 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"B2B",checked:i.value==="B2B"})}),r.jsx(B,{className:"text-base",children:"B2B"})]}),r.jsxs(V,{className:"flex items-center space-x-3 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"B2G",checked:i.value==="B2G"})}),r.jsx(B,{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"})]})},mr=({handleNext:n,handlePrev:e})=>{H();const t=I(a=>a.lang),{control:s,formState:i}=Ve();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"})]})]})},fr=({handlePrev:n})=>{H();const{control:e,formState:t}=Ve(),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(Be,{className:"animate-spin"}):W[N(s)].button})]})]})},gr=({stage:n,setStage:e,success:t,setSuccess:s})=>{const i=Le({resolver:Oe(Vi),defaultValues:Bi,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 d=new FormData;Object.entries(u).forEach(([p,f])=>{f instanceof File?(console.log(`Добавляем файл: ${p}`,f),d.append(p,f)):f!==void 0&&(console.log(`Добавляем поле: ${p}`,f),d.append(p,f))}),(await ps.post("https://turkmentextile.turkmenexpo.com/app/api/v1/form",d,{headers:{"Content-Type":"multipart/form-data"}})).status===201&&s(!0)}catch(d){console.error("Ошибка при отправке B2B формы:",d)}};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(hr,{handleNext:o})}),r.jsx(ce,{children:n===2&&r.jsx(mr,{handleNext:o,handlePrev:l})}),r.jsx(ce,{children:n===3&&t===!1&&r.jsx(fr,{handlePrev:l})}),t&&r.jsx(ze,{})]})})})};function xr(){H();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(ds,{stage:e}),r.jsx("div",{className:"max-w-[808px] md:mx-auto mx-5",children:r.jsx(gr,{success:s,setSuccess:i,stage:e,setStage:t})})]})}function br(){H();const n=I(e=>e.lang);return r.jsxs("div",{className:J(""),children:[r.jsx(ye,{title:n===ne.RU?"О выставке":"About exhibition"}),r.jsx(hs,{}),r.jsx(ms,{}),r.jsx(fs,{}),r.jsx(gs,{}),r.jsx(xs,{})]})}const vr=j.object({company_name:j.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),rep_name:j.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:j.string().min(3,{message:"Должность должна быть не менее 3 символов"}),country:j.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email:j.string().email({message:"Укажите корректный email"}),phone:j.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:j.string().optional(),visa_support:j.string().optional()}),yr={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 wr(){H();const n=I(o=>o.lang),[e,t]=b.useState(!1),s=Le({resolver:Oe(vr),defaultValues:yr}),i=async o=>{try{await bs(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(V,{className:"space-y-5",children:[r.jsx(B,{className:"text-xl",children:L[N(n)].visa}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:o.onChange,defaultValue:o.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"yes",checked:o.value==="yes"})}),r.jsx(B,{className:"text-base",children:L[N(n)].visa_radio})]}),r.jsxs(V,{className:"flex items-center space-x-5 space-y-0 ",children:[r.jsx(z,{children:r.jsx(Z,{value:"no",checked:o.value==="no"})}),r.jsx(B,{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(Be,{className:"animate-spin"}):L[N(n)].button})]})})}),e&&r.jsx(ze,{delay:.3})]})}const jr=j.object({name:j.string().min(2,"error"),email:j.string().email(),phone:j.string().min(8,"error"),company:j.string().min(2,"error"),msg:j.string().min(5,"error")}),kr={name:"",email:"",phone:"",company:"",msg:""},Sr=({className:n})=>{const{t:e}=pe("contacts"),[t,s]=b.useState(!1),i=Le({resolver:Oe(jr),defaultValues:kr});async function a(l){try{const c=await ys(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(vs,{className:"animate-spin text-white"}):e("button")})]})]})})})};function Nr(){H();const{t:n}=pe("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(Sr,{}),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 _r=[{id:0,title:"Фото",titleEn:"Photo"},{id:1,title:"Видео",titleEn:"Video"}],Rr=({className:n})=>{var w,v,S,R,O;const[e,t]=b.useState(0),{data:s,isPending:i,status:a}=ws(1),{data:o}=xt(1),[l,c]=b.useState(!1),[u,d]=b.useState({id:0,type:"photo"}),m=I(E=>E.lang),p=({id:E,type:T})=>{c(!0),d({id:E,type:T})},{t:f}=pe("main"),[h,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(js,{activeItem:u,setActiveItem:d,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:_r,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=(w=s==null?void 0:s.photos)==null?void 0:w.slice(0,h?1e3:16))==null?void 0:v.map((E,T)=>{var C,K;return r.jsx("div",{onClick:()=>p({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)}):(S=o==null?void 0:o.videos)==null?void 0:S.map((E,T)=>{var C;return r.jsxs("div",{onClick:()=>p({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&&!h&&r.jsx(q,{onClick:()=>g(!0),className:"mx-auto w-[288px] mt-10 text-on_surface",size:"lg",variant:"outline",children:f("media.button")})]})})]})]})},Cr=(n,e)=>{const{data:t,isPending:s}=He({queryKey:["news-inner",n,e],queryFn:()=>Ss(n,e),select:({data:i})=>i.data});return{data:t,isPending:s}};function Tr(){var o;const{id:n}=As(),e=I(l=>l.lang),t=Number(n);H(t);const{data:s,isPending:i}=Cr(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 Er(){H();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 Lr=()=>{const n=I(s=>s.lang),{data:e,isPending:t}=He({queryKey:["participants",n],queryFn:()=>Ns(n),select:({data:s})=>s.data});return{data:e,isPending:t}},Or=({className:n})=>{var u,d,m,p,f;H();const e=I(h=>h.lang),{data:t,isPending:s}=Lr(),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,(d=t==null?void 0:t[2])==null?void 0:d.participants),c=t==null?void 0:t.filter(h=>a===1?h.id===3:a===2?h.id===1:h.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((h,g,x)=>r.jsx(Qe,{...h,arr:x==null?void 0:x.length,index:g,image:h.image??{path:""},image_country:h.image_country??{path:""}})):(f=(p=c==null?void 0:c[0])==null?void 0:p.participants)==null?void 0:f.map((h,g,x)=>r.jsx(Qe,{...h,arr:x==null?void 0:x.length,index:g,image:h.image??{path:""},image_country:h.image_country??{path:""}}))]})]})})},Pr=j.object({space_package:j.string(),company_name:j.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),rep_name:j.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:j.string().min(3,{message:"Должность должна быть не менее 3 символов"}),participants_number:j.preprocess(n=>Number(n),j.number().min(1,"Укажите количество участников")),country:j.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email:j.string().email({message:"Укажите корректный email"}),phone:j.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:j.string().optional(),visa_support:j.string().optional()}),Fr={space_package:"space",company_name:"",rep_name:"",job_title:"",participants_number:1,country:"",email:"",phone:"",website:"",visa_support:""};function Ir(){const n=I(l=>l.lang),[e,t]=b.useState(!1),s=Le({resolver:Oe(Pr),defaultValues:Fr}),i=async l=>{await _s(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(V,{className:"space-y-5",children:[r.jsx(B,{className:"text-xl",children:L[o].h2}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"space",checked:l.value==="space"})}),r.jsx(B,{className:"text-base",children:L[o].radio})]}),r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"package",checked:l.value==="package"})}),r.jsx(B,{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(V,{className:"space-y-5",children:[r.jsx(B,{className:"text-xl",children:L[o].visa}),r.jsx(z,{children:r.jsxs(xe,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(V,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(z,{children:r.jsx(Z,{value:"yes",checked:l.value==="yes"})}),r.jsx(B,{className:"text-base",children:L[o].visa_radio})]}),r.jsxs(V,{className:"flex items-center space-x-5 space-y-0 ",children:[r.jsx(z,{children:r.jsx(Z,{value:"no",checked:l.value==="no"})}),r.jsx(B,{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(Be,{className:"animate-spin"}):L[o].button})]})})}),e&&r.jsx(ze,{delay:.3})]})}const Gt=()=>{var h;const{t:n}=pe("main"),e=I(g=>g.lang),{pathname:t}=Ke(),[s]=wt({loop:!0},[Rs({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}),d=(g,x)=>t==="/impressions"?g:x,m=(g,x)=>t==="/impressions"?g:x,p={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"?p.ru:p.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:d(i,c)}),r.jsx("div",{className:"text-on_surface_v flex flex-col gap-3",children:(h=m(a,u))==null?void 0:h.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(Xe,{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(Xe,{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})})]})]})})]})},Ut=()=>{var d,m,p;const{t:n}=pe("main"),{pathname:e}=Ke(),[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,h)=>(f==null?void 0:f.fashion_shows_order_id)+(h==null?void 0:h.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:(p=(m=(d=i==null?void 0:i.videos)==null?void 0:d[t])==null?void 0:m.video)==null?void 0:p.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,h)=>{var g;return r.jsx("div",{onClick:()=>s(h+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"})},h)})})})]})]})})},Ar=n=>{const e=I(i=>i.lang),{data:t,isPending:s}=He({queryKey:["designers",e],queryFn:()=>Cs(e,n),select:({data:i})=>i.data});return{data:t,isPending:s}},Wt=()=>{const{pathname:n}=Ke(),e=()=>n!=="/impressions",{data:t,isPending:s}=Ar(e()?2:1),[i,a]=wt({align:"center",skipSnaps:!0,slidesToScroll:2,dragFree:!0}),[o,l]=b.useState(0),{t:c}=pe("main"),[u,d]=b.useState(!1),[m,p]=b.useState(!0),f=b.useCallback(S=>{a&&a.scrollTo(S)},[a]);b.useEffect(()=>{if(!a)return;const S=()=>{l(a==null?void 0:a.selectedScrollSnap()),d(a.canScrollPrev()),p(a.canScrollNext())};return a.on("select",S),()=>{a.off("select",S)}},[a]);const{title:h,text:g,title2:x,text2:w}=c("impressions.designers",{returnObjects:!0}),v=[...(t==null?void 0:t.designers)??[]].sort((S,R)=>(S==null?void 0:S.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()?h:x}),r.jsx("p",{className:"md:text-xl text-lg normal text-on_surface_v",children:e()?g:w}),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((S,R)=>r.jsx(Ts,{...S,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(Es,{})}),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((S,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(Ls,{})})]})]})]})})};function $r(){return H(),r.jsxs("div",{className:"overflow-x-hidden",children:[r.jsx(Gt,{}),r.jsx(Ut,{}),r.jsx(Wt,{})]})}function Dr(){return H(),r.jsxs("div",{className:"overflow-x-hidden",children:[r.jsx(Gt,{}),r.jsx(Ut,{}),r.jsx(Wt,{})]})}const M=({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"})}),Mr=$s([{element:r.jsx(Di,{}),path:"/",children:[{element:r.jsx(Mi,{}),path:"",errorElement:r.jsx(M,{})},{element:r.jsx(br,{}),path:"about",errorElement:r.jsx(M,{})},{element:r.jsx(xr,{}),path:"B2B-B2G",errorElement:r.jsx(M,{})},{element:r.jsx(wr,{}),path:"become-sponsor",errorElement:r.jsx(M,{})},{element:r.jsx(Ir,{}),path:"stend-form",errorElement:r.jsx(M,{})},{element:r.jsx(Nr,{}),path:"contacts",errorElement:r.jsx(M,{})},{element:r.jsx(Er,{}),path:"news",errorElement:r.jsx(M,{})},{element:r.jsx(Tr,{}),path:"news/:id",errorElement:r.jsx(M,{})},{element:r.jsx(Or,{}),path:"participants",errorElement:r.jsx(M,{})},{element:r.jsx(Rr,{}),path:"media",errorElement:r.jsx(M,{})},{element:r.jsx($r,{}),path:"impressions",errorElement:r.jsx(M,{})},{element:r.jsx(Dr,{}),path:"impressions-tm",errorElement:r.jsx(M,{})}]}]),Vr=new Os;Vs.createRoot(document.getElementById("root")).render(r.jsx(b.StrictMode,{children:r.jsx(Ps,{client:Vr,children:r.jsx(Ds,{router:Mr})})})); diff --git a/dist/assets/ui-library-_5RJ9fWZ.js b/dist/assets/ui-library-B2qs5YcL.js similarity index 79% rename from dist/assets/ui-library-_5RJ9fWZ.js rename to dist/assets/ui-library-B2qs5YcL.js index 7dea35f..bfb1b0e 100644 --- a/dist/assets/ui-library-_5RJ9fWZ.js +++ b/dist/assets/ui-library-B2qs5YcL.js @@ -148,7 +148,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[lh]=this[lh]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=Or(o);s[a]||(gN(r,o),s[a]=!0)}return j.isArray(t)?t.forEach(i):i(t),this}}ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors(ft.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});j.freezeMethods(ft);function Qa(e,t){const n=this||Di,s=t||n,r=ft.from(s.headers);let i=s.data;return j.forEach(e,function(a){i=a.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function rv(e){return!!(e&&e.__CANCEL__)}function Cr(e,t,n){ie.call(this,e??"canceled",ie.ERR_CANCELED,t,n),this.name="CanceledError"}j.inherits(Cr,ie,{__CANCEL__:!0});function iv(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new ie("Request failed with status code "+n.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yN(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vN(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=s[i];o||(o=l),n[r]=c,s[r]=l;let d=i,h=0;for(;d!==r;)h+=n[d++],d=d%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),l-o{n=u,r=null,i&&(clearTimeout(i),i=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=s?o(l,u):(r=l,i||(i=setTimeout(()=>{i=null,o(r)},s-d)))},()=>r&&o(r)]}const Lo=(e,t,n=3)=>{let s=0;const r=vN(50,250);return xN(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-s,l=r(c),u=o<=a;s=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},uh=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},dh=e=>(...t)=>j.asap(()=>e(...t)),bN=Xe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Xe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Xe.origin),Xe.navigator&&/(msie|trident)/i.test(Xe.navigator.userAgent)):()=>!0,wN=Xe.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];j.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),j.isString(s)&&o.push("path="+s),j.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function SN(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _N(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ov(e,t){return e&&!SN(t)?_N(e,t):t}const fh=e=>e instanceof ft?{...e}:e;function Es(e,t){t=t||{};const n={};function s(l,u,d,h){return j.isPlainObject(l)&&j.isPlainObject(u)?j.merge.call({caseless:h},l,u):j.isPlainObject(u)?j.merge({},u):j.isArray(u)?u.slice():u}function r(l,u,d,h){if(j.isUndefined(u)){if(!j.isUndefined(l))return s(void 0,l,d,h)}else return s(l,u,d,h)}function i(l,u){if(!j.isUndefined(u))return s(void 0,u)}function o(l,u){if(j.isUndefined(u)){if(!j.isUndefined(l))return s(void 0,l)}else return s(void 0,u)}function a(l,u,d){if(d in t)return s(l,u);if(d in e)return s(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u,d)=>r(fh(l),fh(u),d,!0)};return j.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=c[u]||r,h=d(e[u],t[u],u);j.isUndefined(h)&&d!==a||(n[u]=h)}),n}const av=e=>{const t=Es({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=ft.from(o),t.url=tv(ov(t.baseURL,t.url),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(j.isFormData(n)){if(Xe.hasStandardBrowserEnv||Xe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(Xe.hasStandardBrowserEnv&&(s&&j.isFunction(s)&&(s=s(t)),s||s!==!1&&bN(t.url))){const l=r&&i&&wN.read(i);l&&o.set(r,l)}return t},CN=typeof XMLHttpRequest<"u",EN=CN&&function(e){return new Promise(function(n,s){const r=av(e);let i=r.data;const o=ft.from(r.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=r,u,d,h,y,m;function p(){y&&y(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function x(){if(!v)return;const w=ft.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:w,config:e,request:v};iv(function(E){n(E),p()},function(E){s(E),p()},S),v=null}"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(x)},v.onabort=function(){v&&(s(new ie("Request aborted",ie.ECONNABORTED,e,v)),v=null)},v.onerror=function(){s(new ie("Network Error",ie.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let _=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||nv;r.timeoutErrorMessage&&(_=r.timeoutErrorMessage),s(new ie(_,S.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&j.forEach(o.toJSON(),function(_,S){v.setRequestHeader(S,_)}),j.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),l&&([h,m]=Lo(l,!0),v.addEventListener("progress",h)),c&&v.upload&&([d,y]=Lo(c),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(u=w=>{v&&(s(!w||w.type?new Cr(null,e,v):w),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const b=yN(r.url);if(b&&Xe.protocols.indexOf(b)===-1){s(new ie("Unsupported protocol "+b+":",ie.ERR_BAD_REQUEST,e));return}v.send(i||null)})},TN=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const i=function(l){if(!r){r=!0,a();const u=l instanceof Error?l:this.reason;s.abort(u instanceof ie?u:new Cr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new ie(`timeout ${t} of ms exceeded`,ie.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:c}=s;return c.unsubscribe=()=>j.asap(a),c}},AN=function*(e,t){let n=e.byteLength;if(n{const r=RN(e,t);let i=0,o,a=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await r.next();if(l){a(),c.close();return}let d=u.byteLength;if(n){let h=i+=d;n(h)}c.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},ha=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cv=ha&&typeof ReadableStream=="function",NN=ha&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jN=cv&&lv(()=>{let e=!1;const t=new Request(Xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ph=64*1024,Lc=cv&&lv(()=>j.isReadableStream(new Response("").body)),Fo={stream:Lc&&(e=>e.body)};ha&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fo[t]&&(Fo[t]=j.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new ie(`Response type '${t}' is not supported`,ie.ERR_NOT_SUPPORT,s)})})})(new Response);const kN=async e=>{if(e==null)return 0;if(j.isBlob(e))return e.size;if(j.isSpecCompliantForm(e))return(await new Request(Xe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(j.isArrayBufferView(e)||j.isArrayBuffer(e))return e.byteLength;if(j.isURLSearchParams(e)&&(e=e+""),j.isString(e))return(await NN(e)).byteLength},ON=async(e,t)=>{const n=j.toFiniteNumber(e.getContentLength());return n??kN(t)},MN=ha&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:h}=av(e);l=l?(l+"").toLowerCase():"text";let y=TN([r,i&&i.toAbortSignal()],o),m;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let v;try{if(c&&jN&&n!=="get"&&n!=="head"&&(v=await ON(u,s))!==0){let S=new Request(t,{method:"POST",body:s,duplex:"half"}),A;if(j.isFormData(s)&&(A=S.headers.get("content-type"))&&u.setContentType(A),S.body){const[E,R]=uh(v,Lo(dh(c)));s=hh(S.body,ph,E,R)}}j.isString(d)||(d=d?"include":"omit");const x="credentials"in Request.prototype;m=new Request(t,{...h,signal:y,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:s,duplex:"half",credentials:x?d:void 0});let b=await fetch(m);const w=Lc&&(l==="stream"||l==="response");if(Lc&&(a||w&&p)){const S={};["status","statusText","headers"].forEach(N=>{S[N]=b[N]});const A=j.toFiniteNumber(b.headers.get("content-length")),[E,R]=a&&uh(A,Lo(dh(a),!0))||[];b=new Response(hh(b.body,ph,E,()=>{R&&R(),p&&p()}),S)}l=l||"text";let _=await Fo[j.findKey(Fo,l)||"text"](b,e);return!w&&p&&p(),await new Promise((S,A)=>{iv(S,A,{data:_,headers:ft.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(x){throw p&&p(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new ie("Network Error",ie.ERR_NETWORK,e,m),{cause:x.cause||x}):ie.from(x,x&&x.code,e,m)}}),Fc={http:GP,xhr:EN,fetch:MN};j.forEach(Fc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mh=e=>`- ${e}`,DN=e=>j.isFunction(e)||e===null||e===!1,uv={getAdapter:e=>{e=j.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let i=0;i`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : `+i.map(mh).join(` `):" "+mh(i[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Fc};function Xa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cr(null,e)}function gh(e){return Xa(e),e.headers=ft.from(e.headers),e.data=Qa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uv.getAdapter(e.adapter||Di.adapter)(e).then(function(s){return Xa(e),s.data=Qa.call(e,e.transformResponse,s),s.headers=ft.from(s.headers),s},function(s){return rv(s)||(Xa(e),s&&s.response&&(s.response.data=Qa.call(e,e.transformResponse,s.response),s.response.headers=ft.from(s.response.headers))),Promise.reject(s)})}const dv="1.7.9",pa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pa[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const yh={};pa.transitional=function(t,n,s){function r(i,o){return"[Axios v"+dv+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(t===!1)throw new ie(r(o," has been removed"+(n?" in "+n:"")),ie.ERR_DEPRECATED);return n&&!yh[o]&&(yh[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};pa.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function IN(e,t,n){if(typeof e!="object")throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const a=e[i],c=a===void 0||o(a,i,e);if(c!==!0)throw new ie("option "+i+" must be "+c,ie.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ie("Unknown option "+i,ie.ERR_BAD_OPTION)}}const fo={assertOptions:IN,validators:pa},Kt=fo.validators;class vs{constructor(t){this.defaults=t,this.interceptors={request:new ch,response:new ch}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=` -`+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Es(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&fo.assertOptions(s,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean)},!1),r!=null&&(j.isFunction(r)?n.paramsSerializer={serialize:r}:fo.assertOptions(r,{encode:Kt.function,serialize:Kt.function},!0)),fo.assertOptions(n,{baseUrl:Kt.spelling("baseURL"),withXsrfToken:Kt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&j.merge(i.common,i[n.method]);i&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=ft.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!c){const m=[gh.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),h=m.length,u=Promise.resolve(n);d{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Cr(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Au(function(r){t=r}),cancel:t}}}function LN(e){return function(n){return e.apply(null,n)}}function FN(e){return j.isObject(e)&&e.isAxiosError===!0}const Vc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vc).forEach(([e,t])=>{Vc[t]=e});function fv(e){const t=new vs(e),n=zy(vs.prototype.request,t);return j.extend(n,vs.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return fv(Es(e,r))},n}const Ve=fv(Di);Ve.Axios=vs;Ve.CanceledError=Cr;Ve.CancelToken=Au;Ve.isCancel=rv;Ve.VERSION=dv;Ve.toFormData=fa;Ve.AxiosError=ie;Ve.Cancel=Ve.CanceledError;Ve.all=function(t){return Promise.all(t)};Ve.spread=LN;Ve.isAxiosError=FN;Ve.mergeConfig=Es;Ve.AxiosHeaders=ft;Ve.formToJSON=e=>sv(j.isHTMLForm(e)?new FormData(e):e);Ve.getAdapter=uv.getAdapter;Ve.HttpStatusCode=Vc;Ve.default=Ve;const et=Ve.create({baseURL:"https://turkmentextile.turkmenexpo.com/app/api/v1/"}),Mk=async e=>(await et.post("book_stand_form",e)).status===201,Dk=async e=>(await et.post("become_sponsor_form",e)).status===201,Ik=async e=>(await et.post("contact_form",e)).status===201,VN=async e=>(await et.post("subscribe_news_form",e)).status===201,BN=async(e,t)=>et.get(`pages/${t}`,{headers:{"Accept-Language":e}}),$N=async e=>et.get("stats",{headers:{"Accept-Language":e}}),UN=async e=>et.get("contact_data",{headers:{"Accept-Language":e}}),zN=async e=>et.get("industries",{headers:{"Accept-Language":e}}),WN=async e=>et.get("exhibition_time",{headers:{"Accept-Language":e}}),HN=async e=>et.get("news",{headers:{"Accept-Language":e}}),Lk=async(e,t)=>et.get(`news/${e}`,{headers:{"Accept-Language":t}}),Fk=async e=>et("participants",{headers:{"Accept-Language":e}}),qN=async e=>et("photos/category/"+e),ZN=async e=>et("videos/category/"+e),KN=async e=>et("sponsors_and_partners",{headers:{"Accept-Language":e}}),Vk=async(e,t)=>et("designers/category/"+t,{headers:{"Accept-Language":e}}),GN=sh.object({email:sh.string().email()}),hv=({modal:e=!1})=>{var i,o;const[t,n]=g.useState(!1),s=pT({resolver:tR(GN),defaultValues:{email:""}});async function r(a){try{const c=await VN(a);s.reset(),n(c)}catch(c){console.error("POST subscribe",c)}}return f.jsx("form",{onSubmit:s.handleSubmit(r),className:V("py-8",e?"max-w-[392px] mx-auto":"bg-surface_container"),children:f.jsxs(qe,{className:V("flex gap-8 justify-between",e?"flex-col w-full":"lg:flex-row flex-col lg:items-center"),children:[f.jsx("h2",{className:"h2 !text-left",children:Za("Подпишитесь на новости:","Subscribe to the news:")}),f.jsxs("div",{className:"relative",children:[f.jsx("input",{...s.register("email"),placeholder:"Email",className:V("input",{"w-full":e,"xl:w-[392px] lg:w-[320px] w-full":!e})}),f.jsx("span",{className:"text-error absolute text-red-600 -bottom-6 text-sm left-0",children:(o=(i=s.formState.errors)==null?void 0:i.email)==null?void 0:o.message})]}),f.jsx(ot,{loading:s.formState.isSubmitting,disabled:t,className:V({"xl:w-[288px] lg:w-[220px] w-full":!e,"w-full":e}),children:t?Za("Отправлено","Submitted"):Za("Подписаться","Subscribe")})]})})},QN=({className:e,title:t})=>f.jsxs(Py,{children:[f.jsx(Ny,{className:V("h-14 px-3 flex gap-3 items-center hover:bg-slate-300/50 transition-all",e),children:t}),f.jsx(Su,{children:f.jsx(hv,{className:"",modal:!0})})]}),Vo=Ry()(e=>({sheet:!1,popover:!1,modal:!1,setModal:t=>e({modal:t}),setSheet:t=>e({sheet:t}),setPopover:t=>e({popover:t})})),Bo=({title:e,dropDownContent:t,color:n,triggerClassName:s,children:r})=>{const[i,o]=g.useState(!1),a=Vo(c=>c.setSheet);return f.jsxs(Ty,{open:i,onOpenChange:()=>o(!i),children:[f.jsxs(Ay,{className:V("flex items-center gap-2",s),children:[e,r,!r&&f.jsx(pv,{color:n,className:V("transition-all",i&&"rotate-180")})]}),f.jsx(wu,{className:"w-fit relative z-[200] px-0 bg-surface_container",children:t&&t.map((c,l)=>c.hover?f.jsx(ak,{setIsOpen:o,...c},l):c.link?f.jsxs(Ce,{to:c.link??"",onClick:()=>{o(!1),a(!1)},className:"h-14 px-3 flex gap-3 relative justify-between cursor-pointer items-center hover:bg-slate-300/50 transition-all",target:c.blank?"_blank":void 0,rel:c.blank?"noopener noreferrer":void 0,children:[c.text,c.blank&&f.jsx("img",{src:"/pdf.svg"})]},l):c.modal?f.jsx(QN,{title:c.text},c.text):f.jsx("div",{className:"relative",children:f.jsx("div",{className:"h-14 px-3 py-2 flex items-center cursor-pointer hover:bg-slate-300/50 transition-all",onClick:()=>{o(!1),a(!1)},children:c.text})},l))})]})},pv=({color:e="white",w:t="20",h:n="20",className:s})=>f.jsx("div",{className:s,children:f.jsx("svg",{width:t,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.23021 8.01443C4.35919 7.70304 4.66305 7.5 5.00011 7.5H15.0001C15.3372 7.5 15.641 7.70304 15.77 8.01443C15.899 8.32583 15.8277 8.68426 15.5894 8.92259L10.5894 13.9226C10.2639 14.248 9.73629 14.248 9.41085 13.9226L4.41085 8.92259C4.17252 8.68426 4.10122 8.32583 4.23021 8.01443ZM7.01195 9.16667L10.0001 12.1548L12.9883 9.16667H7.01195Z",fill:e})})}),Yn=({className:e})=>f.jsx(qe,{className:V("w-full py-20 h-full flex items-center justify-between",e),children:f.jsx(kp,{className:"animate-spin mx-auto text-primary size-16"})});function XN(e){return Object.prototype.toString.call(e)==="[object Object]"}function vh(e){return XN(e)||Array.isArray(e)}function YN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ru(e,t){const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==i?!1:n.every(o=>{const a=e[o],c=t[o];return typeof a=="function"?`${a}`==`${c}`:!vh(a)||!vh(c)?a===c:Ru(a,c)})}function xh(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function JN(e,t){if(e.length!==t.length)return!1;const n=xh(e),s=xh(t);return n.every((r,i)=>{const o=s[i];return Ru(r,o)})}function Pu(e){return typeof e=="number"}function Bc(e){return typeof e=="string"}function ma(e){return typeof e=="boolean"}function bh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pe(e){return Math.abs(e)}function Nu(e){return Math.sign(e)}function Kr(e,t){return Pe(e-t)}function e1(e,t){if(e===0||t===0||Pe(e)<=Pe(t))return 0;const n=Kr(Pe(e),Pe(t));return Pe(n/e)}function t1(e){return Math.round(e*100)/100}function yi(e){return vi(e).map(Number)}function Vt(e){return e[Ii(e)]}function Ii(e){return Math.max(0,e.length-1)}function ju(e,t){return t===Ii(e)}function wh(e,t=0){return Array.from(Array(e),(n,s)=>t+s)}function vi(e){return Object.keys(e)}function mv(e,t){return[e,t].reduce((n,s)=>(vi(s).forEach(r=>{const i=n[r],o=s[r],a=bh(i)&&bh(o);n[r]=a?mv(i,o):o}),n),{})}function $c(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function n1(e,t){const n={start:s,center:r,end:i};function s(){return 0}function r(c){return i(c)/2}function i(c){return t-c}function o(c,l){return Bc(e)?n[e](c):e(t,c,l)}return{measure:o}}function xi(){let e=[];function t(r,i,o,a={passive:!0}){let c;if("addEventListener"in r)r.addEventListener(i,o,a),c=()=>r.removeEventListener(i,o,a);else{const l=r;l.addListener(o),c=()=>l.removeListener(o)}return e.push(c),s}function n(){e=e.filter(r=>r())}const s={add:t,clear:n};return s}function s1(e,t,n,s){const r=xi(),i=1e3/60;let o=null,a=0,c=0;function l(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function u(){y(),r.clear()}function d(v){if(!c)return;o||(o=v,n(),n());const x=v-o;for(o=v,a+=x;a>=i;)n(),a-=i;const b=a/i;s(b),c&&(c=t.requestAnimationFrame(d))}function h(){c||(c=t.requestAnimationFrame(d))}function y(){t.cancelAnimationFrame(c),o=null,a=0,c=0}function m(){o=null,a=0}return{init:l,destroy:u,start:h,stop:y,update:n,render:s}}function r1(e,t){const n=t==="rtl",s=e==="y",r=s?"y":"x",i=s?"x":"y",o=!s&&n?-1:1,a=u(),c=d();function l(m){const{height:p,width:v}=m;return s?p:v}function u(){return s?"top":n?"right":"left"}function d(){return s?"bottom":n?"left":"right"}function h(m){return m*o}return{scroll:r,cross:i,startEdge:a,endEdge:c,measureSize:l,direction:h}}function Ts(e=0,t=0){const n=Pe(e-t);function s(l){return lt}function i(l){return s(l)||r(l)}function o(l){return i(l)?s(l)?e:t:l}function a(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:i,reachedMax:r,reachedMin:s,removeOffset:a}}function gv(e,t,n){const{constrain:s}=Ts(0,e),r=e+1;let i=o(t);function o(h){return n?Pe((r+h)%r):s(h)}function a(){return i}function c(h){return i=o(h),d}function l(h){return u().set(a()+h)}function u(){return gv(e,a(),n)}const d={get:a,set:c,add:l,clone:u};return d}function i1(e,t,n,s,r,i,o,a,c,l,u,d,h,y,m,p,v,x,b){const{cross:w,direction:_}=e,S=["INPUT","SELECT","TEXTAREA"],A={passive:!1},E=xi(),R=xi(),N=Ts(50,225).constrain(y.measure(20)),M={mouse:300,touch:400},I={mouse:500,touch:600},O=m?43:25;let z=!1,F=0,J=0,X=!1,q=!1,Z=!1,re=!1;function fe(G){if(!b)return;function he(Ue){(ma(b)||b(G,Ue))&&tt(Ue)}const Se=t;E.add(Se,"dragstart",Ue=>Ue.preventDefault(),A).add(Se,"touchmove",()=>{},A).add(Se,"touchend",()=>{}).add(Se,"touchstart",he).add(Se,"mousedown",he).add(Se,"touchcancel",ve).add(Se,"contextmenu",ve).add(Se,"click",ke,!0)}function ye(){E.clear(),R.clear()}function Be(){const G=re?n:t;R.add(G,"touchmove",ue,A).add(G,"touchend",ve).add(G,"mousemove",ue,A).add(G,"mouseup",ve)}function Ze(G){const he=G.nodeName||"";return S.includes(he)}function Ke(){return(m?I:M)[re?"mouse":"touch"]}function jt(G,he){const Se=d.add(Nu(G)*-1),Ue=u.byDistance(G,!m).distance;return m||Pe(G)=2,!(he&&G.button!==0)&&(Ze(G.target)||(X=!0,i.pointerDown(G),l.useFriction(0).useDuration(0),r.set(o),Be(),F=i.readPoint(G),J=i.readPoint(G,w),h.emit("pointerDown")))}function ue(G){if(!$c(G,s)&&G.touches.length>=2)return ve(G);const Se=i.readPoint(G),Ue=i.readPoint(G,w),pt=Kr(Se,F),_t=Kr(Ue,J);if(!q&&!re&&(!G.cancelable||(q=pt>_t,!q)))return ve(G);const C=i.pointerMove(G);pt>p&&(Z=!0),l.useFriction(.3).useDuration(.75),a.start(),r.add(_(C)),G.preventDefault()}function ve(G){const Se=u.byDistance(0,!1).index!==d.get(),Ue=i.pointerUp(G)*Ke(),pt=jt(_(Ue),Se),_t=e1(Ue,pt),C=O-10*_t,P=x+_t/50;q=!1,X=!1,R.clear(),l.useDuration(C).useFriction(P),c.distance(pt,!m),re=!1,h.emit("pointerUp")}function ke(G){Z&&(G.stopPropagation(),G.preventDefault(),Z=!1)}function Le(){return X}return{init:fe,destroy:ye,pointerDown:Le}}function o1(e,t){let s,r;function i(d){return d.timeStamp}function o(d,h){const m=`client${(h||e.scroll)==="x"?"X":"Y"}`;return($c(d,t)?d:d.touches[0])[m]}function a(d){return s=d,r=d,o(d)}function c(d){const h=o(d)-o(r),y=i(d)-i(s)>170;return r=d,y&&(s=d),h}function l(d){if(!s||!r)return 0;const h=o(r)-o(s),y=i(d)-i(s),m=i(d)-i(r)>170,p=h/y;return y&&!m&&Pe(p)>.1?p:0}return{pointerDown:a,pointerMove:c,pointerUp:l,readPoint:o}}function a1(){function e(n){const{offsetTop:s,offsetLeft:r,offsetWidth:i,offsetHeight:o}=n;return{top:s,right:r+i,bottom:s+o,left:r,width:i,height:o}}return{measure:e}}function c1(e){function t(s){return e*(s/100)}return{measure:t}}function l1(e,t,n,s,r,i,o){const a=[e].concat(s);let c,l,u=[],d=!1;function h(v){return r.measureSize(o.measure(v))}function y(v){if(!i)return;l=h(e),u=s.map(h);function x(b){for(const w of b){if(d)return;const _=w.target===e,S=s.indexOf(w.target),A=_?l:u[S],E=h(_?e:s[S]);if(Pe(E-A)>=.5){v.reInit(),t.emit("resize");break}}}c=new ResizeObserver(b=>{(ma(i)||i(v,b))&&x(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>c.observe(b))})}function m(){d=!0,c&&c.disconnect()}return{init:y,destroy:m}}function u1(e,t,n,s,r,i){let o=0,a=0,c=r,l=i,u=e.get(),d=0;function h(){const A=s.get()-e.get(),E=!c;let R=0;return E?(o=0,n.set(s),e.set(s),R=A):(n.set(e),o+=A/c,o*=l,u+=o,e.add(o),R=u-d),a=Nu(R),d=u,S}function y(){const A=s.get()-t.get();return Pe(A)<.001}function m(){return c}function p(){return a}function v(){return o}function x(){return w(r)}function b(){return _(i)}function w(A){return c=A,S}function _(A){return l=A,S}const S={direction:p,duration:m,velocity:v,seek:h,settled:y,useBaseFriction:b,useBaseDuration:x,useFriction:_,useDuration:w};return S}function d1(e,t,n,s,r){const i=r.measure(10),o=r.measure(50),a=Ts(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(y){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",p=Pe(e[m]-t.get()),v=n.get()-t.get(),x=a.constrain(p/o);n.subtract(v*x),!y&&Pe(v){const{min:v,max:x}=i,b=i.constrain(m),w=!p,_=ju(n,p);return w?x:_||l(v,b)?v:l(x,b)?x:b}).map(m=>parseFloat(m.toFixed(3)))}function h(){if(t<=e+r)return[i.max];if(s==="keepSnaps")return o;const{min:m,max:p}=a;return o.slice(m,p)}return{snapsContained:c,scrollContainLimit:a}}function h1(e,t,n){const s=t[0],r=n?s-e:Vt(t);return{limit:Ts(r,s)}}function p1(e,t,n,s){const i=t.min+.1,o=t.max+.1,{reachedMin:a,reachedMax:c}=Ts(i,o);function l(h){return h===1?c(n.get()):h===-1?a(n.get()):!1}function u(h){if(!l(h))return;const y=e*(h*-1);s.forEach(m=>m.add(y))}return{loop:u}}function m1(e){const{max:t,length:n}=e;function s(i){const o=i-t;return n?o/-n:0}return{get:s}}function g1(e,t,n,s,r){const{startEdge:i,endEdge:o}=e,{groupSlides:a}=r,c=d().map(t.measure),l=h(),u=y();function d(){return a(s).map(p=>Vt(p)[o]-p[0][i]).map(Pe)}function h(){return s.map(p=>n[i]-p[i]).map(p=>-Pe(p))}function y(){return a(l).map(p=>p[0]).map((p,v)=>p+c[v])}return{snaps:l,snapsAligned:u}}function y1(e,t,n,s,r,i){const{groupSlides:o}=r,{min:a,max:c}=s,l=u();function u(){const h=o(i),y=!e||t==="keepSnaps";return n.length===1?[i]:y?h:h.slice(a,c).map((m,p,v)=>{const x=!p,b=ju(v,p);if(x){const w=Vt(v[0])+1;return wh(w)}if(b){const w=Ii(i)-Vt(v)[0]+1;return wh(w,Vt(v)[0])}return m})}return{slideRegistry:l}}function v1(e,t,n,s,r){const{reachedAny:i,removeOffset:o,constrain:a}=s;function c(m){return m.concat().sort((p,v)=>Pe(p)-Pe(v))[0]}function l(m){const p=e?o(m):a(m),v=t.map((b,w)=>({diff:u(b-p,0),index:w})).sort((b,w)=>Pe(b.diff)-Pe(w.diff)),{index:x}=v[0];return{index:x,distance:p}}function u(m,p){const v=[m,m+n,m-n];if(!e)return m;if(!p)return c(v);const x=v.filter(b=>Nu(b)===p);return x.length?c(x):Vt(v)-n}function d(m,p){const v=t[m]-r.get(),x=u(v,p);return{index:m,distance:x}}function h(m,p){const v=r.get()+m,{index:x,distance:b}=l(v),w=!e&&i(v);if(!p||w)return{index:x,distance:m};const _=t[x]-b,S=m+u(_,0);return{index:x,distance:S}}return{byDistance:h,byIndex:d,shortcut:u}}function x1(e,t,n,s,r,i,o){function a(d){const h=d.distance,y=d.index!==t.get();i.add(h),h&&(s.duration()?e.start():(e.update(),e.render(1),e.update())),y&&(n.set(t.get()),t.set(d.index),o.emit("select"))}function c(d,h){const y=r.byDistance(d,h);a(y)}function l(d,h){const y=t.clone().set(d),m=r.byIndex(y.get(),h);a(m)}return{distance:c,index:l}}function b1(e,t,n,s,r,i,o,a){const c={passive:!0,capture:!0};let l=0;function u(y){if(!a)return;function m(p){if(new Date().getTime()-l>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(w=>w.includes(p));Pu(b)&&(r.useDuration(0),s.index(b,0),o.emit("slideFocus"))}i.add(document,"keydown",d,!1),t.forEach((p,v)=>{i.add(p,"focus",x=>{(ma(a)||a(y,x))&&m(v)},c)})}function d(y){y.code==="Tab"&&(l=new Date().getTime())}return{init:u}}function Vr(e){let t=e;function n(){return t}function s(c){t=o(c)}function r(c){t+=o(c)}function i(c){t-=o(c)}function o(c){return Pu(c)?c:c.get()}return{get:n,set:s,add:r,subtract:i}}function yv(e,t){const n=e.scroll==="x"?o:a,s=t.style;let r=null,i=!1;function o(h){return`translate3d(${h}px,0px,0px)`}function a(h){return`translate3d(0px,${h}px,0px)`}function c(h){if(i)return;const y=t1(e.direction(h));y!==r&&(s.transform=n(y),r=y)}function l(h){i=!h}function u(){i||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function w1(e,t,n,s,r,i,o,a,c){const u=yi(r),d=yi(r).reverse(),h=x().concat(b());function y(E,R){return E.reduce((N,M)=>N-r[M],R)}function m(E,R){return E.reduce((N,M)=>y(N,R)>0?N.concat([M]):N,[])}function p(E){return i.map((R,N)=>({start:R-s[N]+.5+E,end:R+t-.5+E}))}function v(E,R,N){const M=p(R);return E.map(I=>{const O=N?0:-n,z=N?n:0,F=N?"end":"start",J=M[I][F];return{index:I,loopPoint:J,slideLocation:Vr(-1),translate:yv(e,c[I]),target:()=>a.get()>J?O:z}})}function x(){const E=o[0],R=m(d,E);return v(R,n,!1)}function b(){const E=t-o[0]-1,R=m(u,E);return v(R,-n,!0)}function w(){return h.every(({index:E})=>{const R=u.filter(N=>N!==E);return y(R,t)<=.1})}function _(){h.forEach(E=>{const{target:R,translate:N,slideLocation:M}=E,I=R();I!==M.get()&&(N.to(I),M.set(I))})}function S(){h.forEach(E=>E.translate.clear())}return{canLoop:w,clear:S,loop:_,loopPoints:h}}function S1(e,t,n){let s,r=!1;function i(c){if(!n)return;function l(u){for(const d of u)if(d.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(u=>{r||(ma(n)||n(c,u))&&l(u)}),s.observe(e,{childList:!0})}function o(){s&&s.disconnect(),r=!0}return{init:i,destroy:o}}function _1(e,t,n,s){const r={};let i=null,o=null,a,c=!1;function l(){a=new IntersectionObserver(m=>{c||(m.forEach(p=>{const v=t.indexOf(p.target);r[v]=p}),i=null,o=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:s}),t.forEach(m=>a.observe(m))}function u(){a&&a.disconnect(),c=!0}function d(m){return vi(r).reduce((p,v)=>{const x=parseInt(v),{isIntersecting:b}=r[x];return(m&&b||!m&&!b)&&p.push(x),p},[])}function h(m=!0){if(m&&i)return i;if(!m&&o)return o;const p=d(m);return m&&(i=p),m||(o=p),p}return{init:l,destroy:u,get:h}}function C1(e,t,n,s,r,i){const{measureSize:o,startEdge:a,endEdge:c}=e,l=n[0]&&r,u=m(),d=p(),h=n.map(o),y=v();function m(){if(!l)return 0;const b=n[0];return Pe(t[a]-b[a])}function p(){if(!l)return 0;const b=i.getComputedStyle(Vt(s));return parseFloat(b.getPropertyValue(`margin-${c}`))}function v(){return n.map((b,w,_)=>{const S=!w,A=ju(_,w);return S?h[w]+u:A?h[w]+d:_[w+1][a]-b[a]}).map(Pe)}return{slideSizes:h,slideSizesWithGaps:y,startGap:u,endGap:d}}function E1(e,t,n,s,r,i,o,a,c){const{startEdge:l,endEdge:u,direction:d}=e,h=Pu(n);function y(x,b){return yi(x).filter(w=>w%b===0).map(w=>x.slice(w,w+b))}function m(x){return x.length?yi(x).reduce((b,w,_)=>{const S=Vt(b)||0,A=S===0,E=w===Ii(x),R=r[l]-i[S][l],N=r[l]-i[w][u],M=!s&&A?d(o):0,I=!s&&E?d(a):0,O=Pe(N-I-(R+M));return _&&O>t+c&&b.push(w),E&&b.push(x.length),b},[]).map((b,w,_)=>{const S=Math.max(_[w-1]||0);return x.slice(S,b)}):[]}function p(x){return h?y(x,n):m(x)}return{groupSlides:p}}function T1(e,t,n,s,r,i,o){const{align:a,axis:c,direction:l,startIndex:u,loop:d,duration:h,dragFree:y,dragThreshold:m,inViewThreshold:p,slidesToScroll:v,skipSnaps:x,containScroll:b,watchResize:w,watchSlides:_,watchDrag:S,watchFocus:A}=i,E=2,R=a1(),N=R.measure(t),M=n.map(R.measure),I=r1(c,l),O=I.measureSize(N),z=c1(O),F=n1(a,O),J=!d&&!!b,X=d||!!b,{slideSizes:q,slideSizesWithGaps:Z,startGap:re,endGap:fe}=C1(I,N,M,n,X,r),ye=E1(I,O,v,d,N,M,re,fe,E),{snaps:Be,snapsAligned:Ze}=g1(I,F,N,M,ye),Ke=-Vt(Be)+Vt(Z),{snapsContained:jt,scrollContainLimit:tt}=f1(O,Ke,Ze,b,E),ue=J?jt:Ze,{limit:ve}=h1(Ke,ue,d),ke=gv(Ii(ue),u,d),Le=ke.clone(),we=yi(n),G=({dragHandler:Zt,scrollBody:Jn,scrollBounds:Tr,options:{loop:es}})=>{es||Tr.constrain(Zt.pointerDown()),Jn.seek()},he=({scrollBody:Zt,translate:Jn,location:Tr,offsetLocation:es,previousLocation:ya,scrollLooper:Vi,slideLooper:gx,dragHandler:yx,animation:vx,eventHandler:zu,scrollBounds:xx,options:{loop:Wu}},Hu)=>{const qu=Zt.settled(),bx=!xx.shouldConstrain(),Zu=Wu?qu:qu&&bx;Zu&&!yx.pointerDown()&&(vx.stop(),zu.emit("settle")),Zu||zu.emit("scroll");const wx=Tr.get()*Hu+ya.get()*(1-Hu);es.set(wx),Wu&&(Vi.loop(Zt.direction()),gx.loop()),Jn.to(es.get())},Se=s1(s,r,()=>G(Er),Zt=>he(Er,Zt)),Ue=.68,pt=ue[ke.get()],_t=Vr(pt),C=Vr(pt),P=Vr(pt),k=Vr(pt),U=u1(_t,P,C,k,h,Ue),B=v1(d,ue,Ke,ve,k),L=x1(Se,ke,Le,U,B,k,o),Y=m1(ve),ae=xi(),Fe=_1(t,n,o,p),{slideRegistry:Oe}=y1(J,b,ue,tt,ye,we),qt=b1(e,n,Oe,L,U,ae,o,A),Er={ownerDocument:s,ownerWindow:r,eventHandler:o,containerRect:N,slideRects:M,animation:Se,axis:I,dragHandler:i1(I,e,s,r,k,o1(I,r),_t,Se,L,U,B,ke,o,z,y,m,x,Ue,S),eventStore:ae,percentOfView:z,index:ke,indexPrevious:Le,limit:ve,location:_t,offsetLocation:P,previousLocation:C,options:i,resizeHandler:l1(t,o,r,n,I,w,R),scrollBody:U,scrollBounds:d1(ve,P,k,U,z),scrollLooper:p1(Ke,ve,P,[_t,P,C,k]),scrollProgress:Y,scrollSnapList:ue.map(Y.get),scrollSnaps:ue,scrollTarget:B,scrollTo:L,slideLooper:w1(I,O,Ke,q,Z,Be,ue,P,n),slideFocus:qt,slidesHandler:S1(t,o,_),slidesInView:Fe,slideIndexes:we,slideRegistry:Oe,slidesToScroll:ye,target:k,translate:yv(I,t)};return Er}function A1(){let e={},t;function n(l){t=l}function s(l){return e[l]||[]}function r(l){return s(l).forEach(u=>u(t,l)),c}function i(l,u){return e[l]=s(l).concat([u]),c}function o(l,u){return e[l]=s(l).filter(d=>d!==u),c}function a(){e={}}const c={init:n,emit:r,off:o,on:i,clear:a};return c}const R1={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function P1(e){function t(i,o){return mv(i,o||{})}function n(i){const o=i.breakpoints||{},a=vi(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,l)=>t(c,l),{});return t(i,a)}function s(i){return i.map(o=>vi(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:s}}function N1(e){let t=[];function n(i,o){return t=o.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(i,e)),o.reduce((a,c)=>Object.assign(a,{[c.name]:c}),{})}function s(){t=t.filter(i=>i.destroy())}return{init:n,destroy:s}}function $o(e,t,n){const s=e.ownerDocument,r=s.defaultView,i=P1(r),o=N1(i),a=xi(),c=A1(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=i,{on:h,off:y,emit:m}=c,p=I;let v=!1,x,b=l(R1,$o.globalOptions),w=l(b),_=[],S,A,E;function R(){const{container:we,slides:G}=w;A=(Bc(we)?e.querySelector(we):we)||e.children[0];const Se=Bc(G)?A.querySelectorAll(G):G;E=[].slice.call(Se||A.children)}function N(we){const G=T1(e,A,E,s,r,we,c);if(we.loop&&!G.slideLooper.canLoop()){const he=Object.assign({},we,{loop:!1});return N(he)}return G}function M(we,G){v||(b=l(b,we),w=u(b),_=G||_,R(),x=N(w),d([b,..._.map(({options:he})=>he)]).forEach(he=>a.add(he,"change",I)),w.active&&(x.translate.to(x.location.get()),x.animation.init(),x.slidesInView.init(),x.slideFocus.init(Le),x.eventHandler.init(Le),x.resizeHandler.init(Le),x.slidesHandler.init(Le),x.options.loop&&x.slideLooper.loop(),A.offsetParent&&E.length&&x.dragHandler.init(Le),S=o.init(Le,_)))}function I(we,G){const he=ye();O(),M(l({startIndex:he},we),G),c.emit("reInit")}function O(){x.dragHandler.destroy(),x.eventStore.clear(),x.translate.clear(),x.slideLooper.clear(),x.resizeHandler.destroy(),x.slidesHandler.destroy(),x.slidesInView.destroy(),x.animation.destroy(),o.destroy(),a.clear()}function z(){v||(v=!0,a.clear(),O(),c.emit("destroy"),c.clear())}function F(we,G,he){!w.active||v||(x.scrollBody.useBaseFriction().useDuration(G===!0?0:w.duration),x.scrollTo.index(we,he||0))}function J(we){const G=x.index.add(1).get();F(G,we,-1)}function X(we){const G=x.index.add(-1).get();F(G,we,1)}function q(){return x.index.add(1).get()!==ye()}function Z(){return x.index.add(-1).get()!==ye()}function re(){return x.scrollSnapList}function fe(){return x.scrollProgress.get(x.location.get())}function ye(){return x.index.get()}function Be(){return x.indexPrevious.get()}function Ze(){return x.slidesInView.get()}function Ke(){return x.slidesInView.get(!1)}function jt(){return S}function tt(){return x}function ue(){return e}function ve(){return A}function ke(){return E}const Le={canScrollNext:q,canScrollPrev:Z,containerNode:ve,internalEngine:tt,destroy:z,off:y,on:h,emit:m,plugins:jt,previousScrollSnap:Be,reInit:p,rootNode:ue,scrollNext:J,scrollPrev:X,scrollProgress:fe,scrollSnapList:re,scrollTo:F,selectedScrollSnap:ye,slideNodes:ke,slidesInView:Ze,slidesNotInView:Ke};return M(t,n),setTimeout(()=>c.emit("init"),0),Le}$o.globalOptions=void 0;function En(e={},t=[]){const n=g.useRef(e),s=g.useRef(t),[r,i]=g.useState(),[o,a]=g.useState(),c=g.useCallback(()=>{r&&r.reInit(n.current,s.current)},[r]);return g.useEffect(()=>{Ru(n.current,e)||(n.current=e,c())},[e,c]),g.useEffect(()=>{JN(s.current,t)||(s.current=t,c())},[t,c]),g.useEffect(()=>{if(YN()&&o){$o.globalOptions=En.globalOptions;const l=$o(o,n.current,s.current);return i(l),()=>l.destroy()}else i(void 0)},[o,i]),[a,r]}En.globalOptions=void 0;const j1=[{id:0,title:"Все компании",titleEn:"All companies"},{id:3,title:"Государственные учреждения ",titleEn:"Government Institutions"},{id:1,title:"Местные компании",titleEn:"Local companies"},{id:2,title:"Иностранные компании",titleEn:"Foreign companies"}],Bk=({className:e,setState:t,state:n,data:s=j1})=>{const r=Te(m=>m.lang),i=wo("(min-width: 768px)"),[o,a]=g.useState({left:0,width:0}),[c,l]=En({axis:"x",align:"start",containScroll:"trimSnaps"},[]),u=g.useRef([]),d=g.useRef(null),h=g.useCallback(()=>{const m=u.current[n];if(m){if(i)a({left:m.offsetLeft,width:m.offsetWidth});else if(l){const p=l.rootNode(),v=l.containerNode();if(!p||!v)return;const x=v.scrollLeft,b=m.offsetLeft;a({left:b-x,width:m.offsetWidth})}}},[n,i,l]);g.useEffect(()=>{!i&&l||(l==null||l.scrollTo(n),h())},[l,n,h,i]),g.useEffect(()=>{if(l)return h(),l.on("scroll",h),l.on("resize",h),()=>{l.off("scroll",h),l.off("resize",h)}},[l,h]);const y=g.useCallback(m=>{t(m),!i&&l&&l.scrollTo(m)},[l,t,i]);return f.jsxs("div",{ref:d,className:V("relative mx-auto",e),style:{width:"fit-content",maxWidth:"100%"},children:[i?f.jsx("div",{className:"flex",role:"tablist",children:s==null?void 0:s.map((m,p)=>f.jsx("button",{ref:v=>u.current[p]=v,role:"tab","aria-selected":n===p,className:V("shrink-0 text-center relative h-12 mx-4 py-2 text-sm md:text-base whitespace-nowrap transition-all",n===p?"text-primary":"text-on_surface_v"),onClick:()=>y(p),children:r==="ru"?m.title:m.titleEn},m.id))}):f.jsx("div",{ref:c,className:"",role:"tablist",children:f.jsx("div",{className:"flex",children:s==null?void 0:s.map((m,p)=>f.jsx("button",{ref:v=>u.current[p]=v,role:"tab","aria-selected":n===p,className:V("shrink-0 text-center relative after:transition-all after:rounded after:w-full after:h-0.5 after:bg-primary after:opacity-0 after:absolute after:bottom-0 after:left-0 h-12 mx-4 py-2 text-sm md:text-base whitespace-nowrap transition-all",n===p?"text-primary after:opacity-100":"text-on_surface_v"),onClick:()=>y(p),children:r==="ru"?m.title:m.titleEn},m.id))})}),f.jsx("div",{className:"absolute md:block hidden bottom-0 h-[3px] rounded-t-[2px] bg-primary transition-all duration-200",style:o})]})},$k=({className:e,index:t,name:n,image:s,image_country:r,country:i,about:o,arr:a})=>{const c=Te(l=>l.lang);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:V("flex border-b md:hidden py-2 border-outline_v",e),children:[f.jsxs("div",{className:"flex flex-1 flex-col items-start gap-4",children:[f.jsx("div",{className:"flex items-center w-full",children:f.jsxs("div",{className:"flex items-center flex-[0_0_80%] gap-3",children:[f.jsxs("h3",{className:"text-xs normal flex-[0_0_90px]",children:[c==="ru"?"Название":"Company",":"]}),f.jsx("h4",{className:"text-xs flex-[0_0_70%]",children:n})]})}),f.jsx("div",{className:"flex items-center gap-3",children:f.jsx("div",{className:"flex items-center w-full",children:f.jsxs("div",{className:"flex items-center flex-[0_0_80%] gap-3",children:[f.jsxs("h3",{className:"text-xs normal flex-[0_0_90px]",children:[c==="ru"?"Страна":"Country",":"]}),f.jsxs("div",{className:"flex items-center flex-[0_0_50%] gap-2",children:[f.jsx("img",{src:r==null?void 0:r.path,alt:"flag",className:"size-4 flex-[0_0_16px] object-contain"}),f.jsx("h4",{className:"text-xs flex-1",children:i})]})]})})}),f.jsx("div",{className:"flex items-center ",children:f.jsxs("div",{className:"flex items-center flex-[0_0_80%] gap-3",children:[f.jsxs("h3",{className:"text-xs normal flex-[0_0_90px]",children:[c==="ru"?"Сфера":"Industry",":"]}),f.jsx("h4",{className:"text-xs flex-1",children:o})]})})]}),f.jsx("div",{className:"flex-[0_0_88px] size-[88px] bg-white ",children:f.jsx("img",{src:s==null?void 0:s.path,alt:"company",className:"size-full object-contain"})})]},t),f.jsxs("div",{className:V("md:flex hidden p-4 ",a!==t+1&&"border-b border-outline_v"),children:[f.jsxs("div",{className:"flex-[0_0_45.54%] flex gap-8",children:[f.jsx("div",{className:"flex-[0_0_88px] sm:flex-[0_0_128px] size-[88px] bg-white sm:size-[128px]",children:f.jsx("img",{src:s==null?void 0:s.path,alt:"company",className:"size-full object-contain"})}),f.jsx("h3",{className:"text-lg xl:mr-20 mr-10",children:n})]}),f.jsxs("div",{className:"flex-[0_0_19.80%] flex gap-2.5",children:[f.jsx("img",{src:r==null?void 0:r.path,alt:"flag",className:"size-4"}),f.jsx("h4",{className:"text-sm normal",children:i})]}),f.jsx("h3",{className:"text-sm normal md:ml-1 flex-[0_0_34.65%]",children:o})]})]})};var Li=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},As=typeof window>"u"||"Deno"in globalThis;function At(){}function k1(e,t){return typeof e=="function"?e(t):e}function Uc(e){return typeof e=="number"&&e>=0&&e!==1/0}function vv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qs(e,t){return typeof e=="function"?e(t):e}function Dt(e,t){return typeof e=="function"?e(t):e}function Sh(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:i,queryKey:o,stale:a}=e;if(o){if(s){if(t.queryHash!==ku(o,t.options))return!1}else if(!wi(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||r&&r!==t.state.fetchStatus||i&&!i(t))}function _h(e,t){const{exact:n,status:s,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(bi(t.options.mutationKey)!==bi(i))return!1}else if(!wi(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function ku(e,t){return((t==null?void 0:t.queryKeyHashFn)||bi)(e)}function bi(e){return JSON.stringify(e,(t,n)=>Wc(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function wi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!wi(e[n],t[n])):!1}function xv(e,t){if(e===t)return e;const n=Ch(e)&&Ch(t);if(n||Wc(e)&&Wc(t)){const s=n?e:Object.keys(e),r=s.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let c=0;for(let l=0;l{setTimeout(t,e)})}function Hc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xv(e,t):t}function M1(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function D1(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Ou=Symbol();function bv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ou?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var as,On,Zs,Fh,I1=(Fh=class extends Li{constructor(){super();ne(this,as);ne(this,On);ne(this,Zs);K(this,Zs,t=>{if(!As&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,On)||this.setEventListener(T(this,Zs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,On))==null||t.call(this),K(this,On,void 0))}setEventListener(t){var n;K(this,Zs,t),(n=T(this,On))==null||n.call(this),K(this,On,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){T(this,as)!==t&&(K(this,as,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,as)=="boolean"?T(this,as):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},as=new WeakMap,On=new WeakMap,Zs=new WeakMap,Fh),Mu=new I1,Ks,Mn,Gs,Vh,L1=(Vh=class extends Li{constructor(){super();ne(this,Ks,!0);ne(this,Mn);ne(this,Gs);K(this,Gs,t=>{if(!As&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){T(this,Mn)||this.setEventListener(T(this,Gs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Mn))==null||t.call(this),K(this,Mn,void 0))}setEventListener(t){var n;K(this,Gs,t),(n=T(this,Mn))==null||n.call(this),K(this,Mn,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ks)!==t&&(K(this,Ks,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return T(this,Ks)}},Ks=new WeakMap,Mn=new WeakMap,Gs=new WeakMap,Vh),Uo=new L1;function qc(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}function F1(e){return Math.min(1e3*2**e,3e4)}function wv(e){return(e??"online")==="online"?Uo.isOnline():!0}var Sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ya(e){return e instanceof Sv}function _v(e){let t=!1,n=0,s=!1,r;const i=qc(),o=p=>{var v;s||(h(new Sv(p)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},c=()=>{t=!1},l=()=>Mu.isFocused()&&(e.networkMode==="always"||Uo.isOnline())&&e.canRun(),u=()=>wv(e.networkMode)&&e.canRun(),d=p=>{var v;s||(s=!0,(v=e.onSuccess)==null||v.call(e,p),r==null||r(),i.resolve(p))},h=p=>{var v;s||(s=!0,(v=e.onError)==null||v.call(e,p),r==null||r(),i.reject(p))},y=()=>new Promise(p=>{var v;r=x=>{(s||l())&&p(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var p;r=void 0,s||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(s)return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(x){p=Promise.reject(x)}Promise.resolve(p).then(d).catch(x=>{var A;if(s)return;const b=e.retry??(As?0:3),w=e.retryDelay??F1,_=typeof w=="function"?w(n,x):w,S=b===!0||typeof b=="number"&&nl()?void 0:y()).then(()=>{t?h(x):m()})})};return{promise:i,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?m():y().then(m),i)}}function V1(){let e=[],t=0,n=a=>{a()},s=a=>{a()},r=a=>setTimeout(a,0);const i=a=>{t?e.push(a):r(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&r(()=>{s(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||o()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{s=a},setScheduler:a=>{r=a}}}var He=V1(),cs,Bh,Cv=(Bh=class{constructor(){ne(this,cs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uc(this.gcTime)&&K(this,cs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(As?1/0:5*60*1e3))}clearGcTimeout(){T(this,cs)&&(clearTimeout(T(this,cs)),K(this,cs,void 0))}},cs=new WeakMap,Bh),Qs,Xs,Tt,ls,Ge,Si,us,Ot,gn,$h,B1=($h=class extends Cv{constructor(t){super();ne(this,Ot);ne(this,Qs);ne(this,Xs);ne(this,Tt);ne(this,ls);ne(this,Ge);ne(this,Si);ne(this,us);K(this,us,!1),K(this,Si,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,ls,t.client),K(this,Tt,T(this,ls).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Qs,$1(this.options)),this.state=t.state??T(this,Qs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Ge))==null?void 0:t.promise}setOptions(t){this.options={...T(this,Si),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Tt).remove(this)}setData(t,n){const s=Hc(this.state.data,t,this.options);return pe(this,Ot,gn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){pe(this,Ot,gn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,r;const n=(s=T(this,Ge))==null?void 0:s.promise;return(r=T(this,Ge))==null||r.cancel(t),n?n.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Qs))}isActive(){return this.observers.some(t=>Dt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ou||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!vv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Ge))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Ge))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Tt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Ge)&&(T(this,us)?T(this,Ge).cancel({revert:!0}):T(this,Ge).cancelRetry()),this.scheduleGc()),T(this,Tt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||pe(this,Ot,gn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Ge))return T(this,Ge).continueRetry(),T(this,Ge).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(K(this,us,!0),s.signal)})},i=()=>{const d=bv(this.options,n),h={client:T(this,ls),queryKey:this.queryKey,meta:this.meta};return r(h),K(this,us,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:T(this,ls),state:this.state,fetchFn:i};r(o),(c=this.options.behavior)==null||c.onFetch(o,this),K(this,Xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&pe(this,Ot,gn).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,y,m,p;Ya(d)&&d.silent||pe(this,Ot,gn).call(this,{type:"error",error:d}),Ya(d)||((y=(h=T(this,Tt).config).onError)==null||y.call(h,d,this),(p=(m=T(this,Tt).config).onSettled)==null||p.call(m,this.state.data,d,this)),this.scheduleGc()};return K(this,Ge,_v({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:s.abort.bind(s),onSuccess:d=>{var h,y,m,p;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){a(v);return}(y=(h=T(this,Tt).config).onSuccess)==null||y.call(h,d,this),(p=(m=T(this,Tt).config).onSettled)==null||p.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{pe(this,Ot,gn).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{pe(this,Ot,gn).call(this,{type:"pause"})},onContinue:()=>{pe(this,Ot,gn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Ge).start()}},Qs=new WeakMap,Xs=new WeakMap,Tt=new WeakMap,ls=new WeakMap,Ge=new WeakMap,Si=new WeakMap,us=new WeakMap,Ot=new WeakSet,gn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ev(s.data,this.options),fetchMeta:t.meta??null};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Ya(r)&&r.revert&&T(this,Xs)?{...T(this,Xs),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),T(this,Tt).notify({query:this,type:"updated",action:t})})},$h);function Ev(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gt,Uh,U1=(Uh=class extends Li{constructor(t={}){super();ne(this,Gt);this.config=t,K(this,Gt,new Map)}build(t,n,s){const r=n.queryKey,i=n.queryHash??ku(r,n);let o=this.get(i);return o||(o=new B1({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){T(this,Gt).has(t.queryHash)||(T(this,Gt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Gt).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Gt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Gt).get(t)}getAll(){return[...T(this,Gt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Sh(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>Sh(t,s)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gt=new WeakMap,Uh),Qt,nt,ds,Xt,jn,zh,z1=(zh=class extends Cv{constructor(t){super();ne(this,Xt);ne(this,Qt);ne(this,nt);ne(this,ds);this.mutationId=t.mutationId,K(this,nt,t.mutationCache),K(this,Qt,[]),this.state=t.state||W1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Qt).includes(t)||(T(this,Qt).push(t),this.clearGcTimeout(),T(this,nt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,Qt,T(this,Qt).filter(n=>n!==t)),this.scheduleGc(),T(this,nt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Qt).length||(this.state.status==="pending"?this.scheduleGc():T(this,nt).remove(this))}continue(){var t;return((t=T(this,ds))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,i,o,a,c,l,u,d,h,y,m,p,v,x,b,w,_,S,A,E;K(this,ds,_v({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,N)=>{pe(this,Xt,jn).call(this,{type:"failed",failureCount:R,error:N})},onPause:()=>{pe(this,Xt,jn).call(this,{type:"pause"})},onContinue:()=>{pe(this,Xt,jn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,nt).canRun(this)}));const n=this.state.status==="pending",s=!T(this,ds).canStart();try{if(!n){pe(this,Xt,jn).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(r=T(this,nt).config).onMutate)==null?void 0:i.call(r,t,this));const N=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));N!==this.state.context&&pe(this,Xt,jn).call(this,{type:"pending",context:N,variables:t,isPaused:s})}const R=await T(this,ds).start();return await((l=(c=T(this,nt).config).onSuccess)==null?void 0:l.call(c,R,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,R,t,this.state.context)),await((y=(h=T(this,nt).config).onSettled)==null?void 0:y.call(h,R,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,R,null,t,this.state.context)),pe(this,Xt,jn).call(this,{type:"success",data:R}),R}catch(R){try{throw await((x=(v=T(this,nt).config).onError)==null?void 0:x.call(v,R,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,R,t,this.state.context)),await((S=(_=T(this,nt).config).onSettled)==null?void 0:S.call(_,void 0,R,this.state.variables,this.state.context,this)),await((E=(A=this.options).onSettled)==null?void 0:E.call(A,void 0,R,t,this.state.context)),R}finally{pe(this,Xt,jn).call(this,{type:"error",error:R})}}finally{T(this,nt).runNext(this)}}},Qt=new WeakMap,nt=new WeakMap,ds=new WeakMap,Xt=new WeakSet,jn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{T(this,Qt).forEach(s=>{s.onMutationUpdate(t)}),T(this,nt).notify({mutation:this,type:"updated",action:t})})},zh);function W1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vn,Mt,_i,Wh,H1=(Wh=class extends Li{constructor(t={}){super();ne(this,vn);ne(this,Mt);ne(this,_i);this.config=t,K(this,vn,new Set),K(this,Mt,new Map),K(this,_i,0)}build(t,n,s){const r=new z1({mutationCache:this,mutationId:++Bi(this,_i)._,options:t.defaultMutationOptions(n),state:s});return this.add(r),r}add(t){T(this,vn).add(t);const n=Yi(t);if(typeof n=="string"){const s=T(this,Mt).get(n);s?s.push(t):T(this,Mt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,vn).delete(t)){const n=Yi(t);if(typeof n=="string"){const s=T(this,Mt).get(n);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&T(this,Mt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yi(t);if(typeof n=="string"){const s=T(this,Mt).get(n),r=s==null?void 0:s.find(i=>i.state.status==="pending");return!r||r===t}else return!0}runNext(t){var s;const n=Yi(t);if(typeof n=="string"){const r=(s=T(this,Mt).get(n))==null?void 0:s.find(i=>i!==t&&i.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){He.batch(()=>{T(this,vn).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,vn).clear(),T(this,Mt).clear()})}getAll(){return Array.from(T(this,vn))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>_h(n,s))}findAll(t={}){return this.getAll().filter(n=>_h(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(At))))}},vn=new WeakMap,Mt=new WeakMap,_i=new WeakMap,Wh);function Yi(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Th(e){return{onFetch:(t,n)=>{var u,d,h,y,m;const s=t.options,r=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((y=t.state.data)==null?void 0:y.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},x=bv(t.options,t.fetchOptions),b=async(w,_,S)=>{if(p)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const A={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};v(A);const E=await x(A),{maxPages:R}=t.options,N=S?D1:M1;return{pages:N(w.pages,E,R),pageParams:N(w.pageParams,_,R)}};if(r&&i.length){const w=r==="backward",_=w?q1:Ah,S={pages:i,pageParams:o},A=_(s,S);a=await b(S,A,w)}else{const w=e??i.length;do{const _=c===0?o[0]??s.initialPageParam:Ah(s,a);if(c>0&&_==null)break;a=await b(a,_),c++}while(c{var p,v;return(v=(p=t.options).persister)==null?void 0:v.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Ah(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function q1(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var Ne,Dn,In,Ys,Js,Ln,er,tr,Hh,Uk=(Hh=class{constructor(e={}){ne(this,Ne);ne(this,Dn);ne(this,In);ne(this,Ys);ne(this,Js);ne(this,Ln);ne(this,er);ne(this,tr);K(this,Ne,e.queryCache||new U1),K(this,Dn,e.mutationCache||new H1),K(this,In,e.defaultOptions||{}),K(this,Ys,new Map),K(this,Js,new Map),K(this,Ln,0)}mount(){Bi(this,Ln)._++,T(this,Ln)===1&&(K(this,er,Mu.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ne).onFocus())})),K(this,tr,Uo.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ne).onOnline())})))}unmount(){var e,t;Bi(this,Ln)._--,T(this,Ln)===0&&((e=T(this,er))==null||e.call(this),K(this,er,void 0),(t=T(this,tr))==null||t.call(this),K(this,tr,void 0))}isFetching(e){return T(this,Ne).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Dn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ne).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=T(this,Ne).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return T(this,Ne).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),r=T(this,Ne).get(s.queryHash),i=r==null?void 0:r.state.data,o=k1(t,i);if(o!==void 0)return T(this,Ne).build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>T(this,Ne).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ne).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ne);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ne),s={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries(s,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=He.batch(()=>T(this,Ne).findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(At).catch(At)}invalidateQueries(e,t={}){return He.batch(()=>{if(T(this,Ne).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=He.batch(()=>T(this,Ne).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let i=r.fetch(void 0,n);return n.throwOnError||(i=i.catch(At)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(At)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ne).build(this,t);return n.isStaleByTime(qs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e.behavior=Th(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e.behavior=Th(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Uo.isOnline()?T(this,Dn).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ne)}getMutationCache(){return T(this,Dn)}getDefaultOptions(){return T(this,In)}setDefaultOptions(e){K(this,In,e)}setQueryDefaults(e,t){T(this,Ys).set(bi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Ys).values()],n={};return t.forEach(s=>{wi(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Js).set(bi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Js).values()];let n={};return t.forEach(s=>{wi(e,s.mutationKey)&&(n={...n,...s.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,In).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ku(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ou&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,In).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ne).clear(),T(this,Dn).clear()}},Ne=new WeakMap,Dn=new WeakMap,In=new WeakMap,Ys=new WeakMap,Js=new WeakMap,Ln=new WeakMap,er=new WeakMap,tr=new WeakMap,Hh),ut,me,Ci,st,fs,nr,Fn,Yt,Ei,sr,rr,hs,ps,Vn,ir,be,Br,Zc,Kc,Gc,Qc,Xc,Yc,Jc,Tv,qh,Z1=(qh=class extends Li{constructor(t,n){super();ne(this,be);ne(this,ut);ne(this,me);ne(this,Ci);ne(this,st);ne(this,fs);ne(this,nr);ne(this,Fn);ne(this,Yt);ne(this,Ei);ne(this,sr);ne(this,rr);ne(this,hs);ne(this,ps);ne(this,Vn);ne(this,ir,new Set);this.options=n,K(this,ut,t),K(this,Yt,null),K(this,Fn,qc()),this.options.experimental_prefetchInRender||T(this,Fn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,me).addObserver(this),Rh(T(this,me),this.options)?pe(this,be,Br).call(this):this.updateResult(),pe(this,be,Qc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return el(T(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return el(T(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,pe(this,be,Xc).call(this),pe(this,be,Yc).call(this),T(this,me).removeObserver(this)}setOptions(t,n){const s=this.options,r=T(this,me);if(this.options=T(this,ut).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dt(this.options.enabled,T(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");pe(this,be,Jc).call(this),T(this,me).setOptions(this.options),s._defaulted&&!zc(this.options,s)&&T(this,ut).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,me),observer:this});const i=this.hasListeners();i&&Ph(T(this,me),r,this.options,s)&&pe(this,be,Br).call(this),this.updateResult(n),i&&(T(this,me)!==r||Dt(this.options.enabled,T(this,me))!==Dt(s.enabled,T(this,me))||qs(this.options.staleTime,T(this,me))!==qs(s.staleTime,T(this,me)))&&pe(this,be,Zc).call(this);const o=pe(this,be,Kc).call(this);i&&(T(this,me)!==r||Dt(this.options.enabled,T(this,me))!==Dt(s.enabled,T(this,me))||o!==T(this,Vn))&&pe(this,be,Gc).call(this,o)}getOptimisticResult(t){const n=T(this,ut).getQueryCache().build(T(this,ut),t),s=this.createResult(n,t);return G1(this,s)&&(K(this,st,s),K(this,nr,this.options),K(this,fs,T(this,me).state)),s}getCurrentResult(){return T(this,st)}trackResult(t,n){const s={};return Object.keys(t).forEach(r=>{Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),s}trackProp(t){T(this,ir).add(t)}getCurrentQuery(){return T(this,me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,ut).defaultQueryOptions(t),s=T(this,ut).getQueryCache().build(T(this,ut),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return pe(this,be,Br).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,st)))}createResult(t,n){var R;const s=T(this,me),r=this.options,i=T(this,st),o=T(this,fs),a=T(this,nr),l=t!==s?t.state:T(this,Ci),{state:u}=t;let d={...u},h=!1,y;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&Rh(t,n),I=N&&Ph(t,s,n,r);(M||I)&&(d={...d,...Ev(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:v}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(o==null?void 0:o.data)&&n.select===T(this,Ei))y=T(this,sr);else try{K(this,Ei,n.select),y=n.select(d.data),y=Hc(i==null?void 0:i.data,y,n),K(this,sr,y),K(this,Yt,null)}catch(N){K(this,Yt,N)}else y=d.data;if(n.placeholderData!==void 0&&y===void 0&&v==="pending"){let N;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))N=i.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((R=T(this,rr))==null?void 0:R.state.data,T(this,rr)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),K(this,Yt,null)}catch(M){K(this,Yt,M)}N!==void 0&&(v="success",y=Hc(i==null?void 0:i.data,N,n),h=!0)}T(this,Yt)&&(m=T(this,Yt),y=T(this,sr),p=Date.now(),v="error");const x=d.fetchStatus==="fetching",b=v==="pending",w=v==="error",_=b&&x,S=y!==void 0,E={status:v,fetchStatus:d.fetchStatus,isPending:b,isSuccess:v==="success",isError:w,isInitialLoading:_,isLoading:_,data:y,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:w&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&S,isStale:Du(t,n),refetch:this.refetch,promise:T(this,Fn)};if(this.options.experimental_prefetchInRender){const N=O=>{E.status==="error"?O.reject(E.error):E.data!==void 0&&O.resolve(E.data)},M=()=>{const O=K(this,Fn,E.promise=qc());N(O)},I=T(this,Fn);switch(I.status){case"pending":t.queryHash===s.queryHash&&N(I);break;case"fulfilled":(E.status==="error"||E.data!==I.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==I.reason)&&M();break}}return E}updateResult(t){const n=T(this,st),s=this.createResult(T(this,me),this.options);if(K(this,fs,T(this,me).state),K(this,nr,this.options),T(this,fs).data!==void 0&&K(this,rr,T(this,me)),zc(s,n))return;K(this,st,s);const r={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,ir).size)return!0;const c=new Set(a??T(this,ir));return this.options.throwOnError&&c.add("error"),Object.keys(T(this,st)).some(l=>{const u=l;return T(this,st)[u]!==n[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(r.listeners=!0),pe(this,be,Tv).call(this,{...r,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&pe(this,be,Qc).call(this)}},ut=new WeakMap,me=new WeakMap,Ci=new WeakMap,st=new WeakMap,fs=new WeakMap,nr=new WeakMap,Fn=new WeakMap,Yt=new WeakMap,Ei=new WeakMap,sr=new WeakMap,rr=new WeakMap,hs=new WeakMap,ps=new WeakMap,Vn=new WeakMap,ir=new WeakMap,be=new WeakSet,Br=function(t){pe(this,be,Jc).call(this);let n=T(this,me).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(At)),n},Zc=function(){pe(this,be,Xc).call(this);const t=qs(this.options.staleTime,T(this,me));if(As||T(this,st).isStale||!Uc(t))return;const s=vv(T(this,st).dataUpdatedAt,t)+1;K(this,hs,setTimeout(()=>{T(this,st).isStale||this.updateResult()},s))},Kc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,me)):this.options.refetchInterval)??!1},Gc=function(t){pe(this,be,Yc).call(this),K(this,Vn,t),!(As||Dt(this.options.enabled,T(this,me))===!1||!Uc(T(this,Vn))||T(this,Vn)===0)&&K(this,ps,setInterval(()=>{(this.options.refetchIntervalInBackground||Mu.isFocused())&&pe(this,be,Br).call(this)},T(this,Vn)))},Qc=function(){pe(this,be,Zc).call(this),pe(this,be,Gc).call(this,pe(this,be,Kc).call(this))},Xc=function(){T(this,hs)&&(clearTimeout(T(this,hs)),K(this,hs,void 0))},Yc=function(){T(this,ps)&&(clearInterval(T(this,ps)),K(this,ps,void 0))},Jc=function(){const t=T(this,ut).getQueryCache().build(T(this,ut),this.options);if(t===T(this,me))return;const n=T(this,me);K(this,me,t),K(this,Ci,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Tv=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,st))}),T(this,ut).getQueryCache().notify({query:T(this,me),type:"observerResultsUpdated"})})},qh);function K1(e,t){return Dt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rh(e,t){return K1(e,t)||e.state.data!==void 0&&el(e,t,t.refetchOnMount)}function el(e,t,n){if(Dt(t.enabled,e)!==!1){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Du(e,t)}return!1}function Ph(e,t,n,s){return(e!==t||Dt(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Du(e,n)}function Du(e,t){return Dt(t.enabled,e)!==!1&&e.isStaleByTime(qs(t.staleTime,e))}function G1(e,t){return!zc(e.getCurrentResult(),t)}var Av=g.createContext(void 0),Q1=e=>{const t=g.useContext(Av);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zk=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(Av.Provider,{value:e,children:t})),Rv=g.createContext(!1),X1=()=>g.useContext(Rv);Rv.Provider;function Y1(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var J1=g.createContext(Y1()),ej=()=>g.useContext(J1);function tj(e,t){return typeof e=="function"?e(...t):!!e}function Nh(){}var nj=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},sj=e=>{g.useEffect(()=>{e.clearReset()},[e])},rj=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||tj(n,[e.error,s])),ij=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},oj=(e,t)=>e.isLoading&&e.isFetching&&!t,aj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,jh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function cj(e,t,n){var d,h,y,m,p;const s=Q1(),r=X1(),i=ej(),o=s.defaultQueryOptions(e);(h=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",ij(o),nj(o,i),sj(i);const a=!s.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(s,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(v=>{const x=u?c.subscribe(He.batchCalls(v)):Nh;return c.updateResult(),x},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),aj(o,l))throw jh(o,c,i);if(rj({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((m=(y=s.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||m.call(y,o,l),o.experimental_prefetchInRender&&!As&&oj(l,r)){const v=a?jh(o,c,i):(p=s.getQueryCache().get(o.queryHash))==null?void 0:p.promise;v==null||v.catch(Nh).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Tn(e,t){return cj(e,Z1)}const lj=e=>{const{data:t,isPending:n,status:s}=Tn({queryKey:["photos",e],queryFn:()=>qN(e),select:({data:r})=>r.data});return{data:t,isPending:n,status:s}},uj=e=>{const{data:t,isPending:n,isError:s}=Tn({queryKey:["videos",e],queryFn:()=>ZN(e),select:({data:r})=>r.data});return{data:t,isPending:n,isError:s}},Wk=({className:e,setIsOpen:t,activeItem:n})=>{var h,y;const[s,r]=En({align:"center",loop:!1,dragFree:!1,slidesToScroll:1}),{data:i}=lj(1),{data:o}=uj(1);GE();const[a,c]=g.useState(!1),[l,u]=g.useState(!1);g.useEffect(()=>{if(!r)return;const m=()=>{c(r.canScrollPrev()),u(r.canScrollNext())};return r.on("select",m),m(),()=>{r.off("select",m)}},[r]),g.useEffect(()=>{!r||!i||r.scrollTo(n.id,!0)},[r,i,n.id]);const d=n.type==="photo"?(h=i==null?void 0:i.photos)==null?void 0:h.map(m=>{var p;return f.jsx("div",{className:"embla__slide flex-[0_0_100%] h-[350px] md:h-[500px] lg:h-[700px] lg:px-[20%] flex items-center justify-center",children:f.jsx("img",{src:(p=m==null?void 0:m.photo)==null?void 0:p.path,alt:m.photo.file_name,className:"max-h-full max-w-full object-contain"})},m.id)}):(y=o==null?void 0:o.videos)==null?void 0:y.map(m=>{var p;return f.jsx("div",{className:"embla__slide flex-[0_0_100%] h-[80vh] lg:px-[20%] flex items-center justify-center",children:f.jsx("video",{src:((p=m==null?void 0:m.video)==null?void 0:p.path)??"",controls:!0,autoPlay:!0,muted:!0,className:"max-h-full max-w-full object-contain"})},m.id)});return f.jsxs(Hr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:V("fixed z-[100] top-0 left-0 pb-40 pt-20 lg:px-28 px-6 overflow-hidden min-h-screen w-full bg-black/90",e),children:[f.jsx(Sl,{onClick:()=>t(!1),className:"absolute top-6 right-6 p-3 md:size-20 size-16 cursor-pointer z-50 text-white hover:scale-110 transition-all duration-300"}),f.jsxs("div",{className:"hidden md:block",children:[f.jsx(nc,{onClick:()=>a&&(r==null?void 0:r.scrollPrev()),className:V("absolute left-10 top-1/2 -translate-y-1/2 text-white size-20 cursor-pointer hover:scale-110 transition-all duration-300 z-40",!a&&"opacity-20 pointer-events-none")}),f.jsx(jp,{onClick:()=>l&&(r==null?void 0:r.scrollNext()),className:V("absolute right-10 top-1/2 -translate-y-1/2 text-white size-20 cursor-pointer hover:scale-110 transition-all duration-300 z-40",!l&&"opacity-20 pointer-events-none")})]}),f.jsx("div",{ref:s,className:"embla overflow-hidden",children:f.jsx("div",{className:"embla__container flex",children:d})})]})},Hk=({className:e,name:t,achievements:n,biography:s,image:r,images:i})=>{var m;const[o,a]=g.useState(!1),[c,l]=g.useState(!1),u=Te(p=>p.lang),[d,h]=g.useState(100),y=({className:p})=>{const[v,x]=En({});return g.useEffect(()=>{if(!x)return;const b=()=>{a(x.canScrollPrev()),l(x.canScrollNext())};return b(),x.on("select",b),()=>{x.off("select",b)}},[x]),f.jsxs("div",{className:V("",p),children:[f.jsx("h3",{className:"text-xl mb-2.5",children:"Работы дизайнера"}),f.jsx("div",{ref:v,className:"embla overflow-hidden",children:f.jsxs("div",{className:"embla__container items-center flex gap-4",children:[o&&f.jsx(nc,{onClick:()=>o&&(x==null?void 0:x.scrollPrev()),className:V("cursor-pointer",!o&&"opacity-20")}),f.jsx("div",{className:"flex items-center gap-4",children:i==null?void 0:i.map((b,w)=>f.jsx("div",{className:"lg:size-[140px] size-[70px] overflow-hidden",children:f.jsx("img",{onClick:()=>h(w),src:b==null?void 0:b.path,className:"size-full hover:scale-105 transition-all cursor-pointer overflow-hidden object-cover object-top"},w)}))}),c&&f.jsx(jp,{onClick:()=>o&&(x==null?void 0:x.scrollNext()),className:V("cursor-pointer",!c&&"opacity-20")})]})})]})};return f.jsxs(Py,{children:[f.jsxs(Ny,{className:V("relative group h-[326px] overflow-hidden",e),children:[f.jsx("article",{className:"z-50 size-full bg-[url('/impressions/card-bg.png')] bg-no-repeat overflow-hidden",children:f.jsxs("div",{className:"flex gap-4 h-[316px] overflow-hidden",children:[f.jsx("img",{src:r==null?void 0:r.path,alt:t,className:"flex-[0_0_44%] object-contain overflow-hidden"}),f.jsxs("div",{className:"flex-auto text-left text-white z-20 pt-6 pl-4 pr-4",children:[f.jsx("h3",{className:"text-xl mb-6",children:t}),f.jsx("ul",{className:"text-sm list-disc pl-4 flex flex-col gap-2",children:n.slice(0,7).map((p,v)=>f.jsx("li",{children:u==="ru"?p==null?void 0:p.ru:p==null?void 0:p.en},v))})]})]})}),f.jsx("img",{src:"/impressions/card-bg-bg.png",className:"absolute top-2.5 left-2.5 -z-10 size-full"})]}),f.jsxs(Su,{className:V("p-6 flex flex-col gap-4 xl:!w-[1224px] md:!w-[688px] w-[336px] max-h-[100vh] overflow-hidden"),children:[d===100?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"gap-4 md:!flex !hidden",children:[f.jsx("div",{className:"flex-1 h-[345px]",children:f.jsx("img",{src:r==null?void 0:r.path,alt:"",className:"size-full float-left object-cover"})}),f.jsxs("div",{className:"flex-[0_0_70%]",children:[f.jsx("div",{className:"text-2xl mb-4",children:t}),f.jsx("hr",{}),f.jsx("div",{className:"mt-4 flex flex-col gap-3 normal overflow-y-auto max-h-[40vh]",dangerouslySetInnerHTML:{__html:s??""}})]})]}),f.jsx("hr",{className:"hidden md:block"}),f.jsxs("div",{className:"flex flex-col gap-4 md:hidden overflow-auto h-full",children:[f.jsx("h3",{className:"text-xl",children:t}),f.jsx("img",{src:r==null?void 0:r.path,alt:t}),f.jsx("hr",{}),f.jsx(y,{}),f.jsx("hr",{}),f.jsx("div",{className:"mt-4 flex flex-col gap-3 normal",dangerouslySetInnerHTML:{__html:s??""}})]})]}):f.jsxs("div",{className:"",children:[f.jsxs("button",{onClick:()=>h(100),className:"flex items-center gap-2 mb-4",children:[f.jsx(nc,{}),"Вернуться назад"]}),f.jsx("div",{className:"2xl:h-[50vh] h-[40vh] bg-[#f4f4f4]",children:f.jsx("img",{src:(m=i==null?void 0:i[d])==null?void 0:m.path,className:"size-full object-contain"})})]}),f.jsx(y,{className:"hidden md:block"})]})]})};function Pv(e,t=[]){let n=[];function s(i,o){const a=g.createContext(o),c=n.length;n=[...n,o];const l=d=>{var x;const{scope:h,children:y,...m}=d,p=((x=h==null?void 0:h[e])==null?void 0:x[c])||a,v=g.useMemo(()=>m,Object.values(m));return f.jsx(p.Provider,{value:v,children:y})};l.displayName=i+"Provider";function u(d,h){var p;const y=((p=h==null?void 0:h[e])==null?void 0:p[c])||a,m=g.useContext(y);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(o=>g.createContext(o));return function(a){const c=(a==null?void 0:a[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return r.scopeName=e,[s,dj(r,...t)]}function dj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((a,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function kh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Iu(...e){return t=>{let n=!1;const s=e.map(r=>{const i=kh(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r{const{children:i,...o}=s,a=g.Children.toArray(i),c=a.find(pj);if(c){const l=c.props.children,u=a.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return f.jsx(t,{...o,ref:r,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return f.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function fj(e){const t=g.forwardRef((n,s)=>{const{children:r,...i}=n;if(g.isValidElement(r)){const o=gj(r),a=mj(i,r.props);return r.type!==g.Fragment&&(a.ref=s?Iu(s,o):o),g.cloneElement(r,a)}return g.Children.count(r)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hj=Symbol("radix.slottable");function pj(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hj}function mj(e,t){const n={...t};for(const s in t){const r=e[s],i=t[s];/^on[A-Z]/.test(s)?r&&i?n[s]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[s]=r):s==="style"?n[s]={...r,...i}:s==="className"&&(n[s]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function gj(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=yj.reduce((e,t)=>{const n=tl(`Primitive.${t}`),s=g.forwardRef((r,i)=>{const{asChild:o,...a}=r,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...a,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function nl(e,t){e&&dl.flushSync(()=>e.dispatchEvent(t))}var Rs=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},vj=ul[" useInsertionEffect ".trim().toString()]||Rs;function Nv({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[r,i,o]=xj({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:r;{const u=g.useRef(e!==void 0);g.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${s} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,s])}const l=g.useCallback(u=>{var d;if(a){const h=bj(u)?u(e):u;h!==e&&((d=o.current)==null||d.call(o,h))}else i(u)},[a,e,i,o]);return[c,l]}function xj({defaultProp:e,onChange:t}){const[n,s]=g.useState(e),r=g.useRef(n),i=g.useRef(t);return vj(()=>{i.current=t},[t]),g.useEffect(()=>{var o;r.current!==n&&((o=i.current)==null||o.call(i,n),r.current=n)},[n,r]),[n,s,i]}function bj(e){return typeof e=="function"}var wj=g.createContext(void 0);function Sj(e){const t=g.useContext(wj);return e||t||"ltr"}function _j(e,t){return g.useReducer((n,s)=>t[n][s]??n,e)}var Fi=e=>{const{present:t,children:n}=e,s=Cj(t),r=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),i=dn(s.ref,Ej(r));return typeof n=="function"||s.isPresent?g.cloneElement(r,{ref:i}):null};Fi.displayName="Presence";function Cj(e){const[t,n]=g.useState(),s=g.useRef(null),r=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[a,c]=_j(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const l=Ji(s.current);i.current=a==="mounted"?l:"none"},[a]),Rs(()=>{const l=s.current,u=r.current;if(u!==e){const h=i.current,y=Ji(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),Rs(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=y=>{const p=Ji(s.current).includes(y.animationName);if(y.target===t&&p&&(c("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=y=>{y.target===t&&(i.current=Ji(s.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(l=>{s.current=l?getComputedStyle(l):null,n(l)},[])}}function Ji(e){return(e==null?void 0:e.animationName)||"none"}function Ej(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tj=ul[" useId ".trim().toString()]||(()=>{}),Aj=0;function jv(e){const[t,n]=g.useState(Tj());return Rs(()=>{e||n(s=>s??String(Aj++))},[e]),e||(t?`radix-${t}`:"")}function kv(e){const t=e+"CollectionProvider",[n,s]=Pv(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:v,children:x}=p,b=de.useRef(null),w=de.useRef(new Map).current;return f.jsx(r,{scope:v,itemMap:w,collectionRef:b,children:x})};o.displayName=t;const a=e+"CollectionSlot",c=tl(a),l=de.forwardRef((p,v)=>{const{scope:x,children:b}=p,w=i(a,x),_=dn(v,w.collectionRef);return f.jsx(c,{ref:_,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=tl(u),y=de.forwardRef((p,v)=>{const{scope:x,children:b,...w}=p,_=de.useRef(null),S=dn(v,_),A=i(u,x);return de.useEffect(()=>(A.itemMap.set(_,{ref:_,...w}),()=>void A.itemMap.delete(_))),f.jsx(h,{[d]:"",ref:S,children:b})});y.displayName=u;function m(p){const v=i(e+"CollectionConsumer",p);return de.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((A,E)=>w.indexOf(A.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:y},m,s]}function Jt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function Rj(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e);g.useEffect(()=>{const s=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var Pj="DismissableLayer",sl="dismissableLayer.update",Nj="dismissableLayer.pointerDownOutside",jj="dismissableLayer.focusOutside",Oh,Ov=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mv=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=e,l=g.useContext(Ov),[u,d]=g.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=g.useState({}),m=dn(t,E=>d(E)),p=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(v),b=u?p.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,_=b>=x,S=Mj(E=>{const R=E.target,N=[...l.branches].some(M=>M.contains(R));!_||N||(r==null||r(E),o==null||o(E),E.defaultPrevented||a==null||a())},h),A=Dj(E=>{const R=E.target;[...l.branches].some(M=>M.contains(R))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},h);return Rj(E=>{b===l.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),g.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Oh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Mh(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Oh)}},[u,h,n,l]),g.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Mh())},[u,l]),g.useEffect(()=>{const E=()=>y({});return document.addEventListener(sl,E),()=>document.removeEventListener(sl,E)},[]),f.jsx(ht.div,{...c,ref:m,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,A.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,S.onPointerDownCapture)})});Mv.displayName=Pj;var kj="DismissableLayerBranch",Oj=g.forwardRef((e,t)=>{const n=g.useContext(Ov),s=g.useRef(null),r=dn(t,s);return g.useEffect(()=>{const i=s.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(ht.div,{...e,ref:r})});Oj.displayName=kj;function Mj(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e),s=g.useRef(!1),r=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!s.current){let c=function(){Dv(Nj,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function Dj(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e),s=g.useRef(!1);return g.useEffect(()=>{const r=i=>{i.target&&!s.current&&Dv(jj,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Mh(){const e=new CustomEvent(sl);document.dispatchEvent(e)}function Dv(e,t,n,{discrete:s}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),s?nl(r,i):r.dispatchEvent(i)}function Ij(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Lj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Fj="VisuallyHidden",Iv=g.forwardRef((e,t)=>f.jsx(ht.span,{...e,ref:t,style:{...Lj,...e.style}}));Iv.displayName=Fj;var Vj=Iv,Ns="NavigationMenu",[Lu,Lv,Bj]=kv(Ns),[rl,$j,Uj]=kv(Ns),[Fu,qk]=Pv(Ns,[Bj,Uj]),[zj,Nt]=Fu(Ns),[Wj,Hj]=Fu(Ns),Fv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,onValueChange:r,defaultValue:i,delayDuration:o=200,skipDelayDuration:a=300,orientation:c="horizontal",dir:l,...u}=e,[d,h]=g.useState(null),y=dn(t,N=>h(N)),m=Sj(l),p=g.useRef(0),v=g.useRef(0),x=g.useRef(0),[b,w]=g.useState(!0),[_,S]=Nv({prop:s,onChange:N=>{const M=N!=="",I=a>0;M?(window.clearTimeout(x.current),I&&w(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>w(!0),a)),r==null||r(N)},defaultProp:i??"",caller:Ns}),A=g.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>S(""),150)},[S]),E=g.useCallback(N=>{window.clearTimeout(v.current),S(N)},[S]),R=g.useCallback(N=>{_===N?window.clearTimeout(v.current):p.current=window.setTimeout(()=>{window.clearTimeout(v.current),S(N)},o)},[_,S,o]);return g.useEffect(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(v.current),window.clearTimeout(x.current)},[]),f.jsx(Vv,{scope:n,isRootMenu:!0,value:_,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:N=>{window.clearTimeout(p.current),b?R(N):E(N)},onTriggerLeave:()=>{window.clearTimeout(p.current),A()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:A,onItemSelect:N=>{S(M=>M===N?"":N)},onItemDismiss:()=>S(""),children:f.jsx(ht.nav,{"aria-label":"Main","data-orientation":c,dir:m,...u,ref:y})})});Fv.displayName=Ns;var il="NavigationMenuSub",qj=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,onValueChange:r,defaultValue:i,orientation:o="horizontal",...a}=e,c=Nt(il,n),[l,u]=Nv({prop:s,onChange:r,defaultProp:i??"",caller:il});return f.jsx(Vv,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:d=>u(d),onItemSelect:d=>u(d),onItemDismiss:()=>u(""),children:f.jsx(ht.div,{"data-orientation":o,...a,ref:t})})});qj.displayName=il;var Vv=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:s,dir:r,orientation:i,children:o,value:a,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:h,onContentLeave:y}=e,[m,p]=g.useState(null),[v,x]=g.useState(new Map),[b,w]=g.useState(null);return f.jsx(zj,{scope:t,isRootMenu:n,rootNavigationMenu:s,value:a,previousValue:Ij(a),baseId:jv(),dir:r,orientation:i,viewport:m,onViewportChange:p,indicatorTrack:b,onIndicatorTrackChange:w,onTriggerEnter:Jt(u),onTriggerLeave:Jt(d),onContentEnter:Jt(h),onContentLeave:Jt(y),onItemSelect:Jt(c),onItemDismiss:Jt(l),onViewportContentChange:g.useCallback((_,S)=>{x(A=>(A.set(_,S),new Map(A)))},[]),onViewportContentRemove:g.useCallback(_=>{x(S=>S.has(_)?(S.delete(_),new Map(S)):S)},[]),children:f.jsx(Lu.Provider,{scope:t,children:f.jsx(Wj,{scope:t,items:v,children:o})})})},Bv="NavigationMenuList",$v=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=Nt(Bv,n),i=f.jsx(ht.ul,{"data-orientation":r.orientation,...s,ref:t});return f.jsx(ht.div,{style:{position:"relative"},ref:r.onIndicatorTrackChange,children:f.jsx(Lu.Slot,{scope:n,children:r.isRootMenu?f.jsx(Xv,{asChild:!0,children:i}):i})})});$v.displayName=Bv;var Uv="NavigationMenuItem",[Zj,zv]=Fu(Uv),Wv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,...r}=e,i=jv(),o=s||i||"LEGACY_REACT_AUTO_VALUE",a=g.useRef(null),c=g.useRef(null),l=g.useRef(null),u=g.useRef(()=>{}),d=g.useRef(!1),h=g.useCallback((m="start")=>{if(a.current){u.current();const p=al(a.current);p.length&&$u(m==="start"?p:p.reverse())}},[]),y=g.useCallback(()=>{if(a.current){const m=al(a.current);m.length&&(u.current=ek(m))}},[]);return f.jsx(Zj,{scope:n,value:o,triggerRef:c,contentRef:a,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:y,onContentFocusOutside:y,children:f.jsx(ht.li,{...r,ref:t})})});Wv.displayName=Uv;var ol="NavigationMenuTrigger",Hv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:s,...r}=e,i=Nt(ol,e.__scopeNavigationMenu),o=zv(ol,e.__scopeNavigationMenu),a=g.useRef(null),c=dn(a,o.triggerRef,t),l=Jv(i.baseId,o.value),u=ex(i.baseId,o.value),d=g.useRef(!1),h=g.useRef(!1),y=o.value===i.value;return f.jsxs(f.Fragment,{children:[f.jsx(Lu.ItemSlot,{scope:n,value:o.value,children:f.jsx(Yv,{asChild:!0,children:f.jsx(ht.button,{id:l,disabled:s,"data-disabled":s?"":void 0,"data-state":Uu(y),"aria-expanded":y,"aria-controls":u,...r,ref:c,onPointerEnter:ze(e.onPointerEnter,()=>{h.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:ze(e.onPointerMove,zo(()=>{s||h.current||o.wasEscapeCloseRef.current||d.current||(i.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:ze(e.onPointerLeave,zo(()=>{s||(i.onTriggerLeave(),d.current=!1)})),onClick:ze(e.onClick,()=>{i.onItemSelect(o.value),h.current=y}),onKeyDown:ze(e.onKeyDown,m=>{const v={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];y&&m.key===v&&(o.onEntryKeyDown(),m.preventDefault())})})})}),y&&f.jsxs(f.Fragment,{children:[f.jsx(Vj,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:m=>{const p=o.contentRef.current,v=m.relatedTarget,x=v===a.current,b=p==null?void 0:p.contains(v);(x||!b)&&o.onFocusProxyEnter(x?"start":"end")}}),i.viewport&&f.jsx("span",{"aria-owns":u})]})]})});Hv.displayName=ol;var Kj="NavigationMenuLink",Dh="navigationMenu.linkSelect",qv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:s,onSelect:r,...i}=e;return f.jsx(Yv,{asChild:!0,children:f.jsx(ht.a,{"data-active":s?"":void 0,"aria-current":s?"page":void 0,...i,ref:t,onClick:ze(e.onClick,o=>{const a=o.target,c=new CustomEvent(Dh,{bubbles:!0,cancelable:!0});if(a.addEventListener(Dh,l=>r==null?void 0:r(l),{once:!0}),nl(a,c),!c.defaultPrevented&&!o.metaKey){const l=new CustomEvent(ho,{bubbles:!0,cancelable:!0});nl(a,l)}},{checkForDefaultPrevented:!1})})})});qv.displayName=Kj;var Vu="NavigationMenuIndicator",Zv=g.forwardRef((e,t)=>{const{forceMount:n,...s}=e,r=Nt(Vu,e.__scopeNavigationMenu),i=!!r.value;return r.indicatorTrack?Zh.createPortal(f.jsx(Fi,{present:n||i,children:f.jsx(Gj,{...s,ref:t})}),r.indicatorTrack):null});Zv.displayName=Vu;var Gj=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=Nt(Vu,n),i=Lv(n),[o,a]=g.useState(null),[c,l]=g.useState(null),u=r.orientation==="horizontal",d=!!r.value;g.useEffect(()=>{var p;const m=(p=i().find(v=>v.value===r.value))==null?void 0:p.ref.current;m&&a(m)},[i,r.value]);const h=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return cl(o,h),cl(r.indicatorTrack,h),c?f.jsx(ht.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":r.orientation,...s,ref:t,style:{position:"absolute",...u?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...s.style}}):null}),pr="NavigationMenuContent",Kv=g.forwardRef((e,t)=>{const{forceMount:n,...s}=e,r=Nt(pr,e.__scopeNavigationMenu),i=zv(pr,e.__scopeNavigationMenu),o=dn(i.contentRef,t),a=i.value===r.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...s};return r.viewport?f.jsx(Qj,{forceMount:n,...c,ref:o}):f.jsx(Fi,{present:n||a,children:f.jsx(Gv,{"data-state":Uu(a),...c,ref:o,onPointerEnter:ze(e.onPointerEnter,r.onContentEnter),onPointerLeave:ze(e.onPointerLeave,zo(r.onContentLeave)),style:{pointerEvents:!a&&r.isRootMenu?"none":void 0,...c.style}})})});Kv.displayName=pr;var Qj=g.forwardRef((e,t)=>{const n=Nt(pr,e.__scopeNavigationMenu),{onViewportContentChange:s,onViewportContentRemove:r}=n;return Rs(()=>{s(e.value,{ref:t,...e})},[e,t,s]),Rs(()=>()=>r(e.value),[e.value,r]),null}),ho="navigationMenu.rootContentDismiss",Gv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,triggerRef:r,focusProxyRef:i,wasEscapeCloseRef:o,onRootContentClose:a,onContentFocusOutside:c,...l}=e,u=Nt(pr,n),d=g.useRef(null),h=dn(d,t),y=Jv(u.baseId,s),m=ex(u.baseId,s),p=Lv(n),v=g.useRef(null),{onItemDismiss:x}=u;g.useEffect(()=>{const w=d.current;if(u.isRootMenu&&w){const _=()=>{var S;x(),a(),w.contains(document.activeElement)&&((S=r.current)==null||S.focus())};return w.addEventListener(ho,_),()=>w.removeEventListener(ho,_)}},[u.isRootMenu,e.value,r,x,a]);const b=g.useMemo(()=>{const _=p().map(M=>M.value);u.dir==="rtl"&&_.reverse();const S=_.indexOf(u.value),A=_.indexOf(u.previousValue),E=s===u.value,R=A===_.indexOf(s);if(!E&&!R)return v.current;const N=(()=>{if(S!==A){if(E&&A!==-1)return S>A?"from-end":"from-start";if(R&&S!==-1)return S>A?"to-start":"to-end"}return null})();return v.current=N,N},[u.previousValue,u.value,u.dir,p,s]);return f.jsx(Xv,{asChild:!0,children:f.jsx(Mv,{id:m,"aria-labelledby":y,"data-motion":b,"data-orientation":u.orientation,...l,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var _;const w=new Event(ho,{bubbles:!0,cancelable:!0});(_=d.current)==null||_.dispatchEvent(w)},onFocusOutside:ze(e.onFocusOutside,w=>{var S;c();const _=w.target;(S=u.rootNavigationMenu)!=null&&S.contains(_)&&w.preventDefault()}),onPointerDownOutside:ze(e.onPointerDownOutside,w=>{var E;const _=w.target,S=p().some(R=>{var N;return(N=R.ref.current)==null?void 0:N.contains(_)}),A=u.isRootMenu&&((E=u.viewport)==null?void 0:E.contains(_));(S||A||!u.isRootMenu)&&w.preventDefault()}),onKeyDown:ze(e.onKeyDown,w=>{var A;const _=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!_){const E=al(w.currentTarget),R=document.activeElement,N=E.findIndex(O=>O===R),I=w.shiftKey?E.slice(0,N).reverse():E.slice(N+1,E.length);$u(I)?w.preventDefault():(A=i.current)==null||A.focus()}}),onEscapeKeyDown:ze(e.onEscapeKeyDown,w=>{o.current=!0})})})}),Bu="NavigationMenuViewport",Qv=g.forwardRef((e,t)=>{const{forceMount:n,...s}=e,i=!!Nt(Bu,e.__scopeNavigationMenu).value;return f.jsx(Fi,{present:n||i,children:f.jsx(Xj,{...s,ref:t})})});Qv.displayName=Bu;var Xj=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:s,...r}=e,i=Nt(Bu,n),o=dn(t,i.onViewportChange),a=Hj(pr,e.__scopeNavigationMenu),[c,l]=g.useState(null),[u,d]=g.useState(null),h=c?(c==null?void 0:c.width)+"px":void 0,y=c?(c==null?void 0:c.height)+"px":void 0,m=!!i.value,p=m?i.value:i.previousValue;return cl(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),f.jsx(ht.div,{"data-state":Uu(m),"data-orientation":i.orientation,...r,ref:o,style:{pointerEvents:!m&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":y,...r.style},onPointerEnter:ze(e.onPointerEnter,i.onContentEnter),onPointerLeave:ze(e.onPointerLeave,zo(i.onContentLeave)),children:Array.from(a.items).map(([x,{ref:b,forceMount:w,..._}])=>{const S=p===x;return f.jsx(Fi,{present:w||S,children:f.jsx(Gv,{..._,ref:Iu(b,A=>{S&&A&&d(A)})})},x)})})}),Yj="FocusGroup",Xv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=Nt(Yj,n);return f.jsx(rl.Provider,{scope:n,children:f.jsx(rl.Slot,{scope:n,children:f.jsx(ht.div,{dir:r.dir,...s,ref:t})})})}),Ih=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Jj="FocusGroupItem",Yv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=$j(n),i=Nt(Jj,n);return f.jsx(rl.ItemSlot,{scope:n,children:f.jsx(ht.button,{...s,ref:t,onKeyDown:ze(e.onKeyDown,o=>{if(["Home","End",...Ih].includes(o.key)){let c=r().map(d=>d.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(o.key)&&c.reverse(),Ih.includes(o.key)){const d=c.indexOf(o.currentTarget);c=c.slice(d+1)}setTimeout(()=>$u(c)),o.preventDefault()}})})})});function al(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $u(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function ek(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function cl(e,t){const n=Jt(t);Rs(()=>{let s=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(s),r.unobserve(e)}}},[e,n])}function Uu(e){return e?"open":"closed"}function Jv(e,t){return`${e}-trigger-${t}`}function ex(e,t){return`${e}-content-${t}`}function zo(e){return t=>t.pointerType==="mouse"?e(t):void 0}var tx=Fv,nx=$v,tk=Wv,sx=Hv,nk=qv,rx=Zv,ix=Kv,ox=Qv;const ax=g.forwardRef(({className:e,children:t,...n},s)=>f.jsxs(tx,{ref:s,className:V("relative z-10 flex w-full flex-1 items-center justify-center",e),...n,children:[t,f.jsx(dx,{})]}));ax.displayName=tx.displayName;const cx=g.forwardRef(({className:e,...t},n)=>f.jsx(nx,{ref:n,className:V("group flex flex-1 list-none w-full items-center justify-center space-x-1",e),...t}));cx.displayName=nx.displayName;const sk=tk,rk=Go("group inline-flex h-14 w-full items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"),lx=g.forwardRef(({className:e,children:t,...n},s)=>f.jsxs(sx,{ref:s,className:V(rk(),"group",e),...n,children:[t,f.jsx("div",{className:"h-full w-4"}),f.jsx(nw,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));lx.displayName=sx.displayName;const ux=g.forwardRef(({className:e,...t},n)=>f.jsx(ix,{ref:n,className:V("left-0 top-0 w-40 data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute",e),...t}));ux.displayName=ix.displayName;const ik=nk,dx=g.forwardRef(({className:e,...t},n)=>f.jsx("div",{className:V("absolute xl:left-full xl:top-0 -top-36 flex justify-center w-40"),children:f.jsx(ox,{className:V("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-40 rounded-md text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90",e),ref:n,...t})}));dx.displayName=ox.displayName;const ok=g.forwardRef(({className:e,...t},n)=>f.jsx(rx,{ref:n,className:V("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:f.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));ok.displayName=rx.displayName;const ak=({className:e,text:t,hoverItems:n,setIsOpen:s})=>{const r=Vo(i=>i.setSheet);return f.jsx(ax,{children:f.jsx(cx,{children:f.jsxs(sk,{className:"w-full",children:[f.jsx(lx,{className:V("bg-transparent h-14 flex gap-3 justify-between min-w-full text-base cursor-pointer items-center hover:bg-slate-300/50 transition-all",e),children:t}),f.jsx(ux,{className:"bg-surface_container shadow flex flex-col pb-2 rounded-[2px] w-40 items-center justify-center pt-2",children:n==null?void 0:n.map((i,o)=>f.jsx(ik,{onClick:()=>{s(!1),r(!1)},className:"h-14 py-2 flex items-center w-40 cursor-pointer px-4 hover:bg-slate-300/50 transition-all",children:f.jsx(Ce,{target:i.blank?"_blank":"",to:i.link??"",children:i.text})},o))})]})})})},gt=e=>e===Pt.RU?0:1,ll=[{title:"Тематические направления выставки",bottom_text:` +`+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Es(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&fo.assertOptions(s,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean)},!1),r!=null&&(j.isFunction(r)?n.paramsSerializer={serialize:r}:fo.assertOptions(r,{encode:Kt.function,serialize:Kt.function},!0)),fo.assertOptions(n,{baseUrl:Kt.spelling("baseURL"),withXsrfToken:Kt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&j.merge(i.common,i[n.method]);i&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=ft.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!c){const m=[gh.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),h=m.length,u=Promise.resolve(n);d{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Cr(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Au(function(r){t=r}),cancel:t}}}function LN(e){return function(n){return e.apply(null,n)}}function FN(e){return j.isObject(e)&&e.isAxiosError===!0}const Vc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vc).forEach(([e,t])=>{Vc[t]=e});function fv(e){const t=new vs(e),n=zy(vs.prototype.request,t);return j.extend(n,vs.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return fv(Es(e,r))},n}const Ve=fv(Di);Ve.Axios=vs;Ve.CanceledError=Cr;Ve.CancelToken=Au;Ve.isCancel=rv;Ve.VERSION=dv;Ve.toFormData=fa;Ve.AxiosError=ie;Ve.Cancel=Ve.CanceledError;Ve.all=function(t){return Promise.all(t)};Ve.spread=LN;Ve.isAxiosError=FN;Ve.mergeConfig=Es;Ve.AxiosHeaders=ft;Ve.formToJSON=e=>sv(j.isHTMLForm(e)?new FormData(e):e);Ve.getAdapter=uv.getAdapter;Ve.HttpStatusCode=Vc;Ve.default=Ve;const et=Ve.create({baseURL:"https://turkmentextile.turkmenexpo.com/app/api/v1/"}),Mk=async e=>(await et.post("book_stand_form",e)).status===201,Dk=async e=>(await et.post("become_sponsor_form",e)).status===201,Ik=async e=>(await et.post("contact_form",e)).status===201,VN=async e=>(await et.post("subscribe_news_form",e)).status===201,BN=async(e,t)=>et.get(`pages/${t}`,{headers:{"Accept-Language":e}}),$N=async e=>et.get("stats",{headers:{"Accept-Language":e}}),UN=async e=>et.get("contact_data",{headers:{"Accept-Language":e}}),zN=async e=>et.get("industries",{headers:{"Accept-Language":e}}),WN=async e=>et.get("exhibition_time",{headers:{"Accept-Language":e}}),HN=async e=>et.get("news?per_page=100",{headers:{"Accept-Language":e}}),Lk=async(e,t)=>et.get(`news/${e}`,{headers:{"Accept-Language":t}}),Fk=async e=>et("participants",{headers:{"Accept-Language":e}}),qN=async e=>et("photos/category/"+e),ZN=async e=>et("videos/category/"+e),KN=async e=>et("sponsors_and_partners",{headers:{"Accept-Language":e}}),Vk=async(e,t)=>et("designers/category/"+t,{headers:{"Accept-Language":e}}),GN=sh.object({email:sh.string().email()}),hv=({modal:e=!1})=>{var i,o;const[t,n]=g.useState(!1),s=pT({resolver:tR(GN),defaultValues:{email:""}});async function r(a){try{const c=await VN(a);s.reset(),n(c)}catch(c){console.error("POST subscribe",c)}}return f.jsx("form",{onSubmit:s.handleSubmit(r),className:V("py-8",e?"max-w-[392px] mx-auto":"bg-surface_container"),children:f.jsxs(qe,{className:V("flex gap-8 justify-between",e?"flex-col w-full":"lg:flex-row flex-col lg:items-center"),children:[f.jsx("h2",{className:"h2 !text-left",children:Za("Подпишитесь на новости:","Subscribe to the news:")}),f.jsxs("div",{className:"relative",children:[f.jsx("input",{...s.register("email"),placeholder:"Email",className:V("input",{"w-full":e,"xl:w-[392px] lg:w-[320px] w-full":!e})}),f.jsx("span",{className:"text-error absolute text-red-600 -bottom-6 text-sm left-0",children:(o=(i=s.formState.errors)==null?void 0:i.email)==null?void 0:o.message})]}),f.jsx(ot,{loading:s.formState.isSubmitting,disabled:t,className:V({"xl:w-[288px] lg:w-[220px] w-full":!e,"w-full":e}),children:t?Za("Отправлено","Submitted"):Za("Подписаться","Subscribe")})]})})},QN=({className:e,title:t})=>f.jsxs(Py,{children:[f.jsx(Ny,{className:V("h-14 px-3 flex gap-3 items-center hover:bg-slate-300/50 transition-all",e),children:t}),f.jsx(Su,{children:f.jsx(hv,{className:"",modal:!0})})]}),Vo=Ry()(e=>({sheet:!1,popover:!1,modal:!1,setModal:t=>e({modal:t}),setSheet:t=>e({sheet:t}),setPopover:t=>e({popover:t})})),Bo=({title:e,dropDownContent:t,color:n,triggerClassName:s,children:r})=>{const[i,o]=g.useState(!1),a=Vo(c=>c.setSheet);return f.jsxs(Ty,{open:i,onOpenChange:()=>o(!i),children:[f.jsxs(Ay,{className:V("flex items-center gap-2",s),children:[e,r,!r&&f.jsx(pv,{color:n,className:V("transition-all",i&&"rotate-180")})]}),f.jsx(wu,{className:"w-fit relative z-[200] px-0 bg-surface_container",children:t&&t.map((c,l)=>c.hover?f.jsx(ak,{setIsOpen:o,...c},l):c.link?f.jsxs(Ce,{to:c.link??"",onClick:()=>{o(!1),a(!1)},className:"h-14 px-3 flex gap-3 relative justify-between cursor-pointer items-center hover:bg-slate-300/50 transition-all",target:c.blank?"_blank":void 0,rel:c.blank?"noopener noreferrer":void 0,children:[c.text,c.blank&&f.jsx("img",{src:"/pdf.svg"})]},l):c.modal?f.jsx(QN,{title:c.text},c.text):f.jsx("div",{className:"relative",children:f.jsx("div",{className:"h-14 px-3 py-2 flex items-center cursor-pointer hover:bg-slate-300/50 transition-all",onClick:()=>{o(!1),a(!1)},children:c.text})},l))})]})},pv=({color:e="white",w:t="20",h:n="20",className:s})=>f.jsx("div",{className:s,children:f.jsx("svg",{width:t,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.23021 8.01443C4.35919 7.70304 4.66305 7.5 5.00011 7.5H15.0001C15.3372 7.5 15.641 7.70304 15.77 8.01443C15.899 8.32583 15.8277 8.68426 15.5894 8.92259L10.5894 13.9226C10.2639 14.248 9.73629 14.248 9.41085 13.9226L4.41085 8.92259C4.17252 8.68426 4.10122 8.32583 4.23021 8.01443ZM7.01195 9.16667L10.0001 12.1548L12.9883 9.16667H7.01195Z",fill:e})})}),Yn=({className:e})=>f.jsx(qe,{className:V("w-full py-20 h-full flex items-center justify-between",e),children:f.jsx(kp,{className:"animate-spin mx-auto text-primary size-16"})});function XN(e){return Object.prototype.toString.call(e)==="[object Object]"}function vh(e){return XN(e)||Array.isArray(e)}function YN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ru(e,t){const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==i?!1:n.every(o=>{const a=e[o],c=t[o];return typeof a=="function"?`${a}`==`${c}`:!vh(a)||!vh(c)?a===c:Ru(a,c)})}function xh(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function JN(e,t){if(e.length!==t.length)return!1;const n=xh(e),s=xh(t);return n.every((r,i)=>{const o=s[i];return Ru(r,o)})}function Pu(e){return typeof e=="number"}function Bc(e){return typeof e=="string"}function ma(e){return typeof e=="boolean"}function bh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pe(e){return Math.abs(e)}function Nu(e){return Math.sign(e)}function Kr(e,t){return Pe(e-t)}function e1(e,t){if(e===0||t===0||Pe(e)<=Pe(t))return 0;const n=Kr(Pe(e),Pe(t));return Pe(n/e)}function t1(e){return Math.round(e*100)/100}function yi(e){return vi(e).map(Number)}function Vt(e){return e[Ii(e)]}function Ii(e){return Math.max(0,e.length-1)}function ju(e,t){return t===Ii(e)}function wh(e,t=0){return Array.from(Array(e),(n,s)=>t+s)}function vi(e){return Object.keys(e)}function mv(e,t){return[e,t].reduce((n,s)=>(vi(s).forEach(r=>{const i=n[r],o=s[r],a=bh(i)&&bh(o);n[r]=a?mv(i,o):o}),n),{})}function $c(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function n1(e,t){const n={start:s,center:r,end:i};function s(){return 0}function r(c){return i(c)/2}function i(c){return t-c}function o(c,l){return Bc(e)?n[e](c):e(t,c,l)}return{measure:o}}function xi(){let e=[];function t(r,i,o,a={passive:!0}){let c;if("addEventListener"in r)r.addEventListener(i,o,a),c=()=>r.removeEventListener(i,o,a);else{const l=r;l.addListener(o),c=()=>l.removeListener(o)}return e.push(c),s}function n(){e=e.filter(r=>r())}const s={add:t,clear:n};return s}function s1(e,t,n,s){const r=xi(),i=1e3/60;let o=null,a=0,c=0;function l(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function u(){y(),r.clear()}function d(v){if(!c)return;o||(o=v,n(),n());const x=v-o;for(o=v,a+=x;a>=i;)n(),a-=i;const b=a/i;s(b),c&&(c=t.requestAnimationFrame(d))}function h(){c||(c=t.requestAnimationFrame(d))}function y(){t.cancelAnimationFrame(c),o=null,a=0,c=0}function m(){o=null,a=0}return{init:l,destroy:u,start:h,stop:y,update:n,render:s}}function r1(e,t){const n=t==="rtl",s=e==="y",r=s?"y":"x",i=s?"x":"y",o=!s&&n?-1:1,a=u(),c=d();function l(m){const{height:p,width:v}=m;return s?p:v}function u(){return s?"top":n?"right":"left"}function d(){return s?"bottom":n?"left":"right"}function h(m){return m*o}return{scroll:r,cross:i,startEdge:a,endEdge:c,measureSize:l,direction:h}}function Ts(e=0,t=0){const n=Pe(e-t);function s(l){return lt}function i(l){return s(l)||r(l)}function o(l){return i(l)?s(l)?e:t:l}function a(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:i,reachedMax:r,reachedMin:s,removeOffset:a}}function gv(e,t,n){const{constrain:s}=Ts(0,e),r=e+1;let i=o(t);function o(h){return n?Pe((r+h)%r):s(h)}function a(){return i}function c(h){return i=o(h),d}function l(h){return u().set(a()+h)}function u(){return gv(e,a(),n)}const d={get:a,set:c,add:l,clone:u};return d}function i1(e,t,n,s,r,i,o,a,c,l,u,d,h,y,m,p,v,x,b){const{cross:w,direction:_}=e,S=["INPUT","SELECT","TEXTAREA"],A={passive:!1},E=xi(),R=xi(),N=Ts(50,225).constrain(y.measure(20)),M={mouse:300,touch:400},I={mouse:500,touch:600},O=m?43:25;let z=!1,F=0,J=0,X=!1,q=!1,Z=!1,re=!1;function fe(G){if(!b)return;function he(Ue){(ma(b)||b(G,Ue))&&tt(Ue)}const Se=t;E.add(Se,"dragstart",Ue=>Ue.preventDefault(),A).add(Se,"touchmove",()=>{},A).add(Se,"touchend",()=>{}).add(Se,"touchstart",he).add(Se,"mousedown",he).add(Se,"touchcancel",ve).add(Se,"contextmenu",ve).add(Se,"click",ke,!0)}function ye(){E.clear(),R.clear()}function Be(){const G=re?n:t;R.add(G,"touchmove",ue,A).add(G,"touchend",ve).add(G,"mousemove",ue,A).add(G,"mouseup",ve)}function Ze(G){const he=G.nodeName||"";return S.includes(he)}function Ke(){return(m?I:M)[re?"mouse":"touch"]}function jt(G,he){const Se=d.add(Nu(G)*-1),Ue=u.byDistance(G,!m).distance;return m||Pe(G)=2,!(he&&G.button!==0)&&(Ze(G.target)||(X=!0,i.pointerDown(G),l.useFriction(0).useDuration(0),r.set(o),Be(),F=i.readPoint(G),J=i.readPoint(G,w),h.emit("pointerDown")))}function ue(G){if(!$c(G,s)&&G.touches.length>=2)return ve(G);const Se=i.readPoint(G),Ue=i.readPoint(G,w),pt=Kr(Se,F),_t=Kr(Ue,J);if(!q&&!re&&(!G.cancelable||(q=pt>_t,!q)))return ve(G);const C=i.pointerMove(G);pt>p&&(Z=!0),l.useFriction(.3).useDuration(.75),a.start(),r.add(_(C)),G.preventDefault()}function ve(G){const Se=u.byDistance(0,!1).index!==d.get(),Ue=i.pointerUp(G)*Ke(),pt=jt(_(Ue),Se),_t=e1(Ue,pt),C=O-10*_t,P=x+_t/50;q=!1,X=!1,R.clear(),l.useDuration(C).useFriction(P),c.distance(pt,!m),re=!1,h.emit("pointerUp")}function ke(G){Z&&(G.stopPropagation(),G.preventDefault(),Z=!1)}function Le(){return X}return{init:fe,destroy:ye,pointerDown:Le}}function o1(e,t){let s,r;function i(d){return d.timeStamp}function o(d,h){const m=`client${(h||e.scroll)==="x"?"X":"Y"}`;return($c(d,t)?d:d.touches[0])[m]}function a(d){return s=d,r=d,o(d)}function c(d){const h=o(d)-o(r),y=i(d)-i(s)>170;return r=d,y&&(s=d),h}function l(d){if(!s||!r)return 0;const h=o(r)-o(s),y=i(d)-i(s),m=i(d)-i(r)>170,p=h/y;return y&&!m&&Pe(p)>.1?p:0}return{pointerDown:a,pointerMove:c,pointerUp:l,readPoint:o}}function a1(){function e(n){const{offsetTop:s,offsetLeft:r,offsetWidth:i,offsetHeight:o}=n;return{top:s,right:r+i,bottom:s+o,left:r,width:i,height:o}}return{measure:e}}function c1(e){function t(s){return e*(s/100)}return{measure:t}}function l1(e,t,n,s,r,i,o){const a=[e].concat(s);let c,l,u=[],d=!1;function h(v){return r.measureSize(o.measure(v))}function y(v){if(!i)return;l=h(e),u=s.map(h);function x(b){for(const w of b){if(d)return;const _=w.target===e,S=s.indexOf(w.target),A=_?l:u[S],E=h(_?e:s[S]);if(Pe(E-A)>=.5){v.reInit(),t.emit("resize");break}}}c=new ResizeObserver(b=>{(ma(i)||i(v,b))&&x(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>c.observe(b))})}function m(){d=!0,c&&c.disconnect()}return{init:y,destroy:m}}function u1(e,t,n,s,r,i){let o=0,a=0,c=r,l=i,u=e.get(),d=0;function h(){const A=s.get()-e.get(),E=!c;let R=0;return E?(o=0,n.set(s),e.set(s),R=A):(n.set(e),o+=A/c,o*=l,u+=o,e.add(o),R=u-d),a=Nu(R),d=u,S}function y(){const A=s.get()-t.get();return Pe(A)<.001}function m(){return c}function p(){return a}function v(){return o}function x(){return w(r)}function b(){return _(i)}function w(A){return c=A,S}function _(A){return l=A,S}const S={direction:p,duration:m,velocity:v,seek:h,settled:y,useBaseFriction:b,useBaseDuration:x,useFriction:_,useDuration:w};return S}function d1(e,t,n,s,r){const i=r.measure(10),o=r.measure(50),a=Ts(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(y){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",p=Pe(e[m]-t.get()),v=n.get()-t.get(),x=a.constrain(p/o);n.subtract(v*x),!y&&Pe(v){const{min:v,max:x}=i,b=i.constrain(m),w=!p,_=ju(n,p);return w?x:_||l(v,b)?v:l(x,b)?x:b}).map(m=>parseFloat(m.toFixed(3)))}function h(){if(t<=e+r)return[i.max];if(s==="keepSnaps")return o;const{min:m,max:p}=a;return o.slice(m,p)}return{snapsContained:c,scrollContainLimit:a}}function h1(e,t,n){const s=t[0],r=n?s-e:Vt(t);return{limit:Ts(r,s)}}function p1(e,t,n,s){const i=t.min+.1,o=t.max+.1,{reachedMin:a,reachedMax:c}=Ts(i,o);function l(h){return h===1?c(n.get()):h===-1?a(n.get()):!1}function u(h){if(!l(h))return;const y=e*(h*-1);s.forEach(m=>m.add(y))}return{loop:u}}function m1(e){const{max:t,length:n}=e;function s(i){const o=i-t;return n?o/-n:0}return{get:s}}function g1(e,t,n,s,r){const{startEdge:i,endEdge:o}=e,{groupSlides:a}=r,c=d().map(t.measure),l=h(),u=y();function d(){return a(s).map(p=>Vt(p)[o]-p[0][i]).map(Pe)}function h(){return s.map(p=>n[i]-p[i]).map(p=>-Pe(p))}function y(){return a(l).map(p=>p[0]).map((p,v)=>p+c[v])}return{snaps:l,snapsAligned:u}}function y1(e,t,n,s,r,i){const{groupSlides:o}=r,{min:a,max:c}=s,l=u();function u(){const h=o(i),y=!e||t==="keepSnaps";return n.length===1?[i]:y?h:h.slice(a,c).map((m,p,v)=>{const x=!p,b=ju(v,p);if(x){const w=Vt(v[0])+1;return wh(w)}if(b){const w=Ii(i)-Vt(v)[0]+1;return wh(w,Vt(v)[0])}return m})}return{slideRegistry:l}}function v1(e,t,n,s,r){const{reachedAny:i,removeOffset:o,constrain:a}=s;function c(m){return m.concat().sort((p,v)=>Pe(p)-Pe(v))[0]}function l(m){const p=e?o(m):a(m),v=t.map((b,w)=>({diff:u(b-p,0),index:w})).sort((b,w)=>Pe(b.diff)-Pe(w.diff)),{index:x}=v[0];return{index:x,distance:p}}function u(m,p){const v=[m,m+n,m-n];if(!e)return m;if(!p)return c(v);const x=v.filter(b=>Nu(b)===p);return x.length?c(x):Vt(v)-n}function d(m,p){const v=t[m]-r.get(),x=u(v,p);return{index:m,distance:x}}function h(m,p){const v=r.get()+m,{index:x,distance:b}=l(v),w=!e&&i(v);if(!p||w)return{index:x,distance:m};const _=t[x]-b,S=m+u(_,0);return{index:x,distance:S}}return{byDistance:h,byIndex:d,shortcut:u}}function x1(e,t,n,s,r,i,o){function a(d){const h=d.distance,y=d.index!==t.get();i.add(h),h&&(s.duration()?e.start():(e.update(),e.render(1),e.update())),y&&(n.set(t.get()),t.set(d.index),o.emit("select"))}function c(d,h){const y=r.byDistance(d,h);a(y)}function l(d,h){const y=t.clone().set(d),m=r.byIndex(y.get(),h);a(m)}return{distance:c,index:l}}function b1(e,t,n,s,r,i,o,a){const c={passive:!0,capture:!0};let l=0;function u(y){if(!a)return;function m(p){if(new Date().getTime()-l>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(w=>w.includes(p));Pu(b)&&(r.useDuration(0),s.index(b,0),o.emit("slideFocus"))}i.add(document,"keydown",d,!1),t.forEach((p,v)=>{i.add(p,"focus",x=>{(ma(a)||a(y,x))&&m(v)},c)})}function d(y){y.code==="Tab"&&(l=new Date().getTime())}return{init:u}}function Vr(e){let t=e;function n(){return t}function s(c){t=o(c)}function r(c){t+=o(c)}function i(c){t-=o(c)}function o(c){return Pu(c)?c:c.get()}return{get:n,set:s,add:r,subtract:i}}function yv(e,t){const n=e.scroll==="x"?o:a,s=t.style;let r=null,i=!1;function o(h){return`translate3d(${h}px,0px,0px)`}function a(h){return`translate3d(0px,${h}px,0px)`}function c(h){if(i)return;const y=t1(e.direction(h));y!==r&&(s.transform=n(y),r=y)}function l(h){i=!h}function u(){i||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function w1(e,t,n,s,r,i,o,a,c){const u=yi(r),d=yi(r).reverse(),h=x().concat(b());function y(E,R){return E.reduce((N,M)=>N-r[M],R)}function m(E,R){return E.reduce((N,M)=>y(N,R)>0?N.concat([M]):N,[])}function p(E){return i.map((R,N)=>({start:R-s[N]+.5+E,end:R+t-.5+E}))}function v(E,R,N){const M=p(R);return E.map(I=>{const O=N?0:-n,z=N?n:0,F=N?"end":"start",J=M[I][F];return{index:I,loopPoint:J,slideLocation:Vr(-1),translate:yv(e,c[I]),target:()=>a.get()>J?O:z}})}function x(){const E=o[0],R=m(d,E);return v(R,n,!1)}function b(){const E=t-o[0]-1,R=m(u,E);return v(R,-n,!0)}function w(){return h.every(({index:E})=>{const R=u.filter(N=>N!==E);return y(R,t)<=.1})}function _(){h.forEach(E=>{const{target:R,translate:N,slideLocation:M}=E,I=R();I!==M.get()&&(N.to(I),M.set(I))})}function S(){h.forEach(E=>E.translate.clear())}return{canLoop:w,clear:S,loop:_,loopPoints:h}}function S1(e,t,n){let s,r=!1;function i(c){if(!n)return;function l(u){for(const d of u)if(d.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(u=>{r||(ma(n)||n(c,u))&&l(u)}),s.observe(e,{childList:!0})}function o(){s&&s.disconnect(),r=!0}return{init:i,destroy:o}}function _1(e,t,n,s){const r={};let i=null,o=null,a,c=!1;function l(){a=new IntersectionObserver(m=>{c||(m.forEach(p=>{const v=t.indexOf(p.target);r[v]=p}),i=null,o=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:s}),t.forEach(m=>a.observe(m))}function u(){a&&a.disconnect(),c=!0}function d(m){return vi(r).reduce((p,v)=>{const x=parseInt(v),{isIntersecting:b}=r[x];return(m&&b||!m&&!b)&&p.push(x),p},[])}function h(m=!0){if(m&&i)return i;if(!m&&o)return o;const p=d(m);return m&&(i=p),m||(o=p),p}return{init:l,destroy:u,get:h}}function C1(e,t,n,s,r,i){const{measureSize:o,startEdge:a,endEdge:c}=e,l=n[0]&&r,u=m(),d=p(),h=n.map(o),y=v();function m(){if(!l)return 0;const b=n[0];return Pe(t[a]-b[a])}function p(){if(!l)return 0;const b=i.getComputedStyle(Vt(s));return parseFloat(b.getPropertyValue(`margin-${c}`))}function v(){return n.map((b,w,_)=>{const S=!w,A=ju(_,w);return S?h[w]+u:A?h[w]+d:_[w+1][a]-b[a]}).map(Pe)}return{slideSizes:h,slideSizesWithGaps:y,startGap:u,endGap:d}}function E1(e,t,n,s,r,i,o,a,c){const{startEdge:l,endEdge:u,direction:d}=e,h=Pu(n);function y(x,b){return yi(x).filter(w=>w%b===0).map(w=>x.slice(w,w+b))}function m(x){return x.length?yi(x).reduce((b,w,_)=>{const S=Vt(b)||0,A=S===0,E=w===Ii(x),R=r[l]-i[S][l],N=r[l]-i[w][u],M=!s&&A?d(o):0,I=!s&&E?d(a):0,O=Pe(N-I-(R+M));return _&&O>t+c&&b.push(w),E&&b.push(x.length),b},[]).map((b,w,_)=>{const S=Math.max(_[w-1]||0);return x.slice(S,b)}):[]}function p(x){return h?y(x,n):m(x)}return{groupSlides:p}}function T1(e,t,n,s,r,i,o){const{align:a,axis:c,direction:l,startIndex:u,loop:d,duration:h,dragFree:y,dragThreshold:m,inViewThreshold:p,slidesToScroll:v,skipSnaps:x,containScroll:b,watchResize:w,watchSlides:_,watchDrag:S,watchFocus:A}=i,E=2,R=a1(),N=R.measure(t),M=n.map(R.measure),I=r1(c,l),O=I.measureSize(N),z=c1(O),F=n1(a,O),J=!d&&!!b,X=d||!!b,{slideSizes:q,slideSizesWithGaps:Z,startGap:re,endGap:fe}=C1(I,N,M,n,X,r),ye=E1(I,O,v,d,N,M,re,fe,E),{snaps:Be,snapsAligned:Ze}=g1(I,F,N,M,ye),Ke=-Vt(Be)+Vt(Z),{snapsContained:jt,scrollContainLimit:tt}=f1(O,Ke,Ze,b,E),ue=J?jt:Ze,{limit:ve}=h1(Ke,ue,d),ke=gv(Ii(ue),u,d),Le=ke.clone(),we=yi(n),G=({dragHandler:Zt,scrollBody:Jn,scrollBounds:Tr,options:{loop:es}})=>{es||Tr.constrain(Zt.pointerDown()),Jn.seek()},he=({scrollBody:Zt,translate:Jn,location:Tr,offsetLocation:es,previousLocation:ya,scrollLooper:Vi,slideLooper:gx,dragHandler:yx,animation:vx,eventHandler:zu,scrollBounds:xx,options:{loop:Wu}},Hu)=>{const qu=Zt.settled(),bx=!xx.shouldConstrain(),Zu=Wu?qu:qu&&bx;Zu&&!yx.pointerDown()&&(vx.stop(),zu.emit("settle")),Zu||zu.emit("scroll");const wx=Tr.get()*Hu+ya.get()*(1-Hu);es.set(wx),Wu&&(Vi.loop(Zt.direction()),gx.loop()),Jn.to(es.get())},Se=s1(s,r,()=>G(Er),Zt=>he(Er,Zt)),Ue=.68,pt=ue[ke.get()],_t=Vr(pt),C=Vr(pt),P=Vr(pt),k=Vr(pt),U=u1(_t,P,C,k,h,Ue),B=v1(d,ue,Ke,ve,k),L=x1(Se,ke,Le,U,B,k,o),Y=m1(ve),ae=xi(),Fe=_1(t,n,o,p),{slideRegistry:Oe}=y1(J,b,ue,tt,ye,we),qt=b1(e,n,Oe,L,U,ae,o,A),Er={ownerDocument:s,ownerWindow:r,eventHandler:o,containerRect:N,slideRects:M,animation:Se,axis:I,dragHandler:i1(I,e,s,r,k,o1(I,r),_t,Se,L,U,B,ke,o,z,y,m,x,Ue,S),eventStore:ae,percentOfView:z,index:ke,indexPrevious:Le,limit:ve,location:_t,offsetLocation:P,previousLocation:C,options:i,resizeHandler:l1(t,o,r,n,I,w,R),scrollBody:U,scrollBounds:d1(ve,P,k,U,z),scrollLooper:p1(Ke,ve,P,[_t,P,C,k]),scrollProgress:Y,scrollSnapList:ue.map(Y.get),scrollSnaps:ue,scrollTarget:B,scrollTo:L,slideLooper:w1(I,O,Ke,q,Z,Be,ue,P,n),slideFocus:qt,slidesHandler:S1(t,o,_),slidesInView:Fe,slideIndexes:we,slideRegistry:Oe,slidesToScroll:ye,target:k,translate:yv(I,t)};return Er}function A1(){let e={},t;function n(l){t=l}function s(l){return e[l]||[]}function r(l){return s(l).forEach(u=>u(t,l)),c}function i(l,u){return e[l]=s(l).concat([u]),c}function o(l,u){return e[l]=s(l).filter(d=>d!==u),c}function a(){e={}}const c={init:n,emit:r,off:o,on:i,clear:a};return c}const R1={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function P1(e){function t(i,o){return mv(i,o||{})}function n(i){const o=i.breakpoints||{},a=vi(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,l)=>t(c,l),{});return t(i,a)}function s(i){return i.map(o=>vi(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:s}}function N1(e){let t=[];function n(i,o){return t=o.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(i,e)),o.reduce((a,c)=>Object.assign(a,{[c.name]:c}),{})}function s(){t=t.filter(i=>i.destroy())}return{init:n,destroy:s}}function $o(e,t,n){const s=e.ownerDocument,r=s.defaultView,i=P1(r),o=N1(i),a=xi(),c=A1(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=i,{on:h,off:y,emit:m}=c,p=I;let v=!1,x,b=l(R1,$o.globalOptions),w=l(b),_=[],S,A,E;function R(){const{container:we,slides:G}=w;A=(Bc(we)?e.querySelector(we):we)||e.children[0];const Se=Bc(G)?A.querySelectorAll(G):G;E=[].slice.call(Se||A.children)}function N(we){const G=T1(e,A,E,s,r,we,c);if(we.loop&&!G.slideLooper.canLoop()){const he=Object.assign({},we,{loop:!1});return N(he)}return G}function M(we,G){v||(b=l(b,we),w=u(b),_=G||_,R(),x=N(w),d([b,..._.map(({options:he})=>he)]).forEach(he=>a.add(he,"change",I)),w.active&&(x.translate.to(x.location.get()),x.animation.init(),x.slidesInView.init(),x.slideFocus.init(Le),x.eventHandler.init(Le),x.resizeHandler.init(Le),x.slidesHandler.init(Le),x.options.loop&&x.slideLooper.loop(),A.offsetParent&&E.length&&x.dragHandler.init(Le),S=o.init(Le,_)))}function I(we,G){const he=ye();O(),M(l({startIndex:he},we),G),c.emit("reInit")}function O(){x.dragHandler.destroy(),x.eventStore.clear(),x.translate.clear(),x.slideLooper.clear(),x.resizeHandler.destroy(),x.slidesHandler.destroy(),x.slidesInView.destroy(),x.animation.destroy(),o.destroy(),a.clear()}function z(){v||(v=!0,a.clear(),O(),c.emit("destroy"),c.clear())}function F(we,G,he){!w.active||v||(x.scrollBody.useBaseFriction().useDuration(G===!0?0:w.duration),x.scrollTo.index(we,he||0))}function J(we){const G=x.index.add(1).get();F(G,we,-1)}function X(we){const G=x.index.add(-1).get();F(G,we,1)}function q(){return x.index.add(1).get()!==ye()}function Z(){return x.index.add(-1).get()!==ye()}function re(){return x.scrollSnapList}function fe(){return x.scrollProgress.get(x.location.get())}function ye(){return x.index.get()}function Be(){return x.indexPrevious.get()}function Ze(){return x.slidesInView.get()}function Ke(){return x.slidesInView.get(!1)}function jt(){return S}function tt(){return x}function ue(){return e}function ve(){return A}function ke(){return E}const Le={canScrollNext:q,canScrollPrev:Z,containerNode:ve,internalEngine:tt,destroy:z,off:y,on:h,emit:m,plugins:jt,previousScrollSnap:Be,reInit:p,rootNode:ue,scrollNext:J,scrollPrev:X,scrollProgress:fe,scrollSnapList:re,scrollTo:F,selectedScrollSnap:ye,slideNodes:ke,slidesInView:Ze,slidesNotInView:Ke};return M(t,n),setTimeout(()=>c.emit("init"),0),Le}$o.globalOptions=void 0;function En(e={},t=[]){const n=g.useRef(e),s=g.useRef(t),[r,i]=g.useState(),[o,a]=g.useState(),c=g.useCallback(()=>{r&&r.reInit(n.current,s.current)},[r]);return g.useEffect(()=>{Ru(n.current,e)||(n.current=e,c())},[e,c]),g.useEffect(()=>{JN(s.current,t)||(s.current=t,c())},[t,c]),g.useEffect(()=>{if(YN()&&o){$o.globalOptions=En.globalOptions;const l=$o(o,n.current,s.current);return i(l),()=>l.destroy()}else i(void 0)},[o,i]),[a,r]}En.globalOptions=void 0;const j1=[{id:0,title:"Все компании",titleEn:"All companies"},{id:3,title:"Государственные учреждения ",titleEn:"Government Institutions"},{id:1,title:"Местные компании",titleEn:"Local companies"},{id:2,title:"Иностранные компании",titleEn:"Foreign companies"}],Bk=({className:e,setState:t,state:n,data:s=j1})=>{const r=Te(m=>m.lang),i=wo("(min-width: 768px)"),[o,a]=g.useState({left:0,width:0}),[c,l]=En({axis:"x",align:"start",containScroll:"trimSnaps"},[]),u=g.useRef([]),d=g.useRef(null),h=g.useCallback(()=>{const m=u.current[n];if(m){if(i)a({left:m.offsetLeft,width:m.offsetWidth});else if(l){const p=l.rootNode(),v=l.containerNode();if(!p||!v)return;const x=v.scrollLeft,b=m.offsetLeft;a({left:b-x,width:m.offsetWidth})}}},[n,i,l]);g.useEffect(()=>{!i&&l||(l==null||l.scrollTo(n),h())},[l,n,h,i]),g.useEffect(()=>{if(l)return h(),l.on("scroll",h),l.on("resize",h),()=>{l.off("scroll",h),l.off("resize",h)}},[l,h]);const y=g.useCallback(m=>{t(m),!i&&l&&l.scrollTo(m)},[l,t,i]);return f.jsxs("div",{ref:d,className:V("relative mx-auto",e),style:{width:"fit-content",maxWidth:"100%"},children:[i?f.jsx("div",{className:"flex",role:"tablist",children:s==null?void 0:s.map((m,p)=>f.jsx("button",{ref:v=>u.current[p]=v,role:"tab","aria-selected":n===p,className:V("shrink-0 text-center relative h-12 mx-4 py-2 text-sm md:text-base whitespace-nowrap transition-all",n===p?"text-primary":"text-on_surface_v"),onClick:()=>y(p),children:r==="ru"?m.title:m.titleEn},m.id))}):f.jsx("div",{ref:c,className:"",role:"tablist",children:f.jsx("div",{className:"flex",children:s==null?void 0:s.map((m,p)=>f.jsx("button",{ref:v=>u.current[p]=v,role:"tab","aria-selected":n===p,className:V("shrink-0 text-center relative after:transition-all after:rounded after:w-full after:h-0.5 after:bg-primary after:opacity-0 after:absolute after:bottom-0 after:left-0 h-12 mx-4 py-2 text-sm md:text-base whitespace-nowrap transition-all",n===p?"text-primary after:opacity-100":"text-on_surface_v"),onClick:()=>y(p),children:r==="ru"?m.title:m.titleEn},m.id))})}),f.jsx("div",{className:"absolute md:block hidden bottom-0 h-[3px] rounded-t-[2px] bg-primary transition-all duration-200",style:o})]})},$k=({className:e,index:t,name:n,image:s,image_country:r,country:i,about:o,arr:a})=>{const c=Te(l=>l.lang);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:V("flex border-b md:hidden py-2 border-outline_v",e),children:[f.jsxs("div",{className:"flex flex-1 flex-col items-start gap-4",children:[f.jsx("div",{className:"flex items-center w-full",children:f.jsxs("div",{className:"flex items-center flex-[0_0_80%] gap-3",children:[f.jsxs("h3",{className:"text-xs normal flex-[0_0_90px]",children:[c==="ru"?"Название":"Company",":"]}),f.jsx("h4",{className:"text-xs flex-[0_0_70%]",children:n})]})}),f.jsx("div",{className:"flex items-center gap-3",children:f.jsx("div",{className:"flex items-center w-full",children:f.jsxs("div",{className:"flex items-center flex-[0_0_80%] gap-3",children:[f.jsxs("h3",{className:"text-xs normal flex-[0_0_90px]",children:[c==="ru"?"Страна":"Country",":"]}),f.jsxs("div",{className:"flex items-center flex-[0_0_50%] gap-2",children:[f.jsx("img",{src:r==null?void 0:r.path,alt:"flag",className:"size-4 flex-[0_0_16px] object-contain"}),f.jsx("h4",{className:"text-xs flex-1",children:i})]})]})})}),f.jsx("div",{className:"flex items-center ",children:f.jsxs("div",{className:"flex items-center flex-[0_0_80%] gap-3",children:[f.jsxs("h3",{className:"text-xs normal flex-[0_0_90px]",children:[c==="ru"?"Сфера":"Industry",":"]}),f.jsx("h4",{className:"text-xs flex-1",children:o})]})})]}),f.jsx("div",{className:"flex-[0_0_88px] size-[88px] bg-white ",children:f.jsx("img",{src:s==null?void 0:s.path,alt:"company",className:"size-full object-contain"})})]},t),f.jsxs("div",{className:V("md:flex hidden p-4 ",a!==t+1&&"border-b border-outline_v"),children:[f.jsxs("div",{className:"flex-[0_0_45.54%] flex gap-8",children:[f.jsx("div",{className:"flex-[0_0_88px] sm:flex-[0_0_128px] size-[88px] bg-white sm:size-[128px]",children:f.jsx("img",{src:s==null?void 0:s.path,alt:"company",className:"size-full object-contain"})}),f.jsx("h3",{className:"text-lg xl:mr-20 mr-10",children:n})]}),f.jsxs("div",{className:"flex-[0_0_19.80%] flex gap-2.5",children:[f.jsx("img",{src:r==null?void 0:r.path,alt:"flag",className:"size-4"}),f.jsx("h4",{className:"text-sm normal",children:i})]}),f.jsx("h3",{className:"text-sm normal md:ml-1 flex-[0_0_34.65%]",children:o})]})]})};var Li=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},As=typeof window>"u"||"Deno"in globalThis;function At(){}function k1(e,t){return typeof e=="function"?e(t):e}function Uc(e){return typeof e=="number"&&e>=0&&e!==1/0}function vv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qs(e,t){return typeof e=="function"?e(t):e}function Dt(e,t){return typeof e=="function"?e(t):e}function Sh(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:i,queryKey:o,stale:a}=e;if(o){if(s){if(t.queryHash!==ku(o,t.options))return!1}else if(!wi(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||r&&r!==t.state.fetchStatus||i&&!i(t))}function _h(e,t){const{exact:n,status:s,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(bi(t.options.mutationKey)!==bi(i))return!1}else if(!wi(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function ku(e,t){return((t==null?void 0:t.queryKeyHashFn)||bi)(e)}function bi(e){return JSON.stringify(e,(t,n)=>Wc(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function wi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!wi(e[n],t[n])):!1}function xv(e,t){if(e===t)return e;const n=Ch(e)&&Ch(t);if(n||Wc(e)&&Wc(t)){const s=n?e:Object.keys(e),r=s.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let c=0;for(let l=0;l{setTimeout(t,e)})}function Hc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xv(e,t):t}function M1(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function D1(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Ou=Symbol();function bv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ou?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var as,On,Zs,Fh,I1=(Fh=class extends Li{constructor(){super();ne(this,as);ne(this,On);ne(this,Zs);K(this,Zs,t=>{if(!As&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,On)||this.setEventListener(T(this,Zs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,On))==null||t.call(this),K(this,On,void 0))}setEventListener(t){var n;K(this,Zs,t),(n=T(this,On))==null||n.call(this),K(this,On,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){T(this,as)!==t&&(K(this,as,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,as)=="boolean"?T(this,as):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},as=new WeakMap,On=new WeakMap,Zs=new WeakMap,Fh),Mu=new I1,Ks,Mn,Gs,Vh,L1=(Vh=class extends Li{constructor(){super();ne(this,Ks,!0);ne(this,Mn);ne(this,Gs);K(this,Gs,t=>{if(!As&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){T(this,Mn)||this.setEventListener(T(this,Gs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Mn))==null||t.call(this),K(this,Mn,void 0))}setEventListener(t){var n;K(this,Gs,t),(n=T(this,Mn))==null||n.call(this),K(this,Mn,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ks)!==t&&(K(this,Ks,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return T(this,Ks)}},Ks=new WeakMap,Mn=new WeakMap,Gs=new WeakMap,Vh),Uo=new L1;function qc(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}function F1(e){return Math.min(1e3*2**e,3e4)}function wv(e){return(e??"online")==="online"?Uo.isOnline():!0}var Sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ya(e){return e instanceof Sv}function _v(e){let t=!1,n=0,s=!1,r;const i=qc(),o=p=>{var v;s||(h(new Sv(p)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},c=()=>{t=!1},l=()=>Mu.isFocused()&&(e.networkMode==="always"||Uo.isOnline())&&e.canRun(),u=()=>wv(e.networkMode)&&e.canRun(),d=p=>{var v;s||(s=!0,(v=e.onSuccess)==null||v.call(e,p),r==null||r(),i.resolve(p))},h=p=>{var v;s||(s=!0,(v=e.onError)==null||v.call(e,p),r==null||r(),i.reject(p))},y=()=>new Promise(p=>{var v;r=x=>{(s||l())&&p(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var p;r=void 0,s||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(s)return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(x){p=Promise.reject(x)}Promise.resolve(p).then(d).catch(x=>{var A;if(s)return;const b=e.retry??(As?0:3),w=e.retryDelay??F1,_=typeof w=="function"?w(n,x):w,S=b===!0||typeof b=="number"&&nl()?void 0:y()).then(()=>{t?h(x):m()})})};return{promise:i,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?m():y().then(m),i)}}function V1(){let e=[],t=0,n=a=>{a()},s=a=>{a()},r=a=>setTimeout(a,0);const i=a=>{t?e.push(a):r(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&r(()=>{s(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||o()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{s=a},setScheduler:a=>{r=a}}}var He=V1(),cs,Bh,Cv=(Bh=class{constructor(){ne(this,cs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uc(this.gcTime)&&K(this,cs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(As?1/0:5*60*1e3))}clearGcTimeout(){T(this,cs)&&(clearTimeout(T(this,cs)),K(this,cs,void 0))}},cs=new WeakMap,Bh),Qs,Xs,Tt,ls,Ge,Si,us,Ot,gn,$h,B1=($h=class extends Cv{constructor(t){super();ne(this,Ot);ne(this,Qs);ne(this,Xs);ne(this,Tt);ne(this,ls);ne(this,Ge);ne(this,Si);ne(this,us);K(this,us,!1),K(this,Si,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,ls,t.client),K(this,Tt,T(this,ls).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Qs,$1(this.options)),this.state=t.state??T(this,Qs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Ge))==null?void 0:t.promise}setOptions(t){this.options={...T(this,Si),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Tt).remove(this)}setData(t,n){const s=Hc(this.state.data,t,this.options);return pe(this,Ot,gn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){pe(this,Ot,gn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,r;const n=(s=T(this,Ge))==null?void 0:s.promise;return(r=T(this,Ge))==null||r.cancel(t),n?n.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Qs))}isActive(){return this.observers.some(t=>Dt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ou||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!vv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Ge))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Ge))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Tt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Ge)&&(T(this,us)?T(this,Ge).cancel({revert:!0}):T(this,Ge).cancelRetry()),this.scheduleGc()),T(this,Tt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||pe(this,Ot,gn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Ge))return T(this,Ge).continueRetry(),T(this,Ge).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(K(this,us,!0),s.signal)})},i=()=>{const d=bv(this.options,n),h={client:T(this,ls),queryKey:this.queryKey,meta:this.meta};return r(h),K(this,us,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:T(this,ls),state:this.state,fetchFn:i};r(o),(c=this.options.behavior)==null||c.onFetch(o,this),K(this,Xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&pe(this,Ot,gn).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,y,m,p;Ya(d)&&d.silent||pe(this,Ot,gn).call(this,{type:"error",error:d}),Ya(d)||((y=(h=T(this,Tt).config).onError)==null||y.call(h,d,this),(p=(m=T(this,Tt).config).onSettled)==null||p.call(m,this.state.data,d,this)),this.scheduleGc()};return K(this,Ge,_v({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:s.abort.bind(s),onSuccess:d=>{var h,y,m,p;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){a(v);return}(y=(h=T(this,Tt).config).onSuccess)==null||y.call(h,d,this),(p=(m=T(this,Tt).config).onSettled)==null||p.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{pe(this,Ot,gn).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{pe(this,Ot,gn).call(this,{type:"pause"})},onContinue:()=>{pe(this,Ot,gn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Ge).start()}},Qs=new WeakMap,Xs=new WeakMap,Tt=new WeakMap,ls=new WeakMap,Ge=new WeakMap,Si=new WeakMap,us=new WeakMap,Ot=new WeakSet,gn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ev(s.data,this.options),fetchMeta:t.meta??null};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Ya(r)&&r.revert&&T(this,Xs)?{...T(this,Xs),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),T(this,Tt).notify({query:this,type:"updated",action:t})})},$h);function Ev(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gt,Uh,U1=(Uh=class extends Li{constructor(t={}){super();ne(this,Gt);this.config=t,K(this,Gt,new Map)}build(t,n,s){const r=n.queryKey,i=n.queryHash??ku(r,n);let o=this.get(i);return o||(o=new B1({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){T(this,Gt).has(t.queryHash)||(T(this,Gt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Gt).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Gt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Gt).get(t)}getAll(){return[...T(this,Gt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Sh(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>Sh(t,s)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gt=new WeakMap,Uh),Qt,nt,ds,Xt,jn,zh,z1=(zh=class extends Cv{constructor(t){super();ne(this,Xt);ne(this,Qt);ne(this,nt);ne(this,ds);this.mutationId=t.mutationId,K(this,nt,t.mutationCache),K(this,Qt,[]),this.state=t.state||W1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Qt).includes(t)||(T(this,Qt).push(t),this.clearGcTimeout(),T(this,nt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,Qt,T(this,Qt).filter(n=>n!==t)),this.scheduleGc(),T(this,nt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Qt).length||(this.state.status==="pending"?this.scheduleGc():T(this,nt).remove(this))}continue(){var t;return((t=T(this,ds))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,i,o,a,c,l,u,d,h,y,m,p,v,x,b,w,_,S,A,E;K(this,ds,_v({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,N)=>{pe(this,Xt,jn).call(this,{type:"failed",failureCount:R,error:N})},onPause:()=>{pe(this,Xt,jn).call(this,{type:"pause"})},onContinue:()=>{pe(this,Xt,jn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,nt).canRun(this)}));const n=this.state.status==="pending",s=!T(this,ds).canStart();try{if(!n){pe(this,Xt,jn).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(r=T(this,nt).config).onMutate)==null?void 0:i.call(r,t,this));const N=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));N!==this.state.context&&pe(this,Xt,jn).call(this,{type:"pending",context:N,variables:t,isPaused:s})}const R=await T(this,ds).start();return await((l=(c=T(this,nt).config).onSuccess)==null?void 0:l.call(c,R,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,R,t,this.state.context)),await((y=(h=T(this,nt).config).onSettled)==null?void 0:y.call(h,R,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,R,null,t,this.state.context)),pe(this,Xt,jn).call(this,{type:"success",data:R}),R}catch(R){try{throw await((x=(v=T(this,nt).config).onError)==null?void 0:x.call(v,R,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,R,t,this.state.context)),await((S=(_=T(this,nt).config).onSettled)==null?void 0:S.call(_,void 0,R,this.state.variables,this.state.context,this)),await((E=(A=this.options).onSettled)==null?void 0:E.call(A,void 0,R,t,this.state.context)),R}finally{pe(this,Xt,jn).call(this,{type:"error",error:R})}}finally{T(this,nt).runNext(this)}}},Qt=new WeakMap,nt=new WeakMap,ds=new WeakMap,Xt=new WeakSet,jn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{T(this,Qt).forEach(s=>{s.onMutationUpdate(t)}),T(this,nt).notify({mutation:this,type:"updated",action:t})})},zh);function W1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vn,Mt,_i,Wh,H1=(Wh=class extends Li{constructor(t={}){super();ne(this,vn);ne(this,Mt);ne(this,_i);this.config=t,K(this,vn,new Set),K(this,Mt,new Map),K(this,_i,0)}build(t,n,s){const r=new z1({mutationCache:this,mutationId:++Bi(this,_i)._,options:t.defaultMutationOptions(n),state:s});return this.add(r),r}add(t){T(this,vn).add(t);const n=Yi(t);if(typeof n=="string"){const s=T(this,Mt).get(n);s?s.push(t):T(this,Mt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,vn).delete(t)){const n=Yi(t);if(typeof n=="string"){const s=T(this,Mt).get(n);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&T(this,Mt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yi(t);if(typeof n=="string"){const s=T(this,Mt).get(n),r=s==null?void 0:s.find(i=>i.state.status==="pending");return!r||r===t}else return!0}runNext(t){var s;const n=Yi(t);if(typeof n=="string"){const r=(s=T(this,Mt).get(n))==null?void 0:s.find(i=>i!==t&&i.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){He.batch(()=>{T(this,vn).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,vn).clear(),T(this,Mt).clear()})}getAll(){return Array.from(T(this,vn))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>_h(n,s))}findAll(t={}){return this.getAll().filter(n=>_h(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(At))))}},vn=new WeakMap,Mt=new WeakMap,_i=new WeakMap,Wh);function Yi(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Th(e){return{onFetch:(t,n)=>{var u,d,h,y,m;const s=t.options,r=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((y=t.state.data)==null?void 0:y.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},x=bv(t.options,t.fetchOptions),b=async(w,_,S)=>{if(p)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const A={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};v(A);const E=await x(A),{maxPages:R}=t.options,N=S?D1:M1;return{pages:N(w.pages,E,R),pageParams:N(w.pageParams,_,R)}};if(r&&i.length){const w=r==="backward",_=w?q1:Ah,S={pages:i,pageParams:o},A=_(s,S);a=await b(S,A,w)}else{const w=e??i.length;do{const _=c===0?o[0]??s.initialPageParam:Ah(s,a);if(c>0&&_==null)break;a=await b(a,_),c++}while(c{var p,v;return(v=(p=t.options).persister)==null?void 0:v.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Ah(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function q1(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var Ne,Dn,In,Ys,Js,Ln,er,tr,Hh,Uk=(Hh=class{constructor(e={}){ne(this,Ne);ne(this,Dn);ne(this,In);ne(this,Ys);ne(this,Js);ne(this,Ln);ne(this,er);ne(this,tr);K(this,Ne,e.queryCache||new U1),K(this,Dn,e.mutationCache||new H1),K(this,In,e.defaultOptions||{}),K(this,Ys,new Map),K(this,Js,new Map),K(this,Ln,0)}mount(){Bi(this,Ln)._++,T(this,Ln)===1&&(K(this,er,Mu.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ne).onFocus())})),K(this,tr,Uo.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ne).onOnline())})))}unmount(){var e,t;Bi(this,Ln)._--,T(this,Ln)===0&&((e=T(this,er))==null||e.call(this),K(this,er,void 0),(t=T(this,tr))==null||t.call(this),K(this,tr,void 0))}isFetching(e){return T(this,Ne).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Dn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ne).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=T(this,Ne).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return T(this,Ne).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),r=T(this,Ne).get(s.queryHash),i=r==null?void 0:r.state.data,o=k1(t,i);if(o!==void 0)return T(this,Ne).build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>T(this,Ne).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ne).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ne);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ne),s={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries(s,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=He.batch(()=>T(this,Ne).findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(At).catch(At)}invalidateQueries(e,t={}){return He.batch(()=>{if(T(this,Ne).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=He.batch(()=>T(this,Ne).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let i=r.fetch(void 0,n);return n.throwOnError||(i=i.catch(At)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(At)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ne).build(this,t);return n.isStaleByTime(qs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e.behavior=Th(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e.behavior=Th(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Uo.isOnline()?T(this,Dn).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ne)}getMutationCache(){return T(this,Dn)}getDefaultOptions(){return T(this,In)}setDefaultOptions(e){K(this,In,e)}setQueryDefaults(e,t){T(this,Ys).set(bi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Ys).values()],n={};return t.forEach(s=>{wi(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Js).set(bi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Js).values()];let n={};return t.forEach(s=>{wi(e,s.mutationKey)&&(n={...n,...s.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,In).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ku(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ou&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,In).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ne).clear(),T(this,Dn).clear()}},Ne=new WeakMap,Dn=new WeakMap,In=new WeakMap,Ys=new WeakMap,Js=new WeakMap,Ln=new WeakMap,er=new WeakMap,tr=new WeakMap,Hh),ut,me,Ci,st,fs,nr,Fn,Yt,Ei,sr,rr,hs,ps,Vn,ir,be,Br,Zc,Kc,Gc,Qc,Xc,Yc,Jc,Tv,qh,Z1=(qh=class extends Li{constructor(t,n){super();ne(this,be);ne(this,ut);ne(this,me);ne(this,Ci);ne(this,st);ne(this,fs);ne(this,nr);ne(this,Fn);ne(this,Yt);ne(this,Ei);ne(this,sr);ne(this,rr);ne(this,hs);ne(this,ps);ne(this,Vn);ne(this,ir,new Set);this.options=n,K(this,ut,t),K(this,Yt,null),K(this,Fn,qc()),this.options.experimental_prefetchInRender||T(this,Fn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,me).addObserver(this),Rh(T(this,me),this.options)?pe(this,be,Br).call(this):this.updateResult(),pe(this,be,Qc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return el(T(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return el(T(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,pe(this,be,Xc).call(this),pe(this,be,Yc).call(this),T(this,me).removeObserver(this)}setOptions(t,n){const s=this.options,r=T(this,me);if(this.options=T(this,ut).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dt(this.options.enabled,T(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");pe(this,be,Jc).call(this),T(this,me).setOptions(this.options),s._defaulted&&!zc(this.options,s)&&T(this,ut).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,me),observer:this});const i=this.hasListeners();i&&Ph(T(this,me),r,this.options,s)&&pe(this,be,Br).call(this),this.updateResult(n),i&&(T(this,me)!==r||Dt(this.options.enabled,T(this,me))!==Dt(s.enabled,T(this,me))||qs(this.options.staleTime,T(this,me))!==qs(s.staleTime,T(this,me)))&&pe(this,be,Zc).call(this);const o=pe(this,be,Kc).call(this);i&&(T(this,me)!==r||Dt(this.options.enabled,T(this,me))!==Dt(s.enabled,T(this,me))||o!==T(this,Vn))&&pe(this,be,Gc).call(this,o)}getOptimisticResult(t){const n=T(this,ut).getQueryCache().build(T(this,ut),t),s=this.createResult(n,t);return G1(this,s)&&(K(this,st,s),K(this,nr,this.options),K(this,fs,T(this,me).state)),s}getCurrentResult(){return T(this,st)}trackResult(t,n){const s={};return Object.keys(t).forEach(r=>{Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),s}trackProp(t){T(this,ir).add(t)}getCurrentQuery(){return T(this,me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,ut).defaultQueryOptions(t),s=T(this,ut).getQueryCache().build(T(this,ut),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return pe(this,be,Br).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,st)))}createResult(t,n){var R;const s=T(this,me),r=this.options,i=T(this,st),o=T(this,fs),a=T(this,nr),l=t!==s?t.state:T(this,Ci),{state:u}=t;let d={...u},h=!1,y;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&Rh(t,n),I=N&&Ph(t,s,n,r);(M||I)&&(d={...d,...Ev(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:v}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(o==null?void 0:o.data)&&n.select===T(this,Ei))y=T(this,sr);else try{K(this,Ei,n.select),y=n.select(d.data),y=Hc(i==null?void 0:i.data,y,n),K(this,sr,y),K(this,Yt,null)}catch(N){K(this,Yt,N)}else y=d.data;if(n.placeholderData!==void 0&&y===void 0&&v==="pending"){let N;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))N=i.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((R=T(this,rr))==null?void 0:R.state.data,T(this,rr)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),K(this,Yt,null)}catch(M){K(this,Yt,M)}N!==void 0&&(v="success",y=Hc(i==null?void 0:i.data,N,n),h=!0)}T(this,Yt)&&(m=T(this,Yt),y=T(this,sr),p=Date.now(),v="error");const x=d.fetchStatus==="fetching",b=v==="pending",w=v==="error",_=b&&x,S=y!==void 0,E={status:v,fetchStatus:d.fetchStatus,isPending:b,isSuccess:v==="success",isError:w,isInitialLoading:_,isLoading:_,data:y,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:w&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&S,isStale:Du(t,n),refetch:this.refetch,promise:T(this,Fn)};if(this.options.experimental_prefetchInRender){const N=O=>{E.status==="error"?O.reject(E.error):E.data!==void 0&&O.resolve(E.data)},M=()=>{const O=K(this,Fn,E.promise=qc());N(O)},I=T(this,Fn);switch(I.status){case"pending":t.queryHash===s.queryHash&&N(I);break;case"fulfilled":(E.status==="error"||E.data!==I.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==I.reason)&&M();break}}return E}updateResult(t){const n=T(this,st),s=this.createResult(T(this,me),this.options);if(K(this,fs,T(this,me).state),K(this,nr,this.options),T(this,fs).data!==void 0&&K(this,rr,T(this,me)),zc(s,n))return;K(this,st,s);const r={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,ir).size)return!0;const c=new Set(a??T(this,ir));return this.options.throwOnError&&c.add("error"),Object.keys(T(this,st)).some(l=>{const u=l;return T(this,st)[u]!==n[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(r.listeners=!0),pe(this,be,Tv).call(this,{...r,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&pe(this,be,Qc).call(this)}},ut=new WeakMap,me=new WeakMap,Ci=new WeakMap,st=new WeakMap,fs=new WeakMap,nr=new WeakMap,Fn=new WeakMap,Yt=new WeakMap,Ei=new WeakMap,sr=new WeakMap,rr=new WeakMap,hs=new WeakMap,ps=new WeakMap,Vn=new WeakMap,ir=new WeakMap,be=new WeakSet,Br=function(t){pe(this,be,Jc).call(this);let n=T(this,me).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(At)),n},Zc=function(){pe(this,be,Xc).call(this);const t=qs(this.options.staleTime,T(this,me));if(As||T(this,st).isStale||!Uc(t))return;const s=vv(T(this,st).dataUpdatedAt,t)+1;K(this,hs,setTimeout(()=>{T(this,st).isStale||this.updateResult()},s))},Kc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,me)):this.options.refetchInterval)??!1},Gc=function(t){pe(this,be,Yc).call(this),K(this,Vn,t),!(As||Dt(this.options.enabled,T(this,me))===!1||!Uc(T(this,Vn))||T(this,Vn)===0)&&K(this,ps,setInterval(()=>{(this.options.refetchIntervalInBackground||Mu.isFocused())&&pe(this,be,Br).call(this)},T(this,Vn)))},Qc=function(){pe(this,be,Zc).call(this),pe(this,be,Gc).call(this,pe(this,be,Kc).call(this))},Xc=function(){T(this,hs)&&(clearTimeout(T(this,hs)),K(this,hs,void 0))},Yc=function(){T(this,ps)&&(clearInterval(T(this,ps)),K(this,ps,void 0))},Jc=function(){const t=T(this,ut).getQueryCache().build(T(this,ut),this.options);if(t===T(this,me))return;const n=T(this,me);K(this,me,t),K(this,Ci,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Tv=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,st))}),T(this,ut).getQueryCache().notify({query:T(this,me),type:"observerResultsUpdated"})})},qh);function K1(e,t){return Dt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rh(e,t){return K1(e,t)||e.state.data!==void 0&&el(e,t,t.refetchOnMount)}function el(e,t,n){if(Dt(t.enabled,e)!==!1){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Du(e,t)}return!1}function Ph(e,t,n,s){return(e!==t||Dt(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Du(e,n)}function Du(e,t){return Dt(t.enabled,e)!==!1&&e.isStaleByTime(qs(t.staleTime,e))}function G1(e,t){return!zc(e.getCurrentResult(),t)}var Av=g.createContext(void 0),Q1=e=>{const t=g.useContext(Av);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zk=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(Av.Provider,{value:e,children:t})),Rv=g.createContext(!1),X1=()=>g.useContext(Rv);Rv.Provider;function Y1(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var J1=g.createContext(Y1()),ej=()=>g.useContext(J1);function tj(e,t){return typeof e=="function"?e(...t):!!e}function Nh(){}var nj=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},sj=e=>{g.useEffect(()=>{e.clearReset()},[e])},rj=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||tj(n,[e.error,s])),ij=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},oj=(e,t)=>e.isLoading&&e.isFetching&&!t,aj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,jh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function cj(e,t,n){var d,h,y,m,p;const s=Q1(),r=X1(),i=ej(),o=s.defaultQueryOptions(e);(h=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",ij(o),nj(o,i),sj(i);const a=!s.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(s,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(v=>{const x=u?c.subscribe(He.batchCalls(v)):Nh;return c.updateResult(),x},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),aj(o,l))throw jh(o,c,i);if(rj({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((m=(y=s.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||m.call(y,o,l),o.experimental_prefetchInRender&&!As&&oj(l,r)){const v=a?jh(o,c,i):(p=s.getQueryCache().get(o.queryHash))==null?void 0:p.promise;v==null||v.catch(Nh).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Tn(e,t){return cj(e,Z1)}const lj=e=>{const{data:t,isPending:n,status:s}=Tn({queryKey:["photos",e],queryFn:()=>qN(e),select:({data:r})=>r.data});return{data:t,isPending:n,status:s}},uj=e=>{const{data:t,isPending:n,isError:s}=Tn({queryKey:["videos",e],queryFn:()=>ZN(e),select:({data:r})=>r.data});return{data:t,isPending:n,isError:s}},Wk=({className:e,setIsOpen:t,activeItem:n})=>{var h,y;const[s,r]=En({align:"center",loop:!1,dragFree:!1,slidesToScroll:1}),{data:i}=lj(1),{data:o}=uj(1);GE();const[a,c]=g.useState(!1),[l,u]=g.useState(!1);g.useEffect(()=>{if(!r)return;const m=()=>{c(r.canScrollPrev()),u(r.canScrollNext())};return r.on("select",m),m(),()=>{r.off("select",m)}},[r]),g.useEffect(()=>{!r||!i||r.scrollTo(n.id,!0)},[r,i,n.id]);const d=n.type==="photo"?(h=i==null?void 0:i.photos)==null?void 0:h.map(m=>{var p;return f.jsx("div",{className:"embla__slide flex-[0_0_100%] h-[350px] md:h-[500px] lg:h-[700px] lg:px-[20%] flex items-center justify-center",children:f.jsx("img",{src:(p=m==null?void 0:m.photo)==null?void 0:p.path,alt:m.photo.file_name,className:"max-h-full max-w-full object-contain"})},m.id)}):(y=o==null?void 0:o.videos)==null?void 0:y.map(m=>{var p;return f.jsx("div",{className:"embla__slide flex-[0_0_100%] h-[80vh] lg:px-[20%] flex items-center justify-center",children:f.jsx("video",{src:((p=m==null?void 0:m.video)==null?void 0:p.path)??"",controls:!0,autoPlay:!0,muted:!0,className:"max-h-full max-w-full object-contain"})},m.id)});return f.jsxs(Hr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:V("fixed z-[100] top-0 left-0 pb-40 pt-20 lg:px-28 px-6 overflow-hidden min-h-screen w-full bg-black/90",e),children:[f.jsx(Sl,{onClick:()=>t(!1),className:"absolute top-6 right-6 p-3 md:size-20 size-16 cursor-pointer z-50 text-white hover:scale-110 transition-all duration-300"}),f.jsxs("div",{className:"hidden md:block",children:[f.jsx(nc,{onClick:()=>a&&(r==null?void 0:r.scrollPrev()),className:V("absolute left-10 top-1/2 -translate-y-1/2 text-white size-20 cursor-pointer hover:scale-110 transition-all duration-300 z-40",!a&&"opacity-20 pointer-events-none")}),f.jsx(jp,{onClick:()=>l&&(r==null?void 0:r.scrollNext()),className:V("absolute right-10 top-1/2 -translate-y-1/2 text-white size-20 cursor-pointer hover:scale-110 transition-all duration-300 z-40",!l&&"opacity-20 pointer-events-none")})]}),f.jsx("div",{ref:s,className:"embla overflow-hidden",children:f.jsx("div",{className:"embla__container flex",children:d})})]})},Hk=({className:e,name:t,achievements:n,biography:s,image:r,images:i})=>{var m;const[o,a]=g.useState(!1),[c,l]=g.useState(!1),u=Te(p=>p.lang),[d,h]=g.useState(100),y=({className:p})=>{const[v,x]=En({});return g.useEffect(()=>{if(!x)return;const b=()=>{a(x.canScrollPrev()),l(x.canScrollNext())};return b(),x.on("select",b),()=>{x.off("select",b)}},[x]),f.jsxs("div",{className:V("",p),children:[f.jsx("h3",{className:"text-xl mb-2.5",children:"Работы дизайнера"}),f.jsx("div",{ref:v,className:"embla overflow-hidden",children:f.jsxs("div",{className:"embla__container items-center flex gap-4",children:[o&&f.jsx(nc,{onClick:()=>o&&(x==null?void 0:x.scrollPrev()),className:V("cursor-pointer",!o&&"opacity-20")}),f.jsx("div",{className:"flex items-center gap-4",children:i==null?void 0:i.map((b,w)=>f.jsx("div",{className:"lg:size-[140px] size-[70px] overflow-hidden",children:f.jsx("img",{onClick:()=>h(w),src:b==null?void 0:b.path,className:"size-full hover:scale-105 transition-all cursor-pointer overflow-hidden object-cover object-top"},w)}))}),c&&f.jsx(jp,{onClick:()=>o&&(x==null?void 0:x.scrollNext()),className:V("cursor-pointer",!c&&"opacity-20")})]})})]})};return f.jsxs(Py,{children:[f.jsxs(Ny,{className:V("relative group h-[326px] overflow-hidden",e),children:[f.jsx("article",{className:"z-50 size-full bg-[url('/impressions/card-bg.png')] bg-no-repeat overflow-hidden",children:f.jsxs("div",{className:"flex gap-4 h-[316px] overflow-hidden",children:[f.jsx("img",{src:r==null?void 0:r.path,alt:t,className:"flex-[0_0_44%] object-contain overflow-hidden"}),f.jsxs("div",{className:"flex-auto text-left text-white z-20 pt-6 pl-4 pr-4",children:[f.jsx("h3",{className:"text-xl mb-6",children:t}),f.jsx("ul",{className:"text-sm list-disc pl-4 flex flex-col gap-2",children:n.slice(0,7).map((p,v)=>f.jsx("li",{children:u==="ru"?p==null?void 0:p.ru:p==null?void 0:p.en},v))})]})]})}),f.jsx("img",{src:"/impressions/card-bg-bg.png",className:"absolute top-2.5 left-2.5 -z-10 size-full"})]}),f.jsxs(Su,{className:V("p-6 flex flex-col gap-4 xl:!w-[1224px] md:!w-[688px] w-[336px] max-h-[100vh] overflow-hidden"),children:[d===100?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"gap-4 md:!flex !hidden",children:[f.jsx("div",{className:"flex-1 h-[345px]",children:f.jsx("img",{src:r==null?void 0:r.path,alt:"",className:"size-full float-left object-cover"})}),f.jsxs("div",{className:"flex-[0_0_70%]",children:[f.jsx("div",{className:"text-2xl mb-4",children:t}),f.jsx("hr",{}),f.jsx("div",{className:"mt-4 flex flex-col gap-3 normal overflow-y-auto max-h-[40vh]",dangerouslySetInnerHTML:{__html:s??""}})]})]}),f.jsx("hr",{className:"hidden md:block"}),f.jsxs("div",{className:"flex flex-col gap-4 md:hidden overflow-auto h-full",children:[f.jsx("h3",{className:"text-xl",children:t}),f.jsx("img",{src:r==null?void 0:r.path,alt:t}),f.jsx("hr",{}),f.jsx(y,{}),f.jsx("hr",{}),f.jsx("div",{className:"mt-4 flex flex-col gap-3 normal",dangerouslySetInnerHTML:{__html:s??""}})]})]}):f.jsxs("div",{className:"",children:[f.jsxs("button",{onClick:()=>h(100),className:"flex items-center gap-2 mb-4",children:[f.jsx(nc,{}),"Вернуться назад"]}),f.jsx("div",{className:"2xl:h-[50vh] h-[40vh] bg-[#f4f4f4]",children:f.jsx("img",{src:(m=i==null?void 0:i[d])==null?void 0:m.path,className:"size-full object-contain"})})]}),f.jsx(y,{className:"hidden md:block"})]})]})};function Pv(e,t=[]){let n=[];function s(i,o){const a=g.createContext(o),c=n.length;n=[...n,o];const l=d=>{var x;const{scope:h,children:y,...m}=d,p=((x=h==null?void 0:h[e])==null?void 0:x[c])||a,v=g.useMemo(()=>m,Object.values(m));return f.jsx(p.Provider,{value:v,children:y})};l.displayName=i+"Provider";function u(d,h){var p;const y=((p=h==null?void 0:h[e])==null?void 0:p[c])||a,m=g.useContext(y);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(o=>g.createContext(o));return function(a){const c=(a==null?void 0:a[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return r.scopeName=e,[s,dj(r,...t)]}function dj(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((a,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function kh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Iu(...e){return t=>{let n=!1;const s=e.map(r=>{const i=kh(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r{const{children:i,...o}=s,a=g.Children.toArray(i),c=a.find(pj);if(c){const l=c.props.children,u=a.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return f.jsx(t,{...o,ref:r,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return f.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function fj(e){const t=g.forwardRef((n,s)=>{const{children:r,...i}=n;if(g.isValidElement(r)){const o=gj(r),a=mj(i,r.props);return r.type!==g.Fragment&&(a.ref=s?Iu(s,o):o),g.cloneElement(r,a)}return g.Children.count(r)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hj=Symbol("radix.slottable");function pj(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hj}function mj(e,t){const n={...t};for(const s in t){const r=e[s],i=t[s];/^on[A-Z]/.test(s)?r&&i?n[s]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[s]=r):s==="style"?n[s]={...r,...i}:s==="className"&&(n[s]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function gj(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=yj.reduce((e,t)=>{const n=tl(`Primitive.${t}`),s=g.forwardRef((r,i)=>{const{asChild:o,...a}=r,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...a,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function nl(e,t){e&&dl.flushSync(()=>e.dispatchEvent(t))}var Rs=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},vj=ul[" useInsertionEffect ".trim().toString()]||Rs;function Nv({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[r,i,o]=xj({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:r;{const u=g.useRef(e!==void 0);g.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${s} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,s])}const l=g.useCallback(u=>{var d;if(a){const h=bj(u)?u(e):u;h!==e&&((d=o.current)==null||d.call(o,h))}else i(u)},[a,e,i,o]);return[c,l]}function xj({defaultProp:e,onChange:t}){const[n,s]=g.useState(e),r=g.useRef(n),i=g.useRef(t);return vj(()=>{i.current=t},[t]),g.useEffect(()=>{var o;r.current!==n&&((o=i.current)==null||o.call(i,n),r.current=n)},[n,r]),[n,s,i]}function bj(e){return typeof e=="function"}var wj=g.createContext(void 0);function Sj(e){const t=g.useContext(wj);return e||t||"ltr"}function _j(e,t){return g.useReducer((n,s)=>t[n][s]??n,e)}var Fi=e=>{const{present:t,children:n}=e,s=Cj(t),r=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),i=dn(s.ref,Ej(r));return typeof n=="function"||s.isPresent?g.cloneElement(r,{ref:i}):null};Fi.displayName="Presence";function Cj(e){const[t,n]=g.useState(),s=g.useRef(null),r=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[a,c]=_j(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const l=Ji(s.current);i.current=a==="mounted"?l:"none"},[a]),Rs(()=>{const l=s.current,u=r.current;if(u!==e){const h=i.current,y=Ji(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),Rs(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=y=>{const p=Ji(s.current).includes(y.animationName);if(y.target===t&&p&&(c("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=y=>{y.target===t&&(i.current=Ji(s.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(l=>{s.current=l?getComputedStyle(l):null,n(l)},[])}}function Ji(e){return(e==null?void 0:e.animationName)||"none"}function Ej(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tj=ul[" useId ".trim().toString()]||(()=>{}),Aj=0;function jv(e){const[t,n]=g.useState(Tj());return Rs(()=>{e||n(s=>s??String(Aj++))},[e]),e||(t?`radix-${t}`:"")}function kv(e){const t=e+"CollectionProvider",[n,s]=Pv(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:v,children:x}=p,b=de.useRef(null),w=de.useRef(new Map).current;return f.jsx(r,{scope:v,itemMap:w,collectionRef:b,children:x})};o.displayName=t;const a=e+"CollectionSlot",c=tl(a),l=de.forwardRef((p,v)=>{const{scope:x,children:b}=p,w=i(a,x),_=dn(v,w.collectionRef);return f.jsx(c,{ref:_,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=tl(u),y=de.forwardRef((p,v)=>{const{scope:x,children:b,...w}=p,_=de.useRef(null),S=dn(v,_),A=i(u,x);return de.useEffect(()=>(A.itemMap.set(_,{ref:_,...w}),()=>void A.itemMap.delete(_))),f.jsx(h,{[d]:"",ref:S,children:b})});y.displayName=u;function m(p){const v=i(e+"CollectionConsumer",p);return de.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((A,E)=>w.indexOf(A.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:y},m,s]}function Jt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function Rj(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e);g.useEffect(()=>{const s=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var Pj="DismissableLayer",sl="dismissableLayer.update",Nj="dismissableLayer.pointerDownOutside",jj="dismissableLayer.focusOutside",Oh,Ov=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mv=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=e,l=g.useContext(Ov),[u,d]=g.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=g.useState({}),m=dn(t,E=>d(E)),p=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(v),b=u?p.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,_=b>=x,S=Mj(E=>{const R=E.target,N=[...l.branches].some(M=>M.contains(R));!_||N||(r==null||r(E),o==null||o(E),E.defaultPrevented||a==null||a())},h),A=Dj(E=>{const R=E.target;[...l.branches].some(M=>M.contains(R))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},h);return Rj(E=>{b===l.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),g.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Oh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Mh(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Oh)}},[u,h,n,l]),g.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Mh())},[u,l]),g.useEffect(()=>{const E=()=>y({});return document.addEventListener(sl,E),()=>document.removeEventListener(sl,E)},[]),f.jsx(ht.div,{...c,ref:m,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,A.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,S.onPointerDownCapture)})});Mv.displayName=Pj;var kj="DismissableLayerBranch",Oj=g.forwardRef((e,t)=>{const n=g.useContext(Ov),s=g.useRef(null),r=dn(t,s);return g.useEffect(()=>{const i=s.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(ht.div,{...e,ref:r})});Oj.displayName=kj;function Mj(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e),s=g.useRef(!1),r=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!s.current){let c=function(){Dv(Nj,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function Dj(e,t=globalThis==null?void 0:globalThis.document){const n=Jt(e),s=g.useRef(!1);return g.useEffect(()=>{const r=i=>{i.target&&!s.current&&Dv(jj,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Mh(){const e=new CustomEvent(sl);document.dispatchEvent(e)}function Dv(e,t,n,{discrete:s}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),s?nl(r,i):r.dispatchEvent(i)}function Ij(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Lj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Fj="VisuallyHidden",Iv=g.forwardRef((e,t)=>f.jsx(ht.span,{...e,ref:t,style:{...Lj,...e.style}}));Iv.displayName=Fj;var Vj=Iv,Ns="NavigationMenu",[Lu,Lv,Bj]=kv(Ns),[rl,$j,Uj]=kv(Ns),[Fu,qk]=Pv(Ns,[Bj,Uj]),[zj,Nt]=Fu(Ns),[Wj,Hj]=Fu(Ns),Fv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,onValueChange:r,defaultValue:i,delayDuration:o=200,skipDelayDuration:a=300,orientation:c="horizontal",dir:l,...u}=e,[d,h]=g.useState(null),y=dn(t,N=>h(N)),m=Sj(l),p=g.useRef(0),v=g.useRef(0),x=g.useRef(0),[b,w]=g.useState(!0),[_,S]=Nv({prop:s,onChange:N=>{const M=N!=="",I=a>0;M?(window.clearTimeout(x.current),I&&w(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>w(!0),a)),r==null||r(N)},defaultProp:i??"",caller:Ns}),A=g.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>S(""),150)},[S]),E=g.useCallback(N=>{window.clearTimeout(v.current),S(N)},[S]),R=g.useCallback(N=>{_===N?window.clearTimeout(v.current):p.current=window.setTimeout(()=>{window.clearTimeout(v.current),S(N)},o)},[_,S,o]);return g.useEffect(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(v.current),window.clearTimeout(x.current)},[]),f.jsx(Vv,{scope:n,isRootMenu:!0,value:_,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:N=>{window.clearTimeout(p.current),b?R(N):E(N)},onTriggerLeave:()=>{window.clearTimeout(p.current),A()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:A,onItemSelect:N=>{S(M=>M===N?"":N)},onItemDismiss:()=>S(""),children:f.jsx(ht.nav,{"aria-label":"Main","data-orientation":c,dir:m,...u,ref:y})})});Fv.displayName=Ns;var il="NavigationMenuSub",qj=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,onValueChange:r,defaultValue:i,orientation:o="horizontal",...a}=e,c=Nt(il,n),[l,u]=Nv({prop:s,onChange:r,defaultProp:i??"",caller:il});return f.jsx(Vv,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:d=>u(d),onItemSelect:d=>u(d),onItemDismiss:()=>u(""),children:f.jsx(ht.div,{"data-orientation":o,...a,ref:t})})});qj.displayName=il;var Vv=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:s,dir:r,orientation:i,children:o,value:a,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:h,onContentLeave:y}=e,[m,p]=g.useState(null),[v,x]=g.useState(new Map),[b,w]=g.useState(null);return f.jsx(zj,{scope:t,isRootMenu:n,rootNavigationMenu:s,value:a,previousValue:Ij(a),baseId:jv(),dir:r,orientation:i,viewport:m,onViewportChange:p,indicatorTrack:b,onIndicatorTrackChange:w,onTriggerEnter:Jt(u),onTriggerLeave:Jt(d),onContentEnter:Jt(h),onContentLeave:Jt(y),onItemSelect:Jt(c),onItemDismiss:Jt(l),onViewportContentChange:g.useCallback((_,S)=>{x(A=>(A.set(_,S),new Map(A)))},[]),onViewportContentRemove:g.useCallback(_=>{x(S=>S.has(_)?(S.delete(_),new Map(S)):S)},[]),children:f.jsx(Lu.Provider,{scope:t,children:f.jsx(Wj,{scope:t,items:v,children:o})})})},Bv="NavigationMenuList",$v=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=Nt(Bv,n),i=f.jsx(ht.ul,{"data-orientation":r.orientation,...s,ref:t});return f.jsx(ht.div,{style:{position:"relative"},ref:r.onIndicatorTrackChange,children:f.jsx(Lu.Slot,{scope:n,children:r.isRootMenu?f.jsx(Xv,{asChild:!0,children:i}):i})})});$v.displayName=Bv;var Uv="NavigationMenuItem",[Zj,zv]=Fu(Uv),Wv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,...r}=e,i=jv(),o=s||i||"LEGACY_REACT_AUTO_VALUE",a=g.useRef(null),c=g.useRef(null),l=g.useRef(null),u=g.useRef(()=>{}),d=g.useRef(!1),h=g.useCallback((m="start")=>{if(a.current){u.current();const p=al(a.current);p.length&&$u(m==="start"?p:p.reverse())}},[]),y=g.useCallback(()=>{if(a.current){const m=al(a.current);m.length&&(u.current=ek(m))}},[]);return f.jsx(Zj,{scope:n,value:o,triggerRef:c,contentRef:a,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:y,onContentFocusOutside:y,children:f.jsx(ht.li,{...r,ref:t})})});Wv.displayName=Uv;var ol="NavigationMenuTrigger",Hv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:s,...r}=e,i=Nt(ol,e.__scopeNavigationMenu),o=zv(ol,e.__scopeNavigationMenu),a=g.useRef(null),c=dn(a,o.triggerRef,t),l=Jv(i.baseId,o.value),u=ex(i.baseId,o.value),d=g.useRef(!1),h=g.useRef(!1),y=o.value===i.value;return f.jsxs(f.Fragment,{children:[f.jsx(Lu.ItemSlot,{scope:n,value:o.value,children:f.jsx(Yv,{asChild:!0,children:f.jsx(ht.button,{id:l,disabled:s,"data-disabled":s?"":void 0,"data-state":Uu(y),"aria-expanded":y,"aria-controls":u,...r,ref:c,onPointerEnter:ze(e.onPointerEnter,()=>{h.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:ze(e.onPointerMove,zo(()=>{s||h.current||o.wasEscapeCloseRef.current||d.current||(i.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:ze(e.onPointerLeave,zo(()=>{s||(i.onTriggerLeave(),d.current=!1)})),onClick:ze(e.onClick,()=>{i.onItemSelect(o.value),h.current=y}),onKeyDown:ze(e.onKeyDown,m=>{const v={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];y&&m.key===v&&(o.onEntryKeyDown(),m.preventDefault())})})})}),y&&f.jsxs(f.Fragment,{children:[f.jsx(Vj,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:m=>{const p=o.contentRef.current,v=m.relatedTarget,x=v===a.current,b=p==null?void 0:p.contains(v);(x||!b)&&o.onFocusProxyEnter(x?"start":"end")}}),i.viewport&&f.jsx("span",{"aria-owns":u})]})]})});Hv.displayName=ol;var Kj="NavigationMenuLink",Dh="navigationMenu.linkSelect",qv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:s,onSelect:r,...i}=e;return f.jsx(Yv,{asChild:!0,children:f.jsx(ht.a,{"data-active":s?"":void 0,"aria-current":s?"page":void 0,...i,ref:t,onClick:ze(e.onClick,o=>{const a=o.target,c=new CustomEvent(Dh,{bubbles:!0,cancelable:!0});if(a.addEventListener(Dh,l=>r==null?void 0:r(l),{once:!0}),nl(a,c),!c.defaultPrevented&&!o.metaKey){const l=new CustomEvent(ho,{bubbles:!0,cancelable:!0});nl(a,l)}},{checkForDefaultPrevented:!1})})})});qv.displayName=Kj;var Vu="NavigationMenuIndicator",Zv=g.forwardRef((e,t)=>{const{forceMount:n,...s}=e,r=Nt(Vu,e.__scopeNavigationMenu),i=!!r.value;return r.indicatorTrack?Zh.createPortal(f.jsx(Fi,{present:n||i,children:f.jsx(Gj,{...s,ref:t})}),r.indicatorTrack):null});Zv.displayName=Vu;var Gj=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=Nt(Vu,n),i=Lv(n),[o,a]=g.useState(null),[c,l]=g.useState(null),u=r.orientation==="horizontal",d=!!r.value;g.useEffect(()=>{var p;const m=(p=i().find(v=>v.value===r.value))==null?void 0:p.ref.current;m&&a(m)},[i,r.value]);const h=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return cl(o,h),cl(r.indicatorTrack,h),c?f.jsx(ht.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":r.orientation,...s,ref:t,style:{position:"absolute",...u?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...s.style}}):null}),pr="NavigationMenuContent",Kv=g.forwardRef((e,t)=>{const{forceMount:n,...s}=e,r=Nt(pr,e.__scopeNavigationMenu),i=zv(pr,e.__scopeNavigationMenu),o=dn(i.contentRef,t),a=i.value===r.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...s};return r.viewport?f.jsx(Qj,{forceMount:n,...c,ref:o}):f.jsx(Fi,{present:n||a,children:f.jsx(Gv,{"data-state":Uu(a),...c,ref:o,onPointerEnter:ze(e.onPointerEnter,r.onContentEnter),onPointerLeave:ze(e.onPointerLeave,zo(r.onContentLeave)),style:{pointerEvents:!a&&r.isRootMenu?"none":void 0,...c.style}})})});Kv.displayName=pr;var Qj=g.forwardRef((e,t)=>{const n=Nt(pr,e.__scopeNavigationMenu),{onViewportContentChange:s,onViewportContentRemove:r}=n;return Rs(()=>{s(e.value,{ref:t,...e})},[e,t,s]),Rs(()=>()=>r(e.value),[e.value,r]),null}),ho="navigationMenu.rootContentDismiss",Gv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:s,triggerRef:r,focusProxyRef:i,wasEscapeCloseRef:o,onRootContentClose:a,onContentFocusOutside:c,...l}=e,u=Nt(pr,n),d=g.useRef(null),h=dn(d,t),y=Jv(u.baseId,s),m=ex(u.baseId,s),p=Lv(n),v=g.useRef(null),{onItemDismiss:x}=u;g.useEffect(()=>{const w=d.current;if(u.isRootMenu&&w){const _=()=>{var S;x(),a(),w.contains(document.activeElement)&&((S=r.current)==null||S.focus())};return w.addEventListener(ho,_),()=>w.removeEventListener(ho,_)}},[u.isRootMenu,e.value,r,x,a]);const b=g.useMemo(()=>{const _=p().map(M=>M.value);u.dir==="rtl"&&_.reverse();const S=_.indexOf(u.value),A=_.indexOf(u.previousValue),E=s===u.value,R=A===_.indexOf(s);if(!E&&!R)return v.current;const N=(()=>{if(S!==A){if(E&&A!==-1)return S>A?"from-end":"from-start";if(R&&S!==-1)return S>A?"to-start":"to-end"}return null})();return v.current=N,N},[u.previousValue,u.value,u.dir,p,s]);return f.jsx(Xv,{asChild:!0,children:f.jsx(Mv,{id:m,"aria-labelledby":y,"data-motion":b,"data-orientation":u.orientation,...l,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var _;const w=new Event(ho,{bubbles:!0,cancelable:!0});(_=d.current)==null||_.dispatchEvent(w)},onFocusOutside:ze(e.onFocusOutside,w=>{var S;c();const _=w.target;(S=u.rootNavigationMenu)!=null&&S.contains(_)&&w.preventDefault()}),onPointerDownOutside:ze(e.onPointerDownOutside,w=>{var E;const _=w.target,S=p().some(R=>{var N;return(N=R.ref.current)==null?void 0:N.contains(_)}),A=u.isRootMenu&&((E=u.viewport)==null?void 0:E.contains(_));(S||A||!u.isRootMenu)&&w.preventDefault()}),onKeyDown:ze(e.onKeyDown,w=>{var A;const _=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!_){const E=al(w.currentTarget),R=document.activeElement,N=E.findIndex(O=>O===R),I=w.shiftKey?E.slice(0,N).reverse():E.slice(N+1,E.length);$u(I)?w.preventDefault():(A=i.current)==null||A.focus()}}),onEscapeKeyDown:ze(e.onEscapeKeyDown,w=>{o.current=!0})})})}),Bu="NavigationMenuViewport",Qv=g.forwardRef((e,t)=>{const{forceMount:n,...s}=e,i=!!Nt(Bu,e.__scopeNavigationMenu).value;return f.jsx(Fi,{present:n||i,children:f.jsx(Xj,{...s,ref:t})})});Qv.displayName=Bu;var Xj=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:s,...r}=e,i=Nt(Bu,n),o=dn(t,i.onViewportChange),a=Hj(pr,e.__scopeNavigationMenu),[c,l]=g.useState(null),[u,d]=g.useState(null),h=c?(c==null?void 0:c.width)+"px":void 0,y=c?(c==null?void 0:c.height)+"px":void 0,m=!!i.value,p=m?i.value:i.previousValue;return cl(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),f.jsx(ht.div,{"data-state":Uu(m),"data-orientation":i.orientation,...r,ref:o,style:{pointerEvents:!m&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":y,...r.style},onPointerEnter:ze(e.onPointerEnter,i.onContentEnter),onPointerLeave:ze(e.onPointerLeave,zo(i.onContentLeave)),children:Array.from(a.items).map(([x,{ref:b,forceMount:w,..._}])=>{const S=p===x;return f.jsx(Fi,{present:w||S,children:f.jsx(Gv,{..._,ref:Iu(b,A=>{S&&A&&d(A)})})},x)})})}),Yj="FocusGroup",Xv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=Nt(Yj,n);return f.jsx(rl.Provider,{scope:n,children:f.jsx(rl.Slot,{scope:n,children:f.jsx(ht.div,{dir:r.dir,...s,ref:t})})})}),Ih=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Jj="FocusGroupItem",Yv=g.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...s}=e,r=$j(n),i=Nt(Jj,n);return f.jsx(rl.ItemSlot,{scope:n,children:f.jsx(ht.button,{...s,ref:t,onKeyDown:ze(e.onKeyDown,o=>{if(["Home","End",...Ih].includes(o.key)){let c=r().map(d=>d.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(o.key)&&c.reverse(),Ih.includes(o.key)){const d=c.indexOf(o.currentTarget);c=c.slice(d+1)}setTimeout(()=>$u(c)),o.preventDefault()}})})})});function al(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $u(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function ek(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function cl(e,t){const n=Jt(t);Rs(()=>{let s=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(s),r.unobserve(e)}}},[e,n])}function Uu(e){return e?"open":"closed"}function Jv(e,t){return`${e}-trigger-${t}`}function ex(e,t){return`${e}-content-${t}`}function zo(e){return t=>t.pointerType==="mouse"?e(t):void 0}var tx=Fv,nx=$v,tk=Wv,sx=Hv,nk=qv,rx=Zv,ix=Kv,ox=Qv;const ax=g.forwardRef(({className:e,children:t,...n},s)=>f.jsxs(tx,{ref:s,className:V("relative z-10 flex w-full flex-1 items-center justify-center",e),...n,children:[t,f.jsx(dx,{})]}));ax.displayName=tx.displayName;const cx=g.forwardRef(({className:e,...t},n)=>f.jsx(nx,{ref:n,className:V("group flex flex-1 list-none w-full items-center justify-center space-x-1",e),...t}));cx.displayName=nx.displayName;const sk=tk,rk=Go("group inline-flex h-14 w-full items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"),lx=g.forwardRef(({className:e,children:t,...n},s)=>f.jsxs(sx,{ref:s,className:V(rk(),"group",e),...n,children:[t,f.jsx("div",{className:"h-full w-4"}),f.jsx(nw,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));lx.displayName=sx.displayName;const ux=g.forwardRef(({className:e,...t},n)=>f.jsx(ix,{ref:n,className:V("left-0 top-0 w-40 data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute",e),...t}));ux.displayName=ix.displayName;const ik=nk,dx=g.forwardRef(({className:e,...t},n)=>f.jsx("div",{className:V("absolute xl:left-full xl:top-0 -top-36 flex justify-center w-40"),children:f.jsx(ox,{className:V("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-40 rounded-md text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90",e),ref:n,...t})}));dx.displayName=ox.displayName;const ok=g.forwardRef(({className:e,...t},n)=>f.jsx(rx,{ref:n,className:V("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:f.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));ok.displayName=rx.displayName;const ak=({className:e,text:t,hoverItems:n,setIsOpen:s})=>{const r=Vo(i=>i.setSheet);return f.jsx(ax,{children:f.jsx(cx,{children:f.jsxs(sk,{className:"w-full",children:[f.jsx(lx,{className:V("bg-transparent h-14 flex gap-3 justify-between min-w-full text-base cursor-pointer items-center hover:bg-slate-300/50 transition-all",e),children:t}),f.jsx(ux,{className:"bg-surface_container shadow flex flex-col pb-2 rounded-[2px] w-40 items-center justify-center pt-2",children:n==null?void 0:n.map((i,o)=>f.jsx(ik,{onClick:()=>{s(!1),r(!1)},className:"h-14 py-2 flex items-center w-40 cursor-pointer px-4 hover:bg-slate-300/50 transition-all",children:f.jsx(Ce,{target:i.blank?"_blank":"",to:i.link??"",children:i.text})},o))})]})})})},gt=e=>e===Pt.RU?0:1,ll=[{title:"Тематические направления выставки",bottom_text:` Участники смогут продемонстрировать свои инновационные решения, наладить взаимовыгодные партнерства и выйти на новые рынки.`,data:[{title:"Текстильные машины и оборудование",img:"/theme/1.svg"},{title:"Одежда, обувь, кожаные изделия",img:"/theme/2.svg"},{title:"Переработка натуральных волокон",img:"/theme/3.svg"},{title:"Домашний текстиль и эко-текстиль",img:"/theme/4.svg"},{title:"Запасные части и вспомогательные материалы",img:"/theme/5.svg"},{title:"Химические средства и красители",img:"/theme/6.svg"},{title:"Аксессуары и швейная фурнитура",img:"/theme/7.svg"},{title:"Мода и дизайн",img:"/theme/8.svg"}]},{title:"Thematic areas of the exhibition",bottom_text:` Participants will be able to showcase innovative solutions, establish mutually beneficial partnerships, and enter new markets.`,data:[{title:"Textile machinery and equipment",img:"/theme/1.svg"},{title:"Clothing, footwear, leather goods",img:"/theme/2.svg"},{title:"Natural fibre processing",img:"/theme/3.svg"},{title:"Home textiles and eco-textiles",img:"/theme/4.svg"},{title:"Spare parts and auxiliary materials",img:"/theme/5.svg"},{title:"Chemicals and dyes",img:"/theme/6.svg"},{title:"Accessories and sewing supplies",img:"/theme/7.svg"},{title:"Fashion and design",img:"/theme/8.svg"}]}],fx=()=>{const e=Te(s=>s.lang),{data:t,isPending:n}=Tn({queryKey:["industries",e],queryFn:()=>zN(e),select:({data:s})=>s.data});return{data:t,isPending:n}},Zk=({className:e})=>{const t=Te(r=>r.lang),{data:n,isPending:s}=fx();return f.jsx("section",{className:V("relative w-full bg-[#FDEDEE] -z-10 py-10",e),children:f.jsx(qe,{children:s?f.jsx(Yn,{}):f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"h2 mb-4",children:ll[gt(t)].title}),f.jsx("div",{className:"grid md:grid-cols-4 grid-cols-2 gap-6",children:n==null?void 0:n.map((r,i)=>f.jsx(Hp,{...r},i))}),f.jsxs("div",{className:"flex items-center gap-3 mt-8 text-on_surface_v text-lg",children:[f.jsx("div",{className:"md:w-1 w-4 md:h-[38px] h-40 bg-teritary_08"}),f.jsx("p",{className:"text-18",children:ll[gt(t)].bottom_text})]})]})})})},hx=[{title:"Время выставки",data:[{name:"Монтаж выставки",date:"12 Мая – 10 Июня 2025 года"},{name:"Работа",date:"11–13 Июня 2025 года"},{name:"Демонтаж",date:"13–14 Июня 2025 года"}]},{title:"Exhibition time",data:[{name:"Exhibition assembly",date:"12 May — 10 June 2025"},{name:"Exhibition days",date:"11–13 June 2025"},{name:"Exhibition dismantling",date:"13–14 June 2025"}]}],px=()=>{const e=Te(s=>s.lang),{data:t,isPending:n}=Tn({queryKey:["exhibiton-time",e],queryFn:()=>WN(e),select:({data:s})=>s.data});return{data:t,isPending:n}},Kk=({className:e})=>{const t=Te(r=>r.lang),{data:n,isPending:s}=px();return f.jsx("section",{className:V("bg-surface_container py-10 md:py-20",e),children:f.jsx(qe,{children:s?f.jsx(Yn,{}):f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"h2 mb-6",children:hx[gt(t)].title}),f.jsx("div",{className:"flex flex-col md:flex-row items-center gap-6",children:n==null?void 0:n.map((r,i)=>g.createElement(qp,{bottomClassName:"!bg-white rounded-b-[2px]",...r,key:i,className:"w-full"}))})]})})})},Lh=[{title:"Место проведения",data:["Выставочный центр Торгово-промышленной палаты Туркменистана – это современная площадка для проведения международных выставок, конференций, форумов и деловых встреч","Центр оснащен передовыми техническими решениями, включая мультимедийное оборудование, системы звукоусиления и освещения, конференц-залы с синхронным переводом, а также удобные зоны для переговоров. Просторные выставочные павильоны обеспечивают комфортные условия для демонстрации продукции и услуг. "]},{title:"Venue",data:["The Exhibition Centre of the Chamber of Commerce and Industry of Turkmenistan is a modern venue designed for international exhibitions, conferences, forums, and business meetings.","The centre is equipped with cutting-edge technical solutions, including multimedia equipment, sound and lighting systems, conference rooms with simultaneous translation, and comfortable areas for negotiations. Spacious exhibition pavilions provide ideal conditions for showcasing products and services."]}],Gk=({className:e})=>{const t=Te(n=>n.lang);return f.jsx("section",{className:V("gap-6 relative overflow-hidden",e),children:f.jsxs(qe,{className:"md:py-20 py-10 grid-cols-1 lg:grid-cols-2 lg:gap-12 gap-0 grid",children:[f.jsxs("div",{className:"flex-[0_0_50%]",children:[f.jsx("h3",{className:"h2 mb-6",children:Lh[gt(t)].title}),f.jsx("div",{className:"text-lg flex flex-col gap-6 text-on_surface_v normal mb-10",children:Lh[gt(t)].data.map(n=>f.jsx("p",{children:n},n))})]}),f.jsx("div",{className:"h-full max-size-[600px] flex-[0_0_50%]",children:f.jsx("img",{src:"/about-place.jpg",alt:"",className:"size-full object-contain"})})]})})},eo=[{title:"Приглашение к участию",p:"Министерство текстильной промышленности Туркменистана приглашает бизнес-сообщество со всего мира присоединиться к этому уникальному событию, которое станет важным шагом к укреплению позиций Туркменистана в международной экономической арене.",button1:"Забронировать стенд",button2:"B2B | B2G встречи"},{title:"Invitation to Participate",p:"Ministry of Textile Industry of Turkmenistan invites the global business community to join this unique event, which will be a significant step toward strengthening Turkmenistan’s position on the global economic stage",button1:"Book a stand",button2:"B2B | B2G meetings"}],Qk=({className:e})=>{const t=Te(n=>n.lang);return f.jsxs("section",{className:V("md:py-20 py-10 relative overflow-hidden",e),children:[f.jsx("img",{src:"/CTA.png",className:"absolute top-0 left-0 size-full -z-10 object-cover"}),f.jsxs(qe,{children:[f.jsx("h3",{className:"h2 text-center !text-on_primary mb-6",children:eo[gt(t)].title}),f.jsx("p",{className:"text-center md:text-lg text-sm text-primary_03 max-w-[828px] px-5 mx-auto mb-10",children:eo[gt(t)].p}),f.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[f.jsx(Ce,{to:"/stend-form",className:"w-full",children:f.jsx(ot,{className:"bg-reverse_primary w-full text-primary hover:bg-reverse_primary/90",children:eo[gt(t)].button1})}),f.jsx(Ce,{to:"/B2B-B2GS",className:"w-full",children:f.jsx(ot,{className:"bg-reverse_primary w-full hover:bg-reverse_primary/90 text-primary",children:eo[gt(t)].button2})})]})]})]})},mx=e=>{const t=Te(r=>r.lang),{data:n,isPending:s}=Tn({queryKey:["static-words",t,e],queryFn:()=>BN(t,e),select:({data:r})=>r.data});return{data:n,isPending:s}},Xk=()=>{var h,y,m,p,v,x,b,w;const e=Te(_=>_.lang),{t}=vr("about"),{data:n,isPending:s}=mx("2"),r=(h=n==null?void 0:n.find(_=>_.key==="about_1"))==null?void 0:h.text,i=(y=n==null?void 0:n.find(_=>_.key==="about_2"))==null?void 0:y.text,o=(m=n==null?void 0:n.find(_=>_.key==="about_3"))==null?void 0:m.text,a=(p=n==null?void 0:n.find(_=>_.key==="about_4"))==null?void 0:p.text,c=(v=n==null?void 0:n.find(_=>_.key==="about_5"))==null?void 0:v.list,l=(x=n==null?void 0:n.find(_=>_.key==="about_6"))==null?void 0:x.text,u=(b=n==null?void 0:n.find(_=>_.key==="about_7"))==null?void 0:b.text,d=(w=n==null?void 0:n.find(_=>_.key==="about_8"))==null?void 0:w.list;return s?f.jsx(Yn,{}):f.jsxs(qe,{className:"flex flex-col md:my-20 my-10 gap-16",children:[f.jsxs("div",{className:"flex flex-col gap-6",children:[f.jsx("h2",{className:"h2",children:r}),f.jsx("div",{className:"flex flex-col p gap-3",dangerouslySetInnerHTML:{__html:i??""}})]}),f.jsxs("div",{className:"flex flex-col gap-6",children:[f.jsx("h3",{className:"h2",children:o}),f.jsx("h4",{className:"p",children:a}),f.jsx("ol",{type:"1",className:"list-decimal pl-8 flex flex-col gap-3 ",children:c==null?void 0:c.map((_,S)=>f.jsx("li",{className:"p",children:e==="ru"?_.text_ru:_.text_en},S))})]}),f.jsxs("div",{className:"flex flex-col gap-6",children:[f.jsx("h2",{className:"h2",children:l}),f.jsx("h3",{className:"p",children:u}),f.jsx("ul",{className:"list-disc pl-8 flex flex-col gap-3 p",children:d==null?void 0:d.map((_,S)=>f.jsxs("li",{children:[" ",e==="ru"?_.text_ru:_.text_en]},S))})]}),f.jsx(Ce,{className:"w-fit mx-auto",to:"/become-sponsor",children:f.jsx(ot,{children:t("main.button")})})]})},ck={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function lk(e,t){const n=e.scrollSnapList();return typeof t=="number"?n.map(()=>t):t(n,e)}function uk(e,t){const n=e.rootNode();return t&&t(n)||n}function ga(e={}){let t,n,s,r,i=null,o=0,a=!1,c=!1,l=!1,u=!1;function d(F,J){n=F;const{mergeOptions:X,optionsAtMedia:q}=J,Z=X(ck,ga.globalOptions),re=X(Z,e);if(t=q(re),n.scrollSnapList().length<=1)return;u=t.jump,s=!1,r=lk(n,t.delay);const{eventStore:fe,ownerDocument:ye}=n.internalEngine(),Be=!!n.internalEngine().options.watchDrag,Ze=uk(n,t.rootNode);fe.add(ye,"visibilitychange",x),Be&&n.on("pointerDown",w),Be&&!t.stopOnInteraction&&n.on("pointerUp",_),t.stopOnMouseEnter&&fe.add(Ze,"mouseenter",S),t.stopOnMouseEnter&&!t.stopOnInteraction&&fe.add(Ze,"mouseleave",A),t.stopOnFocusIn&&n.on("slideFocusStart",v),t.stopOnFocusIn&&!t.stopOnInteraction&&fe.add(n.containerNode(),"focusout",p),t.playOnInit&&p()}function h(){n.off("pointerDown",w).off("pointerUp",_).off("slideFocusStart",v),v(),s=!0,a=!1}function y(){const{ownerWindow:F}=n.internalEngine();F.clearTimeout(o),o=F.setTimeout(I,r[n.selectedScrollSnap()]),i=new Date().getTime(),n.emit("autoplay:timerset")}function m(){const{ownerWindow:F}=n.internalEngine();F.clearTimeout(o),o=0,i=null,n.emit("autoplay:timerstopped")}function p(){if(!s){if(b()){l=!0;return}a||n.emit("autoplay:play"),y(),a=!0}}function v(){s||(a&&n.emit("autoplay:stop"),m(),a=!1)}function x(){if(b())return l=a,v();l&&p()}function b(){const{ownerDocument:F}=n.internalEngine();return F.visibilityState==="hidden"}function w(){c||v()}function _(){c||p()}function S(){c=!0,v()}function A(){c=!1,p()}function E(F){typeof F<"u"&&(u=F),p()}function R(){a&&v()}function N(){a&&p()}function M(){return a}function I(){const{index:F}=n.internalEngine(),J=F.clone().add(1).get(),X=n.scrollSnapList().length-1,q=t.stopOnLastSnap&&J===X;if(n.canScrollNext()?n.scrollNext(u):n.scrollTo(0,u),n.emit("autoplay:select"),q)return v();p()}function O(){if(!i)return null;const F=r[n.selectedScrollSnap()],J=new Date().getTime()-i;return F-J}return{name:"autoplay",options:e,init:d,destroy:h,play:E,stop:R,reset:N,isPlaying:M,timeUntilNext:O}}ga.globalOptions=void 0;const Yk=()=>{const{t:e}=vr("home"),[t]=En({loop:!0},[ga({delay:5e3,stopOnInteraction:!1})]),n=wo("(min-width: 1024px)"),s=wo("(min-width: 768px)");function r(){return n?e("banners.lg",{returnObjects:!0}):s?e("banners.md",{returnObjects:!0}):e("banners.sm",{returnObjects:!0})}const i=r();return f.jsx("div",{className:"mb-6",children:f.jsx("section",{className:"flex flex-col gap-5",children:f.jsx("div",{ref:t,className:"embla overflow-hidden",children:f.jsx("div",{className:"embla__container flex",children:i==null?void 0:i.map((o,a)=>o.link?f.jsx(Ce,{to:o.link,className:"embla__slide flex-[0_0_100%]",children:f.jsx("img",{src:o.path,className:"size-full object-cover lg:max-h-[600px] lg:min-h-[320px]"})},a):f.jsx("div",{className:"embla__slide flex-[0_0_100%]",children:f.jsx("img",{src:o.path,className:"size-full object-cover lg:max-h-[600px] lg:min-h-[320px]"})},a))})})})})},dk=()=>{const e=Te(s=>s.lang),{data:t,isPending:n}=Tn({queryKey:["home-contacts",e],queryFn:()=>UN(e),select:({data:s})=>s.data});return{data:t,isPending:n}},Jk=({className:e})=>{const t=Te(o=>o.lang),{data:n,isPending:s}=px(),{data:r}=dk(),i=gt(t);return s?f.jsx(Yn,{}):f.jsx("section",{className:V("bg-surface_high my-20 pt-10 pb-20",e),children:f.jsxs(qe,{children:[f.jsx("h2",{className:"h2 mb-6",children:hx[i].title}),f.jsxs("div",{className:"flex flex-col gap-6",children:[f.jsx("div",{className:"flex flex-col md:flex-row items-center gap-6",children:n==null?void 0:n.map((o,a)=>g.createElement(qp,{...o,key:a,className:"w-full"}))}),f.jsx("div",{className:"md:p-10 pt-16 flex flex-col md:flex-row items-center gap-6",children:r==null?void 0:r.map((o,a)=>g.createElement(b0,{...o,key:a,className:"w-full"}))}),f.jsx(Ce,{to:"/stend-form",className:"md:w-fit w-full mx-auto",children:f.jsx(ot,{className:"w-full",children:t===Pt.RU?"Забронируйте стенд":"Book a stand"})})]})]})})},fk=[{h2:"Выставка-ярмарка «TurkmenTextile Expo-2025» в Ашхабаде",p:`Международная выставка-ярмарка, которая объединит мировых лидеров отрасли, инновационных производителей и творческих дизайнеров. Наша миссия – укрепить позиции Туркменистана как ключевого центра текстильной и модной индустрии. diff --git a/dist/index.html b/dist/index.html index e990071..7dc288f 100644 --- a/dist/index.html +++ b/dist/index.html @@ -66,9 +66,9 @@ })(window, document, "script", "dataLayer", "GTM-NK394LVK"); Turkmen Textile - + - + diff --git a/src/services/service.ts b/src/services/service.ts index 324fd03..9e3a6c4 100644 --- a/src/services/service.ts +++ b/src/services/service.ts @@ -121,7 +121,7 @@ export const getExhibitionTime = async (lang: LangState["lang"]) => { }; export const getNews = async (lang: "ru" | "en") => { - const data = axios_url.get(`news`, { + const data = axios_url.get(`news?per_page=100`, { headers: { "Accept-Language": lang, },