@inno_user/inno_clouds_lib 9.6.0 → 9.6.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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...i){const o=new this(l);return i.forEach(u=>o.set(u)),o}static accessor(l){const o=(this[Ds]=this[Ds]={accessors:{}}).accessors,u=this.prototype;function f(m){const p=Hr(m);o[p]||(ad(u,m),o[p]=!0)}return te.isArray(l)?l.forEach(f):f(l),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(Jt.prototype,({value:a},l)=>{let i=l[0].toUpperCase()+l.slice(1);return{get:()=>a,set(o){this[i]=o}}}),te.freezeMethods(Jt);function io(a,l){const i=this||zr,o=l||i,u=Jt.from(o.headers);let f=o.data;return te.forEach(a,function(p){f=p.call(i,f,u.normalize(),l?l.status:void 0)}),u.normalize(),f}function vs(a){return!!(a&&a.__CANCEL__)}function xr(a,l,i){Le.call(this,a??"canceled",Le.ERR_CANCELED,l,i),this.name="CanceledError"}te.inherits(xr,Le,{__CANCEL__:!0});function Ps(a,l,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?a(i):l(new Le("Request failed with status code "+i.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function ld(a){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return l&&l[1]||""}function cd(a,l){a=a||10;const i=new Array(a),o=new Array(a);let u=0,f=0,m;return l=l!==void 0?l:1e3,function(_){const x=Date.now(),C=o[f];m||(m=x),i[u]=_,o[u]=x;let y=f,I=0;for(;y!==u;)I+=i[y++],y=y%a;if(u=(u+1)%a,u===f&&(f=(f+1)%a),x-m<l)return;const B=C&&x-C;return B?Math.round(I*1e3/B):void 0}}function dd(a,l){let i=0,o=1e3/l,u,f;const m=(x,C=Date.now())=>{i=C,u=null,f&&(clearTimeout(f),f=null),a(...x)};return[(...x)=>{const C=Date.now(),y=C-i;y>=o?m(x,C):(u=x,f||(f=setTimeout(()=>{f=null,m(u)},o-y)))},()=>u&&m(u)]}const gi=(a,l,i=3)=>{let o=0;const u=cd(50,250);return dd(f=>{const m=f.loaded,p=f.lengthComputable?f.total:void 0,_=m-o,x=u(_),C=m<=p;o=m;const y={loaded:m,total:p,progress:p?m/p:void 0,bytes:_,rate:x||void 0,estimated:x&&p&&C?(p-m)/x:void 0,event:f,lengthComputable:p!=null,[l?"download":"upload"]:!0};a(y)},i)},Ls=(a,l)=>{const i=a!=null;return[o=>l[0]({lengthComputable:i,total:a,loaded:o}),l[1]]},Fs=a=>(...l)=>te.asap(()=>a(...l)),ud=qt.hasStandardBrowserEnv?((a,l)=>i=>(i=new URL(i,qt.origin),a.protocol===i.protocol&&a.host===i.host&&(l||a.port===i.port)))(new URL(qt.origin),qt.navigator&&/(msie|trident)/i.test(qt.navigator.userAgent)):()=>!0,fd=qt.hasStandardBrowserEnv?{write(a,l,i,o,u,f,m){if(typeof document>"u")return;const p=[`${a}=${encodeURIComponent(l)}`];te.isNumber(i)&&p.push(`expires=${new Date(i).toUTCString()}`),te.isString(o)&&p.push(`path=${o}`),te.isString(u)&&p.push(`domain=${u}`),f===!0&&p.push("secure"),te.isString(m)&&p.push(`SameSite=${m}`),document.cookie=p.join("; ")},read(a){if(typeof document>"u")return null;const l=document.cookie.match(new RegExp("(?:^|; )"+a+"=([^;]*)"));return l?decodeURIComponent(l[1]):null},remove(a){this.write(a,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function hd(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function md(a,l){return l?a.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):a}function Vs(a,l,i){let o=!hd(l);return a&&(o||i==!1)?md(a,l):l}const Us=a=>a instanceof Jt?{...a}:a;function Qn(a,l){l=l||{};const i={};function o(x,C,y,I){return te.isPlainObject(x)&&te.isPlainObject(C)?te.merge.call({caseless:I},x,C):te.isPlainObject(C)?te.merge({},C):te.isArray(C)?C.slice():C}function u(x,C,y,I){if(te.isUndefined(C)){if(!te.isUndefined(x))return o(void 0,x,y,I)}else return o(x,C,y,I)}function f(x,C){if(!te.isUndefined(C))return o(void 0,C)}function m(x,C){if(te.isUndefined(C)){if(!te.isUndefined(x))return o(void 0,x)}else return o(void 0,C)}function p(x,C,y){if(y in l)return o(x,C);if(y in a)return o(void 0,x)}const _={url:f,method:f,data:f,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:p,headers:(x,C,y)=>u(Us(x),Us(C),y,!0)};return te.forEach(Object.keys({...a,...l}),function(C){const y=_[C]||u,I=y(a[C],l[C],C);te.isUndefined(I)&&y!==p||(i[C]=I)}),i}const zs=a=>{const l=Qn({},a);let{data:i,withXSRFToken:o,xsrfHeaderName:u,xsrfCookieName:f,headers:m,auth:p}=l;if(l.headers=m=Jt.from(m),l.url=Rs(Vs(l.baseURL,l.url,l.allowAbsoluteUrls),a.params,a.paramsSerializer),p&&m.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),te.isFormData(i)){if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(te.isFunction(i.getHeaders)){const _=i.getHeaders(),x=["content-type","content-length"];Object.entries(_).forEach(([C,y])=>{x.includes(C.toLowerCase())&&m.set(C,y)})}}if(qt.hasStandardBrowserEnv&&(o&&te.isFunction(o)&&(o=o(l)),o||o!==!1&&ud(l.url))){const _=u&&f&&fd.read(f);_&&m.set(u,_)}return l},gd=typeof XMLHttpRequest<"u"&&function(a){return new Promise(function(i,o){const u=zs(a);let f=u.data;const m=Jt.from(u.headers).normalize();let{responseType:p,onUploadProgress:_,onDownloadProgress:x}=u,C,y,I,B,T;function v(){B&&B(),T&&T(),u.cancelToken&&u.cancelToken.unsubscribe(C),u.signal&&u.signal.removeEventListener("abort",C)}let k=new XMLHttpRequest;k.open(u.method.toUpperCase(),u.url,!0),k.timeout=u.timeout;function P(){if(!k)return;const M=Jt.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),H={data:!p||p==="text"||p==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:M,config:a,request:k};Ps(function(V){i(V),v()},function(V){o(V),v()},H),k=null}"onloadend"in k?k.onloadend=P:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(P)},k.onabort=function(){k&&(o(new Le("Request aborted",Le.ECONNABORTED,a,k)),k=null)},k.onerror=function(j){const H=j&&j.message?j.message:"Network Error",Z=new Le(H,Le.ERR_NETWORK,a,k);Z.event=j||null,o(Z),k=null},k.ontimeout=function(){let j=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const H=u.transitional||Os;u.timeoutErrorMessage&&(j=u.timeoutErrorMessage),o(new Le(j,H.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,a,k)),k=null},f===void 0&&m.setContentType(null),"setRequestHeader"in k&&te.forEach(m.toJSON(),function(j,H){k.setRequestHeader(H,j)}),te.isUndefined(u.withCredentials)||(k.withCredentials=!!u.withCredentials),p&&p!=="json"&&(k.responseType=u.responseType),x&&([I,T]=gi(x,!0),k.addEventListener("progress",I)),_&&k.upload&&([y,B]=gi(_),k.upload.addEventListener("progress",y),k.upload.addEventListener("loadend",B)),(u.cancelToken||u.signal)&&(C=M=>{k&&(o(!M||M.type?new xr(null,a,k):M),k.abort(),k=null)},u.cancelToken&&u.cancelToken.subscribe(C),u.signal&&(u.signal.aborted?C():u.signal.addEventListener("abort",C)));const D=ld(u.url);if(D&&qt.protocols.indexOf(D)===-1){o(new Le("Unsupported protocol "+D+":",Le.ERR_BAD_REQUEST,a));return}k.send(f||null)})},pd=(a,l)=>{const{length:i}=a=a?a.filter(Boolean):[];if(l||i){let o=new AbortController,u;const f=function(x){if(!u){u=!0,p();const C=x instanceof Error?x:this.reason;o.abort(C instanceof Le?C:new xr(C instanceof Error?C.message:C))}};let m=l&&setTimeout(()=>{m=null,f(new Le(`timeout ${l} of ms exceeded`,Le.ETIMEDOUT))},l);const p=()=>{a&&(m&&clearTimeout(m),m=null,a.forEach(x=>{x.unsubscribe?x.unsubscribe(f):x.removeEventListener("abort",f)}),a=null)};a.forEach(x=>x.addEventListener("abort",f));const{signal:_}=o;return _.unsubscribe=()=>te.asap(p),_}},xd=function*(a,l){let i=a.byteLength;if(i<l){yield a;return}let o=0,u;for(;o<i;)u=o+l,yield a.slice(o,u),o=u},_d=async function*(a,l){for await(const i of wd(a))yield*xd(i,l)},wd=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const l=a.getReader();try{for(;;){const{done:i,value:o}=await l.read();if(i)break;yield o}}finally{await l.cancel()}},Hs=(a,l,i,o)=>{const u=_d(a,l);let f=0,m,p=_=>{m||(m=!0,o&&o(_))};return new ReadableStream({async pull(_){try{const{done:x,value:C}=await u.next();if(x){p(),_.close();return}let y=C.byteLength;if(i){let I=f+=y;i(I)}_.enqueue(new Uint8Array(C))}catch(x){throw p(x),x}},cancel(_){return p(_),u.return()}},{highWaterMark:2})},Gs=64*1024,{isFunction:pi}=te,Cd=(({Request:a,Response:l})=>({Request:a,Response:l}))(te.global),{ReadableStream:Ws,TextEncoder:Xs}=te.global,$s=(a,...l)=>{try{return!!a(...l)}catch{return!1}},Ed=a=>{a=te.merge.call({skipUndefined:!0},Cd,a);const{fetch:l,Request:i,Response:o}=a,u=l?pi(l):typeof fetch=="function",f=pi(i),m=pi(o);if(!u)return!1;const p=u&&pi(Ws),_=u&&(typeof Xs=="function"?(T=>v=>T.encode(v))(new Xs):async T=>new Uint8Array(await new i(T).arrayBuffer())),x=f&&p&&$s(()=>{let T=!1;const v=new i(qt.origin,{body:new Ws,method:"POST",get duplex(){return T=!0,"half"}}).headers.has("Content-Type");return T&&!v}),C=m&&p&&$s(()=>te.isReadableStream(new o("").body)),y={stream:C&&(T=>T.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(T=>{!y[T]&&(y[T]=(v,k)=>{let P=v&&v[T];if(P)return P.call(v);throw new Le(`Response type '${T}' is not supported`,Le.ERR_NOT_SUPPORT,k)})});const I=async T=>{if(T==null)return 0;if(te.isBlob(T))return T.size;if(te.isSpecCompliantForm(T))return(await new i(qt.origin,{method:"POST",body:T}).arrayBuffer()).byteLength;if(te.isArrayBufferView(T)||te.isArrayBuffer(T))return T.byteLength;if(te.isURLSearchParams(T)&&(T=T+""),te.isString(T))return(await _(T)).byteLength},B=async(T,v)=>{const k=te.toFiniteNumber(T.getContentLength());return k??I(v)};return async T=>{let{url:v,method:k,data:P,signal:D,cancelToken:M,timeout:j,onDownloadProgress:H,onUploadProgress:Z,responseType:V,headers:L,withCredentials:F="same-origin",fetchOptions:re}=zs(T),K=l||fetch;V=V?(V+"").toLowerCase():"text";let ee=pd([D,M&&M.toAbortSignal()],j),G=null;const W=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let N;try{if(Z&&x&&k!=="get"&&k!=="head"&&(N=await B(L,P))!==0){let ae=new i(v,{method:"POST",body:P,duplex:"half"}),oe;if(te.isFormData(P)&&(oe=ae.headers.get("content-type"))&&L.setContentType(oe),ae.body){const[xe,_e]=Ls(N,gi(Fs(Z)));P=Hs(ae.body,Gs,xe,_e)}}te.isString(F)||(F=F?"include":"omit");const X=f&&"credentials"in i.prototype,$={...re,signal:ee,method:k.toUpperCase(),headers:L.normalize().toJSON(),body:P,duplex:"half",credentials:X?F:void 0};G=f&&new i(v,$);let q=await(f?K(G,re):K(v,$));const J=C&&(V==="stream"||V==="response");if(C&&(H||J&&W)){const ae={};["status","statusText","headers"].forEach(Pe=>{ae[Pe]=q[Pe]});const oe=te.toFiniteNumber(q.headers.get("content-length")),[xe,_e]=H&&Ls(oe,gi(Fs(H),!0))||[];q=new o(Hs(q.body,Gs,xe,()=>{_e&&_e(),W&&W()}),ae)}V=V||"text";let le=await y[te.findKey(y,V)||"text"](q,T);return!J&&W&&W(),await new Promise((ae,oe)=>{Ps(ae,oe,{data:le,headers:Jt.from(q.headers),status:q.status,statusText:q.statusText,config:T,request:G})})}catch(X){throw W&&W(),X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,T,G),{cause:X.cause||X}):Le.from(X,X&&X.code,T,G)}}},yd=new Map,js=a=>{let l=a&&a.env||{};const{fetch:i,Request:o,Response:u}=l,f=[o,u,i];let m=f.length,p=m,_,x,C=yd;for(;p--;)_=f[p],x=C.get(_),x===void 0&&C.set(_,x=p?new Map:Ed(l)),C=x;return x};js();const oo={http:Wc,xhr:gd,fetch:{get:js}};te.forEach(oo,(a,l)=>{if(a){try{Object.defineProperty(a,"name",{value:l})}catch{}Object.defineProperty(a,"adapterName",{value:l})}});const qs=a=>`- ${a}`,bd=a=>te.isFunction(a)||a===null||a===!1;function Ad(a,l){a=te.isArray(a)?a:[a];const{length:i}=a;let o,u;const f={};for(let m=0;m<i;m++){o=a[m];let p;if(u=o,!bd(o)&&(u=oo[(p=String(o)).toLowerCase()],u===void 0))throw new Le(`Unknown adapter '${p}'`);if(u&&(te.isFunction(u)||(u=u.get(l))))break;f[p||"#"+m]=u}if(!u){const m=Object.entries(f).map(([_,x])=>`adapter ${_} `+(x===!1?"is not supported by the environment":"is not available in the build"));let p=i?m.length>1?`since :
|
|
4
4
|
`+m.map(qs).join(`
|
|
5
5
|
`):" "+qs(m[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return u}const Zs={getAdapter:Ad,adapters:oo};function so(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new xr(null,a)}function Ys(a){return so(a),a.headers=Jt.from(a.headers),a.data=io.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),Zs.getAdapter(a.adapter||zr.adapter,a)(a).then(function(o){return so(a),o.data=io.call(a,a.transformResponse,o),o.headers=Jt.from(o.headers),o},function(o){return vs(o)||(so(a),o&&o.response&&(o.response.data=io.call(a,a.transformResponse,o.response),o.response.headers=Jt.from(o.response.headers))),Promise.reject(o)})}const Ks="1.13.2",xi={};["object","boolean","number","function","string","symbol"].forEach((a,l)=>{xi[a]=function(o){return typeof o===a||"a"+(l<1?"n ":" ")+a}});const Qs={};xi.transitional=function(l,i,o){function u(f,m){return"[Axios v"+Ks+"] Transitional option '"+f+"'"+m+(o?". "+o:"")}return(f,m,p)=>{if(l===!1)throw new Le(u(m," has been removed"+(i?" in "+i:"")),Le.ERR_DEPRECATED);return i&&!Qs[m]&&(Qs[m]=!0,console.warn(u(m," has been deprecated since v"+i+" and will be removed in the near future"))),l?l(f,m,p):!0}},xi.spelling=function(l){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${l}`),!0)};function Sd(a,l,i){if(typeof a!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const o=Object.keys(a);let u=o.length;for(;u-- >0;){const f=o[u],m=l[f];if(m){const p=a[f],_=p===void 0||m(p,f,a);if(_!==!0)throw new Le("option "+f+" must be "+_,Le.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new Le("Unknown option "+f,Le.ERR_BAD_OPTION)}}const _i={assertOptions:Sd,validators:xi},Nn=_i.validators;let Jn=class{constructor(l){this.defaults=l||{},this.interceptors={request:new Bs,response:new Bs}}async request(l,i){try{return await this._request(l,i)}catch(o){if(o instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const f=u.stack?u.stack.replace(/^.+\n/,""):"";try{o.stack?f&&!String(o.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
6
|
-
`+f):o.stack=f}catch{}}throw o}}_request(l,i){typeof l=="string"?(i=i||{},i.url=l):i=l||{},i=Qn(this.defaults,i);const{transitional:o,paramsSerializer:u,headers:f}=i;o!==void 0&&_i.assertOptions(o,{silentJSONParsing:Nn.transitional(Nn.boolean),forcedJSONParsing:Nn.transitional(Nn.boolean),clarifyTimeoutError:Nn.transitional(Nn.boolean)},!1),u!=null&&(te.isFunction(u)?i.paramsSerializer={serialize:u}:_i.assertOptions(u,{encode:Nn.function,serialize:Nn.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),_i.assertOptions(i,{baseUrl:Nn.spelling("baseURL"),withXsrfToken:Nn.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let m=f&&te.merge(f.common,f[i.method]);f&&te.forEach(["delete","get","head","post","put","patch","common"],T=>{delete f[T]}),i.headers=Jt.concat(m,f);const p=[];let _=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(i)===!1||(_=_&&v.synchronous,p.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let C,y=0,I;if(!_){const T=[Ys.bind(this),void 0];for(T.unshift(...p),T.push(...x),I=T.length,C=Promise.resolve(i);y<I;)C=C.then(T[y++],T[y++]);return C}I=p.length;let B=i;for(;y<I;){const T=p[y++],v=p[y++];try{B=T(B)}catch(k){v.call(this,k);break}}try{C=Ys.call(this,B)}catch(T){return Promise.reject(T)}for(y=0,I=x.length;y<I;)C=C.then(x[y++],x[y++]);return C}getUri(l){l=Qn(this.defaults,l);const i=Vs(l.baseURL,l.url,l.allowAbsoluteUrls);return Rs(i,l.params,l.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(l){Jn.prototype[l]=function(i,o){return this.request(Qn(o||{},{method:l,url:i,data:(o||{}).data}))}}),te.forEach(["post","put","patch"],function(l){function i(o){return function(f,m,p){return this.request(Qn(p||{},{method:l,headers:o?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}Jn.prototype[l]=i(),Jn.prototype[l+"Form"]=i(!0)});let Id=class cl{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(f){i=f});const o=this;this.promise.then(u=>{if(!o._listeners)return;let f=o._listeners.length;for(;f-- >0;)o._listeners[f](u);o._listeners=null}),this.promise.then=u=>{let f;const m=new Promise(p=>{o.subscribe(p),f=p}).then(u);return m.cancel=function(){o.unsubscribe(f)},m},l(function(f,m,p){o.reason||(o.reason=new xr(f,m,p),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const i=this._listeners.indexOf(l);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const l=new AbortController,i=o=>{l.abort(o)};return this.subscribe(i),l.signal.unsubscribe=()=>this.unsubscribe(i),l.signal}static source(){let l;return{token:new cl(function(u){l=u}),cancel:l}}};function Nd(a){return function(i){return a.apply(null,i)}}function Td(a){return te.isObject(a)&&a.isAxiosError===!0}const ao={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ao).forEach(([a,l])=>{ao[l]=a});function Js(a){const l=new Jn(a),i=gs(Jn.prototype.request,l);return te.extend(i,Jn.prototype,l,{allOwnKeys:!0}),te.extend(i,l,null,{allOwnKeys:!0}),i.create=function(u){return Js(Qn(a,u))},i}const Ye=Js(zr);Ye.Axios=Jn,Ye.CanceledError=xr,Ye.CancelToken=Id,Ye.isCancel=vs,Ye.VERSION=Ks,Ye.toFormData=hi,Ye.AxiosError=Le,Ye.Cancel=Ye.CanceledError,Ye.all=function(l){return Promise.all(l)},Ye.spread=Nd,Ye.isAxiosError=Td,Ye.mergeConfig=Qn,Ye.AxiosHeaders=Jt,Ye.formToJSON=a=>Ms(te.isHTMLForm(a)?new FormData(a):a),Ye.getAdapter=Zs.getAdapter,Ye.HttpStatusCode=ao,Ye.default=Ye;const{Axios:_p,AxiosError:wp,CanceledError:Cp,isCancel:Ep,CancelToken:yp,VERSION:bp,all:Ap,Cancel:Sp,isAxiosError:Ip,spread:Np,toFormData:Tp,AxiosHeaders:kp,HttpStatusCode:Rp,formToJSON:Bp,getAdapter:Op,mergeConfig:Mp}=Ye,Gr=we.defineStore("modulesLib",()=>{const a=r.ref(!1),l=r.ref({textNotification:""});return{is_notification_lib:a,notificationData_lib:l,showNotification:o=>{a.value=!0,l.value.textNotification=o}}}),kd=["ping","pong"],Rd=["confirmed","waiting_payment","partial_paid"],Bd=["cancelled"],Ln=we.defineStore("table-data",()=>{const a=Ne.useRoute(),l=Ne.useRouter(),i=lt(),o=Gr(),u=r.ref(1),f=r.ref(1),m=pt.useLocalStorage("appMode",null,{shallow:!0}),p=pt.useLocalStorage("tableData",null,{shallow:!0,serializer:pt.StorageSerializers.object}),_=pt.useLocalStorage("tableId",null),x=pt.useLocalStorage("orgID",null),C=r.computed({get:()=>{var L;return(L=k.value)==null?void 0:L.id},set:L=>{_.value=L}}),y=r.computed(()=>{var L;return(L=a.query.table_id)==null?void 0:L.toString()}),I=r.computed(()=>{var L;return x.value||((L=a.params.orgId)==null?void 0:L.toString())}),B=r.computed(()=>{var L;return((L=k.value)==null?void 0:L.branch.work_mode)==="table-service"}),T=r.computed(()=>{var L;return B.value&&!!((L=k.value)!=null&&L.order)});let v=null;const k=pt.computedAsync(async L=>{var K,ee,G;u.value;const F=new AbortController;if(L(()=>F.abort()),!I.value||!((K=i.config_lib)!=null&&K.area))return null;const re=y.value||_.value;if(!re)return null;try{return{...(await Ye.get(`/org_unit/${I.value}/table/${re}/`,{baseURL:`https://${i.config_lib.area}/api/`,signal:F.signal})).data,__v:u.value}}catch(W){return Ye.isCancel(W)?null:m.value==="table-tent"?p.value:re===(v==null?void 0:v.id)?v:(v=null,o.showNotification(((G=(ee=W==null?void 0:W.response)==null?void 0:ee.data)==null?void 0:G.user_friendly_message)||"Ошибка при загрузке данных стола"),null)}},null),P=pt.computedAsync(async L=>{var re;f.value;const F=new AbortController;if(L(()=>F.abort()),!B.value||!((re=k.value)!=null&&re.order))return null;try{const K=await Ye.get(`/order/${k.value.order}/`,{baseURL:`https://${i.config_lib.area}/api/`,signal:F.signal});return K.data.items=K.data.items.map(ee=>({...ee,idSystem:crypto.randomUUID()})),{...K.data,__v:f.value}}catch{return null}},null);let D=null;const M=L=>{D&&(D==null||D.close(),D=null),L&&(D=Lr(`wss://${i.config_lib.area}/ws/order/${L.id}/`),D.on("message",F=>{kd.includes(F==null?void 0:F.type)||((F==null?void 0:F.method)==="update_order_status"&&Bd.includes(F.params.status)&&o.showNotification("Ваш заказ был отменён"),H())}),D.connect())},j=()=>{u.value++},H=()=>{f.value++},Z=L=>{L&&(v=L,m.value==="table-tent"&&(p.value=L),_.value!==L.id&&(_.value=L.id))},V=(L,F)=>{var re,K;if((L==null?void 0:L.id)!==(F==null?void 0:F.id)&&M(L),L&&!Rd.includes(L.status)&&j(),!L&&F&&((re=F.table)==null?void 0:re.id)===((K=k.value)==null?void 0:K.id))return l.replace({name:"order-ts-status",params:{id:F.id}})};return r.watch(P,V,{immediate:!0}),r.watch(k,Z,{immediate:!0}),{id:C,isTableService:B,hasOrder:T,data:k,order:P,refresh:j,refreshOrder:H}});let Tn=null,Zt=null;function er(a){a&&a.close(!0)}async function lo(a,l){const i=vt(),o=lt(),u=bn.create();try{const f=await u.initPaymentLink(a,l);return i.paymentCostQR=o.totalPrice_lib-o.countBonus,i.linkQR=f.url,Zt==null||Zt.deleteCart(null,Zt==null?void 0:Zt.is_requestKiosk),f}catch(f){throw i.isButtonDisabled=!1,i.showNotification(f==null?void 0:f.response.data.user_friendly_message),f}}function Od(a,l,i){const o=At();if(a!=null&&a.params){if(a.params.status==="sent"&&o.itemThemes.kiosk_proceed_to_payment_text&&l.showNotification(o.itemThemes.kiosk_proceed_to_payment_text),a.error){l.showNotification(a.error),gn(l,null),uo(l);return}i(a,l)}}function co(a,l){const i=vt(),o=lt();return a.params.new_discounts&&(i.extraDiscount=Number(a.params.new_total_cost)-l.initialCartPrice,o.totalPrice_lib=Number(a.params.new_total_cost),l.showNotification("К заказу были добавлены скидки")),!0}const gn=(a,l)=>{a.updateOrderStatus&&a.updateOrderStatus(l)},Md=a=>{a.loadCart&&a.loadCart()},wi=a=>{a.resetBonuses&&a.resetBonuses()},Dd=a=>{a.resetDiscounts&&a.resetDiscounts()},uo=a=>{a.closeWebSocket&&a.closeWebSocket()},ea=(a,l,i,o)=>{var m;if(((m=a.params)==null?void 0:m.need_pay)===!1)return;const u=l.ws||i;bn.create().orderPay(a.params.order_id||"").then(p=>{l.setOrderNumber&&l.setOrderNumber(p.data.order_number)}).catch(p=>{(l.errorHandler||o).handleOrderPayError(p,{...l,closeWebSocket:()=>er(u)})})},fo=(a,l,i)=>{const o=a.ws||l;(a.errorHandler||i).handleOrderError({...a,closeWebSocket:()=>er(o)})},vd=(a,l,i)=>{const o=vt(),u=o.getCurrentPaymentMethodId();if(!u||!Fn.getConfig(u)||!Fn.isMethodAvailable(u,a))return null;const m=Fn.createHandler(u);if(!m)return null;const p=o.createPaymentHandler(a,l,u,i);return p?{handler:m,config:p.config}:null},Pd=a=>{if(!Zt)return;const l=Zt.context,i=Zt.is_requestKiosk,o=vd(l,i,Zt.locator);if(!o){console.warn("handleWebSocketMessageWithDynamicHandler: не удалось получить handler");return}const{handler:u,config:f}=o,m={...f,...Zt};Od(a,m,u.handleWebSocketStatus)};async function Ld(a,l,i){var x,C;const o=Ln(),{is_requestKiosk:u}=l,{comment:f,is_authorized:m,signal:p}=i;l.setButtonDisabled(!0);const _=bn.create();try{const y=await _.createOrder(a,o.id,u,f,m,p,l.locator);if((y==null?void 0:y.status)===201&&((x=y==null?void 0:y.data)!=null&&x.id)){const I=y.data.id,B={...l,signal:p};Zt=B;const v=`wss://${B.area||""}/ws/order/${I}/`;Tn=Lr(v,{signal:p});const k=()=>{console.warn("WebSocket connection opened (centralized mode)")},P=M=>{var j;console.error("WebSocket error (centralized mode):",M),er(Tn),Tn=null,Zt=null,l.setButtonDisabled(!1),(j=l.errorHandler)==null||j.handlePaymentError(M,B)},D=M=>{Pd(M)};Tn.on("open",k),Tn.on("message",D),Tn.on("error",P),Tn.connect(),Zt.ws=Tn,Zt.closeWebSocket=()=>{er(Tn),Tn=null,Zt=null}}return y}catch(y){throw Ye.isCancel(y)||((C=l.errorHandler)==null||C.handleCreateOrderError(y,l),l.setButtonDisabled(!1)),y}}const ta=a=>{var l,i;return((i=(l=a==null?void 0:a.response)==null?void 0:l.data)==null?void 0:i.user_friendly_message)||null};function Ci(){const a=vt(),l=Ln();return{handlePaymentError(i,o){var f,m,p,_,x,C;const u=ta(i);gn(o,null),Md(o),u?(o.showNotification(u),uo(o),o.is_requestKiosk&&((m=o.orderErrors)!=null&&m.includes((f=i.response)==null?void 0:f.status))&&(o.cartCleanup?o.cartCleanup.cleanupAndNavigate("retryPage",o.is_requestKiosk):o.deleteCart("retryPage",o.is_requestKiosk),o.ws.close(!0)),l.isTableService?o.resetStores():(wi(o),o.context==="qr"&&o.navigation?o.navigation.redirectToError():o.context==="qr"&&o.redirect&&(a.isButtonDisabled=!1,o.redirect(`/${((_=(p=o.route)==null?void 0:p.params)==null?void 0:_.orgId)||""}/errorPayment`)))):o.context==="qr"&&(wi(o),o.navigation?o.navigation.redirectToError():o.redirect&&o.redirect(`/${((C=(x=o.route)==null?void 0:x.params)==null?void 0:C.orgId)||""}/errorPayment`)),a.isButtonDisabled=!1},handleOrderPayError(i,o){var f,m,p,_;const u=ta(i);u&&(o.showNotification(u),uo(o),o.is_requestKiosk?((m=o.orderErrors)!=null&&m.includes((f=i.response)==null?void 0:f.status)&&(o.cartCleanup.cleanupAndNavigate("retryPage",o.is_requestKiosk),o.deleteCart("retryPage",o.is_requestKiosk)),gn(o,null)):(wi(o),o.navigation?o.navigation.redirectToError():o.redirect&&o.redirect(`/${((_=(p=o.route)==null?void 0:p.params)==null?void 0:_.orgId)||""}/errorPayment`),gn(o,null)))},handleOrderError(i){var o,u;i.is_requestKiosk?(i.cartCleanup?i.cartCleanup.cleanupAndNavigate("retryPage",i.is_requestKiosk):i.deleteCart("retryPage",i.is_requestKiosk),i.ws.close(!0)):l.isTableService?(a.isCreateButtonVisible=!0,i.showNotification("Ошибка создания заказа. Пожалуйста, попробуйте еще раз"),Dd(i)):(wi(i),i.navigation?i.navigation.redirectToError():i.redirect&&(a.isButtonDisabled=!1,i.redirect(`/${((u=(o=i.route)==null?void 0:o.params)==null?void 0:u.orgId)||""}/errorPayment`)))},handleCreateOrderError(i,o){var m,p,_,x,C,y;const{is_requestKiosk:u}=o,f=o.route.params.orgId;u?(((m=i==null?void 0:i.response)==null?void 0:m.status)===403&&((p=o.on403Kiosk)==null||p.call(o),(_=o.redirect)==null||_.call(o,`/${f}/retryPage`)),o.deleteCart("retryPage",u)):l.isTableService?o.showNotification(((C=(x=i==null?void 0:i.response)==null?void 0:x.data)==null?void 0:C.user_friendly_message)||"Ошибка создания заказа"):(y=o.redirect)==null||y.call(o,`/${f}/errorPayment`)}}}const Fd=()=>{const a=vt();let l=null;const i=Ci(),o=(u,f)=>{var p,_,x,C;const m=(p=u.params)==null?void 0:p.status;if((_=u.params)!=null&&_.number&&(a.orderNumber=(x=u.params)==null?void 0:x.number),m==="sent")co(u,f),a.isButtonDisabled=!1;else if(m==="waiting_for_fiscalization")gn(f,1);else if(m==="payment_initiation_retry"||m==="fiscalized")ea(u,f,l,i);else if(m==="payment_initiation")gn(f,2);else if(m==="paid"){gn(f,3);const y=f.ws||l;er(y),localStorage.removeItem("cart")}else(C=f.orderErrors)!=null&&C.includes(m)&&fo(f,l,i)};return{handleWebSocketStatus(u,f){o(u,f)}}};function Vd(){const a=vt();let l=null;const i=Ci(),o=(u,f)=>{var p,_,x,C;const m=(p=u.params)==null?void 0:p.status;if((_=u.params)!=null&&_.number&&(a.orderNumber=(x=u.params)==null?void 0:x.number),m==="sent")co(u,f),a.isButtonDisabled=!1;else if(m==="sent_fiscalization")gn(f,1);else if(m==="waiting_payment")gn(f,4);else if(m==="paid"){gn(f,3);const y=f.ws||l;er(y),localStorage.removeItem("cart")}else(C=f.orderErrors)!=null&&C.includes(m)&&(a.isButtonDisabled=!1,fo(f,l,i))};return{handleWebSocketStatus(u,f){o(u,f)}}}const Ud=()=>{const a=vt();let l=null;const i=Ci(),o=(u,f)=>{var p,_;const m=(p=u.params)==null?void 0:p.status;if(m==="sent")co(u,f),a.isButtonDisabled=!1;else if(m==="payment_initiation_retry"||m==="fiscalized")ea(u,f,l,i);else if(m==="payment_initiation")gn(f,2);else if(m==="paid"){gn(f,3);const x=f.ws||l;er(x),localStorage.removeItem("cart")}else(_=f.orderErrors)!=null&&_.includes(m)&&(a.isButtonDisabled=!1,fo(f,l,i))};return{handleWebSocketStatus(u,f){o(u,f)}}};class Fn{static initialize(){this.register({id:"TERMINAL_BASE",method:"TERMINAL",handlerFactory:Fd,availableContexts:["kiosk"]}),this.register({id:"YOOKASSA_BASE",method:"YOOKASSA",handlerFactory:Ud,availableContexts:["qr","tableservice"]}),this.register({id:"SBP",method:"YOOKASSA",handlerFactory:Vd,availableContexts:["kiosk"]})}static register(l){this.methods.set(l.id,l)}static getConfig(l){return this.methods.get(l)??null}static getAvailableMethods(l){return Array.from(this.methods.entries()).filter(([i,o])=>o.availableContexts.includes(l)).map(([i])=>i)}static isMethodAvailable(l,i){const o=this.getConfig(l);return o?o.availableContexts.includes(i):!1}static createHandler(l){const i=this.getConfig(l);return i?i.handlerFactory():(console.warn(`PaymentMethodRegistry: метод оплаты ${l} не зарегистрирован`),null)}}ke(Fn,"methods",new Map),Fn.initialize();function zd(a){return{cleanupAndNavigate(l,i){a.deleteCart(l,i)},cleanup(l){a.deleteCart(null,l)},clearTokens(){a.deleteCart(null,!0)},resetStores(){a.resetStores()}}}function Hd(a){var i,o;const l=((o=(i=a.route)==null?void 0:i.params)==null?void 0:o.orgId)||"";return{redirectToError(){const u=`/${l}/errorPayment`;a.redirect?a.redirect(u):a.router&&a.router.push(u)},redirectToSuccess(u){const f=u?`/${l}/${u}`:`/${l}/profile`;a.redirect?a.redirect(f):a.router&&a.router.push(f)},redirect(u){a.redirect?a.redirect(u):a.router&&a.router.push(u)},getErrorPath(){return`/${l}/errorPayment`},getSuccessPath(){return`/${l}/profile`}}}const vt=we.defineStore("cartLib",()=>{const a=Ne.useRouter(),l=Ne.useRoute(),i=At(),o=lt(),{config_lib:u,countBonus:f,totalPrice_lib:m,initialCartPrice_lib:p,is18Allowed:_}=we.storeToRefs(o),{itemThemes:x}=we.storeToRefs(i),C=r.ref(!1),y=r.ref(""),I=r.ref(null),B=r.ref("wait"),T=r.ref(!0),v=r.ref(0),k=r.ref(""),P=r.ref([]),D=r.ref([]),M=r.ref(),j=r.ref(0),H=r.ref(!1),Z=r.ref(),V=r.ref(null),L=r.ref(["failed_payment","failed_after_paid","failed","failed_after_sent","failed_after_sent_fiscalization","payment_initiation_retry","cancelled","failed_after_payment_initiation"]),F=r.ref(),re=r.computed({get:()=>P.value||[],set:ye=>{(ye==null?void 0:ye.length)===1&&(F.value=ye[0]),P.value=ye}}),K=r.ref(!1),ee=r.ref(null),G=r.ref(0),W=r.ref(!1),N=r.ref({textNotification:""}),X=ye=>{W.value=!0,N.value.textNotification=ye},$=()=>{var ye,Ke;return(ye=M.value)!=null&&ye.front_type?M.value.front_type:((Ke=D.value[0])==null?void 0:Ke.front_type)||null},q=(ye,Ke,ct,et)=>{var Be;const _t=ct??((Be=D.value[0])==null?void 0:Be.front_type);if(!_t)return console.warn("Не удалось определить метод оплаты"),null;const De=Fn.getConfig(_t);if(!De||!Fn.isMethodAvailable(_t,ye))return console.warn(`Метод ${_t} недоступен для контекста ${ye}`),null;const Ae=Fn.createHandler(_t);return Ae?(Z.value=J(De.method,ye,Ke,et),{handler:Ae,config:Z.value}):(console.warn(`Не удалось создать обработчик для метода ${_t}`),null)},J=(ye,Ke,ct,et)=>{const _t={method:ye,context:Ke,is_requestKiosk:ct,router:a,route:l,orderErrors:L.value,area:u.value.area,totalPrice:m,initialCartPrice:p,locator:et,showNotification:X,deleteCart:qe,resetStores:he,redirect:rt=>a.push(rt),updateOrderStatus:rt=>{ee.value=rt},setOrderNumber:rt=>{V.value=rt},loadCart:()=>o.loadCart(),resetBonuses:()=>{f.value=0}},De=Ci(),Ae=zd(_t),Be=Hd(_t);return{..._t,errorHandler:De,cartCleanup:Ae,navigation:Be}},le=r.computed(()=>!!I.value),ae=ye=>{B.value=ye},oe=ye=>{I.value=ye},xe=()=>{x.value.kiosk_show_loyalty_card_button&&x.value.kiosk_show_loyalty_phone_input_button?C.value=!0:!x.value.kiosk_show_loyalty_card_button&&x.value.kiosk_show_loyalty_phone_input_button?o.is_OpenLoyal=!0:C.value=!0,B.value="wait",y.value=""},_e=()=>{C.value=!1,B.value="wait",y.value=""},Pe=()=>{I.value=null,y.value="",B.value="wait",_e()},he=()=>{K.value=!1,ee.value=null},qe=(ye=null,Ke=!1)=>{o.cartProducts_lib=[],o.is_OpenLoyal=!1,mr(["cart"]),Ke&&(mr(["authTokensAccess","authTokensRefresh","user"]),o.profile=null,sessionStorage.removeItem("is_adult"),_.value=!1),ye&&a.push(`/${l.params.orgId}/${ye}`)};return{isButtonDisabled:K,orderCompleted_lib:ee,extraDiscount:v,orderNumber:V,is_notification_lib:W,notificationData_lib:N,count:G,guestInfo:I,error:y,isDrawerOpen:C,currentState:B,isAuthorized:le,isCreateButtonVisible:T,linkQR:k,orderTypes:re,providerTypes:D,is_paymentCart:H,selectedOrderType:F,selectedProvider:M,configPayment:Z,paymentCostQR:j,deleteCart:qe,setGuestInfo:oe,setState:ae,openDrawer:xe,closeDrawer:_e,clearCard:Pe,showNotification:X,createPaymentHandler:q,getCurrentPaymentMethodId:$,getAvailablePaymentMethods:ye=>Fn.getAvailableMethods(ye)}}),Ut=we.defineStore("cardLib",()=>{var ee;const a=()=>({openCard:null,currentModifier:null,groupModifiers:[],groupModifiersSelected:[],groupCurrentOpen:null,isModifiedAmount:!1,selectedSize:{},productSizes:[],addedProducts:[],plusButtonsRefs:[],modalCount:1,isSectionModifier:!1,isAnimationFly:!0,textErrorRequaired:"",prevLast:{}}),l=At(),i=r.ref(a()),o=()=>i.value=a(),u=r.ref(!1),f=r.ref(!1),m=r.ref(!1),p=r.ref(),_=r.ref([]),x=r.ref({id:null,visible:!1}),C=r.ref(!((ee=l.itemThemes)!=null&&ee.kiosk_disable_lock_screen)),y=r.computed(()=>{const G=i.value.groupModifiersSelected.findIndex(W=>W.group===i.value.groupCurrentOpen.id);return I(G)}),I=G=>G===-1?0:(i.value.groupModifiersSelected[G].modifiers||[]).reduce((N,X)=>N+(X.amount||0),0),B=r.computed(()=>{var W;const G=(W=i.value.openCard)==null?void 0:W.group_modifiers.findIndex(N=>N.id===i.value.groupCurrentOpen.id);return G===-1||!i.value.openCard?0:i.value.openCard.modifiers.length>0&&G===0?i.value.openCard.modifiers.reduce((N,X)=>N+X.max_amount,0):i.value.groupModifiers[G].max_amount}),T=r.computed(()=>{var W;const G=(i.value.addedProducts??[]).reduce((N,X)=>N+X.price,0);if(i.value.openCard){const N=i.value.openCard,X=hr(N)||0,$=N.amount||1;return(i.value.groupModifiersSelected.reduce((J,le)=>(le.modifiers.forEach(ae=>{var oe,xe;ae.sizes&&(ae.price=((xe=(oe=ae.sizes)==null?void 0:oe.find(_e=>_e.id===i.value.selectedSize.id))==null?void 0:xe.price)??ae.price),J+=ae.price*ae.amount}),J),0)+X)*$+G}return(W=i.value.addedProducts)!=null&&W.length?G:0}),v=r.computed(()=>{const G=i.value.groupCurrentOpen;if(!G)return!1;const W=i.value.groupModifiers,N=W.findIndex(X=>X.id===G.id);return N===-1?!1:N===W.length-1}),k=G=>{const W=i.value.groupModifiers[G],N=i.value.groupModifiersSelected[G];if(!W)return{valid:!1};if(W.min_amount>0&&I(G)<W.min_amount)return{valid:!1,errorText:`В группе "${W.name}" должно содержаться не меньше ${W.min_amount} модификатора(ов)`};if(N){for(const X of W.group_modifiers)if(X.min_amount>0){const $=N.modifiers.find(q=>q.id===X.id);if(!$||$.amount<X.min_amount)return{valid:!1,errorText:`В группе "${W.name}" выберите все обязательные модификаторы`}}}return{valid:!0}},P=r.computed(()=>{const G=i.value.groupModifiers;for(let W=0;W<G.length;W++){const N=k(W);if(!N.valid)return i.value.textErrorRequaired=N.errorText,{haveRequaire:!0,group:G[W]}}return{haveRequaire:!1,group:G[0]}}),D=()=>{i.value.groupModifiers.forEach((G,W)=>{i.value.groupCurrentOpen={...G,index:W},G.group_modifiers.forEach(N=>{N.default_amount>0&&(N.amount=N.default_amount,re(N,!0))})})},M=G=>{i.value.addedProducts.push(G)},j=G=>{i.value.openCard=G},H=G=>{_.value=[...G]},Z=(G,W,N)=>{var $;const X=i.value.groupModifiers.findIndex(q=>q.id===G.id);if(X!==-1)if(N){const q=i.value.groupModifiers,J=X+1;if(J<q.length){const le=q[J];i.value.groupCurrentOpen={...le,index:J},i.value.isSectionModifier=!0}}else{const q=G.id!==(($=i.value.groupCurrentOpen)==null?void 0:$.id);i.value.groupCurrentOpen={...G,index:X},i.value.isSectionModifier=q?!0:!i.value.isSectionModifier}},V=()=>{i.value.modalCount>i.value.currentModifier.min_amount&&i.value.modalCount>=2&&(i.value.modalCount-=1)},L=()=>{i.value.groupCurrentOpen&&i.value.modalCount+y.value<B.value&&(i.value.currentModifier.max_amount===0||i.value.currentModifier.max_amount>i.value.modalCount)&&(i.value.modalCount+=1)},F=(G,W)=>{var X;const N=(X=i.value.groupCurrentOpen)==null?void 0:X.id.toUpperCase();if(!G&&!i.value.isModifiedAmount&&W.max_amount!==1){if(N==="Добавки2000"&&W.max_amount>1)return!0;if(Math.abs(B.value-y.value)>1&&N!=="Добавки2000")return!0}return!1},re=(G,W=!1)=>{i.value.modalCount=1,i.value.currentModifier=G;const N=i.value.groupModifiersSelected.findIndex(X=>X.group===i.value.groupCurrentOpen.id);K(N,G,W)},K=(G,W,N)=>{var $,q,J;let X=i.value.groupModifiersSelected;if(G===-1)F(N,W)?i.value.isModifiedAmount=!0:X[i.value.groupCurrentOpen.index]={group:i.value.groupCurrentOpen.id,is_fake:(($=i.value.groupCurrentOpen)==null?void 0:$.is_fake)||!1,is_product_determining:((q=i.value.groupCurrentOpen)==null?void 0:q.is_product_determining)||!1,modifier_count:((J=i.value.currentModifier)==null?void 0:J.amount)||0,modifiers:[{...W,amount:(W==null?void 0:W.amount)??1}]};else{const le=i.value.groupModifiers[G].group_modifiers.findIndex(oe=>oe.id===W.id);if(X[G].modifiers.findIndex(oe=>oe.id===W.id)===-1){if(B.value===1)X[G].modifiers=[];else if(y.value>=B.value)return;F(N,W)?i.value.isModifiedAmount=!0:(X[G].modifiers.push({...W,amount:(W==null?void 0:W.amount)??1}),X[G].modifier_count=X[G].modifiers.reduce((oe,xe)=>oe+=xe.amount,0),i.value.isAnimationFly=!0)}else X[G].modifiers=X[G].modifiers.filter(oe=>oe.id!==W.id),X[G].modifier_count=X[G].modifiers.reduce((oe,xe)=>oe+=xe.amount,0),i.value.groupModifiers[G].group_modifiers[le].amount=1,i.value.groupModifiers[G].group_modifiers[le].default_amount=0,i.value.isAnimationFly=!1}i.value.groupModifiersSelected=X};return{stateCard:i,totalPrice_libCard:T,recountGroupTotalAmount:y,groupTotalAmount:B,isOpenWindow:u,isUpSale:f,checkedRequiredBtn:P,dataUpSale:p,productCards:_,isAddToCard:m,openProduct:x,is_startPage:C,isLastGroup:v,setProduct:H,summModifierAmount:I,setAddedProducts:M,setCurrentCard:j,minusAmount:V,plusAmount:L,toggleNotRequire:Z,modifierSelect:re,defaultAmountModifiers:D,validateGroup:k,reset:o}});var _r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ra={exports:{}};(function(a,l){(function(i,o){a.exports=o()})(_r,function(){var i=1e3,o=6e4,u=36e5,f="millisecond",m="second",p="minute",_="hour",x="day",C="week",y="month",I="quarter",B="year",T="date",v="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var N=["th","st","nd","rd"],X=W%100;return"["+W+(N[(X-20)%10]||N[X]||N[0])+"]"}},M=function(W,N,X){var $=String(W);return!$||$.length>=N?W:""+Array(N+1-$.length).join(X)+W},j={s:M,z:function(W){var N=-W.utcOffset(),X=Math.abs(N),$=Math.floor(X/60),q=X%60;return(N<=0?"+":"-")+M($,2,"0")+":"+M(q,2,"0")},m:function W(N,X){if(N.date()<X.date())return-W(X,N);var $=12*(X.year()-N.year())+(X.month()-N.month()),q=N.clone().add($,y),J=X-q<0,le=N.clone().add($+(J?-1:1),y);return+(-($+(X-q)/(J?q-le:le-q))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:y,y:B,w:C,d:x,D:T,h:_,m:p,s:m,ms:f,Q:I}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},H="en",Z={};Z[H]=D;var V="$isDayjsObject",L=function(W){return W instanceof ee||!(!W||!W[V])},F=function W(N,X,$){var q;if(!N)return H;if(typeof N=="string"){var J=N.toLowerCase();Z[J]&&(q=J),X&&(Z[J]=X,q=J);var le=N.split("-");if(!q&&le.length>1)return W(le[0])}else{var ae=N.name;Z[ae]=N,q=ae}return!$&&q&&(H=q),q||!$&&H},re=function(W,N){if(L(W))return W.clone();var X=typeof N=="object"?N:{};return X.date=W,X.args=arguments,new ee(X)},K=j;K.l=F,K.i=L,K.w=function(W,N){return re(W,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var ee=function(){function W(X){this.$L=F(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[V]=!0}var N=W.prototype;return N.parse=function(X){this.$d=function($){var q=$.date,J=$.utc;if(q===null)return new Date(NaN);if(K.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var le=q.match(k);if(le){var ae=le[2]-1||0,oe=(le[7]||"0").substring(0,3);return J?new Date(Date.UTC(le[1],ae,le[3]||1,le[4]||0,le[5]||0,le[6]||0,oe)):new Date(le[1],ae,le[3]||1,le[4]||0,le[5]||0,le[6]||0,oe)}}return new Date(q)}(X),this.init()},N.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},N.$utils=function(){return K},N.isValid=function(){return this.$d.toString()!==v},N.isSame=function(X,$){var q=re(X);return this.startOf($)<=q&&q<=this.endOf($)},N.isAfter=function(X,$){return re(X)<this.startOf($)},N.isBefore=function(X,$){return this.endOf($)<re(X)},N.$g=function(X,$,q){return K.u(X)?this[$]:this.set(q,X)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(X,$){var q=this,J=!!K.u($)||$,le=K.p(X),ae=function(Ke,ct){var et=K.w(q.$u?Date.UTC(q.$y,ct,Ke):new Date(q.$y,ct,Ke),q);return J?et:et.endOf(x)},oe=function(Ke,ct){return K.w(q.toDate()[Ke].apply(q.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(ct)),q)},xe=this.$W,_e=this.$M,Pe=this.$D,he="set"+(this.$u?"UTC":"");switch(le){case B:return J?ae(1,0):ae(31,11);case y:return J?ae(1,_e):ae(0,_e+1);case C:var qe=this.$locale().weekStart||0,ye=(xe<qe?xe+7:xe)-qe;return ae(J?Pe-ye:Pe+(6-ye),_e);case x:case T:return oe(he+"Hours",0);case _:return oe(he+"Minutes",1);case p:return oe(he+"Seconds",2);case m:return oe(he+"Milliseconds",3);default:return this.clone()}},N.endOf=function(X){return this.startOf(X,!1)},N.$set=function(X,$){var q,J=K.p(X),le="set"+(this.$u?"UTC":""),ae=(q={},q[x]=le+"Date",q[T]=le+"Date",q[y]=le+"Month",q[B]=le+"FullYear",q[_]=le+"Hours",q[p]=le+"Minutes",q[m]=le+"Seconds",q[f]=le+"Milliseconds",q)[J],oe=J===x?this.$D+($-this.$W):$;if(J===y||J===B){var xe=this.clone().set(T,1);xe.$d[ae](oe),xe.init(),this.$d=xe.set(T,Math.min(this.$D,xe.daysInMonth())).$d}else ae&&this.$d[ae](oe);return this.init(),this},N.set=function(X,$){return this.clone().$set(X,$)},N.get=function(X){return this[K.p(X)]()},N.add=function(X,$){var q,J=this;X=Number(X);var le=K.p($),ae=function(_e){var Pe=re(J);return K.w(Pe.date(Pe.date()+Math.round(_e*X)),J)};if(le===y)return this.set(y,this.$M+X);if(le===B)return this.set(B,this.$y+X);if(le===x)return ae(1);if(le===C)return ae(7);var oe=(q={},q[p]=o,q[_]=u,q[m]=i,q)[le]||1,xe=this.$d.getTime()+X*oe;return K.w(xe,this)},N.subtract=function(X,$){return this.add(-1*X,$)},N.format=function(X){var $=this,q=this.$locale();if(!this.isValid())return q.invalidDate||v;var J=X||"YYYY-MM-DDTHH:mm:ssZ",le=K.z(this),ae=this.$H,oe=this.$m,xe=this.$M,_e=q.weekdays,Pe=q.months,he=q.meridiem,qe=function(ct,et,_t,De){return ct&&(ct[et]||ct($,J))||_t[et].slice(0,De)},ye=function(ct){return K.s(ae%12||12,ct,"0")},Ke=he||function(ct,et,_t){var De=ct<12?"AM":"PM";return _t?De.toLowerCase():De};return J.replace(P,function(ct,et){return et||function(_t){switch(_t){case"YY":return String($.$y).slice(-2);case"YYYY":return K.s($.$y,4,"0");case"M":return xe+1;case"MM":return K.s(xe+1,2,"0");case"MMM":return qe(q.monthsShort,xe,Pe,3);case"MMMM":return qe(Pe,xe);case"D":return $.$D;case"DD":return K.s($.$D,2,"0");case"d":return String($.$W);case"dd":return qe(q.weekdaysMin,$.$W,_e,2);case"ddd":return qe(q.weekdaysShort,$.$W,_e,3);case"dddd":return _e[$.$W];case"H":return String(ae);case"HH":return K.s(ae,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return Ke(ae,oe,!0);case"A":return Ke(ae,oe,!1);case"m":return String(oe);case"mm":return K.s(oe,2,"0");case"s":return String($.$s);case"ss":return K.s($.$s,2,"0");case"SSS":return K.s($.$ms,3,"0");case"Z":return le}return null}(ct)||le.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(X,$,q){var J,le=this,ae=K.p($),oe=re(X),xe=(oe.utcOffset()-this.utcOffset())*o,_e=this-oe,Pe=function(){return K.m(le,oe)};switch(ae){case B:J=Pe()/12;break;case y:J=Pe();break;case I:J=Pe()/3;break;case C:J=(_e-xe)/6048e5;break;case x:J=(_e-xe)/864e5;break;case _:J=_e/u;break;case p:J=_e/o;break;case m:J=_e/i;break;default:J=_e}return q?J:K.a(J)},N.daysInMonth=function(){return this.endOf(y).$D},N.$locale=function(){return Z[this.$L]},N.locale=function(X,$){if(!X)return this.$L;var q=this.clone(),J=F(X,$,!0);return J&&(q.$L=J),q},N.clone=function(){return K.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},W}(),G=ee.prototype;return re.prototype=G,[["$ms",f],["$s",m],["$m",p],["$H",_],["$W",x],["$M",y],["$y",B],["$D",T]].forEach(function(W){G[W[1]]=function(N){return this.$g(N,W[0],W[1])}}),re.extend=function(W,N){return W.$i||(W(N,ee,re),W.$i=!0),re},re.locale=F,re.isDayjs=L,re.unix=function(W){return re(1e3*W)},re.en=Z[H],re.Ls=Z,re.p={},re})})(ra);var Gd=ra.exports;const ia=na(Gd),Wd=a=>{const l=Ne.useRouter(),i=`${a.domain}/api/`,o=Ye.create({baseURL:i}),u=Ye.create({baseURL:i}),f=Ye.create({baseURL:i}),m=Ye.create({baseURL:i}),p=Ye.create({baseURL:i}),_=Ye.create({baseURL:i}),x=Ye.create({baseURL:i}),C=D=>{try{const M=JSON.parse(localStorage.getItem("authTokensAccess")||"");M.length>0&&(D.headers.Authorization=`Bearer ${M}`)}catch{console.warn("accessToken is undefined [useAxios]")}return D},y=D=>{const M=localStorage.getItem("apiKey");return D.headers={"Content-Type":"application/json","x-api-key":M},D},I=async D=>{if(!a.user)return D;const M=a.user.exp??0;if(!(ia.unix(M).diff(ia())<3e3))return D;const H=ms("authTokensRefresh",null,"string");try{const Z=await Ye.post(`${i}user/token/refresh/`,{refresh:H.value});if(!Z.data.access)return P(),D;localStorage.setItem("authTokensAccess",JSON.stringify(Z.data.access)),v(Z.data),k(hs(Z.data.access)),D.headers={...D.headers,Authorization:`Bearer ${Z.data.access}`}}catch(Z){console.error("Failed to refresh token:",Z),P()}return D},B=D=>{D.interceptors.request.use(M=>I(C(M)),M=>Promise.reject(M))};B(f),B(p),B(x);const T=D=>{D.interceptors.request.use(M=>y(M))};T(_),T(u),T(x);const v=(D,M=!1)=>{localStorage.setItem("authTokensAccess",JSON.stringify(D.access)),M&&localStorage.setItem("authTokensRefresh",JSON.stringify(D.refresh))},k=D=>{a.user=D,localStorage.setItem("user",JSON.stringify(D))},P=()=>{a.user=null,mr(["authTokensAccess","authTokensRefresh","user","cart","bonus"]),sessionStorage.removeItem("is_adult"),l.replace({name:"home"}).then(()=>window.location.reload())};return{axiosInstanceAuthenticationGet:f,axiosInstanceAuthenticationPost:p,axiosInstanceAuthenticationPostApiKey:x,axiosInstancePost:m,axiosInstanceGet:o,axiosInstanceGetApiKey:u,axiosInstancePostApiKey:_}},oa=(a="themeConfig")=>{try{const l=localStorage.getItem(a);return l?JSON.parse(l):null}catch{return null}},He=class He{constructor(){ke(this,"axiosInstanceGet");ke(this,"axiosInstancePost");ke(this,"axiosInstanceAuthenticationGet");ke(this,"axiosInstanceAuthenticationPost");ke(this,"axiosInstanceGetApiKey");ke(this,"axiosInstancePostApiKey");ke(this,"axiosInstanceAuthenticationPostApiKey");ke(this,"currentUpsaleController",null);ke(this,"controller",new AbortController);this.axiosInstanceGet=He._axiosGet,this.axiosInstancePost=He._axiosPost,this.axiosInstanceGetApiKey=He._axiosPostApiKey,this.axiosInstancePostApiKey=He._axiosPostApiKey,this.axiosInstanceAuthenticationPostApiKey=He._axiosAuthPostApiKey,this.axiosInstanceAuthenticationGet=He._axiosAuthGet,this.axiosInstanceAuthenticationPost=He._axiosAuthPost}static create(l){return l&&!He._config&&He._initialize(l),He._config||console.warn("InitConnection не инициализирован"),new He}static _initialize(l,i=null){const o=lt(),u=Ut(),{config_lib:f}=we.storeToRefs(o),{stateCard:m,recountGroupTotalAmount:p}=we.storeToRefs(u);He._config=l,He._cardStore=u,He._stateCard=m,He._recountGroupTotalAmount=p,f.value=l;const _=Wd(l);He._axiosPostApiKey=_.axiosInstanceGetApiKey,He._axiosPostApiKey=_.axiosInstancePostApiKey,He._axiosAuthPostApiKey=_.axiosInstanceAuthenticationPostApiKey,He._axiosGet=_.axiosInstanceGet,He._axiosPost=_.axiosInstancePost,He._axiosAuthGet=_.axiosInstanceAuthenticationGet,He._axiosAuthPost=_.axiosInstanceAuthenticationPost}get config(){return He._config}get cardStore(){return He._cardStore}get stateCard(){return He._stateCard}get recountGroupTotalAmount(){return He._recountGroupTotalAmount}async updateTheme(){var f,m;const l=oa(),i=At();if(l!==null){i.updateColor(l);return}const o=lt(),u=await((m=this.axiosInstanceGet)==null?void 0:m.get(`org/organizations/${(f=this.config)==null?void 0:f.orgId}/design/`));o.setStateDrum(u==null?void 0:u.data.hide_barban),o.setKioskTimeout(u==null?void 0:u.data.kiosk_timeout),localStorage.setItem("themeConfig",JSON.stringify(u.data)),i.updateColor(u.data)}async getGroupByID(l){var i,o;try{const u=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(i=this.config)==null?void 0:i.pointId}/group/${l}`));return u==null?void 0:u.data}catch(u){throw console.error("Ошибка в request.ts[getGroupByID]",u),u}}async loadGroupProducts(l){var i,o;try{const u=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(i=this.config)==null?void 0:i.pointId}/products/?group=${l}`)),f=(u==null?void 0:u.data)||[];for(const m of f)m&&await kl(m);return await this.cacheImagesInBackground(f),f}catch(u){return console.error("Ошибка загрузки группы:",u),[]}}async getGroup(){var l,i;try{const o=await((i=this.axiosInstanceGet)==null?void 0:i.get(`${(l=this.config)==null?void 0:l.pointId}/groups/`));return o==null?void 0:o.data}catch(o){return console.error("Error fetching products:",o),[]}}async fetchAndCacheAllPages(){var l,i;try{const o=((l=this.config)==null?void 0:l.pointId)||"",u=await qi(o);if(u)return u.data;const f=await((i=this.axiosInstanceGet)==null?void 0:i.get(`${o}/group/`)),m=(f==null?void 0:f.data)||[],p=[];for(const _ of m){_.products=_.products||[],await Dr(_.id,_),p.push(_);const x=await this.loadGroupProducts(_.id);_.products=x}return await this.cacheImagesInBackground(m),await Dr(o,m),p}catch(o){return console.error("fetchAndCacheAllPages error:",o),[]}}cacheImagesInBackground(l){l.forEach(i=>{var o;i.video_link&&this.loadAndCacheMedia(i.video_link,i.id+"_video"),i.image_link&&this.loadAndCacheMedia(i.image_link,i.id+"_image"),(o=i.products)==null||o.forEach(u=>{u.video_link&&this.loadAndCacheMedia(u.video_link,u.id+"_video"),u.image_link&&this.loadAndCacheMedia(u.image_link,u.id+"_image")})})}async loadAndCacheMedia(l,i){const o=await fr(i);if(o){this.dispatchImageCachedEvent(i,o);return}try{const u=await fetch(l);if(!u.ok)throw new Error("Network error");const f=await u.blob();if(f.size===0)throw new Error("Empty blob");await Zi(i,f),this.dispatchImageCachedEvent(i,f)}catch(u){console.warn(`[ImageCache] Failed for ${i}:`,u)}}dispatchImageCachedEvent(l,i){window.dispatchEvent(new CustomEvent("image-cached",{detail:{id:l,blob:i}}))}async getProduct(l=null){var i,o;if(!l)return[];try{const u=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(i=this.config)==null?void 0:i.pointId}/products/${l}`));return u==null?void 0:u.data}catch(u){return console.error("Error fetching cardProducts:",u),[]}}async getSingleProduct(l){var u;const i=lt(),{config_lib:o}=we.storeToRefs(i);try{let f=await is(l);if(f)this._fullCardProduct(f);else{const m=await((u=this.axiosInstanceGet)==null?void 0:u.get(`${o.value.pointId}/products/${l}`));(m==null?void 0:m.status)===200&&this._fullCardProduct(m.data)}}catch(f){throw console.warn("store card[getFetchProducts]:",f),f}}_fullCardProduct(l){const i=Ut();i.stateCard.openCard={...l,amount:1},i.stateCard.groupModifiers=l.group_modifiers,l.modifiers.length>0&&i.stateCard.groupModifiers.unshift({default_amount:0,description:"",group_modifiers:l.modifiers,id:"Добавки2000",image_link:null,max_amount:1,min_amount:l.modifiers.reduce((o,u)=>o+=u.min_amount,0),name:"Добавки",required:!1}),i.stateCard.groupModifiersSelected=new Array(i.stateCard.groupModifiers.length).fill({group:"",modifiers:[],is_fake:!1,is_product_determining:!1,modifier_count:0}),i.stateCard.productSizes=l.sizes,i.defaultAmountModifiers(),l.show_recommendations&&this.productUpsale(l.id)}async getTheme(){try{this.updateTheme()}catch(l){return console.error("Error fetching products:",l),[]}}async authorizeByCard(l){var i,o;try{const u=await((o=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:o.post(`${(i=this.config)==null?void 0:i.domain}/api/user/validate-card/`,{card_number:l}));return localStorage.setItem("authTokensAccess",JSON.stringify(u==null?void 0:u.data.access)),localStorage.setItem("authTokensRefresh",JSON.stringify(u==null?void 0:u.data.refresh)),u==null?void 0:u.data}catch(u){throw console.error("Ошибка авторизации:",u),u}}async getLoyalSmsCode(l){var i,o;try{const u=await((o=this.axiosInstancePostApiKey)==null?void 0:o.post(`${(i=this.config)==null?void 0:i.domain}/api/device/auth/request-otp/`,{phone:l}));return u==null?void 0:u.data}catch(u){throw console.error("Ошибка получения sms-code:",u),u}}async sendSmsCodeForAuth(l,i){var o,u;try{const f=await((u=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:u.post(`${(o=this.config)==null?void 0:o.domain}/api/device/auth/`,{code:l,phone:i}));return f==null?void 0:f.data}catch(f){throw console.error("Ошибка отправки sms-code:",f),f}}async callStaff(l,i,o){var u,f,m,p;try{const _=await((m=this.axiosInstancePost)==null?void 0:m.post(`${(u=this.config)==null?void 0:u.domain}/api/org_unit/${(f=this.config)==null?void 0:f.pointId}/table/${l}/call-staff/`,{...i},o));return(p=_==null?void 0:_.data)==null?void 0:p.response_text}catch(_){throw console.error("Ошибка[callStaff]",_),_}}async confirmOrder(l){var o,u;const i=await((u=this.axiosInstancePost)==null?void 0:u.post(`/org_unit/${(o=this.config)==null?void 0:o.pointId}/confirm-order/`,{order:l}));return(i==null?void 0:i.status)===200}async createOrder(l,i,o=!0,u,f=!1,m,p){var v,k,P,D,M;const _=vt(),x=f?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,C=o?x:this.axiosInstanceAuthenticationPost,y=o?"/device/order/create":"/order/create",I=o?(v=this.config)==null?void 0:v.pointId:(k=this.config)==null?void 0:k.pointId,B={items:l,comment:u,locator:p||void 0};return i&&(B.table=i),o&&((P=_.selectedOrderType)!=null&&P.id)&&(B.order_type_id=(D=_.selectedOrderType)==null?void 0:D.id),await(C==null?void 0:C.post(`${(M=this.config)==null?void 0:M.domain}/api/org_unit/${I}${y}`,B,{signal:m}))}async extendOrder(l){var m,p;const i=Ln();if(!i.id)throw Error("Неверный стол");if(!((m=i.data)!=null&&m.order))throw Error("Заказ не найден");const o=this.axiosInstanceAuthenticationPost,u={items:l,table:i.id},f=await(o==null?void 0:o.post(`/org_unit/${(p=this.config)==null?void 0:p.pointId}/order/${i.data.order}/extend`,u));return f==null?void 0:f.data}async initPaymentLink(l,i){var _,x,C;const o=this.axiosInstanceAuthenticationPost,u=lt(),f=Ln(),m={order:l,provider_type:i};u.countBonus>0&&(m.by_bonuses=u.countBonus),f.isTableService&&((_=f.order)==null?void 0:_.remaining_amount)!==((x=f.order)==null?void 0:x.total_cost)&&(m.amount=(C=f.order)==null?void 0:C.remaining_amount),m.by_bonuses&&m.amount&&(m.amount=+(+m.amount-+m.by_bonuses).toFixed(2));const p=await(o==null?void 0:o.post("payment/init",m));return p==null?void 0:p.data}async orderPay(l){var i;return(i=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:i.post(`order/${l}/pay/`,{order_id:l})}async getProfile(){var i,o;const l=await((o=this.axiosInstanceAuthenticationGet)==null?void 0:o.get(`user/current?organization=${(i=this.config)==null?void 0:i.orgId}`));if((l==null?void 0:l.status)===200){const u=lt();return u.profile=l.data,u.is18Allowed=sessionStorage.getItem("is_adult")==="true",l.data}else return l}async joinLoyalty(){var i;const l=await((i=this.axiosInstanceAuthenticationGet)==null?void 0:i.post("user/join-loyalty/"));return{success:(l==null?void 0:l.status)===200}}async isPhoneExist(l,i={}){var o,u;try{const f=await((u=this.axiosInstanceGet)==null?void 0:u.get("user/check-phone",{...i,params:{organization:(o=this.config)==null?void 0:o.orgId,phone:l}}));return(f==null?void 0:f.status)===200}catch{return!1}}async sendOTP(l,i={}){var u,f;const o=await((f=this.axiosInstancePost)==null?void 0:f.post("user/check-phone",{organization:(u=this.config)==null?void 0:u.orgId,phone:l},i));return o==null?void 0:o.data}async auth(l,i={}){var u,f;return await((f=this.axiosInstancePost)==null?void 0:f.post("user/auth",{organization:(u=this.config)==null?void 0:u.orgId,...l},i))}async signup(l,i={}){var u,f;return await((f=this.axiosInstancePost)==null?void 0:f.post("user/register",{organization:(u=this.config)==null?void 0:u.orgId,...l},i))}async calculateDiscount(l,i=!0,o=!1,u){var C,y;const f=o?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,m=o?this.axiosInstanceAuthenticationPost:this.axiosInstancePost,p=i?f:m,_=i?(C=this.config)==null?void 0:C.pointId:(y=this.config)==null?void 0:y.pointId,x=await(p==null?void 0:p.post(`/org_unit/${_}/cart/calculate-discount/`,l,{signal:u}));return(x==null?void 0:x.status)===200?x.data:x}async maxPayByBonuses(l,i=!0,o=!1,u){const f=lt(),m=o?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,p=o?this.axiosInstanceAuthenticationPost:this.axiosInstancePost,_=i?m:p,x=await(_==null?void 0:_.post("/cart/max-pay-by-bonuses/",{order_id:l},{signal:u})),C=x==null?void 0:x.data;return f.profile&&C&&"balance"in C&&(f.profile.balance=C.balance),C}async getDeviceInfo(){var o;const l=vt(),i=await((o=this.axiosInstanceGetApiKey)==null?void 0:o.get("/device/current/"));return(i==null?void 0:i.status)===200?(l.orderTypes=i.data.order_types,l.providerTypes=i.data.payment_provider_type,i.data):i}async validateApiKey(l,i){var u,f;const o=await((f=this.axiosInstancePost)==null?void 0:f.post(`/device/org_unit/${(u=this.config)==null?void 0:u.pointId}/validate-api-key/`,{api_key:l},i));return(o==null?void 0:o.status)===200}async productUpsale(l){var f,m,p;const i=Ut(),{dataUpSale:o}=we.storeToRefs(i);(f=this.currentUpsaleController)==null||f.abort();const u=new AbortController;this.currentUpsaleController=u;try{const _=await((p=this.axiosInstanceGet)==null?void 0:p.get(`/${(m=this.config)==null?void 0:m.pointId}/products/${l}/recommendation/`,{signal:u.signal}));u.signal.aborted||(o.value=_==null?void 0:_.data)}catch(_){if(_.name==="AbortError"||_.name==="CanceledError"){console.warn("Upsale отменён — пришёл новый запрос");return}throw console.error("Ошибка upsale:",_),_}finally{this.currentUpsaleController===u&&(this.currentUpsaleController=null)}}};ke(He,"_config",null),ke(He,"_axiosGet"),ke(He,"_axiosGetApiKey"),ke(He,"_axiosPostApiKey"),ke(He,"_axiosAuthPostApiKey"),ke(He,"_axiosPost"),ke(He,"_axiosAuthGet"),ke(He,"_axiosAuthPost"),ke(He,"_cardStore",null),ke(He,"_stateCard",null),ke(He,"_recountGroupTotalAmount",null);let bn=He;const sa=r.ref(!1),zn=()=>{const{width:a}=pt.useWindowSize(),l=r.computed(()=>sa.value),i=r.computed(()=>l.value&&a.value>1024);return{isDesktop:l,shouldUseDragScroll:i,syncWithRoute:u=>{var f;sa.value=((f=u.query)==null?void 0:f.mode)==="pdf"}}},Xd=r.defineComponent({__name:"UseScrollCenter",props:{axis:{},behavior:{},autoScroll:{type:Boolean},container:{},idActive:{},clearContainer:{type:Boolean}},setup(a,{expose:l}){const i=a,o=lt(),u=r.ref(null),{isDesktop:f}=zn(),m=async _=>{if(!u.value||!_)return;let x=window;i.container&&(x=typeof i.container=="string"?document.querySelector(i.container)||window:i.container);const C={behavior:i.behavior};if(i.axis==="x"){const y=x===window?window.innerWidth:x.clientWidth,I=_.offsetWidth;let B=_.offsetLeft;if(x!==window){const T=x.getBoundingClientRect();B=_.getBoundingClientRect().left-T.left+x.scrollLeft}B-=(y-I)/2,C.left=Math.max(0,B)}else{const y=x===window?window.innerHeight:x.clientHeight,I=_.offsetHeight;let B=_.offsetTop;if(x!==window){const T=x.getBoundingClientRect();B=_.getBoundingClientRect().top-T.top+x.scrollTop}B-=(y-I)/2,C.top=Math.max(0,B)}try{x===window?window.scrollTo(C):x.scrollTo(C)}catch(y){console.error("Scroll error:",y)}};r.onMounted(async()=>{if(i.autoScroll){let _=null;if(await r.nextTick(),o.activeScrolling_lib){const x=o.activeScrolling_lib.findIndex(C=>C.id===i.idActive);i.idActive?(_=document.getElementById(`scrolling${i.idActive}`),_&&x!==-1&&(o.activeScrolling_lib[x]=_)):o.activeScrolling_lib[x]&&(_=o.activeScrolling_lib[x]),m(_)}}});const p=async _=>{i.clearContainer&&(o.activeScrolling_lib=[]);const x=_.currentTarget;await r.nextTick(),o.activeScrolling_lib.includes(x)||o.activeScrolling_lib.push(x),m(x)};return l({scrollToElement:m}),(_,x)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"wrapperRef",ref:u,class:r.normalizeClass(["scroll-to-wrapper",{scroll_pdf:r.unref(f)}])},[r.renderSlot(_.$slots,"default",{handleTargetClick:p},void 0,!0)],2))}}),We=(a,l)=>{const i=a.__vccOpts||a;for(const[o,u]of l)i[o]=u;return i},ho=We(Xd,[["__scopeId","data-v-e47a167d"]]),Wr={mounted(a){let l=!1,i,o,u,f,m,p=0,_=0,x=0,C=0,y=0,I=!1;const B=5;a.style.cursor="grab";const T=P=>{P.button===0&&(m&&(cancelAnimationFrame(m),m=0),l=!0,I=!1,i=P.pageX-a.offsetLeft,o=P.pageY-a.offsetTop,u=a.scrollLeft,f=a.scrollTop,x=P.pageX,C=P.pageY,y=Date.now(),p=0,_=0)},v=P=>{if(!l)return;const D=P.pageX,M=P.pageY,j=Math.abs(D-i),H=Math.abs(M-o);if(!I&&(j>B||H>B)&&(I=!0,a.style.pointerEvents="none"),I){P.stopPropagation(),P.preventDefault();const Z=Date.now(),V=Z-y;V>0&&(p=(D-x)/V*16,_=(M-C)/V*16),x=D,C=M,y=Z;const L=D-a.offsetLeft,F=M-a.offsetTop,re=L-i,K=F-o;a.scrollLeft=u-re,a.scrollTop=f-K}else x=D,C=M,y=Date.now()},k=P=>{if(l){if(I){if(P.stopPropagation(),P.preventDefault(),a.style.pointerEvents="",Math.abs(p)>.1||Math.abs(_)>.1){const D=()=>{a.scrollLeft-=p,a.scrollTop-=_,p*=.95,_*=.95,Math.abs(p)>.1||Math.abs(_)>.1?m=requestAnimationFrame(D):m=0};m=requestAnimationFrame(D)}}else a.style.pointerEvents="";l=!1,I=!1}};a.addEventListener("mousedown",T),window.addEventListener("mousemove",v),window.addEventListener("mouseup",k),a._dragScrollCleanup=()=>{m&&cancelAnimationFrame(m),a.removeEventListener("mousedown",T),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",k),a.style.pointerEvents=""}},unmounted(a){a._dragScrollCleanup&&a._dragScrollCleanup()}},$d={},jd={id:"custom_svg_lib",width:"26.000000",height:"26.000000",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function qd(a,l){return r.openBlock(),r.createElementBlock("svg",jd,[...l[0]||(l[0]=[r.createElementVNode("defs",null,null,-1),r.createElementVNode("path",{id:"custom_svg_color",d:"M11.83 26L11.83 14.15L0 14.15L0 11.84L11.83 11.84L11.83 0L14.15 0L14.15 11.84L26 11.84L26 14.15L14.15 14.15L14.15 26L11.83 26Z",fill:"#FF6D2E","fill-opacity":"1.000000","fill-rule":"nonzero"},null,-1)])])}const Ei=We($d,[["render",qd]]),Zd=["id","onClick"],Yd={class:"modified_plus_btn"},Kd=["src"],Qd={key:2,class:"wrapper_modifier_item"},Jd={key:0,class:"modifier_item_n_wrapper"},eu=["src"],tu={key:1,class:"modifier_plus_item"},nu=["src"],ru=["src"],aa=We(r.defineComponent({__name:"PlusModifier",props:{isSectionModifier:{type:Boolean},toggleNotRequire:{type:Function}},setup(a){const l=Ut(),i=At(),{stateCard:o}=we.storeToRefs(l),{itemThemes:u}=we.storeToRefs(i),{shouldUseDragScroll:f}=zn(),m=r.ref([]),p=r.ref([]),_=r.ref(null),x=r.ref(null),C=r.ref(null),y=B=>{B instanceof HTMLElement&&!m.value.includes(B)&&m.value.push(B)},I=B=>{C.value=B};return r.onMounted(async()=>{await r.nextTick(),o.value.plusButtonsRefs=m.value}),r.watchEffect(()=>{p.value=o.value.groupModifiersSelected,document.body.style.overflow=""}),r.watch(()=>{var B;return(B=o.value.groupCurrentOpen)==null?void 0:B.id},async B=>{var v;if(!B)return;await r.nextTick();const T=m.value.find(k=>k.id==="scrolling"+B);T&&((v=x.value)==null||v.scrollToElement(T))}),r.onBeforeUnmount(()=>{m.value=[],o.value.plusButtonsRefs=[]}),(B,T)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({card_modified_wrapper_many:r.unref(o).groupModifiers.length>=5})},[r.unref(o).groupModifiersSelected?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["card_modified_wrapper",[r.unref(o).groupModifiers.length<=4?"card_modified_wrapper_center":""]]),ref_key:"scrollPlusContainer",ref:_},[r.createVNode(ho,{ref_key:"scrollCenterRef",ref:x,axis:"x",behavior:"smooth",container:_.value,autoScroll:!0,idActive:C.value,clearContainer:!0},{default:r.withCtx(({handleTargetClick:v})=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o).groupModifiers,(k,P)=>{var D,M;return r.openBlock(),r.createElementBlock("div",{class:"button_modified",key:k.id,ref_for:!0,ref:y,id:"scrolling"+k.id,"data-clickable":"true",onClick:j=>{a.toggleNotRequire&&a.toggleNotRequire(k,P),I(k.id),v(j)}},[r.createElementVNode("div",Yd,[p.value[P].modifiers.length===0?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([{modified_plus_btn_active:k.id===((D=r.unref(o).groupCurrentOpen)==null?void 0:D.id)&&a.isSectionModifier},"modified_plus_active"])},[r.createVNode(Ei,{"aria-label":`Открыть группу модификаторов ${k.name}`},null,8,["aria-label"])],2)):p.value[P].modifiers.length===1?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["modified_plus_btn modified_plus_btn_solo",{modified_plus_btn_active:k.id===((M=r.unref(o).groupCurrentOpen)==null?void 0:M.id)&&a.isSectionModifier}])},[r.createElementVNode("img",{src:p.value[P].modifiers[0].image_link||r.unref(u).fallback_image||"",alt:"Модификатор"},null,8,Kd)],2)):(r.openBlock(),r.createElementBlock("div",Qd,[p.value[P].modifiers.length>2?(r.openBlock(),r.createElementBlock("div",Jd,[p.value[P].modifiers.length===3?(r.openBlock(),r.createElementBlock("img",{key:0,class:"modifier_plus_item modifier_item_three",src:p.value[P].modifiers[2].image_link||r.unref(u).fallback_image||""},null,8,eu)):(r.openBlock(),r.createElementBlock("p",tu," + "+r.toDisplayString(p.value[P].modifiers.length-2),1))])):r.createCommentVNode("",!0),r.createElementVNode("div",null,[p.value[P].modifiers.length>0?(r.openBlock(),r.createElementBlock("img",{key:0,src:p.value[P].modifiers[0].image_link||r.unref(u).fallback_image||"",class:"modifier_plus_item modifier_item_first"},null,8,nu)):r.createCommentVNode("",!0),p.value[P].modifiers.length>1?(r.openBlock(),r.createElementBlock("img",{key:1,src:p.value[P].modifiers[1].image_link||r.unref(u).fallback_image||"",class:"modifier_plus_item modifier_item_second"},null,8,ru)):r.createCommentVNode("",!0)])]))]),r.createElementVNode("p",null,r.toDisplayString(k.name),1)],8,Zd)}),128))]),_:1},8,["container","idActive"])],2)),[[r.unref(Wr),r.unref(f)?{}:!1]]):r.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-7f238435"]]),iu={width:"24",height:"24",viewBox:"0 0 24 24",id:"custom_svg_lib",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ou=["stroke"],mo=r.defineComponent({__name:"Close",props:{color:{type:String,required:!1,default:"currentColor"}},setup(a){const l=a;return(i,o)=>(r.openBlock(),r.createElementBlock("svg",iu,[r.createElementVNode("path",{d:"M18 18L12 12M12 12L6 6M12 12L18 6M12 12L6 18",stroke:l.color,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,ou)]))}}),su={},au={id:"custom_svg_lib",width:"21.847656",height:"21.846924",viewBox:"0 0 21.8477 21.8469",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function lu(a,l){return r.openBlock(),r.createElementBlock("svg",au,[...l[0]||(l[0]=[r.createElementVNode("desc",null," Created with Pixso. ",-1),r.createElementVNode("defs",null,null,-1),r.createElementVNode("circle",{id:"Ellipse 1",cx:"10.923828",cy:"10.923462",r:"10.923489",fill:"#FF6D2E","fill-opacity":"1.000000"},null,-1),r.createElementVNode("path",{id:"Vector",d:"M12.38 15.9L12.89 15.39C12.96 15.33 13 15.25 13 15.16C13 15.08 12.96 15 12.89 14.93L8.84 11L12.89 7.06C12.96 6.99 13 6.91 13 6.83C13 6.74 12.96 6.66 12.89 6.6L12.38 6.1C12.31 6.03 12.23 6 12.14 6C12.05 6 11.97 6.03 11.9 6.1L7.1 10.76C7.03 10.83 7 10.91 7 11C7 11.08 7.03 11.16 7.1 11.23L11.9 15.9C11.97 15.96 12.05 16 12.14 16C12.23 16 12.31 15.96 12.38 15.9Z",fill:"#F2F7FF","fill-opacity":"1.000000","fill-rule":"nonzero"},null,-1)])])}const wr=We(su,[["render",lu]]),Cr={mounted(a){a.muted=!0,a.setAttribute("muted","")}},cu=["disabled","id"],cn=r.defineComponent({__name:"ButtonDefault",props:{textButtonDefault:{type:String,required:!0},disabled:{type:Boolean,default:!1},onClick:{type:Function,required:!0}},setup(a){const l=a,i=()=>{l.onClick()};return(o,u)=>(r.openBlock(),r.createElementBlock("button",{class:"buttonDefaultWrapper",disabled:a.disabled,onClick:i,id:a.disabled?"buttonDefaultDisabled":""},r.toDisplayString(a.textButtonDefault),9,cu))}}),du={class:"notification_info"},uu={key:0,class:"notification_18plus"},fu={class:"notification_18plus_image"},hu=["src"],mu={class:"notification_18plus_text"},gu={class:"notification_18plus_accept"},pu={key:1,class:"notification_text"},xu={key:0,class:"wrapper_button_accept"},yi=r.defineComponent({__name:"NotificationWindow",props:r.mergeModels({textNotificationDefault:{},backgroundColor:{},buttonAccept:{},type:{type:Boolean},is_qr:{type:Boolean}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(a){const l=a,i=At(),o=lt(),{is18Allowed:u,notificationData_lib:f}=we.storeToRefs(o),{itemThemes:m}=we.storeToRefs(i),p=r.computed(()=>l.backgroundColor||"rgba(50, 50, 50, 0.9)"),_=r.computed(()=>{var T;return!!((T=m.value)!=null&&T.kiosk_hide_menu_update_notification)});let x;const C=r.useModel(a,"visible"),y=()=>{f.value.fastAdd&&(o.addToCart(f.value.fastAdd),f.value.fastAdd=null),sessionStorage.setItem("is_adult","true"),u.value=!0,C.value=!1,f.value.callback&&(f.value.callback(),f.value.callback=null)},I=()=>{C.value=!1},B=()=>{C.value=!1,clearTimeout(x)};return r.watch([C,()=>l.textNotificationDefault,_],([T,v,k],[P,D])=>{x&&(!T||T!==P||v!==D)&&clearTimeout(x),k&&T&&(x=setTimeout(B,4e3))},{immediate:!0}),r.onUnmounted(()=>{x&&B()}),(T,v)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[!_.value&&C.value?(r.openBlock(),r.createBlock(r.Transition,{key:0,name:"notificationBlack",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"notification_background_black",onClick:I})]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.Transition,{name:"notification"},{default:r.withCtx(()=>{var k;return[C.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"notification_overlay",onClick:I},[r.createElementVNode("div",{class:"notification_wrapper",style:r.normalizeStyle({"background-color":p.value,border:`2px solid ${p.value}`})},[r.createElementVNode("div",du,[a.type?(r.openBlock(),r.createElementBlock("div",uu,[r.createElementVNode("div",fu,[r.createElementVNode("img",{src:r.unref(m).adult_disclaimer_image||r.unref(m).fallback_image,alt:"Дисклеймер"},null,8,hu)]),r.createElementVNode("div",mu,r.toDisplayString(r.unref(m).adult_disclaimer_text),1),r.createElementVNode("div",gu,[v[0]||(v[0]=r.createElementVNode("label",{for:"plus18"},"Содержащиеся в настоящем разделе материалы предназначены для лиц старше 18 лет, носят информационный характер об ассортименте товаров и не являются рекламой. ",-1)),r.createVNode(cn,{textButtonDefault:"Мне есть 18",onClick:y,style:{fontSize:"1rem",padding:"6px 24px",marginLeft:"10px"}})])])):(r.openBlock(),r.createElementBlock("div",pu,[r.createTextVNode(r.toDisplayString(a.textNotificationDefault)+" ",1),(k=a.buttonAccept)!=null&&k.state?(r.openBlock(),r.createElementBlock("div",xu,[r.createVNode(cn,{class:"button_accept",textButtonDefault:a.buttonAccept.text,onClick:a.buttonAccept.acceptBtn,disabled:a.buttonAccept.disabled},null,8,["textButtonDefault","onClick","disabled"])])):r.createCommentVNode("",!0)]))])],4)])):r.createCommentVNode("",!0)]}),_:1})],64))}}),_u={class:"wrapper_modifiers"},wu={class:"wrapper_nutritional_value"},Cu={class:"nutritional_scheme"},Eu={key:0,class:"nutritional_parameters"},yu={key:1,class:"nutritional_parameters"},bu={key:2,class:"nutritional_parameters"},Au={key:3,class:"nutritional_parameters"},Su={ref:"modifierBody",class:"modifier_shadow"},Iu={class:"wrapper_modifiers_title"},Nu={class:"wrapper_text_count_modifiers"},Tu=["id","aria-label","onClick"],ku={key:0,class:"counter_modifier"},Ru={class:"hide_image_corners"},Bu=["src","alt"],Ou={key:1,loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},Mu=["src"],Du={class:"modifier_title"},vu={key:0,class:"modifier_continue_or_add_wrapper"},Pu=We(r.defineComponent({__name:"SectionModifiers",emits:["close","add-to-cart"],setup(a,{emit:l}){const i=l,o=At(),u=Ut(),{itemThemes:f}=we.storeToRefs(o),{stateCard:m,recountGroupTotalAmount:p,groupTotalAmount:_,isLastGroup:x}=we.storeToRefs(u),{isDesktop:C,shouldUseDragScroll:y}=zn(),I=r.ref(null),B=pt.useTemplateRefsList(),T=r.ref(!1),v=D=>{if(!D)return;const M=m.value.groupModifiers.findIndex(L=>L.id===m.value.groupCurrentOpen.id),j=m.value.plusButtonsRefs[M]||m.value.plusButtonsRefs[0];if(!j)return;const H=D.getBoundingClientRect(),Z=j.getBoundingClientRect(),V=D.cloneNode(!0);V.classList.add("flyer"),Object.assign(V.style,{width:`${H.width}px`,height:`${H.height}px`,left:`${H.left}px`,top:`${H.top}px`,position:"fixed",zIndex:"1000"}),document.body.appendChild(V),I.value=V,requestAnimationFrame(()=>{const L=Z.left+Z.width/3-(H.left+H.width/2),F=Z.top+Z.height/4-(H.top+H.height/2),re=Z.width/H.width*.2;V.style.transform=`translate(${L}px, ${F}px) scale(${re})`,V.style.opacity="0.4",V.style.transition="transform 0.5s ease, opacity 0.5s ease"}),V.addEventListener("transitionend",()=>{V.remove(),I.value=null,j.classList.add("bump"),setTimeout(()=>j.classList.remove("bump"),300)},{once:!0})},k=()=>{m.value.isSectionModifier=!0;const D=m.value.groupCurrentOpen;if(!D)return;const M=m.value.groupModifiers.findIndex(H=>H.id===D.id),j=u.validateGroup(M);if(!j.valid){m.value.textErrorRequaired=j.errorText,T.value=!0;return}x.value?i("add-to-cart"):u.toggleNotRequire(D,void 0,!0)};r.watch(()=>m.value.isAnimationFly,D=>{D===!0&&m.value.currentModifier&&(v(B.value.find(M=>M.id===m.value.currentModifier.id)),m.value.isAnimationFly=!1)});const P=r.computed(()=>f.value.enable_sequential_modifiers?f.value.enable_sequential_modifiers:!0);return(D,M)=>{var j,H,Z,V,L,F,re,K,ee,G,W,N,X,$;return r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(yi,{visible:T.value,textNotificationDefault:r.unref(m).textErrorRequaired,backgroundColor:r.unref(f).accent_color?r.unref(f).accent_color:"#FF6D2E","onUpdate:visible":M[0]||(M[0]=q=>T.value=q)},null,8,["visible","textNotificationDefault","backgroundColor"])])),r.createElementVNode("div",_u,[r.createElementVNode("div",wu,[r.createElementVNode("div",{class:r.normalizeClass(["card_header_inner_back",[(j=r.unref(m).openCard)!=null&&j.proteins_amount?"card_header_inner_back_nutrients":""]]),"aria-label":"Закрыть выбор модификаторов",onClick:M[1]||(M[1]=q=>i("close"))},[r.createVNode(wr,{class:"arrow_bottom"})],2),r.createElementVNode("div",Cu,[(H=r.unref(m).openCard)!=null&&H.energy_amount?(r.openBlock(),r.createElementBlock("div",Eu,[r.createElementVNode("b",null,r.toDisplayString((Z=r.unref(m).openCard)==null?void 0:Z.energy_amount),1),M[4]||(M[4]=r.createElementVNode("p",null,"Килокалории",-1))])):r.createCommentVNode("",!0),(V=r.unref(m).openCard)!=null&&V.proteins_amount?(r.openBlock(),r.createElementBlock("div",yu,[r.createElementVNode("b",null,r.toDisplayString((L=r.unref(m).openCard)==null?void 0:L.proteins_amount),1),M[5]||(M[5]=r.createElementVNode("p",null,"Белки",-1))])):r.createCommentVNode("",!0),(F=r.unref(m).openCard)!=null&&F.fat_amount?(r.openBlock(),r.createElementBlock("div",bu,[r.createElementVNode("b",null,r.toDisplayString((re=r.unref(m).openCard)==null?void 0:re.fat_amount),1),M[6]||(M[6]=r.createElementVNode("p",null,"Жиры",-1))])):r.createCommentVNode("",!0),(K=r.unref(m).openCard)!=null&&K.carbohydrates_amount?(r.openBlock(),r.createElementBlock("div",Au,[r.createElementVNode("b",null,r.toDisplayString((ee=r.unref(m).openCard)==null?void 0:ee.carbohydrates_amount),1),M[7]||(M[7]=r.createElementVNode("p",null,"Углеводы",-1))])):r.createCommentVNode("",!0)]),r.createElementVNode("div",{class:r.normalizeClass(["card_header_inner_back",[(G=r.unref(m).openCard)!=null&&G.proteins_amount?"card_header_inner_back_nutrients":""]]),style:{marginRight:"10px"},"aria-label":"Закрыть выбор модификаторов",onClick:M[2]||(M[2]=q=>i("close"))},[r.createVNode(mo,{class:"cross_bottom"})],2)]),r.createElementVNode("div",Su,[r.createElementVNode("p",Iu,r.toDisplayString((W=r.unref(m).groupCurrentOpen)==null?void 0:W.name),1),r.createElementVNode("p",Nu,"Выбрано "+r.toDisplayString(r.unref(p))+" из "+r.toDisplayString(r.unref(_)),1),r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((N=r.unref(m).groupModifiers.find(q=>{var J;return q.id===((J=r.unref(m).groupCurrentOpen)==null?void 0:J.id)}))!=null&&N.group_modifiers.length?"wrapper_modifiers_card":"wrapper_modifiers_card_column")},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((X=r.unref(m).groupCurrentOpen)==null?void 0:X.group_modifiers)||[],q=>{var J,le,ae;return r.openBlock(),r.createElementBlock("div",{key:q.id,ref_for:!0,ref:r.unref(B).set,id:q.id,style:r.normalizeStyle({pointerEvents:r.unref(C)?"none":"auto"}),class:r.normalizeClass(["modifier_card",{hidden_modifier_card:q.default_amount===0&&((J=r.unref(m).groupCurrentOpen)==null?void 0:J.id)==="Добавки2000"&&q.min_amount===0&&q.max_amount===0}]),tabindex:"0",role:"button","data-clickable":"true","aria-label":`Выбрать модификатор группы ${q.name}`,onClick:oe=>r.unref(u).modifierSelect(q)},[r.createElementVNode("div",{class:r.normalizeClass([{modifier_card_active:r.unref(m).groupModifiersSelected.some(oe=>{var xe;return oe.group===((xe=r.unref(m).groupCurrentOpen)==null?void 0:xe.id)&&oe.modifiers.some(_e=>_e.id===q.id)})},"wrapper_image_corners"])},[q.amount>1?(r.openBlock(),r.createElementBlock("div",ku,r.toDisplayString(q.amount),1)):r.createCommentVNode("",!0),r.createElementVNode("div",Ru,[q.video_link?r.withDirectives((r.openBlock(),r.createElementBlock("video",Ou,[r.createElementVNode("source",{src:q.video_link||"",type:"video/webm"},null,8,Mu)])),[[r.unref(Cr)]]):(r.openBlock(),r.createElementBlock("img",{key:0,class:"modifier_image",src:q.image_link||r.unref(f).fallback_image||"",alt:q.name},null,8,Bu)),r.createElementVNode("div",{class:r.normalizeClass(["wrapper_modifier_title",{wrapper_modifier_title_required:q.min_amount>0||q.required}])},[r.createElementVNode("h3",Du,r.toDisplayString(q.name),1),r.createElementVNode("p",null,"+"+r.toDisplayString(((ae=(le=q.sizes)==null?void 0:le.find(oe=>oe.id===r.unref(m).selectedSize.id))==null?void 0:ae.price)||q.price||0)+"₽",1)],2)])],2)],14,Tu)}),128))],2)),[[r.unref(Wr),($=r.unref(m).groupModifiers.find(q=>{var J;return q.id===((J=r.unref(m).groupCurrentOpen)==null?void 0:J.id)}))!=null&&$.group_modifiers.length?{}:!1]]),P.value?(r.openBlock(),r.createElementBlock("div",vu,[r.createElementVNode("button",{onClick:M[3]||(M[3]=q=>k()),class:"modifier_continue_or_add"},r.toDisplayString(r.unref(x)?"Добавить":"Продолжить"),1)])):r.createCommentVNode("",!0)],512)])],64)}}}),[["__scopeId","data-v-6cd4c87b"]]),Lu={key:0,class:"slider_container"},Fu={key:0,class:"card_size_place"},Vu=["onClick","aria-label"],Uu={key:1,class:"card_size static"},zu=["onClick"],go=3,Hu=We(r.defineComponent({__name:"SizeModifier",setup(a){const l=Ut(),{stateCard:i}=we.storeToRefs(l),{width:o}=pt.useWindowSize(),u=r.ref(50),f=r.ref(),m=r.ref(0),p=r.ref(null),_=r.computed(()=>{var k;return o.value,(((k=p.value)==null?void 0:k.offsetWidth)||0)/Math.min(i.value.productSizes.length,go)}),x=r.computed(()=>i.value.productSizes.length<4?{left:`${u.value}%`,width:`${_.value-8}px`}:{left:"50%",transform:"translate(-50%, -50%)",width:`${_.value-8}px`}),C=r.computed(()=>{var D;if(i.value.productSizes.length<4)return i.value.productSizes[f.value.index]||i.value.productSizes[0];const k=m.value+1,P=((D=y.value[k])==null?void 0:D.originalIndex)??1;return i.value.productSizes[P]}),y=r.computed(()=>{if(i.value.productSizes.length<4)return i.value.productSizes;const k=i.value.productSizes;return[...k.map((P,D)=>({...P,originalIndex:D})),...k.map((P,D)=>({...P,originalIndex:D})),...k.map((P,D)=>({...P,originalIndex:D}))]}),I=(k,P)=>{if(f.value={id:k.id,title:k.name,index:P,is_default:k.is_default},k.price!==null&&i.value.openCard&&(i.value.openCard={...i.value.openCard,price:k.price}),i.value.selectedSize=k,i.value.productSizes.length>=4){const D=m.value+1;P<D?B():P>D&&T()}else{const D=i.value.productSizes.length,M=P*(100/D);u.value=M}},B=()=>{var k;if(!(i.value.productSizes.length<4)){if(m.value--,m.value<i.value.productSizes.length-go+1){m.value+=i.value.productSizes.length;const P=(k=p.value)==null?void 0:k.querySelector(".card_size");P&&(P.style.transition="none",P.style.transform=`translateX(-${m.value*_.value}px)`,P.offsetHeight,P.style.transition="transform 0.2s ease-in-out")}v()}},T=()=>{var k;if(!(i.value.productSizes.length<4)){if(m.value++,m.value>=i.value.productSizes.length*2){m.value-=i.value.productSizes.length;const P=(k=p.value)==null?void 0:k.querySelector(".card_size");P&&(P.style.transition="none",P.style.transform=`translateX(-${m.value*_.value}px)`,P.offsetHeight,P.style.transition="transform 0.2s ease-in-out")}v()}},v=()=>{var M;if(i.value.productSizes.length<4)return;const k=m.value+1,P=((M=y.value[k])==null?void 0:M.originalIndex)??0,D=i.value.productSizes[P];f.value={id:D.id,title:D.name,index:P,is_default:D.is_default}};return r.watch([()=>i.value.productSizes,p],([k=[],P])=>{if(Array.isArray(k)&&k.length>0){let D=k.findIndex(M=>M.is_default===!0);D>-1?(m.value=D,I(k[D],D)):k.length>go?I(k[1],1):I(k[0],0)}}),r.watch([()=>{var k;return(k=i.value.selectedSize)==null?void 0:k.id},()=>i.value.groupModifiersSelected],([k,P])=>{if(!k||!Array.isArray(P))return;const D=P.map(M=>({...M,modifiers:M.modifiers.map(j=>{if(!j.sizes||j.sizes.length===0)return j;const H=j.sizes.find(Z=>Z.id===k);return H?{...j,size:H,price:H.price??j.price}:j})}));JSON.stringify(D)!==JSON.stringify(i.value.groupModifiersSelected)&&(i.value.groupModifiersSelected=D)},{deep:!0}),(k,P)=>r.unref(i).productSizes.length>1&&f.value?(r.openBlock(),r.createElementBlock("div",Lu,[r.createElementVNode("div",{class:"card_size_place_wrapper",ref_key:"sliderWrapper",ref:p},[r.unref(i).productSizes.length>1&&f.value?(r.openBlock(),r.createElementBlock("div",Fu,[r.unref(i).productSizes.length>3?(r.openBlock(),r.createElementBlock("ul",{key:0,class:"card_size",style:r.normalizeStyle({transform:`translateX(-${m.value*_.value}px)`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,(D,M)=>(r.openBlock(),r.createElementBlock("li",{key:`${D.id}-${M}`,onClick:j=>I(D,M),class:r.normalizeClass({active:f.value.id===D.id&&f.value.index===D.originalIndex}),tabindex:"0",role:"button","aria-label":`Выбрать размер ${D.name}`},[r.createElementVNode("p",null,r.toDisplayString(D.alt_name?D.alt_name:D.name),1)],10,Vu))),128))],4)):(r.openBlock(),r.createElementBlock("ul",Uu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).productSizes,(D,M)=>(r.openBlock(),r.createElementBlock("li",{key:`${D.id}-${M}`,onClick:j=>I(D,M),class:r.normalizeClass({active:f.value.id===D.id&&f.value.index===M}),tabindex:"0",role:"button"},[r.createElementVNode("p",null,r.toDisplayString(D.alt_name?D.alt_name:D.name),1)],10,zu))),128))])),r.createElementVNode("div",{class:"size_active",style:r.normalizeStyle(x.value)},[r.createElementVNode("p",null,r.toDisplayString(C.value.alt_name?C.value.alt_name:C.value.name),1)],4)])):r.createCommentVNode("",!0)],512)])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-75aa7dcd"]]),Gu="data:image/svg+xml,%3csvg%20width='18'%20height='20'%20viewBox='0%200%2018%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3063%2019.7525C8.12104%2019.7525%208.78152%2019.1097%208.78152%2018.3167C8.78152%2017.5236%208.12104%2016.8808%207.3063%2016.8808C6.49156%2016.8808%205.83108%2017.5236%205.83108%2018.3167C5.83108%2019.1097%206.49156%2019.7525%207.3063%2019.7525Z'%20fill='%23808080'/%3e%3cpath%20d='M7.3063%2019.2525C7.83733%2019.2525%208.26782%2018.8335%208.26782%2018.3167C8.26782%2017.7998%207.83733%2017.3808%207.3063%2017.3808C6.77526%2017.3808%206.34478%2017.7998%206.34478%2018.3167C6.34478%2018.8335%206.77526%2019.2525%207.3063%2019.2525Z'%20stroke='%23F2F7FF'%20stroke-width='0.999998'/%3e%3cpath%20d='M14.4716%2019.7525C15.2864%2019.7525%2015.9469%2019.1097%2015.9469%2018.3167C15.9469%2017.5236%2015.2864%2016.8808%2014.4716%2016.8808C13.6569%2016.8808%2012.9964%2017.5236%2012.9964%2018.3167C12.9964%2019.1097%2013.6569%2019.7525%2014.4716%2019.7525Z'%20fill='%23808080'/%3e%3cpath%20d='M14.4716%2019.2525C15.0027%2019.2525%2015.4332%2018.8335%2015.4332%2018.3167C15.4332%2017.7998%2015.0027%2017.3808%2014.4716%2017.3808C13.9406%2017.3808%2013.5101%2017.7998%2013.5101%2018.3167C13.5101%2018.8335%2013.9406%2019.2525%2014.4716%2019.2525Z'%20stroke='%23F2F7FF'%20stroke-width='0.999998'/%3e%3cpath%20d='M0.770536%203.75L4.56158%206.21L6.66771%2015.23H15.1025L17.2086%208.26'%20stroke='%23F2F7FF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.19507%2011.95H12.2669H15.945'%20stroke='%23F2F7FF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.1908%200.830648V7.34648L8.26615%204.49981C8.03242%204.27231%207.64886%204.27231%207.41513%204.49981C7.35957%204.55378%207.3155%204.61788%207.28542%204.68845C7.25535%204.75902%207.23987%204.83467%207.23987%204.91106C7.23987%204.98746%207.25535%205.06311%207.28542%205.13368C7.3155%205.20425%207.35957%205.26835%207.41513%205.32231L11.3646%209.16648C11.5983%209.39398%2011.9759%209.39398%2012.2096%209.16648L16.159%205.32231C16.2145%205.26831%2016.2585%205.20419%2016.2885%205.13363C16.3186%205.06307%2016.334%204.98744%2016.334%204.91106C16.334%204.83469%2016.3186%204.75906%2016.2885%204.6885C16.2585%204.61794%2016.2145%204.55382%2016.159%204.49981C16.1035%204.44581%2016.0377%204.40297%2015.9652%204.37374C15.8927%204.34451%2015.815%204.32947%2015.7365%204.32947C15.658%204.32947%2015.5803%204.34451%2015.5078%204.37374C15.4353%204.40297%2015.3695%204.44581%2015.314%204.49981L12.3894%207.34648V0.830648C12.3894%200.509814%2012.1197%200.247314%2011.7901%200.247314C11.4604%200.247314%2011.1908%200.509814%2011.1908%200.830648Z'%20fill='%23F2F7FF'/%3e%3c/svg%3e",Wu={class:"counter_container"},Xu={class:"card_size_place_wrapper",ref:"sliderWrapper"},$u={class:"cart_amount_counter"},ju={class:"button_circle_number"},qu=We(r.defineComponent({__name:"NumberModifier",props:{qr_menu:{type:Boolean}},setup(a){const l=Ut(),{stateCard:i}=we.storeToRefs(l),o=Ne.useRouter(),u=a,f=()=>{var p,_,x,C;(_=(p=o.options.history.state)==null?void 0:p.back)!=null&&_.includes("mode=pdf")&&u.qr_menu||(x=i.value.openCard)!=null&&x.amount&&((C=i.value.openCard)==null?void 0:C.amount)>1&&(i.value.openCard.amount-=1)},m=()=>{var p,_,x;(_=(p=o.options.history.state)==null?void 0:p.back)!=null&&_.includes("mode=pdf")&&u.qr_menu||(x=i.value.openCard)!=null&&x.amount&&(i.value.openCard.amount+=1)};return(p,_)=>{var x,C;return r.openBlock(),r.createElementBlock("div",Wu,[r.createElementVNode("div",Xu,[r.createElementVNode("div",$u,[r.createElementVNode("p",{class:r.normalizeClass(["cart_circle_minus",[((x=r.unref(i).openCard)==null?void 0:x.amount)===1?"card_circle_minus_alone":""]]),"aria-label":"Уменьшить количество продукта","data-clickable":"true",onClick:r.withModifiers(f,["stop","prevent"])},[..._[0]||(_[0]=[r.createElementVNode("span",null,null,-1)])],2),r.createElementVNode("p",ju,r.toDisplayString((C=r.unref(i).openCard)==null?void 0:C.amount),1),r.createElementVNode("p",{class:"cart_circle_plus","aria-label":"Увеличить количество продукта","data-clickable":"true",onClick:r.withModifiers(m,["stop","prevent"])},"+")])],512)])}}}),[["__scopeId","data-v-50b09b8c"]]);function po(a,l=800){const i=r.ref(a),o=r.ref(a);let u=null,f=null,m=a;const p=_=>{f||(f=_);const x=_-f,C=Math.min(x/l,1),y=C<.5?4*C*C*C:1-Math.pow(-2*C+2,3)/2;i.value=Math.round(m+(o.value-m)*y),C<1?u=requestAnimationFrame(p):(i.value=o.value,u=null)};return r.watch(o,()=>{u&&cancelAnimationFrame(u),m=i.value,f=null,u=requestAnimationFrame(p)},{immediate:!0}),r.onUnmounted(()=>{u&&cancelAnimationFrame(u)}),{displayNumber:i,targetNumber:o,update:_=>{o.value=_}}}const mt=r.defineComponent({__name:"RecountNumber",props:{price:{type:Number,required:!0},duration:{type:Number},fixedFloat:{type:Number,require:!1}},setup(a){const l=a,{displayNumber:i,update:o}=po(l.price||0,l.duration||800);return r.watchEffect(()=>{o(l.price)}),(u,f)=>(r.openBlock(),r.createElementBlock("span",null,r.toDisplayString(r.unref(i).toFixed(a.fixedFloat)),1))}}),Zu={class:"button_price button_price_modifiers"},Yu=["src"],Ku={class:"button_text_container"},Qu={class:"button_text_price"},Ju=We(r.defineComponent({__name:"ButtonPriceCount",props:{qr_menu:{type:Boolean,default:!1},closeProduct:{}},setup(a,{expose:l}){const i=Ne.useRouter(),o=Ne.useRoute(),u=Ut(),f=lt(),m=At(),p=a,{stateCard:_,totalPrice_libCard:x,isOpenWindow:C,isAddToCard:y}=we.storeToRefs(u),{isDesktop:I}=zn(),{itemThemes:B}=we.storeToRefs(m),T=r.ref(!0),v=r.ref(!1),k=r.computed(()=>I.value?!1:T.value),P=r.ref([]),D=r.ref([]),M=()=>{var H,Z,V,L,F;if((Z=(H=i.options.history.state)==null?void 0:H.back)!=null&&Z.includes("mode=pdf")&&p.qr_menu)return;if(T.value){u.setCurrentCard(_.value.openCard),v.value=!0;const re=_.value.groupModifiers.findIndex(K=>u.checkedRequiredBtn.group.id===K.id);u.checkedRequiredBtn.haveRequaire&&u.toggleNotRequire(u.checkedRequiredBtn.group,re);return}const j=_.value.groupModifiersSelected||[];if(P.value=[],D.value=[],Array.isArray(j)&&j.length>0&&j.forEach(re=>{const K=re.group,ee=re.modifiers||[];K==="Добавки2000"?P.value=ee.map(G=>{var W;return{...G,old_price:G.price,size:Array.isArray(G.size)?G.size.map(N=>N.id).filter(Boolean):(W=G.size)!=null&&W.id?G.size.id:void 0}}):ee.length>0&&D.value.push({group:K,is_fake:re.is_fake||!1,is_product_determining:re.is_product_determining||!1,modifiers:ee.map(G=>{var W;return{...G,old_price:G.price,size:Array.isArray(G.size)?G.size.map(N=>N.id).filter(Boolean):(W=G.size)!=null&&W.id?G.size.id:void 0}})})}),document.body.style.overflow="",_.value.openCard){const re={id:_.value.openCard.id,is_fake:_.value.openCard.is_fake||!1,is_od_united_product:_.value.openCard.is_od_united_product||!1,amount:_.value.openCard.amount,name:_.value.openCard.name,image_link:_.value.openCard.image_link,price:_.value.openCard.price,old_price:_.value.openCard.price,size:((V=_.value.selectedSize)==null?void 0:V.id)??((F=(L=_.value.openCard.sizes)==null?void 0:L.find(K=>K.is_default))==null?void 0:F.id),sizes:_.value.openCard.sizes||[],modifiers:P.value,groups:_.value.openCard.groups,group_modifiers:D.value,energy_amount:_.value.openCard.energy_amount??0,proteins_amount:_.value.openCard.proteins_amount??0,fat_amount:_.value.openCard.fat_amount??0,carbohydrates_amount:_.value.openCard.carbohydrates_amount??0};p.closeProduct&&p.closeProduct(),f.addToCart(re),y.value=!0}C.value=!1,p.qr_menu&&i.push(`/${o.params.orgId}/`)};return r.watch(()=>_.value.productSizes,j=>{!j||j.length===0||!_.value.selectedSize||(_.value.selectedSize={..._.value.selectedSize})},{immediate:!0}),r.watchEffect(()=>{u.checkedRequiredBtn.haveRequaire?T.value=!0:T.value=!1}),r.onMounted(()=>{y.value=!1}),l({addProductToCart:M}),(j,H)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(yi,{visible:v.value,textNotificationDefault:r.unref(_).textErrorRequaired,backgroundColor:r.unref(B).accent_color?r.unref(B).accent_color:"#FF6D2E",buttonAccept:null,"onUpdate:visible":H[0]||(H[0]=Z=>v.value=Z)},null,8,["visible","textNotificationDefault","backgroundColor"])])),r.createElementVNode("div",{class:"button_price_bg_product",onTouchstart:H[3]||(H[3]=r.withModifiers(()=>{},["stop"])),onPointerdown:H[4]||(H[4]=r.withModifiers(()=>{},["stop"]))},[r.createElementVNode("div",Zu,[r.unref(I)?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(qu,{key:0,qr_menu:a.qr_menu},null,8,["qr_menu"])),r.createElementVNode("div",{class:r.normalizeClass(["card_product_button_buy",{buy_active:!k.value}]),"data-clickable":"true",onClick:M,onTouchstart:H[1]||(H[1]=r.withModifiers(()=>{},["stop"])),onPointerdown:H[2]||(H[2]=r.withModifiers(()=>{},["stop"]))},[r.unref(I)?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("img",{key:0,src:r.unref(Gu),class:"card_product_button_icon"},null,8,Yu)),r.createElementVNode("div",Ku,[r.createElementVNode("p",Qu,[r.createVNode(mt,{price:+r.unref(x),fixedFloat:2},null,8,["price"]),H[5]||(H[5]=r.createTextVNode(" ₽ ",-1))])])],34)])],32)],64))}}),[["__scopeId","data-v-15db613c"]]),e0={class:"modified_amount"},t0={class:"hide_image_corners"},n0=["src"],r0={class:"wrapper_modifier_title"},i0={class:"amount_title"},o0={class:"wrapper_amount_counter"},s0={class:"amount_count"},a0={class:"amount_wrapper"},l0={class:"add_counter_amount"},c0=We(r.defineComponent({__name:"ModalAmount",setup(a){const l=Ut(),i=At(),{itemThemes:o}=we.storeToRefs(i),{stateCard:u}=we.storeToRefs(l),f=r.computed(()=>{var _,x,C;return((C=(x=(_=u.value.currentModifier)==null?void 0:_.sizes)==null?void 0:x.find(y=>y.id===u.value.selectedSize.id))==null?void 0:C.price)??hr(u.value.currentModifier)}),m=()=>{u.value.currentModifier&&(u.value.currentModifier.amount=u.value.modalCount),l.modifierSelect(u.value.currentModifier),u.value.isModifiedAmount=!1},p=()=>{u.value.modalCount=1,u.value.currentModifier.amount=1};return(_,x)=>{var C,y;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",e0,[r.createElementVNode("div",t0,[r.createElementVNode("img",{class:"modifier_image",src:((C=r.unref(u).currentModifier)==null?void 0:C.image_link)||r.unref(o).fallback_image||""},null,8,n0),r.createElementVNode("div",r0,[r.createElementVNode("p",i0,r.toDisplayString((y=r.unref(u).currentModifier)==null?void 0:y.name),1),r.createElementVNode("p",null,"+ "+r.toDisplayString(f.value)+"₽",1)])])]),r.createElementVNode("div",o0,[r.createElementVNode("div",{class:"amount_mines",onClick:x[0]||(x[0]=r.withModifiers((...I)=>r.unref(l).minusAmount&&r.unref(l).minusAmount(...I),["stop"]))},[...x[1]||(x[1]=[r.createElementVNode("div",null,null,-1)])]),r.createElementVNode("p",s0,r.toDisplayString(r.unref(u).modalCount),1),r.createElementVNode("div",a0,[r.createVNode(Ei,{onClick:r.withModifiers(r.unref(l).plusAmount,["stop"])},null,8,["onClick"])])]),r.createElementVNode("p",{class:"clear_count",onClick:r.withModifiers(p,["stop"])},"Убрать все"),r.createElementVNode("div",l0,[r.createVNode(cn,{textButtonDefault:"Добавить",onClick:m,class:"button_add_group_modifiers"})])],64)}}}),[["__scopeId","data-v-84debd5d"]]),d0=(a,l,i)=>Math.max(l,Math.min(a,i)),u0=(a,l)=>Math.pow(a,l*5),la=(a,l,i)=>l===0||Math.abs(l)===1/0?u0(a,i):a*l*i/(l+i*a),bi=(a,l)=>l*parseFloat(a)/100,xo=(a,l,i,o=.15)=>o===0?d0(a,l,i):a<l?-la(l-a,i-l,o)+l:a>i?+la(a-i,i-l,o)+i:a,dn=(a,{min:l,max:i})=>l!==void 0&&a<l?l:i!==void 0&&a>i?i:a;function f0(a,l,i){const o=r.ref(0),u=r.computed(()=>a.value.map(_=>typeof _=="string"?bi(_,i.value):_)),f=r.computed(()=>Math.min(...u.value)),m=r.computed(()=>Math.max(...u.value)),p=r.computed(()=>{const _=u.value.reduce((x,C)=>Math.abs(C-l.value)<Math.abs(x-l.value)?C:x);return u.value.indexOf(_)});return{currentSnapPointIndex:o,flattenedSnapPoints:u,minSnapPoint:f,maxSnapPoint:m,closestSnapPointIndex:p}}const _o=We(r.defineComponent({__name:"BottomSheet",props:{duration:{default:250},snapPoints:{},initialSnapPoint:{},blocking:{type:Boolean,default:!0},canSwipeClose:{type:Boolean,default:!0},swipeCloseThreshold:{},canBackdropClose:{type:Boolean,default:!0},expandOnContentDrag:{type:Boolean,default:!0},modelValue:{type:Boolean},teleportTo:{default:"body"},teleportDefer:{type:Boolean,default:!1},headerClass:{},contentClass:{},footerClass:{}},emits:["opened","opening-started","closed","closing-started","ready","dragging-up","dragging-down","snapped","instinctHeight","update:modelValue"],setup(a,{expose:l,emit:i}){const o=a,u=i;let f=null;const m=r.ref(0),p=r.ref(!1),_=pt.useVModel(o,"modelValue",u,{passive:!0});r.watch(_,Ae=>{Ae?oe():xe||_e()}),r.onMounted(()=>{_.value&&oe()});const x=r.ref(),C=r.ref(null),y=r.ref(null),I=r.ref(null),B=r.ref(null),T=r.ref(o.expandOnContentDrag),{height:v}=pt.useWindowSize(),{height:k}=pt.useElementBounding(x),{height:P}=pt.useElementBounding(C),{height:D}=pt.useElementBounding(B),{height:M}=pt.useElementBounding(y),j=r.computed({get(){return dn(Math.ceil(D.value+P.value+M.value),{max:v.value})},set(Ae){[P.value,D.value,M.value]=Ae}}),H=r.ref(0),Z=r.ref(0),V=Dt.useMotionValue(0),L=Dt.useMotionValue(0),{snapPoints:F}=r.toRefs(o),re=r.computed(()=>F.value??[j.value]),{flattenedSnapPoints:K,currentSnapPointIndex:ee,closestSnapPointIndex:G,minSnapPoint:W,maxSnapPoint:N}=f0(re,H,v);let X;function $(Ae){T.value=!0,q(Ae)}function q(Ae){T.value&&Ae.preventDefault()}const J=Ae=>{Ae.key==="Escape"&&_e()},le=()=>{o.canBackdropClose&&_e()};let ae=!1;const oe=async()=>{var Ae;if(!ae){xe&&(xe=!1,f&&(clearTimeout(f),f=null)),m.value++,_.value=!0,ae=!0,u("opening-started");try{await r.nextTick(),await r.nextTick();const Be=(Ae=x.value)==null?void 0:Ae.$el;if(!Be){console.warn("[BottomSheet] sheet not ready, aborting"),_.value=!1;return}k.value=Be.getBoundingClientRect().height;const rt=Be.querySelector("[data-vsbs-content]"),it=Be.querySelector("[data-vsbs-header]"),Je=Be.querySelector("[data-vsbs-footer]");if(j.value=[it.getBoundingClientRect().height,rt.getBoundingClientRect().height,Je.getBoundingClientRect().height],await r.nextTick(),ee.value=K.value.findIndex(ve=>ve===W.value),o.initialSnapPoint){const ve=o.initialSnapPoint;if(ve<0||ve>=re.value.length)return console.warn("Index out of bounds");H.value=typeof re.value[ve]=="number"?dn(re.value[ve],{max:v.value}):bi(re.value[ve],v.value)}else H.value=dn(W.value,{max:v.value});Z.value=H.value,V.jump(H.value),L.jump(H.value),requestAnimationFrame(()=>{X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut"}),X=Dt.animate(L,0,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>{o.blocking&&u("opened")}})}),window.addEventListener("keydown",J)}finally{ae=!1}}};let xe=!1;const _e=()=>{xe||(ae&&(ae=!1),X&&X.stop(),L.stop(),V.stop(),Dt.animate(L,H.value||500,{duration:o.duration/1e3,ease:"easeInOut"}),p.value=!1,_.value=!1,xe=!0,u("closing-started"),window.removeEventListener("keydown",J),f&&clearTimeout(f),f=setTimeout(()=>{u("closed"),xe=!1,f=null},o.duration))},Pe=Ae=>{if(re.value){if(Ae<0||Ae>=re.value.length){console.warn("Index out of bounds");return}ee.value=Ae,H.value=typeof re.value[Ae]=="number"?dn(re.value[Ae],{max:v.value}):bi(re.value[Ae],v.value),X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>u("snapped",re.value.indexOf(re.value[Ae]))})}};function he(Ae){Ae>0?u("dragging-down"):Ae<0&&u("dragging-up")}const qe=()=>{p.value=!0,H.value=k.value,Z.value=L.get(),V.jump(H.value),L.jump(Z.value)},ye=async(Ae,Be)=>{await r.nextTick(),x.value&&(Z.value<=0&&(H.value-=Be.delta.y),H.value<=W.value&&(H.value=W.value,Z.value+=Be.delta.y,p.value=!0,L.set(o.canSwipeClose?dn(Z.value,{min:0}):dn(xo(Z.value,-k.value,0,.5),{min:0}))),V.set(dn(xo(H.value,0,N.value,.25),{min:0,max:v.value})),he(Be.delta.y))},Ke=()=>{if(o.canSwipeClose){let Ae=H.value/2;o.swipeCloseThreshold&&typeof o.swipeCloseThreshold=="number"&&(Ae=o.swipeCloseThreshold),o.swipeCloseThreshold&&typeof o.swipeCloseThreshold=="string"&&o.swipeCloseThreshold.includes("%")&&(Ae=H.value*(Number(o.swipeCloseThreshold.replace("%",""))/100)),Math.abs(Z.value)>Ae&&(Z.value=H.value)}else Z.value=0;if(X=Dt.animate(L,Z.value,{duration:o.duration/1e3,ease:"easeInOut"}),Z.value===H.value){Z.value=0,_e();return}ee.value=G.value,H.value=typeof re.value[G.value]=="number"?dn(re.value[G.value],{max:v.value}):bi(re.value[G.value],v.value),X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>u("snapped",re.value.indexOf(re.value[G.value]))}),X=Dt.animate(L,0,{duration:o.duration/1e3,ease:"easeInOut"})},ct=(Ae,Be)=>{if(H.value=k.value,Z.value=L.get(),X&&X.stop(),!I.value)return;const rt=I.value.scrollTop===0,it=Be.delta.y>0,Je=K.value.length===1,ve=.5>Math.abs(H.value-N.value);if(Je){if(!o.expandOnContentDrag)return T.value=!1;L.get()===0&&rt&&it&&(T.value=!0),L.get()===0&&rt&&!it&&(T.value=!1)}else{if(!o.expandOnContentDrag)return T.value=!1;p.value=!0,T.value=!0,ve&&(it&&rt&&(T.value=!0),!it&&rt&&(T.value=!1),rt||(T.value=!1))}},et=async(Ae,Be)=>{if(await r.nextTick(),!o.expandOnContentDrag)return T.value=!1;if(!x.value)return;Z.value===0&&T.value&&o.expandOnContentDrag&&(H.value-=Be.delta.y),H.value<=W.value&&(H.value=W.value,T.value&&o.expandOnContentDrag&&(Z.value+=Be.delta.y),Z.value=dn(Z.value,{min:0,max:W.value}),L.set(o.canSwipeClose?dn(Z.value,{min:0}):dn(xo(Z.value,-k.value,0,.5),{min:0}))),H.value>N.value&&(H.value=N.value),H.value=dn(H.value,{max:v.value}),!(K.value.length===1)&&H.value===N.value&&(T.value=!1),V.set(H.value),he(Be.delta.y)},_t=()=>{if(!I.value)return;const Ae=I.value.scrollTop===0;T.value=Ae},De=pt.useDebounceFn(Ae=>Pe(Ae),o.duration);return r.watch(re,(Ae,Be)=>{if(_.value===!1||!Ae||!Be)return;const rt=Ae[ee.value],it=Be[ee.value];typeof rt!="string"&&typeof it!="string"&&(H.value=dn(rt,{max:v.value}),rt!==it&&(X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut"})))}),r.watch(v,()=>De(ee.value)),l({open:oe,close:_e,snapToPoint:Pe}),r.onUnmounted(()=>{f&&clearTimeout(f)}),(Ae,Be)=>(r.openBlock(),r.createBlock(r.Teleport,{to:a.teleportTo,defer:a.teleportDefer},[r.createElementVNode("div",r.mergeProps(Ae.$attrs,{"data-vsbs-container":""}),[r.createVNode(r.unref(Dt.AnimatePresence),null,{default:r.withCtx(()=>[r.unref(_)&&a.blocking?(r.openBlock(),r.createBlock(r.unref(Dt.Motion),{ref:"backdrop",key:"backdrop-"+m.value,"data-vsbs-backdrop":"",onClick:Be[0]||(Be[0]=rt=>le()),transition:{ease:"easeInOut",duration:a.duration/1e3},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},null,8,["transition"])):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.unref(Dt.AnimatePresence),null,{default:r.withCtx(()=>[r.unref(_)?(r.openBlock(),r.createBlock(r.unref(Dt.Motion),{ref_key:"sheet",ref:x,exit:{opacity:0},initial:!1,key:m.value,style:r.normalizeStyle({y:r.unref(L),z:1,height:r.unref(V)}),"data-vsbs-shadow":!a.blocking,"data-vsbs-sheet-show":r.unref(_),"data-vsbs-dragging":p.value,"aria-modal":"true","data-vsbs-sheet":"",tabindex:"-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Dt.Motion),{ref_key:"sheetHeader",ref:C,"data-vsbs-header":"",onPanStart:qe,onPan:ye,onPanEnd:Ke,onTouchmove:$,class:r.normalizeClass(a.headerClass)},{default:r.withCtx(()=>[r.renderSlot(Ae.$slots,"header",{},void 0,!0)]),_:3},8,["class"]),r.createElementVNode("div",{ref_key:"sheetScroll",ref:I,"data-vsbs-scroll":"",onScrollend:_t},[r.createVNode(r.unref(Dt.Motion),{ref:"sheetContentWrapper","data-vsbs-content-wrapper":"",onPanStart:ct,onPan:et,onPanEnd:Ke,onTouchmove:q},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"sheetContent",ref:B,"data-vsbs-content":"",class:r.normalizeClass(a.contentClass)},[r.renderSlot(Ae.$slots,"default",{},void 0,!0)],2)]),_:3},512)],544),r.createVNode(r.unref(Dt.Motion),{ref_key:"sheetFooter",ref:y,"data-vsbs-footer":"",onPanStart:qe,onPan:ye,onPanEnd:Ke,onTouchmove:$,class:r.normalizeClass(a.footerClass)},{default:r.withCtx(()=>[r.renderSlot(Ae.$slots,"footer",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["style","data-vsbs-shadow","data-vsbs-sheet-show","data-vsbs-dragging"])):r.createCommentVNode("",!0)]),_:3})],16)],8,["to","defer"]))}}),[["__scopeId","data-v-a8913d51"]]);function An(a,l=null){const i=ai();i.initCacheSingle("defaultImage");const o=r.computed(()=>i.cache.defaultImage||null),u=r.shallowRef(!1),f=r.computed(()=>{var x;return((x=r.toValue(a))==null?void 0:x.toString())||null}),m=pt.computedAsync(async()=>{const x=f.value;return x?(await i.initCacheSingle(x),i.cache[x]||null):null},null,{evaluating:u}),p=r.computed(()=>u.value&&f.value!==null);return{mediaUrl:r.computed(()=>m.value||r.toValue(l)||o.value||null),isLoading:p}}const h0={class:"card_product_modifiers_sheet_body"},m0={class:"card__pictures"},g0=["src"],p0=["src"],x0={class:"card_header_wrapper"},_0={key:0,class:"card_fire_kkal_wrapper"},w0={class:"card_content"},C0={class:"wrapper_size"},E0={key:0,class:"description"},y0={key:1},b0={class:"title_info_modifiers"},A0=We(r.defineComponent({__name:"CardProductPage",props:{configPage:{}},setup(a){const l=At(),i=Ut(),{stateCard:o,isOpenWindow:u,isAddToCard:f}=we.storeToRefs(i),{itemThemes:m}=we.storeToRefs(l),p=Ne.useRouter(),_=Ne.useRoute(),x=a,C=r.computed(()=>!!(_.query.mode==="pdf"&&x.configPage.qr_menu)),{mediaUrl:y}=An(()=>{var P,D;return(P=o.value.openCard)!=null&&P.video_link?`${o.value.openCard.id}_video`:(D=o.value.openCard)!=null&&D.image_link?`${o.value.openCard.id}_image`:null},()=>{var P,D;return((P=o.value.openCard)==null?void 0:P.video_link)||((D=o.value.openCard)==null?void 0:D.image_link)||null}),I=()=>{x.configPage.qr_menu?C.value?p.push(`/${_.params.orgId}?mode=pdf`):p.push(`/${_.params.orgId}`):x.configPage.closeProduct()},B=()=>{f.value=!1,o.value.isSectionModifier=!1},T=()=>{o.value.isModifiedAmount=!1},v=r.ref(null),k=()=>{var P;(P=v.value)==null||P.addProductToCart()};return r.watch(()=>x.configPage.data,i.setCurrentCard),r.watch(()=>o.value.isSectionModifier,P=>{C.value&&document.body.classList.toggle("pdf_hidden",P)},{immediate:!0}),r.watchEffect(()=>{u.value||(u.value=x.configPage.is_closeProduct)}),r.onBeforeUnmount(()=>i.reset()),(P,D)=>{var M,j,H,Z,V,L;return r.openBlock(),r.createElementBlock("div",{class:"card_product_wrapper",style:r.normalizeStyle(C.value?"user-select: none;":"")},[r.createVNode(r.unref(_o),{modelValue:r.unref(o).isSectionModifier,"onUpdate:modelValue":D[0]||(D[0]=F=>r.unref(o).isSectionModifier=F),class:"card_product_modifiers_sheet",teleportTo:C.value?"#app":"body"},{default:r.withCtx(()=>[r.createElementVNode("div",h0,[r.createVNode(Pu,{onClose:B,onAddToCart:k}),r.createVNode(aa,{isSectionModifier:r.unref(o).isSectionModifier,toggleNotRequire:r.unref(i).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])]),_:1},8,["modelValue","teleportTo"]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.unref(o).isModifiedAmount?(r.openBlock(),r.createElementBlock("div",{key:0,class:"wrapper_modified_amount",onClick:r.withModifiers(T,["stop"])},[r.createVNode(c0)])):r.createCommentVNode("",!0)])),r.createElementVNode("div",m0,[(M=r.unref(o).openCard)!=null&&M.video_link&&r.unref(y)?r.withDirectives((r.openBlock(),r.createElementBlock("video",{key:r.unref(y),loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},[r.createElementVNode("source",{src:r.unref(y)||"",type:"video/webm"},null,8,g0)])),[[r.unref(Cr)]]):(r.openBlock(),r.createElementBlock("img",{key:1,class:"card__pictures_images",src:r.unref(y)||"",alt:"Product image"},null,8,p0)),r.createElementVNode("div",x0,[r.createVNode(wr,{class:"card_header_back",onClick:I,"aria-label":"Вернуться назад"}),(j=r.unref(o).openCard)!=null&&j.energy_amount?(r.openBlock(),r.createElementBlock("div",_0,[D[2]||(D[2]=r.createElementVNode("div",{class:"card_fire_kkal"},null,-1)),r.createElementVNode("p",null,[r.createElementVNode("b",null,r.toDisplayString((H=r.unref(o).openCard)==null?void 0:H.energy_amount),1),D[1]||(D[1]=r.createTextVNode(" Ккал ",-1))])])):r.createCommentVNode("",!0)]),r.createElementVNode("h4",null,r.toDisplayString((Z=r.unref(o).openCard)==null?void 0:Z.name),1),r.createElementVNode("div",{class:"card__pictures__gradient",style:r.normalizeStyle(r.unref(m).gradientStyle)},null,4)]),r.createElementVNode("div",w0,[r.createElementVNode("div",C0,[r.createVNode(Hu)]),(V=r.unref(o).openCard)!=null&&V.description?(r.openBlock(),r.createElementBlock("p",E0,r.toDisplayString((L=r.unref(o).openCard)==null?void 0:L.description),1)):r.createCommentVNode("",!0),r.unref(o).groupModifiers.length?(r.openBlock(),r.createElementBlock("div",y0,[r.createElementVNode("p",b0,r.toDisplayString(r.unref(m).dish_cart_mod_choice_text||"Настрой, как ты любишь"),1),r.createVNode(aa,{isSectionModifier:r.unref(o).isSectionModifier,toggleNotRequire:r.unref(i).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])):r.createCommentVNode("",!0),r.createVNode(Ju,{ref_key:"buttonPriceRef",ref:v,qr_menu:a.configPage.qr_menu,closeProduct:a.configPage.closeProduct},null,8,["qr_menu","closeProduct"])])],4)}}}),[["__scopeId","data-v-a84e5942"]]),Ai=we.defineStore("modals",()=>{const a=new Map,l=(u,f)=>{const m=o(u).value;m.visible=!0,m.context=f},i=u=>{const f=o(u).value;f.visible=!1},o=u=>(a.has(u)||a.set(u,r.ref({visible:!1})),a.get(u));return{state:o,open:l,close:i}}),S0={key:0,class:"popupWindowDefault_overlay"},ca=We(r.defineComponent({__name:"PopupWindowDefault",props:{visible:{type:Boolean}},emits:["update:visible"],setup(a,{emit:l}){const i=a,o=l,u=()=>{o("update:visible",!1)};return r.watch(()=>i.visible,async f=>{f&&await r.nextTick(),i.isVisible=f}),(f,m)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.Transition,{name:"popupWindowDefaultBlack",appear:"",onAfterLeave:m[0]||(m[0]=()=>{o("update:visible",!1)})},{default:r.withCtx(()=>[i.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"background_black",onClick:u})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.Transition,{name:"popupWindowDefault",appear:"",onAfterLeave:m[1]||(m[1]=()=>{o("update:visible",!1)})},{default:r.withCtx(()=>[i.visible?(r.openBlock(),r.createElementBlock("div",S0,[r.renderSlot(f.$slots,"default",{},void 0,!0)])):r.createCommentVNode("",!0)]),_:3})],64))}}),[["__scopeId","data-v-08e0e008"]]),I0=["src"],N0={class:"cart_box_content_wrapper"},T0={class:"cart_box_content_info"},k0={class:"cart_box_name"},R0={class:"cart_box_size"},B0={class:"cart_amount"},O0={class:"cart_amount_count"},M0={class:"cart_box_info_more"},D0={key:1,class:"cart_modifier_info"},v0={class:"cart_modifier_content"},P0={class:"wrapper_price_count_cart"},L0={class:"count_cart_box"},F0={class:"wrapper_modifiers_discount"},da=We(r.defineComponent({__name:"CartBox",props:{index:Number,cardItem:Object,isShowModifiers:Boolean},emits:["delete"],setup(a,{emit:l}){const i=a,o=lt(),u=At(),f=Ai(),{itemThemes:m}=we.storeToRefs(u),p=r.ref(0),_=r.ref(0),x=r.ref(!1),C=r.ref(!1),y=r.ref(i.isShowModifiers?u.itemThemes.qr_show_modifiers_in_cart??!1:u.itemThemes.kiosk_show_modifiers_in_cart??!1),{displayNumber:I,update:B}=po(0,800),T=r.computed(()=>{var K,ee;const F=((K=i.cardItem)==null?void 0:K.modifiers)??[],re=(((ee=i.cardItem)==null?void 0:ee.group_modifiers)??[]).flatMap(G=>G.modifiers??[]);return[...F,...re]}),{mediaUrl:v}=An(()=>{var F;return((F=i.cardItem)==null?void 0:F.id)+"_image"},()=>{var F;return(F=i.cardItem)==null?void 0:F.image_link}),k=r.computed(()=>{var F,re;return((F=i.cardItem)==null?void 0:F.total_new_price)??hr(i.cardItem)*((re=i.cardItem)==null?void 0:re.amount)}),P=()=>f.open("cart-delete-confirm",i.cardItem),D=()=>{y.value=!y.value},M=()=>{o.plusAmount(i.cardItem.idSystem)},j=()=>{i.cardItem.amount>1?o.minusAmount(i.cardItem.idSystem):P()},H=F=>{p.value=F.touches[0].clientX,x.value=!0},Z=F=>{x.value&&(_.value=F.touches[0].clientX-p.value,_.value>0&&(_.value=0))},V=()=>{x.value=!1,_.value<-115&&P(),_.value=0};r.onMounted(()=>{i.index===0&&(C.value=!0,setTimeout(()=>{_.value=-90,setTimeout(()=>{_.value=0,C.value=!1},700)},0))});const L=r.computed(()=>{const F=i.index===0&&C.value?1:`${1-Math.abs(_.value)/200}`;return{transform:`translateX(${_.value}px)`,opacity:F,transition:x.value?"none":"transform 0.7s, opacity 0.7s"}});return r.watch(k,B,{immediate:!0}),(F,re)=>{var K,ee,G,W,N,X,$,q;return r.openBlock(),r.createElementBlock("div",{class:"cart_box_wrapper",onTouchstart:H,onTouchmove:Z,onTouchend:V,style:r.normalizeStyle(L.value)},[re[2]||(re[2]=r.createElementVNode("div",{class:"wrapper_cart_delete"},[r.createElementVNode("div",{class:"cart_delete"})],-1)),r.createElementVNode("img",{src:r.unref(v)||"",class:"cart_box_image"},null,8,I0),r.createElementVNode("div",N0,[r.createElementVNode("div",T0,[r.createElementVNode("p",k0,r.toDisplayString((K=a.cardItem)==null?void 0:K.name),1),r.createElementVNode("p",R0,r.toDisplayString(((G=(ee=a.cardItem)==null?void 0:ee.sizes.find(J=>{var le;return J.id===((le=a.cardItem)==null?void 0:le.size)}))==null?void 0:G.alt_name)||((N=(W=a.cardItem)==null?void 0:W.sizes.find(J=>{var le;return J.id===((le=a.cardItem)==null?void 0:le.size)}))==null?void 0:N.name)),1),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((X=i.cardItem)==null?void 0:X.discounts)||[],(J,le)=>(r.openBlock(),r.createElementBlock("div",{key:le,class:"discount_banner"},[r.createElementVNode("p",null,r.toDisplayString(J.name),1),r.createElementVNode("p",null,r.toDisplayString(J.discount)+"₽",1)]))),128)),r.createElementVNode("div",B0,[r.createElementVNode("button",{onClick:j},"-"),r.createElementVNode("p",O0,r.toDisplayString(i.cardItem.amount),1),r.createElementVNode("button",{onClick:M},"+")])]),r.createElementVNode("div",M0,[r.createElementVNode("div",{class:"cart_box_remove_item",onClick:P},[r.createVNode(mo)]),($=i.cardItem)!=null&&$.new_price?(r.openBlock(),r.createElementBlock("p",{key:0,class:r.normalizeClass({discount_new_price:(q=i.cardItem)==null?void 0:q.new_price})},r.toDisplayString((i.cardItem.new_price*i.cardItem.amount).toFixed(2)+"₽"),3)):r.createCommentVNode("",!0),r.createElementVNode("p",null,r.toDisplayString(r.unref(I).toFixed(2)+"₽"),1)])]),!y.value&&T.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"cart_modifier_toggle",onTouchstart:r.withModifiers(D,["stop"])},[...re[0]||(re[0]=[r.createElementVNode("p",{class:"cart_info_more"},"Посмотреть модификаторы",-1),r.createElementVNode("p",{class:"cart_arrow"},null,-1)])],32)):r.createCommentVNode("",!0),y.value&&T.value.length>0?(r.openBlock(),r.createElementBlock("div",D0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,J=>{var le;return r.openBlock(),r.createElementBlock("div",{class:"cart_modifier_item",key:J.id},[r.createElementVNode("div",v0,[r.createVNode(Ei,{id:"plus_orange"}),r.createElementVNode("p",null,r.toDisplayString(J.name),1)]),r.createElementVNode("div",P0,[r.createElementVNode("p",L0,r.toDisplayString(`x${J.amount}`),1),r.createElementVNode("div",F0,[J!=null&&J.new_price?(r.openBlock(),r.createElementBlock("p",{key:0,class:r.normalizeClass({discount_new_price:(le=J==null?void 0:J.new_price)==null?void 0:le.toFixed(2)})},r.toDisplayString((J.new_price*J.amount).toFixed(2)+"₽"),3)):r.createCommentVNode("",!0),r.createElementVNode("p",null,r.toDisplayString((J.total_new_price??J.price*J.amount).toFixed(2)+"₽"),1)])])])}),128)),r.createElementVNode("div",{class:"cart_modifier_arrow",onTouchstart:r.withModifiers(D,["stop"])},[...re[1]||(re[1]=[r.createElementVNode("p",{class:"cart_info_more"},"Скрыть",-1),r.createElementVNode("p",{class:"cart_arrow_top"},null,-1)])],32)])):r.createCommentVNode("",!0)],36)}}}),[["__scopeId","data-v-9cc87c29"]]),V0={},U0={class:"nfc_x",viewBox:"0 0 48 48"};function z0(a,l){return r.openBlock(),r.createElementBlock("svg",U0,[...l[0]||(l[0]=[r.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#B00020","stroke-width":"2.4",fill:"none"},null,-1),r.createElementVNode("path",{d:"M14 16L34 30M34 16L14 30",stroke:"#B00020","stroke-width":"3","stroke-linecap":"round"},null,-1)])])}const H0=We(V0,[["render",z0]]),G0={},W0={style:{},"aria-hidden":"true",viewBox:"0 0 48 48",class:"nfc_ok"};function X0(a,l){return r.openBlock(),r.createElementBlock("svg",W0,[...l[0]||(l[0]=[r.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#5D534B","stroke-width":"none",fill:"none"},null,-1),r.createElementVNode("path",{d:"M16 22h16m-10 6h6",stroke:"#5D534B","stroke-width":"2.4","stroke-linecap":"round"},null,-1),r.createElementVNode("path",{d:"M14 28l6 6l14-14",fill:"none",stroke:"#2ECC71","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const $0=We(G0,[["render",X0]]),j0={key:0,class:"nfc_ok",viewBox:"0 0 48 48","aria-hidden":"true"},q0=r.defineComponent({__name:"CardReaderRetry",props:{styleRetry:{type:Boolean}},setup(a){return(l,i)=>a.styleRetry?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("svg",j0,[...i[0]||(i[0]=[r.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4"},null,-1),r.createElementVNode("path",{d:"M16 22h16m-10 6h6"},null,-1)])]))}}),Z0={class:"sheet_header"},Y0={class:"sheet_title",id:"sheetTitle"},K0={class:"sheet_body"},Q0={class:"sheet_card"},J0={class:"nfc_title"},e1={class:"lead"},t1={class:"wrapper_input_accept"},n1={key:1},r1={key:0,class:"card_phone_auth_wrapper"},i1={class:"sr_only","aria-live":"polite"},ua=r.defineComponent({__name:"CardReader",setup(a){const l=lt(),i=At(),{is_OpenLoyal:o}=we.storeToRefs(l),{itemThemes:u}=we.storeToRefs(i),f=vt(),m=r.ref(),p=r.ref(null),_=r.ref(""),x={wait:{text:"Лояльность",title:""},success:{text:"Стикер распознан",title:"Стикер распознан"},not_found:{text:"Стикер не распознан",title:"Стикер не распознали"}},C=r.computed({get:()=>_.value,set:$=>{_.value=$.replace(/\s/g,"")}}),y=r.computed(()=>f.currentState),I=r.computed(()=>f.isDrawerOpen),B=r.computed(()=>{var $;return(($=x[y.value])==null?void 0:$.text)||""}),T=r.computed(()=>{var $;($=x[y.value])!=null&&$.title}),v=r.computed(()=>y.value==="success"?"Добро пожаловать!":u.value.kiosk_show_loyalty_phone_input_button?"Поднесите стикер к считывателю или войдите по номеру телефона":"Поднесите стикер к считывателю или введите номер карты вручную"),k=r.computed(()=>({ok:y.value==="success",warn:y.value==="not_found"})),P=r.computed(()=>{const $=[];return y.value==="wait"&&$.push("pulse","show-x"),y.value==="not_found"&&$.push("pulse","show-x"),y.value==="success"&&$.push("pulse","show-ok"),$}),D=r.computed(()=>y.value==="not_found"),M=r.computed(()=>y.value==="success"),j=r.computed(()=>y.value==="not_found"),H=r.computed(()=>["not_found"].includes(y.value)),Z=r.computed(()=>({wait:"Стикер не распознан. Нажмите «Повторить».",success:"Стикер распознан. Нажмите «Продолжить».",not_found:"Стикер не распознан. Нажмите «Повторить»."})[y.value]||""),V=()=>{f.closeDrawer(),o.value=!0},L=async $=>{var q,J;f.error="",p.value=null;try{const le=new bn;await le.authorizeByCard($.trim()),await le.getProfile(),l.loadCart(),f.setState("success"),f.isDrawerOpen=!1,f.showNotification("Вы успешно авторизовались в программе лояльности!")}catch(le){f.error=((J=(q=le.response)==null?void 0:q.data)==null?void 0:J.user_friendly_message)||"Ошибка",f.setState("not_found"),p.value=C.value,C.value=""}},F=r.computed(()=>{var q;const $=(q=u.value)==null?void 0:q.kiosk_hide_manual_input_loyalty_card;return $??!1}),re=()=>{f.setState("wait"),f.error="",C.value="",p.value=null},K=()=>{f.closeDrawer(),p.value=null,C.value=""},ee=()=>{var $,q;f.setState("wait"),(q=($=C.value)==null?void 0:$.trim())!=null&&q.length&&L(C.value.trim())},G=$=>{$.stopPropagation(),document.activeElement!==m.value&&W()},W=()=>{r.nextTick(()=>{m.value&&(m.value.focus(),_.value&&m.value.select())})},N=$=>{const q=document.activeElement===m.value;if(!I.value||q)return;const J=$.key.toLowerCase();if(J==="backspace")return C.value=C.value.slice(0,-1);if(J==="escape")return K();if(J==="r"&&j.value)return re();if(J==="c"&&y.value==="success")return K();if(J==="enter")return ee();C.value+=J},X={mounted($){$==null||$.focus()}};return r.onMounted(()=>{document==null||document.addEventListener("keydown",N)}),r.onBeforeUnmount(()=>{document==null||document.removeEventListener("keydown",N)}),r.watchEffect(()=>{I.value&&(f.error="")}),($,q)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[I.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"backdrop show",onClick:K,"aria-hidden":"true"})):r.createCommentVNode("",!0),I.value?(r.openBlock(),r.createElementBlock("section",{key:1,class:r.normalizeClass(["sheet show",{sheet_retry:j.value}]),"aria-modal":"true","aria-labelledby":"sheetTitle",onClick:G},[r.createElementVNode("header",Z0,[r.createElementVNode("div",Y0,r.toDisplayString(B.value),1),j.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["sheet_status",k.value])},r.toDisplayString(p.value),3)):r.createCommentVNode("",!0),r.createElementVNode("button",{class:"sheet_close",onClick:K,"aria-label":"Закрыть"}," Закрыть ")]),r.createElementVNode("div",K0,[r.createElementVNode("div",Q0,[r.createElementVNode("div",{class:r.normalizeClass(["nfc",P.value])},[r.createVNode(q0,{styleRetry:H.value},null,8,["styleRetry"]),D.value?(r.openBlock(),r.createBlock(H0,{key:0})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"overlay check",style:r.normalizeStyle({display:M.value?"grid":"none"}),"aria-hidden":"true"},[r.createVNode($0)],4)],2),r.createElementVNode("h2",J0,r.toDisplayString(T.value),1),r.createElementVNode("p",e1,r.toDisplayString(v.value),1),r.createElementVNode("div",t1,[r.withDirectives(r.createElementVNode("input",{style:r.normalizeStyle(F.value?{position:"absolute",left:"-9999px"}:{}),ref_key:"cardInputManualRef",ref:m,"onUpdate:modelValue":q[0]||(q[0]=J=>C.value=J),class:"nfc_title_read_input",type:"text",placeholder:"Введите трек карты","aria-live":"polite",onKeydown:r.withKeys(ee,["enter"])},null,36),[[r.vModelText,C.value],[X]]),j.value?(r.openBlock(),r.createElementBlock("button",{key:0,class:"btn btn_ghost",onClick:re},"Повторить")):(r.openBlock(),r.createElementBlock("div",n1,[F.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("button",{key:0,class:"btn btn_ghost",onClick:q[1]||(q[1]=J=>j.value?K:ee())},"Отправить"))]))]),y.value==="wait"&&r.unref(u).kiosk_show_loyalty_phone_input_button?(r.openBlock(),r.createElementBlock("div",r1,[r.createElementVNode("button",{class:"card_phone_auth_button",onClick:V},"Войти по номеру телефона")])):r.createCommentVNode("",!0)])]),r.createElementVNode("div",i1,r.toDisplayString(Z.value),1)],2)):r.createCommentVNode("",!0)],64))}}),o1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJJTk5PIGJhbmsgY2FyZCBpY29uIj4NCiAgPGRlZnM+DQogICAgPGxpbmVhckdyYWRpZW50IGlkPSJibGFja0dyYWQiIHgxPSIwIiB5MT0iMCIgeDI9IjEiIHkyPSIxIj4NCiAgICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMxQTFBMUEiLz4NCiAgICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPg0KICAgIDwvbGluZWFyR3JhZGllbnQ+DQoNCiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InNoaW5lIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMCI+DQogICAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjRkZGRkZGIiBzdG9wLW9wYWNpdHk9IjAiLz4NCiAgICAgIDxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjRkZGRkZGIiBzdG9wLW9wYWNpdHk9IjAuMTgiLz4NCiAgICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI0ZGRkZGRiIgc3RvcC1vcGFjaXR5PSIwIi8+DQogICAgPC9saW5lYXJHcmFkaWVudD4NCg0KICAgIDxmaWx0ZXIgaWQ9InNoYWRvdyIgeD0iLTMwJSIgeT0iLTMwJSIgd2lkdGg9IjE2MCUiIGhlaWdodD0iMTYwJSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iNiIgc3RkRGV2aWF0aW9uPSI2IiBmbG9vZC1jb2xvcj0iIzAwMCIgZmxvb2Qtb3BhY2l0eT0iMC4yNSIvPg0KICAgIDwvZmlsdGVyPg0KICA8L2RlZnM+DQoNCiAgPCEtLSBDZW50ZXJlZCBjYXJkIC0tPg0KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg3LjUgMjMpIHJvdGF0ZSgtMTIpIiBmaWx0ZXI9InVybCgjc2hhZG93KSI+DQogICAgPCEtLSBjYXJkIGJvZHkgLS0+DQogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijg1IiBoZWlnaHQ9IjU0IiByeD0iMTAiIGZpbGw9InVybCgjYmxhY2tHcmFkKSIvPg0KDQogICAgPCEtLSB0b3Agc3RyaXBlIC0tPg0KICAgIDxyZWN0IHg9IjAiIHk9IjgiIHdpZHRoPSI4NSIgaGVpZ2h0PSI4IiByeD0iNCIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMC4wNSIvPg0KDQogICAgPCEtLSBjaGlwIC0tPg0KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwIDI3KSI+DQogICAgICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTUiIHJ4PSIzIiBmaWxsPSIjQ0ZBRTcwIi8+DQogICAgICA8cmVjdCB4PSIyLjUiIHk9IjMuNSIgd2lkdGg9IjEzIiBoZWlnaHQ9IjEuMiIgZmlsbD0iIzlFODM0RSIvPg0KICAgICAgPHJlY3QgeD0iMi41IiB5PSI2LjUiIHdpZHRoPSIxMyIgaGVpZ2h0PSIxLjIiIGZpbGw9IiM5RTgzNEUiLz4NCiAgICAgIDxyZWN0IHg9IjIuNSIgeT0iOS41IiB3aWR0aD0iMTMiIGhlaWdodD0iMS4yIiBmaWxsPSIjOUU4MzRFIi8+DQogICAgICA8cmVjdCB4PSI4LjUiIHk9IjAiIHdpZHRoPSIxLjUiIGhlaWdodD0iMTUiIGZpbGw9IiM5RTgzNEUiIG9wYWNpdHk9IjAuNiIvPg0KICAgIDwvZz4NCg0KICAgIDwhLS0gSU5OTyBsb2dvIC0tPg0KICAgIDx0ZXh0IHg9IjYxIiB5PSIzOSINCiAgICAgICAgICBmb250LWZhbWlseT0ic3lzdGVtLXVpLCAtYXBwbGUtc3lzdGVtLCBTZWdvZSBVSSwgUm9ib3RvLCBBcmlhbCwgc2Fucy1zZXJpZiINCiAgICAgICAgICBmb250LXNpemU9IjEzIg0KICAgICAgICAgIGZvbnQtd2VpZ2h0PSI4MDAiDQogICAgICAgICAgbGV0dGVyLXNwYWNpbmc9IjEuMiINCiAgICAgICAgICBmaWxsPSIjRkZGRkZGIg0KICAgICAgICAgIG9wYWNpdHk9IjAuOTUiDQogICAgICAgICAgdGV4dC1hbmNob3I9Im1pZGRsZSI+DQogICAgICBpbm5vDQogICAgPC90ZXh0Pg0KDQogICAgPCEtLSBzaGluZSAtLT4NCiAgICA8cGF0aCBkPSJNLTggNiBMMjUgLTMgTDk0IDQ3IEw2MCA2MiBMLTggMjUgWiIgZmlsbD0idXJsKCNzaGluZSkiLz4NCiAgPC9nPg0KPC9zdmc+",fa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%20width='100'%20height='100'%20fill='none'%3e%3c!--%20Big%20QR%20corners%20(outer%20shape%20with%20inner%20cutout)%20--%3e%3cpath%20fill='currentColor'%20fill-rule='evenodd'%20d='%20M72%200H163C202.765%200%20235%2032.235%20235%2072V163C235%20202.765%20202.765%20235%20163%20235H72C32.235%20235%200%20202.765%200%20163V72C0%2032.235%2032.235%200%2072%200Z%20M102%2086H133C141.837%2086%20149%2093.163%20149%20102V133C149%20141.837%20141.837%20149%20133%20149H102C93.163%20149%2086%20141.837%2086%20133V102C86%2093.163%2093.163%2086%20102%2086Z%20'/%3e%3cpath%20fill='currentColor'%20fill-rule='evenodd'%20d='%20M349%200H440C479.765%200%20512%2032.235%20512%2072V163C512%20202.765%20479.765%20235%20440%20235H349C309.235%20235%20277%20202.765%20277%20163V72C277%2032.235%20309.235%200%20349%200Z%20M379%2086H410C418.837%2086%20426%2093.163%20426%20102V133C426%20141.837%20418.837%20149%20410%20149H379C370.163%20149%20363%20141.837%20363%20133V102C363%2093.163%20370.163%2086%20379%2086Z%20'/%3e%3cpath%20fill='currentColor'%20fill-rule='evenodd'%20d='%20M72%20277H163C202.765%20277%20235%20309.235%20235%20349V440C235%20479.765%20202.765%20512%20163%20512H72C32.235%20512%200%20479.765%200%20440V349C0%20309.235%2032.235%20277%2072%20277Z%20M102%20363H133C141.837%20363%20149%20370.163%20149%20379V410C149%20418.837%20141.837%20426%20133%20426H102C93.163%20426%2086%20418.837%2086%20410V379C86%20370.163%2093.163%20363%20102%20363Z%20'/%3e%3c!--%20Small%20modules%20--%3e%3crect%20x='277'%20y='277'%20width='86'%20height='86'%20rx='26'%20fill='currentColor'/%3e%3crect%20x='426'%20y='277'%20width='86'%20height='86'%20rx='28'%20fill='currentColor'/%3e%3crect%20x='277'%20y='426'%20width='86'%20height='86'%20rx='26'%20fill='currentColor'/%3e%3c!--%20Center%20dot%20--%3e%3ccircle%20cx='394.17'%20cy='394.17'%20r='33'%20fill='currentColor'/%3e%3c/svg%3e",s1=["src"],a1={class:"header_description"},l1=We(r.defineComponent({__name:"PaymentBoxes",props:{configPage:{},comment:{},cartItems:{},isAuthorized:{type:Boolean},orderId:{default:null},signal:{},provider:{}},emits:["select"],setup(a,{emit:l}){const i=a,o=l,u=vt(),f=Ut(),{selectedProvider:m,isButtonDisabled:p}=we.storeToRefs(u),{isAddToCard:_}=we.storeToRefs(f),x={default:o1,SBP:fa},C=async()=>{m.value=i.provider;const I=i.provider.front_type;I&&(_.value=!1,p.value=!0,o("select",I),lo(i.orderId,i.provider.type))},y=r.computed(()=>x[i.provider.front_type]||x.default);return(I,B)=>(r.openBlock(),r.createElementBlock("div",{class:"payment_boxes_wrapper",onClick:C},[r.createElementVNode("img",{class:"picture",src:y.value},null,8,s1),r.createElementVNode("div",a1,[r.createElementVNode("b",null,r.toDisplayString(a.provider.name),1),r.createElementVNode("p",null,r.toDisplayString(a.provider.description),1)]),r.createVNode(wr)]))}}),[["__scopeId","data-v-c4a0ed62"]]),c1={key:0,class:"wrapper_cart_payment"},d1={class:"wrapper_paid"},u1={class:"to_be_paid"},f1=We(r.defineComponent({__name:"CartPayment",props:{configPage:{},comment:{},cartItems:{},isAuthorized:{type:Boolean},orderId:{},signal:{}},emits:["selectPayment"],setup(a,{emit:l}){const i=vt(),o=lt(),u=a,{totalPrice_lib:f,countBonus:m}=we.storeToRefs(o),p=l,_=C=>{p("selectPayment",C)},x=()=>{p("selectPayment","")};return(C,y)=>r.unref(i).providerTypes.length>1?(r.openBlock(),r.createElementBlock("div",c1,[y[2]||(y[2]=r.createElementVNode("h2",null,"Выберите способ оплаты",-1)),y[3]||(y[3]=r.createElementVNode("p",{class:"description_payment"},"Можно изменить позже до оплаты",-1)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).providerTypes,(I,B)=>(r.openBlock(),r.createElementBlock("div",{key:B},[r.createVNode(l1,{provider:I,"config-page":u.configPage,comment:u.comment,"cart-items":u.cartItems,"is-authorized":u.isAuthorized,"order-id":u.orderId,signal:u.signal,onSelect:_},null,8,["provider","config-page","comment","cart-items","is-authorized","order-id","signal"])]))),128)),r.createElementVNode("div",d1,[r.createElementVNode("p",u1,[y[0]||(y[0]=r.createTextVNode("К оплате ",-1)),r.createVNode(mt,{price:r.unref(f)-r.unref(m),fixedFloat:2},null,8,["price"]),y[1]||(y[1]=r.createTextVNode(" ₽",-1))]),r.createVNode(cn,{textButtonDefault:"Назад",onClick:x,class:"btn_payment"})])])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-f7657882"]]),h1={class:"start_page"},m1=["src"],g1={class:"wrap"},p1={class:"wrap_box"},x1={class:"title_fiscal_order"},_1={class:"wrapper_accept"},w1={ref:"barRef",class:"bar_complete","aria-hidden":"true"},C1=We(r.defineComponent({__name:"CartCompleteKioskSuccess",props:{mediaUrl:{},orderNumber:{}},setup(a){const l=lt(),i=vt(),o=Ut(),u=At(),{cartProducts_lib:f}=we.storeToRefs(l),{orderNumber:m,orderCompleted_lib:p,selectedOrderType:_}=we.storeToRefs(i),{is_startPage:x}=we.storeToRefs(o),{mediaUrl:C}=An(()=>u.itemThemes.kiosk_preloader?"preloader":null),y=Ne.useRouter(),I=Ne.useRoute();let B=null;r.onMounted(()=>{B=setTimeout(()=>{x.value=!u.itemThemes.kiosk_disable_lock_screen,_.value=null,l.isOrderTypeSubmited=!1,y.replace(`/${I.params.orgId}`)},1e4)});const T=()=>{mr(["cart","authTokensAccess","authTokensRefresh"]),f.value=[],p.value=null,_.value=null,l.isOrderTypeSubmited=!1,i.clearCard(),l.profile=null,y.replace(`/${I.params.orgId}`)};return r.onUnmounted(()=>{B&&clearInterval(B)}),(v,k)=>(r.openBlock(),r.createElementBlock("div",h1,[r.withDirectives((r.openBlock(),r.createElementBlock("video",{loop:"",autoplay:"",muted:"",playsinline:"",key:r.unref(C)},[r.createElementVNode("source",{src:r.unref(C)||"",type:"video/webm"},null,8,m1)])),[[r.unref(Cr)]]),k[4]||(k[4]=r.createElementVNode("div",{class:"start_img_black"},null,-1)),r.createElementVNode("div",g1,[r.createElementVNode("div",p1,[k[1]||(k[1]=r.createElementVNode("div",{class:"icon","aria-hidden":"true"},[r.createElementVNode("svg",{viewBox:"0 0 24 24"},[r.createElementVNode("path",{d:"M20 6L9 17l-5-5"})])],-1)),k[2]||(k[2]=r.createElementVNode("h1",null," Заказ успешно оплачен ",-1)),r.createElementVNode("p",x1,"№ "+r.toDisplayString(r.unref(m)),1),k[3]||(k[3]=r.createElementVNode("p",{class:"title_fiscal_completed"},"Спасибо! Заказ передан в работу.",-1)),r.createElementVNode("div",_1,[r.createElementVNode("button",{class:"btn","aria-label":"Новый заказ",onClick:T},[k[0]||(k[0]=r.createElementVNode("span",{class:"label"},"Новый заказ",-1)),r.createElementVNode("span",w1,null,512)])])])])]))}}),[["__scopeId","data-v-79c00acf"]]),E1={class:"fiscal_wrapper"},y1=["src"],b1={class:"fiscal_container"},A1={class:"fiscal_stage","aria-hidden":"true"},S1={class:"fiscal_printer"},I1={class:"fiscal_receipt"},N1=["src"],T1=We(r.defineComponent({__name:"CartCompleteFiscal",setup(a){const l=At(),{mediaUrl:i}=An(()=>l.itemThemes.kiosk_preloader?"preloader":null);return(o,u)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",E1,[r.withDirectives((r.openBlock(),r.createElementBlock("video",{loop:"",autoplay:"",muted:"",playsinline:"",key:r.unref(i)},[r.createElementVNode("source",{src:r.unref(i)||"",type:"video/webm"},null,8,y1)])),[[r.unref(Cr)]])]),r.createElementVNode("div",b1,[r.createElementVNode("div",A1,[r.createElementVNode("div",S1,[u[2]||(u[2]=r.createElementVNode("div",{class:"fiscal_led"},null,-1)),u[3]||(u[3]=r.createElementVNode("div",{class:"fiscal_slot"},null,-1)),r.createElementVNode("div",I1,[u[0]||(u[0]=r.createElementVNode("div",{class:"fiscal_tear"},null,-1)),r.createElementVNode("img",{class:"fiscal_logo_img",src:r.unref(l).itemThemes.logo||"",alt:"Логотип"},null,8,N1),u[1]||(u[1]=r.createStaticVNode('<div class="fiscal_line accent" data-v-3f29ae57></div><div class="fiscal_line" data-v-3f29ae57></div><div class="fiscal_line sm" data-v-3f29ae57></div><div class="fiscal_line" data-v-3f29ae57></div><div class="fiscal_line sm" data-v-3f29ae57></div><div class="fiscal_line" data-v-3f29ae57></div><div class="fiscal_line sm" data-v-3f29ae57></div>',7))])])]),u[4]||(u[4]=r.createElementVNode("h1",{class:"fiscal_title_fiscal"},"После оплаты дождитесь печати второго чека для получения заказа",-1))])],64))}}),[["__scopeId","data-v-3f29ae57"]]),k1={},R1={class:"center"};function B1(a,l){return r.openBlock(),r.createElementBlock("div",R1,[...l[0]||(l[0]=[r.createStaticVNode('<div class="stack" data-v-f0859fd1><h1 class="title_fiscal" data-v-f0859fd1>Приложите карту для оплаты</h1><p class="reminder" data-v-f0859fd1>Держите карту у терминала, пока операция не завершится.</p><div class="stageCard" aria-hidden="true" data-v-f0859fd1><div class="waves" data-v-f0859fd1><span data-v-f0859fd1></span><span data-v-f0859fd1></span><span data-v-f0859fd1></span></div><div class="nfc" data-v-f0859fd1><svg viewBox="0 0 24 24" data-v-f0859fd1><path d="M6 8c2.5 2.5 2.5 5.5 0 8" data-v-f0859fd1></path><path d="M10 6c4 4 4 8 0 12" data-v-f0859fd1></path><path d="M14 4c5.5 5.5 5.5 11 0 16" data-v-f0859fd1></path></svg></div><div class="card" data-v-f0859fd1><div class="logo" data-v-f0859fd1>inno.</div><div class="chip" data-v-f0859fd1></div><div class="digits" data-v-f0859fd1>4815 1623 4200 0900</div><div class="holder" data-v-f0859fd1>Гость</div></div></div></div>',1)])])}const O1=We(k1,[["render",B1],["__scopeId","data-v-f0859fd1"]]);/*!
|
|
6
|
+
`+f):o.stack=f}catch{}}throw o}}_request(l,i){typeof l=="string"?(i=i||{},i.url=l):i=l||{},i=Qn(this.defaults,i);const{transitional:o,paramsSerializer:u,headers:f}=i;o!==void 0&&_i.assertOptions(o,{silentJSONParsing:Nn.transitional(Nn.boolean),forcedJSONParsing:Nn.transitional(Nn.boolean),clarifyTimeoutError:Nn.transitional(Nn.boolean)},!1),u!=null&&(te.isFunction(u)?i.paramsSerializer={serialize:u}:_i.assertOptions(u,{encode:Nn.function,serialize:Nn.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),_i.assertOptions(i,{baseUrl:Nn.spelling("baseURL"),withXsrfToken:Nn.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let m=f&&te.merge(f.common,f[i.method]);f&&te.forEach(["delete","get","head","post","put","patch","common"],T=>{delete f[T]}),i.headers=Jt.concat(m,f);const p=[];let _=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(i)===!1||(_=_&&v.synchronous,p.unshift(v.fulfilled,v.rejected))});const x=[];this.interceptors.response.forEach(function(v){x.push(v.fulfilled,v.rejected)});let C,y=0,I;if(!_){const T=[Ys.bind(this),void 0];for(T.unshift(...p),T.push(...x),I=T.length,C=Promise.resolve(i);y<I;)C=C.then(T[y++],T[y++]);return C}I=p.length;let B=i;for(;y<I;){const T=p[y++],v=p[y++];try{B=T(B)}catch(k){v.call(this,k);break}}try{C=Ys.call(this,B)}catch(T){return Promise.reject(T)}for(y=0,I=x.length;y<I;)C=C.then(x[y++],x[y++]);return C}getUri(l){l=Qn(this.defaults,l);const i=Vs(l.baseURL,l.url,l.allowAbsoluteUrls);return Rs(i,l.params,l.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(l){Jn.prototype[l]=function(i,o){return this.request(Qn(o||{},{method:l,url:i,data:(o||{}).data}))}}),te.forEach(["post","put","patch"],function(l){function i(o){return function(f,m,p){return this.request(Qn(p||{},{method:l,headers:o?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}Jn.prototype[l]=i(),Jn.prototype[l+"Form"]=i(!0)});let Id=class cl{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(f){i=f});const o=this;this.promise.then(u=>{if(!o._listeners)return;let f=o._listeners.length;for(;f-- >0;)o._listeners[f](u);o._listeners=null}),this.promise.then=u=>{let f;const m=new Promise(p=>{o.subscribe(p),f=p}).then(u);return m.cancel=function(){o.unsubscribe(f)},m},l(function(f,m,p){o.reason||(o.reason=new xr(f,m,p),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const i=this._listeners.indexOf(l);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const l=new AbortController,i=o=>{l.abort(o)};return this.subscribe(i),l.signal.unsubscribe=()=>this.unsubscribe(i),l.signal}static source(){let l;return{token:new cl(function(u){l=u}),cancel:l}}};function Nd(a){return function(i){return a.apply(null,i)}}function Td(a){return te.isObject(a)&&a.isAxiosError===!0}const ao={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ao).forEach(([a,l])=>{ao[l]=a});function Js(a){const l=new Jn(a),i=gs(Jn.prototype.request,l);return te.extend(i,Jn.prototype,l,{allOwnKeys:!0}),te.extend(i,l,null,{allOwnKeys:!0}),i.create=function(u){return Js(Qn(a,u))},i}const Ye=Js(zr);Ye.Axios=Jn,Ye.CanceledError=xr,Ye.CancelToken=Id,Ye.isCancel=vs,Ye.VERSION=Ks,Ye.toFormData=hi,Ye.AxiosError=Le,Ye.Cancel=Ye.CanceledError,Ye.all=function(l){return Promise.all(l)},Ye.spread=Nd,Ye.isAxiosError=Td,Ye.mergeConfig=Qn,Ye.AxiosHeaders=Jt,Ye.formToJSON=a=>Ms(te.isHTMLForm(a)?new FormData(a):a),Ye.getAdapter=Zs.getAdapter,Ye.HttpStatusCode=ao,Ye.default=Ye;const{Axios:_p,AxiosError:wp,CanceledError:Cp,isCancel:Ep,CancelToken:yp,VERSION:bp,all:Ap,Cancel:Sp,isAxiosError:Ip,spread:Np,toFormData:Tp,AxiosHeaders:kp,HttpStatusCode:Rp,formToJSON:Bp,getAdapter:Op,mergeConfig:Mp}=Ye,Gr=we.defineStore("modulesLib",()=>{const a=r.ref(!1),l=r.ref({textNotification:""});return{is_notification_lib:a,notificationData_lib:l,showNotification:o=>{a.value=!0,l.value.textNotification=o}}}),kd=["ping","pong"],Rd=["confirmed","waiting_payment","partial_paid"],Bd=["cancelled"],Ln=we.defineStore("table-data",()=>{const a=Ne.useRoute(),l=Ne.useRouter(),i=lt(),o=Gr(),u=r.ref(1),f=r.ref(1),m=pt.useLocalStorage("appMode",null,{shallow:!0}),p=pt.useLocalStorage("tableData",null,{shallow:!0,serializer:pt.StorageSerializers.object}),_=pt.useLocalStorage("tableId",null),x=pt.useLocalStorage("orgID",null),C=r.computed({get:()=>{var L;return(L=k.value)==null?void 0:L.id},set:L=>{_.value=L}}),y=r.computed(()=>{var L;return(L=a.query.table_id)==null?void 0:L.toString()}),I=r.computed(()=>{var L;return x.value||((L=a.params.orgId)==null?void 0:L.toString())}),B=r.computed(()=>{var L;return((L=k.value)==null?void 0:L.branch.work_mode)==="table-service"}),T=r.computed(()=>{var L;return B.value&&!!((L=k.value)!=null&&L.order)});let v=null;const k=pt.computedAsync(async L=>{var K,ee,G;u.value;const F=new AbortController;if(L(()=>F.abort()),!I.value||!((K=i.config_lib)!=null&&K.area))return null;const re=y.value||_.value;if(!re)return null;try{return{...(await Ye.get(`/org_unit/${I.value}/table/${re}/`,{baseURL:`https://${i.config_lib.area}/api/`,signal:F.signal})).data,__v:u.value}}catch(W){return Ye.isCancel(W)?null:m.value==="table-tent"?p.value:re===(v==null?void 0:v.id)?v:(v=null,o.showNotification(((G=(ee=W==null?void 0:W.response)==null?void 0:ee.data)==null?void 0:G.user_friendly_message)||"Ошибка при загрузке данных стола"),null)}},null),P=pt.computedAsync(async L=>{var re;f.value;const F=new AbortController;if(L(()=>F.abort()),!B.value||!((re=k.value)!=null&&re.order))return null;try{const K=await Ye.get(`/order/${k.value.order}/`,{baseURL:`https://${i.config_lib.area}/api/`,signal:F.signal});return K.data.items=K.data.items.map(ee=>({...ee,idSystem:crypto.randomUUID()})),{...K.data,__v:f.value}}catch{return null}},null);let D=null;const M=L=>{D&&(D==null||D.close(),D=null),L&&(D=Lr(`wss://${i.config_lib.area}/ws/order/${L.id}/`),D.on("message",F=>{kd.includes(F==null?void 0:F.type)||((F==null?void 0:F.method)==="update_order_status"&&Bd.includes(F.params.status)&&o.showNotification("Ваш заказ был отменён"),H())}),D.connect())},j=()=>{u.value++},H=()=>{f.value++},Z=L=>{L&&(v=L,m.value==="table-tent"&&(p.value=L),_.value!==L.id&&(_.value=L.id))},V=(L,F)=>{var re,K;if((L==null?void 0:L.id)!==(F==null?void 0:F.id)&&M(L),L&&!Rd.includes(L.status)&&j(),!L&&F&&((re=F.table)==null?void 0:re.id)===((K=k.value)==null?void 0:K.id))return l.replace({name:"order-ts-status",params:{id:F.id}})};return r.watch(P,V,{immediate:!0}),r.watch(k,Z,{immediate:!0}),{id:C,isTableService:B,hasOrder:T,data:k,order:P,refresh:j,refreshOrder:H}});let Tn=null,Zt=null;function er(a){a&&a.close(!0)}async function lo(a,l){const i=vt(),o=lt(),u=bn.create();try{const f=await u.initPaymentLink(a,l);return i.paymentCostQR=o.totalPrice_lib-o.countBonus,i.linkQR=f.url,Zt==null||Zt.deleteCart(null,Zt==null?void 0:Zt.is_requestKiosk),f}catch(f){throw i.isButtonDisabled=!1,i.showNotification(f==null?void 0:f.response.data.user_friendly_message),f}}function Od(a,l,i){const o=At();if(a!=null&&a.params){if(a.params.status==="sent"&&o.itemThemes.kiosk_proceed_to_payment_text&&l.showNotification(o.itemThemes.kiosk_proceed_to_payment_text),a.error){l.showNotification(a.error),gn(l,null),uo(l);return}i(a,l)}}function co(a,l){const i=vt(),o=lt();return a.params.new_discounts&&(i.extraDiscount=Number(a.params.new_total_cost)-l.initialCartPrice,o.totalPrice_lib=Number(a.params.new_total_cost),l.showNotification("К заказу были добавлены скидки")),!0}const gn=(a,l)=>{a.updateOrderStatus&&a.updateOrderStatus(l)},Md=a=>{a.loadCart&&a.loadCart()},wi=a=>{a.resetBonuses&&a.resetBonuses()},Dd=a=>{a.resetDiscounts&&a.resetDiscounts()},uo=a=>{a.closeWebSocket&&a.closeWebSocket()},ea=(a,l,i,o)=>{var m;if(((m=a.params)==null?void 0:m.need_pay)===!1)return;const u=l.ws||i;bn.create().orderPay(a.params.order_id||"").then(p=>{l.setOrderNumber&&l.setOrderNumber(p.data.order_number)}).catch(p=>{(l.errorHandler||o).handleOrderPayError(p,{...l,closeWebSocket:()=>er(u)})})},fo=(a,l,i)=>{const o=a.ws||l;(a.errorHandler||i).handleOrderError({...a,closeWebSocket:()=>er(o)})},vd=(a,l,i)=>{const o=vt(),u=o.getCurrentPaymentMethodId();if(!u||!Fn.getConfig(u)||!Fn.isMethodAvailable(u,a))return null;const m=Fn.createHandler(u);if(!m)return null;const p=o.createPaymentHandler(a,l,u,i);return p?{handler:m,config:p.config}:null},Pd=a=>{if(!Zt)return;const l=Zt.context,i=Zt.is_requestKiosk,o=vd(l,i,Zt.locator);if(!o){console.warn("handleWebSocketMessageWithDynamicHandler: не удалось получить handler");return}const{handler:u,config:f}=o,m={...f,...Zt};Od(a,m,u.handleWebSocketStatus)};async function Ld(a,l,i){var x,C;const o=Ln(),{is_requestKiosk:u}=l,{comment:f,is_authorized:m,signal:p}=i;l.setButtonDisabled(!0);const _=bn.create();try{const y=await _.createOrder(a,o.id,u,f,m,p,l.locator);if((y==null?void 0:y.status)===201&&((x=y==null?void 0:y.data)!=null&&x.id)){const I=y.data.id,B={...l,signal:p};Zt=B;const v=`wss://${B.area||""}/ws/order/${I}/`;Tn=Lr(v,{signal:p});const k=()=>{console.warn("WebSocket connection opened (centralized mode)")},P=M=>{var j;console.error("WebSocket error (centralized mode):",M),er(Tn),Tn=null,Zt=null,l.setButtonDisabled(!1),(j=l.errorHandler)==null||j.handlePaymentError(M,B)},D=M=>{Pd(M)};Tn.on("open",k),Tn.on("message",D),Tn.on("error",P),Tn.connect(),Zt.ws=Tn,Zt.closeWebSocket=()=>{er(Tn),Tn=null,Zt=null}}return y}catch(y){throw Ye.isCancel(y)||((C=l.errorHandler)==null||C.handleCreateOrderError(y,l),l.setButtonDisabled(!1)),y}}const ta=a=>{var l,i;return((i=(l=a==null?void 0:a.response)==null?void 0:l.data)==null?void 0:i.user_friendly_message)||null};function Ci(){const a=vt(),l=Ln();return{handlePaymentError(i,o){var f,m,p,_,x,C;const u=ta(i);gn(o,null),Md(o),u?(o.showNotification(u),uo(o),o.is_requestKiosk&&((m=o.orderErrors)!=null&&m.includes((f=i.response)==null?void 0:f.status))&&(o.cartCleanup?o.cartCleanup.cleanupAndNavigate("retryPage",o.is_requestKiosk):o.deleteCart("retryPage",o.is_requestKiosk),o.ws.close(!0)),l.isTableService?o.resetStores():(wi(o),o.context==="qr"&&o.navigation?o.navigation.redirectToError():o.context==="qr"&&o.redirect&&(a.isButtonDisabled=!1,o.redirect(`/${((_=(p=o.route)==null?void 0:p.params)==null?void 0:_.orgId)||""}/errorPayment`)))):o.context==="qr"&&(wi(o),o.navigation?o.navigation.redirectToError():o.redirect&&o.redirect(`/${((C=(x=o.route)==null?void 0:x.params)==null?void 0:C.orgId)||""}/errorPayment`)),a.isButtonDisabled=!1},handleOrderPayError(i,o){var f,m,p,_;const u=ta(i);u&&(o.showNotification(u),uo(o),o.is_requestKiosk?((m=o.orderErrors)!=null&&m.includes((f=i.response)==null?void 0:f.status)&&(o.cartCleanup.cleanupAndNavigate("retryPage",o.is_requestKiosk),o.deleteCart("retryPage",o.is_requestKiosk)),gn(o,null)):(wi(o),o.navigation?o.navigation.redirectToError():o.redirect&&o.redirect(`/${((_=(p=o.route)==null?void 0:p.params)==null?void 0:_.orgId)||""}/errorPayment`),gn(o,null)))},handleOrderError(i){var o,u;i.is_requestKiosk?(i.cartCleanup?i.cartCleanup.cleanupAndNavigate("retryPage",i.is_requestKiosk):i.deleteCart("retryPage",i.is_requestKiosk),i.ws.close(!0)):l.isTableService?(a.isCreateButtonVisible=!0,i.showNotification("Ошибка создания заказа. Пожалуйста, попробуйте еще раз"),Dd(i)):(wi(i),i.navigation?i.navigation.redirectToError():i.redirect&&(a.isButtonDisabled=!1,i.redirect(`/${((u=(o=i.route)==null?void 0:o.params)==null?void 0:u.orgId)||""}/errorPayment`)))},handleCreateOrderError(i,o){var m,p,_,x,C,y;const{is_requestKiosk:u}=o,f=o.route.params.orgId;u?(((m=i==null?void 0:i.response)==null?void 0:m.status)===403&&((p=o.on403Kiosk)==null||p.call(o),(_=o.redirect)==null||_.call(o,`/${f}/retryPage`)),o.deleteCart("retryPage",u)):l.isTableService?o.showNotification(((C=(x=i==null?void 0:i.response)==null?void 0:x.data)==null?void 0:C.user_friendly_message)||"Ошибка создания заказа"):(y=o.redirect)==null||y.call(o,`/${f}/errorPayment`)}}}const Fd=()=>{const a=vt();let l=null;const i=Ci(),o=(u,f)=>{var p,_,x,C;const m=(p=u.params)==null?void 0:p.status;if((_=u.params)!=null&&_.number&&(a.orderNumber=(x=u.params)==null?void 0:x.number),m==="sent")co(u,f),a.isButtonDisabled=!1;else if(m==="waiting_for_fiscalization")gn(f,1);else if(m==="payment_initiation_retry"||m==="fiscalized")ea(u,f,l,i);else if(m==="payment_initiation")gn(f,2);else if(m==="paid"){gn(f,3);const y=f.ws||l;er(y),localStorage.removeItem("cart")}else(C=f.orderErrors)!=null&&C.includes(m)&&fo(f,l,i)};return{handleWebSocketStatus(u,f){o(u,f)}}};function Vd(){const a=vt();let l=null;const i=Ci(),o=(u,f)=>{var p,_,x,C;const m=(p=u.params)==null?void 0:p.status;if((_=u.params)!=null&&_.number&&(a.orderNumber=(x=u.params)==null?void 0:x.number),m==="sent")co(u,f),a.isButtonDisabled=!1;else if(m==="sent_fiscalization")gn(f,1);else if(m==="waiting_payment")gn(f,4);else if(m==="paid"){gn(f,3);const y=f.ws||l;er(y),localStorage.removeItem("cart")}else(C=f.orderErrors)!=null&&C.includes(m)&&(a.isButtonDisabled=!1,fo(f,l,i))};return{handleWebSocketStatus(u,f){o(u,f)}}}const Ud=()=>{const a=vt();let l=null;const i=Ci(),o=(u,f)=>{var p,_;const m=(p=u.params)==null?void 0:p.status;if(m==="sent")co(u,f),a.isButtonDisabled=!1;else if(m==="payment_initiation_retry"||m==="fiscalized")ea(u,f,l,i);else if(m==="payment_initiation")gn(f,2);else if(m==="paid"){gn(f,3);const x=f.ws||l;er(x),localStorage.removeItem("cart")}else(_=f.orderErrors)!=null&&_.includes(m)&&(a.isButtonDisabled=!1,fo(f,l,i))};return{handleWebSocketStatus(u,f){o(u,f)}}};class Fn{static initialize(){this.register({id:"TERMINAL_BASE",method:"TERMINAL",handlerFactory:Fd,availableContexts:["kiosk"]}),this.register({id:"YOOKASSA_BASE",method:"YOOKASSA",handlerFactory:Ud,availableContexts:["qr","tableservice"]}),this.register({id:"SBP",method:"YOOKASSA",handlerFactory:Vd,availableContexts:["kiosk"]})}static register(l){this.methods.set(l.id,l)}static getConfig(l){return this.methods.get(l)??null}static getAvailableMethods(l){return Array.from(this.methods.entries()).filter(([i,o])=>o.availableContexts.includes(l)).map(([i])=>i)}static isMethodAvailable(l,i){const o=this.getConfig(l);return o?o.availableContexts.includes(i):!1}static createHandler(l){const i=this.getConfig(l);return i?i.handlerFactory():(console.warn(`PaymentMethodRegistry: метод оплаты ${l} не зарегистрирован`),null)}}ke(Fn,"methods",new Map),Fn.initialize();function zd(a){return{cleanupAndNavigate(l,i){a.deleteCart(l,i)},cleanup(l){a.deleteCart(null,l)},clearTokens(){a.deleteCart(null,!0)},resetStores(){a.resetStores()}}}function Hd(a){var i,o;const l=((o=(i=a.route)==null?void 0:i.params)==null?void 0:o.orgId)||"";return{redirectToError(){const u=`/${l}/errorPayment`;a.redirect?a.redirect(u):a.router&&a.router.push(u)},redirectToSuccess(u){const f=u?`/${l}/${u}`:`/${l}/profile`;a.redirect?a.redirect(f):a.router&&a.router.push(f)},redirect(u){a.redirect?a.redirect(u):a.router&&a.router.push(u)},getErrorPath(){return`/${l}/errorPayment`},getSuccessPath(){return`/${l}/profile`}}}const vt=we.defineStore("cartLib",()=>{const a=Ne.useRouter(),l=Ne.useRoute(),i=At(),o=lt(),{config_lib:u,countBonus:f,totalPrice_lib:m,initialCartPrice_lib:p,is18Allowed:_}=we.storeToRefs(o),{itemThemes:x}=we.storeToRefs(i),C=r.ref(!1),y=r.ref(""),I=r.ref(null),B=r.ref("wait"),T=r.ref(!0),v=r.ref(0),k=r.ref(""),P=r.ref([]),D=r.ref([]),M=r.ref(),j=r.ref(0),H=r.ref(!1),Z=r.ref(),V=r.ref(null),L=r.ref(["failed_payment","failed_after_paid","failed","failed_after_sent","failed_after_sent_fiscalization","payment_initiation_retry","cancelled","failed_after_payment_initiation"]),F=r.ref(),re=r.computed({get:()=>P.value||[],set:ye=>{(ye==null?void 0:ye.length)===1&&(F.value=ye[0]),P.value=ye}}),K=r.ref(!1),ee=r.ref(null),G=r.ref(0),W=r.ref(!1),N=r.ref({textNotification:""}),X=ye=>{W.value=!0,N.value.textNotification=ye},$=()=>{var ye,Ke;return(ye=M.value)!=null&&ye.front_type?M.value.front_type:((Ke=D.value[0])==null?void 0:Ke.front_type)||null},q=(ye,Ke,ct,et)=>{var Be;const _t=ct??((Be=D.value[0])==null?void 0:Be.front_type);if(!_t)return console.warn("Не удалось определить метод оплаты"),null;const De=Fn.getConfig(_t);if(!De||!Fn.isMethodAvailable(_t,ye))return console.warn(`Метод ${_t} недоступен для контекста ${ye}`),null;const Ae=Fn.createHandler(_t);return Ae?(Z.value=J(De.method,ye,Ke,et),{handler:Ae,config:Z.value}):(console.warn(`Не удалось создать обработчик для метода ${_t}`),null)},J=(ye,Ke,ct,et)=>{const _t={method:ye,context:Ke,is_requestKiosk:ct,router:a,route:l,orderErrors:L.value,area:u.value.area,totalPrice:m,initialCartPrice:p,locator:et,showNotification:X,deleteCart:qe,resetStores:he,redirect:rt=>a.push(rt),updateOrderStatus:rt=>{ee.value=rt},setOrderNumber:rt=>{V.value=rt},loadCart:()=>o.loadCart(),resetBonuses:()=>{f.value=0}},De=Ci(),Ae=zd(_t),Be=Hd(_t);return{..._t,errorHandler:De,cartCleanup:Ae,navigation:Be}},le=r.computed(()=>!!I.value),ae=ye=>{B.value=ye},oe=ye=>{I.value=ye},xe=()=>{x.value.kiosk_show_loyalty_card_button&&x.value.kiosk_show_loyalty_phone_input_button?C.value=!0:!x.value.kiosk_show_loyalty_card_button&&x.value.kiosk_show_loyalty_phone_input_button?o.is_OpenLoyal=!0:C.value=!0,B.value="wait",y.value=""},_e=()=>{C.value=!1,B.value="wait",y.value=""},Pe=()=>{I.value=null,y.value="",B.value="wait",_e()},he=()=>{K.value=!1,ee.value=null},qe=(ye=null,Ke=!1)=>{o.cartProducts_lib=[],o.is_OpenLoyal=!1,mr(["cart"]),Ke&&(mr(["authTokensAccess","authTokensRefresh","user"]),o.profile=null,sessionStorage.removeItem("is_adult"),_.value=!1),ye&&a.push(`/${l.params.orgId}/${ye}`)};return{isButtonDisabled:K,orderCompleted_lib:ee,extraDiscount:v,orderNumber:V,is_notification_lib:W,notificationData_lib:N,count:G,guestInfo:I,error:y,isDrawerOpen:C,currentState:B,isAuthorized:le,isCreateButtonVisible:T,linkQR:k,orderTypes:re,providerTypes:D,is_paymentCart:H,selectedOrderType:F,selectedProvider:M,configPayment:Z,paymentCostQR:j,deleteCart:qe,setGuestInfo:oe,setState:ae,openDrawer:xe,closeDrawer:_e,clearCard:Pe,showNotification:X,createPaymentHandler:q,getCurrentPaymentMethodId:$,getAvailablePaymentMethods:ye=>Fn.getAvailableMethods(ye)}}),Ut=we.defineStore("cardLib",()=>{var ee;const a=()=>({openCard:null,currentModifier:null,groupModifiers:[],groupModifiersSelected:[],groupCurrentOpen:null,isModifiedAmount:!1,selectedSize:{},productSizes:[],addedProducts:[],plusButtonsRefs:[],modalCount:1,isSectionModifier:!1,isAnimationFly:!0,textErrorRequaired:"",prevLast:{}}),l=At(),i=r.ref(a()),o=()=>i.value=a(),u=r.ref(!1),f=r.ref(!1),m=r.ref(!1),p=r.ref(),_=r.ref([]),x=r.ref({id:null,visible:!1}),C=r.ref(!((ee=l.itemThemes)!=null&&ee.kiosk_disable_lock_screen)),y=r.computed(()=>{const G=i.value.groupModifiersSelected.findIndex(W=>W.group===i.value.groupCurrentOpen.id);return I(G)}),I=G=>G===-1?0:(i.value.groupModifiersSelected[G].modifiers||[]).reduce((N,X)=>N+(X.amount||0),0),B=r.computed(()=>{var W;const G=(W=i.value.openCard)==null?void 0:W.group_modifiers.findIndex(N=>N.id===i.value.groupCurrentOpen.id);return G===-1||!i.value.openCard?0:i.value.openCard.modifiers.length>0&&G===0?i.value.openCard.modifiers.reduce((N,X)=>N+X.max_amount,0):i.value.groupModifiers[G].max_amount}),T=r.computed(()=>{var W;const G=(i.value.addedProducts??[]).reduce((N,X)=>N+X.price,0);if(i.value.openCard){const N=i.value.openCard,X=hr(N)||0,$=N.amount||1;return(i.value.groupModifiersSelected.reduce((J,le)=>(le.modifiers.forEach(ae=>{var oe,xe;ae.sizes&&(ae.price=((xe=(oe=ae.sizes)==null?void 0:oe.find(_e=>_e.id===i.value.selectedSize.id))==null?void 0:xe.price)??ae.price),J+=ae.price*ae.amount}),J),0)+X)*$+G}return(W=i.value.addedProducts)!=null&&W.length?G:0}),v=r.computed(()=>{const G=i.value.groupCurrentOpen;if(!G)return!1;const W=i.value.groupModifiers,N=W.findIndex(X=>X.id===G.id);return N===-1?!1:N===W.length-1}),k=G=>{const W=i.value.groupModifiers[G],N=i.value.groupModifiersSelected[G];if(!W)return{valid:!1};if(W.min_amount>0&&I(G)<W.min_amount)return{valid:!1,errorText:`В группе "${W.name}" должно содержаться не меньше ${W.min_amount} модификатора(ов)`};if(N){for(const X of W.group_modifiers)if(X.min_amount>0){const $=N.modifiers.find(q=>q.id===X.id);if(!$||$.amount<X.min_amount)return{valid:!1,errorText:`В группе "${W.name}" выберите все обязательные модификаторы`}}}return{valid:!0}},P=r.computed(()=>{const G=i.value.groupModifiers;for(let W=0;W<G.length;W++){const N=k(W);if(!N.valid)return i.value.textErrorRequaired=N.errorText,{haveRequaire:!0,group:G[W]}}return{haveRequaire:!1,group:G[0]}}),D=()=>{i.value.groupModifiers.forEach((G,W)=>{i.value.groupCurrentOpen={...G,index:W},G.group_modifiers.forEach(N=>{N.default_amount>0&&(N.amount=N.default_amount,re(N,!0))})})},M=G=>{i.value.addedProducts.push(G)},j=G=>{i.value.openCard=G},H=G=>{_.value=[...G]},Z=(G,W,N)=>{var $;const X=i.value.groupModifiers.findIndex(q=>q.id===G.id);if(X!==-1)if(N){const q=i.value.groupModifiers,J=X+1;if(J<q.length){const le=q[J];i.value.groupCurrentOpen={...le,index:J},i.value.isSectionModifier=!0}}else{const q=G.id!==(($=i.value.groupCurrentOpen)==null?void 0:$.id);i.value.groupCurrentOpen={...G,index:X},i.value.isSectionModifier=q?!0:!i.value.isSectionModifier}},V=()=>{i.value.modalCount>i.value.currentModifier.min_amount&&i.value.modalCount>=2&&(i.value.modalCount-=1)},L=()=>{i.value.groupCurrentOpen&&i.value.modalCount+y.value<B.value&&(i.value.currentModifier.max_amount===0||i.value.currentModifier.max_amount>i.value.modalCount)&&(i.value.modalCount+=1)},F=(G,W)=>{var X;const N=(X=i.value.groupCurrentOpen)==null?void 0:X.id.toUpperCase();if(!G&&!i.value.isModifiedAmount&&W.max_amount!==1){if(N==="Добавки2000"&&W.max_amount>1)return!0;if(Math.abs(B.value-y.value)>1&&N!=="Добавки2000")return!0}return!1},re=(G,W=!1)=>{i.value.modalCount=1,i.value.currentModifier=G;const N=i.value.groupModifiersSelected.findIndex(X=>X.group===i.value.groupCurrentOpen.id);K(N,G,W)},K=(G,W,N)=>{var $,q,J;let X=i.value.groupModifiersSelected;if(G===-1)F(N,W)?i.value.isModifiedAmount=!0:X[i.value.groupCurrentOpen.index]={group:i.value.groupCurrentOpen.id,is_fake:(($=i.value.groupCurrentOpen)==null?void 0:$.is_fake)||!1,is_product_determining:((q=i.value.groupCurrentOpen)==null?void 0:q.is_product_determining)||!1,modifier_count:((J=i.value.currentModifier)==null?void 0:J.amount)||0,modifiers:[{...W,amount:(W==null?void 0:W.amount)??1}]};else{const le=i.value.groupModifiers[G].group_modifiers.findIndex(oe=>oe.id===W.id);if(X[G].modifiers.findIndex(oe=>oe.id===W.id)===-1){if(B.value===1)X[G].modifiers=[];else if(y.value>=B.value)return;F(N,W)?i.value.isModifiedAmount=!0:(X[G].modifiers.push({...W,amount:(W==null?void 0:W.amount)??1}),X[G].modifier_count=X[G].modifiers.reduce((oe,xe)=>oe+=xe.amount,0),i.value.isAnimationFly=!0)}else X[G].modifiers=X[G].modifiers.filter(oe=>oe.id!==W.id),X[G].modifier_count=X[G].modifiers.reduce((oe,xe)=>oe+=xe.amount,0),i.value.groupModifiers[G].group_modifiers[le].amount=1,i.value.groupModifiers[G].group_modifiers[le].default_amount=0,i.value.isAnimationFly=!1}i.value.groupModifiersSelected=X};return{stateCard:i,totalPrice_libCard:T,recountGroupTotalAmount:y,groupTotalAmount:B,isOpenWindow:u,isUpSale:f,checkedRequiredBtn:P,dataUpSale:p,productCards:_,isAddToCard:m,openProduct:x,is_startPage:C,isLastGroup:v,setProduct:H,summModifierAmount:I,setAddedProducts:M,setCurrentCard:j,minusAmount:V,plusAmount:L,toggleNotRequire:Z,modifierSelect:re,defaultAmountModifiers:D,validateGroup:k,reset:o}});var _r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ra={exports:{}};(function(a,l){(function(i,o){a.exports=o()})(_r,function(){var i=1e3,o=6e4,u=36e5,f="millisecond",m="second",p="minute",_="hour",x="day",C="week",y="month",I="quarter",B="year",T="date",v="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var N=["th","st","nd","rd"],X=W%100;return"["+W+(N[(X-20)%10]||N[X]||N[0])+"]"}},M=function(W,N,X){var $=String(W);return!$||$.length>=N?W:""+Array(N+1-$.length).join(X)+W},j={s:M,z:function(W){var N=-W.utcOffset(),X=Math.abs(N),$=Math.floor(X/60),q=X%60;return(N<=0?"+":"-")+M($,2,"0")+":"+M(q,2,"0")},m:function W(N,X){if(N.date()<X.date())return-W(X,N);var $=12*(X.year()-N.year())+(X.month()-N.month()),q=N.clone().add($,y),J=X-q<0,le=N.clone().add($+(J?-1:1),y);return+(-($+(X-q)/(J?q-le:le-q))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:y,y:B,w:C,d:x,D:T,h:_,m:p,s:m,ms:f,Q:I}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},H="en",Z={};Z[H]=D;var V="$isDayjsObject",L=function(W){return W instanceof ee||!(!W||!W[V])},F=function W(N,X,$){var q;if(!N)return H;if(typeof N=="string"){var J=N.toLowerCase();Z[J]&&(q=J),X&&(Z[J]=X,q=J);var le=N.split("-");if(!q&&le.length>1)return W(le[0])}else{var ae=N.name;Z[ae]=N,q=ae}return!$&&q&&(H=q),q||!$&&H},re=function(W,N){if(L(W))return W.clone();var X=typeof N=="object"?N:{};return X.date=W,X.args=arguments,new ee(X)},K=j;K.l=F,K.i=L,K.w=function(W,N){return re(W,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var ee=function(){function W(X){this.$L=F(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[V]=!0}var N=W.prototype;return N.parse=function(X){this.$d=function($){var q=$.date,J=$.utc;if(q===null)return new Date(NaN);if(K.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var le=q.match(k);if(le){var ae=le[2]-1||0,oe=(le[7]||"0").substring(0,3);return J?new Date(Date.UTC(le[1],ae,le[3]||1,le[4]||0,le[5]||0,le[6]||0,oe)):new Date(le[1],ae,le[3]||1,le[4]||0,le[5]||0,le[6]||0,oe)}}return new Date(q)}(X),this.init()},N.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},N.$utils=function(){return K},N.isValid=function(){return this.$d.toString()!==v},N.isSame=function(X,$){var q=re(X);return this.startOf($)<=q&&q<=this.endOf($)},N.isAfter=function(X,$){return re(X)<this.startOf($)},N.isBefore=function(X,$){return this.endOf($)<re(X)},N.$g=function(X,$,q){return K.u(X)?this[$]:this.set(q,X)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(X,$){var q=this,J=!!K.u($)||$,le=K.p(X),ae=function(Ke,ct){var et=K.w(q.$u?Date.UTC(q.$y,ct,Ke):new Date(q.$y,ct,Ke),q);return J?et:et.endOf(x)},oe=function(Ke,ct){return K.w(q.toDate()[Ke].apply(q.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(ct)),q)},xe=this.$W,_e=this.$M,Pe=this.$D,he="set"+(this.$u?"UTC":"");switch(le){case B:return J?ae(1,0):ae(31,11);case y:return J?ae(1,_e):ae(0,_e+1);case C:var qe=this.$locale().weekStart||0,ye=(xe<qe?xe+7:xe)-qe;return ae(J?Pe-ye:Pe+(6-ye),_e);case x:case T:return oe(he+"Hours",0);case _:return oe(he+"Minutes",1);case p:return oe(he+"Seconds",2);case m:return oe(he+"Milliseconds",3);default:return this.clone()}},N.endOf=function(X){return this.startOf(X,!1)},N.$set=function(X,$){var q,J=K.p(X),le="set"+(this.$u?"UTC":""),ae=(q={},q[x]=le+"Date",q[T]=le+"Date",q[y]=le+"Month",q[B]=le+"FullYear",q[_]=le+"Hours",q[p]=le+"Minutes",q[m]=le+"Seconds",q[f]=le+"Milliseconds",q)[J],oe=J===x?this.$D+($-this.$W):$;if(J===y||J===B){var xe=this.clone().set(T,1);xe.$d[ae](oe),xe.init(),this.$d=xe.set(T,Math.min(this.$D,xe.daysInMonth())).$d}else ae&&this.$d[ae](oe);return this.init(),this},N.set=function(X,$){return this.clone().$set(X,$)},N.get=function(X){return this[K.p(X)]()},N.add=function(X,$){var q,J=this;X=Number(X);var le=K.p($),ae=function(_e){var Pe=re(J);return K.w(Pe.date(Pe.date()+Math.round(_e*X)),J)};if(le===y)return this.set(y,this.$M+X);if(le===B)return this.set(B,this.$y+X);if(le===x)return ae(1);if(le===C)return ae(7);var oe=(q={},q[p]=o,q[_]=u,q[m]=i,q)[le]||1,xe=this.$d.getTime()+X*oe;return K.w(xe,this)},N.subtract=function(X,$){return this.add(-1*X,$)},N.format=function(X){var $=this,q=this.$locale();if(!this.isValid())return q.invalidDate||v;var J=X||"YYYY-MM-DDTHH:mm:ssZ",le=K.z(this),ae=this.$H,oe=this.$m,xe=this.$M,_e=q.weekdays,Pe=q.months,he=q.meridiem,qe=function(ct,et,_t,De){return ct&&(ct[et]||ct($,J))||_t[et].slice(0,De)},ye=function(ct){return K.s(ae%12||12,ct,"0")},Ke=he||function(ct,et,_t){var De=ct<12?"AM":"PM";return _t?De.toLowerCase():De};return J.replace(P,function(ct,et){return et||function(_t){switch(_t){case"YY":return String($.$y).slice(-2);case"YYYY":return K.s($.$y,4,"0");case"M":return xe+1;case"MM":return K.s(xe+1,2,"0");case"MMM":return qe(q.monthsShort,xe,Pe,3);case"MMMM":return qe(Pe,xe);case"D":return $.$D;case"DD":return K.s($.$D,2,"0");case"d":return String($.$W);case"dd":return qe(q.weekdaysMin,$.$W,_e,2);case"ddd":return qe(q.weekdaysShort,$.$W,_e,3);case"dddd":return _e[$.$W];case"H":return String(ae);case"HH":return K.s(ae,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return Ke(ae,oe,!0);case"A":return Ke(ae,oe,!1);case"m":return String(oe);case"mm":return K.s(oe,2,"0");case"s":return String($.$s);case"ss":return K.s($.$s,2,"0");case"SSS":return K.s($.$ms,3,"0");case"Z":return le}return null}(ct)||le.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(X,$,q){var J,le=this,ae=K.p($),oe=re(X),xe=(oe.utcOffset()-this.utcOffset())*o,_e=this-oe,Pe=function(){return K.m(le,oe)};switch(ae){case B:J=Pe()/12;break;case y:J=Pe();break;case I:J=Pe()/3;break;case C:J=(_e-xe)/6048e5;break;case x:J=(_e-xe)/864e5;break;case _:J=_e/u;break;case p:J=_e/o;break;case m:J=_e/i;break;default:J=_e}return q?J:K.a(J)},N.daysInMonth=function(){return this.endOf(y).$D},N.$locale=function(){return Z[this.$L]},N.locale=function(X,$){if(!X)return this.$L;var q=this.clone(),J=F(X,$,!0);return J&&(q.$L=J),q},N.clone=function(){return K.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},W}(),G=ee.prototype;return re.prototype=G,[["$ms",f],["$s",m],["$m",p],["$H",_],["$W",x],["$M",y],["$y",B],["$D",T]].forEach(function(W){G[W[1]]=function(N){return this.$g(N,W[0],W[1])}}),re.extend=function(W,N){return W.$i||(W(N,ee,re),W.$i=!0),re},re.locale=F,re.isDayjs=L,re.unix=function(W){return re(1e3*W)},re.en=Z[H],re.Ls=Z,re.p={},re})})(ra);var Gd=ra.exports;const ia=na(Gd),Wd=a=>{const l=Ne.useRouter(),i=`${a.domain}/api/`,o=Ye.create({baseURL:i}),u=Ye.create({baseURL:i}),f=Ye.create({baseURL:i}),m=Ye.create({baseURL:i}),p=Ye.create({baseURL:i}),_=Ye.create({baseURL:i}),x=Ye.create({baseURL:i}),C=D=>{try{const M=JSON.parse(localStorage.getItem("authTokensAccess")||"");M.length>0&&(D.headers.Authorization=`Bearer ${M}`)}catch{console.warn("accessToken is undefined [useAxios]")}return D},y=D=>{const M=localStorage.getItem("apiKey");return D.headers={"Content-Type":"application/json","x-api-key":M},D},I=async D=>{if(!a.user)return D;const M=a.user.exp??0;if(!(ia.unix(M).diff(ia())<3e3))return D;const H=ms("authTokensRefresh",null,"string");try{const Z=await Ye.post(`${i}user/token/refresh/`,{refresh:H.value});if(!Z.data.access)return P(),D;localStorage.setItem("authTokensAccess",JSON.stringify(Z.data.access)),v(Z.data),k(hs(Z.data.access)),D.headers={...D.headers,Authorization:`Bearer ${Z.data.access}`}}catch(Z){console.error("Failed to refresh token:",Z),P()}return D},B=D=>{D.interceptors.request.use(M=>I(C(M)),M=>Promise.reject(M))};B(f),B(p),B(x);const T=D=>{D.interceptors.request.use(M=>y(M))};T(_),T(u),T(x);const v=(D,M=!1)=>{localStorage.setItem("authTokensAccess",JSON.stringify(D.access)),M&&localStorage.setItem("authTokensRefresh",JSON.stringify(D.refresh))},k=D=>{a.user=D,localStorage.setItem("user",JSON.stringify(D))},P=()=>{a.user=null,mr(["authTokensAccess","authTokensRefresh","user","cart","bonus"]),sessionStorage.removeItem("is_adult"),l.replace({name:"home"}).then(()=>window.location.reload())};return{axiosInstanceAuthenticationGet:f,axiosInstanceAuthenticationPost:p,axiosInstanceAuthenticationPostApiKey:x,axiosInstancePost:m,axiosInstanceGet:o,axiosInstanceGetApiKey:u,axiosInstancePostApiKey:_}},oa=(a="themeConfig")=>{try{const l=localStorage.getItem(a);return l?JSON.parse(l):null}catch{return null}},He=class He{constructor(){ke(this,"axiosInstanceGet");ke(this,"axiosInstancePost");ke(this,"axiosInstanceAuthenticationGet");ke(this,"axiosInstanceAuthenticationPost");ke(this,"axiosInstanceGetApiKey");ke(this,"axiosInstancePostApiKey");ke(this,"axiosInstanceAuthenticationPostApiKey");ke(this,"currentUpsaleController",null);ke(this,"controller",new AbortController);this.axiosInstanceGet=He._axiosGet,this.axiosInstancePost=He._axiosPost,this.axiosInstanceGetApiKey=He._axiosPostApiKey,this.axiosInstancePostApiKey=He._axiosPostApiKey,this.axiosInstanceAuthenticationPostApiKey=He._axiosAuthPostApiKey,this.axiosInstanceAuthenticationGet=He._axiosAuthGet,this.axiosInstanceAuthenticationPost=He._axiosAuthPost}static create(l){return l&&!He._config&&He._initialize(l),He._config||console.warn("InitConnection не инициализирован"),new He}static _initialize(l,i=null){const o=lt(),u=Ut(),{config_lib:f}=we.storeToRefs(o),{stateCard:m,recountGroupTotalAmount:p}=we.storeToRefs(u);He._config=l,He._cardStore=u,He._stateCard=m,He._recountGroupTotalAmount=p,f.value=l;const _=Wd(l);He._axiosPostApiKey=_.axiosInstanceGetApiKey,He._axiosPostApiKey=_.axiosInstancePostApiKey,He._axiosAuthPostApiKey=_.axiosInstanceAuthenticationPostApiKey,He._axiosGet=_.axiosInstanceGet,He._axiosPost=_.axiosInstancePost,He._axiosAuthGet=_.axiosInstanceAuthenticationGet,He._axiosAuthPost=_.axiosInstanceAuthenticationPost}get config(){return He._config}get cardStore(){return He._cardStore}get stateCard(){return He._stateCard}get recountGroupTotalAmount(){return He._recountGroupTotalAmount}async updateTheme(){var f,m;const l=oa(),i=At();if(l!==null){i.updateColor(l);return}const o=lt(),u=await((m=this.axiosInstanceGet)==null?void 0:m.get(`org/organizations/${(f=this.config)==null?void 0:f.orgId}/design/`));o.setStateDrum(u==null?void 0:u.data.hide_barban),o.setKioskTimeout(u==null?void 0:u.data.kiosk_timeout),localStorage.setItem("themeConfig",JSON.stringify(u.data)),i.updateColor(u.data)}async getGroupByID(l){var i,o;try{const u=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(i=this.config)==null?void 0:i.pointId}/group/${l}`));return u==null?void 0:u.data}catch(u){throw console.error("Ошибка в request.ts[getGroupByID]",u),u}}async loadGroupProducts(l){var i,o;try{const u=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(i=this.config)==null?void 0:i.pointId}/products/?group=${l}`)),f=(u==null?void 0:u.data)||[];for(const m of f)m&&await kl(m);return await this.cacheImagesInBackground(f),f}catch(u){return console.error("Ошибка загрузки группы:",u),[]}}async getGroup(){var l,i;try{const o=await((i=this.axiosInstanceGet)==null?void 0:i.get(`${(l=this.config)==null?void 0:l.pointId}/groups/`));return o==null?void 0:o.data}catch(o){return console.error("Error fetching products:",o),[]}}async fetchAndCacheAllPages(){var l,i;try{const o=((l=this.config)==null?void 0:l.pointId)||"",u=await qi(o);if(u)return u.data;const f=await((i=this.axiosInstanceGet)==null?void 0:i.get(`${o}/group/`)),m=(f==null?void 0:f.data)||[],p=[];for(const _ of m){_.products=_.products||[],await Dr(_.id,_),p.push(_);const x=await this.loadGroupProducts(_.id);_.products=x}return await this.cacheImagesInBackground(m),await Dr(o,m),p}catch(o){return console.error("fetchAndCacheAllPages error:",o),[]}}cacheImagesInBackground(l){l.forEach(i=>{var o;i.video_link&&this.loadAndCacheMedia(i.video_link,i.id+"_video"),i.image_link&&this.loadAndCacheMedia(i.image_link,i.id+"_image"),(o=i.products)==null||o.forEach(u=>{u.video_link&&this.loadAndCacheMedia(u.video_link,u.id+"_video"),u.image_link&&this.loadAndCacheMedia(u.image_link,u.id+"_image")})})}async loadAndCacheMedia(l,i){const o=await fr(i);if(o){this.dispatchImageCachedEvent(i,o);return}try{const u=await fetch(l);if(!u.ok)throw new Error("Network error");const f=await u.blob();if(f.size===0)throw new Error("Empty blob");await Zi(i,f),this.dispatchImageCachedEvent(i,f)}catch(u){console.warn(`[ImageCache] Failed for ${i}:`,u)}}dispatchImageCachedEvent(l,i){window.dispatchEvent(new CustomEvent("image-cached",{detail:{id:l,blob:i}}))}async getProduct(l=null){var i,o;if(!l)return[];try{const u=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(i=this.config)==null?void 0:i.pointId}/products/${l}`));return u==null?void 0:u.data}catch(u){return console.error("Error fetching cardProducts:",u),[]}}async getSingleProduct(l){var u;const i=lt(),{config_lib:o}=we.storeToRefs(i);try{let f=await is(l);if(f)this._fullCardProduct(f);else{const m=await((u=this.axiosInstanceGet)==null?void 0:u.get(`${o.value.pointId}/products/${l}`));(m==null?void 0:m.status)===200&&this._fullCardProduct(m.data)}}catch(f){throw console.warn("store card[getFetchProducts]:",f),f}}_fullCardProduct(l){const i=Ut();i.stateCard.openCard={...l,amount:1},i.stateCard.groupModifiers=l.group_modifiers,l.modifiers.length>0&&i.stateCard.groupModifiers.unshift({default_amount:0,description:"",group_modifiers:l.modifiers,id:"Добавки2000",image_link:null,max_amount:1,min_amount:l.modifiers.reduce((o,u)=>o+=u.min_amount,0),name:"Добавки",required:!1}),i.stateCard.groupModifiersSelected=new Array(i.stateCard.groupModifiers.length).fill({group:"",modifiers:[],is_fake:!1,is_product_determining:!1,modifier_count:0}),i.stateCard.productSizes=l.sizes,i.defaultAmountModifiers(),l.show_recommendations&&this.productUpsale(l.id)}async getTheme(){try{this.updateTheme()}catch(l){return console.error("Error fetching products:",l),[]}}async authorizeByCard(l){var i,o;try{const u=await((o=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:o.post(`${(i=this.config)==null?void 0:i.domain}/api/user/validate-card/`,{card_number:l}));return localStorage.setItem("authTokensAccess",JSON.stringify(u==null?void 0:u.data.access)),localStorage.setItem("authTokensRefresh",JSON.stringify(u==null?void 0:u.data.refresh)),u==null?void 0:u.data}catch(u){throw console.error("Ошибка авторизации:",u),u}}async getLoyalSmsCode(l){var i,o;try{const u=await((o=this.axiosInstancePostApiKey)==null?void 0:o.post(`${(i=this.config)==null?void 0:i.domain}/api/device/auth/request-otp/`,{phone:l}));return u==null?void 0:u.data}catch(u){throw console.error("Ошибка получения sms-code:",u),u}}async sendSmsCodeForAuth(l,i){var o,u;try{const f=await((u=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:u.post(`${(o=this.config)==null?void 0:o.domain}/api/device/auth/`,{code:l,phone:i}));return f==null?void 0:f.data}catch(f){throw console.error("Ошибка отправки sms-code:",f),f}}async callStaff(l,i,o){var u,f,m,p;try{const _=await((m=this.axiosInstancePost)==null?void 0:m.post(`${(u=this.config)==null?void 0:u.domain}/api/org_unit/${(f=this.config)==null?void 0:f.pointId}/table/${l}/call-staff/`,{...i},o));return(p=_==null?void 0:_.data)==null?void 0:p.response_text}catch(_){throw console.error("Ошибка[callStaff]",_),_}}async confirmOrder(l){var o,u;const i=await((u=this.axiosInstancePost)==null?void 0:u.post(`/org_unit/${(o=this.config)==null?void 0:o.pointId}/confirm-order/`,{order:l}));return(i==null?void 0:i.status)===200}async createOrder(l,i,o=!0,u,f=!1,m,p){var v,k,P,D,M;const _=vt(),x=f?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,C=o?x:this.axiosInstanceAuthenticationPost,y=o?"/device/order/create":"/order/create",I=o?(v=this.config)==null?void 0:v.pointId:(k=this.config)==null?void 0:k.pointId,B={items:l,comment:u,locator:p||void 0};return i&&(B.table=i),o&&((P=_.selectedOrderType)!=null&&P.id)&&(B.order_type_id=(D=_.selectedOrderType)==null?void 0:D.id),await(C==null?void 0:C.post(`${(M=this.config)==null?void 0:M.domain}/api/org_unit/${I}${y}`,B,{signal:m}))}async extendOrder(l){var m,p;const i=Ln();if(!i.id)throw Error("Неверный стол");if(!((m=i.data)!=null&&m.order))throw Error("Заказ не найден");const o=this.axiosInstanceAuthenticationPost,u={items:l,table:i.id},f=await(o==null?void 0:o.post(`/org_unit/${(p=this.config)==null?void 0:p.pointId}/order/${i.data.order}/extend`,u));return f==null?void 0:f.data}async initPaymentLink(l,i){var _,x,C;const o=this.axiosInstanceAuthenticationPost,u=lt(),f=Ln(),m={order:l,provider_type:i};u.countBonus>0&&(m.by_bonuses=u.countBonus),f.isTableService&&((_=f.order)==null?void 0:_.remaining_amount)!==((x=f.order)==null?void 0:x.total_cost)&&(m.amount=(C=f.order)==null?void 0:C.remaining_amount),m.by_bonuses&&m.amount&&(m.amount=+(+m.amount-+m.by_bonuses).toFixed(2));const p=await(o==null?void 0:o.post("payment/init",m));return p==null?void 0:p.data}async orderPay(l){var i;return(i=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:i.post(`order/${l}/pay/`,{order_id:l})}async getProfile(){var i,o;const l=await((o=this.axiosInstanceAuthenticationGet)==null?void 0:o.get(`user/current?organization=${(i=this.config)==null?void 0:i.orgId}`));if((l==null?void 0:l.status)===200){const u=lt();return u.profile=l.data,u.is18Allowed=sessionStorage.getItem("is_adult")==="true",l.data}else return l}async joinLoyalty(){var i;const l=await((i=this.axiosInstanceAuthenticationGet)==null?void 0:i.post("user/join-loyalty/"));return{success:(l==null?void 0:l.status)===200}}async isPhoneExist(l,i={}){var o,u;try{const f=await((u=this.axiosInstanceGet)==null?void 0:u.get("user/check-phone",{...i,params:{organization:(o=this.config)==null?void 0:o.orgId,phone:l}}));return(f==null?void 0:f.status)===200}catch{return!1}}async sendOTP(l,i={}){var u,f;const o=await((f=this.axiosInstancePost)==null?void 0:f.post("user/check-phone",{organization:(u=this.config)==null?void 0:u.orgId,phone:l},i));return o==null?void 0:o.data}async auth(l,i={}){var u,f;return await((f=this.axiosInstancePost)==null?void 0:f.post("user/auth",{organization:(u=this.config)==null?void 0:u.orgId,...l},i))}async signup(l,i={}){var u,f;return await((f=this.axiosInstancePost)==null?void 0:f.post("user/register",{organization:(u=this.config)==null?void 0:u.orgId,...l},i))}async calculateDiscount(l,i=!0,o=!1,u){var C,y;const f=o?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,m=o?this.axiosInstanceAuthenticationPost:this.axiosInstancePost,p=i?f:m,_=i?(C=this.config)==null?void 0:C.pointId:(y=this.config)==null?void 0:y.pointId,x=await(p==null?void 0:p.post(`/org_unit/${_}/cart/calculate-discount/`,l,{signal:u}));return(x==null?void 0:x.status)===200?x.data:x}async maxPayByBonuses(l,i=!0,o=!1,u){const f=lt(),m=o?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,p=o?this.axiosInstanceAuthenticationPost:this.axiosInstancePost,_=i?m:p,x=await(_==null?void 0:_.post("/cart/max-pay-by-bonuses/",{order_id:l},{signal:u})),C=x==null?void 0:x.data;return f.profile&&C&&"balance"in C&&(f.profile.balance=C.balance),C}async getDeviceInfo(){var o;const l=vt(),i=await((o=this.axiosInstanceGetApiKey)==null?void 0:o.get("/device/current/"));return(i==null?void 0:i.status)===200?(l.orderTypes=i.data.order_types,l.providerTypes=i.data.payment_provider_type,i.data):i}async validateApiKey(l,i){var u,f;const o=await((f=this.axiosInstancePost)==null?void 0:f.post(`/device/org_unit/${(u=this.config)==null?void 0:u.pointId}/validate-api-key/`,{api_key:l},i));return(o==null?void 0:o.status)===200}async productUpsale(l){var f,m,p;const i=Ut(),{dataUpSale:o}=we.storeToRefs(i);(f=this.currentUpsaleController)==null||f.abort();const u=new AbortController;this.currentUpsaleController=u;try{const _=await((p=this.axiosInstanceGet)==null?void 0:p.get(`/${(m=this.config)==null?void 0:m.pointId}/products/${l}/recommendation/`,{signal:u.signal}));u.signal.aborted||(o.value=_==null?void 0:_.data)}catch(_){if(_.name==="AbortError"||_.name==="CanceledError"){console.warn("Upsale отменён — пришёл новый запрос");return}throw console.error("Ошибка upsale:",_),_}finally{this.currentUpsaleController===u&&(this.currentUpsaleController=null)}}};ke(He,"_config",null),ke(He,"_axiosGet"),ke(He,"_axiosGetApiKey"),ke(He,"_axiosPostApiKey"),ke(He,"_axiosAuthPostApiKey"),ke(He,"_axiosPost"),ke(He,"_axiosAuthGet"),ke(He,"_axiosAuthPost"),ke(He,"_cardStore",null),ke(He,"_stateCard",null),ke(He,"_recountGroupTotalAmount",null);let bn=He;const sa=r.ref(!1),zn=()=>{const{width:a}=pt.useWindowSize(),l=r.computed(()=>sa.value),i=r.computed(()=>l.value&&a.value>1024);return{isDesktop:l,shouldUseDragScroll:i,syncWithRoute:u=>{var f;sa.value=((f=u.query)==null?void 0:f.mode)==="pdf"}}},Xd=r.defineComponent({__name:"UseScrollCenter",props:{axis:{},behavior:{},autoScroll:{type:Boolean},container:{},idActive:{},clearContainer:{type:Boolean}},setup(a,{expose:l}){const i=a,o=lt(),u=r.ref(null),{isDesktop:f}=zn(),m=async _=>{if(!u.value||!_)return;let x=window;i.container&&(x=typeof i.container=="string"?document.querySelector(i.container)||window:i.container);const C={behavior:i.behavior};if(i.axis==="x"){const y=x===window?window.innerWidth:x.clientWidth,I=_.offsetWidth;let B=_.offsetLeft;if(x!==window){const T=x.getBoundingClientRect();B=_.getBoundingClientRect().left-T.left+x.scrollLeft}B-=(y-I)/2,C.left=Math.max(0,B)}else{const y=x===window?window.innerHeight:x.clientHeight,I=_.offsetHeight;let B=_.offsetTop;if(x!==window){const T=x.getBoundingClientRect();B=_.getBoundingClientRect().top-T.top+x.scrollTop}B-=(y-I)/2,C.top=Math.max(0,B)}try{x===window?window.scrollTo(C):x.scrollTo(C)}catch(y){console.error("Scroll error:",y)}};r.onMounted(async()=>{if(i.autoScroll){let _=null;if(await r.nextTick(),o.activeScrolling_lib){const x=o.activeScrolling_lib.findIndex(C=>C.id===i.idActive);i.idActive?(_=document.getElementById(`scrolling${i.idActive}`),_&&x!==-1&&(o.activeScrolling_lib[x]=_)):o.activeScrolling_lib[x]&&(_=o.activeScrolling_lib[x]),m(_)}}});const p=async _=>{i.clearContainer&&(o.activeScrolling_lib=[]);const x=_.currentTarget;await r.nextTick(),o.activeScrolling_lib.includes(x)||o.activeScrolling_lib.push(x),m(x)};return l({scrollToElement:m}),(_,x)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"wrapperRef",ref:u,class:r.normalizeClass(["scroll-to-wrapper",{scroll_pdf:r.unref(f)}])},[r.renderSlot(_.$slots,"default",{handleTargetClick:p},void 0,!0)],2))}}),We=(a,l)=>{const i=a.__vccOpts||a;for(const[o,u]of l)i[o]=u;return i},ho=We(Xd,[["__scopeId","data-v-e47a167d"]]),Wr={mounted(a){let l=!1,i,o,u,f,m,p=0,_=0,x=0,C=0,y=0,I=!1;const B=5;a.style.cursor="grab";const T=P=>{P.button===0&&(m&&(cancelAnimationFrame(m),m=0),l=!0,I=!1,i=P.pageX-a.offsetLeft,o=P.pageY-a.offsetTop,u=a.scrollLeft,f=a.scrollTop,x=P.pageX,C=P.pageY,y=Date.now(),p=0,_=0)},v=P=>{if(!l)return;const D=P.pageX,M=P.pageY,j=Math.abs(D-i),H=Math.abs(M-o);if(!I&&(j>B||H>B)&&(I=!0,a.style.pointerEvents="none"),I){P.stopPropagation(),P.preventDefault();const Z=Date.now(),V=Z-y;V>0&&(p=(D-x)/V*16,_=(M-C)/V*16),x=D,C=M,y=Z;const L=D-a.offsetLeft,F=M-a.offsetTop,re=L-i,K=F-o;a.scrollLeft=u-re,a.scrollTop=f-K}else x=D,C=M,y=Date.now()},k=P=>{if(l){if(I){if(P.stopPropagation(),P.preventDefault(),a.style.pointerEvents="",Math.abs(p)>.1||Math.abs(_)>.1){const D=()=>{a.scrollLeft-=p,a.scrollTop-=_,p*=.95,_*=.95,Math.abs(p)>.1||Math.abs(_)>.1?m=requestAnimationFrame(D):m=0};m=requestAnimationFrame(D)}}else a.style.pointerEvents="";l=!1,I=!1}};a.addEventListener("mousedown",T),window.addEventListener("mousemove",v),window.addEventListener("mouseup",k),a._dragScrollCleanup=()=>{m&&cancelAnimationFrame(m),a.removeEventListener("mousedown",T),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",k),a.style.pointerEvents=""}},unmounted(a){a._dragScrollCleanup&&a._dragScrollCleanup()}},$d={},jd={id:"custom_svg_lib",width:"26.000000",height:"26.000000",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function qd(a,l){return r.openBlock(),r.createElementBlock("svg",jd,[...l[0]||(l[0]=[r.createElementVNode("defs",null,null,-1),r.createElementVNode("path",{id:"custom_svg_color",d:"M11.83 26L11.83 14.15L0 14.15L0 11.84L11.83 11.84L11.83 0L14.15 0L14.15 11.84L26 11.84L26 14.15L14.15 14.15L14.15 26L11.83 26Z",fill:"#FF6D2E","fill-opacity":"1.000000","fill-rule":"nonzero"},null,-1)])])}const Ei=We($d,[["render",qd]]),Zd=["id","onClick"],Yd={class:"modified_plus_btn"},Kd=["src"],Qd={key:2,class:"wrapper_modifier_item"},Jd={key:0,class:"modifier_item_n_wrapper"},eu=["src"],tu={key:1,class:"modifier_plus_item"},nu=["src"],ru=["src"],aa=We(r.defineComponent({__name:"PlusModifier",props:{isSectionModifier:{type:Boolean},toggleNotRequire:{type:Function}},setup(a){const l=Ut(),i=At(),{stateCard:o}=we.storeToRefs(l),{itemThemes:u}=we.storeToRefs(i),{shouldUseDragScroll:f}=zn(),m=r.ref([]),p=r.ref([]),_=r.ref(null),x=r.ref(null),C=r.ref(null),y=B=>{B instanceof HTMLElement&&!m.value.includes(B)&&m.value.push(B)},I=B=>{C.value=B};return r.onMounted(async()=>{await r.nextTick(),o.value.plusButtonsRefs=m.value}),r.watchEffect(()=>{p.value=o.value.groupModifiersSelected,document.body.style.overflow=""}),r.watch(()=>{var B;return(B=o.value.groupCurrentOpen)==null?void 0:B.id},async B=>{var v;if(!B)return;await r.nextTick();const T=m.value.find(k=>k.id==="scrolling"+B);T&&((v=x.value)==null||v.scrollToElement(T))}),r.onBeforeUnmount(()=>{m.value=[],o.value.plusButtonsRefs=[]}),(B,T)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({card_modified_wrapper_many:r.unref(o).groupModifiers.length>=5})},[r.unref(o).groupModifiersSelected?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["card_modified_wrapper",[r.unref(o).groupModifiers.length<=4?"card_modified_wrapper_center":""]]),ref_key:"scrollPlusContainer",ref:_},[r.createVNode(ho,{ref_key:"scrollCenterRef",ref:x,axis:"x",behavior:"smooth",container:_.value,autoScroll:!0,idActive:C.value,clearContainer:!0},{default:r.withCtx(({handleTargetClick:v})=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o).groupModifiers,(k,P)=>{var D,M;return r.openBlock(),r.createElementBlock("div",{class:"button_modified",key:k.id,ref_for:!0,ref:y,id:"scrolling"+k.id,"data-clickable":"true",onClick:j=>{a.toggleNotRequire&&a.toggleNotRequire(k,P),I(k.id),v(j)}},[r.createElementVNode("div",Yd,[p.value[P].modifiers.length===0?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([{modified_plus_btn_active:k.id===((D=r.unref(o).groupCurrentOpen)==null?void 0:D.id)&&a.isSectionModifier},"modified_plus_active"])},[r.createVNode(Ei,{"aria-label":`Открыть группу модификаторов ${k.name}`},null,8,["aria-label"])],2)):p.value[P].modifiers.length===1?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["modified_plus_btn modified_plus_btn_solo",{modified_plus_btn_active:k.id===((M=r.unref(o).groupCurrentOpen)==null?void 0:M.id)&&a.isSectionModifier}])},[r.createElementVNode("img",{src:p.value[P].modifiers[0].image_link||r.unref(u).fallback_image||"",alt:"Модификатор"},null,8,Kd)],2)):(r.openBlock(),r.createElementBlock("div",Qd,[p.value[P].modifiers.length>2?(r.openBlock(),r.createElementBlock("div",Jd,[p.value[P].modifiers.length===3?(r.openBlock(),r.createElementBlock("img",{key:0,class:"modifier_plus_item modifier_item_three",src:p.value[P].modifiers[2].image_link||r.unref(u).fallback_image||""},null,8,eu)):(r.openBlock(),r.createElementBlock("p",tu," + "+r.toDisplayString(p.value[P].modifiers.length-2),1))])):r.createCommentVNode("",!0),r.createElementVNode("div",null,[p.value[P].modifiers.length>0?(r.openBlock(),r.createElementBlock("img",{key:0,src:p.value[P].modifiers[0].image_link||r.unref(u).fallback_image||"",class:"modifier_plus_item modifier_item_first"},null,8,nu)):r.createCommentVNode("",!0),p.value[P].modifiers.length>1?(r.openBlock(),r.createElementBlock("img",{key:1,src:p.value[P].modifiers[1].image_link||r.unref(u).fallback_image||"",class:"modifier_plus_item modifier_item_second"},null,8,ru)):r.createCommentVNode("",!0)])]))]),r.createElementVNode("p",null,r.toDisplayString(k.name),1)],8,Zd)}),128))]),_:1},8,["container","idActive"])],2)),[[r.unref(Wr),r.unref(f)?{}:!1]]):r.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-7f238435"]]),iu={width:"24",height:"24",viewBox:"0 0 24 24",id:"custom_svg_lib",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ou=["stroke"],mo=r.defineComponent({__name:"Close",props:{color:{type:String,required:!1,default:"currentColor"}},setup(a){const l=a;return(i,o)=>(r.openBlock(),r.createElementBlock("svg",iu,[r.createElementVNode("path",{d:"M18 18L12 12M12 12L6 6M12 12L18 6M12 12L6 18",stroke:l.color,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,ou)]))}}),su={},au={id:"custom_svg_lib",width:"21.847656",height:"21.846924",viewBox:"0 0 21.8477 21.8469",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function lu(a,l){return r.openBlock(),r.createElementBlock("svg",au,[...l[0]||(l[0]=[r.createElementVNode("desc",null," Created with Pixso. ",-1),r.createElementVNode("defs",null,null,-1),r.createElementVNode("circle",{id:"Ellipse 1",cx:"10.923828",cy:"10.923462",r:"10.923489",fill:"#FF6D2E","fill-opacity":"1.000000"},null,-1),r.createElementVNode("path",{id:"Vector",d:"M12.38 15.9L12.89 15.39C12.96 15.33 13 15.25 13 15.16C13 15.08 12.96 15 12.89 14.93L8.84 11L12.89 7.06C12.96 6.99 13 6.91 13 6.83C13 6.74 12.96 6.66 12.89 6.6L12.38 6.1C12.31 6.03 12.23 6 12.14 6C12.05 6 11.97 6.03 11.9 6.1L7.1 10.76C7.03 10.83 7 10.91 7 11C7 11.08 7.03 11.16 7.1 11.23L11.9 15.9C11.97 15.96 12.05 16 12.14 16C12.23 16 12.31 15.96 12.38 15.9Z",fill:"#F2F7FF","fill-opacity":"1.000000","fill-rule":"nonzero"},null,-1)])])}const wr=We(su,[["render",lu]]),Cr={mounted(a){a.muted=!0,a.setAttribute("muted","")}},cu=["disabled","id"],cn=r.defineComponent({__name:"ButtonDefault",props:{textButtonDefault:{type:String,required:!0},disabled:{type:Boolean,default:!1},onClick:{type:Function,required:!0}},setup(a){const l=a,i=()=>{l.onClick()};return(o,u)=>(r.openBlock(),r.createElementBlock("button",{class:"buttonDefaultWrapper",disabled:a.disabled,onClick:i,id:a.disabled?"buttonDefaultDisabled":""},r.toDisplayString(a.textButtonDefault),9,cu))}}),du={class:"notification_info"},uu={key:0,class:"notification_18plus"},fu={class:"notification_18plus_image"},hu=["src"],mu={class:"notification_18plus_text"},gu={class:"notification_18plus_accept"},pu={key:1,class:"notification_text"},xu={key:0,class:"wrapper_button_accept"},yi=r.defineComponent({__name:"NotificationWindow",props:r.mergeModels({textNotificationDefault:{},backgroundColor:{},buttonAccept:{},type:{type:Boolean},is_qr:{type:Boolean}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(a){const l=a,i=At(),o=lt(),{is18Allowed:u,notificationData_lib:f}=we.storeToRefs(o),{itemThemes:m}=we.storeToRefs(i),p=r.computed(()=>l.backgroundColor||"rgba(50, 50, 50, 0.9)"),_=r.computed(()=>{var T;return!!((T=m.value)!=null&&T.kiosk_hide_menu_update_notification)});let x;const C=r.useModel(a,"visible"),y=()=>{f.value.fastAdd&&(o.addToCart(f.value.fastAdd),f.value.fastAdd=null),sessionStorage.setItem("is_adult","true"),u.value=!0,C.value=!1,f.value.callback&&(f.value.callback(),f.value.callback=null)},I=()=>{C.value=!1},B=()=>{C.value=!1,clearTimeout(x)};return r.watch([C,()=>l.textNotificationDefault,_],([T,v,k],[P,D])=>{x&&(!T||T!==P||v!==D)&&clearTimeout(x),k&&T&&(x=setTimeout(B,4e3))},{immediate:!0}),r.onUnmounted(()=>{x&&B()}),(T,v)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[!_.value&&C.value?(r.openBlock(),r.createBlock(r.Transition,{key:0,name:"notificationBlack",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"notification_background_black",onClick:I})]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.Transition,{name:"notification"},{default:r.withCtx(()=>{var k;return[C.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"notification_overlay",onClick:I},[r.createElementVNode("div",{class:"notification_wrapper",style:r.normalizeStyle({"background-color":p.value,border:`2px solid ${p.value}`})},[r.createElementVNode("div",du,[a.type?(r.openBlock(),r.createElementBlock("div",uu,[r.createElementVNode("div",fu,[r.createElementVNode("img",{src:r.unref(m).adult_disclaimer_image||r.unref(m).fallback_image,alt:"Дисклеймер"},null,8,hu)]),r.createElementVNode("div",mu,r.toDisplayString(r.unref(m).adult_disclaimer_text),1),r.createElementVNode("div",gu,[v[0]||(v[0]=r.createElementVNode("label",{for:"plus18"},"Содержащиеся в настоящем разделе материалы предназначены для лиц старше 18 лет, носят информационный характер об ассортименте товаров и не являются рекламой. ",-1)),r.createVNode(cn,{textButtonDefault:"Мне есть 18",onClick:y,style:{fontSize:"1rem",padding:"6px 24px",marginLeft:"10px"}})])])):(r.openBlock(),r.createElementBlock("div",pu,[r.createTextVNode(r.toDisplayString(a.textNotificationDefault)+" ",1),(k=a.buttonAccept)!=null&&k.state?(r.openBlock(),r.createElementBlock("div",xu,[r.createVNode(cn,{class:"button_accept",textButtonDefault:a.buttonAccept.text,onClick:a.buttonAccept.acceptBtn,disabled:a.buttonAccept.disabled},null,8,["textButtonDefault","onClick","disabled"])])):r.createCommentVNode("",!0)]))])],4)])):r.createCommentVNode("",!0)]}),_:1})],64))}}),_u={class:"wrapper_modifiers"},wu={class:"wrapper_nutritional_value"},Cu={class:"nutritional_scheme"},Eu={key:0,class:"nutritional_parameters"},yu={key:1,class:"nutritional_parameters"},bu={key:2,class:"nutritional_parameters"},Au={key:3,class:"nutritional_parameters"},Su={ref:"modifierBody",class:"modifier_shadow"},Iu={class:"wrapper_modifiers_title"},Nu={class:"wrapper_text_count_modifiers"},Tu=["id","aria-label","onClick"],ku={key:0,class:"counter_modifier"},Ru={class:"hide_image_corners"},Bu=["src","alt"],Ou={key:1,loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},Mu=["src"],Du={class:"modifier_title"},vu={key:0,class:"modifier_continue_or_add_wrapper"},Pu=We(r.defineComponent({__name:"SectionModifiers",emits:["close","add-to-cart"],setup(a,{emit:l}){const i=l,o=At(),u=Ut(),{itemThemes:f}=we.storeToRefs(o),{stateCard:m,recountGroupTotalAmount:p,groupTotalAmount:_,isLastGroup:x}=we.storeToRefs(u),{isDesktop:C,shouldUseDragScroll:y}=zn(),I=r.ref(null),B=pt.useTemplateRefsList(),T=r.ref(!1),v=D=>{if(!D)return;const M=m.value.groupModifiers.findIndex(L=>L.id===m.value.groupCurrentOpen.id),j=m.value.plusButtonsRefs[M]||m.value.plusButtonsRefs[0];if(!j)return;const H=D.getBoundingClientRect(),Z=j.getBoundingClientRect(),V=D.cloneNode(!0);V.classList.add("flyer"),Object.assign(V.style,{width:`${H.width}px`,height:`${H.height}px`,left:`${H.left}px`,top:`${H.top}px`,position:"fixed",zIndex:"1000"}),document.body.appendChild(V),I.value=V,requestAnimationFrame(()=>{const L=Z.left+Z.width/3-(H.left+H.width/2),F=Z.top+Z.height/4-(H.top+H.height/2),re=Z.width/H.width*.2;V.style.transform=`translate(${L}px, ${F}px) scale(${re})`,V.style.opacity="0.4",V.style.transition="transform 0.5s ease, opacity 0.5s ease"}),V.addEventListener("transitionend",()=>{V.remove(),I.value=null,j.classList.add("bump"),setTimeout(()=>j.classList.remove("bump"),300)},{once:!0})},k=()=>{m.value.isSectionModifier=!0;const D=m.value.groupCurrentOpen;if(!D)return;const M=m.value.groupModifiers.findIndex(H=>H.id===D.id),j=u.validateGroup(M);if(!j.valid){m.value.textErrorRequaired=j.errorText,T.value=!0;return}x.value?i("add-to-cart"):u.toggleNotRequire(D,void 0,!0)};r.watch(()=>m.value.isAnimationFly,D=>{D===!0&&m.value.currentModifier&&(v(B.value.find(M=>M.id===m.value.currentModifier.id)),m.value.isAnimationFly=!1)});const P=r.computed(()=>!f.value.enable_sequential_modifiers);return(D,M)=>{var j,H,Z,V,L,F,re,K,ee,G,W,N,X,$;return r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(yi,{visible:T.value,textNotificationDefault:r.unref(m).textErrorRequaired,backgroundColor:r.unref(f).accent_color?r.unref(f).accent_color:"#FF6D2E","onUpdate:visible":M[0]||(M[0]=q=>T.value=q)},null,8,["visible","textNotificationDefault","backgroundColor"])])),r.createElementVNode("div",_u,[r.createElementVNode("div",wu,[r.createElementVNode("div",{class:r.normalizeClass(["card_header_inner_back",[(j=r.unref(m).openCard)!=null&&j.proteins_amount?"card_header_inner_back_nutrients":""]]),"aria-label":"Закрыть выбор модификаторов",onClick:M[1]||(M[1]=q=>i("close"))},[r.createVNode(wr,{class:"arrow_bottom"})],2),r.createElementVNode("div",Cu,[(H=r.unref(m).openCard)!=null&&H.energy_amount?(r.openBlock(),r.createElementBlock("div",Eu,[r.createElementVNode("b",null,r.toDisplayString((Z=r.unref(m).openCard)==null?void 0:Z.energy_amount),1),M[4]||(M[4]=r.createElementVNode("p",null,"Килокалории",-1))])):r.createCommentVNode("",!0),(V=r.unref(m).openCard)!=null&&V.proteins_amount?(r.openBlock(),r.createElementBlock("div",yu,[r.createElementVNode("b",null,r.toDisplayString((L=r.unref(m).openCard)==null?void 0:L.proteins_amount),1),M[5]||(M[5]=r.createElementVNode("p",null,"Белки",-1))])):r.createCommentVNode("",!0),(F=r.unref(m).openCard)!=null&&F.fat_amount?(r.openBlock(),r.createElementBlock("div",bu,[r.createElementVNode("b",null,r.toDisplayString((re=r.unref(m).openCard)==null?void 0:re.fat_amount),1),M[6]||(M[6]=r.createElementVNode("p",null,"Жиры",-1))])):r.createCommentVNode("",!0),(K=r.unref(m).openCard)!=null&&K.carbohydrates_amount?(r.openBlock(),r.createElementBlock("div",Au,[r.createElementVNode("b",null,r.toDisplayString((ee=r.unref(m).openCard)==null?void 0:ee.carbohydrates_amount),1),M[7]||(M[7]=r.createElementVNode("p",null,"Углеводы",-1))])):r.createCommentVNode("",!0)]),r.createElementVNode("div",{class:r.normalizeClass(["card_header_inner_back",[(G=r.unref(m).openCard)!=null&&G.proteins_amount?"card_header_inner_back_nutrients":""]]),style:{marginRight:"10px"},"aria-label":"Закрыть выбор модификаторов",onClick:M[2]||(M[2]=q=>i("close"))},[r.createVNode(mo,{class:"cross_bottom"})],2)]),r.createElementVNode("div",Su,[r.createElementVNode("p",Iu,r.toDisplayString((W=r.unref(m).groupCurrentOpen)==null?void 0:W.name),1),r.createElementVNode("p",Nu,"Выбрано "+r.toDisplayString(r.unref(p))+" из "+r.toDisplayString(r.unref(_)),1),r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((N=r.unref(m).groupModifiers.find(q=>{var J;return q.id===((J=r.unref(m).groupCurrentOpen)==null?void 0:J.id)}))!=null&&N.group_modifiers.length?"wrapper_modifiers_card":"wrapper_modifiers_card_column")},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((X=r.unref(m).groupCurrentOpen)==null?void 0:X.group_modifiers)||[],q=>{var J,le,ae;return r.openBlock(),r.createElementBlock("div",{key:q.id,ref_for:!0,ref:r.unref(B).set,id:q.id,style:r.normalizeStyle({pointerEvents:r.unref(C)?"none":"auto"}),class:r.normalizeClass(["modifier_card",{hidden_modifier_card:q.default_amount===0&&((J=r.unref(m).groupCurrentOpen)==null?void 0:J.id)==="Добавки2000"&&q.min_amount===0&&q.max_amount===0}]),tabindex:"0",role:"button","data-clickable":"true","aria-label":`Выбрать модификатор группы ${q.name}`,onClick:oe=>r.unref(u).modifierSelect(q)},[r.createElementVNode("div",{class:r.normalizeClass([{modifier_card_active:r.unref(m).groupModifiersSelected.some(oe=>{var xe;return oe.group===((xe=r.unref(m).groupCurrentOpen)==null?void 0:xe.id)&&oe.modifiers.some(_e=>_e.id===q.id)})},"wrapper_image_corners"])},[q.amount>1?(r.openBlock(),r.createElementBlock("div",ku,r.toDisplayString(q.amount),1)):r.createCommentVNode("",!0),r.createElementVNode("div",Ru,[q.video_link?r.withDirectives((r.openBlock(),r.createElementBlock("video",Ou,[r.createElementVNode("source",{src:q.video_link||"",type:"video/webm"},null,8,Mu)])),[[r.unref(Cr)]]):(r.openBlock(),r.createElementBlock("img",{key:0,class:"modifier_image",src:q.image_link||r.unref(f).fallback_image||"",alt:q.name},null,8,Bu)),r.createElementVNode("div",{class:r.normalizeClass(["wrapper_modifier_title",{wrapper_modifier_title_required:q.min_amount>0||q.required}])},[r.createElementVNode("h3",Du,r.toDisplayString(q.name),1),r.createElementVNode("p",null,"+"+r.toDisplayString(((ae=(le=q.sizes)==null?void 0:le.find(oe=>oe.id===r.unref(m).selectedSize.id))==null?void 0:ae.price)||q.price||0)+"₽",1)],2)])],2)],14,Tu)}),128))],2)),[[r.unref(Wr),($=r.unref(m).groupModifiers.find(q=>{var J;return q.id===((J=r.unref(m).groupCurrentOpen)==null?void 0:J.id)}))!=null&&$.group_modifiers.length?{}:!1]]),P.value?(r.openBlock(),r.createElementBlock("div",vu,[r.createElementVNode("button",{onClick:M[3]||(M[3]=q=>k()),class:"modifier_continue_or_add"},r.toDisplayString(r.unref(x)?"Добавить":"Продолжить"),1)])):r.createCommentVNode("",!0)],512)])],64)}}}),[["__scopeId","data-v-b3aaf5bc"]]),Lu={key:0,class:"slider_container"},Fu={key:0,class:"card_size_place"},Vu=["onClick","aria-label"],Uu={key:1,class:"card_size static"},zu=["onClick"],go=3,Hu=We(r.defineComponent({__name:"SizeModifier",setup(a){const l=Ut(),{stateCard:i}=we.storeToRefs(l),{width:o}=pt.useWindowSize(),u=r.ref(50),f=r.ref(),m=r.ref(0),p=r.ref(null),_=r.computed(()=>{var k;return o.value,(((k=p.value)==null?void 0:k.offsetWidth)||0)/Math.min(i.value.productSizes.length,go)}),x=r.computed(()=>i.value.productSizes.length<4?{left:`${u.value}%`,width:`${_.value-8}px`}:{left:"50%",transform:"translate(-50%, -50%)",width:`${_.value-8}px`}),C=r.computed(()=>{var D;if(i.value.productSizes.length<4)return i.value.productSizes[f.value.index]||i.value.productSizes[0];const k=m.value+1,P=((D=y.value[k])==null?void 0:D.originalIndex)??1;return i.value.productSizes[P]}),y=r.computed(()=>{if(i.value.productSizes.length<4)return i.value.productSizes;const k=i.value.productSizes;return[...k.map((P,D)=>({...P,originalIndex:D})),...k.map((P,D)=>({...P,originalIndex:D})),...k.map((P,D)=>({...P,originalIndex:D}))]}),I=(k,P)=>{if(f.value={id:k.id,title:k.name,index:P,is_default:k.is_default},k.price!==null&&i.value.openCard&&(i.value.openCard={...i.value.openCard,price:k.price}),i.value.selectedSize=k,i.value.productSizes.length>=4){const D=m.value+1;P<D?B():P>D&&T()}else{const D=i.value.productSizes.length,M=P*(100/D);u.value=M}},B=()=>{var k;if(!(i.value.productSizes.length<4)){if(m.value--,m.value<i.value.productSizes.length-go+1){m.value+=i.value.productSizes.length;const P=(k=p.value)==null?void 0:k.querySelector(".card_size");P&&(P.style.transition="none",P.style.transform=`translateX(-${m.value*_.value}px)`,P.offsetHeight,P.style.transition="transform 0.2s ease-in-out")}v()}},T=()=>{var k;if(!(i.value.productSizes.length<4)){if(m.value++,m.value>=i.value.productSizes.length*2){m.value-=i.value.productSizes.length;const P=(k=p.value)==null?void 0:k.querySelector(".card_size");P&&(P.style.transition="none",P.style.transform=`translateX(-${m.value*_.value}px)`,P.offsetHeight,P.style.transition="transform 0.2s ease-in-out")}v()}},v=()=>{var M;if(i.value.productSizes.length<4)return;const k=m.value+1,P=((M=y.value[k])==null?void 0:M.originalIndex)??0,D=i.value.productSizes[P];f.value={id:D.id,title:D.name,index:P,is_default:D.is_default}};return r.watch([()=>i.value.productSizes,p],([k=[],P])=>{if(Array.isArray(k)&&k.length>0){let D=k.findIndex(M=>M.is_default===!0);D>-1?(m.value=D,I(k[D],D)):k.length>go?I(k[1],1):I(k[0],0)}}),r.watch([()=>{var k;return(k=i.value.selectedSize)==null?void 0:k.id},()=>i.value.groupModifiersSelected],([k,P])=>{if(!k||!Array.isArray(P))return;const D=P.map(M=>({...M,modifiers:M.modifiers.map(j=>{if(!j.sizes||j.sizes.length===0)return j;const H=j.sizes.find(Z=>Z.id===k);return H?{...j,size:H,price:H.price??j.price}:j})}));JSON.stringify(D)!==JSON.stringify(i.value.groupModifiersSelected)&&(i.value.groupModifiersSelected=D)},{deep:!0}),(k,P)=>r.unref(i).productSizes.length>1&&f.value?(r.openBlock(),r.createElementBlock("div",Lu,[r.createElementVNode("div",{class:"card_size_place_wrapper",ref_key:"sliderWrapper",ref:p},[r.unref(i).productSizes.length>1&&f.value?(r.openBlock(),r.createElementBlock("div",Fu,[r.unref(i).productSizes.length>3?(r.openBlock(),r.createElementBlock("ul",{key:0,class:"card_size",style:r.normalizeStyle({transform:`translateX(-${m.value*_.value}px)`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,(D,M)=>(r.openBlock(),r.createElementBlock("li",{key:`${D.id}-${M}`,onClick:j=>I(D,M),class:r.normalizeClass({active:f.value.id===D.id&&f.value.index===D.originalIndex}),tabindex:"0",role:"button","aria-label":`Выбрать размер ${D.name}`},[r.createElementVNode("p",null,r.toDisplayString(D.alt_name?D.alt_name:D.name),1)],10,Vu))),128))],4)):(r.openBlock(),r.createElementBlock("ul",Uu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).productSizes,(D,M)=>(r.openBlock(),r.createElementBlock("li",{key:`${D.id}-${M}`,onClick:j=>I(D,M),class:r.normalizeClass({active:f.value.id===D.id&&f.value.index===M}),tabindex:"0",role:"button"},[r.createElementVNode("p",null,r.toDisplayString(D.alt_name?D.alt_name:D.name),1)],10,zu))),128))])),r.createElementVNode("div",{class:"size_active",style:r.normalizeStyle(x.value)},[r.createElementVNode("p",null,r.toDisplayString(C.value.alt_name?C.value.alt_name:C.value.name),1)],4)])):r.createCommentVNode("",!0)],512)])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-75aa7dcd"]]),Gu="data:image/svg+xml,%3csvg%20width='18'%20height='20'%20viewBox='0%200%2018%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3063%2019.7525C8.12104%2019.7525%208.78152%2019.1097%208.78152%2018.3167C8.78152%2017.5236%208.12104%2016.8808%207.3063%2016.8808C6.49156%2016.8808%205.83108%2017.5236%205.83108%2018.3167C5.83108%2019.1097%206.49156%2019.7525%207.3063%2019.7525Z'%20fill='%23808080'/%3e%3cpath%20d='M7.3063%2019.2525C7.83733%2019.2525%208.26782%2018.8335%208.26782%2018.3167C8.26782%2017.7998%207.83733%2017.3808%207.3063%2017.3808C6.77526%2017.3808%206.34478%2017.7998%206.34478%2018.3167C6.34478%2018.8335%206.77526%2019.2525%207.3063%2019.2525Z'%20stroke='%23F2F7FF'%20stroke-width='0.999998'/%3e%3cpath%20d='M14.4716%2019.7525C15.2864%2019.7525%2015.9469%2019.1097%2015.9469%2018.3167C15.9469%2017.5236%2015.2864%2016.8808%2014.4716%2016.8808C13.6569%2016.8808%2012.9964%2017.5236%2012.9964%2018.3167C12.9964%2019.1097%2013.6569%2019.7525%2014.4716%2019.7525Z'%20fill='%23808080'/%3e%3cpath%20d='M14.4716%2019.2525C15.0027%2019.2525%2015.4332%2018.8335%2015.4332%2018.3167C15.4332%2017.7998%2015.0027%2017.3808%2014.4716%2017.3808C13.9406%2017.3808%2013.5101%2017.7998%2013.5101%2018.3167C13.5101%2018.8335%2013.9406%2019.2525%2014.4716%2019.2525Z'%20stroke='%23F2F7FF'%20stroke-width='0.999998'/%3e%3cpath%20d='M0.770536%203.75L4.56158%206.21L6.66771%2015.23H15.1025L17.2086%208.26'%20stroke='%23F2F7FF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.19507%2011.95H12.2669H15.945'%20stroke='%23F2F7FF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.1908%200.830648V7.34648L8.26615%204.49981C8.03242%204.27231%207.64886%204.27231%207.41513%204.49981C7.35957%204.55378%207.3155%204.61788%207.28542%204.68845C7.25535%204.75902%207.23987%204.83467%207.23987%204.91106C7.23987%204.98746%207.25535%205.06311%207.28542%205.13368C7.3155%205.20425%207.35957%205.26835%207.41513%205.32231L11.3646%209.16648C11.5983%209.39398%2011.9759%209.39398%2012.2096%209.16648L16.159%205.32231C16.2145%205.26831%2016.2585%205.20419%2016.2885%205.13363C16.3186%205.06307%2016.334%204.98744%2016.334%204.91106C16.334%204.83469%2016.3186%204.75906%2016.2885%204.6885C16.2585%204.61794%2016.2145%204.55382%2016.159%204.49981C16.1035%204.44581%2016.0377%204.40297%2015.9652%204.37374C15.8927%204.34451%2015.815%204.32947%2015.7365%204.32947C15.658%204.32947%2015.5803%204.34451%2015.5078%204.37374C15.4353%204.40297%2015.3695%204.44581%2015.314%204.49981L12.3894%207.34648V0.830648C12.3894%200.509814%2012.1197%200.247314%2011.7901%200.247314C11.4604%200.247314%2011.1908%200.509814%2011.1908%200.830648Z'%20fill='%23F2F7FF'/%3e%3c/svg%3e",Wu={class:"counter_container"},Xu={class:"card_size_place_wrapper",ref:"sliderWrapper"},$u={class:"cart_amount_counter"},ju={class:"button_circle_number"},qu=We(r.defineComponent({__name:"NumberModifier",props:{qr_menu:{type:Boolean}},setup(a){const l=Ut(),{stateCard:i}=we.storeToRefs(l),o=Ne.useRouter(),u=a,f=()=>{var p,_,x,C;(_=(p=o.options.history.state)==null?void 0:p.back)!=null&&_.includes("mode=pdf")&&u.qr_menu||(x=i.value.openCard)!=null&&x.amount&&((C=i.value.openCard)==null?void 0:C.amount)>1&&(i.value.openCard.amount-=1)},m=()=>{var p,_,x;(_=(p=o.options.history.state)==null?void 0:p.back)!=null&&_.includes("mode=pdf")&&u.qr_menu||(x=i.value.openCard)!=null&&x.amount&&(i.value.openCard.amount+=1)};return(p,_)=>{var x,C;return r.openBlock(),r.createElementBlock("div",Wu,[r.createElementVNode("div",Xu,[r.createElementVNode("div",$u,[r.createElementVNode("p",{class:r.normalizeClass(["cart_circle_minus",[((x=r.unref(i).openCard)==null?void 0:x.amount)===1?"card_circle_minus_alone":""]]),"aria-label":"Уменьшить количество продукта","data-clickable":"true",onClick:r.withModifiers(f,["stop","prevent"])},[..._[0]||(_[0]=[r.createElementVNode("span",null,null,-1)])],2),r.createElementVNode("p",ju,r.toDisplayString((C=r.unref(i).openCard)==null?void 0:C.amount),1),r.createElementVNode("p",{class:"cart_circle_plus","aria-label":"Увеличить количество продукта","data-clickable":"true",onClick:r.withModifiers(m,["stop","prevent"])},"+")])],512)])}}}),[["__scopeId","data-v-50b09b8c"]]);function po(a,l=800){const i=r.ref(a),o=r.ref(a);let u=null,f=null,m=a;const p=_=>{f||(f=_);const x=_-f,C=Math.min(x/l,1),y=C<.5?4*C*C*C:1-Math.pow(-2*C+2,3)/2;i.value=Math.round(m+(o.value-m)*y),C<1?u=requestAnimationFrame(p):(i.value=o.value,u=null)};return r.watch(o,()=>{u&&cancelAnimationFrame(u),m=i.value,f=null,u=requestAnimationFrame(p)},{immediate:!0}),r.onUnmounted(()=>{u&&cancelAnimationFrame(u)}),{displayNumber:i,targetNumber:o,update:_=>{o.value=_}}}const mt=r.defineComponent({__name:"RecountNumber",props:{price:{type:Number,required:!0},duration:{type:Number},fixedFloat:{type:Number,require:!1}},setup(a){const l=a,{displayNumber:i,update:o}=po(l.price||0,l.duration||800);return r.watchEffect(()=>{o(l.price)}),(u,f)=>(r.openBlock(),r.createElementBlock("span",null,r.toDisplayString(r.unref(i).toFixed(a.fixedFloat)),1))}}),Zu={class:"button_price button_price_modifiers"},Yu=["src"],Ku={class:"button_text_container"},Qu={class:"button_text_price"},Ju=We(r.defineComponent({__name:"ButtonPriceCount",props:{qr_menu:{type:Boolean,default:!1},closeProduct:{}},setup(a,{expose:l}){const i=Ne.useRouter(),o=Ne.useRoute(),u=Ut(),f=lt(),m=At(),p=a,{stateCard:_,totalPrice_libCard:x,isOpenWindow:C,isAddToCard:y}=we.storeToRefs(u),{isDesktop:I}=zn(),{itemThemes:B}=we.storeToRefs(m),T=r.ref(!0),v=r.ref(!1),k=r.computed(()=>I.value?!1:T.value),P=r.ref([]),D=r.ref([]),M=()=>{var H,Z,V,L,F;if((Z=(H=i.options.history.state)==null?void 0:H.back)!=null&&Z.includes("mode=pdf")&&p.qr_menu)return;if(T.value){u.setCurrentCard(_.value.openCard),v.value=!0;const re=_.value.groupModifiers.findIndex(K=>u.checkedRequiredBtn.group.id===K.id);u.checkedRequiredBtn.haveRequaire&&u.toggleNotRequire(u.checkedRequiredBtn.group,re);return}const j=_.value.groupModifiersSelected||[];if(P.value=[],D.value=[],Array.isArray(j)&&j.length>0&&j.forEach(re=>{const K=re.group,ee=re.modifiers||[];K==="Добавки2000"?P.value=ee.map(G=>{var W;return{...G,old_price:G.price,size:Array.isArray(G.size)?G.size.map(N=>N.id).filter(Boolean):(W=G.size)!=null&&W.id?G.size.id:void 0}}):ee.length>0&&D.value.push({group:K,is_fake:re.is_fake||!1,is_product_determining:re.is_product_determining||!1,modifiers:ee.map(G=>{var W;return{...G,old_price:G.price,size:Array.isArray(G.size)?G.size.map(N=>N.id).filter(Boolean):(W=G.size)!=null&&W.id?G.size.id:void 0}})})}),document.body.style.overflow="",_.value.openCard){const re={id:_.value.openCard.id,is_fake:_.value.openCard.is_fake||!1,is_od_united_product:_.value.openCard.is_od_united_product||!1,amount:_.value.openCard.amount,name:_.value.openCard.name,image_link:_.value.openCard.image_link,price:_.value.openCard.price,old_price:_.value.openCard.price,size:((V=_.value.selectedSize)==null?void 0:V.id)??((F=(L=_.value.openCard.sizes)==null?void 0:L.find(K=>K.is_default))==null?void 0:F.id),sizes:_.value.openCard.sizes||[],modifiers:P.value,groups:_.value.openCard.groups,group_modifiers:D.value,energy_amount:_.value.openCard.energy_amount??0,proteins_amount:_.value.openCard.proteins_amount??0,fat_amount:_.value.openCard.fat_amount??0,carbohydrates_amount:_.value.openCard.carbohydrates_amount??0};p.closeProduct&&p.closeProduct(),f.addToCart(re),y.value=!0}C.value=!1,p.qr_menu&&i.push(`/${o.params.orgId}/`)};return r.watch(()=>_.value.productSizes,j=>{!j||j.length===0||!_.value.selectedSize||(_.value.selectedSize={..._.value.selectedSize})},{immediate:!0}),r.watchEffect(()=>{u.checkedRequiredBtn.haveRequaire?T.value=!0:T.value=!1}),r.onMounted(()=>{y.value=!1}),l({addProductToCart:M}),(j,H)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(yi,{visible:v.value,textNotificationDefault:r.unref(_).textErrorRequaired,backgroundColor:r.unref(B).accent_color?r.unref(B).accent_color:"#FF6D2E",buttonAccept:null,"onUpdate:visible":H[0]||(H[0]=Z=>v.value=Z)},null,8,["visible","textNotificationDefault","backgroundColor"])])),r.createElementVNode("div",{class:"button_price_bg_product",onTouchstart:H[3]||(H[3]=r.withModifiers(()=>{},["stop"])),onPointerdown:H[4]||(H[4]=r.withModifiers(()=>{},["stop"]))},[r.createElementVNode("div",Zu,[r.unref(I)?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(qu,{key:0,qr_menu:a.qr_menu},null,8,["qr_menu"])),r.createElementVNode("div",{class:r.normalizeClass(["card_product_button_buy",{buy_active:!k.value}]),"data-clickable":"true",onClick:M,onTouchstart:H[1]||(H[1]=r.withModifiers(()=>{},["stop"])),onPointerdown:H[2]||(H[2]=r.withModifiers(()=>{},["stop"]))},[r.unref(I)?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("img",{key:0,src:r.unref(Gu),class:"card_product_button_icon"},null,8,Yu)),r.createElementVNode("div",Ku,[r.createElementVNode("p",Qu,[r.createVNode(mt,{price:+r.unref(x),fixedFloat:2},null,8,["price"]),H[5]||(H[5]=r.createTextVNode(" ₽ ",-1))])])],34)])],32)],64))}}),[["__scopeId","data-v-15db613c"]]),e0={class:"modified_amount"},t0={class:"hide_image_corners"},n0=["src"],r0={class:"wrapper_modifier_title"},i0={class:"amount_title"},o0={class:"wrapper_amount_counter"},s0={class:"amount_count"},a0={class:"amount_wrapper"},l0={class:"add_counter_amount"},c0=We(r.defineComponent({__name:"ModalAmount",setup(a){const l=Ut(),i=At(),{itemThemes:o}=we.storeToRefs(i),{stateCard:u}=we.storeToRefs(l),f=r.computed(()=>{var _,x,C;return((C=(x=(_=u.value.currentModifier)==null?void 0:_.sizes)==null?void 0:x.find(y=>y.id===u.value.selectedSize.id))==null?void 0:C.price)??hr(u.value.currentModifier)}),m=()=>{u.value.currentModifier&&(u.value.currentModifier.amount=u.value.modalCount),l.modifierSelect(u.value.currentModifier),u.value.isModifiedAmount=!1},p=()=>{u.value.modalCount=1,u.value.currentModifier.amount=1};return(_,x)=>{var C,y;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",e0,[r.createElementVNode("div",t0,[r.createElementVNode("img",{class:"modifier_image",src:((C=r.unref(u).currentModifier)==null?void 0:C.image_link)||r.unref(o).fallback_image||""},null,8,n0),r.createElementVNode("div",r0,[r.createElementVNode("p",i0,r.toDisplayString((y=r.unref(u).currentModifier)==null?void 0:y.name),1),r.createElementVNode("p",null,"+ "+r.toDisplayString(f.value)+"₽",1)])])]),r.createElementVNode("div",o0,[r.createElementVNode("div",{class:"amount_mines",onClick:x[0]||(x[0]=r.withModifiers((...I)=>r.unref(l).minusAmount&&r.unref(l).minusAmount(...I),["stop"]))},[...x[1]||(x[1]=[r.createElementVNode("div",null,null,-1)])]),r.createElementVNode("p",s0,r.toDisplayString(r.unref(u).modalCount),1),r.createElementVNode("div",a0,[r.createVNode(Ei,{onClick:r.withModifiers(r.unref(l).plusAmount,["stop"])},null,8,["onClick"])])]),r.createElementVNode("p",{class:"clear_count",onClick:r.withModifiers(p,["stop"])},"Убрать все"),r.createElementVNode("div",l0,[r.createVNode(cn,{textButtonDefault:"Добавить",onClick:m,class:"button_add_group_modifiers"})])],64)}}}),[["__scopeId","data-v-84debd5d"]]),d0=(a,l,i)=>Math.max(l,Math.min(a,i)),u0=(a,l)=>Math.pow(a,l*5),la=(a,l,i)=>l===0||Math.abs(l)===1/0?u0(a,i):a*l*i/(l+i*a),bi=(a,l)=>l*parseFloat(a)/100,xo=(a,l,i,o=.15)=>o===0?d0(a,l,i):a<l?-la(l-a,i-l,o)+l:a>i?+la(a-i,i-l,o)+i:a,dn=(a,{min:l,max:i})=>l!==void 0&&a<l?l:i!==void 0&&a>i?i:a;function f0(a,l,i){const o=r.ref(0),u=r.computed(()=>a.value.map(_=>typeof _=="string"?bi(_,i.value):_)),f=r.computed(()=>Math.min(...u.value)),m=r.computed(()=>Math.max(...u.value)),p=r.computed(()=>{const _=u.value.reduce((x,C)=>Math.abs(C-l.value)<Math.abs(x-l.value)?C:x);return u.value.indexOf(_)});return{currentSnapPointIndex:o,flattenedSnapPoints:u,minSnapPoint:f,maxSnapPoint:m,closestSnapPointIndex:p}}const _o=We(r.defineComponent({__name:"BottomSheet",props:{duration:{default:250},snapPoints:{},initialSnapPoint:{},blocking:{type:Boolean,default:!0},canSwipeClose:{type:Boolean,default:!0},swipeCloseThreshold:{},canBackdropClose:{type:Boolean,default:!0},expandOnContentDrag:{type:Boolean,default:!0},modelValue:{type:Boolean},teleportTo:{default:"body"},teleportDefer:{type:Boolean,default:!1},headerClass:{},contentClass:{},footerClass:{}},emits:["opened","opening-started","closed","closing-started","ready","dragging-up","dragging-down","snapped","instinctHeight","update:modelValue"],setup(a,{expose:l,emit:i}){const o=a,u=i;let f=null;const m=r.ref(0),p=r.ref(!1),_=pt.useVModel(o,"modelValue",u,{passive:!0});r.watch(_,Ae=>{Ae?oe():xe||_e()}),r.onMounted(()=>{_.value&&oe()});const x=r.ref(),C=r.ref(null),y=r.ref(null),I=r.ref(null),B=r.ref(null),T=r.ref(o.expandOnContentDrag),{height:v}=pt.useWindowSize(),{height:k}=pt.useElementBounding(x),{height:P}=pt.useElementBounding(C),{height:D}=pt.useElementBounding(B),{height:M}=pt.useElementBounding(y),j=r.computed({get(){return dn(Math.ceil(D.value+P.value+M.value),{max:v.value})},set(Ae){[P.value,D.value,M.value]=Ae}}),H=r.ref(0),Z=r.ref(0),V=Dt.useMotionValue(0),L=Dt.useMotionValue(0),{snapPoints:F}=r.toRefs(o),re=r.computed(()=>F.value??[j.value]),{flattenedSnapPoints:K,currentSnapPointIndex:ee,closestSnapPointIndex:G,minSnapPoint:W,maxSnapPoint:N}=f0(re,H,v);let X;function $(Ae){T.value=!0,q(Ae)}function q(Ae){T.value&&Ae.preventDefault()}const J=Ae=>{Ae.key==="Escape"&&_e()},le=()=>{o.canBackdropClose&&_e()};let ae=!1;const oe=async()=>{var Ae;if(!ae){xe&&(xe=!1,f&&(clearTimeout(f),f=null)),m.value++,_.value=!0,ae=!0,u("opening-started");try{await r.nextTick(),await r.nextTick();const Be=(Ae=x.value)==null?void 0:Ae.$el;if(!Be){console.warn("[BottomSheet] sheet not ready, aborting"),_.value=!1;return}k.value=Be.getBoundingClientRect().height;const rt=Be.querySelector("[data-vsbs-content]"),it=Be.querySelector("[data-vsbs-header]"),Je=Be.querySelector("[data-vsbs-footer]");if(j.value=[it.getBoundingClientRect().height,rt.getBoundingClientRect().height,Je.getBoundingClientRect().height],await r.nextTick(),ee.value=K.value.findIndex(ve=>ve===W.value),o.initialSnapPoint){const ve=o.initialSnapPoint;if(ve<0||ve>=re.value.length)return console.warn("Index out of bounds");H.value=typeof re.value[ve]=="number"?dn(re.value[ve],{max:v.value}):bi(re.value[ve],v.value)}else H.value=dn(W.value,{max:v.value});Z.value=H.value,V.jump(H.value),L.jump(H.value),requestAnimationFrame(()=>{X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut"}),X=Dt.animate(L,0,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>{o.blocking&&u("opened")}})}),window.addEventListener("keydown",J)}finally{ae=!1}}};let xe=!1;const _e=()=>{xe||(ae&&(ae=!1),X&&X.stop(),L.stop(),V.stop(),Dt.animate(L,H.value||500,{duration:o.duration/1e3,ease:"easeInOut"}),p.value=!1,_.value=!1,xe=!0,u("closing-started"),window.removeEventListener("keydown",J),f&&clearTimeout(f),f=setTimeout(()=>{u("closed"),xe=!1,f=null},o.duration))},Pe=Ae=>{if(re.value){if(Ae<0||Ae>=re.value.length){console.warn("Index out of bounds");return}ee.value=Ae,H.value=typeof re.value[Ae]=="number"?dn(re.value[Ae],{max:v.value}):bi(re.value[Ae],v.value),X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>u("snapped",re.value.indexOf(re.value[Ae]))})}};function he(Ae){Ae>0?u("dragging-down"):Ae<0&&u("dragging-up")}const qe=()=>{p.value=!0,H.value=k.value,Z.value=L.get(),V.jump(H.value),L.jump(Z.value)},ye=async(Ae,Be)=>{await r.nextTick(),x.value&&(Z.value<=0&&(H.value-=Be.delta.y),H.value<=W.value&&(H.value=W.value,Z.value+=Be.delta.y,p.value=!0,L.set(o.canSwipeClose?dn(Z.value,{min:0}):dn(xo(Z.value,-k.value,0,.5),{min:0}))),V.set(dn(xo(H.value,0,N.value,.25),{min:0,max:v.value})),he(Be.delta.y))},Ke=()=>{if(o.canSwipeClose){let Ae=H.value/2;o.swipeCloseThreshold&&typeof o.swipeCloseThreshold=="number"&&(Ae=o.swipeCloseThreshold),o.swipeCloseThreshold&&typeof o.swipeCloseThreshold=="string"&&o.swipeCloseThreshold.includes("%")&&(Ae=H.value*(Number(o.swipeCloseThreshold.replace("%",""))/100)),Math.abs(Z.value)>Ae&&(Z.value=H.value)}else Z.value=0;if(X=Dt.animate(L,Z.value,{duration:o.duration/1e3,ease:"easeInOut"}),Z.value===H.value){Z.value=0,_e();return}ee.value=G.value,H.value=typeof re.value[G.value]=="number"?dn(re.value[G.value],{max:v.value}):bi(re.value[G.value],v.value),X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>u("snapped",re.value.indexOf(re.value[G.value]))}),X=Dt.animate(L,0,{duration:o.duration/1e3,ease:"easeInOut"})},ct=(Ae,Be)=>{if(H.value=k.value,Z.value=L.get(),X&&X.stop(),!I.value)return;const rt=I.value.scrollTop===0,it=Be.delta.y>0,Je=K.value.length===1,ve=.5>Math.abs(H.value-N.value);if(Je){if(!o.expandOnContentDrag)return T.value=!1;L.get()===0&&rt&&it&&(T.value=!0),L.get()===0&&rt&&!it&&(T.value=!1)}else{if(!o.expandOnContentDrag)return T.value=!1;p.value=!0,T.value=!0,ve&&(it&&rt&&(T.value=!0),!it&&rt&&(T.value=!1),rt||(T.value=!1))}},et=async(Ae,Be)=>{if(await r.nextTick(),!o.expandOnContentDrag)return T.value=!1;if(!x.value)return;Z.value===0&&T.value&&o.expandOnContentDrag&&(H.value-=Be.delta.y),H.value<=W.value&&(H.value=W.value,T.value&&o.expandOnContentDrag&&(Z.value+=Be.delta.y),Z.value=dn(Z.value,{min:0,max:W.value}),L.set(o.canSwipeClose?dn(Z.value,{min:0}):dn(xo(Z.value,-k.value,0,.5),{min:0}))),H.value>N.value&&(H.value=N.value),H.value=dn(H.value,{max:v.value}),!(K.value.length===1)&&H.value===N.value&&(T.value=!1),V.set(H.value),he(Be.delta.y)},_t=()=>{if(!I.value)return;const Ae=I.value.scrollTop===0;T.value=Ae},De=pt.useDebounceFn(Ae=>Pe(Ae),o.duration);return r.watch(re,(Ae,Be)=>{if(_.value===!1||!Ae||!Be)return;const rt=Ae[ee.value],it=Be[ee.value];typeof rt!="string"&&typeof it!="string"&&(H.value=dn(rt,{max:v.value}),rt!==it&&(X=Dt.animate(V,H.value,{duration:o.duration/1e3,ease:"easeInOut"})))}),r.watch(v,()=>De(ee.value)),l({open:oe,close:_e,snapToPoint:Pe}),r.onUnmounted(()=>{f&&clearTimeout(f)}),(Ae,Be)=>(r.openBlock(),r.createBlock(r.Teleport,{to:a.teleportTo,defer:a.teleportDefer},[r.createElementVNode("div",r.mergeProps(Ae.$attrs,{"data-vsbs-container":""}),[r.createVNode(r.unref(Dt.AnimatePresence),null,{default:r.withCtx(()=>[r.unref(_)&&a.blocking?(r.openBlock(),r.createBlock(r.unref(Dt.Motion),{ref:"backdrop",key:"backdrop-"+m.value,"data-vsbs-backdrop":"",onClick:Be[0]||(Be[0]=rt=>le()),transition:{ease:"easeInOut",duration:a.duration/1e3},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},null,8,["transition"])):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.unref(Dt.AnimatePresence),null,{default:r.withCtx(()=>[r.unref(_)?(r.openBlock(),r.createBlock(r.unref(Dt.Motion),{ref_key:"sheet",ref:x,exit:{opacity:0},initial:!1,key:m.value,style:r.normalizeStyle({y:r.unref(L),z:1,height:r.unref(V)}),"data-vsbs-shadow":!a.blocking,"data-vsbs-sheet-show":r.unref(_),"data-vsbs-dragging":p.value,"aria-modal":"true","data-vsbs-sheet":"",tabindex:"-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Dt.Motion),{ref_key:"sheetHeader",ref:C,"data-vsbs-header":"",onPanStart:qe,onPan:ye,onPanEnd:Ke,onTouchmove:$,class:r.normalizeClass(a.headerClass)},{default:r.withCtx(()=>[r.renderSlot(Ae.$slots,"header",{},void 0,!0)]),_:3},8,["class"]),r.createElementVNode("div",{ref_key:"sheetScroll",ref:I,"data-vsbs-scroll":"",onScrollend:_t},[r.createVNode(r.unref(Dt.Motion),{ref:"sheetContentWrapper","data-vsbs-content-wrapper":"",onPanStart:ct,onPan:et,onPanEnd:Ke,onTouchmove:q},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"sheetContent",ref:B,"data-vsbs-content":"",class:r.normalizeClass(a.contentClass)},[r.renderSlot(Ae.$slots,"default",{},void 0,!0)],2)]),_:3},512)],544),r.createVNode(r.unref(Dt.Motion),{ref_key:"sheetFooter",ref:y,"data-vsbs-footer":"",onPanStart:qe,onPan:ye,onPanEnd:Ke,onTouchmove:$,class:r.normalizeClass(a.footerClass)},{default:r.withCtx(()=>[r.renderSlot(Ae.$slots,"footer",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["style","data-vsbs-shadow","data-vsbs-sheet-show","data-vsbs-dragging"])):r.createCommentVNode("",!0)]),_:3})],16)],8,["to","defer"]))}}),[["__scopeId","data-v-a8913d51"]]);function An(a,l=null){const i=ai();i.initCacheSingle("defaultImage");const o=r.computed(()=>i.cache.defaultImage||null),u=r.shallowRef(!1),f=r.computed(()=>{var x;return((x=r.toValue(a))==null?void 0:x.toString())||null}),m=pt.computedAsync(async()=>{const x=f.value;return x?(await i.initCacheSingle(x),i.cache[x]||null):null},null,{evaluating:u}),p=r.computed(()=>u.value&&f.value!==null);return{mediaUrl:r.computed(()=>m.value||r.toValue(l)||o.value||null),isLoading:p}}const h0={class:"card_product_modifiers_sheet_body"},m0={class:"card__pictures"},g0=["src"],p0=["src"],x0={class:"card_header_wrapper"},_0={key:0,class:"card_fire_kkal_wrapper"},w0={class:"card_content"},C0={class:"wrapper_size"},E0={key:0,class:"description"},y0={key:1},b0={class:"title_info_modifiers"},A0=We(r.defineComponent({__name:"CardProductPage",props:{configPage:{}},setup(a){const l=At(),i=Ut(),{stateCard:o,isOpenWindow:u,isAddToCard:f}=we.storeToRefs(i),{itemThemes:m}=we.storeToRefs(l),p=Ne.useRouter(),_=Ne.useRoute(),x=a,C=r.computed(()=>!!(_.query.mode==="pdf"&&x.configPage.qr_menu)),{mediaUrl:y}=An(()=>{var P,D;return(P=o.value.openCard)!=null&&P.video_link?`${o.value.openCard.id}_video`:(D=o.value.openCard)!=null&&D.image_link?`${o.value.openCard.id}_image`:null},()=>{var P,D;return((P=o.value.openCard)==null?void 0:P.video_link)||((D=o.value.openCard)==null?void 0:D.image_link)||null}),I=()=>{x.configPage.qr_menu?C.value?p.push(`/${_.params.orgId}?mode=pdf`):p.push(`/${_.params.orgId}`):x.configPage.closeProduct()},B=()=>{f.value=!1,o.value.isSectionModifier=!1},T=()=>{o.value.isModifiedAmount=!1},v=r.ref(null),k=()=>{var P;(P=v.value)==null||P.addProductToCart()};return r.watch(()=>x.configPage.data,i.setCurrentCard),r.watch(()=>o.value.isSectionModifier,P=>{C.value&&document.body.classList.toggle("pdf_hidden",P)},{immediate:!0}),r.watchEffect(()=>{u.value||(u.value=x.configPage.is_closeProduct)}),r.onBeforeUnmount(()=>i.reset()),(P,D)=>{var M,j,H,Z,V,L;return r.openBlock(),r.createElementBlock("div",{class:"card_product_wrapper",style:r.normalizeStyle(C.value?"user-select: none;":"")},[r.createVNode(r.unref(_o),{modelValue:r.unref(o).isSectionModifier,"onUpdate:modelValue":D[0]||(D[0]=F=>r.unref(o).isSectionModifier=F),class:"card_product_modifiers_sheet",teleportTo:C.value?"#app":"body"},{default:r.withCtx(()=>[r.createElementVNode("div",h0,[r.createVNode(Pu,{onClose:B,onAddToCart:k}),r.createVNode(aa,{isSectionModifier:r.unref(o).isSectionModifier,toggleNotRequire:r.unref(i).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])]),_:1},8,["modelValue","teleportTo"]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.unref(o).isModifiedAmount?(r.openBlock(),r.createElementBlock("div",{key:0,class:"wrapper_modified_amount",onClick:r.withModifiers(T,["stop"])},[r.createVNode(c0)])):r.createCommentVNode("",!0)])),r.createElementVNode("div",m0,[(M=r.unref(o).openCard)!=null&&M.video_link&&r.unref(y)?r.withDirectives((r.openBlock(),r.createElementBlock("video",{key:r.unref(y),loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},[r.createElementVNode("source",{src:r.unref(y)||"",type:"video/webm"},null,8,g0)])),[[r.unref(Cr)]]):(r.openBlock(),r.createElementBlock("img",{key:1,class:"card__pictures_images",src:r.unref(y)||"",alt:"Product image"},null,8,p0)),r.createElementVNode("div",x0,[r.createVNode(wr,{class:"card_header_back",onClick:I,"aria-label":"Вернуться назад"}),(j=r.unref(o).openCard)!=null&&j.energy_amount?(r.openBlock(),r.createElementBlock("div",_0,[D[2]||(D[2]=r.createElementVNode("div",{class:"card_fire_kkal"},null,-1)),r.createElementVNode("p",null,[r.createElementVNode("b",null,r.toDisplayString((H=r.unref(o).openCard)==null?void 0:H.energy_amount),1),D[1]||(D[1]=r.createTextVNode(" Ккал ",-1))])])):r.createCommentVNode("",!0)]),r.createElementVNode("h4",null,r.toDisplayString((Z=r.unref(o).openCard)==null?void 0:Z.name),1),r.createElementVNode("div",{class:"card__pictures__gradient",style:r.normalizeStyle(r.unref(m).gradientStyle)},null,4)]),r.createElementVNode("div",w0,[r.createElementVNode("div",C0,[r.createVNode(Hu)]),(V=r.unref(o).openCard)!=null&&V.description?(r.openBlock(),r.createElementBlock("p",E0,r.toDisplayString((L=r.unref(o).openCard)==null?void 0:L.description),1)):r.createCommentVNode("",!0),r.unref(o).groupModifiers.length?(r.openBlock(),r.createElementBlock("div",y0,[r.createElementVNode("p",b0,r.toDisplayString(r.unref(m).dish_cart_mod_choice_text||"Настрой, как ты любишь"),1),r.createVNode(aa,{isSectionModifier:r.unref(o).isSectionModifier,toggleNotRequire:r.unref(i).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])):r.createCommentVNode("",!0),r.createVNode(Ju,{ref_key:"buttonPriceRef",ref:v,qr_menu:a.configPage.qr_menu,closeProduct:a.configPage.closeProduct},null,8,["qr_menu","closeProduct"])])],4)}}}),[["__scopeId","data-v-a84e5942"]]),Ai=we.defineStore("modals",()=>{const a=new Map,l=(u,f)=>{const m=o(u).value;m.visible=!0,m.context=f},i=u=>{const f=o(u).value;f.visible=!1},o=u=>(a.has(u)||a.set(u,r.ref({visible:!1})),a.get(u));return{state:o,open:l,close:i}}),S0={key:0,class:"popupWindowDefault_overlay"},ca=We(r.defineComponent({__name:"PopupWindowDefault",props:{visible:{type:Boolean}},emits:["update:visible"],setup(a,{emit:l}){const i=a,o=l,u=()=>{o("update:visible",!1)};return r.watch(()=>i.visible,async f=>{f&&await r.nextTick(),i.isVisible=f}),(f,m)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.Transition,{name:"popupWindowDefaultBlack",appear:"",onAfterLeave:m[0]||(m[0]=()=>{o("update:visible",!1)})},{default:r.withCtx(()=>[i.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"background_black",onClick:u})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.Transition,{name:"popupWindowDefault",appear:"",onAfterLeave:m[1]||(m[1]=()=>{o("update:visible",!1)})},{default:r.withCtx(()=>[i.visible?(r.openBlock(),r.createElementBlock("div",S0,[r.renderSlot(f.$slots,"default",{},void 0,!0)])):r.createCommentVNode("",!0)]),_:3})],64))}}),[["__scopeId","data-v-08e0e008"]]),I0=["src"],N0={class:"cart_box_content_wrapper"},T0={class:"cart_box_content_info"},k0={class:"cart_box_name"},R0={class:"cart_box_size"},B0={class:"cart_amount"},O0={class:"cart_amount_count"},M0={class:"cart_box_info_more"},D0={key:1,class:"cart_modifier_info"},v0={class:"cart_modifier_content"},P0={class:"wrapper_price_count_cart"},L0={class:"count_cart_box"},F0={class:"wrapper_modifiers_discount"},da=We(r.defineComponent({__name:"CartBox",props:{index:Number,cardItem:Object,isShowModifiers:Boolean},emits:["delete"],setup(a,{emit:l}){const i=a,o=lt(),u=At(),f=Ai(),{itemThemes:m}=we.storeToRefs(u),p=r.ref(0),_=r.ref(0),x=r.ref(!1),C=r.ref(!1),y=r.ref(i.isShowModifiers?u.itemThemes.qr_show_modifiers_in_cart??!1:u.itemThemes.kiosk_show_modifiers_in_cart??!1),{displayNumber:I,update:B}=po(0,800),T=r.computed(()=>{var K,ee;const F=((K=i.cardItem)==null?void 0:K.modifiers)??[],re=(((ee=i.cardItem)==null?void 0:ee.group_modifiers)??[]).flatMap(G=>G.modifiers??[]);return[...F,...re]}),{mediaUrl:v}=An(()=>{var F;return((F=i.cardItem)==null?void 0:F.id)+"_image"},()=>{var F;return(F=i.cardItem)==null?void 0:F.image_link}),k=r.computed(()=>{var F,re;return((F=i.cardItem)==null?void 0:F.total_new_price)??hr(i.cardItem)*((re=i.cardItem)==null?void 0:re.amount)}),P=()=>f.open("cart-delete-confirm",i.cardItem),D=()=>{y.value=!y.value},M=()=>{o.plusAmount(i.cardItem.idSystem)},j=()=>{i.cardItem.amount>1?o.minusAmount(i.cardItem.idSystem):P()},H=F=>{p.value=F.touches[0].clientX,x.value=!0},Z=F=>{x.value&&(_.value=F.touches[0].clientX-p.value,_.value>0&&(_.value=0))},V=()=>{x.value=!1,_.value<-115&&P(),_.value=0};r.onMounted(()=>{i.index===0&&(C.value=!0,setTimeout(()=>{_.value=-90,setTimeout(()=>{_.value=0,C.value=!1},700)},0))});const L=r.computed(()=>{const F=i.index===0&&C.value?1:`${1-Math.abs(_.value)/200}`;return{transform:`translateX(${_.value}px)`,opacity:F,transition:x.value?"none":"transform 0.7s, opacity 0.7s"}});return r.watch(k,B,{immediate:!0}),(F,re)=>{var K,ee,G,W,N,X,$,q;return r.openBlock(),r.createElementBlock("div",{class:"cart_box_wrapper",onTouchstart:H,onTouchmove:Z,onTouchend:V,style:r.normalizeStyle(L.value)},[re[2]||(re[2]=r.createElementVNode("div",{class:"wrapper_cart_delete"},[r.createElementVNode("div",{class:"cart_delete"})],-1)),r.createElementVNode("img",{src:r.unref(v)||"",class:"cart_box_image"},null,8,I0),r.createElementVNode("div",N0,[r.createElementVNode("div",T0,[r.createElementVNode("p",k0,r.toDisplayString((K=a.cardItem)==null?void 0:K.name),1),r.createElementVNode("p",R0,r.toDisplayString(((G=(ee=a.cardItem)==null?void 0:ee.sizes.find(J=>{var le;return J.id===((le=a.cardItem)==null?void 0:le.size)}))==null?void 0:G.alt_name)||((N=(W=a.cardItem)==null?void 0:W.sizes.find(J=>{var le;return J.id===((le=a.cardItem)==null?void 0:le.size)}))==null?void 0:N.name)),1),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((X=i.cardItem)==null?void 0:X.discounts)||[],(J,le)=>(r.openBlock(),r.createElementBlock("div",{key:le,class:"discount_banner"},[r.createElementVNode("p",null,r.toDisplayString(J.name),1),r.createElementVNode("p",null,r.toDisplayString(J.discount)+"₽",1)]))),128)),r.createElementVNode("div",B0,[r.createElementVNode("button",{onClick:j},"-"),r.createElementVNode("p",O0,r.toDisplayString(i.cardItem.amount),1),r.createElementVNode("button",{onClick:M},"+")])]),r.createElementVNode("div",M0,[r.createElementVNode("div",{class:"cart_box_remove_item",onClick:P},[r.createVNode(mo)]),($=i.cardItem)!=null&&$.new_price?(r.openBlock(),r.createElementBlock("p",{key:0,class:r.normalizeClass({discount_new_price:(q=i.cardItem)==null?void 0:q.new_price})},r.toDisplayString((i.cardItem.new_price*i.cardItem.amount).toFixed(2)+"₽"),3)):r.createCommentVNode("",!0),r.createElementVNode("p",null,r.toDisplayString(r.unref(I).toFixed(2)+"₽"),1)])]),!y.value&&T.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"cart_modifier_toggle",onTouchstart:r.withModifiers(D,["stop"])},[...re[0]||(re[0]=[r.createElementVNode("p",{class:"cart_info_more"},"Посмотреть модификаторы",-1),r.createElementVNode("p",{class:"cart_arrow"},null,-1)])],32)):r.createCommentVNode("",!0),y.value&&T.value.length>0?(r.openBlock(),r.createElementBlock("div",D0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,J=>{var le;return r.openBlock(),r.createElementBlock("div",{class:"cart_modifier_item",key:J.id},[r.createElementVNode("div",v0,[r.createVNode(Ei,{id:"plus_orange"}),r.createElementVNode("p",null,r.toDisplayString(J.name),1)]),r.createElementVNode("div",P0,[r.createElementVNode("p",L0,r.toDisplayString(`x${J.amount}`),1),r.createElementVNode("div",F0,[J!=null&&J.new_price?(r.openBlock(),r.createElementBlock("p",{key:0,class:r.normalizeClass({discount_new_price:(le=J==null?void 0:J.new_price)==null?void 0:le.toFixed(2)})},r.toDisplayString((J.new_price*J.amount).toFixed(2)+"₽"),3)):r.createCommentVNode("",!0),r.createElementVNode("p",null,r.toDisplayString((J.total_new_price??J.price*J.amount).toFixed(2)+"₽"),1)])])])}),128)),r.createElementVNode("div",{class:"cart_modifier_arrow",onTouchstart:r.withModifiers(D,["stop"])},[...re[1]||(re[1]=[r.createElementVNode("p",{class:"cart_info_more"},"Скрыть",-1),r.createElementVNode("p",{class:"cart_arrow_top"},null,-1)])],32)])):r.createCommentVNode("",!0)],36)}}}),[["__scopeId","data-v-9cc87c29"]]),V0={},U0={class:"nfc_x",viewBox:"0 0 48 48"};function z0(a,l){return r.openBlock(),r.createElementBlock("svg",U0,[...l[0]||(l[0]=[r.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#B00020","stroke-width":"2.4",fill:"none"},null,-1),r.createElementVNode("path",{d:"M14 16L34 30M34 16L14 30",stroke:"#B00020","stroke-width":"3","stroke-linecap":"round"},null,-1)])])}const H0=We(V0,[["render",z0]]),G0={},W0={style:{},"aria-hidden":"true",viewBox:"0 0 48 48",class:"nfc_ok"};function X0(a,l){return r.openBlock(),r.createElementBlock("svg",W0,[...l[0]||(l[0]=[r.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#5D534B","stroke-width":"none",fill:"none"},null,-1),r.createElementVNode("path",{d:"M16 22h16m-10 6h6",stroke:"#5D534B","stroke-width":"2.4","stroke-linecap":"round"},null,-1),r.createElementVNode("path",{d:"M14 28l6 6l14-14",fill:"none",stroke:"#2ECC71","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const $0=We(G0,[["render",X0]]),j0={key:0,class:"nfc_ok",viewBox:"0 0 48 48","aria-hidden":"true"},q0=r.defineComponent({__name:"CardReaderRetry",props:{styleRetry:{type:Boolean}},setup(a){return(l,i)=>a.styleRetry?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("svg",j0,[...i[0]||(i[0]=[r.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4"},null,-1),r.createElementVNode("path",{d:"M16 22h16m-10 6h6"},null,-1)])]))}}),Z0={class:"sheet_header"},Y0={class:"sheet_title",id:"sheetTitle"},K0={class:"sheet_body"},Q0={class:"sheet_card"},J0={class:"nfc_title"},e1={class:"lead"},t1={class:"wrapper_input_accept"},n1={key:1},r1={key:0,class:"card_phone_auth_wrapper"},i1={class:"sr_only","aria-live":"polite"},ua=r.defineComponent({__name:"CardReader",setup(a){const l=lt(),i=At(),{is_OpenLoyal:o}=we.storeToRefs(l),{itemThemes:u}=we.storeToRefs(i),f=vt(),m=r.ref(),p=r.ref(null),_=r.ref(""),x={wait:{text:"Лояльность",title:""},success:{text:"Стикер распознан",title:"Стикер распознан"},not_found:{text:"Стикер не распознан",title:"Стикер не распознали"}},C=r.computed({get:()=>_.value,set:$=>{_.value=$.replace(/\s/g,"")}}),y=r.computed(()=>f.currentState),I=r.computed(()=>f.isDrawerOpen),B=r.computed(()=>{var $;return(($=x[y.value])==null?void 0:$.text)||""}),T=r.computed(()=>{var $;($=x[y.value])!=null&&$.title}),v=r.computed(()=>y.value==="success"?"Добро пожаловать!":u.value.kiosk_show_loyalty_phone_input_button?"Поднесите стикер к считывателю или войдите по номеру телефона":"Поднесите стикер к считывателю или введите номер карты вручную"),k=r.computed(()=>({ok:y.value==="success",warn:y.value==="not_found"})),P=r.computed(()=>{const $=[];return y.value==="wait"&&$.push("pulse","show-x"),y.value==="not_found"&&$.push("pulse","show-x"),y.value==="success"&&$.push("pulse","show-ok"),$}),D=r.computed(()=>y.value==="not_found"),M=r.computed(()=>y.value==="success"),j=r.computed(()=>y.value==="not_found"),H=r.computed(()=>["not_found"].includes(y.value)),Z=r.computed(()=>({wait:"Стикер не распознан. Нажмите «Повторить».",success:"Стикер распознан. Нажмите «Продолжить».",not_found:"Стикер не распознан. Нажмите «Повторить»."})[y.value]||""),V=()=>{f.closeDrawer(),o.value=!0},L=async $=>{var q,J;f.error="",p.value=null;try{const le=new bn;await le.authorizeByCard($.trim()),await le.getProfile(),l.loadCart(),f.setState("success"),f.isDrawerOpen=!1,f.showNotification("Вы успешно авторизовались в программе лояльности!")}catch(le){f.error=((J=(q=le.response)==null?void 0:q.data)==null?void 0:J.user_friendly_message)||"Ошибка",f.setState("not_found"),p.value=C.value,C.value=""}},F=r.computed(()=>{var q;const $=(q=u.value)==null?void 0:q.kiosk_hide_manual_input_loyalty_card;return $??!1}),re=()=>{f.setState("wait"),f.error="",C.value="",p.value=null},K=()=>{f.closeDrawer(),p.value=null,C.value=""},ee=()=>{var $,q;f.setState("wait"),(q=($=C.value)==null?void 0:$.trim())!=null&&q.length&&L(C.value.trim())},G=$=>{$.stopPropagation(),document.activeElement!==m.value&&W()},W=()=>{r.nextTick(()=>{m.value&&(m.value.focus(),_.value&&m.value.select())})},N=$=>{const q=document.activeElement===m.value;if(!I.value||q)return;const J=$.key.toLowerCase();if(J==="backspace")return C.value=C.value.slice(0,-1);if(J==="escape")return K();if(J==="r"&&j.value)return re();if(J==="c"&&y.value==="success")return K();if(J==="enter")return ee();C.value+=J},X={mounted($){$==null||$.focus()}};return r.onMounted(()=>{document==null||document.addEventListener("keydown",N)}),r.onBeforeUnmount(()=>{document==null||document.removeEventListener("keydown",N)}),r.watchEffect(()=>{I.value&&(f.error="")}),($,q)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[I.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"backdrop show",onClick:K,"aria-hidden":"true"})):r.createCommentVNode("",!0),I.value?(r.openBlock(),r.createElementBlock("section",{key:1,class:r.normalizeClass(["sheet show",{sheet_retry:j.value}]),"aria-modal":"true","aria-labelledby":"sheetTitle",onClick:G},[r.createElementVNode("header",Z0,[r.createElementVNode("div",Y0,r.toDisplayString(B.value),1),j.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["sheet_status",k.value])},r.toDisplayString(p.value),3)):r.createCommentVNode("",!0),r.createElementVNode("button",{class:"sheet_close",onClick:K,"aria-label":"Закрыть"}," Закрыть ")]),r.createElementVNode("div",K0,[r.createElementVNode("div",Q0,[r.createElementVNode("div",{class:r.normalizeClass(["nfc",P.value])},[r.createVNode(q0,{styleRetry:H.value},null,8,["styleRetry"]),D.value?(r.openBlock(),r.createBlock(H0,{key:0})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"overlay check",style:r.normalizeStyle({display:M.value?"grid":"none"}),"aria-hidden":"true"},[r.createVNode($0)],4)],2),r.createElementVNode("h2",J0,r.toDisplayString(T.value),1),r.createElementVNode("p",e1,r.toDisplayString(v.value),1),r.createElementVNode("div",t1,[r.withDirectives(r.createElementVNode("input",{style:r.normalizeStyle(F.value?{position:"absolute",left:"-9999px"}:{}),ref_key:"cardInputManualRef",ref:m,"onUpdate:modelValue":q[0]||(q[0]=J=>C.value=J),class:"nfc_title_read_input",type:"text",placeholder:"Введите трек карты","aria-live":"polite",onKeydown:r.withKeys(ee,["enter"])},null,36),[[r.vModelText,C.value],[X]]),j.value?(r.openBlock(),r.createElementBlock("button",{key:0,class:"btn btn_ghost",onClick:re},"Повторить")):(r.openBlock(),r.createElementBlock("div",n1,[F.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("button",{key:0,class:"btn btn_ghost",onClick:q[1]||(q[1]=J=>j.value?K:ee())},"Отправить"))]))]),y.value==="wait"&&r.unref(u).kiosk_show_loyalty_phone_input_button?(r.openBlock(),r.createElementBlock("div",r1,[r.createElementVNode("button",{class:"card_phone_auth_button",onClick:V},"Войти по номеру телефона")])):r.createCommentVNode("",!0)])]),r.createElementVNode("div",i1,r.toDisplayString(Z.value),1)],2)):r.createCommentVNode("",!0)],64))}}),o1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJJTk5PIGJhbmsgY2FyZCBpY29uIj4NCiAgPGRlZnM+DQogICAgPGxpbmVhckdyYWRpZW50IGlkPSJibGFja0dyYWQiIHgxPSIwIiB5MT0iMCIgeDI9IjEiIHkyPSIxIj4NCiAgICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMxQTFBMUEiLz4NCiAgICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPg0KICAgIDwvbGluZWFyR3JhZGllbnQ+DQoNCiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InNoaW5lIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMCI+DQogICAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjRkZGRkZGIiBzdG9wLW9wYWNpdHk9IjAiLz4NCiAgICAgIDxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjRkZGRkZGIiBzdG9wLW9wYWNpdHk9IjAuMTgiLz4NCiAgICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI0ZGRkZGRiIgc3RvcC1vcGFjaXR5PSIwIi8+DQogICAgPC9saW5lYXJHcmFkaWVudD4NCg0KICAgIDxmaWx0ZXIgaWQ9InNoYWRvdyIgeD0iLTMwJSIgeT0iLTMwJSIgd2lkdGg9IjE2MCUiIGhlaWdodD0iMTYwJSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iNiIgc3RkRGV2aWF0aW9uPSI2IiBmbG9vZC1jb2xvcj0iIzAwMCIgZmxvb2Qtb3BhY2l0eT0iMC4yNSIvPg0KICAgIDwvZmlsdGVyPg0KICA8L2RlZnM+DQoNCiAgPCEtLSBDZW50ZXJlZCBjYXJkIC0tPg0KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg3LjUgMjMpIHJvdGF0ZSgtMTIpIiBmaWx0ZXI9InVybCgjc2hhZG93KSI+DQogICAgPCEtLSBjYXJkIGJvZHkgLS0+DQogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijg1IiBoZWlnaHQ9IjU0IiByeD0iMTAiIGZpbGw9InVybCgjYmxhY2tHcmFkKSIvPg0KDQogICAgPCEtLSB0b3Agc3RyaXBlIC0tPg0KICAgIDxyZWN0IHg9IjAiIHk9IjgiIHdpZHRoPSI4NSIgaGVpZ2h0PSI4IiByeD0iNCIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMC4wNSIvPg0KDQogICAgPCEtLSBjaGlwIC0tPg0KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwIDI3KSI+DQogICAgICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTUiIHJ4PSIzIiBmaWxsPSIjQ0ZBRTcwIi8+DQogICAgICA8cmVjdCB4PSIyLjUiIHk9IjMuNSIgd2lkdGg9IjEzIiBoZWlnaHQ9IjEuMiIgZmlsbD0iIzlFODM0RSIvPg0KICAgICAgPHJlY3QgeD0iMi41IiB5PSI2LjUiIHdpZHRoPSIxMyIgaGVpZ2h0PSIxLjIiIGZpbGw9IiM5RTgzNEUiLz4NCiAgICAgIDxyZWN0IHg9IjIuNSIgeT0iOS41IiB3aWR0aD0iMTMiIGhlaWdodD0iMS4yIiBmaWxsPSIjOUU4MzRFIi8+DQogICAgICA8cmVjdCB4PSI4LjUiIHk9IjAiIHdpZHRoPSIxLjUiIGhlaWdodD0iMTUiIGZpbGw9IiM5RTgzNEUiIG9wYWNpdHk9IjAuNiIvPg0KICAgIDwvZz4NCg0KICAgIDwhLS0gSU5OTyBsb2dvIC0tPg0KICAgIDx0ZXh0IHg9IjYxIiB5PSIzOSINCiAgICAgICAgICBmb250LWZhbWlseT0ic3lzdGVtLXVpLCAtYXBwbGUtc3lzdGVtLCBTZWdvZSBVSSwgUm9ib3RvLCBBcmlhbCwgc2Fucy1zZXJpZiINCiAgICAgICAgICBmb250LXNpemU9IjEzIg0KICAgICAgICAgIGZvbnQtd2VpZ2h0PSI4MDAiDQogICAgICAgICAgbGV0dGVyLXNwYWNpbmc9IjEuMiINCiAgICAgICAgICBmaWxsPSIjRkZGRkZGIg0KICAgICAgICAgIG9wYWNpdHk9IjAuOTUiDQogICAgICAgICAgdGV4dC1hbmNob3I9Im1pZGRsZSI+DQogICAgICBpbm5vDQogICAgPC90ZXh0Pg0KDQogICAgPCEtLSBzaGluZSAtLT4NCiAgICA8cGF0aCBkPSJNLTggNiBMMjUgLTMgTDk0IDQ3IEw2MCA2MiBMLTggMjUgWiIgZmlsbD0idXJsKCNzaGluZSkiLz4NCiAgPC9nPg0KPC9zdmc+",fa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%20width='100'%20height='100'%20fill='none'%3e%3c!--%20Big%20QR%20corners%20(outer%20shape%20with%20inner%20cutout)%20--%3e%3cpath%20fill='currentColor'%20fill-rule='evenodd'%20d='%20M72%200H163C202.765%200%20235%2032.235%20235%2072V163C235%20202.765%20202.765%20235%20163%20235H72C32.235%20235%200%20202.765%200%20163V72C0%2032.235%2032.235%200%2072%200Z%20M102%2086H133C141.837%2086%20149%2093.163%20149%20102V133C149%20141.837%20141.837%20149%20133%20149H102C93.163%20149%2086%20141.837%2086%20133V102C86%2093.163%2093.163%2086%20102%2086Z%20'/%3e%3cpath%20fill='currentColor'%20fill-rule='evenodd'%20d='%20M349%200H440C479.765%200%20512%2032.235%20512%2072V163C512%20202.765%20479.765%20235%20440%20235H349C309.235%20235%20277%20202.765%20277%20163V72C277%2032.235%20309.235%200%20349%200Z%20M379%2086H410C418.837%2086%20426%2093.163%20426%20102V133C426%20141.837%20418.837%20149%20410%20149H379C370.163%20149%20363%20141.837%20363%20133V102C363%2093.163%20370.163%2086%20379%2086Z%20'/%3e%3cpath%20fill='currentColor'%20fill-rule='evenodd'%20d='%20M72%20277H163C202.765%20277%20235%20309.235%20235%20349V440C235%20479.765%20202.765%20512%20163%20512H72C32.235%20512%200%20479.765%200%20440V349C0%20309.235%2032.235%20277%2072%20277Z%20M102%20363H133C141.837%20363%20149%20370.163%20149%20379V410C149%20418.837%20141.837%20426%20133%20426H102C93.163%20426%2086%20418.837%2086%20410V379C86%20370.163%2093.163%20363%20102%20363Z%20'/%3e%3c!--%20Small%20modules%20--%3e%3crect%20x='277'%20y='277'%20width='86'%20height='86'%20rx='26'%20fill='currentColor'/%3e%3crect%20x='426'%20y='277'%20width='86'%20height='86'%20rx='28'%20fill='currentColor'/%3e%3crect%20x='277'%20y='426'%20width='86'%20height='86'%20rx='26'%20fill='currentColor'/%3e%3c!--%20Center%20dot%20--%3e%3ccircle%20cx='394.17'%20cy='394.17'%20r='33'%20fill='currentColor'/%3e%3c/svg%3e",s1=["src"],a1={class:"header_description"},l1=We(r.defineComponent({__name:"PaymentBoxes",props:{configPage:{},comment:{},cartItems:{},isAuthorized:{type:Boolean},orderId:{default:null},signal:{},provider:{}},emits:["select"],setup(a,{emit:l}){const i=a,o=l,u=vt(),f=Ut(),{selectedProvider:m,isButtonDisabled:p}=we.storeToRefs(u),{isAddToCard:_}=we.storeToRefs(f),x={default:o1,SBP:fa},C=async()=>{m.value=i.provider;const I=i.provider.front_type;I&&(_.value=!1,p.value=!0,o("select",I),lo(i.orderId,i.provider.type))},y=r.computed(()=>x[i.provider.front_type]||x.default);return(I,B)=>(r.openBlock(),r.createElementBlock("div",{class:"payment_boxes_wrapper",onClick:C},[r.createElementVNode("img",{class:"picture",src:y.value},null,8,s1),r.createElementVNode("div",a1,[r.createElementVNode("b",null,r.toDisplayString(a.provider.name),1),r.createElementVNode("p",null,r.toDisplayString(a.provider.description),1)]),r.createVNode(wr)]))}}),[["__scopeId","data-v-c4a0ed62"]]),c1={key:0,class:"wrapper_cart_payment"},d1={class:"wrapper_paid"},u1={class:"to_be_paid"},f1=We(r.defineComponent({__name:"CartPayment",props:{configPage:{},comment:{},cartItems:{},isAuthorized:{type:Boolean},orderId:{},signal:{}},emits:["selectPayment"],setup(a,{emit:l}){const i=vt(),o=lt(),u=a,{totalPrice_lib:f,countBonus:m}=we.storeToRefs(o),p=l,_=C=>{p("selectPayment",C)},x=()=>{p("selectPayment","")};return(C,y)=>r.unref(i).providerTypes.length>1?(r.openBlock(),r.createElementBlock("div",c1,[y[2]||(y[2]=r.createElementVNode("h2",null,"Выберите способ оплаты",-1)),y[3]||(y[3]=r.createElementVNode("p",{class:"description_payment"},"Можно изменить позже до оплаты",-1)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).providerTypes,(I,B)=>(r.openBlock(),r.createElementBlock("div",{key:B},[r.createVNode(l1,{provider:I,"config-page":u.configPage,comment:u.comment,"cart-items":u.cartItems,"is-authorized":u.isAuthorized,"order-id":u.orderId,signal:u.signal,onSelect:_},null,8,["provider","config-page","comment","cart-items","is-authorized","order-id","signal"])]))),128)),r.createElementVNode("div",d1,[r.createElementVNode("p",u1,[y[0]||(y[0]=r.createTextVNode("К оплате ",-1)),r.createVNode(mt,{price:r.unref(f)-r.unref(m),fixedFloat:2},null,8,["price"]),y[1]||(y[1]=r.createTextVNode(" ₽",-1))]),r.createVNode(cn,{textButtonDefault:"Назад",onClick:x,class:"btn_payment"})])])):r.createCommentVNode("",!0)}}),[["__scopeId","data-v-f7657882"]]),h1={class:"start_page"},m1=["src"],g1={class:"wrap"},p1={class:"wrap_box"},x1={class:"title_fiscal_order"},_1={class:"wrapper_accept"},w1={ref:"barRef",class:"bar_complete","aria-hidden":"true"},C1=We(r.defineComponent({__name:"CartCompleteKioskSuccess",props:{mediaUrl:{},orderNumber:{}},setup(a){const l=lt(),i=vt(),o=Ut(),u=At(),{cartProducts_lib:f}=we.storeToRefs(l),{orderNumber:m,orderCompleted_lib:p,selectedOrderType:_}=we.storeToRefs(i),{is_startPage:x}=we.storeToRefs(o),{mediaUrl:C}=An(()=>u.itemThemes.kiosk_preloader?"preloader":null),y=Ne.useRouter(),I=Ne.useRoute();let B=null;r.onMounted(()=>{B=setTimeout(()=>{x.value=!u.itemThemes.kiosk_disable_lock_screen,_.value=null,l.isOrderTypeSubmited=!1,y.replace(`/${I.params.orgId}`)},1e4)});const T=()=>{mr(["cart","authTokensAccess","authTokensRefresh"]),f.value=[],p.value=null,_.value=null,l.isOrderTypeSubmited=!1,i.clearCard(),l.profile=null,y.replace(`/${I.params.orgId}`)};return r.onUnmounted(()=>{B&&clearInterval(B)}),(v,k)=>(r.openBlock(),r.createElementBlock("div",h1,[r.withDirectives((r.openBlock(),r.createElementBlock("video",{loop:"",autoplay:"",muted:"",playsinline:"",key:r.unref(C)},[r.createElementVNode("source",{src:r.unref(C)||"",type:"video/webm"},null,8,m1)])),[[r.unref(Cr)]]),k[4]||(k[4]=r.createElementVNode("div",{class:"start_img_black"},null,-1)),r.createElementVNode("div",g1,[r.createElementVNode("div",p1,[k[1]||(k[1]=r.createElementVNode("div",{class:"icon","aria-hidden":"true"},[r.createElementVNode("svg",{viewBox:"0 0 24 24"},[r.createElementVNode("path",{d:"M20 6L9 17l-5-5"})])],-1)),k[2]||(k[2]=r.createElementVNode("h1",null," Заказ успешно оплачен ",-1)),r.createElementVNode("p",x1,"№ "+r.toDisplayString(r.unref(m)),1),k[3]||(k[3]=r.createElementVNode("p",{class:"title_fiscal_completed"},"Спасибо! Заказ передан в работу.",-1)),r.createElementVNode("div",_1,[r.createElementVNode("button",{class:"btn","aria-label":"Новый заказ",onClick:T},[k[0]||(k[0]=r.createElementVNode("span",{class:"label"},"Новый заказ",-1)),r.createElementVNode("span",w1,null,512)])])])])]))}}),[["__scopeId","data-v-79c00acf"]]),E1={class:"fiscal_wrapper"},y1=["src"],b1={class:"fiscal_container"},A1={class:"fiscal_stage","aria-hidden":"true"},S1={class:"fiscal_printer"},I1={class:"fiscal_receipt"},N1=["src"],T1=We(r.defineComponent({__name:"CartCompleteFiscal",setup(a){const l=At(),{mediaUrl:i}=An(()=>l.itemThemes.kiosk_preloader?"preloader":null);return(o,u)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",E1,[r.withDirectives((r.openBlock(),r.createElementBlock("video",{loop:"",autoplay:"",muted:"",playsinline:"",key:r.unref(i)},[r.createElementVNode("source",{src:r.unref(i)||"",type:"video/webm"},null,8,y1)])),[[r.unref(Cr)]])]),r.createElementVNode("div",b1,[r.createElementVNode("div",A1,[r.createElementVNode("div",S1,[u[2]||(u[2]=r.createElementVNode("div",{class:"fiscal_led"},null,-1)),u[3]||(u[3]=r.createElementVNode("div",{class:"fiscal_slot"},null,-1)),r.createElementVNode("div",I1,[u[0]||(u[0]=r.createElementVNode("div",{class:"fiscal_tear"},null,-1)),r.createElementVNode("img",{class:"fiscal_logo_img",src:r.unref(l).itemThemes.logo||"",alt:"Логотип"},null,8,N1),u[1]||(u[1]=r.createStaticVNode('<div class="fiscal_line accent" data-v-3f29ae57></div><div class="fiscal_line" data-v-3f29ae57></div><div class="fiscal_line sm" data-v-3f29ae57></div><div class="fiscal_line" data-v-3f29ae57></div><div class="fiscal_line sm" data-v-3f29ae57></div><div class="fiscal_line" data-v-3f29ae57></div><div class="fiscal_line sm" data-v-3f29ae57></div>',7))])])]),u[4]||(u[4]=r.createElementVNode("h1",{class:"fiscal_title_fiscal"},"После оплаты дождитесь печати второго чека для получения заказа",-1))])],64))}}),[["__scopeId","data-v-3f29ae57"]]),k1={},R1={class:"center"};function B1(a,l){return r.openBlock(),r.createElementBlock("div",R1,[...l[0]||(l[0]=[r.createStaticVNode('<div class="stack" data-v-f0859fd1><h1 class="title_fiscal" data-v-f0859fd1>Приложите карту для оплаты</h1><p class="reminder" data-v-f0859fd1>Держите карту у терминала, пока операция не завершится.</p><div class="stageCard" aria-hidden="true" data-v-f0859fd1><div class="waves" data-v-f0859fd1><span data-v-f0859fd1></span><span data-v-f0859fd1></span><span data-v-f0859fd1></span></div><div class="nfc" data-v-f0859fd1><svg viewBox="0 0 24 24" data-v-f0859fd1><path d="M6 8c2.5 2.5 2.5 5.5 0 8" data-v-f0859fd1></path><path d="M10 6c4 4 4 8 0 12" data-v-f0859fd1></path><path d="M14 4c5.5 5.5 5.5 11 0 16" data-v-f0859fd1></path></svg></div><div class="card" data-v-f0859fd1><div class="logo" data-v-f0859fd1>inno.</div><div class="chip" data-v-f0859fd1></div><div class="digits" data-v-f0859fd1>4815 1623 4200 0900</div><div class="holder" data-v-f0859fd1>Гость</div></div></div></div>',1)])])}const O1=We(k1,[["render",B1],["__scopeId","data-v-f0859fd1"]]);/*!
|
|
7
7
|
* qrcode.vue v3.6.0
|
|
8
8
|
* A Vue.js component to generate QRCode. Both support Vue 2 and Vue 3
|
|
9
9
|
* © 2017-PRESENT @scopewu(https://github.com/scopewu)
|