@nizza/core 0.6.2-beta.0 → 0.6.2-beta.1
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.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +132 -132
- package/dist/index.mjs.map +1 -1
- package/dist/lib/clean-architecture/infrastructure/clients/http-axios.client.d.ts +5 -5
- package/dist/lib/clean-architecture/infrastructure/clients/http-axios.client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28,7 +28,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
28
28
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[Ea]=this[Ea]={accessors:{}}).accessors,r=this.prototype;function a(s){const o=Et(s);i[o]||(eh(r,s),i[o]=!0)}return y.isArray(e)?e.forEach(a):a(e),this}}ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(ue.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});y.freezeMethods(ue);function Fi(t,e){const n=this||nn,i=e||n,r=ue.from(i.headers);let a=i.data;return y.forEach(t,function(o){a=o.call(n,a,r.normalize(),e?e.status:void 0)}),r.normalize(),a}function Wo(t){return!!(t&&t.__CANCEL__)}function rn(t,e,n){q.call(this,t==null?"canceled":t,q.ERR_CANCELED,e,n),this.name="CanceledError"}y.inherits(rn,q,{__CANCEL__:!0});function th(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const nh=ye.hasStandardBrowserEnv?{write(t,e,n,i,r,a){const s=[t+"="+encodeURIComponent(e)];y.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),y.isString(i)&&s.push("path="+i),y.isString(r)&&s.push("domain="+r),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ih(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function rh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Jo(t,e){return t&&!ih(e)?rh(t,e):e}const ah=ye.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function r(a){let s=a;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=r(window.location.href),function(s){const o=y.isString(s)?r(s):s;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}();function sh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function oh(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,a=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[a];s||(s=u),n[r]=l,i[r]=u;let d=a,f=0;for(;d!==r;)f+=n[d++],d=d%t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),u-s<e)return;const v=c&&u-c;return v?Math.round(f*1e3/v):void 0}}function Aa(t,e){let n=0;const i=oh(50,250);return r=>{const a=r.loaded,s=r.lengthComputable?r.total:void 0,o=a-n,l=i(o),u=a<=s;n=a;const c={loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:r};c[e?"download":"upload"]=!0,t(c)}}const lh=typeof XMLHttpRequest!="undefined",uh=lh&&function(t){return new Promise(function(n,i){let r=t.data;const a=ue.from(t.headers).normalize();let{responseType:s,withXSRFToken:o}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let c;if(y.isFormData(r)){if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((c=a.getContentType())!==!1){const[m,...N]=c?c.split(";").map(_=>_.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...N].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",N=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+N))}const f=Jo(t.baseURL,t.url);d.open(t.method.toUpperCase(),Ho(f,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const m=ue.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),_={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:m,config:t,request:d};th(function(M){n(M),u()},function(M){i(M),u()},_),d=null}if("onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(i(new q("Request aborted",q.ECONNABORTED,t,d)),d=null)},d.onerror=function(){i(new q("Network Error",q.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let N=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const _=t.transitional||qo;t.timeoutErrorMessage&&(N=t.timeoutErrorMessage),i(new q(N,_.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,t,d)),d=null},ye.hasStandardBrowserEnv&&(o&&y.isFunction(o)&&(o=o(t)),o||o!==!1&&ah(f))){const m=t.xsrfHeaderName&&t.xsrfCookieName&&nh.read(t.xsrfCookieName);m&&a.set(t.xsrfHeaderName,m)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&y.forEach(a.toJSON(),function(N,_){d.setRequestHeader(_,N)}),y.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",Aa(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Aa(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{d&&(i(!m||m.type?new rn(null,t,d):m),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=sh(f);if(p&&ye.protocols.indexOf(p)===-1){i(new q("Unsupported protocol "+p+":",q.ERR_BAD_REQUEST,t));return}d.send(r||null)})},sr={http:Df,xhr:uh};y.forEach(sr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Oa=t=>`- ${t}`,ch=t=>y.isFunction(t)||t===null||t===!1,Yo={getAdapter:t=>{t=y.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){n=t[a];let s;if(i=n,!ch(n)&&(i=sr[(s=String(n)).toLowerCase()],i===void 0))throw new q(`Unknown adapter '${s}'`);if(i)break;r[s||"#"+a]=i}if(!i){const a=Object.entries(r).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?a.length>1?`since :
|
|
29
29
|
`+a.map(Oa).join(`
|
|
30
30
|
`):" "+Oa(a[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:sr};function Ii(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new rn(null,t)}function wa(t){return Ii(t),t.headers=ue.from(t.headers),t.data=Fi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yo.getAdapter(t.adapter||nn.adapter)(t).then(function(i){return Ii(t),i.data=Fi.call(t,t.transformResponse,i),i.headers=ue.from(i.headers),i},function(i){return Wo(i)||(Ii(t),i&&i.response&&(i.response.data=Fi.call(t,t.transformResponse,i.response),i.response.headers=ue.from(i.response.headers))),Promise.reject(i)})}const Ta=t=>t instanceof ue?{...t}:t;function ft(t,e){e=e||{};const n={};function i(u,c,d){return y.isPlainObject(u)&&y.isPlainObject(c)?y.merge.call({caseless:d},u,c):y.isPlainObject(c)?y.merge({},c):y.isArray(c)?c.slice():c}function r(u,c,d){if(y.isUndefined(c)){if(!y.isUndefined(u))return i(void 0,u,d)}else return i(u,c,d)}function a(u,c){if(!y.isUndefined(c))return i(void 0,c)}function s(u,c){if(y.isUndefined(c)){if(!y.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function o(u,c,d){if(d in e)return i(u,c);if(d in t)return i(void 0,u)}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(u,c)=>r(Ta(u),Ta(c),!0)};return y.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||r,f=d(t[c],e[c],c);y.isUndefined(f)&&d!==o||(n[c]=f)}),n}const Qo="1.6.8",Vr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Vr[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const Ca={};Vr.transitional=function(e,n,i){function r(a,s){return"[Axios v"+Qo+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return(a,s,o)=>{if(e===!1)throw new q(r(s," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!Ca[s]&&(Ca[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(a,s,o):!0}};function dh(t,e,n){if(typeof t!="object")throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const a=i[r],s=e[a];if(s){const o=t[a],l=o===void 0||s(o,a,t);if(l!==!0)throw new q("option "+a+" must be "+l,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+a,q.ERR_BAD_OPTION)}}const or={assertOptions:dh,validators:Vr},Ce=or.validators;class ze{constructor(e){this.defaults=e,this.interceptors={request:new Na,response:new Na}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
31
|
-
`+a):i.stack=a}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ft(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:a}=n;i!==void 0&&or.assertOptions(i,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),r!=null&&(y.isFunction(r)?n.paramsSerializer={serialize:r}:or.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&y.merge(a.common,a[n.method]);a&&y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),n.headers=ue.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const p=[wa.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=o.length;let v=n;for(d=0;d<f;){const p=o[d++],m=o[d++];try{v=p(v)}catch(N){m.call(this,N);break}}try{c=wa.call(this,v)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=ft(this.defaults,e);const n=Jo(e.baseURL,e.url);return Ho(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){ze.prototype[e]=function(n,i){return this.request(ft(i||{},{method:e,url:n,data:(i||{}).data}))}});y.forEach(["post","put","patch"],function(e){function n(i){return function(a,s,o){return this.request(ft(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}ze.prototype[e]=n(),ze.prototype[e+"Form"]=n(!0)});class Mr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const i=this;this.promise.then(r=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const s=new Promise(o=>{i.subscribe(o),a=o}).then(r);return s.cancel=function(){i.unsubscribe(a)},s},e(function(a,s,o){i.reason||(i.reason=new rn(a,s,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Mr(function(r){e=r}),cancel:e}}}function fh(t){return function(n){return t.apply(null,n)}}function hh(t){return y.isObject(t)&&t.isAxiosError===!0}const lr={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(lr).forEach(([t,e])=>{lr[e]=t});function Xo(t){const e=new ze(t),n=Fo(ze.prototype.request,e);return y.extend(n,ze.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Xo(ft(t,r))},n}const J=Xo(nn);J.Axios=ze;J.CanceledError=rn;J.CancelToken=Mr;J.isCancel=Wo;J.VERSION=Qo;J.toFormData=li;J.AxiosError=q;J.Cancel=J.CanceledError;J.all=function(e){return Promise.all(e)};J.spread=fh;J.isAxiosError=hh;J.mergeConfig=ft;J.AxiosHeaders=ue;J.formToJSON=t=>Ko(y.isHTMLForm(t)?new FormData(t):t);J.getAdapter=Yo.getAdapter;J.HttpStatusCode=lr;J.default=J;class ph{constructor(e){w(this,"logger");w(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=J.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(s){if(r&&J.isAxiosError(s))return(a=s.response)==null?void 0:a.data;throw this.handleError(s)}}async put(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(s){if(r&&J.isAxiosError(s))return(a=s.response)==null?void 0:a.data;throw this.handleError(s)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=ne.GENERAL_ERROR;if(J.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=ne.BAD_REQUEST;break;case 401:n=ne.UNAUTHORIZED;break;case 403:n=ne.FORBIDDEN;break;case 404:n=ne.NOT_FOUND;break;case 409:n=ne.CONFLICT;break;case 410:n=ne.GONE;break;case 415:n=ne.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=ne.TOO_MANY_REQUESTS;break;case 500:n=ne.INTERNAL_SERVER_ERROR;break;case 503:n=ne.SERVICE_UNAVAILABLE;break;default:n=ne.SERVER_ERROR}else e.request?n=ne.NETWORK_ERROR:n=ne.CONFIG_ERROR;const i=tl(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}const mh={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $n{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||mh,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new $n(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $n(this.logger,e)}}var be=new $n;class ui{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}function At(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function xa(t){return t==null?"":""+t}function gh(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const vh=/###/g;function Ft(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(vh,"."):o}function r(){return!t||typeof t=="string"}const a=typeof e!="string"?e:e.split(".");let s=0;for(;s<a.length-1;){if(r())return{};const o=i(a[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return r()?{}:{obj:t,k:i(a[s])}}function Ra(t,e,n){const{obj:i,k:r}=Ft(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=Ft(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=Ft(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${a}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n}function kh(t,e,n,i){const{obj:r,k:a}=Ft(t,e,Object);r[a]=r[a]||[],r[a].push(n)}function Un(t,e){const{obj:n,k:i}=Ft(t,e);if(n)return n[i]}function yh(t,e,n){const i=Un(t,n);return i!==void 0?i:Un(e,n)}function Zo(t,e,n){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):Zo(t[i],e[i],n):t[i]=e[i]);return t}function tt(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var bh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function _h(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>bh[e]):t}class Sh{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Nh=[" ",",","?","!",";"],Eh=new Sh(20);function Ah(t,e,n){e=e||"",n=n||"";const i=Nh.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=Eh.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a}function ur(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let a=0;a<i.length;){if(!r||typeof r!="object")return;let s,o="";for(let l=a;l<i.length;++l)if(l!==a&&(o+=n),o+=i[l],s=r[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<i.length-1)continue;a+=l-a+1;break}r=s}return r}function Vn(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Fa extends ui{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&a?o.push(...i.split(a)):o.push(i)));const l=Un(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||typeof i!="string"?l:ur(this.data&&this.data[e]&&this.data[e][n],i,a)}addResource(e,n,i,r){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),Ra(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Object.prototype.toString.apply(i[a])==="[object Array]")&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=Un(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Zo(l,i,a):l={...l,...i},Ra(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var el={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,i,r))}),e}};const Ia={};class Mn extends ui{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),gh(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=be.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Ah(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:a};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(r)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const T=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${T}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${T}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(e,n);let f=d&&d.res;const v=d&&d.usedKey||s,p=d&&d.exactUsedKey||s,m=Object.prototype.toString.apply(f),N=["[object Number]","[object Function]","[object RegExp]"],_=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject;if(I&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&N.indexOf(m)<0&&!(typeof _=="string"&&m==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,f,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(d.res=T,d.usedParams=this.getUsedParamsDetails(n),d):T}if(a){const T=m==="[object Array]",L=T?[]:{},$=T?p:v;for(const H in f)if(Object.prototype.hasOwnProperty.call(f,H)){const k=`${$}${a}${H}`;L[H]=this.translate(k,{...n,joinArrays:!1,ns:o}),L[H]===k&&(L[H]=f[H])}f=L}}else if(I&&typeof _=="string"&&m==="[object Array]")f=f.join(_),f&&(f=this.extendTranslation(f,e,n,i));else{let T=!1,L=!1;const $=n.count!==void 0&&typeof n.count!="string",H=Mn.hasDefaultValue(n),k=$?this.pluralResolver.getSuffix(u,n.count,n):"",C=n.ordinal&&$?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",R=$&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),S=R&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${C}`]||n.defaultValue;!this.isValidLookup(f)&&H&&(T=!0,f=S),this.isValidLookup(f)||(L=!0,f=s);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:f,h=H&&S!==f&&this.options.updateMissing;if(L||T||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,s,h?S:f),a){const P=this.resolve(s,{...n,keySeparator:!1});P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let g=[];const x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&x&&x[0])for(let P=0;P<x.length;P++)g.push(x[P]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(n.lng||this.language):g.push(n.lng||this.language);const D=(P,j,ge)=>{const Te=H&&ge!==f?ge:A;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,j,Te,h,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,l,j,Te,h,n),this.emit("missingKey",P,l,j,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&$?g.forEach(P=>{const j=this.pluralResolver.getSuffixes(P,n);R&&n[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(ge=>{D([P],s+ge,n[`defaultValue${ge}`]||S)})}):D(g,s,S))}f=this.extendTranslation(f,e,n,d,i),L&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(L||T)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,T?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,n,i,r,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language,i),u){const f=e.match(this.interpolator.nestingRegexp),v=f&&f.length;c<v&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,v=new Array(f),p=0;p<f;p++)v[p]=arguments[p];return a&&a[0]===v[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):s.translate(...v,n)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=el.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,a,s,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),c=u.key;r=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",v=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(N=>{this.isValidLookup(i)||(o=N,!Ia[`${m[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Ia[`${m[0]}-${N}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),m.forEach(_=>{if(this.isValidLookup(i))return;s=_;const I=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(I,c,_,N,n);else{let T;f&&(T=this.pluralResolver.getSuffix(_,n.count,n));const L=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(I.push(c+T),n.ordinal&&T.indexOf($)===0&&I.push(c+T.replace($,this.options.pluralSeparator)),v&&I.push(c+L)),p){const H=`${c}${this.options.contextSeparator}${n.context}`;I.push(H),f&&(I.push(H+T),n.ordinal&&T.indexOf($)===0&&I.push(H+T.replace($,this.options.pluralSeparator)),v&&I.push(H+L))}}let M;for(;M=I.pop();)this.isValidLookup(i)||(a=M,i=this.getResource(_,N,M,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function Di(t){return t.charAt(0).toUpperCase()+t.slice(1)}class Da{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=be.create("languageUtils")}getScriptPartFromCode(e){if(e=Vn(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Vn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Di(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Di(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Di(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}let Oh=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],wh={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Th=["v1","v2","v3"],Ch=["v4"],La={zero:0,one:1,two:2,few:3,many:4,other:5};function xh(){const t={};return Oh.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:wh[e.fc]}})}),t}class Rh{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=be.create("pluralResolver"),(!this.options.compatibilityJSON||Ch.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=xh()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Vn(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,a)=>La[r]-La[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const a=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Th.includes(this.options.compatibilityJSON)}}function Pa(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=yh(t,e,n);return!a&&r&&typeof n=="string"&&(a=ur(t,n,i),a===void 0&&(a=ur(e,n,i))),a}class Fh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=be.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:_h,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?tt(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?tt(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?tt(n.nestingPrefix):n.nestingPrefixEscaped||tt("$t("),this.nestingSuffix=n.nestingSuffix?tt(n.nestingSuffix):n.nestingSuffixEscaped||tt(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const I=Pa(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(I,void 0,i,{...r,...n,interpolationkey:p}):I}const m=p.split(this.formatSeparator),N=m.shift().trim(),_=m.join(this.formatSeparator).trim();return this.format(Pa(n,l,N,this.options.keySeparator,this.options.ignoreJSONStructure),_,i,{...r,...n,interpolationkey:N})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const m=a[1].trim();if(s=c(m),s===void 0)if(typeof d=="function"){const _=d(e,a,r);s=typeof _=="string"?_:""}else if(r&&Object.prototype.hasOwnProperty.call(r,m))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=xa(s));const N=p.safeValue(s);if(e=e.replace(a[0],N),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,s;function o(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const v=f.match(/'/g),p=f.match(/"/g);(v&&v.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=c.shift(),l=c,u=!0}if(a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=xa(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((c,d)=>this.format(c,d,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}function Ih(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(!s)return;const[o,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=u),u==="false"&&(n[o.trim()]=!1),u==="true"&&(n[o.trim()]=!0),isNaN(u)||(n[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:n}}function nt(t){const e={};return function(i,r,a){const s=r+JSON.stringify(a);let o=e[s];return o||(o=t(Vn(r),a),e[s]=o),o(i)}}class Dh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=be.create("formatter"),this.options=e,this.formats={number:nt((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:nt((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:nt((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:nt((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:nt((n,i)=>{const r=new Intl.ListFormat(n,{...i});return a=>r.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=nt(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:c}=Ih(l);if(this.formats[u]){let d=o;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},v=f.locale||f.lng||r.locale||r.lng||i;d=this.formats[u](o,v,{...c,...r,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Lh(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Ph extends ui{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=be.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!i.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),a[f]===void 0&&(a[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{kh(l.loaded,[a],s),Lh(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,n,o)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" 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(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,n,i,r,l):c=u(e,n,i,r),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else u(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}function $a(){return{debug:!1,initImmediate:!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:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(r=>{n[r]=i[r]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ua(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function dn(){}function $h(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class zt extends ui{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ua(e),this.services={},this.logger=be,this.modules={external:[]},$h(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=$a();this.options={...r,...this.options,...Ua(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?be.init(a(this.modules.logger),this.options):be.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=Dh);const d=new Da(this.options);this.store=new Fa(this.options.resources,this.options);const f=this.services;f.logger=be,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Rh(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=a(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Fh(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Ph(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(v){for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];e.emit(v,...m)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Mn(this.services,this.options),this.translator.on("*",function(v){for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];e.emit(v,...m)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,i||(i=dn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=At(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),i(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dn;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=At();return e||(e=this.languages),n||(n=this.options.ns),i||(i=dn),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&el.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=At();this.emit("languageChanging",e);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,i){var r=this;const a=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=r.options.overloadTranslationOptionHandler([s,o].concat(c))}else l={...o};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix=l.keyPrefix||i||a.keyPrefix;const f=r.options.keySeparator||".";let v;return l.keyPrefix&&Array.isArray(s)?v=s.map(p=>`${l.keyPrefix}${f}${p}`):v=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,r.t(v,l)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=At();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=At();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["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"],i=this.services&&this.services.languageUtils||new Da($a());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new zt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dn;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new zt(r);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Fa(this.store.data,r),a.services.resourceStore=a.store),a.translator=new Mn(a.services,r),a.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a.emit(o,...u)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const te=zt.createInstance();te.createInstance=zt.createInstance;te.createInstance;te.dir;te.init;te.loadResources;te.reloadResources;te.use;te.changeLanguage;te.getFixedT;const Va=te.t;te.exists;te.setDefaultNamespace;te.hasLoadedNamespace;te.loadNamespaces;te.loadLanguages;const tl=t=>Va(t?`errorCodes.${t}`:"errorCodes.DEFAULT");var jr=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(jr||{}),nl=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(nl||{}),Br=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Br||{}),il=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(il||{}),rl=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(rl||{}),al=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(al||{});class ci{constructor(e){w(this,"root",Pr(this));w(this,"id");w(this,"account");w(this,"accountType",jr.UNKNOWN);w(this,"username");w(this,"currencyConfig");w(this,"contractType");w(this,"nextDateMetricRecord");w(this,"spendedMinutes",0);w(this,"unlimitedService",!1);w(this,"hoursAvailable",0);w(this,"contractStatus",Br.ACTIVE);w(this,"createdAt");w(this,"installationDateApp");w(this,"cxAccount");w(this,"freeService",!1);w(this,"subscriptionType",null);w(this,"minutesAvailable",0);w(this,"globalPage");w(this,"stripe");w(this,"descriptionPlan");w(this,"planType");w(this,"selectFreeTrial");w(this,"exceededFeatures");w(this,"host",null);w(this,"variationThumbnailName");w(this,"variationsConfig");this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...r}=e,a={...r,username:i!=null?i:r.account,createdAt:new Date(Number(n))};return new ci(a)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const Uh=`${br.apiUrls.restV1}/accounts/v2`;class sl{async get(e){const n=`${Uh}/${e}`,{data:i}=await Lr({url:n});return i?ci.toDomain(i):null}}class ol{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new Ao(e);return n}catch(n){throw new Ir(n)}}}const Vh=new sl,zr=new ol(Vh),Mh=()=>["account"],jh=()=>{const t=Dr(r=>r.accountName),[e,n]=mn(Gn),i=ks.useQuery(Mh(),()=>zr.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return B.useEffect(()=>{const r=i.data;!i.isSuccess||!r||n(r)},[i.status]),{findQuery:i,account:e}},ll=pu();async function ul(t){const e=await zr.get(t);return ll.set(Gn,e),e}var cl=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(cl||{});const Bh={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},dl={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var fl=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(fl||{}),hl=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(hl||{}),pl=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(pl||{});const zh=4;var ml=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(ml||{}),gl=(t=>(t.Add="add",t.Remove="remove",t))(gl||{}),vl=(t=>(t.Active="active",t.Inactive="inactive",t))(vl||{});const Hh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},qh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Gh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Kh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Wh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Jh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Yh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Qh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Xh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Zh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ep={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},tp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},np={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kl={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ip={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},rp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ap={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},sp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},op={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},lp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddToCartSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},up={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},cp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},dp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},fp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},hp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},pp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},mp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},gp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},vp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},yp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},_p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Sp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Np=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:Hh,AppendProductsToSnackVideoDocument:cp,BlockUserDocument:Zh,ChangeAccountUsernameDocument:ep,CreatePlayListDocument:dp,CreateSnackVideoBatchDocument:fp,DeleteAllCustomizationDocument:ap,DeleteChatMessageDocument:tp,DeleteCollectionDocument:qh,DeleteRelationshipWithSnackVideoDocument:hp,DeleteSnackVideoDocument:pp,EventStatus:ml,FindByProductSnackVideoDocument:_p,FindCollectionDocument:Gh,FindManySnackVideosDocument:mp,FindMinimalEventDocument:Qh,GetAllChatMessageDocument:np,GetAllCollectionsDocument:Kh,GetAllCustomizationDocument:sp,GetAllSnackVideosDocument:gp,GetChatRoomTokenDocument:kl,GetPlayListDocument:Sp,GetPlayListsDocument:vp,GetSnackVideoRelationshipsDocument:kp,GetTimeLineDocument:up,HighlightProductDocument:rp,ManageCollectionProductDocument:Wh,Methods:gl,PinChatMessageDocument:ip,SearchCollectionsDocument:Jh,SearchMinimalEventsDocument:Xh,SearchSnackVideosDocument:yp,SendAddToCartDocument:lp,Status:vl,UpdateCollectionDocument:Yh,UpdateCustomizationDocument:op,UpdatePlayListDocument:bp},Symbol.toStringTag,{value:"Module"}));var di=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(di||{});function Ep(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Ve=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.External="external",t))(Ve||{}),Hr=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Hr||{});const{coreLogger:Ap}=Xe(),cr=Ue.withPrefix(Ap,"addToCartHooks"),Li="addToCartHooks.notification.error",dr={errorAddingToCart:Li,errorOpeningVariationSelector:Li,errorOpeningNewTab:Li,successAddingToCart:"addToCartHooks.notification.success"};async function Op(t){const e={...t,action:{type:di.ADD_TO_CART,exec:()=>cr.error("action no implemented in validate hook")}};try{const n=await wp(e),i=await Tp(n);await Cp(i)}catch(n){cr.error("error unhandled",n)}}async function wp(t){var a,s;const{context:e,userAddToCartConfig:n}=t,i=(a=n==null?void 0:n.hooks)==null?void 0:a.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(s=e.data)!=null?s:{}})}catch(o){jn("transform",o)}return{...t,product:r}}async function Tp(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=yl(t),s=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:a});if(s)try{o=await s({product:{...r},defaultAction:{...o},action:a,data:(u=e.data)!=null?u:{}})}catch(c){jn("validate",c)}return{...t,action:o,actionFactory:a}}async function Cp(t){var N;const{eventBus:e}=Xe(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:a,actionFactory:s}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(N=i==null?void 0:i.hooks)==null?void 0:N.end,c=a.type===di.ADD_TO_CART;let d=null,f=!1;const v=()=>{!c||!o||s.openVariationSelector(!1).exec()},p=()=>{!c||f||(d?r.error(dr.errorAddingToCart):r.success(dr.successAddingToCart))},m=()=>{const _={product:n,actionType:a.type,success:!d,error:d};e.emit(dl.ATCH_ACTION_EXECUTED,_)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(_){jn("end",_),d=_}if(u)try{f=!!await u({data:l,error:d,notify:r,actionExecuted:a})}catch(_){jn("end",_)}v(),p(),m()}function yl(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((a,[s,o])=>({...a,[s]:l=>({type:s,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function jn(t,e){cr.error(`addToCartHooks error running ${t}: `,e)}function bl(t){const e=Object.values(t);return Object.assign({},...e)}function _l(t){return Object.entries(t).reduce((e,[n,i])=>{const r=bl(i);return{...e,[n]:r}},{})}function Sl(t,e){const n=_l(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}function xp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ht(t){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(t)}function Rp(t,e){if(Ht(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ht(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Fp(t){var e=Rp(t,"string");return Ht(e)=="symbol"?e:e+""}function Ip(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fp(i.key),i)}}function Dp(t,e,n){return e&&Ip(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Nl=[],Lp=Nl.forEach,Pp=Nl.slice;function $p(t){return Lp.call(Pp.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var Ma=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Up=function(e,n,i){var r=i||{};r.path=r.path||"/";var a=encodeURIComponent(n),s="".concat(e,"=").concat(a);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!Ma.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!Ma.test(r.path))throw new TypeError("option path is invalid");s+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite){var l=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},ja={create:function(e,n,i,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+i*60*1e3)),r&&(a.domain=r),document.cookie=Up(e,encodeURIComponent(n),a)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),r=0;r<i.length;r++){for(var a=i[r];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(n)===0)return a.substring(n.length,a.length)}return null},remove:function(e){this.create(e,"",-1)}},Vp={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=ja.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&ja.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},Mp={name:"querystring",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=i.substring(1),a=r.split("&"),s=0;s<a.length;s++){var o=a[s].indexOf("=");if(o>0){var l=a[s].substring(0,o);l===e.lookupQuerystring&&(n=a[s].substring(o+1))}}}return n}},Ot=null,Ba=function(){if(Ot!==null)return Ot;try{Ot=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ot=!1}return Ot},jp={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Ba()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Ba()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},wt=null,za=function(){if(wt!==null)return wt;try{wt=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wt=!1}return wt},Bp={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&za()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&za()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},zp={name:"navigator",lookup:function(e){var n=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},Hp={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},qp={name:"path",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},Gp={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};function Kp(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var El=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xp(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Dp(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=$p(i,this.options||{},Kp()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Vp),this.addDetector(Mp),this.addDetector(jp),this.addDetector(Bp),this.addDetector(zp),this.addDetector(Hp),this.addDetector(qp),this.addDetector(Gp)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var r=[];return n.forEach(function(a){if(i.detectors[a]){var s=i.detectors[a].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(r=r.concat(s))}}),r=r.map(function(a){return i.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var r=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(a){r.detectors[a]&&r.detectors[a].cacheUserLanguage(n,r.options)}))}}]),t}();El.type="languageDetector";function Al(t,e){t.use(e).use(El).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[a,...s]=i.split(",").map(o=>o.trim());if(a==="number")return new Intl.NumberFormat(r).format(n);if(a==="date")return new Intl.DateTimeFormat(r).format(n);if(a==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const Wp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Jp={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Yp=t=>Jp[t],Qp=t=>t.replace(Wp,Yp);let Ha={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Qp};function Xp(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ha={...Ha,...t}}const Zp={type:"3rdParty",init(t){Xp(t.options.react)}};Al(te,Zp);const em=t=>Sl(te,t);/**
|
|
31
|
+
`+a):i.stack=a}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ft(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:a}=n;i!==void 0&&or.assertOptions(i,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),r!=null&&(y.isFunction(r)?n.paramsSerializer={serialize:r}:or.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&y.merge(a.common,a[n.method]);a&&y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),n.headers=ue.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const p=[wa.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=o.length;let v=n;for(d=0;d<f;){const p=o[d++],m=o[d++];try{v=p(v)}catch(N){m.call(this,N);break}}try{c=wa.call(this,v)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=ft(this.defaults,e);const n=Jo(e.baseURL,e.url);return Ho(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){ze.prototype[e]=function(n,i){return this.request(ft(i||{},{method:e,url:n,data:(i||{}).data}))}});y.forEach(["post","put","patch"],function(e){function n(i){return function(a,s,o){return this.request(ft(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}ze.prototype[e]=n(),ze.prototype[e+"Form"]=n(!0)});class Mr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const i=this;this.promise.then(r=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const s=new Promise(o=>{i.subscribe(o),a=o}).then(r);return s.cancel=function(){i.unsubscribe(a)},s},e(function(a,s,o){i.reason||(i.reason=new rn(a,s,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Mr(function(r){e=r}),cancel:e}}}function fh(t){return function(n){return t.apply(null,n)}}function hh(t){return y.isObject(t)&&t.isAxiosError===!0}const lr={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(lr).forEach(([t,e])=>{lr[e]=t});function Xo(t){const e=new ze(t),n=Fo(ze.prototype.request,e);return y.extend(n,ze.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Xo(ft(t,r))},n}const J=Xo(nn);J.Axios=ze;J.CanceledError=rn;J.CancelToken=Mr;J.isCancel=Wo;J.VERSION=Qo;J.toFormData=li;J.AxiosError=q;J.Cancel=J.CanceledError;J.all=function(e){return Promise.all(e)};J.spread=fh;J.isAxiosError=hh;J.mergeConfig=ft;J.AxiosHeaders=ue;J.formToJSON=t=>Ko(y.isHTMLForm(t)?new FormData(t):t);J.getAdapter=Yo.getAdapter;J.HttpStatusCode=lr;J.default=J;const ph={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $n{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||ph,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new $n(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $n(this.logger,e)}}var be=new $n;class ui{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}function At(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function xa(t){return t==null?"":""+t}function mh(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const gh=/###/g;function Ft(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(gh,"."):o}function r(){return!t||typeof t=="string"}const a=typeof e!="string"?e:e.split(".");let s=0;for(;s<a.length-1;){if(r())return{};const o=i(a[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return r()?{}:{obj:t,k:i(a[s])}}function Ra(t,e,n){const{obj:i,k:r}=Ft(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=Ft(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=Ft(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${a}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n}function vh(t,e,n,i){const{obj:r,k:a}=Ft(t,e,Object);r[a]=r[a]||[],r[a].push(n)}function Un(t,e){const{obj:n,k:i}=Ft(t,e);if(n)return n[i]}function kh(t,e,n){const i=Un(t,n);return i!==void 0?i:Un(e,n)}function Zo(t,e,n){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):Zo(t[i],e[i],n):t[i]=e[i]);return t}function tt(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var yh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function bh(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>yh[e]):t}class _h{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Sh=[" ",",","?","!",";"],Nh=new _h(20);function Eh(t,e,n){e=e||"",n=n||"";const i=Sh.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=Nh.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a}function ur(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let a=0;a<i.length;){if(!r||typeof r!="object")return;let s,o="";for(let l=a;l<i.length;++l)if(l!==a&&(o+=n),o+=i[l],s=r[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<i.length-1)continue;a+=l-a+1;break}r=s}return r}function Vn(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Fa extends ui{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&a?o.push(...i.split(a)):o.push(i)));const l=Un(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||typeof i!="string"?l:ur(this.data&&this.data[e]&&this.data[e][n],i,a)}addResource(e,n,i,r){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),Ra(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Object.prototype.toString.apply(i[a])==="[object Array]")&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=Un(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Zo(l,i,a):l={...l,...i},Ra(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var el={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,i,r))}),e}};const Ia={};class Mn extends ui{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),mh(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=be.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Eh(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:a};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(r)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const T=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${T}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${T}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(e,n);let f=d&&d.res;const v=d&&d.usedKey||s,p=d&&d.exactUsedKey||s,m=Object.prototype.toString.apply(f),N=["[object Number]","[object Function]","[object RegExp]"],_=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject;if(I&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&N.indexOf(m)<0&&!(typeof _=="string"&&m==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,f,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(d.res=T,d.usedParams=this.getUsedParamsDetails(n),d):T}if(a){const T=m==="[object Array]",L=T?[]:{},$=T?p:v;for(const H in f)if(Object.prototype.hasOwnProperty.call(f,H)){const k=`${$}${a}${H}`;L[H]=this.translate(k,{...n,joinArrays:!1,ns:o}),L[H]===k&&(L[H]=f[H])}f=L}}else if(I&&typeof _=="string"&&m==="[object Array]")f=f.join(_),f&&(f=this.extendTranslation(f,e,n,i));else{let T=!1,L=!1;const $=n.count!==void 0&&typeof n.count!="string",H=Mn.hasDefaultValue(n),k=$?this.pluralResolver.getSuffix(u,n.count,n):"",C=n.ordinal&&$?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",R=$&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),S=R&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${C}`]||n.defaultValue;!this.isValidLookup(f)&&H&&(T=!0,f=S),this.isValidLookup(f)||(L=!0,f=s);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:f,h=H&&S!==f&&this.options.updateMissing;if(L||T||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,s,h?S:f),a){const P=this.resolve(s,{...n,keySeparator:!1});P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let g=[];const x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&x&&x[0])for(let P=0;P<x.length;P++)g.push(x[P]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(n.lng||this.language):g.push(n.lng||this.language);const D=(P,j,ge)=>{const Te=H&&ge!==f?ge:A;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,j,Te,h,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,l,j,Te,h,n),this.emit("missingKey",P,l,j,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&$?g.forEach(P=>{const j=this.pluralResolver.getSuffixes(P,n);R&&n[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(ge=>{D([P],s+ge,n[`defaultValue${ge}`]||S)})}):D(g,s,S))}f=this.extendTranslation(f,e,n,d,i),L&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(L||T)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,T?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,n,i,r,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language,i),u){const f=e.match(this.interpolator.nestingRegexp),v=f&&f.length;c<v&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,v=new Array(f),p=0;p<f;p++)v[p]=arguments[p];return a&&a[0]===v[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):s.translate(...v,n)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=el.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,a,s,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),c=u.key;r=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",v=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(N=>{this.isValidLookup(i)||(o=N,!Ia[`${m[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Ia[`${m[0]}-${N}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),m.forEach(_=>{if(this.isValidLookup(i))return;s=_;const I=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(I,c,_,N,n);else{let T;f&&(T=this.pluralResolver.getSuffix(_,n.count,n));const L=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(I.push(c+T),n.ordinal&&T.indexOf($)===0&&I.push(c+T.replace($,this.options.pluralSeparator)),v&&I.push(c+L)),p){const H=`${c}${this.options.contextSeparator}${n.context}`;I.push(H),f&&(I.push(H+T),n.ordinal&&T.indexOf($)===0&&I.push(H+T.replace($,this.options.pluralSeparator)),v&&I.push(H+L))}}let M;for(;M=I.pop();)this.isValidLookup(i)||(a=M,i=this.getResource(_,N,M,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function Di(t){return t.charAt(0).toUpperCase()+t.slice(1)}class Da{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=be.create("languageUtils")}getScriptPartFromCode(e){if(e=Vn(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Vn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Di(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Di(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Di(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}let Ah=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Oh={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const wh=["v1","v2","v3"],Th=["v4"],La={zero:0,one:1,two:2,few:3,many:4,other:5};function Ch(){const t={};return Ah.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Oh[e.fc]}})}),t}class xh{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=be.create("pluralResolver"),(!this.options.compatibilityJSON||Th.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Ch()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Vn(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,a)=>La[r]-La[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const a=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!wh.includes(this.options.compatibilityJSON)}}function Pa(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=kh(t,e,n);return!a&&r&&typeof n=="string"&&(a=ur(t,n,i),a===void 0&&(a=ur(e,n,i))),a}class Rh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=be.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:bh,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?tt(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?tt(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?tt(n.nestingPrefix):n.nestingPrefixEscaped||tt("$t("),this.nestingSuffix=n.nestingSuffix?tt(n.nestingSuffix):n.nestingSuffixEscaped||tt(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const I=Pa(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(I,void 0,i,{...r,...n,interpolationkey:p}):I}const m=p.split(this.formatSeparator),N=m.shift().trim(),_=m.join(this.formatSeparator).trim();return this.format(Pa(n,l,N,this.options.keySeparator,this.options.ignoreJSONStructure),_,i,{...r,...n,interpolationkey:N})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const m=a[1].trim();if(s=c(m),s===void 0)if(typeof d=="function"){const _=d(e,a,r);s=typeof _=="string"?_:""}else if(r&&Object.prototype.hasOwnProperty.call(r,m))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=xa(s));const N=p.safeValue(s);if(e=e.replace(a[0],N),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,s;function o(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const v=f.match(/'/g),p=f.match(/"/g);(v&&v.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=c.shift(),l=c,u=!0}if(a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=xa(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((c,d)=>this.format(c,d,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}function Fh(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(!s)return;const[o,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=u),u==="false"&&(n[o.trim()]=!1),u==="true"&&(n[o.trim()]=!0),isNaN(u)||(n[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:n}}function nt(t){const e={};return function(i,r,a){const s=r+JSON.stringify(a);let o=e[s];return o||(o=t(Vn(r),a),e[s]=o),o(i)}}class Ih{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=be.create("formatter"),this.options=e,this.formats={number:nt((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:nt((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:nt((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:nt((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:nt((n,i)=>{const r=new Intl.ListFormat(n,{...i});return a=>r.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=nt(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:c}=Fh(l);if(this.formats[u]){let d=o;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},v=f.locale||f.lng||r.locale||r.lng||i;d=this.formats[u](o,v,{...c,...r,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Dh(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Lh extends ui{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=be.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!i.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),a[f]===void 0&&(a[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{vh(l.loaded,[a],s),Dh(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,n,o)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" 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(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,n,i,r,l):c=u(e,n,i,r),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else u(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}function $a(){return{debug:!1,initImmediate:!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:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(r=>{n[r]=i[r]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ua(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function dn(){}function Ph(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class zt extends ui{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ua(e),this.services={},this.logger=be,this.modules={external:[]},Ph(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=$a();this.options={...r,...this.options,...Ua(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?be.init(a(this.modules.logger),this.options):be.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=Ih);const d=new Da(this.options);this.store=new Fa(this.options.resources,this.options);const f=this.services;f.logger=be,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new xh(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=a(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Rh(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Lh(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(v){for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];e.emit(v,...m)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Mn(this.services,this.options),this.translator.on("*",function(v){for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];e.emit(v,...m)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,i||(i=dn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=At(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),i(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dn;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=At();return e||(e=this.languages),n||(n=this.options.ns),i||(i=dn),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&el.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=At();this.emit("languageChanging",e);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,i){var r=this;const a=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=r.options.overloadTranslationOptionHandler([s,o].concat(c))}else l={...o};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix=l.keyPrefix||i||a.keyPrefix;const f=r.options.keySeparator||".";let v;return l.keyPrefix&&Array.isArray(s)?v=s.map(p=>`${l.keyPrefix}${f}${p}`):v=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,r.t(v,l)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=At();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=At();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["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"],i=this.services&&this.services.languageUtils||new Da($a());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new zt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dn;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new zt(r);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Fa(this.store.data,r),a.services.resourceStore=a.store),a.translator=new Mn(a.services,r),a.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a.emit(o,...u)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const te=zt.createInstance();te.createInstance=zt.createInstance;te.createInstance;te.dir;te.init;te.loadResources;te.reloadResources;te.use;te.changeLanguage;te.getFixedT;const Va=te.t;te.exists;te.setDefaultNamespace;te.hasLoadedNamespace;te.loadNamespaces;te.loadLanguages;const tl=t=>Va(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class $h{constructor(e){w(this,"logger");w(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=J.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(s){if(r&&J.isAxiosError(s))return(a=s.response)==null?void 0:a.data;throw this.handleError(s)}}async put(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(s){if(r&&J.isAxiosError(s))return(a=s.response)==null?void 0:a.data;throw this.handleError(s)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=ne.GENERAL_ERROR;if(J.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=ne.BAD_REQUEST;break;case 401:n=ne.UNAUTHORIZED;break;case 403:n=ne.FORBIDDEN;break;case 404:n=ne.NOT_FOUND;break;case 409:n=ne.CONFLICT;break;case 410:n=ne.GONE;break;case 415:n=ne.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=ne.TOO_MANY_REQUESTS;break;case 500:n=ne.INTERNAL_SERVER_ERROR;break;case 503:n=ne.SERVICE_UNAVAILABLE;break;default:n=ne.SERVER_ERROR}else e.request?n=ne.NETWORK_ERROR:n=ne.CONFIG_ERROR;const i=tl(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}var jr=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(jr||{}),nl=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(nl||{}),Br=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Br||{}),il=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(il||{}),rl=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(rl||{}),al=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(al||{});class ci{constructor(e){w(this,"root",Pr(this));w(this,"id");w(this,"account");w(this,"accountType",jr.UNKNOWN);w(this,"username");w(this,"currencyConfig");w(this,"contractType");w(this,"nextDateMetricRecord");w(this,"spendedMinutes",0);w(this,"unlimitedService",!1);w(this,"hoursAvailable",0);w(this,"contractStatus",Br.ACTIVE);w(this,"createdAt");w(this,"installationDateApp");w(this,"cxAccount");w(this,"freeService",!1);w(this,"subscriptionType",null);w(this,"minutesAvailable",0);w(this,"globalPage");w(this,"stripe");w(this,"descriptionPlan");w(this,"planType");w(this,"selectFreeTrial");w(this,"exceededFeatures");w(this,"host",null);w(this,"variationThumbnailName");w(this,"variationsConfig");this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...r}=e,a={...r,username:i!=null?i:r.account,createdAt:new Date(Number(n))};return new ci(a)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const Uh=`${br.apiUrls.restV1}/accounts/v2`;class sl{async get(e){const n=`${Uh}/${e}`,{data:i}=await Lr({url:n});return i?ci.toDomain(i):null}}class ol{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new Ao(e);return n}catch(n){throw new Ir(n)}}}const Vh=new sl,zr=new ol(Vh),Mh=()=>["account"],jh=()=>{const t=Dr(r=>r.accountName),[e,n]=mn(Gn),i=ks.useQuery(Mh(),()=>zr.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return B.useEffect(()=>{const r=i.data;!i.isSuccess||!r||n(r)},[i.status]),{findQuery:i,account:e}},ll=pu();async function ul(t){const e=await zr.get(t);return ll.set(Gn,e),e}var cl=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(cl||{});const Bh={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},dl={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var fl=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(fl||{}),hl=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(hl||{}),pl=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(pl||{});const zh=4;var ml=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(ml||{}),gl=(t=>(t.Add="add",t.Remove="remove",t))(gl||{}),vl=(t=>(t.Active="active",t.Inactive="inactive",t))(vl||{});const Hh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},qh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Gh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Kh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Wh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Jh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Yh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Qh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Xh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Zh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ep={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},tp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},np={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kl={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ip={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},rp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ap={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},sp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},op={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},lp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddToCartSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},up={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},cp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},dp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},fp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},hp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},pp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},mp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},gp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},vp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},yp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},_p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Sp={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Np=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:Hh,AppendProductsToSnackVideoDocument:cp,BlockUserDocument:Zh,ChangeAccountUsernameDocument:ep,CreatePlayListDocument:dp,CreateSnackVideoBatchDocument:fp,DeleteAllCustomizationDocument:ap,DeleteChatMessageDocument:tp,DeleteCollectionDocument:qh,DeleteRelationshipWithSnackVideoDocument:hp,DeleteSnackVideoDocument:pp,EventStatus:ml,FindByProductSnackVideoDocument:_p,FindCollectionDocument:Gh,FindManySnackVideosDocument:mp,FindMinimalEventDocument:Qh,GetAllChatMessageDocument:np,GetAllCollectionsDocument:Kh,GetAllCustomizationDocument:sp,GetAllSnackVideosDocument:gp,GetChatRoomTokenDocument:kl,GetPlayListDocument:Sp,GetPlayListsDocument:vp,GetSnackVideoRelationshipsDocument:kp,GetTimeLineDocument:up,HighlightProductDocument:rp,ManageCollectionProductDocument:Wh,Methods:gl,PinChatMessageDocument:ip,SearchCollectionsDocument:Jh,SearchMinimalEventsDocument:Xh,SearchSnackVideosDocument:yp,SendAddToCartDocument:lp,Status:vl,UpdateCollectionDocument:Yh,UpdateCustomizationDocument:op,UpdatePlayListDocument:bp},Symbol.toStringTag,{value:"Module"}));var di=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(di||{});function Ep(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Ve=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.External="external",t))(Ve||{}),Hr=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Hr||{});const{coreLogger:Ap}=Xe(),cr=Ue.withPrefix(Ap,"addToCartHooks"),Li="addToCartHooks.notification.error",dr={errorAddingToCart:Li,errorOpeningVariationSelector:Li,errorOpeningNewTab:Li,successAddingToCart:"addToCartHooks.notification.success"};async function Op(t){const e={...t,action:{type:di.ADD_TO_CART,exec:()=>cr.error("action no implemented in validate hook")}};try{const n=await wp(e),i=await Tp(n);await Cp(i)}catch(n){cr.error("error unhandled",n)}}async function wp(t){var a,s;const{context:e,userAddToCartConfig:n}=t,i=(a=n==null?void 0:n.hooks)==null?void 0:a.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(s=e.data)!=null?s:{}})}catch(o){jn("transform",o)}return{...t,product:r}}async function Tp(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=yl(t),s=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:a});if(s)try{o=await s({product:{...r},defaultAction:{...o},action:a,data:(u=e.data)!=null?u:{}})}catch(c){jn("validate",c)}return{...t,action:o,actionFactory:a}}async function Cp(t){var N;const{eventBus:e}=Xe(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:a,actionFactory:s}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(N=i==null?void 0:i.hooks)==null?void 0:N.end,c=a.type===di.ADD_TO_CART;let d=null,f=!1;const v=()=>{!c||!o||s.openVariationSelector(!1).exec()},p=()=>{!c||f||(d?r.error(dr.errorAddingToCart):r.success(dr.successAddingToCart))},m=()=>{const _={product:n,actionType:a.type,success:!d,error:d};e.emit(dl.ATCH_ACTION_EXECUTED,_)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(_){jn("end",_),d=_}if(u)try{f=!!await u({data:l,error:d,notify:r,actionExecuted:a})}catch(_){jn("end",_)}v(),p(),m()}function yl(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((a,[s,o])=>({...a,[s]:l=>({type:s,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function jn(t,e){cr.error(`addToCartHooks error running ${t}: `,e)}function bl(t){const e=Object.values(t);return Object.assign({},...e)}function _l(t){return Object.entries(t).reduce((e,[n,i])=>{const r=bl(i);return{...e,[n]:r}},{})}function Sl(t,e){const n=_l(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}function xp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ht(t){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(t)}function Rp(t,e){if(Ht(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ht(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Fp(t){var e=Rp(t,"string");return Ht(e)=="symbol"?e:e+""}function Ip(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fp(i.key),i)}}function Dp(t,e,n){return e&&Ip(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Nl=[],Lp=Nl.forEach,Pp=Nl.slice;function $p(t){return Lp.call(Pp.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var Ma=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Up=function(e,n,i){var r=i||{};r.path=r.path||"/";var a=encodeURIComponent(n),s="".concat(e,"=").concat(a);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!Ma.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!Ma.test(r.path))throw new TypeError("option path is invalid");s+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite){var l=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},ja={create:function(e,n,i,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+i*60*1e3)),r&&(a.domain=r),document.cookie=Up(e,encodeURIComponent(n),a)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),r=0;r<i.length;r++){for(var a=i[r];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(n)===0)return a.substring(n.length,a.length)}return null},remove:function(e){this.create(e,"",-1)}},Vp={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=ja.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&ja.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},Mp={name:"querystring",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=i.substring(1),a=r.split("&"),s=0;s<a.length;s++){var o=a[s].indexOf("=");if(o>0){var l=a[s].substring(0,o);l===e.lookupQuerystring&&(n=a[s].substring(o+1))}}}return n}},Ot=null,Ba=function(){if(Ot!==null)return Ot;try{Ot=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ot=!1}return Ot},jp={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Ba()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Ba()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},wt=null,za=function(){if(wt!==null)return wt;try{wt=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wt=!1}return wt},Bp={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&za()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&za()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},zp={name:"navigator",lookup:function(e){var n=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},Hp={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},qp={name:"path",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},Gp={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};function Kp(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var El=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xp(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Dp(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=$p(i,this.options||{},Kp()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Vp),this.addDetector(Mp),this.addDetector(jp),this.addDetector(Bp),this.addDetector(zp),this.addDetector(Hp),this.addDetector(qp),this.addDetector(Gp)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var r=[];return n.forEach(function(a){if(i.detectors[a]){var s=i.detectors[a].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(r=r.concat(s))}}),r=r.map(function(a){return i.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var r=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(a){r.detectors[a]&&r.detectors[a].cacheUserLanguage(n,r.options)}))}}]),t}();El.type="languageDetector";function Al(t,e){t.use(e).use(El).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[a,...s]=i.split(",").map(o=>o.trim());if(a==="number")return new Intl.NumberFormat(r).format(n);if(a==="date")return new Intl.DateTimeFormat(r).format(n);if(a==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const Wp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Jp={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Yp=t=>Jp[t],Qp=t=>t.replace(Wp,Yp);let Ha={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Qp};function Xp(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ha={...Ha,...t}}const Zp={type:"3rdParty",init(t){Xp(t.options.react)}};Al(te,Zp);const em=t=>Sl(te,t);/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2019 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -114,5 +114,5 @@ spurious results.`)}}return!1};class Gl{constructor(e,n="GraphQL request",i={lin
|
|
|
114
114
|
`)),`
|
|
115
115
|
}`)}function z(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function En(t){return z(" ",t.replace(/\n/g,`
|
|
116
116
|
`))}function os(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
|
|
117
|
-
`)))!==null&&e!==void 0?e:!1}const ls=t=>{var i,r;let e;const n=t.definitions.filter(a=>a.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Bi=t=>{if(typeof t=="string"){let n;try{const i=kg(t);n=ls(i)}catch{}return{query:t,operationName:n}}const e=ls(t);return{query:wg(t),operationName:e}};class $t extends Error{constructor(e,n){const i=`${$t.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,$t.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$t)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var vr={exports:{}};(function(t,e){var n=typeof self!="undefined"?self:xr,i=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var o={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function l(h){return h&&DataView.prototype.isPrototypeOf(h)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(h){return h&&u.indexOf(Object.prototype.toString.call(h))>-1};function d(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function v(h){var g={next:function(){var x=h.shift();return{done:x===void 0,value:x}}};return o.iterable&&(g[Symbol.iterator]=function(){return g}),g}function p(h){this.map={},h instanceof p?h.forEach(function(g,x){this.append(x,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}p.prototype.append=function(h,g){h=d(h),g=f(g);var x=this.map[h];this.map[h]=x?x+", "+g:g},p.prototype.delete=function(h){delete this.map[d(h)]},p.prototype.get=function(h){return h=d(h),this.has(h)?this.map[h]:null},p.prototype.has=function(h){return this.map.hasOwnProperty(d(h))},p.prototype.set=function(h,g){this.map[d(h)]=f(g)},p.prototype.forEach=function(h,g){for(var x in this.map)this.map.hasOwnProperty(x)&&h.call(g,this.map[x],x,this)},p.prototype.keys=function(){var h=[];return this.forEach(function(g,x){h.push(x)}),v(h)},p.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),v(h)},p.prototype.entries=function(){var h=[];return this.forEach(function(g,x){h.push([x,g])}),v(h)},o.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function N(h){return new Promise(function(g,x){h.onload=function(){g(h.result)},h.onerror=function(){x(h.error)}})}function _(h){var g=new FileReader,x=N(g);return g.readAsArrayBuffer(h),x}function I(h){var g=new FileReader,x=N(g);return g.readAsText(h),x}function M(h){for(var g=new Uint8Array(h),x=new Array(g.length),D=0;D<g.length;D++)x[D]=String.fromCharCode(g[D]);return x.join("")}function T(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:o.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:o.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():o.arrayBuffer&&o.blob&&l(h)?(this._bodyArrayBuffer=T(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||c(h))?this._bodyArrayBuffer=T(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return I(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var $=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H(h){var g=h.toUpperCase();return $.indexOf(g)>-1?g:h}function k(h,g){g=g||{};var x=g.body;if(h instanceof k){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new p(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!x&&h._bodyInit!=null&&(x=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new p(g.headers)),this.method=H(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&x)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(x)}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function C(h){var g=new FormData;return h.trim().split("&").forEach(function(x){if(x){var D=x.split("="),P=D.shift().replace(/\+/g," "),j=D.join("=").replace(/\+/g," ");g.append(decodeURIComponent(P),decodeURIComponent(j))}}),g}function R(h){var g=new p,x=h.replace(/\r?\n[\t ]+/g," ");return x.split(/\r?\n/).forEach(function(D){var P=D.split(":"),j=P.shift().trim();if(j){var ge=P.join(":").trim();g.append(j,ge)}}),g}L.call(k.prototype);function S(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new p(g.headers),this.url=g.url||"",this._initBody(h)}L.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var h=new S(null,{status:0,statusText:""});return h.type="error",h};var E=[301,302,303,307,308];S.redirect=function(h,g){if(E.indexOf(g)===-1)throw new RangeError("Invalid status code");return new S(null,{status:g,headers:{location:h}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function(g,x){this.message=g,this.name=x;var D=Error(g);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function A(h,g){return new Promise(function(x,D){var P=new k(h,g);if(P.signal&&P.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var j=new XMLHttpRequest;function ge(){j.abort()}j.onload=function(){var Te={status:j.status,statusText:j.statusText,headers:R(j.getAllResponseHeaders()||"")};Te.url="responseURL"in j?j.responseURL:Te.headers.get("X-Request-URL");var _i="response"in j?j.response:j.responseText;x(new S(_i,Te))},j.onerror=function(){D(new TypeError("Network request failed"))},j.ontimeout=function(){D(new TypeError("Network request failed"))},j.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},j.open(P.method,P.url,!0),P.credentials==="include"?j.withCredentials=!0:P.credentials==="omit"&&(j.withCredentials=!1),"responseType"in j&&o.blob&&(j.responseType="blob"),P.headers.forEach(function(Te,_i){j.setRequestHeader(_i,Te)}),P.signal&&(P.signal.addEventListener("abort",ge),j.onreadystatechange=function(){j.readyState===4&&P.signal.removeEventListener("abort",ge)}),j.send(typeof P._bodyInit=="undefined"?null:P._bodyInit)})}return A.polyfill=!0,a.fetch||(a.fetch=A,a.Headers=p,a.Request=k,a.Response=S),s.Headers=p,s.Request=k,s.Response=S,s.fetch=A,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e})(vr,vr.exports);var Hn=vr.exports;const An=Rr(Hn),xg=su({__proto__:null,default:An},[Hn]),it=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||xg&&Hn.Headers&&t instanceof Hn.Headers?e=Um(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},us=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Rg=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(us(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,a)=>(i.push({query:us(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},Fg=t=>async e=>{var m;const{url:n,query:i,variables:r,operationName:a,fetch:s,fetchOptions:o,middleware:l}=e,u={...e.headers};let c="",d;t==="POST"?(d=Dg(i,r,a,o.jsonSerializer),typeof d=="string"&&(u["Content-Type"]="application/json")):c=Rg({query:i,variables:r,operationName:a,jsonSerializer:(m=o.jsonSerializer)!=null?m:Yr});const f={method:t,headers:u,body:d,...o};let v=n,p=f;if(l){const N=await Promise.resolve(l({...f,url:n,operationName:a,variables:r})),{url:_,...I}=N;v=_,p=I}return c&&(v=`${v}?${c}`),await s(v,p)};class Ig{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,a,s]=i,o=Mm(r,a,s),{headers:l,fetch:u=An,method:c="POST",requestMiddleware:d,responseMiddleware:f,...v}=this.requestConfig,{url:p}=this;o.signal!==void 0&&(v.signal=o.signal);const{operationName:m}=Bi(o.query);return zi({url:p,query:o.query,variables:o.variables,headers:{...it(Hi(l)),...it(o.requestHeaders)},operationName:m,fetch:u,method:c,fetchOptions:v,middleware:d}).then(N=>(f&&f(N),N)).catch(N=>{throw f&&f(N),N})}}async request(e,...n){const[i,r]=n,a=Vm(e,i,r),{headers:s,fetch:o=An,method:l="POST",requestMiddleware:u,responseMiddleware:c,...d}=this.requestConfig,{url:f}=this;a.signal!==void 0&&(d.signal=a.signal);const{query:v,operationName:p}=Bi(a.document);return zi({url:f,query:v,variables:a.variables,headers:{...it(Hi(s)),...it(a.requestHeaders)},operationName:p,fetch:o,method:l,fetchOptions:d,middleware:u}).then(m=>(c&&c(m),m.data)).catch(m=>{throw c&&c(m),m})}batchRequests(e,n){var l;const i=jm(e,n),{headers:r,...a}=this.requestConfig;i.signal!==void 0&&(a.signal=i.signal);const s=i.documents.map(({document:u})=>Bi(u).query),o=i.documents.map(({variables:u})=>u);return zi({url:this.url,query:s,variables:o,headers:{...it(Hi(r)),...it(i.requestHeaders)},operationName:void 0,fetch:(l=this.requestConfig.fetch)!=null?l:An,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const zi=async t=>{var c,d;const{query:e,variables:n,fetchOptions:i}=t,r=Fg($m((c=t.method)!=null?c:"post")),a=Array.isArray(t.query),s=await r(t),o=await Lg(s,(d=i.jsonSerializer)!=null?d:Yr),l=Array.isArray(o)?!o.some(({data:f})=>!f):!!o.data,u=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(s.ok&&u&&l){const{errors:f,...v}=(Array.isArray(o),o),p=i.errorPolicy==="ignore"?v:o;return{...a?{data:p}:p,headers:s.headers,status:s.status}}else{const f=typeof o=="string"?{error:o}:o;throw new $t({...f,status:s.status,headers:s.headers},{query:e,variables:n})}},Dg=(t,e,n,i)=>{const r=i!=null?i:Yr;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const a=t.reduce((s,o,l)=>(s.push({query:o,variables:e?e[l]:void 0}),s),[]);return r.stringify(a)},Lg=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},Hi=t=>typeof t=="function"?t():t;class Wl extends yt{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class ki{constructor(e){w(this,"root",Pr(this));w(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new ki(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const Pg=br.apiUrls.graphql;class Jl{constructor(){w(this,"client");this.client=new Ig(Pg)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(kl,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new Wl;return ki.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Yl{constructor(e){w(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Ir(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Oo}}const $g=new Jl,kr=new Yl($g),xe=_s("socket",Xe),yi=qn(void 0);yi.debugLabel="chatSocketAtom";const bi=qn(!1);bi.debugLabel="chatIsConnectedAtom";const sn=qn([]);sn.debugLabel="chatMessageListAtom";const Ql=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:a,onError:s}=t,o=new WebSocket(e,n);return o.onopen=l=>i(l),o.onclose=l=>r(l),o.onerror=l=>s(l),o.onmessage=l=>a(l),o},Xl=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},Zl=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],a=r.split("question__")[1],s={response:i.replace("response__",""),question:JSON.parse(a)};return{...t,data:s.response,isResponse:e,responseData:t.data,question:e?s.question:null}}return t},Zr=(t,e)=>{var f,v;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:a,type:s,email:o}=i,{isAdmin:l}=r,u=(f=i==null?void 0:i.id)!=null?f:Cr(8),c=((v=t.find(p=>p.username===a))==null?void 0:v.color)||Xl(),d={id:u,type:s,color:c,username:a,email:o,data:n,sendDate:i.sendDate,isAdmin:l==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Zl(d)},Ug=t=>["eventChatRoom",t!=null?t:null],eu=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,r=Dr(l=>l.accountName),[a,s]=B.useState(""),o=ks.useQuery({queryKey:Ug(e),queryFn:()=>kr.get({eventId:e,userName:n}),enabled:!!r&&!!e&&i,refetchOnWindowFocus:!1,refetchOnMount:!1});return B.useEffect(()=>{r&&kr.setAccount(r)},[r]),B.useEffect(()=>{var u;const l=(u=o.data)==null?void 0:u.token;l&&s(l)},[o.data]),{getQuery:o,token:a}},Vg=br.publicUrls.wssIVSChat,tu=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:a}=t,{token:s,getQuery:o}=eu({eventId:n,userName:r,enabled:i}),[l,u]=mn(yi),[c,d]=mn(bi),[f,v]=mn(sn),p=()=>{if((l==null?void 0:l.readyState)===WebSocket.OPEN)return;xe.debug("connecting to the chat room");const L=Ql({token:s,url:Vg,onOpen:_,onClose:T,onError:I,onMessage:M});u(L)},m=()=>{l&&l.close()},N=()=>{o.refetch(),xe.debug("reconnecting to the chat room")},_=B.useCallback(()=>{d(!0),xe.debug("connected to the chat room")},[d]),I=B.useCallback(L=>{xe.error("chat room socket error:",L)},[]),M=B.useCallback(L=>{const $=JSON.parse(L.data);switch($.Type){case"EVENT":a==null||a($);break;case"ERROR":xe.error("chat room error:",$);break;case"MESSAGE":e==null||e($);break;default:xe.error("unknown chat room event:",L)}},[a,e]),T=B.useCallback(L=>{xe.debug("disconnected from the chat room"),d(!1),N()},[]);return B.useEffect(()=>{if(s)return xe.debug("chat room token:",s),m(),p(),()=>{m()}},[s]),{socket:l,chatIsConnected:c,chatMessageList:f,setChatMessageList:v}},Mg=()=>{const t=qi(yi),e=qi(bi);return{sendMessage:B.useCallback((i,r)=>{if(!t||!e)return;const a={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},s=JSON.stringify(a);t.send(s)},[e,t])}},nu=()=>{const t=yr(sn);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const a=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(s=>s.filter(o=>o.id!==a.id))}},handleMessage:i=>{t(r=>[...r,Zr(r,i)])}}},jg=t=>{const{eventId:e,userName:n}=t,[i,r]=B.useState(!1),[a,s]=B.useState(),[o,l]=B.useState(),[u,c]=B.useState([]),{handleEvent:d}=nu(),f=yr(sn),v=I=>{f(M=>[Zr(M,I),...M]),r(!1)},p=I=>{var M,T,L;if(d(I),I.EventName==="sendpinmessage"){const $=JSON.parse((M=I.Attributes)==null?void 0:M.data);s({data:$.data,id:$.id,username:$.username})}if(I.EventName==="sendunpinmessage"&&s(void 0),I.EventName==="sendhighlightproduct"){const $=JSON.parse((T=I.Attributes)==null?void 0:T.data);l({products:$.productIds,collection:$.collection,livestreamingId:$.idEvent})}if(I.EventName==="sendaddtocart"){const $=JSON.parse((L=I.Attributes)==null?void 0:L.data);c(H=>[...H,{id:$.id,sessionId:$.sessionId,productId:$.productId,productImageUrl:$.productImageUrl,productName:$.productName}])}},{socket:m,chatMessageList:N,setChatMessageList:_}=tu({onMessage:v,onEvent:p,eventId:e,userName:n});return{socket:m,chat:N,showLoader:i,pinnedMessage:a,highlightProduct:o,productsInCart:u,setChat:_,setShowLoader:r,setPinnedMessage:s,setProductsInCart:c}},cs={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},Bg=()=>{const[t,e]=B.useState([]),[n,i]=B.useState(cs);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:s=>{const{action:o,data:l,startTime:u,viewerCount:c,status:d}=JSON.parse(s==null?void 0:s.text);switch(o){case"sendivsdatarealtime":{i({startTime:u,viewerCount:c,status:d});break}case"sendaddtocart":{const{id:f,sessionId:v,productId:p,productImageUrl:m,productName:N}=l;e(_=>[..._,{id:f,sessionId:v,productId:p,productImageUrl:m,productName:N}])}break}},resetRealTimeStreamInfo:()=>{i(cs)},setProductsInCart:e}};exports.AccountContractStatusTypes=Br;exports.AccountContractTypes=nl;exports.AccountInvalidError=Oo;exports.AccountPlanDescriptionTypes=rl;exports.AccountRestRepository=sl;exports.AccountService=ol;exports.AccountSubscriptionTypes=il;exports.AccountTypes=jr;exports.AddToCartActionTypes=di;exports.AggregateRoot=Ro;exports.ApiGraphqlTypes=Np;exports.BroadcastChannelEventBus=bo;exports.ComponentManager=Pl;exports.DomainError=yt;exports.ErrorCodes=ne;exports.EventBusWildcards=Bh;exports.EventChatRoom=ki;exports.EventChatRoomService=Yl;exports.EventChatRoomTokenError=Wl;exports.EventNames=dl;exports.ExternalRuntime=Jr;exports.GlobalPageSectionTypes=al;exports.GraphqlEventChatRoomRepository=Jl;exports.HttpAxiosClient=ph;exports.InvalidNizzaGlobalObjectError=wo;exports.LanguageTypes=fl;exports.LocalRuntime=hi;exports.Logger=Ue;exports.MAX_PRODUCTS_IN_CART=zh;exports.NizzaAccount=ci;exports.NizzaEventStatus=cl;exports.NizzaProductRequestOriginTypes=pl;exports.NizzaStore=Pn;exports.NizzaVariationTypes=hl;exports.ReactHostElement=Ll;exports.ResourceNotFoundError=Ao;exports.Runtime=Pm;exports.RuntimeStage=Hr;exports.RuntimeType=Ve;exports.StoreProvider=Im;exports.UnexpectedError=Ir;exports.ValueObject=Xd;exports.VtexIORuntime=pi;exports.VtexLegacyRuntime=mi;exports.accountAtom=Gn;exports.accountService=zr;exports.addQuestionData=Zl;exports.addToCartMessages=dr;exports.apiCall=Kd;exports.buildLanguageTranslations=bl;exports.buildTranslations=_l;exports.chatIsConnectedAtom=bi;exports.chatMessageListAtom=sn;exports.chatSocketAtom=yi;exports.connectToSocket=Ql;exports.createActionFactory=yl;exports.createAggregateRoot=Pr;exports.createLazyLogger=_s;exports.createStore=Ep;exports.customFetch=Lr;exports.downloadFile=Wd;exports.eventChatRoomService=kr;exports.fileOrigin=Ed;exports.getAccount=ul;exports.getClientTimeZone=Qd;exports.getNizza=Xe;exports.getRandomColor=Xl;exports.getScriptParams=_o;exports.getStore=Lm;exports.getUserFriendlyMessage=tl;exports.globalAtomStore=ll;exports.i18Init=Al;exports.jsDownload=xo;exports.normalizeChatMessage=Zr;exports.registerTranslations=em;exports.registerTranslationsOf=Sl;exports.runAddToCartHooks=Op;exports.runtimeList=$l;exports.searchParams=Nd;exports.shortId=Cr;exports.sleep=Ad;exports.useAccount=jh;exports.useChatSocketActions=Mg;exports.useChatSocketClient=jg;exports.useChatSocketHandlers=nu;exports.useConnectChatSocket=tu;exports.useEventChatRoom=eu;exports.useMetaDataClient=Bg;exports.useNZ=Co;exports.useNizza=Dr;exports.useStore=Dm;exports.validateRequiredProps=Id;
|
|
117
|
+
`)))!==null&&e!==void 0?e:!1}const ls=t=>{var i,r;let e;const n=t.definitions.filter(a=>a.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Bi=t=>{if(typeof t=="string"){let n;try{const i=kg(t);n=ls(i)}catch{}return{query:t,operationName:n}}const e=ls(t);return{query:wg(t),operationName:e}};class $t extends Error{constructor(e,n){const i=`${$t.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,$t.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$t)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var vr={exports:{}};(function(t,e){var n=typeof self!="undefined"?self:xr,i=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var o={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function l(h){return h&&DataView.prototype.isPrototypeOf(h)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(h){return h&&u.indexOf(Object.prototype.toString.call(h))>-1};function d(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function v(h){var g={next:function(){var x=h.shift();return{done:x===void 0,value:x}}};return o.iterable&&(g[Symbol.iterator]=function(){return g}),g}function p(h){this.map={},h instanceof p?h.forEach(function(g,x){this.append(x,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}p.prototype.append=function(h,g){h=d(h),g=f(g);var x=this.map[h];this.map[h]=x?x+", "+g:g},p.prototype.delete=function(h){delete this.map[d(h)]},p.prototype.get=function(h){return h=d(h),this.has(h)?this.map[h]:null},p.prototype.has=function(h){return this.map.hasOwnProperty(d(h))},p.prototype.set=function(h,g){this.map[d(h)]=f(g)},p.prototype.forEach=function(h,g){for(var x in this.map)this.map.hasOwnProperty(x)&&h.call(g,this.map[x],x,this)},p.prototype.keys=function(){var h=[];return this.forEach(function(g,x){h.push(x)}),v(h)},p.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),v(h)},p.prototype.entries=function(){var h=[];return this.forEach(function(g,x){h.push([x,g])}),v(h)},o.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function N(h){return new Promise(function(g,x){h.onload=function(){g(h.result)},h.onerror=function(){x(h.error)}})}function _(h){var g=new FileReader,x=N(g);return g.readAsArrayBuffer(h),x}function I(h){var g=new FileReader,x=N(g);return g.readAsText(h),x}function M(h){for(var g=new Uint8Array(h),x=new Array(g.length),D=0;D<g.length;D++)x[D]=String.fromCharCode(g[D]);return x.join("")}function T(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:o.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:o.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():o.arrayBuffer&&o.blob&&l(h)?(this._bodyArrayBuffer=T(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||c(h))?this._bodyArrayBuffer=T(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return I(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var $=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H(h){var g=h.toUpperCase();return $.indexOf(g)>-1?g:h}function k(h,g){g=g||{};var x=g.body;if(h instanceof k){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new p(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!x&&h._bodyInit!=null&&(x=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new p(g.headers)),this.method=H(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&x)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(x)}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function C(h){var g=new FormData;return h.trim().split("&").forEach(function(x){if(x){var D=x.split("="),P=D.shift().replace(/\+/g," "),j=D.join("=").replace(/\+/g," ");g.append(decodeURIComponent(P),decodeURIComponent(j))}}),g}function R(h){var g=new p,x=h.replace(/\r?\n[\t ]+/g," ");return x.split(/\r?\n/).forEach(function(D){var P=D.split(":"),j=P.shift().trim();if(j){var ge=P.join(":").trim();g.append(j,ge)}}),g}L.call(k.prototype);function S(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new p(g.headers),this.url=g.url||"",this._initBody(h)}L.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var h=new S(null,{status:0,statusText:""});return h.type="error",h};var E=[301,302,303,307,308];S.redirect=function(h,g){if(E.indexOf(g)===-1)throw new RangeError("Invalid status code");return new S(null,{status:g,headers:{location:h}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function(g,x){this.message=g,this.name=x;var D=Error(g);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function A(h,g){return new Promise(function(x,D){var P=new k(h,g);if(P.signal&&P.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var j=new XMLHttpRequest;function ge(){j.abort()}j.onload=function(){var Te={status:j.status,statusText:j.statusText,headers:R(j.getAllResponseHeaders()||"")};Te.url="responseURL"in j?j.responseURL:Te.headers.get("X-Request-URL");var _i="response"in j?j.response:j.responseText;x(new S(_i,Te))},j.onerror=function(){D(new TypeError("Network request failed"))},j.ontimeout=function(){D(new TypeError("Network request failed"))},j.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},j.open(P.method,P.url,!0),P.credentials==="include"?j.withCredentials=!0:P.credentials==="omit"&&(j.withCredentials=!1),"responseType"in j&&o.blob&&(j.responseType="blob"),P.headers.forEach(function(Te,_i){j.setRequestHeader(_i,Te)}),P.signal&&(P.signal.addEventListener("abort",ge),j.onreadystatechange=function(){j.readyState===4&&P.signal.removeEventListener("abort",ge)}),j.send(typeof P._bodyInit=="undefined"?null:P._bodyInit)})}return A.polyfill=!0,a.fetch||(a.fetch=A,a.Headers=p,a.Request=k,a.Response=S),s.Headers=p,s.Request=k,s.Response=S,s.fetch=A,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e})(vr,vr.exports);var Hn=vr.exports;const An=Rr(Hn),xg=su({__proto__:null,default:An},[Hn]),it=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||xg&&Hn.Headers&&t instanceof Hn.Headers?e=Um(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},us=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Rg=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(us(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,a)=>(i.push({query:us(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},Fg=t=>async e=>{var m;const{url:n,query:i,variables:r,operationName:a,fetch:s,fetchOptions:o,middleware:l}=e,u={...e.headers};let c="",d;t==="POST"?(d=Dg(i,r,a,o.jsonSerializer),typeof d=="string"&&(u["Content-Type"]="application/json")):c=Rg({query:i,variables:r,operationName:a,jsonSerializer:(m=o.jsonSerializer)!=null?m:Yr});const f={method:t,headers:u,body:d,...o};let v=n,p=f;if(l){const N=await Promise.resolve(l({...f,url:n,operationName:a,variables:r})),{url:_,...I}=N;v=_,p=I}return c&&(v=`${v}?${c}`),await s(v,p)};class Ig{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,a,s]=i,o=Mm(r,a,s),{headers:l,fetch:u=An,method:c="POST",requestMiddleware:d,responseMiddleware:f,...v}=this.requestConfig,{url:p}=this;o.signal!==void 0&&(v.signal=o.signal);const{operationName:m}=Bi(o.query);return zi({url:p,query:o.query,variables:o.variables,headers:{...it(Hi(l)),...it(o.requestHeaders)},operationName:m,fetch:u,method:c,fetchOptions:v,middleware:d}).then(N=>(f&&f(N),N)).catch(N=>{throw f&&f(N),N})}}async request(e,...n){const[i,r]=n,a=Vm(e,i,r),{headers:s,fetch:o=An,method:l="POST",requestMiddleware:u,responseMiddleware:c,...d}=this.requestConfig,{url:f}=this;a.signal!==void 0&&(d.signal=a.signal);const{query:v,operationName:p}=Bi(a.document);return zi({url:f,query:v,variables:a.variables,headers:{...it(Hi(s)),...it(a.requestHeaders)},operationName:p,fetch:o,method:l,fetchOptions:d,middleware:u}).then(m=>(c&&c(m),m.data)).catch(m=>{throw c&&c(m),m})}batchRequests(e,n){var l;const i=jm(e,n),{headers:r,...a}=this.requestConfig;i.signal!==void 0&&(a.signal=i.signal);const s=i.documents.map(({document:u})=>Bi(u).query),o=i.documents.map(({variables:u})=>u);return zi({url:this.url,query:s,variables:o,headers:{...it(Hi(r)),...it(i.requestHeaders)},operationName:void 0,fetch:(l=this.requestConfig.fetch)!=null?l:An,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const zi=async t=>{var c,d;const{query:e,variables:n,fetchOptions:i}=t,r=Fg($m((c=t.method)!=null?c:"post")),a=Array.isArray(t.query),s=await r(t),o=await Lg(s,(d=i.jsonSerializer)!=null?d:Yr),l=Array.isArray(o)?!o.some(({data:f})=>!f):!!o.data,u=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(s.ok&&u&&l){const{errors:f,...v}=(Array.isArray(o),o),p=i.errorPolicy==="ignore"?v:o;return{...a?{data:p}:p,headers:s.headers,status:s.status}}else{const f=typeof o=="string"?{error:o}:o;throw new $t({...f,status:s.status,headers:s.headers},{query:e,variables:n})}},Dg=(t,e,n,i)=>{const r=i!=null?i:Yr;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const a=t.reduce((s,o,l)=>(s.push({query:o,variables:e?e[l]:void 0}),s),[]);return r.stringify(a)},Lg=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},Hi=t=>typeof t=="function"?t():t;class Wl extends yt{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class ki{constructor(e){w(this,"root",Pr(this));w(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new ki(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const Pg=br.apiUrls.graphql;class Jl{constructor(){w(this,"client");this.client=new Ig(Pg)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(kl,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new Wl;return ki.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Yl{constructor(e){w(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Ir(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Oo}}const $g=new Jl,kr=new Yl($g),xe=_s("socket",Xe),yi=qn(void 0);yi.debugLabel="chatSocketAtom";const bi=qn(!1);bi.debugLabel="chatIsConnectedAtom";const sn=qn([]);sn.debugLabel="chatMessageListAtom";const Ql=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:a,onError:s}=t,o=new WebSocket(e,n);return o.onopen=l=>i(l),o.onclose=l=>r(l),o.onerror=l=>s(l),o.onmessage=l=>a(l),o},Xl=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},Zl=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],a=r.split("question__")[1],s={response:i.replace("response__",""),question:JSON.parse(a)};return{...t,data:s.response,isResponse:e,responseData:t.data,question:e?s.question:null}}return t},Zr=(t,e)=>{var f,v;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:a,type:s,email:o}=i,{isAdmin:l}=r,u=(f=i==null?void 0:i.id)!=null?f:Cr(8),c=((v=t.find(p=>p.username===a))==null?void 0:v.color)||Xl(),d={id:u,type:s,color:c,username:a,email:o,data:n,sendDate:i.sendDate,isAdmin:l==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Zl(d)},Ug=t=>["eventChatRoom",t!=null?t:null],eu=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,r=Dr(l=>l.accountName),[a,s]=B.useState(""),o=ks.useQuery({queryKey:Ug(e),queryFn:()=>kr.get({eventId:e,userName:n}),enabled:!!r&&!!e&&i,refetchOnWindowFocus:!1,refetchOnMount:!1});return B.useEffect(()=>{r&&kr.setAccount(r)},[r]),B.useEffect(()=>{var u;const l=(u=o.data)==null?void 0:u.token;l&&s(l)},[o.data]),{getQuery:o,token:a}},Vg=br.publicUrls.wssIVSChat,tu=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:a}=t,{token:s,getQuery:o}=eu({eventId:n,userName:r,enabled:i}),[l,u]=mn(yi),[c,d]=mn(bi),[f,v]=mn(sn),p=()=>{if((l==null?void 0:l.readyState)===WebSocket.OPEN)return;xe.debug("connecting to the chat room");const L=Ql({token:s,url:Vg,onOpen:_,onClose:T,onError:I,onMessage:M});u(L)},m=()=>{l&&l.close()},N=()=>{o.refetch(),xe.debug("reconnecting to the chat room")},_=B.useCallback(()=>{d(!0),xe.debug("connected to the chat room")},[d]),I=B.useCallback(L=>{xe.error("chat room socket error:",L)},[]),M=B.useCallback(L=>{const $=JSON.parse(L.data);switch($.Type){case"EVENT":a==null||a($);break;case"ERROR":xe.error("chat room error:",$);break;case"MESSAGE":e==null||e($);break;default:xe.error("unknown chat room event:",L)}},[a,e]),T=B.useCallback(L=>{xe.debug("disconnected from the chat room"),d(!1),N()},[]);return B.useEffect(()=>{if(s)return xe.debug("chat room token:",s),m(),p(),()=>{m()}},[s]),{socket:l,chatIsConnected:c,chatMessageList:f,setChatMessageList:v}},Mg=()=>{const t=qi(yi),e=qi(bi);return{sendMessage:B.useCallback((i,r)=>{if(!t||!e)return;const a={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},s=JSON.stringify(a);t.send(s)},[e,t])}},nu=()=>{const t=yr(sn);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const a=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(s=>s.filter(o=>o.id!==a.id))}},handleMessage:i=>{t(r=>[...r,Zr(r,i)])}}},jg=t=>{const{eventId:e,userName:n}=t,[i,r]=B.useState(!1),[a,s]=B.useState(),[o,l]=B.useState(),[u,c]=B.useState([]),{handleEvent:d}=nu(),f=yr(sn),v=I=>{f(M=>[Zr(M,I),...M]),r(!1)},p=I=>{var M,T,L;if(d(I),I.EventName==="sendpinmessage"){const $=JSON.parse((M=I.Attributes)==null?void 0:M.data);s({data:$.data,id:$.id,username:$.username})}if(I.EventName==="sendunpinmessage"&&s(void 0),I.EventName==="sendhighlightproduct"){const $=JSON.parse((T=I.Attributes)==null?void 0:T.data);l({products:$.productIds,collection:$.collection,livestreamingId:$.idEvent})}if(I.EventName==="sendaddtocart"){const $=JSON.parse((L=I.Attributes)==null?void 0:L.data);c(H=>[...H,{id:$.id,sessionId:$.sessionId,productId:$.productId,productImageUrl:$.productImageUrl,productName:$.productName}])}},{socket:m,chatMessageList:N,setChatMessageList:_}=tu({onMessage:v,onEvent:p,eventId:e,userName:n});return{socket:m,chat:N,showLoader:i,pinnedMessage:a,highlightProduct:o,productsInCart:u,setChat:_,setShowLoader:r,setPinnedMessage:s,setProductsInCart:c}},cs={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},Bg=()=>{const[t,e]=B.useState([]),[n,i]=B.useState(cs);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:s=>{const{action:o,data:l,startTime:u,viewerCount:c,status:d}=JSON.parse(s==null?void 0:s.text);switch(o){case"sendivsdatarealtime":{i({startTime:u,viewerCount:c,status:d});break}case"sendaddtocart":{const{id:f,sessionId:v,productId:p,productImageUrl:m,productName:N}=l;e(_=>[..._,{id:f,sessionId:v,productId:p,productImageUrl:m,productName:N}])}break}},resetRealTimeStreamInfo:()=>{i(cs)},setProductsInCart:e}};exports.AccountContractStatusTypes=Br;exports.AccountContractTypes=nl;exports.AccountInvalidError=Oo;exports.AccountPlanDescriptionTypes=rl;exports.AccountRestRepository=sl;exports.AccountService=ol;exports.AccountSubscriptionTypes=il;exports.AccountTypes=jr;exports.AddToCartActionTypes=di;exports.AggregateRoot=Ro;exports.ApiGraphqlTypes=Np;exports.BroadcastChannelEventBus=bo;exports.ComponentManager=Pl;exports.DomainError=yt;exports.ErrorCodes=ne;exports.EventBusWildcards=Bh;exports.EventChatRoom=ki;exports.EventChatRoomService=Yl;exports.EventChatRoomTokenError=Wl;exports.EventNames=dl;exports.ExternalRuntime=Jr;exports.GlobalPageSectionTypes=al;exports.GraphqlEventChatRoomRepository=Jl;exports.HttpAxiosClient=$h;exports.InvalidNizzaGlobalObjectError=wo;exports.LanguageTypes=fl;exports.LocalRuntime=hi;exports.Logger=Ue;exports.MAX_PRODUCTS_IN_CART=zh;exports.NizzaAccount=ci;exports.NizzaEventStatus=cl;exports.NizzaProductRequestOriginTypes=pl;exports.NizzaStore=Pn;exports.NizzaVariationTypes=hl;exports.ReactHostElement=Ll;exports.ResourceNotFoundError=Ao;exports.Runtime=Pm;exports.RuntimeStage=Hr;exports.RuntimeType=Ve;exports.StoreProvider=Im;exports.UnexpectedError=Ir;exports.ValueObject=Xd;exports.VtexIORuntime=pi;exports.VtexLegacyRuntime=mi;exports.accountAtom=Gn;exports.accountService=zr;exports.addQuestionData=Zl;exports.addToCartMessages=dr;exports.apiCall=Kd;exports.buildLanguageTranslations=bl;exports.buildTranslations=_l;exports.chatIsConnectedAtom=bi;exports.chatMessageListAtom=sn;exports.chatSocketAtom=yi;exports.connectToSocket=Ql;exports.createActionFactory=yl;exports.createAggregateRoot=Pr;exports.createLazyLogger=_s;exports.createStore=Ep;exports.customFetch=Lr;exports.downloadFile=Wd;exports.eventChatRoomService=kr;exports.fileOrigin=Ed;exports.getAccount=ul;exports.getClientTimeZone=Qd;exports.getNizza=Xe;exports.getRandomColor=Xl;exports.getScriptParams=_o;exports.getStore=Lm;exports.getUserFriendlyMessage=tl;exports.globalAtomStore=ll;exports.i18Init=Al;exports.jsDownload=xo;exports.normalizeChatMessage=Zr;exports.registerTranslations=em;exports.registerTranslationsOf=Sl;exports.runAddToCartHooks=Op;exports.runtimeList=$l;exports.searchParams=Nd;exports.shortId=Cr;exports.sleep=Ad;exports.useAccount=jh;exports.useChatSocketActions=Mg;exports.useChatSocketClient=jg;exports.useChatSocketHandlers=nu;exports.useConnectChatSocket=tu;exports.useEventChatRoom=eu;exports.useMetaDataClient=Bg;exports.useNZ=Co;exports.useNizza=Dr;exports.useStore=Dm;exports.validateRequiredProps=Id;
|
|
118
118
|
//# sourceMappingURL=index.cjs.map
|