(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2670],{12282:function(t,e,n){Promise.resolve().then(n.bind(n,82778)),Promise.resolve().then(n.bind(n,87334)),Promise.resolve().then(n.bind(n,95777)),Promise.resolve().then(n.bind(n,96096)),Promise.resolve().then(n.bind(n,83240))},99376:function(t,e,n){"use strict";var r=n(35475);n.o(r,"notFound")&&n.d(e,{notFound:function(){return r.notFound}}),n.o(r,"usePathname")&&n.d(e,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(e,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(e,{useSearchParams:function(){return r.useSearchParams}})},87334:function(t,e,n){"use strict";n.d(e,{BinomParamsProvider:function(){return s},u:function(){return d}});var r=n(57437),o=n(2265),i=n(99376);let u=(0,o.createContext)(void 0);function s(t){var e,n,s,d,c,a;let{children:l}=t,m=(0,i.useSearchParams)(),v=(0,i.usePathname)(),f=null===(e=m.get("utm_source"))||void 0===e?void 0:e.toString(),g=null===(n=m.get("utm_campaign"))||void 0===n?void 0:n.toString(),h=null===(s=m.get("utm_content"))||void 0===s?void 0:s.toString(),w=null===(d=m.get("utm_medium"))||void 0===d?void 0:d.toString(),_=null===(c=m.get("utm_term"))||void 0===c?void 0:c.toString(),p=null===(a=m.get("click_id"))||void 0===a?void 0:a.toString(),S=(0,o.useMemo)(()=>({pathname:v,utmSource:f,utmMedium:w,utmCampaign:g,utmTerm:_,utmContent:h,clickId:p}),[v,f,w,g,_,h,p]);return(0,r.jsx)(u.Provider,{value:S,children:l})}function d(){let t=(0,o.useContext)(u);if(void 0===t)throw Error("The context of the binom params is used outside of the provider");return t}},95777:function(t,e,n){"use strict";n.d(e,{UserParamsProvider:function(){return a},z:function(){return l}});var r=n(57437),o=n(2265),i=n(38856);function u(t){var e;return null!==(e=sessionStorage.getItem(t))&&void 0!==e?e:void 0}let s=(0,o.createContext)(void 0),d="browserId",c="browserSessionId";function a(t){let{children:e}=t,[n,a]=(0,o.useState)({});return(0,o.useEffect)(()=>{var t,e;let{[d]:n,[c]:r,"auth.gtm_customer_id":o,_ym_uid:s}=Object.fromEntries(document.cookie.split("; ").map(t=>t.split("=")));a({browserId:null!=n?n:null!==(e=i.A.getItem(d))&&void 0!==e?e:void 0,sessionId:null!==(t=null!=r?r:u(c))&&void 0!==t?t:u(d),customerId:o,yandexId:s})},[]),(0,r.jsx)(s.Provider,{value:n,children:e})}function l(){let t=(0,o.useContext)(s);if(void 0===t)throw Error("The context of the user params is used outside of the provider");return t}},96096:function(t,e,n){"use strict";n.d(e,{BinomParamsProvider:function(){return s},u:function(){return d}});var r=n(57437),o=n(2265),i=n(99376);let u=(0,o.createContext)(void 0);function s(t){var e,n,s,d,c,a;let{children:l}=t,m=(0,i.useSearchParams)(),v=(0,i.usePathname)(),f=null===(e=m.get("utm_source"))||void 0===e?void 0:e.toString(),g=null===(n=m.get("utm_campaign"))||void 0===n?void 0:n.toString(),h=null===(s=m.get("utm_content"))||void 0===s?void 0:s.toString(),w=null===(d=m.get("utm_medium"))||void 0===d?void 0:d.toString(),_=null===(c=m.get("utm_term"))||void 0===c?void 0:c.toString(),p=null===(a=m.get("click_id"))||void 0===a?void 0:a.toString(),S=(0,o.useMemo)(()=>({pathname:v,utmSource:f,utmMedium:w,utmCampaign:g,utmTerm:_,utmContent:h,clickId:p}),[v,f,w,g,_,h,p]);return(0,r.jsx)(u.Provider,{value:S,children:l})}function d(){let t=(0,o.useContext)(u);if(void 0===t)throw Error("The context of the binom params is used outside of the provider");return t}},83240:function(t,e,n){"use strict";n.d(e,{UserParamsProvider:function(){return a},z:function(){return l}});var r=n(57437),o=n(2265),i=n(38856);function u(t){var e;return null!==(e=sessionStorage.getItem(t))&&void 0!==e?e:void 0}let s=(0,o.createContext)(void 0),d="browserId",c="browserSessionId";function a(t){let{children:e}=t,[n,a]=(0,o.useState)({});return(0,o.useEffect)(()=>{var t,e;let{[d]:n,[c]:r,"auth.gtm_customer_id":o,_ym_uid:s}=Object.fromEntries(document.cookie.split("; ").map(t=>t.split("=")));a({browserId:null!=n?n:null!==(e=i.A.getItem(d))&&void 0!==e?e:void 0,sessionId:null!==(t=null!=r?r:u(c))&&void 0!==t?t:u(d),customerId:o,yandexId:s})},[]),(0,r.jsx)(s.Provider,{value:n,children:e})}function l(){let t=(0,o.useContext)(s);if(void 0===t)throw Error("The context of the user params is used outside of the provider");return t}},38856:function(t,e,n){"use strict";n.d(e,{A:function(){return r}});let r={setItem:(t,e)=>{try{window.localStorage.setItem(t,e)}catch(t){return console.error(t),!1}return!0},getItemRaw:t=>{try{return window.localStorage.getItem(t)}catch(t){return console.error(t),null}},getItem:t=>{let e=r.getItemRaw(t);if(e&&"undefined"!==e)try{return JSON.parse(e)}catch(e){console.warn("invalid object in localStorage by key: ".concat(t))}return null},removeItem:t=>{try{window.localStorage.removeItem(t)}catch(t){console.error(t)}}}},30631:function(t,e,n){"use strict";function r(){return typeof window>"u"}function o(t){r()||(Array.isArray(window.dataLayer)?window.dataLayer.push(t):console.log("window.dataLayer does not exist"),Array.isArray(window._mtm)?window._mtm.push(t):console.log("window._mtm does not exist"))}function i(){if(r()){console.warn("Cant initialize tag manager on server side");return}"function"!=typeof window._init_gtm?console.warn("Cant init GTM, please check if GTM script exists"):window._init_gtm(),"function"!=typeof window._init_mtm?console.warn("Cant init MTM, please check if MTM script exists"):window._init_mtm()}n.d(e,{AB:function(){return o},zK:function(){return i}})},82778:function(t,e,n){"use strict";n.d(e,{L:function(){return d},g:function(){return s}});var r=n(2265),o=n(30631);let i=null,u=t=>{i=t},s=()=>i,d=t=>{let{env:e}=t,n=(0,r.useRef)(!1);return n.current||(u(e),n.current=!0),(0,r.useEffect)(()=>{"production"===e.NODE_ENV&&(0,o.zK)()},[e.NODE_ENV]),null}}},function(t){t.O(0,[2971,2117,1744],function(){return t(t.s=12282)}),_N_E=t.O()}]);