@inno_user/inno_clouds_lib 8.3.1 → 8.3.3

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.
Files changed (32) hide show
  1. package/dist/@inno_user/inno_clouds_lib.css +1 -1
  2. package/dist/@inno_user/inno_clouds_lib.es.js +4661 -7367
  3. package/dist/@inno_user/inno_clouds_lib.umd.js +6 -27
  4. package/dist/components/cardMain/CardMain.vue.d.ts +10 -73
  5. package/dist/components/recommendation/Recommendation.vue.d.ts +1 -0
  6. package/dist/hooks/useAnimationLoader/AnimationLoader.vue.d.ts +1 -1
  7. package/dist/hooks/useProductImage/useProductImage.d.ts +3 -3
  8. package/dist/index.d.ts +12 -13
  9. package/dist/requests.d.ts +3 -3
  10. package/dist/semantics/cardProduct/sectionModifiers/SectionModifiers.vue.d.ts +7 -4
  11. package/dist/store/card.d.ts +35 -77
  12. package/dist/store/cart.d.ts +2 -11
  13. package/dist/store/images.d.ts +1 -7
  14. package/dist/store/main.d.ts +19 -34
  15. package/dist/store/modules.d.ts +30 -0
  16. package/dist/store/theme.d.ts +6 -6
  17. package/dist/types/iCardProduct.d.ts +5 -15
  18. package/dist/types/iIndexedDB.d.ts +7 -10
  19. package/dist/types/iMain.d.ts +1 -1
  20. package/dist/ui/bottomSheet/BottomSheet.vue.d.ts +86 -0
  21. package/dist/ui/bottomSheet/index.d.ts +1 -0
  22. package/dist/ui/bottomSheet/useSnapPoints.d.ts +8 -0
  23. package/dist/ui/bottomSheet/utils.d.ts +6 -0
  24. package/dist/ui/notificationWindow/NotificationWindow.vue.d.ts +3 -9
  25. package/dist/utils/indexedDB.d.ts +9 -8
  26. package/dist/utils/updateIndexedDB.d.ts +1 -0
  27. package/package.json +5 -4
  28. package/dist/assets/iconsDynamic/Close.vue.d.ts +0 -3
  29. package/dist/components/modal/CartDeleteConfirm.vue.d.ts +0 -7
  30. package/dist/composables/useModal.d.ts +0 -7
  31. package/dist/semantics/windows/popupWindowDraggable/PopupWindowDraggable.vue.d.ts +0 -32
  32. package/dist/store/modals.d.ts +0 -20
@@ -1,27 +1,6 @@
1
- (function(X,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("vue-router"),require("pinia"),require("vue")):typeof define=="function"&&define.amd?define(["exports","vue-router","pinia","vue"],re):(X=typeof globalThis<"u"?globalThis:X||self,re(X.InnoCloudsLib={},X.VueRouter,X.Pinia,X.Vue))})(this,function(X,re,J,o){"use strict";var yg=Object.defineProperty;var $c=X=>{throw TypeError(X)};var bg=(X,re,J)=>re in X?yg(X,re,{enumerable:!0,configurable:!0,writable:!0,value:J}):X[re]=J;var me=(X,re,J)=>bg(X,typeof re!="symbol"?re+"":re,J),Ic=(X,re,J)=>re.has(X)||$c("Cannot "+J);var Et=(X,re,J)=>(Ic(X,re,"read from private field"),J?J.call(X):re.get(X)),$i=(X,re,J)=>re.has(X)?$c("Cannot add the same private member more than once"):re instanceof WeakSet?re.add(X):re.set(X,J),zt=(X,re,J,o)=>(Ic(X,re,"write to private field"),o?o.call(X,J):re.set(X,J),J);var ks=(X,re,J,o)=>({set _(Ii){zt(X,re,Ii,J)},get _(){return Et(X,re,o)}});var it,pn,In;function Ii(i){return i}const Lc=[];function Fc(){return re.createRouter({history:re.createWebHistory(),routes:Lc})}const dr=i=>{if(!i)return 0;if((i.price===0||i.price===null)&&i.sizes&&i.sizes.length>0){const e=i.sizes.find(t=>t.is_default===!0);return e?e.price:i.sizes.length>1&&i.sizes[1].price||i.sizes[0].price}return i.price};class fr extends Error{}fr.prototype.name="InvalidTokenError";function zc(i){return decodeURIComponent(atob(i).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Uc(i){let e=i.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return zc(e)}catch{return atob(e)}}function Ss(i,e){if(typeof i!="string")throw new fr("Invalid token specified: must be a string");e||(e={});const t=e.header===!0?0:1,n=i.split(".")[t];if(typeof n!="string")throw new fr(`Invalid token specified: missing part #${t+1}`);let r;try{r=Uc(n)}catch(s){throw new fr(`Invalid token specified: invalid base64 for part #${t+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new fr(`Invalid token specified: invalid json for part #${t+1} (${s.message})`)}}const Hc=(i,e)=>{if(typeof window<"u"){const t=localStorage.getItem(i);return t?JSON.parse(t):e}return e},qc=(i,e)=>{if(typeof window<"u"){const t=localStorage.getItem(i);if(t)try{return Ss(JSON.parse(t))}catch(n){return console.error("Failed to decode JWT:",n),e}}return e},Cs=(i,e,t="normal")=>{const n=o.ref(t==="jwt"?qc(i,e):Hc(i,e));return o.watchEffect(()=>{n.value===null||n.value===void 0?localStorage.removeItem(i):t!=="jwt"&&localStorage.setItem(i,JSON.stringify(n.value))}),n},Fn=i=>{i.forEach(e=>{try{localStorage.removeItem(e)}catch(t){console.error(`Ошибка при удалении ключа "${e}":`,t)}})},Le=J.defineStore("mainLib",()=>{const i=o.ref(),e=o.ref(!1),t=o.ref(localStorage.getItem("kiosk_timeout")),n=o.ref(0),r=o.ref(!1),s=o.ref(sessionStorage.getItem("is_adult")==="true"),a=o.ref([]),l=o.ref([]),c=o.ref(),u=o.ref(""),d=o.ref(0),h=o.ref(!1),_=o.ref(!1),f=o.ref(localStorage.getItem("apiKey")===null),m=o.ref(!1),p=o.ref({textNotification:""}),g=N=>{n.value=N,localStorage.setItem("kiosk_timeout",N)},y=N=>{e.value=N},w=o.ref(null),x=o.computed(()=>a.value.reduce((N,E)=>{let M=0,A=0;return E.group_modifiers&&(M=E.group_modifiers.reduce(($,V)=>V.modifiers?$+V.modifiers.reduce((F,z)=>F+z.old_price*z.amount,0):0,0)*E.amount),E.modifiers&&(A=E.modifiers.reduce(($,V)=>$+V.old_price*V.amount,0)*E.amount),N+E.old_price*E.amount+M+A},0)),T=o.computed({get:()=>a.value.length===0?0:w.value&&w.value!==0?w.value:a.value.reduce((N,E)=>{const M=dr(E)*E.amount;let A=0,$=0;return E.group_modifiers&&(A=E.group_modifiers.reduce((V,F)=>F.modifiers?V+F.modifiers.reduce((z,W)=>z+W.price*W.amount,0):0,0)*E.amount),E.modifiers&&($=E.modifiers.reduce((V,F)=>V+F.price*F.amount,0)*E.amount),N+M+A+$},0),set(N){w.value=N}}),S=N=>{d.value=N,localStorage.removeItem("bonus"),Cs("bonus",d.value)},B=N=>{Fn(N)},k=N=>{N={...N,idSystem:crypto.randomUUID()};const E=C(N);a.value.push(E),b()},b=()=>{try{if(!a.value||a.value.length===0){localStorage.removeItem("cart");return}localStorage.setItem("cart",JSON.stringify(o.toRaw(a.value)))}catch(N){console.error("Failed to update cart in localStorage:",N)}},C=N=>o.reactive({...N,amount:N.amount??1,price:N.old_price,new_price:null,total_new_price:null,discounts:[],modifiers:(N.modifiers||[]).map(E=>o.reactive({...E,price:E.old_price,new_price:null,total_new_price:null})),group_modifiers:(N.group_modifiers||[]).map(E=>o.reactive({...E,modifiers:(E.modifiers||[]).map(M=>o.reactive({...M,price:M.old_price,new_price:null,total_new_price:null}))}))}),P=N=>{const E=a.value.find(M=>M.idSystem===N);E&&(E.amount+=1),b()},O=N=>{const E=a.value.find(M=>M.idSystem===N);E&&(E.amount>=1&&(E.amount-=1),b())},H=()=>{try{const N=localStorage.getItem("cart");if(N){const E=JSON.parse(N);a.value.splice(0,a.value.length,...E.map(C)),w.value=null}}catch(N){console.error("Failed to load cart from localStorage:",N)}};return H(),{cartProducts_lib:a,activeScrolling_lib:l,config_lib:c,totalPrice_lib:T,initialCartPrice_lib:x,is_notification_lib:m,notificationData_lib:p,xApiKey_lib:u,countBonus:d,toggleDrum:e,is_showApiKey:f,openApiKey:h,kiosk_timeout:t,kiosk_FirstTimeout:n,is_OpenLoyal:_,profile:i,is_18_above_content:r,is18Allowed:s,removeFromLocalStorage:B,setKioskTimeout:g,setBonus:S,setStateDrum:y,addToCart:k,plusAmount:P,minusAmount:O,loadCart:H,deleteItemFromCart:N=>{if(N){const E=a.value.findIndex(M=>M.idSystem===N);if(E===-1)return;a.value.splice(E,1),w.value=null,b()}else a.value=[],b()},makeProductFullyReactive:C}});function Yr(i){"@babel/helpers - typeof";return Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yr(i)}var Wc=/^\s+/,jc=/\s+$/;function Q(i,e){if(i=i||"",e=e||{},i instanceof Q)return i;if(!(this instanceof Q))return new Q(i,e);var t=Xc(i);this._originalInput=i,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}Q.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,n,r,s,a,l;return t=e.r/255,n=e.g/255,r=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?l=r/12.92:l=Math.pow((r+.055)/1.055,2.4),.2126*s+.7152*a+.0722*l},setAlpha:function(e){return this._a=Ps(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ts(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ts(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Es(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Es(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return vs(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Jc(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Te(this._r,255)*100)+"%",g:Math.round(Te(this._g,255)*100)+"%",b:Math.round(Te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Te(this._r,255)*100)+"%, "+Math.round(Te(this._g,255)*100)+"%, "+Math.round(Te(this._b,255)*100)+"%)":"rgba("+Math.round(Te(this._r,255)*100)+"%, "+Math.round(Te(this._g,255)*100)+"%, "+Math.round(Te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:cu[vs(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Ns(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var s=Q(e);n="#"+Ns(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0,s=!t&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Q(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(tu,arguments)},brighten:function(){return this._applyModification(nu,arguments)},darken:function(){return this._applyModification(ru,arguments)},desaturate:function(){return this._applyModification(Zc,arguments)},saturate:function(){return this._applyModification(Qc,arguments)},greyscale:function(){return this._applyModification(eu,arguments)},spin:function(){return this._applyModification(iu,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(au,arguments)},complement:function(){return this._applyCombination(ou,arguments)},monochromatic:function(){return this._applyCombination(lu,arguments)},splitcomplement:function(){return this._applyCombination(su,arguments)},triad:function(){return this._applyCombination(Ms,[3])},tetrad:function(){return this._applyCombination(Ms,[4])}},Q.fromRatio=function(i,e){if(Yr(i)=="object"){var t={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?t[n]=i[n]:t[n]=hr(i[n]));i=t}return Q(i,e)};function Xc(i){var e={r:0,g:0,b:0},t=1,n=null,r=null,s=null,a=!1,l=!1;return typeof i=="string"&&(i=hu(i)),Yr(i)=="object"&&(Ut(i.r)&&Ut(i.g)&&Ut(i.b)?(e=Yc(i.r,i.g,i.b),a=!0,l=String(i.r).substr(-1)==="%"?"prgb":"rgb"):Ut(i.h)&&Ut(i.s)&&Ut(i.v)?(n=hr(i.s),r=hr(i.v),e=Kc(i.h,n,r),a=!0,l="hsv"):Ut(i.h)&&Ut(i.s)&&Ut(i.l)&&(n=hr(i.s),s=hr(i.l),e=Gc(i.h,n,s),a=!0,l="hsl"),i.hasOwnProperty("a")&&(t=i.a)),t=Ps(t),{ok:a,format:i.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function Yc(i,e,t){return{r:Te(i,255)*255,g:Te(e,255)*255,b:Te(t,255)*255}}function Es(i,e,t){i=Te(i,255),e=Te(e,255),t=Te(t,255);var n=Math.max(i,e,t),r=Math.min(i,e,t),s,a,l=(n+r)/2;if(n==r)s=a=0;else{var c=n-r;switch(a=l>.5?c/(2-n-r):c/(n+r),n){case i:s=(e-t)/c+(e<t?6:0);break;case e:s=(t-i)/c+2;break;case t:s=(i-e)/c+4;break}s/=6}return{h:s,s:a,l}}function Gc(i,e,t){var n,r,s;i=Te(i,360),e=Te(e,100),t=Te(t,100);function a(u,d,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?u+(d-u)*6*h:h<1/2?d:h<2/3?u+(d-u)*(2/3-h)*6:u}if(e===0)n=r=s=t;else{var l=t<.5?t*(1+e):t+e-t*e,c=2*t-l;n=a(c,l,i+1/3),r=a(c,l,i),s=a(c,l,i-1/3)}return{r:n*255,g:r*255,b:s*255}}function Ts(i,e,t){i=Te(i,255),e=Te(e,255),t=Te(t,255);var n=Math.max(i,e,t),r=Math.min(i,e,t),s,a,l=n,c=n-r;if(a=n===0?0:c/n,n==r)s=0;else{switch(n){case i:s=(e-t)/c+(e<t?6:0);break;case e:s=(t-i)/c+2;break;case t:s=(i-e)/c+4;break}s/=6}return{h:s,s:a,v:l}}function Kc(i,e,t){i=Te(i,360)*6,e=Te(e,100),t=Te(t,100);var n=Math.floor(i),r=i-n,s=t*(1-e),a=t*(1-r*e),l=t*(1-(1-r)*e),c=n%6,u=[t,a,s,s,l,t][c],d=[l,t,t,a,s,s][c],h=[s,s,l,t,t,a][c];return{r:u*255,g:d*255,b:h*255}}function vs(i,e,t,n){var r=[Tt(Math.round(i).toString(16)),Tt(Math.round(e).toString(16)),Tt(Math.round(t).toString(16))];return n&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Jc(i,e,t,n,r){var s=[Tt(Math.round(i).toString(16)),Tt(Math.round(e).toString(16)),Tt(Math.round(t).toString(16)),Tt(As(n))];return r&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Ns(i,e,t,n){var r=[Tt(As(n)),Tt(Math.round(i).toString(16)),Tt(Math.round(e).toString(16)),Tt(Math.round(t).toString(16))];return r.join("")}Q.equals=function(i,e){return!i||!e?!1:Q(i).toRgbString()==Q(e).toRgbString()},Q.random=function(){return Q.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Zc(i,e){e=e===0?0:e||10;var t=Q(i).toHsl();return t.s-=e/100,t.s=Gr(t.s),Q(t)}function Qc(i,e){e=e===0?0:e||10;var t=Q(i).toHsl();return t.s+=e/100,t.s=Gr(t.s),Q(t)}function eu(i){return Q(i).desaturate(100)}function tu(i,e){e=e===0?0:e||10;var t=Q(i).toHsl();return t.l+=e/100,t.l=Gr(t.l),Q(t)}function nu(i,e){e=e===0?0:e||10;var t=Q(i).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Q(t)}function ru(i,e){e=e===0?0:e||10;var t=Q(i).toHsl();return t.l-=e/100,t.l=Gr(t.l),Q(t)}function iu(i,e){var t=Q(i).toHsl(),n=(t.h+e)%360;return t.h=n<0?360+n:n,Q(t)}function ou(i){var e=Q(i).toHsl();return e.h=(e.h+180)%360,Q(e)}function Ms(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Q(i).toHsl(),n=[Q(i)],r=360/e,s=1;s<e;s++)n.push(Q({h:(t.h+s*r)%360,s:t.s,l:t.l}));return n}function su(i){var e=Q(i).toHsl(),t=e.h;return[Q(i),Q({h:(t+72)%360,s:e.s,l:e.l}),Q({h:(t+216)%360,s:e.s,l:e.l})]}function au(i,e,t){e=e||6,t=t||30;var n=Q(i).toHsl(),r=360/t,s=[Q(i)];for(n.h=(n.h-(r*e>>1)+720)%360;--e;)n.h=(n.h+r)%360,s.push(Q(n));return s}function lu(i,e){e=e||6;for(var t=Q(i).toHsv(),n=t.h,r=t.s,s=t.v,a=[],l=1/e;e--;)a.push(Q({h:n,s:r,v:s})),s=(s+l)%1;return a}Q.mix=function(i,e,t){t=t===0?0:t||50;var n=Q(i).toRgb(),r=Q(e).toRgb(),s=t/100,a={r:(r.r-n.r)*s+n.r,g:(r.g-n.g)*s+n.g,b:(r.b-n.b)*s+n.b,a:(r.a-n.a)*s+n.a};return Q(a)},Q.readability=function(i,e){var t=Q(i),n=Q(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},Q.isReadable=function(i,e,t){var n=Q.readability(i,e),r,s;switch(s=!1,r=pu(t),r.level+r.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},Q.mostReadable=function(i,e,t){var n=null,r=0,s,a,l,c;t=t||{},a=t.includeFallbackColors,l=t.level,c=t.size;for(var u=0;u<e.length;u++)s=Q.readability(i,e[u]),s>r&&(r=s,n=Q(e[u]));return Q.isReadable(i,n,{level:l,size:c})||!a?n:(t.includeFallbackColors=!1,Q.mostReadable(i,["#fff","#000"],t))};var Vi=Q.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},cu=Q.hexNames=uu(Vi);function uu(i){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Ps(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Te(i,e){du(i)&&(i="100%");var t=fu(i);return i=Math.min(e,Math.max(0,parseFloat(i))),t&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function Gr(i){return Math.min(1,Math.max(0,i))}function st(i){return parseInt(i,16)}function du(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function fu(i){return typeof i=="string"&&i.indexOf("%")!=-1}function Tt(i){return i.length==1?"0"+i:""+i}function hr(i){return i<=1&&(i=i*100+"%"),i}function As(i){return Math.round(parseFloat(i)*255).toString(16)}function Bs(i){return st(i)/255}var vt=function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+i+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ut(i){return!!vt.CSS_UNIT.exec(i)}function hu(i){i=i.replace(Wc,"").replace(jc,"").toLowerCase();var e=!1;if(Vi[i])i=Vi[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=vt.rgb.exec(i))?{r:t[1],g:t[2],b:t[3]}:(t=vt.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=vt.hsl.exec(i))?{h:t[1],s:t[2],l:t[3]}:(t=vt.hsla.exec(i))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=vt.hsv.exec(i))?{h:t[1],s:t[2],v:t[3]}:(t=vt.hsva.exec(i))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=vt.hex8.exec(i))?{r:st(t[1]),g:st(t[2]),b:st(t[3]),a:Bs(t[4]),format:e?"name":"hex8"}:(t=vt.hex6.exec(i))?{r:st(t[1]),g:st(t[2]),b:st(t[3]),format:e?"name":"hex"}:(t=vt.hex4.exec(i))?{r:st(t[1]+""+t[1]),g:st(t[2]+""+t[2]),b:st(t[3]+""+t[3]),a:Bs(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=vt.hex3.exec(i))?{r:st(t[1]+""+t[1]),g:st(t[2]+""+t[2]),b:st(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function pu(i){var e,t;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),t=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}const Ge=J.defineStore("themeLib",()=>{const i=Le(),{config_lib:e}=J.storeToRefs(i),t=o.ref({id:"",created_at:null,logo:null,primary_color:null,accent_color:null,accent_light_color:null,accent_dark_color:null,bg_button_color:null,inactive_button_color:null,cards_color:null,text_color:null,nonworking_bg_color:null,splash_image_url:null,splash_video:null,splash_duration:0,splash_type:null,fallback_image:null,adult_disclaimer_text:null,adult_disclaimer_image:null,kiosk_banner:null,kiosk_preloader:null,organization:"",gradientStyle:null,kiosk_inactivity_timeout:null,kiosk_show_loyalty_card_button:null,kiosk_show_loyalty_phone_input_button:null,show_order_comment:null,show_nutrition_in_cart:null,apply_custom_size_picker_fonts:null,size_picker_unselected_font_size:null,size_picker_selected_font_size:null});function n(r){if(!r)return;t.value={...r},document.documentElement.style.setProperty("--primaryColor",r.primary_color),document.documentElement.style.setProperty("--accentColor",r.accent_color),document.documentElement.style.setProperty("--accentLightColor",r.accent_light_color),document.documentElement.style.setProperty("--accentDarkColor",r.accent_dark_color),document.documentElement.style.setProperty("--bgButtonColor",r.bg_button_color),document.documentElement.style.setProperty("--inactiveButtonColor",r.inactive_button_color),document.documentElement.style.setProperty("--cardsColor",r.cards_color),document.documentElement.style.setProperty("--textColor",r.text_color),document.documentElement.style.setProperty("--nonworkingBgColor",r.nonworking_bg_color),r.apply_custom_size_picker_fonts&&r.size_picker_unselected_font_size&&r.size_picker_unselected_font_size>0&&document.documentElement.style.setProperty("--sizePickerUnselectedFontSize",`${r.size_picker_unselected_font_size}rem`),r.apply_custom_size_picker_fonts&&r.size_picker_selected_font_size&&r.size_picker_selected_font_size>0&&document.documentElement.style.setProperty("--sizePickerSelectedFontSize",`${r.size_picker_selected_font_size}rem`);const s=t.value.primary_color||"#F2F7FF",a=Q(s).setAlpha(.7).toRgbString(),l=`linear-gradient(to bottom, transparent 10%, ${a} 50%, ${s} 85%)`,c=`-webkit-linear-gradient(to bottom, transparent 10%, ${a} 50%, ${s} 85%)`;return t.value.gradientStyle={background:l,backgroundColor:c},t.value}return{itemThemes:t,updateColor:n}});class mu{constructor(e,t={}){me(this,"url");me(this,"options");me(this,"ws");me(this,"reconnectInterval");me(this,"listeners");me(this,"isConnected");me(this,"heartbeat");me(this,"pingTimeout");me(this,"pingResponseTimeout");me(this,"_shouldReconnect",!0);this.url=e,this.options=t,this.ws=null,this.reconnectInterval=5e3,this.pingResponseTimeout=5e3,this.listeners=new Map,this.isConnected=o.ref(!1)}connect(){if(this.ws&&this.ws.readyState===WebSocket.OPEN){console.warn("WebSocket already open");return}if(!this._shouldReconnect){console.warn("Reconnection disabled");return}const e=`${this.url}`;this.ws=new WebSocket(e),this.ws.onopen=()=>{console.warn("WebSocket connected"),this.isConnected.value=!0,this.emit("open"),this.heartbeat=setInterval(()=>this.sendPing(),3e5)},this.ws.onmessage=t=>{try{const n=JSON.parse(t.data);this.emit("message",n),n!=null&&n.type&&n.type!=="ping"&&clearTimeout(this.pingTimeout)}catch(n){console.error("Error parsing WebSocket message:",n)}},this.ws.onerror=t=>{console.error("WebSocket error:",t),this.emit("error",t),this.close(!0)},this.ws.onclose=()=>{this.isConnected.value=!1,console.warn("WebSocket closed"),this.emit("close"),clearInterval(this.heartbeat),clearTimeout(this.pingTimeout),this._shouldReconnect&&(console.log(`Reconnecting in ${this.reconnectInterval}ms...`),setTimeout(()=>this.connect(),this.reconnectInterval))}}sendPing(){var e;this.isConnected.value&&((e=this.ws)==null?void 0:e.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify({type:"ping"})),this.pingTimeout=setTimeout(()=>{console.warn("No pong received, reconnecting..."),this.close(!0),this.connect()},this.pingResponseTimeout)):console.warn("WebSocket not connected, cannot send ping")}send(e){var t;this.isConnected.value&&((t=this.ws)==null?void 0:t.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(e)):console.warn("WebSocket not connected")}close(e=!1){this.ws&&(this._shouldReconnect=!e,this.ws.close(),clearInterval(this.heartbeat),clearTimeout(this.pingTimeout),this.ws=null,this.listeners.clear())}on(e,t){this.listeners.has(e)||this.listeners.set(e,[]),this.listeners.get(e).push(t)}off(e,t){const n=this.listeners.get(e);n&&this.listeners.set(e,n.filter(r=>r!==t))}emit(e,t=null){const n=this.listeners.get(e);n&&n.forEach(r=>r(t))}getConnectionStatus(){return this.isConnected}}let Kr=new Map;function _u(i,e={}){var n;if(Kr.has(i)){const r=Kr.get(i);if(r.isConnected.value&&((n=r.ws)==null?void 0:n.readyState)===WebSocket.OPEN)return r;r.close(!0),Kr.delete(i)}const t=new mu(i,e);return Kr.set(i,t),t}const zn=J.defineStore("cartLib",()=>{const i=re.useRouter(),e=re.useRoute(),t=Ge(),n=Le(),{config_lib:r,countBonus:s,totalPrice_lib:a,initialCartPrice_lib:l,is18Allowed:c}=J.storeToRefs(n),{itemThemes:u}=J.storeToRefs(t),d=o.ref(!1),h=o.ref(""),_=o.ref(null),f=o.ref("wait"),m=o.ref(0),p=o.ref(null),g=o.ref(["failed_payment","failed_after_paid","failed","failed_after_sent","failed_after_sent_fiscalization","payment_initiation_retry"]),y=o.ref("Оплатить"),w=o.ref(null),x=o.ref(!1),T=o.ref(null),S=o.ref(0),B=o.ref(!1),k=o.ref({textNotification:""});let b=null;const C=F=>{B.value=!0,k.value.textNotification=F},P=async(F,z,W=!1)=>{if(!F)return console.warn("makeInitPaymentLinkRequest","orderId is empry");try{const K=await Qt.create().initPaymentLink(F,z);V(null,z),W?(b==null||b.close(!0),$(),V("profile",z)):z||window.location.replace(K.url)}catch(Z){T.value=null,n.loadCart(),Z.response.data.user_friendly_message?(C(Z.response.data.user_friendly_message),b==null||b.close(!0),z&&g.value.includes(Z.response.status)?V("retryPage",z):W?($(),V("",z)):(s.value=0,z||i.push(`/${e.params.orgId}/errorPayment`))):W?$():z||(s.value=0,i.push(`/${e.params.orgId}/errorPayment`))}},O=(F,z,W=!1)=>{b&&(b.off("open",K),b.off("message",ue),b.off("error",Y),b.close(!0));const Z=`wss://${r.value.area}/ws/order/${F}/`;b=_u(Z);function K(){console.log("WebSocket connection opened")}function ue(U){if(U!=null&&U.params)if(w.value=U,U.error)C(U.error),T.value=null,b==null||b.close(!0);else if(U.params.status==="sent"){if(r.value.has_rms_discount)return U.params.new_discounts&&(m.value=Number(U.params.new_total_cost)-l.value,a.value=Number(U.params.new_total_cost),C("К заказу были добавлены скидки")),x.value=!1;P(F,z,W)}else U.params.status==="payment_initiation_retry"||U.params.status==="fiscalized"?(T.value=2,Qt.create().orderPay(F).then(_e=>{p.value=_e.data.order_number}).catch(_e=>{_e.response.data.user_friendly_message&&(C(_e.response.data.user_friendly_message),b.close(!0),z?g.value.includes(_e.response.status)&&(V("retryPage",z),T.value=null):(s.value=0,i.push(`/${e.params.orgId}/errorPayment`),T.value=null))}).finally(()=>{x.value=!1})):U.params.status==="paid"?(T.value=3,b.close(!0),localStorage.removeItem("cart")):g.value.includes(U.params.status)&&(z?(V("retryPage",z),T.value=null):W?($(),C("Ошибка создания заказа. Пожалуйста попробуйте еще раз")):(s.value=0,i.push(`/${e.params.orgId}/errorPayment`),T.value=null))}function Y(U){console.error("WebSocket error:",U),b.close(!0),x.value=!1,T.value=null}b.on("open",K),b.on("message",ue),b.on("error",Y),b.connect()},H=o.computed(()=>!!_.value),R=F=>{f.value=F},N=F=>_.value=F,E=()=>{u.value.kiosk_show_loyalty_card_button&&u.value.kiosk_show_loyalty_phone_input_button?d.value=!0:!u.value.kiosk_show_loyalty_card_button&&u.value.kiosk_show_loyalty_phone_input_button?n.is_OpenLoyal=!0:d.value=!0,f.value="wait",h.value=""},M=()=>{d.value=!1,f.value="wait",h.value=""},A=()=>{_.value=null,h.value="",f.value="wait",M()},$=()=>{s.value=0,x.value=!1,T.value=null},V=(F=null,z=!1)=>{n.cartProducts_lib=[],Fn(["cart"]),z&&(Fn(["authTokensAccess","authTokensRefresh","user"]),n.profile=null,sessionStorage.removeItem("is_adult"),c.value=!1),F&&i.push(`/${e.params.orgId}/${F}`)};return{statusWSCreate:w,isButtonDisabled:x,orderCompleted_lib:T,extraDiscount:m,orderNumber:p,is_notification_lib:B,notificationData_lib:k,textPaymentBtn_lib:y,count:S,guestInfo:_,error:h,isDrawerOpen:d,currentState:f,isAuthorized:H,orderSocket:O,deleteCart:V,setGuestInfo:N,setState:R,openDrawer:E,closeDrawer:M,clearCard:A,makeInitPaymentLinkRequest:P,showNotification:C}}),Ke=J.defineStore("cardLib",()=>{const i=()=>({openCard:null,currentModifier:null,groupModifiers:[],groupModifiersSelected:[],groupCurrentOpen:null,isModifiedAmount:!1,selectedSize:{},productSizes:[],addedProducts:[],plusButtonsRefs:[],modalCount:1,isSectionModifier:!1,isAnimationFly:!0,textErrorRequaired:""}),e=o.ref(i()),t=()=>e.value=i(),n=o.ref(!1),r=o.ref(!1),s=o.ref(!1),a=o.ref(),l=o.ref([]),c=o.computed(()=>{const k=e.value.groupModifiersSelected.findIndex(b=>b.group===e.value.groupCurrentOpen.id);return u(k)}),u=k=>k===-1?0:(e.value.groupModifiersSelected[k].modifiers||[]).reduce((C,P)=>C+(P.amount||0),0),d=o.computed(()=>{var b;const k=(b=e.value.openCard)==null?void 0:b.group_modifiers.findIndex(C=>C.id===e.value.groupCurrentOpen.id);return k===-1||!e.value.openCard?0:e.value.openCard.modifiers.length>0&&k===0?e.value.openCard.modifiers.reduce((C,P)=>C+P.max_amount,0):e.value.groupModifiers[k].max_amount}),h=o.computed(()=>{var b;const k=(e.value.addedProducts??[]).reduce((C,P)=>C+P.price,0);if(e.value.openCard){const C=e.value.openCard,P=dr(C)||0,O=C.amount||1;return(e.value.groupModifiersSelected.reduce((R,N)=>(N.modifiers.forEach(E=>{var M,A;E.sizes&&(E.price=((A=(M=E.sizes)==null?void 0:M.find($=>$.id===e.value.selectedSize.id))==null?void 0:A.price)??E.price),R+=E.price*E.amount}),R),0)+P)*O+k}return(b=e.value.addedProducts)!=null&&b.length?k:0}),_=o.computed(()=>{const k=e.value.groupModifiers,b=e.value.groupModifiersSelected;for(let C=0;C<k.length;C++){const P=k[C],O=b[C];if(P.min_amount>0&&u(C)<P.min_amount)return e.value.textErrorRequaired=`В группе "${P.name}" должно содержаться не меньше ${P.min_amount} модификатора(ов)`,{haveRequaire:!0,group:P};for(const H of P.group_modifiers)if(H.min_amount>0){const R=O.modifiers.find(N=>N.id===H.id);if(!R||R.amount<H.min_amount)return e.value.textErrorRequaired=`В группе "${P.name}" выберите все обязательные модификаторы`,{haveRequaire:!0,group:P}}}return{haveRequaire:!1,group:k[0]}}),f=()=>{e.value.groupModifiers.forEach((k,b)=>{e.value.groupCurrentOpen={...k,index:b},k.group_modifiers.forEach(C=>{C.default_amount>0&&(C.amount=C.default_amount,S(C,!0))})})},m=k=>{e.value.addedProducts.push(k)},p=k=>{e.value.openCard=k},g=k=>{l.value=[...k]},y=(k,b)=>{var P;const C=k.id!==((P=e.value.groupCurrentOpen)==null?void 0:P.id);e.value.groupCurrentOpen={...k,index:b},C?e.value.isSectionModifier=!0:e.value.isSectionModifier=!e.value.isSectionModifier,document.body.style.overflow=e.value.isSectionModifier?"hidden":"",e.value.plusButtonsRefs[b].scrollIntoView({behavior:"smooth",block:"start"})},w=()=>{e.value.modalCount>e.value.currentModifier.min_amount&&e.value.modalCount>=2&&(e.value.modalCount-=1)},x=()=>{e.value.groupCurrentOpen&&e.value.modalCount+c.value<d.value&&(e.value.currentModifier.max_amount===0||e.value.currentModifier.max_amount>e.value.modalCount)&&(e.value.modalCount+=1)},T=(k,b)=>{var P;const C=(P=e.value.groupCurrentOpen)==null?void 0:P.id.toUpperCase();if(!k&&!e.value.isModifiedAmount&&b.max_amount!==1){if(C==="Добавки2000"&&b.max_amount>1)return!0;if(Math.abs(d.value-c.value)>1&&C!=="Добавки2000")return!0}return!1},S=(k,b=!1)=>{e.value.modalCount=1,e.value.currentModifier=k;const C=e.value.groupModifiersSelected.findIndex(P=>P.group===e.value.groupCurrentOpen.id);B(C,k,b)},B=(k,b,C)=>{let P=e.value.groupModifiersSelected;if(b.sizes.length>0&&b.sizes.find(O=>{var H;return O.id===((H=e.value.selectedSize)==null?void 0:H.id)}),k===-1)T(C,b)?e.value.isModifiedAmount=!0:P[e.value.groupCurrentOpen.index]={group:e.value.groupCurrentOpen.id,modifier_count:0,modifiers:[{...b,amount:(b==null?void 0:b.amount)??1}]};else{const O=e.value.groupModifiers[k].group_modifiers.findIndex(R=>R.id===b.id);if(P[k].modifiers.findIndex(R=>R.id===b.id)===-1){if(d.value===1)P[k].modifiers=[];else if(c.value>=d.value)return;T(C,b)?e.value.isModifiedAmount=!0:(P[k].modifiers.push({...b,amount:(b==null?void 0:b.amount)??1}),P[k].modifier_count=P[k].modifiers.reduce((R,N)=>R+=N.amount,0),e.value.isAnimationFly=!0)}else P[k].modifiers=P[k].modifiers.filter(R=>R.id!==b.id),P[k].modifier_count=P[k].modifiers.reduce((R,N)=>R+=N.amount,0),e.value.groupModifiers[k].group_modifiers[O].amount=1,e.value.groupModifiers[k].group_modifiers[O].default_amount=0,e.value.isAnimationFly=!1}e.value.groupModifiersSelected=P};return{stateCard:e,totalPrice_libCard:h,recountGroupTotalAmount:c,groupTotalAmount:d,isOpenWindow:n,isUpSale:r,checkedRequiredBtn:_,dataUpSale:a,productCards:l,isAddToCard:s,setProduct:g,summModifierAmount:u,setAddedProducts:m,setCurrentCard:p,minusAmount:w,plusAmount:x,toggleNotRequire:y,modifierSelect:S,defaultAmountModifiers:f,reset:t}});class gu{constructor(e){me(this,"value");me(this,"next");this.value=e}}class yu{constructor(){$i(this,it);$i(this,pn);$i(this,In);this.clear()}enqueue(e){const t=new gu(e);Et(this,it)?(Et(this,pn).next=t,zt(this,pn,t)):(zt(this,it,t),zt(this,pn,t)),ks(this,In)._++}dequeue(){const e=Et(this,it);if(e)return zt(this,it,Et(this,it).next),ks(this,In)._--,Et(this,it)||zt(this,pn,void 0),e.value}peek(){if(Et(this,it))return Et(this,it).value}clear(){zt(this,it,void 0),zt(this,pn,void 0),zt(this,In,0)}get size(){return Et(this,In)}*[Symbol.iterator](){let e=Et(this,it);for(;e;)yield e.value,e=e.next}*drain(){for(;Et(this,it);)yield this.dequeue()}}it=new WeakMap,pn=new WeakMap,In=new WeakMap;function bu(i){Rs(i);const e=new yu;let t=0;const n=()=>{t<i&&e.size>0&&(t++,e.dequeue()())},r=()=>{t--,n()},s=async(c,u,d)=>{const h=(async()=>c(...d))();u(h);try{await h}catch{}r()},a=(c,u,d)=>{new Promise(h=>{e.enqueue(h)}).then(s.bind(void 0,c,u,d)),t<i&&n()},l=(c,...u)=>new Promise(d=>{a(c,d,u)});return Object.defineProperties(l,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value(){e.clear()}},concurrency:{get:()=>i,set(c){Rs(c),i=c,queueMicrotask(()=>{for(;t<i&&e.size>0;)n()})}},map:{async value(c,u){const d=Array.from(c,(h,_)=>this(u,h,_));return Promise.all(d)}}}),l}function Rs(i){if(!((Number.isInteger(i)||i===Number.POSITIVE_INFINITY)&&i>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}function Ds(i,e){return function(){return i.apply(e,arguments)}}const{toString:wu}=Object.prototype,{getPrototypeOf:Li}=Object,{iterator:Jr,toStringTag:Os}=Symbol,Zr=(i=>e=>{const t=wu.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=i=>(i=i.toLowerCase(),e=>Zr(e)===i),Qr=i=>e=>typeof e===i,{isArray:Un}=Array,Hn=Qr("undefined");function pr(i){return i!==null&&!Hn(i)&&i.constructor!==null&&!Hn(i.constructor)&&Je(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const $s=Nt("ArrayBuffer");function xu(i){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(i):e=i&&i.buffer&&$s(i.buffer),e}const ku=Qr("string"),Je=Qr("function"),Is=Qr("number"),mr=i=>i!==null&&typeof i=="object",Su=i=>i===!0||i===!1,ei=i=>{if(Zr(i)!=="object")return!1;const e=Li(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Os in i)&&!(Jr in i)},Cu=i=>{if(!mr(i)||pr(i))return!1;try{return Object.keys(i).length===0&&Object.getPrototypeOf(i)===Object.prototype}catch{return!1}},Eu=Nt("Date"),Tu=Nt("File"),vu=Nt("Blob"),Nu=Nt("FileList"),Mu=i=>mr(i)&&Je(i.pipe),Pu=i=>{let e;return i&&(typeof FormData=="function"&&i instanceof FormData||Je(i.append)&&((e=Zr(i))==="formdata"||e==="object"&&Je(i.toString)&&i.toString()==="[object FormData]"))},Au=Nt("URLSearchParams"),[Bu,Ru,Du,Ou]=["ReadableStream","Request","Response","Headers"].map(Nt),$u=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _r(i,e,{allOwnKeys:t=!1}={}){if(i===null||typeof i>"u")return;let n,r;if(typeof i!="object"&&(i=[i]),Un(i))for(n=0,r=i.length;n<r;n++)e.call(null,i[n],n,i);else{if(pr(i))return;const s=t?Object.getOwnPropertyNames(i):Object.keys(i),a=s.length;let l;for(n=0;n<a;n++)l=s[n],e.call(null,i[l],l,i)}}function Vs(i,e){if(pr(i))return null;e=e.toLowerCase();const t=Object.keys(i);let n=t.length,r;for(;n-- >0;)if(r=t[n],e===r.toLowerCase())return r;return null}const gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ls=i=>!Hn(i)&&i!==gn;function Fi(){const{caseless:i,skipUndefined:e}=Ls(this)&&this||{},t={},n=(r,s)=>{const a=i&&Vs(t,s)||s;ei(t[a])&&ei(r)?t[a]=Fi(t[a],r):ei(r)?t[a]=Fi({},r):Un(r)?t[a]=r.slice():(!e||!Hn(r))&&(t[a]=r)};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&_r(arguments[r],n);return t}const Iu=(i,e,t,{allOwnKeys:n}={})=>(_r(e,(r,s)=>{t&&Je(r)?i[s]=Ds(r,t):i[s]=r},{allOwnKeys:n}),i),Vu=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),Lu=(i,e,t,n)=>{i.prototype=Object.create(e.prototype,n),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:e.prototype}),t&&Object.assign(i.prototype,t)},Fu=(i,e,t,n)=>{let r,s,a;const l={};if(e=e||{},i==null)return e;do{for(r=Object.getOwnPropertyNames(i),s=r.length;s-- >0;)a=r[s],(!n||n(a,i,e))&&!l[a]&&(e[a]=i[a],l[a]=!0);i=t!==!1&&Li(i)}while(i&&(!t||t(i,e))&&i!==Object.prototype);return e},zu=(i,e,t)=>{i=String(i),(t===void 0||t>i.length)&&(t=i.length),t-=e.length;const n=i.indexOf(e,t);return n!==-1&&n===t},Uu=i=>{if(!i)return null;if(Un(i))return i;let e=i.length;if(!Is(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=i[e];return t},Hu=(i=>e=>i&&e instanceof i)(typeof Uint8Array<"u"&&Li(Uint8Array)),qu=(i,e)=>{const n=(i&&i[Jr]).call(i);let r;for(;(r=n.next())&&!r.done;){const s=r.value;e.call(i,s[0],s[1])}},Wu=(i,e)=>{let t;const n=[];for(;(t=i.exec(e))!==null;)n.push(t);return n},ju=Nt("HTMLFormElement"),Xu=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),Fs=(({hasOwnProperty:i})=>(e,t)=>i.call(e,t))(Object.prototype),Yu=Nt("RegExp"),zs=(i,e)=>{const t=Object.getOwnPropertyDescriptors(i),n={};_r(t,(r,s)=>{let a;(a=e(r,s,i))!==!1&&(n[s]=a||r)}),Object.defineProperties(i,n)},Gu=i=>{zs(i,(e,t)=>{if(Je(i)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=i[t];if(Je(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Ku=(i,e)=>{const t={},n=r=>{r.forEach(s=>{t[s]=!0})};return Un(i)?n(i):n(String(i).split(e)),t},Ju=()=>{},Zu=(i,e)=>i!=null&&Number.isFinite(i=+i)?i:e;function Qu(i){return!!(i&&Je(i.append)&&i[Os]==="FormData"&&i[Jr])}const ed=i=>{const e=new Array(10),t=(n,r)=>{if(mr(n)){if(e.indexOf(n)>=0)return;if(pr(n))return n;if(!("toJSON"in n)){e[r]=n;const s=Un(n)?[]:{};return _r(n,(a,l)=>{const c=t(a,r+1);!Hn(c)&&(s[l]=c)}),e[r]=void 0,s}}return n};return t(i,0)},td=Nt("AsyncFunction"),nd=i=>i&&(mr(i)||Je(i))&&Je(i.then)&&Je(i.catch),Us=((i,e)=>i?setImmediate:e?((t,n)=>(gn.addEventListener("message",({source:r,data:s})=>{r===gn&&s===t&&n.length&&n.shift()()},!1),r=>{n.push(r),gn.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Je(gn.postMessage)),rd=typeof queueMicrotask<"u"?queueMicrotask.bind(gn):typeof process<"u"&&process.nextTick||Us,D={isArray:Un,isArrayBuffer:$s,isBuffer:pr,isFormData:Pu,isArrayBufferView:xu,isString:ku,isNumber:Is,isBoolean:Su,isObject:mr,isPlainObject:ei,isEmptyObject:Cu,isReadableStream:Bu,isRequest:Ru,isResponse:Du,isHeaders:Ou,isUndefined:Hn,isDate:Eu,isFile:Tu,isBlob:vu,isRegExp:Yu,isFunction:Je,isStream:Mu,isURLSearchParams:Au,isTypedArray:Hu,isFileList:Nu,forEach:_r,merge:Fi,extend:Iu,trim:$u,stripBOM:Vu,inherits:Lu,toFlatObject:Fu,kindOf:Zr,kindOfTest:Nt,endsWith:zu,toArray:Uu,forEachEntry:qu,matchAll:Wu,isHTMLForm:ju,hasOwnProperty:Fs,hasOwnProp:Fs,reduceDescriptors:zs,freezeMethods:Gu,toObjectSet:Ku,toCamelCase:Xu,noop:Ju,toFiniteNumber:Zu,findKey:Vs,global:gn,isContextDefined:Ls,isSpecCompliantForm:Qu,toJSONObject:ed,isAsyncFn:td,isThenable:nd,setImmediate:Us,asap:rd,isIterable:i=>i!=null&&Je(i[Jr])};function oe(i,e,t,n,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),r&&(this.response=r,this.status=r.status?r.status:null)}D.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.status}}});const Hs=oe.prototype,qs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(i=>{qs[i]={value:i}}),Object.defineProperties(oe,qs),Object.defineProperty(Hs,"isAxiosError",{value:!0}),oe.from=(i,e,t,n,r,s)=>{const a=Object.create(Hs);D.toFlatObject(i,a,function(d){return d!==Error.prototype},u=>u!=="isAxiosError");const l=i&&i.message?i.message:"Error",c=e==null&&i?i.code:e;return oe.call(a,l,c,t,n,r),i&&a.cause==null&&Object.defineProperty(a,"cause",{value:i,configurable:!0}),a.name=i&&i.name||"Error",s&&Object.assign(a,s),a};const id=null;function zi(i){return D.isPlainObject(i)||D.isArray(i)}function Ws(i){return D.endsWith(i,"[]")?i.slice(0,-2):i}function js(i,e,t){return i?i.concat(e).map(function(r,s){return r=Ws(r),!t&&s?"["+r+"]":r}).join(t?".":""):e}function od(i){return D.isArray(i)&&!i.some(zi)}const sd=D.toFlatObject(D,{},null,function(e){return/^is[A-Z]/.test(e)});function ti(i,e,t){if(!D.isObject(i))throw new TypeError("target must be an object");e=e||new FormData,t=D.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!D.isUndefined(g[p])});const n=t.metaTokens,r=t.visitor||d,s=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(e);if(!D.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(D.isDate(m))return m.toISOString();if(D.isBoolean(m))return m.toString();if(!c&&D.isBlob(m))throw new oe("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(m)||D.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,p,g){let y=m;if(m&&!g&&typeof m=="object"){if(D.endsWith(p,"{}"))p=n?p:p.slice(0,-2),m=JSON.stringify(m);else if(D.isArray(m)&&od(m)||(D.isFileList(m)||D.endsWith(p,"[]"))&&(y=D.toArray(m)))return p=Ws(p),y.forEach(function(x,T){!(D.isUndefined(x)||x===null)&&e.append(a===!0?js([p],T,s):a===null?p:p+"[]",u(x))}),!1}return zi(m)?!0:(e.append(js(g,p,s),u(m)),!1)}const h=[],_=Object.assign(sd,{defaultVisitor:d,convertValue:u,isVisitable:zi});function f(m,p){if(!D.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(m),D.forEach(m,function(y,w){(!(D.isUndefined(y)||y===null)&&r.call(e,y,D.isString(w)?w.trim():w,p,_))===!0&&f(y,p?p.concat(w):[w])}),h.pop()}}if(!D.isObject(i))throw new TypeError("data must be an object");return f(i),e}function Xs(i){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ui(i,e){this._pairs=[],i&&ti(i,this,e)}const Ys=Ui.prototype;Ys.append=function(e,t){this._pairs.push([e,t])},Ys.toString=function(e){const t=e?function(n){return e.call(this,n,Xs)}:Xs;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function ad(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gs(i,e,t){if(!e)return i;const n=t&&t.encode||ad;D.isFunction(t)&&(t={serialize:t});const r=t&&t.serialize;let s;if(r?s=r(e,t):s=D.isURLSearchParams(e)?e.toString():new Ui(e,t).toString(n),s){const a=i.indexOf("#");a!==-1&&(i=i.slice(0,a)),i+=(i.indexOf("?")===-1?"?":"&")+s}return i}class Ks{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){D.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Js={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ld={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ui,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hi=typeof window<"u"&&typeof document<"u",qi=typeof navigator=="object"&&navigator||void 0,cd=Hi&&(!qi||["ReactNative","NativeScript","NS"].indexOf(qi.product)<0),ud=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dd=Hi&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hi,hasStandardBrowserEnv:cd,hasStandardBrowserWebWorkerEnv:ud,navigator:qi,origin:dd},Symbol.toStringTag,{value:"Module"})),...ld};function fd(i,e){return ti(i,new He.classes.URLSearchParams,{visitor:function(t,n,r,s){return He.isNode&&D.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function hd(i){return D.matchAll(/\w+|\[(\w*)]/g,i).map(e=>e[0]==="[]"?"":e[1]||e[0])}function pd(i){const e={},t=Object.keys(i);let n;const r=t.length;let s;for(n=0;n<r;n++)s=t[n],e[s]=i[s];return e}function Zs(i){function e(t,n,r,s){let a=t[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=s>=t.length;return a=!a&&D.isArray(r)?r.length:a,c?(D.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!l):((!r[a]||!D.isObject(r[a]))&&(r[a]=[]),e(t,n,r[a],s)&&D.isArray(r[a])&&(r[a]=pd(r[a])),!l)}if(D.isFormData(i)&&D.isFunction(i.entries)){const t={};return D.forEachEntry(i,(n,r)=>{e(hd(n),r,t,0)}),t}return null}function md(i,e,t){if(D.isString(i))try{return(e||JSON.parse)(i),D.trim(i)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(i)}const gr={transitional:Js,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=D.isObject(e);if(s&&D.isHTMLForm(e)&&(e=new FormData(e)),D.isFormData(e))return r?JSON.stringify(Zs(e)):e;if(D.isArrayBuffer(e)||D.isBuffer(e)||D.isStream(e)||D.isFile(e)||D.isBlob(e)||D.isReadableStream(e))return e;if(D.isArrayBufferView(e))return e.buffer;if(D.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return fd(e,this.formSerializer).toString();if((l=D.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ti(l?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),md(e)):e}],transformResponse:[function(e){const t=this.transitional||gr.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(D.isResponse(e)||D.isReadableStream(e))return e;if(e&&D.isString(e)&&(n&&!this.responseType||r)){const a=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(l){if(a)throw l.name==="SyntaxError"?oe.from(l,oe.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],i=>{gr.headers[i]={}});const _d=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gd=i=>{const e={};let t,n,r;return i&&i.split(`
2
- `).forEach(function(a){r=a.indexOf(":"),t=a.substring(0,r).trim().toLowerCase(),n=a.substring(r+1).trim(),!(!t||e[t]&&_d[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},Qs=Symbol("internals");function yr(i){return i&&String(i).trim().toLowerCase()}function ni(i){return i===!1||i==null?i:D.isArray(i)?i.map(ni):String(i)}function yd(i){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(i);)e[n[1]]=n[2];return e}const bd=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());function Wi(i,e,t,n,r){if(D.isFunction(n))return n.call(this,e,t);if(r&&(e=t),!!D.isString(e)){if(D.isString(n))return e.indexOf(n)!==-1;if(D.isRegExp(n))return n.test(e)}}function wd(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function xd(i,e){const t=D.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(i,n+t,{value:function(r,s,a){return this[n].call(this,e,r,s,a)},configurable:!0})})}let Ze=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(l,c,u){const d=yr(c);if(!d)throw new Error("header name must be a non-empty string");const h=D.findKey(r,d);(!h||r[h]===void 0||u===!0||u===void 0&&r[h]!==!1)&&(r[h||c]=ni(l))}const a=(l,c)=>D.forEach(l,(u,d)=>s(u,d,c));if(D.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(D.isString(e)&&(e=e.trim())&&!bd(e))a(gd(e),t);else if(D.isObject(e)&&D.isIterable(e)){let l={},c,u;for(const d of e){if(!D.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[u=d[0]]=(c=l[u])?D.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}a(l,t)}else e!=null&&s(t,e,n);return this}get(e,t){if(e=yr(e),e){const n=D.findKey(this,e);if(n){const r=this[n];if(!t)return r;if(t===!0)return yd(r);if(D.isFunction(t))return t.call(this,r,n);if(D.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=yr(e),e){const n=D.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Wi(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let r=!1;function s(a){if(a=yr(a),a){const l=D.findKey(n,a);l&&(!t||Wi(n,n[l],l,t))&&(delete n[l],r=!0)}}return D.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];(!e||Wi(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return D.forEach(this,(r,s)=>{const a=D.findKey(n,s);if(a){t[a]=ni(r),delete t[s];return}const l=e?wd(s):String(s).trim();l!==s&&delete t[s],t[l]=ni(r),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return D.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&D.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(r=>n.set(r)),n}static accessor(e){const n=(this[Qs]=this[Qs]={accessors:{}}).accessors,r=this.prototype;function s(a){const l=yr(a);n[l]||(xd(r,a),n[l]=!0)}return D.isArray(e)?e.forEach(s):s(e),this}};Ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),D.reduceDescriptors(Ze.prototype,({value:i},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>i,set(n){this[t]=n}}}),D.freezeMethods(Ze);function ji(i,e){const t=this||gr,n=e||t,r=Ze.from(n.headers);let s=n.data;return D.forEach(i,function(l){s=l.call(t,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function ea(i){return!!(i&&i.__CANCEL__)}function qn(i,e,t){oe.call(this,i??"canceled",oe.ERR_CANCELED,e,t),this.name="CanceledError"}D.inherits(qn,oe,{__CANCEL__:!0});function ta(i,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?i(t):e(new oe("Request failed with status code "+t.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function kd(i){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return e&&e[1]||""}function Sd(i,e){i=i||10;const t=new Array(i),n=new Array(i);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),d=n[s];a||(a=u),t[r]=c,n[r]=u;let h=s,_=0;for(;h!==r;)_+=t[h++],h=h%i;if(r=(r+1)%i,r===s&&(s=(s+1)%i),u-a<e)return;const f=d&&u-d;return f?Math.round(_*1e3/f):void 0}}function Cd(i,e){let t=0,n=1e3/e,r,s;const a=(u,d=Date.now())=>{t=d,r=null,s&&(clearTimeout(s),s=null),i(...u)};return[(...u)=>{const d=Date.now(),h=d-t;h>=n?a(u,d):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},n-h)))},()=>r&&a(r)]}const ri=(i,e,t=3)=>{let n=0;const r=Sd(50,250);return Cd(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,c=a-n,u=r(c),d=a<=l;n=a;const h={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};i(h)},t)},na=(i,e)=>{const t=i!=null;return[n=>e[0]({lengthComputable:t,total:i,loaded:n}),e[1]]},ra=i=>(...e)=>D.asap(()=>i(...e)),Ed=He.hasStandardBrowserEnv?((i,e)=>t=>(t=new URL(t,He.origin),i.protocol===t.protocol&&i.host===t.host&&(e||i.port===t.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,Td=He.hasStandardBrowserEnv?{write(i,e,t,n,r,s,a){if(typeof document>"u")return;const l=[`${i}=${encodeURIComponent(e)}`];D.isNumber(t)&&l.push(`expires=${new Date(t).toUTCString()}`),D.isString(n)&&l.push(`path=${n}`),D.isString(r)&&l.push(`domain=${r}`),s===!0&&l.push("secure"),D.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(i){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+i+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(i){this.write(i,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function vd(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function Nd(i,e){return e?i.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):i}function ia(i,e,t){let n=!vd(e);return i&&(n||t==!1)?Nd(i,e):e}const oa=i=>i instanceof Ze?{...i}:i;function yn(i,e){e=e||{};const t={};function n(u,d,h,_){return D.isPlainObject(u)&&D.isPlainObject(d)?D.merge.call({caseless:_},u,d):D.isPlainObject(d)?D.merge({},d):D.isArray(d)?d.slice():d}function r(u,d,h,_){if(D.isUndefined(d)){if(!D.isUndefined(u))return n(void 0,u,h,_)}else return n(u,d,h,_)}function s(u,d){if(!D.isUndefined(d))return n(void 0,d)}function a(u,d){if(D.isUndefined(d)){if(!D.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,h){if(h in e)return n(u,d);if(h in i)return n(void 0,u)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d,h)=>r(oa(u),oa(d),h,!0)};return D.forEach(Object.keys({...i,...e}),function(d){const h=c[d]||r,_=h(i[d],e[d],d);D.isUndefined(_)&&h!==l||(t[d]=_)}),t}const sa=i=>{const e=yn({},i);let{data:t,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:l}=e;if(e.headers=a=Ze.from(a),e.url=Gs(ia(e.baseURL,e.url,e.allowAbsoluteUrls),i.params,i.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),D.isFormData(t)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(D.isFunction(t.getHeaders)){const c=t.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,h])=>{u.includes(d.toLowerCase())&&a.set(d,h)})}}if(He.hasStandardBrowserEnv&&(n&&D.isFunction(n)&&(n=n(e)),n||n!==!1&&Ed(e.url))){const c=r&&s&&Td.read(s);c&&a.set(r,c)}return e},Md=typeof XMLHttpRequest<"u"&&function(i){return new Promise(function(t,n){const r=sa(i);let s=r.data;const a=Ze.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,d,h,_,f,m;function p(){f&&f(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function y(){if(!g)return;const x=Ze.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!l||l==="text"||l==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:i,request:g};ta(function(k){t(k),p()},function(k){n(k),p()},S),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(n(new oe("Request aborted",oe.ECONNABORTED,i,g)),g=null)},g.onerror=function(T){const S=T&&T.message?T.message:"Network Error",B=new oe(S,oe.ERR_NETWORK,i,g);B.event=T||null,n(B),g=null},g.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||Js;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),n(new oe(T,S.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,i,g)),g=null},s===void 0&&a.setContentType(null),"setRequestHeader"in g&&D.forEach(a.toJSON(),function(T,S){g.setRequestHeader(S,T)}),D.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),l&&l!=="json"&&(g.responseType=r.responseType),u&&([_,m]=ri(u,!0),g.addEventListener("progress",_)),c&&g.upload&&([h,f]=ri(c),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",f)),(r.cancelToken||r.signal)&&(d=x=>{g&&(n(!x||x.type?new qn(null,i,g):x),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=kd(r.url);if(w&&He.protocols.indexOf(w)===-1){n(new oe("Unsupported protocol "+w+":",oe.ERR_BAD_REQUEST,i));return}g.send(s||null)})},Pd=(i,e)=>{const{length:t}=i=i?i.filter(Boolean):[];if(e||t){let n=new AbortController,r;const s=function(u){if(!r){r=!0,l();const d=u instanceof Error?u:this.reason;n.abort(d instanceof oe?d:new qn(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,s(new oe(`timeout ${e} of ms exceeded`,oe.ETIMEDOUT))},e);const l=()=>{i&&(a&&clearTimeout(a),a=null,i.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),i=null)};i.forEach(u=>u.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>D.asap(l),c}},Ad=function*(i,e){let t=i.byteLength;if(t<e){yield i;return}let n=0,r;for(;n<t;)r=n+e,yield i.slice(n,r),n=r},Bd=async function*(i,e){for await(const t of Rd(i))yield*Ad(t,e)},Rd=async function*(i){if(i[Symbol.asyncIterator]){yield*i;return}const e=i.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},aa=(i,e,t,n)=>{const r=Bd(i,e);let s=0,a,l=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await r.next();if(u){l(),c.close();return}let h=d.byteLength;if(t){let _=s+=h;t(_)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},la=64*1024,{isFunction:ii}=D,Dd=(({Request:i,Response:e})=>({Request:i,Response:e}))(D.global),{ReadableStream:ca,TextEncoder:ua}=D.global,da=(i,...e)=>{try{return!!i(...e)}catch{return!1}},Od=i=>{i=D.merge.call({skipUndefined:!0},Dd,i);const{fetch:e,Request:t,Response:n}=i,r=e?ii(e):typeof fetch=="function",s=ii(t),a=ii(n);if(!r)return!1;const l=r&&ii(ca),c=r&&(typeof ua=="function"?(m=>p=>m.encode(p))(new ua):async m=>new Uint8Array(await new t(m).arrayBuffer())),u=s&&l&&da(()=>{let m=!1;const p=new t(He.origin,{body:new ca,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!p}),d=a&&l&&da(()=>D.isReadableStream(new n("").body)),h={stream:d&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!h[m]&&(h[m]=(p,g)=>{let y=p&&p[m];if(y)return y.call(p);throw new oe(`Response type '${m}' is not supported`,oe.ERR_NOT_SUPPORT,g)})});const _=async m=>{if(m==null)return 0;if(D.isBlob(m))return m.size;if(D.isSpecCompliantForm(m))return(await new t(He.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(D.isArrayBufferView(m)||D.isArrayBuffer(m))return m.byteLength;if(D.isURLSearchParams(m)&&(m=m+""),D.isString(m))return(await c(m)).byteLength},f=async(m,p)=>{const g=D.toFiniteNumber(m.getContentLength());return g??_(p)};return async m=>{let{url:p,method:g,data:y,signal:w,cancelToken:x,timeout:T,onDownloadProgress:S,onUploadProgress:B,responseType:k,headers:b,withCredentials:C="same-origin",fetchOptions:P}=sa(m),O=e||fetch;k=k?(k+"").toLowerCase():"text";let H=Pd([w,x&&x.toAbortSignal()],T),R=null;const N=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let E;try{if(B&&u&&g!=="get"&&g!=="head"&&(E=await f(b,y))!==0){let z=new t(p,{method:"POST",body:y,duplex:"half"}),W;if(D.isFormData(y)&&(W=z.headers.get("content-type"))&&b.setContentType(W),z.body){const[Z,K]=na(E,ri(ra(B)));y=aa(z.body,la,Z,K)}}D.isString(C)||(C=C?"include":"omit");const M=s&&"credentials"in t.prototype,A={...P,signal:H,method:g.toUpperCase(),headers:b.normalize().toJSON(),body:y,duplex:"half",credentials:M?C:void 0};R=s&&new t(p,A);let $=await(s?O(R,P):O(p,A));const V=d&&(k==="stream"||k==="response");if(d&&(S||V&&N)){const z={};["status","statusText","headers"].forEach(ue=>{z[ue]=$[ue]});const W=D.toFiniteNumber($.headers.get("content-length")),[Z,K]=S&&na(W,ri(ra(S),!0))||[];$=new n(aa($.body,la,Z,()=>{K&&K(),N&&N()}),z)}k=k||"text";let F=await h[D.findKey(h,k)||"text"]($,m);return!V&&N&&N(),await new Promise((z,W)=>{ta(z,W,{data:F,headers:Ze.from($.headers),status:$.status,statusText:$.statusText,config:m,request:R})})}catch(M){throw N&&N(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new oe("Network Error",oe.ERR_NETWORK,m,R),{cause:M.cause||M}):oe.from(M,M&&M.code,m,R)}}},$d=new Map,fa=i=>{let e=i&&i.env||{};const{fetch:t,Request:n,Response:r}=e,s=[n,r,t];let a=s.length,l=a,c,u,d=$d;for(;l--;)c=s[l],u=d.get(c),u===void 0&&d.set(c,u=l?new Map:Od(e)),d=u;return u};fa();const Xi={http:id,xhr:Md,fetch:{get:fa}};D.forEach(Xi,(i,e)=>{if(i){try{Object.defineProperty(i,"name",{value:e})}catch{}Object.defineProperty(i,"adapterName",{value:e})}});const ha=i=>`- ${i}`,Id=i=>D.isFunction(i)||i===null||i===!1;function Vd(i,e){i=D.isArray(i)?i:[i];const{length:t}=i;let n,r;const s={};for(let a=0;a<t;a++){n=i[a];let l;if(r=n,!Id(n)&&(r=Xi[(l=String(n)).toLowerCase()],r===void 0))throw new oe(`Unknown adapter '${l}'`);if(r&&(D.isFunction(r)||(r=r.get(e))))break;s[l||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since :
4
- `+a.map(ha).join(`
5
- `):" "+ha(a[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r}const pa={getAdapter:Vd,adapters:Xi};function Yi(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new qn(null,i)}function ma(i){return Yi(i),i.headers=Ze.from(i.headers),i.data=ji.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),pa.getAdapter(i.adapter||gr.adapter,i)(i).then(function(n){return Yi(i),n.data=ji.call(i,i.transformResponse,n),n.headers=Ze.from(n.headers),n},function(n){return ea(n)||(Yi(i),n&&n.response&&(n.response.data=ji.call(i,i.transformResponse,n.response),n.response.headers=Ze.from(n.response.headers))),Promise.reject(n)})}const _a="1.13.2",oi={};["object","boolean","number","function","string","symbol"].forEach((i,e)=>{oi[i]=function(n){return typeof n===i||"a"+(e<1?"n ":" ")+i}});const ga={};oi.transitional=function(e,t,n){function r(s,a){return"[Axios v"+_a+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,l)=>{if(e===!1)throw new oe(r(a," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!ga[a]&&(ga[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,a,l):!0}},oi.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ld(i,e,t){if(typeof i!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(i);let r=n.length;for(;r-- >0;){const s=n[r],a=e[s];if(a){const l=i[s],c=l===void 0||a(l,s,i);if(c!==!0)throw new oe("option "+s+" must be "+c,oe.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new oe("Unknown option "+s,oe.ERR_BAD_OPTION)}}const si={assertOptions:Ld,validators:oi},Ot=si.validators;let bn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ks,response:new Ks}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=yn(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;n!==void 0&&si.assertOptions(n,{silentJSONParsing:Ot.transitional(Ot.boolean),forcedJSONParsing:Ot.transitional(Ot.boolean),clarifyTimeoutError:Ot.transitional(Ot.boolean)},!1),r!=null&&(D.isFunction(r)?t.paramsSerializer={serialize:r}:si.assertOptions(r,{encode:Ot.function,serialize:Ot.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),si.assertOptions(t,{baseUrl:Ot.spelling("baseURL"),withXsrfToken:Ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&D.merge(s.common,s[t.method]);s&&D.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),t.headers=Ze.concat(a,s);const l=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(t)===!1||(c=c&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let d,h=0,_;if(!c){const m=[ma.bind(this),void 0];for(m.unshift(...l),m.push(...u),_=m.length,d=Promise.resolve(t);h<_;)d=d.then(m[h++],m[h++]);return d}_=l.length;let f=t;for(;h<_;){const m=l[h++],p=l[h++];try{f=m(f)}catch(g){p.call(this,g);break}}try{d=ma.call(this,f)}catch(m){return Promise.reject(m)}for(h=0,_=u.length;h<_;)d=d.then(u[h++],u[h++]);return d}getUri(e){e=yn(this.defaults,e);const t=ia(e.baseURL,e.url,e.allowAbsoluteUrls);return Gs(t,e.params,e.paramsSerializer)}};D.forEach(["delete","get","head","options"],function(e){bn.prototype[e]=function(t,n){return this.request(yn(n||{},{method:e,url:t,data:(n||{}).data}))}}),D.forEach(["post","put","patch"],function(e){function t(n){return function(s,a,l){return this.request(yn(l||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}bn.prototype[e]=t(),bn.prototype[e+"Form"]=t(!0)});let Fd=class Vc{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(r=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](r);n._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(l=>{n.subscribe(l),s=l}).then(r);return a.cancel=function(){n.unsubscribe(s)},a},e(function(s,a,l){n.reason||(n.reason=new qn(s,a,l),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Vc(function(r){e=r}),cancel:e}}};function zd(i){return function(t){return i.apply(null,t)}}function Ud(i){return D.isObject(i)&&i.isAxiosError===!0}const Gi={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(Gi).forEach(([i,e])=>{Gi[e]=i});function ya(i){const e=new bn(i),t=Ds(bn.prototype.request,e);return D.extend(t,bn.prototype,e,{allOwnKeys:!0}),D.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return ya(yn(i,r))},t}const be=ya(gr);be.Axios=bn,be.CanceledError=qn,be.CancelToken=Fd,be.isCancel=ea,be.VERSION=_a,be.toFormData=ti,be.AxiosError=oe,be.Cancel=be.CanceledError,be.all=function(e){return Promise.all(e)},be.spread=zd,be.isAxiosError=Ud,be.mergeConfig=yn,be.AxiosHeaders=Ze,be.formToJSON=i=>Zs(D.isHTMLForm(i)?new FormData(i):i),be.getAdapter=pa.getAdapter,be.HttpStatusCode=Gi,be.default=be;const{Axios:Tg,AxiosError:vg,CanceledError:Ng,isCancel:Mg,CancelToken:Pg,VERSION:Ag,all:Bg,Cancel:Rg,isAxiosError:Dg,spread:Og,toFormData:$g,AxiosHeaders:Ig,HttpStatusCode:Vg,formToJSON:Lg,getAdapter:Fg,mergeConfig:zg}=be;var Hd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ba={exports:{}};(function(i,e){(function(t,n){i.exports=n()})(Hd,function(){var t=1e3,n=6e4,r=36e5,s="millisecond",a="second",l="minute",c="hour",u="day",d="week",h="month",_="quarter",f="year",m="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,w={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(N){var E=["th","st","nd","rd"],M=N%100;return"["+N+(E[(M-20)%10]||E[M]||E[0])+"]"}},x=function(N,E,M){var A=String(N);return!A||A.length>=E?N:""+Array(E+1-A.length).join(M)+N},T={s:x,z:function(N){var E=-N.utcOffset(),M=Math.abs(E),A=Math.floor(M/60),$=M%60;return(E<=0?"+":"-")+x(A,2,"0")+":"+x($,2,"0")},m:function N(E,M){if(E.date()<M.date())return-N(M,E);var A=12*(M.year()-E.year())+(M.month()-E.month()),$=E.clone().add(A,h),V=M-$<0,F=E.clone().add(A+(V?-1:1),h);return+(-(A+(M-$)/(V?$-F:F-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:h,y:f,w:d,d:u,D:m,h:c,m:l,s:a,ms:s,Q:_}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},S="en",B={};B[S]=w;var k="$isDayjsObject",b=function(N){return N instanceof H||!(!N||!N[k])},C=function N(E,M,A){var $;if(!E)return S;if(typeof E=="string"){var V=E.toLowerCase();B[V]&&($=V),M&&(B[V]=M,$=V);var F=E.split("-");if(!$&&F.length>1)return N(F[0])}else{var z=E.name;B[z]=E,$=z}return!A&&$&&(S=$),$||!A&&S},P=function(N,E){if(b(N))return N.clone();var M=typeof E=="object"?E:{};return M.date=N,M.args=arguments,new H(M)},O=T;O.l=C,O.i=b,O.w=function(N,E){return P(N,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var H=function(){function N(M){this.$L=C(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[k]=!0}var E=N.prototype;return E.parse=function(M){this.$d=function(A){var $=A.date,V=A.utc;if($===null)return new Date(NaN);if(O.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var F=$.match(g);if(F){var z=F[2]-1||0,W=(F[7]||"0").substring(0,3);return V?new Date(Date.UTC(F[1],z,F[3]||1,F[4]||0,F[5]||0,F[6]||0,W)):new Date(F[1],z,F[3]||1,F[4]||0,F[5]||0,F[6]||0,W)}}return new Date($)}(M),this.init()},E.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},E.$utils=function(){return O},E.isValid=function(){return this.$d.toString()!==p},E.isSame=function(M,A){var $=P(M);return this.startOf(A)<=$&&$<=this.endOf(A)},E.isAfter=function(M,A){return P(M)<this.startOf(A)},E.isBefore=function(M,A){return this.endOf(A)<P(M)},E.$g=function(M,A,$){return O.u(M)?this[A]:this.set($,M)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(M,A){var $=this,V=!!O.u(A)||A,F=O.p(M),z=function(_e,ce){var ye=O.w($.$u?Date.UTC($.$y,ce,_e):new Date($.$y,ce,_e),$);return V?ye:ye.endOf(u)},W=function(_e,ce){return O.w($.toDate()[_e].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ce)),$)},Z=this.$W,K=this.$M,ue=this.$D,Y="set"+(this.$u?"UTC":"");switch(F){case f:return V?z(1,0):z(31,11);case h:return V?z(1,K):z(0,K+1);case d:var U=this.$locale().weekStart||0,ie=(Z<U?Z+7:Z)-U;return z(V?ue-ie:ue+(6-ie),K);case u:case m:return W(Y+"Hours",0);case c:return W(Y+"Minutes",1);case l:return W(Y+"Seconds",2);case a:return W(Y+"Milliseconds",3);default:return this.clone()}},E.endOf=function(M){return this.startOf(M,!1)},E.$set=function(M,A){var $,V=O.p(M),F="set"+(this.$u?"UTC":""),z=($={},$[u]=F+"Date",$[m]=F+"Date",$[h]=F+"Month",$[f]=F+"FullYear",$[c]=F+"Hours",$[l]=F+"Minutes",$[a]=F+"Seconds",$[s]=F+"Milliseconds",$)[V],W=V===u?this.$D+(A-this.$W):A;if(V===h||V===f){var Z=this.clone().set(m,1);Z.$d[z](W),Z.init(),this.$d=Z.set(m,Math.min(this.$D,Z.daysInMonth())).$d}else z&&this.$d[z](W);return this.init(),this},E.set=function(M,A){return this.clone().$set(M,A)},E.get=function(M){return this[O.p(M)]()},E.add=function(M,A){var $,V=this;M=Number(M);var F=O.p(A),z=function(K){var ue=P(V);return O.w(ue.date(ue.date()+Math.round(K*M)),V)};if(F===h)return this.set(h,this.$M+M);if(F===f)return this.set(f,this.$y+M);if(F===u)return z(1);if(F===d)return z(7);var W=($={},$[l]=n,$[c]=r,$[a]=t,$)[F]||1,Z=this.$d.getTime()+M*W;return O.w(Z,this)},E.subtract=function(M,A){return this.add(-1*M,A)},E.format=function(M){var A=this,$=this.$locale();if(!this.isValid())return $.invalidDate||p;var V=M||"YYYY-MM-DDTHH:mm:ssZ",F=O.z(this),z=this.$H,W=this.$m,Z=this.$M,K=$.weekdays,ue=$.months,Y=$.meridiem,U=function(ce,ye,ge,se){return ce&&(ce[ye]||ce(A,V))||ge[ye].slice(0,se)},ie=function(ce){return O.s(z%12||12,ce,"0")},_e=Y||function(ce,ye,ge){var se=ce<12?"AM":"PM";return ge?se.toLowerCase():se};return V.replace(y,function(ce,ye){return ye||function(ge){switch(ge){case"YY":return String(A.$y).slice(-2);case"YYYY":return O.s(A.$y,4,"0");case"M":return Z+1;case"MM":return O.s(Z+1,2,"0");case"MMM":return U($.monthsShort,Z,ue,3);case"MMMM":return U(ue,Z);case"D":return A.$D;case"DD":return O.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return U($.weekdaysMin,A.$W,K,2);case"ddd":return U($.weekdaysShort,A.$W,K,3);case"dddd":return K[A.$W];case"H":return String(z);case"HH":return O.s(z,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return _e(z,W,!0);case"A":return _e(z,W,!1);case"m":return String(W);case"mm":return O.s(W,2,"0");case"s":return String(A.$s);case"ss":return O.s(A.$s,2,"0");case"SSS":return O.s(A.$ms,3,"0");case"Z":return F}return null}(ce)||F.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(M,A,$){var V,F=this,z=O.p(A),W=P(M),Z=(W.utcOffset()-this.utcOffset())*n,K=this-W,ue=function(){return O.m(F,W)};switch(z){case f:V=ue()/12;break;case h:V=ue();break;case _:V=ue()/3;break;case d:V=(K-Z)/6048e5;break;case u:V=(K-Z)/864e5;break;case c:V=K/r;break;case l:V=K/n;break;case a:V=K/t;break;default:V=K}return $?V:O.a(V)},E.daysInMonth=function(){return this.endOf(h).$D},E.$locale=function(){return B[this.$L]},E.locale=function(M,A){if(!M)return this.$L;var $=this.clone(),V=C(M,A,!0);return V&&($.$L=V),$},E.clone=function(){return O.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},N}(),R=H.prototype;return P.prototype=R,[["$ms",s],["$s",a],["$m",l],["$H",c],["$W",u],["$M",h],["$y",f],["$D",m]].forEach(function(N){R[N[1]]=function(E){return this.$g(E,N[0],N[1])}}),P.extend=function(N,E){return N.$i||(N(E,H,P),N.$i=!0),P},P.locale=C,P.isDayjs=b,P.unix=function(N){return P(1e3*N)},P.en=B[S],P.Ls=B,P.p={},P})})(ba);var Wd=ba.exports;const wa=qd(Wd),jd=i=>{const e=re.useRouter(),t=re.useRoute(),n=`${i.domain}/api/`,r=be.create({baseURL:n}),s=be.create({baseURL:n}),a=be.create({baseURL:n}),l=be.create({baseURL:n}),c=be.create({baseURL:n}),u=be.create({baseURL:n}),d=be.create({baseURL:n}),h=x=>{try{const T=JSON.parse(localStorage.getItem("authTokensAccess")||"");T.length>0&&(x.headers.Authorization=`Bearer ${T}`)}catch{console.warn("accessToken is undefined [useAxios]")}return x},_=x=>{const T=localStorage.getItem("apiKey"),S=(T==null?void 0:T.replace(/^.(.*).$/,"$1"))||"";return x.headers={"Content-Type":"application/json","x-api-key":S},x},f=async x=>{if(!i.user)return x;const T=i.user.exp??0;if(!(wa.unix(T).diff(wa())<3e3))return x;const B=Cs("authTokensRefresh",null,"string");try{const k=await be.post(`${n}user/token/refresh/`,{refresh:B.value});if(!k.data.access)return w(),x;localStorage.setItem("authTokensAccess",JSON.stringify(k.data.access)),g(k.data),y(Ss(k.data.access)),x.headers={...x.headers,Authorization:`Bearer ${k.data.access}`}}catch(k){console.error("Failed to refresh token:",k),w()}return x},m=x=>{x.interceptors.request.use(T=>f(h(T)),T=>Promise.reject(T))};m(a),m(c),m(d);const p=x=>{x.interceptors.request.use(T=>_(T))};p(u),p(s),p(d);const g=(x,T=!1)=>{localStorage.setItem("authTokensAccess",JSON.stringify(x.access)),T&&localStorage.setItem("authTokensRefresh",JSON.stringify(x.refresh))},y=x=>{i.user=x,localStorage.setItem("user",JSON.stringify(x))},w=()=>{i.user=null,Fn(["authTokensAccess","authTokensRefresh","user","cart","bonus"]),sessionStorage.removeItem("is_adult"),e.push(`/${t.params.orgId}/`),window.location.reload()};return{axiosInstanceAuthenticationGet:a,axiosInstanceAuthenticationPost:c,axiosInstanceAuthenticationPostApiKey:d,axiosInstancePost:l,axiosInstanceGet:r,axiosInstanceGetApiKey:s,axiosInstancePostApiKey:u}},Ki=(i,e)=>e.some(t=>i instanceof t);let xa,ka;function Xd(){return xa||(xa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Yd(){return ka||(ka=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Ji=new WeakMap,Zi=new WeakMap,ai=new WeakMap;function Gd(i){const e=new Promise((t,n)=>{const r=()=>{i.removeEventListener("success",s),i.removeEventListener("error",a)},s=()=>{t(wn(i.result)),r()},a=()=>{n(i.error),r()};i.addEventListener("success",s),i.addEventListener("error",a)});return ai.set(e,i),e}function Kd(i){if(Ji.has(i))return;const e=new Promise((t,n)=>{const r=()=>{i.removeEventListener("complete",s),i.removeEventListener("error",a),i.removeEventListener("abort",a)},s=()=>{t(),r()},a=()=>{n(i.error||new DOMException("AbortError","AbortError")),r()};i.addEventListener("complete",s),i.addEventListener("error",a),i.addEventListener("abort",a)});Ji.set(i,e)}let Qi={get(i,e,t){if(i instanceof IDBTransaction){if(e==="done")return Ji.get(i);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return wn(i[e])},set(i,e,t){return i[e]=t,!0},has(i,e){return i instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in i}};function Sa(i){Qi=i(Qi)}function Jd(i){return Yd().includes(i)?function(...e){return i.apply(eo(this),e),wn(this.request)}:function(...e){return wn(i.apply(eo(this),e))}}function Zd(i){return typeof i=="function"?Jd(i):(i instanceof IDBTransaction&&Kd(i),Ki(i,Xd())?new Proxy(i,Qi):i)}function wn(i){if(i instanceof IDBRequest)return Gd(i);if(Zi.has(i))return Zi.get(i);const e=Zd(i);return e!==i&&(Zi.set(i,e),ai.set(e,i)),e}const eo=i=>ai.get(i);function Qd(i,e,{blocked:t,upgrade:n,blocking:r,terminated:s}={}){const a=indexedDB.open(i,e),l=wn(a);return n&&a.addEventListener("upgradeneeded",c=>{n(wn(a.result),c.oldVersion,c.newVersion,wn(a.transaction),c)}),t&&a.addEventListener("blocked",c=>t(c.oldVersion,c.newVersion,c)),l.then(c=>{s&&c.addEventListener("close",()=>s()),r&&c.addEventListener("versionchange",u=>r(u.oldVersion,u.newVersion,u))}).catch(()=>{}),l}const ef=["get","getKey","getAll","getAllKeys","count"],tf=["put","add","delete","clear"],to=new Map;function Ca(i,e){if(!(i instanceof IDBDatabase&&!(e in i)&&typeof e=="string"))return;if(to.get(e))return to.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,r=tf.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(r||ef.includes(t)))return;const s=async function(a,...l){const c=this.transaction(a,r?"readwrite":"readonly");let u=c.store;return n&&(u=u.index(l.shift())),(await Promise.all([u[t](...l),r&&c.done]))[0]};return to.set(e,s),s}Sa(i=>({...i,get:(e,t,n)=>Ca(e,t)||i.get(e,t,n),has:(e,t)=>!!Ca(e,t)||i.has(e,t)}));const nf=["continue","continuePrimaryKey","advance"],Ea={},no=new WeakMap,Ta=new WeakMap,rf={get(i,e){if(!nf.includes(e))return i[e];let t=Ea[e];return t||(t=Ea[e]=function(...n){no.set(this,Ta.get(this)[e](...n))}),t}};async function*of(...i){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...i)),!e)return;e=e;const t=new Proxy(e,rf);for(Ta.set(t,e),ai.set(t,eo(e));e;)yield t,e=await(no.get(t)||e.continue()),no.delete(t)}function va(i,e){return e===Symbol.asyncIterator&&Ki(i,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Ki(i,[IDBIndex,IDBObjectStore])}Sa(i=>({...i,get(e,t,n){return va(e,t)?of:i.get(e,t,n)},has(e,t){return va(e,t)||i.has(e,t)}}));let ro;async function li(){return ro||(ro=Qd("products",2,{upgrade(i,e){e<1&&(i.objectStoreNames.contains("data")||i.createObjectStore("data",{keyPath:"key"})),e<2&&(i.objectStoreNames.contains("images")||i.createObjectStore("images",{keyPath:"id"}))}})),ro}async function sf(i){return(await li()).transaction("data","readonly").objectStore("data").get(i)}async function Na(i,e){const n=(await li()).transaction("data","readwrite");await n.objectStore("data").put({key:i,data:e,timestamp:Date.now()}),await n.done}async function af(i,e){const n=(await li()).transaction("images","readwrite");await n.objectStore("images").put({id:i,blob:e,timestamp:Date.now()}),await n.done}async function Ma(i){const r=await(await li()).transaction("images","readonly").objectStore("images").get(i);return r==null?void 0:r.blob}const ae=class ae{constructor(){me(this,"axiosInstanceGet");me(this,"axiosInstancePost");me(this,"axiosInstanceAuthenticationGet");me(this,"axiosInstanceAuthenticationPost");me(this,"axiosInstanceGetApiKey");me(this,"axiosInstancePostApiKey");me(this,"axiosInstanceAuthenticationPostApiKey");me(this,"currentUpsaleController",null);me(this,"controller",new AbortController);this.axiosInstanceGet=ae._axiosGet,this.axiosInstancePost=ae._axiosPost,this.axiosInstanceGetApiKey=ae._axiosPostApiKey,this.axiosInstancePostApiKey=ae._axiosPostApiKey,this.axiosInstanceAuthenticationPostApiKey=ae._axiosAuthPostApiKey,this.axiosInstanceAuthenticationGet=ae._axiosAuthGet,this.axiosInstanceAuthenticationPost=ae._axiosAuthPost}static create(e){return e&&!ae._config&&ae._initialize(e),ae._config||console.warn("InitConnection не инициализирован"),new ae}static _initialize(e,t=null){const n=Le(),r=Ke(),{config_lib:s}=J.storeToRefs(n),{stateCard:a,recountGroupTotalAmount:l}=J.storeToRefs(r);ae._config=e,ae._cardStore=r,ae._stateCard=a,ae._recountGroupTotalAmount=l,s.value=e;const c=jd(e);ae._axiosPostApiKey=c.axiosInstanceGetApiKey,ae._axiosPostApiKey=c.axiosInstancePostApiKey,ae._axiosAuthPostApiKey=c.axiosInstanceAuthenticationPostApiKey,ae._axiosGet=c.axiosInstanceGet,ae._axiosPost=c.axiosInstancePost,ae._axiosAuthGet=c.axiosInstanceAuthenticationGet,ae._axiosAuthPost=c.axiosInstanceAuthenticationPost}get config(){return ae._config}get cardStore(){return ae._cardStore}get stateCard(){return ae._stateCard}get recountGroupTotalAmount(){return ae._recountGroupTotalAmount}async updateTheme(){var s,a;const e=JSON.parse(localStorage.getItem("themeConfig"))??null,t=Ge();if(e!==null){t.updateColor(e);return}const n=Le(),r=await((a=this.axiosInstanceGet)==null?void 0:a.get(`org/organizations/${(s=this.config)==null?void 0:s.orgId}/design/`));n.setStateDrum(r==null?void 0:r.data.hide_barban),n.setKioskTimeout(r==null?void 0:r.data.kiosk_timeout),localStorage.setItem("themeConfig",JSON.stringify(r.data)),t.updateColor(r.data)}async getGroup(){var e,t;try{const n=await((t=this.axiosInstanceGet)==null?void 0:t.get(`${(e=this.config)==null?void 0:e.pointId}/groups/`));return n==null?void 0:n.data}catch(n){return console.error("Error fetching products:",n),[]}}async fetchPage(e){var n,r;const t=await((r=this.axiosInstanceGet)==null?void 0:r.get(`${(n=this.config)==null?void 0:n.pointId}/groups/products/?page=${e}`));return(t==null?void 0:t.data.results)||[]}async fetchPageWithInfo(e){var n,r;if(!e||e<1)throw new Error("Пагинация не с 1");const t=await((r=this.axiosInstanceGet)==null?void 0:r.get(`${(n=this.config)==null?void 0:n.pointId}/groups/products/?page=${e}`));return(t==null?void 0:t.data)||{count:0,results:[]}}async fetchAndCacheAllPages(){try{const e=bu(1),t=await this.fetchPageWithInfo(1),{count:n=0,results:r=[]}=t;if(n===0)return console.warn("Нет продуктов: count=0"),[];const s=r.length,a=Math.ceil(n/s);await Na("page_1",t);const l=Array.from({length:a-1},(f,m)=>sf(`page_${m+2}`).then(p=>{var g;return((g=p==null?void 0:p.data)==null?void 0:g.results)||[]})),c=await Promise.all(l);if(c.every(f=>f.length>0))return[r,...c].flat();const d=Array.from({length:a-1},(f,m)=>{var g;const p=m+2;return((g=c[m])==null?void 0:g.length)>0?Promise.resolve(c[m]):e(()=>this.fetchPage(p).then(async y=>(await Na(`page_${p}`,{results:y}),y)).catch(y=>(console.error(`Page ${p} failed`,y),[])))}),h=await Promise.all(d),_=[r,...h].flat();return this.cacheImagesInBackground(_),_}catch(e){return console.error("Ошибка в fetchAndCacheAllPages:",e),[]}}cacheImagesInBackground(e){e.forEach(t=>{var s;const n=t.video_link||t.image_link,r=t.id;n&&r&&this.loadAndCacheImage(n,r),(s=t.products)==null||s.forEach(a=>{const l=a.video_link||a.image_link,c=a.id;l&&c&&this.loadAndCacheImage(l,c)})})}async loadAndCacheImage(e,t){const n=await Ma(t);if(n){this.dispatchImageCachedEvent(t,n);return}try{const r=await fetch(e);if(!r.ok)throw new Error("Network error");const s=await r.blob();if(s.size===0)throw new Error("Empty blob");await af(t,s),this.dispatchImageCachedEvent(t,s)}catch(r){console.warn(`[ImageCache] Failed for ${t}:`,r)}}dispatchImageCachedEvent(e,t){window.dispatchEvent(new CustomEvent("image-cached",{detail:{id:e,blob:t}}))}async getProduct(e=null){var t,n;if(!e)return[];try{const r=await((n=this.axiosInstanceGet)==null?void 0:n.get(`${(t=this.config)==null?void 0:t.pointId}/products/${e}`));return r==null?void 0:r.data}catch(r){return console.error("Error fetching cardProducts:",r),[]}}async getSingleProduct(e){var s;const t=Le(),n=Ke(),{config_lib:r}=J.storeToRefs(t);try{const a=await((s=this.axiosInstanceGet)==null?void 0:s.get(`${r.value.pointId}/products/${e}`));(a==null?void 0:a.status)===200&&(n.stateCard.openCard={...a.data,amount:1},n.stateCard.groupModifiers=a.data.group_modifiers,a.data.modifiers.length>0&&n.stateCard.groupModifiers.unshift({default_amount:0,description:"",group_modifiers:a.data.modifiers,id:"Добавки2000",image_link:null,max_amount:1,min_amount:a.data.modifiers.reduce((l,c)=>l+=c.min_amount,0),name:"Добавки",required:!1}),n.stateCard.groupModifiersSelected=new Array(n.stateCard.groupModifiers.length).fill({group:"",modifiers:[],modifier_count:0}),n.stateCard.productSizes=a.data.sizes,n.defaultAmountModifiers(),a.data.show_recommendations&&this.productUpsale(a.data.id))}catch(a){throw console.log("store card[getFetchProducts]:",a),a}}async getTheme(){try{this.updateTheme()}catch(e){return console.error("Error fetching products:",e),[]}}async authorizeByCard(e){var t,n;try{const r=await((n=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:n.post(`${(t=this.config)==null?void 0:t.domain}/api/user/validate-card/`,{card_number:e}));return localStorage.setItem("authTokensAccess",JSON.stringify(r==null?void 0:r.data.access)),localStorage.setItem("authTokensRefresh",JSON.stringify(r==null?void 0:r.data.refresh)),r==null?void 0:r.data}catch(r){throw console.error("Ошибка авторизации:",r),r}}async getLoyalSmsCode(e){var t,n;try{const r=await((n=this.axiosInstancePostApiKey)==null?void 0:n.post(`${(t=this.config)==null?void 0:t.domain}/api/device/auth/request-otp/`,{phone:e}));return r==null?void 0:r.data}catch(r){throw console.error("Ошибка получения sms-code:",r),r}}async sendSmsCodeForAuth(e,t){var n,r;try{const s=await((r=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:r.post(`${(n=this.config)==null?void 0:n.domain}/api/device/auth/`,{code:e,phone:t}));return s==null?void 0:s.data}catch(s){throw console.error("Ошибка отправки sms-code:",s),s}}async callStaff(e,t){var n,r,s,a;try{const l=await((s=this.axiosInstancePost)==null?void 0:s.post(`${(n=this.config)==null?void 0:n.domain}/api/org_unit/${(r=this.config)==null?void 0:r.pointId}/table/${e}/call-staff/`,{reason:t}));return(a=l==null?void 0:l.data)==null?void 0:a.response_text}catch(l){throw console.error("Ошибка[callWaiter]",l),l}}async createOrder(e,t,n=!0,r,s=!1,a=!1){var f,m,p;const l=zn(),c=s?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,u=n?c:this.axiosInstanceAuthenticationPost,d=n?"/device/order/create":"/order/create",h=n?(f=this.config)==null?void 0:f.pointId:(m=this.config)==null?void 0:m.pointId,_=await(u==null?void 0:u.post(`${(p=this.config)==null?void 0:p.domain}/api/org_unit/${h}${d}`,{items:e,table:t||null,comment:r}));return(_==null?void 0:_.status)===201&&l.orderSocket(_==null?void 0:_.data.id,n,a),_}async initPaymentLink(e,t=!0){const n=t?this.axiosInstancePost:this.axiosInstanceAuthenticationPost,r=Le(),s=t?"TERMINAL":"YOOKASSA",a=await(n==null?void 0:n.post("payment/init",{by_bonuses:r.countBonus,order:e,provider_type:s}));return a==null?void 0:a.data}async orderPay(e){var t;return(t=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:t.post(`order/${e}/pay/`,{order_id:e})}async getProfile(){var t,n;const e=await((n=this.axiosInstanceAuthenticationGet)==null?void 0:n.get(`user/current?organization=${(t=this.config)==null?void 0:t.orgId}`));if((e==null?void 0:e.status)===200){const r=Le();return r.profile=e.data,r.is18Allowed=sessionStorage.getItem("is_adult")==="true",e.data}else return e}async calculateDiscount(e,t=!0,n=!1){var c,u;const r=n?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,s=t?r:this.axiosInstanceAuthenticationPost,a=t?(c=this.config)==null?void 0:c.pointId:(u=this.config)==null?void 0:u.pointId,l=await(s==null?void 0:s.post(`/org_unit/${a}/cart/calculate-discount/`,e));return(l==null?void 0:l.status)===200?l.data:l}async productUpsale(e){var s,a,l;const t=Ke(),{dataUpSale:n}=J.storeToRefs(t);(s=this.currentUpsaleController)==null||s.abort();const r=new AbortController;this.currentUpsaleController=r;try{const c=await((l=this.axiosInstanceGet)==null?void 0:l.get(`/${(a=this.config)==null?void 0:a.pointId}/products/${e}/recommendation/`,{signal:r.signal}));r.signal.aborted||(n.value=c==null?void 0:c.data)}catch(c){if(c.name==="AbortError"||c.name==="CanceledError"){console.log("Upsale отменён — пришёл новый запрос");return}throw console.error("Ошибка upsale:",c),c}finally{this.currentUpsaleController===r&&(this.currentUpsaleController=null)}}};me(ae,"_config",null),me(ae,"_axiosGet"),me(ae,"_axiosGetApiKey"),me(ae,"_axiosPostApiKey"),me(ae,"_axiosAuthPostApiKey"),me(ae,"_axiosPost"),me(ae,"_axiosAuthGet"),me(ae,"_axiosAuthPost"),me(ae,"_cardStore",null),me(ae,"_stateCard",null),me(ae,"_recountGroupTotalAmount",null);let Qt=ae;const lf=o.defineComponent({__name:"UseScrollCenter",props:{axis:{},behavior:{},autoScroll:{type:Boolean},container:{},idActive:{},clearContainer:{type:Boolean}},setup(i,{expose:e}){const t=i,n=Le(),r=o.ref(null),s=async l=>{if(!r.value||!l)return;let c=window;t.container&&(c=typeof t.container=="string"?document.querySelector(t.container)||window:t.container);const u={behavior:t.behavior};if(t.axis==="x"){const d=c===window?window.innerWidth:c.clientWidth,h=l.offsetWidth;let _=l.offsetLeft;if(c!==window){const f=c.getBoundingClientRect();_=l.getBoundingClientRect().left-f.left+c.scrollLeft}_-=(d-h)/2,u.left=Math.max(0,_)}else{const d=c===window?window.innerHeight:c.clientHeight,h=l.offsetHeight;let _=l.offsetTop;if(c!==window){const f=c.getBoundingClientRect();_=l.getBoundingClientRect().top-f.top+c.scrollTop}_-=(d-h)/2,u.top=Math.max(0,_)}try{c===window?window.scrollTo(u):c.scrollTo(u)}catch(d){console.error("Scroll error:",d)}};o.onMounted(async()=>{if(t.autoScroll){let l=null;if(await o.nextTick(),n.activeScrolling_lib){const c=n.activeScrolling_lib.findIndex(u=>u.id===t.idActive);t.idActive?(l=document.getElementById(`scrolling${t.idActive}`),l&&c!==-1&&(n.activeScrolling_lib[c]=l)):n.activeScrolling_lib[c]&&(l=n.activeScrolling_lib[c]),s(l)}}});const a=async l=>{t.clearContainer&&(n.activeScrolling_lib=[]);const c=l.currentTarget;await o.nextTick(),n.activeScrolling_lib.includes(c)||n.activeScrolling_lib.push(c),s(c)};return e({scrollToElement:s}),(l,c)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"wrapperRef",ref:r,class:"scroll-to-wrapper"},[o.renderSlot(l.$slots,"default",{handleTargetClick:a},void 0,!0)],512))}}),ke=(i,e)=>{const t=i.__vccOpts||i;for(const[n,r]of e)t[n]=r;return t},io=ke(lf,[["__scopeId","data-v-b510c3f1"]]),cf={},uf={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 df(i,e){return o.openBlock(),o.createElementBlock("svg",uf,[...e[0]||(e[0]=[o.createElementVNode("defs",null,null,-1),o.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 oo=ke(cf,[["render",df]]),ff=["id","onClick"],hf={class:"modified_plus_btn"},pf=["src"],mf={key:2,class:"wrapper_modifier_item"},_f={key:0,class:"modifier_item_n_wrapper"},gf=["src"],yf={key:1,class:"modifier_plus_item"},bf=["src"],wf=["src"],xf=ke(o.defineComponent({__name:"PlusModifier",props:{isSectionModifier:{type:Boolean},toggleNotRequire:{type:Function}},setup(i){const e=Ke(),t=Ge(),{stateCard:n}=J.storeToRefs(e),{itemThemes:r}=J.storeToRefs(t),s=o.ref([]),a=o.ref([]),l=o.ref(null),c=o.ref(null),u=h=>{h instanceof HTMLElement&&!s.value.includes(h)&&s.value.push(h)},d=h=>{c.value=h};return o.onMounted(async()=>{await o.nextTick(),n.value.plusButtonsRefs=s.value}),o.watchEffect(()=>{a.value=n.value.groupModifiersSelected,document.body.style.overflow=""}),o.onBeforeUnmount(()=>{s.value=[],n.value.plusButtonsRefs=[]}),(h,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({card_modified_wrapper_many:o.unref(n).groupModifiers.length>=5})},[o.unref(n).groupModifiersSelected?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["card_modified_wrapper",[o.unref(n).groupModifiers.length<=4?"card_modified_wrapper_center":""]]),ref_key:"scrollPlusContainer",ref:l,onTouchstart:_[0]||(_[0]=o.withModifiers(()=>{},["stop"])),onPointerdown:_[1]||(_[1]=o.withModifiers(()=>{},["stop"]))},[o.createVNode(io,{axis:"x",behavior:"smooth",container:l.value,autoScroll:!0,idActive:c.value,clearContainer:!0},{default:o.withCtx(({handleTargetClick:f})=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(n).groupModifiers,(m,p)=>{var g,y;return o.openBlock(),o.createElementBlock("div",{class:"button_modified",key:m.id,ref_for:!0,ref:u,id:"scrolling"+m.id,"data-clickable":"true",onClick:w=>{i.toggleNotRequire&&i.toggleNotRequire(m,p),d(m.id),f(w)}},[o.createElementVNode("div",hf,[a.value[p].modifiers.length===0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([{modified_plus_btn_active:m.id===((g=o.unref(n).groupCurrentOpen)==null?void 0:g.id)&&i.isSectionModifier},"modified_plus_active"])},[o.createVNode(oo,{"aria-label":`Открыть группу модификаторов ${m.name}`},null,8,["aria-label"])],2)):a.value[p].modifiers.length===1?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["modified_plus_btn modified_plus_btn_solo",{modified_plus_btn_active:m.id===((y=o.unref(n).groupCurrentOpen)==null?void 0:y.id)&&i.isSectionModifier}])},[o.createElementVNode("img",{src:a.value[p].modifiers[0].image_link||o.unref(r).fallback_image||"",alt:"Модификатор"},null,8,pf)],2)):(o.openBlock(),o.createElementBlock("div",mf,[a.value[p].modifiers.length>2?(o.openBlock(),o.createElementBlock("div",_f,[a.value[p].modifiers.length===3?(o.openBlock(),o.createElementBlock("img",{key:0,class:"modifier_plus_item modifier_item_three",src:a.value[p].modifiers[2].image_link||o.unref(r).fallback_image||""},null,8,gf)):(o.openBlock(),o.createElementBlock("p",yf," + "+o.toDisplayString(a.value[p].modifiers.length-2),1))])):o.createCommentVNode("",!0),o.createElementVNode("div",null,[a.value[p].modifiers.length>0?(o.openBlock(),o.createElementBlock("img",{key:0,src:a.value[p].modifiers[0].image_link||o.unref(r).fallback_image||"",class:"modifier_plus_item modifier_item_first"},null,8,bf)):o.createCommentVNode("",!0),a.value[p].modifiers.length>1?(o.openBlock(),o.createElementBlock("img",{key:1,src:a.value[p].modifiers[1].image_link||o.unref(r).fallback_image||"",class:"modifier_plus_item modifier_item_second"},null,8,wf)):o.createCommentVNode("",!0)])]))]),o.createElementVNode("p",null,o.toDisplayString(m.name),1)],8,ff)}),128))]),_:1},8,["container","idActive"])],34)):o.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-65ff3a99"]]),kf={},Sf={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 Cf(i,e){return o.openBlock(),o.createElementBlock("svg",Sf,[...e[0]||(e[0]=[o.createElementVNode("desc",null," Created with Pixso. ",-1),o.createElementVNode("defs",null,null,-1),o.createElementVNode("circle",{id:"Ellipse 1",cx:"10.923828",cy:"10.923462",r:"10.923489",fill:"#FF6D2E","fill-opacity":"1.000000"},null,-1),o.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 so=ke(kf,[["render",Cf]]),Ef={key:0,class:"wrapper_modifiers"},Tf={class:"wrapper_nutritional_value"},vf={class:"nutritional_scheme"},Nf={key:0,class:"nutritional_parameters"},Mf={key:1,class:"nutritional_parameters"},Pf={key:2,class:"nutritional_parameters"},Af={key:3,class:"nutritional_parameters"},Bf={class:"modifier_shadow"},Rf={class:"wrapper_modifiers_title"},Df={class:"wrapper_text_count_modifiers"},Of=["onClick","onKeydown","aria-label"],$f={key:0,class:"counter_modifier"},If={class:"hide_image_corners"},Vf=["src","alt"],Lf={key:1,loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},Ff=["src"],zf={class:"modifier_title"},Uf=ke(o.defineComponent({__name:"SectionModifiers",props:{isModified:{type:Boolean}},setup(i){const e=Ge(),t=Ke(),{itemThemes:n}=J.storeToRefs(e),{stateCard:r,recountGroupTotalAmount:s,groupTotalAmount:a}=J.storeToRefs(t),l=o.ref(null),c=o.ref({}),u=(_,f)=>{f instanceof HTMLElement?c.value[_]=f:c.value[_]=null};o.watch(()=>r.value.isAnimationFly,_=>{_===!0&&r.value.currentModifier&&(h(c.value[r.value.currentModifier.id]),r.value.isAnimationFly=!1),document.body.style.overflow=""});const d=()=>{r.value.isSectionModifier=!1,document.body.style.overflow="scroll"},h=_=>{if(!_)return;const f=r.value.groupModifiers.findIndex(w=>w.id===r.value.groupCurrentOpen.id),m=r.value.plusButtonsRefs[f]||r.value.plusButtonsRefs[0];if(!m)return;const p=_.getBoundingClientRect(),g=m.getBoundingClientRect(),y=_.cloneNode(!0);y.classList.add("flyer"),Object.assign(y.style,{width:`${p.width}px`,height:`${p.height}px`,left:`${p.left}px`,top:`${p.top}px`,position:"fixed",zIndex:"1000"}),document.body.appendChild(y),l.value=y,requestAnimationFrame(()=>{const w=g.left+g.width/3-(p.left+p.width/2),x=g.top+g.height/4-(p.top+p.height/2),T=g.width/p.width*.2;y.style.transform=`translate(${w}px, ${x}px) scale(${T})`,y.style.opacity="0.4",y.style.transition="transform 0.5s ease, opacity 0.5s ease"}),y.addEventListener("transitionend",()=>{y.remove(),l.value=null,m.classList.add("bump"),setTimeout(()=>m.classList.remove("bump"),300)},{once:!0})};return(_,f)=>(o.openBlock(),o.createBlock(o.Transition,{name:"modifiers"},{default:o.withCtx(()=>{var m,p,g,y,w,x,T,S,B,k,b,C;return[i.isModified?(o.openBlock(),o.createElementBlock("div",Ef,[o.createElementVNode("div",Tf,[o.createElementVNode("div",{class:o.normalizeClass(["card_header_inner_back",[(m=o.unref(r).openCard)!=null&&m.proteins_amount?"card_header_inner_back_nutrients":""]]),onClick:d,"aria-label":"Закрыть выбор модификаторов"},[o.createVNode(so,{class:"arrow_bottom"})],2),o.createElementVNode("div",vf,[(p=o.unref(r).openCard)!=null&&p.energy_amount?(o.openBlock(),o.createElementBlock("div",Nf,[o.createElementVNode("b",null,o.toDisplayString((g=o.unref(r).openCard)==null?void 0:g.energy_amount),1),f[2]||(f[2]=o.createElementVNode("p",null,"Килокалории",-1))])):o.createCommentVNode("",!0),(y=o.unref(r).openCard)!=null&&y.proteins_amount?(o.openBlock(),o.createElementBlock("div",Mf,[o.createElementVNode("b",null,o.toDisplayString((w=o.unref(r).openCard)==null?void 0:w.proteins_amount),1),f[3]||(f[3]=o.createElementVNode("p",null,"Белки",-1))])):o.createCommentVNode("",!0),(x=o.unref(r).openCard)!=null&&x.fat_amount?(o.openBlock(),o.createElementBlock("div",Pf,[o.createElementVNode("b",null,o.toDisplayString((T=o.unref(r).openCard)==null?void 0:T.fat_amount),1),f[4]||(f[4]=o.createElementVNode("p",null,"Жиры",-1))])):o.createCommentVNode("",!0),(S=o.unref(r).openCard)!=null&&S.carbohydrates_amount?(o.openBlock(),o.createElementBlock("div",Af,[o.createElementVNode("b",null,o.toDisplayString((B=o.unref(r).openCard)==null?void 0:B.carbohydrates_amount),1),f[5]||(f[5]=o.createElementVNode("p",null,"Углеводы",-1))])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",Bf,[o.createElementVNode("p",Rf,o.toDisplayString((k=o.unref(r).groupCurrentOpen)==null?void 0:k.name),1),o.createElementVNode("p",Df,"Выбрано "+o.toDisplayString(o.unref(s))+" из "+o.toDisplayString(o.unref(a)),1),o.createElementVNode("div",{class:o.normalizeClass((b=o.unref(r).groupModifiers.find(P=>{var O;return P.id===((O=o.unref(r).groupCurrentOpen)==null?void 0:O.id)}))!=null&&b.group_modifiers.length?"wrapper_modifiers_card":"wrapper_modifiers_card_column"),onTouchstart:f[0]||(f[0]=o.withModifiers(()=>{},["stop"])),onPointerdown:f[1]||(f[1]=o.withModifiers(()=>{},["stop"]))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((C=o.unref(r).groupCurrentOpen)==null?void 0:C.group_modifiers)||[],P=>{var O,H,R;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["modifier_card",{hidden_modifier_card:P.default_amount===0&&((O=o.unref(r).groupCurrentOpen)==null?void 0:O.id)==="Добавки2000"&&P.min_amount===0&&P.max_amount===0}]),key:P.id,onClick:N=>o.unref(t).modifierSelect(P),onKeydown:o.withKeys(N=>o.unref(t).modifierSelect(P),["enter"]),tabindex:"0",role:"button","data-clickable":"true","aria-label":`Выбрать модификатор группы ${P.name}`,ref_for:!0,ref:N=>u(P.id,N)},[o.createElementVNode("div",{class:o.normalizeClass([{modifier_card_active:o.unref(r).groupModifiersSelected.some(N=>{var E;return N.group===((E=o.unref(r).groupCurrentOpen)==null?void 0:E.id)&&N.modifiers.some(M=>M.id===P.id)})},"wrapper_image_corners"])},[P.amount>1?(o.openBlock(),o.createElementBlock("div",$f,o.toDisplayString(P.amount),1)):o.createCommentVNode("",!0),o.createElementVNode("div",If,[P.video_link?(o.openBlock(),o.createElementBlock("video",Lf,[o.createElementVNode("source",{src:P.video_link||"",type:"video/webm"},null,8,Ff)])):(o.openBlock(),o.createElementBlock("img",{key:0,class:"modifier_image",src:P.image_link||o.unref(n).fallback_image||"",alt:P.name},null,8,Vf)),o.createElementVNode("div",{class:o.normalizeClass(["wrapper_modifier_title",{wrapper_modifier_title_required:P.min_amount>0||P.required}])},[o.createElementVNode("h3",zf,o.toDisplayString(P.name),1),o.createElementVNode("p",null,"+"+o.toDisplayString(((R=(H=P.sizes)==null?void 0:H.find(N=>N.id===o.unref(r).selectedSize.id))==null?void 0:R.price)||P.price||0)+"₽",1)],2)])],2)],42,Of)}),128))],34)])])):o.createCommentVNode("",!0)]}),_:1}))}}),[["__scopeId","data-v-4b716357"]]),Hf={key:0,class:"card_size_place"},qf=["onClick","onKeydown","aria-label"],Wf={key:1,class:"card_size static"},jf=["onClick","onKeydown","aria-label"],ao=3,Xf=ke(o.defineComponent({__name:"SizeModifier",setup(i){const e=Ke(),{stateCard:t}=J.storeToRefs(e),n=o.ref(null),r=o.ref(50),s=o.ref(),a=o.ref(0),l=o.ref(0),c=o.ref(null),u=o.computed(()=>{var w;if(t.value.productSizes.length<=3)return t.value.productSizes[s.value.index]||t.value.productSizes[0];const g=a.value+1,y=((w=h.value[g])==null?void 0:w.originalIndex)??1;return t.value.productSizes[y]}),d=()=>{c.value&&t.value.productSizes.length>=3&&(l.value=c.value.offsetWidth/ao)},h=o.computed(()=>{if(t.value.productSizes.length<=3)return t.value.productSizes;const g=t.value.productSizes;return[...g.map((y,w)=>({...y,originalIndex:w})),...g.map((y,w)=>({...y,originalIndex:w})),...g.map((y,w)=>({...y,originalIndex:w}))]}),_=(g,y)=>{if(s.value={id:g.id,title:g.name,index:y,is_default:g.is_default},g.price!==null&&t.value.openCard&&(t.value.openCard={...t.value.openCard,price:g.price}),t.value.selectedSize=g,t.value.productSizes.length>3){d();const w=a.value+1;y<w?f():y>w&&m()}else{const w=t.value.productSizes.length,x=(y+.5)*(100/w);r.value=x}},f=()=>{var g;if(!(t.value.productSizes.length<=3)){if(a.value--,a.value<t.value.productSizes.length-ao+1){a.value+=t.value.productSizes.length;const y=(g=c.value)==null?void 0:g.querySelector(".card_size");y&&(y.style.transition="none",y.style.transform=`translateX(-${a.value*l.value}px)`,y.offsetHeight,y.style.transition="transform 0.2s ease-in-out")}p()}},m=()=>{var g;if(!(t.value.productSizes.length<=3)){if(a.value++,a.value>=t.value.productSizes.length*2){a.value-=t.value.productSizes.length;const y=(g=c.value)==null?void 0:g.querySelector(".card_size");y&&(y.style.transition="none",y.style.transform=`translateX(-${a.value*l.value}px)`,y.offsetHeight,y.style.transition="transform 0.2s ease-in-out")}p()}},p=()=>{var x;if(t.value.productSizes.length<=3)return;const g=a.value+1,y=((x=h.value[g])==null?void 0:x.originalIndex)??0,w=t.value.productSizes[y];s.value={id:w.id,title:w.name,index:y,is_default:w.is_default}};return o.watch(()=>[t.value.productSizes,c.value],([g=[],y])=>{if(Array.isArray(g)&&g.length>0&&y!==null){let w=g.findIndex(x=>x.is_default===!0);g.length<3&&n.value&&parseInt(n.value.style.minWidth)<767&&(n.value.style.width="100px"),w>-1?(a.value=w,_(g[w],w),l.value=120/ao):g.length===2||g.length===1?(_(g[0],0),r.value=(0+.5)*(100/2)):(_(g[1],1),r.value=(1+.5)*(100/3))}}),o.watch(()=>{var g;return[(g=t.value.selectedSize)==null?void 0:g.id,t.value.groupModifiersSelected]},([g,y])=>{if(!g||!Array.isArray(y))return;const w=y.map(x=>({...x,modifiers:x.modifiers.map(T=>{if(!T.sizes||T.sizes.length===0)return T;const S=T.sizes.find(B=>B.id===g);return S?{...T,size:S,price:S.price??T.price}:T})}));JSON.stringify(w)!==JSON.stringify(t.value.groupModifiersSelected)&&(t.value.groupModifiersSelected=w)},{deep:!0}),o.onBeforeUnmount(()=>{window.removeEventListener("resize",d)}),(g,y)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"slider_container",ref_key:"slider_container",ref:n},[o.createElementVNode("div",{class:"card_size_place_wrapper",ref_key:"sliderWrapper",ref:c},[o.unref(t).productSizes.length>1&&s.value?(o.openBlock(),o.createElementBlock("div",Hf,[o.unref(t).productSizes.length>3?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"card_size",style:o.normalizeStyle({transform:`translateX(-${a.value*l.value}px)`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h.value,(w,x)=>(o.openBlock(),o.createElementBlock("li",{key:`${w.id}-${x}`,onClick:T=>_(w,x),onKeydown:o.withKeys(T=>_(w,x),["enter"]),class:o.normalizeClass({active:s.value.id===w.id&&s.value.index===w.originalIndex}),tabindex:"0",role:"button","aria-label":`Выбрать размер ${w.name}`},o.toDisplayString(w.alt_name?w.alt_name:w.name),43,qf))),128))],4)):(o.openBlock(),o.createElementBlock("ul",Wf,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(t).productSizes,(w,x)=>(o.openBlock(),o.createElementBlock("li",{key:`${w.id}-${x}`,onClick:T=>_(w,x),onKeydown:o.withKeys(T=>_(w,x),["enter"]),class:o.normalizeClass({active:s.value.id===w.id&&s.value.index===x}),tabindex:"0",role:"button","aria-label":`Выбрать размер ${w.name}`},o.toDisplayString(w.alt_name?w.alt_name:w.name),43,jf))),128))])),u.value?(o.openBlock(),o.createElementBlock("div",{key:2,class:"size_active",style:o.normalizeStyle(o.unref(t).productSizes.length<=3?{left:`${r.value}%`}:{})},[o.createElementVNode("p",null,o.toDisplayString(u.value.alt_name?u.value.alt_name:u.value.name),1)],4)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],512)],512)),[[o.vShow,o.unref(t).productSizes.length>1&&s.value]])}}),[["__scopeId","data-v-2571f98b"]]),Yf="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",Gf={class:"counter_container"},Kf={class:"card_size_place_wrapper",ref:"sliderWrapper"},Jf={class:"cart_amount_counter"},Zf={class:"button_circle_number"},Qf=ke(o.defineComponent({__name:"NumberModifier",setup(i){const e=Ke(),{stateCard:t}=J.storeToRefs(e),n=()=>{var s,a;(s=t.value.openCard)!=null&&s.amount&&((a=t.value.openCard)==null?void 0:a.amount)>1&&(t.value.openCard.amount-=1)},r=()=>{var s;(s=t.value.openCard)!=null&&s.amount&&(t.value.openCard.amount+=1)};return(s,a)=>{var l,c;return o.openBlock(),o.createElementBlock("div",Gf,[o.createElementVNode("div",Kf,[o.createElementVNode("div",Jf,[o.createElementVNode("p",{class:o.normalizeClass(["cart_circle_minus",[((l=o.unref(t).openCard)==null?void 0:l.amount)===1?"card_circle_minus_alone":""]]),"aria-label":"Уменьшить количество продукта","data-clickable":"true",onClick:o.withModifiers(n,["stop","prevent"])},[...a[0]||(a[0]=[o.createElementVNode("span",null,null,-1)])],2),o.createElementVNode("p",Zf,o.toDisplayString((c=o.unref(t).openCard)==null?void 0:c.amount),1),o.createElementVNode("p",{class:"cart_circle_plus","aria-label":"Увеличить количество продукта","data-clickable":"true",onClick:o.withModifiers(r,["stop","prevent"])},"+")])],512)])}}}),[["__scopeId","data-v-c3d45434"]]);function Pa(i,e=800){const t=o.ref(i),n=o.ref(i);let r=null,s=null,a=i;const l=c=>{s||(s=c);const u=c-s,d=Math.min(u/e,1),h=d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2;t.value=Math.round(a+(n.value-a)*h),d<1?r=requestAnimationFrame(l):(t.value=n.value,r=null)};return o.watch(n,()=>{r&&cancelAnimationFrame(r),a=t.value,s=null,r=requestAnimationFrame(l)},{immediate:!0}),o.onUnmounted(()=>{r&&cancelAnimationFrame(r)}),{displayNumber:t,targetNumber:n,update:c=>{n.value=c}}}const Mt=o.defineComponent({__name:"RecountNumber",props:{price:{type:Number,required:!0},duration:{type:Number},fixedFloat:{type:Number,require:!1}},setup(i){const e=i,{displayNumber:t,update:n}=Pa(e.price||0,e.duration||800);return o.watchEffect(()=>{n(e.price)}),(r,s)=>(o.openBlock(),o.createElementBlock("span",null,o.toDisplayString(o.unref(t).toFixed(i.fixedFloat)),1))}}),eh=["disabled","id"],en=o.defineComponent({__name:"ButtonDefault",props:{textButtonDefault:{type:String,required:!0},disabled:{type:Boolean,default:!1},onClick:{type:Function,required:!0}},setup(i){const e=i,t=()=>{e.onClick()};return(n,r)=>(o.openBlock(),o.createElementBlock("button",{class:"buttonDefaultWrapper",disabled:i.disabled,onClick:t,id:i.disabled?"buttonDefaultDisabled":""},o.toDisplayString(i.textButtonDefault),9,eh))}}),th={class:"notification_info"},nh={key:0,class:"notification_18plus"},rh={class:"notification_18plus_image"},ih=["src"],oh={class:"notification_18plus_text"},sh={class:"notification_18plus_accept"},ah={key:1,class:"notification_text"},lh={key:0,class:"wrapper_button_accept"},lo=o.defineComponent({__name:"NotificationWindow",props:o.mergeModels({textNotificationDefault:{},backgroundColor:{},buttonAccept:{},type:{type:Boolean}},{visible:{default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(i){const e=i,t=Ge(),n=Le(),{is18Allowed:r}=J.storeToRefs(n),{itemThemes:s}=J.storeToRefs(t),a=o.computed(()=>e.backgroundColor||"rgba(50, 50, 50, 0.9)"),l=o.useModel(i,"visible"),c=()=>{sessionStorage.setItem("is_adult","true"),r.value=!0,l.value=!1},u=()=>{l.value=!1};return(d,h)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.Transition,{name:"notificationBlack",appear:""},{default:o.withCtx(()=>[l.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"notification_background_black",onClick:u})):o.createCommentVNode("",!0)]),_:1}),o.createVNode(o.Transition,{name:"notification",appear:""},{default:o.withCtx(()=>{var _;return[l.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"notification_overlay",onClick:u},[o.createElementVNode("div",{class:"notification_wrapper",style:o.normalizeStyle({"background-color":a.value,border:`2px solid ${a.value}`})},[o.createElementVNode("div",th,[i.type?(o.openBlock(),o.createElementBlock("div",nh,[o.createElementVNode("div",rh,[o.createElementVNode("img",{src:o.unref(s).adult_disclaimer_image||o.unref(s).fallback_image,alt:"Дисклеймер"},null,8,ih)]),o.createElementVNode("div",oh,o.toDisplayString(o.unref(s).adult_disclaimer_text),1),o.createElementVNode("div",sh,[h[0]||(h[0]=o.createElementVNode("label",{for:"plus18"},"Содержащиеся в настоящем разделе материалы предназначены для лиц старше 18 лет, носят информационный характер об ассортименте товаров и не являются рекламой.",-1)),o.createVNode(en,{textButtonDefault:"Мне есть 18",onClick:c,style:{fontSize:"1rem",padding:"6px 24px",marginLeft:"10px"}})])])):(o.openBlock(),o.createElementBlock("div",ah,[o.createTextVNode(o.toDisplayString(i.textNotificationDefault)+" ",1),(_=i.buttonAccept)!=null&&_.state?(o.openBlock(),o.createElementBlock("div",lh,[o.createVNode(en,{class:"button_accept",textButtonDefault:i.buttonAccept.text,onClick:i.buttonAccept.acceptBtn,disabled:i.buttonAccept.disabled},null,8,["textButtonDefault","onClick","disabled"])])):o.createCommentVNode("",!0)]))])],4)])):o.createCommentVNode("",!0)]}),_:1})],64))}}),ch={class:"button_price button_price_modifiers"},uh=["src"],dh={class:"button_text_container"},fh={class:"button_text_price"},hh=ke(o.defineComponent({__name:"ButtonPriceCount",props:{qr_menu:{type:Boolean,default:!1},closeProduct:{}},setup(i){const e=re.useRouter(),t=re.useRoute(),n=Ke(),r=Le(),s=Ge(),a=o.ref([]),l=o.ref([]),c=i,{stateCard:u,totalPrice_libCard:d,isOpenWindow:h,isAddToCard:_}=J.storeToRefs(n),{itemThemes:f}=J.storeToRefs(s),m=o.ref(!0),p=o.ref(!1),g=()=>{var w,x,T,S,B,k;if(m.value){n.setCurrentCard(u.value.openCard),p.value=!0;const b=u.value.groupModifiers.findIndex(C=>n.checkedRequiredBtn.group.id===C.id);n.checkedRequiredBtn.haveRequaire&&n.toggleNotRequire(n.checkedRequiredBtn.group,b);return}const y=u.value.groupModifiersSelected||[];if(a.value=[],l.value=[],Array.isArray(y)&&y.length>0&&y.forEach(b=>{const C=b.group,P=b.modifiers||[];C==="Добавки2000"?a.value=P.map(O=>{var H;return{...O,old_price:O.price,size:Array.isArray(O.size)?O.size.map(R=>R.id).filter(Boolean):(H=O.size)!=null&&H.id?O.size.id:void 0}}):P.length>0&&l.value.push({group:C,modifiers:P.map(O=>{var H;return{...O,old_price:O.price,size:Array.isArray(O.size)?O.size.map(R=>R.id).filter(Boolean):(H=O.size)!=null&&H.id?O.size.id:void 0}})})}),document.body.style.overflow="",u.value.openCard){const b={id:u.value.openCard.id,is_fake:u.value.openCard.is_fake||!1,amount:u.value.openCard.amount,name:u.value.openCard.name,image_link:u.value.openCard.image_link,price:u.value.openCard.price,old_price:u.value.openCard.price,size:((w=u.value.selectedSize)==null?void 0:w.id)??((T=(x=u.value.openCard.sizes)==null?void 0:x.find(C=>C.is_default))==null?void 0:T.id),sizes:((S=u.value.selectedSize)==null?void 0:S.id)??((k=(B=u.value.openCard.sizes)==null?void 0:B.find(C=>C.is_default))==null?void 0:k.id),modifiers:a.value,group_modifiers:l.value,energy_amount:u.value.openCard.energy_amount??0,proteins_amount:u.value.openCard.proteins_amount??0,fat_amount:u.value.openCard.fat_amount??0,carbohydrates_amount:u.value.openCard.carbohydrates_amount??0};c.closeProduct&&c.closeProduct(),r.addToCart(b),_.value=!0}h.value=!1,e.push(`/${t.params.orgId}/`)};return o.watch(()=>u.value.productSizes,y=>{!y||y.length===0||!u.value.selectedSize||(u.value.selectedSize={...u.value.selectedSize})},{immediate:!0}),o.watchEffect(()=>{n.checkedRequiredBtn.haveRequaire?m.value=!0:m.value=!1}),o.onMounted(()=>{_.value=!1}),(y,w)=>(o.openBlock(),o.createElementBlock("div",{class:"button_price_bg_product",onTouchstart:w[3]||(w[3]=o.withModifiers(()=>{},["stop"])),onPointerdown:w[4]||(w[4]=o.withModifiers(()=>{},["stop"]))},[o.createVNode(lo,{visible:p.value,textNotificationDefault:o.unref(u).textErrorRequaired,backgroundColor:o.unref(f).accent_color?o.unref(f).accent_color:"#FF6D2E",buttonAccept:null,"onUpdate:visible":w[0]||(w[0]=x=>p.value=x)},null,8,["visible","textNotificationDefault","backgroundColor"]),o.createElementVNode("div",ch,[o.createVNode(Qf),o.createElementVNode("div",{class:o.normalizeClass(["card_product_button_buy",{buy_active:!m.value}]),"data-clickable":"true",onClick:g,onTouchstart:w[1]||(w[1]=o.withModifiers(()=>{},["stop"])),onPointerdown:w[2]||(w[2]=o.withModifiers(()=>{},["stop"]))},[o.createElementVNode("img",{src:o.unref(Yf),class:"card_product_button_icon"},null,8,uh),o.createElementVNode("div",dh,[o.createElementVNode("p",fh,[o.createVNode(Mt,{price:+o.unref(d),fixedFloat:2},null,8,["price"]),w[5]||(w[5]=o.createTextVNode(" ₽ ",-1))])])],34)])],32))}}),[["__scopeId","data-v-dcf9a7ff"]]),ph={class:"modified_amount"},mh={class:"hide_image_corners"},_h=["src"],gh={class:"wrapper_modifier_title"},yh={class:"amount_title"},bh={class:"wrapper_amount_counter"},wh={class:"amount_count"},xh={class:"amount_wrapper"},kh={class:"add_counter_amount"},Sh=ke(o.defineComponent({__name:"ModalAmount",setup(i){const e=Ke(),t=Ge(),{itemThemes:n}=J.storeToRefs(t),{stateCard:r}=J.storeToRefs(e),s=o.computed(()=>{var c,u,d;return((d=(u=(c=r.value.currentModifier)==null?void 0:c.sizes)==null?void 0:u.find(h=>h.id===r.value.selectedSize.id))==null?void 0:d.price)??dr(r.value.currentModifier)}),a=()=>{r.value.currentModifier&&(r.value.currentModifier.amount=r.value.modalCount),e.modifierSelect(r.value.currentModifier),r.value.isModifiedAmount=!1},l=()=>{r.value.modalCount=1,r.value.currentModifier.amount=1};return(c,u)=>{var d,h;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",ph,[o.createElementVNode("div",mh,[o.createElementVNode("img",{class:"modifier_image",src:((d=o.unref(r).currentModifier)==null?void 0:d.image_link)||o.unref(n).fallback_image||""},null,8,_h),o.createElementVNode("div",gh,[o.createElementVNode("p",yh,o.toDisplayString((h=o.unref(r).currentModifier)==null?void 0:h.name),1),o.createElementVNode("p",null,"+ "+o.toDisplayString(s.value)+"₽",1)])])]),o.createElementVNode("div",bh,[o.createElementVNode("div",{class:"amount_mines",onClick:u[0]||(u[0]=o.withModifiers((..._)=>o.unref(e).minusAmount&&o.unref(e).minusAmount(..._),["stop"]))},[...u[1]||(u[1]=[o.createElementVNode("div",null,null,-1)])]),o.createElementVNode("p",wh,o.toDisplayString(o.unref(r).modalCount),1),o.createElementVNode("div",xh,[o.createVNode(oo,{onClick:o.withModifiers(o.unref(e).plusAmount,["stop"])},null,8,["onClick"])])]),o.createElementVNode("p",{class:"clear_count",onClick:o.withModifiers(l,["stop"])},"Убрать все"),o.createElementVNode("div",kh,[o.createVNode(en,{textButtonDefault:"Добавить",onClick:a,class:"button_add_group_modifiers"})])],64)}}}),[["__scopeId","data-v-6b4f039c"]]),Aa=o.defineComponent({__name:"Blackout",props:{data:{type:Boolean}},setup(i){const e=i;return o.watch(()=>e.data,t=>{document.body.style.overflow=t?"hidden":""}),()=>{}}}),Ch={class:"card_product_wrapper"},Eh={class:"card__pictures"},Th={key:0,loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},vh=["src"],Nh=["src"],Mh={class:"card_header_wrapper"},Ph={key:0,class:"card_fire_kkal_wrapper"},Ah={class:"card_content"},Bh={class:"wrapper_size"},Rh={key:0,class:"upsell_wrapper"},Dh={key:1,class:"description"},Oh={key:2,id:"openSelectionModifiers"},$h=ke(o.defineComponent({__name:"CardProductPage",props:{configPage:{}},setup(i){const e=Ge(),t=Ke(),{stateCard:n,isOpenWindow:r,dataUpSale:s}=J.storeToRefs(t),{itemThemes:a}=J.storeToRefs(e),l=re.useRouter(),c=re.useRoute(),u=i,d=()=>{u.configPage.qr_menu?l.push(`/${c.params.orgId}`):u.configPage.closeProduct(),document.body.style.overflow="auto"},h=()=>{n.value.isModifiedAmount=!1};return o.watch(()=>u.configPage.data,_=>{t.setCurrentCard(_)}),o.watchEffect(()=>{document.body.style.overflow="",r.value||(r.value=u.configPage.is_closeProduct)}),o.onBeforeUnmount(()=>{t.reset(),document.body.style.overflow=""}),(_,f)=>{var p,g,y,w,x,T,S,B,k,b;const m=o.resolveComponent("Upsell");return o.openBlock(),o.createElementBlock("div",Ch,[o.createVNode(Aa,{data:o.unref(n).isModifiedAmount},null,8,["data"]),o.unref(n).isModifiedAmount?(o.openBlock(),o.createElementBlock("div",{key:0,class:"wrapper_modified_amount",onClick:o.withModifiers(h,["stop"])},[o.createVNode(Sh)])):o.createCommentVNode("",!0),o.createElementVNode("div",Eh,[o.createElementVNode("div",{class:"card__pictures__gradient",style:o.normalizeStyle(o.unref(a).gradientStyle)},null,4),(p=o.unref(n).openCard)!=null&&p.video_link?(o.openBlock(),o.createElementBlock("video",Th,[o.createElementVNode("source",{src:((g=o.unref(n).openCard)==null?void 0:g.video_link)??"",type:"video/webm"},null,8,vh)])):(o.openBlock(),o.createElementBlock("img",{key:1,class:"card__pictures_images",src:((y=o.unref(n).openCard)==null?void 0:y.image_link)||o.unref(a).fallback_image||"",alt:"Product image"},null,8,Nh)),o.createElementVNode("div",Mh,[o.createVNode(so,{class:"card_header_back",onClick:d,"aria-label":"Вернуться назад"}),(w=o.unref(n).openCard)!=null&&w.energy_amount?(o.openBlock(),o.createElementBlock("div",Ph,[f[1]||(f[1]=o.createElementVNode("div",{class:"card_fire_kkal"},null,-1)),o.createElementVNode("p",null,[o.createElementVNode("b",null,o.toDisplayString((x=o.unref(n).openCard)==null?void 0:x.energy_amount),1),f[0]||(f[0]=o.createTextVNode(" Ккал ",-1))])])):o.createCommentVNode("",!0)]),o.createElementVNode("h4",null,o.toDisplayString((T=o.unref(n).openCard)==null?void 0:T.name),1)]),o.createVNode(Uf,{isModified:o.unref(n).isSectionModifier},null,8,["isModified"]),o.createElementVNode("div",Ah,[o.withDirectives(o.createElementVNode("div",Bh,[o.createVNode(Xf)],512),[[o.vShow,!o.unref(n).isSectionModifier]]),(S=o.unref(n).openCard)!=null&&S.upsell_set&&!o.unref(n).isSectionModifier?(o.openBlock(),o.createElementBlock("div",Rh,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((B=o.unref(n).openCard)==null?void 0:B.upsell_set.upsell_items)||[],C=>(o.openBlock(),o.createBlock(m,{key:C.id,data:C,is_upsell:!0},null,8,["data"]))),128))])):o.createCommentVNode("",!0),!o.unref(n).isSectionModifier&&((k=o.unref(n).openCard)!=null&&k.description)?(o.openBlock(),o.createElementBlock("p",Dh,o.toDisplayString((b=o.unref(n).openCard)==null?void 0:b.description),1)):o.createCommentVNode("",!0),o.unref(n).groupModifiers.length?(o.openBlock(),o.createElementBlock("div",Oh,[f[2]||(f[2]=o.createElementVNode("p",{class:"title_info_modifiers"},"Настрой, как ты любишь",-1)),o.createVNode(xf,{isSectionModifier:o.unref(n).isSectionModifier,toggleNotRequire:o.unref(t).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])):o.createCommentVNode("",!0),o.createVNode(hh,{qr_menu:i.configPage.qr_menu,closeProduct:i.configPage.closeProduct},null,8,["qr_menu","closeProduct"])])])}}}),[["__scopeId","data-v-c420b27b"]]),Ih={key:0,class:"popupWindowDefault_overlay"},Ba=ke(o.defineComponent({__name:"PopupWindowDefault",props:{visible:{type:Boolean}},emits:["update:visible"],setup(i,{emit:e}){const t=i,n=e,r=()=>{n("update:visible",!1)};return o.watch(()=>t.visible,async s=>{s&&await o.nextTick(),t.isVisible=s}),(s,a)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.Transition,{name:"popupWindowDefaultBlack",appear:"",onAfterLeave:a[0]||(a[0]=()=>{n("update:visible",!1)})},{default:o.withCtx(()=>[t.visible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"background_black",onClick:r})):o.createCommentVNode("",!0)]),_:1}),o.createVNode(o.Transition,{name:"popupWindowDefault",appear:"",onAfterLeave:a[1]||(a[1]=()=>{n("update:visible",!1)})},{default:o.withCtx(()=>[t.visible?(o.openBlock(),o.createElementBlock("div",Ih,[o.renderSlot(s.$slots,"default",{},void 0,!0)])):o.createCommentVNode("",!0)]),_:3})],64))}}),[["__scopeId","data-v-08e0e008"]]),Vh={},Lh={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fh(i,e){return o.openBlock(),o.createElementBlock("svg",Lh,[...e[0]||(e[0]=[o.createElementVNode("path",{d:"M18 18L12 12M12 12L6 6M12 12L18 6M12 12L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const zh=ke(Vh,[["render",Fh]]),co=J.defineStore("modals",()=>{const i=new Map,e=(r,s)=>{const a=n(r).value;a.visible=!0,a.context=s},t=r=>{const s=n(r).value;s.visible=!1},n=r=>(i.has(r)||i.set(r,o.ref({visible:!1})),i.get(r));return{state:n,open:e,close:t}}),Uh=["src"],Hh={class:"cart_box_content_wrapper"},qh={class:"cart_box_content_info"},Wh={class:"cart_amount"},jh={class:"cart_amount_count"},Xh={class:"cart_box_info_more"},Yh={key:1,class:"cart_modifier_info"},Gh={class:"cart_modifier_content"},Kh={class:"wrapper_price_count_cart"},Jh={class:"count_cart_box"},Zh={class:"wrapper_modifiers_discount"},Ra=ke(o.defineComponent({__name:"CartBox",props:{index:Number,cardItem:Object},emits:["delete"],setup(i,{emit:e}){const t=i,n=Le(),r=Ge(),s=co(),{itemThemes:a}=J.storeToRefs(r),l=o.ref(0),c=o.ref(0),u=o.ref(!1),d=o.ref(!1),h=o.ref(!1),{displayNumber:_,update:f}=Pa(0,800),m=o.computed(()=>{var P,O;const b=((P=t.cardItem)==null?void 0:P.modifiers)??[],C=(((O=t.cardItem)==null?void 0:O.group_modifiers)??[]).flatMap(H=>H.modifiers??[]);return[...b,...C]}),p=o.computed(()=>{var b,C;return((b=t.cardItem)==null?void 0:b.total_new_price)||dr(t.cardItem)*((C=t.cardItem)==null?void 0:C.amount)}),g=()=>s.open("cart-delete-confirm",t.cardItem),y=()=>{h.value=!h.value},w=()=>{n.plusAmount(t.cardItem.idSystem)},x=()=>{t.cardItem.amount>1?n.minusAmount(t.cardItem.idSystem):g()},T=b=>{l.value=b.touches[0].clientX,u.value=!0},S=b=>{u.value&&(c.value=b.touches[0].clientX-l.value,c.value>0&&(c.value=0))},B=()=>{u.value=!1,c.value<-115&&g(),c.value=0};o.onMounted(()=>{t.index===0&&(d.value=!0,setTimeout(()=>{c.value=-90,setTimeout(()=>{c.value=0,d.value=!1},700)},0))});const k=o.computed(()=>{const b=t.index===0&&d.value?1:`${1-Math.abs(c.value)/200}`;return{transform:`translateX(${c.value}px)`,opacity:b,transition:u.value?"none":"transform 0.7s, opacity 0.7s"}});return o.watch(p,f,{immediate:!0}),(b,C)=>{var P,O,H,R,N;return o.openBlock(),o.createElementBlock("div",{class:"cart_box_wrapper",onTouchstart:T,onTouchmove:S,onTouchend:B,style:o.normalizeStyle(k.value)},[C[2]||(C[2]=o.createElementVNode("div",{class:"wrapper_cart_delete"},[o.createElementVNode("div",{class:"cart_delete"})],-1)),o.createElementVNode("img",{src:((P=i.cardItem)==null?void 0:P.image_link)||o.unref(a).fallback_image||"",class:"cart_box_image"},null,8,Uh),o.createElementVNode("div",Hh,[o.createElementVNode("div",qh,[o.createElementVNode("p",null,o.toDisplayString((O=i.cardItem)==null?void 0:O.name),1),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((H=t.cardItem)==null?void 0:H.discounts)||[],(E,M)=>(o.openBlock(),o.createElementBlock("div",{key:M,class:"discount_banner"},[o.createElementVNode("p",null,o.toDisplayString(E.name),1),o.createElementVNode("p",null,o.toDisplayString(E.discount)+"₽",1)]))),128)),o.createElementVNode("div",Wh,[o.createElementVNode("button",{onClick:x},"-"),o.createElementVNode("p",jh,o.toDisplayString(t.cardItem.amount),1),o.createElementVNode("button",{onClick:w},"+")])]),o.createElementVNode("div",Xh,[o.createElementVNode("div",{class:"cart_box_remove_item",onClick:g},[o.createVNode(zh)]),(R=t.cardItem)!=null&&R.new_price?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass({discount_new_price:(N=t.cardItem)==null?void 0:N.new_price})},o.toDisplayString((t.cardItem.new_price*t.cardItem.amount).toFixed(2)+"₽"),3)):o.createCommentVNode("",!0),o.createElementVNode("p",null,o.toDisplayString(o.unref(_).toFixed(2)+"₽"),1)])]),!h.value&&m.value.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:"cart_modifier_toggle",onTouchstart:o.withModifiers(y,["stop"])},[...C[0]||(C[0]=[o.createElementVNode("p",{class:"cart_info_more"},"Посмотреть модификаторы",-1),o.createElementVNode("p",{class:"cart_arrow"},null,-1)])],32)):o.createCommentVNode("",!0),h.value?(o.openBlock(),o.createElementBlock("div",Yh,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,E=>{var M;return o.openBlock(),o.createElementBlock("div",{class:"cart_modifier_item",key:E.id},[o.createElementVNode("div",Gh,[o.createVNode(oo,{id:"plus_orange"}),o.createElementVNode("p",null,o.toDisplayString(E.name),1)]),o.createElementVNode("div",Kh,[o.createElementVNode("p",Jh,o.toDisplayString(`x${E.amount}`),1),o.createElementVNode("div",Zh,[E!=null&&E.new_price?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass({discount_new_price:(M=E==null?void 0:E.new_price)==null?void 0:M.toFixed(2)})},o.toDisplayString((E.new_price*E.amount).toFixed(2)+"₽"),3)):o.createCommentVNode("",!0),o.createElementVNode("p",null,o.toDisplayString((E.total_new_price||E.price*E.amount).toFixed(2)+"₽"),1)])])])}),128)),o.createElementVNode("div",{class:"cart_modifier_arrow",onTouchstart:o.withModifiers(y,["stop"])},[...C[1]||(C[1]=[o.createElementVNode("p",{class:"cart_info_more"},"Скрыть",-1),o.createElementVNode("p",{class:"cart_arrow_top"},null,-1)])],32)])):o.createCommentVNode("",!0)],36)}}}),[["__scopeId","data-v-491ab42e"]]),Qh={},ep={class:"nfc_x",viewBox:"0 0 48 48"};function tp(i,e){return o.openBlock(),o.createElementBlock("svg",ep,[...e[0]||(e[0]=[o.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#B00020","stroke-width":"2.4",fill:"none"},null,-1),o.createElementVNode("path",{d:"M14 16L34 30M34 16L14 30",stroke:"#B00020","stroke-width":"3","stroke-linecap":"round"},null,-1)])])}const np=ke(Qh,[["render",tp]]),rp={},ip={style:{},"aria-hidden":"true",viewBox:"0 0 48 48",class:"nfc_ok"};function op(i,e){return o.openBlock(),o.createElementBlock("svg",ip,[...e[0]||(e[0]=[o.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#5D534B","stroke-width":"none",fill:"none"},null,-1),o.createElementVNode("path",{d:"M16 22h16m-10 6h6",stroke:"#5D534B","stroke-width":"2.4","stroke-linecap":"round"},null,-1),o.createElementVNode("path",{d:"M14 28l6 6l14-14",fill:"none",stroke:"#2ECC71","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const sp=ke(rp,[["render",op]]),ap={key:0,class:"nfc_ok",viewBox:"0 0 48 48","aria-hidden":"true"},lp=o.defineComponent({__name:"CardReaderRetry",props:{styleRetry:{type:Boolean}},setup(i){return(e,t)=>i.styleRetry?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("svg",ap,[...t[0]||(t[0]=[o.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4"},null,-1),o.createElementVNode("path",{d:"M16 22h16m-10 6h6"},null,-1)])]))}}),cp={class:"sheet_header"},up={class:"sheet_title",id:"sheetTitle"},dp={class:"sheet_body"},fp={class:"sheet_card"},hp={class:"nfc_title"},pp={class:"lead"},mp={class:"wrapper_input_accept"},_p={key:0,class:"card_phone_auth_wrapper"},gp={class:"sr_only","aria-live":"polite"},Da=o.defineComponent({__name:"CardReader",setup(i){const e=Le(),t=Ge(),{is_OpenLoyal:n}=J.storeToRefs(e),{itemThemes:r}=J.storeToRefs(t),s=zn(),a=o.ref(),l=o.ref(),c=o.ref(null),u=o.ref(""),d={wait:{text:"Лояльность",title:""},success:{text:"Стикер распознан",title:"Стикер распознан"},not_found:{text:"Стикер не распознан",title:"Стикер не распознали"}},h=o.computed({get:()=>u.value,set:A=>{u.value=A.replace(/\s/g,"")}}),_=o.computed(()=>s.currentState),f=o.computed(()=>s.isDrawerOpen),m=o.computed(()=>{var A;return((A=d[_.value])==null?void 0:A.text)||""}),p=o.computed(()=>{var A;(A=d[_.value])!=null&&A.title}),g=o.computed(()=>_.value==="success"?"Добро пожаловать!":r.value.kiosk_show_loyalty_phone_input_button?"Поднесите стикер к считывателю или войдите по номеру телефона":"Поднесите стикер к считывателю или введите номер карты вручную"),y=o.computed(()=>({ok:_.value==="success",warn:_.value==="not_found"})),w=o.computed(()=>{const A=[];return _.value==="wait"&&A.push("pulse","show-x"),_.value==="not_found"&&A.push("pulse","show-x"),_.value==="success"&&A.push("pulse","show-ok"),A}),x=o.computed(()=>_.value==="not_found"),T=o.computed(()=>_.value==="success"),S=o.computed(()=>_.value==="not_found"),B=o.computed(()=>["not_found"].includes(_.value)),k=o.computed(()=>({wait:"Стикер не распознан. Нажмите «Повторить».",success:"Стикер распознан. Нажмите «Продолжить».",not_found:"Стикер не распознан. Нажмите «Повторить»."})[_.value]||""),b=()=>{s.closeDrawer(),n.value=!0},C=async A=>{var $,V;s.error="",c.value=null;try{const F=new Qt;await F.authorizeByCard(A.trim()),await F.getProfile(),e.loadCart(),s.setState("success"),s.isDrawerOpen=!1,s.showNotification("Вы успешно авторизовались в программе лояльности!")}catch(F){s.error=((V=($=F.response)==null?void 0:$.data)==null?void 0:V.user_friendly_message)||"Ошибка",s.setState("not_found"),c.value=h.value,h.value=""}},P=()=>{var A;s.setState("wait"),s.error="",h.value="",c.value=null,(A=a.value)==null||A.focus()},O=()=>{s.closeDrawer(),c.value=null,h.value=""},H=()=>{var A,$;s.setState("wait"),($=(A=h.value)==null?void 0:A.trim())!=null&&$.length&&C(h.value.trim())},R=A=>{A.stopPropagation(),document.activeElement!==l.value&&N()},N=()=>{o.nextTick(()=>{l.value&&(l.value.focus(),u.value&&l.value.select())})},E=A=>{const $=document.activeElement===l.value;if(!f.value||$)return;const V=A.key.toLowerCase();if(V==="backspace")return h.value=h.value.slice(0,-1);if(V==="escape")return O();if(V==="r"&&S.value)return P();if(V==="c"&&_.value==="success")return O();if(V==="enter")return H();h.value+=V},M={mounted(A){A==null||A.focus()}};return o.onMounted(()=>{document==null||document.addEventListener("keydown",E)}),o.onBeforeUnmount(()=>{document==null||document.removeEventListener("keydown",E)}),o.watchEffect(()=>{f.value&&(s.error="")}),(A,$)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[f.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"backdrop show",onClick:O,"aria-hidden":"true"})):o.createCommentVNode("",!0),f.value?(o.openBlock(),o.createElementBlock("section",{key:1,class:o.normalizeClass(["sheet show",{sheet_retry:S.value}]),"aria-modal":"true","aria-labelledby":"sheetTitle",onClick:R},[o.createElementVNode("header",cp,[o.createElementVNode("div",up,o.toDisplayString(m.value),1),S.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["sheet_status",y.value])},o.toDisplayString(c.value),3)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"sheet_close",onClick:O,"aria-label":"Закрыть"}," Закрыть ")]),o.createElementVNode("div",dp,[o.createElementVNode("div",fp,[o.createElementVNode("div",{class:o.normalizeClass(["nfc",w.value])},[o.createVNode(lp,{styleRetry:B.value},null,8,["styleRetry"]),x.value?(o.openBlock(),o.createBlock(np,{key:0})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"overlay check",style:o.normalizeStyle({display:T.value?"grid":"none"}),"aria-hidden":"true"},[o.createVNode(sp)],4)],2),o.createElementVNode("h2",hp,o.toDisplayString(p.value),1),o.createElementVNode("p",pp,o.toDisplayString(g.value),1),o.createElementVNode("div",mp,[o.withDirectives(o.createElementVNode("input",{ref_key:"cardInputManualRef",ref:l,"onUpdate:modelValue":$[0]||($[0]=V=>h.value=V),class:"nfc_title_read_input",type:"text",placeholder:"Введите трек карты","aria-live":"polite",onKeydown:o.withKeys(H,["enter"])},null,544),[[o.vModelText,h.value],[M]]),S.value?(o.openBlock(),o.createElementBlock("button",{key:0,class:"btn btn_ghost",onClick:P},"Повторить")):(o.openBlock(),o.createElementBlock("button",{key:1,class:"btn btn_ghost",onClick:$[1]||($[1]=V=>S.value?O:H())},"Отправить"))]),_.value==="wait"&&o.unref(r).kiosk_show_loyalty_phone_input_button?(o.openBlock(),o.createElementBlock("div",_p,[o.createElementVNode("button",{class:"card_phone_auth_button",onClick:b},"Войти по номеру телефона")])):o.createCommentVNode("",!0)])]),o.createElementVNode("input",{ref_key:"cardInputRef",ref:a,type:"text",class:"sr_only","aria-live":"polite"},null,512),o.createElementVNode("div",gp,o.toDisplayString(k.value),1)],2)):o.createCommentVNode("",!0)],64))}}),yp={key:0,class:"wrapper_qr"},bp={key:1,class:"wrapper_qr"},wp={key:2,class:"wrapper_qr"},xp={class:"wrap"},kp=ke(o.defineComponent({__name:"CartCompletedOrder",props:{orderNumber:{}},setup(i){const e=Le(),t=zn(),{cartProducts_lib:n}=J.storeToRefs(e),{orderNumber:r,orderCompleted_lib:s}=J.storeToRefs(t),a=re.useRouter(),l=re.useRoute(),c=()=>{Fn(["cart","authTokensAccess","authTokensRefresh"]),n.value=[],s.value=null,t.clearCard(),e.profile=null,a.replace(`/${l.params.orgId}`)};return(u,d)=>o.unref(s)&&o.unref(s)===1?(o.openBlock(),o.createElementBlock("section",yp,[...d[0]||(d[0]=[o.createStaticVNode('<div class="topProgress" aria-hidden="true" data-v-f6831631><i data-v-f6831631></i></div><h1 class="title_fiscal" data-v-f6831631>Сейчас будет распечатан фискальный чек</h1><p class="reminder" data-v-f6831631>Не забудьте <b data-v-f6831631>оплатить заказ</b> после печати.</p><div class="stage" aria-hidden="true" data-v-f6831631><div class="printer" data-v-f6831631><div class="led" data-v-f6831631></div><div class="slot" data-v-f6831631></div><div class="receipt" data-v-f6831631><div class="tear" data-v-f6831631></div><div class="line accent" data-v-f6831631></div><div class="line" data-v-f6831631></div><div class="line sm" data-v-f6831631></div><div class="line" data-v-f6831631></div><div class="line sm" data-v-f6831631></div><div class="line" data-v-f6831631></div><div class="line sm" data-v-f6831631></div></div></div></div>',4)])])):o.unref(s)&&o.unref(s)===2?(o.openBlock(),o.createElementBlock("section",bp,[...d[1]||(d[1]=[o.createStaticVNode('<div class="center" data-v-f6831631><div class="stack" data-v-f6831631><h1 class="title_fiscal" data-v-f6831631>Приложите карту для оплаты</h1><p class="reminder" data-v-f6831631>Держите карту у терминала, пока операция не завершится.</p><div class="stageCard" aria-hidden="true" data-v-f6831631><div class="waves" data-v-f6831631><span data-v-f6831631></span><span data-v-f6831631></span><span data-v-f6831631></span></div><div class="nfc" data-v-f6831631><svg viewBox="0 0 24 24" data-v-f6831631><path d="M6 8c2.5 2.5 2.5 5.5 0 8" data-v-f6831631></path><path d="M10 6c4 4 4 8 0 12" data-v-f6831631></path><path d="M14 4c5.5 5.5 5.5 11 0 16" data-v-f6831631></path></svg></div><div class="card" data-v-f6831631><div class="logo" data-v-f6831631>inno.</div><div class="chip" data-v-f6831631></div><div class="digits" data-v-f6831631>4815 1623 4200 0900</div><div class="holder" data-v-f6831631>Гость</div></div></div></div></div>',1)])])):o.unref(s)&&o.unref(s)===3?(o.openBlock(),o.createElementBlock("section",wp,[o.createElementVNode("div",xp,[d[5]||(d[5]=o.createElementVNode("div",{class:"icon","aria-hidden":"true"},[o.createElementVNode("svg",{viewBox:"0 0 24 24"},[o.createElementVNode("path",{d:"M20 6L9 17l-5-5"})])],-1)),o.createElementVNode("h1",null,[d[2]||(d[2]=o.createTextVNode(" Ваш заказ ",-1)),o.createElementVNode("span",null,"№ "+o.toDisplayString(o.unref(r)),1),d[3]||(d[3]=o.createTextVNode(" успешно оплачен ",-1))]),d[6]||(d[6]=o.createElementVNode("p",{class:"title_fiscal"},"Спасибо! Заказ передан в работу.",-1)),o.createElementVNode("div",{class:"wrapper_accept"},[o.createElementVNode("button",{class:"btn","aria-label":"Новый заказ",onClick:c},[...d[4]||(d[4]=[o.createElementVNode("span",{class:"label"},"Новый заказ",-1),o.createElementVNode("span",{class:"fill","aria-hidden":"true"},null,-1),o.createElementVNode("div",{class:"bubbles","aria-hidden":"true"},null,-1)])])])])])):o.createCommentVNode("",!0)}}),[["__scopeId","data-v-f6831631"]]),Sp={},Cp={class:"cart_loyal_qr",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Ep(i,e){return o.openBlock(),o.createElementBlock("svg",Cp,[...e[0]||(e[0]=[o.createElementVNode("path",{d:"M19 20H20M16 20H14V17M17 17H20V14H19M14 14H16M4 16.9997C4 16.0679 4 15.6019 4.15224 15.2344C4.35523 14.7443 4.74432 14.3552 5.23438 14.1522C5.60192 14 6.06786 14 6.99974 14C7.93163 14 8.39808 14 8.76562 14.1522C9.25568 14.3552 9.64467 14.7443 9.84766 15.2344C9.9999 15.6019 9.9999 16.0681 9.9999 17C9.9999 17.9319 9.9999 18.3978 9.84766 18.7654C9.64467 19.2554 9.25568 19.6447 8.76562 19.8477C8.39808 19.9999 7.93162 19.9999 6.99974 19.9999C6.06786 19.9999 5.60192 19.9999 5.23438 19.8477C4.74432 19.6447 4.35523 19.2557 4.15224 18.7656C4 18.3981 4 17.9316 4 16.9997ZM14 6.99974C14 6.06786 14 5.60192 14.1522 5.23438C14.3552 4.74432 14.7443 4.35523 15.2344 4.15224C15.6019 4 16.0679 4 16.9997 4C17.9316 4 18.3981 4 18.7656 4.15224C19.2557 4.35523 19.6447 4.74432 19.8477 5.23438C19.9999 5.60192 19.9999 6.06812 19.9999 7C19.9999 7.93188 19.9999 8.39783 19.8477 8.76537C19.6447 9.25542 19.2557 9.64467 18.7656 9.84766C18.3981 9.9999 17.9316 9.9999 16.9997 9.9999C16.0679 9.9999 15.6019 9.9999 15.2344 9.84766C14.7443 9.64467 14.3552 9.25568 14.1522 8.76562C14 8.39808 14 7.93163 14 6.99974ZM4 6.99974C4 6.06786 4 5.60192 4.15224 5.23438C4.35523 4.74432 4.74432 4.35523 5.23438 4.15224C5.60192 4 6.06786 4 6.99974 4C7.93163 4 8.39808 4 8.76562 4.15224C9.25568 4.35523 9.64467 4.74432 9.84766 5.23438C9.9999 5.60192 9.9999 6.06812 9.9999 7C9.9999 7.93188 9.9999 8.39783 9.84766 8.76537C9.64467 9.25542 9.25568 9.64467 8.76562 9.84766C8.39808 9.9999 7.93162 9.9999 6.99974 9.9999C6.06786 9.9999 5.60192 9.9999 5.23438 9.84766C4.74432 9.64467 4.35523 9.25568 4.15224 8.76562C4 8.39808 4 7.93163 4 6.99974Z",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Tp=ke(Sp,[["render",Ep]]),Oa=i=>{const e=co(),t=l=>e.open(i,l),n=()=>e.close(i),r=e.state(i),s=o.computed({get:()=>r.value.visible,set:l=>l&&t()||n()}),a=o.computed(()=>r.value.context);return{visible:s,context:a,open:t,close:n}},vp={class:"cart_deletion_modal_content"},Np={class:"cart_deletion_modal_title"},Mp={class:"cart_deletion_modal_footer"},Pp=ke(o.defineComponent({__name:"CartDeleteConfirm",emits:["confirm"],setup(i,{emit:e}){const t=e,{visible:n,context:r,close:s}=Oa("cart-delete-confirm"),a=()=>{t("confirm",r.value.idSystem),s()};return(l,c)=>(o.openBlock(),o.createBlock(o.Transition,{name:"fade"},{default:o.withCtx(()=>[o.unref(n)?(o.openBlock(),o.createElementBlock("div",{key:0,class:"cart_deletion_modal_overlay",onClick:c[1]||(c[1]=o.withModifiers((...u)=>o.unref(s)&&o.unref(s)(...u),["self"]))},[o.createElementVNode("div",vp,[o.createElementVNode("div",Np,"Удалить "+o.toDisplayString(o.unref(r).name)+"?",1),c[2]||(c[2]=o.createElementVNode("div",{class:"cart_deletion_modal_body"},"Эта позиция будет полностью удалена из заказа.",-1)),o.createElementVNode("div",Mp,[o.createElementVNode("button",{class:"primary",onClick:a}," Удалить "),o.createElementVNode("button",{onClick:c[0]||(c[0]=(...u)=>o.unref(s)&&o.unref(s)(...u))},"Отмена")])])])):o.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-018f66f3"]]),Ap={class:"cart_wrapper"},Bp={class:"cart_header_content"},Rp={class:"cart_kso_loyal_wrapper"},Dp={key:0},Op={class:"cart_header_wrapper"},$p={class:"cart_header_info"},Ip={class:"cart_header_info"},Vp={class:"cart_header_info"},Lp={class:"cart_header_info"},Fp={key:0},zp={key:0,class:"wrapper_comment"},Up={class:"wrapper_limit_in_area"},Hp={class:"limit_comment"},qp={class:"cart_cards"},Wp={class:"cart_footer_wrapper"},jp={key:0,class:"footer_title"},Xp=["disabled","max"],Yp={key:1,class:"footer_sales"},Gp=["max"],Kp={class:"list_price"},Jp={key:0},Zp={key:1},Qp={key:2},em={class:"accept_field"},tm={class:"accept_field"},nm={key:3},rm={class:"accept_field"},im={class:"accept_field"},om={class:"accept_field"},sm={class:"wrapper_footer_cart_btn"},am=o.defineComponent({__name:"CartPage",props:{configPage:{},textPaymentBtn:{},config_qr:{type:Boolean}},setup(i){const e=Le(),t=zn(),n=Ge(),r=Ke(),s=i,{totalPrice_lib:a,countBonus:l,config_lib:c,cartProducts_lib:u,profile:d}=J.storeToRefs(e),{itemThemes:h}=J.storeToRefs(n),{textPaymentBtn_lib:_,isButtonDisabled:f,orderCompleted_lib:m,orderNumber:p,extraDiscount:g,is_notification_lib:y,notificationData_lib:w}=J.storeToRefs(t),{isAddToCard:x}=J.storeToRefs(r),T=re.useRouter(),S=re.useRoute(),B=o.ref(!1),k=o.ref(!1),b=o.ref(""),C=o.ref(!1),P=o.ref(0),O=o.ref(!1),H=o.ref(0),R=o.ref(),N=o.computed(()=>{const Y={energy_amount:0,proteins_amount:0,fat_amount:0,carbohydrates_amount:0};return u.value.reduce((U,ie)=>(U.energy_amount+=(ie.energy_amount||0)*(ie.amount||0),U.proteins_amount+=(ie.proteins_amount||0)*(ie.amount||0),U.fat_amount+=(ie.fat_amount||0)*(ie.amount||0),U.carbohydrates_amount+=(ie.carbohydrates_amount||0)*(ie.amount||0),U),Y)}),E=()=>T.push(`/${S.params.orgId}/`),M=Y=>{["a","A","+","-",".",","].includes(Y.key)&&Y.preventDefault()},A=Y=>{e.deleteItemFromCart(Y)},$=()=>{C.value=!C.value,b.value.length},V=()=>{var U,ie,_e;let Y=Math.floor(l.value);Y<0||!Y?Y=0:((U=d.value)==null?void 0:U.balance)>a.value?Y>a.value-1&&(Y=a.value-1):Y>((ie=d.value)==null?void 0:ie.balance)&&(Y=(_e=d.value)==null?void 0:_e.balance),Y!==l.value&&e.setBonus(Y)};o.watchEffect(()=>{V(),e.setBonus(a.value===0?0:Math.floor(l.value))});const F=()=>u.value.map(Y=>({id:Y.id,front_item_id:Y.idSystem,is_fake:!!Y.is_fake,removals:Y.removals??null,amount:Y.amount,size:Y.size,modifiers:Y.modifiers??[],group_modifiers:Y.group_modifiers??[]})),z=async()=>{f.value=!0;try{return await Qt.create().createOrder(F(),s.configPage.tableDataId,s.configPage.kiosk_menu,b.value,!!s.configPage.userData||!!d.value,s.configPage.is_tableservice)}catch(Y){throw s.configPage.kiosk_menu?(Y.status===403&&(localStorage.removeItem("apiKey"),e.is_showApiKey=!0,T.push(`/${S.params.orgId}/retryPage`)),t.deleteCart("retryPage",s.configPage.kiosk_menu)):s.configPage.is_tableservice?t.showNotification(Y.response.data.user_friendly_message):T.push(`/${S.params.orgId}/errorPayment`),f.value=!1,Y}},W=()=>{if(!d.value&&s.configPage.qr_menu){T.push(`/${S.params.orgId}/register`);return}x.value=!1,m.value=1,c.value.has_rms_discount?t.makeInitPaymentLinkRequest(R.value,s.configPage.kiosk_menu,s.configPage.is_tableservice).then(()=>R.value=null):z()},Z=async()=>{var ie;g.value=0,f.value=!0;const Y={items:[...F()],combos:[]},U=Qt.create();try{O.value=!0;const _e=await U.calculateDiscount(Y,s.configPage.kiosk_menu,!!s.configPage.userData||!!d.value);if(!u.value)return;if(u.value.forEach(ce=>{const ye=_e.items.find(ge=>ge.front_item_id===ce.idSystem);if(ye&&(ce.group_modifiers.forEach(ge=>{const se=ye.group_modifiers.find(pe=>pe.group===ge.group);se&&ge.modifiers.forEach(pe=>{const ne=se.modifiers.find(mn=>mn.id===pe.id);if(ne&&Number(pe.price)!==Number(ne==null?void 0:ne.new_price)){const mn=(ne.discounts||[]).reduce((ot,_t)=>ot+=+_t.discount,0);P.value+=mn,pe.new_price=pe.price,pe.price=Number(ne==null?void 0:ne.new_price),pe.total_new_price=Number(ne.total_new_price)}})}),ce.modifiers.forEach(ge=>{const se=ye.modifiers.find(pe=>pe.id===ge.id);if(se&&Number(ge.price)!==Number(se==null?void 0:se.new_price)){const pe=(se.discounts||[]).reduce((ne,mn)=>ne+=+mn.discount,0);P.value+=pe,ge.new_price=ge.price,ge.price=Number(se==null?void 0:se.new_price),ge.total_new_price=Number(se.total_new_price)}}),ce.price!==Number(ye.new_price))){const ge=(ye.discounts||[]).reduce((se,pe)=>se+=+pe.discount,0);P.value=P.value+ge,ce.new_price=ce.price,ce.price=ye.new_price,ce.discounts=ye.discounts,ce.total_new_price=Number(ye.total_new_price)}}),u.value=[...u.value],P.value!==0&&(a.value=_e.total_cart_price),c.value.has_rms_discount){const ce=await z();R.value=(ie=ce.data)==null?void 0:ie.id}else f.value=!1;k.value=!1}catch(_e){console.log("Ошибка скидок [CartPage calculateDiscount]",_e),t.showNotification("Скидки временно недоступны"),O.value=!1,k.value=c.value.has_rms_discount,f.value=!1}},K=()=>{var Y;(Y=d.value)!=null&&Y.balance?d.value.balance>=1&&(B.value=!B.value):t.showNotification("У Вас пока нет бонусов")},ue=()=>{var Y,U;c.value.has_rms_discount?(R.value=null,k.value=!0):((Y=c.value)==null?void 0:Y.loyalty)==="IIKO"&&(c.value.has_loyalty_default_user||d.value)&&s.configPage.kiosk_menu||((U=c.value)==null?void 0:U.loyalty)==="IIKO"&&s.configPage.qr_menu&&d.value?k.value=!0:k.value=!1};return o.onMounted(async()=>{_.value=s.textPaymentBtn,e.loadCart(),m.value=null,a.value=null,g.value=0,u.value.splice(0,u.value.length,...u.value.map(e.makeProductFullyReactive))}),o.onUnmounted(()=>{R.value=null,m.value=null,a.value=null,g.value=0,u.value.splice(0,u.value.length,...u.value.map(e.makeProductFullyReactive))}),o.watchEffect(()=>{!c.value.has_rms_discount&&["ОПЛАТИТЬ","СОЗДАТЬ ЗАКАЗ"].includes(_.value.toUpperCase())?f.value=e.cartProducts_lib.length===0||a.value===0:(f.value=!1,m.value=null)}),o.watch([()=>e.cartProducts_lib,d],Y=>{if(H.value>0){H.value--;return}Y&&!O.value&&(ue(),u.value.splice(0,u.value.length,...u.value.map(e.makeProductFullyReactive)),P.value=0,a.value=null,g.value=0,H.value=1),O.value=!1},{deep:!0}),(Y,U)=>{var ie,_e,ce,ye,ge;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Ap,[o.createVNode(Pp,{onConfirm:A}),o.createVNode(Ba,{visible:o.unref(t).isDrawerOpen,"onUpdate:visible":U[0]||(U[0]=se=>o.unref(t).isDrawerOpen=se)},{default:o.withCtx(()=>[o.createVNode(Da)]),_:1},8,["visible"]),o.createElementVNode("header",Bp,[o.createElementVNode("div",Rp,[o.createElementVNode("div",{class:o.normalizeClass(["arrow_wrapper",{arrow_wrapper_kso:s.configPage.kiosk_menu}]),onClick:E},[o.createVNode(so,{class:"cart_header_back_button"}),s.configPage.kiosk_menu?(o.openBlock(),o.createElementBlock("span",Dp,"Назад")):o.createCommentVNode("",!0)],2)]),o.createElementVNode("div",Op,[(o.unref(h).kiosk_show_loyalty_card_button||o.unref(h).kiosk_show_loyalty_phone_input_button)&&!s.config_qr?(o.openBlock(),o.createElementBlock("button",{key:0,class:"buttonDefaultWrapper button_payment_cart button_payment_cart_loyal",onClick:U[1]||(U[1]=(...se)=>o.unref(t).openDrawer&&o.unref(t).openDrawer(...se))},[U[6]||(U[6]=o.createElementVNode("p",{class:"cart_loyal_program"},"Программа лояльности",-1)),o.createVNode(Tp,{class:"cart_loyal_qr"})])):o.createCommentVNode("",!0),o.unref(h).show_nutrition_in_cart?(o.openBlock(),o.createElementBlock("div",{key:1,class:"cart_header",style:o.normalizeStyle({paddingTop:s.config_qr?0:"10px"})},[o.createElementVNode("div",$p,[o.createElementVNode("p",null,[o.createVNode(Mt,{price:N.value.energy_amount,duration:800},null,8,["price"]),U[7]||(U[7]=o.createTextVNode(" г",-1))]),U[8]||(U[8]=o.createElementVNode("p",{class:"cart_info_name"},"Килокалории",-1))]),o.createElementVNode("div",Ip,[o.createElementVNode("p",null,[o.createVNode(Mt,{price:N.value.proteins_amount,duration:900},null,8,["price"]),U[9]||(U[9]=o.createTextVNode(" г",-1))]),U[10]||(U[10]=o.createElementVNode("p",{class:"cart_info_name"},"Белки",-1))]),o.createElementVNode("div",Vp,[o.createElementVNode("p",null,[o.createVNode(Mt,{price:N.value.fat_amount,duration:1e3},null,8,["price"]),U[11]||(U[11]=o.createTextVNode(" г",-1))]),U[12]||(U[12]=o.createElementVNode("p",{class:"cart_info_name"},"Жиры",-1))]),o.createElementVNode("div",Lp,[o.createElementVNode("p",null,[o.createVNode(Mt,{price:N.value.carbohydrates_amount,duration:1100},null,8,["price"]),U[13]||(U[13]=o.createTextVNode(" г",-1))]),U[14]||(U[14]=o.createElementVNode("p",{class:"cart_info_name"},"Углеводы",-1))])],4)):o.createCommentVNode("",!0)])]),i.config_qr&&o.unref(h).show_order_comment?(o.openBlock(),o.createElementBlock("div",Fp,[C.value?(o.openBlock(),o.createElementBlock("div",zp,[o.createElementVNode("div",Up,[o.withDirectives(o.createElementVNode("textarea",{class:"comment_order",placeholder:"Ваш комментарий к заказу...",name:"comment",maxlength:"50","onUpdate:modelValue":U[2]||(U[2]=se=>b.value=se)},null,512),[[o.vModelText,b.value]]),o.createElementVNode("p",Hp,o.toDisplayString(b.value.length+" / 50"),1)]),o.createVNode(en,{textButtonDefault:"Сохранить",onClick:$,class:"button_bonus_cart"})])):o.createCommentVNode("",!0),!C.value&&o.unref(u).length>0?(o.openBlock(),o.createBlock(en,{key:1,textButtonDefault:b.value.length>0?"Редактировать":"Комментарий к заказу",onClick:()=>C.value=!C.value,id:"button_comments"},null,8,["textButtonDefault","onClick"])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",qp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(u),se=>(o.openBlock(),o.createBlock(Ra,{key:se.idSystem,cardItem:se,onDelete:pe=>A(se.idSystem)},null,8,["cardItem","onDelete"]))),128))]),o.createElementVNode("div",Wp,[B.value?(o.openBlock(),o.createElementBlock("p",jp,[U[15]||(U[15]=o.createTextVNode(" Списать ",-1)),o.withDirectives(o.createElementVNode("input",{type:"number",placeholder:"0",style:o.normalizeStyle({maxWidth:`${o.unref(l).toString().length||1}em`}),disabled:o.unref(d)===null||((ie=o.unref(d))==null?void 0:ie.balance)===0,"onUpdate:modelValue":U[3]||(U[3]=se=>o.isRef(l)?l.value=se:null),onInput:V,min:"0",max:((_e=o.unref(d))==null?void 0:_e.balance)>o.unref(a)?Math.floor(o.unref(a)):(ce=o.unref(d))==null?void 0:ce.balance,onKeypress:M},null,44,Xp),[[o.vModelText,o.unref(l),void 0,{number:!0}]]),U[16]||(U[16]=o.createTextVNode(" бонусов ",-1))])):o.createCommentVNode("",!0),B.value?(o.openBlock(),o.createElementBlock("p",Yp,"У вас есть "+o.toDisplayString(o.unref(d)?o.unref(d).balance:0)+" B",1)):o.createCommentVNode("",!0),B.value?o.withDirectives((o.openBlock(),o.createElementBlock("input",{key:2,type:"range",class:"footer_range","onUpdate:modelValue":U[4]||(U[4]=se=>o.isRef(l)?l.value=se:null),min:0,max:((ye=o.unref(d))==null?void 0:ye.balance)>o.unref(a)?Math.floor(o.unref(a)-1):(ge=o.unref(d))==null?void 0:ge.balance},null,8,Gp)),[[o.vModelText,o.unref(l),void 0,{number:!0}]]):o.createCommentVNode("",!0),o.createElementVNode("ul",Kp,[B.value?(o.openBlock(),o.createElementBlock("li",Jp,[U[18]||(U[18]=o.createElementVNode("p",null,"Сумма заказа:",-1)),o.createElementVNode("p",null,[o.createVNode(Mt,{price:o.unref(a),fixedFloat:2},null,8,["price"]),U[17]||(U[17]=o.createTextVNode(" ₽",-1))])])):o.createCommentVNode("",!0),B.value?(o.openBlock(),o.createElementBlock("li",Zp,[U[20]||(U[20]=o.createElementVNode("p",null,"Будет оплачено бонусами:",-1)),o.createElementVNode("p",null,[o.createVNode(Mt,{price:o.unref(l),fixedFloat:2},null,8,["price"]),U[19]||(U[19]=o.createTextVNode(" Б",-1))])])):o.createCommentVNode("",!0),o.unref(g)!==0?(o.openBlock(),o.createElementBlock("li",Qp,[o.createElementVNode("p",em,o.toDisplayString(o.unref(g)>0?"Надбавка":"Скидка")+": ",1),o.createElementVNode("p",tm,[o.createVNode(Mt,{price:Math.abs(o.unref(g)),fixedFloat:2},null,8,["price"]),U[21]||(U[21]=o.createTextVNode(" ₽",-1))])])):P.value!==0?(o.openBlock(),o.createElementBlock("li",nm,[o.createElementVNode("p",rm,o.toDisplayString(P.value>0?"Надбавка":"Скидка")+": ",1),o.createElementVNode("p",im,[o.createVNode(Mt,{price:Math.abs(P.value),fixedFloat:2},null,8,["price"]),U[22]||(U[22]=o.createTextVNode(" ₽",-1))])])):o.createCommentVNode("",!0),o.createElementVNode("li",null,[U[24]||(U[24]=o.createElementVNode("p",{class:"accept_field"},"Итого к оплате:",-1)),o.createElementVNode("p",om,[o.createVNode(Mt,{price:o.unref(a)-o.unref(l),fixedFloat:2},null,8,["price"]),U[23]||(U[23]=o.createTextVNode(" ₽",-1))])])]),o.createElementVNode("div",sm,[o.unref(d)?(o.openBlock(),o.createBlock(en,{key:0,textButtonDefault:"Бонусы",onClick:K,class:"button_bonus_cart"})):o.createCommentVNode("",!0),o.createVNode(en,{textButtonDefault:k.value?"Рассчитать скидки":o.unref(_),onClick:k.value?Z:W,class:"button_payment_cart",disabled:o.unref(f)},null,8,["textButtonDefault","onClick","disabled"])])])]),i.configPage.kiosk_menu?(o.openBlock(),o.createBlock(kp,{key:0,orderNumber:o.unref(p),pageNumber:1},null,8,["orderNumber"])):o.createCommentVNode("",!0),o.createVNode(lo,{visible:o.unref(y),"onUpdate:visible":U[5]||(U[5]=se=>o.isRef(y)?y.value=se:null),textNotificationDefault:o.unref(w).textNotification,backgroundColor:o.unref(h).accent_color?o.unref(h).accent_color:"#FF6D2E",buttonAccept:null},null,8,["visible","textNotificationDefault","backgroundColor"])],64)}}}),lm={},cm={viewBox:"0 0 24 24"};function um(i,e){return o.openBlock(),o.createElementBlock("svg",cm,[...e[0]||(e[0]=[o.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12"},null,-1)])])}const dm=ke(lm,[["render",um]]),fm={class:"retry_screen"},hm={class:"retry_all_in_screen"},pm={class:"retry_content"},mm={class:"retry_icon_wrap"},_m={class:"retry_icon_circle"},gm={class:"retry_error_x"},ym=o.defineComponent({__name:"RetryPage",setup(i){const e=zn(),t=re.useRouter(),n=re.useRoute(),r=Le(),s=()=>{e.notificationData_lib.textNotification="",e.is_notification_lib=!1,r.openApiKey=!0,t.replace(`/${n.params.orgId}/`)};return(a,l)=>(o.openBlock(),o.createElementBlock("section",fm,[o.createElementVNode("div",hm,[o.createElementVNode("main",pm,[o.createElementVNode("div",mm,[o.createElementVNode("div",_m,[l[0]||(l[0]=o.createElementVNode("div",{class:"retry_loader_mini"},null,-1)),o.createElementVNode("div",gm,[o.createVNode(dm)])])]),l[1]||(l[1]=o.createElementVNode("div",{class:"retry_oops"},"OOPS",-1)),l[2]||(l[2]=o.createElementVNode("h1",{class:"retry_title"},"Что-то пошло не так",-1)),l[3]||(l[3]=o.createElementVNode("div",{class:"retry_hint"},[o.createElementVNode("p",null,"Похоже, произошёл технический сбой."),o.createElementVNode("p",null,"Мы уже знаем о проблеме и сейчас разбираемся."),o.createElementVNode("p",null,"Приносим извинения за доставленные неудобства."),o.createElementVNode("p",null,"Попробуйте начать новый заказ.")],-1))]),o.createElementVNode("div",{class:"retry_footer"},[o.createElementVNode("button",{onClick:s,class:"retry_new_order_btn"},"Новый заказ")]),l[4]||(l[4]=o.createElementVNode("p",{class:"retry_bottom_note"},"Если ошибка повторяется — обратитесь к сотруднику зала.",-1))])]))}}),bm={class:"wrapper_loader"},wm=o.defineComponent({__name:"Loader",props:{size:{type:String,default:"40px"}},setup(i){return(e,t)=>(o.openBlock(),o.createElementBlock("div",bm,[o.createElementVNode("div",{class:"loader",style:o.normalizeStyle({width:i.size})},null,4)]))}}),xm={class:"opacity-animation"},km=ke(o.defineComponent({__name:"AnimationLoader",props:{key:{}},setup(i){const e=o.ref(!0);return o.watch(()=>e.value,()=>{e.value=!1,setTimeout(()=>{e.value=!0},0)}),(t,n)=>(o.openBlock(),o.createElementBlock("div",xm,[o.renderSlot(t.$slots,"opacityLoader",{},void 0,!0)]))}}),[["__scopeId","data-v-26479273"]]),Sm={key:0},Cm={class:"card__main__wrapper"},Em={key:0,class:"folder_content_top"},Tm={key:0,class:"loader_card_main"},vm={key:1,class:"card__main_content"},Nm=["src","alt"],Mm={class:"card_title_price_wrapper"},Pm={class:"title"},Am={key:0,class:"price"},Bm={key:1,class:"card_button_add_wrapper"},$a=ke(o.defineComponent({__name:"CardMain",props:{data:{type:Object,required:!0},activeTags:{type:Object,required:!1,default:[]},is_product:{type:Boolean,default:!0},is_group:{type:Boolean,default:!1},parent:{type:String,required:!1},isLoading:{type:Boolean,default:!1},selectGroupChild:{type:Function,required:!1},takeCurrentCard:{type:Function,required:!1}},setup(i){const e=i,t=Ge(),n=Le(),{is_18_above_content:r,is18Allowed:s}=J.storeToRefs(n),{itemThemes:a}=J.storeToRefs(t),l=(u,d)=>{if(u.adult&&!s.value){r.value=!0;return}if(u.amount||(u.amount=1),e.is_group&&e.selectGroupChild){e.selectGroupChild({...u,parent:e.parent,child:d.child_groups});return}e.takeCurrentCard&&e.takeCurrentCard(d.id)},c=u=>{if(e.is_group&&e.selectGroupChild){u={...u,parent:e.parent,child:u.child_groups},e.selectGroupChild(u);return}if(u.adult&&!s.value){r.value=!0;return}e.takeCurrentCard&&e.takeCurrentCard(u.id)};return(u,d)=>e.activeTags.length===0||e.activeTags.every(h=>e.data.tags.includes(h))?(o.openBlock(),o.createElementBlock("div",Sm,[(o.openBlock(),o.createBlock(km,{key:e.data.id},{opacityLoader:o.withCtx(()=>[o.createElementVNode("div",Cm,[i.is_group?(o.openBlock(),o.createElementBlock("div",Em)):o.createCommentVNode("",!0),o.createElementVNode("div",{onClick:d[0]||(d[0]=h=>c(e.data)),class:o.normalizeClass(["card__main",{card__main_folder:i.is_group}])},[i.isLoading?(o.openBlock(),o.createElementBlock("div",Tm,[o.createVNode(wm)])):(o.openBlock(),o.createElementBlock("div",vm,[o.createElementVNode("img",{src:e.data.image_link||o.unref(a).fallback_image||"",class:o.normalizeClass(["img",{card_blur_image:e.data.adult&&!o.unref(s)}]),loading:"lazy",alt:i.data.name},null,10,Nm),o.createElementVNode("div",Mm,[o.createElementVNode("p",Pm,o.toDisplayString(i.data.name),1),i.is_group?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("p",Am,o.toDisplayString(o.unref(dr)(i.data))+" ₽",1))])]))],2),i.is_group?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Bm,[o.createElementVNode("div",{onClick:d[1]||(d[1]=h=>l(i.data,e.data)),class:"add_button"},[...d[2]||(d[2]=[o.createElementVNode("div",{class:"image_add_button"},null,-1)])])]))])]),_:1}))])):o.createCommentVNode("",!0)}}),[["__scopeId","data-v-56a6b046"]]),Rm=["id","onClick"],Dm=ke(o.defineComponent({__name:"GroupMain",props:{menuGroup:{},idActiveGroup:{},activeTakeGroup:{type:Function}},setup(i){const e=o.ref(null);return(t,n)=>i.menuGroup.length?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"main__menu",ref_key:"scrollGroup",ref:e},[o.createVNode(io,{axis:"x",behavior:"smooth",container:e.value,autoScroll:!0,idActive:i.idActiveGroup,clearContainer:!0},{default:o.withCtx(({handleTargetClick:r})=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.menuGroup,(s,a)=>(o.openBlock(),o.createElementBlock("li",{key:s.id,id:"scrolling"+s.id,onClick:l=>{i.activeTakeGroup&&i.activeTakeGroup(s.id,a),r(l)},style:o.normalizeStyle(i.idActiveGroup==s.id?{fontFamily:"Bounded"}:{})},o.toDisplayString(s.name),13,Rm))),128))]),_:1},8,["container","idActive"])],512)):o.createCommentVNode("",!0)}}),[["__scopeId","data-v-33006a7e"]]),Om=["id","onClick"],$m=ke(o.defineComponent({__name:"TagsMain",props:{menuTags:{default:()=>[]},groupIndex:{default:null},isSolo:{type:Boolean,default:!1},currentActiveTag:{},activeTakeTags:{type:Function,default:void 0},activeTakeTagsSolo:{type:Function,default:void 0}},setup(i){const e=i,t=o.ref(null),n=o.computed(()=>e.isSolo&&e.groupIndex!==void 0?e.currentActiveTag:e.currentActiveTag[e.groupIndex]);return(r,s)=>i.menuTags.length>0?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"main__filters",ref_key:"scrollTagContainer",ref:t},[o.createVNode(io,{axis:"x",behavior:"smooth",container:t.value,autoScroll:!0,idActive:n.value?n.value[i.currentActiveTag.length-1]:null,clearContainer:!1},{default:o.withCtx(({handleTargetClick:a})=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.menuTags,(l,c)=>(o.openBlock(),o.createElementBlock("li",{key:c,id:`scrolling${l}`,onClick:u=>{i.activeTakeTags&&(i.groupIndex||i.groupIndex===0)?i.activeTakeTags(l,i.groupIndex):i.activeTakeTagsSolo&&i.activeTakeTagsSolo(l),a(u)},class:o.normalizeClass({main__filter_active:n.value.includes(l)})},o.toDisplayString(l),11,Om))),128))]),_:1},8,["container","idActive"])],512)):o.createCommentVNode("",!0)}}),[["__scopeId","data-v-49c107f2"]]),Ia=J.defineStore("imageCache",()=>{const i=o.ref({});async function e(a){const l=String(a);if(i.value[l])return;const c=await Ma(a);if(!c)return;const u=URL.createObjectURL(c);i.value[l]=u,window.dispatchEvent(new CustomEvent("image-cached",{detail:{id:l,blob:c}}))}async function t(a){await Promise.all(a.map(l=>e(l)))}function n(a,l){const c=String(a);i.value[c]&&URL.revokeObjectURL(i.value[c]),i.value[c]=URL.createObjectURL(l)}function r(a){return o.computed(()=>i.value[String(a)]||null)}function s(){Object.values(i.value).forEach(URL.revokeObjectURL),i.value={}}return{cache:i,initCacheSingle:e,initCache:t,setImage:n,getImageUrl:r,cleanup:s}});function Im(i,e=""){const t=Ia(),{initCacheSingle:n,getImageUrl:r}=t,s=o.ref(null),a=r(i);return o.watch(a,l=>{l&&(s.value=l)},{immediate:!0}),a.value?s.value=a.value:n(i).then(()=>{s.value=r(i).value||e}),{mediaUrl:o.computed(()=>s.value||e),isLoading:o.computed(()=>!s.value||s.value===e)}}const Vm=["data-id"],Lm={key:0,loop:"",autoplay:"",muted:"",playsinline:"",class:"drum_img"},Fm=["src"],zm=["src"],Um=ke(o.defineComponent({__name:"DrumItem",props:{group:{},index:{},active:{type:Boolean}},setup(i){const e=i,{mediaUrl:t}=Im(e.group.id,e.group.video_link||e.group.image_link||"");return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["drum_item",{active:e.active}]),"data-id":i.group.id},[i.group.video_link?(o.openBlock(),o.createElementBlock("video",Lm,[o.createElementVNode("source",{src:o.unref(t)||"",type:"video/webm"},null,8,Fm)])):(o.openBlock(),o.createElementBlock("img",{key:1,class:"drum_img",src:o.unref(t)||""},null,8,zm)),o.createElementVNode("p",null,o.toDisplayString(i.group.name),1)],10,Vm))}}),[["__scopeId","data-v-38338744"]]),Hm={},qm={width:"9.998535",height:"10.000000",viewBox:"0 0 9.99854 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function Wm(i,e){return o.openBlock(),o.createElementBlock("svg",qm,[...e[0]||(e[0]=[o.createElementVNode("desc",null," Created with Pixso. ",-1),o.createElementVNode("defs",null,null,-1),o.createElementVNode("path",{id:"Форма 5",d:"M4.23 10L5.76 10L5.76 5.74L9.99 5.74L9.99 4.25L5.76 4.25L5.76 0L4.23 0L4.23 4.25L0 4.25L0 5.74L4.23 5.74L4.23 10Z",fill:"#F2F7FF","fill-opacity":"1.000000","fill-rule":"nonzero"},null,-1)])])}const jm=ke(Hm,[["render",Wm]]),Xm={class:"recommendation_wrapper"},Ym={class:"recommendation_header"},Gm={class:"recommendation_info"},Km=ke(o.defineComponent({__name:"Recommendation",props:{closeCurrentCard:{},openCurrentCard:{}},setup(i){const e=Ke(),{isUpSale:t,dataUpSale:n}=J.storeToRefs(e),r=()=>{t.value=!1};return o.onUnmounted(()=>{n.value=null}),(s,a)=>(o.openBlock(),o.createElementBlock("div",Xm,[o.createElementVNode("div",Ym,[a[0]||(a[0]=o.createElementVNode("p",{class:"header_title"},"Часто берут вместе",-1)),o.createElementVNode("div",{class:"header_close",onClick:r},[o.createVNode(jm,{class:"close_icon"})])]),o.createElementVNode("div",Gm,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(n),l=>(o.openBlock(),o.createBlock($a,{data:l,key:l.id,parent:l.id,is_group:!1,is_product:!0,class:"card",closeCurrentCard:i.closeCurrentCard,takeCurrentCard:()=>i.openCurrentCard(l.id,!0)},null,8,["data","parent","closeCurrentCard","takeCurrentCard"]))),128))])]))}}),[["__scopeId","data-v-abf4717f"]]),Jm={class:"wrapper_modal"},Zm={class:"card_modal"},Qm=ke(o.defineComponent({__name:"ModalWindows",props:{visible:{type:Boolean}},setup(i){const e=i,t=Ke(),{isUpSale:n}=J.storeToRefs(t),r=()=>{n.value=!1};return(s,a)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(Aa,{data:e.visible},null,8,["data"]),o.createElementVNode("div",{class:"black_modal",onClick:r}),o.createElementVNode("div",Jm,[o.createElementVNode("div",Zm,[o.renderSlot(s.$slots,"default",{},void 0,!0)])])],64))}}),[["__scopeId","data-v-ec2b2c4d"]]);function Ht(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Va(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}/*!
7
- * GSAP 3.14.1
8
- * https://gsap.com
9
- *
10
- * @license Copyright 2008-2025, GreenSock. All rights reserved.
11
- * Subject to the terms at https://gsap.com/standard-license
12
- * @author: Jack Doyle, jack@greensock.com
13
- */var at={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Wn={duration:.5,overwrite:!1,delay:0},uo,ze,ve,bt=1e8,Se=1/bt,fo=Math.PI*2,e_=fo/4,t_=0,La=Math.sqrt,n_=Math.cos,r_=Math.sin,Fe=function(e){return typeof e=="string"},Ae=function(e){return typeof e=="function"},qt=function(e){return typeof e=="number"},ho=function(e){return typeof e>"u"},$t=function(e){return typeof e=="object"},Qe=function(e){return e!==!1},po=function(){return typeof window<"u"},ci=function(e){return Ae(e)||Fe(e)},Fa=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},qe=Array.isArray,i_=/random\([^)]+\)/g,o_=/,\s*/g,za=/(?:-?\.?\d|\.)+/gi,Ua=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,jn=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,mo=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ha=/[+-]=-?[.\d]+/,s_=/[^,'"\[\]\s]+/gi,a_=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ne,It,_o,go,lt={},ui={},qa,Wa=function(e){return(ui=Yn(e,lt))&&nt},yo=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},br=function(e,t){return!t&&console.warn(e)},ja=function(e,t){return e&&(lt[e]=t)&&ui&&(ui[e]=t)||lt},wr=function(){return 0},l_={suppressEvents:!0,isStart:!0,kill:!1},di={suppressEvents:!0,kill:!1},c_={suppressEvents:!0},bo={},tn=[],wo={},Xa,ct={},xo={},Ya=30,fi=[],ko="",So=function(e){var t=e[0],n,r;if($t(t)||Ae(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=fi.length;r--&&!fi[r].targetTest(t););n=fi[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Sl(e[r],n)))||e.splice(r,1);return e},xn=function(e){return e._gsap||So(xt(e))[0]._gsap},Ga=function(e,t,n){return(n=e[t])&&Ae(n)?e[t]():ho(n)&&e.getAttribute&&e.getAttribute(t)||n},et=function(e,t){return(e=e.split(",")).forEach(t)||e},Be=function(e){return Math.round(e*1e5)/1e5||0},Me=function(e){return Math.round(e*1e7)/1e7||0},Xn=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n==="+"?e+r:n==="-"?e-r:n==="*"?e*r:e/r},u_=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},hi=function(){var e=tn.length,t=tn.slice(0),n,r;for(wo={},tn.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},Co=function(e){return!!(e._initted||e._startAt||e.add)},Ka=function(e,t,n,r){tn.length&&!ze&&hi(),e.render(t,n,!!(ze&&t<0&&Co(e))),tn.length&&!ze&&hi()},Ja=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(s_).length<2?t:Fe(e)?e.trim():e},Za=function(e){return e},ut=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},d_=function(e){return function(t,n){for(var r in n)r in t||r==="duration"&&e||r==="ease"||(t[r]=n[r])}},Yn=function(e,t){for(var n in t)e[n]=t[n];return e},Qa=function i(e,t){for(var n in t)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(e[n]=$t(t[n])?i(e[n]||(e[n]={}),t[n]):t[n]);return e},pi=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},xr=function(e){var t=e.parent||Ne,n=e.keyframes?d_(qe(e.keyframes)):ut;if(Qe(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},f_=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},el=function(e,t,n,r,s){var a=e[r],l;if(s)for(l=t[s];a&&a[s]>l;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},mi=function(e,t,n,r){n===void 0&&(n="_first"),r===void 0&&(r="_last");var s=t._prev,a=t._next;s?s._next=a:e[n]===t&&(e[n]=a),a?a._prev=s:e[r]===t&&(e[r]=s),t._next=t._prev=t.parent=null},nn=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},kn=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},h_=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Eo=function(e,t,n,r){return e._startAt&&(ze?e._startAt.revert(di):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},p_=function i(e){return!e||e._ts&&i(e.parent)},tl=function(e){return e._repeat?Gn(e._tTime,e=e.duration()+e._rDelay)*e:0},Gn=function(e,t){var n=Math.floor(e=Me(e/t));return e&&n===e?n-1:n},_i=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},gi=function(e){return e._end=Me(e._start+(e._tDur/Math.abs(e._ts||e._rts||Se)||0))},yi=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Me(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),gi(e),n._dirty||kn(n,e)),e},nl=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=_i(e.rawTime(),t),(!t._dur||Sr(0,t.totalDuration(),n)-t._tTime>Se)&&t.render(n,!0)),kn(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-Se}},Vt=function(e,t,n,r){return t.parent&&nn(t),t._start=Me((qt(n)?n:n||e!==Ne?wt(e,n,t):e._time)+t._delay),t._end=Me(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),el(e,t,"_first","_last",e._sort?"_start":0),To(t)||(e._recent=t),r||nl(e,t),e._ts<0&&yi(e,e._tTime),e},rl=function(e,t){return(lt.ScrollTrigger||yo("scrollTrigger",t))&&lt.ScrollTrigger.create(t,e)},il=function(e,t,n,r,s){if(Oo(e,t,s),!e._initted)return 1;if(!n&&e._pt&&!ze&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Xa!==ft.frame)return tn.push(e),e._lazy=[s,r],1},m_=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},To=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},__=function(e,t,n,r){var s=e.ratio,a=t<0||!t&&(!e._start&&m_(e)&&!(!e._initted&&To(e))||(e._ts<0||e._dp._ts<0)&&!To(e))?0:1,l=e._rDelay,c=0,u,d,h;if(l&&e._repeat&&(c=Sr(0,e._tDur,t),d=Gn(c,l),e._yoyo&&d&1&&(a=1-a),d!==Gn(e._tTime,l)&&(s=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==s||ze||r||e._zTime===Se||!t&&e._zTime){if(!e._initted&&il(e,t,r,n,c))return;for(h=e._zTime,e._zTime=t||(n?Se:0),n||(n=t&&!h),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=c,u=e._pt;u;)u.r(a,u.d),u=u._next;t<0&&Eo(e,t,n,!0),e._onUpdate&&!n&&dt(e,"onUpdate"),c&&e._repeat&&!n&&e.parent&&dt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&nn(e,1),!n&&!ze&&(dt(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},g_=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},Kn=function(e,t,n,r){var s=e._repeat,a=Me(t)||0,l=e._tTime/e._tDur;return l&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=s?s<0?1e10:Me(a*(s+1)+e._rDelay*s):a,l>0&&!r&&yi(e,e._tTime=e._tDur*l),e.parent&&gi(e),n||kn(e.parent,e),e},ol=function(e){return e instanceof Xe?kn(e):Kn(e,e._dur)},y_={_start:0,endTime:wr,totalDuration:wr},wt=function i(e,t,n){var r=e.labels,s=e._recent||y_,a=e.duration()>=bt?s.endTime(!1):e._dur,l,c,u;return Fe(t)&&(isNaN(t)||t in r)?(c=t.charAt(0),u=t.substr(-1)==="%",l=t.indexOf("="),c==="<"||c===">"?(l>=0&&(t=t.replace(/=/,"")),(c==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(l<0?s:n).totalDuration()/100:1)):l<0?(t in r||(r[t]=a),r[t]):(c=parseFloat(t.charAt(l-1)+t.substr(l+1)),u&&n&&(c=c/100*(qe(n)?n[0]:n).totalDuration()),l>1?i(e,t.substr(0,l-1),n)+c:a+c)):t==null?a:+t},kr=function(e,t,n){var r=qt(t[1]),s=(r?2:1)+(e<2?0:1),a=t[s],l,c;if(r&&(a.duration=t[1]),a.parent=n,e){for(l=a,c=n;c&&!("immediateRender"in l);)l=c.vars.defaults||{},c=Qe(c.vars.inherit)&&c.parent;a.immediateRender=Qe(l.immediateRender),e<2?a.runBackwards=1:a.startAt=t[s-1]}return new Oe(t[0],a,t[s+1])},rn=function(e,t){return e||e===0?t(e):t},Sr=function(e,t,n){return n<e?e:n>t?t:n},We=function(e,t){return!Fe(e)||!(t=a_.exec(e))?"":t[1]},b_=function(e,t,n){return rn(n,function(r){return Sr(e,t,r)})},vo=[].slice,sl=function(e,t){return e&&$t(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&$t(e[0]))&&!e.nodeType&&e!==It},w_=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(r){var s;return Fe(r)&&!t||sl(r,1)?(s=n).push.apply(s,xt(r)):n.push(r)})||n},xt=function(e,t,n){return ve&&!t&&ve.selector?ve.selector(e):Fe(e)&&!n&&(_o||!Zn())?vo.call((t||go).querySelectorAll(e),0):qe(e)?w_(e,n):sl(e)?vo.call(e,0):e?[e]:[]},No=function(e){return e=xt(e)[0]||br("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return xt(t,n.querySelectorAll?n:n===e?br("Invalid scope")||go.createElement("div"):e)}},al=function(e){return e.sort(function(){return .5-Math.random()})},ll=function(e){if(Ae(e))return e;var t=$t(e)?e:{each:e},n=Sn(t.ease),r=t.from||0,s=parseFloat(t.base)||0,a={},l=r>0&&r<1,c=isNaN(r)||l,u=t.axis,d=r,h=r;return Fe(r)?d=h={center:.5,edges:.5,end:1}[r]||0:!l&&c&&(d=r[0],h=r[1]),function(_,f,m){var p=(m||t).length,g=a[p],y,w,x,T,S,B,k,b,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,bt])[1],!C){for(k=-bt;k<(k=m[C++].getBoundingClientRect().left)&&C<p;);C<p&&C--}for(g=a[p]=[],y=c?Math.min(C,p)*d-.5:r%C,w=C===bt?0:c?p*h/C-.5:r/C|0,k=0,b=bt,B=0;B<p;B++)x=B%C-y,T=w-(B/C|0),g[B]=S=u?Math.abs(u==="y"?T:x):La(x*x+T*T),S>k&&(k=S),S<b&&(b=S);r==="random"&&al(g),g.max=k-b,g.min=b,g.v=p=(parseFloat(t.amount)||parseFloat(t.each)*(C>p?p-1:u?u==="y"?p/C:C:Math.max(C,p/C))||0)*(r==="edges"?-1:1),g.b=p<0?s-p:s,g.u=We(t.amount||t.each)||0,n=n&&p<0?wl(n):n}return p=(g[_]-g.min)/g.max||0,Me(g.b+(n?n(p):p)*g.v)+g.u}},Mo=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=Me(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(qt(n)?0:We(n))}},cl=function(e,t){var n=qe(e),r,s;return!n&&$t(e)&&(r=n=e.radius||bt,e.values?(e=xt(e.values),(s=!qt(e[0]))&&(r*=r)):e=Mo(e.increment)),rn(t,n?Ae(e)?function(a){return s=e(a),Math.abs(s-a)<=r?s:a}:function(a){for(var l=parseFloat(s?a.x:a),c=parseFloat(s?a.y:0),u=bt,d=0,h=e.length,_,f;h--;)s?(_=e[h].x-l,f=e[h].y-c,_=_*_+f*f):_=Math.abs(e[h]-l),_<u&&(u=_,d=h);return d=!r||u<=r?e[d]:a,s||d===a||qt(a)?d:d+We(a)}:Mo(e))},ul=function(e,t,n,r){return rn(qe(e)?!t:n===!0?!!(n=0):!r,function(){return qe(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},x_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduce(function(s,a){return a(s)},r)}},k_=function(e,t){return function(n){return e(parseFloat(n))+(t||We(n))}},S_=function(e,t,n){return fl(e,t,0,1,n)},dl=function(e,t,n){return rn(n,function(r){return e[~~t(r)]})},C_=function i(e,t,n){var r=t-e;return qe(e)?dl(e,i(0,e.length),t):rn(n,function(s){return(r+(s-e)%r)%r+e})},E_=function i(e,t,n){var r=t-e,s=r*2;return qe(e)?dl(e,i(0,e.length-1),t):rn(n,function(a){return a=(s+(a-e)%s)%s||0,e+(a>r?s-a:a)})},Cr=function(e){return e.replace(i_,function(t){var n=t.indexOf("[")+1,r=t.substring(n||7,n?t.indexOf("]"):t.length-1).split(o_);return ul(n?r:+r[0],n?0:+r[1],+r[2]||1e-5)})},fl=function(e,t,n,r,s){var a=t-e,l=r-n;return rn(s,function(c){return n+((c-e)/a*l||0)})},T_=function i(e,t,n,r){var s=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!s){var a=Fe(e),l={},c,u,d,h,_;if(n===!0&&(r=1)&&(n=null),a)e={p:e},t={p:t};else if(qe(e)&&!qe(t)){for(d=[],h=e.length,_=h-2,u=1;u<h;u++)d.push(i(e[u-1],e[u]));h--,s=function(m){m*=h;var p=Math.min(_,~~m);return d[p](m-p)},n=t}else r||(e=Yn(qe(e)?[]:{},e));if(!d){for(c in t)Ro.call(l,e,c,"get",t[c]);s=function(m){return Vo(m,l)||(a?e.p:e)}}}return rn(n,s)},hl=function(e,t,n){var r=e.labels,s=bt,a,l,c;for(a in r)l=r[a]-t,l<0==!!n&&l&&s>(l=Math.abs(l))&&(c=a,s=l);return c},dt=function(e,t,n){var r=e.vars,s=r[t],a=ve,l=e._ctx,c,u,d;if(s)return c=r[t+"Params"],u=r.callbackScope||e,n&&tn.length&&hi(),l&&(ve=l),d=c?s.apply(u,c):s.call(u),ve=a,d},Er=function(e){return nn(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ze),e.progress()<1&&dt(e,"onInterrupt"),e},Jn,pl=[],ml=function(e){if(e)if(e=!e.name&&e.default||e,po()||e.headless){var t=e.name,n=Ae(e),r=t&&!n&&e.init?function(){this._props=[]}:e,s={init:wr,render:Vo,add:Ro,kill:U_,modifier:z_,rawVars:0},a={targetTest:0,get:0,getSetter:Io,aliases:{},register:0};if(Zn(),e!==r){if(ct[t])return;ut(r,ut(pi(e,s),a)),Yn(r.prototype,Yn(s,pi(e,a))),ct[r.prop=t]=r,e.targetTest&&(fi.push(r),bo[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}ja(t,r),e.register&&e.register(nt,r,tt)}else pl.push(e)},Ce=255,Tr={aqua:[0,Ce,Ce],lime:[0,Ce,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ce],navy:[0,0,128],white:[Ce,Ce,Ce],olive:[128,128,0],yellow:[Ce,Ce,0],orange:[Ce,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ce,0,0],pink:[Ce,192,203],cyan:[0,Ce,Ce],transparent:[Ce,Ce,Ce,0]},Po=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Ce+.5|0},_l=function(e,t,n){var r=e?qt(e)?[e>>16,e>>8&Ce,e&Ce]:0:Tr.black,s,a,l,c,u,d,h,_,f,m;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Tr[e])r=Tr[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),a=e.charAt(2),l=e.charAt(3),e="#"+s+s+a+a+l+l+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Ce,r&Ce,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Ce,e&Ce]}else if(e.substr(0,3)==="hsl"){if(r=m=e.match(za),!t)c=+r[0]%360/360,u=+r[1]/100,d=+r[2]/100,a=d<=.5?d*(u+1):d+u-d*u,s=d*2-a,r.length>3&&(r[3]*=1),r[0]=Po(c+1/3,s,a),r[1]=Po(c,s,a),r[2]=Po(c-1/3,s,a);else if(~e.indexOf("="))return r=e.match(Ua),n&&r.length<4&&(r[3]=1),r}else r=e.match(za)||Tr.transparent;r=r.map(Number)}return t&&!m&&(s=r[0]/Ce,a=r[1]/Ce,l=r[2]/Ce,h=Math.max(s,a,l),_=Math.min(s,a,l),d=(h+_)/2,h===_?c=u=0:(f=h-_,u=d>.5?f/(2-h-_):f/(h+_),c=h===s?(a-l)/f+(a<l?6:0):h===a?(l-s)/f+2:(s-a)/f+4,c*=60),r[0]=~~(c+.5),r[1]=~~(u*100+.5),r[2]=~~(d*100+.5)),n&&r.length<4&&(r[3]=1),r},gl=function(e){var t=[],n=[],r=-1;return e.split(on).forEach(function(s){var a=s.match(jn)||[];t.push.apply(t,a),n.push(r+=a.length+1)}),t.c=n,t},yl=function(e,t,n){var r="",s=(e+r).match(on),a=t?"hsla(":"rgba(",l=0,c,u,d,h;if(!s)return e;if(s=s.map(function(_){return(_=_l(_,t,1))&&a+(t?_[0]+","+_[1]+"%,"+_[2]+"%,"+_[3]:_.join(","))+")"}),n&&(d=gl(e),c=n.c,c.join(r)!==d.c.join(r)))for(u=e.replace(on,"1").split(jn),h=u.length-1;l<h;l++)r+=u[l]+(~c.indexOf(l)?s.shift()||a+"0,0,0,0)":(d.length?d:s.length?s:n).shift());if(!u)for(u=e.split(on),h=u.length-1;l<h;l++)r+=u[l]+s[l];return r+u[h]},on=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Tr)i+="|"+e+"\\b";return new RegExp(i+")","gi")}(),v_=/hsl[a]?\(/,bl=function(e){var t=e.join(" "),n;if(on.lastIndex=0,on.test(t))return n=v_.test(t),e[1]=yl(e[1],n),e[0]=yl(e[0],n,gl(e[1])),!0},vr,ft=function(){var i=Date.now,e=500,t=33,n=i(),r=n,s=1e3/240,a=s,l=[],c,u,d,h,_,f,m=function p(g){var y=i()-r,w=g===!0,x,T,S,B;if((y>e||y<0)&&(n+=y-t),r+=y,S=r-n,x=S-a,(x>0||w)&&(B=++h.frame,_=S-h.time*1e3,h.time=S=S/1e3,a+=x+(x>=s?4:s-x),T=1),w||(c=u(p)),T)for(f=0;f<l.length;f++)l[f](S,_,B,g)};return h={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(g){return _/(1e3/(g||60))},wake:function(){qa&&(!_o&&po()&&(It=_o=window,go=It.document||{},lt.gsap=nt,(It.gsapVersions||(It.gsapVersions=[])).push(nt.version),Wa(ui||It.GreenSockGlobals||!It.gsap&&It||{}),pl.forEach(ml)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&h.sleep(),u=d||function(g){return setTimeout(g,a-h.time*1e3+1|0)},vr=1,m(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(c),vr=0,u=wr},lagSmoothing:function(g,y){e=g||1/0,t=Math.min(y||33,e)},fps:function(g){s=1e3/(g||240),a=h.time*1e3+s},add:function(g,y,w){var x=y?function(T,S,B,k){g(T,S,B,k),h.remove(x)}:g;return h.remove(g),l[w?"unshift":"push"](x),Zn(),x},remove:function(g,y){~(y=l.indexOf(g))&&l.splice(y,1)&&f>=y&&f--},_listeners:l},h}(),Zn=function(){return!vr&&ft.wake()},de={},N_=/^[\d.\-M][\d.\-,\s]/,M_=/["']/g,P_=function(e){for(var t={},n=e.substr(1,e.length-3).split(":"),r=n[0],s=1,a=n.length,l,c,u;s<a;s++)c=n[s],l=s!==a-1?c.lastIndexOf(","):c.length,u=c.substr(0,l),t[r]=isNaN(u)?u.replace(M_,"").trim():+u,r=c.substr(l+1).trim();return t},A_=function(e){var t=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<n?e.indexOf(")",n+1):n)},B_=function(e){var t=(e+"").split("("),n=de[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf("{")?[P_(t[1])]:A_(e).split(",").map(Ja)):de._CE&&N_.test(e)?de._CE("",e):n},wl=function(e){return function(t){return 1-e(1-t)}},xl=function i(e,t){for(var n=e._first,r;n;)n instanceof Xe?i(n,t):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==t&&(n.timeline?i(n.timeline,t):(r=n._ease,n._ease=n._yEase,n._yEase=r,n._yoyo=t)),n=n._next},Sn=function(e,t){return e&&(Ae(e)?e:de[e]||B_(e))||t},Cn=function(e,t,n,r){n===void 0&&(n=function(c){return 1-t(1-c)}),r===void 0&&(r=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var s={easeIn:t,easeOut:n,easeInOut:r},a;return et(e,function(l){de[l]=lt[l]=s,de[a=l.toLowerCase()]=n;for(var c in s)de[a+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=de[l+"."+c]=s[c]}),s},kl=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Ao=function i(e,t,n){var r=t>=1?t:1,s=(n||(e?.3:.45))/(t<1?t:1),a=s/fo*(Math.asin(1/r)||0),l=function(d){return d===1?1:r*Math.pow(2,-10*d)*r_((d-a)*s)+1},c=e==="out"?l:e==="in"?function(u){return 1-l(1-u)}:kl(l);return s=fo/s,c.config=function(u,d){return i(e,u,d)},c},Bo=function i(e,t){t===void 0&&(t=1.70158);var n=function(a){return a?--a*a*((t+1)*a+t)+1:0},r=e==="out"?n:e==="in"?function(s){return 1-n(1-s)}:kl(n);return r.config=function(s){return i(e,s)},r};et("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;Cn(i+",Power"+(t-1),e?function(n){return Math.pow(n,t)}:function(n){return n},function(n){return 1-Math.pow(1-n,t)},function(n){return n<.5?Math.pow(n*2,t)/2:1-Math.pow((1-n)*2,t)/2})}),de.Linear.easeNone=de.none=de.Linear.easeIn,Cn("Elastic",Ao("in"),Ao("out"),Ao()),function(i,e){var t=1/e,n=2*t,r=2.5*t,s=function(l){return l<t?i*l*l:l<n?i*Math.pow(l-1.5/e,2)+.75:l<r?i*(l-=2.25/e)*l+.9375:i*Math.pow(l-2.625/e,2)+.984375};Cn("Bounce",function(a){return 1-s(1-a)},s)}(7.5625,2.75),Cn("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)}),Cn("Circ",function(i){return-(La(1-i*i)-1)}),Cn("Sine",function(i){return i===1?1:-n_(i*e_)+1}),Cn("Back",Bo("in"),Bo("out"),Bo()),de.SteppedEase=de.steps=lt.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+(t?0:1),s=t?1:0,a=1-Se;return function(l){return((r*Sr(0,a,l)|0)+s)*n}}},Wn.ease=de["quad.out"],et("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return ko+=i+","+i+"Params,"});var Sl=function(e,t){this.id=t_++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Ga,this.set=t?t.getSetter:Io},Nr=function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Kn(this,+t.duration,1,1),this.data=t.data,ve&&(this._ctx=ve,ve.data.push(this)),vr||ft.wake()}var e=i.prototype;return e.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},e.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},e.totalDuration=function(n){return arguments.length?(this._dirty=0,Kn(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(n,r){if(Zn(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(yi(this,n),!s._dp||s.parent||nl(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&Vt(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===Se||!this._initted&&this._dur&&n||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Ka(this,n,r)),this},e.time=function(n,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+tl(this))%(this._dur+this._rDelay)||(n?this._dur:0),r):this._time},e.totalProgress=function(n,r){return arguments.length?this.totalTime(this.totalDuration()*n,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(n,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+tl(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(n,r){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,r):this._repeat?Gn(this._tTime,s)+1:1},e.timeScale=function(n,r){if(!arguments.length)return this._rts===-Se?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?_i(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-Se?0:this._rts,this.totalTime(Sr(-Math.abs(this._delay),this.totalDuration(),s),r!==!1),gi(this),h_(this)},e.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Zn(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Se&&(this._tTime-=Se)))),this):this._ps},e.startTime=function(n){if(arguments.length){this._start=Me(n);var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&Vt(r,this,this._start-this._delay),this}return this._start},e.endTime=function(n){return this._start+(Qe(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(n){var r=this.parent||this._dp;return r?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_i(r.rawTime(n),this):this._tTime:this._tTime},e.revert=function(n){n===void 0&&(n=c_);var r=ze;return ze=n,Co(this)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),ze=r,this},e.globalTime=function(n){for(var r=this,s=arguments.length?n:r.rawTime();r;)s=r._start+s/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},e.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,ol(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(n){if(arguments.length){var r=this._time;return this._rDelay=n,ol(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},e.seek=function(n,r){return this.totalTime(wt(this,n),Qe(r))},e.restart=function(n,r){return this.play().totalTime(n?-this._delay:0,Qe(r)),this._dur||(this._zTime=-Se),this},e.play=function(n,r){return n!=null&&this.seek(n,r),this.reversed(!1).paused(!1)},e.reverse=function(n,r){return n!=null&&this.seek(n||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(n,r){return n!=null&&this.seek(n,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-Se:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Se,this},e.isActive=function(){var n=this.parent||this._dp,r=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=r&&s<this.endTime(!0)-Se)},e.eventCallback=function(n,r,s){var a=this.vars;return arguments.length>1?(r?(a[n]=r,s&&(a[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=r)):delete a[n],this):a[n]},e.then=function(n){var r=this,s=r._prom;return new Promise(function(a){var l=Ae(n)?n:Za,c=function(){var d=r.then;r.then=null,s&&s(),Ae(l)&&(l=l(r))&&(l.then||l===r)&&(r.then=d),a(l),r.then=d};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?c():r._prom=c})},e.kill=function(){Er(this)},i}();ut(Nr.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Se,_prom:0,_ps:!1,_rts:1});var Xe=function(i){Va(e,i);function e(n,r){var s;return n===void 0&&(n={}),s=i.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=Qe(n.sortChildren),Ne&&Vt(n.parent||Ne,Ht(s),r),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&rl(Ht(s),n.scrollTrigger),s}var t=e.prototype;return t.to=function(r,s,a){return kr(0,arguments,this),this},t.from=function(r,s,a){return kr(1,arguments,this),this},t.fromTo=function(r,s,a,l){return kr(2,arguments,this),this},t.set=function(r,s,a){return s.duration=0,s.parent=this,xr(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Oe(r,s,wt(this,a),1),this},t.call=function(r,s,a){return Vt(this,Oe.delayedCall(0,r,s),a)},t.staggerTo=function(r,s,a,l,c,u,d){return a.duration=s,a.stagger=a.stagger||l,a.onComplete=u,a.onCompleteParams=d,a.parent=this,new Oe(r,a,wt(this,c)),this},t.staggerFrom=function(r,s,a,l,c,u,d){return a.runBackwards=1,xr(a).immediateRender=Qe(a.immediateRender),this.staggerTo(r,s,a,l,c,u,d)},t.staggerFromTo=function(r,s,a,l,c,u,d,h){return l.startAt=a,xr(l).immediateRender=Qe(l.immediateRender),this.staggerTo(r,s,l,c,u,d,h)},t.render=function(r,s,a){var l=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=r<=0?0:Me(r),h=this._zTime<0!=r<0&&(this._initted||!u),_,f,m,p,g,y,w,x,T,S,B,k;if(this!==Ne&&d>c&&r>=0&&(d=c),d!==this._tTime||a||h){if(l!==this._time&&u&&(d+=this._time-l,r+=this._time-l),_=d,T=this._start,x=this._ts,y=!x,h&&(u||(l=this._zTime),(r||!s)&&(this._zTime=r)),this._repeat){if(B=this._yoyo,g=u+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(g*100+r,s,a);if(_=Me(d%g),d===c?(p=this._repeat,_=u):(S=Me(d/g),p=~~S,p&&p===S&&(_=u,p--),_>u&&(_=u)),S=Gn(this._tTime,g),!l&&this._tTime&&S!==p&&this._tTime-S*g-this._dur<=0&&(S=p),B&&p&1&&(_=u-_,k=1),p!==S&&!this._lock){var b=B&&S&1,C=b===(B&&p&1);if(p<S&&(b=!b),l=b?0:d%u?u:d,this._lock=1,this.render(l||(k?0:Me(p*g)),s,!u)._lock=0,this._tTime=d,!s&&this.parent&&dt(this,"onRepeat"),this.vars.repeatRefresh&&!k&&(this.invalidate()._lock=1,S=p),l&&l!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,C&&(this._lock=2,l=b?u:-1e-4,this.render(l,!0),this.vars.repeatRefresh&&!k&&this.invalidate()),this._lock=0,!this._ts&&!y)return this;xl(this,k)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(w=g_(this,Me(l),Me(_)),w&&(d-=_-(_=w._start))),this._tTime=d,this._time=_,this._act=!x,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,l=0),!l&&d&&u&&!s&&!S&&(dt(this,"onStart"),this._tTime!==d))return this;if(_>=l&&r>=0)for(f=this._first;f;){if(m=f._next,(f._act||_>=f._start)&&f._ts&&w!==f){if(f.parent!==this)return this.render(r,s,a);if(f.render(f._ts>0?(_-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(_-f._start)*f._ts,s,a),_!==this._time||!this._ts&&!y){w=0,m&&(d+=this._zTime=-Se);break}}f=m}else{f=this._last;for(var P=r<0?r:_;f;){if(m=f._prev,(f._act||P<=f._end)&&f._ts&&w!==f){if(f.parent!==this)return this.render(r,s,a);if(f.render(f._ts>0?(P-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(P-f._start)*f._ts,s,a||ze&&Co(f)),_!==this._time||!this._ts&&!y){w=0,m&&(d+=this._zTime=P?-Se:Se);break}}f=m}}if(w&&!s&&(this.pause(),w.render(_>=l?0:-Se)._zTime=_>=l?1:-1,this._ts))return this._start=T,gi(this),this.render(r,s,a);this._onUpdate&&!s&&dt(this,"onUpdate",!0),(d===c&&this._tTime>=this.totalDuration()||!d&&l)&&(T===this._start||Math.abs(x)!==Math.abs(this._ts))&&(this._lock||((r||!u)&&(d===c&&this._ts>0||!d&&this._ts<0)&&nn(this,1),!s&&!(r<0&&!l)&&(d||l||!c)&&(dt(this,d===c&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<c&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(r,s){var a=this;if(qt(s)||(s=wt(this,s,r)),!(r instanceof Nr)){if(qe(r))return r.forEach(function(l){return a.add(l,s)}),this;if(Fe(r))return this.addLabel(r,s);if(Ae(r))r=Oe.delayedCall(0,r);else return this}return this!==r?Vt(this,r,s):this},t.getChildren=function(r,s,a,l){r===void 0&&(r=!0),s===void 0&&(s=!0),a===void 0&&(a=!0),l===void 0&&(l=-bt);for(var c=[],u=this._first;u;)u._start>=l&&(u instanceof Oe?s&&c.push(u):(a&&c.push(u),r&&c.push.apply(c,u.getChildren(!0,s,a)))),u=u._next;return c},t.getById=function(r){for(var s=this.getChildren(1,1,1),a=s.length;a--;)if(s[a].vars.id===r)return s[a]},t.remove=function(r){return Fe(r)?this.removeLabel(r):Ae(r)?this.killTweensOf(r):(r.parent===this&&mi(this,r),r===this._recent&&(this._recent=this._last),kn(this))},t.totalTime=function(r,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Me(ft.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),i.prototype.totalTime.call(this,r,s),this._forcing=0,this):this._tTime},t.addLabel=function(r,s){return this.labels[r]=wt(this,s),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,s,a){var l=Oe.delayedCall(0,s||wr,a);return l.data="isPause",this._hasPause=1,Vt(this,l,wt(this,r))},t.removePause=function(r){var s=this._first;for(r=wt(this,r);s;)s._start===r&&s.data==="isPause"&&nn(s),s=s._next},t.killTweensOf=function(r,s,a){for(var l=this.getTweensOf(r,a),c=l.length;c--;)sn!==l[c]&&l[c].kill(r,s);return this},t.getTweensOf=function(r,s){for(var a=[],l=xt(r),c=this._first,u=qt(s),d;c;)c instanceof Oe?u_(c._targets,l)&&(u?(!sn||c._initted&&c._ts)&&c.globalTime(0)<=s&&c.globalTime(c.totalDuration())>s:!s||c.isActive())&&a.push(c):(d=c.getTweensOf(l,s)).length&&a.push.apply(a,d),c=c._next;return a},t.tweenTo=function(r,s){s=s||{};var a=this,l=wt(a,r),c=s,u=c.startAt,d=c.onStart,h=c.onStartParams,_=c.immediateRender,f,m=Oe.to(a,ut({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:l,overwrite:"auto",duration:s.duration||Math.abs((l-(u&&"time"in u?u.time:a._time))/a.timeScale())||Se,onStart:function(){if(a.pause(),!f){var g=s.duration||Math.abs((l-(u&&"time"in u?u.time:a._time))/a.timeScale());m._dur!==g&&Kn(m,g,0,1).render(m._time,!0,!0),f=1}d&&d.apply(m,h||[])}},s));return _?m.render(0):m},t.tweenFromTo=function(r,s,a){return this.tweenTo(s,ut({startAt:{time:wt(this,r)}},a))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),hl(this,wt(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),hl(this,wt(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+Se)},t.shiftChildren=function(r,s,a){a===void 0&&(a=0);var l=this._first,c=this.labels,u;for(r=Me(r);l;)l._start>=a&&(l._start+=r,l._end+=r),l=l._next;if(s)for(u in c)c[u]>=a&&(c[u]+=r);return kn(this)},t.invalidate=function(r){var s=this._first;for(this._lock=0;s;)s.invalidate(r),s=s._next;return i.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var s=this._first,a;s;)a=s._next,this.remove(s),s=a;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),kn(this)},t.totalDuration=function(r){var s=0,a=this,l=a._last,c=bt,u,d,h;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-r:r));if(a._dirty){for(h=a.parent;l;)u=l._prev,l._dirty&&l.totalDuration(),d=l._start,d>c&&a._sort&&l._ts&&!a._lock?(a._lock=1,Vt(a,l,d-l._delay,1)._lock=0):c=d,d<0&&l._ts&&(s-=d,(!h&&!a._dp||h&&h.smoothChildTiming)&&(a._start+=Me(d/a._ts),a._time-=d,a._tTime-=d),a.shiftChildren(-d,!1,-1/0),c=0),l._end>s&&l._ts&&(s=l._end),l=u;Kn(a,a===Ne&&a._time>s?a._time:s,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(r){if(Ne._ts&&(Ka(Ne,_i(r,Ne)),Xa=ft.frame),ft.frame>=Ya){Ya+=at.autoSleep||120;var s=Ne._first;if((!s||!s._ts)&&at.autoSleep&&ft._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||ft.sleep()}}},e}(Nr);ut(Xe.prototype,{_lock:0,_hasPause:0,_forcing:0});var R_=function(e,t,n,r,s,a,l){var c=new tt(this._pt,e,t,0,1,Ml,null,s),u=0,d=0,h,_,f,m,p,g,y,w;for(c.b=n,c.e=r,n+="",r+="",(y=~r.indexOf("random("))&&(r=Cr(r)),a&&(w=[n,r],a(w,e,t),n=w[0],r=w[1]),_=n.match(mo)||[];h=mo.exec(r);)m=h[0],p=r.substring(u,h.index),f?f=(f+1)%5:p.substr(-5)==="rgba("&&(f=1),m!==_[d++]&&(g=parseFloat(_[d-1])||0,c._pt={_next:c._pt,p:p||d===1?p:",",s:g,c:m.charAt(1)==="="?Xn(g,m)-g:parseFloat(m)-g,m:f&&f<4?Math.round:0},u=mo.lastIndex);return c.c=u<r.length?r.substring(u,r.length):"",c.fp=l,(Ha.test(r)||y)&&(c.e=0),this._pt=c,c},Ro=function(e,t,n,r,s,a,l,c,u,d){Ae(r)&&(r=r(s||0,e,a));var h=e[t],_=n!=="get"?n:Ae(h)?u?e[t.indexOf("set")||!Ae(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():h,f=Ae(h)?u?V_:vl:$o,m;if(Fe(r)&&(~r.indexOf("random(")&&(r=Cr(r)),r.charAt(1)==="="&&(m=Xn(_,r)+(We(_)||0),(m||m===0)&&(r=m))),!d||_!==r||Do)return!isNaN(_*r)&&r!==""?(m=new tt(this._pt,e,t,+_||0,r-(_||0),typeof h=="boolean"?F_:Nl,0,f),u&&(m.fp=u),l&&m.modifier(l,this,e),this._pt=m):(!h&&!(t in e)&&yo(t,r),R_.call(this,e,t,_,r,f,c||at.stringFilter,u))},D_=function(e,t,n,r,s){if(Ae(e)&&(e=Mr(e,s,t,n,r)),!$t(e)||e.style&&e.nodeType||qe(e)||Fa(e))return Fe(e)?Mr(e,s,t,n,r):e;var a={},l;for(l in e)a[l]=Mr(e[l],s,t,n,r);return a},Cl=function(e,t,n,r,s,a){var l,c,u,d;if(ct[e]&&(l=new ct[e]).init(s,l.rawVars?t[e]:D_(t[e],r,s,a,n),n,r,a)!==!1&&(n._pt=c=new tt(n._pt,s,e,0,1,l.render,l,0,l.priority),n!==Jn))for(u=n._ptLookup[n._targets.indexOf(s)],d=l._props.length;d--;)u[l._props[d]]=c;return l},sn,Do,Oo=function i(e,t,n){var r=e.vars,s=r.ease,a=r.startAt,l=r.immediateRender,c=r.lazy,u=r.onUpdate,d=r.runBackwards,h=r.yoyoEase,_=r.keyframes,f=r.autoRevert,m=e._dur,p=e._startAt,g=e._targets,y=e.parent,w=y&&y.data==="nested"?y.vars.targets:g,x=e._overwrite==="auto"&&!uo,T=e.timeline,S,B,k,b,C,P,O,H,R,N,E,M,A;if(T&&(!_||!s)&&(s="none"),e._ease=Sn(s,Wn.ease),e._yEase=h?wl(Sn(h===!0?s:h,Wn.ease)):0,h&&e._yoyo&&!e._repeat&&(h=e._yEase,e._yEase=e._ease,e._ease=h),e._from=!T&&!!r.runBackwards,!T||_&&!r.stagger){if(H=g[0]?xn(g[0]).harness:0,M=H&&r[H.prop],S=pi(r,bo),p&&(p._zTime<0&&p.progress(1),t<0&&d&&l&&!f?p.render(-1,!0):p.revert(d&&m?di:l_),p._lazy=0),a){if(nn(e._startAt=Oe.set(g,ut({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!p&&Qe(c),startAt:null,delay:0,onUpdate:u&&function(){return dt(e,"onUpdate")},stagger:0},a))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ze||!l&&!f)&&e._startAt.revert(di),l&&m&&t<=0&&n<=0){t&&(e._zTime=t);return}}else if(d&&m&&!p){if(t&&(l=!1),k=ut({overwrite:!1,data:"isFromStart",lazy:l&&!p&&Qe(c),immediateRender:l,stagger:0,parent:y},S),M&&(k[H.prop]=M),nn(e._startAt=Oe.set(g,k)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ze?e._startAt.revert(di):e._startAt.render(-1,!0)),e._zTime=t,!l)i(e._startAt,Se,Se);else if(!t)return}for(e._pt=e._ptCache=0,c=m&&Qe(c)||c&&!m,B=0;B<g.length;B++){if(C=g[B],O=C._gsap||So(g)[B]._gsap,e._ptLookup[B]=N={},wo[O.id]&&tn.length&&hi(),E=w===g?B:w.indexOf(C),H&&(R=new H).init(C,M||S,e,E,w)!==!1&&(e._pt=b=new tt(e._pt,C,R.name,0,1,R.render,R,0,R.priority),R._props.forEach(function($){N[$]=b}),R.priority&&(P=1)),!H||M)for(k in S)ct[k]&&(R=Cl(k,S,e,E,C,w))?R.priority&&(P=1):N[k]=b=Ro.call(e,C,k,"get",S[k],E,w,0,r.stringFilter);e._op&&e._op[B]&&e.kill(C,e._op[B]),x&&e._pt&&(sn=e,Ne.killTweensOf(C,N,e.globalTime(t)),A=!e.parent,sn=0),e._pt&&c&&(wo[O.id]=1)}P&&Pl(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!A,_&&t<=0&&T.render(bt,!0,!0)},O_=function(e,t,n,r,s,a,l,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],d,h,_,f;if(!u)for(u=e._ptCache[t]=[],_=e._ptLookup,f=e._targets.length;f--;){if(d=_[f][t],d&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==t&&d.fp!==t;)d=d._next;if(!d)return Do=1,e.vars[t]="+=0",Oo(e,l),Do=0,c?br(t+" not eligible for reset"):1;u.push(d)}for(f=u.length;f--;)h=u[f],d=h._pt||h,d.s=(r||r===0)&&!s?r:d.s+(r||0)+a*d.c,d.c=n-d.s,h.e&&(h.e=Be(n)+We(h.e)),h.b&&(h.b=d.s+We(h.b))},$_=function(e,t){var n=e[0]?xn(e[0]).harness:0,r=n&&n.aliases,s,a,l,c;if(!r)return t;s=Yn({},t);for(a in r)if(a in s)for(c=r[a].split(","),l=c.length;l--;)s[c[l]]=s[a];return s},I_=function(e,t,n,r){var s=t.ease||r||"power1.inOut",a,l;if(qe(t))l=n[e]||(n[e]=[]),t.forEach(function(c,u){return l.push({t:u/(t.length-1)*100,v:c,e:s})});else for(a in t)l=n[a]||(n[a]=[]),a==="ease"||l.push({t:parseFloat(e),v:t[a],e:s})},Mr=function(e,t,n,r,s){return Ae(e)?e.call(t,n,r,s):Fe(e)&&~e.indexOf("random(")?Cr(e):e},El=ko+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Tl={};et(El+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return Tl[i]=1});var Oe=function(i){Va(e,i);function e(n,r,s,a){var l;typeof r=="number"&&(s.duration=r,r=s,s=null),l=i.call(this,a?r:xr(r))||this;var c=l.vars,u=c.duration,d=c.delay,h=c.immediateRender,_=c.stagger,f=c.overwrite,m=c.keyframes,p=c.defaults,g=c.scrollTrigger,y=c.yoyoEase,w=r.parent||Ne,x=(qe(n)||Fa(n)?qt(n[0]):"length"in r)?[n]:xt(n),T,S,B,k,b,C,P,O;if(l._targets=x.length?So(x):br("GSAP target "+n+" not found. https://gsap.com",!at.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=f,m||_||ci(u)||ci(d)){if(r=l.vars,T=l.timeline=new Xe({data:"nested",defaults:p||{},targets:w&&w.data==="nested"?w.vars.targets:x}),T.kill(),T.parent=T._dp=Ht(l),T._start=0,_||ci(u)||ci(d)){if(k=x.length,P=_&&ll(_),$t(_))for(b in _)~El.indexOf(b)&&(O||(O={}),O[b]=_[b]);for(S=0;S<k;S++)B=pi(r,Tl),B.stagger=0,y&&(B.yoyoEase=y),O&&Yn(B,O),C=x[S],B.duration=+Mr(u,Ht(l),S,C,x),B.delay=(+Mr(d,Ht(l),S,C,x)||0)-l._delay,!_&&k===1&&B.delay&&(l._delay=d=B.delay,l._start+=d,B.delay=0),T.to(C,B,P?P(S,C,x):0),T._ease=de.none;T.duration()?u=d=0:l.timeline=0}else if(m){xr(ut(T.vars.defaults,{ease:"none"})),T._ease=Sn(m.ease||r.ease||"none");var H=0,R,N,E;if(qe(m))m.forEach(function(M){return T.to(x,M,">")}),T.duration();else{B={};for(b in m)b==="ease"||b==="easeEach"||I_(b,m[b],B,m.easeEach);for(b in B)for(R=B[b].sort(function(M,A){return M.t-A.t}),H=0,S=0;S<R.length;S++)N=R[S],E={ease:N.e,duration:(N.t-(S?R[S-1].t:0))/100*u},E[b]=N.v,T.to(x,E,H),H+=E.duration;T.duration()<u&&T.to({},{duration:u-T.duration()})}}u||l.duration(u=T.duration())}else l.timeline=0;return f===!0&&!uo&&(sn=Ht(l),Ne.killTweensOf(x),sn=0),Vt(w,Ht(l),s),r.reversed&&l.reverse(),r.paused&&l.paused(!0),(h||!u&&!m&&l._start===Me(w._time)&&Qe(h)&&p_(Ht(l))&&w.data!=="nested")&&(l._tTime=-Se,l.render(Math.max(0,-d)||0)),g&&rl(Ht(l),g),l}var t=e.prototype;return t.render=function(r,s,a){var l=this._time,c=this._tDur,u=this._dur,d=r<0,h=r>c-Se&&!d?c:r<Se?0:r,_,f,m,p,g,y,w,x,T;if(!u)__(this,r,s,a);else if(h!==this._tTime||!r||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==d||this._lazy){if(_=h,x=this.timeline,this._repeat){if(p=u+this._rDelay,this._repeat<-1&&d)return this.totalTime(p*100+r,s,a);if(_=Me(h%p),h===c?(m=this._repeat,_=u):(g=Me(h/p),m=~~g,m&&m===g?(_=u,m--):_>u&&(_=u)),y=this._yoyo&&m&1,y&&(T=this._yEase,_=u-_),g=Gn(this._tTime,p),_===l&&!a&&this._initted&&m===g)return this._tTime=h,this;m!==g&&(x&&this._yEase&&xl(x,y),this.vars.repeatRefresh&&!y&&!this._lock&&_!==p&&this._initted&&(this._lock=a=1,this.render(Me(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(il(this,d?r:_,a,s,h))return this._tTime=0,this;if(l!==this._time&&!(a&&this.vars.repeatRefresh&&m!==g))return this;if(u!==this._dur)return this.render(r,s,a)}if(this._tTime=h,this._time=_,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=w=(T||this._ease)(_/u),this._from&&(this.ratio=w=1-w),!l&&h&&!s&&!g&&(dt(this,"onStart"),this._tTime!==h))return this;for(f=this._pt;f;)f.r(w,f.d),f=f._next;x&&x.render(r<0?r:x._dur*x._ease(_/this._dur),s,a)||this._startAt&&(this._zTime=r),this._onUpdate&&!s&&(d&&Eo(this,r,s,a),dt(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!s&&this.parent&&dt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(d&&!this._onUpdate&&Eo(this,r,!0,!0),(r||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&nn(this,1),!s&&!(d&&!l)&&(h||l||y)&&(dt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h<c&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),i.prototype.invalidate.call(this,r)},t.resetTo=function(r,s,a,l,c){vr||ft.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||Oo(this,u),d=this._ease(u/this._dur),O_(this,r,s,a,l,d,u,c)?this.resetTo(r,s,a,l,1):(yi(this,0),this.parent||el(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,s){if(s===void 0&&(s="all"),!r&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Er(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ze),this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(r,s,sn&&sn.vars.overwrite!==!0)._first||Er(this),this.parent&&a!==this.timeline.totalDuration()&&Kn(this,this._dur*this.timeline._tDur/a,0,1),this}var l=this._targets,c=r?xt(r):l,u=this._ptLookup,d=this._pt,h,_,f,m,p,g,y;if((!s||s==="all")&&f_(l,c))return s==="all"&&(this._pt=0),Er(this);for(h=this._op=this._op||[],s!=="all"&&(Fe(s)&&(p={},et(s,function(w){return p[w]=1}),s=p),s=$_(l,s)),y=l.length;y--;)if(~c.indexOf(l[y])){_=u[y],s==="all"?(h[y]=s,m=_,f={}):(f=h[y]=h[y]||{},m=s);for(p in m)g=_&&_[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&mi(this,g,"_pt"),delete _[p]),f!=="all"&&(f[p]=1)}return this._initted&&!this._pt&&d&&Er(this),this},e.to=function(r,s){return new e(r,s,arguments[2])},e.from=function(r,s){return kr(1,arguments)},e.delayedCall=function(r,s,a,l){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:s,onReverseComplete:s,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:l})},e.fromTo=function(r,s,a){return kr(2,arguments)},e.set=function(r,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(r,s)},e.killTweensOf=function(r,s,a){return Ne.killTweensOf(r,s,a)},e}(Nr);ut(Oe.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),et("staggerTo,staggerFrom,staggerFromTo",function(i){Oe[i]=function(){var e=new Xe,t=vo.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var $o=function(e,t,n){return e[t]=n},vl=function(e,t,n){return e[t](n)},V_=function(e,t,n,r){return e[t](r.fp,n)},L_=function(e,t,n){return e.setAttribute(t,n)},Io=function(e,t){return Ae(e[t])?vl:ho(e[t])&&e.setAttribute?L_:$o},Nl=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},F_=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Ml=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Vo=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},z_=function(e,t,n,r){for(var s=this._pt,a;s;)a=s._next,s.p===r&&s.modifier(e,t,n),s=a},U_=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?mi(this,t,"_pt"):t.dep||(n=1),t=r;return!n},H_=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},Pl=function(e){for(var t=e._pt,n,r,s,a;t;){for(n=t._next,r=s;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:s=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=s},tt=function(){function i(t,n,r,s,a,l,c,u,d){this.t=n,this.s=s,this.c=a,this.p=r,this.r=l||Nl,this.d=c||this,this.set=u||$o,this.pr=d||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(n,r,s){this.mSet=this.mSet||this.set,this.set=H_,this.m=n,this.mt=s,this.tween=r},i}();et(ko+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return bo[i]=1}),lt.TweenMax=lt.TweenLite=Oe,lt.TimelineLite=lt.TimelineMax=Xe,Ne=new Xe({sortChildren:!1,defaults:Wn,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),at.stringFilter=bl;var En=[],bi={},q_=[],Al=0,W_=0,Lo=function(e){return(bi[e]||q_).map(function(t){return t()})},Fo=function(){var e=Date.now(),t=[];e-Al>2&&(Lo("matchMediaInit"),En.forEach(function(n){var r=n.queries,s=n.conditions,a,l,c,u;for(l in r)a=It.matchMedia(r[l]).matches,a&&(c=1),a!==s[l]&&(s[l]=a,u=1);u&&(n.revert(),c&&t.push(n))}),Lo("matchMediaRevert"),t.forEach(function(n){return n.onMatch(n,function(r){return n.add(null,r)})}),Al=e,Lo("matchMedia"))},Bl=function(){function i(t,n){this.selector=n&&No(n),this.data=[],this._r=[],this.isReverted=!1,this.id=W_++,t&&this.add(t)}var e=i.prototype;return e.add=function(n,r,s){Ae(n)&&(s=r,r=n,n=Ae);var a=this,l=function(){var u=ve,d=a.selector,h;return u&&u!==a&&u.data.push(a),s&&(a.selector=No(s)),ve=a,h=r.apply(a,arguments),Ae(h)&&a._r.push(h),ve=u,a.selector=d,a.isReverted=!1,h};return a.last=l,n===Ae?l(a,function(c){return a.add(null,c)}):n?a[n]=l:l},e.ignore=function(n){var r=ve;ve=null,n(this),ve=r},e.getTweens=function(){var n=[];return this.data.forEach(function(r){return r instanceof i?n.push.apply(n,r.getTweens()):r instanceof Oe&&!(r.parent&&r.parent.data==="nested")&&n.push(r)}),n},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(n,r){var s=this;if(n?function(){for(var l=s.getTweens(),c=s.data.length,u;c--;)u=s.data[c],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(d){return l.splice(l.indexOf(d),1)}));for(l.map(function(d){return{g:d._dur||d._delay||d._sat&&!d._sat.vars.immediateRender?d.globalTime(0):-1/0,t:d}}).sort(function(d,h){return h.g-d.g||-1/0}).forEach(function(d){return d.t.revert(n)}),c=s.data.length;c--;)u=s.data[c],u instanceof Xe?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof Oe)&&u.revert&&u.revert(n);s._r.forEach(function(d){return d(n,s)}),s.isReverted=!0}():this.data.forEach(function(l){return l.kill&&l.kill()}),this.clear(),r)for(var a=En.length;a--;)En[a].id===this.id&&En.splice(a,1)},e.revert=function(n){this.kill(n||{})},i}(),j_=function(){function i(t){this.contexts=[],this.scope=t,ve&&ve.data.push(this)}var e=i.prototype;return e.add=function(n,r,s){$t(n)||(n={matches:n});var a=new Bl(0,s||this.scope),l=a.conditions={},c,u,d;ve&&!a.selector&&(a.selector=ve.selector),this.contexts.push(a),r=a.add("onMatch",r),a.queries=n;for(u in n)u==="all"?d=1:(c=It.matchMedia(n[u]),c&&(En.indexOf(a)<0&&En.push(a),(l[u]=c.matches)&&(d=1),c.addListener?c.addListener(Fo):c.addEventListener("change",Fo)));return d&&r(a,function(h){return a.add(null,h)}),this},e.revert=function(n){this.kill(n||{})},e.kill=function(n){this.contexts.forEach(function(r){return r.kill(n,!0)})},i}(),wi={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(r){return ml(r)})},timeline:function(e){return new Xe(e)},getTweensOf:function(e,t){return Ne.getTweensOf(e,t)},getProperty:function(e,t,n,r){Fe(e)&&(e=xt(e)[0]);var s=xn(e||{}).get,a=n?Za:Ja;return n==="native"&&(n=""),e&&(t?a((ct[t]&&ct[t].get||s)(e,t,n,r)):function(l,c,u){return a((ct[l]&&ct[l].get||s)(e,l,c,u))})},quickSetter:function(e,t,n){if(e=xt(e),e.length>1){var r=e.map(function(d){return nt.quickSetter(d,t,n)}),s=r.length;return function(d){for(var h=s;h--;)r[h](d)}}e=e[0]||{};var a=ct[t],l=xn(e),c=l.harness&&(l.harness.aliases||{})[t]||t,u=a?function(d){var h=new a;Jn._pt=0,h.init(e,n?d+n:d,Jn,0,[e]),h.render(1,h),Jn._pt&&Vo(1,Jn)}:l.set(e,c);return a?u:function(d){return u(e,c,n?d+n:d,l,1)}},quickTo:function(e,t,n){var r,s=nt.to(e,ut((r={},r[t]="+=0.1",r.paused=!0,r.stagger=0,r),n||{})),a=function(c,u,d){return s.resetTo(t,c,u,d)};return a.tween=s,a},isTweening:function(e){return Ne.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Sn(e.ease,Wn.ease)),Qa(Wn,e||{})},config:function(e){return Qa(at,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,s=e.defaults,a=e.extendTimeline;(r||"").split(",").forEach(function(l){return l&&!ct[l]&&!lt[l]&&br(t+" effect requires "+l+" plugin.")}),xo[t]=function(l,c,u){return n(xt(l),ut(c||{},s),u)},a&&(Xe.prototype[t]=function(l,c,u){return this.add(xo[t](l,$t(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,t){de[e]=Sn(t)},parseEase:function(e,t){return arguments.length?Sn(e,t):de},getById:function(e){return Ne.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new Xe(e),r,s;for(n.smoothChildTiming=Qe(e.smoothChildTiming),Ne.remove(n),n._dp=0,n._time=n._tTime=Ne._time,r=Ne._first;r;)s=r._next,(t||!(!r._dur&&r instanceof Oe&&r.vars.onComplete===r._targets[0]))&&Vt(n,r,r._start-r._delay),r=s;return Vt(Ne,n,0),n},context:function(e,t){return e?new Bl(e,t):ve},matchMedia:function(e){return new j_(e)},matchMediaRefresh:function(){return En.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||Fo()},addEventListener:function(e,t){var n=bi[e]||(bi[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=bi[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:C_,wrapYoyo:E_,distribute:ll,random:ul,snap:cl,normalize:S_,getUnit:We,clamp:b_,splitColor:_l,toArray:xt,selector:No,mapRange:fl,pipe:x_,unitize:k_,interpolate:T_,shuffle:al},install:Wa,effects:xo,ticker:ft,updateRoot:Xe.updateRoot,plugins:ct,globalTimeline:Ne,core:{PropTween:tt,globals:ja,Tween:Oe,Timeline:Xe,Animation:Nr,getCache:xn,_removeLinkedListItem:mi,reverting:function(){return ze},context:function(e){return e&&ve&&(ve.data.push(e),e._ctx=ve),ve},suppressOverwrites:function(e){return uo=e}}};et("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return wi[i]=Oe[i]}),ft.add(Xe.updateRoot),Jn=wi.to({},{duration:0});var X_=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},Y_=function(e,t){var n=e._targets,r,s,a;for(r in t)for(s=n.length;s--;)a=e._ptLookup[s][r],a&&(a=a.d)&&(a._pt&&(a=X_(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[s],r))},zo=function(e,t){return{name:e,headless:1,rawVars:1,init:function(r,s,a){a._onInit=function(l){var c,u;if(Fe(s)&&(c={},et(s,function(d){return c[d]=1}),s=c),t){c={};for(u in s)c[u]=t(s[u]);s=c}Y_(l,s)}}}},nt=wi.registerPlugin({name:"attr",init:function(e,t,n,r,s){var a,l,c;this.tween=n;for(a in t)c=e.getAttribute(a)||"",l=this.add(e,"setAttribute",(c||0)+"",t[a],r,s,0,0,a),l.op=a,l.b=c,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)ze?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},zo("roundProps",Mo),zo("modifiers"),zo("snap",cl))||wi;Oe.version=Xe.version=nt.version="3.14.1",qa=1,po()&&Zn(),de.Power0,de.Power1,de.Power2,de.Power3,de.Power4,de.Linear,de.Quad,de.Cubic,de.Quart,de.Quint,de.Strong,de.Elastic,de.Back,de.SteppedEase,de.Bounce,de.Sine,de.Expo,de.Circ;/*!
14
- * CSSPlugin 3.14.1
15
- * https://gsap.com
16
- *
17
- * Copyright 2008-2025, GreenSock. All rights reserved.
18
- * Subject to the terms at https://gsap.com/standard-license
19
- * @author: Jack Doyle, jack@greensock.com
20
- */var Rl,an,Qn,Uo,Tn,Dl,Ho,G_=function(){return typeof window<"u"},Wt={},vn=180/Math.PI,er=Math.PI/180,tr=Math.atan2,Ol=1e8,qo=/([A-Z])/g,K_=/(left|right|width|margin|padding|x)/i,J_=/[\s,\(]\S/,Lt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Wo=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Z_=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Q_=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},e0=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},t0=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},$l=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Il=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},n0=function(e,t,n){return e.style[t]=n},r0=function(e,t,n){return e.style.setProperty(t,n)},i0=function(e,t,n){return e._gsap[t]=n},o0=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},s0=function(e,t,n,r,s){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(s,a)},a0=function(e,t,n,r,s){var a=e._gsap;a[t]=n,a.renderTransform(s,a)},Pe="transform",rt=Pe+"Origin",l0=function i(e,t){var n=this,r=this.target,s=r.style,a=r._gsap;if(e in Wt&&s){if(this.tfm=this.tfm||{},e!=="transform")e=Lt[e]||e,~e.indexOf(",")?e.split(",").forEach(function(l){return n.tfm[l]=jt(r,l)}):this.tfm[e]=a.x?a[e]:jt(r,e),e===rt&&(this.tfm.zOrigin=a.zOrigin);else return Lt.transform.split(",").forEach(function(l){return i.call(n,l,t)});if(this.props.indexOf(Pe)>=0)return;a.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(rt,t,"")),e=Pe}(s||t)&&this.props.push(e,t,s[e])},Vl=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},c0=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,s,a;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?t[e[s]](e[s+2]):t[e[s]]=e[s+2]:e[s+2]?n[e[s]]=e[s+2]:n.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(qo,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=Ho(),(!s||!s.isStart)&&!n[Pe]&&(Vl(n),r.zOrigin&&n[rt]&&(n[rt]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},Ll=function(e,t){var n={target:e,props:[],revert:c0,save:l0};return e._gsap||nt.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(r){return n.save(r)}),n},Fl,jo=function(e,t){var n=an.createElementNS?an.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):an.createElement(e);return n&&n.style?n:an.createElement(e)},ht=function i(e,t,n){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(qo,"-$1").toLowerCase())||r.getPropertyValue(t)||!n&&i(e,nr(t)||t,1)||""},zl="O,Moz,ms,Ms,Webkit".split(","),nr=function(e,t,n){var r=t||Tn,s=r.style,a=5;if(e in s&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(zl[a]+e in s););return a<0?null:(a===3?"ms":a>=0?zl[a]:"")+e},Xo=function(){G_()&&window.document&&(Rl=window,an=Rl.document,Qn=an.documentElement,Tn=jo("div")||{style:{}},jo("div"),Pe=nr(Pe),rt=Pe+"Origin",Tn.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Fl=!!nr("perspective"),Ho=nt.core.reverting,Uo=1)},Ul=function(e){var t=e.ownerSVGElement,n=jo("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=e.cloneNode(!0),s;r.style.display="block",n.appendChild(r),Qn.appendChild(n);try{s=r.getBBox()}catch{}return n.removeChild(r),Qn.removeChild(n),s},Hl=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},ql=function(e){var t,n;try{t=e.getBBox()}catch{t=Ul(e),n=1}return t&&(t.width||t.height)||n||(t=Ul(e)),t&&!t.width&&!t.x&&!t.y?{x:+Hl(e,["x","cx","x1"])||0,y:+Hl(e,["y","cy","y1"])||0,width:0,height:0}:t},Wl=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&ql(e))},ln=function(e,t){if(t){var n=e.style,r;t in Wt&&t!==rt&&(t=Pe),n.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(r==="--"?t:t.replace(qo,"-$1").toLowerCase())):n.removeAttribute(t)}},cn=function(e,t,n,r,s,a){var l=new tt(e._pt,t,n,0,1,a?Il:$l);return e._pt=l,l.b=r,l.e=s,e._props.push(n),l},jl={deg:1,rad:1,turn:1},u0={grid:1,flex:1},un=function i(e,t,n,r){var s=parseFloat(n)||0,a=(n+"").trim().substr((s+"").length)||"px",l=Tn.style,c=K_.test(t),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(c?"Width":"Height"),h=100,_=r==="px",f=r==="%",m,p,g,y;if(r===a||!s||jl[r]||jl[a])return s;if(a!=="px"&&!_&&(s=i(e,t,n,"px")),y=e.getCTM&&Wl(e),(f||a==="%")&&(Wt[t]||~t.indexOf("adius")))return m=y?e.getBBox()[c?"width":"height"]:e[d],Be(f?s/m*h:s/100*m);if(l[c?"width":"height"]=h+(_?a:r),p=r!=="rem"&&~t.indexOf("adius")||r==="em"&&e.appendChild&&!u?e:e.parentNode,y&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===an||!p.appendChild)&&(p=an.body),g=p._gsap,g&&f&&g.width&&c&&g.time===ft.time&&!g.uncache)return Be(s/g.width*h);if(f&&(t==="height"||t==="width")){var w=e.style[t];e.style[t]=h+r,m=e[d],w?e.style[t]=w:ln(e,t)}else(f||a==="%")&&!u0[ht(p,"display")]&&(l.position=ht(e,"position")),p===e&&(l.position="static"),p.appendChild(Tn),m=Tn[d],p.removeChild(Tn),l.position="absolute";return c&&f&&(g=xn(p),g.time=ft.time,g.width=p[d]),Be(_?m*s/h:m&&s?h/m*s:0)},jt=function(e,t,n,r){var s;return Uo||Xo(),t in Lt&&t!=="transform"&&(t=Lt[t],~t.indexOf(",")&&(t=t.split(",")[0])),Wt[t]&&t!=="transform"?(s=Ar(e,r),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:ki(ht(e,rt))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||r||~(s+"").indexOf("calc("))&&(s=xi[t]&&xi[t](e,t,n)||ht(e,t)||Ga(e,t)||(t==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?un(e,t,s,n)+n:s},d0=function(e,t,n,r){if(!n||n==="none"){var s=nr(t,e,1),a=s&&ht(e,s,1);a&&a!==n?(t=s,n=a):t==="borderColor"&&(n=ht(e,"borderTopColor"))}var l=new tt(this._pt,e.style,t,0,1,Ml),c=0,u=0,d,h,_,f,m,p,g,y,w,x,T,S;if(l.b=n,l.e=r,n+="",r+="",r.substring(0,6)==="var(--"&&(r=ht(e,r.substring(4,r.indexOf(")")))),r==="auto"&&(p=e.style[t],e.style[t]=r,r=ht(e,t)||r,p?e.style[t]=p:ln(e,t)),d=[n,r],bl(d),n=d[0],r=d[1],_=n.match(jn)||[],S=r.match(jn)||[],S.length){for(;h=jn.exec(r);)g=h[0],w=r.substring(c,h.index),m?m=(m+1)%5:(w.substr(-5)==="rgba("||w.substr(-5)==="hsla(")&&(m=1),g!==(p=_[u++]||"")&&(f=parseFloat(p)||0,T=p.substr((f+"").length),g.charAt(1)==="="&&(g=Xn(f,g)+T),y=parseFloat(g),x=g.substr((y+"").length),c=jn.lastIndex-x.length,x||(x=x||at.units[t]||T,c===r.length&&(r+=x,l.e+=x)),T!==x&&(f=un(e,t,p,x)||0),l._pt={_next:l._pt,p:w||u===1?w:",",s:f,c:y-f,m:m&&m<4||t==="zIndex"?Math.round:0});l.c=c<r.length?r.substring(c,r.length):""}else l.r=t==="display"&&r==="none"?Il:$l;return Ha.test(r)&&(l.e=0),this._pt=l,l},Xl={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},f0=function(e){var t=e.split(" "),n=t[0],r=t[1]||"50%";return(n==="top"||n==="bottom"||r==="left"||r==="right")&&(e=n,n=r,r=e),t[0]=Xl[n]||n,t[1]=Xl[r]||r,t.join(" ")},h0=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,s=t.u,a=n._gsap,l,c,u;if(s==="all"||s===!0)r.cssText="",c=1;else for(s=s.split(","),u=s.length;--u>-1;)l=s[u],Wt[l]&&(c=1,l=l==="transformOrigin"?rt:Pe),ln(n,l);c&&(ln(n,Pe),a&&(a.svg&&n.removeAttribute("transform"),r.scale=r.rotate=r.translate="none",Ar(n,1),a.uncache=1,Vl(r)))}},xi={clearProps:function(e,t,n,r,s){if(s.data!=="isFromStart"){var a=e._pt=new tt(e._pt,t,n,0,0,h0);return a.u=r,a.pr=-10,a.tween=s,e._props.push(n),1}}},Pr=[1,0,0,1,0,0],Yl={},Gl=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Kl=function(e){var t=ht(e,Pe);return Gl(t)?Pr:t.substr(7).match(Ua).map(Be)},Yo=function(e,t){var n=e._gsap||xn(e),r=e.style,s=Kl(e),a,l,c,u;return n.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,s=[c.a,c.b,c.c,c.d,c.e,c.f],s.join(",")==="1,0,0,1,0,0"?Pr:s):(s===Pr&&!e.offsetParent&&e!==Qn&&!n.svg&&(c=r.display,r.display="block",a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,l=e.nextElementSibling,Qn.appendChild(e)),s=Kl(e),c?r.display=c:ln(e,"display"),u&&(l?a.insertBefore(e,l):a?a.appendChild(e):Qn.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Go=function(e,t,n,r,s,a){var l=e._gsap,c=s||Yo(e,!0),u=l.xOrigin||0,d=l.yOrigin||0,h=l.xOffset||0,_=l.yOffset||0,f=c[0],m=c[1],p=c[2],g=c[3],y=c[4],w=c[5],x=t.split(" "),T=parseFloat(x[0])||0,S=parseFloat(x[1])||0,B,k,b,C;n?c!==Pr&&(k=f*g-m*p)&&(b=T*(g/k)+S*(-p/k)+(p*w-g*y)/k,C=T*(-m/k)+S*(f/k)-(f*w-m*y)/k,T=b,S=C):(B=ql(e),T=B.x+(~x[0].indexOf("%")?T/100*B.width:T),S=B.y+(~(x[1]||x[0]).indexOf("%")?S/100*B.height:S)),r||r!==!1&&l.smooth?(y=T-u,w=S-d,l.xOffset=h+(y*f+w*p)-y,l.yOffset=_+(y*m+w*g)-w):l.xOffset=l.yOffset=0,l.xOrigin=T,l.yOrigin=S,l.smooth=!!r,l.origin=t,l.originIsAbsolute=!!n,e.style[rt]="0px 0px",a&&(cn(a,l,"xOrigin",u,T),cn(a,l,"yOrigin",d,S),cn(a,l,"xOffset",h,l.xOffset),cn(a,l,"yOffset",_,l.yOffset)),e.setAttribute("data-svg-origin",T+" "+S)},Ar=function(e,t){var n=e._gsap||new Sl(e);if("x"in n&&!t&&!n.uncache)return n;var r=e.style,s=n.scaleX<0,a="px",l="deg",c=getComputedStyle(e),u=ht(e,rt)||"0",d,h,_,f,m,p,g,y,w,x,T,S,B,k,b,C,P,O,H,R,N,E,M,A,$,V,F,z,W,Z,K,ue;return d=h=_=p=g=y=w=x=T=0,f=m=1,n.svg=!!(e.getCTM&&Wl(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(r[Pe]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[Pe]!=="none"?c[Pe]:"")),r.scale=r.rotate=r.translate="none"),k=Yo(e,n.svg),n.svg&&(n.uncache?($=e.getBBox(),u=n.xOrigin-$.x+"px "+(n.yOrigin-$.y)+"px",A=""):A=!t&&e.getAttribute("data-svg-origin"),Go(e,A||u,!!A||n.originIsAbsolute,n.smooth!==!1,k)),S=n.xOrigin||0,B=n.yOrigin||0,k!==Pr&&(O=k[0],H=k[1],R=k[2],N=k[3],d=E=k[4],h=M=k[5],k.length===6?(f=Math.sqrt(O*O+H*H),m=Math.sqrt(N*N+R*R),p=O||H?tr(H,O)*vn:0,w=R||N?tr(R,N)*vn+p:0,w&&(m*=Math.abs(Math.cos(w*er))),n.svg&&(d-=S-(S*O+B*R),h-=B-(S*H+B*N))):(ue=k[6],Z=k[7],F=k[8],z=k[9],W=k[10],K=k[11],d=k[12],h=k[13],_=k[14],b=tr(ue,W),g=b*vn,b&&(C=Math.cos(-b),P=Math.sin(-b),A=E*C+F*P,$=M*C+z*P,V=ue*C+W*P,F=E*-P+F*C,z=M*-P+z*C,W=ue*-P+W*C,K=Z*-P+K*C,E=A,M=$,ue=V),b=tr(-R,W),y=b*vn,b&&(C=Math.cos(-b),P=Math.sin(-b),A=O*C-F*P,$=H*C-z*P,V=R*C-W*P,K=N*P+K*C,O=A,H=$,R=V),b=tr(H,O),p=b*vn,b&&(C=Math.cos(b),P=Math.sin(b),A=O*C+H*P,$=E*C+M*P,H=H*C-O*P,M=M*C-E*P,O=A,E=$),g&&Math.abs(g)+Math.abs(p)>359.9&&(g=p=0,y=180-y),f=Be(Math.sqrt(O*O+H*H+R*R)),m=Be(Math.sqrt(M*M+ue*ue)),b=tr(E,M),w=Math.abs(b)>2e-4?b*vn:0,T=K?1/(K<0?-K:K):0),n.svg&&(A=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!Gl(ht(e,Pe)),A&&e.setAttribute("transform",A))),Math.abs(w)>90&&Math.abs(w)<270&&(s?(f*=-1,w+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,w+=w<=0?180:-180)),t=t||n.uncache,n.x=d-((n.xPercent=d&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-d)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=h-((n.yPercent=h&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=_+a,n.scaleX=Be(f),n.scaleY=Be(m),n.rotation=Be(p)+l,n.rotationX=Be(g)+l,n.rotationY=Be(y)+l,n.skewX=w+l,n.skewY=x+l,n.transformPerspective=T+a,(n.zOrigin=parseFloat(u.split(" ")[2])||!t&&n.zOrigin||0)&&(r[rt]=ki(u)),n.xOffset=n.yOffset=0,n.force3D=at.force3D,n.renderTransform=n.svg?m0:Fl?Jl:p0,n.uncache=0,n},ki=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ko=function(e,t,n){var r=We(t);return Be(parseFloat(t)+parseFloat(un(e,"x",n+"px",r)))+r},p0=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Jl(e,t)},Nn="0deg",Br="0px",Mn=") ",Jl=function(e,t){var n=t||this,r=n.xPercent,s=n.yPercent,a=n.x,l=n.y,c=n.z,u=n.rotation,d=n.rotationY,h=n.rotationX,_=n.skewX,f=n.skewY,m=n.scaleX,p=n.scaleY,g=n.transformPerspective,y=n.force3D,w=n.target,x=n.zOrigin,T="",S=y==="auto"&&e&&e!==1||y===!0;if(x&&(h!==Nn||d!==Nn)){var B=parseFloat(d)*er,k=Math.sin(B),b=Math.cos(B),C;B=parseFloat(h)*er,C=Math.cos(B),a=Ko(w,a,k*C*-x),l=Ko(w,l,-Math.sin(B)*-x),c=Ko(w,c,b*C*-x+x)}g!==Br&&(T+="perspective("+g+Mn),(r||s)&&(T+="translate("+r+"%, "+s+"%) "),(S||a!==Br||l!==Br||c!==Br)&&(T+=c!==Br||S?"translate3d("+a+", "+l+", "+c+") ":"translate("+a+", "+l+Mn),u!==Nn&&(T+="rotate("+u+Mn),d!==Nn&&(T+="rotateY("+d+Mn),h!==Nn&&(T+="rotateX("+h+Mn),(_!==Nn||f!==Nn)&&(T+="skew("+_+", "+f+Mn),(m!==1||p!==1)&&(T+="scale("+m+", "+p+Mn),w.style[Pe]=T||"translate(0, 0)"},m0=function(e,t){var n=t||this,r=n.xPercent,s=n.yPercent,a=n.x,l=n.y,c=n.rotation,u=n.skewX,d=n.skewY,h=n.scaleX,_=n.scaleY,f=n.target,m=n.xOrigin,p=n.yOrigin,g=n.xOffset,y=n.yOffset,w=n.forceCSS,x=parseFloat(a),T=parseFloat(l),S,B,k,b,C;c=parseFloat(c),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,c+=d),c||u?(c*=er,u*=er,S=Math.cos(c)*h,B=Math.sin(c)*h,k=Math.sin(c-u)*-_,b=Math.cos(c-u)*_,u&&(d*=er,C=Math.tan(u-d),C=Math.sqrt(1+C*C),k*=C,b*=C,d&&(C=Math.tan(d),C=Math.sqrt(1+C*C),S*=C,B*=C)),S=Be(S),B=Be(B),k=Be(k),b=Be(b)):(S=h,b=_,B=k=0),(x&&!~(a+"").indexOf("px")||T&&!~(l+"").indexOf("px"))&&(x=un(f,"x",a,"px"),T=un(f,"y",l,"px")),(m||p||g||y)&&(x=Be(x+m-(m*S+p*k)+g),T=Be(T+p-(m*B+p*b)+y)),(r||s)&&(C=f.getBBox(),x=Be(x+r/100*C.width),T=Be(T+s/100*C.height)),C="matrix("+S+","+B+","+k+","+b+","+x+","+T+")",f.setAttribute("transform",C),w&&(f.style[Pe]=C)},_0=function(e,t,n,r,s){var a=360,l=Fe(s),c=parseFloat(s)*(l&&~s.indexOf("rad")?vn:1),u=c-r,d=r+u+"deg",h,_;return l&&(h=s.split("_")[1],h==="short"&&(u%=a,u!==u%(a/2)&&(u+=u<0?a:-a)),h==="cw"&&u<0?u=(u+a*Ol)%a-~~(u/a)*a:h==="ccw"&&u>0&&(u=(u-a*Ol)%a-~~(u/a)*a)),e._pt=_=new tt(e._pt,t,n,r,u,Z_),_.e=d,_.u="deg",e._props.push(n),_},Zl=function(e,t){for(var n in t)e[n]=t[n];return e},g0=function(e,t,n){var r=Zl({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",a=n.style,l,c,u,d,h,_,f,m;r.svg?(u=n.getAttribute("transform"),n.setAttribute("transform",""),a[Pe]=t,l=Ar(n,1),ln(n,Pe),n.setAttribute("transform",u)):(u=getComputedStyle(n)[Pe],a[Pe]=t,l=Ar(n,1),a[Pe]=u);for(c in Wt)u=r[c],d=l[c],u!==d&&s.indexOf(c)<0&&(f=We(u),m=We(d),h=f!==m?un(n,c,u,m):parseFloat(u),_=parseFloat(d),e._pt=new tt(e._pt,l,c,h,_-h,Wo),e._pt.u=m||0,e._props.push(c));Zl(l,r)};et("padding,margin,Width,Radius",function(i,e){var t="Top",n="Right",r="Bottom",s="Left",a=(e<3?[t,n,r,s]:[t+s,t+n,r+n,r+s]).map(function(l){return e<2?i+l:"border"+l+i});xi[e>1?"border"+i:i]=function(l,c,u,d,h){var _,f;if(arguments.length<4)return _=a.map(function(m){return jt(l,m,u)}),f=_.join(" "),f.split(_[0]).length===5?_[0]:f;_=(d+"").split(" "),f={},a.forEach(function(m,p){return f[m]=_[p]=_[p]||_[(p-1)/2|0]}),l.init(c,f,h)}});var Ql={name:"css",register:Xo,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,s){var a=this._props,l=e.style,c=n.vars.startAt,u,d,h,_,f,m,p,g,y,w,x,T,S,B,k,b,C;Uo||Xo(),this.styles=this.styles||Ll(e),b=this.styles.props,this.tween=n;for(p in t)if(p!=="autoRound"&&(d=t[p],!(ct[p]&&Cl(p,t,n,r,e,s)))){if(f=typeof d,m=xi[p],f==="function"&&(d=d.call(n,r,e,s),f=typeof d),f==="string"&&~d.indexOf("random(")&&(d=Cr(d)),m)m(this,e,p,d,n)&&(k=1);else if(p.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(p)+"").trim(),d+="",on.lastIndex=0,on.test(u)||(g=We(u),y=We(d),y?g!==y&&(u=un(e,p,u,y)+y):g&&(d+=g)),this.add(l,"setProperty",u,d,r,s,0,0,p),a.push(p),b.push(p,0,l[p]);else if(f!=="undefined"){if(c&&p in c?(u=typeof c[p]=="function"?c[p].call(n,r,e,s):c[p],Fe(u)&&~u.indexOf("random(")&&(u=Cr(u)),We(u+"")||u==="auto"||(u+=at.units[p]||We(jt(e,p))||""),(u+"").charAt(1)==="="&&(u=jt(e,p))):u=jt(e,p),_=parseFloat(u),w=f==="string"&&d.charAt(1)==="="&&d.substr(0,2),w&&(d=d.substr(2)),h=parseFloat(d),p in Lt&&(p==="autoAlpha"&&(_===1&&jt(e,"visibility")==="hidden"&&h&&(_=0),b.push("visibility",0,l.visibility),cn(this,l,"visibility",_?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=Lt[p],~p.indexOf(",")&&(p=p.split(",")[0]))),x=p in Wt,x){if(this.styles.save(p),C=d,f==="string"&&d.substring(0,6)==="var(--"){if(d=ht(e,d.substring(4,d.indexOf(")"))),d.substring(0,5)==="calc("){var P=e.style.perspective;e.style.perspective=d,d=ht(e,"perspective"),P?e.style.perspective=P:ln(e,"perspective")}h=parseFloat(d)}if(T||(S=e._gsap,S.renderTransform&&!t.parseTransform||Ar(e,t.parseTransform),B=t.smoothOrigin!==!1&&S.smooth,T=this._pt=new tt(this._pt,l,Pe,0,1,S.renderTransform,S,0,-1),T.dep=1),p==="scale")this._pt=new tt(this._pt,S,"scaleY",S.scaleY,(w?Xn(S.scaleY,w+h):h)-S.scaleY||0,Wo),this._pt.u=0,a.push("scaleY",p),p+="X";else if(p==="transformOrigin"){b.push(rt,0,l[rt]),d=f0(d),S.svg?Go(e,d,0,B,0,this):(y=parseFloat(d.split(" ")[2])||0,y!==S.zOrigin&&cn(this,S,"zOrigin",S.zOrigin,y),cn(this,l,p,ki(u),ki(d)));continue}else if(p==="svgOrigin"){Go(e,d,1,B,0,this);continue}else if(p in Yl){_0(this,S,p,_,w?Xn(_,w+d):d);continue}else if(p==="smoothOrigin"){cn(this,S,"smooth",S.smooth,d);continue}else if(p==="force3D"){S[p]=d;continue}else if(p==="transform"){g0(this,d,e);continue}}else p in l||(p=nr(p)||p);if(x||(h||h===0)&&(_||_===0)&&!J_.test(d)&&p in l)g=(u+"").substr((_+"").length),h||(h=0),y=We(d)||(p in at.units?at.units[p]:g),g!==y&&(_=un(e,p,u,y)),this._pt=new tt(this._pt,x?S:l,p,_,(w?Xn(_,w+h):h)-_,!x&&(y==="px"||p==="zIndex")&&t.autoRound!==!1?t0:Wo),this._pt.u=y||0,x&&C!==d?(this._pt.b=u,this._pt.e=C,this._pt.r=e0):g!==y&&y!=="%"&&(this._pt.b=u,this._pt.r=Q_);else if(p in l)d0.call(this,e,p,u,w?w+d:d);else if(p in e)this.add(e,p,u||e[p],w?w+d:d,r,s);else if(p!=="parseTransform"){yo(p,d);continue}x||(p in l?b.push(p,0,l[p]):typeof e[p]=="function"?b.push(p,2,e[p]()):b.push(p,1,u||e[p])),a.push(p)}}k&&Pl(this)},render:function(e,t){if(t.tween._time||!Ho())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:jt,aliases:Lt,getSetter:function(e,t,n){var r=Lt[t];return r&&r.indexOf(",")<0&&(t=r),t in Wt&&t!==rt&&(e._gsap.x||jt(e,"x"))?n&&Dl===n?t==="scale"?o0:i0:(Dl=n||{})&&(t==="scale"?s0:a0):e.style&&!ho(e.style[t])?n0:~t.indexOf("-")?r0:Io(e,t)},core:{_removeProperty:ln,_getMatrix:Yo}};nt.utils.checkPrefix=nr,nt.core.getStyleSaver=Ll,function(i,e,t,n){var r=et(i+","+e+","+t,function(s){Wt[s]=1});et(e,function(s){at.units[s]="deg",Yl[s]=1}),Lt[r[13]]=i+","+e,et(n,function(s){var a=s.split(":");Lt[a[1]]=r[a[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),et("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){at.units[i]="px"}),nt.registerPlugin(Ql);var Xt=nt.registerPlugin(Ql)||nt;Xt.core.Tween;/*!
21
- * matrix 3.14.1
22
- * https://gsap.com
23
- *
24
- * Copyright 2008-2025, GreenSock. All rights reserved.
25
- * Subject to the terms at https://gsap.com/standard-license
26
- * @author: Jack Doyle, jack@greensock.com
27
- */var Yt,Pn,Jo,Si,Rr,Ci,Ei,Dr,Pt="transform",Zo=Pt+"Origin",ec,tc=function(e){var t=e.ownerDocument||e;for(!(Pt in e.style)&&("msTransform"in e.style)&&(Pt="msTransform",Zo=Pt+"Origin");t.parentNode&&(t=t.parentNode););if(Pn=window,Ei=new An,t){Yt=t,Jo=t.documentElement,Si=t.body,Dr=Yt.createElementNS("http://www.w3.org/2000/svg","g"),Dr.style.transform="none";var n=t.createElement("div"),r=t.createElement("div"),s=t&&(t.body||t.firstElementChild);s&&s.appendChild&&(s.appendChild(n),n.appendChild(r),n.style.position="static",n.style.transform="translate3d(0,0,1px)",ec=r.offsetParent!==n,s.removeChild(n))}return t},y0=function(e){for(var t,n;e&&e!==Si;)n=e._gsap,n&&n.uncache&&n.get(e,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),t?t.push(n):t=[n]),e=e.parentNode;return t},nc=[],rc=[],b0=function(){return Pn.pageYOffset||Yt.scrollTop||Jo.scrollTop||Si.scrollTop||0},w0=function(){return Pn.pageXOffset||Yt.scrollLeft||Jo.scrollLeft||Si.scrollLeft||0},Qo=function(e){return e.ownerSVGElement||((e.tagName+"").toLowerCase()==="svg"?e:null)},x0=function i(e){if(Pn.getComputedStyle(e).position==="fixed")return!0;if(e=e.parentNode,e&&e.nodeType===1)return i(e)},es=function i(e,t){if(e.parentNode&&(Yt||tc(e))){var n=Qo(e),r=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s=n?t?"rect":"g":"div",a=t!==2?0:100,l=t===3?100:0,c={position:"absolute",display:"block",pointerEvents:"none",margin:"0",padding:"0"},u=Yt.createElementNS?Yt.createElementNS(r.replace(/^https/,"http"),s):Yt.createElement(s);return t&&(n?(Ci||(Ci=i(e)),u.setAttribute("width",.01),u.setAttribute("height",.01),u.setAttribute("transform","translate("+a+","+l+")"),u.setAttribute("fill","transparent"),Ci.appendChild(u)):(Rr||(Rr=i(e),Object.assign(Rr.style,c)),Object.assign(u.style,c,{width:"0.1px",height:"0.1px",top:l+"px",left:a+"px"}),Rr.appendChild(u))),u}throw"Need document and parent."},k0=function(e){for(var t=new An,n=0;n<e.numberOfItems;n++)t.multiply(e.getItem(n).matrix);return t},S0=function(e){var t=e.getCTM(),n;return t||(n=e.style[Pt],e.style[Pt]="none",e.appendChild(Dr),t=Dr.getCTM(),e.removeChild(Dr),n?e.style[Pt]=n:e.style.removeProperty(Pt.replace(/([A-Z])/g,"-$1").toLowerCase())),t||Ei.clone()},C0=function(e,t){var n=Qo(e),r=e===n,s=n?nc:rc,a=e.parentNode,l=a&&!n&&a.shadowRoot&&a.shadowRoot.appendChild?a.shadowRoot:a,c,u,d,h,_,f;if(e===Pn)return e;if(s.length||s.push(es(e,1),es(e,2),es(e,3)),c=n?Ci:Rr,n)r?(d=S0(e),h=-d.e/d.a,_=-d.f/d.d,u=Ei):e.getBBox?(d=e.getBBox(),u=e.transform?e.transform.baseVal:{},u=u.numberOfItems?u.numberOfItems>1?k0(u):u.getItem(0).matrix:Ei,h=u.a*d.x+u.c*d.y,_=u.b*d.x+u.d*d.y):(u=new An,h=_=0),(r||!e.getBoundingClientRect().width?n:a).appendChild(c),c.setAttribute("transform","matrix("+u.a+","+u.b+","+u.c+","+u.d+","+(u.e+h)+","+(u.f+_)+")");else{if(h=_=0,ec)for(u=e.offsetParent,d=e;d&&(d=d.parentNode)&&d!==u&&d.parentNode;)(Pn.getComputedStyle(d)[Pt]+"").length>4&&(h=d.offsetLeft,_=d.offsetTop,d=0);if(f=Pn.getComputedStyle(e),f.position!=="absolute"&&f.position!=="fixed")for(u=e.offsetParent;a&&a!==u;)h+=a.scrollLeft||0,_+=a.scrollTop||0,a=a.parentNode;d=c.style,d.top=e.offsetTop-_+"px",d.left=e.offsetLeft-h+"px",d[Pt]=f[Pt],d[Zo]=f[Zo],d.position=f.position==="fixed"?"fixed":"absolute",l.appendChild(c)}return c},ts=function(e,t,n,r,s,a,l){return e.a=t,e.b=n,e.c=r,e.d=s,e.e=a,e.f=l,e},An=function(){function i(t,n,r,s,a,l){t===void 0&&(t=1),n===void 0&&(n=0),r===void 0&&(r=0),s===void 0&&(s=1),a===void 0&&(a=0),l===void 0&&(l=0),ts(this,t,n,r,s,a,l)}var e=i.prototype;return e.inverse=function(){var n=this.a,r=this.b,s=this.c,a=this.d,l=this.e,c=this.f,u=n*a-r*s||1e-10;return ts(this,a/u,-r/u,-s/u,n/u,(s*c-a*l)/u,-(n*c-r*l)/u)},e.multiply=function(n){var r=this.a,s=this.b,a=this.c,l=this.d,c=this.e,u=this.f,d=n.a,h=n.c,_=n.b,f=n.d,m=n.e,p=n.f;return ts(this,d*r+_*a,d*s+_*l,h*r+f*a,h*s+f*l,c+m*r+p*a,u+m*s+p*l)},e.clone=function(){return new i(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(n){var r=this.a,s=this.b,a=this.c,l=this.d,c=this.e,u=this.f;return r===n.a&&s===n.b&&a===n.c&&l===n.d&&c===n.e&&u===n.f},e.apply=function(n,r){r===void 0&&(r={});var s=n.x,a=n.y,l=this.a,c=this.b,u=this.c,d=this.d,h=this.e,_=this.f;return r.x=s*l+a*u+h||0,r.y=s*c+a*d+_||0,r},i}();function Bn(i,e,t,n){if(!i||!i.parentNode||(Yt||tc(i)).documentElement===i)return new An;var r=y0(i),s=Qo(i),a=s?nc:rc,l=C0(i),c=a[0].getBoundingClientRect(),u=a[1].getBoundingClientRect(),d=a[2].getBoundingClientRect(),h=l.parentNode,_=x0(i),f=new An((u.left-c.left)/100,(u.top-c.top)/100,(d.left-c.left)/100,(d.top-c.top)/100,c.left+(_?0:w0()),c.top+(_?0:b0()));if(h.removeChild(l),r)for(c=r.length;c--;)u=r[c],u.scaleX=u.scaleY=0,u.renderTransform(1,u);return e?f.inverse():f}function ic(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function E0(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var fe,Ee,pt,At,Gt,ns,Kt,rs,Or,dn,oc,is,$r,os,Ir,mt,Vr,Ti,sc,ss,vi=0,ac=function(){return typeof window<"u"},lc=function(){return fe||ac()&&(fe=window.gsap)&&fe.registerPlugin&&fe},fn=function(e){return typeof e=="function"},Lr=function(e){return typeof e=="object"},Bt=function(e){return typeof e>"u"},Ni=function(){return!1},Fr="transform",as="transformOrigin",Ye=function(e){return Math.round(e*1e4)/1e4},zr=Array.isArray,Mi=function(e,t){var n=pt.createElementNS?pt.createElementNS("http://www.w3.org/1999/xhtml".replace(/^https/,"http"),e):pt.createElement(e);return n.style?n:pt.createElement(e)},cc=180/Math.PI,Rn=1e20,T0=new An,hn=Date.now||function(){return new Date().getTime()},Dn=[],rr={},v0=0,N0=/^(?:a|input|textarea|button|select)$/i,uc=0,ir={},Jt={},dc=function(e,t){var n={},r;for(r in e)n[r]=t?e[r]*t:e[r];return n},M0=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},fc=function i(e,t){for(var n=e.length,r;n--;)t?e[n].style.touchAction=t:e[n].style.removeProperty("touch-action"),r=e[n].children,r&&r.length&&i(r,t)},hc=function(){return Dn.forEach(function(e){return e()})},P0=function(e){Dn.push(e),Dn.length===1&&fe.ticker.add(hc)},pc=function(){return!Dn.length&&fe.ticker.remove(hc)},mc=function(e){for(var t=Dn.length;t--;)Dn[t]===e&&Dn.splice(t,1);fe.to(pc,{overwrite:!0,delay:15,duration:0,onComplete:pc,data:"_draggable"})},A0=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Ve=function(e,t,n,r){if(e.addEventListener){var s=$r[t];r=r||(oc?{passive:!1}:null),e.addEventListener(s||t,n,r),s&&t!==s&&e.addEventListener(t,n,r)}},$e=function(e,t,n,r){if(e.removeEventListener){var s=$r[t];e.removeEventListener(s||t,n,r),s&&t!==s&&e.removeEventListener(t,n,r)}},kt=function(e){e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation()},B0=function(e,t){for(var n=e.length;n--;)if(e[n].identifier===t)return!0},R0=function i(e){os=e.touches&&vi<e.touches.length,$e(e.target,"touchend",i)},_c=function(e){os=e.touches&&vi<e.touches.length,Ve(e.target,"touchend",R0)},or=function(e){return Ee.pageYOffset||e.scrollTop||e.documentElement.scrollTop||e.body.scrollTop||0},sr=function(e){return Ee.pageXOffset||e.scrollLeft||e.documentElement.scrollLeft||e.body.scrollLeft||0},gc=function i(e,t){Ve(e,"scroll",t),ar(e.parentNode)||i(e.parentNode,t)},yc=function i(e,t){$e(e,"scroll",t),ar(e.parentNode)||i(e.parentNode,t)},ar=function(e){return!e||e===At||e.nodeType===9||e===pt.body||e===Ee||!e.nodeType||!e.parentNode},bc=function(e,t){var n=t==="x"?"Width":"Height",r="scroll"+n,s="client"+n;return Math.max(0,ar(e)?Math.max(At[r],Gt[r])-(Ee["inner"+n]||At[s]||Gt[s]):e[r]-e[s])},ls=function i(e,t){var n=bc(e,"x"),r=bc(e,"y");ar(e)?e=Jt:i(e.parentNode,t),e._gsMaxScrollX=n,e._gsMaxScrollY=r,t||(e._gsScrollX=e.scrollLeft||0,e._gsScrollY=e.scrollTop||0)},cs=function(e,t,n){var r=e.style;r&&(Bt(r[t])&&(t=Or(t,e)||t),n==null?r.removeProperty&&r.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):r[t]=n)},Ur=function(e){return Ee.getComputedStyle(e instanceof Element?e:e.host||(e.parentNode||{}).host||e)},On={},lr=function(e){if(e===Ee)return On.left=On.top=0,On.width=On.right=At.clientWidth||e.innerWidth||Gt.clientWidth||0,On.height=On.bottom=(e.innerHeight||0)-20<At.clientHeight?At.clientHeight:e.innerHeight||Gt.clientHeight||0,On;var t=e.ownerDocument||pt,n=Bt(e.pageX)?!e.nodeType&&!Bt(e.left)&&!Bt(e.top)?e:dn(e)[0].getBoundingClientRect():{left:e.pageX-sr(t),top:e.pageY-or(t),right:e.pageX-sr(t)+1,bottom:e.pageY-or(t)+1};return Bt(n.right)&&!Bt(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):Bt(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n},Re=function(e,t,n){var r=e.vars,s=r[n],a=e._listeners[t],l;return fn(s)&&(l=s.apply(r.callbackScope||e,r[n+"Params"]||[e.pointerEvent])),a&&e.dispatchEvent(t)===!1&&(l=!1),l},wc=function(e,t){var n=dn(e)[0],r,s,a;return!n.nodeType&&n!==Ee?Bt(e.left)?(s=e.min||e.minX||e.minRotation||0,r=e.min||e.minY||0,{left:s,top:r,width:(e.max||e.maxX||e.maxRotation||0)-s,height:(e.max||e.maxY||0)-r}):(a={x:0,y:0},{left:e.left-a.x,top:e.top-a.y,width:e.width,height:e.height}):D0(n,t)},St={},D0=function(e,t){t=dn(t)[0];var n=e.getBBox&&e.ownerSVGElement,r=e.ownerDocument||pt,s,a,l,c,u,d,h,_,f,m,p,g,y;if(e===Ee)l=or(r),s=sr(r),a=s+(r.documentElement.clientWidth||e.innerWidth||r.body.clientWidth||0),c=l+((e.innerHeight||0)-20<r.documentElement.clientHeight?r.documentElement.clientHeight:e.innerHeight||r.body.clientHeight||0);else{if(t===Ee||Bt(t))return e.getBoundingClientRect();s=l=0,n?(m=e.getBBox(),p=m.width,g=m.height):(e.viewBox&&(m=e.viewBox.baseVal)&&(s=m.x||0,l=m.y||0,p=m.width,g=m.height),p||(y=Ur(e),m=y.boxSizing==="border-box",p=(parseFloat(y.width)||e.clientWidth||0)+(m?0:parseFloat(y.borderLeftWidth)+parseFloat(y.borderRightWidth)),g=(parseFloat(y.height)||e.clientHeight||0)+(m?0:parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth)))),a=p,c=g}return e===t?{left:s,top:l,width:a-s,height:c-l}:(u=Bn(t,!0).multiply(Bn(e)),d=u.apply({x:s,y:l}),h=u.apply({x:a,y:l}),_=u.apply({x:a,y:c}),f=u.apply({x:s,y:c}),s=Math.min(d.x,h.x,_.x,f.x),l=Math.min(d.y,h.y,_.y,f.y),{left:s,top:l,width:Math.max(d.x,h.x,_.x,f.x)-s,height:Math.max(d.y,h.y,_.y,f.y)-l})},us=function(e,t,n,r,s,a){var l={},c,u,d;if(t)if(s!==1&&t instanceof Array){if(l.end=c=[],d=t.length,Lr(t[0]))for(u=0;u<d;u++)c[u]=dc(t[u],s);else for(u=0;u<d;u++)c[u]=t[u]*s;n+=1.1,r-=1.1}else fn(t)?l.end=function(h){var _=t.call(e,h),f,m;if(s!==1)if(Lr(_)){f={};for(m in _)f[m]=_[m]*s;_=f}else _*=s;return _}:l.end=t;return(n||n===0)&&(l.max=n),(r||r===0)&&(l.min=r),a&&(l.velocity=0),l},O0=function i(e){var t;return!e||!e.getAttribute||e===Gt?!1:(t=e.getAttribute("data-clickable"))==="true"||t!=="false"&&(N0.test(e.nodeName+"")||e.getAttribute("contentEditable")==="true")?!0:i(e.parentNode)},Pi=function(e,t){for(var n=e.length,r;n--;)r=e[n],r.ondragstart=r.onselectstart=t?null:Ni,fe.set(r,{lazy:!0,userSelect:t?"text":"none"})},$0=function i(e){if(Ur(e).position==="fixed")return!0;if(e=e.parentNode,e&&e.nodeType===1)return i(e)},xc,ds,I0=function(e,t){e=fe.utils.toArray(e)[0],t=t||{};var n=document.createElement("div"),r=n.style,s=e.firstChild,a=0,l=0,c=e.scrollTop,u=e.scrollLeft,d=e.scrollWidth,h=e.scrollHeight,_=0,f=0,m=0,p,g,y,w,x,T;xc&&t.force3D!==!1?(x="translate3d(",T="px,0px)"):Fr&&(x="translate(",T="px)"),this.scrollTop=function(S,B){if(!arguments.length)return-this.top();this.top(-S,B)},this.scrollLeft=function(S,B){if(!arguments.length)return-this.left();this.left(-S,B)},this.left=function(S,B){if(!arguments.length)return-(e.scrollLeft+l);var k=e.scrollLeft-u,b=l;if((k>2||k<-2)&&!B){u=e.scrollLeft,fe.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-u),t.onKill&&t.onKill();return}S=-S,S<0?(l=S-.5|0,S=0):S>f?(l=S-f|0,S=f):l=0,(l||b)&&(this._skip||(r[Fr]=x+-l+"px,"+-a+T),l+_>=0&&(r.paddingRight=l+_+"px")),e.scrollLeft=S|0,u=e.scrollLeft},this.top=function(S,B){if(!arguments.length)return-(e.scrollTop+a);var k=e.scrollTop-c,b=a;if((k>2||k<-2)&&!B){c=e.scrollTop,fe.killTweensOf(this,{top:1,scrollTop:1}),this.top(-c),t.onKill&&t.onKill();return}S=-S,S<0?(a=S-.5|0,S=0):S>m?(a=S-m|0,S=m):a=0,(a||b)&&(this._skip||(r[Fr]=x+-l+"px,"+-a+T)),e.scrollTop=S|0,c=e.scrollTop},this.maxScrollTop=function(){return m},this.maxScrollLeft=function(){return f},this.disable=function(){for(s=n.firstChild;s;)w=s.nextSibling,e.appendChild(s),s=w;e===n.parentNode&&e.removeChild(n)},this.enable=function(){if(s=e.firstChild,s!==n){for(;s;)w=s.nextSibling,n.appendChild(s),s=w;e.appendChild(n),this.calibrate()}},this.calibrate=function(S){var B=e.clientWidth===p,k,b,C;c=e.scrollTop,u=e.scrollLeft,!(B&&e.clientHeight===g&&n.offsetHeight===y&&d===e.scrollWidth&&h===e.scrollHeight&&!S)&&((a||l)&&(b=this.left(),C=this.top(),this.left(-e.scrollLeft),this.top(-e.scrollTop)),k=Ur(e),(!B||S)&&(r.display="block",r.width="auto",r.paddingRight="0px",_=Math.max(0,e.scrollWidth-e.clientWidth),_&&(_+=parseFloat(k.paddingLeft)+(ds?parseFloat(k.paddingRight):0))),r.display="inline-block",r.position="relative",r.overflow="visible",r.verticalAlign="top",r.boxSizing="content-box",r.width="100%",r.paddingRight=_+"px",ds&&(r.paddingBottom=k.paddingBottom),p=e.clientWidth,g=e.clientHeight,d=e.scrollWidth,h=e.scrollHeight,f=e.scrollWidth-p,m=e.scrollHeight-g,y=n.offsetHeight,r.display="block",(b||C)&&(this.left(b),this.top(C)))},this.content=n,this.element=e,this._skip=!1,this.enable()},fs=function(e){if(ac()&&document.body){var t=window&&window.navigator;Ee=window,pt=document,At=pt.documentElement,Gt=pt.body,ns=Mi("div"),Ti=!!window.PointerEvent,Kt=Mi("div"),Kt.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Vr=Kt.style.cursor==="grab"?"grab":"move",Ir=t&&t.userAgent.toLowerCase().indexOf("android")!==-1,is="ontouchstart"in At&&"orientation"in Ee||t&&(t.MaxTouchPoints>0||t.msMaxTouchPoints>0),ds=function(){var n=Mi("div"),r=Mi("div"),s=r.style,a=Gt,l;return s.display="inline-block",s.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(r),a.appendChild(n),l=r.offsetHeight+18>n.scrollHeight,a.removeChild(n),l}(),$r=function(n){for(var r=n.split(","),s=("onpointerdown"in ns?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in ns?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":n).split(","),a={},l=4;--l>-1;)a[r[l]]=s[l],a[s[l]]=r[l];try{At.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){oc=1}}))}catch{}return a}("touchstart,touchmove,touchend,touchcancel"),Ve(pt,"touchcancel",Ni),Ve(Ee,"touchmove",Ni),Gt&&Gt.addEventListener("touchstart",Ni),Ve(pt,"contextmenu",function(){for(var n in rr)rr[n].isPressed&&rr[n].endDrag()}),fe=rs=lc()}fe?(mt=fe.plugins.inertia,sc=fe.core.context||function(){},Or=fe.utils.checkPrefix,Fr=Or(Fr),as=Or(as),dn=fe.utils.toArray,ss=fe.core.getStyleSaver,xc=!!Or("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")},V0=function(){function i(t){this._listeners={},this.target=t||this}var e=i.prototype;return e.addEventListener=function(n,r){var s=this._listeners[n]||(this._listeners[n]=[]);~s.indexOf(r)||s.push(r)},e.removeEventListener=function(n,r){var s=this._listeners[n],a=s&&s.indexOf(r);a>=0&&s.splice(a,1)},e.dispatchEvent=function(n){var r=this,s;return(this._listeners[n]||[]).forEach(function(a){return a.call(r,{type:n,target:r.target})===!1&&(s=!1)}),s},i}(),cr=function(i){E0(e,i);function e(t,n){var r;r=i.call(this)||this,rs||fs(1),t=dn(t)[0],r.styles=ss&&ss(t,"transform,left,top"),mt||(mt=fe.plugins.inertia),r.vars=n=dc(n||{}),r.target=t,r.x=r.y=r.rotation=0,r.dragResistance=parseFloat(n.dragResistance)||0,r.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,r.lockAxis=n.lockAxis,r.autoScroll=n.autoScroll||0,r.lockedAxis=null,r.allowEventDefault=!!n.allowEventDefault,fe.getProperty(t,"x");var s=(n.type||"x,y").toLowerCase(),a=~s.indexOf("x")||~s.indexOf("y"),l=s.indexOf("rotation")!==-1,c=l?"rotation":a?"x":"left",u=a?"y":"top",d=!!(~s.indexOf("x")||~s.indexOf("left")||s==="scroll"),h=!!(~s.indexOf("y")||~s.indexOf("top")||s==="scroll"),_=n.minimumMovement||2,f=ic(r),m=dn(n.trigger||n.handle||t),p={},g=0,y=!1,w=n.autoScrollMarginTop||40,x=n.autoScrollMarginRight||40,T=n.autoScrollMarginBottom||40,S=n.autoScrollMarginLeft||40,B=n.clickableTest||O0,k=0,b=t._gsap||fe.core.getCache(t),C=$0(t),P=function(v,L){return parseFloat(b.get(t,v,L))},O=t.ownerDocument||pt,H,R,N,E,M,A,$,V,F,z,W,Z,K,ue,Y,U,ie,_e,ce,ye,ge,se,pe,ne,mn,ot,_t,_s,gs,Pc,gt,Ac,Ri,Bc=function(v){return kt(v),v.stopImmediatePropagation&&v.stopImmediatePropagation(),!1},Ft=function te(v){if(f.autoScroll&&f.isDragging&&(y||ie)){var L=t,I=f.autoScroll*15,q,j,G,le,ee,we,he,xe;for(y=!1,Jt.scrollTop=Ee.pageYOffset!=null?Ee.pageYOffset:O.documentElement.scrollTop!=null?O.documentElement.scrollTop:O.body.scrollTop,Jt.scrollLeft=Ee.pageXOffset!=null?Ee.pageXOffset:O.documentElement.scrollLeft!=null?O.documentElement.scrollLeft:O.body.scrollLeft,le=f.pointerX-Jt.scrollLeft,ee=f.pointerY-Jt.scrollTop;L&&!j;)j=ar(L.parentNode),q=j?Jt:L.parentNode,G=j?{bottom:Math.max(At.clientHeight,Ee.innerHeight||0),right:Math.max(At.clientWidth,Ee.innerWidth||0),left:0,top:0}:q.getBoundingClientRect(),we=he=0,h&&(xe=q._gsMaxScrollY-q.scrollTop,xe<0?he=xe:ee>G.bottom-T&&xe?(y=!0,he=Math.min(xe,I*(1-Math.max(0,G.bottom-ee)/T)|0)):ee<G.top+w&&q.scrollTop&&(y=!0,he=-Math.min(q.scrollTop,I*(1-Math.max(0,ee-G.top)/w)|0)),he&&(q.scrollTop+=he)),d&&(xe=q._gsMaxScrollX-q.scrollLeft,xe<0?we=xe:le>G.right-x&&xe?(y=!0,we=Math.min(xe,I*(1-Math.max(0,G.right-le)/x)|0)):le<G.left+S&&q.scrollLeft&&(y=!0,we=-Math.min(q.scrollLeft,I*(1-Math.max(0,le-G.left)/S)|0)),we&&(q.scrollLeft+=we)),j&&(we||he)&&(Ee.scrollTo(q.scrollLeft,q.scrollTop),Xr(f.pointerX+we,f.pointerY+he)),L=q}if(ie){var De=f.x,je=f.y;l?(f.deltaX=De-parseFloat(b.rotation),f.rotation=De,b.rotation=De+"deg",b.renderTransform(1,b)):R?(h&&(f.deltaY=je-R.top(),R.top(je)),d&&(f.deltaX=De-R.left(),R.left(De))):a?(h&&(f.deltaY=je-parseFloat(b.y),b.y=je+"px"),d&&(f.deltaX=De-parseFloat(b.x),b.x=De+"px"),b.renderTransform(1,b)):(h&&(f.deltaY=je-parseFloat(t.style.top||0),t.style.top=je+"px"),d&&(f.deltaX=De-parseFloat(t.style.left||0),t.style.left=De+"px")),V&&!v&&!_s&&(_s=!0,Re(f,"drag","onDrag")===!1&&(d&&(f.x-=f.deltaX),h&&(f.y-=f.deltaY),te(!0)),_s=!1)}ie=!1},Vn=function(v,L){var I=f.x,q=f.y,j,G;t._gsap||(b=fe.core.getCache(t)),b.uncache&&fe.getProperty(t,"x"),a?(f.x=parseFloat(b.x),f.y=parseFloat(b.y)):l?f.x=f.rotation=Ye(parseFloat(b.rotation)):R?(f.y=R.top(),f.x=R.left()):(f.y=parseFloat(t.style.top||(G=Ur(t))&&G.top)||0,f.x=parseFloat(t.style.left||(G||{}).left)||0),(ce||ye||ge)&&!L&&(f.isDragging||f.isThrowing)&&(ge&&(ir.x=f.x,ir.y=f.y,j=ge(ir),j.x!==f.x&&(f.x=j.x,ie=!0),j.y!==f.y&&(f.y=j.y,ie=!0)),ce&&(j=ce(f.x),j!==f.x&&(f.x=j,l&&(f.rotation=j),ie=!0)),ye&&(j=ye(f.y),j!==f.y&&(f.y=j),ie=!0)),ie&&Ft(!0),v||(f.deltaX=f.x-I,f.deltaY=f.y-q,Re(f,"throwupdate","onThrowUpdate"))},ys=function(v,L,I,q){return L==null&&(L=-Rn),I==null&&(I=Rn),fn(v)?function(j){var G=f.isPressed?1-f.edgeResistance:1;return v.call(f,(j>I?I+(j-I)*G:j<L?L+(j-L)*G:j)*q)*q}:zr(v)?function(j){for(var G=v.length,le=0,ee=Rn,we,he;--G>-1;)we=v[G],he=we-j,he<0&&(he=-he),he<ee&&we>=L&&we<=I&&(le=G,ee=he);return v[le]}:isNaN(v)?function(j){return j}:function(){return v*q}},pg=function(v,L,I,q,j,G,le){return G=G&&G<Rn?G*G:Rn,fn(v)?function(ee){var we=f.isPressed?1-f.edgeResistance:1,he=ee.x,xe=ee.y,De,je,Zt;return ee.x=he=he>I?I+(he-I)*we:he<L?L+(he-L)*we:he,ee.y=xe=xe>j?j+(xe-j)*we:xe<q?q+(xe-q)*we:xe,De=v.call(f,ee),De!==ee&&(ee.x=De.x,ee.y=De.y),le!==1&&(ee.x*=le,ee.y*=le),G<Rn&&(je=ee.x-he,Zt=ee.y-xe,je*je+Zt*Zt>G&&(ee.x=he,ee.y=xe)),ee}:zr(v)?function(ee){for(var we=v.length,he=0,xe=Rn,De,je,Zt,Ct;--we>-1;)Zt=v[we],De=Zt.x-ee.x,je=Zt.y-ee.y,Ct=De*De+je*je,Ct<xe&&(he=we,xe=Ct);return xe<=G?v[he]:ee}:function(ee){return ee}},bs=function(){var v,L,I,q;$=!1,R?(R.calibrate(),f.minX=W=-R.maxScrollLeft(),f.minY=K=-R.maxScrollTop(),f.maxX=z=f.maxY=Z=0,$=!0):n.bounds&&(v=wc(n.bounds,t.parentNode),l?(f.minX=W=v.left,f.maxX=z=v.left+v.width,f.minY=K=f.maxY=Z=0):!Bt(n.bounds.maxX)||!Bt(n.bounds.maxY)?(v=n.bounds,f.minX=W=v.minX,f.minY=K=v.minY,f.maxX=z=v.maxX,f.maxY=Z=v.maxY):(L=wc(t,t.parentNode),f.minX=W=Math.round(P(c,"px")+v.left-L.left),f.minY=K=Math.round(P(u,"px")+v.top-L.top),f.maxX=z=Math.round(W+(v.width-L.width)),f.maxY=Z=Math.round(K+(v.height-L.height))),W>z&&(f.minX=z,f.maxX=z=W,W=f.minX),K>Z&&(f.minY=Z,f.maxY=Z=K,K=f.minY),l&&(f.minRotation=W,f.maxRotation=z),$=!0),n.liveSnap&&(I=n.liveSnap===!0?n.snap||{}:n.liveSnap,q=zr(I)||fn(I),l?(ce=ys(q?I:I.rotation,W,z,1),ye=null):I.points?ge=pg(q?I:I.points,W,z,K,Z,I.radius,R?-1:1):(d&&(ce=ys(q?I:I.x||I.left||I.scrollLeft,W,z,R?-1:1)),h&&(ye=ys(q?I:I.y||I.top||I.scrollTop,K,Z,R?-1:1))))},mg=function(){f.isThrowing=!1,Re(f,"throwcomplete","onThrowComplete")},_g=function(){f.isThrowing=!1},ws=function(v,L){var I,q,j,G;v&&mt?(v===!0&&(I=n.snap||n.liveSnap||{},q=zr(I)||fn(I),v={resistance:(n.throwResistance||n.resistance||1e3)/(l?10:1)},l?v.rotation=us(f,q?I:I.rotation,z,W,1,L):(d&&(v[c]=us(f,q?I:I.points||I.x||I.left,z,W,R?-1:1,L||f.lockedAxis==="x")),h&&(v[u]=us(f,q?I:I.points||I.y||I.top,Z,K,R?-1:1,L||f.lockedAxis==="y")),(I.points||zr(I)&&Lr(I[0]))&&(v.linkedProps=c+","+u,v.radius=I.radius))),f.isThrowing=!0,G=isNaN(n.overshootTolerance)?n.edgeResistance===1?0:1-f.edgeResistance+.2:n.overshootTolerance,v.duration||(v.duration={max:Math.max(n.minDuration||0,"maxDuration"in n?n.maxDuration:2),min:isNaN(n.minDuration)?G===0||Lr(v)&&v.resistance>1e3?0:.5:n.minDuration,overshoot:G}),f.tween=j=fe.to(R||t,{inertia:v,data:"_draggable",inherit:!1,onComplete:mg,onInterrupt:_g,onUpdate:n.fastMode?Re:Vn,onUpdateParams:n.fastMode?[f,"onthrowupdate","onThrowUpdate"]:I&&I.radius?[!1,!0]:[]}),n.fastMode||(R&&(R._skip=!0),j.render(1e9,!0,!0),Vn(!0,!0),f.endX=f.x,f.endY=f.y,l&&(f.endRotation=f.x),j.play(0),Vn(!0,!0),R&&(R._skip=!1))):$&&f.applyBounds()},Rc=function(v){var L=ne,I;ne=Bn(t.parentNode,!0),v&&f.isPressed&&!ne.equals(L||new An)&&(I=L.inverse().apply({x:N,y:E}),ne.apply(I,I),N=I.x,E=I.y),ne.equals(T0)&&(ne=null)},Di=function(){var v=1-f.edgeResistance,L=C?sr(O):0,I=C?or(O):0,q,j,G;a&&(b.x=P(c,"px")+"px",b.y=P(u,"px")+"px",b.renderTransform()),Rc(!1),St.x=f.pointerX-L,St.y=f.pointerY-I,ne&&ne.apply(St,St),N=St.x,E=St.y,ie&&(Xr(f.pointerX,f.pointerY),Ft(!0)),Ac=Bn(t),R?(bs(),A=R.top(),M=R.left()):(Wr()?(Vn(!0,!0),bs()):f.applyBounds(),l?(q=t.ownerSVGElement?[b.xOrigin-t.getBBox().x,b.yOrigin-t.getBBox().y]:(Ur(t)[as]||"0 0").split(" "),U=f.rotationOrigin=Bn(t).apply({x:parseFloat(q[0])||0,y:parseFloat(q[1])||0}),Vn(!0,!0),j=f.pointerX-U.x-L,G=U.y-f.pointerY+I,M=f.x,A=f.y=Math.atan2(G,j)*cc):(A=P(u,"px"),M=P(c,"px"))),$&&v&&(M>z?M=z+(M-z)/v:M<W&&(M=W-(W-M)/v),l||(A>Z?A=Z+(A-Z)/v:A<K&&(A=K-(K-A)/v))),f.startX=M=Ye(M),f.startY=A=Ye(A)},Wr=function(){return f.tween&&f.tween.isActive()},gg=function(){Kt.parentNode&&!Wr()&&!f.isDragging&&Kt.parentNode.removeChild(Kt)},jr=function(v,L){var I;if(!H||f.isPressed||!v||(v.type==="mousedown"||v.type==="pointerdown")&&!L&&hn()-k<30&&$r[f.pointerEvent.type]){gt&&v&&H&&kt(v);return}if(mn=Wr(),Ri=!1,f.pointerEvent=v,$r[v.type]?(pe=~v.type.indexOf("touch")?v.currentTarget||v.target:O,Ve(pe,"touchend",Dt),Ve(pe,"touchmove",Ln),Ve(pe,"touchcancel",Dt),Ve(O,"touchstart",_c)):(pe=null,Ve(O,"mousemove",Ln)),_t=null,(!Ti||!pe)&&(Ve(O,"mouseup",Dt),v&&v.target&&Ve(v.target,"mouseup",Dt)),se=B.call(f,v.target)&&n.dragClickables===!1&&!L,se){Ve(v.target,"change",Dt),Re(f,"pressInit","onPressInit"),Re(f,"press","onPress"),Pi(m,!0),gt=!1;return}if(ot=!pe||d===h||f.vars.allowNativeTouchScrolling===!1||f.vars.allowContextMenu&&v&&(v.ctrlKey||v.which>2)?!1:d?"y":"x",gt=!ot&&!f.allowEventDefault,gt&&(kt(v),Ve(Ee,"touchforcechange",kt)),v.changedTouches?(v=ue=v.changedTouches[0],Y=v.identifier):v.pointerId?Y=v.pointerId:ue=Y=null,vi++,P0(Ft),E=f.pointerY=v.pageY,N=f.pointerX=v.pageX,Re(f,"pressInit","onPressInit"),(ot||f.autoScroll)&&ls(t.parentNode),t.parentNode&&f.autoScroll&&!R&&!l&&t.parentNode._gsMaxScrollX&&!Kt.parentNode&&!t.getBBox&&(Kt.style.width=t.parentNode.scrollWidth+"px",t.parentNode.appendChild(Kt)),Di(),f.tween&&f.tween.kill(),f.isThrowing=!1,fe.killTweensOf(R||t,p,!0),R&&fe.killTweensOf(t,{scrollTo:1},!0),f.tween=f.lockedAxis=null,(n.zIndexBoost||!l&&!R&&n.zIndexBoost!==!1)&&(t.style.zIndex=e.zIndex++),f.isPressed=!0,V=!!(n.onDrag||f._listeners.drag),F=!!(n.onMove||f._listeners.move),n.cursor!==!1||n.activeCursor)for(I=m.length;--I>-1;)fe.set(m[I],{cursor:n.activeCursor||n.cursor||(Vr==="grab"?"grabbing":Vr)});Re(f,"press","onPress"),mt&&mt.track(R||t,a?"x,y":l?"rotation":"top,left")},Ln=function(v){var L=v,I,q,j,G,le,ee;if(!H||os||!f.isPressed||!v){gt&&v&&H&&kt(v);return}if(f.pointerEvent=v,I=v.changedTouches,I){if(v=I[0],v!==ue&&v.identifier!==Y){for(G=I.length;--G>-1&&(v=I[G]).identifier!==Y&&v.target!==t;);if(G<0)return}}else if(v.pointerId&&Y&&v.pointerId!==Y)return;if(pe&&ot&&!_t&&(St.x=v.pageX-(C?sr(O):0),St.y=v.pageY-(C?or(O):0),ne&&ne.apply(St,St),q=St.x,j=St.y,le=Math.abs(q-N),ee=Math.abs(j-E),(le!==ee&&(le>_||ee>_)||Ir&&ot===_t)&&(_t=le>ee&&d?"x":"y",ot&&_t!==ot&&Ve(Ee,"touchforcechange",kt),f.vars.lockAxisOnTouchScroll!==!1&&d&&h&&(f.lockedAxis=_t==="x"?"y":"x",fn(f.vars.onLockAxis)&&f.vars.onLockAxis.call(f,L)),Ir&&ot===_t))){Dt(L);return}!f.allowEventDefault&&(!ot||_t&&ot!==_t)&&L.cancelable!==!1?(kt(L),gt=!0):gt&&(gt=!1),f.autoScroll&&(y=!0),Xr(v.pageX,v.pageY,F)},Xr=function(v,L,I){var q=1-f.dragResistance,j=1-f.edgeResistance,G=f.pointerX,le=f.pointerY,ee=A,we=f.x,he=f.y,xe=f.endX,De=f.endY,je=f.endRotation,Zt=ie,Ct,_n,Ue,Ie,xs,yt;f.pointerX=v,f.pointerY=L,C&&(v-=sr(O),L-=or(O)),l?(Ie=Ye(Math.atan2(U.y-L,v-U.x)*cc),xs=f.y-Ie,xs>180?(A-=360,f.y=Ie):xs<-180&&(A+=360,f.y=Ie),ne&&(yt=v*ne.a+L*ne.c+ne.e,L=v*ne.b+L*ne.d+ne.f,v=yt),f.x!==M||Math.max(Math.abs(N-v),Math.abs(E-L))>_?(f.y=Ie,Ue=Ye(M+(A-Ie)*q)):Ue=M):(ne&&(yt=v*ne.a+L*ne.c+ne.e,L=v*ne.b+L*ne.d+ne.f,v=yt),_n=L-E,Ct=v-N,_n<_&&_n>-_&&(_n=0),Ct<_&&Ct>-_&&(Ct=0),(f.lockAxis||f.lockedAxis)&&(Ct||_n)&&(yt=f.lockedAxis,yt||(f.lockedAxis=yt=d&&Math.abs(Ct)>Math.abs(_n)?"y":h?"x":null,yt&&fn(f.vars.onLockAxis)&&f.vars.onLockAxis.call(f,f.pointerEvent)),yt==="y"?_n=0:yt==="x"&&(Ct=0)),Ue=Ye(M+Ct*q),Ie=Ye(A+_n*q)),(ce||ye||ge)&&(f.x!==Ue||f.y!==Ie&&!l)&&(ge&&(ir.x=Ue,ir.y=Ie,yt=ge(ir),Ue=Ye(yt.x),Ie=Ye(yt.y)),ce&&(Ue=Ye(ce(Ue))),ye&&(Ie=Ye(ye(Ie)))),$&&(Ue>z?Ue=z+Math.round((Ue-z)*j):Ue<W&&(Ue=W+Math.round((Ue-W)*j)),l||(Ie>Z?Ie=Math.round(Z+(Ie-Z)*j):Ie<K&&(Ie=Math.round(K+(Ie-K)*j)))),(f.x!==Ue||f.y!==Ie&&!l)&&(l?(f.endRotation=f.x=f.endX=Ye(Ue),ie=!0):(h&&(f.y=f.endY=Ie,ie=!0),d&&(f.x=f.endX=Ue,ie=!0)),!I||Re(f,"move","onMove")!==!1?!f.isDragging&&f.isPressed&&(f.isDragging=Ri=!0,Re(f,"dragstart","onDragStart")):(f.pointerX=G,f.pointerY=le,A=ee,f.x=we,f.y=he,f.endX=xe,f.endY=De,f.endRotation=je,ie=Zt))},Dt=function te(v,L){if(!H||!f.isPressed||v&&Y!=null&&!L&&(v.pointerId&&v.pointerId!==Y&&v.target!==t||v.changedTouches&&!B0(v.changedTouches,Y))){gt&&v&&H&&kt(v);return}f.isPressed=!1;var I=v,q=f.isDragging,j=f.vars.allowContextMenu&&v&&(v.ctrlKey||v.which>2),G=fe.delayedCall(.001,gg),le,ee,we,he,xe;if(pe?($e(pe,"touchend",te),$e(pe,"touchmove",Ln),$e(pe,"touchcancel",te),$e(O,"touchstart",_c)):$e(O,"mousemove",Ln),$e(Ee,"touchforcechange",kt),(!Ti||!pe)&&($e(O,"mouseup",te),v&&v.target&&$e(v.target,"mouseup",te)),ie=!1,q&&(g=uc=hn(),f.isDragging=!1),mc(Ft),se&&!j){v&&($e(v.target,"change",te),f.pointerEvent=I),Pi(m,!1),Re(f,"release","onRelease"),Re(f,"click","onClick"),se=!1;return}for(ee=m.length;--ee>-1;)cs(m[ee],"cursor",n.cursor||(n.cursor!==!1?Vr:null));if(vi--,v){if(le=v.changedTouches,le&&(v=le[0],v!==ue&&v.identifier!==Y)){for(ee=le.length;--ee>-1&&(v=le[ee]).identifier!==Y&&v.target!==t;);if(ee<0&&!L)return}f.pointerEvent=I,f.pointerX=v.pageX,f.pointerY=v.pageY}return j&&I?(kt(I),gt=!0,Re(f,"release","onRelease")):I&&!q?(gt=!1,mn&&(n.snap||n.bounds)&&ws(n.inertia||n.throwProps),Re(f,"release","onRelease"),(!Ir||I.type!=="touchmove")&&I.type.indexOf("cancel")===-1&&(Re(f,"click","onClick"),hn()-k<300&&Re(f,"doubleclick","onDoubleClick"),he=I.target||t,k=hn(),xe=function(){k!==gs&&f.enabled()&&!f.isPressed&&!I.defaultPrevented&&(he.click?he.click():O.createEvent&&(we=O.createEvent("MouseEvents"),we.initMouseEvent("click",!0,!0,Ee,1,f.pointerEvent.screenX,f.pointerEvent.screenY,f.pointerX,f.pointerY,!1,!1,!1,!1,0,null),he.dispatchEvent(we)))},!Ir&&!I.defaultPrevented&&fe.delayedCall(.05,xe))):(ws(n.inertia||n.throwProps),!f.allowEventDefault&&I&&(n.dragClickables!==!1||!B.call(f,I.target))&&q&&(!ot||_t&&ot===_t)&&I.cancelable!==!1?(gt=!0,kt(I)):gt=!1,Re(f,"release","onRelease")),Wr()&&G.duration(f.tween.duration()),q&&Re(f,"dragend","onDragEnd"),!0},Oi=function(v){if(v&&f.isDragging&&!R){var L=v.target||t.parentNode,I=L.scrollLeft-L._gsScrollX,q=L.scrollTop-L._gsScrollY;(I||q)&&(ne?(N-=I*ne.a+q*ne.c,E-=q*ne.d+I*ne.b):(N-=I,E-=q),L._gsScrollX+=I,L._gsScrollY+=q,Xr(f.pointerX,f.pointerY))}},Dc=function(v){var L=hn(),I=L-k<100,q=L-g<50,j=I&&gs===k,G=f.pointerEvent&&f.pointerEvent.defaultPrevented,le=I&&Pc===k,ee=v.isTrusted||v.isTrusted==null&&I&&j;if((j||q&&f.vars.suppressClickOnDrag!==!1)&&v.stopImmediatePropagation&&v.stopImmediatePropagation(),I&&!(f.pointerEvent&&f.pointerEvent.defaultPrevented)&&(!j||ee&&!le)){ee&&j&&(Pc=k),gs=k;return}(f.isPressed||q||I)&&(!ee||!v.detail||!I||G)&&kt(v),!I&&!q&&!Ri&&(v&&v.target&&(f.pointerEvent=v),Re(f,"click","onClick"))},Oc=function(v){return ne?{x:v.x*ne.a+v.y*ne.c+ne.e,y:v.x*ne.b+v.y*ne.d+ne.f}:{x:v.x,y:v.y}};return _e=e.get(t),_e&&_e.kill(),r.startDrag=function(te,v){var L,I,q,j;jr(te||f.pointerEvent,!0),v&&!f.hitTest(te||f.pointerEvent)&&(L=lr(te||f.pointerEvent),I=lr(t),q=Oc({x:L.left+L.width/2,y:L.top+L.height/2}),j=Oc({x:I.left+I.width/2,y:I.top+I.height/2}),N-=q.x-j.x,E-=q.y-j.y),f.isDragging||(f.isDragging=Ri=!0,Re(f,"dragstart","onDragStart"))},r.drag=Ln,r.endDrag=function(te){return Dt(te||f.pointerEvent,!0)},r.timeSinceDrag=function(){return f.isDragging?0:(hn()-g)/1e3},r.timeSinceClick=function(){return(hn()-k)/1e3},r.hitTest=function(te,v){return e.hitTest(f.target,te,v)},r.getDirection=function(te,v){var L=te==="velocity"&&mt?te:Lr(te)&&!l?"element":"start",I,q,j,G,le,ee;return L==="element"&&(le=lr(f.target),ee=lr(te)),I=L==="start"?f.x-M:L==="velocity"?mt.getVelocity(t,c):le.left+le.width/2-(ee.left+ee.width/2),l?I<0?"counter-clockwise":"clockwise":(v=v||2,q=L==="start"?f.y-A:L==="velocity"?mt.getVelocity(t,u):le.top+le.height/2-(ee.top+ee.height/2),j=Math.abs(I/q),G=j<1/v?"":I<0?"left":"right",j<v&&(G!==""&&(G+="-"),G+=q<0?"up":"down"),G)},r.applyBounds=function(te,v){var L,I,q,j,G,le;if(te&&n.bounds!==te)return n.bounds=te,f.update(!0,v);if(Vn(!0),bs(),$&&!Wr()){if(L=f.x,I=f.y,L>z?L=z:L<W&&(L=W),I>Z?I=Z:I<K&&(I=K),(f.x!==L||f.y!==I)&&(q=!0,f.x=f.endX=L,l?f.endRotation=L:f.y=f.endY=I,ie=!0,Ft(!0),f.autoScroll&&!f.isDragging))for(ls(t.parentNode),j=t,Jt.scrollTop=Ee.pageYOffset!=null?Ee.pageYOffset:O.documentElement.scrollTop!=null?O.documentElement.scrollTop:O.body.scrollTop,Jt.scrollLeft=Ee.pageXOffset!=null?Ee.pageXOffset:O.documentElement.scrollLeft!=null?O.documentElement.scrollLeft:O.body.scrollLeft;j&&!le;)le=ar(j.parentNode),G=le?Jt:j.parentNode,h&&G.scrollTop>G._gsMaxScrollY&&(G.scrollTop=G._gsMaxScrollY),d&&G.scrollLeft>G._gsMaxScrollX&&(G.scrollLeft=G._gsMaxScrollX),j=G;f.isThrowing&&(q||f.endX>z||f.endX<W||f.endY>Z||f.endY<K)&&ws(n.inertia||n.throwProps,q)}return f},r.update=function(te,v,L){if(v&&f.isPressed){if(l)f.x=f.y=Ye(parseFloat(b.rotation));else{var I=Bn(t),q=Ac.apply({x:f.x-M,y:f.y-A}),j=Bn(t.parentNode,!0);j.apply({x:I.e-q.x,y:I.f-q.y},q),f.x=Ye(f.x-(q.x-j.e)),f.y=Ye(f.y-(q.y-j.f))}Ft(!0),Di()}var G=f.x,le=f.y;return Rc(!v),te?f.applyBounds():(ie&&L&&Ft(!0),Vn(!0)),v&&(Xr(f.pointerX,f.pointerY),ie&&Ft(!0)),f.isPressed&&!v&&(d&&Math.abs(G-f.x)>.01||h&&Math.abs(le-f.y)>.01&&!l)&&Di(),f.autoScroll&&(ls(t.parentNode,f.isDragging),y=f.isDragging,Ft(!0),yc(t,Oi),gc(t,Oi)),f},r.enable=function(te){var v={lazy:!0},L,I,q;if(n.cursor!==!1&&(v.cursor=n.cursor||Vr),fe.utils.checkPrefix("touchCallout")&&(v.touchCallout="none"),te!=="soft"){for(fc(m,d===h?"none":n.allowNativeTouchScrolling&&t.scrollHeight===t.clientHeight==(t.scrollWidth===t.clientHeight)||n.allowEventDefault?"manipulation":d?"pan-y":"pan-x"),I=m.length;--I>-1;)q=m[I],Ti||Ve(q,"mousedown",jr),Ve(q,"touchstart",jr),Ve(q,"click",Dc,!0),fe.set(q,v),q.getBBox&&q.ownerSVGElement&&d!==h&&fe.set(q.ownerSVGElement,{touchAction:n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":d?"pan-y":"pan-x"}),n.allowContextMenu||Ve(q,"contextmenu",Bc);Pi(m,!1)}return gc(t,Oi),H=!0,mt&&te!=="soft"&&mt.track(R||t,a?"x,y":l?"rotation":"top,left"),t._gsDragID=L=t._gsDragID||"d"+v0++,rr[L]=f,R&&(R.enable(),R.element._gsDragID=L),(n.bounds||l)&&Di(),n.bounds&&f.applyBounds(),f},r.disable=function(te){for(var v=f.isDragging,L=m.length,I;--L>-1;)cs(m[L],"cursor",null);if(te!=="soft"){for(fc(m,null),L=m.length;--L>-1;)I=m[L],cs(I,"touchCallout",null),$e(I,"mousedown",jr),$e(I,"touchstart",jr),$e(I,"click",Dc,!0),$e(I,"contextmenu",Bc);Pi(m,!0),pe&&($e(pe,"touchcancel",Dt),$e(pe,"touchend",Dt),$e(pe,"touchmove",Ln)),$e(O,"mouseup",Dt),$e(O,"mousemove",Ln)}return yc(t,Oi),H=!1,mt&&te!=="soft"&&(mt.untrack(R||t,a?"x,y":l?"rotation":"top,left"),f.tween&&f.tween.kill()),R&&R.disable(),mc(Ft),f.isDragging=f.isPressed=se=!1,v&&Re(f,"dragend","onDragEnd"),f},r.enabled=function(te,v){return arguments.length?te?f.enable(v):f.disable(v):H},r.kill=function(){return f.isThrowing=!1,f.tween&&f.tween.kill(),f.disable(),fe.set(m,{clearProps:"userSelect"}),delete rr[t._gsDragID],f},r.revert=function(){this.kill(),this.styles&&this.styles.revert()},~s.indexOf("scroll")&&(R=r.scrollProxy=new I0(t,M0({onKill:function(){f.isPressed&&Dt(null)}},n)),t.style.overflowY=h&&!is?"auto":"hidden",t.style.overflowX=d&&!is?"auto":"hidden",t=R.content),l?p.rotation=1:(d&&(p[c]=1),h&&(p[u]=1)),b.force3D="force3D"in n?n.force3D:!0,sc(ic(r)),r.enable(),r}return e.register=function(n){fe=n,fs()},e.create=function(n,r){return rs||fs(!0),dn(n).map(function(s){return new e(s,r)})},e.get=function(n){return rr[(dn(n)[0]||{})._gsDragID]},e.timeSinceDrag=function(){return(hn()-uc)/1e3},e.hitTest=function(n,r,s){if(n===r)return!1;var a=lr(n),l=lr(r),c=a.top,u=a.left,d=a.right,h=a.bottom,_=a.width,f=a.height,m=l.left>d||l.right<u||l.top>h||l.bottom<c,p,g,y;return m||!s?!m:(y=(s+"").indexOf("%")!==-1,s=parseFloat(s)||0,p={left:Math.max(u,l.left),top:Math.max(c,l.top)},p.width=Math.min(d,l.right)-p.left,p.height=Math.min(h,l.bottom)-p.top,p.width<0||p.height<0?!1:y?(s*=.01,g=p.width*p.height,g>=_*f*s||g>=l.width*l.height*s):p.width>s&&p.height>s)},e}(V0);A0(cr.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),cr.zIndex=1e3,cr.version="3.14.1",lc()&&fe.registerPlugin(cr);const L0={class:"popup_wrapper"},F0={class:"popup_info"},z0=o.defineComponent({__name:"PopupWindowDraggable",props:{visible:{type:Boolean},styleWindow:{}},emits:["update:visible"],setup(i,{emit:e}){Xt.registerPlugin(cr);const t=i,n=o.ref(t.visible),r=o.ref(null),s=o.ref(null),a=o.ref(0),l=e,c=async()=>{if(!r.value||!s.value)return;await o.nextTick(),a.value=r.value.clientHeight||window.innerHeight,Xt.set(r.value,{y:"100%",opacity:0,immediateRender:!0}),Xt.set(s.value,{opacity:0,immediateRender:!0}),Xt.timeline({onComplete:()=>{cr.create(r.value,{type:"y",bounds:{minY:0,maxY:a.value},onDrag(){s.value&&Xt.set(s.value,{opacity:1-this.y/a.value})},onDragEnd(){this.y>=a.value/3?u():(Xt.to(r.value,{y:0,duration:.5,ease:"expo.inOut"}),Xt.to(s.value,{opacity:1,duration:.5,ease:"expo.inOut"}))}})}}).to(r.value,{y:0,opacity:1,duration:.5,ease:"expo.inOut"}).to(s.value,{opacity:1,duration:.5,ease:"expo.inOut"},0)},u=()=>{!r.value||!s.value||Xt.timeline({onComplete:()=>{n.value=!1,l("update:visible",!1)}}).to(r.value,{y:"100%",opacity:0,duration:.5,ease:"power2.in"}).to(s.value,{opacity:0,duration:.5,ease:"power2.in"},0)};return o.watch(()=>t.visible,d=>{d?(n.value=!0,c()):u()}),o.onMounted(()=>{t.visible&&(n.value=!0,c())}),(d,h)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.withDirectives(o.createElementVNode("div",{class:"background_black",ref_key:"backgroundBlack",ref:s,onClick:u},null,512),[[o.vShow,n.value]]),o.withDirectives(o.createElementVNode("div",{ref_key:"popupOverlay",ref:r,class:"popup_overlay",style:o.normalizeStyle(i.styleWindow)},[o.createElementVNode("div",L0,[h[0]||(h[0]=o.createElementVNode("div",{class:"drag_handle"},null,-1)),o.createElementVNode("div",F0,[o.renderSlot(d.$slots,"default")])])],4),[[o.vShow,n.value]])],64))}}),Ai=Symbol("clickOutside"),U0={mounted(i,e){i[Ai]=t=>{i.contains(t.target)||e.value(t)},document.addEventListener("click",i[Ai])},unmounted(i){i[Ai]&&document.removeEventListener("click",i[Ai])}},H0={class:"button_price_bg"},q0={class:"wrapper_container_price_bg"},W0={class:"button_price"},j0={key:0,class:"image_product_container"},X0=["src"],Y0=o.defineComponent({__name:"BasketButton",emits:["goToCart"],setup(i){const e=Le(),t=Ge(),{totalPrice_lib:n,cartProducts_lib:r}=J.storeToRefs(e),{itemThemes:s}=J.storeToRefs(t);return(a,l)=>(o.openBlock(),o.createElementBlock("div",H0,[o.createElementVNode("div",q0,[o.createElementVNode("div",W0,[o.unref(n)>0&&o.unref(r)?(o.openBlock(),o.createElementBlock("div",j0,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(r).slice(0,3),c=>(o.openBlock(),o.createElementBlock("div",{key:c.id,class:"filter_image_product"},[o.createElementVNode("img",{src:c.image_link||o.unref(s).fallback_image||"",class:"img_product"},null,8,X0)]))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"button_default_main",onClick:l[0]||(l[0]=c=>a.$emit("goToCart"))},[l[2]||(l[2]=o.createElementVNode("div",{class:"icont_cart"},null,-1)),o.createElementVNode("p",null,[o.createVNode(Mt,{price:o.unref(n),fixedFloat:2},null,8,["price"]),l[1]||(l[1]=o.createTextVNode(" ₽",-1))])])])])]))}}),Hr=null,{min:$n,max:Rt,abs:kc,floor:G0}=Math,Sc=(i,e,t)=>$n(t,Rt(e,i)),Cc=i=>[...i].sort((e,t)=>e-t),K0=typeof queueMicrotask=="function"?queueMicrotask:i=>{Promise.resolve().then(i)},hs=()=>{let i;return[new Promise(e=>{i=e}),i]},Ec=i=>{let e;return()=>(i&&(e=i(),i=void 0),e)},qr=(i,e,t)=>{const n=t?"unshift":"push";for(let r=0;r<e;r++)i[n](-1);return i},Tc=(i,e)=>{const t=i.t[e];return t===-1?i.o:t},J0=(i,e,t)=>{const n=i.t[e]===-1;return i.t[e]=t,i.i=$n(e,i.i),n},Bi=(i,e)=>{if(!i.l)return 0;if(i.i>=e)return i.u[e];i.i<0&&(i.u[0]=0,i.i=0);let t=i.i,n=i.u[t];for(;t<e;)n+=Tc(i,t),i.u[++t]=n;return i.i=e,n},ur=(i,e,t=0,n=i.l-1)=>{let r=t;for(;t<=n;){const s=G0((t+n)/2);Bi(i,s)<=e?(r=s,t=s+1):n=s-1}return Sc(r,0,i.l-1)},vc=(i,e,t)=>{const n=e-i.l;return i.i=t?-1:$n(e-1,i.i),i.l=e,n>0?(qr(i.u,n),qr(i.t,n,t),i.o*n):(i.u.splice(n),(t?i.t.splice(0,-n):i.t.splice(n)).reduce((r,s)=>r-(s===-1?i.o:s),0))},Z0=i=>i.documentElement,Q0=i=>i.ownerDocument,eg=i=>i.defaultView,Nc=Ec(()=>!!/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>0),tg=Ec(()=>"scrollBehavior"in Z0(document).style),ng=(i,e=40,t=0,n,r=!1)=>{let s=!!t,a=1,l=0,c=0,u=0,d=0,h=0,_=0,f=0,m=0,p=Hr,g=[0,s?Rt(t-1,0):-1],y=0,w=!1;const x=((R,N,E)=>({o:N,t:E?qr(E.slice(0,$n(R,E.length)),Rt(0,R-E.length)):qr([],R),l:R,i:-1,u:qr([],R+1)}))(i,n?n[1]:e,n&&n[0]),T=new Set,S=()=>u-c,B=()=>S()+h+d,k=(R,N)=>((E,M,A,$)=>{if($=$n($,E.l-1),Bi(E,$)<=M){const V=ur(E,A,$);return[ur(E,M,$,V),V]}{const V=ur(E,M,void 0,$);return[V,ur(E,A,V)]}})(x,R,N,g[0]),b=()=>Bi(x,x.l),C=(R,N)=>{const E=Bi(x,R)-h;return N?b()-E-P(R):E},P=R=>Tc(x,R),O=(R,N=-1)=>x.t[R]===N,H=R=>{R&&(Nc()&&f!==0||p&&m===1?h+=R:d+=R)};return{p:()=>{T.clear()},h:()=>a,m:()=>(R=>[R.t.slice(),R.o])(x),v:(R=200)=>{if(!w||s)return g;let N,E;if(_)[N,E]=g;else{let M=Rt(0,B()),A=M+l;r||(R=Rt(0,R),f!==1&&(M-=R),f!==2&&(A+=R)),[N,E]=g=k(Rt(0,M),Rt(0,A)),p&&(N=$n(N,p[0]),E=Rt(E,p[1]))}return[Rt(N,0),$n(E,x.l-1)]},S:R=>ur(x,R-c),I:O,O:C,k:P,j:()=>x.l,N:()=>u,B:()=>f!==0,T:()=>l,q:()=>c,M:b,P:()=>(_=d,d=0,[_,m===2]),R:(R,N)=>{const E=[R,N];return T.add(E),()=>{T.delete(E)}},A:(R,N)=>{let E,M,A=0;switch(R){case 1:{if(N===u&&m===0)break;const $=_;_=0;const V=N-u,F=kc(V);$&&F<kc($)+1||m!==0||(f=V<0?2:1),s&&(s=!1),u=N,A=4;const z=S();z>=-l&&z<=b()&&(A+=1,M=F>l);break}case 2:A=8,f!==0&&(E=!0,A+=1),f=0,m=0,p=Hr;break;case 3:{const $=N.filter(([V,F])=>!O(V,F));if(!$.length)break;H($.reduce((V,[F,z])=>((m===2||(p&&m===1?F<p[0]:C(F+(f===0&&m===0?1:0))<S()))&&(V+=z-P(F)),V),0));for(const[V,F]of $){const z=P(V),W=J0(x,V,F);r&&(y+=W?F:F-z)}r&&l&&y>l&&(H(((V,F)=>{let z=0;const W=[];V.t.forEach((ie,_e)=>{ie!==-1&&(W.push(ie),_e<F&&z++)}),V.i=-1;const Z=Cc(W),K=Z.length,ue=K/2|0,Y=K%2==0?(Z[ue-1]+Z[ue])/2:Z[ue],U=V.o;return((V.o=Y)-U)*Rt(F-z,0)})(x,ur(x,B()))),r=!1),A=3,M=!0;break}case 4:l!==N&&(l||(w=M=!0),l=N,A=3);break;case 5:N[1]?(H(vc(x,N[0],!0)),m=2,A=1):(vc(x,N[0]),A=1);break;case 6:c=N;break;case 7:m=1;break;case 8:p=k(N,N+l),A=1}A&&(a=1+(2147483647&a),E&&h&&(d+=h,h=0),T.forEach(([$,V])=>{A&$&&V(M)}))}}},ps=setTimeout,ms=(i,e)=>e?-i:i,rg=(i,e,t,n,r,s)=>{const a=Date.now;let l=0,c=!1,u=!1,d=!1,h=!1;const _=(()=>{let y;const w=()=>{y!=Hr&&clearTimeout(y)},x=()=>{w(),y=ps(()=>{y=Hr,(()=>{if(c||u)return c=!1,void _();d=!1,i.A(2)})()},150)};return x.C=w,x})(),f=()=>{l=a(),d&&(h=!0),i.A(1,n()),_()},m=y=>{if(c||!i.B()||y.ctrlKey)return;const w=a()-l;150>w&&50<w&&(t?y.deltaX:y.deltaY)&&(c=!0)},p=()=>{u=!0,d=h=!1},g=()=>{u=!1,Nc()&&(d=!0)};return e.addEventListener("scroll",f),e.addEventListener("wheel",m,{passive:!0}),e.addEventListener("touchstart",p,{passive:!0}),e.addEventListener("touchend",g,{passive:!0}),{H:()=>{e.removeEventListener("scroll",f),e.removeEventListener("wheel",m),e.removeEventListener("touchstart",p),e.removeEventListener("touchend",g),_.C()},V:()=>{const[y,w]=i.P();y&&(r(y,w,h),h=!1,w&&i.T()>i.M()&&i.A(1,n()))}}},ig=(i,e,t)=>{let n;return[async(r,s)=>{if(!await e())return;n&&n();const a=()=>{const[l,c]=hs();return n=()=>{c(!1)},i.T()&&ps(n,150),[l,i.R(2,()=>{c(!0)})]};if(s&&tg())i.A(8,r()),K0(async()=>{for(;;){let l=!0;for(let[d,h]=i.v();d<=h;d++)if(i.I(d)){l=!1;break}if(l)break;const[c,u]=a();try{if(!await c)return}finally{u()}}i.A(7),t(r(),s)});else for(;;){const[l,c]=a();try{if(i.A(7),t(r()),!await l)return}finally{c()}}},()=>{n&&n()}]},og=i=>{let e;return{F(t){(e||(e=new(eg(Q0(t))).ResizeObserver(i))).observe(t)},J(t){e.unobserve(t)},H(){e&&e.disconnect()}}},sg=o.defineComponent({props:{L:{type:Object,required:!0},W:{type:Object,required:!0},X:{type:Object,required:!0},Y:{type:Function,required:!0},D:{type:Number,required:!0},U:{type:Boolean},G:{type:Boolean},K:{type:Boolean},Z:{type:String,required:!0},ee:Object},setup(i){const e=o.ref(),t=o.computed(()=>i.L.value&&i.W.O(i.D,i.K)),n=o.computed(()=>i.L.value&&i.W.I(i.D));return o.watch(()=>e.value&&i.D,(r,s,a)=>{a(i.Y(e.value,i.D))},{flush:"post"}),()=>{var r;const{X:s,U:a,G:l,Z:c}=i,u=n.value,{style:d,...h}=(r=i.ee)!==null&&r!==void 0?r:{},_={contain:"layout style",position:u&&l?void 0:"absolute",[a?"height":"width"]:"100%",[a?"top":"left"]:"0px",[a?"left":"top"]:t.value+"px",visibility:!u||l?void 0:"hidden",...d};return a&&(_.display="inline-flex"),o.createVNode(c,o.mergeProps({ref:e,style:_},h),typeof(f=s)=="function"||Object.prototype.toString.call(f)==="[object Object]"&&!o.isVNode(f)?s:{default:()=>[s],_:2},16,["style"]);var f}}}),ag=(i,e)=>{const t=i.key;return t??"_"+e},lg=(i,e)=>i[0]===e[0]&&i[1]===e[1],Mc=o.defineComponent({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,startMargin:{type:Number,default:0},ssrCount:Number,scrollRef:Object,as:{type:String,default:"div"},item:{type:String,default:"div"},itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(i,{emit:e,expose:t,slots:n}){let r=!!i.ssrCount;const s=i.horizontal,a=o.ref(),l=ng(i.data.length,i.itemSize,i.ssrCount,i.cache,!i.itemSize),c=((m,p)=>{let g;const y=p?"width":"height",w=new WeakMap,x=og(T=>{const S=[];for(const{target:B,contentRect:k}of T)if(B.offsetParent)if(B===g)m.A(4,k[y]);else{const b=w.get(B);b!=Hr&&S.push([b,k[y]])}S.length&&m.A(3,S)});return{te(T){x.F(g=T)},re:(T,S)=>(w.set(T,S),x.F(T),()=>{w.delete(T),x.J(T)}),p:x.H}})(l,s),u=((m,p)=>{let g,y,w=hs(),x=!1;const T=p?"scrollLeft":"scrollTop",S=p?"overflowX":"overflowY",[B,k]=ig(m,()=>w[0],(b,C)=>{b=ms(b,x),C?g.scrollTo({[p?"left":"top"]:b,behavior:"smooth"}):g[T]=b});return{oe(b){g=b,p&&(x=getComputedStyle(b).direction==="rtl"),y=rg(m,b,p,()=>ms(b[T],x),(C,P,O)=>{if(O){const H=b.style,R=H[S];H[S]="hidden",ps(()=>{H[S]=R})}b[T]=ms(m.N()+C,x),P&&k()}),w[1](!0)},p(){y&&y.H(),w[1](!1),w=hs()},ne:()=>x,se(b){B(()=>b)},ie(b){b+=m.N(),B(()=>b)},le(b,{align:C,smooth:P,offset:O=0}={}){if(b=Sc(b,0,m.j()-1),C==="nearest"){const H=m.O(b),R=m.N();if(H<R)C="start";else{if(!(H+m.k(b)>R+m.T()))return;C="end"}}B(()=>O+m.q()+m.O(b)+(C==="end"?m.k(b)-m.T():C==="center"?(m.k(b)-m.T())/2:0),P)},ce:()=>{y&&y.V()}}})(l,s),d=o.ref(l.h());l.R(1,()=>{d.value=l.h()}),l.R(4,()=>{e("scroll",l.N())}),l.R(8,()=>{e("scrollEnd")});const h=o.computed(m=>{d.value;const p=l.v(i.bufferSize);return m&&lg(m,p)?m:p}),_=o.computed(()=>d.value&&l.B()),f=o.computed(()=>d.value&&l.M());return o.onMounted(()=>{r=!1;const m=requestAnimationFrame(()=>{const p=g=>{c.te(g),u.oe(g)};i.scrollRef?p(i.scrollRef):p(a.value.parentElement)});o.onUnmounted(()=>{cancelAnimationFrame(m)})}),o.onUnmounted(()=>{l.p(),c.p(),u.p()}),o.watch(()=>i.data.length,m=>{l.A(5,[m,i.shift])}),o.watch(()=>i.startMargin,m=>{l.A(6,m)},{immediate:!0}),o.watch([d],()=>{u.ce()},{flush:"post"}),t({get cache(){return l.m()},get scrollOffset(){return l.N()},get scrollSize(){return(m=>Rt(m.M(),m.T()))(l)},get viewportSize(){return l.T()},findItemIndex:l.S,getItemOffset:l.O,getItemSize:l.k,scrollToIndex:u.le,scrollTo:u.se,scrollBy:u.ie}),()=>{const m=i.as,p=i.item,g=f.value,y=u.ne(),w=!s&&y?"unshift":"push",x=[],T=B=>{var k;const b=n.default({item:i.data[B],index:B})[0];return o.createVNode(sg,{key:ag(b,B),L:d,W:l,Y:c.re,D:B,X:b,U:s,K:y,G:r,Z:p,ee:(k=i.itemProps)===null||k===void 0?void 0:k.call(i,{item:i.data[B],index:B})},null,8,["L","W","Y","D","X","U","K","G","Z","ee"])};if(i.keepMounted){const B=new Set(i.keepMounted);for(let[k,b]=h.value;k<=b;k++)B.add(k);Cc([...B]).forEach(k=>{x[w](T(k))})}else for(let[B,k]=h.value;B<=k;B++)x[w](T(B));return o.createVNode(m,{ref:a,style:{contain:"size style",overflowAnchor:"none",flex:"none",position:"relative",width:s?g+"px":"100%",height:s?"100%":g+"px",pointerEvents:_.value?"none":void 0}},typeof(S=x)=="function"||Object.prototype.toString.call(S)==="[object Object]"&&!o.isVNode(S)?x:{default:()=>[x],_:2},8,["style"]);var S}}}),cg=o.defineComponent({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,ssrCount:Number,itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(i,{emit:e,expose:t,slots:n}){const r=i.horizontal,s=c=>{e("scroll",c)},a=()=>{e("scrollEnd")},l=o.ref();return t({get cache(){return l.value.cache},get scrollOffset(){return l.value.scrollOffset},get scrollSize(){return l.value.scrollSize},get viewportSize(){return l.value.viewportSize},findItemIndex:(...c)=>l.value.findItemIndex(...c),getItemOffset:(...c)=>l.value.getItemOffset(...c),getItemSize:(...c)=>l.value.getItemSize(...c),scrollToIndex:(...c)=>l.value.scrollToIndex(...c),scrollTo:(...c)=>l.value.scrollTo(...c),scrollBy:(...c)=>l.value.scrollBy(...c)}),()=>{return o.createVNode("div",{style:{display:r?"inline-block":"block",[r?"overflowX":"overflowY"]:"auto",contain:"strict",width:"100%",height:"100%"}},[o.createVNode(Mc,{ref:l,data:i.data,bufferSize:i.bufferSize,itemSize:i.itemSize,itemProps:i.itemProps,shift:i.shift,ssrCount:i.ssrCount,horizontal:r,keepMounted:i.keepMounted,cache:i.cache,onScroll:s,onScrollEnd:a},(c=n,typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!o.isVNode(c)?n:{default:()=>[n],_:2}),8,["data","bufferSize","itemSize","itemProps","shift","ssrCount","horizontal","keepMounted","cache","onScroll","onScrollEnd"])],4);var c}}}),ug=(i,e=10)=>new Promise(t=>{let n=0,r=0,s=0;const a=()=>{const l=i.scrollSize;l===s&&l>0?n++:(n=0)&&(s=l),r++,n>=2||r>=e?t():requestAnimationFrame(a)};requestAnimationFrame(a)});function dg(i,e){const t=(e==null?void 0:e.align)??"start";let n=!1;const r=o.ref(null),s=o.ref(!1),a=o.ref("measure"),l=o.computed(()=>o.toValue(i).length),c=o.computed(()=>a.value==="measure"?1:5),u=o.computed(()=>Array.from({length:l.value*c.value},(g,y)=>y)),d=async()=>{if(r.value&&(a.value="measure",n=!1,s.value=!1,await o.nextTick(),a.value==="measure")){if(await ug(r.value),s.value=r.value.scrollSize>r.value.viewportSize,!s.value){n=!1;return}n=!0,a.value="loop",await o.nextTick(),r.value.scrollToIndex(l.value*3,{align:t})}},h=g=>a.value==="measure"?g:l.value===0?0:g%l.value,_=(g,y)=>{r.value&&r.value.scrollToIndex(g,y)},f=(g,y)=>!n||a.value!=="loop"?y:y+Math.round((g-y)/l.value)*l.value,m=g=>{if(!n||a.value!=="loop"||!r.value)return;const y=l.value-1,w=l.value*4;if(g<y)return _(l.value*3-1,{align:"start"});if(g>=w)return _(l.value*3,{align:"start"})},p=()=>{if(!r.value||!n)return;const g=r.value.findItemIndex(r.value.scrollOffset);m(g)};return o.onMounted(d),o.onUnmounted(()=>r.value=null),o.watch(l,()=>o.nextTick(d)),{listRef:r,items:u,hasScroll:s,realIndex:h,findNearestIndex:f,scrollToIndex:_,init:d,onScroll:p}}const fg={pinch:!0,doubleTap:!0,wheel:!0,buttons:["+","-","=","0"]},hg=i=>{var t;const e=Object.assign({},fg,i);if(e.pinch&&(document.addEventListener("touchstart",n=>n.touches.length>1&&n.preventDefault(),{passive:!1}),document.addEventListener("gesturestart",n=>n.preventDefault(),{passive:!1})),e.doubleTap){let n=0;document.addEventListener("touchend",r=>{const s=Date.now();s-n<=250&&r.preventDefault(),n=s},{passive:!1})}e.wheel&&document.addEventListener("wheel",n=>(n.ctrlKey||n.metaKey)&&n.preventDefault(),{passive:!1}),(t=e.buttons)!=null&&t.length&&document.addEventListener("keydown",n=>(n.ctrlKey||n.metaKey)&&e.buttons.includes(n.key)&&n.preventDefault())};Object.defineProperty(X,"useRoute",{enumerable:!0,get:()=>re.useRoute}),Object.defineProperty(X,"useRouter",{enumerable:!0,get:()=>re.useRouter}),X.BasketButton=Y0,X.ButtonDefault=en,X.CardMain=$a,X.CardProductPage=$h,X.CardReader=Da,X.CartBox=Ra,X.CartPage=am,X.DrumItem=Um,X.GroupMain=Dm,X.InitConnection=Qt,X.ModalWindows=Qm,X.NotificationWindow=lo,X.PopupWindowDefault=Ba,X.PopupWindowDraggable=z0,X.Recommendation=Km,X.RetryPage=ym,X.TagsMain=$m,X.VList=cg,X.Virtualizer=Mc,X.clearLocalStorage=Fn,X.initPinia=Ii,X.initRouter=Fc,X.preventZoom=hg,X.useCardLibStore=Ke,X.useCartLibStore=zn,X.useImageCacheStore=Ia,X.useMainLibStore=Le,X.useModal=Oa,X.useModalStore=co,X.useThemeStore=Ge,X.useVirtuaLoop=dg,X.vClickOutside=U0,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
1
+ (function(j,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("vue-router"),require("pinia"),require("vue"),require("@vueuse/core"),require("motion-v")):typeof define=="function"&&define.amd?define(["exports","vue-router","pinia","vue","@vueuse/core","motion-v"],Y):(j=typeof globalThis<"u"?globalThis:j||self,Y(j.InnoCloudsLib={},j.VueRouter,j.Pinia,j.Vue,j.VueuseCore,j.motionV))})(this,function(j,Y,q,e,Te,ce){"use strict";var Xc=Object.defineProperty;var Zc=(j,Y,q)=>Y in j?Xc(j,Y,{enumerable:!0,configurable:!0,writable:!0,value:q}):j[Y]=q;var Z=(j,Y,q)=>Zc(j,typeof Y!="symbol"?Y+"":Y,q);function Cr(t){return t}const Sr=[];function Er(){return Y.createRouter({history:Y.createWebHistory(),routes:Sr})}const bt=(t,n)=>n.some(r=>t instanceof r);let Xt,Zt;function xr(){return Xt||(Xt=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Nr(){return Zt||(Zt=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const wt=new WeakMap,kt=new WeakMap,Qe=new WeakMap;function Br(t){const n=new Promise((r,o)=>{const a=()=>{t.removeEventListener("success",s),t.removeEventListener("error",i)},s=()=>{r(Ae(t.result)),a()},i=()=>{o(t.error),a()};t.addEventListener("success",s),t.addEventListener("error",i)});return Qe.set(n,t),n}function Tr(t){if(wt.has(t))return;const n=new Promise((r,o)=>{const a=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",i),t.removeEventListener("abort",i)},s=()=>{r(),a()},i=()=>{o(t.error||new DOMException("AbortError","AbortError")),a()};t.addEventListener("complete",s),t.addEventListener("error",i),t.addEventListener("abort",i)});wt.set(t,n)}let Ct={get(t,n,r){if(t instanceof IDBTransaction){if(n==="done")return wt.get(t);if(n==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ae(t[n])},set(t,n,r){return t[n]=r,!0},has(t,n){return t instanceof IDBTransaction&&(n==="done"||n==="store")?!0:n in t}};function Yt(t){Ct=t(Ct)}function Ar(t){return Nr().includes(t)?function(...n){return t.apply(St(this),n),Ae(this.request)}:function(...n){return Ae(t.apply(St(this),n))}}function vr(t){return typeof t=="function"?Ar(t):(t instanceof IDBTransaction&&Tr(t),bt(t,xr())?new Proxy(t,Ct):t)}function Ae(t){if(t instanceof IDBRequest)return Br(t);if(kt.has(t))return kt.get(t);const n=vr(t);return n!==t&&(kt.set(t,n),Qe.set(n,t)),n}const St=t=>Qe.get(t);function $r(t,n,{blocked:r,upgrade:o,blocking:a,terminated:s}={}){const i=indexedDB.open(t,n),l=Ae(i);return o&&i.addEventListener("upgradeneeded",c=>{o(Ae(i.result),c.oldVersion,c.newVersion,Ae(i.transaction),c)}),r&&i.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),l.then(c=>{s&&c.addEventListener("close",()=>s()),a&&c.addEventListener("versionchange",d=>a(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const Mr=["get","getKey","getAll","getAllKeys","count"],Pr=["put","add","delete","clear"],Et=new Map;function Qt(t,n){if(!(t instanceof IDBDatabase&&!(n in t)&&typeof n=="string"))return;if(Et.get(n))return Et.get(n);const r=n.replace(/FromIndex$/,""),o=n!==r,a=Pr.includes(r);if(!(r in(o?IDBIndex:IDBObjectStore).prototype)||!(a||Mr.includes(r)))return;const s=async function(i,...l){const c=this.transaction(i,a?"readwrite":"readonly");let d=c.store;return o&&(d=d.index(l.shift())),(await Promise.all([d[r](...l),a&&c.done]))[0]};return Et.set(n,s),s}Yt(t=>({...t,get:(n,r,o)=>Qt(n,r)||t.get(n,r,o),has:(n,r)=>!!Qt(n,r)||t.has(n,r)}));const Ir=["continue","continuePrimaryKey","advance"],en={},xt=new WeakMap,tn=new WeakMap,Vr={get(t,n){if(!Ir.includes(n))return t[n];let r=en[n];return r||(r=en[n]=function(...o){xt.set(this,tn.get(this)[n](...o))}),r}};async function*Rr(...t){let n=this;if(n instanceof IDBCursor||(n=await n.openCursor(...t)),!n)return;n=n;const r=new Proxy(n,Vr);for(tn.set(r,n),Qe.set(r,St(n));n;)yield r,n=await(xt.get(r)||n.continue()),xt.delete(r)}function nn(t,n){return n===Symbol.asyncIterator&&bt(t,[IDBIndex,IDBObjectStore,IDBCursor])||n==="iterate"&&bt(t,[IDBIndex,IDBObjectStore])}Yt(t=>({...t,get(n,r,o){return nn(n,r)?Rr:t.get(n,r,o)},has(n,r){return nn(n,r)||t.has(n,r)}}));let Nt;async function ve(){return Nt||(Nt=$r("data",1,{upgrade(t){t.objectStoreNames.contains("groups")||t.createObjectStore("groups",{keyPath:"id"}),t.objectStoreNames.contains("images")||t.createObjectStore("images",{keyPath:"id"}),t.objectStoreNames.contains("products")||t.createObjectStore("products",{keyPath:"id"})}})),Nt}async function et(t){return(await ve()).transaction("groups","readonly").objectStore("groups").get(t)}async function Ue(t,n){const o=(await ve()).transaction("groups","readwrite");await o.objectStore("groups").put({id:t,data:n,timestamp:Date.now()}),await o.done}async function Or(t,n){const r=JSON.parse(JSON.stringify(e.toRaw(n.value)));await Ue(t,r)}async function rn(t,n){const o=(await ve()).transaction("images","readwrite");await o.objectStore("images").put({id:t,blob:n,timestamp:Date.now()}),await o.done}async function He(t){const a=await(await ve()).transaction("images","readonly").objectStore("images").get(t);return a==null?void 0:a.blob}async function Dr(t){const r=(await ve()).transaction("products","readwrite"),o=r.objectStore("products"),a=t.id;await o.put({id:a,product:t,timestamp:Date.now()}),await r.done}async function on(t){const a=await(await ve()).transaction("products","readonly").objectStore("products").get(t);return a==null?void 0:a.product}function tt(t){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tt(t)}var Fr=/^\s+/,Lr=/\s+$/;function H(t,n){if(t=t||"",n=n||{},t instanceof H)return t;if(!(this instanceof H))return new H(t,n);var r=zr(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}H.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,o,a,s,i,l;return r=n.r/255,o=n.g/255,a=n.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?i=o/12.92:i=Math.pow((o+.055)/1.055,2.4),a<=.03928?l=a/12.92:l=Math.pow((a+.055)/1.055,2.4),.2126*s+.7152*i+.0722*l},setAlpha:function(n){return this._a=un(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=sn(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=sn(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),a=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+o+"%, "+a+"%)":"hsva("+r+", "+o+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var n=an(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=an(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),a=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+o+"%, "+a+"%)":"hsla("+r+", "+o+"%, "+a+"%, "+this._roundA+")"},toHex:function(n){return ln(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return qr(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ae(this._r,255)*100)+"%",g:Math.round(ae(this._g,255)*100)+"%",b:Math.round(ae(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ae(this._r,255)*100)+"%, "+Math.round(ae(this._g,255)*100)+"%, "+Math.round(ae(this._b,255)*100)+"%)":"rgba("+Math.round(ae(this._r,255)*100)+"%, "+Math.round(ae(this._g,255)*100)+"%, "+Math.round(ae(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ro[ln(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+cn(this._r,this._g,this._b,this._a),o=r,a=this._gradientType?"GradientType = 1, ":"";if(n){var s=H(n);o="#"+cn(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+o+")"},toString:function(n){var r=!!n;n=n||this._format;var o=!1,a=this._a<1&&this._a>=0,s=!r&&a&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return s?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(o=this.toRgbString()),n==="prgb"&&(o=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(o=this.toHexString()),n==="hex3"&&(o=this.toHexString(!0)),n==="hex4"&&(o=this.toHex8String(!0)),n==="hex8"&&(o=this.toHex8String()),n==="name"&&(o=this.toName()),n==="hsl"&&(o=this.toHslString()),n==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(n,r){var o=n.apply(null,[this].concat([].slice.call(r)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(Jr,arguments)},brighten:function(){return this._applyModification(Xr,arguments)},darken:function(){return this._applyModification(Zr,arguments)},desaturate:function(){return this._applyModification(Wr,arguments)},saturate:function(){return this._applyModification(Gr,arguments)},greyscale:function(){return this._applyModification(Kr,arguments)},spin:function(){return this._applyModification(Yr,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(to,arguments)},complement:function(){return this._applyCombination(Qr,arguments)},monochromatic:function(){return this._applyCombination(no,arguments)},splitcomplement:function(){return this._applyCombination(eo,arguments)},triad:function(){return this._applyCombination(dn,[3])},tetrad:function(){return this._applyCombination(dn,[4])}},H.fromRatio=function(t,n){if(tt(t)=="object"){var r={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?r[o]=t[o]:r[o]=je(t[o]));t=r}return H(t,n)};function zr(t){var n={r:0,g:0,b:0},r=1,o=null,a=null,s=null,i=!1,l=!1;return typeof t=="string"&&(t=io(t)),tt(t)=="object"&&(xe(t.r)&&xe(t.g)&&xe(t.b)?(n=Ur(t.r,t.g,t.b),i=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):xe(t.h)&&xe(t.s)&&xe(t.v)?(o=je(t.s),a=je(t.v),n=jr(t.h,o,a),i=!0,l="hsv"):xe(t.h)&&xe(t.s)&&xe(t.l)&&(o=je(t.s),s=je(t.l),n=Hr(t.h,o,s),i=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=un(r),{ok:i,format:t.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function Ur(t,n,r){return{r:ae(t,255)*255,g:ae(n,255)*255,b:ae(r,255)*255}}function an(t,n,r){t=ae(t,255),n=ae(n,255),r=ae(r,255);var o=Math.max(t,n,r),a=Math.min(t,n,r),s,i,l=(o+a)/2;if(o==a)s=i=0;else{var c=o-a;switch(i=l>.5?c/(2-o-a):c/(o+a),o){case t:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-t)/c+2;break;case r:s=(t-n)/c+4;break}s/=6}return{h:s,s:i,l}}function Hr(t,n,r){var o,a,s;t=ae(t,360),n=ae(n,100),r=ae(r,100);function i(d,u,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(u-d)*6*p:p<1/2?u:p<2/3?d+(u-d)*(2/3-p)*6:d}if(n===0)o=a=s=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;o=i(c,l,t+1/3),a=i(c,l,t),s=i(c,l,t-1/3)}return{r:o*255,g:a*255,b:s*255}}function sn(t,n,r){t=ae(t,255),n=ae(n,255),r=ae(r,255);var o=Math.max(t,n,r),a=Math.min(t,n,r),s,i,l=o,c=o-a;if(i=o===0?0:c/o,o==a)s=0;else{switch(o){case t:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-t)/c+2;break;case r:s=(t-n)/c+4;break}s/=6}return{h:s,s:i,v:l}}function jr(t,n,r){t=ae(t,360)*6,n=ae(n,100),r=ae(r,100);var o=Math.floor(t),a=t-o,s=r*(1-n),i=r*(1-a*n),l=r*(1-(1-a)*n),c=o%6,d=[r,i,s,s,l,r][c],u=[l,r,r,i,s,s][c],p=[s,s,l,r,r,i][c];return{r:d*255,g:u*255,b:p*255}}function ln(t,n,r,o){var a=[ye(Math.round(t).toString(16)),ye(Math.round(n).toString(16)),ye(Math.round(r).toString(16))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function qr(t,n,r,o,a){var s=[ye(Math.round(t).toString(16)),ye(Math.round(n).toString(16)),ye(Math.round(r).toString(16)),ye(fn(o))];return a&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function cn(t,n,r,o){var a=[ye(fn(o)),ye(Math.round(t).toString(16)),ye(Math.round(n).toString(16)),ye(Math.round(r).toString(16))];return a.join("")}H.equals=function(t,n){return!t||!n?!1:H(t).toRgbString()==H(n).toRgbString()},H.random=function(){return H.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Wr(t,n){n=n===0?0:n||10;var r=H(t).toHsl();return r.s-=n/100,r.s=nt(r.s),H(r)}function Gr(t,n){n=n===0?0:n||10;var r=H(t).toHsl();return r.s+=n/100,r.s=nt(r.s),H(r)}function Kr(t){return H(t).desaturate(100)}function Jr(t,n){n=n===0?0:n||10;var r=H(t).toHsl();return r.l+=n/100,r.l=nt(r.l),H(r)}function Xr(t,n){n=n===0?0:n||10;var r=H(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),H(r)}function Zr(t,n){n=n===0?0:n||10;var r=H(t).toHsl();return r.l-=n/100,r.l=nt(r.l),H(r)}function Yr(t,n){var r=H(t).toHsl(),o=(r.h+n)%360;return r.h=o<0?360+o:o,H(r)}function Qr(t){var n=H(t).toHsl();return n.h=(n.h+180)%360,H(n)}function dn(t,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=H(t).toHsl(),o=[H(t)],a=360/n,s=1;s<n;s++)o.push(H({h:(r.h+s*a)%360,s:r.s,l:r.l}));return o}function eo(t){var n=H(t).toHsl(),r=n.h;return[H(t),H({h:(r+72)%360,s:n.s,l:n.l}),H({h:(r+216)%360,s:n.s,l:n.l})]}function to(t,n,r){n=n||6,r=r||30;var o=H(t).toHsl(),a=360/r,s=[H(t)];for(o.h=(o.h-(a*n>>1)+720)%360;--n;)o.h=(o.h+a)%360,s.push(H(o));return s}function no(t,n){n=n||6;for(var r=H(t).toHsv(),o=r.h,a=r.s,s=r.v,i=[],l=1/n;n--;)i.push(H({h:o,s:a,v:s})),s=(s+l)%1;return i}H.mix=function(t,n,r){r=r===0?0:r||50;var o=H(t).toRgb(),a=H(n).toRgb(),s=r/100,i={r:(a.r-o.r)*s+o.r,g:(a.g-o.g)*s+o.g,b:(a.b-o.b)*s+o.b,a:(a.a-o.a)*s+o.a};return H(i)},H.readability=function(t,n){var r=H(t),o=H(n);return(Math.max(r.getLuminance(),o.getLuminance())+.05)/(Math.min(r.getLuminance(),o.getLuminance())+.05)},H.isReadable=function(t,n,r){var o=H.readability(t,n),a,s;switch(s=!1,a=lo(r),a.level+a.size){case"AAsmall":case"AAAlarge":s=o>=4.5;break;case"AAlarge":s=o>=3;break;case"AAAsmall":s=o>=7;break}return s},H.mostReadable=function(t,n,r){var o=null,a=0,s,i,l,c;r=r||{},i=r.includeFallbackColors,l=r.level,c=r.size;for(var d=0;d<n.length;d++)s=H.readability(t,n[d]),s>a&&(a=s,o=H(n[d]));return H.isReadable(t,o,{level:l,size:c})||!i?o:(r.includeFallbackColors=!1,H.mostReadable(t,["#fff","#000"],r))};var Bt=H.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ro=H.hexNames=oo(Bt);function oo(t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[t[r]]=r);return n}function un(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function ae(t,n){ao(t)&&(t="100%");var r=so(t);return t=Math.min(n,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),Math.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function nt(t){return Math.min(1,Math.max(0,t))}function he(t){return parseInt(t,16)}function ao(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function so(t){return typeof t=="string"&&t.indexOf("%")!=-1}function ye(t){return t.length==1?"0"+t:""+t}function je(t){return t<=1&&(t=t*100+"%"),t}function fn(t){return Math.round(parseFloat(t)*255).toString(16)}function pn(t){return he(t)/255}var be=function(){var t="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+t+")",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function xe(t){return!!be.CSS_UNIT.exec(t)}function io(t){t=t.replace(Fr,"").replace(Lr,"").toLowerCase();var n=!1;if(Bt[t])t=Bt[t],n=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=be.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=be.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=be.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=be.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=be.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=be.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=be.hex8.exec(t))?{r:he(r[1]),g:he(r[2]),b:he(r[3]),a:pn(r[4]),format:n?"name":"hex8"}:(r=be.hex6.exec(t))?{r:he(r[1]),g:he(r[2]),b:he(r[3]),format:n?"name":"hex"}:(r=be.hex4.exec(t))?{r:he(r[1]+""+r[1]),g:he(r[2]+""+r[2]),b:he(r[3]+""+r[3]),a:pn(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=be.hex3.exec(t))?{r:he(r[1]+""+r[1]),g:he(r[2]+""+r[2]),b:he(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function lo(t){var n,r;return t=t||{level:"AA",size:"small"},n=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}const Tt=q.defineStore("imageCache",()=>{const t=e.ref({});async function n(a){if(!a){console.warn("initCacheSingle called with null/undefined id");return}const s=String(a);if(t.value[s])return;const i=await He(a);if(!i)return;const l=URL.createObjectURL(i);t.value[s]=l,window.dispatchEvent(new CustomEvent("image-cached",{detail:{id:s,blob:i}}))}function r(a){return e.computed(()=>t.value[String(a)]||null)}function o(){Object.values(t.value).forEach(URL.revokeObjectURL),t.value={}}return{cache:t,initCacheSingle:n,getImageUrl:r,cleanup:o}}),_e=q.defineStore("themeLib",()=>{const t=Tt(),{initCacheSingle:n}=t,r=e.ref({id:"",created_at:null,logo:null,primary_color:null,accent_color:null,accent_light_color:null,accent_dark_color:null,bg_button_color:null,inactive_button_color:null,cards_color:null,text_color:null,nonworking_bg_color:null,splash_image_url:null,splash_video:null,splash_duration:0,splash_type:null,fallback_image:null,adult_disclaimer_text:null,adult_disclaimer_image:null,kiosk_banner:null,kiosk_preloader:null,organization:"",gradientStyle:null,kiosk_inactivity_timeout:null,kiosk_show_loyalty_card_button:null,kiosk_show_loyalty_phone_input_button:null,show_order_comment:null,show_nutrition_in_cart:null,apply_custom_size_picker_fonts:null,size_picker_unselected_font_size:null,size_picker_selected_font_size:null}),o=async s=>{if(!s)return;r.value={...s};const i=await He("banner"),l=await He("preloader"),c=await He("defaultImage");i||a(s.kiosk_banner,"banner"),l||a(s.kiosk_preloader,"preloader"),c||a(s.fallback_image,"defaultImage"),document.documentElement.style.setProperty("--primaryColor",s.primary_color),document.documentElement.style.setProperty("--accentColor",s.accent_color),document.documentElement.style.setProperty("--accentLightColor",s.accent_light_color),document.documentElement.style.setProperty("--accentDarkColor",s.accent_dark_color),document.documentElement.style.setProperty("--bgButtonColor",s.bg_button_color),document.documentElement.style.setProperty("--inactiveButtonColor",s.inactive_button_color),document.documentElement.style.setProperty("--cardsColor",s.cards_color),document.documentElement.style.setProperty("--textColor",s.text_color),document.documentElement.style.setProperty("--nonworkingBgColor",s.nonworking_bg_color),s.apply_custom_size_picker_fonts&&s.size_picker_unselected_font_size&&s.size_picker_unselected_font_size>0&&document.documentElement.style.setProperty("--sizePickerUnselectedFontSize",`${s.size_picker_unselected_font_size}rem`),s.apply_custom_size_picker_fonts&&s.size_picker_selected_font_size&&s.size_picker_selected_font_size>0&&document.documentElement.style.setProperty("--sizePickerSelectedFontSize",`${s.size_picker_selected_font_size}rem`);const d=r.value.primary_color||"#F2F7FF",u=H(d).setAlpha(.7).toRgbString(),p=`linear-gradient(to bottom, transparent 10%, ${u} 50%, ${d} 85%)`,y=`-webkit-linear-gradient(to bottom, transparent 10%, ${u} 50%, ${d} 85%)`;return r.value.gradientStyle={background:p,backgroundColor:y},r.value},a=async(s,i)=>{if(s){const l=await fetch(s);if(!l.ok)throw new Error("Network error");const c=await l.blob();rn(i,c),n(i)}};return{itemThemes:r,updateColor:o}}),Re=t=>{if(!t)return 0;if((t.price===0||t.price===null)&&t.sizes&&t.sizes.length>0){const n=t.sizes.find(r=>r.is_default===!0);return n?n.price:t.sizes.length>1&&t.sizes[1].price||t.sizes[0].price}return t.price};class qe extends Error{}qe.prototype.name="InvalidTokenError";function co(t){return decodeURIComponent(atob(t).replace(/(.)/g,(n,r)=>{let o=r.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function uo(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return co(n)}catch{return atob(n)}}function mn(t,n){if(typeof t!="string")throw new qe("Invalid token specified: must be a string");n||(n={});const r=n.header===!0?0:1,o=t.split(".")[r];if(typeof o!="string")throw new qe(`Invalid token specified: missing part #${r+1}`);let a;try{a=uo(o)}catch(s){throw new qe(`Invalid token specified: invalid base64 for part #${r+1} (${s.message})`)}try{return JSON.parse(a)}catch(s){throw new qe(`Invalid token specified: invalid json for part #${r+1} (${s.message})`)}}const fo=(t,n)=>{if(typeof window<"u"){const r=localStorage.getItem(t);return r?JSON.parse(r):n}return n},po=(t,n)=>{if(typeof window<"u"){const r=localStorage.getItem(t);if(r)try{return mn(JSON.parse(r))}catch(o){return console.error("Failed to decode JWT:",o),n}}return n},hn=(t,n,r="normal")=>{const o=e.ref(r==="jwt"?po(t,n):fo(t,n));return e.watchEffect(()=>{o.value===null||o.value===void 0?localStorage.removeItem(t):r!=="jwt"&&localStorage.setItem(t,JSON.stringify(o.value))}),o},rt=t=>{t.forEach(n=>{try{localStorage.removeItem(n)}catch(r){console.error(`Ошибка при удалении ключа "${n}":`,r)}})},le=q.defineStore("mainLib",()=>{const t=e.ref(),n=e.ref(!1),r=e.ref(localStorage.getItem("kiosk_timeout")),o=e.ref(0),a=e.ref(!1),s=e.ref(sessionStorage.getItem("is_adult")==="true"),i=e.ref([]),l=e.ref([]),c=e.ref(),d=e.ref(""),u=e.ref(0),p=e.ref(!1),y=e.ref(!1),v=e.ref(localStorage.getItem("apiKey")===null),f=e.ref(!1),b=e.ref({textNotification:""}),m=e.ref([]),C=x=>{o.value=x,localStorage.setItem("kiosk_timeout",x)},h=x=>{n.value=x},_=e.computed(()=>i.value.length===0?0:i.value.reduce((x,g)=>{const w=Re(g)*g.amount;let T=0,A=0;return g.group_modifiers&&(T=g.group_modifiers.reduce((B,P)=>P.modifiers?B+P.modifiers.reduce((F,z)=>F+z.price*z.amount,0):0,0)*g.amount),g.modifiers&&(A=g.modifiers.reduce((B,P)=>B+P.price*P.amount,0)*g.amount),x+w+T+A},0)),S=x=>{u.value=x,localStorage.removeItem("bonus"),hn("bonus",u.value)},V=x=>{rt(x)},O=x=>{x={...x,idSystem:crypto.randomUUID()};const g=E(x);i.value.push(g),I()},I=()=>{try{if(!i.value||i.value.length===0){localStorage.removeItem("cart");return}localStorage.setItem("cart",JSON.stringify(e.toRaw(i.value)))}catch(x){console.error("Failed to update cart in localStorage:",x)}},E=x=>e.reactive({...x,amount:x.amount??1,price:x.old_price,new_price:null,discounts:[],modifiers:(x.modifiers||[]).map(g=>e.reactive({...g,price:g.old_price,new_price:null})),group_modifiers:(x.group_modifiers||[]).map(g=>e.reactive({...g,modifiers:(g.modifiers||[]).map(w=>e.reactive({...w,price:w.old_price,new_price:null}))}))}),M=x=>{const g=i.value.find(w=>w.idSystem===x);g&&(g.amount+=1),I()},$=x=>{const g=i.value.find(w=>w.idSystem===x);g&&(g.amount>=1&&(g.amount-=1),I())},N=()=>{try{const x=localStorage.getItem("cart");if(x){const g=JSON.parse(x);i.value.splice(0,i.value.length,...g.map(E))}}catch(x){console.error("Failed to load cart from localStorage:",x)}};return N(),{cartProducts_lib:i,activeScrolling_lib:l,config_lib:c,totalPrice_lib:_,is_notification_lib:f,notificationData_lib:b,xApiKey_lib:d,countBonus:u,toggleDrum:n,is_showApiKey:v,openApiKey:p,kiosk_timeout:r,kiosk_FirstTimeout:o,is_OpenLoyal:y,profile:t,is_18_above_content:a,is18Allowed:s,displayCards:m,removeFromLocalStorage:V,setKioskTimeout:C,setBonus:S,setStateDrum:h,addToCart:O,plusAmount:M,minusAmount:$,loadCart:N,deleteItemFromCart:x=>{if(x){const g=i.value.findIndex(w=>w.idSystem===x);if(g===-1)return;i.value.splice(g,1),I()}else i.value=[],I()},updateCartInLocalStorage:I,makeProductFullyReactive:E}});class mo{constructor(n,r={}){Z(this,"url");Z(this,"options");Z(this,"ws");Z(this,"reconnectInterval");Z(this,"listeners");Z(this,"isConnected");Z(this,"heartbeat");Z(this,"pingTimeout");Z(this,"pingResponseTimeout");Z(this,"_shouldReconnect",!0);this.url=n,this.options=r,this.ws=null,this.reconnectInterval=5e3,this.pingResponseTimeout=5e3,this.listeners=new Map,this.isConnected=e.ref(!1)}connect(){if(this.ws&&this.ws.readyState===WebSocket.OPEN){console.warn("WebSocket already open");return}if(!this._shouldReconnect){console.warn("Reconnection disabled");return}const n=`${this.url}`;this.ws=new WebSocket(n),this.ws.onopen=()=>{console.warn("WebSocket connected"),this.isConnected.value=!0,this.emit("open"),this.heartbeat=setInterval(()=>this.sendPing(),3e5)},this.ws.onmessage=r=>{try{const o=JSON.parse(r.data);this.emit("message",o),o!=null&&o.type&&o.type!=="ping"&&clearTimeout(this.pingTimeout)}catch(o){console.error("Error parsing WebSocket message:",o)}},this.ws.onerror=r=>{console.error("WebSocket error:",r),this.emit("error",r),this.close(!0)},this.ws.onclose=()=>{this.isConnected.value=!1,console.warn("WebSocket closed"),this.emit("close"),clearInterval(this.heartbeat),clearTimeout(this.pingTimeout),this._shouldReconnect&&(console.log(`Reconnecting in ${this.reconnectInterval}ms...`),setTimeout(()=>this.connect(),this.reconnectInterval))}}sendPing(){var n;this.isConnected.value&&((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify({type:"ping"})),this.pingTimeout=setTimeout(()=>{console.warn("No pong received, reconnecting..."),this.close(!0),this.connect()},this.pingResponseTimeout)):console.warn("WebSocket not connected, cannot send ping")}send(n){var r;this.isConnected.value&&((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(n)):console.warn("WebSocket not connected")}close(n=!1){this.ws&&(this._shouldReconnect=!n,this.ws.close(),clearInterval(this.heartbeat),clearTimeout(this.pingTimeout),this.ws=null,this.listeners.clear())}on(n,r){this.listeners.has(n)||this.listeners.set(n,[]),this.listeners.get(n).push(r)}off(n,r){const o=this.listeners.get(n);o&&this.listeners.set(n,o.filter(a=>a!==r))}emit(n,r=null){const o=this.listeners.get(n);o&&o.forEach(a=>a(r))}getConnectionStatus(){return this.isConnected}}let ot=new Map;function _n(t,n={}){var o;if(ot.has(t)){const a=ot.get(t);if(a.isConnected.value&&((o=a.ws)==null?void 0:o.readyState)===WebSocket.OPEN)return a;a.close(!0),ot.delete(t)}const r=new mo(t,n);return ot.set(t,r),r}const Oe=q.defineStore("cartLib",()=>{const t=Y.useRouter(),n=Y.useRoute(),r=_e(),o=le(),{config_lib:a,countBonus:s}=q.storeToRefs(o),{itemThemes:i}=q.storeToRefs(r),l=e.ref(!1),c=e.ref(""),d=e.ref(null),u=e.ref("wait"),p=e.ref(null),y=e.ref(["failed_payment","failed_after_paid","failed","failed_after_sent","failed_after_sent_fiscalization","payment_initiation_retry"]),v=e.ref("Оплатить"),f=e.ref(null),b=e.ref(!1),m=e.ref(null),C=e.ref(0),h=e.ref(!1),_=e.ref({textNotification:""});let S=null;const V=(g,w,T=!1)=>{S&&(S.off("open",B),S.off("message",P),S.off("error",F),S.close(!0));const A=`wss://${a.value.area}/ws/order/${g}/`;S=_n(A);function B(){console.log("WebSocket connection opened")}function P(z){f.value=z,z.error?(h.value=!0,_.value.textNotification=z.error,m.value=null,S==null||S.close(!0)):z.params.status==="sent"?Ne.create().initPaymentLink(g,w).then(D=>{x(null,w),T?(S.close(!0),U(),x("profile",w)):w||window.location.replace(D.url)}).catch(D=>{m.value=null,o.loadCart(),D.response.data.user_friendly_message?(h.value=!0,_.value.textNotification=D.response.data.user_friendly_message,S.close(!0),w?y.value.includes(D.response.status)&&x("retryPage",w):T?(U(),x("",w)):(s.value=0,t.push(`/${n.params.orgId}/errorPayment`))):T?U():w||(s.value=0,t.push(`/${n.params.orgId}/errorPayment`))}):z.params.status==="payment_initiation_retry"||z.params.status==="fiscalized"?(m.value=2,Ne.create().orderPay(g).then(D=>{p.value=D.data.order_number}).catch(D=>{D.response.data.user_friendly_message&&(h.value=!0,_.value.textNotification=D.response.data.user_friendly_message,S.close(!0),w?y.value.includes(D.response.status)&&(x("retryPage",w),m.value=null):(s.value=0,t.push(`/${n.params.orgId}/errorPayment`),m.value=null))}).finally(()=>{b.value=!1})):z.params.status==="paid"?(m.value=3,S.close(!0),localStorage.removeItem("cart")):y.value.includes(z.params.status)&&(w?(x("retryPage",w),m.value=null):T?(U(),h.value=!0,_.value.textNotification="Ошибка создания заказа. Пожалуйста попробуйте еще раз"):(s.value=0,t.push(`/${n.params.orgId}/errorPayment`),m.value=null))}function F(z){console.error("WebSocket error:",z),S.close(!0),b.value=!1,m.value=null}S.on("open",B),S.on("message",P),S.on("error",F),S.connect()},O=e.computed(()=>!!d.value),I=g=>{u.value=g},E=g=>d.value=g,M=()=>{i.value.kiosk_show_loyalty_card_button&&i.value.kiosk_show_loyalty_phone_input_button?l.value=!0:!i.value.kiosk_show_loyalty_card_button&&i.value.kiosk_show_loyalty_phone_input_button?o.is_OpenLoyal=!0:l.value=!0,u.value="wait",c.value=""},$=()=>{l.value=!1,u.value="wait",c.value=""},N=()=>{d.value=null,c.value="",u.value="wait",$()},U=()=>{s.value=0,b.value=!1,m.value=null},x=(g=null,w=!1)=>{o.cartProducts_lib=[],rt(["cart"]),w&&(rt(["authTokensAccess","authTokensRefresh","user"]),o.profile=null),g&&t.push(`/${n.params.orgId}/${g}`)};return{statusWSCreate:f,isButtonDisabled:b,orderCompleted_lib:m,orderNumber:p,is_notification_lib:h,notificationData_lib:_,textPaymentBtn_lib:v,count:C,guestInfo:d,error:c,isDrawerOpen:l,currentState:u,isAuthorized:O,orderSocket:V,deleteCart:x,setGuestInfo:E,setState:I,openDrawer:M,closeDrawer:$,clearCard:N}}),ue=q.defineStore("cardLib",()=>{const t=()=>({openCard:null,currentModifier:null,groupModifiers:[],groupModifiersSelected:[],groupCurrentOpen:null,isModifiedAmount:!1,selectedSize:{},productSizes:[],addedProducts:[],plusButtonsRefs:[],modalCount:1,isSectionModifier:!1,isAnimationFly:!0,textErrorRequaired:""}),n=e.ref(t()),r=()=>n.value=t(),o=e.ref(!1),a=e.ref(!1),s=e.ref(!1),i=e.ref(),l=e.ref([]),c=e.ref({id:null,visible:!1}),d=e.computed(()=>{const E=n.value.groupModifiersSelected.findIndex(M=>M.group===n.value.groupCurrentOpen.id);return u(E)}),u=E=>E===-1?0:(n.value.groupModifiersSelected[E].modifiers||[]).reduce(($,N)=>$+(N.amount||0),0),p=e.computed(()=>{var M;const E=(M=n.value.openCard)==null?void 0:M.group_modifiers.findIndex($=>$.id===n.value.groupCurrentOpen.id);return E===-1||!n.value.openCard?0:n.value.openCard.modifiers.length>0&&E===0?n.value.openCard.modifiers.reduce(($,N)=>$+N.max_amount,0):n.value.groupModifiers[E].max_amount}),y=e.computed(()=>{var M;const E=(n.value.addedProducts??[]).reduce(($,N)=>$+N.price,0);if(n.value.openCard){const $=n.value.openCard,N=Re($)||0,U=$.amount||1;return(n.value.groupModifiersSelected.reduce((g,w)=>(w.modifiers.forEach(T=>{var A,B;T.sizes&&(T.price=((B=(A=T.sizes)==null?void 0:A.find(P=>P.id===n.value.selectedSize.id))==null?void 0:B.price)??T.price),g+=T.price*T.amount}),g),0)+N)*U+E}return(M=n.value.addedProducts)!=null&&M.length?E:0}),v=e.computed(()=>{const E=n.value.groupModifiers,M=n.value.groupModifiersSelected;for(let $=0;$<E.length;$++){const N=E[$],U=M[$];if(N.min_amount>0&&u($)<N.min_amount)return n.value.textErrorRequaired=`В группе "${N.name}" должно содержаться не меньше ${N.min_amount} модификатора(ов)`,{haveRequaire:!0,group:N};for(const x of N.group_modifiers)if(x.min_amount>0){const g=U.modifiers.find(w=>w.id===x.id);if(!g||g.amount<x.min_amount)return n.value.textErrorRequaired=`В группе "${N.name}" выберите все обязательные модификаторы`,{haveRequaire:!0,group:N}}}return{haveRequaire:!1,group:E[0]}}),f=()=>{n.value.groupModifiers.forEach((E,M)=>{n.value.groupCurrentOpen={...E,index:M},E.group_modifiers.forEach($=>{$.default_amount>0&&($.amount=$.default_amount,O($,!0))})})},b=E=>{n.value.addedProducts.push(E)},m=E=>{n.value.openCard=E},C=E=>{l.value=[...E]},h=(E,M)=>{var N,U;const $=E.id!==((N=n.value.groupCurrentOpen)==null?void 0:N.id);n.value.groupCurrentOpen={...E,index:M},$?n.value.isSectionModifier=!0:n.value.isSectionModifier=!n.value.isSectionModifier,document.body.style.overflow=n.value.isSectionModifier?"hidden":"",(U=n.value.plusButtonsRefs[M])==null||U.scrollIntoView({behavior:"smooth",block:"start"})},_=()=>{n.value.modalCount>n.value.currentModifier.min_amount&&n.value.modalCount>=2&&(n.value.modalCount-=1)},S=()=>{n.value.groupCurrentOpen&&n.value.modalCount+d.value<p.value&&(n.value.currentModifier.max_amount===0||n.value.currentModifier.max_amount>n.value.modalCount)&&(n.value.modalCount+=1)},V=(E,M)=>{var N;const $=(N=n.value.groupCurrentOpen)==null?void 0:N.id.toUpperCase();if(!E&&!n.value.isModifiedAmount&&M.max_amount!==1){if($==="Добавки2000"&&M.max_amount>1)return!0;if(Math.abs(p.value-d.value)>1&&$!=="Добавки2000")return!0}return!1},O=(E,M=!1)=>{n.value.modalCount=1,n.value.currentModifier=E;const $=n.value.groupModifiersSelected.findIndex(N=>N.group===n.value.groupCurrentOpen.id);I($,E,M)},I=(E,M,$)=>{let N=n.value.groupModifiersSelected;if(M.sizes.length>0&&M.sizes.find(U=>{var x;return U.id===((x=n.value.selectedSize)==null?void 0:x.id)}),E===-1)V($,M)?n.value.isModifiedAmount=!0:N[n.value.groupCurrentOpen.index]={group:n.value.groupCurrentOpen.id,modifier_count:0,modifiers:[{...M,amount:(M==null?void 0:M.amount)??1}]};else{const U=n.value.groupModifiers[E].group_modifiers.findIndex(g=>g.id===M.id);if(N[E].modifiers.findIndex(g=>g.id===M.id)===-1){if(p.value===1)N[E].modifiers=[];else if(d.value>=p.value)return;V($,M)?n.value.isModifiedAmount=!0:(N[E].modifiers.push({...M,amount:(M==null?void 0:M.amount)??1}),N[E].modifier_count=N[E].modifiers.reduce((g,w)=>g+=w.amount,0),n.value.isAnimationFly=!0)}else N[E].modifiers=N[E].modifiers.filter(g=>g.id!==M.id),N[E].modifier_count=N[E].modifiers.reduce((g,w)=>g+=w.amount,0),n.value.groupModifiers[E].group_modifiers[U].amount=1,n.value.groupModifiers[E].group_modifiers[U].default_amount=0,n.value.isAnimationFly=!1}n.value.groupModifiersSelected=N};return{stateCard:n,totalPrice_libCard:y,recountGroupTotalAmount:d,groupTotalAmount:p,isOpenWindow:o,isUpSale:a,checkedRequiredBtn:v,dataUpSale:i,productCards:l,isAddToCard:s,openProduct:c,setProduct:C,summModifierAmount:u,setAddedProducts:b,setCurrentCard:m,minusAmount:_,plusAmount:S,toggleNotRequire:h,modifierSelect:O,defaultAmountModifiers:f,reset:r}});function gn(t,n){return function(){return t.apply(n,arguments)}}const{toString:ho}=Object.prototype,{getPrototypeOf:At}=Object,{iterator:at,toStringTag:yn}=Symbol,st=(t=>n=>{const r=ho.call(n);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),we=t=>(t=t.toLowerCase(),n=>st(n)===t),it=t=>n=>typeof n===t,{isArray:De}=Array,Fe=it("undefined");function We(t){return t!==null&&!Fe(t)&&t.constructor!==null&&!Fe(t.constructor)&&fe(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const bn=we("ArrayBuffer");function _o(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&bn(t.buffer),n}const go=it("string"),fe=it("function"),wn=it("number"),Ge=t=>t!==null&&typeof t=="object",yo=t=>t===!0||t===!1,lt=t=>{if(st(t)!=="object")return!1;const n=At(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(yn in t)&&!(at in t)},bo=t=>{if(!Ge(t)||We(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},wo=we("Date"),ko=we("File"),Co=we("Blob"),So=we("FileList"),Eo=t=>Ge(t)&&fe(t.pipe),xo=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||fe(t.append)&&((n=st(t))==="formdata"||n==="object"&&fe(t.toString)&&t.toString()==="[object FormData]"))},No=we("URLSearchParams"),[Bo,To,Ao,vo]=["ReadableStream","Request","Response","Headers"].map(we),$o=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ke(t,n,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let o,a;if(typeof t!="object"&&(t=[t]),De(t))for(o=0,a=t.length;o<a;o++)n.call(null,t[o],o,t);else{if(We(t))return;const s=r?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let l;for(o=0;o<i;o++)l=s[o],n.call(null,t[l],l,t)}}function kn(t,n){if(We(t))return null;n=n.toLowerCase();const r=Object.keys(t);let o=r.length,a;for(;o-- >0;)if(a=r[o],n===a.toLowerCase())return a;return null}const $e=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cn=t=>!Fe(t)&&t!==$e;function vt(){const{caseless:t,skipUndefined:n}=Cn(this)&&this||{},r={},o=(a,s)=>{const i=t&&kn(r,s)||s;lt(r[i])&&lt(a)?r[i]=vt(r[i],a):lt(a)?r[i]=vt({},a):De(a)?r[i]=a.slice():(!n||!Fe(a))&&(r[i]=a)};for(let a=0,s=arguments.length;a<s;a++)arguments[a]&&Ke(arguments[a],o);return r}const Mo=(t,n,r,{allOwnKeys:o}={})=>(Ke(n,(a,s)=>{r&&fe(a)?t[s]=gn(a,r):t[s]=a},{allOwnKeys:o}),t),Po=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Io=(t,n,r,o)=>{t.prototype=Object.create(n.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),r&&Object.assign(t.prototype,r)},Vo=(t,n,r,o)=>{let a,s,i;const l={};if(n=n||{},t==null)return n;do{for(a=Object.getOwnPropertyNames(t),s=a.length;s-- >0;)i=a[s],(!o||o(i,t,n))&&!l[i]&&(n[i]=t[i],l[i]=!0);t=r!==!1&&At(t)}while(t&&(!r||r(t,n))&&t!==Object.prototype);return n},Ro=(t,n,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=n.length;const o=t.indexOf(n,r);return o!==-1&&o===r},Oo=t=>{if(!t)return null;if(De(t))return t;let n=t.length;if(!wn(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=t[n];return r},Do=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&At(Uint8Array)),Fo=(t,n)=>{const o=(t&&t[at]).call(t);let a;for(;(a=o.next())&&!a.done;){const s=a.value;n.call(t,s[0],s[1])}},Lo=(t,n)=>{let r;const o=[];for(;(r=t.exec(n))!==null;)o.push(r);return o},zo=we("HTMLFormElement"),Uo=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,a){return o.toUpperCase()+a}),Sn=(({hasOwnProperty:t})=>(n,r)=>t.call(n,r))(Object.prototype),Ho=we("RegExp"),En=(t,n)=>{const r=Object.getOwnPropertyDescriptors(t),o={};Ke(r,(a,s)=>{let i;(i=n(a,s,t))!==!1&&(o[s]=i||a)}),Object.defineProperties(t,o)},jo=t=>{En(t,(n,r)=>{if(fe(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=t[r];if(fe(o)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qo=(t,n)=>{const r={},o=a=>{a.forEach(s=>{r[s]=!0})};return De(t)?o(t):o(String(t).split(n)),r},Wo=()=>{},Go=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function Ko(t){return!!(t&&fe(t.append)&&t[yn]==="FormData"&&t[at])}const Jo=t=>{const n=new Array(10),r=(o,a)=>{if(Ge(o)){if(n.indexOf(o)>=0)return;if(We(o))return o;if(!("toJSON"in o)){n[a]=o;const s=De(o)?[]:{};return Ke(o,(i,l)=>{const c=r(i,a+1);!Fe(c)&&(s[l]=c)}),n[a]=void 0,s}}return o};return r(t,0)},Xo=we("AsyncFunction"),Zo=t=>t&&(Ge(t)||fe(t))&&fe(t.then)&&fe(t.catch),xn=((t,n)=>t?setImmediate:n?((r,o)=>($e.addEventListener("message",({source:a,data:s})=>{a===$e&&s===r&&o.length&&o.shift()()},!1),a=>{o.push(a),$e.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",fe($e.postMessage)),Yo=typeof queueMicrotask<"u"?queueMicrotask.bind($e):typeof process<"u"&&process.nextTick||xn,k={isArray:De,isArrayBuffer:bn,isBuffer:We,isFormData:xo,isArrayBufferView:_o,isString:go,isNumber:wn,isBoolean:yo,isObject:Ge,isPlainObject:lt,isEmptyObject:bo,isReadableStream:Bo,isRequest:To,isResponse:Ao,isHeaders:vo,isUndefined:Fe,isDate:wo,isFile:ko,isBlob:Co,isRegExp:Ho,isFunction:fe,isStream:Eo,isURLSearchParams:No,isTypedArray:Do,isFileList:So,forEach:Ke,merge:vt,extend:Mo,trim:$o,stripBOM:Po,inherits:Io,toFlatObject:Vo,kindOf:st,kindOfTest:we,endsWith:Ro,toArray:Oo,forEachEntry:Fo,matchAll:Lo,isHTMLForm:zo,hasOwnProperty:Sn,hasOwnProp:Sn,reduceDescriptors:En,freezeMethods:jo,toObjectSet:qo,toCamelCase:Uo,noop:Wo,toFiniteNumber:Go,findKey:kn,global:$e,isContextDefined:Cn,isSpecCompliantForm:Ko,toJSONObject:Jo,isAsyncFn:Xo,isThenable:Zo,setImmediate:xn,asap:Yo,isIterable:t=>t!=null&&fe(t[at])};function G(t,n,r,o,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status?a.status:null)}k.inherits(G,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Nn=G.prototype,Bn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Bn[t]={value:t}}),Object.defineProperties(G,Bn),Object.defineProperty(Nn,"isAxiosError",{value:!0}),G.from=(t,n,r,o,a,s)=>{const i=Object.create(Nn);k.toFlatObject(t,i,function(u){return u!==Error.prototype},d=>d!=="isAxiosError");const l=t&&t.message?t.message:"Error",c=n==null&&t?t.code:n;return G.call(i,l,c,r,o,a),t&&i.cause==null&&Object.defineProperty(i,"cause",{value:t,configurable:!0}),i.name=t&&t.name||"Error",s&&Object.assign(i,s),i};const Qo=null;function $t(t){return k.isPlainObject(t)||k.isArray(t)}function Tn(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function An(t,n,r){return t?t.concat(n).map(function(a,s){return a=Tn(a),!r&&s?"["+a+"]":a}).join(r?".":""):n}function ea(t){return k.isArray(t)&&!t.some($t)}const ta=k.toFlatObject(k,{},null,function(n){return/^is[A-Z]/.test(n)});function ct(t,n,r){if(!k.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,r=k.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,m){return!k.isUndefined(m[b])});const o=r.metaTokens,a=r.visitor||u,s=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(n);if(!k.isFunction(a))throw new TypeError("visitor must be a function");function d(f){if(f===null)return"";if(k.isDate(f))return f.toISOString();if(k.isBoolean(f))return f.toString();if(!c&&k.isBlob(f))throw new G("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(f)||k.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,b,m){let C=f;if(f&&!m&&typeof f=="object"){if(k.endsWith(b,"{}"))b=o?b:b.slice(0,-2),f=JSON.stringify(f);else if(k.isArray(f)&&ea(f)||(k.isFileList(f)||k.endsWith(b,"[]"))&&(C=k.toArray(f)))return b=Tn(b),C.forEach(function(_,S){!(k.isUndefined(_)||_===null)&&n.append(i===!0?An([b],S,s):i===null?b:b+"[]",d(_))}),!1}return $t(f)?!0:(n.append(An(m,b,s),d(f)),!1)}const p=[],y=Object.assign(ta,{defaultVisitor:u,convertValue:d,isVisitable:$t});function v(f,b){if(!k.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(f),k.forEach(f,function(C,h){(!(k.isUndefined(C)||C===null)&&a.call(n,C,k.isString(h)?h.trim():h,b,y))===!0&&v(C,b?b.concat(h):[h])}),p.pop()}}if(!k.isObject(t))throw new TypeError("data must be an object");return v(t),n}function vn(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return n[o]})}function Mt(t,n){this._pairs=[],t&&ct(t,this,n)}const $n=Mt.prototype;$n.append=function(n,r){this._pairs.push([n,r])},$n.toString=function(n){const r=n?function(o){return n.call(this,o,vn)}:vn;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function na(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Mn(t,n,r){if(!n)return t;const o=r&&r.encode||na;k.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let s;if(a?s=a(n,r):s=k.isURLSearchParams(n)?n.toString():new Mt(n,r).toString(o),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Pn{constructor(){this.handlers=[]}use(n,r,o){return this.handlers.push({fulfilled:n,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){k.forEach(this.handlers,function(o){o!==null&&n(o)})}}const In={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ra={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Mt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pt=typeof window<"u"&&typeof document<"u",It=typeof navigator=="object"&&navigator||void 0,oa=Pt&&(!It||["ReactNative","NativeScript","NS"].indexOf(It.product)<0),aa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sa=Pt&&window.location.href||"http://localhost",de={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pt,hasStandardBrowserEnv:oa,hasStandardBrowserWebWorkerEnv:aa,navigator:It,origin:sa},Symbol.toStringTag,{value:"Module"})),...ra};function ia(t,n){return ct(t,new de.classes.URLSearchParams,{visitor:function(r,o,a,s){return de.isNode&&k.isBuffer(r)?(this.append(o,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...n})}function la(t){return k.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function ca(t){const n={},r=Object.keys(t);let o;const a=r.length;let s;for(o=0;o<a;o++)s=r[o],n[s]=t[s];return n}function Vn(t){function n(r,o,a,s){let i=r[s++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=s>=r.length;return i=!i&&k.isArray(a)?a.length:i,c?(k.hasOwnProp(a,i)?a[i]=[a[i],o]:a[i]=o,!l):((!a[i]||!k.isObject(a[i]))&&(a[i]=[]),n(r,o,a[i],s)&&k.isArray(a[i])&&(a[i]=ca(a[i])),!l)}if(k.isFormData(t)&&k.isFunction(t.entries)){const r={};return k.forEachEntry(t,(o,a)=>{n(la(o),a,r,0)}),r}return null}function da(t,n,r){if(k.isString(t))try{return(n||JSON.parse)(t),k.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}const Je={transitional:In,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const o=r.getContentType()||"",a=o.indexOf("application/json")>-1,s=k.isObject(n);if(s&&k.isHTMLForm(n)&&(n=new FormData(n)),k.isFormData(n))return a?JSON.stringify(Vn(n)):n;if(k.isArrayBuffer(n)||k.isBuffer(n)||k.isStream(n)||k.isFile(n)||k.isBlob(n)||k.isReadableStream(n))return n;if(k.isArrayBufferView(n))return n.buffer;if(k.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let l;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return ia(n,this.formSerializer).toString();if((l=k.isFileList(n))||o.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ct(l?{"files[]":n}:n,c&&new c,this.formSerializer)}}return s||a?(r.setContentType("application/json",!1),da(n)):n}],transformResponse:[function(n){const r=this.transitional||Je.transitional,o=r&&r.forcedJSONParsing,a=this.responseType==="json";if(k.isResponse(n)||k.isReadableStream(n))return n;if(n&&k.isString(n)&&(o&&!this.responseType||a)){const i=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(n,this.parseReviver)}catch(l){if(i)throw l.name==="SyntaxError"?G.from(l,G.ERR_BAD_RESPONSE,this,null,this.response):l}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],t=>{Je.headers[t]={}});const ua=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fa=t=>{const n={};let r,o,a;return t&&t.split(`
2
+ `).forEach(function(i){a=i.indexOf(":"),r=i.substring(0,a).trim().toLowerCase(),o=i.substring(a+1).trim(),!(!r||n[r]&&ua[r])&&(r==="set-cookie"?n[r]?n[r].push(o):n[r]=[o]:n[r]=n[r]?n[r]+", "+o:o)}),n},Rn=Symbol("internals");function Xe(t){return t&&String(t).trim().toLowerCase()}function dt(t){return t===!1||t==null?t:k.isArray(t)?t.map(dt):String(t)}function pa(t){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(t);)n[o[1]]=o[2];return n}const ma=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Vt(t,n,r,o,a){if(k.isFunction(o))return o.call(this,n,r);if(a&&(n=r),!!k.isString(n)){if(k.isString(o))return n.indexOf(o)!==-1;if(k.isRegExp(o))return o.test(n)}}function ha(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,o)=>r.toUpperCase()+o)}function _a(t,n){const r=k.toCamelCase(" "+n);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+r,{value:function(a,s,i){return this[o].call(this,n,a,s,i)},configurable:!0})})}let pe=class{constructor(n){n&&this.set(n)}set(n,r,o){const a=this;function s(l,c,d){const u=Xe(c);if(!u)throw new Error("header name must be a non-empty string");const p=k.findKey(a,u);(!p||a[p]===void 0||d===!0||d===void 0&&a[p]!==!1)&&(a[p||c]=dt(l))}const i=(l,c)=>k.forEach(l,(d,u)=>s(d,u,c));if(k.isPlainObject(n)||n instanceof this.constructor)i(n,r);else if(k.isString(n)&&(n=n.trim())&&!ma(n))i(fa(n),r);else if(k.isObject(n)&&k.isIterable(n)){let l={},c,d;for(const u of n){if(!k.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?k.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(l,r)}else n!=null&&s(r,n,o);return this}get(n,r){if(n=Xe(n),n){const o=k.findKey(this,n);if(o){const a=this[o];if(!r)return a;if(r===!0)return pa(a);if(k.isFunction(r))return r.call(this,a,o);if(k.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=Xe(n),n){const o=k.findKey(this,n);return!!(o&&this[o]!==void 0&&(!r||Vt(this,this[o],o,r)))}return!1}delete(n,r){const o=this;let a=!1;function s(i){if(i=Xe(i),i){const l=k.findKey(o,i);l&&(!r||Vt(o,o[l],l,r))&&(delete o[l],a=!0)}}return k.isArray(n)?n.forEach(s):s(n),a}clear(n){const r=Object.keys(this);let o=r.length,a=!1;for(;o--;){const s=r[o];(!n||Vt(this,this[s],s,n,!0))&&(delete this[s],a=!0)}return a}normalize(n){const r=this,o={};return k.forEach(this,(a,s)=>{const i=k.findKey(o,s);if(i){r[i]=dt(a),delete r[s];return}const l=n?ha(s):String(s).trim();l!==s&&delete r[s],r[l]=dt(a),o[l]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return k.forEach(this,(o,a)=>{o!=null&&o!==!1&&(r[a]=n&&k.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const o=new this(n);return r.forEach(a=>o.set(a)),o}static accessor(n){const o=(this[Rn]=this[Rn]={accessors:{}}).accessors,a=this.prototype;function s(i){const l=Xe(i);o[l]||(_a(a,i),o[l]=!0)}return k.isArray(n)?n.forEach(s):s(n),this}};pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(pe.prototype,({value:t},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(o){this[r]=o}}}),k.freezeMethods(pe);function Rt(t,n){const r=this||Je,o=n||r,a=pe.from(o.headers);let s=o.data;return k.forEach(t,function(l){s=l.call(r,s,a.normalize(),n?n.status:void 0)}),a.normalize(),s}function On(t){return!!(t&&t.__CANCEL__)}function Le(t,n,r){G.call(this,t??"canceled",G.ERR_CANCELED,n,r),this.name="CanceledError"}k.inherits(Le,G,{__CANCEL__:!0});function Dn(t,n,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):n(new G("Request failed with status code "+r.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ga(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function ya(t,n){t=t||10;const r=new Array(t),o=new Array(t);let a=0,s=0,i;return n=n!==void 0?n:1e3,function(c){const d=Date.now(),u=o[s];i||(i=d),r[a]=c,o[a]=d;let p=s,y=0;for(;p!==a;)y+=r[p++],p=p%t;if(a=(a+1)%t,a===s&&(s=(s+1)%t),d-i<n)return;const v=u&&d-u;return v?Math.round(y*1e3/v):void 0}}function ba(t,n){let r=0,o=1e3/n,a,s;const i=(d,u=Date.now())=>{r=u,a=null,s&&(clearTimeout(s),s=null),t(...d)};return[(...d)=>{const u=Date.now(),p=u-r;p>=o?i(d,u):(a=d,s||(s=setTimeout(()=>{s=null,i(a)},o-p)))},()=>a&&i(a)]}const ut=(t,n,r=3)=>{let o=0;const a=ya(50,250);return ba(s=>{const i=s.loaded,l=s.lengthComputable?s.total:void 0,c=i-o,d=a(c),u=i<=l;o=i;const p={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-i)/d:void 0,event:s,lengthComputable:l!=null,[n?"download":"upload"]:!0};t(p)},r)},Fn=(t,n)=>{const r=t!=null;return[o=>n[0]({lengthComputable:r,total:t,loaded:o}),n[1]]},Ln=t=>(...n)=>k.asap(()=>t(...n)),wa=de.hasStandardBrowserEnv?((t,n)=>r=>(r=new URL(r,de.origin),t.protocol===r.protocol&&t.host===r.host&&(n||t.port===r.port)))(new URL(de.origin),de.navigator&&/(msie|trident)/i.test(de.navigator.userAgent)):()=>!0,ka=de.hasStandardBrowserEnv?{write(t,n,r,o,a,s,i){if(typeof document>"u")return;const l=[`${t}=${encodeURIComponent(n)}`];k.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),k.isString(o)&&l.push(`path=${o}`),k.isString(a)&&l.push(`domain=${a}`),s===!0&&l.push("secure"),k.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ca(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Sa(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function zn(t,n,r){let o=!Ca(n);return t&&(o||r==!1)?Sa(t,n):n}const Un=t=>t instanceof pe?{...t}:t;function Me(t,n){n=n||{};const r={};function o(d,u,p,y){return k.isPlainObject(d)&&k.isPlainObject(u)?k.merge.call({caseless:y},d,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function a(d,u,p,y){if(k.isUndefined(u)){if(!k.isUndefined(d))return o(void 0,d,p,y)}else return o(d,u,p,y)}function s(d,u){if(!k.isUndefined(u))return o(void 0,u)}function i(d,u){if(k.isUndefined(u)){if(!k.isUndefined(d))return o(void 0,d)}else return o(void 0,u)}function l(d,u,p){if(p in n)return o(d,u);if(p in t)return o(void 0,d)}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(d,u,p)=>a(Un(d),Un(u),p,!0)};return k.forEach(Object.keys({...t,...n}),function(u){const p=c[u]||a,y=p(t[u],n[u],u);k.isUndefined(y)&&p!==l||(r[u]=y)}),r}const Hn=t=>{const n=Me({},t);let{data:r,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:s,headers:i,auth:l}=n;if(n.headers=i=pe.from(i),n.url=Mn(zn(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),k.isFormData(r)){if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(k.isFunction(r.getHeaders)){const c=r.getHeaders(),d=["content-type","content-length"];Object.entries(c).forEach(([u,p])=>{d.includes(u.toLowerCase())&&i.set(u,p)})}}if(de.hasStandardBrowserEnv&&(o&&k.isFunction(o)&&(o=o(n)),o||o!==!1&&wa(n.url))){const c=a&&s&&ka.read(s);c&&i.set(a,c)}return n},Ea=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,o){const a=Hn(t);let s=a.data;const i=pe.from(a.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=a,u,p,y,v,f;function b(){v&&v(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(a.method.toUpperCase(),a.url,!0),m.timeout=a.timeout;function C(){if(!m)return;const _=pe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),V={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:_,config:t,request:m};Dn(function(I){r(I),b()},function(I){o(I),b()},V),m=null}"onloadend"in m?m.onloadend=C:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(C)},m.onabort=function(){m&&(o(new G("Request aborted",G.ECONNABORTED,t,m)),m=null)},m.onerror=function(S){const V=S&&S.message?S.message:"Network Error",O=new G(V,G.ERR_NETWORK,t,m);O.event=S||null,o(O),m=null},m.ontimeout=function(){let S=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const V=a.transitional||In;a.timeoutErrorMessage&&(S=a.timeoutErrorMessage),o(new G(S,V.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,t,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&k.forEach(i.toJSON(),function(S,V){m.setRequestHeader(V,S)}),k.isUndefined(a.withCredentials)||(m.withCredentials=!!a.withCredentials),l&&l!=="json"&&(m.responseType=a.responseType),d&&([y,f]=ut(d,!0),m.addEventListener("progress",y)),c&&m.upload&&([p,v]=ut(c),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",v)),(a.cancelToken||a.signal)&&(u=_=>{m&&(o(!_||_.type?new Le(null,t,m):_),m.abort(),m=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const h=ga(a.url);if(h&&de.protocols.indexOf(h)===-1){o(new G("Unsupported protocol "+h+":",G.ERR_BAD_REQUEST,t));return}m.send(s||null)})},xa=(t,n)=>{const{length:r}=t=t?t.filter(Boolean):[];if(n||r){let o=new AbortController,a;const s=function(d){if(!a){a=!0,l();const u=d instanceof Error?d:this.reason;o.abort(u instanceof G?u:new Le(u instanceof Error?u.message:u))}};let i=n&&setTimeout(()=>{i=null,s(new G(`timeout ${n} of ms exceeded`,G.ETIMEDOUT))},n);const l=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),t=null)};t.forEach(d=>d.addEventListener("abort",s));const{signal:c}=o;return c.unsubscribe=()=>k.asap(l),c}},Na=function*(t,n){let r=t.byteLength;if(r<n){yield t;return}let o=0,a;for(;o<r;)a=o+n,yield t.slice(o,a),o=a},Ba=async function*(t,n){for await(const r of Ta(t))yield*Na(r,n)},Ta=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:r,value:o}=await n.read();if(r)break;yield o}}finally{await n.cancel()}},jn=(t,n,r,o)=>{const a=Ba(t,n);let s=0,i,l=c=>{i||(i=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await a.next();if(d){l(),c.close();return}let p=u.byteLength;if(r){let y=s+=p;r(y)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),a.return()}},{highWaterMark:2})},qn=64*1024,{isFunction:ft}=k,Aa=(({Request:t,Response:n})=>({Request:t,Response:n}))(k.global),{ReadableStream:Wn,TextEncoder:Gn}=k.global,Kn=(t,...n)=>{try{return!!t(...n)}catch{return!1}},va=t=>{t=k.merge.call({skipUndefined:!0},Aa,t);const{fetch:n,Request:r,Response:o}=t,a=n?ft(n):typeof fetch=="function",s=ft(r),i=ft(o);if(!a)return!1;const l=a&&ft(Wn),c=a&&(typeof Gn=="function"?(f=>b=>f.encode(b))(new Gn):async f=>new Uint8Array(await new r(f).arrayBuffer())),d=s&&l&&Kn(()=>{let f=!1;const b=new r(de.origin,{body:new Wn,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!b}),u=i&&l&&Kn(()=>k.isReadableStream(new o("").body)),p={stream:u&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!p[f]&&(p[f]=(b,m)=>{let C=b&&b[f];if(C)return C.call(b);throw new G(`Response type '${f}' is not supported`,G.ERR_NOT_SUPPORT,m)})});const y=async f=>{if(f==null)return 0;if(k.isBlob(f))return f.size;if(k.isSpecCompliantForm(f))return(await new r(de.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(k.isArrayBufferView(f)||k.isArrayBuffer(f))return f.byteLength;if(k.isURLSearchParams(f)&&(f=f+""),k.isString(f))return(await c(f)).byteLength},v=async(f,b)=>{const m=k.toFiniteNumber(f.getContentLength());return m??y(b)};return async f=>{let{url:b,method:m,data:C,signal:h,cancelToken:_,timeout:S,onDownloadProgress:V,onUploadProgress:O,responseType:I,headers:E,withCredentials:M="same-origin",fetchOptions:$}=Hn(f),N=n||fetch;I=I?(I+"").toLowerCase():"text";let U=xa([h,_&&_.toAbortSignal()],S),x=null;const g=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let w;try{if(O&&d&&m!=="get"&&m!=="head"&&(w=await v(E,C))!==0){let z=new r(b,{method:"POST",body:C,duplex:"half"}),J;if(k.isFormData(C)&&(J=z.headers.get("content-type"))&&E.setContentType(J),z.body){const[D,R]=Fn(w,ut(Ln(O)));C=jn(z.body,qn,D,R)}}k.isString(M)||(M=M?"include":"omit");const T=s&&"credentials"in r.prototype,A={...$,signal:U,method:m.toUpperCase(),headers:E.normalize().toJSON(),body:C,duplex:"half",credentials:T?M:void 0};x=s&&new r(b,A);let B=await(s?N(x,$):N(b,A));const P=u&&(I==="stream"||I==="response");if(u&&(V||P&&g)){const z={};["status","statusText","headers"].forEach(K=>{z[K]=B[K]});const J=k.toFiniteNumber(B.headers.get("content-length")),[D,R]=V&&Fn(J,ut(Ln(V),!0))||[];B=new o(jn(B.body,qn,D,()=>{R&&R(),g&&g()}),z)}I=I||"text";let F=await p[k.findKey(p,I)||"text"](B,f);return!P&&g&&g(),await new Promise((z,J)=>{Dn(z,J,{data:F,headers:pe.from(B.headers),status:B.status,statusText:B.statusText,config:f,request:x})})}catch(T){throw g&&g(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,f,x),{cause:T.cause||T}):G.from(T,T&&T.code,f,x)}}},$a=new Map,Jn=t=>{let n=t&&t.env||{};const{fetch:r,Request:o,Response:a}=n,s=[o,a,r];let i=s.length,l=i,c,d,u=$a;for(;l--;)c=s[l],d=u.get(c),d===void 0&&u.set(c,d=l?new Map:va(n)),u=d;return d};Jn();const Ot={http:Qo,xhr:Ea,fetch:{get:Jn}};k.forEach(Ot,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const Xn=t=>`- ${t}`,Ma=t=>k.isFunction(t)||t===null||t===!1;function Pa(t,n){t=k.isArray(t)?t:[t];const{length:r}=t;let o,a;const s={};for(let i=0;i<r;i++){o=t[i];let l;if(a=o,!Ma(o)&&(a=Ot[(l=String(o)).toLowerCase()],a===void 0))throw new G(`Unknown adapter '${l}'`);if(a&&(k.isFunction(a)||(a=a.get(n))))break;s[l||"#"+i]=a}if(!a){const i=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?i.length>1?`since :
4
+ `+i.map(Xn).join(`
5
+ `):" "+Xn(i[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a}const Zn={getAdapter:Pa,adapters:Ot};function Dt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Le(null,t)}function Yn(t){return Dt(t),t.headers=pe.from(t.headers),t.data=Rt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Zn.getAdapter(t.adapter||Je.adapter,t)(t).then(function(o){return Dt(t),o.data=Rt.call(t,t.transformResponse,o),o.headers=pe.from(o.headers),o},function(o){return On(o)||(Dt(t),o&&o.response&&(o.response.data=Rt.call(t,t.transformResponse,o.response),o.response.headers=pe.from(o.response.headers))),Promise.reject(o)})}const Qn="1.13.2",pt={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{pt[t]=function(o){return typeof o===t||"a"+(n<1?"n ":" ")+t}});const er={};pt.transitional=function(n,r,o){function a(s,i){return"[Axios v"+Qn+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,l)=>{if(n===!1)throw new G(a(i," has been removed"+(r?" in "+r:"")),G.ERR_DEPRECATED);return r&&!er[i]&&(er[i]=!0,console.warn(a(i," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(s,i,l):!0}},pt.spelling=function(n){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${n}`),!0)};function Ia(t,n,r){if(typeof t!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let a=o.length;for(;a-- >0;){const s=o[a],i=n[s];if(i){const l=t[s],c=l===void 0||i(l,s,t);if(c!==!0)throw new G("option "+s+" must be "+c,G.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new G("Unknown option "+s,G.ERR_BAD_OPTION)}}const mt={assertOptions:Ia,validators:pt},Se=mt.validators;let Pe=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Pn,response:new Pn}}async request(n,r){try{return await this._request(n,r)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const s=a.stack?a.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
+ `+s):o.stack=s}catch{}}throw o}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=Me(this.defaults,r);const{transitional:o,paramsSerializer:a,headers:s}=r;o!==void 0&&mt.assertOptions(o,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean)},!1),a!=null&&(k.isFunction(a)?r.paramsSerializer={serialize:a}:mt.assertOptions(a,{encode:Se.function,serialize:Se.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),mt.assertOptions(r,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&k.merge(s.common,s[r.method]);s&&k.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=pe.concat(i,s);const l=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(c=c&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let u,p=0,y;if(!c){const f=[Yn.bind(this),void 0];for(f.unshift(...l),f.push(...d),y=f.length,u=Promise.resolve(r);p<y;)u=u.then(f[p++],f[p++]);return u}y=l.length;let v=r;for(;p<y;){const f=l[p++],b=l[p++];try{v=f(v)}catch(m){b.call(this,m);break}}try{u=Yn.call(this,v)}catch(f){return Promise.reject(f)}for(p=0,y=d.length;p<y;)u=u.then(d[p++],d[p++]);return u}getUri(n){n=Me(this.defaults,n);const r=zn(n.baseURL,n.url,n.allowAbsoluteUrls);return Mn(r,n.params,n.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(n){Pe.prototype[n]=function(r,o){return this.request(Me(o||{},{method:n,url:r,data:(o||{}).data}))}}),k.forEach(["post","put","patch"],function(n){function r(o){return function(s,i,l){return this.request(Me(l||{},{method:n,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Pe.prototype[n]=r(),Pe.prototype[n+"Form"]=r(!0)});let Va=class kr{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const o=this;this.promise.then(a=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](a);o._listeners=null}),this.promise.then=a=>{let s;const i=new Promise(l=>{o.subscribe(l),s=l}).then(a);return i.cancel=function(){o.unsubscribe(s)},i},n(function(s,i,l){o.reason||(o.reason=new Le(s,i,l),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=o=>{n.abort(o)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new kr(function(a){n=a}),cancel:n}}};function Ra(t){return function(r){return t.apply(null,r)}}function Oa(t){return k.isObject(t)&&t.isAxiosError===!0}const Ft={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(Ft).forEach(([t,n])=>{Ft[n]=t});function tr(t){const n=new Pe(t),r=gn(Pe.prototype.request,n);return k.extend(r,Pe.prototype,n,{allOwnKeys:!0}),k.extend(r,n,null,{allOwnKeys:!0}),r.create=function(a){return tr(Me(t,a))},r}const ee=tr(Je);ee.Axios=Pe,ee.CanceledError=Le,ee.CancelToken=Va,ee.isCancel=On,ee.VERSION=Qn,ee.toFormData=ct,ee.AxiosError=G,ee.Cancel=ee.CanceledError,ee.all=function(n){return Promise.all(n)},ee.spread=Ra,ee.isAxiosError=Oa,ee.mergeConfig=Me,ee.AxiosHeaders=pe,ee.formToJSON=t=>Vn(k.isHTMLForm(t)?new FormData(t):t),ee.getAdapter=Zn.getAdapter,ee.HttpStatusCode=Ft,ee.default=ee;const{Axios:od,AxiosError:ad,CanceledError:sd,isCancel:id,CancelToken:ld,VERSION:cd,all:dd,Cancel:ud,isAxiosError:fd,spread:pd,toFormData:md,AxiosHeaders:hd,HttpStatusCode:_d,formToJSON:gd,getAdapter:yd,mergeConfig:bd}=ee;var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nr={exports:{}};(function(t,n){(function(r,o){t.exports=o()})(Da,function(){var r=1e3,o=6e4,a=36e5,s="millisecond",i="second",l="minute",c="hour",d="day",u="week",p="month",y="quarter",v="year",f="date",b="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,h={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(g){var w=["th","st","nd","rd"],T=g%100;return"["+g+(w[(T-20)%10]||w[T]||w[0])+"]"}},_=function(g,w,T){var A=String(g);return!A||A.length>=w?g:""+Array(w+1-A.length).join(T)+g},S={s:_,z:function(g){var w=-g.utcOffset(),T=Math.abs(w),A=Math.floor(T/60),B=T%60;return(w<=0?"+":"-")+_(A,2,"0")+":"+_(B,2,"0")},m:function g(w,T){if(w.date()<T.date())return-g(T,w);var A=12*(T.year()-w.year())+(T.month()-w.month()),B=w.clone().add(A,p),P=T-B<0,F=w.clone().add(A+(P?-1:1),p);return+(-(A+(T-B)/(P?B-F:F-B))||0)},a:function(g){return g<0?Math.ceil(g)||0:Math.floor(g)},p:function(g){return{M:p,y:v,w:u,d,D:f,h:c,m:l,s:i,ms:s,Q:y}[g]||String(g||"").toLowerCase().replace(/s$/,"")},u:function(g){return g===void 0}},V="en",O={};O[V]=h;var I="$isDayjsObject",E=function(g){return g instanceof U||!(!g||!g[I])},M=function g(w,T,A){var B;if(!w)return V;if(typeof w=="string"){var P=w.toLowerCase();O[P]&&(B=P),T&&(O[P]=T,B=P);var F=w.split("-");if(!B&&F.length>1)return g(F[0])}else{var z=w.name;O[z]=w,B=z}return!A&&B&&(V=B),B||!A&&V},$=function(g,w){if(E(g))return g.clone();var T=typeof w=="object"?w:{};return T.date=g,T.args=arguments,new U(T)},N=S;N.l=M,N.i=E,N.w=function(g,w){return $(g,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var U=function(){function g(T){this.$L=M(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[I]=!0}var w=g.prototype;return w.parse=function(T){this.$d=function(A){var B=A.date,P=A.utc;if(B===null)return new Date(NaN);if(N.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var F=B.match(m);if(F){var z=F[2]-1||0,J=(F[7]||"0").substring(0,3);return P?new Date(Date.UTC(F[1],z,F[3]||1,F[4]||0,F[5]||0,F[6]||0,J)):new Date(F[1],z,F[3]||1,F[4]||0,F[5]||0,F[6]||0,J)}}return new Date(B)}(T),this.init()},w.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},w.$utils=function(){return N},w.isValid=function(){return this.$d.toString()!==b},w.isSame=function(T,A){var B=$(T);return this.startOf(A)<=B&&B<=this.endOf(A)},w.isAfter=function(T,A){return $(T)<this.startOf(A)},w.isBefore=function(T,A){return this.endOf(A)<$(T)},w.$g=function(T,A,B){return N.u(T)?this[A]:this.set(B,T)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(T,A){var B=this,P=!!N.u(A)||A,F=N.p(T),z=function(te,W){var L=N.w(B.$u?Date.UTC(B.$y,W,te):new Date(B.$y,W,te),B);return P?L:L.endOf(d)},J=function(te,W){return N.w(B.toDate()[te].apply(B.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(W)),B)},D=this.$W,R=this.$M,K=this.$D,re="set"+(this.$u?"UTC":"");switch(F){case v:return P?z(1,0):z(31,11);case p:return P?z(1,R):z(0,R+1);case u:var se=this.$locale().weekStart||0,oe=(D<se?D+7:D)-se;return z(P?K-oe:K+(6-oe),R);case d:case f:return J(re+"Hours",0);case c:return J(re+"Minutes",1);case l:return J(re+"Seconds",2);case i:return J(re+"Milliseconds",3);default:return this.clone()}},w.endOf=function(T){return this.startOf(T,!1)},w.$set=function(T,A){var B,P=N.p(T),F="set"+(this.$u?"UTC":""),z=(B={},B[d]=F+"Date",B[f]=F+"Date",B[p]=F+"Month",B[v]=F+"FullYear",B[c]=F+"Hours",B[l]=F+"Minutes",B[i]=F+"Seconds",B[s]=F+"Milliseconds",B)[P],J=P===d?this.$D+(A-this.$W):A;if(P===p||P===v){var D=this.clone().set(f,1);D.$d[z](J),D.init(),this.$d=D.set(f,Math.min(this.$D,D.daysInMonth())).$d}else z&&this.$d[z](J);return this.init(),this},w.set=function(T,A){return this.clone().$set(T,A)},w.get=function(T){return this[N.p(T)]()},w.add=function(T,A){var B,P=this;T=Number(T);var F=N.p(A),z=function(R){var K=$(P);return N.w(K.date(K.date()+Math.round(R*T)),P)};if(F===p)return this.set(p,this.$M+T);if(F===v)return this.set(v,this.$y+T);if(F===d)return z(1);if(F===u)return z(7);var J=(B={},B[l]=o,B[c]=a,B[i]=r,B)[F]||1,D=this.$d.getTime()+T*J;return N.w(D,this)},w.subtract=function(T,A){return this.add(-1*T,A)},w.format=function(T){var A=this,B=this.$locale();if(!this.isValid())return B.invalidDate||b;var P=T||"YYYY-MM-DDTHH:mm:ssZ",F=N.z(this),z=this.$H,J=this.$m,D=this.$M,R=B.weekdays,K=B.months,re=B.meridiem,se=function(W,L,Q,ie){return W&&(W[L]||W(A,P))||Q[L].slice(0,ie)},oe=function(W){return N.s(z%12||12,W,"0")},te=re||function(W,L,Q){var ie=W<12?"AM":"PM";return Q?ie.toLowerCase():ie};return P.replace(C,function(W,L){return L||function(Q){switch(Q){case"YY":return String(A.$y).slice(-2);case"YYYY":return N.s(A.$y,4,"0");case"M":return D+1;case"MM":return N.s(D+1,2,"0");case"MMM":return se(B.monthsShort,D,K,3);case"MMMM":return se(K,D);case"D":return A.$D;case"DD":return N.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return se(B.weekdaysMin,A.$W,R,2);case"ddd":return se(B.weekdaysShort,A.$W,R,3);case"dddd":return R[A.$W];case"H":return String(z);case"HH":return N.s(z,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return te(z,J,!0);case"A":return te(z,J,!1);case"m":return String(J);case"mm":return N.s(J,2,"0");case"s":return String(A.$s);case"ss":return N.s(A.$s,2,"0");case"SSS":return N.s(A.$ms,3,"0");case"Z":return F}return null}(W)||F.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(T,A,B){var P,F=this,z=N.p(A),J=$(T),D=(J.utcOffset()-this.utcOffset())*o,R=this-J,K=function(){return N.m(F,J)};switch(z){case v:P=K()/12;break;case p:P=K();break;case y:P=K()/3;break;case u:P=(R-D)/6048e5;break;case d:P=(R-D)/864e5;break;case c:P=R/a;break;case l:P=R/o;break;case i:P=R/r;break;default:P=R}return B?P:N.a(P)},w.daysInMonth=function(){return this.endOf(p).$D},w.$locale=function(){return O[this.$L]},w.locale=function(T,A){if(!T)return this.$L;var B=this.clone(),P=M(T,A,!0);return P&&(B.$L=P),B},w.clone=function(){return N.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},g}(),x=U.prototype;return $.prototype=x,[["$ms",s],["$s",i],["$m",l],["$H",c],["$W",d],["$M",p],["$y",v],["$D",f]].forEach(function(g){x[g[1]]=function(w){return this.$g(w,g[0],g[1])}}),$.extend=function(g,w){return g.$i||(g(w,U,$),g.$i=!0),$},$.locale=M,$.isDayjs=E,$.unix=function(g){return $(1e3*g)},$.en=O[V],$.Ls=O,$.p={},$})})(nr);var La=nr.exports;const rr=Fa(La),za=t=>{const n=Y.useRouter(),r=Y.useRoute(),o=`${t.domain}/api/`,a=ee.create({baseURL:o}),s=ee.create({baseURL:o}),i=ee.create({baseURL:o}),l=ee.create({baseURL:o}),c=ee.create({baseURL:o}),d=ee.create({baseURL:o}),u=ee.create({baseURL:o}),p=_=>{try{const S=JSON.parse(localStorage.getItem("authTokensAccess")||"");S.length>0&&(_.headers.Authorization=`Bearer ${S}`)}catch{console.warn("accessToken is undefined [useAxios]")}return _},y=_=>{const S=localStorage.getItem("apiKey"),V=(S==null?void 0:S.replace(/^.(.*).$/,"$1"))||"";return _.headers={"Content-Type":"application/json","x-api-key":V},_},v=async _=>{if(!t.user)return _;const S=t.user.exp??0;if(!(rr.unix(S).diff(rr())<3e3))return _;const O=hn("authTokensRefresh",null,"string");try{const I=await ee.post(`${o}user/token/refresh/`,{refresh:O.value});if(!I.data.access)return h(),_;localStorage.setItem("authTokensAccess",JSON.stringify(I.data.access)),m(I.data),C(mn(I.data.access)),_.headers={..._.headers,Authorization:`Bearer ${I.data.access}`}}catch(I){console.error("Failed to refresh token:",I),h()}return _},f=_=>{_.interceptors.request.use(S=>v(p(S)),S=>Promise.reject(S))};f(i),f(c),f(u);const b=_=>{_.interceptors.request.use(S=>y(S))};b(d),b(s),b(u);const m=(_,S=!1)=>{localStorage.setItem("authTokensAccess",JSON.stringify(_.access)),S&&localStorage.setItem("authTokensRefresh",JSON.stringify(_.refresh))},C=_=>{t.user=_,localStorage.setItem("user",JSON.stringify(_))},h=()=>{t.user=null,localStorage.clear(),sessionStorage.removeItem("is_adult"),n.push(`/${r.params.orgId}/`),window.location.reload()};return{axiosInstanceAuthenticationGet:i,axiosInstanceAuthenticationPost:c,axiosInstanceAuthenticationPostApiKey:u,axiosInstancePost:l,axiosInstanceGet:a,axiosInstanceGetApiKey:s,axiosInstancePostApiKey:d}},X=class X{constructor(){Z(this,"axiosInstanceGet");Z(this,"axiosInstancePost");Z(this,"axiosInstanceAuthenticationGet");Z(this,"axiosInstanceAuthenticationPost");Z(this,"axiosInstanceGetApiKey");Z(this,"axiosInstancePostApiKey");Z(this,"axiosInstanceAuthenticationPostApiKey");Z(this,"currentUpsaleController",null);Z(this,"controller",new AbortController);this.axiosInstanceGet=X._axiosGet,this.axiosInstancePost=X._axiosPost,this.axiosInstanceGetApiKey=X._axiosPostApiKey,this.axiosInstancePostApiKey=X._axiosPostApiKey,this.axiosInstanceAuthenticationPostApiKey=X._axiosAuthPostApiKey,this.axiosInstanceAuthenticationGet=X._axiosAuthGet,this.axiosInstanceAuthenticationPost=X._axiosAuthPost}static create(n){return n&&!X._config&&X._initialize(n),X._config||console.warn("InitConnection не инициализирован"),new X}static _initialize(n,r=null){const o=le(),a=ue(),{config_lib:s}=q.storeToRefs(o),{stateCard:i,recountGroupTotalAmount:l}=q.storeToRefs(a);X._config=n,X._cardStore=a,X._stateCard=i,X._recountGroupTotalAmount=l,s.value=n;const c=za(n);X._axiosPostApiKey=c.axiosInstanceGetApiKey,X._axiosPostApiKey=c.axiosInstancePostApiKey,X._axiosAuthPostApiKey=c.axiosInstanceAuthenticationPostApiKey,X._axiosGet=c.axiosInstanceGet,X._axiosPost=c.axiosInstancePost,X._axiosAuthGet=c.axiosInstanceAuthenticationGet,X._axiosAuthPost=c.axiosInstanceAuthenticationPost}get config(){return X._config}get cardStore(){return X._cardStore}get stateCard(){return X._stateCard}get recountGroupTotalAmount(){return X._recountGroupTotalAmount}async updateTheme(){var s,i;const n=JSON.parse(localStorage.getItem("themeConfig"))??null,r=_e();if(n!==null){r.updateColor(n);return}const o=le(),a=await((i=this.axiosInstanceGet)==null?void 0:i.get(`org/organizations/${(s=this.config)==null?void 0:s.orgId}/design/`));o.setStateDrum(a==null?void 0:a.data.hide_barban),o.setKioskTimeout(a==null?void 0:a.data.kiosk_timeout),localStorage.setItem("themeConfig",JSON.stringify(a.data)),r.updateColor(a.data)}async getGroupByID(n){var r,o;try{const a=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(r=this.config)==null?void 0:r.pointId}/group/${n}`));return a==null?void 0:a.data}catch(a){throw console.error("Ошибка в request.ts[getGroupByID]",a),a}}async loadGroupProducts(n){var r,o;try{const a=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(r=this.config)==null?void 0:r.pointId}/products/?group=${n}`)),s=(a==null?void 0:a.data)||[];for(const i of s)i&&await Dr(i);return await this.cacheImagesInBackground(s),s}catch(a){return console.error("Ошибка загрузки группы:",a),[]}}async getGroup(){var n,r;try{const o=await((r=this.axiosInstanceGet)==null?void 0:r.get(`${(n=this.config)==null?void 0:n.pointId}/groups/`));return o==null?void 0:o.data}catch(o){return console.error("Error fetching products:",o),[]}}async fetchAndCacheAllPages(){var n,r;try{const o=((n=this.config)==null?void 0:n.pointId)||"",a=await et(o);if(a)return a.data;const s=await((r=this.axiosInstanceGet)==null?void 0:r.get(`${o}/group/`)),i=(s==null?void 0:s.data)||[],l=[];for(const c of i){c.products=c.products||[],await Ue(c.id,c),l.push(c);const d=await this.loadGroupProducts(c.id);c.products=d}return await this.cacheImagesInBackground(i),await Ue(o,i),l}catch(o){return console.error("fetchAndCacheAllPages error:",o),[]}}cacheImagesInBackground(n){n.forEach(r=>{var s;const o=r.video_link||r.image_link,a=r.id;o&&a&&this.loadAndCacheImage(o,a),(s=r.products)==null||s.forEach(i=>{const l=i.video_link||i.image_link,c=i.id;l&&c&&this.loadAndCacheImage(l,c)})})}async loadAndCacheImage(n,r){const o=await He(r);if(o){this.dispatchImageCachedEvent(r,o);return}try{const a=await fetch(n);if(!a.ok)throw new Error("Network error");const s=await a.blob();if(s.size===0)throw new Error("Empty blob");await rn(r,s),this.dispatchImageCachedEvent(r,s)}catch(a){console.warn(`[ImageCache] Failed for ${r}:`,a)}}dispatchImageCachedEvent(n,r){window.dispatchEvent(new CustomEvent("image-cached",{detail:{id:n,blob:r}}))}async getProduct(n=null){var r,o;if(!n)return[];try{const a=await((o=this.axiosInstanceGet)==null?void 0:o.get(`${(r=this.config)==null?void 0:r.pointId}/products/${n}`));return a==null?void 0:a.data}catch(a){return console.error("Error fetching cardProducts:",a),[]}}async getSingleProduct(n){var a;const r=le(),{config_lib:o}=q.storeToRefs(r);try{let s=await on(n);if(s)this._fullCardProduct(s);else{const i=await((a=this.axiosInstanceGet)==null?void 0:a.get(`${o.value.pointId}/products/${n}`));(i==null?void 0:i.status)===200&&this._fullCardProduct(i.data)}}catch(s){throw console.log("store card[getFetchProducts]:",s),s}}_fullCardProduct(n){const r=ue();r.stateCard.openCard={...n,amount:1},r.stateCard.groupModifiers=n.group_modifiers,n.modifiers.length>0&&r.stateCard.groupModifiers.unshift({default_amount:0,description:"",group_modifiers:n.modifiers,id:"Добавки2000",image_link:null,max_amount:1,min_amount:n.modifiers.reduce((o,a)=>o+=a.min_amount,0),name:"Добавки",required:!1}),r.stateCard.groupModifiersSelected=new Array(r.stateCard.groupModifiers.length).fill({group:"",modifiers:[],modifier_count:0}),r.stateCard.productSizes=n.sizes,r.defaultAmountModifiers(),n.show_recommendations&&this.productUpsale(n.id)}async getTheme(){try{this.updateTheme()}catch(n){return console.error("Error fetching products:",n),[]}}async authorizeByCard(n){var r,o;try{const a=await((o=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:o.post(`${(r=this.config)==null?void 0:r.domain}/api/user/validate-card/`,{card_number:n}));return localStorage.setItem("authTokensAccess",JSON.stringify(a==null?void 0:a.data.access)),localStorage.setItem("authTokensRefresh",JSON.stringify(a==null?void 0:a.data.refresh)),a==null?void 0:a.data}catch(a){throw console.error("Ошибка авторизации:",a),a}}async getLoyalSmsCode(n){var r,o;try{const a=await((o=this.axiosInstancePostApiKey)==null?void 0:o.post(`${(r=this.config)==null?void 0:r.domain}/api/device/auth/request-otp/`,{phone:n}));return a==null?void 0:a.data}catch(a){throw console.error("Ошибка получения sms-code:",a),a}}async sendSmsCodeForAuth(n,r){var o,a;try{const s=await((a=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:a.post(`${(o=this.config)==null?void 0:o.domain}/api/device/auth/`,{code:n,phone:r}));return s==null?void 0:s.data}catch(s){throw console.error("Ошибка отправки sms-code:",s),s}}async callStaff(n,r){var o,a,s,i;try{const l=await((s=this.axiosInstancePost)==null?void 0:s.post(`${(o=this.config)==null?void 0:o.domain}/api/org_unit/${(a=this.config)==null?void 0:a.pointId}/table/${n}/call-staff/`,{reason:r}));return(i=l==null?void 0:l.data)==null?void 0:i.response_text}catch(l){throw console.error("Ошибка[callWaiter]",l),l}}async createOrder(n,r,o=!0,a,s=!1,i=!1){var v,f,b;const l=Oe(),c=s?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,d=o?c:this.axiosInstanceAuthenticationPost,u=o?"/device/order/create":"/order/create",p=o?(v=this.config)==null?void 0:v.pointId:(f=this.config)==null?void 0:f.pointId,y=await(d==null?void 0:d.post(`${(b=this.config)==null?void 0:b.domain}/api/org_unit/${p}${u}`,{items:n,table:r||null,comment:a}));return(y==null?void 0:y.status)===201&&l.orderSocket(y==null?void 0:y.data.id,o,i),y}async initPaymentLink(n,r=!0){const o=r?this.axiosInstancePost:this.axiosInstanceAuthenticationPost,a=le(),s=r?"TERMINAL":"YOOKASSA",i=await(o==null?void 0:o.post("payment/init",{by_bonuses:a.countBonus,order:n,provider_type:s}));return i==null?void 0:i.data}async orderPay(n){var r;return(r=this.axiosInstanceAuthenticationPostApiKey)==null?void 0:r.post(`order/${n}/pay/`,{order_id:n})}async getProfile(){var r,o;const n=await((o=this.axiosInstanceAuthenticationGet)==null?void 0:o.get(`user/current?organization=${(r=this.config)==null?void 0:r.orgId}`));if((n==null?void 0:n.status)===200){const a=le();return a.profile=n.data,a.is18Allowed=sessionStorage.getItem("is_adult")==="true",n.data}else return n}async calculateDiscount(n,r=!0,o=!1){var c,d;const a=o?this.axiosInstanceAuthenticationPostApiKey:this.axiosInstancePostApiKey,s=r?a:this.axiosInstanceAuthenticationPost,i=r?(c=this.config)==null?void 0:c.pointId:(d=this.config)==null?void 0:d.pointId,l=await(s==null?void 0:s.post(`/org_unit/${i}/cart/calculate-discount/`,n));return(l==null?void 0:l.status)===200?l.data:l}async productUpsale(n){var s,i,l;const r=ue(),{dataUpSale:o}=q.storeToRefs(r);(s=this.currentUpsaleController)==null||s.abort();const a=new AbortController;this.currentUpsaleController=a;try{const c=await((l=this.axiosInstanceGet)==null?void 0:l.get(`/${(i=this.config)==null?void 0:i.pointId}/products/${n}/recommendation/`,{signal:a.signal}));a.signal.aborted||(o.value=c==null?void 0:c.data)}catch(c){if(c.name==="AbortError"||c.name==="CanceledError"){console.log("Upsale отменён — пришёл новый запрос");return}throw console.error("Ошибка upsale:",c),c}finally{this.currentUpsaleController===a&&(this.currentUpsaleController=null)}}};Z(X,"_config",null),Z(X,"_axiosGet"),Z(X,"_axiosGetApiKey"),Z(X,"_axiosPostApiKey"),Z(X,"_axiosAuthPostApiKey"),Z(X,"_axiosPost"),Z(X,"_axiosAuthGet"),Z(X,"_axiosAuthPost"),Z(X,"_cardStore",null),Z(X,"_stateCard",null),Z(X,"_recountGroupTotalAmount",null);let Ne=X;const Ua=e.defineComponent({__name:"UseScrollCenter",props:{axis:{},behavior:{},autoScroll:{type:Boolean},container:{},idActive:{},clearContainer:{type:Boolean}},setup(t,{expose:n}){const r=t,o=le(),a=e.ref(null),s=async l=>{if(!a.value||!l)return;let c=window;r.container&&(c=typeof r.container=="string"?document.querySelector(r.container)||window:r.container);const d={behavior:r.behavior};if(r.axis==="x"){const u=c===window?window.innerWidth:c.clientWidth,p=l.offsetWidth;let y=l.offsetLeft;if(c!==window){const v=c.getBoundingClientRect();y=l.getBoundingClientRect().left-v.left+c.scrollLeft}y-=(u-p)/2,d.left=Math.max(0,y)}else{const u=c===window?window.innerHeight:c.clientHeight,p=l.offsetHeight;let y=l.offsetTop;if(c!==window){const v=c.getBoundingClientRect();y=l.getBoundingClientRect().top-v.top+c.scrollTop}y-=(u-p)/2,d.top=Math.max(0,y)}try{c===window?window.scrollTo(d):c.scrollTo(d)}catch(u){console.error("Scroll error:",u)}};e.onMounted(async()=>{if(r.autoScroll){let l=null;if(await e.nextTick(),o.activeScrolling_lib){const c=o.activeScrolling_lib.findIndex(d=>d.id===r.idActive);r.idActive?(l=document.getElementById(`scrolling${r.idActive}`),l&&c!==-1&&(o.activeScrolling_lib[c]=l)):o.activeScrolling_lib[c]&&(l=o.activeScrolling_lib[c]),s(l)}}});const i=async l=>{r.clearContainer&&(o.activeScrolling_lib=[]);const c=l.currentTarget;await e.nextTick(),o.activeScrolling_lib.includes(c)||o.activeScrolling_lib.push(c),s(c)};return n({scrollToElement:s}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:a,class:"scroll-to-wrapper"},[e.renderSlot(l.$slots,"default",{handleTargetClick:i},void 0,!0)],512))}}),ne=(t,n)=>{const r=t.__vccOpts||t;for(const[o,a]of n)r[o]=a;return r},Lt=ne(Ua,[["__scopeId","data-v-b510c3f1"]]),Ha={},ja={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 qa(t,n){return e.openBlock(),e.createElementBlock("svg",ja,[...n[0]||(n[0]=[e.createElementVNode("defs",null,null,-1),e.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 zt=ne(Ha,[["render",qa]]),Wa=["id","onClick"],Ga={class:"modified_plus_btn"},Ka=["src"],Ja={key:2,class:"wrapper_modifier_item"},Xa={key:0,class:"modifier_item_n_wrapper"},Za=["src"],Ya={key:1,class:"modifier_plus_item"},Qa=["src"],es=["src"],or=ne(e.defineComponent({__name:"PlusModifier",props:{isSectionModifier:{type:Boolean},toggleNotRequire:{type:Function}},setup(t){const n=ue(),r=_e(),{stateCard:o}=q.storeToRefs(n),{itemThemes:a}=q.storeToRefs(r),s=e.ref([]),i=e.ref([]),l=e.ref(null),c=e.ref(null),d=p=>{p instanceof HTMLElement&&!s.value.includes(p)&&s.value.push(p)},u=p=>{c.value=p};return e.onMounted(async()=>{await e.nextTick(),o.value.plusButtonsRefs=s.value}),e.watchEffect(()=>{i.value=o.value.groupModifiersSelected,document.body.style.overflow=""}),e.onBeforeUnmount(()=>{s.value=[],o.value.plusButtonsRefs=[]}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({card_modified_wrapper_many:e.unref(o).groupModifiers.length>=5})},[e.unref(o).groupModifiersSelected?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["card_modified_wrapper",[e.unref(o).groupModifiers.length<=4?"card_modified_wrapper_center":""]]),ref_key:"scrollPlusContainer",ref:l},[e.createVNode(Lt,{axis:"x",behavior:"smooth",container:l.value,autoScroll:!0,idActive:c.value,clearContainer:!0},{default:e.withCtx(({handleTargetClick:v})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).groupModifiers,(f,b)=>{var m,C;return e.openBlock(),e.createElementBlock("div",{class:"button_modified",key:f.id,ref_for:!0,ref:d,id:"scrolling"+f.id,"data-clickable":"true",onClick:h=>{t.toggleNotRequire&&t.toggleNotRequire(f,b),u(f.id),v(h)}},[e.createElementVNode("div",Ga,[i.value[b].modifiers.length===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{modified_plus_btn_active:f.id===((m=e.unref(o).groupCurrentOpen)==null?void 0:m.id)&&t.isSectionModifier},"modified_plus_active"])},[e.createVNode(zt,{"aria-label":`Открыть группу модификаторов ${f.name}`},null,8,["aria-label"])],2)):i.value[b].modifiers.length===1?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["modified_plus_btn modified_plus_btn_solo",{modified_plus_btn_active:f.id===((C=e.unref(o).groupCurrentOpen)==null?void 0:C.id)&&t.isSectionModifier}])},[e.createElementVNode("img",{src:i.value[b].modifiers[0].image_link||e.unref(a).fallback_image||"",alt:"Модификатор"},null,8,Ka)],2)):(e.openBlock(),e.createElementBlock("div",Ja,[i.value[b].modifiers.length>2?(e.openBlock(),e.createElementBlock("div",Xa,[i.value[b].modifiers.length===3?(e.openBlock(),e.createElementBlock("img",{key:0,class:"modifier_plus_item modifier_item_three",src:i.value[b].modifiers[2].image_link||e.unref(a).fallback_image||""},null,8,Za)):(e.openBlock(),e.createElementBlock("p",Ya," + "+e.toDisplayString(i.value[b].modifiers.length-2),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[i.value[b].modifiers.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value[b].modifiers[0].image_link||e.unref(a).fallback_image||"",class:"modifier_plus_item modifier_item_first"},null,8,Qa)):e.createCommentVNode("",!0),i.value[b].modifiers.length>1?(e.openBlock(),e.createElementBlock("img",{key:1,src:i.value[b].modifiers[1].image_link||e.unref(a).fallback_image||"",class:"modifier_plus_item modifier_item_second"},null,8,es)):e.createCommentVNode("",!0)])]))]),e.createElementVNode("p",null,e.toDisplayString(f.name),1)],8,Wa)}),128))]),_:1},8,["container","idActive"])],2)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-589e71ca"]]),ts={},ns={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 rs(t,n){return e.openBlock(),e.createElementBlock("svg",ns,[...n[0]||(n[0]=[e.createElementVNode("desc",null," Created with Pixso. ",-1),e.createElementVNode("defs",null,null,-1),e.createElementVNode("circle",{id:"Ellipse 1",cx:"10.923828",cy:"10.923462",r:"10.923489",fill:"#FF6D2E","fill-opacity":"1.000000"},null,-1),e.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 Ut=ne(ts,[["render",rs]]),os={class:"wrapper_modifiers"},as={class:"wrapper_nutritional_value"},ss={class:"nutritional_scheme"},is={key:0,class:"nutritional_parameters"},ls={key:1,class:"nutritional_parameters"},cs={key:2,class:"nutritional_parameters"},ds={key:3,class:"nutritional_parameters"},us={ref:"modifierBody",class:"modifier_shadow"},fs={class:"wrapper_modifiers_title"},ps={class:"wrapper_text_count_modifiers"},ms=["id","aria-label","onClick","onKeydown"],hs={key:0,class:"counter_modifier"},_s={class:"hide_image_corners"},gs=["src","alt"],ys={key:1,loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},bs=["src"],ws={class:"modifier_title"},ks=ne(e.defineComponent({__name:"SectionModifiers",emits:["close"],setup(t,{emit:n}){const r=n,o=_e(),a=ue(),{itemThemes:s}=q.storeToRefs(o),{stateCard:i,recountGroupTotalAmount:l,groupTotalAmount:c}=q.storeToRefs(a),d=e.ref(null),u=Te.useTemplateRefsList(),p=y=>{if(!y)return;const v=i.value.groupModifiers.findIndex(h=>h.id===i.value.groupCurrentOpen.id),f=i.value.plusButtonsRefs[v]||i.value.plusButtonsRefs[0];if(!f)return;const b=y.getBoundingClientRect(),m=f.getBoundingClientRect(),C=y.cloneNode(!0);C.classList.add("flyer"),Object.assign(C.style,{width:`${b.width}px`,height:`${b.height}px`,left:`${b.left}px`,top:`${b.top}px`,position:"fixed",zIndex:"1000"}),document.body.appendChild(C),d.value=C,requestAnimationFrame(()=>{const h=m.left+m.width/3-(b.left+b.width/2),_=m.top+m.height/4-(b.top+b.height/2),S=m.width/b.width*.2;C.style.transform=`translate(${h}px, ${_}px) scale(${S})`,C.style.opacity="0.4",C.style.transition="transform 0.5s ease, opacity 0.5s ease"}),C.addEventListener("transitionend",()=>{C.remove(),d.value=null,f.classList.add("bump"),setTimeout(()=>f.classList.remove("bump"),300)},{once:!0})};return e.watch(()=>i.value.isAnimationFly,y=>{y===!0&&i.value.currentModifier&&(p(u.value.find(v=>v.id===i.value.currentModifier.id)),i.value.isAnimationFly=!1)}),(y,v)=>{var f,b,m,C,h,_,S,V,O,I,E,M;return e.openBlock(),e.createElementBlock("div",os,[e.createElementVNode("div",as,[e.createElementVNode("div",{class:e.normalizeClass(["card_header_inner_back",[(f=e.unref(i).openCard)!=null&&f.proteins_amount?"card_header_inner_back_nutrients":""]]),"aria-label":"Закрыть выбор модификаторов",onClick:v[0]||(v[0]=$=>r("close"))},[e.createVNode(Ut,{class:"arrow_bottom"})],2),e.createElementVNode("div",ss,[(b=e.unref(i).openCard)!=null&&b.energy_amount?(e.openBlock(),e.createElementBlock("div",is,[e.createElementVNode("b",null,e.toDisplayString((m=e.unref(i).openCard)==null?void 0:m.energy_amount),1),v[1]||(v[1]=e.createElementVNode("p",null,"Килокалории",-1))])):e.createCommentVNode("",!0),(C=e.unref(i).openCard)!=null&&C.proteins_amount?(e.openBlock(),e.createElementBlock("div",ls,[e.createElementVNode("b",null,e.toDisplayString((h=e.unref(i).openCard)==null?void 0:h.proteins_amount),1),v[2]||(v[2]=e.createElementVNode("p",null,"Белки",-1))])):e.createCommentVNode("",!0),(_=e.unref(i).openCard)!=null&&_.fat_amount?(e.openBlock(),e.createElementBlock("div",cs,[e.createElementVNode("b",null,e.toDisplayString((S=e.unref(i).openCard)==null?void 0:S.fat_amount),1),v[3]||(v[3]=e.createElementVNode("p",null,"Жиры",-1))])):e.createCommentVNode("",!0),(V=e.unref(i).openCard)!=null&&V.carbohydrates_amount?(e.openBlock(),e.createElementBlock("div",ds,[e.createElementVNode("b",null,e.toDisplayString((O=e.unref(i).openCard)==null?void 0:O.carbohydrates_amount),1),v[4]||(v[4]=e.createElementVNode("p",null,"Углеводы",-1))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",us,[e.createElementVNode("p",fs,e.toDisplayString((I=e.unref(i).groupCurrentOpen)==null?void 0:I.name),1),e.createElementVNode("p",ps,"Выбрано "+e.toDisplayString(e.unref(l))+" из "+e.toDisplayString(e.unref(c)),1),e.createElementVNode("div",{class:e.normalizeClass((E=e.unref(i).groupModifiers.find($=>{var N;return $.id===((N=e.unref(i).groupCurrentOpen)==null?void 0:N.id)}))!=null&&E.group_modifiers.length?"wrapper_modifiers_card":"wrapper_modifiers_card_column")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((M=e.unref(i).groupCurrentOpen)==null?void 0:M.group_modifiers)||[],$=>{var N,U,x;return e.openBlock(),e.createElementBlock("div",{key:$.id,ref_for:!0,ref:e.unref(u).set,id:$.id,class:e.normalizeClass(["modifier_card",{hidden_modifier_card:$.default_amount===0&&((N=e.unref(i).groupCurrentOpen)==null?void 0:N.id)==="Добавки2000"&&$.min_amount===0&&$.max_amount===0}]),tabindex:"0",role:"button","data-clickable":"true","aria-label":`Выбрать модификатор группы ${$.name}`,onClick:g=>e.unref(a).modifierSelect($),onKeydown:e.withKeys(g=>e.unref(a).modifierSelect($),["enter"])},[e.createElementVNode("div",{class:e.normalizeClass([{modifier_card_active:e.unref(i).groupModifiersSelected.some(g=>{var w;return g.group===((w=e.unref(i).groupCurrentOpen)==null?void 0:w.id)&&g.modifiers.some(T=>T.id===$.id)})},"wrapper_image_corners"])},[$.amount>1?(e.openBlock(),e.createElementBlock("div",hs,e.toDisplayString($.amount),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_s,[$.video_link?(e.openBlock(),e.createElementBlock("video",ys,[e.createElementVNode("source",{src:$.video_link||"",type:"video/webm"},null,8,bs)])):(e.openBlock(),e.createElementBlock("img",{key:0,class:"modifier_image",src:$.image_link||e.unref(s).fallback_image||"",alt:$.name},null,8,gs)),e.createElementVNode("div",{class:e.normalizeClass(["wrapper_modifier_title",{wrapper_modifier_title_required:$.min_amount>0||$.required}])},[e.createElementVNode("h3",ws,e.toDisplayString($.name),1),e.createElementVNode("p",null,"+"+e.toDisplayString(((x=(U=$.sizes)==null?void 0:U.find(g=>g.id===e.unref(i).selectedSize.id))==null?void 0:x.price)||$.price||0)+"₽",1)],2)])],2)],42,ms)}),128))],2)],512)])}}}),[["__scopeId","data-v-22d945f1"]]),Cs={key:0,class:"card_size_place"},Ss=["onClick","onKeydown","aria-label"],Es={key:1,class:"card_size static"},xs=["onClick","onKeydown","aria-label"],Ht=3,Ns=ne(e.defineComponent({__name:"SizeModifier",setup(t){const n=ue(),{stateCard:r}=q.storeToRefs(n),o=e.ref(null),a=e.ref(50),s=e.ref(),i=e.ref(0),l=e.ref(0),c=e.ref(null),d=e.computed(()=>{var h;if(r.value.productSizes.length<=3)return r.value.productSizes[s.value.index]||r.value.productSizes[0];const m=i.value+1,C=((h=p.value[m])==null?void 0:h.originalIndex)??1;return r.value.productSizes[C]}),u=()=>{c.value&&r.value.productSizes.length>=3&&(l.value=c.value.offsetWidth/Ht)},p=e.computed(()=>{if(r.value.productSizes.length<=3)return r.value.productSizes;const m=r.value.productSizes;return[...m.map((C,h)=>({...C,originalIndex:h})),...m.map((C,h)=>({...C,originalIndex:h})),...m.map((C,h)=>({...C,originalIndex:h}))]}),y=(m,C)=>{if(s.value={id:m.id,title:m.name,index:C,is_default:m.is_default},m.price!==null&&r.value.openCard&&(r.value.openCard={...r.value.openCard,price:m.price}),r.value.selectedSize=m,r.value.productSizes.length>3){u();const h=i.value+1;C<h?v():C>h&&f()}else{const h=r.value.productSizes.length,_=(C+.5)*(100/h);a.value=_}},v=()=>{var m;if(!(r.value.productSizes.length<=3)){if(i.value--,i.value<r.value.productSizes.length-Ht+1){i.value+=r.value.productSizes.length;const C=(m=c.value)==null?void 0:m.querySelector(".card_size");C&&(C.style.transition="none",C.style.transform=`translateX(-${i.value*l.value}px)`,C.offsetHeight,C.style.transition="transform 0.2s ease-in-out")}b()}},f=()=>{var m;if(!(r.value.productSizes.length<=3)){if(i.value++,i.value>=r.value.productSizes.length*2){i.value-=r.value.productSizes.length;const C=(m=c.value)==null?void 0:m.querySelector(".card_size");C&&(C.style.transition="none",C.style.transform=`translateX(-${i.value*l.value}px)`,C.offsetHeight,C.style.transition="transform 0.2s ease-in-out")}b()}},b=()=>{var _;if(r.value.productSizes.length<=3)return;const m=i.value+1,C=((_=p.value[m])==null?void 0:_.originalIndex)??0,h=r.value.productSizes[C];s.value={id:h.id,title:h.name,index:C,is_default:h.is_default}};return e.watch(()=>[r.value.productSizes,c.value],([m=[],C])=>{if(Array.isArray(m)&&m.length>0&&C!==null){let h=m.findIndex(_=>_.is_default===!0);m.length<3&&o.value&&parseInt(o.value.style.minWidth)<767&&(o.value.style.width="100px"),h>-1?(i.value=h,y(m[h],h),l.value=120/Ht):m.length===2||m.length===1?(y(m[0],0),a.value=(0+.5)*(100/2)):(y(m[1],1),a.value=(1+.5)*(100/3))}}),e.watch(()=>{var m;return[(m=r.value.selectedSize)==null?void 0:m.id,r.value.groupModifiersSelected]},([m,C])=>{if(!m||!Array.isArray(C))return;const h=C.map(_=>({..._,modifiers:_.modifiers.map(S=>{if(!S.sizes||S.sizes.length===0)return S;const V=S.sizes.find(O=>O.id===m);return V?{...S,size:V,price:V.price??S.price}:S})}));JSON.stringify(h)!==JSON.stringify(r.value.groupModifiersSelected)&&(r.value.groupModifiersSelected=h)},{deep:!0}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",u)}),(m,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slider_container",ref_key:"slider_container",ref:o},[e.createElementVNode("div",{class:"card_size_place_wrapper",ref_key:"sliderWrapper",ref:c},[e.unref(r).productSizes.length>1&&s.value?(e.openBlock(),e.createElementBlock("div",Cs,[e.unref(r).productSizes.length>3?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"card_size",style:e.normalizeStyle({transform:`translateX(-${i.value*l.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(h,_)=>(e.openBlock(),e.createElementBlock("li",{key:`${h.id}-${_}`,onClick:S=>y(h,_),onKeydown:e.withKeys(S=>y(h,_),["enter"]),class:e.normalizeClass({active:s.value.id===h.id&&s.value.index===h.originalIndex}),tabindex:"0",role:"button","aria-label":`Выбрать размер ${h.name}`},e.toDisplayString(h.alt_name?h.alt_name:h.name),43,Ss))),128))],4)):(e.openBlock(),e.createElementBlock("ul",Es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).productSizes,(h,_)=>(e.openBlock(),e.createElementBlock("li",{key:`${h.id}-${_}`,onClick:S=>y(h,_),onKeydown:e.withKeys(S=>y(h,_),["enter"]),class:e.normalizeClass({active:s.value.id===h.id&&s.value.index===_}),tabindex:"0",role:"button","aria-label":`Выбрать размер ${h.name}`},e.toDisplayString(h.alt_name?h.alt_name:h.name),43,xs))),128))])),d.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"size_active",style:e.normalizeStyle(e.unref(r).productSizes.length<=3?{left:`${a.value}%`}:{})},[e.createElementVNode("p",null,e.toDisplayString(d.value.alt_name?d.value.alt_name:d.value.name),1)],4)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],512)),[[e.vShow,e.unref(r).productSizes.length>1&&s.value]])}}),[["__scopeId","data-v-2571f98b"]]),Bs="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",Ts={class:"counter_container"},As={class:"card_size_place_wrapper",ref:"sliderWrapper"},vs={class:"cart_amount_counter"},$s={class:"button_circle_number"},Ms=ne(e.defineComponent({__name:"NumberModifier",setup(t){const n=ue(),{stateCard:r}=q.storeToRefs(n),o=()=>{var s,i;(s=r.value.openCard)!=null&&s.amount&&((i=r.value.openCard)==null?void 0:i.amount)>1&&(r.value.openCard.amount-=1)},a=()=>{var s;(s=r.value.openCard)!=null&&s.amount&&(r.value.openCard.amount+=1)};return(s,i)=>{var l,c;return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",As,[e.createElementVNode("div",vs,[e.createElementVNode("p",{class:e.normalizeClass(["cart_circle_minus",[((l=e.unref(r).openCard)==null?void 0:l.amount)===1?"card_circle_minus_alone":""]]),"aria-label":"Уменьшить количество продукта","data-clickable":"true",onClick:e.withModifiers(o,["stop","prevent"])},null,2),e.createElementVNode("p",$s,e.toDisplayString((c=e.unref(r).openCard)==null?void 0:c.amount),1),e.createElementVNode("p",{class:"cart_circle_plus","aria-label":"Увеличить количество продукта","data-clickable":"true",onClick:e.withModifiers(a,["stop","prevent"])},"+")])],512)])}}}),[["__scopeId","data-v-98340f32"]]);function ar(t,n=800){const r=e.ref(t),o=e.ref(t);let a=null,s=null,i=t;const l=c=>{s||(s=c);const d=c-s,u=Math.min(d/n,1),p=u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2;r.value=Math.round(i+(o.value-i)*p),u<1?a=requestAnimationFrame(l):(r.value=o.value,a=null)};return e.watch(o,()=>{a&&cancelAnimationFrame(a),i=r.value,s=null,a=requestAnimationFrame(l)},{immediate:!0}),e.onUnmounted(()=>{a&&cancelAnimationFrame(a)}),{displayNumber:r,targetNumber:o,update:c=>{o.value=c}}}const Ee=e.defineComponent({__name:"RecountNumber",props:{price:{type:Number,required:!0},duration:{type:Number},fixedFloat:{type:Number,require:!1}},setup(t){const n=t,{displayNumber:r,update:o}=ar(n.price||0,n.duration||800);return e.watchEffect(()=>{o(n.price)}),(a,s)=>(e.openBlock(),e.createElementBlock("span",null,e.toDisplayString(e.unref(r).toFixed(t.fixedFloat)),1))}}),Ps=["disabled","id"],Ie=e.defineComponent({__name:"ButtonDefault",props:{textButtonDefault:{type:String,required:!0},disabled:{type:Boolean,default:!1},onClick:{type:Function,required:!0}},setup(t){const n=t,r=()=>{n.onClick()};return(o,a)=>(e.openBlock(),e.createElementBlock("button",{class:"buttonDefaultWrapper",disabled:t.disabled,onClick:r,id:t.disabled?"buttonDefaultDisabled":""},e.toDisplayString(t.textButtonDefault),9,Ps))}}),Is={class:"notification_info"},Vs={class:"notification_text"},Rs={key:0,class:"wrapper_button_accept"},jt=ne(e.defineComponent({__name:"NotificationWindow",props:{textNotificationDefault:{},backgroundColor:{},visible:{type:Boolean},buttonAccept:{}},emits:["update:visible"],setup(t,{emit:n}){const r=t,o=n,a=e.computed(()=>r.backgroundColor||"rgba(50, 50, 50, 0.9)"),s=e.ref(r.visible);e.watch(()=>r.visible,async l=>{l&&await e.nextTick(),s.value=l});const i=()=>{s.value=!1};return(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"notificationBlack",appear:"",onAfterLeave:c[0]||(c[0]=()=>{o("update:visible",!1)})},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"background_black",onClick:i})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"notification",appear:"",onAfterLeave:c[1]||(c[1]=()=>{o("update:visible",!1)})},{default:e.withCtx(()=>{var d;return[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"notification_overlay",onClick:i},[e.createElementVNode("div",{class:"notification_wrapper",style:e.normalizeStyle({"background-color":a.value,border:`2px solid ${a.value}`})},[e.createElementVNode("div",Is,[e.createElementVNode("div",Vs,[e.createTextVNode(e.toDisplayString(t.textNotificationDefault)+" ",1),(d=t.buttonAccept)!=null&&d.state?(e.openBlock(),e.createElementBlock("div",Rs,[e.createVNode(Ie,{class:"button_accept",textButtonDefault:t.buttonAccept.text,onClick:t.buttonAccept.acceptBtn,disabled:t.buttonAccept.disabled},null,8,["textButtonDefault","onClick","disabled"])])):e.createCommentVNode("",!0)])])],4)])):e.createCommentVNode("",!0)]}),_:1})],64))}}),[["__scopeId","data-v-16124075"]]),Os={class:"button_price button_price_modifiers"},Ds=["src"],Fs={class:"button_text_container"},Ls={class:"button_text_price"},zs=ne(e.defineComponent({__name:"ButtonPriceCount",props:{qr_menu:{type:Boolean,default:!1},closeProduct:{}},setup(t){const n=Y.useRouter(),r=Y.useRoute(),o=ue(),a=le(),s=_e(),i=e.ref([]),l=e.ref([]),c=t,{stateCard:d,totalPrice_libCard:u,isOpenWindow:p,isAddToCard:y}=q.storeToRefs(o),{itemThemes:v}=q.storeToRefs(s),f=e.ref(!0),b=e.ref(!1),m=()=>{var h,_,S,V,O,I;if(f.value){o.setCurrentCard(d.value.openCard),b.value=!0;const E=d.value.groupModifiers.findIndex(M=>o.checkedRequiredBtn.group.id===M.id);o.checkedRequiredBtn.haveRequaire&&o.toggleNotRequire(o.checkedRequiredBtn.group,E);return}const C=d.value.groupModifiersSelected||[];if(i.value=[],l.value=[],Array.isArray(C)&&C.length>0&&C.forEach(E=>{const M=E.group,$=E.modifiers||[];M==="Добавки2000"?i.value=$.map(N=>{var U;return{...N,old_price:N.price,size:Array.isArray(N.size)?N.size.map(x=>x.id).filter(Boolean):(U=N.size)!=null&&U.id?N.size.id:void 0}}):$.length>0&&l.value.push({group:M,modifiers:$.map(N=>{var U;return{...N,old_price:N.price,size:Array.isArray(N.size)?N.size.map(x=>x.id).filter(Boolean):(U=N.size)!=null&&U.id?N.size.id:void 0}})})}),document.body.style.overflow="",d.value.openCard){const E={id:d.value.openCard.id,amount:d.value.openCard.amount,name:d.value.openCard.name,image_link:d.value.openCard.image_link,price:d.value.openCard.price,old_price:d.value.openCard.price,size:((h=d.value.selectedSize)==null?void 0:h.id)??((S=(_=d.value.openCard.sizes)==null?void 0:_.find(M=>M.is_default))==null?void 0:S.id),sizes:((V=d.value.selectedSize)==null?void 0:V.id)??((I=(O=d.value.openCard.sizes)==null?void 0:O.find(M=>M.is_default))==null?void 0:I.id),modifiers:i.value,group_modifiers:l.value,energy_amount:d.value.openCard.energy_amount??0,proteins_amount:d.value.openCard.proteins_amount??0,fat_amount:d.value.openCard.fat_amount??0,carbohydrates_amount:d.value.openCard.carbohydrates_amount??0};c.closeProduct&&c.closeProduct(),a.addToCart(E),y.value=!0}p.value=!1,n.push(`/${r.params.orgId}/`)};return e.watch(()=>d.value.productSizes,C=>{!C||C.length===0||!d.value.selectedSize||(d.value.selectedSize={...d.value.selectedSize})},{immediate:!0}),e.watchEffect(()=>{o.checkedRequiredBtn.haveRequaire?f.value=!0:f.value=!1}),e.onMounted(()=>{y.value=!1}),(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"button_price_bg_product",onTouchstart:h[3]||(h[3]=e.withModifiers(()=>{},["stop"])),onPointerdown:h[4]||(h[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(jt,{visible:b.value,textNotificationDefault:e.unref(d).textErrorRequaired,backgroundColor:e.unref(v).accent_color?e.unref(v).accent_color:"#FF6D2E",buttonAccept:null,"onUpdate:visible":h[0]||(h[0]=_=>b.value=_)},null,8,["visible","textNotificationDefault","backgroundColor"]),e.createElementVNode("div",Os,[e.createVNode(Ms),e.createElementVNode("div",{class:e.normalizeClass(["card_product_button_buy",{buy_active:!f.value}]),"data-clickable":"true",onClick:m,onTouchstart:h[1]||(h[1]=e.withModifiers(()=>{},["stop"])),onPointerdown:h[2]||(h[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("img",{src:e.unref(Bs),class:"card_product_button_icon"},null,8,Ds),e.createElementVNode("div",Fs,[e.createElementVNode("p",Ls,[e.createVNode(Ee,{price:+e.unref(u),fixedFloat:2},null,8,["price"]),h[5]||(h[5]=e.createTextVNode(" ₽ ",-1))])])],34)])],32))}}),[["__scopeId","data-v-accbfb6a"]]),Us={class:"modified_amount"},Hs={class:"hide_image_corners"},js=["src"],qs={class:"wrapper_modifier_title"},Ws={class:"amount_title"},Gs={class:"wrapper_amount_counter"},Ks={class:"amount_count"},Js={class:"amount_wrapper"},Xs={class:"add_counter_amount"},Zs=ne(e.defineComponent({__name:"ModalAmount",setup(t){const n=ue(),r=_e(),{itemThemes:o}=q.storeToRefs(r),{stateCard:a}=q.storeToRefs(n),s=e.computed(()=>{var c,d,u;return((u=(d=(c=a.value.currentModifier)==null?void 0:c.sizes)==null?void 0:d.find(p=>p.id===a.value.selectedSize.id))==null?void 0:u.price)??Re(a.value.currentModifier)}),i=()=>{a.value.currentModifier&&(a.value.currentModifier.amount=a.value.modalCount),n.modifierSelect(a.value.currentModifier),a.value.isModifiedAmount=!1},l=()=>{a.value.modalCount=1,a.value.currentModifier.amount=1};return(c,d)=>{var u,p;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Us,[e.createElementVNode("div",Hs,[e.createElementVNode("img",{class:"modifier_image",src:((u=e.unref(a).currentModifier)==null?void 0:u.image_link)||e.unref(o).fallback_image||""},null,8,js),e.createElementVNode("div",qs,[e.createElementVNode("p",Ws,e.toDisplayString((p=e.unref(a).currentModifier)==null?void 0:p.name),1),e.createElementVNode("p",null,"+ "+e.toDisplayString(s.value)+"₽",1)])])]),e.createElementVNode("div",Gs,[e.createElementVNode("div",{class:"amount_mines",onClick:d[0]||(d[0]=e.withModifiers((...y)=>e.unref(n).minusAmount&&e.unref(n).minusAmount(...y),["stop"]))},[...d[1]||(d[1]=[e.createElementVNode("div",null,null,-1)])]),e.createElementVNode("p",Ks,e.toDisplayString(e.unref(a).modalCount),1),e.createElementVNode("div",Js,[e.createVNode(zt,{onClick:e.withModifiers(e.unref(n).plusAmount,["stop"])},null,8,["onClick"])])]),e.createElementVNode("p",{class:"clear_count",onClick:e.withModifiers(l,["stop"])},"Убрать все"),e.createElementVNode("div",Xs,[e.createVNode(Ie,{textButtonDefault:"Добавить",onClick:i,class:"button_add_group_modifiers"})])],64)}}}),[["__scopeId","data-v-6b4f039c"]]),Ys=(t,n,r)=>Math.max(n,Math.min(t,r)),Qs=(t,n)=>Math.pow(t,n*5),sr=(t,n,r)=>n===0||Math.abs(n)===1/0?Qs(t,r):t*n*r/(n+r*t),ht=(t,n)=>n*parseFloat(t)/100,qt=(t,n,r,o=.15)=>o===0?Ys(t,n,r):t<n?-sr(n-t,r-n,o)+n:t>r?+sr(t-r,r-n,o)+r:t,ge=(t,{min:n,max:r})=>n!==void 0&&t<n?n:r!==void 0&&t>r?r:t;function ei(t,n,r){const o=e.ref(0),a=e.computed(()=>t.value.map(c=>typeof c=="string"?ht(c,r.value):c)),s=e.computed(()=>Math.min(...a.value)),i=e.computed(()=>Math.max(...a.value)),l=e.computed(()=>{const c=a.value.reduce((d,u)=>Math.abs(u-n.value)<Math.abs(d-n.value)?u:d);return a.value.indexOf(c)});return{currentSnapPointIndex:o,flattenedSnapPoints:a,minSnapPoint:s,maxSnapPoint:i,closestSnapPointIndex:l}}const ir=ne(e.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(t,{expose:n,emit:r}){const o=t,a=r,s=Te.useVModel(o,"modelValue",a,{passive:!0});e.watch(s,L=>{L&&P()}),e.onMounted(()=>{s.value&&P()});const i=e.ref(),l=e.ref(null),c=e.ref(null),d=e.ref(null),u=e.ref(null),p=e.ref(o.expandOnContentDrag),{height:y}=Te.useWindowSize(),{height:v}=Te.useElementBounding(i),{height:f}=Te.useElementBounding(l),{height:b}=Te.useElementBounding(u),{height:m}=Te.useElementBounding(c),C=e.computed({get(){return ge(Math.ceil(b.value+f.value+m.value),{max:y.value})},set(L){[f.value,b.value,m.value]=L}}),h=e.ref(0),_=e.ref(0),S=ce.useMotionValue(0),V=ce.useMotionValue(0),{snapPoints:O}=e.toRefs(o),I=e.computed(()=>O.value??[C.value]),{flattenedSnapPoints:E,currentSnapPointIndex:M,closestSnapPointIndex:$,minSnapPoint:N,maxSnapPoint:U}=ei(I,h,y);let x;function g(L){p.value=!0,w(L)}function w(L){p.value&&L.preventDefault()}const T=L=>{L.key==="Escape"&&z()},A=()=>{o.canBackdropClose&&z()};let B=!1;const P=async()=>{if(B)return;s.value=!0,B=!0,a("opening-started"),await e.nextTick();const L=i.value.$el;v.value=L.getBoundingClientRect().height;const Q=L.querySelector("[data-vsbs-content]"),ie=L.querySelector("[data-vsbs-header]"),Ce=L.querySelector("[data-vsbs-footer]");if(C.value=[ie.getBoundingClientRect().height,Q.getBoundingClientRect().height,Ce.getBoundingClientRect().height],await e.nextTick(),M.value=E.value.findIndex(Be=>Be===N.value),o.initialSnapPoint){const Be=o.initialSnapPoint;if(Be<0||Be>=I.value.length)return console.warn("Index out of bounds");h.value=typeof I.value[Be]=="number"?ge(I.value[Be],{max:y.value}):ht(I.value[Be],y.value)}else h.value=ge(N.value,{max:y.value});_.value=h.value,S.jump(h.value),V.jump(h.value),requestAnimationFrame(()=>{x=ce.animate(S,h.value,{duration:o.duration/1e3,ease:"easeInOut"}),x=ce.animate(V,0,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>{o.blocking&&a("opened")}})}),window.addEventListener("keydown",T),B=!1};let F=!1;const z=()=>{F||(s.value=!1,F=!0,a("closing-started"),window.removeEventListener("keydown",T),setTimeout(()=>{a("closed"),F=!1},o.duration))},J=L=>{if(I.value){if(L<0||L>=I.value.length){console.warn("Index out of bounds");return}M.value=L,h.value=typeof I.value[L]=="number"?ge(I.value[L],{max:y.value}):ht(I.value[L],y.value),x=ce.animate(S,h.value,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>a("snapped",I.value.indexOf(I.value[L]))})}};function D(L){L>0?a("dragging-down"):L<0&&a("dragging-up")}const R=()=>{h.value=v.value,_.value=V.get(),S.jump(h.value),V.jump(_.value)},K=async(L,Q)=>{await e.nextTick(),i.value&&(_.value<=0&&(h.value-=Q.delta.y),h.value<=N.value&&(h.value=N.value,_.value+=Q.delta.y,V.set(o.canSwipeClose?ge(_.value,{min:0}):ge(qt(_.value,-v.value,0,.5),{min:0}))),S.set(ge(qt(h.value,0,U.value,.25),{min:0,max:y.value})),D(Q.delta.y))},re=()=>{if(o.canSwipeClose){let L=h.value/2;o.swipeCloseThreshold&&typeof o.swipeCloseThreshold=="number"&&(L=o.swipeCloseThreshold),o.swipeCloseThreshold&&typeof o.swipeCloseThreshold=="string"&&o.swipeCloseThreshold.includes("%")&&(L=h.value*(Number(o.swipeCloseThreshold.replace("%",""))/100)),Math.abs(_.value)>L&&(_.value=h.value)}else _.value=0;x=ce.animate(V,_.value,{duration:o.duration/1e3,ease:"easeInOut"}),_.value===h.value&&(_.value=0,z()),M.value=$.value,h.value=typeof I.value[$.value]=="number"?ge(I.value[$.value],{max:y.value}):ht(I.value[$.value],y.value),x=ce.animate(S,h.value,{duration:o.duration/1e3,ease:"easeInOut",onComplete:()=>a("snapped",I.value.indexOf(I.value[$.value]))}),x=ce.animate(V,0,{duration:o.duration/1e3,ease:"easeInOut"})},se=(L,Q)=>{if(h.value=v.value,_.value=V.get(),x&&x.stop(),!d.value)return;const ie=d.value.scrollTop===0,Ce=Q.delta.y>0,Be=E.value.length===1,Jc=.5>Math.abs(h.value-U.value);if(Be){if(!o.expandOnContentDrag)return p.value=!1;V.get()===0&&ie&&Ce&&(p.value=!0),V.get()===0&&ie&&!Ce&&(p.value=!1)}else{if(!o.expandOnContentDrag)return p.value=!1;p.value=!0,Jc&&(Ce&&ie&&(p.value=!0),!Ce&&ie&&(p.value=!1),ie||(p.value=!1))}},oe=async(L,Q)=>{if(await e.nextTick(),!o.expandOnContentDrag)return p.value=!1;if(!i.value)return;_.value===0&&p.value&&o.expandOnContentDrag&&(h.value-=Q.delta.y),h.value<=N.value&&(h.value=N.value,p.value&&o.expandOnContentDrag&&(_.value+=Q.delta.y),_.value=ge(_.value,{min:0,max:N.value}),V.set(o.canSwipeClose?ge(_.value,{min:0}):ge(qt(_.value,-v.value,0,.5),{min:0}))),h.value>U.value&&(h.value=U.value),h.value=ge(h.value,{max:y.value}),!(E.value.length===1)&&h.value===U.value&&(p.value=!1),S.set(h.value),D(Q.delta.y)},te=()=>{if(!d.value)return;const L=d.value.scrollTop===0;p.value=L},W=Te.useDebounceFn(L=>J(L),o.duration);return e.watch(I,(L,Q)=>{if(s.value===!1||!L||!Q)return;const ie=L[M.value],Ce=Q[M.value];typeof ie!="string"&&typeof Ce!="string"&&(h.value=ge(ie,{max:y.value}),ie!==Ce&&(x=ce.animate(S,h.value,{duration:o.duration/1e3,ease:"easeInOut"})))}),e.watch(y,()=>W(M.value)),e.watch(C,L=>a("instinctHeight",L)),n({open:P,close:z,snapToPoint:J}),(L,Q)=>(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTo,defer:t.teleportDefer},[e.createElementVNode("div",e.mergeProps(L.$attrs,{"data-vsbs-container":""}),[e.createVNode(e.unref(ce.AnimatePresence),null,{default:e.withCtx(()=>[e.unref(s)&&t.blocking?(e.openBlock(),e.createBlock(e.unref(ce.Motion),{key:0,ref:"backdrop","data-vsbs-backdrop":"",onClick:Q[0]||(Q[0]=ie=>A()),transition:{ease:"easeInOut",duration:t.duration/1e3},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},null,8,["transition"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(ce.AnimatePresence),null,{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(e.unref(ce.Motion),{key:0,ref_key:"sheet",ref:i,exit:{y:"100%",height:e.unref(v)},initial:!1,style:e.normalizeStyle({y:e.unref(V),height:e.unref(S)}),"data-vsbs-shadow":!t.blocking,"data-vsbs-sheet-show":e.unref(s),"aria-modal":"true","data-vsbs-sheet":"",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.Motion),{ref_key:"sheetHeader",ref:l,"data-vsbs-header":"",onPanStart:R,onPan:K,onPanEnd:re,onTouchmove:g,class:e.normalizeClass(t.headerClass)},{default:e.withCtx(()=>[e.renderSlot(L.$slots,"header",{},void 0,!0)]),_:3},8,["class"]),e.createElementVNode("div",{ref_key:"sheetScroll",ref:d,"data-vsbs-scroll":"",onScrollend:te},[e.createVNode(e.unref(ce.Motion),{ref:"sheetContentWrapper","data-vsbs-content-wrapper":"",onPanStart:se,onPan:oe,onPanEnd:re,onTouchmove:w},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"sheetContent",ref:u,"data-vsbs-content":"",class:e.normalizeClass(t.contentClass)},[e.renderSlot(L.$slots,"default",{},void 0,!0)],2)]),_:3},512)],544),e.createVNode(e.unref(ce.Motion),{ref_key:"sheetFooter",ref:c,"data-vsbs-footer":"",onPanStart:R,onPan:K,onPanEnd:re,onTouchmove:g,class:e.normalizeClass(t.footerClass)},{default:e.withCtx(()=>[e.renderSlot(L.$slots,"footer",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["exit","style","data-vsbs-shadow","data-vsbs-sheet-show"])):e.createCommentVNode("",!0)]),_:3})],16)],8,["to","defer"]))}}),[["__scopeId","data-v-cd0d4f76"]]);function _t(t,n=null){const r=Tt(),{initCacheSingle:o,getImageUrl:a}=r,s=e.ref(null),i=e.ref(!1),l=e.computed(()=>{const p=e.unref(t);return p!=null?String(p):null});o("defaultImage");const c=a("defaultImage");e.watch(l,async(p,y)=>{if(p===null){s.value=null,i.value=!1;return}p!==y&&(s.value=null,i.value=!0,await o(p));const v=a(p);e.watch(v,f=>{f&&(s.value=f,i.value=!1)},{immediate:!0})},{immediate:!0});const d=e.computed(()=>s.value||n||c.value||null),u=e.computed(()=>i.value&&l.value!==null);return{mediaUrl:d,isLoading:u}}const ti={class:"card_product_wrapper"},ni={class:"card_product_modifiers_sheet_body"},ri={class:"card__pictures"},oi={key:0,loop:"",autoplay:"",muted:"",playsinline:"",class:"card__video"},ai=["src"],si=["src"],ii={class:"card_header_wrapper"},li={key:0,class:"card_fire_kkal_wrapper"},ci={class:"card_content"},di={class:"wrapper_size"},ui={key:0,class:"description"},fi={key:1},pi=ne(e.defineComponent({__name:"CardProductPage",props:{configPage:{}},setup(t){const n=_e(),r=ue(),{stateCard:o,isOpenWindow:a}=q.storeToRefs(r),{itemThemes:s}=q.storeToRefs(n),i=Y.useRouter(),l=Y.useRoute(),c=t,d=()=>{c.configPage.qr_menu?i.push(`/${l.params.orgId}`):c.configPage.closeProduct()},u=()=>{o.value.isModifiedAmount=!1};e.watch(()=>c.configPage.data,r.setCurrentCard),e.watchEffect(()=>{a.value||(a.value=c.configPage.is_closeProduct)}),e.onBeforeUnmount(()=>r.reset());const p=e.computed(()=>{var v;return(v=o.value.openCard)==null?void 0:v.id}),{mediaUrl:y}=_t(p);return(v,f)=>{var b,m,C,h,_,S,V;return e.openBlock(),e.createElementBlock("div",ti,[e.createVNode(e.unref(ir),{modelValue:e.unref(o).isSectionModifier,"onUpdate:modelValue":f[1]||(f[1]=O=>e.unref(o).isSectionModifier=O),class:"card_product_modifiers_sheet"},{default:e.withCtx(()=>[e.createElementVNode("div",ni,[e.createVNode(ks,{onClose:f[0]||(f[0]=O=>e.unref(o).isSectionModifier=!1)}),e.createVNode(or,{isSectionModifier:e.unref(o).isSectionModifier,toggleNotRequire:e.unref(r).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])]),_:1},8,["modelValue"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(o).isModifiedAmount?(e.openBlock(),e.createElementBlock("div",{key:0,class:"wrapper_modified_amount",onClick:e.withModifiers(u,["stop"])},[e.createVNode(Zs)])):e.createCommentVNode("",!0)])),e.createElementVNode("div",ri,[e.createElementVNode("div",{class:"card__pictures__gradient",style:e.normalizeStyle(e.unref(s).gradientStyle)},null,4),(b=e.unref(o).openCard)!=null&&b.video_link?(e.openBlock(),e.createElementBlock("video",oi,[e.createElementVNode("source",{src:((m=e.unref(o).openCard)==null?void 0:m.video_link)??"",type:"video/webm"},null,8,ai)])):(e.openBlock(),e.createElementBlock("img",{key:1,class:"card__pictures_images",src:e.unref(y)||"",alt:"Product image"},null,8,si)),e.createElementVNode("div",ii,[e.createVNode(Ut,{class:"card_header_back",onClick:d,"aria-label":"Вернуться назад"}),(C=e.unref(o).openCard)!=null&&C.energy_amount?(e.openBlock(),e.createElementBlock("div",li,[f[3]||(f[3]=e.createElementVNode("div",{class:"card_fire_kkal"},null,-1)),e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString((h=e.unref(o).openCard)==null?void 0:h.energy_amount),1),f[2]||(f[2]=e.createTextVNode(" Ккал ",-1))])])):e.createCommentVNode("",!0)]),e.createElementVNode("h4",null,e.toDisplayString((_=e.unref(o).openCard)==null?void 0:_.name),1)]),e.createElementVNode("div",ci,[e.createElementVNode("div",di,[e.createVNode(Ns)]),(S=e.unref(o).openCard)!=null&&S.description?(e.openBlock(),e.createElementBlock("p",ui,e.toDisplayString((V=e.unref(o).openCard)==null?void 0:V.description),1)):e.createCommentVNode("",!0),e.unref(o).groupModifiers.length?(e.openBlock(),e.createElementBlock("div",fi,[f[4]||(f[4]=e.createElementVNode("p",{class:"title_info_modifiers"},"Настрой, как ты любишь",-1)),e.createVNode(or,{isSectionModifier:e.unref(o).isSectionModifier,toggleNotRequire:e.unref(r).toggleNotRequire},null,8,["isSectionModifier","toggleNotRequire"])])):e.createCommentVNode("",!0),e.createVNode(zs,{qr_menu:t.configPage.qr_menu,closeProduct:t.configPage.closeProduct},null,8,["qr_menu","closeProduct"])])])}}}),[["__scopeId","data-v-9fa7a15d"]]),mi={key:0,class:"popupWindowDefault_overlay"},lr=ne(e.defineComponent({__name:"PopupWindowDefault",props:{visible:{type:Boolean}},emits:["update:visible"],setup(t,{emit:n}){const r=t,o=n,a=()=>{o("update:visible",!1)};return e.watch(()=>r.visible,async s=>{s&&await e.nextTick(),r.isVisible=s}),(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"popupWindowDefaultBlack",appear:"",onAfterLeave:i[0]||(i[0]=()=>{o("update:visible",!1)})},{default:e.withCtx(()=>[r.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"background_black",onClick:a})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"popupWindowDefault",appear:"",onAfterLeave:i[1]||(i[1]=()=>{o("update:visible",!1)})},{default:e.withCtx(()=>[r.visible?(e.openBlock(),e.createElementBlock("div",mi,[e.renderSlot(s.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3})],64))}}),[["__scopeId","data-v-08e0e008"]]),hi=["src"],_i={class:"cart_box_content_wrapper"},gi={class:"cart_box_content_info"},yi={class:"cart_amount"},bi={class:"cart_amount_count"},wi={class:"cart_box_info_more"},ki={key:1,class:"cart_modifier_info"},Ci={class:"cart_modifier_content"},Si={class:"wrapper_price_count_cart"},Ei={class:"count_cart_box"},xi={class:"wrapper_modifiers_discount"},cr=ne(e.defineComponent({__name:"CartBox",props:{index:Number,cardItem:Object},emits:["delete"],setup(t,{emit:n}){const r=t,o=n,a=le(),s=_e(),{itemThemes:i}=q.storeToRefs(s),l=e.ref(0),c=e.ref(0),d=e.ref(!1),u=e.ref(!1),p=e.ref(!1),{displayNumber:y,update:v}=ar(0,800),f=e.computed(()=>{var E,M;const O=((E=r.cardItem)==null?void 0:E.modifiers)??[],I=(((M=r.cardItem)==null?void 0:M.group_modifiers)??[]).flatMap($=>$.modifiers??[]);return[...O,...I]}),b=()=>{p.value=!p.value},m=()=>{a.plusAmount(r.cardItem.idSystem)},C=()=>{r.cardItem.amount>1&&a.minusAmount(r.cardItem.idSystem)},h=O=>{l.value=O.touches[0].clientX,d.value=!0},_=O=>{d.value&&(c.value=O.touches[0].clientX-l.value,c.value>0&&(c.value=0))},S=()=>{d.value=!1,c.value<-115?o("delete",r.index):c.value=0};e.onMounted(()=>{r.index===0&&(u.value=!0,setTimeout(()=>{c.value=-90,setTimeout(()=>{c.value=0,u.value=!1},700)},0)),v(Re(r.cardItem)*r.cardItem.amount)});const V=e.computed(()=>{const O=r.index===0&&u.value?1:`${1-Math.abs(c.value)/200}`;return{transform:`translateX(${c.value}px)`,opacity:O,transition:d.value?"none":"transform 0.7s, opacity 0.7s"}});return e.watch(()=>Re(r.cardItem)*r.cardItem.amount,O=>{v(O)}),(O,I)=>{var E,M,$,N,U,x;return e.openBlock(),e.createElementBlock("div",{class:"cart_box_wrapper",onTouchstart:h,onTouchmove:_,onTouchend:S,style:e.normalizeStyle(V.value)},[I[2]||(I[2]=e.createElementVNode("div",{class:"wrapper_cart_delete"},[e.createElementVNode("div",{class:"cart_delete"})],-1)),e.createElementVNode("img",{src:((E=t.cardItem)==null?void 0:E.image_link)||e.unref(i).fallback_image||"",class:"cart_box_image"},null,8,hi),e.createElementVNode("div",_i,[e.createElementVNode("div",gi,[e.createElementVNode("p",null,e.toDisplayString((M=t.cardItem)==null?void 0:M.name),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((($=r.cardItem)==null?void 0:$.discounts)||[],(g,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"discount_banner"},[e.createElementVNode("p",null,e.toDisplayString(g.name),1),e.createElementVNode("p",null,e.toDisplayString(g.discount)+"₽",1)]))),128)),e.createElementVNode("div",yi,[e.createElementVNode("p",{onClick:C},"-"),e.createElementVNode("p",bi,e.toDisplayString(r.cardItem.amount),1),e.createElementVNode("p",{onClick:m},"+")])]),e.createElementVNode("div",wi,[(N=r.cardItem)!=null&&N.new_price?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass({discount_new_price:(x=(U=r.cardItem)==null?void 0:U.new_price)==null?void 0:x.toFixed(2)})},e.toDisplayString((r.cardItem.new_price*r.cardItem.amount).toFixed(2)+"₽"),3)):e.createCommentVNode("",!0),e.createElementVNode("p",null,e.toDisplayString(e.unref(y).toFixed(2)+"₽"),1)])]),!p.value&&f.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cart_modifier_toggle",onTouchstart:e.withModifiers(b,["stop"])},[...I[0]||(I[0]=[e.createElementVNode("p",{class:"cart_info_more"},"Посмотреть модификаторы",-1),e.createElementVNode("p",{class:"cart_arrow"},null,-1)])],32)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,g=>{var w;return e.openBlock(),e.createElementBlock("div",{class:"cart_modifier_item",key:g.id},[e.createElementVNode("div",Ci,[e.createVNode(zt,{id:"plus_orange"}),e.createElementVNode("p",null,e.toDisplayString(g.name),1)]),e.createElementVNode("div",Si,[e.createElementVNode("p",Ei,e.toDisplayString(`x${g.amount}`),1),e.createElementVNode("div",xi,[g!=null&&g.new_price?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass({discount_new_price:(w=g==null?void 0:g.new_price)==null?void 0:w.toFixed(2)})},e.toDisplayString((g.new_price*g.amount).toFixed(2)+"₽"),3)):e.createCommentVNode("",!0),e.createElementVNode("p",null,e.toDisplayString((g.price*g.amount).toFixed(2)+"₽"),1)])])])}),128)),e.createElementVNode("div",{class:"cart_modifier_arrow",onTouchstart:e.withModifiers(b,["stop"])},[...I[1]||(I[1]=[e.createElementVNode("p",{class:"cart_info_more"},"Скрыть",-1),e.createElementVNode("p",{class:"cart_arrow_top"},null,-1)])],32)])):e.createCommentVNode("",!0)],36)}}}),[["__scopeId","data-v-aa7f44a8"]]),Ni={},Bi={class:"nfc_x",viewBox:"0 0 48 48"};function Ti(t,n){return e.openBlock(),e.createElementBlock("svg",Bi,[...n[0]||(n[0]=[e.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#B00020","stroke-width":"2.4",fill:"none"},null,-1),e.createElementVNode("path",{d:"M14 16L34 30M34 16L14 30",stroke:"#B00020","stroke-width":"3","stroke-linecap":"round"},null,-1)])])}const Ai=ne(Ni,[["render",Ti]]),vi={},$i={style:{},"aria-hidden":"true",viewBox:"0 0 48 48",class:"nfc_ok"};function Mi(t,n){return e.openBlock(),e.createElementBlock("svg",$i,[...n[0]||(n[0]=[e.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4",stroke:"#5D534B","stroke-width":"none",fill:"none"},null,-1),e.createElementVNode("path",{d:"M16 22h16m-10 6h6",stroke:"#5D534B","stroke-width":"2.4","stroke-linecap":"round"},null,-1),e.createElementVNode("path",{d:"M14 28l6 6l14-14",fill:"none",stroke:"#2ECC71","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Pi=ne(vi,[["render",Mi]]),Ii={key:0,class:"nfc_ok",viewBox:"0 0 48 48","aria-hidden":"true"},Vi=e.defineComponent({__name:"CardReaderRetry",props:{styleRetry:{type:Boolean}},setup(t){return(n,r)=>t.styleRetry?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",Ii,[...r[0]||(r[0]=[e.createElementVNode("rect",{x:"8",y:"12",width:"32",height:"24",rx:"4",ry:"4"},null,-1),e.createElementVNode("path",{d:"M16 22h16m-10 6h6"},null,-1)])]))}}),Ri={class:"sheet_header"},Oi={class:"sheet_title",id:"sheetTitle"},Di={class:"sheet_body"},Fi={class:"sheet_card"},Li={class:"nfc_title"},zi={class:"lead"},Ui={class:"wrapper_input_accept"},Hi={key:0,class:"card_phone_auth_wrapper"},ji={class:"sr_only","aria-live":"polite"},dr=e.defineComponent({__name:"CardReader",setup(t){const n=le(),r=_e(),{is_OpenLoyal:o}=q.storeToRefs(n),{itemThemes:a}=q.storeToRefs(r),s=Oe(),i=e.ref(),l=e.ref(),c=e.ref(null),d=e.ref(""),u={wait:{text:"Лояльность",title:""},success:{text:"Стикер распознан",title:"Стикер распознан"},not_found:{text:"Стикер не распознан",title:"Стикер не распознали"}},p=e.computed({get:()=>d.value,set:A=>{d.value=A.replace(/\s/g,"")}}),y=e.computed(()=>s.currentState),v=e.computed(()=>s.isDrawerOpen),f=e.computed(()=>{var A;return((A=u[y.value])==null?void 0:A.text)||""}),b=e.computed(()=>{var A;(A=u[y.value])!=null&&A.title}),m=e.computed(()=>y.value==="success"?"Добро пожаловать!":a.value.kiosk_show_loyalty_phone_input_button?"Поднесите стикер к считывателю или войдите по номеру телефона":"Поднесите стикер к считывателю или введите номер карты вручную"),C=e.computed(()=>({ok:y.value==="success",warn:y.value==="not_found"})),h=e.computed(()=>{const A=[];return y.value==="wait"&&A.push("pulse","show-x"),y.value==="not_found"&&A.push("pulse","show-x"),y.value==="success"&&A.push("pulse","show-ok"),A}),_=e.computed(()=>y.value==="not_found"),S=e.computed(()=>y.value==="success"),V=e.computed(()=>y.value==="not_found"),O=e.computed(()=>["not_found"].includes(y.value)),I=e.computed(()=>({wait:"Стикер не распознан. Нажмите «Повторить».",success:"Стикер распознан. Нажмите «Продолжить».",not_found:"Стикер не распознан. Нажмите «Повторить»."})[y.value]||""),E=()=>{s.closeDrawer(),o.value=!0},M=async A=>{var B,P;s.error="",c.value=null;try{const F=new Ne;await F.authorizeByCard(A.trim()),await F.getProfile(),n.loadCart(),s.setState("success"),s.isDrawerOpen=!1,s.is_notification_lib=!0,s.notificationData_lib.textNotification="Вы успешно авторизовались в программе лояльности!"}catch(F){s.error=((P=(B=F.response)==null?void 0:B.data)==null?void 0:P.user_friendly_message)||"Ошибка",s.setState("not_found"),c.value=p.value,p.value=""}},$=()=>{var A;s.setState("wait"),s.error="",p.value="",c.value=null,(A=i.value)==null||A.focus()},N=()=>{s.closeDrawer(),c.value=null,p.value=""},U=()=>{var A,B;s.setState("wait"),(B=(A=p.value)==null?void 0:A.trim())!=null&&B.length&&M(p.value.trim())},x=A=>{A.stopPropagation(),document.activeElement!==l.value&&g()},g=()=>{e.nextTick(()=>{l.value&&(l.value.focus(),d.value&&l.value.select())})},w=A=>{const B=document.activeElement===l.value;if(!v.value||B)return;const P=A.key.toLowerCase();if(P==="backspace")return p.value=p.value.slice(0,-1);if(P==="escape")return N();if(P==="r"&&V.value)return $();if(P==="c"&&y.value==="success")return N();if(P==="enter")return U();p.value+=P},T={mounted(A){A==null||A.focus()}};return e.onMounted(()=>{document==null||document.addEventListener("keydown",w)}),e.onBeforeUnmount(()=>{document==null||document.removeEventListener("keydown",w)}),e.watchEffect(()=>{v.value&&(s.error="")}),(A,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"backdrop show",onClick:N,"aria-hidden":"true"})):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("section",{key:1,class:e.normalizeClass(["sheet show",{sheet_retry:V.value}]),"aria-modal":"true","aria-labelledby":"sheetTitle",onClick:x},[e.createElementVNode("header",Ri,[e.createElementVNode("div",Oi,e.toDisplayString(f.value),1),V.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["sheet_status",C.value])},e.toDisplayString(c.value),3)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"sheet_close",onClick:N,"aria-label":"Закрыть"}," Закрыть ")]),e.createElementVNode("div",Di,[e.createElementVNode("div",Fi,[e.createElementVNode("div",{class:e.normalizeClass(["nfc",h.value])},[e.createVNode(Vi,{styleRetry:O.value},null,8,["styleRetry"]),_.value?(e.openBlock(),e.createBlock(Ai,{key:0})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"overlay check",style:e.normalizeStyle({display:S.value?"grid":"none"}),"aria-hidden":"true"},[e.createVNode(Pi)],4)],2),e.createElementVNode("h2",Li,e.toDisplayString(b.value),1),e.createElementVNode("p",zi,e.toDisplayString(m.value),1),e.createElementVNode("div",Ui,[e.withDirectives(e.createElementVNode("input",{ref_key:"cardInputManualRef",ref:l,"onUpdate:modelValue":B[0]||(B[0]=P=>p.value=P),class:"nfc_title_read_input",type:"text",placeholder:"Введите трек карты","aria-live":"polite",onKeydown:e.withKeys(U,["enter"])},null,544),[[e.vModelText,p.value],[T]]),V.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn_ghost",onClick:$},"Повторить")):(e.openBlock(),e.createElementBlock("button",{key:1,class:"btn btn_ghost",onClick:B[1]||(B[1]=P=>V.value?N:U())},"Отправить"))]),y.value==="wait"&&e.unref(a).kiosk_show_loyalty_phone_input_button?(e.openBlock(),e.createElementBlock("div",Hi,[e.createElementVNode("button",{class:"card_phone_auth_button",onClick:E},"Войти по номеру телефона")])):e.createCommentVNode("",!0)])]),e.createElementVNode("input",{ref_key:"cardInputRef",ref:i,type:"text",class:"sr_only","aria-live":"polite"},null,512),e.createElementVNode("div",ji,e.toDisplayString(I.value),1)],2)):e.createCommentVNode("",!0)],64))}}),qi={key:0,class:"wrapper_qr"},Wi={key:1,class:"wrapper_qr"},Gi={key:2,class:"wrapper_qr"},Ki={class:"wrap"},Ji=ne(e.defineComponent({__name:"CartCompletedOrder",props:{orderNumber:{}},setup(t){const n=le(),r=Oe(),{cartProducts_lib:o}=q.storeToRefs(n),{orderNumber:a,orderCompleted_lib:s}=q.storeToRefs(r),i=Y.useRouter(),l=Y.useRoute(),c=()=>{rt(["cart","authTokensAccess","authTokensRefresh"]),o.value=[],s.value=null,r.clearCard(),n.profile=null,i.replace(`/${l.params.orgId}`)};return(d,u)=>e.unref(s)&&e.unref(s)===1?(e.openBlock(),e.createElementBlock("section",qi,[...u[0]||(u[0]=[e.createStaticVNode('<div class="topProgress" aria-hidden="true" data-v-f6831631><i data-v-f6831631></i></div><h1 class="title_fiscal" data-v-f6831631>Сейчас будет распечатан фискальный чек</h1><p class="reminder" data-v-f6831631>Не забудьте <b data-v-f6831631>оплатить заказ</b> после печати.</p><div class="stage" aria-hidden="true" data-v-f6831631><div class="printer" data-v-f6831631><div class="led" data-v-f6831631></div><div class="slot" data-v-f6831631></div><div class="receipt" data-v-f6831631><div class="tear" data-v-f6831631></div><div class="line accent" data-v-f6831631></div><div class="line" data-v-f6831631></div><div class="line sm" data-v-f6831631></div><div class="line" data-v-f6831631></div><div class="line sm" data-v-f6831631></div><div class="line" data-v-f6831631></div><div class="line sm" data-v-f6831631></div></div></div></div>',4)])])):e.unref(s)&&e.unref(s)===2?(e.openBlock(),e.createElementBlock("section",Wi,[...u[1]||(u[1]=[e.createStaticVNode('<div class="center" data-v-f6831631><div class="stack" data-v-f6831631><h1 class="title_fiscal" data-v-f6831631>Приложите карту для оплаты</h1><p class="reminder" data-v-f6831631>Держите карту у терминала, пока операция не завершится.</p><div class="stageCard" aria-hidden="true" data-v-f6831631><div class="waves" data-v-f6831631><span data-v-f6831631></span><span data-v-f6831631></span><span data-v-f6831631></span></div><div class="nfc" data-v-f6831631><svg viewBox="0 0 24 24" data-v-f6831631><path d="M6 8c2.5 2.5 2.5 5.5 0 8" data-v-f6831631></path><path d="M10 6c4 4 4 8 0 12" data-v-f6831631></path><path d="M14 4c5.5 5.5 5.5 11 0 16" data-v-f6831631></path></svg></div><div class="card" data-v-f6831631><div class="logo" data-v-f6831631>inno.</div><div class="chip" data-v-f6831631></div><div class="digits" data-v-f6831631>4815 1623 4200 0900</div><div class="holder" data-v-f6831631>Гость</div></div></div></div></div>',1)])])):e.unref(s)&&e.unref(s)===3?(e.openBlock(),e.createElementBlock("section",Gi,[e.createElementVNode("div",Ki,[u[5]||(u[5]=e.createElementVNode("div",{class:"icon","aria-hidden":"true"},[e.createElementVNode("svg",{viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M20 6L9 17l-5-5"})])],-1)),e.createElementVNode("h1",null,[u[2]||(u[2]=e.createTextVNode(" Ваш заказ ",-1)),e.createElementVNode("span",null,"№ "+e.toDisplayString(e.unref(a)),1),u[3]||(u[3]=e.createTextVNode(" успешно оплачен ",-1))]),u[6]||(u[6]=e.createElementVNode("p",{class:"title_fiscal"},"Спасибо! Заказ передан в работу.",-1)),e.createElementVNode("div",{class:"wrapper_accept"},[e.createElementVNode("button",{class:"btn","aria-label":"Новый заказ",onClick:c},[...u[4]||(u[4]=[e.createElementVNode("span",{class:"label"},"Новый заказ",-1),e.createElementVNode("span",{class:"fill","aria-hidden":"true"},null,-1),e.createElementVNode("div",{class:"bubbles","aria-hidden":"true"},null,-1)])])])])])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-f6831631"]]),Xi={},Zi={class:"cart_loyal_qr",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Yi(t,n){return e.openBlock(),e.createElementBlock("svg",Zi,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M19 20H20M16 20H14V17M17 17H20V14H19M14 14H16M4 16.9997C4 16.0679 4 15.6019 4.15224 15.2344C4.35523 14.7443 4.74432 14.3552 5.23438 14.1522C5.60192 14 6.06786 14 6.99974 14C7.93163 14 8.39808 14 8.76562 14.1522C9.25568 14.3552 9.64467 14.7443 9.84766 15.2344C9.9999 15.6019 9.9999 16.0681 9.9999 17C9.9999 17.9319 9.9999 18.3978 9.84766 18.7654C9.64467 19.2554 9.25568 19.6447 8.76562 19.8477C8.39808 19.9999 7.93162 19.9999 6.99974 19.9999C6.06786 19.9999 5.60192 19.9999 5.23438 19.8477C4.74432 19.6447 4.35523 19.2557 4.15224 18.7656C4 18.3981 4 17.9316 4 16.9997ZM14 6.99974C14 6.06786 14 5.60192 14.1522 5.23438C14.3552 4.74432 14.7443 4.35523 15.2344 4.15224C15.6019 4 16.0679 4 16.9997 4C17.9316 4 18.3981 4 18.7656 4.15224C19.2557 4.35523 19.6447 4.74432 19.8477 5.23438C19.9999 5.60192 19.9999 6.06812 19.9999 7C19.9999 7.93188 19.9999 8.39783 19.8477 8.76537C19.6447 9.25542 19.2557 9.64467 18.7656 9.84766C18.3981 9.9999 17.9316 9.9999 16.9997 9.9999C16.0679 9.9999 15.6019 9.9999 15.2344 9.84766C14.7443 9.64467 14.3552 9.25568 14.1522 8.76562C14 8.39808 14 7.93163 14 6.99974ZM4 6.99974C4 6.06786 4 5.60192 4.15224 5.23438C4.35523 4.74432 4.74432 4.35523 5.23438 4.15224C5.60192 4 6.06786 4 6.99974 4C7.93163 4 8.39808 4 8.76562 4.15224C9.25568 4.35523 9.64467 4.74432 9.84766 5.23438C9.9999 5.60192 9.9999 6.06812 9.9999 7C9.9999 7.93188 9.9999 8.39783 9.84766 8.76537C9.64467 9.25542 9.25568 9.64467 8.76562 9.84766C8.39808 9.9999 7.93162 9.9999 6.99974 9.9999C6.06786 9.9999 5.60192 9.9999 5.23438 9.84766C4.74432 9.64467 4.35523 9.25568 4.15224 8.76562C4 8.39808 4 7.93163 4 6.99974Z",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Qi=ne(Xi,[["render",Yi]]),el={class:"cart_wrapper"},tl={class:"cart_header_content"},nl={class:"cart_kso_loyal_wrapper"},rl={key:0},ol={class:"cart_header_wrapper"},al={class:"cart_header_info"},sl={class:"cart_header_info"},il={class:"cart_header_info"},ll={class:"cart_header_info"},cl={key:0},dl={key:0,class:"wrapper_comment"},ul={class:"wrapper_limit_in_area"},fl={class:"limit_comment"},pl={class:"cart_cards"},ml={class:"cart_footer_wrapper"},hl={key:0,class:"footer_title"},_l=["disabled","max"],gl={key:1,class:"footer_sales"},yl=["max"],bl={class:"list_price"},wl={key:0},kl={key:1},Cl={key:2},Sl={class:"accept_field"},El={class:"accept_field"},xl={class:"accept_field"},Nl={class:"wrapper_footer_cart_btn"},Bl=e.defineComponent({__name:"CartPage",props:{configPage:{},textPaymentBtn:{},config_qr:{type:Boolean}},setup(t){const n=le(),r=Oe(),o=_e(),a=ue(),s=t,{totalPrice_lib:i,countBonus:l,config_lib:c,cartProducts_lib:d,profile:u}=q.storeToRefs(n),{itemThemes:p}=q.storeToRefs(o),{textPaymentBtn_lib:y,isButtonDisabled:v,orderCompleted_lib:f,orderNumber:b,is_notification_lib:m,notificationData_lib:C}=q.storeToRefs(r),{isAddToCard:h}=q.storeToRefs(a),_=Y.useRouter(),S=Y.useRoute(),V=e.ref(!1),O=e.ref(!1),I=e.ref(""),E=e.ref(!1),M=e.ref(0),$=e.ref(!1),N=e.ref(0),U=e.computed(()=>{const D={energy_amount:0,proteins_amount:0,fat_amount:0,carbohydrates_amount:0};return d.value.reduce((R,K)=>(R.energy_amount+=(K.energy_amount||0)*(K.amount||0),R.proteins_amount+=(K.proteins_amount||0)*(K.amount||0),R.fat_amount+=(K.fat_amount||0)*(K.amount||0),R.carbohydrates_amount+=(K.carbohydrates_amount||0)*(K.amount||0),R),D)}),x=()=>_.push(`/${S.params.orgId}/`),g=D=>{["a","A","+","-",".",","].includes(D.key)&&D.preventDefault()},w=D=>{n.deleteItemFromCart(D)},T=()=>{E.value=!E.value,I.value.length},A=()=>{var R,K,re;let D=Math.floor(l.value);D<0||!D?D=0:((R=u.value)==null?void 0:R.balance)>i.value?D>i.value-1&&(D=i.value-1):D>((K=u.value)==null?void 0:K.balance)&&(D=(re=u.value)==null?void 0:re.balance),D!==l.value&&n.setBonus(D)};e.watchEffect(()=>{A(),n.setBonus(i.value===0?0:Math.floor(l.value))});const B=()=>d.value.map(D=>({id:D.id,front_item_id:D.idSystem,is_fake:!!D.is_fake,removals:D.removals??null,amount:D.amount,size:D.size,modifiers:D.modifiers??[],group_modifiers:D.group_modifiers??[]})),P=()=>{if(!u.value&&s.configPage.qr_menu){_.push(`/${S.params.orgId}/register`);return}h.value=!1,v.value=!0,f.value=1,Ne.create().createOrder(B(),s.configPage.tableDataId,s.configPage.kiosk_menu,I.value,!!s.configPage.userData||!!u.value,s.configPage.is_tableservice).catch(R=>{s.configPage.kiosk_menu?(R.status===403&&(localStorage.removeItem("apiKey"),n.is_showApiKey=!0,_.push(`/${S.params.orgId}/retryPage`)),r.deleteCart("retryPage",s.configPage.kiosk_menu)):s.configPage.is_tableservice?(m.value=!0,C.value.textNotification=R.response.data.user_friendly_message):_.push(`/${S.params.orgId}/errorPayment`),v.value=!1})},F=()=>{v.value=!0;const D={items:[...B()],combos:[]};Ne.create().calculateDiscount(D,s.configPage.kiosk_menu,!!s.configPage.userData||!!u.value).then(K=>{$.value=!0,d.value&&(d.value.forEach(re=>{const se=K.items.find(oe=>oe.front_item_id===re.idSystem);if(se&&(re.group_modifiers.forEach(oe=>{const te=se.group_modifiers.find(W=>W.group===oe.group);te&&oe.modifiers.forEach(W=>{const L=te.modifiers.find(Q=>Q.id===W.id);if(L&&Number(W.price)!==Number(L==null?void 0:L.new_price)){const Q=(L.discounts||[]).reduce((ie,Ce)=>ie+=+Ce.discount,0);M.value+=Q,W.new_price=W.price,W.price=Number(L==null?void 0:L.new_price)}})}),re.modifiers.forEach(oe=>{const te=se.modifiers.find(W=>W.id===oe.id);if(te&&Number(oe.price)!==Number(te==null?void 0:te.new_price)){const W=(te.discounts||[]).reduce((L,Q)=>L+=+Q.discount,0);M.value+=W,oe.new_price=oe.price,oe.price=Number(te==null?void 0:te.new_price)}}),re.price!==Number(se.new_price))){const oe=(se.discounts||[]).reduce((te,W)=>te+=+W.discount,0);M.value=M.value+oe,re.new_price=re.price,re.price=se.new_price,re.discounts=se.discounts}}),d.value=[...d.value])}).catch(K=>{console.log("Ошибка скидок [CartPage calculateDiscount]",K),m.value=!0,C.value.textNotification="Скидки временно недоступны"}).finally(()=>{v.value=!1}),O.value=!1},z=()=>{var D;(D=u.value)!=null&&D.balance?u.value.balance>=1&&(V.value=!V.value):(m.value=!0,C.value.textNotification="У Вас пока нет бонусов")},J=()=>{var D,R;((D=c.value)==null?void 0:D.loyalty)==="IIKO"&&(c.value.has_loyalty_default_user||u.value)&&s.configPage.kiosk_menu||((R=c.value)==null?void 0:R.loyalty)==="IIKO"&&s.configPage.qr_menu&&u.value?O.value=!0:O.value=!1};return e.onMounted(async()=>{y.value=s.textPaymentBtn,n.loadCart(),f.value=null,d.value.splice(0,d.value.length,...d.value.map(n.makeProductFullyReactive))}),e.onUnmounted(()=>{f.value=null,d.value.splice(0,d.value.length,...d.value.map(n.makeProductFullyReactive))}),e.watchEffect(()=>{["ОПЛАТИТЬ","СОЗДАТЬ ЗАКАЗ"].includes(y.value.toUpperCase())?v.value=n.cartProducts_lib.length===0||i.value===0:(v.value=!1,f.value=null)}),e.watch([()=>n.cartProducts_lib,u],D=>{if(N.value>0){N.value--;return}D&&!$.value&&(J(),d.value.splice(0,d.value.length,...d.value.map(n.makeProductFullyReactive)),M.value=0,N.value=1),$.value=!1},{deep:!0}),(D,R)=>{var K,re,se,oe,te;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",el,[e.createVNode(lr,{visible:e.unref(r).isDrawerOpen,"onUpdate:visible":R[0]||(R[0]=W=>e.unref(r).isDrawerOpen=W)},{default:e.withCtx(()=>[e.createVNode(dr)]),_:1},8,["visible"]),e.createElementVNode("header",tl,[e.createElementVNode("div",nl,[e.createElementVNode("div",{class:e.normalizeClass(["arrow_wrapper",{arrow_wrapper_kso:s.configPage.kiosk_menu}]),onClick:x},[e.createVNode(Ut,{class:"cart_header_back_button"}),s.configPage.kiosk_menu?(e.openBlock(),e.createElementBlock("span",rl,"Назад")):e.createCommentVNode("",!0)],2)]),e.createElementVNode("div",ol,[(e.unref(p).kiosk_show_loyalty_card_button||e.unref(p).kiosk_show_loyalty_phone_input_button)&&!s.config_qr?(e.openBlock(),e.createElementBlock("button",{key:0,class:"buttonDefaultWrapper button_payment_cart button_payment_cart_loyal",onClick:R[1]||(R[1]=(...W)=>e.unref(r).openDrawer&&e.unref(r).openDrawer(...W))},[R[6]||(R[6]=e.createElementVNode("p",{class:"cart_loyal_program"},"Программа лояльности",-1)),e.createVNode(Qi,{class:"cart_loyal_qr"})])):e.createCommentVNode("",!0),e.unref(p).show_nutrition_in_cart?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cart_header",style:e.normalizeStyle({paddingTop:s.config_qr?0:"10px"})},[e.createElementVNode("div",al,[e.createElementVNode("p",null,[e.createVNode(Ee,{price:U.value.energy_amount,duration:800},null,8,["price"]),R[7]||(R[7]=e.createTextVNode(" г",-1))]),R[8]||(R[8]=e.createElementVNode("p",{class:"cart_info_name"},"Килокалории",-1))]),e.createElementVNode("div",sl,[e.createElementVNode("p",null,[e.createVNode(Ee,{price:U.value.proteins_amount,duration:900},null,8,["price"]),R[9]||(R[9]=e.createTextVNode(" г",-1))]),R[10]||(R[10]=e.createElementVNode("p",{class:"cart_info_name"},"Белки",-1))]),e.createElementVNode("div",il,[e.createElementVNode("p",null,[e.createVNode(Ee,{price:U.value.fat_amount,duration:1e3},null,8,["price"]),R[11]||(R[11]=e.createTextVNode(" г",-1))]),R[12]||(R[12]=e.createElementVNode("p",{class:"cart_info_name"},"Жиры",-1))]),e.createElementVNode("div",ll,[e.createElementVNode("p",null,[e.createVNode(Ee,{price:U.value.carbohydrates_amount,duration:1100},null,8,["price"]),R[13]||(R[13]=e.createTextVNode(" г",-1))]),R[14]||(R[14]=e.createElementVNode("p",{class:"cart_info_name"},"Углеводы",-1))])],4)):e.createCommentVNode("",!0)])]),t.config_qr&&e.unref(p).show_order_comment?(e.openBlock(),e.createElementBlock("div",cl,[E.value?(e.openBlock(),e.createElementBlock("div",dl,[e.createElementVNode("div",ul,[e.withDirectives(e.createElementVNode("textarea",{class:"comment_order",placeholder:"Ваш комментарий к заказу...",name:"comment",maxlength:"50","onUpdate:modelValue":R[2]||(R[2]=W=>I.value=W)},null,512),[[e.vModelText,I.value]]),e.createElementVNode("p",fl,e.toDisplayString(I.value.length+" / 50"),1)]),e.createVNode(Ie,{textButtonDefault:"Сохранить",onClick:T,class:"button_bonus_cart"})])):e.createCommentVNode("",!0),!E.value&&e.unref(d).length>0?(e.openBlock(),e.createBlock(Ie,{key:1,textButtonDefault:I.value.length>0?"Редактировать":"Комментарий к заказу",onClick:()=>E.value=!E.value,id:"button_comments"},null,8,["textButtonDefault","onClick"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),W=>(e.openBlock(),e.createBlock(cr,{key:W.idSystem,cardItem:W,onDelete:L=>w(W.idSystem)},null,8,["cardItem","onDelete"]))),128))]),e.createElementVNode("div",ml,[V.value?(e.openBlock(),e.createElementBlock("p",hl,[R[15]||(R[15]=e.createTextVNode(" Списать ",-1)),e.withDirectives(e.createElementVNode("input",{type:"number",placeholder:"0",style:e.normalizeStyle({maxWidth:`${e.unref(l).toString().length||1}em`}),disabled:e.unref(u)===null||((K=e.unref(u))==null?void 0:K.balance)===0,"onUpdate:modelValue":R[3]||(R[3]=W=>e.isRef(l)?l.value=W:null),onInput:A,min:"0",max:((re=e.unref(u))==null?void 0:re.balance)>e.unref(i)?Math.floor(e.unref(i)):(se=e.unref(u))==null?void 0:se.balance,onKeypress:g},null,44,_l),[[e.vModelText,e.unref(l),void 0,{number:!0}]]),R[16]||(R[16]=e.createTextVNode(" бонусов ",-1))])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("p",gl,"У вас есть "+e.toDisplayString(e.unref(u)?e.unref(u).balance:0)+" B",1)):e.createCommentVNode("",!0),V.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,type:"range",class:"footer_range","onUpdate:modelValue":R[4]||(R[4]=W=>e.isRef(l)?l.value=W:null),min:0,max:((oe=e.unref(u))==null?void 0:oe.balance)>e.unref(i)?Math.floor(e.unref(i)-1):(te=e.unref(u))==null?void 0:te.balance},null,8,yl)),[[e.vModelText,e.unref(l),void 0,{number:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("ul",bl,[V.value?(e.openBlock(),e.createElementBlock("li",wl,[R[18]||(R[18]=e.createElementVNode("p",null,"Сумма заказа:",-1)),e.createElementVNode("p",null,[e.createVNode(Ee,{price:e.unref(i)-M.value,fixedFloat:2},null,8,["price"]),R[17]||(R[17]=e.createTextVNode(" ₽",-1))])])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("li",kl,[R[20]||(R[20]=e.createElementVNode("p",null,"Будет оплачено бонусами:",-1)),e.createElementVNode("p",null,[e.createVNode(Ee,{price:e.unref(l),fixedFloat:2},null,8,["price"]),R[19]||(R[19]=e.createTextVNode(" Б",-1))])])):e.createCommentVNode("",!0),M.value!==0?(e.openBlock(),e.createElementBlock("li",Cl,[e.createElementVNode("p",Sl,e.toDisplayString(M.value>0?"Надбавка":"Скидка")+": ",1),e.createElementVNode("p",El,[e.createVNode(Ee,{price:Math.abs(M.value),fixedFloat:2},null,8,["price"]),R[21]||(R[21]=e.createTextVNode(" ₽",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("li",null,[R[23]||(R[23]=e.createElementVNode("p",{class:"accept_field"},"Итого к оплате:",-1)),e.createElementVNode("p",xl,[e.createVNode(Ee,{price:e.unref(i)-e.unref(l),fixedFloat:2},null,8,["price"]),R[22]||(R[22]=e.createTextVNode(" ₽",-1))])])]),e.createElementVNode("div",Nl,[e.unref(u)?(e.openBlock(),e.createBlock(Ie,{key:0,textButtonDefault:"Бонусы",onClick:z,class:"button_bonus_cart"})):e.createCommentVNode("",!0),e.createVNode(Ie,{textButtonDefault:O.value?"Рассчитать скидки":e.unref(y),onClick:O.value?F:P,class:"button_payment_cart",disabled:e.unref(v)},null,8,["textButtonDefault","onClick","disabled"])])])]),t.configPage.kiosk_menu?(e.openBlock(),e.createBlock(Ji,{key:0,orderNumber:e.unref(b),pageNumber:1},null,8,["orderNumber"])):e.createCommentVNode("",!0),e.createVNode(jt,{visible:e.unref(m),textNotificationDefault:e.unref(C).textNotification,backgroundColor:e.unref(p).accent_color?e.unref(p).accent_color:"#FF6D2E",buttonAccept:null,"onUpdate:visible":R[5]||(R[5]=W=>m.value=W)},null,8,["visible","textNotificationDefault","backgroundColor"])],64)}}}),Tl={},Al={viewBox:"0 0 24 24"};function vl(t,n){return e.openBlock(),e.createElementBlock("svg",Al,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12"},null,-1)])])}const $l=ne(Tl,[["render",vl]]),Ml={class:"retry_screen"},Pl={class:"retry_all_in_screen"},Il={class:"retry_content"},Vl={class:"retry_icon_wrap"},Rl={class:"retry_icon_circle"},Ol={class:"retry_error_x"},Dl=e.defineComponent({__name:"RetryPage",setup(t){const n=Oe(),r=Y.useRouter(),o=Y.useRoute(),a=le(),s=()=>{n.notificationData_lib.textNotification="",n.is_notification_lib=!1,a.openApiKey=!0,r.replace(`/${o.params.orgId}/`)};return(i,l)=>(e.openBlock(),e.createElementBlock("section",Ml,[e.createElementVNode("div",Pl,[e.createElementVNode("main",Il,[e.createElementVNode("div",Vl,[e.createElementVNode("div",Rl,[l[0]||(l[0]=e.createElementVNode("div",{class:"retry_loader_mini"},null,-1)),e.createElementVNode("div",Ol,[e.createVNode($l)])])]),l[1]||(l[1]=e.createElementVNode("div",{class:"retry_oops"},"OOPS",-1)),l[2]||(l[2]=e.createElementVNode("h1",{class:"retry_title"},"Что-то пошло не так",-1)),l[3]||(l[3]=e.createElementVNode("div",{class:"retry_hint"},[e.createElementVNode("p",null,"Похоже, произошёл технический сбой."),e.createElementVNode("p",null,"Мы уже знаем о проблеме и сейчас разбираемся."),e.createElementVNode("p",null,"Приносим извинения за доставленные неудобства."),e.createElementVNode("p",null,"Попробуйте начать новый заказ.")],-1))]),e.createElementVNode("div",{class:"retry_footer"},[e.createElementVNode("button",{onClick:s,class:"retry_new_order_btn"},"Новый заказ")]),l[4]||(l[4]=e.createElementVNode("p",{class:"retry_bottom_note"},"Если ошибка повторяется — обратитесь к сотруднику зала.",-1))])]))}}),Fl={class:"wrapper_loader"},Ll=e.defineComponent({__name:"Loader",props:{size:{type:String,default:"40px"}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",Fl,[e.createElementVNode("div",{class:"loader",style:e.normalizeStyle({width:t.size})},null,4)]))}}),zl=ne(e.defineComponent({__name:"AnimationLoader",props:{id:{}},setup(t){const n=e.ref(!0);return e.watch(()=>n.value,()=>{n.value=!1,setTimeout(()=>{n.value=!0},0)}),(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"opacity-animation",key:t.id},[e.renderSlot(r.$slots,"opacityLoader",{},void 0,!0)]))}}),[["__scopeId","data-v-c6b97942"]]),Ul={key:0},Hl={class:"card__main__wrapper"},jl={key:0,class:"folder_content_top"},ql={key:0,class:"loader_card_main"},Wl={key:1,class:"card__main_content"},Gl=["src","alt"],Kl={class:"card_title_price_wrapper"},Jl={class:"title"},Xl={key:0,class:"price"},Zl={key:1,class:"card_button_add_wrapper"},ur=ne(e.defineComponent({__name:"CardMain",props:{data:{},activeTags:{},is_group:{type:Boolean},parent:{},is_qr:{type:Boolean},isLoading:{type:Boolean},selectGroupChild:{type:Function},takeCurrentCard:{type:Function}},setup(t){const n=_e(),r=le(),{itemThemes:o}=q.storeToRefs(n),{is_18_above_content:a,is18Allowed:s}=q.storeToRefs(r),i=t,l=(p,y)=>{if(i.is_qr&&p.adult&&!s.value){a.value=!0;return}if(p.amount||(p.amount=1),i.is_group&&i.selectGroupChild){i.selectGroupChild({...p,parent:i.parent,child:y.child_groups});return}i.takeCurrentCard&&i.takeCurrentCard(y.id)},c=p=>{if(i.is_group&&i.selectGroupChild){p={...p,parent:i.parent,child:p.child_groups},i.selectGroupChild(p);return}if(i.is_qr&&p.adult&&!s.value){a.value=!0;return}i.takeCurrentCard&&i.takeCurrentCard(p.id)},d=e.computed(()=>i.activeTags.every(p=>i.data.tags.includes(p))),{mediaUrl:u}=_t(i.data.id,null);return(p,y)=>{var v;return((v=i.activeTags)==null?void 0:v.length)===0||d.value||i.is_group?(e.openBlock(),e.createElementBlock("div",Ul,[e.createVNode(zl,{id:i.data.id},{opacityLoader:e.withCtx(()=>[e.createElementVNode("div",Hl,[t.is_group?(e.openBlock(),e.createElementBlock("div",jl)):e.createCommentVNode("",!0),e.createElementVNode("div",{onClick:y[0]||(y[0]=f=>c(i.data)),class:e.normalizeClass(["card__main",{card__main_folder:t.is_group}])},[t.isLoading?(e.openBlock(),e.createElementBlock("div",ql,[e.createVNode(Ll)])):(e.openBlock(),e.createElementBlock("div",Wl,[e.createElementVNode("img",{src:e.unref(u)||"",class:e.normalizeClass(["img",{card_blur_image:i.is_qr&&i.data.adult&&e.unref(s)===!1}]),loading:"lazy",alt:t.data.name},null,10,Gl),e.createElementVNode("div",Kl,[e.createElementVNode("p",Jl,e.toDisplayString(t.data.name),1),t.is_group?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",Xl,e.toDisplayString(e.unref(Re)(t.data))+" ₽",1))])]))],2),t.is_group?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Zl,[e.createElementVNode("div",{onClick:y[1]||(y[1]=f=>l(t.data,i.data)),class:"add_button"},[...y[2]||(y[2]=[e.createElementVNode("div",{class:"image_add_button"},null,-1)])])]))])]),_:1},8,["id"])])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-17d44ec5"]]),Yl=["id","onClick"],Ql=ne(e.defineComponent({__name:"GroupMain",props:{menuGroup:{},idActiveGroup:{},activeTakeGroup:{type:Function}},setup(t){const n=e.ref(null);return(r,o)=>t.menuGroup.length?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"main__menu",ref_key:"scrollGroup",ref:n},[e.createVNode(Lt,{axis:"x",behavior:"smooth",container:n.value,autoScroll:!0,idActive:t.idActiveGroup,clearContainer:!0},{default:e.withCtx(({handleTargetClick:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuGroup,(s,i)=>(e.openBlock(),e.createElementBlock("li",{key:s.id,id:"scrolling"+s.id,onClick:l=>{t.activeTakeGroup&&t.activeTakeGroup(s.id,i),a(l)},style:e.normalizeStyle(t.idActiveGroup==s.id?{fontFamily:"Bounded"}:{})},e.toDisplayString(s.name),13,Yl))),128))]),_:1},8,["container","idActive"])],512)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-33006a7e"]]),ec=["id","onClick"],tc=ne(e.defineComponent({__name:"TagsMain",props:{menuTags:{default:()=>[]},groupIndex:{default:null},isSolo:{type:Boolean,default:!1},currentActiveTag:{},activeTakeTags:{type:Function,default:void 0},activeTakeTagsSolo:{type:Function,default:void 0}},setup(t){const n=t,r=e.ref(null),o=e.computed(()=>{if(n.isSolo&&!n.groupIndex)return Array.isArray(n.currentActiveTag)?n.currentActiveTag:[];if(n.groupIndex!==null&&n.groupIndex!==void 0){const a=n.currentActiveTag[n.groupIndex];return Array.isArray(a)?a:[]}return[]});return(a,s)=>t.menuTags.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"main__filters",ref_key:"scrollTagContainer",ref:r},[e.createVNode(Lt,{axis:"x",behavior:"smooth",container:r.value,autoScroll:!0,idActive:o.value?o.value[t.currentActiveTag.length-1]:null,clearContainer:!1},{default:e.withCtx(({handleTargetClick:i})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuTags,(l,c)=>(e.openBlock(),e.createElementBlock("li",{key:c,id:`scrolling${l}`,onClick:d=>{t.activeTakeTags&&(t.groupIndex||t.groupIndex===0)?t.activeTakeTags(l,t.groupIndex):t.activeTakeTagsSolo&&t.activeTakeTagsSolo(l),i(d)},class:e.normalizeClass({main__filter_active:(o.value??[]).includes(l)})},e.toDisplayString(l),11,ec))),128))]),_:1},8,["container","idActive"])],512)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-818940a4"]]),nc=["data-id"],rc={key:0,loop:"",autoplay:"",muted:"",playsinline:"",class:"drum_img"},oc=["src"],ac=["src"],sc=ne(e.defineComponent({__name:"DrumItem",props:{group:{},index:{},active:{type:Boolean}},setup(t){const n=t,{mediaUrl:r}=_t(n.group.id,n.group.video_link||n.group.image_link||"");return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["drum_item",{active:n.active}]),"data-id":t.group.id},[t.group.video_link?(e.openBlock(),e.createElementBlock("video",rc,[e.createElementVNode("source",{src:e.unref(r)||"",type:"video/webm"},null,8,oc)])):(e.openBlock(),e.createElementBlock("img",{key:1,class:"drum_img",src:e.unref(r)||""},null,8,ac)),e.createElementVNode("p",null,e.toDisplayString(t.group.name),1)],10,nc))}}),[["__scopeId","data-v-38338744"]]),ic={},lc={width:"9.998535",height:"10.000000",viewBox:"0 0 9.99854 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function cc(t,n){return e.openBlock(),e.createElementBlock("svg",lc,[...n[0]||(n[0]=[e.createElementVNode("desc",null," Created with Pixso. ",-1),e.createElementVNode("defs",null,null,-1),e.createElementVNode("path",{id:"Форма 5",d:"M4.23 10L5.76 10L5.76 5.74L9.99 5.74L9.99 4.25L5.76 4.25L5.76 0L4.23 0L4.23 4.25L0 4.25L0 5.74L4.23 5.74L4.23 10Z",fill:"#F2F7FF","fill-opacity":"1.000000","fill-rule":"nonzero"},null,-1)])])}const dc=ne(ic,[["render",cc]]),uc={class:"recommendation_wrapper"},fc={class:"recommendation_header"},pc={class:"recommendation_info"},mc=ne(e.defineComponent({__name:"Recommendation",props:{closeCurrentCard:{},openCurrentCard:{},is_qr:{type:Boolean}},setup(t){const n=t,r=ue(),{isUpSale:o,dataUpSale:a}=q.storeToRefs(r),s=()=>{o.value=!1};return e.onUnmounted(()=>{a.value=null}),(i,l)=>(e.openBlock(),e.createElementBlock("div",uc,[e.createElementVNode("div",fc,[l[0]||(l[0]=e.createElementVNode("p",{class:"header_title"},"Часто берут вместе",-1)),e.createElementVNode("div",{class:"header_close",onClick:s},[e.createVNode(dc,{class:"close_icon"})])]),e.createElementVNode("div",pc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),c=>(e.openBlock(),e.createBlock(ur,{data:c,key:c.id,parent:c.id,is_qr:n.is_qr,is_group:!1,is_product:!0,class:"card",closeCurrentCard:t.closeCurrentCard,takeCurrentCard:()=>t.openCurrentCard(c.id,!0)},null,8,["data","parent","is_qr","closeCurrentCard","takeCurrentCard"]))),128))])]))}}),[["__scopeId","data-v-c5e5ce74"]]),hc=e.defineComponent({__name:"Blackout",props:{data:{type:Boolean}},setup(t){const n=t;return e.watch(()=>n.data,r=>{document.body.style.overflow=r?"hidden":""}),()=>{}}}),_c={class:"wrapper_modal"},gc={class:"card_modal"},yc=ne(e.defineComponent({__name:"ModalWindows",props:{visible:{type:Boolean}},setup(t){const n=t,r=ue(),{isUpSale:o}=q.storeToRefs(r),a=()=>{o.value=!1};return(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(hc,{data:n.visible},null,8,["data"]),e.createElementVNode("div",{class:"black_modal",onClick:a}),e.createElementVNode("div",_c,[e.createElementVNode("div",gc,[e.renderSlot(s.$slots,"default",{},void 0,!0)])])],64))}}),[["__scopeId","data-v-ec2b2c4d"]]),Wt=q.defineStore("modulesLib",()=>{const t=e.ref(!1),n=e.ref({textNotification:""});return{is_notification_lib:t,notificationData_lib:n}}),gt=Symbol("clickOutside"),bc={mounted(t,n){t[gt]=r=>{t.contains(r.target)||n.value(r)},document.addEventListener("click",t[gt])},unmounted(t){t[gt]&&document.removeEventListener("click",t[gt])}};let me=null;const wc=async(t,n)=>{me&&Sc();const r=le(),o=ue(),a=Wt(),{openProduct:s}=q.storeToRefs(o),{displayCards:i}=q.storeToRefs(r),{is_notification_lib:l,notificationData_lib:c}=q.storeToRefs(a),d=Ne.create(),u=await kc(t);console.log(u);const p=`wss://${n}/ws/org-unit/${t}/`;me=_n(p),me.on("open",()=>{console.warn("Realtime WebSocket подключён (pointId:",t,")")}),me.on("message",async y=>{if(y.type)return;console.log("Получено обновление через WebSocket:",y),c.value.textNotification="универсальный текст для уведомления обновленного меню";const v=await ve(),f=new Set(y.active_groups.map(_=>_.id||_)),b=new Set(u.map(_=>String(_.id))),m=v.transaction("groups","readwrite");let h=await m.objectStore("groups").openCursor();for(;h;){const _=h.key;if(!f.has(_)&&_!==t){await h.delete();const S=i.value.findIndex(V=>V.id===_);S!==-1&&i.value.splice(S,1)}else if(f.has(_)&&!b.has(_)){const S=await d.getGroupByID(_);await Ue(_,S),i.value.push(S)}h=await h.continue()}await m.done;for(const _ of y.updated_groups){const S=await d.getGroupByID(_);await Ue(_,S);const V=i.value.findIndex(O=>O.id===_);V!==-1?i.value[V]=S:i.value.push(S),await fr(_,d)}for(const _ of y.updated_product_groups)await fr(_,d,!0);await Or(t,i),s.value={id:null,visible:!1},l.value=!0}),me.on("error",y=>{console.warn("WebSocket ошибка:",y)}),me.on("close",()=>{console.warn("Realtime WebSocket закрыт")}),me.connect()},kc=async t=>{const n=le(),{displayCards:r}=q.storeToRefs(n);try{const o=await et(t);if(o!=null&&o.data){const a=o.data;return r.value=a,a}}catch(o){console.error("Ошибка загрузки кэша групп:",o)}},fr=async(t,n,r=!1)=>{const o=le(),a=Wt(),{displayCards:s,cartProducts_lib:i}=q.storeToRefs(o),{notificationData_lib:l}=q.storeToRefs(a);try{const c=await n.loadGroupProducts(t);if(r){console.log(c);const u=i.value.length,p=new Set(c.map(y=>y.id));console.log(p),i.value=i.value.filter(async y=>{if(await Cc(y))return!p.has(y.id)}),console.log(i.value),i.value.length!==u&&(l.value.textNotification="Корзина поменялась"),o.updateCartInLocalStorage()}const d=s.value.findIndex(u=>u.id===t);d!==-1&&(s.value[d].products=c)}catch(c){console.error(`Ошибка загрузки продуктов для группы ${t}:`,c)}},Cc=async t=>{for(const n of t.groups){const r=await et(n);if(console.log(n),!r)return!1}return!0},Sc=()=>{me&&(me.off("open"),me.off("message"),me.off("error"),me.off("close"),me.close(!0),me=null)},Ec={class:"button_price_bg"},xc={class:"wrapper_container_price_bg"},Nc={class:"button_price"},Bc={key:0,class:"image_product_container"},Tc=["src"],Ac=e.defineComponent({__name:"BasketButton",emits:["goToCart"],setup(t){const n=le(),r=_e(),{totalPrice_lib:o,cartProducts_lib:a}=q.storeToRefs(n),{itemThemes:s}=q.storeToRefs(r);return(i,l)=>(e.openBlock(),e.createElementBlock("div",Ec,[e.createElementVNode("div",xc,[e.createElementVNode("div",Nc,[e.unref(o)>0&&e.unref(a)?(e.openBlock(),e.createElementBlock("div",Bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).slice(0,3),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:"filter_image_product"},[e.createElementVNode("img",{src:c.image_link||e.unref(s).fallback_image||"",class:"img_product"},null,8,Tc)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"button_default_main",onClick:l[0]||(l[0]=c=>i.$emit("goToCart"))},[l[2]||(l[2]=e.createElementVNode("div",{class:"icont_cart"},null,-1)),e.createElementVNode("p",null,[e.createVNode(Ee,{price:e.unref(o),fixedFloat:2},null,8,["price"]),l[1]||(l[1]=e.createTextVNode(" ₽",-1))])])])])]))}}),Ze=null,{min:Ve,max:ke,abs:pr,floor:vc}=Math,mr=(t,n,r)=>Ve(r,ke(n,t)),hr=t=>[...t].sort((n,r)=>n-r),$c=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)},Gt=()=>{let t;return[new Promise(n=>{t=n}),t]},_r=t=>{let n;return()=>(t&&(n=t(),t=void 0),n)},Ye=(t,n,r)=>{const o=r?"unshift":"push";for(let a=0;a<n;a++)t[o](-1);return t},gr=(t,n)=>{const r=t.t[n];return r===-1?t.o:r},Mc=(t,n,r)=>{const o=t.t[n]===-1;return t.t[n]=r,t.i=Ve(n,t.i),o},yt=(t,n)=>{if(!t.l)return 0;if(t.i>=n)return t.u[n];t.i<0&&(t.u[0]=0,t.i=0);let r=t.i,o=t.u[r];for(;r<n;)o+=gr(t,r),t.u[++r]=o;return t.i=n,o},ze=(t,n,r=0,o=t.l-1)=>{let a=r;for(;r<=o;){const s=vc((r+o)/2);yt(t,s)<=n?(a=s,r=s+1):o=s-1}return mr(a,0,t.l-1)},yr=(t,n,r)=>{const o=n-t.l;return t.i=r?-1:Ve(n-1,t.i),t.l=n,o>0?(Ye(t.u,o),Ye(t.t,o,r),t.o*o):(t.u.splice(o),(r?t.t.splice(0,-o):t.t.splice(o)).reduce((a,s)=>a-(s===-1?t.o:s),0))},Pc=t=>t.documentElement,Ic=t=>t.ownerDocument,Vc=t=>t.defaultView,br=_r(()=>!!/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>0),Rc=_r(()=>"scrollBehavior"in Pc(document).style),Oc=(t,n=40,r=0,o,a=!1)=>{let s=!!r,i=1,l=0,c=0,d=0,u=0,p=0,y=0,v=0,f=0,b=Ze,m=[0,s?ke(r-1,0):-1],C=0,h=!1;const _=((x,g,w)=>({o:g,t:w?Ye(w.slice(0,Ve(x,w.length)),ke(0,x-w.length)):Ye([],x),l:x,i:-1,u:Ye([],x+1)}))(t,o?o[1]:n,o&&o[0]),S=new Set,V=()=>d-c,O=()=>V()+p+u,I=(x,g)=>((w,T,A,B)=>{if(B=Ve(B,w.l-1),yt(w,B)<=T){const P=ze(w,A,B);return[ze(w,T,B,P),P]}{const P=ze(w,T,void 0,B);return[P,ze(w,A,P)]}})(_,x,g,m[0]),E=()=>yt(_,_.l),M=(x,g)=>{const w=yt(_,x)-p;return g?E()-w-$(x):w},$=x=>gr(_,x),N=(x,g=-1)=>_.t[x]===g,U=x=>{x&&(br()&&v!==0||b&&f===1?p+=x:u+=x)};return{p:()=>{S.clear()},h:()=>i,m:()=>(x=>[x.t.slice(),x.o])(_),v:(x=200)=>{if(!h||s)return m;let g,w;if(y)[g,w]=m;else{let T=ke(0,O()),A=T+l;a||(x=ke(0,x),v!==1&&(T-=x),v!==2&&(A+=x)),[g,w]=m=I(ke(0,T),ke(0,A)),b&&(g=Ve(g,b[0]),w=ke(w,b[1]))}return[ke(g,0),Ve(w,_.l-1)]},S:x=>ze(_,x-c),I:N,O:M,k:$,j:()=>_.l,N:()=>d,B:()=>v!==0,T:()=>l,q:()=>c,M:E,P:()=>(y=u,u=0,[y,f===2]),R:(x,g)=>{const w=[x,g];return S.add(w),()=>{S.delete(w)}},A:(x,g)=>{let w,T,A=0;switch(x){case 1:{if(g===d&&f===0)break;const B=y;y=0;const P=g-d,F=pr(P);B&&F<pr(B)+1||f!==0||(v=P<0?2:1),s&&(s=!1),d=g,A=4;const z=V();z>=-l&&z<=E()&&(A+=1,T=F>l);break}case 2:A=8,v!==0&&(w=!0,A+=1),v=0,f=0,b=Ze;break;case 3:{const B=g.filter(([P,F])=>!N(P,F));if(!B.length)break;U(B.reduce((P,[F,z])=>((f===2||(b&&f===1?F<b[0]:M(F+(v===0&&f===0?1:0))<V()))&&(P+=z-$(F)),P),0));for(const[P,F]of B){const z=$(P),J=Mc(_,P,F);a&&(C+=J?F:F-z)}a&&l&&C>l&&(U(((P,F)=>{let z=0;const J=[];P.t.forEach((oe,te)=>{oe!==-1&&(J.push(oe),te<F&&z++)}),P.i=-1;const D=hr(J),R=D.length,K=R/2|0,re=R%2==0?(D[K-1]+D[K])/2:D[K],se=P.o;return((P.o=re)-se)*ke(F-z,0)})(_,ze(_,O()))),a=!1),A=3,T=!0;break}case 4:l!==g&&(l||(h=T=!0),l=g,A=3);break;case 5:g[1]?(U(yr(_,g[0],!0)),f=2,A=1):(yr(_,g[0]),A=1);break;case 6:c=g;break;case 7:f=1;break;case 8:b=I(g,g+l),A=1}A&&(i=1+(2147483647&i),w&&p&&(u+=p,p=0),S.forEach(([B,P])=>{A&B&&P(T)}))}}},Kt=setTimeout,Jt=(t,n)=>n?-t:t,Dc=(t,n,r,o,a,s)=>{const i=Date.now;let l=0,c=!1,d=!1,u=!1,p=!1;const y=(()=>{let C;const h=()=>{C!=Ze&&clearTimeout(C)},_=()=>{h(),C=Kt(()=>{C=Ze,(()=>{if(c||d)return c=!1,void y();u=!1,t.A(2)})()},150)};return _.C=h,_})(),v=()=>{l=i(),u&&(p=!0),t.A(1,o()),y()},f=C=>{if(c||!t.B()||C.ctrlKey)return;const h=i()-l;150>h&&50<h&&(r?C.deltaX:C.deltaY)&&(c=!0)},b=()=>{d=!0,u=p=!1},m=()=>{d=!1,br()&&(u=!0)};return n.addEventListener("scroll",v),n.addEventListener("wheel",f,{passive:!0}),n.addEventListener("touchstart",b,{passive:!0}),n.addEventListener("touchend",m,{passive:!0}),{H:()=>{n.removeEventListener("scroll",v),n.removeEventListener("wheel",f),n.removeEventListener("touchstart",b),n.removeEventListener("touchend",m),y.C()},V:()=>{const[C,h]=t.P();C&&(a(C,h,p),p=!1,h&&t.T()>t.M()&&t.A(1,o()))}}},Fc=(t,n,r)=>{let o;return[async(a,s)=>{if(!await n())return;o&&o();const i=()=>{const[l,c]=Gt();return o=()=>{c(!1)},t.T()&&Kt(o,150),[l,t.R(2,()=>{c(!0)})]};if(s&&Rc())t.A(8,a()),$c(async()=>{for(;;){let l=!0;for(let[u,p]=t.v();u<=p;u++)if(t.I(u)){l=!1;break}if(l)break;const[c,d]=i();try{if(!await c)return}finally{d()}}t.A(7),r(a(),s)});else for(;;){const[l,c]=i();try{if(t.A(7),r(a()),!await l)return}finally{c()}}},()=>{o&&o()}]},Lc=t=>{let n;return{F(r){(n||(n=new(Vc(Ic(r))).ResizeObserver(t))).observe(r)},J(r){n.unobserve(r)},H(){n&&n.disconnect()}}},zc=e.defineComponent({props:{L:{type:Object,required:!0},W:{type:Object,required:!0},X:{type:Object,required:!0},Y:{type:Function,required:!0},D:{type:Number,required:!0},U:{type:Boolean},G:{type:Boolean},K:{type:Boolean},Z:{type:String,required:!0},ee:Object},setup(t){const n=e.ref(),r=e.computed(()=>t.L.value&&t.W.O(t.D,t.K)),o=e.computed(()=>t.L.value&&t.W.I(t.D));return e.watch(()=>n.value&&t.D,(a,s,i)=>{i(t.Y(n.value,t.D))},{flush:"post"}),()=>{var a;const{X:s,U:i,G:l,Z:c}=t,d=o.value,{style:u,...p}=(a=t.ee)!==null&&a!==void 0?a:{},y={contain:"layout style",position:d&&l?void 0:"absolute",[i?"height":"width"]:"100%",[i?"top":"left"]:"0px",[i?"left":"top"]:r.value+"px",visibility:!d||l?void 0:"hidden",...u};return i&&(y.display="inline-flex"),e.createVNode(c,e.mergeProps({ref:n,style:y},p),typeof(v=s)=="function"||Object.prototype.toString.call(v)==="[object Object]"&&!e.isVNode(v)?s:{default:()=>[s],_:2},16,["style"]);var v}}}),Uc=(t,n)=>{const r=t.key;return r??"_"+n},Hc=(t,n)=>t[0]===n[0]&&t[1]===n[1],wr=e.defineComponent({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,startMargin:{type:Number,default:0},ssrCount:Number,scrollRef:Object,as:{type:String,default:"div"},item:{type:String,default:"div"},itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(t,{emit:n,expose:r,slots:o}){let a=!!t.ssrCount;const s=t.horizontal,i=e.ref(),l=Oc(t.data.length,t.itemSize,t.ssrCount,t.cache,!t.itemSize),c=((f,b)=>{let m;const C=b?"width":"height",h=new WeakMap,_=Lc(S=>{const V=[];for(const{target:O,contentRect:I}of S)if(O.offsetParent)if(O===m)f.A(4,I[C]);else{const E=h.get(O);E!=Ze&&V.push([E,I[C]])}V.length&&f.A(3,V)});return{te(S){_.F(m=S)},re:(S,V)=>(h.set(S,V),_.F(S),()=>{h.delete(S),_.J(S)}),p:_.H}})(l,s),d=((f,b)=>{let m,C,h=Gt(),_=!1;const S=b?"scrollLeft":"scrollTop",V=b?"overflowX":"overflowY",[O,I]=Fc(f,()=>h[0],(E,M)=>{E=Jt(E,_),M?m.scrollTo({[b?"left":"top"]:E,behavior:"smooth"}):m[S]=E});return{oe(E){m=E,b&&(_=getComputedStyle(E).direction==="rtl"),C=Dc(f,E,b,()=>Jt(E[S],_),(M,$,N)=>{if(N){const U=E.style,x=U[V];U[V]="hidden",Kt(()=>{U[V]=x})}E[S]=Jt(f.N()+M,_),$&&I()}),h[1](!0)},p(){C&&C.H(),h[1](!1),h=Gt()},ne:()=>_,se(E){O(()=>E)},ie(E){E+=f.N(),O(()=>E)},le(E,{align:M,smooth:$,offset:N=0}={}){if(E=mr(E,0,f.j()-1),M==="nearest"){const U=f.O(E),x=f.N();if(U<x)M="start";else{if(!(U+f.k(E)>x+f.T()))return;M="end"}}O(()=>N+f.q()+f.O(E)+(M==="end"?f.k(E)-f.T():M==="center"?(f.k(E)-f.T())/2:0),$)},ce:()=>{C&&C.V()}}})(l,s),u=e.ref(l.h());l.R(1,()=>{u.value=l.h()}),l.R(4,()=>{n("scroll",l.N())}),l.R(8,()=>{n("scrollEnd")});const p=e.computed(f=>{u.value;const b=l.v(t.bufferSize);return f&&Hc(f,b)?f:b}),y=e.computed(()=>u.value&&l.B()),v=e.computed(()=>u.value&&l.M());return e.onMounted(()=>{a=!1;const f=requestAnimationFrame(()=>{const b=m=>{c.te(m),d.oe(m)};t.scrollRef?b(t.scrollRef):b(i.value.parentElement)});e.onUnmounted(()=>{cancelAnimationFrame(f)})}),e.onUnmounted(()=>{l.p(),c.p(),d.p()}),e.watch(()=>t.data.length,f=>{l.A(5,[f,t.shift])}),e.watch(()=>t.startMargin,f=>{l.A(6,f)},{immediate:!0}),e.watch([u],()=>{d.ce()},{flush:"post"}),r({get cache(){return l.m()},get scrollOffset(){return l.N()},get scrollSize(){return(f=>ke(f.M(),f.T()))(l)},get viewportSize(){return l.T()},findItemIndex:l.S,getItemOffset:l.O,getItemSize:l.k,scrollToIndex:d.le,scrollTo:d.se,scrollBy:d.ie}),()=>{const f=t.as,b=t.item,m=v.value,C=d.ne(),h=!s&&C?"unshift":"push",_=[],S=O=>{var I;const E=o.default({item:t.data[O],index:O})[0];return e.createVNode(zc,{key:Uc(E,O),L:u,W:l,Y:c.re,D:O,X:E,U:s,K:C,G:a,Z:b,ee:(I=t.itemProps)===null||I===void 0?void 0:I.call(t,{item:t.data[O],index:O})},null,8,["L","W","Y","D","X","U","K","G","Z","ee"])};if(t.keepMounted){const O=new Set(t.keepMounted);for(let[I,E]=p.value;I<=E;I++)O.add(I);hr([...O]).forEach(I=>{_[h](S(I))})}else for(let[O,I]=p.value;O<=I;O++)_[h](S(O));return e.createVNode(f,{ref:i,style:{contain:"size style",overflowAnchor:"none",flex:"none",position:"relative",width:s?m+"px":"100%",height:s?"100%":m+"px",pointerEvents:y.value?"none":void 0}},typeof(V=_)=="function"||Object.prototype.toString.call(V)==="[object Object]"&&!e.isVNode(V)?_:{default:()=>[_],_:2},8,["style"]);var V}}}),jc=e.defineComponent({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,ssrCount:Number,itemProps:Function,keepMounted:Array,cache:Object},emits:["scroll","scrollEnd"],setup(t,{emit:n,expose:r,slots:o}){const a=t.horizontal,s=c=>{n("scroll",c)},i=()=>{n("scrollEnd")},l=e.ref();return r({get cache(){return l.value.cache},get scrollOffset(){return l.value.scrollOffset},get scrollSize(){return l.value.scrollSize},get viewportSize(){return l.value.viewportSize},findItemIndex:(...c)=>l.value.findItemIndex(...c),getItemOffset:(...c)=>l.value.getItemOffset(...c),getItemSize:(...c)=>l.value.getItemSize(...c),scrollToIndex:(...c)=>l.value.scrollToIndex(...c),scrollTo:(...c)=>l.value.scrollTo(...c),scrollBy:(...c)=>l.value.scrollBy(...c)}),()=>{return e.createVNode("div",{style:{display:a?"inline-block":"block",[a?"overflowX":"overflowY"]:"auto",contain:"strict",width:"100%",height:"100%"}},[e.createVNode(wr,{ref:l,data:t.data,bufferSize:t.bufferSize,itemSize:t.itemSize,itemProps:t.itemProps,shift:t.shift,ssrCount:t.ssrCount,horizontal:a,keepMounted:t.keepMounted,cache:t.cache,onScroll:s,onScrollEnd:i},(c=o,typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!e.isVNode(c)?o:{default:()=>[o],_:2}),8,["data","bufferSize","itemSize","itemProps","shift","ssrCount","horizontal","keepMounted","cache","onScroll","onScrollEnd"])],4);var c}}}),qc=(t,n=10)=>new Promise(r=>{let o=0,a=0,s=0;const i=()=>{const l=t.scrollSize;l===s&&l>0?o++:(o=0)&&(s=l),a++,o>=2||a>=n?r():requestAnimationFrame(i)};requestAnimationFrame(i)});function Wc(t,n){const r=(n==null?void 0:n.align)??"start";let o=!1;const a=e.ref(null),s=e.ref(!1),i=e.ref("measure"),l=e.computed(()=>e.toValue(t).length),c=e.computed(()=>i.value==="measure"?1:5),d=e.computed(()=>Array.from({length:l.value*c.value},(m,C)=>C)),u=async()=>{if(a.value&&(i.value="measure",o=!1,s.value=!1,await e.nextTick(),i.value==="measure")){if(await qc(a.value),s.value=a.value.scrollSize>a.value.viewportSize,!s.value){o=!1;return}o=!0,i.value="loop",await e.nextTick(),a.value.scrollToIndex(l.value*3,{align:r})}},p=m=>i.value==="measure"?m:l.value===0?0:m%l.value,y=(m,C)=>{a.value&&a.value.scrollToIndex(m,C)},v=(m,C)=>!o||i.value!=="loop"?C:C+Math.round((m-C)/l.value)*l.value,f=m=>{if(!o||i.value!=="loop"||!a.value)return;const C=l.value-1,h=l.value*4;if(m<C)return y(l.value*3-1,{align:"start"});if(m>=h)return y(l.value*3,{align:"start"})},b=()=>{if(!a.value||!o)return;const m=a.value.findItemIndex(a.value.scrollOffset);f(m)};return e.onMounted(u),e.onUnmounted(()=>a.value=null),e.watch(l,()=>e.nextTick(u)),{listRef:a,items:d,hasScroll:s,realIndex:p,findNearestIndex:v,scrollToIndex:y,init:u,onScroll:b}}const Gc={pinch:!0,doubleTap:!0,wheel:!0,buttons:["+","-","=","0"]},Kc=t=>{var r;const n=Object.assign({},Gc,t);if(n.pinch&&(document.addEventListener("touchstart",o=>o.touches.length>1&&o.preventDefault(),{passive:!1}),document.addEventListener("gesturestart",o=>o.preventDefault(),{passive:!1})),n.doubleTap){let o=0;document.addEventListener("touchend",a=>{const s=Date.now();s-o<=250&&a.preventDefault(),o=s},{passive:!1})}n.wheel&&document.addEventListener("wheel",o=>(o.ctrlKey||o.metaKey)&&o.preventDefault(),{passive:!1}),(r=n.buttons)!=null&&r.length&&document.addEventListener("keydown",o=>(o.ctrlKey||o.metaKey)&&n.buttons.includes(o.key)&&o.preventDefault())};Object.defineProperty(j,"useRoute",{enumerable:!0,get:()=>Y.useRoute}),Object.defineProperty(j,"useRouter",{enumerable:!0,get:()=>Y.useRouter}),j.BasketButton=Ac,j.BottomSheet=ir,j.ButtonDefault=Ie,j.CardMain=ur,j.CardProductPage=pi,j.CardReader=dr,j.CartBox=cr,j.CartPage=Bl,j.DrumItem=sc,j.GroupMain=Ql,j.InitConnection=Ne,j.ModalWindows=yc,j.NotificationWindow=jt,j.PopupWindowDefault=lr,j.Recommendation=mc,j.RetryPage=Dl,j.TagsMain=tc,j.VList=jc,j.Virtualizer=wr,j.getCachedGroup=et,j.getCachedProduct=on,j.initPinia=Cr,j.initRouter=Er,j.preventZoom=Kc,j.updateIndexedDB=wc,j.useCachedMedia=_t,j.useCardLibStore=ue,j.useCartLibStore=Oe,j.useImageCacheStore=Tt,j.useMainLibStore=le,j.useModulesLibStore=Wt,j.useThemeStore=_e,j.useVirtuaLoop=Wc,j.vClickOutside=bc,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});