diff --git a/dist/assets/index-6hO7ebSr.js b/dist/assets/index-Bs2muxxu.js similarity index 99% rename from dist/assets/index-6hO7ebSr.js rename to dist/assets/index-Bs2muxxu.js index f260f39..84b7a65 100644 --- a/dist/assets/index-6hO7ebSr.js +++ b/dist/assets/index-Bs2muxxu.js @@ -1 +1 @@ -var Zt=Object.defineProperty;var es=(n,e,t)=>e in n?Zt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var b=(n,e,t)=>es(n,typeof e!="symbol"?e+"":e,t);import{u as O,i as ts,j as a,H as ss,F as ns,c as Z,a as is,b as as,d as rs,e as os,f as ls,g as cs,h as us,k as ds,z as v,l as Oe,m as ke,S as tt,n as ms,P as je,o as ie,p as vt,q as ps,r as hs,s as Ke,t as Se,v as T,w as ze,x as W,y as U,A as q,B as N,C as H,L as We,D as Ie,E as Fe,G as he,I as Ue,J as $e,K as fs,M as ue,N as gs,O as xs,Q as ys,R as bs,T as ks,U as vs,V as ws,W as ge,X as js,Y as Ss,Z as ee,_ as Ts,$ as wt,a0 as Ns,a1 as jt,a2 as _s,a3 as fe,a4 as qe,a5 as Es,a6 as St,a7 as Tt,a8 as zs,a9 as st,aa as Cs,ab as Nt,ac as Rs,ad as Ls,ae as Ps,af as Os,ag as Is,ah as Fs,ai as $s}from"./ui-library-DPhFu9EK.js";import{f as As,a as y,O as Ds,e as le,u as Ms,g as Je,L as nt,h as Bs,i as Gs}from"./react-vendor-CJoWVsUG.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 r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();var _e={},it;function Vs(){if(it)return _e;it=1;var n=As();return _e.createRoot=n.createRoot,_e.hydrateRoot=n.hydrateRoot,_e}var Hs=Vs();const j=n=>typeof n=="string",ye=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},at=n=>n==null?"":""+n,Ks=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},Ws=/###/g,rt=n=>n&&n.indexOf("###")>-1?n.replace(Ws,"."):n,ot=n=>!n||j(n),be=(n,e,t)=>{const s=j(e)?e.split("."):e;let i=0;for(;i{const{obj:s,k:i}=be(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],o=e.slice(0,e.length-1),c=be(n,o,Object);for(;c.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),c=be(n,o,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${r}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${r}`]=t},Us=(n,e,t,s)=>{const{obj:i,k:r}=be(n,e,Object);i[r]=i[r]||[],i[r].push(t)},Ce=(n,e)=>{const{obj:t,k:s}=be(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},qs=(n,e,t)=>{const s=Ce(n,t);return s!==void 0?s:Ce(e,t)},_t=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?j(n[s])||n[s]instanceof String||j(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):_t(n[s],e[s],t):n[s]=e[s]);return n},de=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Js={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ys=n=>j(n)?n.replace(/[&<>"'\/]/g,e=>Js[e]):n;class Xs{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=[" ",",","?","!",";"],Zs=new Xs(20),en=(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=Zs.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(n);if(!r){const o=n.indexOf(t);o>0&&!i.test(n.substring(0,o))&&(r=!0)}return r},Ge=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 r=0;r-1&&ln==null?void 0:n.replace("_","-"),tn={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 Le{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||tn,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[c,l]=o;for(let u=0;u{let[c,l]=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,m;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;e.indexOf(".")>-1?c=e.split("."):(c=[e,t],s&&(Array.isArray(s)?c.push(...s):j(s)&&r?c.push(...s.split(r)):c.push(s)));const l=Ce(this.data,c);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=c[0],t=c[1],s=c.slice(2).join(".")),l||!o||!j(s)?l:Ge((m=(u=this.data)==null?void 0:u[e])==null?void 0:m[t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let c=[e,t];s&&(c=c.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(c=e.split("."),i=t,t=c[1]),this.addNamespaces(t),lt(this.data,c,i),r.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 r in s)(j(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[e,t];e.indexOf(".")>-1&&(c=e.split("."),i=s,s=t,t=c[1]),this.addNamespaces(t);let l=Ce(this.data,c)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?_t(l,s,r):l={...l,...s},lt(this.data,c,l),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 Et={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{var o;e=((o=this.processors[r])==null?void 0:o.process(e,t,s,i))??e}),e}};const ut={},dt=n=>!j(n)&&typeof n!="boolean"&&typeof n!="number";class Pe extends Ae{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ks(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Q.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 r=t.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!en(e,s,i);if(o&&!c){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:j(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:j(r)?[r]:r}}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,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(e[e.length-1],t),l=c[c.length-1],u=t.lng||this.language,m=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(m){const I=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${I}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${I}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:o}const h=this.resolve(e,t);let d=h==null?void 0:h.res;const f=(h==null?void 0:h.usedKey)||o,p=(h==null?void 0:h.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,k=t.count!==void 0&&!j(t.count),S=Pe.hasDefaultValue(t),E=k?this.pluralResolver.getSuffix(u,t.count,t):"",L=t.ordinal&&k?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",C=k&&!t.ordinal&&t.count===0,z=C&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${E}`]||t[`defaultValue${L}`]||t.defaultValue;let _=d;w&&!d&&S&&(_=z);const M=dt(_),te=Object.prototype.toString.apply(_);if(w&&_&&M&&g.indexOf(te)<0&&!(j(x)&&Array.isArray(_))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const I=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,_,{...t,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=I,h.usedParams=this.getUsedParamsDetails(t),h):I}if(r){const I=Array.isArray(_),B=I?[]:{},Te=I?p:f;for(const J in _)if(Object.prototype.hasOwnProperty.call(_,J)){const Y=`${Te}${r}${J}`;S&&!d?B[J]=this.translate(Y,{...t,defaultValue:dt(z)?z[J]:void 0,joinArrays:!1,ns:c}):B[J]=this.translate(Y,{...t,joinArrays:!1,ns:c}),B[J]===Y&&(B[J]=_[J])}d=B}}else if(w&&j(x)&&Array.isArray(d))d=d.join(x),d&&(d=this.extendTranslation(d,e,t,s));else{let I=!1,B=!1;!this.isValidLookup(d)&&S&&(I=!0,d=z),this.isValidLookup(d)||(B=!0,d=o);const J=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:d,Y=S&&z!==d&&this.options.updateMissing;if(B||I||Y){if(this.logger.log(Y?"updateKey":"missingKey",u,l,o,Y?z:d),r){const V=this.resolve(o,{...t,keySeparator:!1});V&&V.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 G=[];const Ne=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ne&&Ne[0])for(let V=0;V{var et;const Ze=S&&xe!==d?xe:J;this.options.missingKeyHandler?this.options.missingKeyHandler(V,l,oe,Ze,Y,t):(et=this.backendConnector)!=null&&et.saveMissing&&this.backendConnector.saveMissing(V,l,oe,Ze,Y,t),this.emit("missingKey",V,l,oe,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?G.forEach(V=>{const oe=this.pluralResolver.getSuffixes(V,t);C&&t[`defaultValue${this.options.pluralSeparator}zero`]&&oe.indexOf(`${this.options.pluralSeparator}zero`)<0&&oe.push(`${this.options.pluralSeparator}zero`),oe.forEach(xe=>{Qe([V],o+xe,t[`defaultValue${xe}`]||z)})}):Qe(G,o,z))}d=this.extendTranslation(d,e,t,h,s),B&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(B||I)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,I?d:void 0))}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(t),h):d}extendTranslation(e,t,s,i,r){var u,m;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 h=j(e)&&(((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(h){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let f=s.replace&&!j(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),h){const p=e.match(this.interpolator.nestingRegexp),g=p&&p.length;d1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,o,c;return j(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),m=u.key;i=m;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=t.count!==void 0&&!j(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(j(t.context)||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(x=>{var w,k;this.isValidLookup(s)||(c=x,!ut[`${g[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(c))&&(ut[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${c}" 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 C;if(this.isValidLookup(s))return;o=S;const E=[m];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(E,m,S,x,t);else{let z;d&&(z=this.pluralResolver.getSuffix(S,t.count,t));const _=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(E.push(m+z),t.ordinal&&z.indexOf(M)===0&&E.push(m+z.replace(M,this.options.pluralSeparator)),f&&E.push(m+_)),p){const te=`${m}${this.options.contextSeparator}${t.context}`;E.push(te),d&&(E.push(te+z),t.ordinal&&z.indexOf(M)===0&&E.push(te+z.replace(M,this.options.pluralSeparator)),f&&E.push(te+_))}}let L;for(;L=E.pop();)this.isValidLookup(s)||(r=L,s=this.getResource(S,x,L,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:c}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(r=this.i18nFormat)!=null&&r.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&&!j(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 r of t)delete i[r]}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 mt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Q.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(j(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(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),j(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=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return j(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):j(e)&&r(this.formatLanguageCode(e)),s.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}const pt={zero:0,one:1,two:2,few:3,many:4,other:5},ht={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Q.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",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];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!"),ht;if(!e.match(/-|_/))return ht;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[r]=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,r)=>pt[i]-pt[r]).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 ft=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,r=qs(n,e,t);return!r&&i&&j(t)&&(r=Ge(n,t,s),r===void 0&&(r=Ge(e,t,s))),r},Me=n=>n.replace(/\$/g,"$$$$");class nn{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Q.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:r,prefixEscaped:o,suffix:c,suffixEscaped:l,formatSeparator:u,unescapeSuffix:m,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:k}=e.interpolation;this.escape=t!==void 0?t:Ys,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?de(r):o||"{{",this.suffix=c?de(c):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=m?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=d?de(d):f||de("$t("),this.nestingSuffix=p?de(p):g||de(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||1e3,this.alwaysFormat=k!==void 0?k:!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 r,o,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const k=ft(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,s,{...i,...t,interpolationkey:p}):k}const g=p.split(this.formatSeparator),x=g.shift().trim(),w=g.join(this.formatSeparator).trim();return this.format(ft(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,s,{...i,...t,interpolationkey:x})};this.resetRegExp();const m=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((f=i==null?void 0:i.interpolation)==null?void 0:f.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>Me(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?Me(this.escape(p)):Me(p)}].forEach(p=>{for(c=0;r=p.regex.exec(e);){const g=r[1].trim();if(o=u(g),o===void 0)if(typeof m=="function"){const w=m(e,r,i);o=j(w)?w:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(h){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),o="";else!j(o)&&!this.useRawValueToEscape&&(o=at(o));const x=p.safeValue(o);if(e=e.replace(r[0],x),h?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=r[0].length):p.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const c=(l,u)=>{const m=this.nestingOptionsSeparator;if(l.indexOf(m)<0)return l;const h=l.split(new RegExp(`${m}[ ]*{`));let d=`{${h[1]}`;l=h[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${m}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&!j(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 m=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=m.shift(),l=m,u=!0}if(r=t(c.call(this,i[1].trim(),o),o),r&&i[0]===e&&!j(r))return r;j(r)||(r=at(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((m,h)=>this.format(m,h,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const an=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[c,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),m=c.trim();t[m]||(t[m]=u),u==="false"&&(t[m]=!1),u==="true"&&(t[m]=!0),isNaN(u)||(t[m]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},me=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=s+JSON.stringify(r);let c=e[o];return c||(c=n(Re(s),i),e[o]=c),c(t)}};class rn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Q.create("formatter"),this.options=e,this.formats={number:me((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:me((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:me((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:me((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:me((t,s)=>{const i=new Intl.ListFormat(t,{...s});return r=>i.format(r)})},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()]=me(t)}format(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(c=>c.indexOf(")")>-1)){const c=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,c)].join(this.formatSeparator)}return r.reduce((c,l)=>{var h;const{formatName:u,formatOptions:m}=an(l);if(this.formats[u]){let d=c;try{const f=((h=i==null?void 0:i.formatParams)==null?void 0:h[i.interpolationkey])||{},p=f.locale||f.lng||i.locale||i.lng||s;d=this.formats[u](c,p,{...m,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return c},e)}}const on=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class ln extends Ae{constructor(e,t,s){var r,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=Q.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=(r=this.backend)==null?void 0:r.init)==null||o.call(r,s,i.backend,i)}queueLoad(e,t,s,i){const r={},o={},c={},l={};return e.forEach(u=>{let m=!0;t.forEach(h=>{const d=`${u}|${h}`;!s.reload&&this.store.hasResourceBundle(u,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,m=!1,o[d]===void 0&&(o[d]=!0),r[d]===void 0&&(r[d]=!0),l[h]===void 0&&(l[h]=!0)))}),m||(c[u]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&s&&this.store.addResourceBundle(r,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const c={};this.queue.forEach(l=>{Us(l.loaded,[r],o),on(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{c[u]||(c[u]={});const m=l.loaded[u];m.length&&m.forEach(h=>{c[u][h]===void 0&&(c[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=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:r,callback:o});return}this.readingCalls++;const c=(u,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&m&&i{this.read.call(this,e,t,s,i+1,r*2,o)},r);return}o(u,m)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(m=>c(null,m)).catch(c):c(null,u)}catch(u){c(u)}return}return l(e,t,c)}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();j(e)&&(e=this.languageUtils.toResolveHierarchy(e)),j(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.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],r=s[1];this.read(i,r,"read",void 0,void 0,(o,c)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,o),!o&&c&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,c),this.loaded(e,o,c)})}saveMissing(e,t,s,i,r){var l,u,m,h,d;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((h=(m=this.services)==null?void 0:m.utils)!=null&&h.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((d=this.backend)!=null&&d.create){const f={...o,isUpdate:r},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(e,t,s,i,f):g=p(e,t,s,i),g&&typeof g.then=="function"?g.then(x=>c(null,x)).catch(c):c(null,g)}catch(g){c(g)}else p(e,t,s,i,c,f)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const gt=()=>({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]),j(n[1])&&(e.defaultValue=n[1]),j(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}}),xt=n=>{var e,t;return j(n.ns)&&(n.ns=[n.ns]),j(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),j(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},Ee=()=>{},cn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ve extends Ae{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=xt(e),this.services={},this.logger=Q,this.modules={external:[]},cn(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&&(j(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=gt();this.options={...i,...this.options,...xt(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 r=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Q.init(r(this.modules.logger),this.options):Q.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=rn;const h=new mt(this.options);this.store=new ct(this.options.resources,this.options);const d=this.services;d.logger=Q,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new sn(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=r(m),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new nn(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new ln(r(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x1?p-1:0),x=1;x{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Ee),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const l=ye(),u=()=>{const m=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(d),s(h,d)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(e){var r,o;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee;const i=j(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 c=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>l(m)),(o=(r=this.options.preload)==null?void 0:r.forEach)==null||o.call(r,u=>l(u)),this.services.backendConnector.load(c,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(u)})}else s(null)}reloadResources(e,t,s){const i=ye();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=Ee),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(r)}),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"&&Et.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=ye();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(r(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(l,function(){return s.t(...arguments)})},c=l=>{var m,h;!e&&!l&&this.services.languageDetector&&(l=[]);const u=j(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),(h=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||h.call(m,u)),this.loadResources(u,d=>{o(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(e),i}getFixedT(e,t,s){var i=this;const r=function(o,c){let l;if(typeof c!="object"){for(var u=arguments.length,m=new Array(u>2?u-2:0),h=2;h`${l.keyPrefix}${d}${p}`):f=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(f,l)};return j(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,r}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,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(c,l)=>{const u=this.services.backendConnector.state[`${c}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const c=t.precheck(this,o);if(c!==void 0)return c}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!i||o(r,e)))}loadNamespaces(e,t){const s=ye();return this.options.ns?(j(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=ye();j(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{s.resolve(),t&&t(o)}),s):(t&&t(),Promise.resolve())}dir(e){var i,r;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=((r=this.services)==null?void 0:r.languageUtils)||new mt(gt());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 ve(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new ve(i);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(c=>{r[c]=this[c]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s){const c=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},Object.keys(l[u]).reduce((m,h)=>(m[h]={...l[u][h]},m),{})),{});r.store=new ct(c,i),r.services.resourceStore=r.store}return r.translator=new Pe(r.services,i),r.translator.on("*",function(c){for(var l=arguments.length,u=new Array(l>1?l-1:0),m=1;m{const n=O(e=>e.lang);return y.useEffect(()=>{F.changeLanguage(n)},[n]),null};var fa="1.3.17";function zt(n,e,t){return Math.max(n,Math.min(e,t))}function ga(n,e,t){return(1-t)*n+t*e}function xa(n,e,t,s){return ga(n,e,1-Math.exp(-t*s))}function ya(n,e){return(n%e+e)%e}var ba=class{constructor(){b(this,"isRunning",!1);b(this,"value",0);b(this,"from",0);b(this,"to",0);b(this,"currentTime",0);b(this,"lerp");b(this,"duration");b(this,"easing");b(this,"onUpdate")}advance(n){var t;if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=n;const s=zt(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=xa(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:r,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,r==null||r(),this.onUpdate=o}};function ka(n,e){let t;return function(...s){let i=this;clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(i,s)},e)}}var va=class{constructor(n,e,{autoResize:t=!0,debounce:s=250}={}){b(this,"width",0);b(this,"height",0);b(this,"scrollHeight",0);b(this,"scrollWidth",0);b(this,"debouncedResize");b(this,"wrapperResizeObserver");b(this,"contentResizeObserver");b(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});b(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});b(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=ka(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}}},Ct=class{constructor(){b(this,"events",{})}emit(n,...e){var s;let t=this.events[n]||[];for(let i=0,r=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={}}},yt=100/6,ae={passive:!1},wa=class{constructor(n,e={wheelMultiplier:1,touchMultiplier:1}){b(this,"touchStart",{x:0,y:0});b(this,"lastDelta",{x:0,y:0});b(this,"window",{width:0,height:0});b(this,"emitter",new Ct);b(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})});b(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})});b(this,"onTouchEnd",n=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:n})});b(this,"onWheel",n=>{let{deltaX:e,deltaY:t,deltaMode:s}=n;const i=s===1?yt:s===2?this.window.width:1,r=s===1?yt:s===2?this.window.height:1;e*=i,t*=r,e*=this.options.wheelMultiplier,t*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:t,event:n})});b(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,ae),this.element.addEventListener("touchstart",this.onTouchStart,ae),this.element.addEventListener("touchmove",this.onTouchMove,ae),this.element.addEventListener("touchend",this.onTouchEnd,ae)}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,ae),this.element.removeEventListener("touchstart",this.onTouchStart,ae),this.element.removeEventListener("touchmove",this.onTouchMove,ae),this.element.removeEventListener("touchend",this.onTouchEnd,ae)}},bt=n=>Math.min(1,1.001-Math.pow(2,-10*n)),ja=class{constructor({wrapper:n=window,content:e=document.documentElement,eventsTarget:t=n,smoothWheel:s=!0,syncTouch:i=!1,syncTouchLerp:r=.075,touchInertiaExponent:o=1.7,duration:c,easing:l,lerp:u=.1,infinite:m=!1,orientation:h="vertical",gestureOrientation:d=h==="horizontal"?"both":"vertical",touchMultiplier:f=1,wheelMultiplier:p=1,autoResize:g=!0,prevent:x,virtualScroll:w,overscroll:k=!0,autoRaf:S=!1,anchors:E=!1,autoToggle:L=!1,allowNestedScroll:C=!1,__experimental__naiveDimensions:z=!1,naiveDimensions:_=z,stopInertiaOnNavigate:M=!1}={}){b(this,"_isScrolling",!1);b(this,"_isStopped",!1);b(this,"_isLocked",!1);b(this,"_preventNextNativeScrollEvent",!1);b(this,"_resetVelocityTimeout",null);b(this,"_rafId",null);b(this,"isTouching");b(this,"time",0);b(this,"userData",{});b(this,"lastVelocity",0);b(this,"velocity",0);b(this,"direction",0);b(this,"options");b(this,"targetScroll");b(this,"animatedScroll");b(this,"animate",new ba);b(this,"emitter",new Ct);b(this,"dimensions");b(this,"virtualScroll");b(this,"onScrollEnd",n=>{n instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&n.stopPropagation()});b(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});b(this,"onTransitionEnd",n=>{n.propertyName.includes("overflow")&&this.checkOverflow()});b(this,"onClick",n=>{const t=n.composedPath().filter(s=>s instanceof HTMLAnchorElement&&s.getAttribute("href"));if(this.options.anchors){const s=t.find(i=>{var r;return(r=i.getAttribute("href"))==null?void 0:r.includes("#")});if(s){const i=s.getAttribute("href");if(i){const r=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,o=`#${i.split("#")[1]}`;this.scrollTo(o,r)}}}this.options.stopInertiaOnNavigate&&t.find(i=>i.host===window.location.host)&&this.reset()});b(this,"onPointerDown",n=>{n.button===1&&this.reset()});b(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"),r=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 l=this.options.gestureOrientation==="vertical"&&t===0||this.options.gestureOrientation==="horizontal"&&e===0;if(o||l)return;let u=s.composedPath();u=u.slice(0,u.indexOf(this.rootElement));const m=this.options.prevent;if(u.find(x=>{var w,k,S;return x instanceof HTMLElement&&(typeof m=="function"&&(m==null?void 0:m(x))||((w=x.hasAttribute)==null?void 0:w.call(x,"data-lenis-prevent"))||i&&((k=x.hasAttribute)==null?void 0:k.call(x,"data-lenis-prevent-touch"))||r&&((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.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&r)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let d=t;this.options.gestureOrientation==="both"?d=Math.abs(t)>Math.abs(e)?t:e:this.options.gestureOrientation==="horizontal"&&(d=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll0||this.animatedScroll===this.limit&&t<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();const f=i&&this.options.syncTouch,g=i&&s.type==="touchend";g&&(d=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+d,{programmatic:!1,...f?{lerp:g?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});b(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))}});b(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=fa,(!n||n===document.documentElement)&&(n=window),typeof c=="number"&&typeof l!="function"?l=bt:typeof l=="function"&&typeof c!="number"&&(c=1),this.options={wrapper:n,content:e,eventsTarget:t,smoothWheel:s,syncTouch:i,syncTouchLerp:r,touchInertiaExponent:o,duration:c,easing:l,lerp:u,infinite:m,gestureOrientation:d,orientation:h,touchMultiplier:f,wheelMultiplier:p,autoResize:g,prevent:x,virtualScroll:w,overscroll:k,autoRaf:S,anchors:E,autoToggle:L,allowNestedScroll:C,naiveDimensions:_,stopInertiaOnNavigate:M},this.dimensions=new va(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.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new wa(t,{touchMultiplier:f,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),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.stopInertiaOnNavigate)&&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)}get overflow(){const n=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[n]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}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(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(n,{offset:e=0,immediate:t=!1,lock:s=!1,programmatic:i=!0,lerp:r=i?this.options.lerp:void 0,duration:o=i?this.options.duration:void 0,easing:c=i?this.options.easing:void 0,onStart:l,onComplete:u,force:m=!1,userData:h}={}){if(!((this.isStopped||this.isLocked)&&!m)){if(typeof n=="string"&&["top","left","start","#"].includes(n))n=0;else if(typeof n=="string"&&["bottom","right","end"].includes(n))n=this.limit;else{let d;if(typeof n=="string"?(d=document.querySelector(n),d||(n==="#top"?n=0:console.warn("Lenis: Target not found",n))):n instanceof HTMLElement&&(n!=null&&n.nodeType)&&(d=n),d){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?p.left:p.top}const f=d.getBoundingClientRect();n=(this.isHorizontal?f.left:f.top)+this.animatedScroll}}if(typeof n=="number"){if(n+=e,n=Math.round(n),this.options.infinite){if(i){this.targetScroll=this.animatedScroll=this.scroll;const d=n-this.animatedScroll;d>this.limit/2?n=n-this.limit:d<-this.limit/2&&(n=n+this.limit)}}else n=zt(0,n,this.limit);if(n===this.targetScroll){l==null||l(this),u==null||u(this);return}if(this.userData=h??{},t){this.animatedScroll=this.targetScroll=n,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),u==null||u(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}i||(this.targetScroll=n),typeof o=="number"&&typeof c!="function"?c=bt:typeof c=="function"&&typeof o!="number"&&(o=1),this.animate.fromTo(this.animatedScroll,n,{duration:o,easing:c,lerp:r,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",l==null||l(this)},onUpdate:(d,f)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=d-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=d,this.setScroll(this.scroll),i&&(this.targetScroll=d),f||this.emit(),f&&(this.reset(),this.emit(),u==null||u(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 r,o,c,l,u,m,h,d;const f=this.options.gestureOrientation;if(s-(i.time??0)>2e3){i.time=Date.now();const L=window.getComputedStyle(n);i.computedStyle=L;const C=L.overflowX,z=L.overflowY;if(r=["auto","overlay","scroll"].includes(C),o=["auto","overlay","scroll"].includes(z),i.hasOverflowX=r,i.hasOverflowY=o,!r&&!o||f==="vertical"&&!o||f==="horizontal"&&!r)return!1;u=n.scrollWidth,m=n.scrollHeight,h=n.clientWidth,d=n.clientHeight,c=u>h,l=m>d,i.isScrollableX=c,i.isScrollableY=l,i.scrollWidth=u,i.scrollHeight=m,i.clientWidth=h,i.clientHeight=d}else c=i.isScrollableX,l=i.isScrollableY,r=i.hasOverflowX,o=i.hasOverflowY,u=i.scrollWidth,m=i.scrollHeight,h=i.clientWidth,d=i.clientHeight;if(!r&&!o||!c&&!l||f==="vertical"&&(!o||!l)||f==="horizontal"&&(!r||!c))return!1;let p;if(f==="horizontal")p="x";else if(f==="vertical")p="y";else{const L=e!==0,C=t!==0;L&&r&&c&&(p="x"),C&&o&&l&&(p="y")}if(!p)return!1;let g,x,w,k,S;if(p==="x")g=n.scrollLeft,x=u-h,w=e,k=r,S=c;else if(p==="y")g=n.scrollTop,x=m-d,w=t,k=o,S=l;else return!1;return(w>0?g0)&&k&&S}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.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?ya(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()}},Sa=class{constructor(n){b(this,"listeners",[]);this.state=n}set(n){this.state=n;for(let e of this.listeners)e(this.state)}subscribe(n){return this.listeners=[...this.listeners,n],()=>{this.listeners=this.listeners.filter(e=>e!==n)}}get(){return this.state}};function Ta(n){const[e,t]=y.useState(n.get());return y.useEffect(()=>n.subscribe(s=>t(s)),[n]),e}var Rt=y.createContext(null),Ve=new Sa(null),Na=y.forwardRef(({children:n,root:e=!1,options:t={},autoRaf:s=!0,...i},r)=>{const o=y.useRef(null),c=y.useRef(null),[l,u]=y.useState(void 0);y.useImperativeHandle(r,()=>({wrapper:o.current,content:c.current,lenis:l}),[l]),y.useEffect(()=>{const f=new ja({...t,...o.current&&c.current&&{wrapper:o.current,content:c.current},autoRaf:(t==null?void 0:t.autoRaf)??s});return u(f),()=>{f.destroy(),u(void 0)}},[e,JSON.stringify({...t,wrapper:null,content:null})]);const m=y.useRef([]),h=y.useCallback((f,p)=>{m.current.push({callback:f,priority:p}),m.current.sort((g,x)=>g.priority-x.priority)},[]),d=y.useCallback(f=>{m.current=m.current.filter(p=>p.callback!==f)},[]);return y.useEffect(()=>{if(e&&l)return Ve.set({lenis:l,addCallback:h,removeCallback:d}),()=>Ve.set(null)},[e,l,h,d]),y.useEffect(()=>{if(!l)return;const f=p=>{var g;for(let x=0;x{l.off("scroll",f)}},[l]),n?a.jsx(Rt.Provider,{value:{lenis:l,addCallback:h,removeCallback:d},children:e&&e!=="asChild"?n:a.jsx("div",{ref:o,...i,children:a.jsx("div",{ref:c,children:n})})}):null}),_a={};function Ea(n,e=[],t=0){const s=y.useContext(Rt),i=Ta(Ve),r=s??i??_a,{lenis:o,addCallback:c,removeCallback:l}=r;return y.useEffect(()=>{},[o,c,l,t,...e]),o}function za(){return a.jsxs(Na,{root:!0,options:{lerp:.1},children:[a.jsx(ss,{}),a.jsxs("main",{className:"flex flex-col min-h-screen",children:[a.jsx(ha,{}),a.jsx("div",{className:"flex-auto",children:a.jsx(Ds,{})})]}),a.jsx(ns,{})]})}const A=({className:n})=>a.jsx("div",{className:Z("container py-32",n),children:a.jsx("h1",{className:"text-5xl text-center",children:"Oops, something went wrong"})}),$=n=>{const e=Ea();y.useEffect(()=>{e&&e.scrollTo(0,{lerp:.3,duration:.3})},[e,n])};function Ca(){return $(),a.jsxs("div",{className:"flex flex-col",children:[a.jsx(is,{}),a.jsx(as,{}),a.jsx(rs,{}),a.jsx(os,{}),a.jsx(ls,{}),a.jsx(cs,{}),a.jsx(us,{}),a.jsx(ds,{})]})}const D=(n,e,t,s)=>s==="ru"?n:s==="tm"?t:e,Ra=n=>v.object({type:v.string(),company_name:v.string().min(3,{message:D("Название компании должно быть не менее 3 символов","Company name must be at least 3 characters","Kompaniýanyň ady azyndan 3 simwoldan ybarat bolmaly",n)}),representative_name:v.string().min(3,{message:D("Имя представителя должно быть не менее 3 символов","Representative name must be at least 3 characters","Wekiliniň ady azyndan 3 simwoldan ybarat bolmaly",n)}),job_title:v.string().min(3,{message:D("Должность должна быть не менее 3 символов","Job title must be at least 3 characters","Wezipesi azyndan 3 simwoldan ybarat bolmaly",n)}),participants_number:v.string().min(1,{message:D("Укажите количество участников","Specify the number of participants","Gatnaşyjylaryň sanyny görkeziň",n)}),country:v.string().min(3,{message:D("Название страны должно быть не менее 3 символов","Country must be at least 3 characters","Ýurduň ady azyndan 3 simwoldan ybarat bolmaly",n)}),email_address:v.string().email({message:D("Укажите корректный email","Enter a valid email","Dogry email salgysyny giriziň",n)}),phone_number:v.string().min(8,{message:D("Номер телефона должен быть не менее 8 символов","Phone number must be at least 8 characters","Telefon belgisi azyndan 8 simwoldan ybarat bolmaly",n)}),website:v.string().optional(),meeting_objective:v.string().min(3,{message:D("Укажите цель встречи","Specify the meeting objective","Duşuşygyň maksadyny görkeziň",n)}),proposal_description:v.string().optional(),government_agency:v.string().optional(),sector_industry:v.string().optional(),key_services:v.string().optional(),government_experience:v.string().optional(),preferred_meeting_datetime:v.string().optional(),meeting_mode:v.string().optional(),language_preference:v.string().optional(),technical_requirements:v.string().optional(),company_profile:v.custom(e=>e instanceof File,{message:D("Выберите корректный файл","Select a valid file","Dogry faýly saýlaň",n)}).refine(e=>e&&["image/jpeg","image/png","application/pdf"].includes(e.type),{message:D("Допускаются только файлы JPG, PNG и PDF","Only JPG, PNG and PDF files are allowed","Diňe JPG, PNG we PDF faýllary kabul edilýär",n)}).optional(),proposal_presentation:v.custom(e=>e instanceof File,{message:D("Выберите корректный файл","Select a valid file","Dogry faýly saýlaň",n)}).refine(e=>e&&["image/jpeg","image/png","application/pdf"].includes(e.type),{message:D("Допускаются только файлы JPG, PNG и PDF","Only JPG, PNG and PDF files are allowed","Diňe JPG, PNG we PDF faýllary kabul edilýär",n)}).optional(),relevant_certification:v.custom(e=>e instanceof File,{message:D("Выберите корректный файл","Select a valid file","Dogry faýly saýlaň",n)}).refine(e=>e&&["image/jpeg","image/png","application/pdf"].includes(e.type),{message:D("Допускаются только файлы JPG, PNG и PDF","Only JPG, PNG and PDF files are allowed","Diňe JPG, PNG we PDF faýllary kabul edilýär",n)}).optional()}),La={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 Pa(n){const e=n+"CollectionProvider",[t,s]=Oe(e),[i,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:p,children:g}=f,x=le.useRef(null),w=le.useRef(new Map).current;return a.jsx(i,{scope:p,itemMap:w,collectionRef:x,children:g})};o.displayName=e;const c=n+"CollectionSlot",l=le.forwardRef((f,p)=>{const{scope:g,children:x}=f,w=r(c,g),k=ke(p,w.collectionRef);return a.jsx(tt,{ref:k,children:x})});l.displayName=c;const u=n+"CollectionItemSlot",m="data-radix-collection-item",h=le.forwardRef((f,p)=>{const{scope:g,children:x,...w}=f,k=le.useRef(null),S=ke(p,k),E=r(u,g);return le.useEffect(()=>(E.itemMap.set(k,{ref:k,...w}),()=>void E.itemMap.delete(k))),a.jsx(tt,{[m]:"",ref:S,children:x})});h.displayName=u;function d(f){const p=r(n+"CollectionConsumer",f);return le.useCallback(()=>{const x=p.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(p.itemMap.values()).sort((E,L)=>w.indexOf(E.ref.current)-w.indexOf(L.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},d,s]}function Oa(n){const e=y.useRef(n);return y.useEffect(()=>{e.current=n}),y.useMemo(()=>(...t)=>{var s;return(s=e.current)==null?void 0:s.call(e,...t)},[])}var Ia=y.createContext(void 0);function Fa(n){const e=y.useContext(Ia);return n||e||"ltr"}var Be="rovingFocusGroup.onEntryFocus",$a={bubbles:!1,cancelable:!0},De="RovingFocusGroup",[He,Lt,Aa]=Pa(De),[Da,Pt]=Oe(De,[Aa]),[Ma,Ba]=Da(De),Ot=y.forwardRef((n,e)=>a.jsx(He.Provider,{scope:n.__scopeRovingFocusGroup,children:a.jsx(He.Slot,{scope:n.__scopeRovingFocusGroup,children:a.jsx(Ga,{...n,ref:e})})}));Ot.displayName=De;var Ga=y.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:i=!1,dir:r,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...h}=n,d=y.useRef(null),f=ke(e,d),p=Fa(r),[g=null,x]=vt({prop:o,defaultProp:c,onChange:l}),[w,k]=y.useState(!1),S=Oa(u),E=Lt(t),L=y.useRef(!1),[C,z]=y.useState(0);return y.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(Be,S),()=>_.removeEventListener(Be,S)},[S]),a.jsx(Ma,{scope:t,orientation:s,dir:p,loop:i,currentTabStopId:g,onItemFocus:y.useCallback(_=>x(_),[x]),onItemShiftTab:y.useCallback(()=>k(!0),[]),onFocusableItemAdd:y.useCallback(()=>z(_=>_+1),[]),onFocusableItemRemove:y.useCallback(()=>z(_=>_-1),[]),children:a.jsx(je.div,{tabIndex:w||C===0?-1:0,"data-orientation":s,...h,ref:f,style:{outline:"none",...n.style},onMouseDown:ie(n.onMouseDown,()=>{L.current=!0}),onFocus:ie(n.onFocus,_=>{const M=!L.current;if(_.target===_.currentTarget&&M&&!w){const te=new CustomEvent(Be,$a);if(_.currentTarget.dispatchEvent(te),!te.defaultPrevented){const I=E().filter(G=>G.focusable),B=I.find(G=>G.active),Te=I.find(G=>G.id===g),Y=[B,Te,...I].filter(Boolean).map(G=>G.ref.current);$t(Y,m)}}L.current=!1}),onBlur:ie(n.onBlur,()=>k(!1))})})}),It="RovingFocusGroupItem",Ft=y.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:i=!1,tabStopId:r,...o}=n,c=ms(),l=r||c,u=Ba(It,t),m=u.currentTabStopId===l,h=Lt(t),{onFocusableItemAdd:d,onFocusableItemRemove:f}=u;return y.useEffect(()=>{if(s)return d(),()=>f()},[s,d,f]),a.jsx(He.ItemSlot,{scope:t,id:l,focusable:s,active:i,children:a.jsx(je.span,{tabIndex:m?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ie(n.onMouseDown,p=>{s?u.onItemFocus(l):p.preventDefault()}),onFocus:ie(n.onFocus,()=>u.onItemFocus(l)),onKeyDown:ie(n.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const g=Ka(p,u.orientation,u.dir);if(g!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let w=h().filter(k=>k.focusable).map(k=>k.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const k=w.indexOf(p.currentTarget);w=u.loop?Wa(w,k+1):w.slice(k+1)}setTimeout(()=>$t(w))}})})})});Ft.displayName=It;var Va={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ha(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Ka(n,e,t){const s=Ha(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Va[s]}function $t(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function Wa(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var Ua=Ot,qa=Ft,Ja=y.createContext(void 0);function Ya(n){const e=y.useContext(Ja);return n||e||"ltr"}function Xa(n){const e=y.useRef({value:n,previous:n});return y.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var Ye="Radio",[Qa,At]=Oe(Ye),[Za,er]=Qa(Ye),Dt=y.forwardRef((n,e)=>{const{__scopeRadio:t,name:s,checked:i=!1,required:r,disabled:o,value:c="on",onCheck:l,form:u,...m}=n,[h,d]=y.useState(null),f=ke(e,x=>d(x)),p=y.useRef(!1),g=h?u||!!h.closest("form"):!0;return a.jsxs(Za,{scope:t,checked:i,disabled:o,children:[a.jsx(je.button,{type:"button",role:"radio","aria-checked":i,"data-state":Gt(i),"data-disabled":o?"":void 0,disabled:o,value:c,...m,ref:f,onClick:ie(n.onClick,x=>{i||l==null||l(),g&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),g&&a.jsx(tr,{control:h,bubbles:!p.current,name:s,value:c,checked:i,required:r,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});Dt.displayName=Ye;var Mt="RadioIndicator",Bt=y.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:s,...i}=n,r=er(Mt,t);return a.jsx(hs,{present:s||r.checked,children:a.jsx(je.span,{"data-state":Gt(r.checked),"data-disabled":r.disabled?"":void 0,...i,ref:e})})});Bt.displayName=Mt;var tr=n=>{const{control:e,checked:t,bubbles:s=!0,...i}=n,r=y.useRef(null),o=Xa(t),c=ps(e);return y.useEffect(()=>{const l=r.current,u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==t&&h){const d=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(d)}},[o,t,s]),a.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:r,style:{...n.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Gt(n){return n?"checked":"unchecked"}var sr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xe="RadioGroup",[nr,Vr]=Oe(Xe,[Pt,At]),Vt=Pt(),Ht=At(),[ir,ar]=nr(Xe),Kt=y.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:s,defaultValue:i,value:r,required:o=!1,disabled:c=!1,orientation:l,dir:u,loop:m=!0,onValueChange:h,...d}=n,f=Vt(t),p=Ya(u),[g,x]=vt({prop:r,defaultProp:i,onChange:h});return a.jsx(ir,{scope:t,name:s,required:o,disabled:c,value:g,onValueChange:x,children:a.jsx(Ua,{asChild:!0,...f,orientation:l,dir:p,loop:m,children:a.jsx(je.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":c?"":void 0,dir:p,...d,ref:e})})})});Kt.displayName=Xe;var Wt="RadioGroupItem",Ut=y.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:s,...i}=n,r=ar(Wt,t),o=r.disabled||s,c=Vt(t),l=Ht(t),u=y.useRef(null),m=ke(e,u),h=r.value===i.value,d=y.useRef(!1);return y.useEffect(()=>{const f=g=>{sr.includes(g.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),a.jsx(qa,{asChild:!0,...c,focusable:!o,active:h,children:a.jsx(Dt,{disabled:o,required:r.required,checked:h,...l,...i,name:r.name,ref:m,onCheck:()=>r.onValueChange(i.value),onKeyDown:ie(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ie(i.onFocus,()=>{var f;d.current&&((f=u.current)==null||f.click())})})})});Ut.displayName=Wt;var rr="RadioGroupIndicator",or=y.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...s}=n,i=Ht(t);return a.jsx(Bt,{...i,...s,ref:e})});or.displayName=rr;var qt=Kt,Jt=Ut;const we=y.forwardRef(({className:n,...e},t)=>a.jsx(qt,{className:Z("grid gap-2",n),...e,ref:t}));we.displayName=qt.displayName;const ne=y.forwardRef(({className:n,...e},t)=>a.jsx(Jt,{ref:t,className:Z(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}));ne.displayName=Jt.displayName;const se=[{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"}]},{h2:"Eksponent barada maglumat:",data:[{label:"Kompaniýanyň/guramanyň ady"},{label:"Wekiliniň ady"},{label:"Wezipesi"},{label:"Gatnaşyjylaryň sany"},{label:"Ýurt"},{label:"Email salgysy"},{label:"Telefon belgisi"},{label:"Web-saýt"}]}],re=[{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)"}]},{h2:"Duşuşygyň maksady:",secondH2:"Kompaniýa/gurama barada maglumat:",data:[{label:"Duşuşygyň esasy maksady"},{label:"Teklibiňiziň/taslamaňyzyň/islegiňiziň gysgaça beýany"},{label:"Degişli döwlet edarasy/bölümi"},{label:"Pudak senagaty"},{label:"Esasy hyzmatlar/önümler"},{label:"Hökümetler bilen ozalky iş tejribesi (eger bar bolsa)"}]}],X=[{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"},{h2:"Duşuşygyň logistikasy:",secondH2:"Goşmaçalar",subtitle:"(Zerur bolsa aşakdaky resminamalary goşuň)",data:[{label:"Duşuşyk üçin islenýän sene we wagt"},{label:"Duşuşygyň islenýän görnüşi (ýüzbe-ýüz, wirtual (zoom/teams/başga), gibrid)"},{label:"Dil saýlamasy (iňlis, türkmen, rus, başga)"},{label:"Goşmaça tehniki ýa-da logistik talaplar (meselem, AW enjamlar, terjimeçiler we ş.m.)"},{label:"Kompaniýanyň/guramanyň profili"},{label:"Teklip/prezentasiýa"},{label:"Degişli şahadatnama/ygtyýarnama"}],button:"Ugratmak"}],lr=({handleNext:n})=>{$();const{control:e,formState:t}=Ke(),s=O(i=>i.lang);return a.jsxs(Se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,y:"100%",transition:{duration:.2}},className:"w-full",children:[a.jsx("h2",{className:"h2 mb-8",children:se[T(s)].h2}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsx(ze,{defaultValue:1,control:e,name:"type",render:({field:i})=>a.jsxs(W,{className:"space-y-3",children:[a.jsx(U,{className:"text-xl",children:{ru:"Тип:",en:"Type:",tm:"Görnüşi:"}[s]}),a.jsx(q,{children:a.jsxs(we,{onValueChange:i.onChange,defaultValue:i.value,className:"flex flex-col space-y-4",children:[a.jsxs(W,{className:"flex items-center space-x-3 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"B2B",checked:i.value==="B2B"})}),a.jsx(U,{className:"text-base",children:"B2B"})]}),a.jsxs(W,{className:"flex items-center space-x-3 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"B2G",checked:i.value==="B2G"})}),a.jsx(U,{className:"text-base",children:"B2G"})]})]})})]})}),a.jsx(N,{control:e,name:"company_name",error:t.errors.company_name,placeholder:"",label:se[T(s)].data[0].label}),a.jsx(N,{control:e,name:"representative_name",error:t.errors.representative_name,placeholder:"",label:se[T(s)].data[1].label}),a.jsx(N,{control:e,name:"job_title",error:t.errors.job_title,placeholder:"",label:se[T(s)].data[2].label}),a.jsx(N,{control:e,name:"participants_number",error:t.errors.participants_number,placeholder:"",label:se[T(s)].data[3].label}),a.jsx(N,{control:e,name:"country",error:t.errors.country,placeholder:"",label:se[T(s)].data[4].label}),a.jsx(N,{control:e,name:"email_address",error:t.errors.email_address,placeholder:"",label:se[T(s)].data[5].label}),a.jsx(N,{control:e,name:"phone_number",error:t.errors.phone_number,placeholder:"",label:se[T(s)].data[6].label}),a.jsx(N,{control:e,name:"website",placeholder:"",label:se[T(s)].data[7].label})]}),a.jsx(H,{variant:"secondary",type:"button",onClick:n,className:"w-full mt-10",children:{ru:"Далее",en:"Next",tm:"Indiki"}[s]})]})},cr=({handleNext:n,handlePrev:e})=>{$();const t=O(r=>r.lang),{control:s,formState:i}=Ke();return a.jsxs(Se.div,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0,transition:{delay:.5,duration:.3}},exit:{opacity:0,y:100},children:[a.jsx("h2",{className:"h2 mb-8",children:re[T(t)].h2}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsx(N,{control:s,name:"meeting_objective",error:i.errors.meeting_objective,placeholder:"",label:re[T(t)].data[0].label}),a.jsx(N,{control:s,name:"proposal_description",error:i.errors.proposal_description,placeholder:"",label:re[T(t)].data[1].label}),a.jsx(N,{control:s,name:"government_agency",error:i.errors.government_agency,placeholder:"",label:re[T(t)].data[2].label}),a.jsx("h2",{className:"h2 mt-4",children:re[T(t)].secondH2}),a.jsx(N,{control:s,name:"sector_industry",error:i.errors.sector_industry,placeholder:"",label:re[T(t)].data[3].label}),a.jsx(N,{control:s,name:"key_services",error:i.errors.key_services,placeholder:"",label:re[T(t)].data[4].label}),a.jsx(N,{control:s,name:"government_experience",error:i.errors.government_experience,placeholder:"",label:re[T(t)].data[5].label})]}),a.jsxs("div",{className:"flex items-center gap-6 mt-10",children:[a.jsx(H,{type:"button",onClick:e,variant:"outline",className:"text-on_surface",children:{ru:"Назад",en:"Back",tm:"Yza"}[t]}),a.jsx(H,{variant:"secondary",type:"button",onClick:n,className:"w-full",children:{ru:"Далее",en:"Next",tm:"Indiki"}[t]})]})]})},ur=({handlePrev:n})=>{$();const{control:e,formState:t}=Ke(),s=O(i=>i.lang);return a.jsxs(Se.div,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0,transition:{delay:.5,duration:.3}},transition:{duration:1},children:[a.jsx("h2",{className:"h2 mb-8",children:X[T(s)].h2}),a.jsxs("div",{className:"flex flex-col gap-6",children:[a.jsx(N,{control:e,name:"preferred_meeting_datetime",error:t.errors.preferred_meeting_datetime,placeholder:"",label:X[T(s)].data[0].label}),a.jsx(N,{control:e,name:"preferred_mode",error:t.errors.preferred_mode,placeholder:"",label:X[T(s)].data[1].label}),a.jsx(N,{control:e,name:"language_preference",error:t.errors.language_preference,placeholder:"",label:X[T(s)].data[2].label}),a.jsx(N,{control:e,name:"additional_technical",error:t.errors.additional_technical,placeholder:"",label:X[T(s)].data[3].label})]}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"h2 mt-10",children:X[T(s)].secondH2}),a.jsx("h5",{className:"text-on_surface_v",children:X[T(s)].subtitle})]}),a.jsx(N,{control:e,name:"company_profile",label:X[T(s)].data[4].label,type:"file",textDark:!0}),a.jsx(N,{control:e,name:"proposal_presentation",label:X[T(s)].data[5].label,type:"file",textDark:!0}),a.jsx(N,{control:e,name:"relevant_certification",label:X[T(s)].data[6].label,type:"file",textDark:!0})]}),a.jsxs("div",{className:"flex items-center gap-6 mt-10",children:[a.jsx(H,{type:"button",onClick:n,variant:"outline",className:"text-on_surface",children:{ru:"Назад",en:"Back",tm:"Yza"}[s]}),a.jsx(H,{disabled:t.isSubmitting,type:"submit",className:"w-full",children:t.isSubmitting?a.jsx(We,{className:"animate-spin"}):X[T(s)].button})]})]})},dr=({stage:n,setStage:e,success:t,setSuccess:s})=>{const i=O(h=>h.lang),r=y.useMemo(()=>Ra(i),[i]),o=Ie({resolver:$e(r),defaultValues:La,mode:"onChange"}),c=h=>{switch(h){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[]}},l=async()=>{const h=c(n);await o.trigger(h)&&e(f=>f+1)},u=()=>e(h=>h-1),m=async h=>{try{const d=new FormData;Object.entries(h).forEach(([p,g])=>{(g instanceof File||g!==void 0)&&d.append(p,g)}),(await fs.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 a.jsx(Fe,{...o,children:a.jsx("form",{onSubmit:o.handleSubmit(m),children:a.jsxs("div",{className:"relative",children:[a.jsx(he,{children:n===1&&a.jsx(lr,{handleNext:l})}),a.jsx(he,{children:n===2&&a.jsx(cr,{handleNext:l,handlePrev:u})}),a.jsx(he,{children:n===3&&t===!1&&a.jsx(ur,{handlePrev:u})}),t&&a.jsx(Ue,{})]})})})};function mr(){$();const n=O(r=>r.lang),[e,t]=y.useState(1),[s,i]=y.useState(!1);return a.jsxs("div",{className:"pb-[120px]",children:[a.jsx(ue,{title:{ru:"B2B | B2G встречи",en:"B2B | B2G meetings",tm:"B2B | B2G duşuşyklar"}[n]}),!s&&e!==0&&a.jsx(gs,{stage:e}),a.jsx("div",{className:"max-w-[808px] md:mx-auto mx-5",children:a.jsx(dr,{success:s,setSuccess:i,stage:e,setStage:t})})]})}function pr(){$();const n=O(e=>e.lang);return a.jsxs("div",{className:Z(""),children:[a.jsx(ue,{title:{ru:"О выставке",en:"About exhibition",tm:"Sergi hakynda"}[n]}),a.jsx(xs,{}),a.jsx(ys,{}),a.jsx(bs,{}),a.jsx(ks,{}),a.jsx(vs,{})]})}const pe=(n,e,t,s)=>s==="ru"?n:s==="tm"?t:e,hr=n=>v.object({company_name:v.string().min(3,{message:pe("Название компании должно быть не менее 3 символов","Company name must be at least 3 characters","Kompaniýanyň ady azyndan 3 simwoldan ybarat bolmaly",n)}),rep_name:v.string().min(3,{message:pe("Имя представителя должно быть не менее 3 символов","Representative name must be at least 3 characters","Wekiliniň ady azyndan 3 simwoldan ybarat bolmaly",n)}),job_title:v.string().min(3,{message:pe("Должность должна быть не менее 3 символов","Job title must be at least 3 characters","Wezipesi azyndan 3 simwoldan ybarat bolmaly",n)}),country:v.string().min(3,{message:pe("Название страны должно быть не менее 3 символов","Country must be at least 3 characters","Ýurduň ady azyndan 3 simwoldan ybarat bolmaly",n)}),email:v.string().email({message:pe("Укажите корректный email","Enter a valid email","Dogry email salgysyny giriziň",n)}),phone:v.string().min(8,{message:pe("Номер телефона должен быть не менее 8 символов","Phone number must be at least 8 characters","Telefon belgisi azyndan 8 simwoldan ybarat bolmaly",n)}),website:v.string().optional(),visa_support:v.string().optional()}),fr={company_name:"",rep_name:"",job_title:"",country:"",email:"",phone:"",website:"",visa_support:""},R=[{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"},{cover:"Stend bronlamak",h2:"Wariantlaryň birini saýlaň:",radio:"Enjamlaşdyrylmadyk meýdan",radio_2:"Enjamlaşdyrylan meýdan",label_1:"Kompaniýanyň/guramanyň ady",label_2:"Wekiliniň ady",label_3:"Wezipesi",number_of_participants:"Gatnaşyjylaryň sany",label_4:"Ýurt",label_5:"Email salgysy",label_6:"Telefon belgisi",label_7:"Web-saýt",visa:"Wiza goldawy:",visa_radio:"Hawa",visa_radio_2:"Ýok",button:"Ugratmak"}];function gr(){$();const n=O(c=>c.lang),[e,t]=y.useState(!1),s=y.useMemo(()=>hr(n),[n]),i=Ie({resolver:$e(s),defaultValues:fr}),r=async c=>{try{await ws(c)&&t(!0)}catch(l){console.error("POST sponsor error",l)}},{errors:o}=i.formState;return a.jsxs("div",{children:[a.jsx(ue,{title:{ru:"Стать спонсором",en:"Become a sponsor",tm:"Hemaýatkär bolmak"}[n]}),a.jsx(he,{children:!e&&a.jsx(Fe,{...i,children:a.jsxs(Se.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:i.handleSubmit(r),children:[a.jsx(N,{label:R[T(n)].label_1,name:"company_name",control:i.control,error:o.company_name}),a.jsx(N,{label:R[T(n)].label_2,name:"rep_name",control:i.control,error:o.rep_name}),a.jsx(N,{label:R[T(n)].label_3,name:"job_title",control:i.control,error:o.job_title}),a.jsx(N,{label:R[T(n)].label_4,name:"country",control:i.control,error:o.country}),a.jsx(N,{label:R[T(n)].label_5,name:"email",control:i.control,error:o.email}),a.jsx(N,{label:R[T(n)].label_6,name:"phone",control:i.control,error:o.phone}),a.jsx(N,{label:R[T(n)].label_7,name:"website",control:i.control}),a.jsx(ze,{control:i.control,name:"visa_support",render:({field:c})=>a.jsxs(W,{className:"space-y-5",children:[a.jsx(U,{className:"text-xl",children:R[T(n)].visa}),a.jsx(q,{children:a.jsxs(we,{onValueChange:c.onChange,defaultValue:c.value,className:"flex flex-col space-y-4 ml-3",children:[a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"yes",checked:c.value==="yes"})}),a.jsx(U,{className:"text-base",children:R[T(n)].visa_radio})]}),a.jsxs(W,{className:"flex items-center space-x-5 space-y-0 ",children:[a.jsx(q,{children:a.jsx(ne,{value:"no",checked:c.value==="no"})}),a.jsx(U,{className:"text-base",children:R[T(n)].visa_radio_2})]})]})})]})}),a.jsx(H,{disabled:i.formState.isSubmitting,className:"mt-5",children:i.formState.isSubmitting?a.jsx(We,{className:"animate-spin"}):R[T(n)].button})]})})}),e&&a.jsx(Ue,{delay:.3})]})}const xr=v.object({name:v.string().min(2,"error"),email:v.string().email(),phone:v.string().min(8,"error"),company:v.string().min(2,"error"),msg:v.string().min(5,"error")}),yr={name:"",email:"",phone:"",company:"",msg:""},br=({className:n})=>{const{t:e}=ge("contacts"),[t,s]=y.useState(!1),i=Ie({resolver:$e(xr),defaultValues:yr});async function r(c){try{const l=await Ss(c);s(l)}catch(l){console.error("POST contact",l)}}const{errors:o}=i.formState;return a.jsx("div",{className:Z("bg-primary rounded-[8px] py-8 px-6 ",n),children:a.jsx(Fe,{...i,children:a.jsxs("form",{onSubmit:i.handleSubmit(r),children:[a.jsx("h2",{className:"h2 !text-on_primary lg:mb-8 mb-6",children:e("title")}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsx(N,{onPrimary:!0,name:"name",control:i.control,label:e("name"),error:o.name}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[a.jsx(N,{onPrimary:!0,name:"email",control:i.control,label:"Email",error:o.email}),a.jsx(N,{onPrimary:!0,name:"phone",control:i.control,label:e("phone"),error:o.phone})]}),a.jsx(N,{onPrimary:!0,name:"company",control:i.control,label:e("company"),error:o.name}),a.jsx(N,{onPrimary:!0,textArea:!0,name:"msg",label:e("message"),control:i.control,error:o.msg}),a.jsx(H,{disabled:i.formState.isSubmitting||t,className:"w-full h-12 overflow-hidden",variant:"secondary",children:t?e("submitted"):i.formState.isSubmitting?a.jsx(js,{className:"animate-spin text-white"}):e("button")})]})]})})})};function kr(){$();const{t:n}=ge("contacts");return a.jsxs("div",{className:"flex flex-col gap-20 pt-10 md:pt-20",children:[a.jsx(ee,{children:a.jsxs("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-20 lg:gap-6",children:[a.jsx(br,{}),a.jsxs("div",{className:"p-6 bg-surface_container rounded-[8px]",children:[a.jsx("h2",{className:"h2 mb-10 xl:mb-8",children:n("title_2")}),a.jsxs("div",{className:"flex flex-col gap-20",children:[a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("img",{src:"/contacts/map.svg",alt:"address"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl mb-2",children:n("address")}),a.jsx("address",{className:"text-base normal not-italic",children:n("venue")})]})]}),a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("img",{src:"/contacts/phone.svg",alt:"phone"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl mb-2",children:n("phone")}),a.jsx("h4",{className:"text-base normal",children:"+99371871812; 99363719588"})]})]}),a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("img",{src:"/contacts/email.svg",alt:"email"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl mb-2",children:"Email:"}),a.jsx("h4",{className:"text-base normal",children:"contact@turkmenexpo.com"})]})]})]})]})]})}),a.jsx("section",{className:"relative w-full h-[300px] sm:h-[350px] md:h-[400px] lg:h-[600px]",children:a.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 vr=[{id:0,title:"Фото",titleEn:"Photo",titleTm:"Surat"},{id:1,title:"Видео",titleEn:"Video",titleTm:"Wideo"}],wr=({className:n})=>{var w,k,S,E,L;$();const[e,t]=y.useState(0),{data:s,isPending:i,status:r}=Ts(1),{data:o}=wt(1),[c,l]=y.useState(!1),[u,m]=y.useState({id:0,type:"photo"}),h=O(C=>C.lang),d=({id:C,type:z})=>{l(!0),m({id:C,type:z})},{t:f}=ge("main"),[p,g]=y.useState(!1),x=C=>C===0&&i?a.jsx(fe,{}):a.jsx(fe,{});return console.log(r),a.jsxs(a.Fragment,{children:[a.jsx(he,{children:c&&a.jsx(Ns,{activeItem:u,setActiveItem:m,setIsOpen:l})}),a.jsxs("section",{className:Z("md:mb-[120px] mb-20",n),children:[a.jsx(ue,{title:{ru:"Моменты",en:"Moments",tm:"Pursatlar"}[h]}),a.jsx(ee,{className:"page-bottom md:pt-10 pt-6",children:a.jsxs("div",{className:"flex justify-center flex-col",children:[a.jsx(jt,{state:e,setState:t,data:vr,className:"mb-6"}),e===0&&i?x(e):a.jsxs(a.Fragment,{children:[a.jsx("h3",{className:"md:text-3xl text-2xl mb-6",children:"TurkmenTextile Expo-2025"}),a.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?(k=(w=s==null?void 0:s.photos)==null?void 0:w.slice(0,p?1e3:16))==null?void 0:k.map((C,z)=>{var _,M;return a.jsx("div",{onClick:()=>d({id:z,type:"photo"}),className:"cursor-pointer embla__slide basis-1/1 overflow-hidden",children:a.jsx("img",{src:((_=C==null?void 0:C.photo)==null?void 0:_.path)??"",alt:((M=C==null?void 0:C.photo)==null?void 0:M.file_name)??"photo",className:"size-full object-cover hover:scale-105 duration-300 transition-all"})},z)}):(S=o==null?void 0:o.videos)==null?void 0:S.map((C,z)=>{var _;return a.jsxs("div",{onClick:()=>d({id:z,type:"video"}),className:"cursor-pointer group embla__slide h-[155px] w-full basis-1/1 overflow-hidden relative",children:[a.jsx(_s,{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 "}),a.jsx("div",{className:"absolute top-0 left-0 size-full bg-[#2C57A752]/[32%]"}),a.jsx("img",{src:((_=C==null?void 0:C.video_photo)==null?void 0:_.path)??"",className:"size-full object-cover"})]},z)})})]}),((E=s==null?void 0:s.photos)==null?void 0:E.length)&&((L=s==null?void 0:s.photos)==null?void 0:L.length)>16&&!p&&a.jsx(H,{onClick:()=>g(!0),className:"mx-auto w-[288px] mt-10 text-on_surface",size:"lg",variant:"outline",children:f("media.button")})]})})]})]})},jr=(n,e)=>{const{data:t,isPending:s}=qe({queryKey:["news-inner",n,e],queryFn:()=>Es(n,e),select:({data:i})=>i.data});return{data:t,isPending:s}};function Sr(){var o;const{id:n}=Ms(),e=O(c=>c.lang),t=Number(n);$(t);const{data:s,isPending:i}=jr(t,e),{data:r}=St(e);return i?a.jsx(fe,{}):a.jsxs(ee,{className:"pt-10 pb-20 md:pt-20 md:pb-[120px]",children:[a.jsxs("section",{className:"max-w-[888px] py-5 mx-auto flex flex-col md:gap-10 gap-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-on_surface md:text-[32px] text-3xl leading-10 mb-2",children:s==null?void 0:s.title}),a.jsx("h4",{children:s==null?void 0:s.published_at.slice(0,10).split("-").reverse().join(".")})]}),a.jsx("div",{className:"w-full h-[300px] md:h-[480px]",children:a.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"})}),a.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"})]}),a.jsx("hr",{className:"mt-10 md:mb-20 mb-[60px]"}),a.jsxs("section",{children:[a.jsx("h2",{className:"h2 mb-6",children:{ru:"Читайте также:",en:"Read more:",tm:"Şeýle hem okaň:"}[e]}),a.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-6",children:r==null?void 0:r.filter(c=>c.id!==t).slice(0,3).map(c=>y.createElement(Tt,{...c,key:c.title}))})]})]})}function Tr(){$();const n=O(s=>s.lang),{data:e,isPending:t}=St(n);return t?a.jsx(fe,{}):a.jsxs(ee,{className:"page-padding",children:[a.jsx("h1",{className:"text-center md:text-5xl text-3xl mb-10",children:{ru:"Новости",en:"News",tm:"Täzelikler"}[n]}),a.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-6",children:e==null?void 0:e.map(s=>y.createElement(Tt,{...s,key:s.title}))})]})}const Nr=()=>{const n=O(s=>s.lang),{data:e,isPending:t}=qe({queryKey:["participants",n],queryFn:()=>zs(n),select:({data:s})=>s.data});return{data:e,isPending:t}},_r=({className:n})=>{var u,m,h,d,f;$();const e=O(p=>p.lang),{data:t,isPending:s}=Nr(),i={company:{ru:"Название компании",en:"Company name",tm:"Kompaniýanyň ady"}[e],country:{ru:"Страна",en:"Country",tm:"Ýurt"}[e],industry:{ru:"Сфера деятельности",en:"Industry",tm:"Pudak"}[e]},[r,o]=y.useState(0),c=(h=t==null?void 0:t[0])==null?void 0:h.participants.concat((u=t==null?void 0:t[1])==null?void 0:u.participants,(m=t==null?void 0:t[2])==null?void 0:m.participants),l=t==null?void 0:t.filter(p=>r===1?p.id===3:r===2?p.id===1:p.id===2);return console.log(r),a.jsx(ee,{children:a.jsxs("section",{className:Z("page-padding overflow-x-hidden",n),children:[a.jsx("h1",{className:"text-center md:text-5xl text-3xl mb-4",children:{ru:"Список участников",en:"List of participants",tm:"Gatnasyjylaryň sanawy"}[e]}),a.jsx(jt,{state:r,setState:o,className:"mb-6 md:w-fit"}),a.jsxs("div",{className:"p-2 sm:p-0 bg-surface_container overflow-hidden",children:[a.jsxs("div",{className:"sm:flex items-center hidden h-[52px] border-b border-outline_v",children:[a.jsx("h3",{className:"flex-[0_0_45.54%] pl-4",children:i==null?void 0:i.company}),a.jsx("h3",{className:"flex-[0_0_19.80%]",children:i==null?void 0:i.country}),a.jsx("h3",{className:"flex-[0_0_34.65%]",children:i==null?void 0:i.industry})]}),s?a.jsx(fe,{}):r===0?c==null?void 0:c.map((p,g,x)=>a.jsx(st,{...p,arr:x==null?void 0:x.length,index:g,image:p.image??{path:""},image_country:p.image_country??{path:""}})):(f=(d=l==null?void 0:l[0])==null?void 0:d.participants)==null?void 0:f.map((p,g,x)=>a.jsx(st,{...p,arr:x==null?void 0:x.length,index:g,image:p.image??{path:""},image_country:p.image_country??{path:""}}))]})]})})},ce=(n,e,t,s)=>s==="ru"?n:s==="tm"?t:e,Er=n=>v.object({space_package:v.string(),company_name:v.string().min(3,{message:ce("Название компании должно быть не менее 3 символов","Company name must be at least 3 characters","Kompaniýanyň ady azyndan 3 simwoldan ybarat bolmaly",n)}),rep_name:v.string().min(3,{message:ce("Имя представителя должно быть не менее 3 символов","Representative name must be at least 3 characters","Wekiliniň ady azyndan 3 simwoldan ybarat bolmaly",n)}),job_title:v.string().min(3,{message:ce("Должность должна быть не менее 3 символов","Job title must be at least 3 characters","Wezipesi azyndan 3 simwoldan ybarat bolmaly",n)}),participants_number:v.preprocess(e=>Number(e),v.number().min(1,ce("Укажите количество участников","Specify the number of participants","Gatnaşyjylaryň sanyny görkeziň",n))),country:v.string().min(3,{message:ce("Название страны должно быть не менее 3 символов","Country must be at least 3 characters","Ýurduň ady azyndan 3 simwoldan ybarat bolmaly",n)}),email:v.string().email({message:ce("Укажите корректный email","Enter a valid email","Dogry email salgysyny giriziň",n)}),phone:v.string().min(8,{message:ce("Номер телефона должен быть не менее 8 символов","Phone number must be at least 8 characters","Telefon belgisi azyndan 8 simwoldan ybarat bolmaly",n)}),website:v.string().optional(),visa_support:v.string().optional()}),zr={space_package:"space",company_name:"",rep_name:"",job_title:"",participants_number:1,country:"",email:"",phone:"",website:"",visa_support:""};function Cr(){$();const n=O(l=>l.lang),[e,t]=y.useState(!1),s=y.useMemo(()=>Er(n),[n]),i=Ie({resolver:$e(s),defaultValues:zr}),r=async l=>{await Cs(l)&&t(!0)};y.useEffect(()=>{window.scrollTo({behavior:"smooth",top:0})},[]);const{errors:o}=i.formState,c=T(n);return a.jsxs("div",{children:[a.jsx(ue,{title:R[T(n)].cover}),a.jsx(he,{children:!e&&a.jsx(Fe,{...i,children:a.jsxs(Se.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:i.handleSubmit(r),children:[a.jsx(ze,{control:i.control,name:"space_package",render:({field:l})=>a.jsxs(W,{className:"space-y-5",children:[a.jsx(U,{className:"text-xl",children:R[c].h2}),a.jsx(q,{children:a.jsxs(we,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"space",checked:l.value==="space"})}),a.jsx(U,{className:"text-base",children:R[c].radio})]}),a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"package",checked:l.value==="package"})}),a.jsx(U,{className:"text-base",children:R[c].radio_2})]})]})})]})}),a.jsx(N,{label:R[c].label_1,name:"company_name",control:i.control,error:o.company_name}),a.jsx(N,{label:R[c].label_2,name:"rep_name",control:i.control,error:o.rep_name}),a.jsx(N,{label:R[c].label_3,name:"job_title",control:i.control,error:o.job_title}),a.jsx(N,{label:R[c].number_of_participants,type:"number",name:"participants_number",control:i.control,error:o.participants_number}),a.jsx(N,{label:R[c].label_4,name:"country",control:i.control,error:o.country}),a.jsx(N,{label:R[c].label_5,name:"email",control:i.control,error:o.email}),a.jsx(N,{label:R[c].label_6,name:"phone",control:i.control,error:o.phone}),a.jsx(N,{label:R[c].label_7,name:"website",control:i.control}),a.jsx(ze,{control:i.control,name:"visa_support",render:({field:l})=>a.jsxs(W,{className:"space-y-5",children:[a.jsx(U,{className:"text-xl",children:R[c].visa}),a.jsx(q,{children:a.jsxs(we,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"yes",checked:l.value==="yes"})}),a.jsx(U,{className:"text-base",children:R[c].visa_radio})]}),a.jsxs(W,{className:"flex items-center space-x-5 space-y-0 ",children:[a.jsx(q,{children:a.jsx(ne,{value:"no",checked:l.value==="no"})}),a.jsx(U,{className:"text-base",children:R[c].visa_radio_2})]})]})})]})}),a.jsx(H,{disabled:i.formState.isSubmitting,className:"mt-5",children:i.formState.isSubmitting?a.jsx(We,{className:"animate-spin"}):R[c].button})]})})}),e&&a.jsx(Ue,{delay:.3})]})}const Yt=()=>{var p;const{t:n}=ge("main"),e=O(g=>g.lang),{pathname:t}=Je(),[s]=Nt({loop:!0},[Rs({delay:5e3,stopOnInteraction:!1})]),{title:i,texts:r,button:o,button2:c}=n("impressions.hero",{returnObjects:!0}),{title2:l,texts2:u}=n("impressions.hero",{returnObjects:!0}),m=(g,x)=>t==="/impressions"?g:x,h=(g,x)=>t==="/impressions"?g:x,d={en:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg"],ru:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg"],tm:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg"]},f=()=>d[e]??d.en;return a.jsxs("section",{className:"",children:[t==="/impressions-tm"?a.jsx("div",{ref:s,className:"embla overflow-hidden",children:a.jsx("div",{className:"flex",children:f().map((g,x)=>a.jsx("img",{src:g,alt:"imperssions",className:"w-full object-cover flex-[0_0_100%] object-top max-h-[610px]"},x))})}):a.jsx("img",{src:n("impressions.banner")}),a.jsx("h1",{className:"absolute opacity-0 top-0 left-0",children:{ru:"Модные показы",en:"Fashion shows",tm:"Moda görkezişler"}[e]}),a.jsx("div",{className:"bg-[url('/impressions-bg.png')]",children:a.jsxs(ee,{className:"md:py-20 py-10",children:[a.jsx("h2",{className:"md:text-5xl text-2xl leading-[120%] md:mb-10 mb-6",children:m(i,l)}),a.jsx("div",{className:"text-on_surface_v flex flex-col gap-3",children:(p=h(r,u))==null?void 0:p.map((g,x)=>a.jsx("p",{className:"md:text-lg !normal",children:g},x))}),a.jsxs("div",{className:"flex md:flex-row flex-col items-center gap-6 mt-6",children:[a.jsx(nt,{target:"_blank",to:"https://turkmentextile.turkmenexpo.com/app/storage/app/media/ICS%20file/TurkmenTextile%20Expo-2025.ics",className:"w-full",children:a.jsx(H,{size:"sm",className:"w-full",children:o})}),a.jsx(nt,{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:a.jsx(H,{size:"sm",className:"w-full",children:c})})]})]})})]})},Xt=()=>{var m,h,d;const{t:n}=ge("main"),{pathname:e}=Je(),[t,s]=y.useState(1),{data:i}=wt(1),o=[...(i==null?void 0:i.videos.filter(f=>f.sections[0]==="fashion_shows"))??[]].sort((f,p)=>(f==null?void 0:f.fashion_shows_order_id)+(p==null?void 0:p.fashion_shows_order_id)),{videosTitle:c,videosTitle2:l}=n("impressions",{returnObjects:!0}),u=()=>e!=="/impressions";return a.jsx("section",{className:"bg-[url('/impressions/videos-block-bg.png')] md:py-20 py-10",children:a.jsxs(ee,{children:[a.jsx("h2",{className:"mb-10 md:text-5xl text-2xl leading-[120%] text-white text-center",children:u()?c:l}),a.jsxs("div",{className:"flex flex-col lg:flex-row lg:mx-20 gap-4 text-white overflow-hidden h-fit lg:h-[490px]",children:[a.jsxs("div",{className:"bg-gray_10 flex-auto p-2 rounded-[8px] border border-gray_09 flex flex-col justify-center h-full",children:[a.jsx("div",{className:"max-h-[450px]",children:a.jsx("video",{src:(d=(h=(m=i==null?void 0:i.videos)==null?void 0:m[t])==null?void 0:h.video)==null?void 0:d.path,muted:!0,controls:!0,autoPlay:!0,loop:!0,className:"w-full size-full mb-2 rounded"})}),a.jsx("div",{className:"flex items-center justify-between mt-auto"})]}),a.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:a.jsx("div",{className:"flex flex-col gap-2 w-full overflow-y-auto overflow-x-hidden h-full",children:o==null?void 0:o.map((f,p)=>{var g;return a.jsx("div",{onClick:()=>s(p+1),className:"basis-[70px] w-[80%] cursor-pointer mx-auto overflow-hidden",children:a.jsx("img",{src:(g=f==null?void 0:f.video_photo)==null?void 0:g.path,alt:"",className:"object-cover size-full rounded-tl hover:scale-105 transition-transform rounded-bl"})},p)})})})]})]})})},Rr=n=>{const e=O(i=>i.lang),{data:t,isPending:s}=qe({queryKey:["designers",e],queryFn:()=>Ls(e,n),select:({data:i})=>i.data});return{data:t,isPending:s}},Qt=()=>{const{pathname:n}=Je(),e=()=>n!=="/impressions",{data:t,isPending:s}=Rr(e()?2:1),[i,r]=Nt({align:"center",skipSnaps:!0,slidesToScroll:2,dragFree:!0}),[o,c]=y.useState(0),{t:l}=ge("main"),[u,m]=y.useState(!1),[h,d]=y.useState(!0),f=y.useCallback(S=>{r&&r.scrollTo(S)},[r]);y.useEffect(()=>{if(!r)return;const S=()=>{c(r==null?void 0:r.selectedScrollSnap()),m(r.canScrollPrev()),d(r.canScrollNext())};return r.on("select",S),()=>{r.off("select",S)}},[r]);const{title:p,text:g,title2:x,text2:w}=l("impressions.designers",{returnObjects:!0}),k=[...(t==null?void 0:t.designers)??[]].sort((S,E)=>(S==null?void 0:S.order_id)-(E==null?void 0:E.order_id));return console.log(k),a.jsx("section",{className:"md:py-20 py-10",children:a.jsxs(ee,{className:"flex flex-col md:gap-10 gap-6",children:[a.jsx("h2",{className:"md:text-5xl text-2xl leading-[120%]",children:e()?p:x}),a.jsx("p",{className:"md:text-xl text-lg normal text-on_surface_v",children:e()?g:w}),a.jsxs("div",{ref:i,className:"embla",children:[a.jsx("div",{className:"flex embla__container",children:s?a.jsx(fe,{}):k==null?void 0:k.map((S,E)=>a.jsx(Ps,{...S,className:"embla__slide flex-[0_0_714px] mr-4"},E))}),a.jsxs("div",{className:"flex items-center justify-center gap-4 mt-6",children:[a.jsx("button",{onClick:()=>r==null?void 0:r.scrollPrev(),className:Z("size-12 flex items-center justify-center",!u&&"opacity-20 pointer-events-none"),children:a.jsx(Os,{})}),a.jsx("div",{className:"flex items-center gap-2",children:[...Array(k!=null&&k.length?Math.round((k==null?void 0:k.length)/2):5)].map((S,E)=>a.jsx("div",{onClick:()=>f==null?void 0:f(E),className:Z("w-5 h-1 rounded-[2px] cursor-pointer",o===E?"bg-teritary":"bg-on_surface_v")},E))}),a.jsx("button",{onClick:()=>r==null?void 0:r.scrollNext(),className:Z("size-12 flex items-center justify-center",!h&&"opacity-20 pointer-events-none"),children:a.jsx(Is,{})})]})]})]})})};function Lr(){return $(),a.jsxs("div",{className:"overflow-x-hidden",children:[a.jsx(Yt,{}),a.jsx(Xt,{}),a.jsx(Qt,{})]})}function Pr(){return $(),a.jsxs("div",{className:"overflow-x-hidden",children:[a.jsx(Yt,{}),a.jsx(Xt,{}),a.jsx(Qt,{})]})}const Or="/about-place.jpg",P={title:{ruText:"Варианты участия",enText:"Participation Options",tmText:"Gatnaşmagyň görnüşleri"},exhibitionSpace:{ruText:"Аренда выставочной площади",enText:"Exhibition Space Rental",tmText:"Sergi meýdanyny kärendesine almak"},spaceOnly:{ruText:"Необорудованная площадь",enText:"Space Only",tmText:"Enjamlaşdyrylmadyk meýdan"},example:{ruText:"Пример",enText:"Example",tmText:"Mysal"},spaceOnlyDescription:{ruText:"Чистая площадь для последующей застройки (стандартная застройка или по индивидуальному дизайну). Включает: общую уборку и охрану павильона. Электричество в стоимость не включено.",enText:"Raw exhibition space for subsequent construction (standard booth or customized design). Includes general cleaning and pavilion security. Electricity is not included in the price.",tmText:"Soňky gurluşyk üçin arassa meýdan (standart gurluşyk ýa-da indiwidual dizaýn). Öz içine alýar: umumy arassaçylyk we pawilýonyň goragy. Elektrik energiýasy bahasynyň içine girenok."},standardBooth:{ruText:"Стандартная застройка",enText:"Standard Booth Construction",tmText:"Standart gurluşyk"},customBooth:{ruText:"Индивидуальный дизайн",enText:"Custom Booth Design",tmText:"Indiwidual dizaýn"},boothExampleDescription:{ruText:"Включает: базовое электроподключение (220V - 2 кВт), стены (стандартные или индивидуальный дизайн). Общую уборку и охрану павильона.",enText:"Includes: basic electrical connection (220V - 2 kW), walls (standard or customized design), general cleaning, and pavilion security.",tmText:"Öz içine alýar: esasy elektrik birikdirmesi (220V - 2 kWt), diwarlar (standart ýa-da indiwidual dizaýn). Umumy arassaçylyk we pawilýonyň goragy."},registrationFee:{ruText:"Участие со стендом включает регистрационную оплату.",enText:"Participation with a booth includes a registration fee.",tmText:"Stend bilen gatnaşmak hasaba alyş tölegini öz içine alýar."},pricingNote:{ruText:"Пожалуйста уточните стоимость у менеджера проекта.",enText:"Please check the pricing with the project manager.",tmText:"Bahany taslamanyň menejeri bilen anyklaň."},partnershipTitle:{ruText:"Партнёрские возможности",enText:"Partnership Opportunities",tmText:"Hyzmatdaşlyk mümkinçilikleri"},partnershipIntro:{ruText:'Если Вы заинтересованы в более активном выходе на рынок или целью Вашей компании является максимальное продвижение на рынок, используйте пакет "Партнерство выставки". Приобретая данную опцию, Вы получаете:',enText:'If your company is interested in a more active market presence or aims to maximize market promotion, we recommend the "Exhibition Partnership" package. By choosing this option, you will receive:',tmText:'Eger siziň kompaniýaňyz bazara has işjeň çykmaga gyzyklanýan bolsa, "Serginiň hyzmatdaşlygy" paketini ulanyň. Bu opsiýany alyp, siz şulary alarsyňyz:'},partnershipItems:[{ruText:"Статус Партнера выставки, в зависимости от выбранного пакета",enText:"Exhibition Partner status, depending on the selected package",tmText:"Saýlanan pakete baglylykda Serginiň hyzmatdaşy statusy"},{ruText:"Масштабную рекламную кампанию (размещение логотипа компании на всей рекламной продукции выставки)",enText:"A large-scale advertising campaign (placement of your company logo on all exhibition promotional materials)",tmText:"Uly gerimli reklama kampaniýasy (kompaniýanyň logotipini serginiň ähli reklama önümlerinde ýerleşdirmek)"},{ruText:"Широкую узнаваемость",enText:"Wide recognition",tmText:"Giň tanalmaklyk"},{ruText:"Ассоциирование выставки с именем Вашей компании и др.",enText:"Association of the exhibition with your company's name, and more",tmText:"Serginiň siziň kompaniýaňyzyň ady bilen assosiasiýasy we ş.m."}],partnershipNote:{ruText:"Пожалуйста, уточните стоимость у менеджера проекта.",enText:"Please contact the project manager to clarify the cost.",tmText:"Bahany taslamanyň menejeri bilen anyklaň."},exampleImageAlt:{ruText:"Пример площадки",enText:"Example space",tmText:"Meýdançanyň mysaly"},standardExampleAlt:{ruText:"Пример стандартной застройки",enText:"Standard booth example",tmText:"Standart gurluşygyň mysaly"},customExampleAlt:{ruText:"Пример индивидуального дизайна",enText:"Custom booth example",tmText:"Indiwidual dizaýnyň mysaly"}},kt=()=>a.jsx("svg",{width:"14",height:"20",viewBox:"0 0 14 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:a.jsx("path",{d:"M7 1V15M7 15L2 10M7 15L12 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Ir(){$();const n=O(t=>t.lang),e=t=>n==="ru"?t.ruText:n==="tm"?t.tmText??t.enText:t.enText;return a.jsxs("div",{children:[a.jsx(ue,{title:e(P.title)}),a.jsx(ee,{className:"page-padding",children:a.jsxs("div",{className:"mx-auto max-w-[900px] text-on_surface",children:[a.jsx("p",{className:"mb-10 text-3xl font-medium",children:e(P.title)}),a.jsxs(H,{className:"mb-2 bg-primary md:text-base w-full",children:["1. ",e(P.exhibitionSpace)]}),a.jsx(H,{variant:"outline",className:"w-full mb-10 border border-primary py-1 text-center text-base text-primary md:text-base",children:e(P.spaceOnly)}),a.jsx("p",{className:"mb-5 text-center text-lg",children:e(P.example)}),a.jsx("div",{className:"mx-auto h-[180px] w-full max-w-[754px] md:h-[377px]",children:a.jsx("img",{src:Or,alt:e(P.exampleImageAlt),className:"size-full rounded-sm object-cover"})}),a.jsx("div",{className:"mt-5 text-center text-base leading-relaxed",children:a.jsx("p",{children:e(P.spaceOnlyDescription)})}),a.jsxs("div",{className:"mt-10 grid grid-cols-1 gap-6 md:grid-cols-2",children:[a.jsxs("div",{className:"w-full flex flex-col items-center gap-2 text-primary",children:[a.jsx(kt,{}),a.jsx("div",{className:"w-full border border-primary py-1 text-center text-base text-primary md:text-base",children:e(P.standardBooth)})]}),a.jsxs("div",{className:"flex flex-col items-center gap-2 text-primary",children:[a.jsx(kt,{}),a.jsx("div",{className:"w-full border border-primary py-1 text-center text-base text-primary md:text-base",children:e(P.customBooth)})]})]}),a.jsxs("div",{className:"mt-10 grid grid-cols-1 gap-6 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"mb-5 text-base",children:[e(P.example),":"]}),a.jsx("img",{src:"/example.jpeg",alt:e(P.standardExampleAlt),className:"h-[160px] w-full rounded-sm object-cover md:h-[190px]"}),a.jsx("p",{className:"mt-2 text-base leading-relaxed",children:e(P.boothExampleDescription)})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"mb-5 text-base",children:[e(P.example),":"]}),a.jsx("img",{src:"/example-2.jpeg",alt:e(P.customExampleAlt),className:"h-[160px] w-full rounded-sm object-cover md:h-[190px]"}),a.jsx("p",{className:"mt-2 text-base leading-relaxed",children:e(P.boothExampleDescription)})]})]}),a.jsx("p",{className:"mt-6 text-2xl",children:e(P.registrationFee)}),a.jsx("p",{className:"text-base mt-3",children:e(P.pricingNote)}),a.jsxs("div",{className:"mt-6 bg-primary py-3 text-center text-xs font-medium text-on_primary md:text-base",children:["2. ",e(P.partnershipTitle)]}),a.jsxs("div",{className:"mt-3 text-base leading-relaxed font-normal",children:[a.jsx("p",{className:"mb-2",children:e(P.partnershipIntro)}),a.jsx("ul",{className:"list-disc pl-5",children:P.partnershipItems.map(t=>a.jsx("li",{children:e(t)},t.enText))}),a.jsx("p",{className:"mt-2",children:e(P.partnershipNote)})]})]})})]})}const K={title:{ruText:"Партнерские возможности",enText:"Partner opportunities",tmText:"Hyzmatdaşlyk mümkinçilikleri"},intro:{ruText:"Предлагаем Вам воспользоваться комплексными возможностями - партнерскими пакетами, разработанными под различные маркетинговые задачи компании-участника, которые позволят максимально использовать коммерческий потенциал выставки для усиления бренда Вашей компании и бесспорно повысят эффективность продвижения Вашей компании.",enText:"We invite you to take advantage of integrated opportunities - partnership packages designed for various marketing objectives of the exhibiting company. They allow you to maximize the exhibition's commercial potential, strengthen your brand, and significantly increase the effectiveness of your promotion.",tmText:"Size dürli marketing wezipelerine gönükdirilen hyzmatdaşlyk paketlerinden peýdalanmagy teklip edýäris. Olar serginiň söwda potensialyny iň ýokary derejede ulanmaga, brendiňizi güýçlendirmäge we kompaniýaňyzy öňe sürmegiň netijeliligini ep-esli artdyrmaga mümkinçilik berýär."},partnership:{ruText:"Партнерство выставки - это всегда больше, чем просто участие. Это прекрасная возможность выгодно подать Вашу продукцию широкой публике в соответствии с Вашими основными целями и задачами. В каждом партнерском пакете предоставлены уникальные позиции, специально сформированные таким образом, что Вы наиболее точно и эффективно передаете обращение к целевой аудитории.",enText:"Exhibition partnership is always more than just participation. It is a great opportunity to present your products to a wide audience in line with your goals and objectives. Each partnership package includes unique placements structured so you can communicate your message to the target audience as precisely and effectively as possible.",tmText:"Serginiň hyzmatdaşlygy – bu diňe bir gatnaşmakdan has köp zatdyr. Bu öz önümleriňizi giň köpçülige hödürlemek üçin ajaýyp mümkinçilikdir. Her hyzmatdaşlyk paketinde maksatly auditoriýa iň takyk we netijeli ýol bilen ýüzlenmegiňiz üçin ýörite düzülen özboluşly orunlar bar."},benefitsTitle:{ruText:"Партнерство выставки Turkmen Textile позволит:",enText:"Partnership with Turkmen Textile will allow you:",tmText:"Turkmen Textile sergisiniň hyzmatdaşlygy mümkinçilik berer:"},benefits:[{ruText:"Укрепить позиции Вашей компании на рынке.",enText:"Strengthen your company's position in the market.",tmText:"Kompaniýaňyzyň bazardaky pozisiýasyny berkitmek."},{ruText:"Обеспечить существенное преимущество в конкурентной среде.",enText:"Gain a significant advantage in the competitive environment.",tmText:"Bäsdeşlik gurşawynda ep-esli artykmaçlyk gazanmak."},{ruText:"Закрепить имидж успешного бренда Вашей компании.",enText:"Reinforce the image of your company as a successful brand.",tmText:"Kompaniýaňyzyň üstünlikli brend hökmünde abraýyny berkitmek."},{ruText:"Сделать Вашу торговую марку узнаваемой для широкого круга участников и посетителей выставки.",enText:"Make your trademark recognizable to a wide range of exhibition participants and visitors.",tmText:"Söwda belgiňizi serginiň gatnaşyjylarynyň we gelýänleriniň giň topary üçin tanalýan etmek."},{ruText:"Выделить Вашу компанию среди других участников.",enText:"Stand out among other exhibitors.",tmText:"Kompaniýaňyzy beýleki gatnaşyjylaryň arasynda tapawutlandyrmak."}],highlight:{ruText:"Вы хотите, чтобы в профессиональной среде именно Вашу компанию считали ключевым игроком на рынке? Тогда заявите о себе громче всех!",enText:"Do you want your company to be seen as a key player in the professional community? Then make yourself heard louder than anyone else!",tmText:"Siz professional gurşawda kompaniýaňyzyň bazardaky esasy oýunçy hökmünde tanalmagyny isleýärsiňizmi? Onda hemmelerden has gaty sesleniniň!"},packagesTitle:{ruText:"Варианты партнерских пакетов:",enText:"Partnership package options:",tmText:"Hyzmatdaşlyk paketleriniň görnüşleri:"},packages:[{ruText:"Генеральный партнер выставки",enText:"General partner of the exhibition.",tmText:"Serginiň baş hyzmatdaşy"},{ruText:"Партнер Ленты Ведущих Посетителей",enText:"Lead visitor lanyard partner.",tmText:"Öňdebaryjy gelýänleriň lentasynyň hyzmatdaşy"},{ruText:"Партнер деловой программы",enText:"Business program partner.",tmText:"Işewür programmanyň hyzmatdaşy"},{ruText:"Партнер вечернего приема",enText:"Evening reception partner.",tmText:"Agşamky kabul edişligiň hyzmatdaşy"},{ruText:"Партнер пакетов посетителей",enText:"Visitor package partner.",tmText:"Gelýänleriň paketiniň hyzmatdaşy"},{ruText:"Партнер каталога выставки",enText:"Exhibition catalog partner.",tmText:"Serginiň katalogynyň hyzmatdaşy"},{ruText:"Партнер VIP делегации",enText:"VIP delegation partner.",tmText:"VIP delegasiýanyň hyzmatdaşy"},{ruText:"Партнер выставки",enText:"Exhibition partner.",tmText:"Serginiň hyzmatdaşy"}],optionsNote:{ruText:"Данные опции являются базовыми, но мы всегда готовы обсудить вопрос о специальных проектах в рамках партнерства выставки, которые будут соответствовать Вашему бюджету, потребностям и целям.",enText:"These options are basic, but we are always ready to discuss special projects within the exhibition partnership that match your budget, needs, and goals.",tmText:"Bu opsiýalar esasy opsiýalardyr, emma biz elmydama siziň býudjetiňize, zerurlyklarňyza we maksatlaryňyza laýyk gelýän ýörite taslamalary ara alyp maslahatlaşmaga taýýardyrys."},contactNote:{text:{ruText:"По вопросам цен и дополнительных опций партнерских пакетов выставки KIFT, пожалуйста, обращайтесь к ",enText:"For pricing and additional options of KIFT exhibition partnership packages, please contact the ",tmText:"Serginiň hyzmatdaşlyk paketleriniň bahalary we goşmaça opsiýalary boýunça haýyş edýäris, ýüz tutuň "},linkText:{ruText:"ОРГАНИЗАТОРАМ",enText:"ORGANIZERS",tmText:"GURAMAÇYLARA"}}};function Fr(){$();const n=O(t=>t.lang),e=t=>n==="ru"?t.ruText:n==="tm"?t.tmText??t.enText:t.enText;return a.jsxs("div",{children:[a.jsx(ue,{title:e(K.title)}),a.jsx(ee,{className:"page-padding text-sm!",children:a.jsxs("div",{className:"mx-auto max-w-[900px]",children:[a.jsx("h2",{className:"mb-3 text-2xl font-medium",children:e(K.title)}),a.jsx("div",{className:"mb-4 rounded-sm bg-surface_container px-4 py-3 text-sm leading-relaxed text-on_surface_v",children:e(K.intro)}),a.jsx("p",{className:"mb-4 text-sm leading-relaxed text-on_surface_v",children:e(K.partnership)}),a.jsx("h3",{className:"mb-2 text-base font-medium",children:e(K.benefitsTitle)}),a.jsx("ul",{className:"mb-4 list-disc pl-5 text-sm leading-relaxed text-on_surface_v",children:K.benefits.map(t=>a.jsx("li",{children:e(t)},t.enText))}),a.jsx("div",{className:"mb-6 rounded-sm border border-outline px-4 py-3 text-center text-[10px] uppercase text-on_surface_v",children:e(K.highlight)}),a.jsx("h3",{className:"mb-2 text-base font-medium",children:e(K.packagesTitle)}),a.jsx("ul",{className:"mb-4 border-t border-outline_v",children:K.packages.map(t=>a.jsxs("li",{className:"flex items-center gap-2 border-b border-outline_v py-2 text-sm text-on_surface_v",children:[a.jsx("span",{className:"text-xs text-primary",children:"✓"}),a.jsx("span",{children:e(t)})]},t.enText))}),a.jsx("p",{className:"text-sm leading-relaxed text-on_surface_v",children:e(K.optionsNote)}),a.jsxs("p",{className:"text-sm leading-relaxed text-on_surface_v",children:[e(K.contactNote.text),a.jsx("span",{className:"text-primary underline",children:e(K.contactNote.linkText)})]})]})})]})}const $r=[{element:a.jsx(za,{}),path:"/",children:[{element:a.jsx(Ca,{}),path:"",errorElement:a.jsx(A,{})},{element:a.jsx(pr,{}),path:"about",errorElement:a.jsx(A,{})},{element:a.jsx(mr,{}),path:"B2B-B2G",errorElement:a.jsx(A,{})},{element:a.jsx(gr,{}),path:"become-sponsor",errorElement:a.jsx(A,{})},{element:a.jsx(Cr,{}),path:"stend-form",errorElement:a.jsx(A,{})},{element:a.jsx(kr,{}),path:"contacts",errorElement:a.jsx(A,{})},{element:a.jsx(Tr,{}),path:"news",errorElement:a.jsx(A,{})},{element:a.jsx(Sr,{}),path:"news/:id",errorElement:a.jsx(A,{})},{element:a.jsx(_r,{}),path:"participants",errorElement:a.jsx(A,{})},{element:a.jsx(wr,{}),path:"media",errorElement:a.jsx(A,{})},{element:a.jsx(Lr,{}),path:"impressions",errorElement:a.jsx(A,{})},{element:a.jsx(Pr,{}),path:"impressions-tm",errorElement:a.jsx(A,{})},{element:a.jsx(Ir,{}),path:"participation-options",errorElement:a.jsx(A,{})},{element:a.jsx(Fr,{}),path:"partner-opportunities",errorElement:a.jsx(A,{})}]}],Ar=Bs($r),Dr=new Fs;Hs.createRoot(document.getElementById("root")).render(a.jsx(y.StrictMode,{children:a.jsx($s,{client:Dr,children:a.jsx(Gs,{router:Ar})})})); +var Zt=Object.defineProperty;var es=(n,e,t)=>e in n?Zt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var b=(n,e,t)=>es(n,typeof e!="symbol"?e+"":e,t);import{u as O,i as ts,j as a,H as ss,F as ns,c as Z,a as is,b as as,d as rs,e as os,f as ls,g as cs,h as us,k as ds,z as v,l as Oe,m as ke,S as tt,n as ms,P as je,o as ie,p as vt,q as ps,r as hs,s as Ke,t as Se,v as T,w as ze,x as W,y as U,A as q,B as N,C as H,L as We,D as Ie,E as Fe,G as he,I as Ue,J as $e,K as fs,M as ue,N as gs,O as xs,Q as ys,R as bs,T as ks,U as vs,V as ws,W as ge,X as js,Y as Ss,Z as ee,_ as Ts,$ as wt,a0 as Ns,a1 as jt,a2 as _s,a3 as fe,a4 as qe,a5 as Es,a6 as St,a7 as Tt,a8 as zs,a9 as st,aa as Cs,ab as Nt,ac as Rs,ad as Ls,ae as Ps,af as Os,ag as Is,ah as Fs,ai as $s}from"./ui-library-Du5AO6gB.js";import{f as As,a as y,O as Ds,e as le,u as Ms,g as Je,L as nt,h as Bs,i as Gs}from"./react-vendor-CJoWVsUG.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 r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();var _e={},it;function Vs(){if(it)return _e;it=1;var n=As();return _e.createRoot=n.createRoot,_e.hydrateRoot=n.hydrateRoot,_e}var Hs=Vs();const j=n=>typeof n=="string",ye=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},at=n=>n==null?"":""+n,Ks=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},Ws=/###/g,rt=n=>n&&n.indexOf("###")>-1?n.replace(Ws,"."):n,ot=n=>!n||j(n),be=(n,e,t)=>{const s=j(e)?e.split("."):e;let i=0;for(;i{const{obj:s,k:i}=be(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],o=e.slice(0,e.length-1),c=be(n,o,Object);for(;c.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),c=be(n,o,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${r}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${r}`]=t},Us=(n,e,t,s)=>{const{obj:i,k:r}=be(n,e,Object);i[r]=i[r]||[],i[r].push(t)},Ce=(n,e)=>{const{obj:t,k:s}=be(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},qs=(n,e,t)=>{const s=Ce(n,t);return s!==void 0?s:Ce(e,t)},_t=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?j(n[s])||n[s]instanceof String||j(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):_t(n[s],e[s],t):n[s]=e[s]);return n},de=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Js={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ys=n=>j(n)?n.replace(/[&<>"'\/]/g,e=>Js[e]):n;class Xs{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=[" ",",","?","!",";"],Zs=new Xs(20),en=(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=Zs.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(n);if(!r){const o=n.indexOf(t);o>0&&!i.test(n.substring(0,o))&&(r=!0)}return r},Ge=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 r=0;r-1&&ln==null?void 0:n.replace("_","-"),tn={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 Le{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||tn,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[c,l]=o;for(let u=0;u{let[c,l]=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,m;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;e.indexOf(".")>-1?c=e.split("."):(c=[e,t],s&&(Array.isArray(s)?c.push(...s):j(s)&&r?c.push(...s.split(r)):c.push(s)));const l=Ce(this.data,c);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=c[0],t=c[1],s=c.slice(2).join(".")),l||!o||!j(s)?l:Ge((m=(u=this.data)==null?void 0:u[e])==null?void 0:m[t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let c=[e,t];s&&(c=c.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(c=e.split("."),i=t,t=c[1]),this.addNamespaces(t),lt(this.data,c,i),r.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 r in s)(j(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[e,t];e.indexOf(".")>-1&&(c=e.split("."),i=s,s=t,t=c[1]),this.addNamespaces(t);let l=Ce(this.data,c)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?_t(l,s,r):l={...l,...s},lt(this.data,c,l),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 Et={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{var o;e=((o=this.processors[r])==null?void 0:o.process(e,t,s,i))??e}),e}};const ut={},dt=n=>!j(n)&&typeof n!="boolean"&&typeof n!="number";class Pe extends Ae{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ks(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Q.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 r=t.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!en(e,s,i);if(o&&!c){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:j(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:j(r)?[r]:r}}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,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(e[e.length-1],t),l=c[c.length-1],u=t.lng||this.language,m=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(m){const I=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${I}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${I}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:o}const h=this.resolve(e,t);let d=h==null?void 0:h.res;const f=(h==null?void 0:h.usedKey)||o,p=(h==null?void 0:h.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,k=t.count!==void 0&&!j(t.count),S=Pe.hasDefaultValue(t),E=k?this.pluralResolver.getSuffix(u,t.count,t):"",L=t.ordinal&&k?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",C=k&&!t.ordinal&&t.count===0,z=C&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${E}`]||t[`defaultValue${L}`]||t.defaultValue;let _=d;w&&!d&&S&&(_=z);const M=dt(_),te=Object.prototype.toString.apply(_);if(w&&_&&M&&g.indexOf(te)<0&&!(j(x)&&Array.isArray(_))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const I=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,_,{...t,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=I,h.usedParams=this.getUsedParamsDetails(t),h):I}if(r){const I=Array.isArray(_),B=I?[]:{},Te=I?p:f;for(const J in _)if(Object.prototype.hasOwnProperty.call(_,J)){const Y=`${Te}${r}${J}`;S&&!d?B[J]=this.translate(Y,{...t,defaultValue:dt(z)?z[J]:void 0,joinArrays:!1,ns:c}):B[J]=this.translate(Y,{...t,joinArrays:!1,ns:c}),B[J]===Y&&(B[J]=_[J])}d=B}}else if(w&&j(x)&&Array.isArray(d))d=d.join(x),d&&(d=this.extendTranslation(d,e,t,s));else{let I=!1,B=!1;!this.isValidLookup(d)&&S&&(I=!0,d=z),this.isValidLookup(d)||(B=!0,d=o);const J=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:d,Y=S&&z!==d&&this.options.updateMissing;if(B||I||Y){if(this.logger.log(Y?"updateKey":"missingKey",u,l,o,Y?z:d),r){const V=this.resolve(o,{...t,keySeparator:!1});V&&V.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 G=[];const Ne=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ne&&Ne[0])for(let V=0;V{var et;const Ze=S&&xe!==d?xe:J;this.options.missingKeyHandler?this.options.missingKeyHandler(V,l,oe,Ze,Y,t):(et=this.backendConnector)!=null&&et.saveMissing&&this.backendConnector.saveMissing(V,l,oe,Ze,Y,t),this.emit("missingKey",V,l,oe,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?G.forEach(V=>{const oe=this.pluralResolver.getSuffixes(V,t);C&&t[`defaultValue${this.options.pluralSeparator}zero`]&&oe.indexOf(`${this.options.pluralSeparator}zero`)<0&&oe.push(`${this.options.pluralSeparator}zero`),oe.forEach(xe=>{Qe([V],o+xe,t[`defaultValue${xe}`]||z)})}):Qe(G,o,z))}d=this.extendTranslation(d,e,t,h,s),B&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(B||I)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,I?d:void 0))}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(t),h):d}extendTranslation(e,t,s,i,r){var u,m;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 h=j(e)&&(((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(h){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let f=s.replace&&!j(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),h){const p=e.match(this.interpolator.nestingRegexp),g=p&&p.length;d1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,o,c;return j(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),m=u.key;i=m;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=t.count!==void 0&&!j(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(j(t.context)||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(x=>{var w,k;this.isValidLookup(s)||(c=x,!ut[`${g[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(c))&&(ut[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${c}" 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 C;if(this.isValidLookup(s))return;o=S;const E=[m];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(E,m,S,x,t);else{let z;d&&(z=this.pluralResolver.getSuffix(S,t.count,t));const _=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(E.push(m+z),t.ordinal&&z.indexOf(M)===0&&E.push(m+z.replace(M,this.options.pluralSeparator)),f&&E.push(m+_)),p){const te=`${m}${this.options.contextSeparator}${t.context}`;E.push(te),d&&(E.push(te+z),t.ordinal&&z.indexOf(M)===0&&E.push(te+z.replace(M,this.options.pluralSeparator)),f&&E.push(te+_))}}let L;for(;L=E.pop();)this.isValidLookup(s)||(r=L,s=this.getResource(S,x,L,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:c}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(r=this.i18nFormat)!=null&&r.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&&!j(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 r of t)delete i[r]}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 mt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Q.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(j(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(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),j(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=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return j(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):j(e)&&r(this.formatLanguageCode(e)),s.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}const pt={zero:0,one:1,two:2,few:3,many:4,other:5},ht={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Q.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",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];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!"),ht;if(!e.match(/-|_/))return ht;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[r]=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,r)=>pt[i]-pt[r]).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 ft=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,r=qs(n,e,t);return!r&&i&&j(t)&&(r=Ge(n,t,s),r===void 0&&(r=Ge(e,t,s))),r},Me=n=>n.replace(/\$/g,"$$$$");class nn{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Q.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:r,prefixEscaped:o,suffix:c,suffixEscaped:l,formatSeparator:u,unescapeSuffix:m,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:k}=e.interpolation;this.escape=t!==void 0?t:Ys,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?de(r):o||"{{",this.suffix=c?de(c):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=m?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=d?de(d):f||de("$t("),this.nestingSuffix=p?de(p):g||de(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||1e3,this.alwaysFormat=k!==void 0?k:!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 r,o,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const k=ft(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,s,{...i,...t,interpolationkey:p}):k}const g=p.split(this.formatSeparator),x=g.shift().trim(),w=g.join(this.formatSeparator).trim();return this.format(ft(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,s,{...i,...t,interpolationkey:x})};this.resetRegExp();const m=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((f=i==null?void 0:i.interpolation)==null?void 0:f.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>Me(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?Me(this.escape(p)):Me(p)}].forEach(p=>{for(c=0;r=p.regex.exec(e);){const g=r[1].trim();if(o=u(g),o===void 0)if(typeof m=="function"){const w=m(e,r,i);o=j(w)?w:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(h){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),o="";else!j(o)&&!this.useRawValueToEscape&&(o=at(o));const x=p.safeValue(o);if(e=e.replace(r[0],x),h?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=r[0].length):p.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const c=(l,u)=>{const m=this.nestingOptionsSeparator;if(l.indexOf(m)<0)return l;const h=l.split(new RegExp(`${m}[ ]*{`));let d=`{${h[1]}`;l=h[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${m}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&!j(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 m=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=m.shift(),l=m,u=!0}if(r=t(c.call(this,i[1].trim(),o),o),r&&i[0]===e&&!j(r))return r;j(r)||(r=at(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((m,h)=>this.format(m,h,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const an=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[c,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),m=c.trim();t[m]||(t[m]=u),u==="false"&&(t[m]=!1),u==="true"&&(t[m]=!0),isNaN(u)||(t[m]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},me=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=s+JSON.stringify(r);let c=e[o];return c||(c=n(Re(s),i),e[o]=c),c(t)}};class rn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Q.create("formatter"),this.options=e,this.formats={number:me((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:me((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:me((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:me((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:me((t,s)=>{const i=new Intl.ListFormat(t,{...s});return r=>i.format(r)})},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()]=me(t)}format(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(c=>c.indexOf(")")>-1)){const c=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,c)].join(this.formatSeparator)}return r.reduce((c,l)=>{var h;const{formatName:u,formatOptions:m}=an(l);if(this.formats[u]){let d=c;try{const f=((h=i==null?void 0:i.formatParams)==null?void 0:h[i.interpolationkey])||{},p=f.locale||f.lng||i.locale||i.lng||s;d=this.formats[u](c,p,{...m,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return c},e)}}const on=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class ln extends Ae{constructor(e,t,s){var r,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=Q.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=(r=this.backend)==null?void 0:r.init)==null||o.call(r,s,i.backend,i)}queueLoad(e,t,s,i){const r={},o={},c={},l={};return e.forEach(u=>{let m=!0;t.forEach(h=>{const d=`${u}|${h}`;!s.reload&&this.store.hasResourceBundle(u,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,m=!1,o[d]===void 0&&(o[d]=!0),r[d]===void 0&&(r[d]=!0),l[h]===void 0&&(l[h]=!0)))}),m||(c[u]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&s&&this.store.addResourceBundle(r,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const c={};this.queue.forEach(l=>{Us(l.loaded,[r],o),on(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{c[u]||(c[u]={});const m=l.loaded[u];m.length&&m.forEach(h=>{c[u][h]===void 0&&(c[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=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:r,callback:o});return}this.readingCalls++;const c=(u,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&m&&i{this.read.call(this,e,t,s,i+1,r*2,o)},r);return}o(u,m)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(m=>c(null,m)).catch(c):c(null,u)}catch(u){c(u)}return}return l(e,t,c)}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();j(e)&&(e=this.languageUtils.toResolveHierarchy(e)),j(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.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],r=s[1];this.read(i,r,"read",void 0,void 0,(o,c)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,o),!o&&c&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,c),this.loaded(e,o,c)})}saveMissing(e,t,s,i,r){var l,u,m,h,d;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((h=(m=this.services)==null?void 0:m.utils)!=null&&h.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((d=this.backend)!=null&&d.create){const f={...o,isUpdate:r},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(e,t,s,i,f):g=p(e,t,s,i),g&&typeof g.then=="function"?g.then(x=>c(null,x)).catch(c):c(null,g)}catch(g){c(g)}else p(e,t,s,i,c,f)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const gt=()=>({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]),j(n[1])&&(e.defaultValue=n[1]),j(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}}),xt=n=>{var e,t;return j(n.ns)&&(n.ns=[n.ns]),j(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),j(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},Ee=()=>{},cn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ve extends Ae{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=xt(e),this.services={},this.logger=Q,this.modules={external:[]},cn(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&&(j(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=gt();this.options={...i,...this.options,...xt(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 r=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Q.init(r(this.modules.logger),this.options):Q.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=rn;const h=new mt(this.options);this.store=new ct(this.options.resources,this.options);const d=this.services;d.logger=Q,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new sn(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=r(m),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new nn(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new ln(r(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x1?p-1:0),x=1;x{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Ee),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const l=ye(),u=()=>{const m=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(d),s(h,d)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(e){var r,o;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee;const i=j(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 c=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>l(m)),(o=(r=this.options.preload)==null?void 0:r.forEach)==null||o.call(r,u=>l(u)),this.services.backendConnector.load(c,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(u)})}else s(null)}reloadResources(e,t,s){const i=ye();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=Ee),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(r)}),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"&&Et.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=ye();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(r(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(l,function(){return s.t(...arguments)})},c=l=>{var m,h;!e&&!l&&this.services.languageDetector&&(l=[]);const u=j(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),(h=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||h.call(m,u)),this.loadResources(u,d=>{o(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(e),i}getFixedT(e,t,s){var i=this;const r=function(o,c){let l;if(typeof c!="object"){for(var u=arguments.length,m=new Array(u>2?u-2:0),h=2;h`${l.keyPrefix}${d}${p}`):f=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(f,l)};return j(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,r}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,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(c,l)=>{const u=this.services.backendConnector.state[`${c}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const c=t.precheck(this,o);if(c!==void 0)return c}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!i||o(r,e)))}loadNamespaces(e,t){const s=ye();return this.options.ns?(j(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=ye();j(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{s.resolve(),t&&t(o)}),s):(t&&t(),Promise.resolve())}dir(e){var i,r;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=((r=this.services)==null?void 0:r.languageUtils)||new mt(gt());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 ve(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new ve(i);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(c=>{r[c]=this[c]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s){const c=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},Object.keys(l[u]).reduce((m,h)=>(m[h]={...l[u][h]},m),{})),{});r.store=new ct(c,i),r.services.resourceStore=r.store}return r.translator=new Pe(r.services,i),r.translator.on("*",function(c){for(var l=arguments.length,u=new Array(l>1?l-1:0),m=1;m{const n=O(e=>e.lang);return y.useEffect(()=>{F.changeLanguage(n)},[n]),null};var fa="1.3.17";function zt(n,e,t){return Math.max(n,Math.min(e,t))}function ga(n,e,t){return(1-t)*n+t*e}function xa(n,e,t,s){return ga(n,e,1-Math.exp(-t*s))}function ya(n,e){return(n%e+e)%e}var ba=class{constructor(){b(this,"isRunning",!1);b(this,"value",0);b(this,"from",0);b(this,"to",0);b(this,"currentTime",0);b(this,"lerp");b(this,"duration");b(this,"easing");b(this,"onUpdate")}advance(n){var t;if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=n;const s=zt(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=xa(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:r,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,r==null||r(),this.onUpdate=o}};function ka(n,e){let t;return function(...s){let i=this;clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(i,s)},e)}}var va=class{constructor(n,e,{autoResize:t=!0,debounce:s=250}={}){b(this,"width",0);b(this,"height",0);b(this,"scrollHeight",0);b(this,"scrollWidth",0);b(this,"debouncedResize");b(this,"wrapperResizeObserver");b(this,"contentResizeObserver");b(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});b(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});b(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=ka(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}}},Ct=class{constructor(){b(this,"events",{})}emit(n,...e){var s;let t=this.events[n]||[];for(let i=0,r=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={}}},yt=100/6,ae={passive:!1},wa=class{constructor(n,e={wheelMultiplier:1,touchMultiplier:1}){b(this,"touchStart",{x:0,y:0});b(this,"lastDelta",{x:0,y:0});b(this,"window",{width:0,height:0});b(this,"emitter",new Ct);b(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})});b(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})});b(this,"onTouchEnd",n=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:n})});b(this,"onWheel",n=>{let{deltaX:e,deltaY:t,deltaMode:s}=n;const i=s===1?yt:s===2?this.window.width:1,r=s===1?yt:s===2?this.window.height:1;e*=i,t*=r,e*=this.options.wheelMultiplier,t*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:t,event:n})});b(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,ae),this.element.addEventListener("touchstart",this.onTouchStart,ae),this.element.addEventListener("touchmove",this.onTouchMove,ae),this.element.addEventListener("touchend",this.onTouchEnd,ae)}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,ae),this.element.removeEventListener("touchstart",this.onTouchStart,ae),this.element.removeEventListener("touchmove",this.onTouchMove,ae),this.element.removeEventListener("touchend",this.onTouchEnd,ae)}},bt=n=>Math.min(1,1.001-Math.pow(2,-10*n)),ja=class{constructor({wrapper:n=window,content:e=document.documentElement,eventsTarget:t=n,smoothWheel:s=!0,syncTouch:i=!1,syncTouchLerp:r=.075,touchInertiaExponent:o=1.7,duration:c,easing:l,lerp:u=.1,infinite:m=!1,orientation:h="vertical",gestureOrientation:d=h==="horizontal"?"both":"vertical",touchMultiplier:f=1,wheelMultiplier:p=1,autoResize:g=!0,prevent:x,virtualScroll:w,overscroll:k=!0,autoRaf:S=!1,anchors:E=!1,autoToggle:L=!1,allowNestedScroll:C=!1,__experimental__naiveDimensions:z=!1,naiveDimensions:_=z,stopInertiaOnNavigate:M=!1}={}){b(this,"_isScrolling",!1);b(this,"_isStopped",!1);b(this,"_isLocked",!1);b(this,"_preventNextNativeScrollEvent",!1);b(this,"_resetVelocityTimeout",null);b(this,"_rafId",null);b(this,"isTouching");b(this,"time",0);b(this,"userData",{});b(this,"lastVelocity",0);b(this,"velocity",0);b(this,"direction",0);b(this,"options");b(this,"targetScroll");b(this,"animatedScroll");b(this,"animate",new ba);b(this,"emitter",new Ct);b(this,"dimensions");b(this,"virtualScroll");b(this,"onScrollEnd",n=>{n instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&n.stopPropagation()});b(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});b(this,"onTransitionEnd",n=>{n.propertyName.includes("overflow")&&this.checkOverflow()});b(this,"onClick",n=>{const t=n.composedPath().filter(s=>s instanceof HTMLAnchorElement&&s.getAttribute("href"));if(this.options.anchors){const s=t.find(i=>{var r;return(r=i.getAttribute("href"))==null?void 0:r.includes("#")});if(s){const i=s.getAttribute("href");if(i){const r=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,o=`#${i.split("#")[1]}`;this.scrollTo(o,r)}}}this.options.stopInertiaOnNavigate&&t.find(i=>i.host===window.location.host)&&this.reset()});b(this,"onPointerDown",n=>{n.button===1&&this.reset()});b(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"),r=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 l=this.options.gestureOrientation==="vertical"&&t===0||this.options.gestureOrientation==="horizontal"&&e===0;if(o||l)return;let u=s.composedPath();u=u.slice(0,u.indexOf(this.rootElement));const m=this.options.prevent;if(u.find(x=>{var w,k,S;return x instanceof HTMLElement&&(typeof m=="function"&&(m==null?void 0:m(x))||((w=x.hasAttribute)==null?void 0:w.call(x,"data-lenis-prevent"))||i&&((k=x.hasAttribute)==null?void 0:k.call(x,"data-lenis-prevent-touch"))||r&&((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.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&r)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let d=t;this.options.gestureOrientation==="both"?d=Math.abs(t)>Math.abs(e)?t:e:this.options.gestureOrientation==="horizontal"&&(d=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll0||this.animatedScroll===this.limit&&t<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();const f=i&&this.options.syncTouch,g=i&&s.type==="touchend";g&&(d=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+d,{programmatic:!1,...f?{lerp:g?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});b(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))}});b(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=fa,(!n||n===document.documentElement)&&(n=window),typeof c=="number"&&typeof l!="function"?l=bt:typeof l=="function"&&typeof c!="number"&&(c=1),this.options={wrapper:n,content:e,eventsTarget:t,smoothWheel:s,syncTouch:i,syncTouchLerp:r,touchInertiaExponent:o,duration:c,easing:l,lerp:u,infinite:m,gestureOrientation:d,orientation:h,touchMultiplier:f,wheelMultiplier:p,autoResize:g,prevent:x,virtualScroll:w,overscroll:k,autoRaf:S,anchors:E,autoToggle:L,allowNestedScroll:C,naiveDimensions:_,stopInertiaOnNavigate:M},this.dimensions=new va(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.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new wa(t,{touchMultiplier:f,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),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.stopInertiaOnNavigate)&&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)}get overflow(){const n=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[n]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}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(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(n,{offset:e=0,immediate:t=!1,lock:s=!1,programmatic:i=!0,lerp:r=i?this.options.lerp:void 0,duration:o=i?this.options.duration:void 0,easing:c=i?this.options.easing:void 0,onStart:l,onComplete:u,force:m=!1,userData:h}={}){if(!((this.isStopped||this.isLocked)&&!m)){if(typeof n=="string"&&["top","left","start","#"].includes(n))n=0;else if(typeof n=="string"&&["bottom","right","end"].includes(n))n=this.limit;else{let d;if(typeof n=="string"?(d=document.querySelector(n),d||(n==="#top"?n=0:console.warn("Lenis: Target not found",n))):n instanceof HTMLElement&&(n!=null&&n.nodeType)&&(d=n),d){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?p.left:p.top}const f=d.getBoundingClientRect();n=(this.isHorizontal?f.left:f.top)+this.animatedScroll}}if(typeof n=="number"){if(n+=e,n=Math.round(n),this.options.infinite){if(i){this.targetScroll=this.animatedScroll=this.scroll;const d=n-this.animatedScroll;d>this.limit/2?n=n-this.limit:d<-this.limit/2&&(n=n+this.limit)}}else n=zt(0,n,this.limit);if(n===this.targetScroll){l==null||l(this),u==null||u(this);return}if(this.userData=h??{},t){this.animatedScroll=this.targetScroll=n,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),u==null||u(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}i||(this.targetScroll=n),typeof o=="number"&&typeof c!="function"?c=bt:typeof c=="function"&&typeof o!="number"&&(o=1),this.animate.fromTo(this.animatedScroll,n,{duration:o,easing:c,lerp:r,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",l==null||l(this)},onUpdate:(d,f)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=d-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=d,this.setScroll(this.scroll),i&&(this.targetScroll=d),f||this.emit(),f&&(this.reset(),this.emit(),u==null||u(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 r,o,c,l,u,m,h,d;const f=this.options.gestureOrientation;if(s-(i.time??0)>2e3){i.time=Date.now();const L=window.getComputedStyle(n);i.computedStyle=L;const C=L.overflowX,z=L.overflowY;if(r=["auto","overlay","scroll"].includes(C),o=["auto","overlay","scroll"].includes(z),i.hasOverflowX=r,i.hasOverflowY=o,!r&&!o||f==="vertical"&&!o||f==="horizontal"&&!r)return!1;u=n.scrollWidth,m=n.scrollHeight,h=n.clientWidth,d=n.clientHeight,c=u>h,l=m>d,i.isScrollableX=c,i.isScrollableY=l,i.scrollWidth=u,i.scrollHeight=m,i.clientWidth=h,i.clientHeight=d}else c=i.isScrollableX,l=i.isScrollableY,r=i.hasOverflowX,o=i.hasOverflowY,u=i.scrollWidth,m=i.scrollHeight,h=i.clientWidth,d=i.clientHeight;if(!r&&!o||!c&&!l||f==="vertical"&&(!o||!l)||f==="horizontal"&&(!r||!c))return!1;let p;if(f==="horizontal")p="x";else if(f==="vertical")p="y";else{const L=e!==0,C=t!==0;L&&r&&c&&(p="x"),C&&o&&l&&(p="y")}if(!p)return!1;let g,x,w,k,S;if(p==="x")g=n.scrollLeft,x=u-h,w=e,k=r,S=c;else if(p==="y")g=n.scrollTop,x=m-d,w=t,k=o,S=l;else return!1;return(w>0?g0)&&k&&S}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.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?ya(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()}},Sa=class{constructor(n){b(this,"listeners",[]);this.state=n}set(n){this.state=n;for(let e of this.listeners)e(this.state)}subscribe(n){return this.listeners=[...this.listeners,n],()=>{this.listeners=this.listeners.filter(e=>e!==n)}}get(){return this.state}};function Ta(n){const[e,t]=y.useState(n.get());return y.useEffect(()=>n.subscribe(s=>t(s)),[n]),e}var Rt=y.createContext(null),Ve=new Sa(null),Na=y.forwardRef(({children:n,root:e=!1,options:t={},autoRaf:s=!0,...i},r)=>{const o=y.useRef(null),c=y.useRef(null),[l,u]=y.useState(void 0);y.useImperativeHandle(r,()=>({wrapper:o.current,content:c.current,lenis:l}),[l]),y.useEffect(()=>{const f=new ja({...t,...o.current&&c.current&&{wrapper:o.current,content:c.current},autoRaf:(t==null?void 0:t.autoRaf)??s});return u(f),()=>{f.destroy(),u(void 0)}},[e,JSON.stringify({...t,wrapper:null,content:null})]);const m=y.useRef([]),h=y.useCallback((f,p)=>{m.current.push({callback:f,priority:p}),m.current.sort((g,x)=>g.priority-x.priority)},[]),d=y.useCallback(f=>{m.current=m.current.filter(p=>p.callback!==f)},[]);return y.useEffect(()=>{if(e&&l)return Ve.set({lenis:l,addCallback:h,removeCallback:d}),()=>Ve.set(null)},[e,l,h,d]),y.useEffect(()=>{if(!l)return;const f=p=>{var g;for(let x=0;x{l.off("scroll",f)}},[l]),n?a.jsx(Rt.Provider,{value:{lenis:l,addCallback:h,removeCallback:d},children:e&&e!=="asChild"?n:a.jsx("div",{ref:o,...i,children:a.jsx("div",{ref:c,children:n})})}):null}),_a={};function Ea(n,e=[],t=0){const s=y.useContext(Rt),i=Ta(Ve),r=s??i??_a,{lenis:o,addCallback:c,removeCallback:l}=r;return y.useEffect(()=>{},[o,c,l,t,...e]),o}function za(){return a.jsxs(Na,{root:!0,options:{lerp:.1},children:[a.jsx(ss,{}),a.jsxs("main",{className:"flex flex-col min-h-screen",children:[a.jsx(ha,{}),a.jsx("div",{className:"flex-auto",children:a.jsx(Ds,{})})]}),a.jsx(ns,{})]})}const A=({className:n})=>a.jsx("div",{className:Z("container py-32",n),children:a.jsx("h1",{className:"text-5xl text-center",children:"Oops, something went wrong"})}),$=n=>{const e=Ea();y.useEffect(()=>{e&&e.scrollTo(0,{lerp:.3,duration:.3})},[e,n])};function Ca(){return $(),a.jsxs("div",{className:"flex flex-col",children:[a.jsx(is,{}),a.jsx(as,{}),a.jsx(rs,{}),a.jsx(os,{}),a.jsx(ls,{}),a.jsx(cs,{}),a.jsx(us,{}),a.jsx(ds,{})]})}const D=(n,e,t,s)=>s==="ru"?n:s==="tm"?t:e,Ra=n=>v.object({type:v.string(),company_name:v.string().min(3,{message:D("Название компании должно быть не менее 3 символов","Company name must be at least 3 characters","Kompaniýanyň ady azyndan 3 simwoldan ybarat bolmaly",n)}),representative_name:v.string().min(3,{message:D("Имя представителя должно быть не менее 3 символов","Representative name must be at least 3 characters","Wekiliniň ady azyndan 3 simwoldan ybarat bolmaly",n)}),job_title:v.string().min(3,{message:D("Должность должна быть не менее 3 символов","Job title must be at least 3 characters","Wezipesi azyndan 3 simwoldan ybarat bolmaly",n)}),participants_number:v.string().min(1,{message:D("Укажите количество участников","Specify the number of participants","Gatnaşyjylaryň sanyny görkeziň",n)}),country:v.string().min(3,{message:D("Название страны должно быть не менее 3 символов","Country must be at least 3 characters","Ýurduň ady azyndan 3 simwoldan ybarat bolmaly",n)}),email_address:v.string().email({message:D("Укажите корректный email","Enter a valid email","Dogry email salgysyny giriziň",n)}),phone_number:v.string().min(8,{message:D("Номер телефона должен быть не менее 8 символов","Phone number must be at least 8 characters","Telefon belgisi azyndan 8 simwoldan ybarat bolmaly",n)}),website:v.string().optional(),meeting_objective:v.string().min(3,{message:D("Укажите цель встречи","Specify the meeting objective","Duşuşygyň maksadyny görkeziň",n)}),proposal_description:v.string().optional(),government_agency:v.string().optional(),sector_industry:v.string().optional(),key_services:v.string().optional(),government_experience:v.string().optional(),preferred_meeting_datetime:v.string().optional(),meeting_mode:v.string().optional(),language_preference:v.string().optional(),technical_requirements:v.string().optional(),company_profile:v.custom(e=>e instanceof File,{message:D("Выберите корректный файл","Select a valid file","Dogry faýly saýlaň",n)}).refine(e=>e&&["image/jpeg","image/png","application/pdf"].includes(e.type),{message:D("Допускаются только файлы JPG, PNG и PDF","Only JPG, PNG and PDF files are allowed","Diňe JPG, PNG we PDF faýllary kabul edilýär",n)}).optional(),proposal_presentation:v.custom(e=>e instanceof File,{message:D("Выберите корректный файл","Select a valid file","Dogry faýly saýlaň",n)}).refine(e=>e&&["image/jpeg","image/png","application/pdf"].includes(e.type),{message:D("Допускаются только файлы JPG, PNG и PDF","Only JPG, PNG and PDF files are allowed","Diňe JPG, PNG we PDF faýllary kabul edilýär",n)}).optional(),relevant_certification:v.custom(e=>e instanceof File,{message:D("Выберите корректный файл","Select a valid file","Dogry faýly saýlaň",n)}).refine(e=>e&&["image/jpeg","image/png","application/pdf"].includes(e.type),{message:D("Допускаются только файлы JPG, PNG и PDF","Only JPG, PNG and PDF files are allowed","Diňe JPG, PNG we PDF faýllary kabul edilýär",n)}).optional()}),La={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 Pa(n){const e=n+"CollectionProvider",[t,s]=Oe(e),[i,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:p,children:g}=f,x=le.useRef(null),w=le.useRef(new Map).current;return a.jsx(i,{scope:p,itemMap:w,collectionRef:x,children:g})};o.displayName=e;const c=n+"CollectionSlot",l=le.forwardRef((f,p)=>{const{scope:g,children:x}=f,w=r(c,g),k=ke(p,w.collectionRef);return a.jsx(tt,{ref:k,children:x})});l.displayName=c;const u=n+"CollectionItemSlot",m="data-radix-collection-item",h=le.forwardRef((f,p)=>{const{scope:g,children:x,...w}=f,k=le.useRef(null),S=ke(p,k),E=r(u,g);return le.useEffect(()=>(E.itemMap.set(k,{ref:k,...w}),()=>void E.itemMap.delete(k))),a.jsx(tt,{[m]:"",ref:S,children:x})});h.displayName=u;function d(f){const p=r(n+"CollectionConsumer",f);return le.useCallback(()=>{const x=p.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(p.itemMap.values()).sort((E,L)=>w.indexOf(E.ref.current)-w.indexOf(L.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},d,s]}function Oa(n){const e=y.useRef(n);return y.useEffect(()=>{e.current=n}),y.useMemo(()=>(...t)=>{var s;return(s=e.current)==null?void 0:s.call(e,...t)},[])}var Ia=y.createContext(void 0);function Fa(n){const e=y.useContext(Ia);return n||e||"ltr"}var Be="rovingFocusGroup.onEntryFocus",$a={bubbles:!1,cancelable:!0},De="RovingFocusGroup",[He,Lt,Aa]=Pa(De),[Da,Pt]=Oe(De,[Aa]),[Ma,Ba]=Da(De),Ot=y.forwardRef((n,e)=>a.jsx(He.Provider,{scope:n.__scopeRovingFocusGroup,children:a.jsx(He.Slot,{scope:n.__scopeRovingFocusGroup,children:a.jsx(Ga,{...n,ref:e})})}));Ot.displayName=De;var Ga=y.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:i=!1,dir:r,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...h}=n,d=y.useRef(null),f=ke(e,d),p=Fa(r),[g=null,x]=vt({prop:o,defaultProp:c,onChange:l}),[w,k]=y.useState(!1),S=Oa(u),E=Lt(t),L=y.useRef(!1),[C,z]=y.useState(0);return y.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(Be,S),()=>_.removeEventListener(Be,S)},[S]),a.jsx(Ma,{scope:t,orientation:s,dir:p,loop:i,currentTabStopId:g,onItemFocus:y.useCallback(_=>x(_),[x]),onItemShiftTab:y.useCallback(()=>k(!0),[]),onFocusableItemAdd:y.useCallback(()=>z(_=>_+1),[]),onFocusableItemRemove:y.useCallback(()=>z(_=>_-1),[]),children:a.jsx(je.div,{tabIndex:w||C===0?-1:0,"data-orientation":s,...h,ref:f,style:{outline:"none",...n.style},onMouseDown:ie(n.onMouseDown,()=>{L.current=!0}),onFocus:ie(n.onFocus,_=>{const M=!L.current;if(_.target===_.currentTarget&&M&&!w){const te=new CustomEvent(Be,$a);if(_.currentTarget.dispatchEvent(te),!te.defaultPrevented){const I=E().filter(G=>G.focusable),B=I.find(G=>G.active),Te=I.find(G=>G.id===g),Y=[B,Te,...I].filter(Boolean).map(G=>G.ref.current);$t(Y,m)}}L.current=!1}),onBlur:ie(n.onBlur,()=>k(!1))})})}),It="RovingFocusGroupItem",Ft=y.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:i=!1,tabStopId:r,...o}=n,c=ms(),l=r||c,u=Ba(It,t),m=u.currentTabStopId===l,h=Lt(t),{onFocusableItemAdd:d,onFocusableItemRemove:f}=u;return y.useEffect(()=>{if(s)return d(),()=>f()},[s,d,f]),a.jsx(He.ItemSlot,{scope:t,id:l,focusable:s,active:i,children:a.jsx(je.span,{tabIndex:m?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ie(n.onMouseDown,p=>{s?u.onItemFocus(l):p.preventDefault()}),onFocus:ie(n.onFocus,()=>u.onItemFocus(l)),onKeyDown:ie(n.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const g=Ka(p,u.orientation,u.dir);if(g!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let w=h().filter(k=>k.focusable).map(k=>k.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const k=w.indexOf(p.currentTarget);w=u.loop?Wa(w,k+1):w.slice(k+1)}setTimeout(()=>$t(w))}})})})});Ft.displayName=It;var Va={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ha(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Ka(n,e,t){const s=Ha(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Va[s]}function $t(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function Wa(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var Ua=Ot,qa=Ft,Ja=y.createContext(void 0);function Ya(n){const e=y.useContext(Ja);return n||e||"ltr"}function Xa(n){const e=y.useRef({value:n,previous:n});return y.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var Ye="Radio",[Qa,At]=Oe(Ye),[Za,er]=Qa(Ye),Dt=y.forwardRef((n,e)=>{const{__scopeRadio:t,name:s,checked:i=!1,required:r,disabled:o,value:c="on",onCheck:l,form:u,...m}=n,[h,d]=y.useState(null),f=ke(e,x=>d(x)),p=y.useRef(!1),g=h?u||!!h.closest("form"):!0;return a.jsxs(Za,{scope:t,checked:i,disabled:o,children:[a.jsx(je.button,{type:"button",role:"radio","aria-checked":i,"data-state":Gt(i),"data-disabled":o?"":void 0,disabled:o,value:c,...m,ref:f,onClick:ie(n.onClick,x=>{i||l==null||l(),g&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),g&&a.jsx(tr,{control:h,bubbles:!p.current,name:s,value:c,checked:i,required:r,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});Dt.displayName=Ye;var Mt="RadioIndicator",Bt=y.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:s,...i}=n,r=er(Mt,t);return a.jsx(hs,{present:s||r.checked,children:a.jsx(je.span,{"data-state":Gt(r.checked),"data-disabled":r.disabled?"":void 0,...i,ref:e})})});Bt.displayName=Mt;var tr=n=>{const{control:e,checked:t,bubbles:s=!0,...i}=n,r=y.useRef(null),o=Xa(t),c=ps(e);return y.useEffect(()=>{const l=r.current,u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==t&&h){const d=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(d)}},[o,t,s]),a.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:r,style:{...n.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Gt(n){return n?"checked":"unchecked"}var sr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xe="RadioGroup",[nr,Vr]=Oe(Xe,[Pt,At]),Vt=Pt(),Ht=At(),[ir,ar]=nr(Xe),Kt=y.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:s,defaultValue:i,value:r,required:o=!1,disabled:c=!1,orientation:l,dir:u,loop:m=!0,onValueChange:h,...d}=n,f=Vt(t),p=Ya(u),[g,x]=vt({prop:r,defaultProp:i,onChange:h});return a.jsx(ir,{scope:t,name:s,required:o,disabled:c,value:g,onValueChange:x,children:a.jsx(Ua,{asChild:!0,...f,orientation:l,dir:p,loop:m,children:a.jsx(je.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":c?"":void 0,dir:p,...d,ref:e})})})});Kt.displayName=Xe;var Wt="RadioGroupItem",Ut=y.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:s,...i}=n,r=ar(Wt,t),o=r.disabled||s,c=Vt(t),l=Ht(t),u=y.useRef(null),m=ke(e,u),h=r.value===i.value,d=y.useRef(!1);return y.useEffect(()=>{const f=g=>{sr.includes(g.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),a.jsx(qa,{asChild:!0,...c,focusable:!o,active:h,children:a.jsx(Dt,{disabled:o,required:r.required,checked:h,...l,...i,name:r.name,ref:m,onCheck:()=>r.onValueChange(i.value),onKeyDown:ie(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ie(i.onFocus,()=>{var f;d.current&&((f=u.current)==null||f.click())})})})});Ut.displayName=Wt;var rr="RadioGroupIndicator",or=y.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...s}=n,i=Ht(t);return a.jsx(Bt,{...i,...s,ref:e})});or.displayName=rr;var qt=Kt,Jt=Ut;const we=y.forwardRef(({className:n,...e},t)=>a.jsx(qt,{className:Z("grid gap-2",n),...e,ref:t}));we.displayName=qt.displayName;const ne=y.forwardRef(({className:n,...e},t)=>a.jsx(Jt,{ref:t,className:Z(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}));ne.displayName=Jt.displayName;const se=[{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"}]},{h2:"Eksponent barada maglumat:",data:[{label:"Kompaniýanyň/guramanyň ady"},{label:"Wekiliniň ady"},{label:"Wezipesi"},{label:"Gatnaşyjylaryň sany"},{label:"Ýurt"},{label:"Email salgysy"},{label:"Telefon belgisi"},{label:"Web-saýt"}]}],re=[{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)"}]},{h2:"Duşuşygyň maksady:",secondH2:"Kompaniýa/gurama barada maglumat:",data:[{label:"Duşuşygyň esasy maksady"},{label:"Teklibiňiziň/taslamaňyzyň/islegiňiziň gysgaça beýany"},{label:"Degişli döwlet edarasy/bölümi"},{label:"Pudak senagaty"},{label:"Esasy hyzmatlar/önümler"},{label:"Hökümetler bilen ozalky iş tejribesi (eger bar bolsa)"}]}],X=[{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"},{h2:"Duşuşygyň logistikasy:",secondH2:"Goşmaçalar",subtitle:"(Zerur bolsa aşakdaky resminamalary goşuň)",data:[{label:"Duşuşyk üçin islenýän sene we wagt"},{label:"Duşuşygyň islenýän görnüşi (ýüzbe-ýüz, wirtual (zoom/teams/başga), gibrid)"},{label:"Dil saýlamasy (iňlis, türkmen, rus, başga)"},{label:"Goşmaça tehniki ýa-da logistik talaplar (meselem, AW enjamlar, terjimeçiler we ş.m.)"},{label:"Kompaniýanyň/guramanyň profili"},{label:"Teklip/prezentasiýa"},{label:"Degişli şahadatnama/ygtyýarnama"}],button:"Ugratmak"}],lr=({handleNext:n})=>{$();const{control:e,formState:t}=Ke(),s=O(i=>i.lang);return a.jsxs(Se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,y:"100%",transition:{duration:.2}},className:"w-full",children:[a.jsx("h2",{className:"h2 mb-8",children:se[T(s)].h2}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsx(ze,{defaultValue:1,control:e,name:"type",render:({field:i})=>a.jsxs(W,{className:"space-y-3",children:[a.jsx(U,{className:"text-xl",children:{ru:"Тип:",en:"Type:",tm:"Görnüşi:"}[s]}),a.jsx(q,{children:a.jsxs(we,{onValueChange:i.onChange,defaultValue:i.value,className:"flex flex-col space-y-4",children:[a.jsxs(W,{className:"flex items-center space-x-3 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"B2B",checked:i.value==="B2B"})}),a.jsx(U,{className:"text-base",children:"B2B"})]}),a.jsxs(W,{className:"flex items-center space-x-3 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"B2G",checked:i.value==="B2G"})}),a.jsx(U,{className:"text-base",children:"B2G"})]})]})})]})}),a.jsx(N,{control:e,name:"company_name",error:t.errors.company_name,placeholder:"",label:se[T(s)].data[0].label}),a.jsx(N,{control:e,name:"representative_name",error:t.errors.representative_name,placeholder:"",label:se[T(s)].data[1].label}),a.jsx(N,{control:e,name:"job_title",error:t.errors.job_title,placeholder:"",label:se[T(s)].data[2].label}),a.jsx(N,{control:e,name:"participants_number",error:t.errors.participants_number,placeholder:"",label:se[T(s)].data[3].label}),a.jsx(N,{control:e,name:"country",error:t.errors.country,placeholder:"",label:se[T(s)].data[4].label}),a.jsx(N,{control:e,name:"email_address",error:t.errors.email_address,placeholder:"",label:se[T(s)].data[5].label}),a.jsx(N,{control:e,name:"phone_number",error:t.errors.phone_number,placeholder:"",label:se[T(s)].data[6].label}),a.jsx(N,{control:e,name:"website",placeholder:"",label:se[T(s)].data[7].label})]}),a.jsx(H,{variant:"secondary",type:"button",onClick:n,className:"w-full mt-10",children:{ru:"Далее",en:"Next",tm:"Indiki"}[s]})]})},cr=({handleNext:n,handlePrev:e})=>{$();const t=O(r=>r.lang),{control:s,formState:i}=Ke();return a.jsxs(Se.div,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0,transition:{delay:.5,duration:.3}},exit:{opacity:0,y:100},children:[a.jsx("h2",{className:"h2 mb-8",children:re[T(t)].h2}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsx(N,{control:s,name:"meeting_objective",error:i.errors.meeting_objective,placeholder:"",label:re[T(t)].data[0].label}),a.jsx(N,{control:s,name:"proposal_description",error:i.errors.proposal_description,placeholder:"",label:re[T(t)].data[1].label}),a.jsx(N,{control:s,name:"government_agency",error:i.errors.government_agency,placeholder:"",label:re[T(t)].data[2].label}),a.jsx("h2",{className:"h2 mt-4",children:re[T(t)].secondH2}),a.jsx(N,{control:s,name:"sector_industry",error:i.errors.sector_industry,placeholder:"",label:re[T(t)].data[3].label}),a.jsx(N,{control:s,name:"key_services",error:i.errors.key_services,placeholder:"",label:re[T(t)].data[4].label}),a.jsx(N,{control:s,name:"government_experience",error:i.errors.government_experience,placeholder:"",label:re[T(t)].data[5].label})]}),a.jsxs("div",{className:"flex items-center gap-6 mt-10",children:[a.jsx(H,{type:"button",onClick:e,variant:"outline",className:"text-on_surface",children:{ru:"Назад",en:"Back",tm:"Yza"}[t]}),a.jsx(H,{variant:"secondary",type:"button",onClick:n,className:"w-full",children:{ru:"Далее",en:"Next",tm:"Indiki"}[t]})]})]})},ur=({handlePrev:n})=>{$();const{control:e,formState:t}=Ke(),s=O(i=>i.lang);return a.jsxs(Se.div,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0,transition:{delay:.5,duration:.3}},transition:{duration:1},children:[a.jsx("h2",{className:"h2 mb-8",children:X[T(s)].h2}),a.jsxs("div",{className:"flex flex-col gap-6",children:[a.jsx(N,{control:e,name:"preferred_meeting_datetime",error:t.errors.preferred_meeting_datetime,placeholder:"",label:X[T(s)].data[0].label}),a.jsx(N,{control:e,name:"preferred_mode",error:t.errors.preferred_mode,placeholder:"",label:X[T(s)].data[1].label}),a.jsx(N,{control:e,name:"language_preference",error:t.errors.language_preference,placeholder:"",label:X[T(s)].data[2].label}),a.jsx(N,{control:e,name:"additional_technical",error:t.errors.additional_technical,placeholder:"",label:X[T(s)].data[3].label})]}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"h2 mt-10",children:X[T(s)].secondH2}),a.jsx("h5",{className:"text-on_surface_v",children:X[T(s)].subtitle})]}),a.jsx(N,{control:e,name:"company_profile",label:X[T(s)].data[4].label,type:"file",textDark:!0}),a.jsx(N,{control:e,name:"proposal_presentation",label:X[T(s)].data[5].label,type:"file",textDark:!0}),a.jsx(N,{control:e,name:"relevant_certification",label:X[T(s)].data[6].label,type:"file",textDark:!0})]}),a.jsxs("div",{className:"flex items-center gap-6 mt-10",children:[a.jsx(H,{type:"button",onClick:n,variant:"outline",className:"text-on_surface",children:{ru:"Назад",en:"Back",tm:"Yza"}[s]}),a.jsx(H,{disabled:t.isSubmitting,type:"submit",className:"w-full",children:t.isSubmitting?a.jsx(We,{className:"animate-spin"}):X[T(s)].button})]})]})},dr=({stage:n,setStage:e,success:t,setSuccess:s})=>{const i=O(h=>h.lang),r=y.useMemo(()=>Ra(i),[i]),o=Ie({resolver:$e(r),defaultValues:La,mode:"onChange"}),c=h=>{switch(h){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[]}},l=async()=>{const h=c(n);await o.trigger(h)&&e(f=>f+1)},u=()=>e(h=>h-1),m=async h=>{try{const d=new FormData;Object.entries(h).forEach(([p,g])=>{(g instanceof File||g!==void 0)&&d.append(p,g)}),(await fs.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 a.jsx(Fe,{...o,children:a.jsx("form",{onSubmit:o.handleSubmit(m),children:a.jsxs("div",{className:"relative",children:[a.jsx(he,{children:n===1&&a.jsx(lr,{handleNext:l})}),a.jsx(he,{children:n===2&&a.jsx(cr,{handleNext:l,handlePrev:u})}),a.jsx(he,{children:n===3&&t===!1&&a.jsx(ur,{handlePrev:u})}),t&&a.jsx(Ue,{})]})})})};function mr(){$();const n=O(r=>r.lang),[e,t]=y.useState(1),[s,i]=y.useState(!1);return a.jsxs("div",{className:"pb-[120px]",children:[a.jsx(ue,{title:{ru:"B2B | B2G встречи",en:"B2B | B2G meetings",tm:"B2B | B2G duşuşyklar"}[n]}),!s&&e!==0&&a.jsx(gs,{stage:e}),a.jsx("div",{className:"max-w-[808px] md:mx-auto mx-5",children:a.jsx(dr,{success:s,setSuccess:i,stage:e,setStage:t})})]})}function pr(){$();const n=O(e=>e.lang);return a.jsxs("div",{className:Z(""),children:[a.jsx(ue,{title:{ru:"О выставке",en:"About exhibition",tm:"Sergi hakynda"}[n]}),a.jsx(xs,{}),a.jsx(ys,{}),a.jsx(bs,{}),a.jsx(ks,{}),a.jsx(vs,{})]})}const pe=(n,e,t,s)=>s==="ru"?n:s==="tm"?t:e,hr=n=>v.object({company_name:v.string().min(3,{message:pe("Название компании должно быть не менее 3 символов","Company name must be at least 3 characters","Kompaniýanyň ady azyndan 3 simwoldan ybarat bolmaly",n)}),rep_name:v.string().min(3,{message:pe("Имя представителя должно быть не менее 3 символов","Representative name must be at least 3 characters","Wekiliniň ady azyndan 3 simwoldan ybarat bolmaly",n)}),job_title:v.string().min(3,{message:pe("Должность должна быть не менее 3 символов","Job title must be at least 3 characters","Wezipesi azyndan 3 simwoldan ybarat bolmaly",n)}),country:v.string().min(3,{message:pe("Название страны должно быть не менее 3 символов","Country must be at least 3 characters","Ýurduň ady azyndan 3 simwoldan ybarat bolmaly",n)}),email:v.string().email({message:pe("Укажите корректный email","Enter a valid email","Dogry email salgysyny giriziň",n)}),phone:v.string().min(8,{message:pe("Номер телефона должен быть не менее 8 символов","Phone number must be at least 8 characters","Telefon belgisi azyndan 8 simwoldan ybarat bolmaly",n)}),website:v.string().optional(),visa_support:v.string().optional()}),fr={company_name:"",rep_name:"",job_title:"",country:"",email:"",phone:"",website:"",visa_support:""},R=[{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"},{cover:"Stend bronlamak",h2:"Wariantlaryň birini saýlaň:",radio:"Enjamlaşdyrylmadyk meýdan",radio_2:"Enjamlaşdyrylan meýdan",label_1:"Kompaniýanyň/guramanyň ady",label_2:"Wekiliniň ady",label_3:"Wezipesi",number_of_participants:"Gatnaşyjylaryň sany",label_4:"Ýurt",label_5:"Email salgysy",label_6:"Telefon belgisi",label_7:"Web-saýt",visa:"Wiza goldawy:",visa_radio:"Hawa",visa_radio_2:"Ýok",button:"Ugratmak"}];function gr(){$();const n=O(c=>c.lang),[e,t]=y.useState(!1),s=y.useMemo(()=>hr(n),[n]),i=Ie({resolver:$e(s),defaultValues:fr}),r=async c=>{try{await ws(c)&&t(!0)}catch(l){console.error("POST sponsor error",l)}},{errors:o}=i.formState;return a.jsxs("div",{children:[a.jsx(ue,{title:{ru:"Стать спонсором",en:"Become a sponsor",tm:"Hemaýatkär bolmak"}[n]}),a.jsx(he,{children:!e&&a.jsx(Fe,{...i,children:a.jsxs(Se.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:i.handleSubmit(r),children:[a.jsx(N,{label:R[T(n)].label_1,name:"company_name",control:i.control,error:o.company_name}),a.jsx(N,{label:R[T(n)].label_2,name:"rep_name",control:i.control,error:o.rep_name}),a.jsx(N,{label:R[T(n)].label_3,name:"job_title",control:i.control,error:o.job_title}),a.jsx(N,{label:R[T(n)].label_4,name:"country",control:i.control,error:o.country}),a.jsx(N,{label:R[T(n)].label_5,name:"email",control:i.control,error:o.email}),a.jsx(N,{label:R[T(n)].label_6,name:"phone",control:i.control,error:o.phone}),a.jsx(N,{label:R[T(n)].label_7,name:"website",control:i.control}),a.jsx(ze,{control:i.control,name:"visa_support",render:({field:c})=>a.jsxs(W,{className:"space-y-5",children:[a.jsx(U,{className:"text-xl",children:R[T(n)].visa}),a.jsx(q,{children:a.jsxs(we,{onValueChange:c.onChange,defaultValue:c.value,className:"flex flex-col space-y-4 ml-3",children:[a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"yes",checked:c.value==="yes"})}),a.jsx(U,{className:"text-base",children:R[T(n)].visa_radio})]}),a.jsxs(W,{className:"flex items-center space-x-5 space-y-0 ",children:[a.jsx(q,{children:a.jsx(ne,{value:"no",checked:c.value==="no"})}),a.jsx(U,{className:"text-base",children:R[T(n)].visa_radio_2})]})]})})]})}),a.jsx(H,{disabled:i.formState.isSubmitting,className:"mt-5",children:i.formState.isSubmitting?a.jsx(We,{className:"animate-spin"}):R[T(n)].button})]})})}),e&&a.jsx(Ue,{delay:.3})]})}const xr=v.object({name:v.string().min(2,"error"),email:v.string().email(),phone:v.string().min(8,"error"),company:v.string().min(2,"error"),msg:v.string().min(5,"error")}),yr={name:"",email:"",phone:"",company:"",msg:""},br=({className:n})=>{const{t:e}=ge("contacts"),[t,s]=y.useState(!1),i=Ie({resolver:$e(xr),defaultValues:yr});async function r(c){try{const l=await Ss(c);s(l)}catch(l){console.error("POST contact",l)}}const{errors:o}=i.formState;return a.jsx("div",{className:Z("bg-primary rounded-[8px] py-8 px-6 ",n),children:a.jsx(Fe,{...i,children:a.jsxs("form",{onSubmit:i.handleSubmit(r),children:[a.jsx("h2",{className:"h2 !text-on_primary lg:mb-8 mb-6",children:e("title")}),a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsx(N,{onPrimary:!0,name:"name",control:i.control,label:e("name"),error:o.name}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[a.jsx(N,{onPrimary:!0,name:"email",control:i.control,label:"Email",error:o.email}),a.jsx(N,{onPrimary:!0,name:"phone",control:i.control,label:e("phone"),error:o.phone})]}),a.jsx(N,{onPrimary:!0,name:"company",control:i.control,label:e("company"),error:o.name}),a.jsx(N,{onPrimary:!0,textArea:!0,name:"msg",label:e("message"),control:i.control,error:o.msg}),a.jsx(H,{disabled:i.formState.isSubmitting||t,className:"w-full h-12 overflow-hidden",variant:"secondary",children:t?e("submitted"):i.formState.isSubmitting?a.jsx(js,{className:"animate-spin text-white"}):e("button")})]})]})})})};function kr(){$();const{t:n}=ge("contacts");return a.jsxs("div",{className:"flex flex-col gap-20 pt-10 md:pt-20",children:[a.jsx(ee,{children:a.jsxs("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-20 lg:gap-6",children:[a.jsx(br,{}),a.jsxs("div",{className:"p-6 bg-surface_container rounded-[8px]",children:[a.jsx("h2",{className:"h2 mb-10 xl:mb-8",children:n("title_2")}),a.jsxs("div",{className:"flex flex-col gap-20",children:[a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("img",{src:"/contacts/map.svg",alt:"address"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl mb-2",children:n("address")}),a.jsx("address",{className:"text-base normal not-italic",children:n("venue")})]})]}),a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("img",{src:"/contacts/phone.svg",alt:"phone"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl mb-2",children:n("phone")}),a.jsx("h4",{className:"text-base normal",children:"+99371871812; 99363719588"})]})]}),a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("img",{src:"/contacts/email.svg",alt:"email"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-xl mb-2",children:"Email:"}),a.jsx("h4",{className:"text-base normal",children:"contact@turkmenexpo.com"})]})]})]})]})]})}),a.jsx("section",{className:"relative w-full h-[300px] sm:h-[350px] md:h-[400px] lg:h-[600px]",children:a.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 vr=[{id:0,title:"Фото",titleEn:"Photo",titleTm:"Surat"},{id:1,title:"Видео",titleEn:"Video",titleTm:"Wideo"}],wr=({className:n})=>{var w,k,S,E,L;$();const[e,t]=y.useState(0),{data:s,isPending:i,status:r}=Ts(1),{data:o}=wt(1),[c,l]=y.useState(!1),[u,m]=y.useState({id:0,type:"photo"}),h=O(C=>C.lang),d=({id:C,type:z})=>{l(!0),m({id:C,type:z})},{t:f}=ge("main"),[p,g]=y.useState(!1),x=C=>C===0&&i?a.jsx(fe,{}):a.jsx(fe,{});return console.log(r),a.jsxs(a.Fragment,{children:[a.jsx(he,{children:c&&a.jsx(Ns,{activeItem:u,setActiveItem:m,setIsOpen:l})}),a.jsxs("section",{className:Z("md:mb-[120px] mb-20",n),children:[a.jsx(ue,{title:{ru:"Моменты",en:"Moments",tm:"Pursatlar"}[h]}),a.jsx(ee,{className:"page-bottom md:pt-10 pt-6",children:a.jsxs("div",{className:"flex justify-center flex-col",children:[a.jsx(jt,{state:e,setState:t,data:vr,className:"mb-6"}),e===0&&i?x(e):a.jsxs(a.Fragment,{children:[a.jsx("h3",{className:"md:text-3xl text-2xl mb-6",children:"TurkmenTextile Expo-2025"}),a.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?(k=(w=s==null?void 0:s.photos)==null?void 0:w.slice(0,p?1e3:16))==null?void 0:k.map((C,z)=>{var _,M;return a.jsx("div",{onClick:()=>d({id:z,type:"photo"}),className:"cursor-pointer embla__slide basis-1/1 overflow-hidden",children:a.jsx("img",{src:((_=C==null?void 0:C.photo)==null?void 0:_.path)??"",alt:((M=C==null?void 0:C.photo)==null?void 0:M.file_name)??"photo",className:"size-full object-cover hover:scale-105 duration-300 transition-all"})},z)}):(S=o==null?void 0:o.videos)==null?void 0:S.map((C,z)=>{var _;return a.jsxs("div",{onClick:()=>d({id:z,type:"video"}),className:"cursor-pointer group embla__slide h-[155px] w-full basis-1/1 overflow-hidden relative",children:[a.jsx(_s,{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 "}),a.jsx("div",{className:"absolute top-0 left-0 size-full bg-[#2C57A752]/[32%]"}),a.jsx("img",{src:((_=C==null?void 0:C.video_photo)==null?void 0:_.path)??"",className:"size-full object-cover"})]},z)})})]}),((E=s==null?void 0:s.photos)==null?void 0:E.length)&&((L=s==null?void 0:s.photos)==null?void 0:L.length)>16&&!p&&a.jsx(H,{onClick:()=>g(!0),className:"mx-auto w-[288px] mt-10 text-on_surface",size:"lg",variant:"outline",children:f("media.button")})]})})]})]})},jr=(n,e)=>{const{data:t,isPending:s}=qe({queryKey:["news-inner",n,e],queryFn:()=>Es(n,e),select:({data:i})=>i.data});return{data:t,isPending:s}};function Sr(){var o;const{id:n}=Ms(),e=O(c=>c.lang),t=Number(n);$(t);const{data:s,isPending:i}=jr(t,e),{data:r}=St(e);return i?a.jsx(fe,{}):a.jsxs(ee,{className:"pt-10 pb-20 md:pt-20 md:pb-[120px]",children:[a.jsxs("section",{className:"max-w-[888px] py-5 mx-auto flex flex-col md:gap-10 gap-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-on_surface md:text-[32px] text-3xl leading-10 mb-2",children:s==null?void 0:s.title}),a.jsx("h4",{children:s==null?void 0:s.published_at.slice(0,10).split("-").reverse().join(".")})]}),a.jsx("div",{className:"w-full h-[300px] md:h-[480px]",children:a.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"})}),a.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"})]}),a.jsx("hr",{className:"mt-10 md:mb-20 mb-[60px]"}),a.jsxs("section",{children:[a.jsx("h2",{className:"h2 mb-6",children:{ru:"Читайте также:",en:"Read more:",tm:"Şeýle hem okaň:"}[e]}),a.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-6",children:r==null?void 0:r.filter(c=>c.id!==t).slice(0,3).map(c=>y.createElement(Tt,{...c,key:c.title}))})]})]})}function Tr(){$();const n=O(s=>s.lang),{data:e,isPending:t}=St(n);return t?a.jsx(fe,{}):a.jsxs(ee,{className:"page-padding",children:[a.jsx("h1",{className:"text-center md:text-5xl text-3xl mb-10",children:{ru:"Новости",en:"News",tm:"Täzelikler"}[n]}),a.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-6",children:e==null?void 0:e.map(s=>y.createElement(Tt,{...s,key:s.title}))})]})}const Nr=()=>{const n=O(s=>s.lang),{data:e,isPending:t}=qe({queryKey:["participants",n],queryFn:()=>zs(n),select:({data:s})=>s.data});return{data:e,isPending:t}},_r=({className:n})=>{var u,m,h,d,f;$();const e=O(p=>p.lang),{data:t,isPending:s}=Nr(),i={company:{ru:"Название компании",en:"Company name",tm:"Kompaniýanyň ady"}[e],country:{ru:"Страна",en:"Country",tm:"Ýurt"}[e],industry:{ru:"Сфера деятельности",en:"Industry",tm:"Pudak"}[e]},[r,o]=y.useState(0),c=(h=t==null?void 0:t[0])==null?void 0:h.participants.concat((u=t==null?void 0:t[1])==null?void 0:u.participants,(m=t==null?void 0:t[2])==null?void 0:m.participants),l=t==null?void 0:t.filter(p=>r===1?p.id===3:r===2?p.id===1:p.id===2);return console.log(r),a.jsx(ee,{children:a.jsxs("section",{className:Z("page-padding overflow-x-hidden",n),children:[a.jsx("h1",{className:"text-center md:text-5xl text-3xl mb-4",children:{ru:"Список участников",en:"List of participants",tm:"Gatnasyjylaryň sanawy"}[e]}),a.jsx(jt,{state:r,setState:o,className:"mb-6 md:w-fit"}),a.jsxs("div",{className:"p-2 sm:p-0 bg-surface_container overflow-hidden",children:[a.jsxs("div",{className:"sm:flex items-center hidden h-[52px] border-b border-outline_v",children:[a.jsx("h3",{className:"flex-[0_0_45.54%] pl-4",children:i==null?void 0:i.company}),a.jsx("h3",{className:"flex-[0_0_19.80%]",children:i==null?void 0:i.country}),a.jsx("h3",{className:"flex-[0_0_34.65%]",children:i==null?void 0:i.industry})]}),s?a.jsx(fe,{}):r===0?c==null?void 0:c.map((p,g,x)=>a.jsx(st,{...p,arr:x==null?void 0:x.length,index:g,image:p.image??{path:""},image_country:p.image_country??{path:""}})):(f=(d=l==null?void 0:l[0])==null?void 0:d.participants)==null?void 0:f.map((p,g,x)=>a.jsx(st,{...p,arr:x==null?void 0:x.length,index:g,image:p.image??{path:""},image_country:p.image_country??{path:""}}))]})]})})},ce=(n,e,t,s)=>s==="ru"?n:s==="tm"?t:e,Er=n=>v.object({space_package:v.string(),company_name:v.string().min(3,{message:ce("Название компании должно быть не менее 3 символов","Company name must be at least 3 characters","Kompaniýanyň ady azyndan 3 simwoldan ybarat bolmaly",n)}),rep_name:v.string().min(3,{message:ce("Имя представителя должно быть не менее 3 символов","Representative name must be at least 3 characters","Wekiliniň ady azyndan 3 simwoldan ybarat bolmaly",n)}),job_title:v.string().min(3,{message:ce("Должность должна быть не менее 3 символов","Job title must be at least 3 characters","Wezipesi azyndan 3 simwoldan ybarat bolmaly",n)}),participants_number:v.preprocess(e=>Number(e),v.number().min(1,ce("Укажите количество участников","Specify the number of participants","Gatnaşyjylaryň sanyny görkeziň",n))),country:v.string().min(3,{message:ce("Название страны должно быть не менее 3 символов","Country must be at least 3 characters","Ýurduň ady azyndan 3 simwoldan ybarat bolmaly",n)}),email:v.string().email({message:ce("Укажите корректный email","Enter a valid email","Dogry email salgysyny giriziň",n)}),phone:v.string().min(8,{message:ce("Номер телефона должен быть не менее 8 символов","Phone number must be at least 8 characters","Telefon belgisi azyndan 8 simwoldan ybarat bolmaly",n)}),website:v.string().optional(),visa_support:v.string().optional()}),zr={space_package:"space",company_name:"",rep_name:"",job_title:"",participants_number:1,country:"",email:"",phone:"",website:"",visa_support:""};function Cr(){$();const n=O(l=>l.lang),[e,t]=y.useState(!1),s=y.useMemo(()=>Er(n),[n]),i=Ie({resolver:$e(s),defaultValues:zr}),r=async l=>{await Cs(l)&&t(!0)};y.useEffect(()=>{window.scrollTo({behavior:"smooth",top:0})},[]);const{errors:o}=i.formState,c=T(n);return a.jsxs("div",{children:[a.jsx(ue,{title:R[T(n)].cover}),a.jsx(he,{children:!e&&a.jsx(Fe,{...i,children:a.jsxs(Se.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:i.handleSubmit(r),children:[a.jsx(ze,{control:i.control,name:"space_package",render:({field:l})=>a.jsxs(W,{className:"space-y-5",children:[a.jsx(U,{className:"text-xl",children:R[c].h2}),a.jsx(q,{children:a.jsxs(we,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"space",checked:l.value==="space"})}),a.jsx(U,{className:"text-base",children:R[c].radio})]}),a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"package",checked:l.value==="package"})}),a.jsx(U,{className:"text-base",children:R[c].radio_2})]})]})})]})}),a.jsx(N,{label:R[c].label_1,name:"company_name",control:i.control,error:o.company_name}),a.jsx(N,{label:R[c].label_2,name:"rep_name",control:i.control,error:o.rep_name}),a.jsx(N,{label:R[c].label_3,name:"job_title",control:i.control,error:o.job_title}),a.jsx(N,{label:R[c].number_of_participants,type:"number",name:"participants_number",control:i.control,error:o.participants_number}),a.jsx(N,{label:R[c].label_4,name:"country",control:i.control,error:o.country}),a.jsx(N,{label:R[c].label_5,name:"email",control:i.control,error:o.email}),a.jsx(N,{label:R[c].label_6,name:"phone",control:i.control,error:o.phone}),a.jsx(N,{label:R[c].label_7,name:"website",control:i.control}),a.jsx(ze,{control:i.control,name:"visa_support",render:({field:l})=>a.jsxs(W,{className:"space-y-5",children:[a.jsx(U,{className:"text-xl",children:R[c].visa}),a.jsx(q,{children:a.jsxs(we,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[a.jsxs(W,{className:"flex items-center space-x-5 space-y-0",children:[a.jsx(q,{children:a.jsx(ne,{value:"yes",checked:l.value==="yes"})}),a.jsx(U,{className:"text-base",children:R[c].visa_radio})]}),a.jsxs(W,{className:"flex items-center space-x-5 space-y-0 ",children:[a.jsx(q,{children:a.jsx(ne,{value:"no",checked:l.value==="no"})}),a.jsx(U,{className:"text-base",children:R[c].visa_radio_2})]})]})})]})}),a.jsx(H,{disabled:i.formState.isSubmitting,className:"mt-5",children:i.formState.isSubmitting?a.jsx(We,{className:"animate-spin"}):R[c].button})]})})}),e&&a.jsx(Ue,{delay:.3})]})}const Yt=()=>{var p;const{t:n}=ge("main"),e=O(g=>g.lang),{pathname:t}=Je(),[s]=Nt({loop:!0},[Rs({delay:5e3,stopOnInteraction:!1})]),{title:i,texts:r,button:o,button2:c}=n("impressions.hero",{returnObjects:!0}),{title2:l,texts2:u}=n("impressions.hero",{returnObjects:!0}),m=(g,x)=>t==="/impressions"?g:x,h=(g,x)=>t==="/impressions"?g:x,d={en:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg"],ru:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg"],tm:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg"]},f=()=>d[e]??d.en;return a.jsxs("section",{className:"",children:[t==="/impressions-tm"?a.jsx("div",{ref:s,className:"embla overflow-hidden",children:a.jsx("div",{className:"flex",children:f().map((g,x)=>a.jsx("img",{src:g,alt:"imperssions",className:"w-full object-cover flex-[0_0_100%] object-top max-h-[610px]"},x))})}):a.jsx("img",{src:n("impressions.banner")}),a.jsx("h1",{className:"absolute opacity-0 top-0 left-0",children:{ru:"Модные показы",en:"Fashion shows",tm:"Moda görkezişler"}[e]}),a.jsx("div",{className:"bg-[url('/impressions-bg.png')]",children:a.jsxs(ee,{className:"md:py-20 py-10",children:[a.jsx("h2",{className:"md:text-5xl text-2xl leading-[120%] md:mb-10 mb-6",children:m(i,l)}),a.jsx("div",{className:"text-on_surface_v flex flex-col gap-3",children:(p=h(r,u))==null?void 0:p.map((g,x)=>a.jsx("p",{className:"md:text-lg !normal",children:g},x))}),a.jsxs("div",{className:"flex md:flex-row flex-col items-center gap-6 mt-6",children:[a.jsx(nt,{target:"_blank",to:"https://turkmentextile.turkmenexpo.com/app/storage/app/media/ICS%20file/TurkmenTextile%20Expo-2025.ics",className:"w-full",children:a.jsx(H,{size:"sm",className:"w-full",children:o})}),a.jsx(nt,{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:a.jsx(H,{size:"sm",className:"w-full",children:c})})]})]})})]})},Xt=()=>{var m,h,d;const{t:n}=ge("main"),{pathname:e}=Je(),[t,s]=y.useState(1),{data:i}=wt(1),o=[...(i==null?void 0:i.videos.filter(f=>f.sections[0]==="fashion_shows"))??[]].sort((f,p)=>(f==null?void 0:f.fashion_shows_order_id)+(p==null?void 0:p.fashion_shows_order_id)),{videosTitle:c,videosTitle2:l}=n("impressions",{returnObjects:!0}),u=()=>e!=="/impressions";return a.jsx("section",{className:"bg-[url('/impressions/videos-block-bg.png')] md:py-20 py-10",children:a.jsxs(ee,{children:[a.jsx("h2",{className:"mb-10 md:text-5xl text-2xl leading-[120%] text-white text-center",children:u()?c:l}),a.jsxs("div",{className:"flex flex-col lg:flex-row lg:mx-20 gap-4 text-white overflow-hidden h-fit lg:h-[490px]",children:[a.jsxs("div",{className:"bg-gray_10 flex-auto p-2 rounded-[8px] border border-gray_09 flex flex-col justify-center h-full",children:[a.jsx("div",{className:"max-h-[450px]",children:a.jsx("video",{src:(d=(h=(m=i==null?void 0:i.videos)==null?void 0:m[t])==null?void 0:h.video)==null?void 0:d.path,muted:!0,controls:!0,autoPlay:!0,loop:!0,className:"w-full size-full mb-2 rounded"})}),a.jsx("div",{className:"flex items-center justify-between mt-auto"})]}),a.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:a.jsx("div",{className:"flex flex-col gap-2 w-full overflow-y-auto overflow-x-hidden h-full",children:o==null?void 0:o.map((f,p)=>{var g;return a.jsx("div",{onClick:()=>s(p+1),className:"basis-[70px] w-[80%] cursor-pointer mx-auto overflow-hidden",children:a.jsx("img",{src:(g=f==null?void 0:f.video_photo)==null?void 0:g.path,alt:"",className:"object-cover size-full rounded-tl hover:scale-105 transition-transform rounded-bl"})},p)})})})]})]})})},Rr=n=>{const e=O(i=>i.lang),{data:t,isPending:s}=qe({queryKey:["designers",e],queryFn:()=>Ls(e,n),select:({data:i})=>i.data});return{data:t,isPending:s}},Qt=()=>{const{pathname:n}=Je(),e=()=>n!=="/impressions",{data:t,isPending:s}=Rr(e()?2:1),[i,r]=Nt({align:"center",skipSnaps:!0,slidesToScroll:2,dragFree:!0}),[o,c]=y.useState(0),{t:l}=ge("main"),[u,m]=y.useState(!1),[h,d]=y.useState(!0),f=y.useCallback(S=>{r&&r.scrollTo(S)},[r]);y.useEffect(()=>{if(!r)return;const S=()=>{c(r==null?void 0:r.selectedScrollSnap()),m(r.canScrollPrev()),d(r.canScrollNext())};return r.on("select",S),()=>{r.off("select",S)}},[r]);const{title:p,text:g,title2:x,text2:w}=l("impressions.designers",{returnObjects:!0}),k=[...(t==null?void 0:t.designers)??[]].sort((S,E)=>(S==null?void 0:S.order_id)-(E==null?void 0:E.order_id));return console.log(k),a.jsx("section",{className:"md:py-20 py-10",children:a.jsxs(ee,{className:"flex flex-col md:gap-10 gap-6",children:[a.jsx("h2",{className:"md:text-5xl text-2xl leading-[120%]",children:e()?p:x}),a.jsx("p",{className:"md:text-xl text-lg normal text-on_surface_v",children:e()?g:w}),a.jsxs("div",{ref:i,className:"embla",children:[a.jsx("div",{className:"flex embla__container",children:s?a.jsx(fe,{}):k==null?void 0:k.map((S,E)=>a.jsx(Ps,{...S,className:"embla__slide flex-[0_0_714px] mr-4"},E))}),a.jsxs("div",{className:"flex items-center justify-center gap-4 mt-6",children:[a.jsx("button",{onClick:()=>r==null?void 0:r.scrollPrev(),className:Z("size-12 flex items-center justify-center",!u&&"opacity-20 pointer-events-none"),children:a.jsx(Os,{})}),a.jsx("div",{className:"flex items-center gap-2",children:[...Array(k!=null&&k.length?Math.round((k==null?void 0:k.length)/2):5)].map((S,E)=>a.jsx("div",{onClick:()=>f==null?void 0:f(E),className:Z("w-5 h-1 rounded-[2px] cursor-pointer",o===E?"bg-teritary":"bg-on_surface_v")},E))}),a.jsx("button",{onClick:()=>r==null?void 0:r.scrollNext(),className:Z("size-12 flex items-center justify-center",!h&&"opacity-20 pointer-events-none"),children:a.jsx(Is,{})})]})]})]})})};function Lr(){return $(),a.jsxs("div",{className:"overflow-x-hidden",children:[a.jsx(Yt,{}),a.jsx(Xt,{}),a.jsx(Qt,{})]})}function Pr(){return $(),a.jsxs("div",{className:"overflow-x-hidden",children:[a.jsx(Yt,{}),a.jsx(Xt,{}),a.jsx(Qt,{})]})}const Or="/about-place.jpg",P={title:{ruText:"Варианты участия",enText:"Participation Options",tmText:"Gatnaşmagyň görnüşleri"},exhibitionSpace:{ruText:"Аренда выставочной площади",enText:"Exhibition Space Rental",tmText:"Sergi meýdanyny kärendesine almak"},spaceOnly:{ruText:"Необорудованная площадь",enText:"Space Only",tmText:"Enjamlaşdyrylmadyk meýdan"},example:{ruText:"Пример",enText:"Example",tmText:"Mysal"},spaceOnlyDescription:{ruText:"Чистая площадь для последующей застройки (стандартная застройка или по индивидуальному дизайну). Включает: общую уборку и охрану павильона. Электричество в стоимость не включено.",enText:"Raw exhibition space for subsequent construction (standard booth or customized design). Includes general cleaning and pavilion security. Electricity is not included in the price.",tmText:"Soňky gurluşyk üçin arassa meýdan (standart gurluşyk ýa-da indiwidual dizaýn). Öz içine alýar: umumy arassaçylyk we pawilýonyň goragy. Elektrik energiýasy bahasynyň içine girenok."},standardBooth:{ruText:"Стандартная застройка",enText:"Standard Booth Construction",tmText:"Standart gurluşyk"},customBooth:{ruText:"Индивидуальный дизайн",enText:"Custom Booth Design",tmText:"Indiwidual dizaýn"},boothExampleDescription:{ruText:"Включает: базовое электроподключение (220V - 2 кВт), стены (стандартные или индивидуальный дизайн). Общую уборку и охрану павильона.",enText:"Includes: basic electrical connection (220V - 2 kW), walls (standard or customized design), general cleaning, and pavilion security.",tmText:"Öz içine alýar: esasy elektrik birikdirmesi (220V - 2 kWt), diwarlar (standart ýa-da indiwidual dizaýn). Umumy arassaçylyk we pawilýonyň goragy."},registrationFee:{ruText:"Участие со стендом включает регистрационную оплату.",enText:"Participation with a booth includes a registration fee.",tmText:"Stend bilen gatnaşmak hasaba alyş tölegini öz içine alýar."},pricingNote:{ruText:"Пожалуйста уточните стоимость у менеджера проекта.",enText:"Please check the pricing with the project manager.",tmText:"Bahany taslamanyň menejeri bilen anyklaň."},partnershipTitle:{ruText:"Партнёрские возможности",enText:"Partnership Opportunities",tmText:"Hyzmatdaşlyk mümkinçilikleri"},partnershipIntro:{ruText:'Если Вы заинтересованы в более активном выходе на рынок или целью Вашей компании является максимальное продвижение на рынок, используйте пакет "Партнерство выставки". Приобретая данную опцию, Вы получаете:',enText:'If your company is interested in a more active market presence or aims to maximize market promotion, we recommend the "Exhibition Partnership" package. By choosing this option, you will receive:',tmText:'Eger siziň kompaniýaňyz bazara has işjeň çykmaga gyzyklanýan bolsa, "Serginiň hyzmatdaşlygy" paketini ulanyň. Bu opsiýany alyp, siz şulary alarsyňyz:'},partnershipItems:[{ruText:"Статус Партнера выставки, в зависимости от выбранного пакета",enText:"Exhibition Partner status, depending on the selected package",tmText:"Saýlanan pakete baglylykda Serginiň hyzmatdaşy statusy"},{ruText:"Масштабную рекламную кампанию (размещение логотипа компании на всей рекламной продукции выставки)",enText:"A large-scale advertising campaign (placement of your company logo on all exhibition promotional materials)",tmText:"Uly gerimli reklama kampaniýasy (kompaniýanyň logotipini serginiň ähli reklama önümlerinde ýerleşdirmek)"},{ruText:"Широкую узнаваемость",enText:"Wide recognition",tmText:"Giň tanalmaklyk"},{ruText:"Ассоциирование выставки с именем Вашей компании и др.",enText:"Association of the exhibition with your company's name, and more",tmText:"Serginiň siziň kompaniýaňyzyň ady bilen assosiasiýasy we ş.m."}],partnershipNote:{ruText:"Пожалуйста, уточните стоимость у менеджера проекта.",enText:"Please contact the project manager to clarify the cost.",tmText:"Bahany taslamanyň menejeri bilen anyklaň."},exampleImageAlt:{ruText:"Пример площадки",enText:"Example space",tmText:"Meýdançanyň mysaly"},standardExampleAlt:{ruText:"Пример стандартной застройки",enText:"Standard booth example",tmText:"Standart gurluşygyň mysaly"},customExampleAlt:{ruText:"Пример индивидуального дизайна",enText:"Custom booth example",tmText:"Indiwidual dizaýnyň mysaly"}},kt=()=>a.jsx("svg",{width:"14",height:"20",viewBox:"0 0 14 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:a.jsx("path",{d:"M7 1V15M7 15L2 10M7 15L12 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Ir(){$();const n=O(t=>t.lang),e=t=>n==="ru"?t.ruText:n==="tm"?t.tmText??t.enText:t.enText;return a.jsxs("div",{children:[a.jsx(ue,{title:e(P.title)}),a.jsx(ee,{className:"page-padding",children:a.jsxs("div",{className:"mx-auto max-w-[900px] text-on_surface",children:[a.jsx("p",{className:"mb-10 text-3xl font-medium",children:e(P.title)}),a.jsxs(H,{className:"mb-2 bg-primary md:text-base w-full",children:["1. ",e(P.exhibitionSpace)]}),a.jsx(H,{variant:"outline",className:"w-full mb-10 border border-primary py-1 text-center text-base text-primary md:text-base",children:e(P.spaceOnly)}),a.jsx("p",{className:"mb-5 text-center text-lg",children:e(P.example)}),a.jsx("div",{className:"mx-auto h-[180px] w-full max-w-[754px] md:h-[377px]",children:a.jsx("img",{src:Or,alt:e(P.exampleImageAlt),className:"size-full rounded-sm object-cover"})}),a.jsx("div",{className:"mt-5 text-center text-base leading-relaxed",children:a.jsx("p",{children:e(P.spaceOnlyDescription)})}),a.jsxs("div",{className:"mt-10 grid grid-cols-1 gap-6 md:grid-cols-2",children:[a.jsxs("div",{className:"w-full flex flex-col items-center gap-2 text-primary",children:[a.jsx(kt,{}),a.jsx("div",{className:"w-full border border-primary py-1 text-center text-base text-primary md:text-base",children:e(P.standardBooth)})]}),a.jsxs("div",{className:"flex flex-col items-center gap-2 text-primary",children:[a.jsx(kt,{}),a.jsx("div",{className:"w-full border border-primary py-1 text-center text-base text-primary md:text-base",children:e(P.customBooth)})]})]}),a.jsxs("div",{className:"mt-10 grid grid-cols-1 gap-6 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"mb-5 text-base",children:[e(P.example),":"]}),a.jsx("img",{src:"/example.jpeg",alt:e(P.standardExampleAlt),className:"h-[160px] w-full rounded-sm object-cover md:h-[190px]"}),a.jsx("p",{className:"mt-2 text-base leading-relaxed",children:e(P.boothExampleDescription)})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"mb-5 text-base",children:[e(P.example),":"]}),a.jsx("img",{src:"/example-2.jpeg",alt:e(P.customExampleAlt),className:"h-[160px] w-full rounded-sm object-cover md:h-[190px]"}),a.jsx("p",{className:"mt-2 text-base leading-relaxed",children:e(P.boothExampleDescription)})]})]}),a.jsx("p",{className:"mt-6 text-2xl",children:e(P.registrationFee)}),a.jsx("p",{className:"text-base mt-3",children:e(P.pricingNote)}),a.jsxs("div",{className:"mt-6 bg-primary py-3 text-center text-xs font-medium text-on_primary md:text-base",children:["2. ",e(P.partnershipTitle)]}),a.jsxs("div",{className:"mt-3 text-base leading-relaxed font-normal",children:[a.jsx("p",{className:"mb-2",children:e(P.partnershipIntro)}),a.jsx("ul",{className:"list-disc pl-5",children:P.partnershipItems.map(t=>a.jsx("li",{children:e(t)},t.enText))}),a.jsx("p",{className:"mt-2",children:e(P.partnershipNote)})]})]})})]})}const K={title:{ruText:"Партнерские возможности",enText:"Partner opportunities",tmText:"Hyzmatdaşlyk mümkinçilikleri"},intro:{ruText:"Предлагаем Вам воспользоваться комплексными возможностями - партнерскими пакетами, разработанными под различные маркетинговые задачи компании-участника, которые позволят максимально использовать коммерческий потенциал выставки для усиления бренда Вашей компании и бесспорно повысят эффективность продвижения Вашей компании.",enText:"We invite you to take advantage of integrated opportunities - partnership packages designed for various marketing objectives of the exhibiting company. They allow you to maximize the exhibition's commercial potential, strengthen your brand, and significantly increase the effectiveness of your promotion.",tmText:"Size dürli marketing wezipelerine gönükdirilen hyzmatdaşlyk paketlerinden peýdalanmagy teklip edýäris. Olar serginiň söwda potensialyny iň ýokary derejede ulanmaga, brendiňizi güýçlendirmäge we kompaniýaňyzy öňe sürmegiň netijeliligini ep-esli artdyrmaga mümkinçilik berýär."},partnership:{ruText:"Партнерство выставки - это всегда больше, чем просто участие. Это прекрасная возможность выгодно подать Вашу продукцию широкой публике в соответствии с Вашими основными целями и задачами. В каждом партнерском пакете предоставлены уникальные позиции, специально сформированные таким образом, что Вы наиболее точно и эффективно передаете обращение к целевой аудитории.",enText:"Exhibition partnership is always more than just participation. It is a great opportunity to present your products to a wide audience in line with your goals and objectives. Each partnership package includes unique placements structured so you can communicate your message to the target audience as precisely and effectively as possible.",tmText:"Serginiň hyzmatdaşlygy – bu diňe bir gatnaşmakdan has köp zatdyr. Bu öz önümleriňizi giň köpçülige hödürlemek üçin ajaýyp mümkinçilikdir. Her hyzmatdaşlyk paketinde maksatly auditoriýa iň takyk we netijeli ýol bilen ýüzlenmegiňiz üçin ýörite düzülen özboluşly orunlar bar."},benefitsTitle:{ruText:"Партнерство выставки Turkmen Textile позволит:",enText:"Partnership with Turkmen Textile will allow you:",tmText:"Turkmen Textile sergisiniň hyzmatdaşlygy mümkinçilik berer:"},benefits:[{ruText:"Укрепить позиции Вашей компании на рынке.",enText:"Strengthen your company's position in the market.",tmText:"Kompaniýaňyzyň bazardaky pozisiýasyny berkitmek."},{ruText:"Обеспечить существенное преимущество в конкурентной среде.",enText:"Gain a significant advantage in the competitive environment.",tmText:"Bäsdeşlik gurşawynda ep-esli artykmaçlyk gazanmak."},{ruText:"Закрепить имидж успешного бренда Вашей компании.",enText:"Reinforce the image of your company as a successful brand.",tmText:"Kompaniýaňyzyň üstünlikli brend hökmünde abraýyny berkitmek."},{ruText:"Сделать Вашу торговую марку узнаваемой для широкого круга участников и посетителей выставки.",enText:"Make your trademark recognizable to a wide range of exhibition participants and visitors.",tmText:"Söwda belgiňizi serginiň gatnaşyjylarynyň we gelýänleriniň giň topary üçin tanalýan etmek."},{ruText:"Выделить Вашу компанию среди других участников.",enText:"Stand out among other exhibitors.",tmText:"Kompaniýaňyzy beýleki gatnaşyjylaryň arasynda tapawutlandyrmak."}],highlight:{ruText:"Вы хотите, чтобы в профессиональной среде именно Вашу компанию считали ключевым игроком на рынке? Тогда заявите о себе громче всех!",enText:"Do you want your company to be seen as a key player in the professional community? Then make yourself heard louder than anyone else!",tmText:"Siz professional gurşawda kompaniýaňyzyň bazardaky esasy oýunçy hökmünde tanalmagyny isleýärsiňizmi? Onda hemmelerden has gaty sesleniniň!"},packagesTitle:{ruText:"Варианты партнерских пакетов:",enText:"Partnership package options:",tmText:"Hyzmatdaşlyk paketleriniň görnüşleri:"},packages:[{ruText:"Генеральный партнер выставки",enText:"General partner of the exhibition.",tmText:"Serginiň baş hyzmatdaşy"},{ruText:"Партнер Ленты Ведущих Посетителей",enText:"Lead visitor lanyard partner.",tmText:"Öňdebaryjy gelýänleriň lentasynyň hyzmatdaşy"},{ruText:"Партнер деловой программы",enText:"Business program partner.",tmText:"Işewür programmanyň hyzmatdaşy"},{ruText:"Партнер вечернего приема",enText:"Evening reception partner.",tmText:"Agşamky kabul edişligiň hyzmatdaşy"},{ruText:"Партнер пакетов посетителей",enText:"Visitor package partner.",tmText:"Gelýänleriň paketiniň hyzmatdaşy"},{ruText:"Партнер каталога выставки",enText:"Exhibition catalog partner.",tmText:"Serginiň katalogynyň hyzmatdaşy"},{ruText:"Партнер VIP делегации",enText:"VIP delegation partner.",tmText:"VIP delegasiýanyň hyzmatdaşy"},{ruText:"Партнер выставки",enText:"Exhibition partner.",tmText:"Serginiň hyzmatdaşy"}],optionsNote:{ruText:"Данные опции являются базовыми, но мы всегда готовы обсудить вопрос о специальных проектах в рамках партнерства выставки, которые будут соответствовать Вашему бюджету, потребностям и целям.",enText:"These options are basic, but we are always ready to discuss special projects within the exhibition partnership that match your budget, needs, and goals.",tmText:"Bu opsiýalar esasy opsiýalardyr, emma biz elmydama siziň býudjetiňize, zerurlyklarňyza we maksatlaryňyza laýyk gelýän ýörite taslamalary ara alyp maslahatlaşmaga taýýardyrys."},contactNote:{text:{ruText:"По вопросам цен и дополнительных опций партнерских пакетов выставки KIFT, пожалуйста, обращайтесь к ",enText:"For pricing and additional options of KIFT exhibition partnership packages, please contact the ",tmText:"Serginiň hyzmatdaşlyk paketleriniň bahalary we goşmaça opsiýalary boýunça haýyş edýäris, ýüz tutuň "},linkText:{ruText:"ОРГАНИЗАТОРАМ",enText:"ORGANIZERS",tmText:"GURAMAÇYLARA"}}};function Fr(){$();const n=O(t=>t.lang),e=t=>n==="ru"?t.ruText:n==="tm"?t.tmText??t.enText:t.enText;return a.jsxs("div",{children:[a.jsx(ue,{title:e(K.title)}),a.jsx(ee,{className:"page-padding text-sm!",children:a.jsxs("div",{className:"mx-auto max-w-[900px]",children:[a.jsx("h2",{className:"mb-3 text-2xl font-medium",children:e(K.title)}),a.jsx("div",{className:"mb-4 rounded-sm bg-surface_container px-4 py-3 text-sm leading-relaxed text-on_surface_v",children:e(K.intro)}),a.jsx("p",{className:"mb-4 text-sm leading-relaxed text-on_surface_v",children:e(K.partnership)}),a.jsx("h3",{className:"mb-2 text-base font-medium",children:e(K.benefitsTitle)}),a.jsx("ul",{className:"mb-4 list-disc pl-5 text-sm leading-relaxed text-on_surface_v",children:K.benefits.map(t=>a.jsx("li",{children:e(t)},t.enText))}),a.jsx("div",{className:"mb-6 rounded-sm border border-outline px-4 py-3 text-center text-[10px] uppercase text-on_surface_v",children:e(K.highlight)}),a.jsx("h3",{className:"mb-2 text-base font-medium",children:e(K.packagesTitle)}),a.jsx("ul",{className:"mb-4 border-t border-outline_v",children:K.packages.map(t=>a.jsxs("li",{className:"flex items-center gap-2 border-b border-outline_v py-2 text-sm text-on_surface_v",children:[a.jsx("span",{className:"text-xs text-primary",children:"✓"}),a.jsx("span",{children:e(t)})]},t.enText))}),a.jsx("p",{className:"text-sm leading-relaxed text-on_surface_v",children:e(K.optionsNote)}),a.jsxs("p",{className:"text-sm leading-relaxed text-on_surface_v",children:[e(K.contactNote.text),a.jsx("span",{className:"text-primary underline",children:e(K.contactNote.linkText)})]})]})})]})}const $r=[{element:a.jsx(za,{}),path:"/",children:[{element:a.jsx(Ca,{}),path:"",errorElement:a.jsx(A,{})},{element:a.jsx(pr,{}),path:"about",errorElement:a.jsx(A,{})},{element:a.jsx(mr,{}),path:"B2B-B2G",errorElement:a.jsx(A,{})},{element:a.jsx(gr,{}),path:"become-sponsor",errorElement:a.jsx(A,{})},{element:a.jsx(Cr,{}),path:"stend-form",errorElement:a.jsx(A,{})},{element:a.jsx(kr,{}),path:"contacts",errorElement:a.jsx(A,{})},{element:a.jsx(Tr,{}),path:"news",errorElement:a.jsx(A,{})},{element:a.jsx(Sr,{}),path:"news/:id",errorElement:a.jsx(A,{})},{element:a.jsx(_r,{}),path:"participants",errorElement:a.jsx(A,{})},{element:a.jsx(wr,{}),path:"media",errorElement:a.jsx(A,{})},{element:a.jsx(Lr,{}),path:"impressions",errorElement:a.jsx(A,{})},{element:a.jsx(Pr,{}),path:"impressions-tm",errorElement:a.jsx(A,{})},{element:a.jsx(Ir,{}),path:"participation-options",errorElement:a.jsx(A,{})},{element:a.jsx(Fr,{}),path:"partner-opportunities",errorElement:a.jsx(A,{})}]}],Ar=Bs($r),Dr=new Fs;Hs.createRoot(document.getElementById("root")).render(a.jsx(y.StrictMode,{children:a.jsx($s,{client:Dr,children:a.jsx(Gs,{router:Ar})})})); diff --git a/dist/assets/ui-library-DPhFu9EK.js b/dist/assets/ui-library-Du5AO6gB.js similarity index 99% rename from dist/assets/ui-library-DPhFu9EK.js rename to dist/assets/ui-library-Du5AO6gB.js index cded43c..6e630c9 100644 --- a/dist/assets/ui-library-DPhFu9EK.js +++ b/dist/assets/ui-library-Du5AO6gB.js @@ -143,7 +143,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do ${h}px !important; top: ${l}px !important; } - `),()=>{document.head.removeChild(y)}},[t]),f.jsx(mS,{isPresent:t,childRef:s,sizeRef:i,children:m.cloneElement(e,{ref:s})})}const yS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a})=>{const c=Rl(vS),l=m.useId(),u=m.useCallback(h=>{c.set(h,!0);for(const y of c.values())if(!y)return;r&&r()},[c,r]),d=m.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:h=>(c.set(h,!1),()=>c.delete(h))}),i?[Math.random(),u]:[n,u]);return m.useMemo(()=>{c.forEach((h,y)=>c.set(y,!1))},[n]),m.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),o==="popLayout"&&(e=f.jsx(gS,{isPresent:n,anchorX:a,children:e})),f.jsx(Qo.Provider,{value:d,children:e})};function vS(){return new Map}function dm(e=!0){const t=m.useContext(Qo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{e&&s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Ki=e=>e.key||"";function Td(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Nl=typeof window<"u",fm=Nl?m.useLayoutEffect:m.useEffect,dO=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left"})=>{const[c,l]=dm(o),u=m.useMemo(()=>Td(e),[e]),d=o&&!c?[]:u.map(Ki),h=m.useRef(!0),y=m.useRef(u),g=Rl(()=>new Map),[p,v]=m.useState(u),[x,b]=m.useState(u);fm(()=>{h.current=!1,y.current=u;for(let S=0;S{const T=Ki(S),A=o&&!c?!1:u===x||d.includes(T),R=()=>{if(g.has(T))g.set(T,!0);else return;let N=!0;g.forEach(O=>{O||(N=!1)}),N&&(_==null||_(),b(y.current),o&&(l==null||l()),r&&r())};return f.jsx(yS,{isPresent:A,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,onExitComplete:A?void 0:R,anchorX:a,children:S},T)})})},xt=e=>e;let hm=xt;const xS={useManualTiming:!1},Gi=["read","resolveKeyframes","update","preRender","render","postRender"],Ad={value:null};function bS(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function l(d){o.has(d)&&(u.schedule(d),e()),c++,d(a)}const u={schedule:(d,h=!1,y=!1)=>{const p=y&&s?n:r;return h&&o.add(d),p.has(d)||p.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(l),t&&Ad.value&&Ad.value.frameloop[t].push(c),c=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const wS=40;function pm(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Gi.reduce((x,b)=>(x[b]=bS(i,t?b:void 0),x),{}),{read:a,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:h}=o,y=()=>{const x=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(x-s.timestamp,wS),1),s.timestamp=x,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),d.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},g=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:Gi.reduce((x,b)=>{const w=o[b];return x[b]=(_,S=!1,T=!1)=>(n||g(),w.schedule(_,S,T)),x},{}),cancel:x=>{for(let b=0;bRd[e].some(n=>!!t[n])};function SS(e){for(const t in e)os[t]={...os[t],...e[t]}}const _S=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function go(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_S.has(e)}let gm=e=>!go(e);function CS(e){e&&(gm=t=>t.startsWith("on")?!go(t):e(t))}try{CS(require("@emotion/is-prop-valid").default)}catch{}function ES(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(gm(s)||n===!0&&go(s)||!t&&!go(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function TS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Xo=m.createContext({});function Yo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gs(e){return typeof e=="string"||Array.isArray(e)}const kl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jl=["initial",...kl];function Jo(e){return Yo(e.animate)||jl.some(t=>Gs(e[t]))}function ym(e){return!!(Jo(e)||e.variants)}function AS(e,t){if(Jo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gs(n)?n:void 0,animate:Gs(r)?r:void 0}}return e.inherit!==!1?t:{}}function RS(e){const{initial:t,animate:n}=AS(e,m.useContext(Xo));return m.useMemo(()=>({initial:t,animate:n}),[Pd(t),Pd(n)])}function Pd(e){return Array.isArray(e)?e.join(" "):e}const PS=Symbol.for("motionComponentSymbol");function Fr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function NS(e,t,n){return m.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Fr(n)&&(n.current=r))},[t])}const Ol=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kS="framerAppearId",vm="data-"+Ol(kS),{schedule:Ml}=pm(queueMicrotask,!1),xm=m.createContext({});function jS(e,t,n,r,s){var i,o;const{visualElement:a}=m.useContext(Xo),c=m.useContext(mm),l=m.useContext(Qo),u=m.useContext(Pl).reducedMotion,d=m.useRef(null);r=r||c.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,y=m.useContext(xm);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&OS(d.current,n,s,y);const g=m.useRef(!1);m.useInsertionEffect(()=>{h&&g.current&&h.update(n,l)});const p=n[vm],v=m.useRef(!!p&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,p))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,p)));return fm(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Ml.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),m.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,p)}),v.current=!1))}),h}function OS(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bm(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Fr(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function bm(e){if(e)return e.options.allowProjection!==!1?e.projection:bm(e.parent)}function MS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&SS(e);function a(l,u){let d;const h={...m.useContext(Pl),...l,layoutId:DS(l)},{isStatic:y}=h,g=RS(l),p=r(l,y);if(!y&&Nl){IS();const v=LS(h);d=v.MeasureLayout,g.visualElement=jS(s,p,h,t,v.ProjectionNode)}return f.jsxs(Xo.Provider,{value:g,children:[d&&g.visualElement?f.jsx(d,{visualElement:g.visualElement,...h}):null,n(s,l,NS(p,g.visualElement,u),p,y,g.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const c=m.forwardRef(a);return c[PS]=s,c}function DS({layoutId:e}){const t=m.useContext(Al).id;return t&&e!==void 0?t+"-"+e:e}function IS(e,t){m.useContext(mm).strict}function LS(e){const{drag:t,layout:n}=os;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const wm=e=>t=>typeof t=="string"&&t.startsWith(e),Dl=wm("--"),FS=wm("var(--"),Il=e=>FS(e)?VS.test(e.split("/*")[0].trim()):!1,VS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qs={};function BS(e){for(const t in e)Qs[t]=e[t],Dl(t)&&(Qs[t].isCSSVariable=!0)}const vs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kr=new Set(vs);function Sm(e,{layout:t,layoutId:n}){return kr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qs[e]||e==="opacity")}const et=e=>!!(e&&e.getVelocity),_m=(e,t)=>t&&typeof e=="number"?t.transform(e):e,wn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Xs={...xs,transform:e=>wn(0,1,e)},Qi={...xs,default:1},Ai=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kn=Ai("deg"),nn=Ai("%"),te=Ai("px"),$S=Ai("vh"),US=Ai("vw"),Nd={...nn,parse:e=>nn.parse(e)/100,transform:e=>nn.transform(e*100)},zS={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,radius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,backgroundPositionX:te,backgroundPositionY:te},WS={rotate:kn,rotateX:kn,rotateY:kn,rotateZ:kn,scale:Qi,scaleX:Qi,scaleY:Qi,scaleZ:Qi,skew:kn,skewX:kn,skewY:kn,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:Xs,originX:Nd,originY:Nd,originZ:te},kd={...xs,transform:Math.round},Ll={...zS,...WS,zIndex:kd,size:te,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:kd},HS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qS=vs.length;function ZS(e,t,n){let r="",s=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}});function Cm(e,t,n){for(const r in t)!et(t[r])&&!Sm(r,n)&&(e[r]=t[r])}function KS({transformTemplate:e},t){return m.useMemo(()=>{const n=Vl();return Fl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function GS(e,t){const n=e.style||{},r={};return Cm(r,n,e),Object.assign(r,KS(e,t)),r}function QS(e,t){const n={},r=GS(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const XS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bl(e){return typeof e!="string"||e.includes("-")?!1:!!(XS.indexOf(e)>-1||/[A-Z]/u.test(e))}const YS={offset:"stroke-dashoffset",array:"stroke-dasharray"},JS={offset:"strokeDashoffset",array:"strokeDasharray"};function e_(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?YS:JS;e[i.offset]=te.transform(-r);const o=te.transform(t),a=te.transform(n);e[i.array]=`${o} ${a}`}function jd(e,t,n){return typeof e=="string"?e:te.transform(t+n*e)}function t_(e,t,n){const r=jd(t,e.x,e.width),s=jd(n,e.y,e.height);return`${r} ${s}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...l},u,d){if(Fl(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:g}=e;h.transform&&(g&&(y.transform=h.transform),delete h.transform),g&&(s!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=t_(g,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&e_(h,o,a,c,!1)}const Em=()=>({...Vl(),attrs:{}}),Ul=e=>typeof e=="string"&&e.toLowerCase()==="svg";function n_(e,t,n,r){const s=m.useMemo(()=>{const i=Em();return $l(i,t,Ul(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cm(i,e.style,e),s.style={...i,...s.style}}return s}function r_(e=!1){return(n,r,s,{latestValues:i},o)=>{const c=(Bl(n)?n_:QS)(r,i,o,n),l=ES(r,typeof n=="string",e),u=n!==m.Fragment?{...l,...c,ref:s}:{},{children:d}=r,h=m.useMemo(()=>et(d)?d.get():d,[d]);return m.createElement(n,{...u,children:h})}}function Od(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function zl(e,t,n,r){if(typeof t=="function"){const[s,i]=Od(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Od(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const bc=e=>Array.isArray(e),s_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),i_=e=>bc(e)?e[e.length-1]||0:e;function so(e){const t=et(e)?e.get():e;return s_(t)?t.toValue():t}function o_({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:a_(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Tm=e=>(t,n)=>{const r=m.useContext(Xo),s=m.useContext(Qo),i=()=>o_(e,t,r,s);return n?i():Rl(i)};function a_(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=so(i[h]);let{initial:o,animate:a}=e;const c=Jo(e),l=ym(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Yo(d)){const h=Array.isArray(d)?d:[d];for(let y=0;y{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(kr.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a{Am(n,r),Ee.render(()=>{$l(r,s,Ul(n.tagName),e.transformTemplate),Nm(n,r)})})}})};function u_(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...Bl(r)?l_:c_,preloadedFeatures:e,useRender:r_(s),createVisualElement:t,Component:r};return MS(o)}}function Ys(e,t,n){const r=e.getProps();return zl(r,t,n!==void 0?n:r.custom,e)}function Hl(e,t){return e?e[t]||e.default||e:void 0}const jm=new Set(["width","height","top","left","right","bottom",...vs]);let io;function d_(){io=void 0}const rn={now:()=>(io===void 0&&rn.set(He.isProcessing||xS.useManualTiming?He.timestamp:performance.now()),io),set:e=>{io=e,queueMicrotask(d_)}};function ql(e,t){e.indexOf(t)===-1&&e.push(t)}function Zl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kl{constructor(){this.subscriptions=[]}add(t){return ql(this.subscriptions,t),()=>Zl(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class h_{constructor(t,n={}){this.version="12.4.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=rn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=rn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=f_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kl);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ee.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=rn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dd);return Om(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Js(e,t){return new h_(e,t)}function p_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Js(n))}function m_(e,t){const n=Ys(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=i_(i[o]);p_(e,o,a)}}function g_(e){return!!(et(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if(g_(n))return n.add(t)}function Mm(e){return e.props[vm]}function Gl(e){let t;return()=>(t===void 0&&(t=e()),t)}const y_=Gl(()=>window.ScrollTimeline!==void 0);class v_{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(y_()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class x_ extends v_{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const xn=e=>e*1e3,bn=e=>e/1e3;function Ql(e){return typeof e=="function"}function Id(e,t){e.timeline=t,e.onfinish=null}const Xl=e=>Array.isArray(e)&&typeof e[0]=="number",b_={linearEasing:void 0};function w_(e,t){const n=Gl(e);return()=>{var r;return(r=b_[t])!==null&&r!==void 0?r:n()}}const yo=w_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),as=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Dm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Sc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ms([0,.65,.55,1]),circOut:Ms([.55,0,1,.45]),backIn:Ms([.31,.01,.66,-.59]),backOut:Ms([.33,1.53,.69,.99])};function Lm(e,t){if(e)return typeof e=="function"&&yo()?Dm(e,t):Xl(e)?Ms(e):Array.isArray(e)?e.map(n=>Lm(n,t)||Sc.easeOut):Sc[e]}const Fm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,S_=1e-7,__=12;function C_(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Fm(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>S_&&++a<__);return o}function Ri(e,t,n,r){if(e===t&&n===r)return xt;const s=i=>C_(i,0,1,e,n);return i=>i===0||i===1?i:Fm(s(i),t,r)}const Vm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),$m=Ri(.33,1.53,.69,.99),Yl=Bm($m),Um=Vm(Yl),zm=e=>(e*=2)<1?.5*Yl(e):.5*(2-Math.pow(2,-10*(e-1))),Jl=e=>1-Math.sin(Math.acos(e)),Wm=Bm(Jl),Hm=Vm(Jl),qm=e=>/^0[^.\s]+$/u.test(e);function E_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qm(e):!0}const Vs=e=>Math.round(e*1e5)/1e5,eu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T_(e){return e==null}const A_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tu=(e,t)=>n=>!!(typeof n=="string"&&A_.test(n)&&n.startsWith(e)||t&&!T_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(eu);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},R_=e=>wn(0,255,e),Pa={...xs,transform:e=>Math.round(R_(e))},ir={test:tu("rgb","red"),parse:Zm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pa.transform(e)+", "+Pa.transform(t)+", "+Pa.transform(n)+", "+Vs(Xs.transform(r))+")"};function P_(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const _c={test:tu("#"),parse:P_,transform:ir.transform},Vr={test:tu("hsl","hue"),parse:Zm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+nn.transform(Vs(t))+", "+nn.transform(Vs(n))+", "+Vs(Xs.transform(r))+")"},Ye={test:e=>ir.test(e)||_c.test(e)||Vr.test(e),parse:e=>ir.test(e)?ir.parse(e):Vr.test(e)?Vr.parse(e):_c.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ir.transform(e):Vr.transform(e)},N_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function k_(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(eu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(N_))===null||n===void 0?void 0:n.length)||0)>0}const Km="number",Gm="color",j_="var",O_="var(",Ld="${}",M_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ei(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(M_,c=>(Ye.test(c)?(r.color.push(i),s.push(Gm),n.push(Ye.parse(c))):c.startsWith(O_)?(r.var.push(i),s.push(j_),n.push(c)):(r.number.push(i),s.push(Km),n.push(parseFloat(c))),++i,Ld)).split(Ld);return{values:n,split:a,indexes:r,types:s}}function Qm(e){return ei(e).values}function Xm(e){const{split:t,types:n}=ei(e),r=t.length;return s=>{let i="";for(let o=0;otypeof e=="number"?0:e;function I_(e){const t=Qm(e);return Xm(e)(t.map(D_))}const zn={test:k_,parse:Qm,createTransformer:Xm,getAnimatableNone:I_},L_=new Set(["brightness","contrast","saturate","opacity"]);function F_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(eu)||[];if(!r)return e;const s=n.replace(r,"");let i=L_.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const V_=/\b([a-z-]*)\(.*?\)/gu,Cc={...zn,getAnimatableNone:e=>{const t=e.match(V_);return t?t.map(F_).join(" "):e}},B_={...Ll,color:Ye,backgroundColor:Ye,outlineColor:Ye,fill:Ye,stroke:Ye,borderColor:Ye,borderTopColor:Ye,borderRightColor:Ye,borderBottomColor:Ye,borderLeftColor:Ye,filter:Cc,WebkitFilter:Cc},nu=e=>B_[e];function Ym(e,t){let n=nu(e);return n!==Cc&&(n=zn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $_=new Set(["auto","none","0"]);function U_(e,t,n){let r=0,s;for(;re===xs||e===te,Vd=(e,t)=>parseFloat(e.split(", ")[t]),Bd=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Vd(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Vd(i[1],e):0}},z_=new Set(["x","y","z"]),W_=vs.filter(e=>!z_.has(e));function H_(e){const t=[];return W_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const cs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Bd(4,13),y:Bd(5,14)};cs.translateX=cs.x;cs.translateY=cs.y;const vr=new Set;let Ec=!1,Tc=!1;function Jm(){if(Tc){const e=Array.from(vr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=H_(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tc=!1,Ec=!1,vr.forEach(e=>e.complete()),vr.clear()}function eg(){vr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tc=!0)})}function q_(){eg(),Jm()}class ru{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vr.add(this),Ec||(Ec=!0,Ee.read(eg),Ee.resolveKeyframes(Jm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Z_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K_(e){const t=Z_.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ng(e,t,n=1){const[r,s]=K_(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return tg(o)?parseFloat(o):o}return Il(s)?ng(s,t,n+1):s}const rg=e=>t=>t.test(e),G_={test:e=>e==="auto",parse:e=>e},sg=[xs,te,nn,kn,US,$S,G_],$d=e=>sg.find(rg(e));class ig extends ru{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c{n.getValue(c).set(l)}),this.resolveNoneKeyframes()}}const Ud=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zn.test(e)||e==="0")&&!e.startsWith("url("));function Q_(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function ea(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Y_),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const J_=40;class og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rn.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>J_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&q_(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=rn.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:c,isGenerator:l}=this.options;if(!l&&!X_(t,r,s,i))if(o)this.options.duration=0;else{c&&c(ea(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ac=2e4;function ag(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Ac?1/0:t}const Re=(e,t,n)=>e+(t-e)*n;function Na(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Na(c,a,e+1/3),i=Na(c,a,e),o=Na(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function vo(e,t){return n=>n>0?t:e}const ka=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},tC=[_c,ir,Vr],nC=e=>tC.find(t=>t.test(e));function zd(e){const t=nC(e);if(!t)return!1;let n=t.parse(e);return t===Vr&&(n=eC(n)),n}const Wd=(e,t)=>{const n=zd(e),r=zd(t);if(!n||!r)return vo(e,t);const s={...n};return i=>(s.red=ka(n.red,r.red,i),s.green=ka(n.green,r.green,i),s.blue=ka(n.blue,r.blue,i),s.alpha=Re(n.alpha,r.alpha,i),ir.transform(s))},rC=(e,t)=>n=>t(e(n)),Pi=(...e)=>e.reduce(rC),Rc=new Set(["none","hidden"]);function sC(e,t){return Rc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function iC(e,t){return n=>Re(e,t,n)}function su(e){return typeof e=="number"?iC:typeof e=="string"?Il(e)?vo:Ye.test(e)?Wd:cC:Array.isArray(e)?cg:typeof e=="object"?Ye.test(e)?Wd:oC:vo}function cg(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>su(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function aC(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i{const n=zn.createTransformer(t),r=ei(e),s=ei(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Rc.has(e)&&!s.values.length||Rc.has(t)&&!r.values.length?sC(e,t):Pi(cg(aC(r,s),s.values),n):vo(e,t)};function lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Re(e,t,n):su(e)(e,t)}const lC=5;function ug(e,t,n){const r=Math.max(t-lC,0);return Om(n-e(r),t-r)}const ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Hd=.001;function uC({duration:e=ke.duration,bounce:t=ke.bounce,velocity:n=ke.velocity,mass:r=ke.mass}){let s,i,o=1-t;o=wn(ke.minDamping,ke.maxDamping,o),e=wn(ke.minDuration,ke.maxDuration,bn(e)),o<1?(s=l=>{const u=l*o,d=u*e,h=u-n,y=Pc(l,o),g=Math.exp(-d);return Hd-h/y*g},i=l=>{const d=l*o*e,h=d*n+n,y=Math.pow(o,2)*Math.pow(l,2)*e,g=Math.exp(-d),p=Pc(Math.pow(l,2),o);return(-s(l)+Hd>0?-1:1)*((h-y)*g)/p}):(s=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-.001+u*d},i=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const a=5/e,c=fC(s,i,a);if(e=xn(e),isNaN(c))return{stiffness:ke.stiffness,damping:ke.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const dC=12;function fC(e,t,n){let r=n;for(let s=1;se[n]!==void 0)}function mC(e){let t={velocity:ke.velocity,stiffness:ke.stiffness,damping:ke.damping,mass:ke.mass,isResolvedFromDuration:!1,...e};if(!qd(e,pC)&&qd(e,hC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*wn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ke.mass,stiffness:s,damping:i}}else{const n=uC(e);t={...t,...n,mass:ke.mass},t.isResolvedFromDuration=!0}return t}function dg(e=ke.visualDuration,t=ke.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:l,mass:u,duration:d,velocity:h,isResolvedFromDuration:y}=mC({...n,velocity:-bn(n.velocity||0)}),g=h||0,p=l/(2*Math.sqrt(c*u)),v=o-i,x=bn(Math.sqrt(c/u)),b=Math.abs(v)<5;r||(r=b?ke.restSpeed.granular:ke.restSpeed.default),s||(s=b?ke.restDelta.granular:ke.restDelta.default);let w;if(p<1){const S=Pc(x,p);w=T=>{const A=Math.exp(-p*x*T);return o-A*((g+p*x*v)/S*Math.sin(S*T)+v*Math.cos(S*T))}}else if(p===1)w=S=>o-Math.exp(-x*S)*(v+(g+x*v)*S);else{const S=x*Math.sqrt(p*p-1);w=T=>{const A=Math.exp(-p*x*T),R=Math.min(S*T,300);return o-A*((g+p*x*v)*Math.sinh(R)+S*v*Math.cosh(R))/S}}const _={calculatedDuration:y&&d||null,next:S=>{const T=w(S);if(y)a.done=S>=d;else{let A=0;p<1&&(A=S===0?xn(g):ug(w,S,T));const R=Math.abs(A)<=r,N=Math.abs(o-T)<=s;a.done=R&&N}return a.value=a.done?o:T,a},toString:()=>{const S=Math.min(ag(_),Ac),T=Dm(A=>_.next(S*A).value,S,30);return S+"ms "+T}};return _}function Zd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},y=R=>a!==void 0&&Rc,g=R=>a===void 0?c:c===void 0||Math.abs(a-R)-p*Math.exp(-R/r),w=R=>x+b(R),_=R=>{const N=b(R),O=w(R);h.done=Math.abs(N)<=l,h.value=h.done?x:O};let S,T;const A=R=>{y(h.value)&&(S=R,T=dg({keyframes:[h.value,g(h.value)],velocity:ug(w,R,h.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!T&&S===void 0&&(N=!0,_(R),A(R)),S!==void 0&&R>=S?T.next(R-S):(!N&&_(R),h)}}}const gC=Ri(.42,0,1,1),yC=Ri(0,0,.58,1),fg=Ri(.42,0,.58,1),vC=e=>Array.isArray(e)&&typeof e[0]!="number",xC={linear:xt,easeIn:gC,easeInOut:fg,easeOut:yC,circIn:Jl,circInOut:Hm,circOut:Wm,backIn:Yl,backInOut:Um,backOut:$m,anticipate:zm},Kd=e=>{if(Xl(e)){hm(e.length===4);const[t,n,r,s]=e;return Ri(t,n,r,s)}else if(typeof e=="string")return xC[e];return e};function bC(e,t,n){const r=[],s=n||lg,i=e.length-1;for(let o=0;ot[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=bC(t,r,s),c=a.length,l=u=>{if(o&&u1)for(;dl(wn(e[0],e[i-1],u)):l}function SC(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=as(0,t,r);e.push(Re(n,1,s))}}function _C(e){const t=[0];return SC(t,e.length-1),t}function CC(e,t){return e.map(n=>n*t)}function EC(e,t){return e.map(()=>t||fg).splice(0,e.length-1)}function xo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=vC(r)?r.map(Kd):Kd(r),i={done:!1,value:t[0]},o=CC(n&&n.length===t.length?n:_C(t),e),a=wC(o,t,{ease:Array.isArray(s)?s:EC(t,s)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const TC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ee.update(t,!0),stop:()=>Un(t),now:()=>He.isProcessing?He.timestamp:rn.now()}},AC={decay:Zd,inertia:Zd,tween:xo,keyframes:xo,spring:dg},RC=e=>e/100;class iu extends og{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||ru,a=(c,l)=>this.onKeyframesResolved(c,l);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=Ql(n)?n:AC[n]||xo;let c,l;a!==xo&&typeof t[0]!="number"&&(c=Pi(RC,lg(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(l=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ag(u));const{calculatedDuration:d}=u,h=d+s,y=h*(r+1)-s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:c,calculatedDuration:d,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:l,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:y,repeatType:g,repeatDelay:p,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,_=i;if(y){const R=Math.min(this.currentTime,u)/d;let N=Math.floor(R),O=R%1;!O&&R>=1&&(O=1),O===1&&N--,N=Math.min(N,y+1),!!(N%2)&&(g==="reverse"?(O=1-O,p&&(O-=p/d)):g==="mirror"&&(_=o)),w=wn(0,1,O)*d}const S=b?{done:!1,value:c[0]}:_.next(w);a&&(S.value=a(S.value));let{done:T}=S;!b&&l!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return A&&s!==void 0&&(S.value=ea(c,this.options,s)),v&&v(S.value),A&&this.finish(),S}get duration(){const{resolved:t}=this;return t?bn(t.calculatedDuration):0}get time(){return bn(this.currentTime)}set time(t){t=xn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=TC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const PC=new Set(["opacity","clipPath","filter","transform"]);function NC(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Lm(a,s);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const kC=Gl(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),bo=10,jC=2e4;function OC(e){return Ql(e.type)||e.type==="spring"||!Im(e.ease)}function MC(e,t){const n=new iu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:c,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&yo()&&DC(i)&&(i=hg[i]),OC(this.options)){const{onComplete:d,onUpdate:h,motionValue:y,element:g,...p}=this.options,v=MC(t,p);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,s=v.times,i=v.ease,o="keyframes"}const u=NC(a.owner.current,c,t,{...this.options,duration:r,times:s,ease:i});return u.startTime=l??this.calcStartTime(),this.pendingTimeline?(Id(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(ea(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return bn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return bn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return xt;const{animation:r}=n;Id(r,t)}return xt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:u,onComplete:d,element:h,...y}=this.options,g=new iu({...y,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),p=xn(this.time);l.setWithVelocity(g.sample(p-bo).value,g.sample(p).value,bo)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=n.owner.getProps();return kC()&&r&&PC.has(r)&&!c&&!l&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const IC={type:"spring",stiffness:500,damping:25,restSpeed:10},LC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FC={type:"keyframes",duration:.8},VC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BC=(e,{keyframes:t})=>t.length>2?FC:kr.has(e)?e.startsWith("scale")?LC(t[1]):IC:VC;function $C({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ou=(e,t,n,r={},s,i)=>o=>{const a=Hl(r,e)||{},c=a.delay||r.delay||0;let{elapsed:l=0}=r;l=l-xn(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};$C(a)||(u={...u,...BC(e,u)}),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=ea(u.keyframes,a);if(h!==void 0)return Ee.update(()=>{u.onUpdate(h),u.onComplete()}),new x_([])}return!i&&Gd.supports(u)?new Gd(u):new iu(u)};function UC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(o=r);const l=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in c){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),y=c[d];if(y===void 0||u&&UC(u,d))continue;const g={delay:n,...Hl(o||{},d)};let p=!1;if(window.MotionHandoffAnimation){const x=Mm(e);if(x){const b=window.MotionHandoffAnimation(x,d,Ee);b!==null&&(g.startTime=b,p=!0)}}wc(e,d),h.start(ou(d,h,y,e.shouldReduceMotion&&jm.has(d)?{type:!1}:g,e,p));const v=h.animation;v&&l.push(v)}return a&&Promise.all(l).then(()=>{Ee.update(()=>{a&&m_(e,a)})}),l}function Nc(e,t,n={}){var r;const s=Ys(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(pg(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return zC(e,t,u+l,d,h,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,u]=c==="beforeChildren"?[o,a]:[a,o];return l().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function zC(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,c=s===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(WC).forEach((l,u)=>{l.notify("AnimationStart",t),o.push(Nc(l,t,{...i,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(o)}function WC(e,t){return e.sortNodePosition(t)}function HC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Nc(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Nc(e,t,n);else{const s=typeof t=="function"?Ys(e,t,n.custom):t;r=Promise.all(pg(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function mg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>HC(e,n,r)))}function QC(e){let t=GC(e),n=Qd(),r=!0;const s=c=>(l,u)=>{var d;const h=Ys(e,u,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:y,transitionEnd:g,...p}=h;l={...l,...p,...g}}return l};function i(c){t=c(e)}function o(c){const{props:l}=e,u=gg(e.parent)||{},d=[],h=new Set;let y={},g=1/0;for(let v=0;vg&&_,N=!1;const O=Array.isArray(w)?w:[w];let I=O.reduce(s(x),{});S===!1&&(I={});const{prevResolvedValues:M={}}=b,U={...M,...I},F=Z=>{R=!0,h.has(Z)&&(N=!0,h.delete(Z)),b.needsAnimating[Z]=!0;const K=e.getValue(Z);K&&(K.liveStyle=!1)};for(const Z in U){const K=I[Z],se=M[Z];if(y.hasOwnProperty(Z))continue;let fe=!1;bc(K)&&bc(se)?fe=!mg(K,se):fe=K!==se,fe?K!=null?F(Z):h.add(Z):K!==void 0&&h.has(Z)?F(Z):b.protectedKeys[Z]=!0}b.prevProp=w,b.prevResolvedValues=I,b.isActive&&(y={...y,...I}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(T&&A)||N)&&d.push(...O.map(Z=>({animation:Z,options:{type:x}})))}if(h.size){const v={};if(typeof l.initial!="boolean"){const x=Ys(e,Array.isArray(l.initial)?l.initial[0]:l.initial);x&&x.transition&&(v.transition=x.transition)}h.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=b??null}),d.push({animation:v})}let p=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(d):Promise.resolve()}function a(c,l){var u;if(n[c].isActive===l)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,l)}),n[c].isActive=l;const d=o(c);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Qd(),r=!0}}}function XC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!mg(t,e):!1}function nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qd(){return{animate:nr(!0),whileInView:nr(),whileHover:nr(),whileTap:nr(),whileDrag:nr(),whileFocus:nr(),exit:nr()}}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class YC extends Xn{constructor(t){super(t),t.animationState||(t.animationState=QC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let JC=0;class eE extends Xn{constructor(){super(...arguments),this.id=JC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tE={animation:{Feature:YC},exit:{Feature:eE}},Ot={x:!1,y:!1};function yg(){return Ot.x||Ot.y}function nE(e){return e==="x"||e==="y"?Ot[e]?null:(Ot[e]=!0,()=>{Ot[e]=!1}):Ot.x||Ot.y?null:(Ot.x=Ot.y=!0,()=>{Ot.x=Ot.y=!1})}const au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ti(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ni(e){return{point:{x:e.pageX,y:e.pageY}}}const rE=e=>t=>au(t)&&e(t,Ni(t));function Bs(e,t,n,r){return ti(e,t,rE(n),r)}const Xd=(e,t)=>Math.abs(e-t);function sE(e,t){const n=Xd(e.x,t.x),r=Xd(e.y,t.y);return Math.sqrt(n**2+r**2)}class vg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Oa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=sE(d.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:g}=d,{timestamp:p}=He;this.history.push({...g,timestamp:p});const{onStart:v,onMove:x}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ja(h,this.transformPagePoint),Ee.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Oa(d.type==="pointercancel"?this.lastMoveEventInfo:ja(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,v),g&&g(d,v)},!au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Ni(t),a=ja(o,this.transformPagePoint),{point:c}=a,{timestamp:l}=He;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Oa(a,this.history)),this.removeListeners=Pi(Bs(this.contextWindow,"pointermove",this.handlePointerMove),Bs(this.contextWindow,"pointerup",this.handlePointerUp),Bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Un(this.updatePoint)}}function ja(e,t){return t?{point:t(e.point)}:e}function Yd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oa({point:e},t){return{point:e,delta:Yd(e,xg(t)),offset:Yd(e,iE(t)),velocity:oE(t,.1)}}function iE(e){return e[0]}function xg(e){return e[e.length-1]}function oE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=xg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=bn(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const bg=1e-4,aE=1-bg,cE=1+bg,wg=.01,lE=0-wg,uE=0+wg;function at(e){return e.max-e.min}function dE(e,t,n){return Math.abs(e-t)<=n}function Jd(e,t,n,r=.5){e.origin=r,e.originPoint=Re(t.min,t.max,e.origin),e.scale=at(n)/at(t),e.translate=Re(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aE&&e.scale<=cE||isNaN(e.scale))&&(e.scale=1),(e.translate>=lE&&e.translate<=uE||isNaN(e.translate))&&(e.translate=0)}function $s(e,t,n,r){Jd(e.x,t.x,n.x,r?r.originX:void 0),Jd(e.y,t.y,n.y,r?r.originY:void 0)}function ef(e,t,n){e.min=n.min+t.min,e.max=e.min+at(t)}function fE(e,t,n){ef(e.x,t.x,n.x),ef(e.y,t.y,n.y)}function tf(e,t,n){e.min=t.min-n.min,e.max=e.min+at(t)}function Us(e,t,n){tf(e.x,t.x,n.x),tf(e.y,t.y,n.y)}function hE(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Re(n,e,r.max):Math.min(e,n)),e}function nf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pE(e,{top:t,left:n,bottom:r,right:s}){return{x:nf(e.x,n,s),y:nf(e.y,t,r)}}function rf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=as(t.min,t.max-r,e.min):r>s&&(n=as(e.min,e.max-s,t.min)),wn(0,1,n)}function yE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const kc=.35;function vE(e=kc){return e===!1?e=0:e===!0&&(e=kc),{x:sf(e,"left","right"),y:sf(e,"top","bottom")}}function sf(e,t,n){return{min:of(e,t),max:of(e,n)}}function of(e,t){return typeof e=="number"?e:e[t]||0}const af=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:af(),y:af()}),cf=()=>({min:0,max:0}),Me=()=>({x:cf(),y:cf()});function At(e){return[e("x"),e("y")]}function Sg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ma(e){return e===void 0||e===1}function jc({scale:e,scaleX:t,scaleY:n}){return!Ma(e)||!Ma(t)||!Ma(n)}function rr(e){return jc(e)||_g(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function _g(e){return lf(e.x)||lf(e.y)}function lf(e){return e&&e!=="0%"}function wo(e,t,n){const r=e-n,s=t*r;return n+s}function uf(e,t,n,r,s){return s!==void 0&&(e=wo(e,s,r)),wo(e,n,r)+t}function Oc(e,t=0,n=1,r,s){e.min=uf(e.min,t,n,r,s),e.max=uf(e.max,t,n,r,s)}function Cg(e,{x:t,y:n}){Oc(e.x,t.translate,t.scale,t.originPoint),Oc(e.y,n.translate,n.scale,n.originPoint)}const df=.999999999999,ff=1.0000000000001;function wE(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;adf&&(t.x=1),t.ydf&&(t.y=1)}function $r(e,t){e.min=e.min+t,e.max=e.max+t}function hf(e,t,n,r,s=.5){const i=Re(e.min,e.max,s);Oc(e,t,n,i,r)}function Ur(e,t){hf(e.x,t.x,t.scaleX,t.scale,t.originX),hf(e.y,t.y,t.scaleY,t.scale,t.originY)}function Eg(e,t){return Sg(bE(e.getBoundingClientRect(),t))}function SE(e,t,n){const r=Eg(e,n),{scroll:s}=t;return s&&($r(r.x,s.offset.x),$r(r.y,s.offset.y)),r}const Tg=({current:e})=>e?e.ownerDocument.defaultView:null,_E=new WeakMap;class CE{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Me(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ni(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:y,onDragStart:g}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nE(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),At(v=>{let x=this.getAxisMotionValue(v).get()||0;if(nn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[v];w&&(x=at(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),g&&Ee.postRender(()=>g(u,d)),wc(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(u,d)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:g,onDrag:p}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=d;if(y&&this.currentDirection===null){this.currentDirection=EE(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),c=()=>At(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new vg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:Tg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ee.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Xi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=hE(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Fr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=pE(s.layoutBox,n):this.constraints=!1,this.elastic=vE(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&At(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yE(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=SE(r,s.root,this.visualElement.getTransformPagePoint());let o=mE(s.layout.layoutBox,i);if(n){const a=n(xE(o));this.hasMutatedConstraints=!!a,a&&(o=Sg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=At(u=>{if(!Xi(u,n,this.currentDirection))return;let d=c&&c[u]||{};o&&(d={min:0,max:0});const h=s?200:1e6,y=s?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(ou(t,r,0,n,this.visualElement,!1))}stopAnimation(){At(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){At(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){At(n=>{const{drag:r}=this.getProps();if(!Xi(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-Re(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Fr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};At(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=gE({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),At(o=>{if(!Xi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(Re(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;_E.set(this.visualElement,this);const t=this.visualElement.current,n=Bs(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Fr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ee.read(r);const o=ti(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(At(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=kc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Xi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function EE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class TE extends Xn{constructor(t){super(t),this.removeGroupControls=xt,this.removeListeners=xt,this.controls=new CE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const pf=e=>(t,n)=>{e&&Ee.postRender(()=>e(t,n))};class AE extends Xn{constructor(){super(...arguments),this.removePointerDownListener=xt}onPointerDown(t){this.session=new vg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:pf(t),onStart:pf(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&Ee.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const oo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ps={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(te.test(e))e=parseFloat(e);else return e;const n=mf(e,t.target.x),r=mf(e,t.target.y);return`${n}% ${r}%`}},RE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=zn.parse(e);if(s.length>5)return r;const i=zn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const l=Re(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),i(s)}};class PE extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;BS(NE),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),oo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Ee.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ml.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ag(e){const[t,n]=dm(),r=m.useContext(Al);return f.jsx(PE,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(xm),isPresent:t,safeToRemove:n})}const NE={borderRadius:{...Ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ps,borderTopRightRadius:Ps,borderBottomLeftRadius:Ps,borderBottomRightRadius:Ps,boxShadow:RE};function kE(e,t,n){const r=et(e)?e:Js(e);return r.start(ou("",r,t,n)),r.animation}function jE(e){return e instanceof SVGElement&&e.tagName!=="svg"}const OE=(e,t)=>e.depth-t.depth;class ME{constructor(){this.children=[],this.isDirty=!1}add(t){ql(this.children,t),this.isDirty=!0}remove(t){Zl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OE),this.isDirty=!1,this.children.forEach(t)}}function DE(e,t){const n=rn.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Un(r),e(i-t))};return Ee.read(r,!0),()=>Un(r)}const Rg=["TopLeft","TopRight","BottomLeft","BottomRight"],IE=Rg.length,gf=e=>typeof e=="string"?parseFloat(e):e,yf=e=>typeof e=="number"||te.test(e);function LE(e,t,n,r,s,i){s?(e.opacity=Re(0,n.opacity!==void 0?n.opacity:1,FE(r)),e.opacityExit=Re(t.opacity!==void 0?t.opacity:1,0,VE(r))):i&&(e.opacity=Re(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(as(e,t,r))}function xf(e,t){e.min=t.min,e.max=t.max}function Tt(e,t){xf(e.x,t.x),xf(e.y,t.y)}function bf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wf(e,t,n,r,s){return e-=t,e=wo(e,1/n,r),s!==void 0&&(e=wo(e,1/s,r)),e}function BE(e,t=0,n=1,r=.5,s,i=e,o=e){if(nn.test(t)&&(t=parseFloat(t),t=Re(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Re(i.min,i.max,r);e===i&&(a-=t),e.min=wf(e.min,t,n,a,s),e.max=wf(e.max,t,n,a,s)}function Sf(e,t,[n,r,s],i,o){BE(e,t[n],t[r],t[s],t.scale,i,o)}const $E=["x","scaleX","originX"],UE=["y","scaleY","originY"];function _f(e,t,n,r){Sf(e.x,t,$E,n?n.x:void 0,r?r.x:void 0),Sf(e.y,t,UE,n?n.y:void 0,r?r.y:void 0)}function Cf(e){return e.translate===0&&e.scale===1}function Ng(e){return Cf(e.x)&&Cf(e.y)}function Ef(e,t){return e.min===t.min&&e.max===t.max}function zE(e,t){return Ef(e.x,t.x)&&Ef(e.y,t.y)}function Tf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kg(e,t){return Tf(e.x,t.x)&&Tf(e.y,t.y)}function Af(e){return at(e.x)/at(e.y)}function Rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WE{constructor(){this.members=[]}add(t){ql(this.members,t),t.scheduleRender()}remove(t){if(Zl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function HE(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:d,rotateY:h,skewX:y,skewY:g}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),y&&(r+=`skewX(${y}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Da=["","X","Y","Z"],qE={visibility:"hidden"},Pf=1e3;let ZE=0;function Ia(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ee,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jg(r)}function Og({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=ZE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QE),this.nodes.forEach(tT),this.nodes.forEach(nT),this.nodes.forEach(XE)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=DE(h,250),oo.hasAnimatedSinceResize&&(oo.hasAnimatedSinceResize=!1,this.nodes.forEach(kf))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:y,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||aT,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!kg(this.targetLayout,g),w=!h&&y;if(this.options.layoutRoot||this.resumeFrom||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const _={...Hl(p,"layout"),onPlay:v,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else h||kf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Un(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rT),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!at(this.snapshot.measuredBox.x)&&!at(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const S=_/1e3;jf(d.x,o.x,S),jf(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Us(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iT(this.relativeTarget,this.relativeTargetOrigin,h,S),w&&zE(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Me()),Tt(w,this.relativeTarget)),p&&(this.animationValues=u,LE(u,l,this.latestValues,S,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ee.update(()=>{oo.hasAnimatedSinceResize=!0,this.currentAnimation=kE(0,Pf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&Mg(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Me();const d=at(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const h=at(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Tt(a,c),Ur(a,u),$s(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new WE),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ia("z",o,l,this.animationValues);for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Nf),this.root.sharedNodes.clear()}}}function KE(e){e.updateLayout()}function GE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?At(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],y=at(h);h.min=r[d].min,h.max=h.min+y}):Mg(i,n.layoutBox,r)&&At(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],y=at(r[d]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+y)});const a=Br();$s(a,r,n.layoutBox);const c=Br();o?$s(c,e.applyTransform(s,!0),n.measuredBox):$s(c,r,n.layoutBox);const l=!Ng(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:y}=d;if(h&&y){const g=Me();Us(g,n.layoutBox,h.layoutBox);const p=Me();Us(p,r,y.layoutBox),kg(g,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function QE(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function XE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YE(e){e.clearSnapshot()}function Nf(e){e.clearMeasurements()}function JE(e){e.isLayoutDirty=!1}function eT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tT(e){e.resolveTargetDelta()}function nT(e){e.calcProjection()}function rT(e){e.resetSkewAndRotation()}function sT(e){e.removeLeadSnapshot()}function jf(e,t,n){e.translate=Re(t.translate,0,n),e.scale=Re(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Of(e,t,n,r){e.min=Re(t.min,n.min,r),e.max=Re(t.max,n.max,r)}function iT(e,t,n,r){Of(e.x,t.x,n.x,r),Of(e.y,t.y,n.y,r)}function oT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aT={duration:.45,ease:[.4,0,.1,1]},Mf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Df=Mf("applewebkit/")&&!Mf("chrome/")?Math.round:xt;function If(e){e.min=Df(e.min),e.max=Df(e.max)}function cT(e){If(e.x),If(e.y)}function Mg(e,t,n){return e==="position"||e==="preserve-aspect"&&!dE(Af(t),Af(n),.2)}function lT(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uT=Og({attachResizeListener:(e,t)=>ti(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),La={current:void 0},Dg=Og({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!La.current){const e=new uT({});e.mount(window),e.setOptions({layoutScroll:!0}),La.current=e}return La.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dT={pan:{Feature:AE},drag:{Feature:TE,ProjectionNode:Dg,MeasureLayout:Ag}};function fT(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ig(e,t){const n=fT(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Lf(e){return!(e.pointerType==="touch"||yg())}function hT(e,t,n={}){const[r,s,i]=Ig(e,n),o=a=>{if(!Lf(a))return;const{target:c}=a,l=t(c,a);if(typeof l!="function"||!c)return;const u=d=>{Lf(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}function Ff(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Ee.postRender(()=>i(t,Ni(t)))}class pT extends Xn{mount(){const{current:t}=this.node;t&&(this.unmount=hT(t,(n,r)=>(Ff(this.node,r,"Start"),s=>Ff(this.node,s,"End"))))}unmount(){}}class mT extends Xn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pi(ti(this.node.current,"focus",()=>this.onFocus()),ti(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Lg=(e,t)=>t?e===t?!0:Lg(e,t.parentElement):!1,gT=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yT(e){return gT.has(e.tagName)||e.tabIndex!==-1}const Ds=new WeakSet;function Vf(e){return t=>{t.key==="Enter"&&e(t)}}function Fa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vT=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vf(()=>{if(Ds.has(n))return;Fa(n,"down");const s=Vf(()=>{Fa(n,"up")}),i=()=>Fa(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Bf(e){return au(e)&&!yg()}function xT(e,t,n={}){const[r,s,i]=Ig(e,n),o=a=>{const c=a.currentTarget;if(!Bf(a)||Ds.has(c))return;Ds.add(c);const l=t(c,a),u=(y,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!Bf(y)||!Ds.has(c))&&(Ds.delete(c),typeof l=="function"&&l(y,{success:g}))},d=y=>{u(y,n.useGlobalTarget||Lg(c,y.target))},h=y=>{u(y,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!yT(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",l=>vT(l,s),s)}),i}function $f(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&Ee.postRender(()=>i(t,Ni(t)))}class bT extends Xn{mount(){const{current:t}=this.node;t&&(this.unmount=xT(t,(n,r)=>($f(this.node,r,"Start"),(s,{success:i})=>$f(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mc=new WeakMap,Va=new WeakMap,wT=e=>{const t=Mc.get(e.target);t&&t(e)},ST=e=>{e.forEach(wT)};function _T({root:e,...t}){const n=e||document;Va.has(n)||Va.set(n,{});const r=Va.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(ST,{root:e,...t})),r[s]}function CT(e,t,n){const r=_T(t);return Mc.set(e,n),r.observe(e),()=>{Mc.delete(e),r.unobserve(e)}}const ET={some:0,all:1};class TT extends Xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:ET[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=l?u:d;h&&h(c)};return CT(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(AT(t,n))&&this.startObserver()}unmount(){}}function AT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const RT={inView:{Feature:TT},tap:{Feature:bT},focus:{Feature:mT},hover:{Feature:pT}},PT={layout:{ProjectionNode:Dg,MeasureLayout:Ag}},Dc={current:null},Fg={current:!1};function NT(){if(Fg.current=!0,!!Nl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dc.current=e.matches;e.addListener(t),t()}else Dc.current=!1}const kT=[...sg,Ye,zn],jT=e=>kT.find(rg(e)),OT=new WeakMap;function MT(e,t,n){for(const r in t){const s=t[r],i=n[r];if(et(s))e.addValue(r,s);else if(et(i))e.addValue(r,Js(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Js(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Uf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DT{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ru,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=rn.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Fg.current||NT(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Un(this.notifyUpdate),Un(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=kr.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ee.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in os){const n=os[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Me()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Js(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(tg(s)||qm(s))?s=parseFloat(s):!jT(s)&&zn.test(n)&&(s=Ym(t,n)),this.setBaseTarget(t,et(s)?s.get():s)),et(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=zl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!et(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Vg extends DT{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function IT(e){return window.getComputedStyle(e)}class LT extends Vg{constructor(){super(...arguments),this.type="html",this.renderInstance=Rm}readValueFromInstance(t,n){if(kr.has(n)){const r=nu(n);return r&&r.default||0}else{const r=IT(t),s=(Dl(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Eg(t,n)}build(t,n,r){Fl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Wl(t,n,r)}}class FT extends Vg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Me,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Am(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kr.has(n)){const r=nu(n);return r&&r.default||0}return n=Pm.has(n)?n:Ol(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return km(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ee.postRender(this.updateDimensions)}build(t,n,r){$l(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){Nm(t,n,r,s)}mount(t){this.isSVGTag=Ul(t.tagName),super.mount(t)}}const VT=(e,t)=>Bl(e)?new FT(t):new LT(t,{allowProjection:e!==m.Fragment}),BT=u_({...tE,...RT,...dT,...PT},VT),zs=TS(BT);var Ba,zf;function $T(){if(zf)return Ba;zf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,c=typeof $i=="object"&&$i&&$i.Object===Object&&$i,l=typeof self=="object"&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),d=Object.prototype,h=d.toString,y=Math.max,g=Math.min,p=function(){return u.Date.now()};function v(S,T,A){var R,N,O,I,M,U,F=0,X=!1,Y=!1,Z=!0;if(typeof S!="function")throw new TypeError(e);T=_(T)||0,x(A)&&(X=!!A.leading,Y="maxWait"in A,O=Y?y(_(A.maxWait)||0,T):O,Z="trailing"in A?!!A.trailing:Z);function K(ue){var ve=R,je=N;return R=N=void 0,F=ue,I=S.apply(je,ve),I}function se(ue){return F=ue,M=setTimeout(Be,T),X?K(ue):I}function fe(ue){var ve=ue-U,je=ue-F,Fe=T-ve;return Y?g(Fe,O-je):Fe}function ye(ue){var ve=ue-U,je=ue-F;return U===void 0||ve>=T||ve<0||Y&&je>=O}function Be(){var ue=p();if(ye(ue))return Ge(ue);M=setTimeout(Be,fe(ue))}function Ge(ue){return M=void 0,Z&&R?K(ue):(R=N=void 0,I)}function Qe(){M!==void 0&&clearTimeout(M),F=0,R=U=N=M=void 0}function jt(){return M===void 0?I:Ge(p())}function st(){var ue=p(),ve=ye(ue);if(R=arguments,N=this,U=ue,ve){if(M===void 0)return se(U);if(Y)return M=setTimeout(Be,T),K(U)}return M===void 0&&(M=setTimeout(Be,T)),I}return st.cancel=Qe,st.flush=jt,st}function x(S){var T=typeof S;return!!S&&(T=="object"||T=="function")}function b(S){return!!S&&typeof S=="object"}function w(S){return typeof S=="symbol"||b(S)&&h.call(S)==n}function _(S){if(typeof S=="number")return S;if(w(S))return t;if(x(S)){var T=typeof S.valueOf=="function"?S.valueOf():S;S=x(T)?T+"":T}if(typeof S!="string")return S===0?S:+S;S=S.replace(r,"");var A=i.test(S);return A||o.test(S)?a(S.slice(2),A?2:8):s.test(S)?t:+S}return Ba=v,Ba}$T();var Bg=typeof window<"u"?m.useLayoutEffect:m.useEffect,UT=typeof window>"u";function So(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=a=>UT?t:window.matchMedia(a).matches,[s,i]=m.useState(()=>n?r(e):t);function o(){i(r(e))}return Bg(()=>{const a=window.matchMedia(e);return o(),a.addListener?a.addListener(o):a.addEventListener("change",o),()=>{a.removeListener?a.removeListener(o):a.removeEventListener("change",o)}},[e]),s}var zT=typeof window>"u";function WT(e={}){const{autoLock:t=!0,lockTarget:n,widthReflow:r=!0}=e,[s,i]=m.useState(!1),o=m.useRef(null),a=m.useRef(null),c=()=>{if(o.current){const{overflow:u,paddingRight:d}=o.current.style;if(a.current={overflow:u,paddingRight:d},r){const h=o.current===document.body?window.innerWidth:o.current.offsetWidth,y=parseInt(window.getComputedStyle(o.current).paddingRight,10)||0,g=h-o.current.scrollWidth;o.current.style.paddingRight=`${g+y}px`}o.current.style.overflow="hidden",i(!0)}},l=()=>{o.current&&a.current&&(o.current.style.overflow=a.current.overflow,r&&(o.current.style.paddingRight=a.current.paddingRight)),i(!1)};return Bg(()=>{if(!zT)return n&&(o.current=typeof n=="string"?document.querySelector(n):n),o.current||(o.current=document.body),t&&c(),()=>{l()}},[t,n,r]),{isLocked:s,lock:c,unlock:l}}const hO=({className:e,stage:t})=>{const n=So("(min-width: 768px");return f.jsx("div",{className:e,children:f.jsx("div",{className:"max-w-[808px] md:mx-auto my-20 mx-5",children:f.jsxs("div",{className:"relative h-14 w-full",children:[f.jsx("div",{className:V("h-2 absolute bg-[#D0D3D8] rounded-[2px] w-full top-0 left-0")}),f.jsx(zs.div,{initial:{width:0},animate:t===2?{width:"20%"}:t===3&&{width:"75%"},transition:{delay:.5,duration:.5},className:V("h-2 absolute bg-primary rounded-[2px] top-0 left-0 z-[5]",{"w-0 bg-opacity-0":t===1,"w-[20%]":t===2,"w-[75%]":t===3})}),f.jsx(zs.div,{initial:{width:n?"50%":"35%"},animate:t===2?{width:"75%"}:t===3&&{width:"100%"},className:V("bg-reverse_primary w-1/2 absolute top-0 left-0 rounded-[2px] z-[3] h-2")}),f.jsx(zs.div,{className:V("progress-circle absolute transition-all duration-500 -top-6 flex items-center justify-center",{"bg-reverse_primary md:left-1/2 left-1/3":t===1,"bg-primary left-[20%] !text-on_primary":t===2||t===3}),children:"1"}),f.jsx("div",{className:V("progress-circle absolute -top-6 right-[17%] transition-all -translate-x-1/2 flex items-center justify-center",{"bg-[#D0D3D8]":t===1,"bg-reverse_primary":t===2,"bg-primary !text-on_primary":t===3}),children:"2"}),f.jsx("div",{className:V("progress-circle absolute -top-6 right-0 transition-all duration-500 flex items-center justify-center",{"bg-[#D0D3D8]":t===1||t===2,"bg-reverse_primary":t===3}),children:"3"})]})})})};var ki=e=>e.type==="checkbox",or=e=>e instanceof Date,ot=e=>e==null;const $g=e=>typeof e=="object";var Ie=e=>!ot(e)&&!Array.isArray(e)&&$g(e)&&!or(e),Ug=e=>Ie(e)&&e.target?ki(e.target)?e.target.checked:e.target.value:e,HT=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,zg=(e,t)=>e.has(HT(t)),qT=e=>{const t=e.constructor&&e.constructor.prototype;return Ie(t)&&t.hasOwnProperty("isPrototypeOf")},cu=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ut(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(cu&&(e instanceof Blob||r))&&(n||Ie(e)))if(t=n?[]:{},!n&&!qT(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=ut(e[s]));else return e;return t}var ta=e=>Array.isArray(e)?e.filter(Boolean):[],De=e=>e===void 0,$=(e,t,n)=>{if(!t||!Ie(e))return n;const r=ta(t.split(/[,[\].]+?/)).reduce((s,i)=>ot(s)?s:s[i],e);return De(r)||r===e?De(e[t])?n:e[t]:r},Nt=e=>typeof e=="boolean",lu=e=>/^\w*$/.test(e),Wg=e=>ta(e.replace(/["|']|\]/g,"").split(/\.|\[/)),xe=(e,t,n)=>{let r=-1;const s=lu(t)?[t]:Wg(t),i=s.length,o=i-1;for(;++rde.useContext(Hg),ZT=e=>{const{children:t,...n}=e;return de.createElement(Hg.Provider,{value:n},t)};var qg=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==It.all&&(t._proxyFormState[o]=!r||It.all),n&&(n[o]=!0),e[o]}});return s},ft=e=>Ie(e)&&!Object.keys(e).length,Zg=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return ft(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||It.all))},Ws=e=>Array.isArray(e)?e:[e],Kg=(e,t,n)=>!e||!t||e===t||Ws(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function uu(e){const t=de.useRef(e);t.current=e,de.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function KT(e){const t=na(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=de.useState(n._formState),c=de.useRef(!0),l=de.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=de.useRef(s);return u.current=s,uu({disabled:r,next:d=>c.current&&Kg(u.current,d.name,i)&&Zg(d,l.current,n._updateFormState)&&a({...n._formState,...d}),subject:n._subjects.state}),de.useEffect(()=>(c.current=!0,l.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),de.useMemo(()=>qg(o,n,l.current,!1),[o,n])}var tn=e=>typeof e=="string",Gg=(e,t,n,r,s)=>tn(e)?(r&&t.watch.add(e),$(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),$(n,i))):(r&&(t.watchAll=!0),n);function GT(e){const t=na(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=de.useRef(r);a.current=r,uu({disabled:i,subject:n._subjects.values,next:u=>{Kg(a.current,u.name,o)&&l(ut(Gg(a.current,n._names,u.values||n._formValues,!1,s)))}});const[c,l]=de.useState(n._getWatch(r,s));return de.useEffect(()=>n._removeUnmounted()),c}function QT(e){const t=na(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=zg(s._names.array,n),a=GT({control:s,name:n,defaultValue:$(s._formValues,n,$(s._defaultValues,n,e.defaultValue)),exact:!0}),c=KT({control:s,name:n,exact:!0}),l=de.useRef(s.register(n,{...e.rules,value:a,...Nt(e.disabled)?{disabled:e.disabled}:{}})),u=de.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!$(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!$(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!$(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!$(c.validatingFields,n)},error:{enumerable:!0,get:()=>$(c.errors,n)}}),[c,n]),d=de.useMemo(()=>({name:n,value:a,...Nt(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:Ug(h),name:n},type:_o.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:$(s._formValues,n),name:n},type:_o.BLUR}),ref:h=>{const y=$(s._fields,n);y&&h&&(y._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:g=>h.setCustomValidity(g),reportValidity:()=>h.reportValidity()})}}),[n,s._formValues,r,c.disabled,a,s._fields]);return de.useEffect(()=>{const h=s._options.shouldUnregister||i,y=(g,p)=>{const v=$(s._fields,g);v&&v._f&&(v._f.mount=p)};if(y(n,!0),h){const g=ut($(s._options.defaultValues,n));xe(s._defaultValues,n,g),De($(s._formValues,n))&&xe(s._formValues,n,g)}return!o&&s.register(n),()=>{(o?h&&!s._state.action:h)?s.unregister(n):y(n,!1)}},[n,s,o,i]),de.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),de.useMemo(()=>({field:d,formState:c,fieldState:u}),[d,c,u])}const XT=e=>e.render(QT(e));var Qg=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Wf=e=>({isOnSubmit:!e||e===It.onSubmit,isOnBlur:e===It.onBlur,isOnChange:e===It.onChange,isOnAll:e===It.all,isOnTouch:e===It.onTouched}),Hf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Hs=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=$(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Hs(a,t))break}else if(Ie(a)&&Hs(a,t))break}}};var YT=(e,t,n)=>{const r=Ws($(e,n));return xe(r,"root",t[n]),xe(e,n,r),e},du=e=>e.type==="file",en=e=>typeof e=="function",Co=e=>{if(!cu)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ao=e=>tn(e),fu=e=>e.type==="radio",Eo=e=>e instanceof RegExp;const qf={value:!1,isValid:!1},Zf={value:!0,isValid:!0};var Xg=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!De(e[0].attributes.value)?De(e[0].value)||e[0].value===""?Zf:{value:e[0].value,isValid:!0}:Zf:qf}return qf};const Kf={isValid:!1,value:null};var Yg=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Kf):Kf;function Gf(e,t,n="validate"){if(ao(e)||Array.isArray(e)&&e.every(ao)||Nt(e)&&!e)return{type:n,message:ao(e)?e:"",ref:t}}var Ir=e=>Ie(e)&&!Eo(e)?e:{value:e,message:""},Qf=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:c,maxLength:l,minLength:u,min:d,max:h,pattern:y,validate:g,name:p,valueAsNumber:v,mount:x}=e._f,b=$(n,p);if(!x||t.has(p))return{};const w=a?a[0]:o,_=M=>{s&&w.reportValidity&&(w.setCustomValidity(Nt(M)?"":M||""),w.reportValidity())},S={},T=fu(o),A=ki(o),R=T||A,N=(v||du(o))&&De(o.value)&&De(b)||Co(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,O=Qg.bind(null,p,r,S),I=(M,U,F,X=hn.maxLength,Y=hn.minLength)=>{const Z=M?U:F;S[p]={type:M?X:Y,message:Z,ref:o,...O(M?X:Y,Z)}};if(i?!Array.isArray(b)||!b.length:c&&(!R&&(N||ot(b))||Nt(b)&&!b||A&&!Xg(a).isValid||T&&!Yg(a).isValid)){const{value:M,message:U}=ao(c)?{value:!!c,message:c}:Ir(c);if(M&&(S[p]={type:hn.required,message:U,ref:w,...O(hn.required,U)},!r))return _(U),S}if(!N&&(!ot(d)||!ot(h))){let M,U;const F=Ir(h),X=Ir(d);if(!ot(b)&&!isNaN(b)){const Y=o.valueAsNumber||b&&+b;ot(F.value)||(M=Y>F.value),ot(X.value)||(U=Ynew Date(new Date().toDateString()+" "+fe),K=o.type=="time",se=o.type=="week";tn(F.value)&&b&&(M=K?Z(b)>Z(F.value):se?b>F.value:Y>new Date(F.value)),tn(X.value)&&b&&(U=K?Z(b)+M.value,X=!ot(U.value)&&b.length<+U.value;if((F||X)&&(I(F,M.message,U.message),!r))return _(S[p].message),S}if(y&&!N&&tn(b)){const{value:M,message:U}=Ir(y);if(Eo(M)&&!b.match(M)&&(S[p]={type:hn.pattern,message:U,ref:o,...O(hn.pattern,U)},!r))return _(U),S}if(g){if(en(g)){const M=await g(b,n),U=Gf(M,w);if(U&&(S[p]={...U,...O(hn.validate,U.message)},!r))return _(U.message),S}else if(Ie(g)){let M={};for(const U in g){if(!ft(M)&&!r)break;const F=Gf(await g[U](b,n),w,U);F&&(M={...F,...O(U,F.message)},_(F.message),r&&(S[p]=M))}if(!ft(M)&&(S[p]={ref:w,...M},!r))return S}}return _(!0),S};function JT(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Ic=e=>ot(e)||!$g(e);function jn(e,t){if(Ic(e)||Ic(t))return e===t;if(or(e)&&or(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(or(i)&&or(o)||Ie(i)&&Ie(o)||Array.isArray(i)&&Array.isArray(o)?!jn(i,o):i!==o)return!1}}return!0}var Jg=e=>e.type==="select-multiple",tA=e=>fu(e)||ki(e),Ua=e=>Co(e)&&e.isConnected,ey=e=>{for(const t in e)if(en(e[t]))return!0;return!1};function To(e,t={}){const n=Array.isArray(e);if(Ie(e)||n)for(const r in e)Array.isArray(e[r])||Ie(e[r])&&!ey(e[r])?(t[r]=Array.isArray(e[r])?[]:{},To(e[r],t[r])):ot(e[r])||(t[r]=!0);return t}function ty(e,t,n){const r=Array.isArray(e);if(Ie(e)||r)for(const s in e)Array.isArray(e[s])||Ie(e[s])&&!ey(e[s])?De(t)||Ic(n[s])?n[s]=Array.isArray(e[s])?To(e[s],[]):{...To(e[s])}:ty(e[s],ot(t)?{}:t[s],n[s]):n[s]=!jn(e[s],t[s]);return n}var Ns=(e,t)=>ty(e,t,To(t)),ny=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>De(e)?e:t?e===""?NaN:e&&+e:n&&tn(e)?new Date(e):r?r(e):e;function za(e){const t=e.ref;return du(t)?t.files:fu(t)?Yg(e.refs).value:Jg(t)?[...t.selectedOptions].map(({value:n})=>n):ki(t)?Xg(e.refs).value:ny(De(t.value)?e.ref.value:t.value,e)}var nA=(e,t,n,r)=>{const s={};for(const i of e){const o=$(t,i);o&&xe(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},ks=e=>De(e)?e:Eo(e)?e.source:Ie(e)?Eo(e.value)?e.value.source:e.value:e;const Xf="AsyncFunction";var rA=e=>!!e&&!!e.validate&&!!(en(e.validate)&&e.validate.constructor.name===Xf||Ie(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Xf)),sA=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Yf(e,t,n){const r=$(e,n);if(r||lu(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=$(t,i),a=$(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var iA=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,oA=(e,t)=>!ta($(e,t)).length&&$e(e,t);const aA={mode:It.onSubmit,reValidateMode:It.onChange,shouldFocusError:!0};function cA(e={}){let t={...aA,...e},n={submitCount:0,isDirty:!1,isLoading:en(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Ie(t.defaultValues)||Ie(t.values)?ut(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ut(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:$a(),array:$a(),state:$a()},h=Wf(t.mode),y=Wf(t.reValidateMode),g=t.criteriaMode===It.all,p=C=>P=>{clearTimeout(l),l=setTimeout(C,P)},v=async C=>{if(!t.disabled&&(u.isValid||C)){const P=t.resolver?ft((await R()).errors):await O(r,!0);P!==n.isValid&&d.state.next({isValid:P})}},x=(C,P)=>{!t.disabled&&(u.isValidating||u.validatingFields)&&((C||Array.from(a.mount)).forEach(j=>{j&&(P?xe(n.validatingFields,j,P):$e(n.validatingFields,j))}),d.state.next({validatingFields:n.validatingFields,isValidating:!ft(n.validatingFields)}))},b=(C,P=[],j,z,B=!0,L=!0)=>{if(z&&j&&!t.disabled){if(o.action=!0,L&&Array.isArray($(r,C))){const J=j($(r,C),z.argA,z.argB);B&&xe(r,C,J)}if(L&&Array.isArray($(n.errors,C))){const J=j($(n.errors,C),z.argA,z.argB);B&&xe(n.errors,C,J),oA(n.errors,C)}if(u.touchedFields&&L&&Array.isArray($(n.touchedFields,C))){const J=j($(n.touchedFields,C),z.argA,z.argB);B&&xe(n.touchedFields,C,J)}u.dirtyFields&&(n.dirtyFields=Ns(s,i)),d.state.next({name:C,isDirty:M(C,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else xe(i,C,P)},w=(C,P)=>{xe(n.errors,C,P),d.state.next({errors:n.errors})},_=C=>{n.errors=C,d.state.next({errors:n.errors,isValid:!1})},S=(C,P,j,z)=>{const B=$(r,C);if(B){const L=$(i,C,De(j)?$(s,C):j);De(L)||z&&z.defaultChecked||P?xe(i,C,P?L:za(B._f)):X(C,L),o.mount&&v()}},T=(C,P,j,z,B)=>{let L=!1,J=!1;const ae={name:C};if(!t.disabled){const Ve=!!($(r,C)&&$(r,C)._f&&$(r,C)._f.disabled);if(!j||z){u.isDirty&&(J=n.isDirty,n.isDirty=ae.isDirty=M(),L=J!==ae.isDirty);const Oe=Ve||jn($(s,C),P);J=!!(!Ve&&$(n.dirtyFields,C)),Oe||Ve?$e(n.dirtyFields,C):xe(n.dirtyFields,C,!0),ae.dirtyFields=n.dirtyFields,L=L||u.dirtyFields&&J!==!Oe}if(j){const Oe=$(n.touchedFields,C);Oe||(xe(n.touchedFields,C,j),ae.touchedFields=n.touchedFields,L=L||u.touchedFields&&Oe!==j)}L&&B&&d.state.next(ae)}return L?ae:{}},A=(C,P,j,z)=>{const B=$(n.errors,C),L=u.isValid&&Nt(P)&&n.isValid!==P;if(t.delayError&&j?(c=p(()=>w(C,j)),c(t.delayError)):(clearTimeout(l),c=null,j?xe(n.errors,C,j):$e(n.errors,C)),(j?!jn(B,j):B)||!ft(z)||L){const J={...z,...L&&Nt(P)?{isValid:P}:{},errors:n.errors,name:C};n={...n,...J},d.state.next(J)}},R=async C=>{x(C,!0);const P=await t.resolver(i,t.context,nA(C||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return x(C),P},N=async C=>{const{errors:P}=await R(C);if(C)for(const j of C){const z=$(P,j);z?xe(n.errors,j,z):$e(n.errors,j)}else n.errors=P;return P},O=async(C,P,j={valid:!0})=>{for(const z in C){const B=C[z];if(B){const{_f:L,...J}=B;if(L){const ae=a.array.has(L.name),Ve=B._f&&rA(B._f);Ve&&u.validatingFields&&x([z],!0);const Oe=await Qf(B,a.disabled,i,g,t.shouldUseNativeValidation&&!P,ae);if(Ve&&u.validatingFields&&x([z]),Oe[L.name]&&(j.valid=!1,P))break;!P&&($(Oe,L.name)?ae?YT(n.errors,Oe,L.name):xe(n.errors,L.name,Oe[L.name]):$e(n.errors,L.name))}!ft(J)&&await O(J,P,j)}}return j.valid},I=()=>{for(const C of a.unMount){const P=$(r,C);P&&(P._f.refs?P._f.refs.every(j=>!Ua(j)):!Ua(P._f.ref))&&st(C)}a.unMount=new Set},M=(C,P)=>!t.disabled&&(C&&P&&xe(i,C,P),!jn(ye(),s)),U=(C,P,j)=>Gg(C,a,{...o.mount?i:De(P)?s:tn(C)?{[C]:P}:P},j,P),F=C=>ta($(o.mount?i:s,C,t.shouldUnregister?$(s,C,[]):[])),X=(C,P,j={})=>{const z=$(r,C);let B=P;if(z){const L=z._f;L&&(!L.disabled&&xe(i,C,ny(P,L)),B=Co(L.ref)&&ot(P)?"":P,Jg(L.ref)?[...L.ref.options].forEach(J=>J.selected=B.includes(J.value)):L.refs?ki(L.ref)?L.refs.length>1?L.refs.forEach(J=>(!J.defaultChecked||!J.disabled)&&(J.checked=Array.isArray(B)?!!B.find(ae=>ae===J.value):B===J.value)):L.refs[0]&&(L.refs[0].checked=!!B):L.refs.forEach(J=>J.checked=J.value===B):du(L.ref)?L.ref.value="":(L.ref.value=B,L.ref.type||d.values.next({name:C,values:{...i}})))}(j.shouldDirty||j.shouldTouch)&&T(C,B,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&fe(C)},Y=(C,P,j)=>{for(const z in P){const B=P[z],L=`${C}.${z}`,J=$(r,L);(a.array.has(C)||Ie(B)||J&&!J._f)&&!or(B)?Y(L,B,j):X(L,B,j)}},Z=(C,P,j={})=>{const z=$(r,C),B=a.array.has(C),L=ut(P);xe(i,C,L),B?(d.array.next({name:C,values:{...i}}),(u.isDirty||u.dirtyFields)&&j.shouldDirty&&d.state.next({name:C,dirtyFields:Ns(s,i),isDirty:M(C,L)})):z&&!z._f&&!ot(L)?Y(C,L,j):X(C,L,j),Hf(C,a)&&d.state.next({...n}),d.values.next({name:o.mount?C:void 0,values:{...i}})},K=async C=>{o.mount=!0;const P=C.target;let j=P.name,z=!0;const B=$(r,j),L=()=>P.type?za(B._f):Ug(C),J=ae=>{z=Number.isNaN(ae)||or(ae)&&isNaN(ae.getTime())||jn(ae,$(i,j,ae))};if(B){let ae,Ve;const Oe=L(),qt=C.type===_o.BLUR||C.type===_o.FOCUS_OUT,Cs=!sA(B._f)&&!t.resolver&&!$(n.errors,j)&&!B._f.deps||iA(qt,$(n.touchedFields,j),n.isSubmitted,y,h),Zt=Hf(j,a,qt);xe(i,j,Oe),qt?(B._f.onBlur&&B._f.onBlur(C),c&&c(0)):B._f.onChange&&B._f.onChange(C);const er=T(j,Oe,qt,!1),Es=!ft(er)||Zt;if(!qt&&d.values.next({name:j,type:C.type,values:{...i}}),Cs)return u.isValid&&(t.mode==="onBlur"&&qt?v():qt||v()),Es&&d.state.next({name:j,...Zt?{}:er});if(!qt&&Zt&&d.state.next({...n}),t.resolver){const{errors:tr}=await R([j]);if(J(Oe),z){const ya=Yf(n.errors,r,j),Vi=Yf(tr,r,ya.name||j);ae=Vi.error,j=Vi.name,Ve=ft(tr)}}else x([j],!0),ae=(await Qf(B,a.disabled,i,g,t.shouldUseNativeValidation))[j],x([j]),J(Oe),z&&(ae?Ve=!1:u.isValid&&(Ve=await O(r,!0)));z&&(B._f.deps&&fe(B._f.deps),A(j,Ve,ae,er))}},se=(C,P)=>{if($(n.errors,P)&&C.focus)return C.focus(),1},fe=async(C,P={})=>{let j,z;const B=Ws(C);if(t.resolver){const L=await N(De(C)?C:B);j=ft(L),z=C?!B.some(J=>$(L,J)):j}else C?(z=(await Promise.all(B.map(async L=>{const J=$(r,L);return await O(J&&J._f?{[L]:J}:J)}))).every(Boolean),!(!z&&!n.isValid)&&v()):z=j=await O(r);return d.state.next({...!tn(C)||u.isValid&&j!==n.isValid?{}:{name:C},...t.resolver||!C?{isValid:j}:{},errors:n.errors}),P.shouldFocus&&!z&&Hs(r,se,C?B:a.mount),z},ye=C=>{const P={...o.mount?i:s};return De(C)?P:tn(C)?$(P,C):C.map(j=>$(P,j))},Be=(C,P)=>({invalid:!!$((P||n).errors,C),isDirty:!!$((P||n).dirtyFields,C),error:$((P||n).errors,C),isValidating:!!$(n.validatingFields,C),isTouched:!!$((P||n).touchedFields,C)}),Ge=C=>{C&&Ws(C).forEach(P=>$e(n.errors,P)),d.state.next({errors:C?n.errors:{}})},Qe=(C,P,j)=>{const z=($(r,C,{_f:{}})._f||{}).ref,B=$(n.errors,C)||{},{ref:L,message:J,type:ae,...Ve}=B;xe(n.errors,C,{...Ve,...P,ref:z}),d.state.next({name:C,errors:n.errors,isValid:!1}),j&&j.shouldFocus&&z&&z.focus&&z.focus()},jt=(C,P)=>en(C)?d.values.subscribe({next:j=>C(U(void 0,P),j)}):U(C,P,!0),st=(C,P={})=>{for(const j of C?Ws(C):a.mount)a.mount.delete(j),a.array.delete(j),P.keepValue||($e(r,j),$e(i,j)),!P.keepError&&$e(n.errors,j),!P.keepDirty&&$e(n.dirtyFields,j),!P.keepTouched&&$e(n.touchedFields,j),!P.keepIsValidating&&$e(n.validatingFields,j),!t.shouldUnregister&&!P.keepDefaultValue&&$e(s,j);d.values.next({values:{...i}}),d.state.next({...n,...P.keepDirty?{isDirty:M()}:{}}),!P.keepIsValid&&v()},ue=({disabled:C,name:P,field:j,fields:z})=>{(Nt(C)&&o.mount||C||a.disabled.has(P))&&(C?a.disabled.add(P):a.disabled.delete(P),T(P,za(j?j._f:$(z,P)._f),!1,!1,!0))},ve=(C,P={})=>{let j=$(r,C);const z=Nt(P.disabled)||Nt(t.disabled);return xe(r,C,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:C}},name:C,mount:!0,...P}}),a.mount.add(C),j?ue({field:j,disabled:Nt(P.disabled)?P.disabled:t.disabled,name:C}):S(C,!0,P.value),{...z?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:ks(P.min),max:ks(P.max),minLength:ks(P.minLength),maxLength:ks(P.maxLength),pattern:ks(P.pattern)}:{},name:C,onChange:K,onBlur:K,ref:B=>{if(B){ve(C,P),j=$(r,C);const L=De(B.value)&&B.querySelectorAll&&B.querySelectorAll("input,select,textarea")[0]||B,J=tA(L),ae=j._f.refs||[];if(J?ae.find(Ve=>Ve===L):L===j._f.ref)return;xe(r,C,{_f:{...j._f,...J?{refs:[...ae.filter(Ua),L,...Array.isArray($(s,C))?[{}]:[]],ref:{type:L.type,name:C}}:{ref:L}}}),S(C,!1,void 0,L)}else j=$(r,C,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(zg(a.array,C)&&o.action)&&a.unMount.add(C)}}},je=()=>t.shouldFocusError&&Hs(r,se,a.mount),Fe=C=>{Nt(C)&&(d.state.next({disabled:C}),Hs(r,(P,j)=>{const z=$(r,j);z&&(P.disabled=z._f.disabled||C,Array.isArray(z._f.refs)&&z._f.refs.forEach(B=>{B.disabled=z._f.disabled||C}))},0,!1))},we=(C,P)=>async j=>{let z;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let B=ut(i);if(a.disabled.size)for(const L of a.disabled)xe(B,L,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:L,values:J}=await R();n.errors=L,B=J}else await O(r);if($e(n.errors,"root"),ft(n.errors)){d.state.next({errors:{}});try{await C(B,j)}catch(L){z=L}}else P&&await P({...n.errors},j),je(),setTimeout(je);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ft(n.errors)&&!z,submitCount:n.submitCount+1,errors:n.errors}),z)throw z},G=(C,P={})=>{$(r,C)&&(De(P.defaultValue)?Z(C,ut($(s,C))):(Z(C,P.defaultValue),xe(s,C,ut(P.defaultValue))),P.keepTouched||$e(n.touchedFields,C),P.keepDirty||($e(n.dirtyFields,C),n.isDirty=P.defaultValue?M(C,ut($(s,C))):M()),P.keepError||($e(n.errors,C),u.isValid&&v()),d.state.next({...n}))},he=(C,P={})=>{const j=C?ut(C):s,z=ut(j),B=ft(C),L=B?s:z;if(P.keepDefaultValues||(s=j),!P.keepValues){if(P.keepDirtyValues){const J=new Set([...a.mount,...Object.keys(Ns(s,i))]);for(const ae of Array.from(J))$(n.dirtyFields,ae)?xe(L,ae,$(i,ae)):Z(ae,$(L,ae))}else{if(cu&&De(C))for(const J of a.mount){const ae=$(r,J);if(ae&&ae._f){const Ve=Array.isArray(ae._f.refs)?ae._f.refs[0]:ae._f.ref;if(Co(Ve)){const Oe=Ve.closest("form");if(Oe){Oe.reset();break}}}}r={}}i=t.shouldUnregister?P.keepDefaultValues?ut(s):{}:ut(L),d.array.next({values:{...L}}),d.values.next({values:{...L}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!P.keepIsValid||!!P.keepDirtyValues,o.watch=!!t.shouldUnregister,d.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:B?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!jn(C,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:B?{}:P.keepDirtyValues?P.keepDefaultValues&&i?Ns(s,i):n.dirtyFields:P.keepDefaultValues&&C?Ns(s,C):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ce=(C,P)=>he(en(C)?C(i):C,P);return{control:{register:ve,unregister:st,getFieldState:Be,handleSubmit:we,setError:Qe,_executeSchema:R,_getWatch:U,_getDirty:M,_updateValid:v,_removeUnmounted:I,_updateFieldArray:b,_updateDisabledField:ue,_getFieldArray:F,_reset:he,_resetDefaultValues:()=>en(t.defaultValues)&&t.defaultValues().then(C=>{Ce(C,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:C=>{n={...n,...C}},_disableForm:Fe,_subjects:d,_proxyFormState:u,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(C){o=C},get _defaultValues(){return s},get _names(){return a},set _names(C){a=C},get _formState(){return n},set _formState(C){n=C},get _options(){return t},set _options(C){t={...t,...C}}},trigger:fe,register:ve,handleSubmit:we,watch:jt,setValue:Z,getValues:ye,reset:Ce,resetField:G,clearErrors:Ge,unregister:st,setError:Qe,setFocus:(C,P={})=>{const j=$(r,C),z=j&&j._f;if(z){const B=z.refs?z.refs[0]:z.ref;B.focus&&(B.focus(),P.shouldSelect&&en(B.select)&&B.select())}},getFieldState:Be}}function lA(e={}){const t=de.useRef(void 0),n=de.useRef(void 0),[r,s]=de.useState({isDirty:!1,isValidating:!1,isLoading:en(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:en(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...cA(e),formState:r});const i=t.current.control;return i._options=e,uu({subject:i._subjects.state,next:o=>{Zg(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),de.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),de.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),de.useEffect(()=>{e.values&&!jn(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),de.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),de.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),de.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=qg(r,i),t.current}var uA="Label",ry=m.forwardRef((e,t)=>f.jsx(lt.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ry.displayName=uA;var sy=ry;const dA=Go("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),iy=m.forwardRef(({className:e,...t},n)=>f.jsx(sy,{ref:n,className:V(dA(),e),...t}));iy.displayName=sy.displayName;const pO=ZT,oy=m.createContext({}),fA=({...e})=>f.jsx(oy.Provider,{value:{name:e.name},children:f.jsx(XT,{...e})}),ra=()=>{const e=m.useContext(oy),t=m.useContext(ay),{getFieldState:n,formState:r}=na(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},ay=m.createContext({}),cy=m.forwardRef(({className:e,...t},n)=>{const r=m.useId();return f.jsx(ay.Provider,{value:{id:r},children:f.jsx("div",{ref:n,className:V("space-y-2",e),...t})})});cy.displayName="FormItem";const ly=m.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=ra();return f.jsx(iy,{ref:n,className:V(r&&"text-destructive",e),htmlFor:s,...t})});ly.displayName="FormLabel";const uy=m.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=ra();return f.jsx(ms,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});uy.displayName="FormControl";const hA=m.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=ra();return f.jsx("p",{ref:n,id:r,className:V("text-[0.8rem] text-muted-foreground",e),...t})});hA.displayName="FormDescription";const dy=m.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=ra(),o=s?String(s==null?void 0:s.message):t;return o?f.jsx("p",{ref:r,id:i,className:V("text-[0.8rem] font-medium text-destructive",e),...n,children:o}):null});dy.displayName="FormMessage";const Lc=m.forwardRef(({className:e,type:t,...n},r)=>t!=="file"?f.jsx("input",{type:t,className:V("flex h-14 rounded-[2px] border p-4 focus:border-[3px] focus:outline-none focus:border-primary transition-all hover:border-on_surface border-outline bg-transparent text-base w-regular file:border-0 file:bg-secondary_container file:outline-none file:text-sm file:w-fit file:text-on_secondary_container file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}):f.jsxs("div",{className:"relative w-[160px] h-9 overflow-hidden !cursor-pointer",children:[f.jsx("input",{ref:r,accept:".pdf, .png, .jpeg, .jpg",type:t,className:V("h-9 absolute top-0 left-0 !cursor-pointer opacity-0 z-20 size-full"),...n}),f.jsxs("div",{className:"absolute rounded-[2px] cursor-pointer size-full flex items-center gap-4 px-3 py-2.5 top-0 left-0 bg-secondary_container",children:[f.jsx(l0,{className:"cursor-pointer",size:16})," Upload file"]})]}));Lc.displayName="Input";const fy=m.forwardRef(({className:e,...t},n)=>f.jsx("textarea",{className:V("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));fy.displayName="Textarea";const Jf=e=>{let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,h))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,s,a);return a},pA=e=>e?Jf(e):Jf,mA=e=>e;function gA(e,t=mA){const n=de.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return de.useDebugValue(n),n}const yA=e=>{const t=pA(e),n=r=>gA(t,r);return Object.assign(n,t),n},hy=e=>yA;function vA(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var i;const o=c=>c===null?null:JSON.parse(c,void 0),a=(i=n.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>n.setItem(s,JSON.stringify(i,void 0)),removeItem:s=>n.removeItem(s)}}const Fc=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Fc(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Fc(r)(n)}}}},xA=(e,t)=>(n,r,s)=>{let i={storage:vA(()=>localStorage),partialize:p=>p,version:0,merge:(p,v)=>({...v,...p}),...t},o=!1;const a=new Set,c=new Set;let l=i.storage;if(!l)return e((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...p)},r,s);const u=()=>{const p=i.partialize({...r()});return l.setItem(i.name,{state:p,version:i.version})},d=s.setState;s.setState=(p,v)=>{d(p,v),u()};const h=e((...p)=>{n(...p),u()},r,s);s.getInitialState=()=>h;let y;const g=()=>{var p,v;if(!l)return;o=!1,a.forEach(b=>{var w;return b((w=r())!=null?w:h)});const x=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(p=r())!=null?p:h))||void 0;return Fc(l.getItem.bind(l))(i.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate){const w=i.migrate(b.state,b.version);return w instanceof Promise?w.then(_=>[!0,_]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[_,S]=b;if(y=i.merge(S,(w=r())!=null?w:h),n(y,!0),_)return u()}).then(()=>{x==null||x(y,void 0),y=r(),o=!0,c.forEach(b=>b(y))}).catch(b=>{x==null||x(void 0,b)})};return s.persist={setOptions:p=>{i={...i,...p},p.storage&&(l=p.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:p=>(a.add(p),()=>{a.delete(p)}),onFinishHydration:p=>(c.add(p),()=>{c.delete(p)})},i.skipHydration||g(),y||h},bA=xA;var Ze=(e=>(e.EN="en",e.RU="ru",e.TM="tm",e))(Ze||{});const _e=hy()(bA(e=>({lang:"en",setLang:t=>e({lang:t})}),{name:"lang-storage"})),mO=({control:e,name:t,label:n,placeholder:r,error:s,type:i="text",className:o,disabled:a,textArea:c=!1,textDark:l,supporText:u,handleChange:d,onPrimary:h=!1})=>{const y=_e(g=>g.lang);return f.jsx(fA,{control:e,name:t,render:({field:g})=>f.jsxs(cy,{className:V(o,"flex flex-col w-full relative"),children:[f.jsx(ly,{className:V("text-xl",h&&"!text-on_primary",l?"text-on_surface":"text-on_surface_v"),children:n}),f.jsx(uy,{children:f.jsx(f.Fragment,{children:c?f.jsx(fy,{rows:3,...g,placeholder:r,className:V(s&&"border-[#BA1A1A]",h&&"border-primary_outline_reverse focus:border-white hover:border-white focus:border-1 text-on_primary")}):i!=="file"?f.jsx(Lc,{...g,type:i,placeholder:r,disabled:a,className:V(s&&"border-[#BA1A1A]",h&&"border-primary_outline_reverse focus:border-white hover:border-white focus:border-1 text-on_primary")}):f.jsxs("div",{className:"relative",children:[f.jsx(Lc,{type:"file",placeholder:r,onChange:p=>{var x;const v=((x=p.target.files)==null?void 0:x[0])||null;console.log("Выбранный файл:",v),g.onChange(v),d&&d(p)},disabled:a}),g.value&&f.jsxs("div",{className:"text-sm mt-2 text-gray-500 absolute top-8",children:[{ru:"Выбранный файл:",en:"Selected file:",tm:"Saýlanan faýl:"}[y]," ",g.value.name]})]})})}),f.jsx(dy,{className:V("absolute -bottom-5 left-0 text-sm font-medium leading-[130%]",s&&h?"text-teritary_04":"text-[#BA1A1A]"),children:s?s.message:u})]})})},gO=({className:e,delay:t=.15})=>{const n=_e(r=>r.lang);return f.jsxs(zs.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0,transition:{delay:t}},className:V("flex flex-col gap-8 my-16",e),children:[f.jsx("h3",{className:"text-3xl text-center",children:{ru:"Форма успешно отправлена!",en:"Form submitted successfully!",tm:"Forma üstünlikli ugradyldy!"}[n]}),f.jsx(Se,{className:"w-fit mx-auto",to:"/",children:f.jsx(tt,{variant:"outline",children:{ru:"Вернуться на главную",en:"Back to home",tm:"Baş sahypa gaýdyp barmak"}[n]})})]})},wA=({className:e,slides:t,active:n,scrollTo:r})=>f.jsx("div",{className:V("flex items-center justify-center gap-2",e),children:Array.from({length:t}).map((s,i)=>f.jsx("span",{onClick:()=>r==null?void 0:r(i),className:V(n===i?"dot-active":"dot")},i))}),SA=["top","right","bottom","left"],Wn=Math.min,gt=Math.max,Ao=Math.round,Yi=Math.floor,sn=e=>({x:e,y:e}),_A={left:"right",right:"left",bottom:"top",top:"bottom"},CA={start:"end",end:"start"};function Vc(e,t,n){return gt(e,Wn(t,n))}function Sn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function hu(e){return e==="x"?"y":"x"}function pu(e){return e==="y"?"height":"width"}function Hn(e){return["top","bottom"].includes(_n(e))?"y":"x"}function mu(e){return hu(Hn(e))}function EA(e,t,n){n===void 0&&(n=!1);const r=bs(e),s=mu(e),i=pu(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ro(o)),[o,Ro(o)]}function TA(e){const t=Ro(e);return[Bc(e),t,Bc(t)]}function Bc(e){return e.replace(/start|end/g,t=>CA[t])}function AA(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function RA(e,t,n,r){const s=bs(e);let i=AA(_n(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Bc)))),i}function Ro(e){return e.replace(/left|right|bottom|top/g,t=>_A[t])}function PA(e){return{top:0,right:0,bottom:0,left:0,...e}}function py(e){return typeof e!="number"?PA(e):{top:e,right:e,bottom:e,left:e}}function Po(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function eh(e,t,n){let{reference:r,floating:s}=e;const i=Hn(t),o=mu(t),a=pu(o),c=_n(t),l=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let y;switch(c){case"top":y={x:u,y:r.y-s.height};break;case"bottom":y={x:u,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:d};break;case"left":y={x:r.x-s.width,y:d};break;default:y={x:r.x,y:r.y}}switch(bs(t)){case"start":y[o]-=h*(n&&l?-1:1);break;case"end":y[o]+=h*(n&&l?-1:1);break}return y}const NA=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=eh(l,r,c),h=r,y={},g=0;for(let p=0;p({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=Sn(e,t)||{};if(l==null)return{};const d=py(u),h={x:n,y:r},y=mu(s),g=pu(y),p=await o.getDimensions(l),v=y==="y",x=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[y]-h[y]-i.floating[g],S=h[y]-i.reference[y],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let A=T?T[w]:0;(!A||!await(o.isElement==null?void 0:o.isElement(T)))&&(A=a.floating[w]||i.floating[g]);const R=_/2-S/2,N=A/2-p[g]/2-1,O=Wn(d[x],N),I=Wn(d[b],N),M=O,U=A-p[g]-I,F=A/2-p[g]/2+R,X=Vc(M,F,U),Y=!c.arrow&&bs(s)!=null&&F!==X&&i.reference[g]/2-(FF<=0)){var I,M;const F=(((I=i.flip)==null?void 0:I.index)||0)+1,X=A[F];if(X)return{data:{index:F,overflows:O},reset:{placement:X}};let Y=(M=O.filter(Z=>Z.overflows[0]<=0).sort((Z,K)=>Z.overflows[1]-K.overflows[1])[0])==null?void 0:M.placement;if(!Y)switch(y){case"bestFit":{var U;const Z=(U=O.filter(K=>{if(T){const se=Hn(K.placement);return se===b||se==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(se=>se>0).reduce((se,fe)=>se+fe,0)]).sort((K,se)=>K[1]-se[1])[0])==null?void 0:U[0];Z&&(Y=Z);break}case"initialPlacement":Y=a;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function th(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nh(e){return SA.some(t=>e[t]>=0)}const OA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Sn(e,t);switch(r){case"referenceHidden":{const i=await ni(t,{...s,elementContext:"reference"}),o=th(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:nh(o)}}}case"escaped":{const i=await ni(t,{...s,altBoundary:!0}),o=th(i,n.floating);return{data:{escapedOffsets:o,escaped:nh(o)}}}default:return{}}}}};async function MA(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=_n(n),a=bs(n),c=Hn(n)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,d=Sn(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),c?{x:y*u,y:h*l}:{x:h*l,y:y*u}}const DA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,c=await MA(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},IA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...c}=Sn(e,t),l={x:n,y:r},u=await ni(t,c),d=Hn(_n(s)),h=hu(d);let y=l[h],g=l[d];if(i){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=y+u[v],w=y-u[x];y=Vc(b,y,w)}if(o){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=g+u[v],w=g-u[x];g=Vc(b,g,w)}const p=a.fn({...t,[h]:y,[d]:g});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:i,[d]:o}}}}}},LA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Sn(e,t),u={x:n,y:r},d=Hn(s),h=hu(d);let y=u[h],g=u[d];const p=Sn(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const w=h==="y"?"height":"width",_=i.reference[h]-i.floating[w]+v.mainAxis,S=i.reference[h]+i.reference[w]-v.mainAxis;y<_?y=_:y>S&&(y=S)}if(l){var x,b;const w=h==="y"?"width":"height",_=["top","left"].includes(_n(s)),S=i.reference[d]-i.floating[w]+(_&&((x=o.offset)==null?void 0:x[d])||0)+(_?0:v.crossAxis),T=i.reference[d]+i.reference[w]+(_?0:((b=o.offset)==null?void 0:b[d])||0)-(_?v.crossAxis:0);gT&&(g=T)}return{[h]:y,[d]:g}}}},FA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:c=()=>{},...l}=Sn(e,t),u=await ni(t,l),d=_n(s),h=bs(s),y=Hn(s)==="y",{width:g,height:p}=i.floating;let v,x;d==="top"||d==="bottom"?(v=d,x=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,v=h==="end"?"top":"bottom");const b=p-u.top-u.bottom,w=g-u.left-u.right,_=Wn(p-u[v],b),S=Wn(g-u[x],w),T=!t.middlewareData.shift;let A=_,R=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),T&&!h){const O=gt(u.left,0),I=gt(u.right,0),M=gt(u.top,0),U=gt(u.bottom,0);y?R=g-2*(O!==0||I!==0?O+I:gt(u.left,u.right)):A=p-2*(M!==0||U!==0?M+U:gt(u.top,u.bottom))}await c({...t,availableWidth:R,availableHeight:A});const N=await o.getDimensions(a.floating);return g!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function sa(){return typeof window<"u"}function ws(e){return my(e)?(e.nodeName||"").toLowerCase():"#document"}function bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dn(e){var t;return(t=(my(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function my(e){return sa()?e instanceof Node||e instanceof bt(e).Node:!1}function Bt(e){return sa()?e instanceof Element||e instanceof bt(e).Element:!1}function an(e){return sa()?e instanceof HTMLElement||e instanceof bt(e).HTMLElement:!1}function rh(e){return!sa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bt(e).ShadowRoot}function ji(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=$t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function VA(e){return["table","td","th"].includes(ws(e))}function ia(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gu(e){const t=yu(),n=Bt(e)?$t(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function BA(e){let t=qn(e);for(;an(t)&&!ls(t);){if(gu(t))return t;if(ia(t))return null;t=qn(t)}return null}function yu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ls(e){return["html","body","#document"].includes(ws(e))}function $t(e){return bt(e).getComputedStyle(e)}function oa(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rh(e)&&e.host||dn(e);return rh(t)?t.host:t}function gy(e){const t=qn(e);return ls(t)?e.ownerDocument?e.ownerDocument.body:e.body:an(t)&&ji(t)?t:gy(t)}function ri(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=gy(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=bt(s);if(i){const a=$c(o);return t.concat(o,o.visualViewport||[],ji(s)?s:[],a&&n?ri(a):[])}return t.concat(s,ri(s,[],n))}function $c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yy(e){const t=$t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=an(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Ao(n)!==i||Ao(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function vu(e){return Bt(e)?e:e.contextElement}function qr(e){const t=vu(e);if(!an(t))return sn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=yy(t);let o=(i?Ao(n.width):n.width)/r,a=(i?Ao(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const $A=sn(0);function vy(e){const t=bt(e);return!yu()||!t.visualViewport?$A:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==bt(e)?!1:t}function _r(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=vu(e);let o=sn(1);t&&(r?Bt(r)&&(o=qr(r)):o=qr(e));const a=UA(i,n,r)?vy(i):sn(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const h=bt(i),y=r&&Bt(r)?bt(r):r;let g=h,p=$c(g);for(;p&&r&&y!==g;){const v=qr(p),x=p.getBoundingClientRect(),b=$t(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,_=x.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,d*=v.y,c+=w,l+=_,g=bt(p),p=$c(g)}}return Po({width:u,height:d,x:c,y:l})}function xu(e,t){const n=oa(e).scrollLeft;return t?t.left+n:_r(dn(e)).left+n}function xy(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:xu(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function zA(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=dn(r),a=t?ia(t.floating):!1;if(r===o||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=sn(1);const u=sn(0),d=an(r);if((d||!d&&!i)&&((ws(r)!=="body"||ji(o))&&(c=oa(r)),an(r))){const y=_r(r);l=qr(r),u.x=y.x+r.clientLeft,u.y=y.y+r.clientTop}const h=o&&!d&&!i?xy(o,c,!0):sn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-c.scrollTop*l.y+u.y+h.y}}function WA(e){return Array.from(e.getClientRects())}function HA(e){const t=dn(e),n=oa(e),r=e.ownerDocument.body,s=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+xu(e);const a=-n.scrollTop;return $t(r).direction==="rtl"&&(o+=gt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function qA(e,t){const n=bt(e),r=dn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=yu();(!l||l&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function ZA(e,t){const n=_r(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=an(e)?qr(e):sn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,c=s*i.x,l=r*i.y;return{width:o,height:a,x:c,y:l}}function sh(e,t,n){let r;if(t==="viewport")r=qA(e,n);else if(t==="document")r=HA(dn(e));else if(Bt(t))r=ZA(t,n);else{const s=vy(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Po(r)}function by(e,t){const n=qn(e);return n===t||!Bt(n)||ls(n)?!1:$t(n).position==="fixed"||by(n,t)}function KA(e,t){const n=t.get(e);if(n)return n;let r=ri(e,[],!1).filter(a=>Bt(a)&&ws(a)!=="body"),s=null;const i=$t(e).position==="fixed";let o=i?qn(e):e;for(;Bt(o)&&!ls(o);){const a=$t(o),c=gu(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ji(o)&&!c&&by(e,o))?r=r.filter(u=>u!==o):s=a,o=qn(o)}return t.set(e,r),r}function GA(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?ia(t)?[]:KA(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((l,u)=>{const d=sh(t,u,s);return l.top=gt(d.top,l.top),l.right=Wn(d.right,l.right),l.bottom=Wn(d.bottom,l.bottom),l.left=gt(d.left,l.left),l},sh(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function QA(e){const{width:t,height:n}=yy(e);return{width:t,height:n}}function XA(e,t,n){const r=an(t),s=dn(t),i=n==="fixed",o=_r(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=sn(0);if(r||!r&&!i)if((ws(t)!=="body"||ji(s))&&(a=oa(t)),r){const h=_r(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else s&&(c.x=xu(s));const l=s&&!r&&!i?xy(s,a):sn(0),u=o.left+a.scrollLeft-c.x-l.x,d=o.top+a.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function Wa(e){return $t(e).position==="static"}function ih(e,t){if(!an(e)||$t(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dn(e)===n&&(n=n.ownerDocument.body),n}function wy(e,t){const n=bt(e);if(ia(e))return n;if(!an(e)){let s=qn(e);for(;s&&!ls(s);){if(Bt(s)&&!Wa(s))return s;s=qn(s)}return n}let r=ih(e,t);for(;r&&VA(r)&&Wa(r);)r=ih(r,t);return r&&ls(r)&&Wa(r)&&!gu(r)?n:r||BA(e)||n}const YA=async function(e){const t=this.getOffsetParent||wy,n=this.getDimensions,r=await n(e.floating);return{reference:XA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function JA(e){return $t(e).direction==="rtl"}const eR={convertOffsetParentRelativeRectToViewportRelativeRect:zA,getDocumentElement:dn,getClippingRect:GA,getOffsetParent:wy,getElementRects:YA,getClientRects:WA,getDimensions:QA,getScale:qr,isElement:Bt,isRTL:JA};function Sy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tR(e,t){let n=null,r;const s=dn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:h,height:y}=l;if(a||t(),!h||!y)return;const g=Yi(d),p=Yi(s.clientWidth-(u+h)),v=Yi(s.clientHeight-(d+y)),x=Yi(u),w={rootMargin:-g+"px "+-p+"px "+-v+"px "+-x+"px",threshold:gt(0,Wn(1,c))||1};let _=!0;function S(T){const A=T[0].intersectionRatio;if(A!==c){if(!_)return o();A?o(!1,A):r=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!Sy(l,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return o(!0),i}function nR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=vu(e),u=s||i?[...l?ri(l):[],...ri(t)]:[];u.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const d=l&&a?tR(l,n):null;let h=-1,y=null;o&&(y=new ResizeObserver(x=>{let[b]=x;b&&b.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),l&&!c&&y.observe(l),y.observe(t));let g,p=c?_r(e):null;c&&v();function v(){const x=_r(e);p&&!Sy(p,x)&&n(),p=x,g=requestAnimationFrame(v)}return n(),()=>{var x;u.forEach(b=>{s&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const rR=DA,sR=IA,iR=jA,oR=FA,aR=OA,oh=kA,cR=LA,lR=(e,t,n)=>{const r=new Map,s={platform:eR,...n},i={...s.platform,_c:r};return NA(e,t,{...s,platform:i})};var co=typeof document<"u"?m.useLayoutEffect:m.useEffect;function No(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!No(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!No(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function _y(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ah(e,t){const n=_y(e);return Math.round(t*n)/n}function Ha(e){const t=m.useRef(e);return co(()=>{t.current=e}),t}function uR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,y]=m.useState(r);No(h,r)||y(r);const[g,p]=m.useState(null),[v,x]=m.useState(null),b=m.useCallback(K=>{K!==T.current&&(T.current=K,p(K))},[]),w=m.useCallback(K=>{K!==A.current&&(A.current=K,x(K))},[]),_=i||g,S=o||v,T=m.useRef(null),A=m.useRef(null),R=m.useRef(u),N=c!=null,O=Ha(c),I=Ha(s),M=Ha(l),U=m.useCallback(()=>{if(!T.current||!A.current)return;const K={placement:t,strategy:n,middleware:h};I.current&&(K.platform=I.current),lR(T.current,A.current,K).then(se=>{const fe={...se,isPositioned:M.current!==!1};F.current&&!No(R.current,fe)&&(R.current=fe,ul.flushSync(()=>{d(fe)}))})},[h,t,n,I,M]);co(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(K=>({...K,isPositioned:!1})))},[l]);const F=m.useRef(!1);co(()=>(F.current=!0,()=>{F.current=!1}),[]),co(()=>{if(_&&(T.current=_),S&&(A.current=S),_&&S){if(O.current)return O.current(_,S,U);U()}},[_,S,U,O,N]);const X=m.useMemo(()=>({reference:T,floating:A,setReference:b,setFloating:w}),[b,w]),Y=m.useMemo(()=>({reference:_,floating:S}),[_,S]),Z=m.useMemo(()=>{const K={position:n,left:0,top:0};if(!Y.floating)return K;const se=ah(Y.floating,u.x),fe=ah(Y.floating,u.y);return a?{...K,transform:"translate("+se+"px, "+fe+"px)",..._y(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:fe}},[n,a,Y.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:U,refs:X,elements:Y,floatingStyles:Z}),[u,U,X,Y,Z])}const dR=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?oh({element:r.current,padding:s}).fn(n):{}:r?oh({element:r,padding:s}).fn(n):{}}}},fR=(e,t)=>({...rR(e),options:[e,t]}),hR=(e,t)=>({...sR(e),options:[e,t]}),pR=(e,t)=>({...cR(e),options:[e,t]}),mR=(e,t)=>({...iR(e),options:[e,t]}),gR=(e,t)=>({...oR(e),options:[e,t]}),yR=(e,t)=>({...aR(e),options:[e,t]}),vR=(e,t)=>({...dR(e),options:[e,t]});var xR="Arrow",Cy=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return f.jsx(lt.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cy.displayName=xR;var bR=Cy;function wR(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ch=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},SR=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{};function _R(e){const[t,n]=m.useState(void 0);return SR(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bu="Popper",[Ey,Ty]=ml(bu),[CR,Ay]=Ey(bu),Ry=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return f.jsx(CR,{scope:t,anchor:r,onAnchorChange:s,children:n})};Ry.displayName=bu;var Py="PopperAnchor",Ny=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=Ay(Py,n),o=m.useRef(null),a=zt(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:f.jsx(lt.div,{...s,ref:a})});Ny.displayName=Py;var wu="PopperContent",[ER,TR]=Ey(wu),ky=m.forwardRef((e,t)=>{var ue,ve,je,Fe,we,G;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:y="optimized",onPlaced:g,...p}=e,v=Ay(wu,n),[x,b]=m.useState(null),w=zt(t,he=>b(he)),[_,S]=m.useState(null),T=_R(_),A=(T==null?void 0:T.width)??0,R=(T==null?void 0:T.height)??0,N=r+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(l)?l:[l],M=I.length>0,U={padding:O,boundary:I.filter(RR),altBoundary:M},{refs:F,floatingStyles:X,placement:Y,isPositioned:Z,middlewareData:K}=uR({strategy:"fixed",placement:N,whileElementsMounted:(...he)=>nR(...he,{animationFrame:y==="always"}),elements:{reference:v.anchor},middleware:[fR({mainAxis:s+R,alignmentAxis:o}),c&&hR({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?pR():void 0,...U}),c&&mR({...U}),gR({...U,apply:({elements:he,rects:Ce,availableWidth:Ue,availableHeight:mt})=>{const{width:Et,height:C}=Ce.reference,P=he.floating.style;P.setProperty("--radix-popper-available-width",`${Ue}px`),P.setProperty("--radix-popper-available-height",`${mt}px`),P.setProperty("--radix-popper-anchor-width",`${Et}px`),P.setProperty("--radix-popper-anchor-height",`${C}px`)}}),_&&vR({element:_,padding:a}),PR({arrowWidth:A,arrowHeight:R}),h&&yR({strategy:"referenceHidden",...U})]}),[se,fe]=My(Y),ye=wR(g);ch(()=>{Z&&(ye==null||ye())},[Z,ye]);const Be=(ue=K.arrow)==null?void 0:ue.x,Ge=(ve=K.arrow)==null?void 0:ve.y,Qe=((je=K.arrow)==null?void 0:je.centerOffset)!==0,[jt,st]=m.useState();return ch(()=>{x&&st(window.getComputedStyle(x).zIndex)},[x]),f.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:jt,"--radix-popper-transform-origin":[(Fe=K.transformOrigin)==null?void 0:Fe.x,(we=K.transformOrigin)==null?void 0:we.y].join(" "),...((G=K.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(ER,{scope:n,placedSide:se,onArrowChange:S,arrowX:Be,arrowY:Ge,shouldHideArrow:Qe,children:f.jsx(lt.div,{"data-side":se,"data-align":fe,...p,ref:w,style:{...p.style,animation:Z?void 0:"none"}})})})});ky.displayName=wu;var jy="PopperArrow",AR={top:"bottom",right:"left",bottom:"top",left:"right"},Oy=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=TR(jy,r),o=AR[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(bR,{...s,ref:n,style:{...s.style,display:"block"}})})});Oy.displayName=jy;function RR(e){return e!==null}var PR=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:n,rects:r,middlewareData:s}=t,o=((v=s.arrow)==null?void 0:v.centerOffset)!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,u]=My(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((x=s.arrow)==null?void 0:x.x)??0)+a/2,y=(((b=s.arrow)==null?void 0:b.y)??0)+c/2;let g="",p="";return l==="bottom"?(g=o?d:`${h}px`,p=`${-c}px`):l==="top"?(g=o?d:`${h}px`,p=`${r.floating.height+c}px`):l==="right"?(g=`${-c}px`,p=o?d:`${y}px`):l==="left"&&(g=`${r.floating.width+c}px`,p=o?d:`${y}px`),{data:{x:g,y:p}}}});function My(e){const[t,n="center"]=e.split("-");return[t,n]}var NR=Ry,Dy=Ny,kR=ky,jR=Oy,Su="Popover",[Iy,yO]=ml(Su,[Ty]),Oi=Ty(),[OR,Yn]=Iy(Su),Ly=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=e,a=Oi(t),c=m.useRef(null),[l,u]=m.useState(!1),[d=!1,h]=fp({prop:r,defaultProp:s,onChange:i});return f.jsx(NR,{...a,children:f.jsx(OR,{scope:t,contentId:to(),triggerRef:c,open:d,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(y=>!y),[h]),hasCustomAnchor:l,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:o,children:n})})};Ly.displayName=Su;var Fy="PopoverAnchor",MR=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Yn(Fy,n),i=Oi(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return m.useEffect(()=>(o(),()=>a()),[o,a]),f.jsx(Dy,{...i,...r,ref:t})});MR.displayName=Fy;var Vy="PopoverTrigger",By=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Yn(Vy,n),i=Oi(n),o=zt(t,s.triggerRef),a=f.jsx(lt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Hy(s.open),...r,ref:o,onClick:vt(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?a:f.jsx(Dy,{asChild:!0,...i,children:a})});By.displayName=Vy;var _u="PopoverPortal",[DR,IR]=Iy(_u,{forceMount:void 0}),$y=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,i=Yn(_u,t);return f.jsx(DR,{scope:t,forceMount:n,children:f.jsx(gs,{present:n||i.open,children:f.jsx(vl,{asChild:!0,container:s,children:r})})})};$y.displayName=_u;var us="PopoverContent",Uy=m.forwardRef((e,t)=>{const n=IR(us,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,i=Yn(us,e.__scopePopover);return f.jsx(gs,{present:r||i.open,children:i.modal?f.jsx(LR,{...s,ref:t}):f.jsx(FR,{...s,ref:t})})});Uy.displayName=us;var LR=m.forwardRef((e,t)=>{const n=Yn(us,e.__scopePopover),r=m.useRef(null),s=zt(t,r),i=m.useRef(!1);return m.useEffect(()=>{const o=r.current;if(o)return Tp(o)},[]),f.jsx(xl,{as:ms,allowPinchZoom:!0,children:f.jsx(zy,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:vt(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:vt(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),FR=m.forwardRef((e,t)=>{const n=Yn(us,e.__scopePopover),r=m.useRef(!1),s=m.useRef(!1);return f.jsx(zy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),zy=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,h=Yn(us,n),y=Oi(n);return yp(),f.jsx(yl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:f.jsx(gl,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:f.jsx(kR,{"data-state":Hy(h.open),role:"dialog",id:h.contentId,...y,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Wy="PopoverClose",VR=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Yn(Wy,n);return f.jsx(lt.button,{type:"button",...r,ref:t,onClick:vt(e.onClick,()=>s.onOpenChange(!1))})});VR.displayName=Wy;var BR="PopoverArrow",$R=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Oi(n);return f.jsx(jR,{...s,...r,ref:t})});$R.displayName=BR;function Hy(e){return e?"open":"closed"}var UR=Ly,zR=By,WR=$y,qy=Uy;const Zy=UR,Ky=zR,Cu=m.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>f.jsx(WR,{children:f.jsx(qy,{ref:s,align:t,sideOffset:n,className:V("z-50 w-32 rounded-[2px] bg-white p-4 text-popover-foreground drop-shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Cu.displayName=qy.displayName;const HR=[{lang:Ze.RU},{lang:Ze.EN},{lang:Ze.TM}],lh={[Ze.RU]:"/ru.svg",[Ze.EN]:"/english.svg",[Ze.TM]:"/tm.svg"},qR={[Ze.RU]:"Ру",[Ze.EN]:"En",[Ze.TM]:"Tm"},ZR={[Ze.RU]:"Русский",[Ze.EN]:"English",[Ze.TM]:"Türkmen"},uh=({className:e,light:t=!1})=>{const n=_e(o=>o.lang),r=_e(o=>o.setLang),[s,i]=m.useState(!1);return f.jsxs(Zy,{open:s,onOpenChange:()=>i(!s),children:[f.jsxs(Ky,{className:V("flex text-white items-center gap-2",t?"text-white":"text-black",e),children:[f.jsx("img",{src:lh[n],alt:""}),qR[n],f.jsx("svg",{width:"20",height:"20",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:t?"#fff":"#000"})})]}),f.jsx(Cu,{className:"flex flex-col gap-6 w-fit relative z-[200] py-2 px-4 bg-surface_container",children:HR.filter(o=>o.lang!==n).map((o,a)=>f.jsxs("div",{onClick:()=>{r(o.lang),i(!1)},className:"flex gap-3 py-2 items-center cursor-pointer",children:[f.jsx("img",{src:lh[o.lang],alt:"flag"}),f.jsx("h5",{children:ZR[o.lang]})]},a))})]})},Gy=zp,Qy=Wp,KR=Hp,Xy=m.forwardRef(({className:e,...t},n)=>f.jsx(Ho,{ref:n,className:V("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Xy.displayName=Ho.displayName;const Eu=m.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(KR,{children:[f.jsx(Xy,{}),f.jsxs(qo,{ref:r,className:V("fixed left-[50%] top-[50%] z-50 grid 2xl:w-[40%] lg:w-1/2 w-[70%] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background md:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,f.jsxs(Cl,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[f.jsx(El,{className:"size-6"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Eu.displayName=qo.displayName;const GR=m.forwardRef(({className:e,...t},n)=>f.jsx(Zo,{ref:n,className:V("text-lg font-semibold leading-none tracking-tight",e),...t}));GR.displayName=Zo.displayName;const QR=m.forwardRef(({className:e,...t},n)=>f.jsx(Ko,{ref:n,className:V("text-sm text-muted-foreground",e),...t}));QR.displayName=Ko.displayName;const dh=(e,t,n)=>{if(e&&"reportValidity"in e){const r=$(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Yy=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?dh(r.ref,n,e):r.refs&&r.refs.forEach(s=>dh(s,n,e))}},XR=(e,t)=>{t.shouldUseNativeValidation&&Yy(e,t);const n={};for(const r in e){const s=$(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(YR(t.names||Object.keys(e),r)){const o=Object.assign({},$(n,r));xe(o,"root",i),xe(n,r,o)}else xe(n,r,i)}return n},YR=(e,t)=>e.some(n=>n.startsWith(t+"."));var JR=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=Qg(o,t,n,s,l?[].concat(l,r.message):r.message)}e.shift()}return n},eP=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return i.shouldUseNativeValidation&&Yy({},i),{errors:{},values:n.raw?r:l}})}catch(l){return a(l)}return c&&c.then?c.then(void 0,a):c}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:XR(JR(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},ge;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ge||(ge={}));var Uc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Uc||(Uc={}));const H=ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gn=e=>{switch(typeof e){case"undefined":return H.undefined;case"string":return H.string;case"number":return isNaN(e)?H.nan:H.number;case"boolean":return H.boolean;case"function":return H.function;case"bigint":return H.bigint;case"symbol":return H.symbol;case"object":return Array.isArray(e)?H.array:e===null?H.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?H.promise:typeof Map<"u"&&e instanceof Map?H.map:typeof Set<"u"&&e instanceof Set?H.set:typeof Date<"u"&&e instanceof Date?H.date:H.object;default:return H.unknown}},D=ge.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),tP=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class wt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;cn.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}wt.create=e=>new wt(e);const ds=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===H.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ge.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${ge.joinValues(e.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ge.joinValues(e.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${ge.joinValues(e.options)}, received '${e.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ge.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case D.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case D.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=t.defaultError,ge.assertNever(e)}return{message:n}};let Jy=ds;function nP(e){Jy=e}function ko(){return Jy}const jo=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)a=l(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},rP=[];function W(e,t){const n=ko(),r=jo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ds?void 0:ds].filter(s=>!!s)});e.common.issues.push(r)}class nt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return re;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return nt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return re;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const re=Object.freeze({status:"aborted"}),zr=e=>({status:"dirty",value:e}),ct=e=>({status:"valid",value:e}),zc=e=>e.status==="aborted",Wc=e=>e.status==="dirty",Cr=e=>e.status==="valid",si=e=>typeof Promise<"u"&&e instanceof Promise;function Oo(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ev(e,t,n,r,s){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Q||(Q={}));var Is,Ls;class cn{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fh=(e,t)=>{if(Cr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new wt(e.common.issues);return this._error=n,this._error}}};function oe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}},description:s}}class le{get description(){return this._def.description}_getType(t){return gn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:gn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new nt,ctx:{common:t.parent.common,data:t.data,parsedType:gn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(si(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gn(t)},i=this._parseSync({data:t,path:s.path,parent:s});return fh(s,i)}"~validate"(t){var n,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gn(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:s});return Cr(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(i=>Cr(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gn(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(si(s)?s:Promise.resolve(s));return fh(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:D.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Ut({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return on.create(this,this._def)}nullable(){return Qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ft.create(this)}promise(){return hs.create(this,this._def)}or(t){return ci.create([this,t],this._def)}and(t){return li.create(this,t,this._def)}transform(t){return new Ut({...oe(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new pi({...oe(this._def),innerType:this,defaultValue:n,typeName:ne.ZodDefault})}brand(){return new Tu({typeName:ne.ZodBranded,type:this,...oe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new mi({...oe(this._def),innerType:this,catchValue:n,typeName:ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mi.create(this,t)}readonly(){return gi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sP=/^c[^\s-]{8,}$/i,iP=/^[0-9a-z]+$/,oP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,aP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,cP=/^[a-z0-9_-]{21}$/i,lP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uP=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,dP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qa;const hP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,mP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,gP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tv="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xP=new RegExp(`^${tv}$`);function nv(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function bP(e){return new RegExp(`^${nv(e)}$`)}function rv(e){let t=`${tv}T${nv(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function wP(e,t){return!!((t==="v4"||!t)&&hP.test(e)||(t==="v6"||!t)&&mP.test(e))}function SP(e,t){if(!lP.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function _P(e,t){return!!((t==="v4"||!t)&&pP.test(e)||(t==="v6"||!t)&&gP.test(e))}class Lt extends le{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==H.string){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_type,expected:H.string,received:i.parsedType}),re}const r=new nt;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),W(s,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:n,code:D.invalid_string,...Q.errToObj(r)})}_addCheck(t){return new Lt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Q.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Q.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Q.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Q.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Q.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Q.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Q.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Q.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Q.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Q.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Q.errToObj(n)})}nonempty(t){return this.min(1,Q.errToObj(t))}trim(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Lt({checks:[],typeName:ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...oe(e)})};function CP(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class Zn extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==H.number){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_type,expected:H.number,received:i.parsedType}),re}let r;const s=new nt;for(const i of this._def.checks)i.kind==="int"?ge.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),W(r,{code:D.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?CP(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),W(r,{code:D.not_finite,message:i.message}),s.dirty()):ge.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Q.toString(n))}setLimit(t,n,r,s){return new Zn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Q.toString(s)}]})}_addCheck(t){return new Zn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Q.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&ge.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Zn({checks:[],typeName:ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...oe(e)});class Kn extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==H.bigint)return this._getInvalidInput(t);let r;const s=new nt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ge.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return W(n,{code:D.invalid_type,expected:H.bigint,received:n.parsedType}),re}gte(t,n){return this.setLimit("min",t,!0,Q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Q.toString(n))}setLimit(t,n,r,s){return new Kn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Q.toString(s)}]})}_addCheck(t){return new Kn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Q.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Kn({checks:[],typeName:ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...oe(e)})};class ii extends le{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==H.boolean){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.boolean,received:r.parsedType}),re}return ct(t.data)}}ii.create=e=>new ii({typeName:ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...oe(e)});class Er extends le{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==H.date){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_type,expected:H.date,received:i.parsedType}),re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_date}),re}const r=new nt;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),W(s,{code:D.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ge.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Er({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Q.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Q.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Er({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ne.ZodDate,...oe(e)});class Mo extends le{_parse(t){if(this._getType(t)!==H.symbol){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.symbol,received:r.parsedType}),re}return ct(t.data)}}Mo.create=e=>new Mo({typeName:ne.ZodSymbol,...oe(e)});class oi extends le{_parse(t){if(this._getType(t)!==H.undefined){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.undefined,received:r.parsedType}),re}return ct(t.data)}}oi.create=e=>new oi({typeName:ne.ZodUndefined,...oe(e)});class ai extends le{_parse(t){if(this._getType(t)!==H.null){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.null,received:r.parsedType}),re}return ct(t.data)}}ai.create=e=>new ai({typeName:ne.ZodNull,...oe(e)});class fs extends le{constructor(){super(...arguments),this._any=!0}_parse(t){return ct(t.data)}}fs.create=e=>new fs({typeName:ne.ZodAny,...oe(e)});class xr extends le{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ct(t.data)}}xr.create=e=>new xr({typeName:ne.ZodUnknown,...oe(e)});class Cn extends le{_parse(t){const n=this._getOrReturnCtx(t);return W(n,{code:D.invalid_type,expected:H.never,received:n.parsedType}),re}}Cn.create=e=>new Cn({typeName:ne.ZodNever,...oe(e)});class Do extends le{_parse(t){if(this._getType(t)!==H.undefined){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.void,received:r.parsedType}),re}return ct(t.data)}}Do.create=e=>new Do({typeName:ne.ZodVoid,...oe(e)});class Ft extends le{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==H.array)return W(n,{code:D.invalid_type,expected:H.array,received:n.parsedType}),re;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(W(n,{code:D.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new cn(n,o,n.path,a)))).then(o=>nt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new cn(n,o,n.path,a)));return nt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Ft({...this._def,minLength:{value:t,message:Q.toString(n)}})}max(t,n){return new Ft({...this._def,maxLength:{value:t,message:Q.toString(n)}})}length(t,n){return new Ft({...this._def,exactLength:{value:t,message:Q.toString(n)}})}nonempty(t){return this.min(1,t)}}Ft.create=(e,t)=>new Ft({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...oe(t)});function Lr(e){if(e instanceof Ae){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=on.create(Lr(r))}return new Ae({...e._def,shape:()=>t})}else return e instanceof Ft?new Ft({...e._def,type:Lr(e.element)}):e instanceof on?on.create(Lr(e.unwrap())):e instanceof Qn?Qn.create(Lr(e.unwrap())):e instanceof ln?ln.create(e.items.map(t=>Lr(t))):e}class Ae extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ge.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==H.object){const l=this._getOrReturnCtx(t);return W(l,{code:D.invalid_type,expected:H.object,received:l.parsedType}),re}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Cn&&this._def.unknownKeys==="strip"))for(const l in s.data)o.includes(l)||a.push(l);const c=[];for(const l of o){const u=i[l],d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new cn(s,d,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof Cn){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(l==="strict")a.length>0&&(W(s,{code:D.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new cn(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,h=await u.value;l.push({key:d,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>nt.mergeObjectSync(r,l)):nt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Q.errToObj,new Ae({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const c=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Q.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Ae({...this._def,unknownKeys:"strip"})}passthrough(){return new Ae({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ae({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ae({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ae({...this._def,catchall:t})}pick(t){const n={};return ge.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ae({...this._def,shape:()=>n})}omit(t){const n={};return ge.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ae({...this._def,shape:()=>n})}deepPartial(){return Lr(this)}partial(t){const n={};return ge.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Ae({...this._def,shape:()=>n})}required(t){const n={};return ge.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof on;)i=i._def.innerType;n[r]=i}}),new Ae({...this._def,shape:()=>n})}keyof(){return sv(ge.objectKeys(this.shape))}}Ae.create=(e,t)=>new Ae({shape:()=>e,unknownKeys:"strip",catchall:Cn.create(),typeName:ne.ZodObject,...oe(t)});Ae.strictCreate=(e,t)=>new Ae({shape:()=>e,unknownKeys:"strict",catchall:Cn.create(),typeName:ne.ZodObject,...oe(t)});Ae.lazycreate=(e,t)=>new Ae({shape:e,unknownKeys:"strip",catchall:Cn.create(),typeName:ne.ZodObject,...oe(t)});class ci extends le{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new wt(a.ctx.common.issues));return W(n,{code:D.invalid_union,unionErrors:o}),re}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(c=>new wt(c));return W(n,{code:D.invalid_union,unionErrors:a}),re}}get options(){return this._def.options}}ci.create=(e,t)=>new ci({options:e,typeName:ne.ZodUnion,...oe(t)});const mn=e=>e instanceof di?mn(e.schema):e instanceof Ut?mn(e.innerType()):e instanceof fi?[e.value]:e instanceof Gn?e.options:e instanceof hi?ge.objectValues(e.enum):e instanceof pi?mn(e._def.innerType):e instanceof oi?[void 0]:e instanceof ai?[null]:e instanceof on?[void 0,...mn(e.unwrap())]:e instanceof Qn?[null,...mn(e.unwrap())]:e instanceof Tu||e instanceof gi?mn(e.unwrap()):e instanceof mi?mn(e._def.innerType):[];class aa extends le{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==H.object)return W(n,{code:D.invalid_type,expected:H.object,received:n.parsedType}),re;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(W(n,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=mn(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new aa({typeName:ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...oe(r)})}}function Hc(e,t){const n=gn(e),r=gn(t);if(e===t)return{valid:!0,data:e};if(n===H.object&&r===H.object){const s=ge.objectKeys(t),i=ge.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const c=Hc(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===H.array&&r===H.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(zc(i)||zc(o))return re;const a=Hc(i.value,o.value);return a.valid?((Wc(i)||Wc(o))&&n.dirty(),{status:n.value,value:a.data}):(W(r,{code:D.invalid_intersection_types}),re)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}li.create=(e,t,n)=>new li({left:e,right:t,typeName:ne.ZodIntersection,...oe(n)});class ln extends le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.array)return W(r,{code:D.invalid_type,expected:H.array,received:r.parsedType}),re;if(r.data.lengththis._def.items.length&&(W(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new cn(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>nt.mergeArray(n,o)):nt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ln({...this._def,rest:t})}}ln.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ln({items:e,typeName:ne.ZodTuple,rest:null,...oe(t)})};class ui extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.object)return W(r,{code:D.invalid_type,expected:H.object,received:r.parsedType}),re;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new cn(r,a,r.path,a)),value:o._parse(new cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?nt.mergeObjectAsync(n,s):nt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof le?new ui({keyType:t,valueType:n,typeName:ne.ZodRecord,...oe(r)}):new ui({keyType:Lt.create(),valueType:t,typeName:ne.ZodRecord,...oe(n)})}}class Io extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.map)return W(r,{code:D.invalid_type,expected:H.map,received:r.parsedType}),re;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,c],l)=>({key:s._parse(new cn(r,a,r.path,[l,"key"])),value:i._parse(new cn(r,c,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}}Io.create=(e,t,n)=>new Io({valueType:t,keyType:e,typeName:ne.ZodMap,...oe(n)});class Tr extends le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.set)return W(r,{code:D.invalid_type,expected:H.set,received:r.parsedType}),re;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(W(r,{code:D.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return re;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((c,l)=>i._parse(new cn(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new Tr({...this._def,minSize:{value:t,message:Q.toString(n)}})}max(t,n){return new Tr({...this._def,maxSize:{value:t,message:Q.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Tr.create=(e,t)=>new Tr({valueType:e,minSize:null,maxSize:null,typeName:ne.ZodSet,...oe(t)});class Zr extends le{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==H.function)return W(n,{code:D.invalid_type,expected:H.function,received:n.parsedType}),re;function r(a,c){return jo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ko(),ds].filter(l=>!!l),issueData:{code:D.invalid_arguments,argumentsError:c}})}function s(a,c){return jo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ko(),ds].filter(l=>!!l),issueData:{code:D.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof hs){const a=this;return ct(async function(...c){const l=new wt([]),u=await a._def.args.parseAsync(c,i).catch(y=>{throw l.addIssue(r(c,y)),l}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(y=>{throw l.addIssue(s(d,y)),l})})}else{const a=this;return ct(function(...c){const l=a._def.args.safeParse(c,i);if(!l.success)throw new wt([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new wt([s(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Zr({...this._def,args:ln.create(t).rest(xr.create())})}returns(t){return new Zr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zr({args:t||ln.create([]).rest(xr.create()),returns:n||xr.create(),typeName:ne.ZodFunction,...oe(r)})}}class di extends le{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}di.create=(e,t)=>new di({getter:e,typeName:ne.ZodLazy,...oe(t)});class fi extends le{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return W(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),re}return{status:"valid",value:t.data}}get value(){return this._def.value}}fi.create=(e,t)=>new fi({value:e,typeName:ne.ZodLiteral,...oe(t)});function sv(e,t){return new Gn({values:e,typeName:ne.ZodEnum,...oe(t)})}class Gn extends le{constructor(){super(...arguments),Is.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return W(n,{expected:ge.joinValues(r),received:n.parsedType,code:D.invalid_type}),re}if(Oo(this,Is)||ev(this,Is,new Set(this._def.values)),!Oo(this,Is).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return W(n,{received:n.data,code:D.invalid_enum_value,options:r}),re}return ct(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Gn.create(t,{...this._def,...n})}exclude(t,n=this._def){return Gn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Is=new WeakMap;Gn.create=sv;class hi extends le{constructor(){super(...arguments),Ls.set(this,void 0)}_parse(t){const n=ge.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==H.string&&r.parsedType!==H.number){const s=ge.objectValues(n);return W(r,{expected:ge.joinValues(s),received:r.parsedType,code:D.invalid_type}),re}if(Oo(this,Ls)||ev(this,Ls,new Set(ge.getValidEnumValues(this._def.values))),!Oo(this,Ls).has(t.data)){const s=ge.objectValues(n);return W(r,{received:r.data,code:D.invalid_enum_value,options:s}),re}return ct(t.data)}get enum(){return this._def.values}}Ls=new WeakMap;hi.create=(e,t)=>new hi({values:e,typeName:ne.ZodNativeEnum,...oe(t)});class hs extends le{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==H.promise&&n.common.async===!1)return W(n,{code:D.invalid_type,expected:H.promise,received:n.parsedType}),re;const r=n.parsedType===H.promise?n.data:Promise.resolve(n.data);return ct(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hs.create=(e,t)=>new hs({type:e,typeName:ne.ZodPromise,...oe(t)});class Ut extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{W(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return re;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?re:c.status==="dirty"||n.value==="dirty"?zr(c.value):c});{if(n.value==="aborted")return re;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?re:a.status==="dirty"||n.value==="dirty"?zr(a.value):a}}if(s.type==="refinement"){const o=a=>{const c=s.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?re:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?re:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Cr(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Cr(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);ge.assertNever(s)}}Ut.create=(e,t,n)=>new Ut({schema:e,typeName:ne.ZodEffects,effect:t,...oe(n)});Ut.createWithPreprocess=(e,t,n)=>new Ut({schema:t,effect:{type:"preprocess",transform:e},typeName:ne.ZodEffects,...oe(n)});class on extends le{_parse(t){return this._getType(t)===H.undefined?ct(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}on.create=(e,t)=>new on({innerType:e,typeName:ne.ZodOptional,...oe(t)});class Qn extends le{_parse(t){return this._getType(t)===H.null?ct(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qn.create=(e,t)=>new Qn({innerType:e,typeName:ne.ZodNullable,...oe(t)});class pi extends le{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===H.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pi.create=(e,t)=>new pi({innerType:e,typeName:ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...oe(t)});class mi extends le{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return si(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new wt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mi.create=(e,t)=>new mi({innerType:e,typeName:ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...oe(t)});class Lo extends le{_parse(t){if(this._getType(t)!==H.nan){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.nan,received:r.parsedType}),re}return{status:"valid",value:t.data}}}Lo.create=e=>new Lo({typeName:ne.ZodNaN,...oe(e)});const EP=Symbol("zod_brand");class Tu extends le{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mi extends le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?re:i.status==="dirty"?(n.dirty(),zr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?re:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Mi({in:t,out:n,typeName:ne.ZodPipeline})}}class gi extends le{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Cr(s)&&(s.value=Object.freeze(s.value)),s);return si(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:ne.ZodReadonly,...oe(t)});function iv(e,t={},n){return e?fs.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...l,fatal:c})}}):fs.create()}const TP={object:Ae.lazycreate};var ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ne||(ne={}));const AP=(e,t={message:`Input not instance of ${e.name}`})=>iv(n=>n instanceof e,t),ov=Lt.create,av=Zn.create,RP=Lo.create,PP=Kn.create,cv=ii.create,NP=Er.create,kP=Mo.create,jP=oi.create,OP=ai.create,MP=fs.create,DP=xr.create,IP=Cn.create,LP=Do.create,FP=Ft.create,VP=Ae.create,BP=Ae.strictCreate,$P=ci.create,UP=aa.create,zP=li.create,WP=ln.create,HP=ui.create,qP=Io.create,ZP=Tr.create,KP=Zr.create,GP=di.create,QP=fi.create,XP=Gn.create,YP=hi.create,JP=hs.create,hh=Ut.create,eN=on.create,tN=Qn.create,nN=Ut.createWithPreprocess,rN=Mi.create,sN=()=>ov().optional(),iN=()=>av().optional(),oN=()=>cv().optional(),aN={string:e=>Lt.create({...e,coerce:!0}),number:e=>Zn.create({...e,coerce:!0}),boolean:e=>ii.create({...e,coerce:!0}),bigint:e=>Kn.create({...e,coerce:!0}),date:e=>Er.create({...e,coerce:!0})},cN=re;var ph=Object.freeze({__proto__:null,defaultErrorMap:ds,setErrorMap:nP,getErrorMap:ko,makeIssue:jo,EMPTY_PATH:rP,addIssueToContext:W,ParseStatus:nt,INVALID:re,DIRTY:zr,OK:ct,isAborted:zc,isDirty:Wc,isValid:Cr,isAsync:si,get util(){return ge},get objectUtil(){return Uc},ZodParsedType:H,getParsedType:gn,ZodType:le,datetimeRegex:rv,ZodString:Lt,ZodNumber:Zn,ZodBigInt:Kn,ZodBoolean:ii,ZodDate:Er,ZodSymbol:Mo,ZodUndefined:oi,ZodNull:ai,ZodAny:fs,ZodUnknown:xr,ZodNever:Cn,ZodVoid:Do,ZodArray:Ft,ZodObject:Ae,ZodUnion:ci,ZodDiscriminatedUnion:aa,ZodIntersection:li,ZodTuple:ln,ZodRecord:ui,ZodMap:Io,ZodSet:Tr,ZodFunction:Zr,ZodLazy:di,ZodLiteral:fi,ZodEnum:Gn,ZodNativeEnum:hi,ZodPromise:hs,ZodEffects:Ut,ZodTransformer:Ut,ZodOptional:on,ZodNullable:Qn,ZodDefault:pi,ZodCatch:mi,ZodNaN:Lo,BRAND:EP,ZodBranded:Tu,ZodPipeline:Mi,ZodReadonly:gi,custom:iv,Schema:le,ZodSchema:le,late:TP,get ZodFirstPartyTypeKind(){return ne},coerce:aN,any:MP,array:FP,bigint:PP,boolean:cv,date:NP,discriminatedUnion:UP,effect:hh,enum:XP,function:KP,instanceof:AP,intersection:zP,lazy:GP,literal:QP,map:qP,nan:RP,nativeEnum:YP,never:IP,null:OP,nullable:tN,number:av,object:VP,oboolean:oN,onumber:iN,optional:eN,ostring:sN,pipeline:rN,preprocess:nN,promise:JP,record:HP,set:ZP,strictObject:BP,string:ov,symbol:kP,transformer:hh,tuple:WP,undefined:jP,union:$P,unknown:DP,void:LP,NEVER:cN,ZodIssueCode:D,quotelessJson:tP,ZodError:wt});const Za=(e,t,n)=>{const r=_e(s=>s.lang);return r==="ru"?e:r==="tm"?n??t:t};function lv(e,t){return function(){return e.apply(t,arguments)}}const{toString:lN}=Object.prototype,{getPrototypeOf:Au}=Object,ca=(e=>t=>{const n=lN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=e=>(e=e.toLowerCase(),t=>ca(t)===e),la=e=>t=>typeof t===e,{isArray:Ss}=Array,yi=la("undefined");function uN(e){return e!==null&&!yi(e)&&e.constructor!==null&&!yi(e.constructor)&&St(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const uv=Ht("ArrayBuffer");function dN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&uv(e.buffer),t}const fN=la("string"),St=la("function"),dv=la("number"),ua=e=>e!==null&&typeof e=="object",hN=e=>e===!0||e===!1,lo=e=>{if(ca(e)!=="object")return!1;const t=Au(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},pN=Ht("Date"),mN=Ht("File"),gN=Ht("Blob"),yN=Ht("FileList"),vN=e=>ua(e)&&St(e.pipe),xN=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||St(e.append)&&((t=ca(e))==="formdata"||t==="object"&&St(e.toString)&&e.toString()==="[object FormData]"))},bN=Ht("URLSearchParams"),[wN,SN,_N,CN]=["ReadableStream","Request","Response","Headers"].map(Ht),EN=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Di(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Ss(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hv=e=>!yi(e)&&e!==ar;function qc(){const{caseless:e}=hv(this)&&this||{},t={},n=(r,s)=>{const i=e&&fv(t,s)||s;lo(t[i])&&lo(r)?t[i]=qc(t[i],r):lo(r)?t[i]=qc({},r):Ss(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r(Di(t,(s,i)=>{n&&St(s)?e[i]=lv(s,n):e[i]=s},{allOwnKeys:r}),e),AN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RN=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},PN=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Au(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},NN=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kN=e=>{if(!e)return null;if(Ss(e))return e;let t=e.length;if(!dv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jN=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Au(Uint8Array)),ON=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},MN=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DN=Ht("HTMLFormElement"),IN=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),mh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),LN=Ht("RegExp"),pv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Di(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},FN=e=>{pv(e,(t,n)=>{if(St(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(St(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},VN=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Ss(e)?r(e):r(String(e).split(t)),n},BN=()=>{},$N=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ka="abcdefghijklmnopqrstuvwxyz",gh="0123456789",mv={DIGIT:gh,ALPHA:Ka,ALPHA_DIGIT:Ka+Ka.toUpperCase()+gh},UN=(e=16,t=mv.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function zN(e){return!!(e&&St(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const WN=e=>{const t=new Array(10),n=(r,s)=>{if(ua(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Ss(r)?[]:{};return Di(r,(o,a)=>{const c=n(o,s+1);!yi(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return n(e,0)},HN=Ht("AsyncFunction"),qN=e=>e&&(ua(e)||St(e))&&St(e.then)&&St(e.catch),gv=((e,t)=>e?setImmediate:t?((n,r)=>(ar.addEventListener("message",({source:s,data:i})=>{s===ar&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ar.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",St(ar.postMessage)),ZN=typeof queueMicrotask<"u"?queueMicrotask.bind(ar):typeof process<"u"&&process.nextTick||gv,k={isArray:Ss,isArrayBuffer:uv,isBuffer:uN,isFormData:xN,isArrayBufferView:dN,isString:fN,isNumber:dv,isBoolean:hN,isObject:ua,isPlainObject:lo,isReadableStream:wN,isRequest:SN,isResponse:_N,isHeaders:CN,isUndefined:yi,isDate:pN,isFile:mN,isBlob:gN,isRegExp:LN,isFunction:St,isStream:vN,isURLSearchParams:bN,isTypedArray:jN,isFileList:yN,forEach:Di,merge:qc,extend:TN,trim:EN,stripBOM:AN,inherits:RN,toFlatObject:PN,kindOf:ca,kindOfTest:Ht,endsWith:NN,toArray:kN,forEachEntry:ON,matchAll:MN,isHTMLForm:DN,hasOwnProperty:mh,hasOwnProp:mh,reduceDescriptors:pv,freezeMethods:FN,toObjectSet:VN,toCamelCase:IN,noop:BN,toFiniteNumber:$N,findKey:fv,global:ar,isContextDefined:hv,ALPHABET:mv,generateString:UN,isSpecCompliantForm:zN,toJSONObject:WN,isAsyncFn:HN,isThenable:qN,setImmediate:gv,asap:ZN};function ie(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}k.inherits(ie,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const yv=ie.prototype,vv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vv[e]={value:e}});Object.defineProperties(ie,vv);Object.defineProperty(yv,"isAxiosError",{value:!0});ie.from=(e,t,n,r,s,i)=>{const o=Object.create(yv);return k.toFlatObject(e,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),ie.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const KN=null;function Zc(e){return k.isPlainObject(e)||k.isArray(e)}function xv(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function yh(e,t,n){return e?e.concat(t).map(function(s,i){return s=xv(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function GN(e){return k.isArray(e)&&!e.some(Zc)}const QN=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function da(e,t,n){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!k.isUndefined(v[p])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(k.isDate(g))return g.toISOString();if(!c&&k.isBlob(g))throw new ie("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(g)||k.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,v){let x=g;if(g&&!v&&typeof g=="object"){if(k.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(k.isArray(g)&&GN(g)||(k.isFileList(g)||k.endsWith(p,"[]"))&&(x=k.toArray(g)))return p=xv(p),x.forEach(function(w,_){!(k.isUndefined(w)||w===null)&&t.append(o===!0?yh([p],_,i):o===null?p:p+"[]",l(w))}),!1}return Zc(g)?!0:(t.append(yh(v,p,i),l(g)),!1)}const d=[],h=Object.assign(QN,{defaultVisitor:u,convertValue:l,isVisitable:Zc});function y(g,p){if(!k.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(g),k.forEach(g,function(x,b){(!(k.isUndefined(x)||x===null)&&s.call(t,x,k.isString(b)?b.trim():b,p,h))===!0&&y(x,p?p.concat(b):[b])}),d.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return y(e),t}function vh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ru(e,t){this._pairs=[],e&&da(e,this,t)}const bv=Ru.prototype;bv.append=function(t,n){this._pairs.push([t,n])};bv.toString=function(t){const n=t?function(r){return t.call(this,r,vh)}:vh;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function XN(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wv(e,t,n){if(!t)return e;const r=n&&n.encode||XN;k.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=k.isURLSearchParams(t)?t.toString():new Ru(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class xh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YN=typeof URLSearchParams<"u"?URLSearchParams:Ru,JN=typeof FormData<"u"?FormData:null,ek=typeof Blob<"u"?Blob:null,tk={isBrowser:!0,classes:{URLSearchParams:YN,FormData:JN,Blob:ek},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Kc=typeof navigator=="object"&&navigator||void 0,nk=Pu&&(!Kc||["ReactNative","NativeScript","NS"].indexOf(Kc.product)<0),rk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sk=Pu&&window.location.href||"http://localhost",ik=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:nk,hasStandardBrowserWebWorkerEnv:rk,navigator:Kc,origin:sk},Symbol.toStringTag,{value:"Module"})),Je={...ik,...tk};function ok(e,t){return da(e,new Je.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Je.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function ak(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ck(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&k.isArray(s)?s.length:o,c?(k.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!k.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&k.isArray(s[o])&&(s[o]=ck(s[o])),!a)}if(k.isFormData(e)&&k.isFunction(e.entries)){const n={};return k.forEachEntry(e,(r,s)=>{t(ak(r),s,n,0)}),n}return null}function lk(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ii={transitional:Sv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=k.isObject(t);if(i&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return s?JSON.stringify(_v(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ok(t,this.formSerializer).toString();if((a=k.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return da(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),lk(t)):t}],transformResponse:[function(t){const n=this.transitional||Ii.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?ie.from(a,ie.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],e=>{Ii.headers[e]={}});const uk=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dk=e=>{const t={};let n,r,s;return e&&e.split(` + `),()=>{document.head.removeChild(y)}},[t]),f.jsx(mS,{isPresent:t,childRef:s,sizeRef:i,children:m.cloneElement(e,{ref:s})})}const yS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a})=>{const c=Rl(vS),l=m.useId(),u=m.useCallback(h=>{c.set(h,!0);for(const y of c.values())if(!y)return;r&&r()},[c,r]),d=m.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:h=>(c.set(h,!1),()=>c.delete(h))}),i?[Math.random(),u]:[n,u]);return m.useMemo(()=>{c.forEach((h,y)=>c.set(y,!1))},[n]),m.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),o==="popLayout"&&(e=f.jsx(gS,{isPresent:n,anchorX:a,children:e})),f.jsx(Qo.Provider,{value:d,children:e})};function vS(){return new Map}function dm(e=!0){const t=m.useContext(Qo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{e&&s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Ki=e=>e.key||"";function Td(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Nl=typeof window<"u",fm=Nl?m.useLayoutEffect:m.useEffect,dO=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left"})=>{const[c,l]=dm(o),u=m.useMemo(()=>Td(e),[e]),d=o&&!c?[]:u.map(Ki),h=m.useRef(!0),y=m.useRef(u),g=Rl(()=>new Map),[p,v]=m.useState(u),[x,b]=m.useState(u);fm(()=>{h.current=!1,y.current=u;for(let S=0;S{const T=Ki(S),A=o&&!c?!1:u===x||d.includes(T),R=()=>{if(g.has(T))g.set(T,!0);else return;let N=!0;g.forEach(O=>{O||(N=!1)}),N&&(_==null||_(),b(y.current),o&&(l==null||l()),r&&r())};return f.jsx(yS,{isPresent:A,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,onExitComplete:A?void 0:R,anchorX:a,children:S},T)})})},xt=e=>e;let hm=xt;const xS={useManualTiming:!1},Gi=["read","resolveKeyframes","update","preRender","render","postRender"],Ad={value:null};function bS(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function l(d){o.has(d)&&(u.schedule(d),e()),c++,d(a)}const u={schedule:(d,h=!1,y=!1)=>{const p=y&&s?n:r;return h&&o.add(d),p.has(d)||p.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(l),t&&Ad.value&&Ad.value.frameloop[t].push(c),c=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const wS=40;function pm(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Gi.reduce((x,b)=>(x[b]=bS(i,t?b:void 0),x),{}),{read:a,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:h}=o,y=()=>{const x=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(x-s.timestamp,wS),1),s.timestamp=x,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),d.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},g=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:Gi.reduce((x,b)=>{const w=o[b];return x[b]=(_,S=!1,T=!1)=>(n||g(),w.schedule(_,S,T)),x},{}),cancel:x=>{for(let b=0;bRd[e].some(n=>!!t[n])};function SS(e){for(const t in e)os[t]={...os[t],...e[t]}}const _S=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function go(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_S.has(e)}let gm=e=>!go(e);function CS(e){e&&(gm=t=>t.startsWith("on")?!go(t):e(t))}try{CS(require("@emotion/is-prop-valid").default)}catch{}function ES(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(gm(s)||n===!0&&go(s)||!t&&!go(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function TS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Xo=m.createContext({});function Yo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gs(e){return typeof e=="string"||Array.isArray(e)}const kl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jl=["initial",...kl];function Jo(e){return Yo(e.animate)||jl.some(t=>Gs(e[t]))}function ym(e){return!!(Jo(e)||e.variants)}function AS(e,t){if(Jo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gs(n)?n:void 0,animate:Gs(r)?r:void 0}}return e.inherit!==!1?t:{}}function RS(e){const{initial:t,animate:n}=AS(e,m.useContext(Xo));return m.useMemo(()=>({initial:t,animate:n}),[Pd(t),Pd(n)])}function Pd(e){return Array.isArray(e)?e.join(" "):e}const PS=Symbol.for("motionComponentSymbol");function Fr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function NS(e,t,n){return m.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Fr(n)&&(n.current=r))},[t])}const Ol=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),kS="framerAppearId",vm="data-"+Ol(kS),{schedule:Ml}=pm(queueMicrotask,!1),xm=m.createContext({});function jS(e,t,n,r,s){var i,o;const{visualElement:a}=m.useContext(Xo),c=m.useContext(mm),l=m.useContext(Qo),u=m.useContext(Pl).reducedMotion,d=m.useRef(null);r=r||c.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,y=m.useContext(xm);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&OS(d.current,n,s,y);const g=m.useRef(!1);m.useInsertionEffect(()=>{h&&g.current&&h.update(n,l)});const p=n[vm],v=m.useRef(!!p&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,p))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,p)));return fm(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Ml.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),m.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,p)}),v.current=!1))}),h}function OS(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bm(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Fr(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function bm(e){if(e)return e.options.allowProjection!==!1?e.projection:bm(e.parent)}function MS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&SS(e);function a(l,u){let d;const h={...m.useContext(Pl),...l,layoutId:DS(l)},{isStatic:y}=h,g=RS(l),p=r(l,y);if(!y&&Nl){IS();const v=LS(h);d=v.MeasureLayout,g.visualElement=jS(s,p,h,t,v.ProjectionNode)}return f.jsxs(Xo.Provider,{value:g,children:[d&&g.visualElement?f.jsx(d,{visualElement:g.visualElement,...h}):null,n(s,l,NS(p,g.visualElement,u),p,y,g.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const c=m.forwardRef(a);return c[PS]=s,c}function DS({layoutId:e}){const t=m.useContext(Al).id;return t&&e!==void 0?t+"-"+e:e}function IS(e,t){m.useContext(mm).strict}function LS(e){const{drag:t,layout:n}=os;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const wm=e=>t=>typeof t=="string"&&t.startsWith(e),Dl=wm("--"),FS=wm("var(--"),Il=e=>FS(e)?VS.test(e.split("/*")[0].trim()):!1,VS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qs={};function BS(e){for(const t in e)Qs[t]=e[t],Dl(t)&&(Qs[t].isCSSVariable=!0)}const vs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kr=new Set(vs);function Sm(e,{layout:t,layoutId:n}){return kr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qs[e]||e==="opacity")}const et=e=>!!(e&&e.getVelocity),_m=(e,t)=>t&&typeof e=="number"?t.transform(e):e,wn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Xs={...xs,transform:e=>wn(0,1,e)},Qi={...xs,default:1},Ai=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kn=Ai("deg"),nn=Ai("%"),te=Ai("px"),$S=Ai("vh"),US=Ai("vw"),Nd={...nn,parse:e=>nn.parse(e)/100,transform:e=>nn.transform(e*100)},zS={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,radius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,backgroundPositionX:te,backgroundPositionY:te},WS={rotate:kn,rotateX:kn,rotateY:kn,rotateZ:kn,scale:Qi,scaleX:Qi,scaleY:Qi,scaleZ:Qi,skew:kn,skewX:kn,skewY:kn,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:Xs,originX:Nd,originY:Nd,originZ:te},kd={...xs,transform:Math.round},Ll={...zS,...WS,zIndex:kd,size:te,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:kd},HS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qS=vs.length;function ZS(e,t,n){let r="",s=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}});function Cm(e,t,n){for(const r in t)!et(t[r])&&!Sm(r,n)&&(e[r]=t[r])}function KS({transformTemplate:e},t){return m.useMemo(()=>{const n=Vl();return Fl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function GS(e,t){const n=e.style||{},r={};return Cm(r,n,e),Object.assign(r,KS(e,t)),r}function QS(e,t){const n={},r=GS(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const XS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bl(e){return typeof e!="string"||e.includes("-")?!1:!!(XS.indexOf(e)>-1||/[A-Z]/u.test(e))}const YS={offset:"stroke-dashoffset",array:"stroke-dasharray"},JS={offset:"strokeDashoffset",array:"strokeDasharray"};function e_(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?YS:JS;e[i.offset]=te.transform(-r);const o=te.transform(t),a=te.transform(n);e[i.array]=`${o} ${a}`}function jd(e,t,n){return typeof e=="string"?e:te.transform(t+n*e)}function t_(e,t,n){const r=jd(t,e.x,e.width),s=jd(n,e.y,e.height);return`${r} ${s}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...l},u,d){if(Fl(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:g}=e;h.transform&&(g&&(y.transform=h.transform),delete h.transform),g&&(s!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=t_(g,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&e_(h,o,a,c,!1)}const Em=()=>({...Vl(),attrs:{}}),Ul=e=>typeof e=="string"&&e.toLowerCase()==="svg";function n_(e,t,n,r){const s=m.useMemo(()=>{const i=Em();return $l(i,t,Ul(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cm(i,e.style,e),s.style={...i,...s.style}}return s}function r_(e=!1){return(n,r,s,{latestValues:i},o)=>{const c=(Bl(n)?n_:QS)(r,i,o,n),l=ES(r,typeof n=="string",e),u=n!==m.Fragment?{...l,...c,ref:s}:{},{children:d}=r,h=m.useMemo(()=>et(d)?d.get():d,[d]);return m.createElement(n,{...u,children:h})}}function Od(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function zl(e,t,n,r){if(typeof t=="function"){const[s,i]=Od(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Od(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const bc=e=>Array.isArray(e),s_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),i_=e=>bc(e)?e[e.length-1]||0:e;function so(e){const t=et(e)?e.get():e;return s_(t)?t.toValue():t}function o_({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:a_(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Tm=e=>(t,n)=>{const r=m.useContext(Xo),s=m.useContext(Qo),i=()=>o_(e,t,r,s);return n?i():Rl(i)};function a_(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=so(i[h]);let{initial:o,animate:a}=e;const c=Jo(e),l=ym(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Yo(d)){const h=Array.isArray(d)?d:[d];for(let y=0;y{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(kr.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a{Am(n,r),Ee.render(()=>{$l(r,s,Ul(n.tagName),e.transformTemplate),Nm(n,r)})})}})};function u_(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...Bl(r)?l_:c_,preloadedFeatures:e,useRender:r_(s),createVisualElement:t,Component:r};return MS(o)}}function Ys(e,t,n){const r=e.getProps();return zl(r,t,n!==void 0?n:r.custom,e)}function Hl(e,t){return e?e[t]||e.default||e:void 0}const jm=new Set(["width","height","top","left","right","bottom",...vs]);let io;function d_(){io=void 0}const rn={now:()=>(io===void 0&&rn.set(He.isProcessing||xS.useManualTiming?He.timestamp:performance.now()),io),set:e=>{io=e,queueMicrotask(d_)}};function ql(e,t){e.indexOf(t)===-1&&e.push(t)}function Zl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kl{constructor(){this.subscriptions=[]}add(t){return ql(this.subscriptions,t),()=>Zl(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class h_{constructor(t,n={}){this.version="12.4.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=rn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=rn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=f_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kl);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ee.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=rn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dd);return Om(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Js(e,t){return new h_(e,t)}function p_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Js(n))}function m_(e,t){const n=Ys(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=i_(i[o]);p_(e,o,a)}}function g_(e){return!!(et(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if(g_(n))return n.add(t)}function Mm(e){return e.props[vm]}function Gl(e){let t;return()=>(t===void 0&&(t=e()),t)}const y_=Gl(()=>window.ScrollTimeline!==void 0);class v_{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(y_()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class x_ extends v_{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const xn=e=>e*1e3,bn=e=>e/1e3;function Ql(e){return typeof e=="function"}function Id(e,t){e.timeline=t,e.onfinish=null}const Xl=e=>Array.isArray(e)&&typeof e[0]=="number",b_={linearEasing:void 0};function w_(e,t){const n=Gl(e);return()=>{var r;return(r=b_[t])!==null&&r!==void 0?r:n()}}const yo=w_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),as=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Dm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Sc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ms([0,.65,.55,1]),circOut:Ms([.55,0,1,.45]),backIn:Ms([.31,.01,.66,-.59]),backOut:Ms([.33,1.53,.69,.99])};function Lm(e,t){if(e)return typeof e=="function"&&yo()?Dm(e,t):Xl(e)?Ms(e):Array.isArray(e)?e.map(n=>Lm(n,t)||Sc.easeOut):Sc[e]}const Fm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,S_=1e-7,__=12;function C_(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Fm(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>S_&&++a<__);return o}function Ri(e,t,n,r){if(e===t&&n===r)return xt;const s=i=>C_(i,0,1,e,n);return i=>i===0||i===1?i:Fm(s(i),t,r)}const Vm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),$m=Ri(.33,1.53,.69,.99),Yl=Bm($m),Um=Vm(Yl),zm=e=>(e*=2)<1?.5*Yl(e):.5*(2-Math.pow(2,-10*(e-1))),Jl=e=>1-Math.sin(Math.acos(e)),Wm=Bm(Jl),Hm=Vm(Jl),qm=e=>/^0[^.\s]+$/u.test(e);function E_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qm(e):!0}const Vs=e=>Math.round(e*1e5)/1e5,eu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T_(e){return e==null}const A_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tu=(e,t)=>n=>!!(typeof n=="string"&&A_.test(n)&&n.startsWith(e)||t&&!T_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(eu);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},R_=e=>wn(0,255,e),Pa={...xs,transform:e=>Math.round(R_(e))},ir={test:tu("rgb","red"),parse:Zm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pa.transform(e)+", "+Pa.transform(t)+", "+Pa.transform(n)+", "+Vs(Xs.transform(r))+")"};function P_(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const _c={test:tu("#"),parse:P_,transform:ir.transform},Vr={test:tu("hsl","hue"),parse:Zm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+nn.transform(Vs(t))+", "+nn.transform(Vs(n))+", "+Vs(Xs.transform(r))+")"},Ye={test:e=>ir.test(e)||_c.test(e)||Vr.test(e),parse:e=>ir.test(e)?ir.parse(e):Vr.test(e)?Vr.parse(e):_c.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ir.transform(e):Vr.transform(e)},N_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function k_(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(eu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(N_))===null||n===void 0?void 0:n.length)||0)>0}const Km="number",Gm="color",j_="var",O_="var(",Ld="${}",M_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ei(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(M_,c=>(Ye.test(c)?(r.color.push(i),s.push(Gm),n.push(Ye.parse(c))):c.startsWith(O_)?(r.var.push(i),s.push(j_),n.push(c)):(r.number.push(i),s.push(Km),n.push(parseFloat(c))),++i,Ld)).split(Ld);return{values:n,split:a,indexes:r,types:s}}function Qm(e){return ei(e).values}function Xm(e){const{split:t,types:n}=ei(e),r=t.length;return s=>{let i="";for(let o=0;otypeof e=="number"?0:e;function I_(e){const t=Qm(e);return Xm(e)(t.map(D_))}const zn={test:k_,parse:Qm,createTransformer:Xm,getAnimatableNone:I_},L_=new Set(["brightness","contrast","saturate","opacity"]);function F_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(eu)||[];if(!r)return e;const s=n.replace(r,"");let i=L_.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const V_=/\b([a-z-]*)\(.*?\)/gu,Cc={...zn,getAnimatableNone:e=>{const t=e.match(V_);return t?t.map(F_).join(" "):e}},B_={...Ll,color:Ye,backgroundColor:Ye,outlineColor:Ye,fill:Ye,stroke:Ye,borderColor:Ye,borderTopColor:Ye,borderRightColor:Ye,borderBottomColor:Ye,borderLeftColor:Ye,filter:Cc,WebkitFilter:Cc},nu=e=>B_[e];function Ym(e,t){let n=nu(e);return n!==Cc&&(n=zn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $_=new Set(["auto","none","0"]);function U_(e,t,n){let r=0,s;for(;re===xs||e===te,Vd=(e,t)=>parseFloat(e.split(", ")[t]),Bd=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Vd(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Vd(i[1],e):0}},z_=new Set(["x","y","z"]),W_=vs.filter(e=>!z_.has(e));function H_(e){const t=[];return W_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const cs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Bd(4,13),y:Bd(5,14)};cs.translateX=cs.x;cs.translateY=cs.y;const vr=new Set;let Ec=!1,Tc=!1;function Jm(){if(Tc){const e=Array.from(vr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=H_(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tc=!1,Ec=!1,vr.forEach(e=>e.complete()),vr.clear()}function eg(){vr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tc=!0)})}function q_(){eg(),Jm()}class ru{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vr.add(this),Ec||(Ec=!0,Ee.read(eg),Ee.resolveKeyframes(Jm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Z_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K_(e){const t=Z_.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ng(e,t,n=1){const[r,s]=K_(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return tg(o)?parseFloat(o):o}return Il(s)?ng(s,t,n+1):s}const rg=e=>t=>t.test(e),G_={test:e=>e==="auto",parse:e=>e},sg=[xs,te,nn,kn,US,$S,G_],$d=e=>sg.find(rg(e));class ig extends ru{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c{n.getValue(c).set(l)}),this.resolveNoneKeyframes()}}const Ud=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zn.test(e)||e==="0")&&!e.startsWith("url("));function Q_(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function ea(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Y_),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const J_=40;class og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rn.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>J_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&q_(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=rn.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:c,isGenerator:l}=this.options;if(!l&&!X_(t,r,s,i))if(o)this.options.duration=0;else{c&&c(ea(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ac=2e4;function ag(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Ac?1/0:t}const Re=(e,t,n)=>e+(t-e)*n;function Na(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Na(c,a,e+1/3),i=Na(c,a,e),o=Na(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function vo(e,t){return n=>n>0?t:e}const ka=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},tC=[_c,ir,Vr],nC=e=>tC.find(t=>t.test(e));function zd(e){const t=nC(e);if(!t)return!1;let n=t.parse(e);return t===Vr&&(n=eC(n)),n}const Wd=(e,t)=>{const n=zd(e),r=zd(t);if(!n||!r)return vo(e,t);const s={...n};return i=>(s.red=ka(n.red,r.red,i),s.green=ka(n.green,r.green,i),s.blue=ka(n.blue,r.blue,i),s.alpha=Re(n.alpha,r.alpha,i),ir.transform(s))},rC=(e,t)=>n=>t(e(n)),Pi=(...e)=>e.reduce(rC),Rc=new Set(["none","hidden"]);function sC(e,t){return Rc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function iC(e,t){return n=>Re(e,t,n)}function su(e){return typeof e=="number"?iC:typeof e=="string"?Il(e)?vo:Ye.test(e)?Wd:cC:Array.isArray(e)?cg:typeof e=="object"?Ye.test(e)?Wd:oC:vo}function cg(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>su(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function aC(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i{const n=zn.createTransformer(t),r=ei(e),s=ei(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Rc.has(e)&&!s.values.length||Rc.has(t)&&!r.values.length?sC(e,t):Pi(cg(aC(r,s),s.values),n):vo(e,t)};function lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Re(e,t,n):su(e)(e,t)}const lC=5;function ug(e,t,n){const r=Math.max(t-lC,0);return Om(n-e(r),t-r)}const ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Hd=.001;function uC({duration:e=ke.duration,bounce:t=ke.bounce,velocity:n=ke.velocity,mass:r=ke.mass}){let s,i,o=1-t;o=wn(ke.minDamping,ke.maxDamping,o),e=wn(ke.minDuration,ke.maxDuration,bn(e)),o<1?(s=l=>{const u=l*o,d=u*e,h=u-n,y=Pc(l,o),g=Math.exp(-d);return Hd-h/y*g},i=l=>{const d=l*o*e,h=d*n+n,y=Math.pow(o,2)*Math.pow(l,2)*e,g=Math.exp(-d),p=Pc(Math.pow(l,2),o);return(-s(l)+Hd>0?-1:1)*((h-y)*g)/p}):(s=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-.001+u*d},i=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const a=5/e,c=fC(s,i,a);if(e=xn(e),isNaN(c))return{stiffness:ke.stiffness,damping:ke.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const dC=12;function fC(e,t,n){let r=n;for(let s=1;se[n]!==void 0)}function mC(e){let t={velocity:ke.velocity,stiffness:ke.stiffness,damping:ke.damping,mass:ke.mass,isResolvedFromDuration:!1,...e};if(!qd(e,pC)&&qd(e,hC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*wn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ke.mass,stiffness:s,damping:i}}else{const n=uC(e);t={...t,...n,mass:ke.mass},t.isResolvedFromDuration=!0}return t}function dg(e=ke.visualDuration,t=ke.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:l,mass:u,duration:d,velocity:h,isResolvedFromDuration:y}=mC({...n,velocity:-bn(n.velocity||0)}),g=h||0,p=l/(2*Math.sqrt(c*u)),v=o-i,x=bn(Math.sqrt(c/u)),b=Math.abs(v)<5;r||(r=b?ke.restSpeed.granular:ke.restSpeed.default),s||(s=b?ke.restDelta.granular:ke.restDelta.default);let w;if(p<1){const S=Pc(x,p);w=T=>{const A=Math.exp(-p*x*T);return o-A*((g+p*x*v)/S*Math.sin(S*T)+v*Math.cos(S*T))}}else if(p===1)w=S=>o-Math.exp(-x*S)*(v+(g+x*v)*S);else{const S=x*Math.sqrt(p*p-1);w=T=>{const A=Math.exp(-p*x*T),R=Math.min(S*T,300);return o-A*((g+p*x*v)*Math.sinh(R)+S*v*Math.cosh(R))/S}}const _={calculatedDuration:y&&d||null,next:S=>{const T=w(S);if(y)a.done=S>=d;else{let A=0;p<1&&(A=S===0?xn(g):ug(w,S,T));const R=Math.abs(A)<=r,N=Math.abs(o-T)<=s;a.done=R&&N}return a.value=a.done?o:T,a},toString:()=>{const S=Math.min(ag(_),Ac),T=Dm(A=>_.next(S*A).value,S,30);return S+"ms "+T}};return _}function Zd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},y=R=>a!==void 0&&Rc,g=R=>a===void 0?c:c===void 0||Math.abs(a-R)-p*Math.exp(-R/r),w=R=>x+b(R),_=R=>{const N=b(R),O=w(R);h.done=Math.abs(N)<=l,h.value=h.done?x:O};let S,T;const A=R=>{y(h.value)&&(S=R,T=dg({keyframes:[h.value,g(h.value)],velocity:ug(w,R,h.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!T&&S===void 0&&(N=!0,_(R),A(R)),S!==void 0&&R>=S?T.next(R-S):(!N&&_(R),h)}}}const gC=Ri(.42,0,1,1),yC=Ri(0,0,.58,1),fg=Ri(.42,0,.58,1),vC=e=>Array.isArray(e)&&typeof e[0]!="number",xC={linear:xt,easeIn:gC,easeInOut:fg,easeOut:yC,circIn:Jl,circInOut:Hm,circOut:Wm,backIn:Yl,backInOut:Um,backOut:$m,anticipate:zm},Kd=e=>{if(Xl(e)){hm(e.length===4);const[t,n,r,s]=e;return Ri(t,n,r,s)}else if(typeof e=="string")return xC[e];return e};function bC(e,t,n){const r=[],s=n||lg,i=e.length-1;for(let o=0;ot[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=bC(t,r,s),c=a.length,l=u=>{if(o&&u1)for(;dl(wn(e[0],e[i-1],u)):l}function SC(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=as(0,t,r);e.push(Re(n,1,s))}}function _C(e){const t=[0];return SC(t,e.length-1),t}function CC(e,t){return e.map(n=>n*t)}function EC(e,t){return e.map(()=>t||fg).splice(0,e.length-1)}function xo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=vC(r)?r.map(Kd):Kd(r),i={done:!1,value:t[0]},o=CC(n&&n.length===t.length?n:_C(t),e),a=wC(o,t,{ease:Array.isArray(s)?s:EC(t,s)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const TC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ee.update(t,!0),stop:()=>Un(t),now:()=>He.isProcessing?He.timestamp:rn.now()}},AC={decay:Zd,inertia:Zd,tween:xo,keyframes:xo,spring:dg},RC=e=>e/100;class iu extends og{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||ru,a=(c,l)=>this.onKeyframesResolved(c,l);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=Ql(n)?n:AC[n]||xo;let c,l;a!==xo&&typeof t[0]!="number"&&(c=Pi(RC,lg(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(l=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ag(u));const{calculatedDuration:d}=u,h=d+s,y=h*(r+1)-s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:c,calculatedDuration:d,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:l,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:y,repeatType:g,repeatDelay:p,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,_=i;if(y){const R=Math.min(this.currentTime,u)/d;let N=Math.floor(R),O=R%1;!O&&R>=1&&(O=1),O===1&&N--,N=Math.min(N,y+1),!!(N%2)&&(g==="reverse"?(O=1-O,p&&(O-=p/d)):g==="mirror"&&(_=o)),w=wn(0,1,O)*d}const S=b?{done:!1,value:c[0]}:_.next(w);a&&(S.value=a(S.value));let{done:T}=S;!b&&l!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return A&&s!==void 0&&(S.value=ea(c,this.options,s)),v&&v(S.value),A&&this.finish(),S}get duration(){const{resolved:t}=this;return t?bn(t.calculatedDuration):0}get time(){return bn(this.currentTime)}set time(t){t=xn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=TC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const PC=new Set(["opacity","clipPath","filter","transform"]);function NC(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Lm(a,s);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const kC=Gl(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),bo=10,jC=2e4;function OC(e){return Ql(e.type)||e.type==="spring"||!Im(e.ease)}function MC(e,t){const n=new iu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:c,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&yo()&&DC(i)&&(i=hg[i]),OC(this.options)){const{onComplete:d,onUpdate:h,motionValue:y,element:g,...p}=this.options,v=MC(t,p);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,s=v.times,i=v.ease,o="keyframes"}const u=NC(a.owner.current,c,t,{...this.options,duration:r,times:s,ease:i});return u.startTime=l??this.calcStartTime(),this.pendingTimeline?(Id(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(ea(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return bn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return bn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return xt;const{animation:r}=n;Id(r,t)}return xt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:u,onComplete:d,element:h,...y}=this.options,g=new iu({...y,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),p=xn(this.time);l.setWithVelocity(g.sample(p-bo).value,g.sample(p).value,bo)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=n.owner.getProps();return kC()&&r&&PC.has(r)&&!c&&!l&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const IC={type:"spring",stiffness:500,damping:25,restSpeed:10},LC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FC={type:"keyframes",duration:.8},VC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BC=(e,{keyframes:t})=>t.length>2?FC:kr.has(e)?e.startsWith("scale")?LC(t[1]):IC:VC;function $C({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ou=(e,t,n,r={},s,i)=>o=>{const a=Hl(r,e)||{},c=a.delay||r.delay||0;let{elapsed:l=0}=r;l=l-xn(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};$C(a)||(u={...u,...BC(e,u)}),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=ea(u.keyframes,a);if(h!==void 0)return Ee.update(()=>{u.onUpdate(h),u.onComplete()}),new x_([])}return!i&&Gd.supports(u)?new Gd(u):new iu(u)};function UC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(o=r);const l=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in c){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),y=c[d];if(y===void 0||u&&UC(u,d))continue;const g={delay:n,...Hl(o||{},d)};let p=!1;if(window.MotionHandoffAnimation){const x=Mm(e);if(x){const b=window.MotionHandoffAnimation(x,d,Ee);b!==null&&(g.startTime=b,p=!0)}}wc(e,d),h.start(ou(d,h,y,e.shouldReduceMotion&&jm.has(d)?{type:!1}:g,e,p));const v=h.animation;v&&l.push(v)}return a&&Promise.all(l).then(()=>{Ee.update(()=>{a&&m_(e,a)})}),l}function Nc(e,t,n={}){var r;const s=Ys(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(pg(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return zC(e,t,u+l,d,h,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,u]=c==="beforeChildren"?[o,a]:[a,o];return l().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function zC(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,c=s===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(WC).forEach((l,u)=>{l.notify("AnimationStart",t),o.push(Nc(l,t,{...i,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(o)}function WC(e,t){return e.sortNodePosition(t)}function HC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Nc(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Nc(e,t,n);else{const s=typeof t=="function"?Ys(e,t,n.custom):t;r=Promise.all(pg(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function mg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>HC(e,n,r)))}function QC(e){let t=GC(e),n=Qd(),r=!0;const s=c=>(l,u)=>{var d;const h=Ys(e,u,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:y,transitionEnd:g,...p}=h;l={...l,...p,...g}}return l};function i(c){t=c(e)}function o(c){const{props:l}=e,u=gg(e.parent)||{},d=[],h=new Set;let y={},g=1/0;for(let v=0;vg&&_,N=!1;const O=Array.isArray(w)?w:[w];let I=O.reduce(s(x),{});S===!1&&(I={});const{prevResolvedValues:M={}}=b,U={...M,...I},F=Z=>{R=!0,h.has(Z)&&(N=!0,h.delete(Z)),b.needsAnimating[Z]=!0;const K=e.getValue(Z);K&&(K.liveStyle=!1)};for(const Z in U){const K=I[Z],se=M[Z];if(y.hasOwnProperty(Z))continue;let fe=!1;bc(K)&&bc(se)?fe=!mg(K,se):fe=K!==se,fe?K!=null?F(Z):h.add(Z):K!==void 0&&h.has(Z)?F(Z):b.protectedKeys[Z]=!0}b.prevProp=w,b.prevResolvedValues=I,b.isActive&&(y={...y,...I}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(T&&A)||N)&&d.push(...O.map(Z=>({animation:Z,options:{type:x}})))}if(h.size){const v={};if(typeof l.initial!="boolean"){const x=Ys(e,Array.isArray(l.initial)?l.initial[0]:l.initial);x&&x.transition&&(v.transition=x.transition)}h.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=b??null}),d.push({animation:v})}let p=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(d):Promise.resolve()}function a(c,l){var u;if(n[c].isActive===l)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,l)}),n[c].isActive=l;const d=o(c);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Qd(),r=!0}}}function XC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!mg(t,e):!1}function nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qd(){return{animate:nr(!0),whileInView:nr(),whileHover:nr(),whileTap:nr(),whileDrag:nr(),whileFocus:nr(),exit:nr()}}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class YC extends Xn{constructor(t){super(t),t.animationState||(t.animationState=QC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let JC=0;class eE extends Xn{constructor(){super(...arguments),this.id=JC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tE={animation:{Feature:YC},exit:{Feature:eE}},Ot={x:!1,y:!1};function yg(){return Ot.x||Ot.y}function nE(e){return e==="x"||e==="y"?Ot[e]?null:(Ot[e]=!0,()=>{Ot[e]=!1}):Ot.x||Ot.y?null:(Ot.x=Ot.y=!0,()=>{Ot.x=Ot.y=!1})}const au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ti(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ni(e){return{point:{x:e.pageX,y:e.pageY}}}const rE=e=>t=>au(t)&&e(t,Ni(t));function Bs(e,t,n,r){return ti(e,t,rE(n),r)}const Xd=(e,t)=>Math.abs(e-t);function sE(e,t){const n=Xd(e.x,t.x),r=Xd(e.y,t.y);return Math.sqrt(n**2+r**2)}class vg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Oa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=sE(d.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:g}=d,{timestamp:p}=He;this.history.push({...g,timestamp:p});const{onStart:v,onMove:x}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ja(h,this.transformPagePoint),Ee.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Oa(d.type==="pointercancel"?this.lastMoveEventInfo:ja(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,v),g&&g(d,v)},!au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Ni(t),a=ja(o,this.transformPagePoint),{point:c}=a,{timestamp:l}=He;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Oa(a,this.history)),this.removeListeners=Pi(Bs(this.contextWindow,"pointermove",this.handlePointerMove),Bs(this.contextWindow,"pointerup",this.handlePointerUp),Bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Un(this.updatePoint)}}function ja(e,t){return t?{point:t(e.point)}:e}function Yd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oa({point:e},t){return{point:e,delta:Yd(e,xg(t)),offset:Yd(e,iE(t)),velocity:oE(t,.1)}}function iE(e){return e[0]}function xg(e){return e[e.length-1]}function oE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=xg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=bn(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const bg=1e-4,aE=1-bg,cE=1+bg,wg=.01,lE=0-wg,uE=0+wg;function at(e){return e.max-e.min}function dE(e,t,n){return Math.abs(e-t)<=n}function Jd(e,t,n,r=.5){e.origin=r,e.originPoint=Re(t.min,t.max,e.origin),e.scale=at(n)/at(t),e.translate=Re(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aE&&e.scale<=cE||isNaN(e.scale))&&(e.scale=1),(e.translate>=lE&&e.translate<=uE||isNaN(e.translate))&&(e.translate=0)}function $s(e,t,n,r){Jd(e.x,t.x,n.x,r?r.originX:void 0),Jd(e.y,t.y,n.y,r?r.originY:void 0)}function ef(e,t,n){e.min=n.min+t.min,e.max=e.min+at(t)}function fE(e,t,n){ef(e.x,t.x,n.x),ef(e.y,t.y,n.y)}function tf(e,t,n){e.min=t.min-n.min,e.max=e.min+at(t)}function Us(e,t,n){tf(e.x,t.x,n.x),tf(e.y,t.y,n.y)}function hE(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Re(n,e,r.max):Math.min(e,n)),e}function nf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pE(e,{top:t,left:n,bottom:r,right:s}){return{x:nf(e.x,n,s),y:nf(e.y,t,r)}}function rf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=as(t.min,t.max-r,e.min):r>s&&(n=as(e.min,e.max-s,t.min)),wn(0,1,n)}function yE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const kc=.35;function vE(e=kc){return e===!1?e=0:e===!0&&(e=kc),{x:sf(e,"left","right"),y:sf(e,"top","bottom")}}function sf(e,t,n){return{min:of(e,t),max:of(e,n)}}function of(e,t){return typeof e=="number"?e:e[t]||0}const af=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:af(),y:af()}),cf=()=>({min:0,max:0}),Me=()=>({x:cf(),y:cf()});function At(e){return[e("x"),e("y")]}function Sg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ma(e){return e===void 0||e===1}function jc({scale:e,scaleX:t,scaleY:n}){return!Ma(e)||!Ma(t)||!Ma(n)}function rr(e){return jc(e)||_g(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function _g(e){return lf(e.x)||lf(e.y)}function lf(e){return e&&e!=="0%"}function wo(e,t,n){const r=e-n,s=t*r;return n+s}function uf(e,t,n,r,s){return s!==void 0&&(e=wo(e,s,r)),wo(e,n,r)+t}function Oc(e,t=0,n=1,r,s){e.min=uf(e.min,t,n,r,s),e.max=uf(e.max,t,n,r,s)}function Cg(e,{x:t,y:n}){Oc(e.x,t.translate,t.scale,t.originPoint),Oc(e.y,n.translate,n.scale,n.originPoint)}const df=.999999999999,ff=1.0000000000001;function wE(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;adf&&(t.x=1),t.ydf&&(t.y=1)}function $r(e,t){e.min=e.min+t,e.max=e.max+t}function hf(e,t,n,r,s=.5){const i=Re(e.min,e.max,s);Oc(e,t,n,i,r)}function Ur(e,t){hf(e.x,t.x,t.scaleX,t.scale,t.originX),hf(e.y,t.y,t.scaleY,t.scale,t.originY)}function Eg(e,t){return Sg(bE(e.getBoundingClientRect(),t))}function SE(e,t,n){const r=Eg(e,n),{scroll:s}=t;return s&&($r(r.x,s.offset.x),$r(r.y,s.offset.y)),r}const Tg=({current:e})=>e?e.ownerDocument.defaultView:null,_E=new WeakMap;class CE{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Me(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ni(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:y,onDragStart:g}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nE(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),At(v=>{let x=this.getAxisMotionValue(v).get()||0;if(nn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[v];w&&(x=at(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),g&&Ee.postRender(()=>g(u,d)),wc(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(u,d)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:g,onDrag:p}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=d;if(y&&this.currentDirection===null){this.currentDirection=EE(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),c=()=>At(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new vg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:Tg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ee.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Xi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=hE(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Fr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=pE(s.layoutBox,n):this.constraints=!1,this.elastic=vE(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&At(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yE(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=SE(r,s.root,this.visualElement.getTransformPagePoint());let o=mE(s.layout.layoutBox,i);if(n){const a=n(xE(o));this.hasMutatedConstraints=!!a,a&&(o=Sg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=At(u=>{if(!Xi(u,n,this.currentDirection))return;let d=c&&c[u]||{};o&&(d={min:0,max:0});const h=s?200:1e6,y=s?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(ou(t,r,0,n,this.visualElement,!1))}stopAnimation(){At(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){At(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){At(n=>{const{drag:r}=this.getProps();if(!Xi(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-Re(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Fr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};At(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=gE({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),At(o=>{if(!Xi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(Re(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;_E.set(this.visualElement,this);const t=this.visualElement.current,n=Bs(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Fr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ee.read(r);const o=ti(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(At(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=kc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Xi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function EE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class TE extends Xn{constructor(t){super(t),this.removeGroupControls=xt,this.removeListeners=xt,this.controls=new CE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const pf=e=>(t,n)=>{e&&Ee.postRender(()=>e(t,n))};class AE extends Xn{constructor(){super(...arguments),this.removePointerDownListener=xt}onPointerDown(t){this.session=new vg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:pf(t),onStart:pf(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&Ee.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const oo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ps={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(te.test(e))e=parseFloat(e);else return e;const n=mf(e,t.target.x),r=mf(e,t.target.y);return`${n}% ${r}%`}},RE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=zn.parse(e);if(s.length>5)return r;const i=zn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const l=Re(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),i(s)}};class PE extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;BS(NE),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),oo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Ee.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ml.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ag(e){const[t,n]=dm(),r=m.useContext(Al);return f.jsx(PE,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(xm),isPresent:t,safeToRemove:n})}const NE={borderRadius:{...Ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ps,borderTopRightRadius:Ps,borderBottomLeftRadius:Ps,borderBottomRightRadius:Ps,boxShadow:RE};function kE(e,t,n){const r=et(e)?e:Js(e);return r.start(ou("",r,t,n)),r.animation}function jE(e){return e instanceof SVGElement&&e.tagName!=="svg"}const OE=(e,t)=>e.depth-t.depth;class ME{constructor(){this.children=[],this.isDirty=!1}add(t){ql(this.children,t),this.isDirty=!0}remove(t){Zl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OE),this.isDirty=!1,this.children.forEach(t)}}function DE(e,t){const n=rn.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Un(r),e(i-t))};return Ee.read(r,!0),()=>Un(r)}const Rg=["TopLeft","TopRight","BottomLeft","BottomRight"],IE=Rg.length,gf=e=>typeof e=="string"?parseFloat(e):e,yf=e=>typeof e=="number"||te.test(e);function LE(e,t,n,r,s,i){s?(e.opacity=Re(0,n.opacity!==void 0?n.opacity:1,FE(r)),e.opacityExit=Re(t.opacity!==void 0?t.opacity:1,0,VE(r))):i&&(e.opacity=Re(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(as(e,t,r))}function xf(e,t){e.min=t.min,e.max=t.max}function Tt(e,t){xf(e.x,t.x),xf(e.y,t.y)}function bf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wf(e,t,n,r,s){return e-=t,e=wo(e,1/n,r),s!==void 0&&(e=wo(e,1/s,r)),e}function BE(e,t=0,n=1,r=.5,s,i=e,o=e){if(nn.test(t)&&(t=parseFloat(t),t=Re(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Re(i.min,i.max,r);e===i&&(a-=t),e.min=wf(e.min,t,n,a,s),e.max=wf(e.max,t,n,a,s)}function Sf(e,t,[n,r,s],i,o){BE(e,t[n],t[r],t[s],t.scale,i,o)}const $E=["x","scaleX","originX"],UE=["y","scaleY","originY"];function _f(e,t,n,r){Sf(e.x,t,$E,n?n.x:void 0,r?r.x:void 0),Sf(e.y,t,UE,n?n.y:void 0,r?r.y:void 0)}function Cf(e){return e.translate===0&&e.scale===1}function Ng(e){return Cf(e.x)&&Cf(e.y)}function Ef(e,t){return e.min===t.min&&e.max===t.max}function zE(e,t){return Ef(e.x,t.x)&&Ef(e.y,t.y)}function Tf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kg(e,t){return Tf(e.x,t.x)&&Tf(e.y,t.y)}function Af(e){return at(e.x)/at(e.y)}function Rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WE{constructor(){this.members=[]}add(t){ql(this.members,t),t.scheduleRender()}remove(t){if(Zl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function HE(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:d,rotateY:h,skewX:y,skewY:g}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),y&&(r+=`skewX(${y}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Da=["","X","Y","Z"],qE={visibility:"hidden"},Pf=1e3;let ZE=0;function Ia(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ee,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jg(r)}function Og({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=ZE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QE),this.nodes.forEach(tT),this.nodes.forEach(nT),this.nodes.forEach(XE)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=DE(h,250),oo.hasAnimatedSinceResize&&(oo.hasAnimatedSinceResize=!1,this.nodes.forEach(kf))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:y,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||aT,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!kg(this.targetLayout,g),w=!h&&y;if(this.options.layoutRoot||this.resumeFrom||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const _={...Hl(p,"layout"),onPlay:v,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else h||kf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Un(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rT),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!at(this.snapshot.measuredBox.x)&&!at(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const S=_/1e3;jf(d.x,o.x,S),jf(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Us(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iT(this.relativeTarget,this.relativeTargetOrigin,h,S),w&&zE(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Me()),Tt(w,this.relativeTarget)),p&&(this.animationValues=u,LE(u,l,this.latestValues,S,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ee.update(()=>{oo.hasAnimatedSinceResize=!0,this.currentAnimation=kE(0,Pf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&Mg(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Me();const d=at(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const h=at(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Tt(a,c),Ur(a,u),$s(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new WE),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ia("z",o,l,this.animationValues);for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Nf),this.root.sharedNodes.clear()}}}function KE(e){e.updateLayout()}function GE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?At(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],y=at(h);h.min=r[d].min,h.max=h.min+y}):Mg(i,n.layoutBox,r)&&At(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],y=at(r[d]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+y)});const a=Br();$s(a,r,n.layoutBox);const c=Br();o?$s(c,e.applyTransform(s,!0),n.measuredBox):$s(c,r,n.layoutBox);const l=!Ng(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:y}=d;if(h&&y){const g=Me();Us(g,n.layoutBox,h.layoutBox);const p=Me();Us(p,r,y.layoutBox),kg(g,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function QE(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function XE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YE(e){e.clearSnapshot()}function Nf(e){e.clearMeasurements()}function JE(e){e.isLayoutDirty=!1}function eT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tT(e){e.resolveTargetDelta()}function nT(e){e.calcProjection()}function rT(e){e.resetSkewAndRotation()}function sT(e){e.removeLeadSnapshot()}function jf(e,t,n){e.translate=Re(t.translate,0,n),e.scale=Re(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Of(e,t,n,r){e.min=Re(t.min,n.min,r),e.max=Re(t.max,n.max,r)}function iT(e,t,n,r){Of(e.x,t.x,n.x,r),Of(e.y,t.y,n.y,r)}function oT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aT={duration:.45,ease:[.4,0,.1,1]},Mf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Df=Mf("applewebkit/")&&!Mf("chrome/")?Math.round:xt;function If(e){e.min=Df(e.min),e.max=Df(e.max)}function cT(e){If(e.x),If(e.y)}function Mg(e,t,n){return e==="position"||e==="preserve-aspect"&&!dE(Af(t),Af(n),.2)}function lT(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uT=Og({attachResizeListener:(e,t)=>ti(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),La={current:void 0},Dg=Og({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!La.current){const e=new uT({});e.mount(window),e.setOptions({layoutScroll:!0}),La.current=e}return La.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dT={pan:{Feature:AE},drag:{Feature:TE,ProjectionNode:Dg,MeasureLayout:Ag}};function fT(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ig(e,t){const n=fT(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Lf(e){return!(e.pointerType==="touch"||yg())}function hT(e,t,n={}){const[r,s,i]=Ig(e,n),o=a=>{if(!Lf(a))return;const{target:c}=a,l=t(c,a);if(typeof l!="function"||!c)return;const u=d=>{Lf(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}function Ff(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Ee.postRender(()=>i(t,Ni(t)))}class pT extends Xn{mount(){const{current:t}=this.node;t&&(this.unmount=hT(t,(n,r)=>(Ff(this.node,r,"Start"),s=>Ff(this.node,s,"End"))))}unmount(){}}class mT extends Xn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pi(ti(this.node.current,"focus",()=>this.onFocus()),ti(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Lg=(e,t)=>t?e===t?!0:Lg(e,t.parentElement):!1,gT=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yT(e){return gT.has(e.tagName)||e.tabIndex!==-1}const Ds=new WeakSet;function Vf(e){return t=>{t.key==="Enter"&&e(t)}}function Fa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vT=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vf(()=>{if(Ds.has(n))return;Fa(n,"down");const s=Vf(()=>{Fa(n,"up")}),i=()=>Fa(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Bf(e){return au(e)&&!yg()}function xT(e,t,n={}){const[r,s,i]=Ig(e,n),o=a=>{const c=a.currentTarget;if(!Bf(a)||Ds.has(c))return;Ds.add(c);const l=t(c,a),u=(y,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!Bf(y)||!Ds.has(c))&&(Ds.delete(c),typeof l=="function"&&l(y,{success:g}))},d=y=>{u(y,n.useGlobalTarget||Lg(c,y.target))},h=y=>{u(y,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!yT(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",l=>vT(l,s),s)}),i}function $f(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&Ee.postRender(()=>i(t,Ni(t)))}class bT extends Xn{mount(){const{current:t}=this.node;t&&(this.unmount=xT(t,(n,r)=>($f(this.node,r,"Start"),(s,{success:i})=>$f(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mc=new WeakMap,Va=new WeakMap,wT=e=>{const t=Mc.get(e.target);t&&t(e)},ST=e=>{e.forEach(wT)};function _T({root:e,...t}){const n=e||document;Va.has(n)||Va.set(n,{});const r=Va.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(ST,{root:e,...t})),r[s]}function CT(e,t,n){const r=_T(t);return Mc.set(e,n),r.observe(e),()=>{Mc.delete(e),r.unobserve(e)}}const ET={some:0,all:1};class TT extends Xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:ET[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=l?u:d;h&&h(c)};return CT(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(AT(t,n))&&this.startObserver()}unmount(){}}function AT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const RT={inView:{Feature:TT},tap:{Feature:bT},focus:{Feature:mT},hover:{Feature:pT}},PT={layout:{ProjectionNode:Dg,MeasureLayout:Ag}},Dc={current:null},Fg={current:!1};function NT(){if(Fg.current=!0,!!Nl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dc.current=e.matches;e.addListener(t),t()}else Dc.current=!1}const kT=[...sg,Ye,zn],jT=e=>kT.find(rg(e)),OT=new WeakMap;function MT(e,t,n){for(const r in t){const s=t[r],i=n[r];if(et(s))e.addValue(r,s);else if(et(i))e.addValue(r,Js(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Js(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Uf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DT{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ru,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=rn.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Fg.current||NT(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Un(this.notifyUpdate),Un(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=kr.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ee.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in os){const n=os[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Me()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Js(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(tg(s)||qm(s))?s=parseFloat(s):!jT(s)&&zn.test(n)&&(s=Ym(t,n)),this.setBaseTarget(t,et(s)?s.get():s)),et(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=zl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!et(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Vg extends DT{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function IT(e){return window.getComputedStyle(e)}class LT extends Vg{constructor(){super(...arguments),this.type="html",this.renderInstance=Rm}readValueFromInstance(t,n){if(kr.has(n)){const r=nu(n);return r&&r.default||0}else{const r=IT(t),s=(Dl(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Eg(t,n)}build(t,n,r){Fl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Wl(t,n,r)}}class FT extends Vg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Me,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Am(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kr.has(n)){const r=nu(n);return r&&r.default||0}return n=Pm.has(n)?n:Ol(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return km(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ee.postRender(this.updateDimensions)}build(t,n,r){$l(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){Nm(t,n,r,s)}mount(t){this.isSVGTag=Ul(t.tagName),super.mount(t)}}const VT=(e,t)=>Bl(e)?new FT(t):new LT(t,{allowProjection:e!==m.Fragment}),BT=u_({...tE,...RT,...dT,...PT},VT),zs=TS(BT);var Ba,zf;function $T(){if(zf)return Ba;zf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,c=typeof $i=="object"&&$i&&$i.Object===Object&&$i,l=typeof self=="object"&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),d=Object.prototype,h=d.toString,y=Math.max,g=Math.min,p=function(){return u.Date.now()};function v(S,T,A){var R,N,O,I,M,U,F=0,X=!1,Y=!1,Z=!0;if(typeof S!="function")throw new TypeError(e);T=_(T)||0,x(A)&&(X=!!A.leading,Y="maxWait"in A,O=Y?y(_(A.maxWait)||0,T):O,Z="trailing"in A?!!A.trailing:Z);function K(ue){var ve=R,je=N;return R=N=void 0,F=ue,I=S.apply(je,ve),I}function se(ue){return F=ue,M=setTimeout(Be,T),X?K(ue):I}function fe(ue){var ve=ue-U,je=ue-F,Fe=T-ve;return Y?g(Fe,O-je):Fe}function ye(ue){var ve=ue-U,je=ue-F;return U===void 0||ve>=T||ve<0||Y&&je>=O}function Be(){var ue=p();if(ye(ue))return Ge(ue);M=setTimeout(Be,fe(ue))}function Ge(ue){return M=void 0,Z&&R?K(ue):(R=N=void 0,I)}function Qe(){M!==void 0&&clearTimeout(M),F=0,R=U=N=M=void 0}function jt(){return M===void 0?I:Ge(p())}function st(){var ue=p(),ve=ye(ue);if(R=arguments,N=this,U=ue,ve){if(M===void 0)return se(U);if(Y)return M=setTimeout(Be,T),K(U)}return M===void 0&&(M=setTimeout(Be,T)),I}return st.cancel=Qe,st.flush=jt,st}function x(S){var T=typeof S;return!!S&&(T=="object"||T=="function")}function b(S){return!!S&&typeof S=="object"}function w(S){return typeof S=="symbol"||b(S)&&h.call(S)==n}function _(S){if(typeof S=="number")return S;if(w(S))return t;if(x(S)){var T=typeof S.valueOf=="function"?S.valueOf():S;S=x(T)?T+"":T}if(typeof S!="string")return S===0?S:+S;S=S.replace(r,"");var A=i.test(S);return A||o.test(S)?a(S.slice(2),A?2:8):s.test(S)?t:+S}return Ba=v,Ba}$T();var Bg=typeof window<"u"?m.useLayoutEffect:m.useEffect,UT=typeof window>"u";function So(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=a=>UT?t:window.matchMedia(a).matches,[s,i]=m.useState(()=>n?r(e):t);function o(){i(r(e))}return Bg(()=>{const a=window.matchMedia(e);return o(),a.addListener?a.addListener(o):a.addEventListener("change",o),()=>{a.removeListener?a.removeListener(o):a.removeEventListener("change",o)}},[e]),s}var zT=typeof window>"u";function WT(e={}){const{autoLock:t=!0,lockTarget:n,widthReflow:r=!0}=e,[s,i]=m.useState(!1),o=m.useRef(null),a=m.useRef(null),c=()=>{if(o.current){const{overflow:u,paddingRight:d}=o.current.style;if(a.current={overflow:u,paddingRight:d},r){const h=o.current===document.body?window.innerWidth:o.current.offsetWidth,y=parseInt(window.getComputedStyle(o.current).paddingRight,10)||0,g=h-o.current.scrollWidth;o.current.style.paddingRight=`${g+y}px`}o.current.style.overflow="hidden",i(!0)}},l=()=>{o.current&&a.current&&(o.current.style.overflow=a.current.overflow,r&&(o.current.style.paddingRight=a.current.paddingRight)),i(!1)};return Bg(()=>{if(!zT)return n&&(o.current=typeof n=="string"?document.querySelector(n):n),o.current||(o.current=document.body),t&&c(),()=>{l()}},[t,n,r]),{isLocked:s,lock:c,unlock:l}}const hO=({className:e,stage:t})=>{const n=So("(min-width: 768px");return f.jsx("div",{className:e,children:f.jsx("div",{className:"max-w-[808px] md:mx-auto my-20 mx-5",children:f.jsxs("div",{className:"relative h-14 w-full",children:[f.jsx("div",{className:V("h-2 absolute bg-[#D0D3D8] rounded-[2px] w-full top-0 left-0")}),f.jsx(zs.div,{initial:{width:0},animate:t===2?{width:"20%"}:t===3&&{width:"75%"},transition:{delay:.5,duration:.5},className:V("h-2 absolute bg-primary rounded-[2px] top-0 left-0 z-[5]",{"w-0 bg-opacity-0":t===1,"w-[20%]":t===2,"w-[75%]":t===3})}),f.jsx(zs.div,{initial:{width:n?"50%":"35%"},animate:t===2?{width:"75%"}:t===3&&{width:"100%"},className:V("bg-reverse_primary w-1/2 absolute top-0 left-0 rounded-[2px] z-[3] h-2")}),f.jsx(zs.div,{className:V("progress-circle absolute transition-all duration-500 -top-6 flex items-center justify-center",{"bg-reverse_primary md:left-1/2 left-1/3":t===1,"bg-primary left-[20%] !text-on_primary":t===2||t===3}),children:"1"}),f.jsx("div",{className:V("progress-circle absolute -top-6 right-[17%] transition-all -translate-x-1/2 flex items-center justify-center",{"bg-[#D0D3D8]":t===1,"bg-reverse_primary":t===2,"bg-primary !text-on_primary":t===3}),children:"2"}),f.jsx("div",{className:V("progress-circle absolute -top-6 right-0 transition-all duration-500 flex items-center justify-center",{"bg-[#D0D3D8]":t===1||t===2,"bg-reverse_primary":t===3}),children:"3"})]})})})};var ki=e=>e.type==="checkbox",or=e=>e instanceof Date,ot=e=>e==null;const $g=e=>typeof e=="object";var Ie=e=>!ot(e)&&!Array.isArray(e)&&$g(e)&&!or(e),Ug=e=>Ie(e)&&e.target?ki(e.target)?e.target.checked:e.target.value:e,HT=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,zg=(e,t)=>e.has(HT(t)),qT=e=>{const t=e.constructor&&e.constructor.prototype;return Ie(t)&&t.hasOwnProperty("isPrototypeOf")},cu=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ut(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(cu&&(e instanceof Blob||r))&&(n||Ie(e)))if(t=n?[]:{},!n&&!qT(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=ut(e[s]));else return e;return t}var ta=e=>Array.isArray(e)?e.filter(Boolean):[],De=e=>e===void 0,$=(e,t,n)=>{if(!t||!Ie(e))return n;const r=ta(t.split(/[,[\].]+?/)).reduce((s,i)=>ot(s)?s:s[i],e);return De(r)||r===e?De(e[t])?n:e[t]:r},Nt=e=>typeof e=="boolean",lu=e=>/^\w*$/.test(e),Wg=e=>ta(e.replace(/["|']|\]/g,"").split(/\.|\[/)),xe=(e,t,n)=>{let r=-1;const s=lu(t)?[t]:Wg(t),i=s.length,o=i-1;for(;++rde.useContext(Hg),ZT=e=>{const{children:t,...n}=e;return de.createElement(Hg.Provider,{value:n},t)};var qg=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==It.all&&(t._proxyFormState[o]=!r||It.all),n&&(n[o]=!0),e[o]}});return s},ft=e=>Ie(e)&&!Object.keys(e).length,Zg=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return ft(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||It.all))},Ws=e=>Array.isArray(e)?e:[e],Kg=(e,t,n)=>!e||!t||e===t||Ws(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function uu(e){const t=de.useRef(e);t.current=e,de.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function KT(e){const t=na(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=de.useState(n._formState),c=de.useRef(!0),l=de.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=de.useRef(s);return u.current=s,uu({disabled:r,next:d=>c.current&&Kg(u.current,d.name,i)&&Zg(d,l.current,n._updateFormState)&&a({...n._formState,...d}),subject:n._subjects.state}),de.useEffect(()=>(c.current=!0,l.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),de.useMemo(()=>qg(o,n,l.current,!1),[o,n])}var tn=e=>typeof e=="string",Gg=(e,t,n,r,s)=>tn(e)?(r&&t.watch.add(e),$(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),$(n,i))):(r&&(t.watchAll=!0),n);function GT(e){const t=na(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=de.useRef(r);a.current=r,uu({disabled:i,subject:n._subjects.values,next:u=>{Kg(a.current,u.name,o)&&l(ut(Gg(a.current,n._names,u.values||n._formValues,!1,s)))}});const[c,l]=de.useState(n._getWatch(r,s));return de.useEffect(()=>n._removeUnmounted()),c}function QT(e){const t=na(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=zg(s._names.array,n),a=GT({control:s,name:n,defaultValue:$(s._formValues,n,$(s._defaultValues,n,e.defaultValue)),exact:!0}),c=KT({control:s,name:n,exact:!0}),l=de.useRef(s.register(n,{...e.rules,value:a,...Nt(e.disabled)?{disabled:e.disabled}:{}})),u=de.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!$(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!$(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!$(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!$(c.validatingFields,n)},error:{enumerable:!0,get:()=>$(c.errors,n)}}),[c,n]),d=de.useMemo(()=>({name:n,value:a,...Nt(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:Ug(h),name:n},type:_o.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:$(s._formValues,n),name:n},type:_o.BLUR}),ref:h=>{const y=$(s._fields,n);y&&h&&(y._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:g=>h.setCustomValidity(g),reportValidity:()=>h.reportValidity()})}}),[n,s._formValues,r,c.disabled,a,s._fields]);return de.useEffect(()=>{const h=s._options.shouldUnregister||i,y=(g,p)=>{const v=$(s._fields,g);v&&v._f&&(v._f.mount=p)};if(y(n,!0),h){const g=ut($(s._options.defaultValues,n));xe(s._defaultValues,n,g),De($(s._formValues,n))&&xe(s._formValues,n,g)}return!o&&s.register(n),()=>{(o?h&&!s._state.action:h)?s.unregister(n):y(n,!1)}},[n,s,o,i]),de.useEffect(()=>{s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),de.useMemo(()=>({field:d,formState:c,fieldState:u}),[d,c,u])}const XT=e=>e.render(QT(e));var Qg=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Wf=e=>({isOnSubmit:!e||e===It.onSubmit,isOnBlur:e===It.onBlur,isOnChange:e===It.onChange,isOnAll:e===It.all,isOnTouch:e===It.onTouched}),Hf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Hs=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=$(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Hs(a,t))break}else if(Ie(a)&&Hs(a,t))break}}};var YT=(e,t,n)=>{const r=Ws($(e,n));return xe(r,"root",t[n]),xe(e,n,r),e},du=e=>e.type==="file",en=e=>typeof e=="function",Co=e=>{if(!cu)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ao=e=>tn(e),fu=e=>e.type==="radio",Eo=e=>e instanceof RegExp;const qf={value:!1,isValid:!1},Zf={value:!0,isValid:!0};var Xg=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!De(e[0].attributes.value)?De(e[0].value)||e[0].value===""?Zf:{value:e[0].value,isValid:!0}:Zf:qf}return qf};const Kf={isValid:!1,value:null};var Yg=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Kf):Kf;function Gf(e,t,n="validate"){if(ao(e)||Array.isArray(e)&&e.every(ao)||Nt(e)&&!e)return{type:n,message:ao(e)?e:"",ref:t}}var Ir=e=>Ie(e)&&!Eo(e)?e:{value:e,message:""},Qf=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:c,maxLength:l,minLength:u,min:d,max:h,pattern:y,validate:g,name:p,valueAsNumber:v,mount:x}=e._f,b=$(n,p);if(!x||t.has(p))return{};const w=a?a[0]:o,_=M=>{s&&w.reportValidity&&(w.setCustomValidity(Nt(M)?"":M||""),w.reportValidity())},S={},T=fu(o),A=ki(o),R=T||A,N=(v||du(o))&&De(o.value)&&De(b)||Co(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,O=Qg.bind(null,p,r,S),I=(M,U,F,X=hn.maxLength,Y=hn.minLength)=>{const Z=M?U:F;S[p]={type:M?X:Y,message:Z,ref:o,...O(M?X:Y,Z)}};if(i?!Array.isArray(b)||!b.length:c&&(!R&&(N||ot(b))||Nt(b)&&!b||A&&!Xg(a).isValid||T&&!Yg(a).isValid)){const{value:M,message:U}=ao(c)?{value:!!c,message:c}:Ir(c);if(M&&(S[p]={type:hn.required,message:U,ref:w,...O(hn.required,U)},!r))return _(U),S}if(!N&&(!ot(d)||!ot(h))){let M,U;const F=Ir(h),X=Ir(d);if(!ot(b)&&!isNaN(b)){const Y=o.valueAsNumber||b&&+b;ot(F.value)||(M=Y>F.value),ot(X.value)||(U=Ynew Date(new Date().toDateString()+" "+fe),K=o.type=="time",se=o.type=="week";tn(F.value)&&b&&(M=K?Z(b)>Z(F.value):se?b>F.value:Y>new Date(F.value)),tn(X.value)&&b&&(U=K?Z(b)+M.value,X=!ot(U.value)&&b.length<+U.value;if((F||X)&&(I(F,M.message,U.message),!r))return _(S[p].message),S}if(y&&!N&&tn(b)){const{value:M,message:U}=Ir(y);if(Eo(M)&&!b.match(M)&&(S[p]={type:hn.pattern,message:U,ref:o,...O(hn.pattern,U)},!r))return _(U),S}if(g){if(en(g)){const M=await g(b,n),U=Gf(M,w);if(U&&(S[p]={...U,...O(hn.validate,U.message)},!r))return _(U.message),S}else if(Ie(g)){let M={};for(const U in g){if(!ft(M)&&!r)break;const F=Gf(await g[U](b,n),w,U);F&&(M={...F,...O(U,F.message)},_(F.message),r&&(S[p]=M))}if(!ft(M)&&(S[p]={ref:w,...M},!r))return S}}return _(!0),S};function JT(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Ic=e=>ot(e)||!$g(e);function jn(e,t){if(Ic(e)||Ic(t))return e===t;if(or(e)&&or(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(or(i)&&or(o)||Ie(i)&&Ie(o)||Array.isArray(i)&&Array.isArray(o)?!jn(i,o):i!==o)return!1}}return!0}var Jg=e=>e.type==="select-multiple",tA=e=>fu(e)||ki(e),Ua=e=>Co(e)&&e.isConnected,ey=e=>{for(const t in e)if(en(e[t]))return!0;return!1};function To(e,t={}){const n=Array.isArray(e);if(Ie(e)||n)for(const r in e)Array.isArray(e[r])||Ie(e[r])&&!ey(e[r])?(t[r]=Array.isArray(e[r])?[]:{},To(e[r],t[r])):ot(e[r])||(t[r]=!0);return t}function ty(e,t,n){const r=Array.isArray(e);if(Ie(e)||r)for(const s in e)Array.isArray(e[s])||Ie(e[s])&&!ey(e[s])?De(t)||Ic(n[s])?n[s]=Array.isArray(e[s])?To(e[s],[]):{...To(e[s])}:ty(e[s],ot(t)?{}:t[s],n[s]):n[s]=!jn(e[s],t[s]);return n}var Ns=(e,t)=>ty(e,t,To(t)),ny=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>De(e)?e:t?e===""?NaN:e&&+e:n&&tn(e)?new Date(e):r?r(e):e;function za(e){const t=e.ref;return du(t)?t.files:fu(t)?Yg(e.refs).value:Jg(t)?[...t.selectedOptions].map(({value:n})=>n):ki(t)?Xg(e.refs).value:ny(De(t.value)?e.ref.value:t.value,e)}var nA=(e,t,n,r)=>{const s={};for(const i of e){const o=$(t,i);o&&xe(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},ks=e=>De(e)?e:Eo(e)?e.source:Ie(e)?Eo(e.value)?e.value.source:e.value:e;const Xf="AsyncFunction";var rA=e=>!!e&&!!e.validate&&!!(en(e.validate)&&e.validate.constructor.name===Xf||Ie(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Xf)),sA=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Yf(e,t,n){const r=$(e,n);if(r||lu(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=$(t,i),a=$(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var iA=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,oA=(e,t)=>!ta($(e,t)).length&&$e(e,t);const aA={mode:It.onSubmit,reValidateMode:It.onChange,shouldFocusError:!0};function cA(e={}){let t={...aA,...e},n={submitCount:0,isDirty:!1,isLoading:en(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Ie(t.defaultValues)||Ie(t.values)?ut(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ut(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:$a(),array:$a(),state:$a()},h=Wf(t.mode),y=Wf(t.reValidateMode),g=t.criteriaMode===It.all,p=C=>P=>{clearTimeout(l),l=setTimeout(C,P)},v=async C=>{if(!t.disabled&&(u.isValid||C)){const P=t.resolver?ft((await R()).errors):await O(r,!0);P!==n.isValid&&d.state.next({isValid:P})}},x=(C,P)=>{!t.disabled&&(u.isValidating||u.validatingFields)&&((C||Array.from(a.mount)).forEach(j=>{j&&(P?xe(n.validatingFields,j,P):$e(n.validatingFields,j))}),d.state.next({validatingFields:n.validatingFields,isValidating:!ft(n.validatingFields)}))},b=(C,P=[],j,z,B=!0,L=!0)=>{if(z&&j&&!t.disabled){if(o.action=!0,L&&Array.isArray($(r,C))){const J=j($(r,C),z.argA,z.argB);B&&xe(r,C,J)}if(L&&Array.isArray($(n.errors,C))){const J=j($(n.errors,C),z.argA,z.argB);B&&xe(n.errors,C,J),oA(n.errors,C)}if(u.touchedFields&&L&&Array.isArray($(n.touchedFields,C))){const J=j($(n.touchedFields,C),z.argA,z.argB);B&&xe(n.touchedFields,C,J)}u.dirtyFields&&(n.dirtyFields=Ns(s,i)),d.state.next({name:C,isDirty:M(C,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else xe(i,C,P)},w=(C,P)=>{xe(n.errors,C,P),d.state.next({errors:n.errors})},_=C=>{n.errors=C,d.state.next({errors:n.errors,isValid:!1})},S=(C,P,j,z)=>{const B=$(r,C);if(B){const L=$(i,C,De(j)?$(s,C):j);De(L)||z&&z.defaultChecked||P?xe(i,C,P?L:za(B._f)):X(C,L),o.mount&&v()}},T=(C,P,j,z,B)=>{let L=!1,J=!1;const ae={name:C};if(!t.disabled){const Ve=!!($(r,C)&&$(r,C)._f&&$(r,C)._f.disabled);if(!j||z){u.isDirty&&(J=n.isDirty,n.isDirty=ae.isDirty=M(),L=J!==ae.isDirty);const Oe=Ve||jn($(s,C),P);J=!!(!Ve&&$(n.dirtyFields,C)),Oe||Ve?$e(n.dirtyFields,C):xe(n.dirtyFields,C,!0),ae.dirtyFields=n.dirtyFields,L=L||u.dirtyFields&&J!==!Oe}if(j){const Oe=$(n.touchedFields,C);Oe||(xe(n.touchedFields,C,j),ae.touchedFields=n.touchedFields,L=L||u.touchedFields&&Oe!==j)}L&&B&&d.state.next(ae)}return L?ae:{}},A=(C,P,j,z)=>{const B=$(n.errors,C),L=u.isValid&&Nt(P)&&n.isValid!==P;if(t.delayError&&j?(c=p(()=>w(C,j)),c(t.delayError)):(clearTimeout(l),c=null,j?xe(n.errors,C,j):$e(n.errors,C)),(j?!jn(B,j):B)||!ft(z)||L){const J={...z,...L&&Nt(P)?{isValid:P}:{},errors:n.errors,name:C};n={...n,...J},d.state.next(J)}},R=async C=>{x(C,!0);const P=await t.resolver(i,t.context,nA(C||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return x(C),P},N=async C=>{const{errors:P}=await R(C);if(C)for(const j of C){const z=$(P,j);z?xe(n.errors,j,z):$e(n.errors,j)}else n.errors=P;return P},O=async(C,P,j={valid:!0})=>{for(const z in C){const B=C[z];if(B){const{_f:L,...J}=B;if(L){const ae=a.array.has(L.name),Ve=B._f&&rA(B._f);Ve&&u.validatingFields&&x([z],!0);const Oe=await Qf(B,a.disabled,i,g,t.shouldUseNativeValidation&&!P,ae);if(Ve&&u.validatingFields&&x([z]),Oe[L.name]&&(j.valid=!1,P))break;!P&&($(Oe,L.name)?ae?YT(n.errors,Oe,L.name):xe(n.errors,L.name,Oe[L.name]):$e(n.errors,L.name))}!ft(J)&&await O(J,P,j)}}return j.valid},I=()=>{for(const C of a.unMount){const P=$(r,C);P&&(P._f.refs?P._f.refs.every(j=>!Ua(j)):!Ua(P._f.ref))&&st(C)}a.unMount=new Set},M=(C,P)=>!t.disabled&&(C&&P&&xe(i,C,P),!jn(ye(),s)),U=(C,P,j)=>Gg(C,a,{...o.mount?i:De(P)?s:tn(C)?{[C]:P}:P},j,P),F=C=>ta($(o.mount?i:s,C,t.shouldUnregister?$(s,C,[]):[])),X=(C,P,j={})=>{const z=$(r,C);let B=P;if(z){const L=z._f;L&&(!L.disabled&&xe(i,C,ny(P,L)),B=Co(L.ref)&&ot(P)?"":P,Jg(L.ref)?[...L.ref.options].forEach(J=>J.selected=B.includes(J.value)):L.refs?ki(L.ref)?L.refs.length>1?L.refs.forEach(J=>(!J.defaultChecked||!J.disabled)&&(J.checked=Array.isArray(B)?!!B.find(ae=>ae===J.value):B===J.value)):L.refs[0]&&(L.refs[0].checked=!!B):L.refs.forEach(J=>J.checked=J.value===B):du(L.ref)?L.ref.value="":(L.ref.value=B,L.ref.type||d.values.next({name:C,values:{...i}})))}(j.shouldDirty||j.shouldTouch)&&T(C,B,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&fe(C)},Y=(C,P,j)=>{for(const z in P){const B=P[z],L=`${C}.${z}`,J=$(r,L);(a.array.has(C)||Ie(B)||J&&!J._f)&&!or(B)?Y(L,B,j):X(L,B,j)}},Z=(C,P,j={})=>{const z=$(r,C),B=a.array.has(C),L=ut(P);xe(i,C,L),B?(d.array.next({name:C,values:{...i}}),(u.isDirty||u.dirtyFields)&&j.shouldDirty&&d.state.next({name:C,dirtyFields:Ns(s,i),isDirty:M(C,L)})):z&&!z._f&&!ot(L)?Y(C,L,j):X(C,L,j),Hf(C,a)&&d.state.next({...n}),d.values.next({name:o.mount?C:void 0,values:{...i}})},K=async C=>{o.mount=!0;const P=C.target;let j=P.name,z=!0;const B=$(r,j),L=()=>P.type?za(B._f):Ug(C),J=ae=>{z=Number.isNaN(ae)||or(ae)&&isNaN(ae.getTime())||jn(ae,$(i,j,ae))};if(B){let ae,Ve;const Oe=L(),qt=C.type===_o.BLUR||C.type===_o.FOCUS_OUT,Cs=!sA(B._f)&&!t.resolver&&!$(n.errors,j)&&!B._f.deps||iA(qt,$(n.touchedFields,j),n.isSubmitted,y,h),Zt=Hf(j,a,qt);xe(i,j,Oe),qt?(B._f.onBlur&&B._f.onBlur(C),c&&c(0)):B._f.onChange&&B._f.onChange(C);const er=T(j,Oe,qt,!1),Es=!ft(er)||Zt;if(!qt&&d.values.next({name:j,type:C.type,values:{...i}}),Cs)return u.isValid&&(t.mode==="onBlur"&&qt?v():qt||v()),Es&&d.state.next({name:j,...Zt?{}:er});if(!qt&&Zt&&d.state.next({...n}),t.resolver){const{errors:tr}=await R([j]);if(J(Oe),z){const ya=Yf(n.errors,r,j),Vi=Yf(tr,r,ya.name||j);ae=Vi.error,j=Vi.name,Ve=ft(tr)}}else x([j],!0),ae=(await Qf(B,a.disabled,i,g,t.shouldUseNativeValidation))[j],x([j]),J(Oe),z&&(ae?Ve=!1:u.isValid&&(Ve=await O(r,!0)));z&&(B._f.deps&&fe(B._f.deps),A(j,Ve,ae,er))}},se=(C,P)=>{if($(n.errors,P)&&C.focus)return C.focus(),1},fe=async(C,P={})=>{let j,z;const B=Ws(C);if(t.resolver){const L=await N(De(C)?C:B);j=ft(L),z=C?!B.some(J=>$(L,J)):j}else C?(z=(await Promise.all(B.map(async L=>{const J=$(r,L);return await O(J&&J._f?{[L]:J}:J)}))).every(Boolean),!(!z&&!n.isValid)&&v()):z=j=await O(r);return d.state.next({...!tn(C)||u.isValid&&j!==n.isValid?{}:{name:C},...t.resolver||!C?{isValid:j}:{},errors:n.errors}),P.shouldFocus&&!z&&Hs(r,se,C?B:a.mount),z},ye=C=>{const P={...o.mount?i:s};return De(C)?P:tn(C)?$(P,C):C.map(j=>$(P,j))},Be=(C,P)=>({invalid:!!$((P||n).errors,C),isDirty:!!$((P||n).dirtyFields,C),error:$((P||n).errors,C),isValidating:!!$(n.validatingFields,C),isTouched:!!$((P||n).touchedFields,C)}),Ge=C=>{C&&Ws(C).forEach(P=>$e(n.errors,P)),d.state.next({errors:C?n.errors:{}})},Qe=(C,P,j)=>{const z=($(r,C,{_f:{}})._f||{}).ref,B=$(n.errors,C)||{},{ref:L,message:J,type:ae,...Ve}=B;xe(n.errors,C,{...Ve,...P,ref:z}),d.state.next({name:C,errors:n.errors,isValid:!1}),j&&j.shouldFocus&&z&&z.focus&&z.focus()},jt=(C,P)=>en(C)?d.values.subscribe({next:j=>C(U(void 0,P),j)}):U(C,P,!0),st=(C,P={})=>{for(const j of C?Ws(C):a.mount)a.mount.delete(j),a.array.delete(j),P.keepValue||($e(r,j),$e(i,j)),!P.keepError&&$e(n.errors,j),!P.keepDirty&&$e(n.dirtyFields,j),!P.keepTouched&&$e(n.touchedFields,j),!P.keepIsValidating&&$e(n.validatingFields,j),!t.shouldUnregister&&!P.keepDefaultValue&&$e(s,j);d.values.next({values:{...i}}),d.state.next({...n,...P.keepDirty?{isDirty:M()}:{}}),!P.keepIsValid&&v()},ue=({disabled:C,name:P,field:j,fields:z})=>{(Nt(C)&&o.mount||C||a.disabled.has(P))&&(C?a.disabled.add(P):a.disabled.delete(P),T(P,za(j?j._f:$(z,P)._f),!1,!1,!0))},ve=(C,P={})=>{let j=$(r,C);const z=Nt(P.disabled)||Nt(t.disabled);return xe(r,C,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:C}},name:C,mount:!0,...P}}),a.mount.add(C),j?ue({field:j,disabled:Nt(P.disabled)?P.disabled:t.disabled,name:C}):S(C,!0,P.value),{...z?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:ks(P.min),max:ks(P.max),minLength:ks(P.minLength),maxLength:ks(P.maxLength),pattern:ks(P.pattern)}:{},name:C,onChange:K,onBlur:K,ref:B=>{if(B){ve(C,P),j=$(r,C);const L=De(B.value)&&B.querySelectorAll&&B.querySelectorAll("input,select,textarea")[0]||B,J=tA(L),ae=j._f.refs||[];if(J?ae.find(Ve=>Ve===L):L===j._f.ref)return;xe(r,C,{_f:{...j._f,...J?{refs:[...ae.filter(Ua),L,...Array.isArray($(s,C))?[{}]:[]],ref:{type:L.type,name:C}}:{ref:L}}}),S(C,!1,void 0,L)}else j=$(r,C,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(zg(a.array,C)&&o.action)&&a.unMount.add(C)}}},je=()=>t.shouldFocusError&&Hs(r,se,a.mount),Fe=C=>{Nt(C)&&(d.state.next({disabled:C}),Hs(r,(P,j)=>{const z=$(r,j);z&&(P.disabled=z._f.disabled||C,Array.isArray(z._f.refs)&&z._f.refs.forEach(B=>{B.disabled=z._f.disabled||C}))},0,!1))},we=(C,P)=>async j=>{let z;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let B=ut(i);if(a.disabled.size)for(const L of a.disabled)xe(B,L,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:L,values:J}=await R();n.errors=L,B=J}else await O(r);if($e(n.errors,"root"),ft(n.errors)){d.state.next({errors:{}});try{await C(B,j)}catch(L){z=L}}else P&&await P({...n.errors},j),je(),setTimeout(je);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ft(n.errors)&&!z,submitCount:n.submitCount+1,errors:n.errors}),z)throw z},G=(C,P={})=>{$(r,C)&&(De(P.defaultValue)?Z(C,ut($(s,C))):(Z(C,P.defaultValue),xe(s,C,ut(P.defaultValue))),P.keepTouched||$e(n.touchedFields,C),P.keepDirty||($e(n.dirtyFields,C),n.isDirty=P.defaultValue?M(C,ut($(s,C))):M()),P.keepError||($e(n.errors,C),u.isValid&&v()),d.state.next({...n}))},he=(C,P={})=>{const j=C?ut(C):s,z=ut(j),B=ft(C),L=B?s:z;if(P.keepDefaultValues||(s=j),!P.keepValues){if(P.keepDirtyValues){const J=new Set([...a.mount,...Object.keys(Ns(s,i))]);for(const ae of Array.from(J))$(n.dirtyFields,ae)?xe(L,ae,$(i,ae)):Z(ae,$(L,ae))}else{if(cu&&De(C))for(const J of a.mount){const ae=$(r,J);if(ae&&ae._f){const Ve=Array.isArray(ae._f.refs)?ae._f.refs[0]:ae._f.ref;if(Co(Ve)){const Oe=Ve.closest("form");if(Oe){Oe.reset();break}}}}r={}}i=t.shouldUnregister?P.keepDefaultValues?ut(s):{}:ut(L),d.array.next({values:{...L}}),d.values.next({values:{...L}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!P.keepIsValid||!!P.keepDirtyValues,o.watch=!!t.shouldUnregister,d.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:B?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!jn(C,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:B?{}:P.keepDirtyValues?P.keepDefaultValues&&i?Ns(s,i):n.dirtyFields:P.keepDefaultValues&&C?Ns(s,C):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ce=(C,P)=>he(en(C)?C(i):C,P);return{control:{register:ve,unregister:st,getFieldState:Be,handleSubmit:we,setError:Qe,_executeSchema:R,_getWatch:U,_getDirty:M,_updateValid:v,_removeUnmounted:I,_updateFieldArray:b,_updateDisabledField:ue,_getFieldArray:F,_reset:he,_resetDefaultValues:()=>en(t.defaultValues)&&t.defaultValues().then(C=>{Ce(C,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:C=>{n={...n,...C}},_disableForm:Fe,_subjects:d,_proxyFormState:u,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(C){o=C},get _defaultValues(){return s},get _names(){return a},set _names(C){a=C},get _formState(){return n},set _formState(C){n=C},get _options(){return t},set _options(C){t={...t,...C}}},trigger:fe,register:ve,handleSubmit:we,watch:jt,setValue:Z,getValues:ye,reset:Ce,resetField:G,clearErrors:Ge,unregister:st,setError:Qe,setFocus:(C,P={})=>{const j=$(r,C),z=j&&j._f;if(z){const B=z.refs?z.refs[0]:z.ref;B.focus&&(B.focus(),P.shouldSelect&&en(B.select)&&B.select())}},getFieldState:Be}}function lA(e={}){const t=de.useRef(void 0),n=de.useRef(void 0),[r,s]=de.useState({isDirty:!1,isValidating:!1,isLoading:en(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:en(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...cA(e),formState:r});const i=t.current.control;return i._options=e,uu({subject:i._subjects.state,next:o=>{Zg(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),de.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),de.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),de.useEffect(()=>{e.values&&!jn(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),de.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),de.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),de.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=qg(r,i),t.current}var uA="Label",ry=m.forwardRef((e,t)=>f.jsx(lt.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ry.displayName=uA;var sy=ry;const dA=Go("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),iy=m.forwardRef(({className:e,...t},n)=>f.jsx(sy,{ref:n,className:V(dA(),e),...t}));iy.displayName=sy.displayName;const pO=ZT,oy=m.createContext({}),fA=({...e})=>f.jsx(oy.Provider,{value:{name:e.name},children:f.jsx(XT,{...e})}),ra=()=>{const e=m.useContext(oy),t=m.useContext(ay),{getFieldState:n,formState:r}=na(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},ay=m.createContext({}),cy=m.forwardRef(({className:e,...t},n)=>{const r=m.useId();return f.jsx(ay.Provider,{value:{id:r},children:f.jsx("div",{ref:n,className:V("space-y-2",e),...t})})});cy.displayName="FormItem";const ly=m.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=ra();return f.jsx(iy,{ref:n,className:V(r&&"text-destructive",e),htmlFor:s,...t})});ly.displayName="FormLabel";const uy=m.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=ra();return f.jsx(ms,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});uy.displayName="FormControl";const hA=m.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=ra();return f.jsx("p",{ref:n,id:r,className:V("text-[0.8rem] text-muted-foreground",e),...t})});hA.displayName="FormDescription";const dy=m.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=ra(),o=s?String(s==null?void 0:s.message):t;return o?f.jsx("p",{ref:r,id:i,className:V("text-[0.8rem] font-medium text-destructive",e),...n,children:o}):null});dy.displayName="FormMessage";const Lc=m.forwardRef(({className:e,type:t,...n},r)=>t!=="file"?f.jsx("input",{type:t,className:V("flex h-14 rounded-[2px] border p-4 focus:border-[3px] focus:outline-none focus:border-primary transition-all hover:border-on_surface border-outline bg-transparent text-base w-regular file:border-0 file:bg-secondary_container file:outline-none file:text-sm file:w-fit file:text-on_secondary_container file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}):f.jsxs("div",{className:"relative w-[160px] h-9 overflow-hidden !cursor-pointer",children:[f.jsx("input",{ref:r,accept:".pdf, .png, .jpeg, .jpg",type:t,className:V("h-9 absolute top-0 left-0 !cursor-pointer opacity-0 z-20 size-full"),...n}),f.jsxs("div",{className:"absolute rounded-[2px] cursor-pointer size-full flex items-center gap-4 px-3 py-2.5 top-0 left-0 bg-secondary_container",children:[f.jsx(l0,{className:"cursor-pointer",size:16})," Upload file"]})]}));Lc.displayName="Input";const fy=m.forwardRef(({className:e,...t},n)=>f.jsx("textarea",{className:V("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));fy.displayName="Textarea";const Jf=e=>{let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,h))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,s,a);return a},pA=e=>e?Jf(e):Jf,mA=e=>e;function gA(e,t=mA){const n=de.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return de.useDebugValue(n),n}const yA=e=>{const t=pA(e),n=r=>gA(t,r);return Object.assign(n,t),n},hy=e=>yA;function vA(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var i;const o=c=>c===null?null:JSON.parse(c,void 0),a=(i=n.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>n.setItem(s,JSON.stringify(i,void 0)),removeItem:s=>n.removeItem(s)}}const Fc=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Fc(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Fc(r)(n)}}}},xA=(e,t)=>(n,r,s)=>{let i={storage:vA(()=>localStorage),partialize:p=>p,version:0,merge:(p,v)=>({...v,...p}),...t},o=!1;const a=new Set,c=new Set;let l=i.storage;if(!l)return e((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...p)},r,s);const u=()=>{const p=i.partialize({...r()});return l.setItem(i.name,{state:p,version:i.version})},d=s.setState;s.setState=(p,v)=>{d(p,v),u()};const h=e((...p)=>{n(...p),u()},r,s);s.getInitialState=()=>h;let y;const g=()=>{var p,v;if(!l)return;o=!1,a.forEach(b=>{var w;return b((w=r())!=null?w:h)});const x=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(p=r())!=null?p:h))||void 0;return Fc(l.getItem.bind(l))(i.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate){const w=i.migrate(b.state,b.version);return w instanceof Promise?w.then(_=>[!0,_]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[_,S]=b;if(y=i.merge(S,(w=r())!=null?w:h),n(y,!0),_)return u()}).then(()=>{x==null||x(y,void 0),y=r(),o=!0,c.forEach(b=>b(y))}).catch(b=>{x==null||x(void 0,b)})};return s.persist={setOptions:p=>{i={...i,...p},p.storage&&(l=p.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:p=>(a.add(p),()=>{a.delete(p)}),onFinishHydration:p=>(c.add(p),()=>{c.delete(p)})},i.skipHydration||g(),y||h},bA=xA;var Ze=(e=>(e.EN="en",e.RU="ru",e.TM="tm",e))(Ze||{});const _e=hy()(bA(e=>({lang:"en",setLang:t=>e({lang:t})}),{name:"lang-storage"})),mO=({control:e,name:t,label:n,placeholder:r,error:s,type:i="text",className:o,disabled:a,textArea:c=!1,textDark:l,supporText:u,handleChange:d,onPrimary:h=!1})=>{const y=_e(g=>g.lang);return f.jsx(fA,{control:e,name:t,render:({field:g})=>f.jsxs(cy,{className:V(o,"flex flex-col w-full relative"),children:[f.jsx(ly,{className:V("text-xl",h&&"!text-on_primary",l?"text-on_surface":"text-on_surface_v"),children:n}),f.jsx(uy,{children:f.jsx(f.Fragment,{children:c?f.jsx(fy,{rows:3,...g,placeholder:r,className:V(s&&"border-[#BA1A1A]",h&&"border-primary_outline_reverse focus:border-white hover:border-white focus:border-1 text-on_primary")}):i!=="file"?f.jsx(Lc,{...g,type:i,placeholder:r,disabled:a,className:V(s&&"border-[#BA1A1A]",h&&"border-primary_outline_reverse focus:border-white hover:border-white focus:border-1 text-on_primary")}):f.jsxs("div",{className:"relative",children:[f.jsx(Lc,{type:"file",placeholder:r,onChange:p=>{var x;const v=((x=p.target.files)==null?void 0:x[0])||null;console.log("Выбранный файл:",v),g.onChange(v),d&&d(p)},disabled:a}),g.value&&f.jsxs("div",{className:"text-sm mt-2 text-gray-500 absolute top-8",children:[{ru:"Выбранный файл:",en:"Selected file:",tm:"Saýlanan faýl:"}[y]," ",g.value.name]})]})})}),f.jsx(dy,{className:V("absolute -bottom-5 left-0 text-sm font-medium leading-[130%]",s&&h?"text-teritary_04":"text-[#BA1A1A]"),children:s?s.message:u})]})})},gO=({className:e,delay:t=.15})=>{const n=_e(r=>r.lang);return f.jsxs(zs.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0,transition:{delay:t}},className:V("flex flex-col gap-8 my-16",e),children:[f.jsx("h3",{className:"text-3xl text-center",children:{ru:"Форма успешно отправлена!",en:"Form submitted successfully!",tm:"Forma üstünlikli ugradyldy!"}[n]}),f.jsx(Se,{className:"w-fit mx-auto",to:"/",children:f.jsx(tt,{variant:"outline",children:{ru:"Вернуться на главную",en:"Back to home",tm:"Baş sahypa gaýdyp barmak"}[n]})})]})},wA=({className:e,slides:t,active:n,scrollTo:r})=>f.jsx("div",{className:V("flex items-center justify-center gap-2",e),children:Array.from({length:t}).map((s,i)=>f.jsx("span",{onClick:()=>r==null?void 0:r(i),className:V(n===i?"dot-active":"dot")},i))}),SA=["top","right","bottom","left"],Wn=Math.min,gt=Math.max,Ao=Math.round,Yi=Math.floor,sn=e=>({x:e,y:e}),_A={left:"right",right:"left",bottom:"top",top:"bottom"},CA={start:"end",end:"start"};function Vc(e,t,n){return gt(e,Wn(t,n))}function Sn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function hu(e){return e==="x"?"y":"x"}function pu(e){return e==="y"?"height":"width"}function Hn(e){return["top","bottom"].includes(_n(e))?"y":"x"}function mu(e){return hu(Hn(e))}function EA(e,t,n){n===void 0&&(n=!1);const r=bs(e),s=mu(e),i=pu(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ro(o)),[o,Ro(o)]}function TA(e){const t=Ro(e);return[Bc(e),t,Bc(t)]}function Bc(e){return e.replace(/start|end/g,t=>CA[t])}function AA(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function RA(e,t,n,r){const s=bs(e);let i=AA(_n(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Bc)))),i}function Ro(e){return e.replace(/left|right|bottom|top/g,t=>_A[t])}function PA(e){return{top:0,right:0,bottom:0,left:0,...e}}function py(e){return typeof e!="number"?PA(e):{top:e,right:e,bottom:e,left:e}}function Po(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function eh(e,t,n){let{reference:r,floating:s}=e;const i=Hn(t),o=mu(t),a=pu(o),c=_n(t),l=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let y;switch(c){case"top":y={x:u,y:r.y-s.height};break;case"bottom":y={x:u,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:d};break;case"left":y={x:r.x-s.width,y:d};break;default:y={x:r.x,y:r.y}}switch(bs(t)){case"start":y[o]-=h*(n&&l?-1:1);break;case"end":y[o]+=h*(n&&l?-1:1);break}return y}const NA=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=eh(l,r,c),h=r,y={},g=0;for(let p=0;p({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=Sn(e,t)||{};if(l==null)return{};const d=py(u),h={x:n,y:r},y=mu(s),g=pu(y),p=await o.getDimensions(l),v=y==="y",x=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[y]-h[y]-i.floating[g],S=h[y]-i.reference[y],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let A=T?T[w]:0;(!A||!await(o.isElement==null?void 0:o.isElement(T)))&&(A=a.floating[w]||i.floating[g]);const R=_/2-S/2,N=A/2-p[g]/2-1,O=Wn(d[x],N),I=Wn(d[b],N),M=O,U=A-p[g]-I,F=A/2-p[g]/2+R,X=Vc(M,F,U),Y=!c.arrow&&bs(s)!=null&&F!==X&&i.reference[g]/2-(FF<=0)){var I,M;const F=(((I=i.flip)==null?void 0:I.index)||0)+1,X=A[F];if(X)return{data:{index:F,overflows:O},reset:{placement:X}};let Y=(M=O.filter(Z=>Z.overflows[0]<=0).sort((Z,K)=>Z.overflows[1]-K.overflows[1])[0])==null?void 0:M.placement;if(!Y)switch(y){case"bestFit":{var U;const Z=(U=O.filter(K=>{if(T){const se=Hn(K.placement);return se===b||se==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(se=>se>0).reduce((se,fe)=>se+fe,0)]).sort((K,se)=>K[1]-se[1])[0])==null?void 0:U[0];Z&&(Y=Z);break}case"initialPlacement":Y=a;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function th(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nh(e){return SA.some(t=>e[t]>=0)}const OA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Sn(e,t);switch(r){case"referenceHidden":{const i=await ni(t,{...s,elementContext:"reference"}),o=th(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:nh(o)}}}case"escaped":{const i=await ni(t,{...s,altBoundary:!0}),o=th(i,n.floating);return{data:{escapedOffsets:o,escaped:nh(o)}}}default:return{}}}}};async function MA(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=_n(n),a=bs(n),c=Hn(n)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,d=Sn(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),c?{x:y*u,y:h*l}:{x:h*l,y:y*u}}const DA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,c=await MA(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},IA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...c}=Sn(e,t),l={x:n,y:r},u=await ni(t,c),d=Hn(_n(s)),h=hu(d);let y=l[h],g=l[d];if(i){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=y+u[v],w=y-u[x];y=Vc(b,y,w)}if(o){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=g+u[v],w=g-u[x];g=Vc(b,g,w)}const p=a.fn({...t,[h]:y,[d]:g});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:i,[d]:o}}}}}},LA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Sn(e,t),u={x:n,y:r},d=Hn(s),h=hu(d);let y=u[h],g=u[d];const p=Sn(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const w=h==="y"?"height":"width",_=i.reference[h]-i.floating[w]+v.mainAxis,S=i.reference[h]+i.reference[w]-v.mainAxis;y<_?y=_:y>S&&(y=S)}if(l){var x,b;const w=h==="y"?"width":"height",_=["top","left"].includes(_n(s)),S=i.reference[d]-i.floating[w]+(_&&((x=o.offset)==null?void 0:x[d])||0)+(_?0:v.crossAxis),T=i.reference[d]+i.reference[w]+(_?0:((b=o.offset)==null?void 0:b[d])||0)-(_?v.crossAxis:0);gT&&(g=T)}return{[h]:y,[d]:g}}}},FA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:c=()=>{},...l}=Sn(e,t),u=await ni(t,l),d=_n(s),h=bs(s),y=Hn(s)==="y",{width:g,height:p}=i.floating;let v,x;d==="top"||d==="bottom"?(v=d,x=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,v=h==="end"?"top":"bottom");const b=p-u.top-u.bottom,w=g-u.left-u.right,_=Wn(p-u[v],b),S=Wn(g-u[x],w),T=!t.middlewareData.shift;let A=_,R=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),T&&!h){const O=gt(u.left,0),I=gt(u.right,0),M=gt(u.top,0),U=gt(u.bottom,0);y?R=g-2*(O!==0||I!==0?O+I:gt(u.left,u.right)):A=p-2*(M!==0||U!==0?M+U:gt(u.top,u.bottom))}await c({...t,availableWidth:R,availableHeight:A});const N=await o.getDimensions(a.floating);return g!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function sa(){return typeof window<"u"}function ws(e){return my(e)?(e.nodeName||"").toLowerCase():"#document"}function bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dn(e){var t;return(t=(my(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function my(e){return sa()?e instanceof Node||e instanceof bt(e).Node:!1}function Bt(e){return sa()?e instanceof Element||e instanceof bt(e).Element:!1}function an(e){return sa()?e instanceof HTMLElement||e instanceof bt(e).HTMLElement:!1}function rh(e){return!sa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bt(e).ShadowRoot}function ji(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=$t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function VA(e){return["table","td","th"].includes(ws(e))}function ia(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gu(e){const t=yu(),n=Bt(e)?$t(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function BA(e){let t=qn(e);for(;an(t)&&!ls(t);){if(gu(t))return t;if(ia(t))return null;t=qn(t)}return null}function yu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ls(e){return["html","body","#document"].includes(ws(e))}function $t(e){return bt(e).getComputedStyle(e)}function oa(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rh(e)&&e.host||dn(e);return rh(t)?t.host:t}function gy(e){const t=qn(e);return ls(t)?e.ownerDocument?e.ownerDocument.body:e.body:an(t)&&ji(t)?t:gy(t)}function ri(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=gy(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=bt(s);if(i){const a=$c(o);return t.concat(o,o.visualViewport||[],ji(s)?s:[],a&&n?ri(a):[])}return t.concat(s,ri(s,[],n))}function $c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yy(e){const t=$t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=an(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Ao(n)!==i||Ao(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function vu(e){return Bt(e)?e:e.contextElement}function qr(e){const t=vu(e);if(!an(t))return sn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=yy(t);let o=(i?Ao(n.width):n.width)/r,a=(i?Ao(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const $A=sn(0);function vy(e){const t=bt(e);return!yu()||!t.visualViewport?$A:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==bt(e)?!1:t}function _r(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=vu(e);let o=sn(1);t&&(r?Bt(r)&&(o=qr(r)):o=qr(e));const a=UA(i,n,r)?vy(i):sn(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const h=bt(i),y=r&&Bt(r)?bt(r):r;let g=h,p=$c(g);for(;p&&r&&y!==g;){const v=qr(p),x=p.getBoundingClientRect(),b=$t(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,_=x.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,d*=v.y,c+=w,l+=_,g=bt(p),p=$c(g)}}return Po({width:u,height:d,x:c,y:l})}function xu(e,t){const n=oa(e).scrollLeft;return t?t.left+n:_r(dn(e)).left+n}function xy(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:xu(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function zA(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=dn(r),a=t?ia(t.floating):!1;if(r===o||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=sn(1);const u=sn(0),d=an(r);if((d||!d&&!i)&&((ws(r)!=="body"||ji(o))&&(c=oa(r)),an(r))){const y=_r(r);l=qr(r),u.x=y.x+r.clientLeft,u.y=y.y+r.clientTop}const h=o&&!d&&!i?xy(o,c,!0):sn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-c.scrollTop*l.y+u.y+h.y}}function WA(e){return Array.from(e.getClientRects())}function HA(e){const t=dn(e),n=oa(e),r=e.ownerDocument.body,s=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+xu(e);const a=-n.scrollTop;return $t(r).direction==="rtl"&&(o+=gt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function qA(e,t){const n=bt(e),r=dn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=yu();(!l||l&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function ZA(e,t){const n=_r(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=an(e)?qr(e):sn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,c=s*i.x,l=r*i.y;return{width:o,height:a,x:c,y:l}}function sh(e,t,n){let r;if(t==="viewport")r=qA(e,n);else if(t==="document")r=HA(dn(e));else if(Bt(t))r=ZA(t,n);else{const s=vy(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Po(r)}function by(e,t){const n=qn(e);return n===t||!Bt(n)||ls(n)?!1:$t(n).position==="fixed"||by(n,t)}function KA(e,t){const n=t.get(e);if(n)return n;let r=ri(e,[],!1).filter(a=>Bt(a)&&ws(a)!=="body"),s=null;const i=$t(e).position==="fixed";let o=i?qn(e):e;for(;Bt(o)&&!ls(o);){const a=$t(o),c=gu(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ji(o)&&!c&&by(e,o))?r=r.filter(u=>u!==o):s=a,o=qn(o)}return t.set(e,r),r}function GA(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?ia(t)?[]:KA(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((l,u)=>{const d=sh(t,u,s);return l.top=gt(d.top,l.top),l.right=Wn(d.right,l.right),l.bottom=Wn(d.bottom,l.bottom),l.left=gt(d.left,l.left),l},sh(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function QA(e){const{width:t,height:n}=yy(e);return{width:t,height:n}}function XA(e,t,n){const r=an(t),s=dn(t),i=n==="fixed",o=_r(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=sn(0);if(r||!r&&!i)if((ws(t)!=="body"||ji(s))&&(a=oa(t)),r){const h=_r(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else s&&(c.x=xu(s));const l=s&&!r&&!i?xy(s,a):sn(0),u=o.left+a.scrollLeft-c.x-l.x,d=o.top+a.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function Wa(e){return $t(e).position==="static"}function ih(e,t){if(!an(e)||$t(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dn(e)===n&&(n=n.ownerDocument.body),n}function wy(e,t){const n=bt(e);if(ia(e))return n;if(!an(e)){let s=qn(e);for(;s&&!ls(s);){if(Bt(s)&&!Wa(s))return s;s=qn(s)}return n}let r=ih(e,t);for(;r&&VA(r)&&Wa(r);)r=ih(r,t);return r&&ls(r)&&Wa(r)&&!gu(r)?n:r||BA(e)||n}const YA=async function(e){const t=this.getOffsetParent||wy,n=this.getDimensions,r=await n(e.floating);return{reference:XA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function JA(e){return $t(e).direction==="rtl"}const eR={convertOffsetParentRelativeRectToViewportRelativeRect:zA,getDocumentElement:dn,getClippingRect:GA,getOffsetParent:wy,getElementRects:YA,getClientRects:WA,getDimensions:QA,getScale:qr,isElement:Bt,isRTL:JA};function Sy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tR(e,t){let n=null,r;const s=dn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:h,height:y}=l;if(a||t(),!h||!y)return;const g=Yi(d),p=Yi(s.clientWidth-(u+h)),v=Yi(s.clientHeight-(d+y)),x=Yi(u),w={rootMargin:-g+"px "+-p+"px "+-v+"px "+-x+"px",threshold:gt(0,Wn(1,c))||1};let _=!0;function S(T){const A=T[0].intersectionRatio;if(A!==c){if(!_)return o();A?o(!1,A):r=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!Sy(l,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return o(!0),i}function nR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=vu(e),u=s||i?[...l?ri(l):[],...ri(t)]:[];u.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const d=l&&a?tR(l,n):null;let h=-1,y=null;o&&(y=new ResizeObserver(x=>{let[b]=x;b&&b.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),l&&!c&&y.observe(l),y.observe(t));let g,p=c?_r(e):null;c&&v();function v(){const x=_r(e);p&&!Sy(p,x)&&n(),p=x,g=requestAnimationFrame(v)}return n(),()=>{var x;u.forEach(b=>{s&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const rR=DA,sR=IA,iR=jA,oR=FA,aR=OA,oh=kA,cR=LA,lR=(e,t,n)=>{const r=new Map,s={platform:eR,...n},i={...s.platform,_c:r};return NA(e,t,{...s,platform:i})};var co=typeof document<"u"?m.useLayoutEffect:m.useEffect;function No(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!No(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!No(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function _y(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ah(e,t){const n=_y(e);return Math.round(t*n)/n}function Ha(e){const t=m.useRef(e);return co(()=>{t.current=e}),t}function uR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,y]=m.useState(r);No(h,r)||y(r);const[g,p]=m.useState(null),[v,x]=m.useState(null),b=m.useCallback(K=>{K!==T.current&&(T.current=K,p(K))},[]),w=m.useCallback(K=>{K!==A.current&&(A.current=K,x(K))},[]),_=i||g,S=o||v,T=m.useRef(null),A=m.useRef(null),R=m.useRef(u),N=c!=null,O=Ha(c),I=Ha(s),M=Ha(l),U=m.useCallback(()=>{if(!T.current||!A.current)return;const K={placement:t,strategy:n,middleware:h};I.current&&(K.platform=I.current),lR(T.current,A.current,K).then(se=>{const fe={...se,isPositioned:M.current!==!1};F.current&&!No(R.current,fe)&&(R.current=fe,ul.flushSync(()=>{d(fe)}))})},[h,t,n,I,M]);co(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(K=>({...K,isPositioned:!1})))},[l]);const F=m.useRef(!1);co(()=>(F.current=!0,()=>{F.current=!1}),[]),co(()=>{if(_&&(T.current=_),S&&(A.current=S),_&&S){if(O.current)return O.current(_,S,U);U()}},[_,S,U,O,N]);const X=m.useMemo(()=>({reference:T,floating:A,setReference:b,setFloating:w}),[b,w]),Y=m.useMemo(()=>({reference:_,floating:S}),[_,S]),Z=m.useMemo(()=>{const K={position:n,left:0,top:0};if(!Y.floating)return K;const se=ah(Y.floating,u.x),fe=ah(Y.floating,u.y);return a?{...K,transform:"translate("+se+"px, "+fe+"px)",..._y(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:fe}},[n,a,Y.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:U,refs:X,elements:Y,floatingStyles:Z}),[u,U,X,Y,Z])}const dR=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?oh({element:r.current,padding:s}).fn(n):{}:r?oh({element:r,padding:s}).fn(n):{}}}},fR=(e,t)=>({...rR(e),options:[e,t]}),hR=(e,t)=>({...sR(e),options:[e,t]}),pR=(e,t)=>({...cR(e),options:[e,t]}),mR=(e,t)=>({...iR(e),options:[e,t]}),gR=(e,t)=>({...oR(e),options:[e,t]}),yR=(e,t)=>({...aR(e),options:[e,t]}),vR=(e,t)=>({...dR(e),options:[e,t]});var xR="Arrow",Cy=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return f.jsx(lt.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cy.displayName=xR;var bR=Cy;function wR(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ch=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},SR=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{};function _R(e){const[t,n]=m.useState(void 0);return SR(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bu="Popper",[Ey,Ty]=ml(bu),[CR,Ay]=Ey(bu),Ry=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return f.jsx(CR,{scope:t,anchor:r,onAnchorChange:s,children:n})};Ry.displayName=bu;var Py="PopperAnchor",Ny=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=Ay(Py,n),o=m.useRef(null),a=zt(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:f.jsx(lt.div,{...s,ref:a})});Ny.displayName=Py;var wu="PopperContent",[ER,TR]=Ey(wu),ky=m.forwardRef((e,t)=>{var ue,ve,je,Fe,we,G;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:y="optimized",onPlaced:g,...p}=e,v=Ay(wu,n),[x,b]=m.useState(null),w=zt(t,he=>b(he)),[_,S]=m.useState(null),T=_R(_),A=(T==null?void 0:T.width)??0,R=(T==null?void 0:T.height)??0,N=r+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(l)?l:[l],M=I.length>0,U={padding:O,boundary:I.filter(RR),altBoundary:M},{refs:F,floatingStyles:X,placement:Y,isPositioned:Z,middlewareData:K}=uR({strategy:"fixed",placement:N,whileElementsMounted:(...he)=>nR(...he,{animationFrame:y==="always"}),elements:{reference:v.anchor},middleware:[fR({mainAxis:s+R,alignmentAxis:o}),c&&hR({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?pR():void 0,...U}),c&&mR({...U}),gR({...U,apply:({elements:he,rects:Ce,availableWidth:Ue,availableHeight:mt})=>{const{width:Et,height:C}=Ce.reference,P=he.floating.style;P.setProperty("--radix-popper-available-width",`${Ue}px`),P.setProperty("--radix-popper-available-height",`${mt}px`),P.setProperty("--radix-popper-anchor-width",`${Et}px`),P.setProperty("--radix-popper-anchor-height",`${C}px`)}}),_&&vR({element:_,padding:a}),PR({arrowWidth:A,arrowHeight:R}),h&&yR({strategy:"referenceHidden",...U})]}),[se,fe]=My(Y),ye=wR(g);ch(()=>{Z&&(ye==null||ye())},[Z,ye]);const Be=(ue=K.arrow)==null?void 0:ue.x,Ge=(ve=K.arrow)==null?void 0:ve.y,Qe=((je=K.arrow)==null?void 0:je.centerOffset)!==0,[jt,st]=m.useState();return ch(()=>{x&&st(window.getComputedStyle(x).zIndex)},[x]),f.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:jt,"--radix-popper-transform-origin":[(Fe=K.transformOrigin)==null?void 0:Fe.x,(we=K.transformOrigin)==null?void 0:we.y].join(" "),...((G=K.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(ER,{scope:n,placedSide:se,onArrowChange:S,arrowX:Be,arrowY:Ge,shouldHideArrow:Qe,children:f.jsx(lt.div,{"data-side":se,"data-align":fe,...p,ref:w,style:{...p.style,animation:Z?void 0:"none"}})})})});ky.displayName=wu;var jy="PopperArrow",AR={top:"bottom",right:"left",bottom:"top",left:"right"},Oy=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=TR(jy,r),o=AR[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(bR,{...s,ref:n,style:{...s.style,display:"block"}})})});Oy.displayName=jy;function RR(e){return e!==null}var PR=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:n,rects:r,middlewareData:s}=t,o=((v=s.arrow)==null?void 0:v.centerOffset)!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,u]=My(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((x=s.arrow)==null?void 0:x.x)??0)+a/2,y=(((b=s.arrow)==null?void 0:b.y)??0)+c/2;let g="",p="";return l==="bottom"?(g=o?d:`${h}px`,p=`${-c}px`):l==="top"?(g=o?d:`${h}px`,p=`${r.floating.height+c}px`):l==="right"?(g=`${-c}px`,p=o?d:`${y}px`):l==="left"&&(g=`${r.floating.width+c}px`,p=o?d:`${y}px`),{data:{x:g,y:p}}}});function My(e){const[t,n="center"]=e.split("-");return[t,n]}var NR=Ry,Dy=Ny,kR=ky,jR=Oy,Su="Popover",[Iy,yO]=ml(Su,[Ty]),Oi=Ty(),[OR,Yn]=Iy(Su),Ly=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=e,a=Oi(t),c=m.useRef(null),[l,u]=m.useState(!1),[d=!1,h]=fp({prop:r,defaultProp:s,onChange:i});return f.jsx(NR,{...a,children:f.jsx(OR,{scope:t,contentId:to(),triggerRef:c,open:d,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(y=>!y),[h]),hasCustomAnchor:l,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:o,children:n})})};Ly.displayName=Su;var Fy="PopoverAnchor",MR=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Yn(Fy,n),i=Oi(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return m.useEffect(()=>(o(),()=>a()),[o,a]),f.jsx(Dy,{...i,...r,ref:t})});MR.displayName=Fy;var Vy="PopoverTrigger",By=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Yn(Vy,n),i=Oi(n),o=zt(t,s.triggerRef),a=f.jsx(lt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Hy(s.open),...r,ref:o,onClick:vt(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?a:f.jsx(Dy,{asChild:!0,...i,children:a})});By.displayName=Vy;var _u="PopoverPortal",[DR,IR]=Iy(_u,{forceMount:void 0}),$y=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,i=Yn(_u,t);return f.jsx(DR,{scope:t,forceMount:n,children:f.jsx(gs,{present:n||i.open,children:f.jsx(vl,{asChild:!0,container:s,children:r})})})};$y.displayName=_u;var us="PopoverContent",Uy=m.forwardRef((e,t)=>{const n=IR(us,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,i=Yn(us,e.__scopePopover);return f.jsx(gs,{present:r||i.open,children:i.modal?f.jsx(LR,{...s,ref:t}):f.jsx(FR,{...s,ref:t})})});Uy.displayName=us;var LR=m.forwardRef((e,t)=>{const n=Yn(us,e.__scopePopover),r=m.useRef(null),s=zt(t,r),i=m.useRef(!1);return m.useEffect(()=>{const o=r.current;if(o)return Tp(o)},[]),f.jsx(xl,{as:ms,allowPinchZoom:!0,children:f.jsx(zy,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vt(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:vt(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:vt(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),FR=m.forwardRef((e,t)=>{const n=Yn(us,e.__scopePopover),r=m.useRef(!1),s=m.useRef(!1);return f.jsx(zy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),zy=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,h=Yn(us,n),y=Oi(n);return yp(),f.jsx(yl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:f.jsx(gl,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:f.jsx(kR,{"data-state":Hy(h.open),role:"dialog",id:h.contentId,...y,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Wy="PopoverClose",VR=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Yn(Wy,n);return f.jsx(lt.button,{type:"button",...r,ref:t,onClick:vt(e.onClick,()=>s.onOpenChange(!1))})});VR.displayName=Wy;var BR="PopoverArrow",$R=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Oi(n);return f.jsx(jR,{...s,...r,ref:t})});$R.displayName=BR;function Hy(e){return e?"open":"closed"}var UR=Ly,zR=By,WR=$y,qy=Uy;const Zy=UR,Ky=zR,Cu=m.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>f.jsx(WR,{children:f.jsx(qy,{ref:s,align:t,sideOffset:n,className:V("z-50 w-32 rounded-[2px] bg-white p-4 text-popover-foreground drop-shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Cu.displayName=qy.displayName;const HR=[{lang:Ze.RU},{lang:Ze.EN},{lang:Ze.TM}],lh={[Ze.RU]:"/ru.svg",[Ze.EN]:"/english.svg",[Ze.TM]:"/tm.png"},qR={[Ze.RU]:"Ру",[Ze.EN]:"En",[Ze.TM]:"Tm"},ZR={[Ze.RU]:"Русский",[Ze.EN]:"English",[Ze.TM]:"Türkmen"},uh=({className:e,light:t=!1})=>{const n=_e(o=>o.lang),r=_e(o=>o.setLang),[s,i]=m.useState(!1);return f.jsxs(Zy,{open:s,onOpenChange:()=>i(!s),children:[f.jsxs(Ky,{className:V("flex text-white items-center gap-2",t?"text-white":"text-black",e),children:[f.jsx("img",{src:lh[n],alt:""}),qR[n],f.jsx("svg",{width:"20",height:"20",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:t?"#fff":"#000"})})]}),f.jsx(Cu,{className:"flex flex-col gap-6 w-fit relative z-[200] py-2 px-4 bg-surface_container",children:HR.filter(o=>o.lang!==n).map((o,a)=>f.jsxs("div",{onClick:()=>{r(o.lang),i(!1)},className:"flex gap-3 py-2 items-center cursor-pointer",children:[f.jsx("img",{src:lh[o.lang],alt:"flag"}),f.jsx("h5",{children:ZR[o.lang]})]},a))})]})},Gy=zp,Qy=Wp,KR=Hp,Xy=m.forwardRef(({className:e,...t},n)=>f.jsx(Ho,{ref:n,className:V("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Xy.displayName=Ho.displayName;const Eu=m.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(KR,{children:[f.jsx(Xy,{}),f.jsxs(qo,{ref:r,className:V("fixed left-[50%] top-[50%] z-50 grid 2xl:w-[40%] lg:w-1/2 w-[70%] translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background md:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,f.jsxs(Cl,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[f.jsx(El,{className:"size-6"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Eu.displayName=qo.displayName;const GR=m.forwardRef(({className:e,...t},n)=>f.jsx(Zo,{ref:n,className:V("text-lg font-semibold leading-none tracking-tight",e),...t}));GR.displayName=Zo.displayName;const QR=m.forwardRef(({className:e,...t},n)=>f.jsx(Ko,{ref:n,className:V("text-sm text-muted-foreground",e),...t}));QR.displayName=Ko.displayName;const dh=(e,t,n)=>{if(e&&"reportValidity"in e){const r=$(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Yy=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?dh(r.ref,n,e):r.refs&&r.refs.forEach(s=>dh(s,n,e))}},XR=(e,t)=>{t.shouldUseNativeValidation&&Yy(e,t);const n={};for(const r in e){const s=$(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(YR(t.names||Object.keys(e),r)){const o=Object.assign({},$(n,r));xe(o,"root",i),xe(n,r,o)}else xe(n,r,i)}return n},YR=(e,t)=>e.some(n=>n.startsWith(t+"."));var JR=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=Qg(o,t,n,s,l?[].concat(l,r.message):r.message)}e.shift()}return n},eP=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return i.shouldUseNativeValidation&&Yy({},i),{errors:{},values:n.raw?r:l}})}catch(l){return a(l)}return c&&c.then?c.then(void 0,a):c}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:XR(JR(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},ge;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ge||(ge={}));var Uc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Uc||(Uc={}));const H=ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gn=e=>{switch(typeof e){case"undefined":return H.undefined;case"string":return H.string;case"number":return isNaN(e)?H.nan:H.number;case"boolean":return H.boolean;case"function":return H.function;case"bigint":return H.bigint;case"symbol":return H.symbol;case"object":return Array.isArray(e)?H.array:e===null?H.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?H.promise:typeof Map<"u"&&e instanceof Map?H.map:typeof Set<"u"&&e instanceof Set?H.set:typeof Date<"u"&&e instanceof Date?H.date:H.object;default:return H.unknown}},D=ge.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),tP=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class wt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;cn.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}wt.create=e=>new wt(e);const ds=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===H.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ge.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${ge.joinValues(e.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ge.joinValues(e.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${ge.joinValues(e.options)}, received '${e.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ge.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case D.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case D.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=t.defaultError,ge.assertNever(e)}return{message:n}};let Jy=ds;function nP(e){Jy=e}function ko(){return Jy}const jo=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)a=l(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},rP=[];function W(e,t){const n=ko(),r=jo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ds?void 0:ds].filter(s=>!!s)});e.common.issues.push(r)}class nt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return re;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return nt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return re;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const re=Object.freeze({status:"aborted"}),zr=e=>({status:"dirty",value:e}),ct=e=>({status:"valid",value:e}),zc=e=>e.status==="aborted",Wc=e=>e.status==="dirty",Cr=e=>e.status==="valid",si=e=>typeof Promise<"u"&&e instanceof Promise;function Oo(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ev(e,t,n,r,s){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Q||(Q={}));var Is,Ls;class cn{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fh=(e,t)=>{if(Cr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new wt(e.common.issues);return this._error=n,this._error}}};function oe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}},description:s}}class le{get description(){return this._def.description}_getType(t){return gn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:gn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new nt,ctx:{common:t.parent.common,data:t.data,parsedType:gn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(si(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gn(t)},i=this._parseSync({data:t,path:s.path,parent:s});return fh(s,i)}"~validate"(t){var n,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gn(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:s});return Cr(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(i=>Cr(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:gn(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(si(s)?s:Promise.resolve(s));return fh(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:D.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Ut({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return on.create(this,this._def)}nullable(){return Qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ft.create(this)}promise(){return hs.create(this,this._def)}or(t){return ci.create([this,t],this._def)}and(t){return li.create(this,t,this._def)}transform(t){return new Ut({...oe(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new pi({...oe(this._def),innerType:this,defaultValue:n,typeName:ne.ZodDefault})}brand(){return new Tu({typeName:ne.ZodBranded,type:this,...oe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new mi({...oe(this._def),innerType:this,catchValue:n,typeName:ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mi.create(this,t)}readonly(){return gi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sP=/^c[^\s-]{8,}$/i,iP=/^[0-9a-z]+$/,oP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,aP=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,cP=/^[a-z0-9_-]{21}$/i,lP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uP=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,dP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qa;const hP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,mP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,gP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tv="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xP=new RegExp(`^${tv}$`);function nv(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function bP(e){return new RegExp(`^${nv(e)}$`)}function rv(e){let t=`${tv}T${nv(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function wP(e,t){return!!((t==="v4"||!t)&&hP.test(e)||(t==="v6"||!t)&&mP.test(e))}function SP(e,t){if(!lP.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function _P(e,t){return!!((t==="v4"||!t)&&pP.test(e)||(t==="v6"||!t)&&gP.test(e))}class Lt extends le{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==H.string){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_type,expected:H.string,received:i.parsedType}),re}const r=new nt;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),W(s,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:n,code:D.invalid_string,...Q.errToObj(r)})}_addCheck(t){return new Lt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Q.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Q.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Q.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Q.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Q.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Q.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Q.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Q.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Q.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Q.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Q.errToObj(n)})}nonempty(t){return this.min(1,Q.errToObj(t))}trim(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Lt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Lt({checks:[],typeName:ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...oe(e)})};function CP(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class Zn extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==H.number){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_type,expected:H.number,received:i.parsedType}),re}let r;const s=new nt;for(const i of this._def.checks)i.kind==="int"?ge.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),W(r,{code:D.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?CP(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),W(r,{code:D.not_finite,message:i.message}),s.dirty()):ge.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Q.toString(n))}setLimit(t,n,r,s){return new Zn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Q.toString(s)}]})}_addCheck(t){return new Zn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Q.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&ge.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Zn({checks:[],typeName:ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...oe(e)});class Kn extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==H.bigint)return this._getInvalidInput(t);let r;const s=new nt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),W(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ge.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return W(n,{code:D.invalid_type,expected:H.bigint,received:n.parsedType}),re}gte(t,n){return this.setLimit("min",t,!0,Q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Q.toString(n))}setLimit(t,n,r,s){return new Kn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Q.toString(s)}]})}_addCheck(t){return new Kn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Q.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Kn({checks:[],typeName:ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...oe(e)})};class ii extends le{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==H.boolean){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.boolean,received:r.parsedType}),re}return ct(t.data)}}ii.create=e=>new ii({typeName:ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...oe(e)});class Er extends le{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==H.date){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_type,expected:H.date,received:i.parsedType}),re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return W(i,{code:D.invalid_date}),re}const r=new nt;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),W(s,{code:D.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ge.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Er({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Q.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Q.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Er({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ne.ZodDate,...oe(e)});class Mo extends le{_parse(t){if(this._getType(t)!==H.symbol){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.symbol,received:r.parsedType}),re}return ct(t.data)}}Mo.create=e=>new Mo({typeName:ne.ZodSymbol,...oe(e)});class oi extends le{_parse(t){if(this._getType(t)!==H.undefined){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.undefined,received:r.parsedType}),re}return ct(t.data)}}oi.create=e=>new oi({typeName:ne.ZodUndefined,...oe(e)});class ai extends le{_parse(t){if(this._getType(t)!==H.null){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.null,received:r.parsedType}),re}return ct(t.data)}}ai.create=e=>new ai({typeName:ne.ZodNull,...oe(e)});class fs extends le{constructor(){super(...arguments),this._any=!0}_parse(t){return ct(t.data)}}fs.create=e=>new fs({typeName:ne.ZodAny,...oe(e)});class xr extends le{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ct(t.data)}}xr.create=e=>new xr({typeName:ne.ZodUnknown,...oe(e)});class Cn extends le{_parse(t){const n=this._getOrReturnCtx(t);return W(n,{code:D.invalid_type,expected:H.never,received:n.parsedType}),re}}Cn.create=e=>new Cn({typeName:ne.ZodNever,...oe(e)});class Do extends le{_parse(t){if(this._getType(t)!==H.undefined){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.void,received:r.parsedType}),re}return ct(t.data)}}Do.create=e=>new Do({typeName:ne.ZodVoid,...oe(e)});class Ft extends le{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==H.array)return W(n,{code:D.invalid_type,expected:H.array,received:n.parsedType}),re;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(W(n,{code:D.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new cn(n,o,n.path,a)))).then(o=>nt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new cn(n,o,n.path,a)));return nt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Ft({...this._def,minLength:{value:t,message:Q.toString(n)}})}max(t,n){return new Ft({...this._def,maxLength:{value:t,message:Q.toString(n)}})}length(t,n){return new Ft({...this._def,exactLength:{value:t,message:Q.toString(n)}})}nonempty(t){return this.min(1,t)}}Ft.create=(e,t)=>new Ft({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...oe(t)});function Lr(e){if(e instanceof Ae){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=on.create(Lr(r))}return new Ae({...e._def,shape:()=>t})}else return e instanceof Ft?new Ft({...e._def,type:Lr(e.element)}):e instanceof on?on.create(Lr(e.unwrap())):e instanceof Qn?Qn.create(Lr(e.unwrap())):e instanceof ln?ln.create(e.items.map(t=>Lr(t))):e}class Ae extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ge.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==H.object){const l=this._getOrReturnCtx(t);return W(l,{code:D.invalid_type,expected:H.object,received:l.parsedType}),re}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Cn&&this._def.unknownKeys==="strip"))for(const l in s.data)o.includes(l)||a.push(l);const c=[];for(const l of o){const u=i[l],d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new cn(s,d,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof Cn){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(l==="strict")a.length>0&&(W(s,{code:D.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new cn(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,h=await u.value;l.push({key:d,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>nt.mergeObjectSync(r,l)):nt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Q.errToObj,new Ae({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const c=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Q.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Ae({...this._def,unknownKeys:"strip"})}passthrough(){return new Ae({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ae({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ae({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ae({...this._def,catchall:t})}pick(t){const n={};return ge.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ae({...this._def,shape:()=>n})}omit(t){const n={};return ge.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ae({...this._def,shape:()=>n})}deepPartial(){return Lr(this)}partial(t){const n={};return ge.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Ae({...this._def,shape:()=>n})}required(t){const n={};return ge.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof on;)i=i._def.innerType;n[r]=i}}),new Ae({...this._def,shape:()=>n})}keyof(){return sv(ge.objectKeys(this.shape))}}Ae.create=(e,t)=>new Ae({shape:()=>e,unknownKeys:"strip",catchall:Cn.create(),typeName:ne.ZodObject,...oe(t)});Ae.strictCreate=(e,t)=>new Ae({shape:()=>e,unknownKeys:"strict",catchall:Cn.create(),typeName:ne.ZodObject,...oe(t)});Ae.lazycreate=(e,t)=>new Ae({shape:e,unknownKeys:"strip",catchall:Cn.create(),typeName:ne.ZodObject,...oe(t)});class ci extends le{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new wt(a.ctx.common.issues));return W(n,{code:D.invalid_union,unionErrors:o}),re}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(c=>new wt(c));return W(n,{code:D.invalid_union,unionErrors:a}),re}}get options(){return this._def.options}}ci.create=(e,t)=>new ci({options:e,typeName:ne.ZodUnion,...oe(t)});const mn=e=>e instanceof di?mn(e.schema):e instanceof Ut?mn(e.innerType()):e instanceof fi?[e.value]:e instanceof Gn?e.options:e instanceof hi?ge.objectValues(e.enum):e instanceof pi?mn(e._def.innerType):e instanceof oi?[void 0]:e instanceof ai?[null]:e instanceof on?[void 0,...mn(e.unwrap())]:e instanceof Qn?[null,...mn(e.unwrap())]:e instanceof Tu||e instanceof gi?mn(e.unwrap()):e instanceof mi?mn(e._def.innerType):[];class aa extends le{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==H.object)return W(n,{code:D.invalid_type,expected:H.object,received:n.parsedType}),re;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(W(n,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=mn(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new aa({typeName:ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...oe(r)})}}function Hc(e,t){const n=gn(e),r=gn(t);if(e===t)return{valid:!0,data:e};if(n===H.object&&r===H.object){const s=ge.objectKeys(t),i=ge.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const c=Hc(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===H.array&&r===H.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(zc(i)||zc(o))return re;const a=Hc(i.value,o.value);return a.valid?((Wc(i)||Wc(o))&&n.dirty(),{status:n.value,value:a.data}):(W(r,{code:D.invalid_intersection_types}),re)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}li.create=(e,t,n)=>new li({left:e,right:t,typeName:ne.ZodIntersection,...oe(n)});class ln extends le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.array)return W(r,{code:D.invalid_type,expected:H.array,received:r.parsedType}),re;if(r.data.lengththis._def.items.length&&(W(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new cn(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>nt.mergeArray(n,o)):nt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ln({...this._def,rest:t})}}ln.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ln({items:e,typeName:ne.ZodTuple,rest:null,...oe(t)})};class ui extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.object)return W(r,{code:D.invalid_type,expected:H.object,received:r.parsedType}),re;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new cn(r,a,r.path,a)),value:o._parse(new cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?nt.mergeObjectAsync(n,s):nt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof le?new ui({keyType:t,valueType:n,typeName:ne.ZodRecord,...oe(r)}):new ui({keyType:Lt.create(),valueType:t,typeName:ne.ZodRecord,...oe(n)})}}class Io extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.map)return W(r,{code:D.invalid_type,expected:H.map,received:r.parsedType}),re;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,c],l)=>({key:s._parse(new cn(r,a,r.path,[l,"key"])),value:i._parse(new cn(r,c,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}}Io.create=(e,t,n)=>new Io({valueType:t,keyType:e,typeName:ne.ZodMap,...oe(n)});class Tr extends le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==H.set)return W(r,{code:D.invalid_type,expected:H.set,received:r.parsedType}),re;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(W(r,{code:D.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return re;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((c,l)=>i._parse(new cn(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new Tr({...this._def,minSize:{value:t,message:Q.toString(n)}})}max(t,n){return new Tr({...this._def,maxSize:{value:t,message:Q.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Tr.create=(e,t)=>new Tr({valueType:e,minSize:null,maxSize:null,typeName:ne.ZodSet,...oe(t)});class Zr extends le{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==H.function)return W(n,{code:D.invalid_type,expected:H.function,received:n.parsedType}),re;function r(a,c){return jo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ko(),ds].filter(l=>!!l),issueData:{code:D.invalid_arguments,argumentsError:c}})}function s(a,c){return jo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ko(),ds].filter(l=>!!l),issueData:{code:D.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof hs){const a=this;return ct(async function(...c){const l=new wt([]),u=await a._def.args.parseAsync(c,i).catch(y=>{throw l.addIssue(r(c,y)),l}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(y=>{throw l.addIssue(s(d,y)),l})})}else{const a=this;return ct(function(...c){const l=a._def.args.safeParse(c,i);if(!l.success)throw new wt([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new wt([s(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Zr({...this._def,args:ln.create(t).rest(xr.create())})}returns(t){return new Zr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zr({args:t||ln.create([]).rest(xr.create()),returns:n||xr.create(),typeName:ne.ZodFunction,...oe(r)})}}class di extends le{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}di.create=(e,t)=>new di({getter:e,typeName:ne.ZodLazy,...oe(t)});class fi extends le{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return W(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),re}return{status:"valid",value:t.data}}get value(){return this._def.value}}fi.create=(e,t)=>new fi({value:e,typeName:ne.ZodLiteral,...oe(t)});function sv(e,t){return new Gn({values:e,typeName:ne.ZodEnum,...oe(t)})}class Gn extends le{constructor(){super(...arguments),Is.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return W(n,{expected:ge.joinValues(r),received:n.parsedType,code:D.invalid_type}),re}if(Oo(this,Is)||ev(this,Is,new Set(this._def.values)),!Oo(this,Is).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return W(n,{received:n.data,code:D.invalid_enum_value,options:r}),re}return ct(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Gn.create(t,{...this._def,...n})}exclude(t,n=this._def){return Gn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Is=new WeakMap;Gn.create=sv;class hi extends le{constructor(){super(...arguments),Ls.set(this,void 0)}_parse(t){const n=ge.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==H.string&&r.parsedType!==H.number){const s=ge.objectValues(n);return W(r,{expected:ge.joinValues(s),received:r.parsedType,code:D.invalid_type}),re}if(Oo(this,Ls)||ev(this,Ls,new Set(ge.getValidEnumValues(this._def.values))),!Oo(this,Ls).has(t.data)){const s=ge.objectValues(n);return W(r,{received:r.data,code:D.invalid_enum_value,options:s}),re}return ct(t.data)}get enum(){return this._def.values}}Ls=new WeakMap;hi.create=(e,t)=>new hi({values:e,typeName:ne.ZodNativeEnum,...oe(t)});class hs extends le{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==H.promise&&n.common.async===!1)return W(n,{code:D.invalid_type,expected:H.promise,received:n.parsedType}),re;const r=n.parsedType===H.promise?n.data:Promise.resolve(n.data);return ct(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hs.create=(e,t)=>new hs({type:e,typeName:ne.ZodPromise,...oe(t)});class Ut extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{W(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return re;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?re:c.status==="dirty"||n.value==="dirty"?zr(c.value):c});{if(n.value==="aborted")return re;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?re:a.status==="dirty"||n.value==="dirty"?zr(a.value):a}}if(s.type==="refinement"){const o=a=>{const c=s.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?re:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?re:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Cr(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Cr(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);ge.assertNever(s)}}Ut.create=(e,t,n)=>new Ut({schema:e,typeName:ne.ZodEffects,effect:t,...oe(n)});Ut.createWithPreprocess=(e,t,n)=>new Ut({schema:t,effect:{type:"preprocess",transform:e},typeName:ne.ZodEffects,...oe(n)});class on extends le{_parse(t){return this._getType(t)===H.undefined?ct(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}on.create=(e,t)=>new on({innerType:e,typeName:ne.ZodOptional,...oe(t)});class Qn extends le{_parse(t){return this._getType(t)===H.null?ct(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qn.create=(e,t)=>new Qn({innerType:e,typeName:ne.ZodNullable,...oe(t)});class pi extends le{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===H.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pi.create=(e,t)=>new pi({innerType:e,typeName:ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...oe(t)});class mi extends le{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return si(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new wt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mi.create=(e,t)=>new mi({innerType:e,typeName:ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...oe(t)});class Lo extends le{_parse(t){if(this._getType(t)!==H.nan){const r=this._getOrReturnCtx(t);return W(r,{code:D.invalid_type,expected:H.nan,received:r.parsedType}),re}return{status:"valid",value:t.data}}}Lo.create=e=>new Lo({typeName:ne.ZodNaN,...oe(e)});const EP=Symbol("zod_brand");class Tu extends le{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mi extends le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?re:i.status==="dirty"?(n.dirty(),zr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?re:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Mi({in:t,out:n,typeName:ne.ZodPipeline})}}class gi extends le{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Cr(s)&&(s.value=Object.freeze(s.value)),s);return si(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:ne.ZodReadonly,...oe(t)});function iv(e,t={},n){return e?fs.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...l,fatal:c})}}):fs.create()}const TP={object:Ae.lazycreate};var ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ne||(ne={}));const AP=(e,t={message:`Input not instance of ${e.name}`})=>iv(n=>n instanceof e,t),ov=Lt.create,av=Zn.create,RP=Lo.create,PP=Kn.create,cv=ii.create,NP=Er.create,kP=Mo.create,jP=oi.create,OP=ai.create,MP=fs.create,DP=xr.create,IP=Cn.create,LP=Do.create,FP=Ft.create,VP=Ae.create,BP=Ae.strictCreate,$P=ci.create,UP=aa.create,zP=li.create,WP=ln.create,HP=ui.create,qP=Io.create,ZP=Tr.create,KP=Zr.create,GP=di.create,QP=fi.create,XP=Gn.create,YP=hi.create,JP=hs.create,hh=Ut.create,eN=on.create,tN=Qn.create,nN=Ut.createWithPreprocess,rN=Mi.create,sN=()=>ov().optional(),iN=()=>av().optional(),oN=()=>cv().optional(),aN={string:e=>Lt.create({...e,coerce:!0}),number:e=>Zn.create({...e,coerce:!0}),boolean:e=>ii.create({...e,coerce:!0}),bigint:e=>Kn.create({...e,coerce:!0}),date:e=>Er.create({...e,coerce:!0})},cN=re;var ph=Object.freeze({__proto__:null,defaultErrorMap:ds,setErrorMap:nP,getErrorMap:ko,makeIssue:jo,EMPTY_PATH:rP,addIssueToContext:W,ParseStatus:nt,INVALID:re,DIRTY:zr,OK:ct,isAborted:zc,isDirty:Wc,isValid:Cr,isAsync:si,get util(){return ge},get objectUtil(){return Uc},ZodParsedType:H,getParsedType:gn,ZodType:le,datetimeRegex:rv,ZodString:Lt,ZodNumber:Zn,ZodBigInt:Kn,ZodBoolean:ii,ZodDate:Er,ZodSymbol:Mo,ZodUndefined:oi,ZodNull:ai,ZodAny:fs,ZodUnknown:xr,ZodNever:Cn,ZodVoid:Do,ZodArray:Ft,ZodObject:Ae,ZodUnion:ci,ZodDiscriminatedUnion:aa,ZodIntersection:li,ZodTuple:ln,ZodRecord:ui,ZodMap:Io,ZodSet:Tr,ZodFunction:Zr,ZodLazy:di,ZodLiteral:fi,ZodEnum:Gn,ZodNativeEnum:hi,ZodPromise:hs,ZodEffects:Ut,ZodTransformer:Ut,ZodOptional:on,ZodNullable:Qn,ZodDefault:pi,ZodCatch:mi,ZodNaN:Lo,BRAND:EP,ZodBranded:Tu,ZodPipeline:Mi,ZodReadonly:gi,custom:iv,Schema:le,ZodSchema:le,late:TP,get ZodFirstPartyTypeKind(){return ne},coerce:aN,any:MP,array:FP,bigint:PP,boolean:cv,date:NP,discriminatedUnion:UP,effect:hh,enum:XP,function:KP,instanceof:AP,intersection:zP,lazy:GP,literal:QP,map:qP,nan:RP,nativeEnum:YP,never:IP,null:OP,nullable:tN,number:av,object:VP,oboolean:oN,onumber:iN,optional:eN,ostring:sN,pipeline:rN,preprocess:nN,promise:JP,record:HP,set:ZP,strictObject:BP,string:ov,symbol:kP,transformer:hh,tuple:WP,undefined:jP,union:$P,unknown:DP,void:LP,NEVER:cN,ZodIssueCode:D,quotelessJson:tP,ZodError:wt});const Za=(e,t,n)=>{const r=_e(s=>s.lang);return r==="ru"?e:r==="tm"?n??t:t};function lv(e,t){return function(){return e.apply(t,arguments)}}const{toString:lN}=Object.prototype,{getPrototypeOf:Au}=Object,ca=(e=>t=>{const n=lN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=e=>(e=e.toLowerCase(),t=>ca(t)===e),la=e=>t=>typeof t===e,{isArray:Ss}=Array,yi=la("undefined");function uN(e){return e!==null&&!yi(e)&&e.constructor!==null&&!yi(e.constructor)&&St(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const uv=Ht("ArrayBuffer");function dN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&uv(e.buffer),t}const fN=la("string"),St=la("function"),dv=la("number"),ua=e=>e!==null&&typeof e=="object",hN=e=>e===!0||e===!1,lo=e=>{if(ca(e)!=="object")return!1;const t=Au(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},pN=Ht("Date"),mN=Ht("File"),gN=Ht("Blob"),yN=Ht("FileList"),vN=e=>ua(e)&&St(e.pipe),xN=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||St(e.append)&&((t=ca(e))==="formdata"||t==="object"&&St(e.toString)&&e.toString()==="[object FormData]"))},bN=Ht("URLSearchParams"),[wN,SN,_N,CN]=["ReadableStream","Request","Response","Headers"].map(Ht),EN=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Di(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Ss(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hv=e=>!yi(e)&&e!==ar;function qc(){const{caseless:e}=hv(this)&&this||{},t={},n=(r,s)=>{const i=e&&fv(t,s)||s;lo(t[i])&&lo(r)?t[i]=qc(t[i],r):lo(r)?t[i]=qc({},r):Ss(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r(Di(t,(s,i)=>{n&&St(s)?e[i]=lv(s,n):e[i]=s},{allOwnKeys:r}),e),AN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RN=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},PN=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Au(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},NN=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kN=e=>{if(!e)return null;if(Ss(e))return e;let t=e.length;if(!dv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jN=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Au(Uint8Array)),ON=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},MN=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DN=Ht("HTMLFormElement"),IN=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),mh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),LN=Ht("RegExp"),pv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Di(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},FN=e=>{pv(e,(t,n)=>{if(St(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(St(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},VN=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Ss(e)?r(e):r(String(e).split(t)),n},BN=()=>{},$N=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ka="abcdefghijklmnopqrstuvwxyz",gh="0123456789",mv={DIGIT:gh,ALPHA:Ka,ALPHA_DIGIT:Ka+Ka.toUpperCase()+gh},UN=(e=16,t=mv.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function zN(e){return!!(e&&St(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const WN=e=>{const t=new Array(10),n=(r,s)=>{if(ua(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Ss(r)?[]:{};return Di(r,(o,a)=>{const c=n(o,s+1);!yi(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return n(e,0)},HN=Ht("AsyncFunction"),qN=e=>e&&(ua(e)||St(e))&&St(e.then)&&St(e.catch),gv=((e,t)=>e?setImmediate:t?((n,r)=>(ar.addEventListener("message",({source:s,data:i})=>{s===ar&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ar.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",St(ar.postMessage)),ZN=typeof queueMicrotask<"u"?queueMicrotask.bind(ar):typeof process<"u"&&process.nextTick||gv,k={isArray:Ss,isArrayBuffer:uv,isBuffer:uN,isFormData:xN,isArrayBufferView:dN,isString:fN,isNumber:dv,isBoolean:hN,isObject:ua,isPlainObject:lo,isReadableStream:wN,isRequest:SN,isResponse:_N,isHeaders:CN,isUndefined:yi,isDate:pN,isFile:mN,isBlob:gN,isRegExp:LN,isFunction:St,isStream:vN,isURLSearchParams:bN,isTypedArray:jN,isFileList:yN,forEach:Di,merge:qc,extend:TN,trim:EN,stripBOM:AN,inherits:RN,toFlatObject:PN,kindOf:ca,kindOfTest:Ht,endsWith:NN,toArray:kN,forEachEntry:ON,matchAll:MN,isHTMLForm:DN,hasOwnProperty:mh,hasOwnProp:mh,reduceDescriptors:pv,freezeMethods:FN,toObjectSet:VN,toCamelCase:IN,noop:BN,toFiniteNumber:$N,findKey:fv,global:ar,isContextDefined:hv,ALPHABET:mv,generateString:UN,isSpecCompliantForm:zN,toJSONObject:WN,isAsyncFn:HN,isThenable:qN,setImmediate:gv,asap:ZN};function ie(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}k.inherits(ie,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const yv=ie.prototype,vv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vv[e]={value:e}});Object.defineProperties(ie,vv);Object.defineProperty(yv,"isAxiosError",{value:!0});ie.from=(e,t,n,r,s,i)=>{const o=Object.create(yv);return k.toFlatObject(e,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),ie.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const KN=null;function Zc(e){return k.isPlainObject(e)||k.isArray(e)}function xv(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function yh(e,t,n){return e?e.concat(t).map(function(s,i){return s=xv(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function GN(e){return k.isArray(e)&&!e.some(Zc)}const QN=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function da(e,t,n){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!k.isUndefined(v[p])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(k.isDate(g))return g.toISOString();if(!c&&k.isBlob(g))throw new ie("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(g)||k.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,v){let x=g;if(g&&!v&&typeof g=="object"){if(k.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(k.isArray(g)&&GN(g)||(k.isFileList(g)||k.endsWith(p,"[]"))&&(x=k.toArray(g)))return p=xv(p),x.forEach(function(w,_){!(k.isUndefined(w)||w===null)&&t.append(o===!0?yh([p],_,i):o===null?p:p+"[]",l(w))}),!1}return Zc(g)?!0:(t.append(yh(v,p,i),l(g)),!1)}const d=[],h=Object.assign(QN,{defaultVisitor:u,convertValue:l,isVisitable:Zc});function y(g,p){if(!k.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(g),k.forEach(g,function(x,b){(!(k.isUndefined(x)||x===null)&&s.call(t,x,k.isString(b)?b.trim():b,p,h))===!0&&y(x,p?p.concat(b):[b])}),d.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return y(e),t}function vh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ru(e,t){this._pairs=[],e&&da(e,this,t)}const bv=Ru.prototype;bv.append=function(t,n){this._pairs.push([t,n])};bv.toString=function(t){const n=t?function(r){return t.call(this,r,vh)}:vh;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function XN(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wv(e,t,n){if(!t)return e;const r=n&&n.encode||XN;k.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=k.isURLSearchParams(t)?t.toString():new Ru(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class xh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YN=typeof URLSearchParams<"u"?URLSearchParams:Ru,JN=typeof FormData<"u"?FormData:null,ek=typeof Blob<"u"?Blob:null,tk={isBrowser:!0,classes:{URLSearchParams:YN,FormData:JN,Blob:ek},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Kc=typeof navigator=="object"&&navigator||void 0,nk=Pu&&(!Kc||["ReactNative","NativeScript","NS"].indexOf(Kc.product)<0),rk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sk=Pu&&window.location.href||"http://localhost",ik=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:nk,hasStandardBrowserWebWorkerEnv:rk,navigator:Kc,origin:sk},Symbol.toStringTag,{value:"Module"})),Je={...ik,...tk};function ok(e,t){return da(e,new Je.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Je.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function ak(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ck(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&k.isArray(s)?s.length:o,c?(k.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!k.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&k.isArray(s[o])&&(s[o]=ck(s[o])),!a)}if(k.isFormData(e)&&k.isFunction(e.entries)){const n={};return k.forEachEntry(e,(r,s)=>{t(ak(r),s,n,0)}),n}return null}function lk(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ii={transitional:Sv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=k.isObject(t);if(i&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return s?JSON.stringify(_v(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ok(t,this.formSerializer).toString();if((a=k.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return da(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),lk(t)):t}],transformResponse:[function(t){const n=this.transitional||Ii.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?ie.from(a,ie.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],e=>{Ii.headers[e]={}});const uk=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dk=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&uk[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},bh=Symbol("internals");function js(e){return e&&String(e).trim().toLowerCase()}function uo(e){return e===!1||e==null?e:k.isArray(e)?e.map(uo):String(e)}function fk(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const hk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ga(e,t,n,r,s){if(k.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function pk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mk(e,t){const n=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let pt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,c,l){const u=js(c);if(!u)throw new Error("header name must be a non-empty string");const d=k.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||c]=uo(a))}const o=(a,c)=>k.forEach(a,(l,u)=>i(l,u,c));if(k.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(k.isString(t)&&(t=t.trim())&&!hk(t))o(dk(t),n);else if(k.isHeaders(t))for(const[a,c]of t.entries())i(c,a,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=js(t),t){const r=k.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return fk(s);if(k.isFunction(n))return n.call(this,s,r);if(k.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=js(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ga(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=js(o),o){const a=k.findKey(r,o);a&&(!n||Ga(r,r[a],a,n))&&(delete r[a],s=!0)}}return k.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Ga(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return k.forEach(this,(s,i)=>{const o=k.findKey(r,i);if(o){n[o]=uo(s),delete n[i];return}const a=t?pk(i):String(i).trim();a!==i&&delete n[i],n[a]=uo(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return k.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&k.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[bh]=this[bh]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=js(o);r[a]||(mk(s,o),r[a]=!0)}return k.isArray(t)?t.forEach(i):i(t),this}};pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(pt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});k.freezeMethods(pt);function Qa(e,t){const n=this||Ii,r=t||n,s=pt.from(r.headers);let i=r.data;return k.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Cv(e){return!!(e&&e.__CANCEL__)}function _s(e,t,n){ie.call(this,e??"canceled",ie.ERR_CANCELED,t,n),this.name="CanceledError"}k.inherits(_s,ie,{__CANCEL__:!0});function Ev(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(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 gk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yk(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[i];o||(o=l),n[s]=c,r[s]=l;let d=i,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o{n=u,s=null,i&&(clearTimeout(i),i=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const Fo=(e,t,n=3)=>{let r=0;const s=yk(50,250);return vk(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-r,l=s(c),u=o<=a;r=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)},wh=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Sh=e=>(...t)=>k.asap(()=>e(...t)),xk=Je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Je.origin),Je.navigator&&/(msie|trident)/i.test(Je.navigator.userAgent)):()=>!0,bk=Je.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];k.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),k.isString(r)&&o.push("path="+r),k.isString(s)&&o.push("domain="+s),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 wk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Sk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tv(e,t){return e&&!wk(t)?Sk(e,t):t}const _h=e=>e instanceof pt?{...e}:e;function Ar(e,t){t=t||{};const n={};function r(l,u,d,h){return k.isPlainObject(l)&&k.isPlainObject(u)?k.merge.call({caseless:h},l,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function s(l,u,d,h){if(k.isUndefined(u)){if(!k.isUndefined(l))return r(void 0,l,d,h)}else return r(l,u,d,h)}function i(l,u){if(!k.isUndefined(u))return r(void 0,u)}function o(l,u){if(k.isUndefined(u)){if(!k.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in t)return r(l,u);if(d in e)return r(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)=>s(_h(l),_h(u),d,!0)};return k.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=c[u]||s,h=d(e[u],t[u],u);k.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Av=e=>{const t=Ar({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=pt.from(o),t.url=wv(Tv(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(k.isFormData(n)){if(Je.hasStandardBrowserEnv||Je.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(Je.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&xk(t.url))){const l=s&&i&&bk.read(i);l&&o.set(s,l)}return t},_k=typeof XMLHttpRequest<"u",Ck=_k&&function(e){return new Promise(function(n,r){const s=Av(e);let i=s.data;const o=pt.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=s,u,d,h,y,g;function p(){y&&y(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function x(){if(!v)return;const w=pt.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};Ev(function(A){n(A),p()},function(A){r(A),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&&(r(new ie("Request aborted",ie.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new ie("Network Error",ie.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const S=s.transitional||Sv;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new ie(_,S.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&k.forEach(o.toJSON(),function(_,S){v.setRequestHeader(S,_)}),k.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),a&&a!=="json"&&(v.responseType=s.responseType),l&&([h,g]=Fo(l,!0),v.addEventListener("progress",h)),c&&v.upload&&([d,y]=Fo(c),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(u=w=>{v&&(r(!w||w.type?new _s(null,e,v):w),v.abort(),v=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const b=gk(s.url);if(b&&Je.protocols.indexOf(b)===-1){r(new ie("Unsupported protocol "+b+":",ie.ERR_BAD_REQUEST,e));return}v.send(i||null)})},Ek=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;r.abort(u instanceof ie?u:new _s(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}=r;return c.unsubscribe=()=>k.asap(a),c}},Tk=function*(e,t){let n=e.byteLength;if(n{const s=Ak(e,t);let i=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await s.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),s.return()}},{highWaterMark:2})},fa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rv=fa&&typeof ReadableStream=="function",Pk=fa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Nk=Rv&&Pv(()=>{let e=!1;const t=new Request(Je.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Eh=64*1024,Gc=Rv&&Pv(()=>k.isReadableStream(new Response("").body)),Vo={stream:Gc&&(e=>e.body)};fa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Vo[t]&&(Vo[t]=k.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ie(`Response type '${t}' is not supported`,ie.ERR_NOT_SUPPORT,r)})})})(new Response);const kk=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new Request(Je.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e=e+""),k.isString(e))return(await Pk(e)).byteLength},jk=async(e,t)=>{const n=k.toFiniteNumber(e.getContentLength());return n??kk(t)},Ok=fa&&(async e=>{let{url:t,method:n,data:r,signal:s,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=Ek([s,i&&i.toAbortSignal()],o),g;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let v;try{if(c&&Nk&&n!=="get"&&n!=="head"&&(v=await jk(u,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(k.isFormData(r)&&(T=S.headers.get("content-type"))&&u.setContentType(T),S.body){const[A,R]=wh(v,Fo(Sh(c)));r=Ch(S.body,Eh,A,R)}}k.isString(d)||(d=d?"include":"omit");const x="credentials"in Request.prototype;g=new Request(t,{...h,signal:y,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:x?d:void 0});let b=await fetch(g);const w=Gc&&(l==="stream"||l==="response");if(Gc&&(a||w&&p)){const S={};["status","statusText","headers"].forEach(N=>{S[N]=b[N]});const T=k.toFiniteNumber(b.headers.get("content-length")),[A,R]=a&&wh(T,Fo(Sh(a),!0))||[];b=new Response(Ch(b.body,Eh,A,()=>{R&&R(),p&&p()}),S)}l=l||"text";let _=await Vo[k.findKey(Vo,l)||"text"](b,e);return!w&&p&&p(),await new Promise((S,T)=>{Ev(S,T,{data:_,headers:pt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(x){throw p&&p(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new ie("Network Error",ie.ERR_NETWORK,e,g),{cause:x.cause||x}):ie.from(x,x&&x.code,e,g)}}),Qc={http:KN,xhr:Ck,fetch:Ok};k.forEach(Qc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Th=e=>`- ${e}`,Mk=e=>k.isFunction(e)||e===null||e===!1,Nv={getAdapter:e=>{e=k.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};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(Th).join(` diff --git a/dist/index.html b/dist/index.html index 6774a21..477be94 100644 --- a/dist/index.html +++ b/dist/index.html @@ -66,9 +66,9 @@ })(window, document, "script", "dataLayer", "GTM-NK394LVK"); Turkmen Textile - + - + diff --git a/dist/tm.png b/dist/tm.png new file mode 100644 index 0000000..f7ce7ef Binary files /dev/null and b/dist/tm.png differ diff --git a/public/tm.png b/public/tm.png new file mode 100644 index 0000000..f7ce7ef Binary files /dev/null and b/public/tm.png differ diff --git a/src/components/shared/lang-menu.tsx b/src/components/shared/lang-menu.tsx index 79679a0..1632686 100644 --- a/src/components/shared/lang-menu.tsx +++ b/src/components/shared/lang-menu.tsx @@ -23,7 +23,7 @@ export const langs = [ const flagMap: Record = { [Language.RU]: "/ru.svg", [Language.EN]: "/english.svg", - [Language.TM]: "/tm.svg", + [Language.TM]: "/tm.png", }; const labelMap: Record = {