shopify-chatbot-widget 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -321,7 +321,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
|
|
|
321
321
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...a){const r=new this(t);return a.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[l3]=this[l3]={accessors:{}}).accessors,o=this.prototype;function u(f){const m=Lv(f);r[m]||(hP(o,f),r[m]=!0)}return Ye.isArray(t)?t.forEach(u):u(t),this}};vo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ye.reduceDescriptors(vo.prototype,({value:e},t)=>{let a=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[a]=r}}}),Ye.freezeMethods(vo);function _E(e,t){const a=this||jv,r=t||a,o=vo.from(r.headers);let u=r.data;return Ye.forEach(e,function(m){u=m.call(a,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function s3(e){return!!(e&&e.__CANCEL__)}function Rm(e,t,a){Cn.call(this,e??"canceled",Cn.ERR_CANCELED,t,a),this.name="CanceledError"}Ye.inherits(Rm,Cn,{__CANCEL__:!0});function c3(e,t,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?e(a):t(new Cn("Request failed with status code "+a.status,[Cn.ERR_BAD_REQUEST,Cn.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function mP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function pP(e,t){e=e||10;const a=new Array(e),r=new Array(e);let o=0,u=0,f;return t=t!==void 0?t:1e3,function(g){const p=Date.now(),v=r[u];f||(f=p),a[o]=g,r[o]=p;let x=u,E=0;for(;x!==o;)E+=a[x++],x=x%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),p-f<t)return;const O=v&&p-v;return O?Math.round(E*1e3/O):void 0}}function gP(e,t){let a=0,r=1e3/t,o,u;const f=(p,v=Date.now())=>{a=v,o=null,u&&(clearTimeout(u),u=null),e.apply(null,p)};return[(...p)=>{const v=Date.now(),x=v-a;x>=r?f(p,v):(o=p,u||(u=setTimeout(()=>{u=null,f(o)},r-x)))},()=>o&&f(o)]}const B1=(e,t,a=3)=>{let r=0;const o=pP(50,250);return gP(u=>{const f=u.loaded,m=u.lengthComputable?u.total:void 0,g=f-r,p=o(g),v=f<=m;r=f;const x={loaded:f,total:m,progress:m?f/m:void 0,bytes:g,rate:p||void 0,estimated:p&&m&&v?(m-f)/p:void 0,event:u,lengthComputable:m!=null,[t?"download":"upload"]:!0};e(x)},a)},u3=(e,t)=>{const a=e!=null;return[r=>t[0]({lengthComputable:a,total:e,loaded:r}),t[1]]},f3=e=>(...t)=>Ye.asap(()=>e(...t)),vP=xi.hasStandardBrowserEnv?((e,t)=>a=>(a=new URL(a,xi.origin),e.protocol===a.protocol&&e.host===a.host&&(t||e.port===a.port)))(new URL(xi.origin),xi.navigator&&/(msie|trident)/i.test(xi.navigator.userAgent)):()=>!0,yP=xi.hasStandardBrowserEnv?{write(e,t,a,r,o,u){const f=[e+"="+encodeURIComponent(t)];Ye.isNumber(a)&&f.push("expires="+new Date(a).toGMTString()),Ye.isString(r)&&f.push("path="+r),Ye.isString(o)&&f.push("domain="+o),u===!0&&f.push("secure"),document.cookie=f.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 bP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function d3(e,t,a){let r=!bP(t);return e&&(r||a==!1)?SP(e,t):t}const h3=e=>e instanceof vo?{...e}:e;function Md(e,t){t=t||{};const a={};function r(p,v,x,E){return Ye.isPlainObject(p)&&Ye.isPlainObject(v)?Ye.merge.call({caseless:E},p,v):Ye.isPlainObject(v)?Ye.merge({},v):Ye.isArray(v)?v.slice():v}function o(p,v,x,E){if(Ye.isUndefined(v)){if(!Ye.isUndefined(p))return r(void 0,p,x,E)}else return r(p,v,x,E)}function u(p,v){if(!Ye.isUndefined(v))return r(void 0,v)}function f(p,v){if(Ye.isUndefined(v)){if(!Ye.isUndefined(p))return r(void 0,p)}else return r(void 0,v)}function m(p,v,x){if(x in t)return r(p,v);if(x in e)return r(void 0,p)}const g={url:u,method:u,data:u,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:m,headers:(p,v,x)=>o(h3(p),h3(v),x,!0)};return Ye.forEach(Object.keys(Object.assign({},e,t)),function(v){const x=g[v]||o,E=x(e[v],t[v],v);Ye.isUndefined(E)&&x!==m||(a[v]=E)}),a}const m3=e=>{const t=Md({},e);let{data:a,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:u,headers:f,auth:m}=t;t.headers=f=vo.from(f),t.url=a3(d3(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),m&&f.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):"")));let g;if(Ye.isFormData(a)){if(xi.hasStandardBrowserEnv||xi.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((g=f.getContentType())!==!1){const[p,...v]=g?g.split(";").map(x=>x.trim()).filter(Boolean):[];f.setContentType([p||"multipart/form-data",...v].join("; "))}}if(xi.hasStandardBrowserEnv&&(r&&Ye.isFunction(r)&&(r=r(t)),r||r!==!1&&vP(t.url))){const p=o&&u&&yP.read(u);p&&f.set(o,p)}return t},xP=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(a,r){const o=m3(e);let u=o.data;const f=vo.from(o.headers).normalize();let{responseType:m,onUploadProgress:g,onDownloadProgress:p}=o,v,x,E,O,T;function A(){O&&O(),T&&T(),o.cancelToken&&o.cancelToken.unsubscribe(v),o.signal&&o.signal.removeEventListener("abort",v)}let R=new XMLHttpRequest;R.open(o.method.toUpperCase(),o.url,!0),R.timeout=o.timeout;function N(){if(!R)return;const j=vo.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),z={data:!m||m==="text"||m==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:j,config:e,request:R};c3(function(B){a(B),A()},function(B){r(B),A()},z),R=null}"onloadend"in R?R.onloadend=N:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.indexOf("file:")===0)||setTimeout(N)},R.onabort=function(){R&&(r(new Cn("Request aborted",Cn.ECONNABORTED,e,R)),R=null)},R.onerror=function(){r(new Cn("Network Error",Cn.ERR_NETWORK,e,R)),R=null},R.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const z=o.transitional||i3;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new Cn(L,z.clarifyTimeoutError?Cn.ETIMEDOUT:Cn.ECONNABORTED,e,R)),R=null},u===void 0&&f.setContentType(null),"setRequestHeader"in R&&Ye.forEach(f.toJSON(),function(L,z){R.setRequestHeader(z,L)}),Ye.isUndefined(o.withCredentials)||(R.withCredentials=!!o.withCredentials),m&&m!=="json"&&(R.responseType=o.responseType),p&&([E,T]=B1(p,!0),R.addEventListener("progress",E)),g&&R.upload&&([x,O]=B1(g),R.upload.addEventListener("progress",x),R.upload.addEventListener("loadend",O)),(o.cancelToken||o.signal)&&(v=j=>{R&&(r(!j||j.type?new Rm(null,e,R):j),R.abort(),R=null)},o.cancelToken&&o.cancelToken.subscribe(v),o.signal&&(o.signal.aborted?v():o.signal.addEventListener("abort",v)));const _=mP(o.url);if(_&&xi.protocols.indexOf(_)===-1){r(new Cn("Unsupported protocol "+_+":",Cn.ERR_BAD_REQUEST,e));return}R.send(u||null)})},CP=(e,t)=>{const{length:a}=e=e?e.filter(Boolean):[];if(t||a){let r=new AbortController,o;const u=function(p){if(!o){o=!0,m();const v=p instanceof Error?p:this.reason;r.abort(v instanceof Cn?v:new Rm(v instanceof Error?v.message:v))}};let f=t&&setTimeout(()=>{f=null,u(new Cn(`timeout ${t} of ms exceeded`,Cn.ETIMEDOUT))},t);const m=()=>{e&&(f&&clearTimeout(f),f=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(u):p.removeEventListener("abort",u)}),e=null)};e.forEach(p=>p.addEventListener("abort",u));const{signal:g}=r;return g.unsubscribe=()=>Ye.asap(m),g}},EP=function*(e,t){let a=e.byteLength;if(a<t){yield e;return}let r=0,o;for(;r<a;)o=r+t,yield e.slice(r,o),r=o},wP=async function*(e,t){for await(const a of OP(e))yield*EP(a,t)},OP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:a,value:r}=await t.read();if(a)break;yield r}}finally{await t.cancel()}},p3=(e,t,a,r)=>{const o=wP(e,t);let u=0,f,m=g=>{f||(f=!0,r&&r(g))};return new ReadableStream({async pull(g){try{const{done:p,value:v}=await o.next();if(p){m(),g.close();return}let x=v.byteLength;if(a){let E=u+=x;a(E)}g.enqueue(new Uint8Array(v))}catch(p){throw m(p),p}},cancel(g){return m(g),o.return()}},{highWaterMark:2})},I1=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",g3=I1&&typeof ReadableStream=="function",TP=I1&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),v3=(e,...t)=>{try{return!!e(...t)}catch{return!1}},RP=g3&&v3(()=>{let e=!1;const t=new Request(xi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),y3=64*1024,DE=g3&&v3(()=>Ye.isReadableStream(new Response("").body)),U1={stream:DE&&(e=>e.body)};I1&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!U1[t]&&(U1[t]=Ye.isFunction(e[t])?a=>a[t]():(a,r)=>{throw new Cn(`Response type '${t}' is not supported`,Cn.ERR_NOT_SUPPORT,r)})})})(new Response);const AP=async e=>{if(e==null)return 0;if(Ye.isBlob(e))return e.size;if(Ye.isSpecCompliantForm(e))return(await new Request(xi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ye.isArrayBufferView(e)||Ye.isArrayBuffer(e))return e.byteLength;if(Ye.isURLSearchParams(e)&&(e=e+""),Ye.isString(e))return(await TP(e)).byteLength},MP=async(e,t)=>{const a=Ye.toFiniteNumber(e.getContentLength());return a??AP(t)},$E={http:KV,xhr:xP,fetch:I1&&(async e=>{let{url:t,method:a,data:r,signal:o,cancelToken:u,timeout:f,onDownloadProgress:m,onUploadProgress:g,responseType:p,headers:v,withCredentials:x="same-origin",fetchOptions:E}=m3(e);p=p?(p+"").toLowerCase():"text";let O=CP([o,u&&u.toAbortSignal()],f),T;const A=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let R;try{if(g&&RP&&a!=="get"&&a!=="head"&&(R=await MP(v,r))!==0){let z=new Request(t,{method:"POST",body:r,duplex:"half"}),V;if(Ye.isFormData(r)&&(V=z.headers.get("content-type"))&&v.setContentType(V),z.body){const[B,D]=u3(R,B1(f3(g)));r=p3(z.body,y3,B,D)}}Ye.isString(x)||(x=x?"include":"omit");const N="credentials"in Request.prototype;T=new Request(t,{...E,signal:O,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:r,duplex:"half",credentials:N?x:void 0});let _=await fetch(T,E);const j=DE&&(p==="stream"||p==="response");if(DE&&(m||j&&A)){const z={};["status","statusText","headers"].forEach(P=>{z[P]=_[P]});const V=Ye.toFiniteNumber(_.headers.get("content-length")),[B,D]=m&&u3(V,B1(f3(m),!0))||[];_=new Response(p3(_.body,y3,B,()=>{D&&D(),A&&A()}),z)}p=p||"text";let L=await U1[Ye.findKey(U1,p)||"text"](_,e);return!j&&A&&A(),await new Promise((z,V)=>{c3(z,V,{data:L,headers:vo.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:T})})}catch(N){throw A&&A(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Cn("Network Error",Cn.ERR_NETWORK,e,T),{cause:N.cause||N}):Cn.from(N,N&&N.code,e,T)}})};Ye.forEach($E,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const b3=e=>`- ${e}`,NP=e=>Ye.isFunction(e)||e===null||e===!1,S3={getAdapter:e=>{e=Ye.isArray(e)?e:[e];const{length:t}=e;let a,r;const o={};for(let u=0;u<t;u++){a=e[u];let f;if(r=a,!NP(a)&&(r=$E[(f=String(a)).toLowerCase()],r===void 0))throw new Cn(`Unknown adapter '${f}'`);if(r)break;o[f||"#"+u]=r}if(!r){const u=Object.entries(o).map(([m,g])=>`adapter ${m} `+(g===!1?"is not supported by the environment":"is not available in the build"));let f=t?u.length>1?`since :
|
|
322
322
|
`+u.map(b3).join(`
|
|
323
323
|
`):" "+b3(u[0]):"as no adapter specified";throw new Cn("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:$E};function zE(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Rm(null,e)}function x3(e){return zE(e),e.headers=vo.from(e.headers),e.data=_E.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),S3.getAdapter(e.adapter||jv.adapter)(e).then(function(r){return zE(e),r.data=_E.call(e,e.transformResponse,r),r.headers=vo.from(r.headers),r},function(r){return s3(r)||(zE(e),r&&r.response&&(r.response.data=_E.call(e,e.transformResponse,r.response),r.response.headers=vo.from(r.response.headers))),Promise.reject(r)})}const C3="1.10.0",k1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{k1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const E3={};k1.transitional=function(t,a,r){function o(u,f){return"[Axios v"+C3+"] Transitional option '"+u+"'"+f+(r?". "+r:"")}return(u,f,m)=>{if(t===!1)throw new Cn(o(f," has been removed"+(a?" in "+a:"")),Cn.ERR_DEPRECATED);return a&&!E3[f]&&(E3[f]=!0,console.warn(o(f," has been deprecated since v"+a+" and will be removed in the near future"))),t?t(u,f,m):!0}},k1.spelling=function(t){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function _P(e,t,a){if(typeof e!="object")throw new Cn("options must be an object",Cn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const u=r[o],f=t[u];if(f){const m=e[u],g=m===void 0||f(m,u,e);if(g!==!0)throw new Cn("option "+u+" must be "+g,Cn.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new Cn("Unknown option "+u,Cn.ERR_BAD_OPTION)}}const F1={assertOptions:_P,validators:k1},Xs=F1.validators;let Nd=class{constructor(t){this.defaults=t||{},this.interceptors={request:new r3,response:new r3}}async request(t,a){try{return await this._request(t,a)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?u&&!String(r.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
324
|
-
`+u):r.stack=u}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=Md(this.defaults,a);const{transitional:r,paramsSerializer:o,headers:u}=a;r!==void 0&&F1.assertOptions(r,{silentJSONParsing:Xs.transitional(Xs.boolean),forcedJSONParsing:Xs.transitional(Xs.boolean),clarifyTimeoutError:Xs.transitional(Xs.boolean)},!1),o!=null&&(Ye.isFunction(o)?a.paramsSerializer={serialize:o}:F1.assertOptions(o,{encode:Xs.function,serialize:Xs.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),F1.assertOptions(a,{baseUrl:Xs.spelling("baseURL"),withXsrfToken:Xs.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let f=u&&Ye.merge(u.common,u[a.method]);u&&Ye.forEach(["delete","get","head","post","put","patch","common"],T=>{delete u[T]}),a.headers=vo.concat(f,u);const m=[];let g=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(a)===!1||(g=g&&A.synchronous,m.unshift(A.fulfilled,A.rejected))});const p=[];this.interceptors.response.forEach(function(A){p.push(A.fulfilled,A.rejected)});let v,x=0,E;if(!g){const T=[x3.bind(this),void 0];for(T.unshift.apply(T,m),T.push.apply(T,p),E=T.length,v=Promise.resolve(a);x<E;)v=v.then(T[x++],T[x++]);return v}E=m.length;let O=a;for(x=0;x<E;){const T=m[x++],A=m[x++];try{O=T(O)}catch(R){A.call(this,R);break}}try{v=x3.call(this,O)}catch(T){return Promise.reject(T)}for(x=0,E=p.length;x<E;)v=v.then(p[x++],p[x++]);return v}getUri(t){t=Md(this.defaults,t);const a=d3(t.baseURL,t.url,t.allowAbsoluteUrls);return a3(a,t.params,t.paramsSerializer)}};Ye.forEach(["delete","get","head","options"],function(t){Nd.prototype[t]=function(a,r){return this.request(Md(r||{},{method:t,url:a,data:(r||{}).data}))}}),Ye.forEach(["post","put","patch"],function(t){function a(r){return function(u,f,m){return this.request(Md(m||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:f}))}}Nd.prototype[t]=a(),Nd.prototype[t+"Form"]=a(!0)});let DP=class ZL{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(u){a=u});const r=this;this.promise.then(o=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](o);r._listeners=null}),this.promise.then=o=>{let u;const f=new Promise(m=>{r.subscribe(m),u=m}).then(o);return f.cancel=function(){r.unsubscribe(u)},f},t(function(u,f,m){r.reason||(r.reason=new Rm(u,f,m),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new ZL(function(o){t=o}),cancel:t}}};function $P(e){return function(a){return e.apply(null,a)}}function zP(e){return Ye.isObject(e)&&e.isAxiosError===!0}const jE={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jE).forEach(([e,t])=>{jE[t]=e});function w3(e){const t=new Nd(e),a=UM(Nd.prototype.request,t);return Ye.extend(a,Nd.prototype,t,{allOwnKeys:!0}),Ye.extend(a,t,null,{allOwnKeys:!0}),a.create=function(o){return w3(Md(e,o))},a}const za=w3(jv);za.Axios=Nd,za.CanceledError=Rm,za.CancelToken=DP,za.isCancel=s3,za.VERSION=C3,za.toFormData=P1,za.AxiosError=Cn,za.Cancel=za.CanceledError,za.all=function(t){return Promise.all(t)},za.spread=$P,za.isAxiosError=zP,za.mergeConfig=Md,za.AxiosHeaders=vo,za.formToJSON=e=>o3(Ye.isHTMLForm(e)?new FormData(e):e),za.getAdapter=S3.getAdapter,za.HttpStatusCode=jE,za.default=za;const{Axios:wle,AxiosError:Ole,CanceledError:Tle,isCancel:Rle,CancelToken:Ale,VERSION:Mle,all:Nle,Cancel:_le,isAxiosError:Dle,spread:$le,toFormData:zle,AxiosHeaders:jle,HttpStatusCode:Lle,formToJSON:Vle,getAdapter:Ple,mergeConfig:Hle}=za,oi={apiUrl:"http://localhost:8000/api/",websocketUrl:"ws://localhost:8000/ws"},sn=e=>typeof e=="string",Vv=()=>{let e,t;const a=new Promise((r,o)=>{e=r,t=o});return a.resolve=e,a.reject=t,a},O3=e=>e==null?"":""+e,jP=(e,t,a)=>{e.forEach(r=>{t[r]&&(a[r]=t[r])})},LP=/###/g,T3=e=>e&&e.indexOf("###")>-1?e.replace(LP,"."):e,R3=e=>!e||sn(e),Pv=(e,t,a)=>{const r=sn(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(R3(e))return{};const u=T3(r[o]);!e[u]&&a&&(e[u]=new a),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++o}return R3(e)?{}:{obj:e,k:T3(r[o])}},A3=(e,t,a)=>{const{obj:r,k:o}=Pv(e,t,Object);if(r!==void 0||t.length===1){r[o]=a;return}let u=t[t.length-1],f=t.slice(0,t.length-1),m=Pv(e,f,Object);for(;m.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),m=Pv(e,f,Object),m?.obj&&typeof m.obj[`${m.k}.${u}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${u}`]=a},VP=(e,t,a,r)=>{const{obj:o,k:u}=Pv(e,t,Object);o[u]=o[u]||[],o[u].push(a)},G1=(e,t)=>{const{obj:a,k:r}=Pv(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,r))return a[r]},PP=(e,t,a)=>{const r=G1(e,a);return r!==void 0?r:G1(t,a)},M3=(e,t,a)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?sn(e[r])||e[r]instanceof String||sn(t[r])||t[r]instanceof String?a&&(e[r]=t[r]):M3(e[r],t[r],a):e[r]=t[r]);return e},Am=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var HP={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const BP=e=>sn(e)?e.replace(/[&<>"'\/]/g,t=>HP[t]):e;class IP{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const UP=[" ",",","?","!",";"],kP=new IP(20),FP=(e,t,a)=>{t=t||"",a=a||"";const r=UP.filter(f=>t.indexOf(f)<0&&a.indexOf(f)<0);if(r.length===0)return!0;const o=kP.getRegExp(`(${r.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!o.test(e);if(!u){const f=e.indexOf(a);f>0&&!o.test(e.substring(0,f))&&(u=!0)}return u},LE=(e,t,a=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(a);let o=e;for(let u=0;u<r.length;){if(!o||typeof o!="object")return;let f,m="";for(let g=u;g<r.length;++g)if(g!==u&&(m+=a),m+=r[g],f=o[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<r.length-1)continue;u+=g-u+1;break}o=f}return o},Hv=e=>e?.replace("_","-"),GP={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class q1{constructor(t,a={}){this.init(t,a)}init(t,a={}){this.prefix=a.prefix||"i18next:",this.logger=t||GP,this.options=a,this.debug=a.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,r,o){return o&&!this.debug?null:(sn(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new q1(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new q1(this.logger,t)}}var Ys=new q1;class X1{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(a)||0;this.observers[r].set(a,o+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t,...a){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,u])=>{for(let f=0;f<u;f++)o(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,u])=>{for(let f=0;f<u;f++)o.apply(o,[t,...a])})}}class N3 extends X1{constructor(t,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,r,o={}){const u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;t.indexOf(".")>-1?m=t.split("."):(m=[t,a],r&&(Array.isArray(r)?m.push(...r):sn(r)&&u?m.push(...r.split(u)):m.push(r)));const g=G1(this.data,m);return!g&&!a&&!r&&t.indexOf(".")>-1&&(t=m[0],a=m[1],r=m.slice(2).join(".")),g||!f||!sn(r)?g:LE(this.data?.[t]?.[a],r,u)}addResource(t,a,r,o,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let m=[t,a];r&&(m=m.concat(f?r.split(f):r)),t.indexOf(".")>-1&&(m=t.split("."),o=a,a=m[1]),this.addNamespaces(a),A3(this.data,m,o),u.silent||this.emit("added",t,a,r,o)}addResources(t,a,r,o={silent:!1}){for(const u in r)(sn(r[u])||Array.isArray(r[u]))&&this.addResource(t,a,u,r[u],{silent:!0});o.silent||this.emit("added",t,a,r)}addResourceBundle(t,a,r,o,u,f={silent:!1,skipCopy:!1}){let m=[t,a];t.indexOf(".")>-1&&(m=t.split("."),o=r,r=a,a=m[1]),this.addNamespaces(a);let g=G1(this.data,m)||{};f.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?M3(g,r,u):g={...g,...r},A3(this.data,m,g),f.silent||this.emit("added",t,a,r)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(o=>a[o]&&Object.keys(a[o]).length>0)}toJSON(){return this.data}}var _3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,r,o){return e.forEach(u=>{t=this.processors[u]?.process(t,a,r,o)??t}),t}};const D3={},$3=e=>!sn(e)&&typeof e!="boolean"&&typeof e!="number";class Y1 extends X1{constructor(t,a={}){super(),jP(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ys.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,a={interpolation:{}}){const r={...a};return t==null?!1:this.resolve(t,r)?.res!==void 0}extractFromKey(t,a){let r=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=a.ns||this.options.defaultNS||[];const f=r&&t.indexOf(r)>-1,m=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!FP(t,r,o);if(f&&!m){const g=t.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:t,namespaces:sn(u)?[u]:u};const p=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(p[0])>-1)&&(u=p.shift()),t=p.join(o)}return{key:t,namespaces:sn(u)?[u]:u}}translate(t,a,r){let o=typeof a=="object"?{...a}:a;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,f=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:m,namespaces:g}=this.extractFromKey(t[t.length-1],o),p=g[g.length-1];let v=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=o.lng||this.language,E=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return E?u?{res:`${p}${v}${m}`,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(o)}:`${p}${v}${m}`:u?{res:m,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(o)}:m;const O=this.resolve(t,o);let T=O?.res;const A=O?.usedKey||m,R=O?.exactUsedKey||m,N=["[object Number]","[object Function]","[object RegExp]"],_=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,L=o.count!==void 0&&!sn(o.count),z=Y1.hasDefaultValue(o),V=L?this.pluralResolver.getSuffix(x,o.count,o):"",B=o.ordinal&&L?this.pluralResolver.getSuffix(x,o.count,{ordinal:!1}):"",D=L&&!o.ordinal&&o.count===0,P=D&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${V}`]||o[`defaultValue${B}`]||o.defaultValue;let H=T;j&&!T&&z&&(H=P);const Z=$3(H),X=Object.prototype.toString.apply(H);if(j&&H&&Z&&N.indexOf(X)<0&&!(sn(_)&&Array.isArray(H))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,H,{...o,ns:g}):`key '${m} (${this.language})' returned an object instead of string.`;return u?(O.res=W,O.usedParams=this.getUsedParamsDetails(o),O):W}if(f){const W=Array.isArray(H),Q=W?[]:{},oe=W?R:A;for(const U in H)if(Object.prototype.hasOwnProperty.call(H,U)){const G=`${oe}${f}${U}`;z&&!T?Q[U]=this.translate(G,{...o,defaultValue:$3(P)?P[U]:void 0,joinArrays:!1,ns:g}):Q[U]=this.translate(G,{...o,joinArrays:!1,ns:g}),Q[U]===G&&(Q[U]=H[U])}T=Q}}else if(j&&sn(_)&&Array.isArray(T))T=T.join(_),T&&(T=this.extendTranslation(T,t,o,r));else{let W=!1,Q=!1;!this.isValidLookup(T)&&z&&(W=!0,T=P),this.isValidLookup(T)||(Q=!0,T=m);const U=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:T,G=z&&P!==T&&this.options.updateMissing;if(Q||W||G){if(this.logger.log(G?"updateKey":"missingKey",x,p,m,G?P:T),f){const q=this.resolve(m,{...o,keySeparator:!1});q&&q.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 J=[];const se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(let q=0;q<se.length;q++)J.push(se[q]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(o.lng||this.language):J.push(o.lng||this.language);const F=(q,ee,ne)=>{const re=z&&ne!==T?ne:U;this.options.missingKeyHandler?this.options.missingKeyHandler(q,p,ee,re,G,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(q,p,ee,re,G,o),this.emit("missingKey",q,p,ee,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?J.forEach(q=>{const ee=this.pluralResolver.getSuffixes(q,o);D&&o[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(ne=>{F([q],m+ne,o[`defaultValue${ne}`]||P)})}):F(J,m,P))}T=this.extendTranslation(T,t,o,O,r),Q&&T===m&&this.options.appendNamespaceToMissingKey&&(T=`${p}${v}${m}`),(Q||W)&&this.options.parseMissingKeyHandler&&(T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${v}${m}`:m,W?T:void 0,o))}return u?(O.res=T,O.usedParams=this.getUsedParamsDetails(o),O):T}extendTranslation(t,a,r,o,u){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=sn(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(g){const x=t.match(this.interpolator.nestingRegexp);p=x&&x.length}let v=r.replace&&!sn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),t=this.interpolator.interpolate(t,v,r.lng||this.language||o.usedLng,r),g){const x=t.match(this.interpolator.nestingRegexp),E=x&&x.length;p<E&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...x)=>u?.[0]===x[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${a[0]}`),null):this.translate(...x,a),r)),r.interpolation&&this.interpolator.reset()}const f=r.postProcess||this.options.postProcess,m=sn(f)?[f]:f;return t!=null&&m?.length&&r.applyPostProcessor!==!1&&(t=_3.handle(m,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,a={}){let r,o,u,f,m;return sn(t)&&(t=[t]),t.forEach(g=>{if(this.isValidLookup(r))return;const p=this.extractFromKey(g,a),v=p.key;o=v;let x=p.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const E=a.count!==void 0&&!sn(a.count),O=E&&!a.ordinal&&a.count===0,T=a.context!==void 0&&(sn(a.context)||typeof a.context=="number")&&a.context!=="",A=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);x.forEach(R=>{this.isValidLookup(r)||(m=R,!D3[`${A[0]}-${R}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(D3[`${A[0]}-${R}`]=!0,this.logger.warn(`key "${o}" for languages "${A.join(", ")}" won't get resolved as namespace "${m}" 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!!!")),A.forEach(N=>{if(this.isValidLookup(r))return;f=N;const _=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,v,N,R,a);else{let L;E&&(L=this.pluralResolver.getSuffix(N,a.count,a));const z=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(_.push(v+L),a.ordinal&&L.indexOf(V)===0&&_.push(v+L.replace(V,this.options.pluralSeparator)),O&&_.push(v+z)),T){const B=`${v}${this.options.contextSeparator}${a.context}`;_.push(B),E&&(_.push(B+L),a.ordinal&&L.indexOf(V)===0&&_.push(B+L.replace(V,this.options.pluralSeparator)),O&&_.push(B+z))}}let j;for(;j=_.pop();)this.isValidLookup(r)||(u=j,r=this.getResource(N,R,j,a))}))})}),{res:r,usedKey:o,exactUsedKey:u,usedLng:f,usedNS:m}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,a,r,o):this.resourceStore.getResource(t,a,r,o)}getUsedParamsDetails(t={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!sn(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const u of a)delete o[u]}return o}static hasDefaultValue(t){const a="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&a===r.substring(0,a.length)&&t[r]!==void 0)return!0;return!1}}class z3{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ys.create("languageUtils")}getScriptPartFromCode(t){if(t=Hv(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=Hv(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(sn(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(r=>{if(a)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(a=o)}),!a&&this.options.supportedLngs&&t.forEach(r=>{if(a)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return a=o;const u=this.getLanguagePartFromCode(r);if(this.isSupportedCode(u))return a=u;a=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),sn(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let r=t[a];return r||(r=t[this.getScriptPartFromCode(a)]),r||(r=t[this.formatLanguageCode(a)]),r||(r=t[this.getLanguagePartFromCode(a)]),r||(r=t.default),r||[]}toResolveHierarchy(t,a){const r=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],t),o=[],u=f=>{f&&(this.isSupportedCode(f)?o.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return sn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(t))):sn(t)&&u(this.formatLanguageCode(t)),r.forEach(f=>{o.indexOf(f)<0&&u(this.formatLanguageCode(f))}),o}}const j3={zero:0,one:1,two:2,few:3,many:4,other:5},L3={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class qP{constructor(t,a={}){this.languageUtils=t,this.options=a,this.logger=Ys.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t,a={}){const r=Hv(t==="dev"?"en":t),o=a.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:r,type:o});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),L3;if(!t.match(/-|_/))return L3;const g=this.languageUtils.getLanguagePartFromCode(t);f=this.getRule(g,a)}return this.pluralRulesCache[u]=f,f}needsPlural(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,a,r={}){return this.getSuffixes(t,r).map(o=>`${a}${o}`)}getSuffixes(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?r.resolvedOptions().pluralCategories.sort((o,u)=>j3[o]-j3[u]).map(o=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,a,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,r))}}const V3=(e,t,a,r=".",o=!0)=>{let u=PP(e,t,a);return!u&&o&&sn(a)&&(u=LE(e,a,r),u===void 0&&(u=LE(t,a,r))),u},VE=e=>e.replace(/\$/g,"$$$$");class XP{constructor(t={}){this.logger=Ys.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(a=>a),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:r,useRawValueToEscape:o,prefix:u,prefixEscaped:f,suffix:m,suffixEscaped:g,formatSeparator:p,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:E,nestingPrefixEscaped:O,nestingSuffix:T,nestingSuffixEscaped:A,nestingOptionsSeparator:R,maxReplaces:N,alwaysFormat:_}=t.interpolation;this.escape=a!==void 0?a:BP,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=u?Am(u):f||"{{",this.suffix=m?Am(m):g||"}}",this.formatSeparator=p||",",this.unescapePrefix=v?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=E?Am(E):O||Am("$t("),this.nestingSuffix=T?Am(T):A||Am(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=N||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,r)=>a?.source===r?(a.lastIndex=0,a):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,r,o){let u,f,m;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=O=>{if(O.indexOf(this.formatSeparator)<0){const N=V3(a,g,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,r,{...o,...a,interpolationkey:O}):N}const T=O.split(this.formatSeparator),A=T.shift().trim(),R=T.join(this.formatSeparator).trim();return this.format(V3(a,g,A,this.options.keySeparator,this.options.ignoreJSONStructure),R,r,{...o,...a,interpolationkey:A})};this.resetRegExp();const v=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>VE(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?VE(this.escape(O)):VE(O)}].forEach(O=>{for(m=0;u=O.regex.exec(t);){const T=u[1].trim();if(f=p(T),f===void 0)if(typeof v=="function"){const R=v(t,u,o);f=sn(R)?R:""}else if(o&&Object.prototype.hasOwnProperty.call(o,T))f="";else if(x){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${t}`),f="";else!sn(f)&&!this.useRawValueToEscape&&(f=O3(f));const A=O.safeValue(f);if(t=t.replace(u[0],A),x?(O.regex.lastIndex+=f.length,O.regex.lastIndex-=u[0].length):O.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),t}nest(t,a,r={}){let o,u,f;const m=(g,p)=>{const v=this.nestingOptionsSeparator;if(g.indexOf(v)<0)return g;const x=g.split(new RegExp(`${v}[ ]*{`));let E=`{${x[1]}`;g=x[0],E=this.interpolate(E,f);const O=E.match(/'/g),T=E.match(/"/g);((O?.length??0)%2===0&&!T||T.length%2!==0)&&(E=E.replace(/'/g,'"'));try{f=JSON.parse(E),p&&(f={...p,...f})}catch(A){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,A),`${g}${v}${E}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;o=this.nestingRegexp.exec(t);){let g=[];f={...r},f=f.replace&&!sn(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const p=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(p!==-1&&(g=o[1].slice(p).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),o[1]=o[1].slice(0,p)),u=a(m.call(this,o[1].trim(),f),f),u&&o[0]===t&&!sn(u))return u;sn(u)||(u=O3(u)),u||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),u=""),g.length&&(u=g.reduce((v,x)=>this.format(v,x,r.lng,{...r,interpolationkey:o[1].trim()}),u.trim())),t=t.replace(o[0],u),this.regexp.lastIndex=0}return t}}const YP=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?a.currency||(a.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?a.range||(a.range=o.trim()):o.split(";").forEach(f=>{if(f){const[m,...g]=f.split(":"),p=g.join(":").trim().replace(/^'+|'+$/g,""),v=m.trim();a[v]||(a[v]=p),p==="false"&&(a[v]=!1),p==="true"&&(a[v]=!0),isNaN(p)||(a[v]=parseInt(p,10))}})}return{formatName:t,formatOptions:a}},P3=e=>{const t={};return(a,r,o)=>{let u=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(u={...u,[o.interpolationkey]:void 0});const f=r+JSON.stringify(u);let m=t[f];return m||(m=e(Hv(r),o),t[f]=m),m(a)}},WP=e=>(t,a,r)=>e(Hv(a),r)(t);class KP{constructor(t={}){this.logger=Ys.create("formatter"),this.options=t,this.init(t)}init(t,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const r=a.cacheInBuiltFormats?P3:WP;this.formats={number:r((o,u)=>{const f=new Intl.NumberFormat(o,{...u});return m=>f.format(m)}),currency:r((o,u)=>{const f=new Intl.NumberFormat(o,{...u,style:"currency"});return m=>f.format(m)}),datetime:r((o,u)=>{const f=new Intl.DateTimeFormat(o,{...u});return m=>f.format(m)}),relativetime:r((o,u)=>{const f=new Intl.RelativeTimeFormat(o,{...u});return m=>f.format(m,u.range||"day")}),list:r((o,u)=>{const f=new Intl.ListFormat(o,{...u});return m=>f.format(m)})}}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=P3(a)}format(t,a,r,o={}){const u=a.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(m=>m.indexOf(")")>-1)){const m=u.findIndex(g=>g.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,m)].join(this.formatSeparator)}return u.reduce((m,g)=>{const{formatName:p,formatOptions:v}=YP(g);if(this.formats[p]){let x=m;try{const E=o?.formatParams?.[o.interpolationkey]||{},O=E.locale||E.lng||o.locale||o.lng||r;x=this.formats[p](m,O,{...v,...o,...E})}catch(E){this.logger.warn(E)}return x}else this.logger.warn(`there was no format function for ${p}`);return m},t)}}const ZP=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QP extends X1{constructor(t,a,r,o={}){super(),this.backend=t,this.store=a,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ys.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,a,r,o){const u={},f={},m={},g={};return t.forEach(p=>{let v=!0;a.forEach(x=>{const E=`${p}|${x}`;!r.reload&&this.store.hasResourceBundle(p,x)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?f[E]===void 0&&(f[E]=!0):(this.state[E]=1,v=!1,f[E]===void 0&&(f[E]=!0),u[E]===void 0&&(u[E]=!0),g[x]===void 0&&(g[x]=!0)))}),v||(m[p]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(g)}}loaded(t,a,r){const o=t.split("|"),u=o[0],f=o[1];a&&this.emit("failedLoading",u,f,a),!a&&r&&this.store.addResourceBundle(u,f,r,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&r&&(this.state[t]=0);const m={};this.queue.forEach(g=>{VP(g.loaded,[u],f),ZP(g,t),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(p=>{m[p]||(m[p]={});const v=g.loaded[p];v.length&&v.forEach(x=>{m[p][x]===void 0&&(m[p][x]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(g=>!g.done)}read(t,a,r,o=0,u=this.retryTimeout,f){if(!t.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:r,tried:o,wait:u,callback:f});return}this.readingCalls++;const m=(p,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(p&&v&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,r,o+1,u*2,f)},u);return}f(p,v)},g=this.backend[r].bind(this.backend);if(g.length===2){try{const p=g(t,a);p&&typeof p.then=="function"?p.then(v=>m(null,v)).catch(m):m(null,p)}catch(p){m(p)}return}return g(t,a,m)}prepareLoading(t,a,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();sn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),sn(a)&&(a=[a]);const u=this.queueLoad(t,a,r,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(t,a,r){this.prepareLoading(t,a,{},r)}reload(t,a,r){this.prepareLoading(t,a,{reload:!0},r)}loadOne(t,a=""){const r=t.split("|"),o=r[0],u=r[1];this.read(o,u,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${a}loading namespace ${u} for language ${o} failed`,f),!f&&m&&this.logger.log(`${a}loaded namespace ${u} for language ${o}`,m),this.loaded(t,f,m)})}saveMissing(t,a,r,o,u,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${r}" as the namespace "${a}" 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(!(r==null||r==="")){if(this.backend?.create){const g={...f,isUpdate:u},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(t,a,r,o,g):v=p(t,a,r,o),v&&typeof v.then=="function"?v.then(x=>m(null,x)).catch(m):m(null,v)}catch(v){m(v)}else p(t,a,r,o,m,g)}!t||!t[0]||this.store.addResource(t[0],a,r,o)}}}const H3=()=>({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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),sn(e[1])&&(t.defaultValue=e[1]),sn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(r=>{t[r]=a[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),B3=e=>(sn(e.ns)&&(e.ns=[e.ns]),sn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),sn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),W1=()=>{},JP=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Bv extends X1{constructor(t={},a){if(super(),this.options=B3(t),this.services={},this.logger=Ys,this.modules={external:[]},JP(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(t={},a){this.isInitializing=!0,typeof t=="function"&&(a=t,t={}),t.defaultNS==null&&t.ns&&(sn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=H3();this.options={...r,...this.options,...B3(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Ys.init(o(this.modules.logger),this.options):Ys.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=KP;const v=new z3(this.options);this.store=new N3(this.options.resources,this.options);const x=this.services;x.logger=Ys,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new qP(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),p&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(x.formatter=o(p),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new XP(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new QP(o(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(O,...T)=>{this.emit(O,...T)}),this.modules.languageDetector&&(x.languageDetector=o(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=o(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Y1(this.services,this.options),this.translator.on("*",(O,...T)=>{this.emit(O,...T)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,a||(a=W1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=(...v)=>this.store[p](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...v)=>(this.store[p](...v),this)});const m=Vv(),g=()=>{const p=(v,x)=>{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),m.resolve(x),a(v,x)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(t,a=W1){let r=a;const o=sn(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const u=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&u.indexOf(p)<0&&u.push(p)})};o?f(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(u,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(m)})}else r(null)}reloadResources(t,a,r){const o=Vv();return typeof t=="function"&&(r=t,t=void 0),typeof a=="function"&&(r=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),r||(r=W1),this.services.backendConnector.reload(t,a,u=>{o.resolve(),r(u)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&_3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let a=0;a<this.languages.length;a++){const r=this.languages[a];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,a){this.isLanguageChangingTo=t;const r=Vv();this.emit("languageChanging",t);const o=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},u=(m,g)=>{g?this.isLanguageChangingTo===t&&(o(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,r.resolve((...p)=>this.t(...p)),a&&a(m,(...p)=>this.t(...p))},f=m=>{!t&&!m&&this.services.languageDetector&&(m=[]);const g=sn(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(sn(m)?[m]:m);p&&(this.language||o(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,v=>{u(v,p)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(t),r}getFixedT(t,a,r){const o=(u,f,...m)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([u,f].concat(m)):g={...f},g.lng=g.lng||o.lng,g.lngs=g.lngs||o.lngs,g.ns=g.ns||o.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||r||o.keyPrefix);const p=this.options.keySeparator||".";let v;return g.keyPrefix&&Array.isArray(u)?v=u.map(x=>`${g.keyPrefix}${p}${x}`):v=g.keyPrefix?`${g.keyPrefix}${p}${u}`:u,this.t(v,g)};return sn(t)?o.lng=t:o.lngs=t,o.ns=a,o.keyPrefix=r,o}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,a={}){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 r=a.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const f=(m,g)=>{const p=this.services.backendConnector.state[`${m}|${g}`];return p===-1||p===0||p===2};if(a.precheck){const m=a.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(r,t)&&(!o||f(u,t)))}loadNamespaces(t,a){const r=Vv();return this.options.ns?(sn(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),a&&a(o)}),r):(a&&a(),Promise.resolve())}loadLanguages(t,a){const r=Vv();sn(t)&&(t=[t]);const o=this.options.preload||[],u=t.filter(f=>o.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=o.concat(u),this.loadResources(f=>{r.resolve(),a&&a(f)}),r):(a&&a(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const u=o.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const a=["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"],r=this.services?.languageUtils||new z3(H3());return t.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},a){return new Bv(t,a)}cloneInstance(t={},a=W1){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},u=new Bv(o);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(m=>{u[m]=this[m]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},r){const m=Object.keys(this.store.data).reduce((g,p)=>(g[p]={...this.store.data[p]},g[p]=Object.keys(g[p]).reduce((v,x)=>(v[x]={...g[p][x]},v),g[p]),g),{});u.store=new N3(m,o),u.services.resourceStore=u.store}return u.translator=new Y1(u.services,o),u.translator.on("*",(m,...g)=>{u.emit(m,...g)}),u.init(o,a),u.translator.options=o,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kr=Bv.createInstance();Kr.createInstance=Bv.createInstance,Kr.createInstance,Kr.dir,Kr.init,Kr.loadResources,Kr.reloadResources,Kr.use,Kr.changeLanguage,Kr.getFixedT,Kr.t,Kr.exists,Kr.setDefaultNamespace,Kr.hasLoadedNamespace,Kr.loadNamespaces,Kr.loadLanguages;const e7=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,t7={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},n7=e=>t7[e];let I3={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(e7,n7)};const a7=(e={})=>{I3={...I3,...e}},r7={type:"3rdParty",init(e){a7(e.options.react)}},i7={en:{translation:{welcome:"Hi there, you’re speaking with Jaweb AI Assistant."}},ar:{translation:{welcome:"مرحبًا، أنت تتحدث إلى مساعد Jaweb AI."}}};Kr.use(r7).init({resources:i7,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const o7=3,l7=3e3,s7=()=>{const[e,t]=S.useState(!0),[a,r]=S.useState(!0),[o,u]=S.useState(""),[f,m]=S.useState(""),[g,p]=S.useState(!1),[v,x]=S.useState(!1),[E,O]=S.useState(""),[T,A]=S.useState(""),[R,N]=S.useState(null),[_,j]=S.useState(""),[L,z]=S.useState([]),[V,B]=S.useState([]),[D,P]=S.useState(""),[H,Z]=S.useState(!1),[X,W]=S.useState(""),Q=async(oe=0)=>{const U=localStorage.getItem("company_username");t(!0);const G={headers:{"Content-Type":"application/json",Accept:"application/json"},params:{username:U}};try{const se=(await za.get(`${oi.apiUrl}chatbot-details/`,G)).data.data;se.language==="Arabic"?Kr.changeLanguage("ar"):Kr.changeLanguage("en"),r(se.chatbot_form),u(se.chatbot_color),m(se.chatbot_logo),p(se.disable_chatbot_globally),x(se.remove_powered_by_jaweb),O(se.chatbot_initial_msg),A(se.status),P(se.mode),N(se.calendly_link??null),Z(se.disable_checkout),W(se.chatbot_name),se.calendly_link&&N(se.calendly_link),se.phone_number_id&&j(`+${se.phone_number_id}`);const F=await za.get(`${oi.apiUrl}chatbot-plugin-suggestions/`,G);let q=[];Array.isArray(F.data.data)?q=F.data.data:Array.isArray(F.data.user_questions)&&(q=F.data.user_questions),q.length>0?(z(q.slice(0,3)),B(q.slice(3))):(z([]),B([])),t(!1)}catch(J){console.error("Error fetching data:",J),oe<o7?setTimeout(()=>Q(oe+1),l7):console.error("Max retries reached. Could not fetch data.")}};return S.useEffect(()=>{Q()},[]),{isFetchingDetails:e,disableForm:a,colorCode:o,chatbotLogo:f,disableChatbotGlobally:g,removePoweredByJaweb:v,initialMessageText:E,subscription:T,calendly:R,merchantPhone:_,messagesSuggestions:L,setMessagesSuggestions:z,restSuggestions:V,userType:D,disbleCheckout:H,chatbotName:X}};var PE={exports:{}};/*!
|
|
324
|
+
`+u):r.stack=u}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=Md(this.defaults,a);const{transitional:r,paramsSerializer:o,headers:u}=a;r!==void 0&&F1.assertOptions(r,{silentJSONParsing:Xs.transitional(Xs.boolean),forcedJSONParsing:Xs.transitional(Xs.boolean),clarifyTimeoutError:Xs.transitional(Xs.boolean)},!1),o!=null&&(Ye.isFunction(o)?a.paramsSerializer={serialize:o}:F1.assertOptions(o,{encode:Xs.function,serialize:Xs.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),F1.assertOptions(a,{baseUrl:Xs.spelling("baseURL"),withXsrfToken:Xs.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let f=u&&Ye.merge(u.common,u[a.method]);u&&Ye.forEach(["delete","get","head","post","put","patch","common"],T=>{delete u[T]}),a.headers=vo.concat(f,u);const m=[];let g=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(a)===!1||(g=g&&A.synchronous,m.unshift(A.fulfilled,A.rejected))});const p=[];this.interceptors.response.forEach(function(A){p.push(A.fulfilled,A.rejected)});let v,x=0,E;if(!g){const T=[x3.bind(this),void 0];for(T.unshift.apply(T,m),T.push.apply(T,p),E=T.length,v=Promise.resolve(a);x<E;)v=v.then(T[x++],T[x++]);return v}E=m.length;let O=a;for(x=0;x<E;){const T=m[x++],A=m[x++];try{O=T(O)}catch(R){A.call(this,R);break}}try{v=x3.call(this,O)}catch(T){return Promise.reject(T)}for(x=0,E=p.length;x<E;)v=v.then(p[x++],p[x++]);return v}getUri(t){t=Md(this.defaults,t);const a=d3(t.baseURL,t.url,t.allowAbsoluteUrls);return a3(a,t.params,t.paramsSerializer)}};Ye.forEach(["delete","get","head","options"],function(t){Nd.prototype[t]=function(a,r){return this.request(Md(r||{},{method:t,url:a,data:(r||{}).data}))}}),Ye.forEach(["post","put","patch"],function(t){function a(r){return function(u,f,m){return this.request(Md(m||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:f}))}}Nd.prototype[t]=a(),Nd.prototype[t+"Form"]=a(!0)});let DP=class ZL{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(u){a=u});const r=this;this.promise.then(o=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](o);r._listeners=null}),this.promise.then=o=>{let u;const f=new Promise(m=>{r.subscribe(m),u=m}).then(o);return f.cancel=function(){r.unsubscribe(u)},f},t(function(u,f,m){r.reason||(r.reason=new Rm(u,f,m),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new ZL(function(o){t=o}),cancel:t}}};function $P(e){return function(a){return e.apply(null,a)}}function zP(e){return Ye.isObject(e)&&e.isAxiosError===!0}const jE={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jE).forEach(([e,t])=>{jE[t]=e});function w3(e){const t=new Nd(e),a=UM(Nd.prototype.request,t);return Ye.extend(a,Nd.prototype,t,{allOwnKeys:!0}),Ye.extend(a,t,null,{allOwnKeys:!0}),a.create=function(o){return w3(Md(e,o))},a}const za=w3(jv);za.Axios=Nd,za.CanceledError=Rm,za.CancelToken=DP,za.isCancel=s3,za.VERSION=C3,za.toFormData=P1,za.AxiosError=Cn,za.Cancel=za.CanceledError,za.all=function(t){return Promise.all(t)},za.spread=$P,za.isAxiosError=zP,za.mergeConfig=Md,za.AxiosHeaders=vo,za.formToJSON=e=>o3(Ye.isHTMLForm(e)?new FormData(e):e),za.getAdapter=S3.getAdapter,za.HttpStatusCode=jE,za.default=za;const{Axios:wle,AxiosError:Ole,CanceledError:Tle,isCancel:Rle,CancelToken:Ale,VERSION:Mle,all:Nle,Cancel:_le,isAxiosError:Dle,spread:$le,toFormData:zle,AxiosHeaders:jle,HttpStatusCode:Lle,formToJSON:Vle,getAdapter:Ple,mergeConfig:Hle}=za,oi={apiUrl:"https://jawebcrm.onrender.com/api/",websocketUrl:"wss://jawebcrm.onrender.com/ws"},sn=e=>typeof e=="string",Vv=()=>{let e,t;const a=new Promise((r,o)=>{e=r,t=o});return a.resolve=e,a.reject=t,a},O3=e=>e==null?"":""+e,jP=(e,t,a)=>{e.forEach(r=>{t[r]&&(a[r]=t[r])})},LP=/###/g,T3=e=>e&&e.indexOf("###")>-1?e.replace(LP,"."):e,R3=e=>!e||sn(e),Pv=(e,t,a)=>{const r=sn(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(R3(e))return{};const u=T3(r[o]);!e[u]&&a&&(e[u]=new a),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++o}return R3(e)?{}:{obj:e,k:T3(r[o])}},A3=(e,t,a)=>{const{obj:r,k:o}=Pv(e,t,Object);if(r!==void 0||t.length===1){r[o]=a;return}let u=t[t.length-1],f=t.slice(0,t.length-1),m=Pv(e,f,Object);for(;m.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),m=Pv(e,f,Object),m?.obj&&typeof m.obj[`${m.k}.${u}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${u}`]=a},VP=(e,t,a,r)=>{const{obj:o,k:u}=Pv(e,t,Object);o[u]=o[u]||[],o[u].push(a)},G1=(e,t)=>{const{obj:a,k:r}=Pv(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,r))return a[r]},PP=(e,t,a)=>{const r=G1(e,a);return r!==void 0?r:G1(t,a)},M3=(e,t,a)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?sn(e[r])||e[r]instanceof String||sn(t[r])||t[r]instanceof String?a&&(e[r]=t[r]):M3(e[r],t[r],a):e[r]=t[r]);return e},Am=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var HP={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const BP=e=>sn(e)?e.replace(/[&<>"'\/]/g,t=>HP[t]):e;class IP{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const UP=[" ",",","?","!",";"],kP=new IP(20),FP=(e,t,a)=>{t=t||"",a=a||"";const r=UP.filter(f=>t.indexOf(f)<0&&a.indexOf(f)<0);if(r.length===0)return!0;const o=kP.getRegExp(`(${r.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!o.test(e);if(!u){const f=e.indexOf(a);f>0&&!o.test(e.substring(0,f))&&(u=!0)}return u},LE=(e,t,a=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(a);let o=e;for(let u=0;u<r.length;){if(!o||typeof o!="object")return;let f,m="";for(let g=u;g<r.length;++g)if(g!==u&&(m+=a),m+=r[g],f=o[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<r.length-1)continue;u+=g-u+1;break}o=f}return o},Hv=e=>e?.replace("_","-"),GP={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class q1{constructor(t,a={}){this.init(t,a)}init(t,a={}){this.prefix=a.prefix||"i18next:",this.logger=t||GP,this.options=a,this.debug=a.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,r,o){return o&&!this.debug?null:(sn(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new q1(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new q1(this.logger,t)}}var Ys=new q1;class X1{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(a)||0;this.observers[r].set(a,o+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t,...a){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,u])=>{for(let f=0;f<u;f++)o(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,u])=>{for(let f=0;f<u;f++)o.apply(o,[t,...a])})}}class N3 extends X1{constructor(t,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,r,o={}){const u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;t.indexOf(".")>-1?m=t.split("."):(m=[t,a],r&&(Array.isArray(r)?m.push(...r):sn(r)&&u?m.push(...r.split(u)):m.push(r)));const g=G1(this.data,m);return!g&&!a&&!r&&t.indexOf(".")>-1&&(t=m[0],a=m[1],r=m.slice(2).join(".")),g||!f||!sn(r)?g:LE(this.data?.[t]?.[a],r,u)}addResource(t,a,r,o,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let m=[t,a];r&&(m=m.concat(f?r.split(f):r)),t.indexOf(".")>-1&&(m=t.split("."),o=a,a=m[1]),this.addNamespaces(a),A3(this.data,m,o),u.silent||this.emit("added",t,a,r,o)}addResources(t,a,r,o={silent:!1}){for(const u in r)(sn(r[u])||Array.isArray(r[u]))&&this.addResource(t,a,u,r[u],{silent:!0});o.silent||this.emit("added",t,a,r)}addResourceBundle(t,a,r,o,u,f={silent:!1,skipCopy:!1}){let m=[t,a];t.indexOf(".")>-1&&(m=t.split("."),o=r,r=a,a=m[1]),this.addNamespaces(a);let g=G1(this.data,m)||{};f.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?M3(g,r,u):g={...g,...r},A3(this.data,m,g),f.silent||this.emit("added",t,a,r)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(o=>a[o]&&Object.keys(a[o]).length>0)}toJSON(){return this.data}}var _3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,r,o){return e.forEach(u=>{t=this.processors[u]?.process(t,a,r,o)??t}),t}};const D3={},$3=e=>!sn(e)&&typeof e!="boolean"&&typeof e!="number";class Y1 extends X1{constructor(t,a={}){super(),jP(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ys.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,a={interpolation:{}}){const r={...a};return t==null?!1:this.resolve(t,r)?.res!==void 0}extractFromKey(t,a){let r=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=a.ns||this.options.defaultNS||[];const f=r&&t.indexOf(r)>-1,m=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!FP(t,r,o);if(f&&!m){const g=t.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:t,namespaces:sn(u)?[u]:u};const p=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(p[0])>-1)&&(u=p.shift()),t=p.join(o)}return{key:t,namespaces:sn(u)?[u]:u}}translate(t,a,r){let o=typeof a=="object"?{...a}:a;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(o={...o}),o||(o={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,f=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:m,namespaces:g}=this.extractFromKey(t[t.length-1],o),p=g[g.length-1];let v=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=o.lng||this.language,E=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return E?u?{res:`${p}${v}${m}`,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(o)}:`${p}${v}${m}`:u?{res:m,usedKey:m,exactUsedKey:m,usedLng:x,usedNS:p,usedParams:this.getUsedParamsDetails(o)}:m;const O=this.resolve(t,o);let T=O?.res;const A=O?.usedKey||m,R=O?.exactUsedKey||m,N=["[object Number]","[object Function]","[object RegExp]"],_=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,L=o.count!==void 0&&!sn(o.count),z=Y1.hasDefaultValue(o),V=L?this.pluralResolver.getSuffix(x,o.count,o):"",B=o.ordinal&&L?this.pluralResolver.getSuffix(x,o.count,{ordinal:!1}):"",D=L&&!o.ordinal&&o.count===0,P=D&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${V}`]||o[`defaultValue${B}`]||o.defaultValue;let H=T;j&&!T&&z&&(H=P);const Z=$3(H),X=Object.prototype.toString.apply(H);if(j&&H&&Z&&N.indexOf(X)<0&&!(sn(_)&&Array.isArray(H))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,H,{...o,ns:g}):`key '${m} (${this.language})' returned an object instead of string.`;return u?(O.res=W,O.usedParams=this.getUsedParamsDetails(o),O):W}if(f){const W=Array.isArray(H),Q=W?[]:{},oe=W?R:A;for(const U in H)if(Object.prototype.hasOwnProperty.call(H,U)){const G=`${oe}${f}${U}`;z&&!T?Q[U]=this.translate(G,{...o,defaultValue:$3(P)?P[U]:void 0,joinArrays:!1,ns:g}):Q[U]=this.translate(G,{...o,joinArrays:!1,ns:g}),Q[U]===G&&(Q[U]=H[U])}T=Q}}else if(j&&sn(_)&&Array.isArray(T))T=T.join(_),T&&(T=this.extendTranslation(T,t,o,r));else{let W=!1,Q=!1;!this.isValidLookup(T)&&z&&(W=!0,T=P),this.isValidLookup(T)||(Q=!0,T=m);const U=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:T,G=z&&P!==T&&this.options.updateMissing;if(Q||W||G){if(this.logger.log(G?"updateKey":"missingKey",x,p,m,G?P:T),f){const q=this.resolve(m,{...o,keySeparator:!1});q&&q.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 J=[];const se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(let q=0;q<se.length;q++)J.push(se[q]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(o.lng||this.language):J.push(o.lng||this.language);const F=(q,ee,ne)=>{const re=z&&ne!==T?ne:U;this.options.missingKeyHandler?this.options.missingKeyHandler(q,p,ee,re,G,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(q,p,ee,re,G,o),this.emit("missingKey",q,p,ee,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?J.forEach(q=>{const ee=this.pluralResolver.getSuffixes(q,o);D&&o[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(ne=>{F([q],m+ne,o[`defaultValue${ne}`]||P)})}):F(J,m,P))}T=this.extendTranslation(T,t,o,O,r),Q&&T===m&&this.options.appendNamespaceToMissingKey&&(T=`${p}${v}${m}`),(Q||W)&&this.options.parseMissingKeyHandler&&(T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${v}${m}`:m,W?T:void 0,o))}return u?(O.res=T,O.usedParams=this.getUsedParamsDetails(o),O):T}extendTranslation(t,a,r,o,u){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=sn(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(g){const x=t.match(this.interpolator.nestingRegexp);p=x&&x.length}let v=r.replace&&!sn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),t=this.interpolator.interpolate(t,v,r.lng||this.language||o.usedLng,r),g){const x=t.match(this.interpolator.nestingRegexp),E=x&&x.length;p<E&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...x)=>u?.[0]===x[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${a[0]}`),null):this.translate(...x,a),r)),r.interpolation&&this.interpolator.reset()}const f=r.postProcess||this.options.postProcess,m=sn(f)?[f]:f;return t!=null&&m?.length&&r.applyPostProcessor!==!1&&(t=_3.handle(m,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,a={}){let r,o,u,f,m;return sn(t)&&(t=[t]),t.forEach(g=>{if(this.isValidLookup(r))return;const p=this.extractFromKey(g,a),v=p.key;o=v;let x=p.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const E=a.count!==void 0&&!sn(a.count),O=E&&!a.ordinal&&a.count===0,T=a.context!==void 0&&(sn(a.context)||typeof a.context=="number")&&a.context!=="",A=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);x.forEach(R=>{this.isValidLookup(r)||(m=R,!D3[`${A[0]}-${R}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(D3[`${A[0]}-${R}`]=!0,this.logger.warn(`key "${o}" for languages "${A.join(", ")}" won't get resolved as namespace "${m}" 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!!!")),A.forEach(N=>{if(this.isValidLookup(r))return;f=N;const _=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,v,N,R,a);else{let L;E&&(L=this.pluralResolver.getSuffix(N,a.count,a));const z=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(_.push(v+L),a.ordinal&&L.indexOf(V)===0&&_.push(v+L.replace(V,this.options.pluralSeparator)),O&&_.push(v+z)),T){const B=`${v}${this.options.contextSeparator}${a.context}`;_.push(B),E&&(_.push(B+L),a.ordinal&&L.indexOf(V)===0&&_.push(B+L.replace(V,this.options.pluralSeparator)),O&&_.push(B+z))}}let j;for(;j=_.pop();)this.isValidLookup(r)||(u=j,r=this.getResource(N,R,j,a))}))})}),{res:r,usedKey:o,exactUsedKey:u,usedLng:f,usedNS:m}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,a,r,o):this.resourceStore.getResource(t,a,r,o)}getUsedParamsDetails(t={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!sn(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const u of a)delete o[u]}return o}static hasDefaultValue(t){const a="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&a===r.substring(0,a.length)&&t[r]!==void 0)return!0;return!1}}class z3{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ys.create("languageUtils")}getScriptPartFromCode(t){if(t=Hv(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=Hv(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(sn(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(r=>{if(a)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(a=o)}),!a&&this.options.supportedLngs&&t.forEach(r=>{if(a)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return a=o;const u=this.getLanguagePartFromCode(r);if(this.isSupportedCode(u))return a=u;a=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),sn(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let r=t[a];return r||(r=t[this.getScriptPartFromCode(a)]),r||(r=t[this.formatLanguageCode(a)]),r||(r=t[this.getLanguagePartFromCode(a)]),r||(r=t.default),r||[]}toResolveHierarchy(t,a){const r=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],t),o=[],u=f=>{f&&(this.isSupportedCode(f)?o.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return sn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(t))):sn(t)&&u(this.formatLanguageCode(t)),r.forEach(f=>{o.indexOf(f)<0&&u(this.formatLanguageCode(f))}),o}}const j3={zero:0,one:1,two:2,few:3,many:4,other:5},L3={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class qP{constructor(t,a={}){this.languageUtils=t,this.options=a,this.logger=Ys.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t,a={}){const r=Hv(t==="dev"?"en":t),o=a.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:r,type:o});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),L3;if(!t.match(/-|_/))return L3;const g=this.languageUtils.getLanguagePartFromCode(t);f=this.getRule(g,a)}return this.pluralRulesCache[u]=f,f}needsPlural(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,a,r={}){return this.getSuffixes(t,r).map(o=>`${a}${o}`)}getSuffixes(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?r.resolvedOptions().pluralCategories.sort((o,u)=>j3[o]-j3[u]).map(o=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,a,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,r))}}const V3=(e,t,a,r=".",o=!0)=>{let u=PP(e,t,a);return!u&&o&&sn(a)&&(u=LE(e,a,r),u===void 0&&(u=LE(t,a,r))),u},VE=e=>e.replace(/\$/g,"$$$$");class XP{constructor(t={}){this.logger=Ys.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(a=>a),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:r,useRawValueToEscape:o,prefix:u,prefixEscaped:f,suffix:m,suffixEscaped:g,formatSeparator:p,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:E,nestingPrefixEscaped:O,nestingSuffix:T,nestingSuffixEscaped:A,nestingOptionsSeparator:R,maxReplaces:N,alwaysFormat:_}=t.interpolation;this.escape=a!==void 0?a:BP,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=u?Am(u):f||"{{",this.suffix=m?Am(m):g||"}}",this.formatSeparator=p||",",this.unescapePrefix=v?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=E?Am(E):O||Am("$t("),this.nestingSuffix=T?Am(T):A||Am(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=N||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,r)=>a?.source===r?(a.lastIndex=0,a):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,r,o){let u,f,m;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=O=>{if(O.indexOf(this.formatSeparator)<0){const N=V3(a,g,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,r,{...o,...a,interpolationkey:O}):N}const T=O.split(this.formatSeparator),A=T.shift().trim(),R=T.join(this.formatSeparator).trim();return this.format(V3(a,g,A,this.options.keySeparator,this.options.ignoreJSONStructure),R,r,{...o,...a,interpolationkey:A})};this.resetRegExp();const v=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>VE(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?VE(this.escape(O)):VE(O)}].forEach(O=>{for(m=0;u=O.regex.exec(t);){const T=u[1].trim();if(f=p(T),f===void 0)if(typeof v=="function"){const R=v(t,u,o);f=sn(R)?R:""}else if(o&&Object.prototype.hasOwnProperty.call(o,T))f="";else if(x){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${t}`),f="";else!sn(f)&&!this.useRawValueToEscape&&(f=O3(f));const A=O.safeValue(f);if(t=t.replace(u[0],A),x?(O.regex.lastIndex+=f.length,O.regex.lastIndex-=u[0].length):O.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),t}nest(t,a,r={}){let o,u,f;const m=(g,p)=>{const v=this.nestingOptionsSeparator;if(g.indexOf(v)<0)return g;const x=g.split(new RegExp(`${v}[ ]*{`));let E=`{${x[1]}`;g=x[0],E=this.interpolate(E,f);const O=E.match(/'/g),T=E.match(/"/g);((O?.length??0)%2===0&&!T||T.length%2!==0)&&(E=E.replace(/'/g,'"'));try{f=JSON.parse(E),p&&(f={...p,...f})}catch(A){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,A),`${g}${v}${E}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;o=this.nestingRegexp.exec(t);){let g=[];f={...r},f=f.replace&&!sn(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const p=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(p!==-1&&(g=o[1].slice(p).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),o[1]=o[1].slice(0,p)),u=a(m.call(this,o[1].trim(),f),f),u&&o[0]===t&&!sn(u))return u;sn(u)||(u=O3(u)),u||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),u=""),g.length&&(u=g.reduce((v,x)=>this.format(v,x,r.lng,{...r,interpolationkey:o[1].trim()}),u.trim())),t=t.replace(o[0],u),this.regexp.lastIndex=0}return t}}const YP=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?a.currency||(a.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?a.range||(a.range=o.trim()):o.split(";").forEach(f=>{if(f){const[m,...g]=f.split(":"),p=g.join(":").trim().replace(/^'+|'+$/g,""),v=m.trim();a[v]||(a[v]=p),p==="false"&&(a[v]=!1),p==="true"&&(a[v]=!0),isNaN(p)||(a[v]=parseInt(p,10))}})}return{formatName:t,formatOptions:a}},P3=e=>{const t={};return(a,r,o)=>{let u=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(u={...u,[o.interpolationkey]:void 0});const f=r+JSON.stringify(u);let m=t[f];return m||(m=e(Hv(r),o),t[f]=m),m(a)}},WP=e=>(t,a,r)=>e(Hv(a),r)(t);class KP{constructor(t={}){this.logger=Ys.create("formatter"),this.options=t,this.init(t)}init(t,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const r=a.cacheInBuiltFormats?P3:WP;this.formats={number:r((o,u)=>{const f=new Intl.NumberFormat(o,{...u});return m=>f.format(m)}),currency:r((o,u)=>{const f=new Intl.NumberFormat(o,{...u,style:"currency"});return m=>f.format(m)}),datetime:r((o,u)=>{const f=new Intl.DateTimeFormat(o,{...u});return m=>f.format(m)}),relativetime:r((o,u)=>{const f=new Intl.RelativeTimeFormat(o,{...u});return m=>f.format(m,u.range||"day")}),list:r((o,u)=>{const f=new Intl.ListFormat(o,{...u});return m=>f.format(m)})}}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=P3(a)}format(t,a,r,o={}){const u=a.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(m=>m.indexOf(")")>-1)){const m=u.findIndex(g=>g.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,m)].join(this.formatSeparator)}return u.reduce((m,g)=>{const{formatName:p,formatOptions:v}=YP(g);if(this.formats[p]){let x=m;try{const E=o?.formatParams?.[o.interpolationkey]||{},O=E.locale||E.lng||o.locale||o.lng||r;x=this.formats[p](m,O,{...v,...o,...E})}catch(E){this.logger.warn(E)}return x}else this.logger.warn(`there was no format function for ${p}`);return m},t)}}const ZP=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QP extends X1{constructor(t,a,r,o={}){super(),this.backend=t,this.store=a,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ys.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,a,r,o){const u={},f={},m={},g={};return t.forEach(p=>{let v=!0;a.forEach(x=>{const E=`${p}|${x}`;!r.reload&&this.store.hasResourceBundle(p,x)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?f[E]===void 0&&(f[E]=!0):(this.state[E]=1,v=!1,f[E]===void 0&&(f[E]=!0),u[E]===void 0&&(u[E]=!0),g[x]===void 0&&(g[x]=!0)))}),v||(m[p]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(g)}}loaded(t,a,r){const o=t.split("|"),u=o[0],f=o[1];a&&this.emit("failedLoading",u,f,a),!a&&r&&this.store.addResourceBundle(u,f,r,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&r&&(this.state[t]=0);const m={};this.queue.forEach(g=>{VP(g.loaded,[u],f),ZP(g,t),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(p=>{m[p]||(m[p]={});const v=g.loaded[p];v.length&&v.forEach(x=>{m[p][x]===void 0&&(m[p][x]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(g=>!g.done)}read(t,a,r,o=0,u=this.retryTimeout,f){if(!t.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:r,tried:o,wait:u,callback:f});return}this.readingCalls++;const m=(p,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(p&&v&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,r,o+1,u*2,f)},u);return}f(p,v)},g=this.backend[r].bind(this.backend);if(g.length===2){try{const p=g(t,a);p&&typeof p.then=="function"?p.then(v=>m(null,v)).catch(m):m(null,p)}catch(p){m(p)}return}return g(t,a,m)}prepareLoading(t,a,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();sn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),sn(a)&&(a=[a]);const u=this.queueLoad(t,a,r,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(t,a,r){this.prepareLoading(t,a,{},r)}reload(t,a,r){this.prepareLoading(t,a,{reload:!0},r)}loadOne(t,a=""){const r=t.split("|"),o=r[0],u=r[1];this.read(o,u,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${a}loading namespace ${u} for language ${o} failed`,f),!f&&m&&this.logger.log(`${a}loaded namespace ${u} for language ${o}`,m),this.loaded(t,f,m)})}saveMissing(t,a,r,o,u,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${r}" as the namespace "${a}" 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(!(r==null||r==="")){if(this.backend?.create){const g={...f,isUpdate:u},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(t,a,r,o,g):v=p(t,a,r,o),v&&typeof v.then=="function"?v.then(x=>m(null,x)).catch(m):m(null,v)}catch(v){m(v)}else p(t,a,r,o,m,g)}!t||!t[0]||this.store.addResource(t[0],a,r,o)}}}const H3=()=>({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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),sn(e[1])&&(t.defaultValue=e[1]),sn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(r=>{t[r]=a[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),B3=e=>(sn(e.ns)&&(e.ns=[e.ns]),sn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),sn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),W1=()=>{},JP=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class Bv extends X1{constructor(t={},a){if(super(),this.options=B3(t),this.services={},this.logger=Ys,this.modules={external:[]},JP(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(t={},a){this.isInitializing=!0,typeof t=="function"&&(a=t,t={}),t.defaultNS==null&&t.ns&&(sn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=H3();this.options={...r,...this.options,...B3(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Ys.init(o(this.modules.logger),this.options):Ys.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=KP;const v=new z3(this.options);this.store=new N3(this.options.resources,this.options);const x=this.services;x.logger=Ys,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new qP(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),p&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(x.formatter=o(p),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new XP(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new QP(o(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(O,...T)=>{this.emit(O,...T)}),this.modules.languageDetector&&(x.languageDetector=o(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=o(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Y1(this.services,this.options),this.translator.on("*",(O,...T)=>{this.emit(O,...T)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,a||(a=W1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=(...v)=>this.store[p](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...v)=>(this.store[p](...v),this)});const m=Vv(),g=()=>{const p=(v,x)=>{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),m.resolve(x),a(v,x)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(t,a=W1){let r=a;const o=sn(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const u=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&u.indexOf(p)<0&&u.push(p)})};o?f(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(u,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(m)})}else r(null)}reloadResources(t,a,r){const o=Vv();return typeof t=="function"&&(r=t,t=void 0),typeof a=="function"&&(r=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),r||(r=W1),this.services.backendConnector.reload(t,a,u=>{o.resolve(),r(u)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&_3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let a=0;a<this.languages.length;a++){const r=this.languages[a];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,a){this.isLanguageChangingTo=t;const r=Vv();this.emit("languageChanging",t);const o=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},u=(m,g)=>{g?this.isLanguageChangingTo===t&&(o(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,r.resolve((...p)=>this.t(...p)),a&&a(m,(...p)=>this.t(...p))},f=m=>{!t&&!m&&this.services.languageDetector&&(m=[]);const g=sn(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(sn(m)?[m]:m);p&&(this.language||o(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,v=>{u(v,p)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(t),r}getFixedT(t,a,r){const o=(u,f,...m)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([u,f].concat(m)):g={...f},g.lng=g.lng||o.lng,g.lngs=g.lngs||o.lngs,g.ns=g.ns||o.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||r||o.keyPrefix);const p=this.options.keySeparator||".";let v;return g.keyPrefix&&Array.isArray(u)?v=u.map(x=>`${g.keyPrefix}${p}${x}`):v=g.keyPrefix?`${g.keyPrefix}${p}${u}`:u,this.t(v,g)};return sn(t)?o.lng=t:o.lngs=t,o.ns=a,o.keyPrefix=r,o}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,a={}){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 r=a.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const f=(m,g)=>{const p=this.services.backendConnector.state[`${m}|${g}`];return p===-1||p===0||p===2};if(a.precheck){const m=a.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(r,t)&&(!o||f(u,t)))}loadNamespaces(t,a){const r=Vv();return this.options.ns?(sn(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),a&&a(o)}),r):(a&&a(),Promise.resolve())}loadLanguages(t,a){const r=Vv();sn(t)&&(t=[t]);const o=this.options.preload||[],u=t.filter(f=>o.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=o.concat(u),this.loadResources(f=>{r.resolve(),a&&a(f)}),r):(a&&a(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const u=o.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const a=["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"],r=this.services?.languageUtils||new z3(H3());return t.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},a){return new Bv(t,a)}cloneInstance(t={},a=W1){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},u=new Bv(o);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(m=>{u[m]=this[m]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},r){const m=Object.keys(this.store.data).reduce((g,p)=>(g[p]={...this.store.data[p]},g[p]=Object.keys(g[p]).reduce((v,x)=>(v[x]={...g[p][x]},v),g[p]),g),{});u.store=new N3(m,o),u.services.resourceStore=u.store}return u.translator=new Y1(u.services,o),u.translator.on("*",(m,...g)=>{u.emit(m,...g)}),u.init(o,a),u.translator.options=o,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kr=Bv.createInstance();Kr.createInstance=Bv.createInstance,Kr.createInstance,Kr.dir,Kr.init,Kr.loadResources,Kr.reloadResources,Kr.use,Kr.changeLanguage,Kr.getFixedT,Kr.t,Kr.exists,Kr.setDefaultNamespace,Kr.hasLoadedNamespace,Kr.loadNamespaces,Kr.loadLanguages;const e7=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,t7={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},n7=e=>t7[e];let I3={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(e7,n7)};const a7=(e={})=>{I3={...I3,...e}},r7={type:"3rdParty",init(e){a7(e.options.react)}},i7={en:{translation:{welcome:"Hi there, you’re speaking with Jaweb AI Assistant."}},ar:{translation:{welcome:"مرحبًا، أنت تتحدث إلى مساعد Jaweb AI."}}};Kr.use(r7).init({resources:i7,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const o7=3,l7=3e3,s7=()=>{const[e,t]=S.useState(!0),[a,r]=S.useState(!0),[o,u]=S.useState(""),[f,m]=S.useState(""),[g,p]=S.useState(!1),[v,x]=S.useState(!1),[E,O]=S.useState(""),[T,A]=S.useState(""),[R,N]=S.useState(null),[_,j]=S.useState(""),[L,z]=S.useState([]),[V,B]=S.useState([]),[D,P]=S.useState(""),[H,Z]=S.useState(!1),[X,W]=S.useState(""),Q=async(oe=0)=>{const U=localStorage.getItem("company_username");t(!0);const G={headers:{"Content-Type":"application/json",Accept:"application/json"},params:{username:U}};try{const se=(await za.get(`${oi.apiUrl}chatbot-details/`,G)).data.data;se.language==="Arabic"?Kr.changeLanguage("ar"):Kr.changeLanguage("en"),r(se.chatbot_form),u(se.chatbot_color),m(se.chatbot_logo),p(se.disable_chatbot_globally),x(se.remove_powered_by_jaweb),O(se.chatbot_initial_msg),A(se.status),P(se.mode),N(se.calendly_link??null),Z(se.disable_checkout),W(se.chatbot_name),se.calendly_link&&N(se.calendly_link),se.phone_number_id&&j(`+${se.phone_number_id}`);const F=await za.get(`${oi.apiUrl}chatbot-plugin-suggestions/`,G);let q=[];Array.isArray(F.data.data)?q=F.data.data:Array.isArray(F.data.user_questions)&&(q=F.data.user_questions),q.length>0?(z(q.slice(0,3)),B(q.slice(3))):(z([]),B([])),t(!1)}catch(J){console.error("Error fetching data:",J),oe<o7?setTimeout(()=>Q(oe+1),l7):console.error("Max retries reached. Could not fetch data.")}};return S.useEffect(()=>{Q()},[]),{isFetchingDetails:e,disableForm:a,colorCode:o,chatbotLogo:f,disableChatbotGlobally:g,removePoweredByJaweb:v,initialMessageText:E,subscription:T,calendly:R,merchantPhone:_,messagesSuggestions:L,setMessagesSuggestions:z,restSuggestions:V,userType:D,disbleCheckout:H,chatbotName:X}};var PE={exports:{}};/*!
|
|
325
325
|
Copyright (c) 2018 Jed Watson.
|
|
326
326
|
Licensed under the MIT License (MIT), see
|
|
327
327
|
http://jedwatson.github.io/classnames
|
package/package.json
CHANGED
package/src/hooks/config.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const config = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
apiUrl:'https://jawebcrm.onrender.com/api/',
|
|
5
|
+
websocketUrl:'wss://jawebcrm.onrender.com/ws' ,
|
|
6
6
|
|
|
7
|
-
apiUrl:'http://localhost:8000/api/',
|
|
8
|
-
websocketUrl:'ws://localhost:8000/ws',
|
|
7
|
+
// apiUrl:'http://localhost:8000/api/',
|
|
8
|
+
// websocketUrl:'ws://localhost:8000/ws',
|
|
9
9
|
|
|
10
10
|
};
|
|
11
11
|
export default config;
|