PageSourceSearch

https://www.czechphone.cz/_next/static/chunks/app/(site)/%5B...slug%5D/page-48d04203529db01f.js

js czechphone.cz collected 2026-10-01 23:49:12 UTC 426,691 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9435],{58569:function(e,t,n){Promise.resolve().then(n.bind(n,45917)),Promise.resolve().then(n.bind(n,36848)),Promise.resolve().then(n.bind(n,98353)),Promise.resolve().then(n.bind(n,31256)),Promise.resolve().then(n.bind(n,61199)),Promise.resolve().then(n.bind(n,50524)),Promise.resolve().then(n.bind(n,53173)),Promise.resolve().then(n.bind(n,24993)),Promise.resolve().then(n.bind(n,10956)),Promise.resolve().then(n.bind(n,23069)),Promise.resolve().then(n.bind(n,44241)),Promise.resolve().then(n.bind(n,43907)),Promise.resolve().then(n.bind(n,99062)),Promise.resolve().then(n.bind(n,10075)),Promise.resolve().then(n.bind(n,29522)),Promise.resolve().then(n.bind(n,70433)),Promise.resolve().then(n.bind(n,91355)),Promise.resolve().then(n.bind(n,40238)),Promise.resolve().then(n.bind(n,46441)),Promise.resolve().then(n.bind(n,8213)),Promise.resolve().then(n.bind(n,17943)),Promise.resolve().then(n.bind(n,28590)),Promise.resolve().then(n.bind(n,63856)),Promise.resolve().then(n.bind(n,13709)),Promise.resolve().then(n.bind(n,12339)),Promise.resolve().then(n.bind(n,32900)),Promise.resolve().then(n.bind(n,85786)),Promise.resolve().then(n.bind(n,34521)),Promise.resolve().then(n.bind(n,32196)),Promise.resolve().then(n.bind(n,23273)),Promise.resolve().then(n.bind(n,19898)),Promise.resolve().then(n.bind(n,19417)),Promise.resolve().then(n.bind(n,36132)),Promise.resolve().then(n.bind(n,56661)),Promise.resolve().then(n.bind(n,28008)),Promise.resolve().then(n.bind(n,9763)),Promise.resolve().then(n.bind(n,29123)),Promise.resolve().then(n.bind(n,68980)),Promise.resolve().then(n.bind(n,72929)),Promise.resolve().then(n.bind(n,90769)),Promise.resolve().then(n.bind(n,18533)),Promise.resolve().then(n.bind(n,6729)),Promise.resolve().then(n.bind(n,6766)),Promise.resolve().then(n.bind(n,56408)),Promise.resolve().then(n.bind(n,15568)),Promise.resolve().then(n.bind(n,44906)),Promise.resolve().then(n.bind(n,73345)),Promise.resolve().then(n.bind(n,70801)),Promise.resolve().then(n.bind(n,78848)),Promise.resolve().then(n.bind(n,43378)),Promise.resolve().then(n.bind(n,28282)),Promise.resolve().then(n.bind(n,76939)),Promise.resolve().then(n.t.bind(n,65878,23)),Promise.resolve().then(n.bind(n,81523)),Promise.resolve().then(n.bind(n,70049))},45917:function(e,t,n){"use strict";var l=n(26705),i=n(99376);t.default=e=>{let{categories:t,activeCategory:n,totalCount:a,lang:r="cs"}=e,o=(0,i.useRouter)(),s=(0,i.usePathname)(),d=(0,i.useSearchParams)(),c=e=>{let t=new URLSearchParams(d.toString());e?t.set("category",e):t.delete("category"),t.delete("page");let n=t.toString();o.push("".concat(s).concat(n?"?".concat(n):""))};return(0,l.jsxs)("div",{className:"flex flex-col gap-4 border-b border-grey-600 sl:flex-row sl:items-center sl:gap-0",children:[(0,l.jsxs)("div",{className:"flex items-center overflow-x-auto",children:[(0,l.jsx)("button",{type:"button",onClick:()=>c(null),className:"flex items-center px-5 py-6 font-ibm font-medium text-sm uppercase tracking-[0.7px] whitespace-nowrap\n                      ".concat(n?"text-grey-800 hover:text-primary-raisin":"border-b-2 border-primary-spring text-primary-raisin"),children:"sk"===r?"Všetko":"Vše"}),t.map(e=>(0,l.jsx)("button",{type:"button",onClick:()=>c(e),className:"flex items-center px-5 py-6 font-ibm font-medium text-sm uppercase tracking-[0.7px] whitespace-nowrap\n                        ".concat(n===e?"border-b-2 border-primary-spring text-primary-raisin":"text-grey-800 hover:text-primary-raisin"),children:e},e))]}),(0,l.jsxs)("p",{className:"sl:ml-auto pb-4 sl:pb-0 font-human text-base leading-[1.6] text-secondary-dark whitespace-nowrap",children:[a," ","sk"===r?"v\xfdsledkov":"v\xfdsledků"]})]})}},36848:function(e,t,n){"use strict";var l=n(26705),i=n(99376);t.default=e=>{let{currentPage:t,totalPages:n,lang:a="cs"}=e,r=(0,i.useRouter)(),o=(0,i.usePathname)(),s=(0,i.useSearchParams)(),d=e=>{let t=new URLSearchParams(s.toString());1===e?t.delete("page"):t.set("page",String(e));let n=t.toString();r.push("".concat(o).concat(n?"?".concat(n):""))};return(0,l.jsxs)("div",{className:"flex gap-4 items-center justify-center mt-10",children:[(0,l.jsx)("div",{className:"flex gap-[6px] items-center",children:(()=>{let e=[];
1if(n<=5){for(let t=1;t<=n;t++)e.push(t);return e}e.push(1),t>3&&e.push("ellipsis");let l=Math.max(2,t-1),i=Math.min(n-1,t+1);for(let t=l;t<=i;t++)e.push(t);return t<n-2&&e.push("ellipsis"),e.push(n),e})().map((e,n)=>"ellipsis"===e?(0,l.jsx)("span",{className:"w-4 h-8 flex items-center justify-center font-semibold text-[15px] text-primary-raisin",children:"..."},"ellipsis-".concat(n)):(0,l.jsx)("button",{type:"button",onClick:()=>d(e),className:"w-8 h-8 flex items-center justify-center rounded-full font-ibm font-medium text-sm uppercase tracking-[0.7px]\n                          ".concat(e===t?"text-primary-spring":"text-primary-raisin"),children:e},e))}),t<n&&(0,l.jsxs)("button",{type:"button",onClick:()=>d(t+1),className:"flex gap-1 items-center h-8 pl-3 pr-[6px] rounded-2xl font-ibm font-medium text-sm uppercase tracking-[0.7px] text-primary-raisin hover:text-primary-spring",children:["sk"===a?"Ďalšie":"Dalš\xed",(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M6 4L10 8L6 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})}},98353:function(e,t,n){"use strict";var l=n(26705);t.default=e=>{let{lang:t="cs"}=e,n=e=>{let t=encodeURIComponent(window.location.href),n="";switch(e){case"facebook":n="https://www.facebook.com/sharer/sharer.php?u=".concat(t);break;case"linkedin":n="https://www.linkedin.com/sharing/share-offsite/?url=".concat(t);break;case"twitter":n="https://twitter.com/intent/tweet?url=".concat(t)}n&&window.open(n,"_blank","width=600,height=400")};return(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("p",{className:"font-human text-base leading-[1.6] text-secondary-dark",children:"sk"===t?"Zdieľať čl\xe1nok":"Sd\xedlet čl\xe1nek"}),(0,l.jsxs)("div",{className:"flex gap-7 items-center",children:[(0,l.jsx)("button",{type:"button",onClick:()=>n("facebook"),"aria-label":"Share on Facebook",className:"text-secondary-dark transition hover:text-primary-spring",children:(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M18 2H15C13.6739 2 12.4021 2.52678 11.4645 3.46447C10.5268 4.40215 10 5.67392 10 7V10H7V14H10V22H14V14H17L18 10H14V7C14 6.73478 14.1054 6.48043 14.2929 6.29289C14.4804 6.10536 14.7348 6 15 6H18V2Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,l.jsx)("button",{type:"button",onClick:()=>n("linkedin"),"aria-label":"Share on LinkedIn",className:"text-secondary-dark transition hover:text-primary-spring",children:(0,l.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M16 8C1
17.5913 8 19.1174 8.63214 20.2426 9.75736C21.3679 10.8826 22 12.4087 22 14V21H18V14C18 13.4696 17.7893 12.9609 17.4142 12.5858C17.0391 12.2107 16.5304 12 16 12C15.4696 12 14.9609 12.2107 14.5858 12.5858C14.2107 12.9609 14 13.4696 14 14V21H10V14C10 12.4087 10.6321 10.8826 11.7574 9.75736C12.8826 8.63214 14.4087 8 16 8Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M6 9H2V21H6V9Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M4 6C5.10457 6 6 5.10457 6 4C6 2.89543 5.10457 2 4 2C2.89543 2 2 2.89543 2 4C2 5.10457 2.89543 6 4 6Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,l.jsx)("button",{type:"button",onClick:()=>n("twitter"),"aria-label":"Share on X",className:"text-secondary-dark transition hover:text-primary-spring",children:(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M4 4L10.5 13.5M20 20L13.5 10.5M10.5 13.5L20 4M10.5 13.5L4 20M13.5 10.5L20 4M13.5 10.5L4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}},37665:function(e,t,n){"use strict";var l=n(26705),i=n(20955),a=n(53335),r=n(24993),o=n(36498),s=n(23897);t.Z=e=>{let{className:t,title:n,icon:d,children:c,basicContent:u,activeAccordion:m,indexAccordion:p,onClickAccordion:v,iconLeft:f=!0,iconGrey:x}=e,h=null,y=(0,i.useRef)(null),[g,b]=(0,i.useState)(!1),j=(e,t)=>{null==v||v(e,t)};return(0,i.useEffect)(()=>{b(p===m)},[m,p]),(0,s.V)(()=>{if(h&&h.kill(),g){var e;h=o.ZP.to(y.current,{height:(null==y?void 0:null===(e=y.current)||void 0===e?void 0:e.scrollHeight)||0,duration:.3,opacity:1,ease:"sine.inOut"})}else h=o.ZP.to(y.current,{height:0,duration:.3,ease:"sine.inOut"});return()=>{o.ZP.killTweensOf(y.current)}},[g]),(0,l.jsxs)("div",{id:"accordionClass-".concat(p),className:(0,a.m6)("py-5 md:py-7 px-3 md:px-6 block relative","after:content-[''] after:block after:absolute after:bottom-0 after:h-[1px] after:left-0 after:w-full after:origin-left after:bg-grey-600 after:transition-all after:duration-500 after:ease-in-out","before:content-[''] before:block before:absolute before:w-full before:bottom-0 before:z-10 before:h-[2px] before:bg-primary-raisin before:left-0 before:scale-x-0 before:origin-left before:opacity-0 before:invisible before:transition-all before:duration-500 before:ease-in-out",m===p&&"before:opacity-100 before:visible before:scale-x-100 after:opacity-0 after:invisible ".concat(""),t),children:[(0,l.jsxs)("div",{className:"accordionHeader flex flex-nowrap items-center gap-4 cursor-pointer ".concat(f?"flex-row":"flex-row-reverse"),onClick:e=>null==j?void 0:j(e,p),onKeyUp:e=>{("Enter"===e.key||" "===e.key)&&(null==v||v(e,p))},children:[d&&(0,l.jsx)("div",{className:(0,a.m6)("icon flex flex-nowrap items-center justify-center w-5 h-5 bg-primary-spring",x&&"bg-grey-600"),children:(0,l.jsx)(r.default,{name:d,className:(0,a.m6)("text-white !w-4 !h-4 transition-all duration-300 ease-in-out",m===p&&"rotate-[180deg]",x&&"text-grey-1000")})}),n&&(0,l.jsx)("h3",{className:"h6 block relative text-primary-raisin w-[calc(100%-36px)]",children:n})]}),(0,l.jsx)("div",{ref:y,className:(0,a.m6)("contentMove overflow-hidden opacity-0 h-0"),children:c?(0,l.jsx)("div",{className:" block relative pt-4 md:pt-[23px]",children:c}):(0,l.jsx)("p",{className:"p2 block relative text-secondary-dark pt-4 md:pt-[23px]",children:u})})]})}},31256:function(e,t,n){"use strict";n.r(t);var l=n(26705),i=n(53335),a=n(7336);t.default=e=>{let{animation:t,className:n,children:r}=e;return(0,l.jsx)(a.E.div,{...t,className:(0,i.m6)(n),children:r})}},61199:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var l,i,a,r,o,s,d=n(26705);(l=r||(r={}))[l.leftToRight=1]="leftToRight",l[l.rightToLeft=0]="rightToLeft",(i=o||(o={}))[i.slideIn=1]="slideIn",i[i.slideOut=0]="slideOut",(a=s||(s={})).front="front",a.back="back";var c=n(7336),u=n(53335);let m=(e,t)=>{let n=r.leftToRight;if("string"==typeof e)switch(e){case"leftToRight":n=r.leftToRight;break;case"rightToLeft":n=r.rightToLeft;break;default:console.error("Invalid direction")}let l=o.slideOut;if("string"==typeof t)switch(t){case"slideIn":l=o.slideIn;break;case"slideOut":l=o.slideOut;break;default:console.error("Invalid preset")}return{initial:{scaleX:Number(!l),originX:n},whileInView:{scaleX:Number(l),transition:{duration:.5,ease:"easeInOut"}},viewport:{once:!0}}};var p=e=>{let{direction:t=r.leftToRight,preset:n=o.slideOut,sorting:l=s.front,animation:i=m(t,n),className:a}=e,p=1;if("number"==typeof l)p=l;else switch(l){case"front":p=1;break;case"back":p=-1;break;default:console.error("Invalid sorting value")}return(0,d.jsx)(c.E.div,{...i,className:(0,u.m6)("absolute inset-0 bg-white pointer-events-none","z-[".concat(p,"]"),a)})}},87294:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var l=n(97604),i=n(37774);let a=e=>"sk"===e?"/sk":"cs"===e?"/cs":"/",r=e=>"sk"===e?"Domov":"cs"===e?"Domů":"Domov",o=(e,t,n,o)=>{var s;if(!e)return null;let d=[{icon:"MdHome",label:r(e[0]),url:a(e[0])},{icon:void 0,label:(null===i._t||void 0===i._t?void 0:null===(s=i._t.seoTitleProducts)||void 0===s?void 0:s[n||"cs"])||"Produkty",url:"/".concat(n,"/").concat(l.Wb.products[n||"cs"])}
1,void 0!==t&&{icon:void 0,label:null==t?void 0:t.title,url:"/".concat(n,"/").concat(l.Wb.products[n||"cs"],"/").concat(e[1])}||null,o&&{icon:void 0,label:o,url:""}||null];return{separator:"/",activeIndex:e.length-1,items:d.filter(e=>null!==e)}}},58903:function(e,t,n){"use strict";n.d(t,{Q:function(){return o}});var l=n(26705),i=n(27648),a=n(53335),r=n(87227);let o=e=>{let{className:t,items:n,separator:o}=e;return(0,l.jsx)("nav",{className:(0,a.m6)("flex pt-4 md:pt-[20px] lg:pt-[1.5rem] gap-1 md:gap-2 flex-wrap",t),children:n?null==n?void 0:n.map((e,t)=>(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-1 md:gap-2",children:[t>=n.length-1?(0,l.jsx)("div",{className:"flex items-center justify-center gap-1",children:(null==e?void 0:e.label)&&(0,l.jsx)("span",{className:(0,a.m6)("font-human text-[14px] leading-[22px] text-secondary-dark"),children:e.label})}):(0,l.jsx)(l.Fragment,{children:(null==e?void 0:e.url)&&(0,l.jsxs)(i.default,{href:null==e?void 0:e.url,className:"flex items-center justify-center gap-1",children:[(null==e?void 0:e.icon)&&(0,l.jsx)(r.J,{name:e.icon,className:"h-5 w-5 shrink-0 text-grey-800 mt-[-3px]"}),(null==e?void 0:e.label)&&(0,l.jsx)("span",{className:"font-human text-[14px] leading-[22px] text-secondary-dark hover:text-secondary-forest transition-all duration-300 ease-in-out",children:e.label})]})}),t<n.length-1&&(0,l.jsx)("span",{className:"font-human text-[16px] leading-[22px] text-secondary-dark",children:o})]},t)):null})}},7177:function(e,t,n){"use strict";var l=n(26705),i=n(53335);t.Z=e=>{let{className:t,name:n,id:a,label:r,disabled:o=!1,onChange:s,value:d,checked:c,readOnly:u=!1,filterProps:m,greyVariant:p,noLabel:v}=e;return(0,l.jsxs)("div",{className:(0,i.m6)("",t),children:[(0,l.jsx)("input",{type:"checkbox",name:n,id:a,className:(0,i.m6)("inputCheckbox hidden",p&&"greyVariant",v&&"noLabel",u?m?"curs
1or-pointer":"read-only":"cursor-pointer"),onChange:s,value:d,checked:c,disabled:o,readOnly:u}),(0,l.jsx)("label",{htmlFor:a,className:(0,i.m6)("p2 text-primary-raisin pl-7 inline-block relative",u?m?"cursor-pointer":"read-only":"cursor-pointer",o&&"text-grey-800 cursor-not-allowed opacity-60"),children:r})]})}},69597:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var l=n(26705),i=n(53335),a=n(20955),r=n(87227);let o=e=>{var t,n;let{className:o,activeIndex:s,items:d,onItemClick:c}=e,[u,m]=(0,a.useState)(!1),p=(0,a.useMemo)(()=>d.filter(e=>!e.hidden),[d]),v=e=>{c&&c(e)};return(0,l.jsxs)("div",{className:(0,i.m6)("flex bg-grey-200",o),children:[(0,l.jsxs)("div",{className:"w-full flex flex-col items-center justify-center px-5 lg:hidden",children:[(0,l.jsxs)("div",{className:"w-full relative flex items-center justify-center gap-2 text-center h-12 font-ibm text-sm leading-[90%] font-semibold tracking-wide text-grey-800 cursor-pointer",onClick:()=>m(!u),onKeyDown:e=>"Enter"===e.key&&m(!u),tabIndex:0,role:"button",children:[(0,l.jsxs)("p",{children:[void 0!==s?s+1:1,"/",p.length]}),null===(n=p[s||0])||void 0===n?void 0:null===(t=n.label)||void 0===t?void 0:t.toUpperCase(),(0,l.jsx)(r.J,{name:"MdChevronLeft",className:"".concat(u?"rotate-[90deg]":"rotate-[-90deg]"," absolute top-1/2 right-0 -translate-y-1/2 w-6 h-6")})]}),u&&p.map((e,t)=>(0,l.jsxs)("button",{type:"button",onClick:()=>v(e),onKeyDown:t=>"Enter"===t.key&&v(e),className:"w-full border-t border-grey-800 flex items-center gap-3 h-12 font-ibm text-sm leading-[90%] font-semibold tracking-wide text-grey-800 ".concat(s===t?"text-primary-raisin":""),tabIndex:0,children:[(0,l.jsxs)("p",{children:[t+1,"/",p.length]}),(0,l.jsx)("p",{children:e.label.toUpperCase()})]},e.value))]}),(0,l.jsx)("div",{className:"hidden lg:flex",children:p.map((e,t)=>(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("button",{type:"button",className:"flex items-center justify-start h-[66px] box-border relative ".concat(e.close?"cursor-default":"cursor-pointer"),onClick:()=>!e.close&&v(e),onKeyDown:t=>"Enter"===t.key&&!e.close&&v(e),tabIndex:0,children:(0,l.jsx)("div",{className:"h-[66px] flex items-center justify-center",children:(0,l.jsx)("div",{className:"h-[58px] flex items-center ".concat(t===s?"text-grey-1000":" text-grey-800"),children:(0,l.jsx)("span",{className:"".concat(0===t?"":"lg:ml-[12px] xl:ml-[16px] xxl:ml-[35px] 2xl:ml-[50px]"," text-center font-ibm text-[13px] leading-[120%] tracking-[0.65px] uppercase font-medium"),children:e.label})})})}),t!==p.length-1&&(0,l.jsx)(r.J,{name:"MdChevronRight",className:"bg-transparent text-grey-800 lg:ml-[12px] xl:ml-[16px] xxl:ml-[35px] 2xl:ml-[50px]"})]},e.value))})]})}},57261:function(e,t,n){"use strict";var l=n(26705),i=n(53335);t.Z=e=>{let{className:t,name:n,id:a,label:r,description:o,disabled:s=!1,onChange:d,value:c,checked:u,readOnly:m,descriptionDisplayOption:p="horizontal"}=e,v="vertical"===p;return(0,l.jsxs)("div",{className:(0,i.m6)("flex justify-between items-center",v&&o&&"flex-col items-start",t),children:[(0,l.jsx)("input",{type:"radio",name:n,id:a,className:(0,i.m6)("inputRadio hidden cursor-pointer"),onChange:d,disabled:s,value:c,checked:u,readOnly:m}),(0,l.jsx)("label",{htmlFor:a,className:(0,i.m6)("p2 text-primary-raisin pl-7 inline-block relative cursor-pointer",u||m?"text-secondary-forest":"text-primary-raisin"),children:r}),o&&(0,l.jsx)("span",{className:(0,i.m6)("p2 font-human font-medium text-primary-raisin leading-[160%]",v&&"flex w-full"),children:o})]})}},83403:function(e,t,n){"use strict";var l=n(26705),i=n(20955),a=n(53335),r=n(87227);t.Z=e=>{let{className:t,text:n,onMobileToLeft:o}=e,[s,d]=(0,i.useState)(!1),c=(0,i.useRef)(null);return(0,i.useEffect)(()=>{function e(e){c.current&&!c.current.contains(e.target)&&d(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),(0,l.jsxs)("div",{className:(0,a.m6)("group inline-block relative z-[10]",t),ref:c,children:[(0,l.jsx)("div",{className:"icon cursor-pointer w-4 h-4 flex flex-nowrap items-center justify-center",onClick:()=>d(!s),onKeyUp:()=>d(!s),children:(0,l.jsx)(r.J,{name:"MdHelpOutline",className:"!w-4 !h-4 text-grey-800"})}),(0,l.jsx)("div",{className:(0,a.m6)("p4 text-primary-raisin textBlock absolute block px-4 py-3 opacity-0 invisible bottom-[calc(100%+8px)] left-[50%] translate-x-[-50%] w-[120px] md:w-[300px] bg-white shadow-basic z-[1]",s&&"opacity-100 visible",o&&"left-[-40px] md:left-[50%]"),dangerouslySetInnerHTML:{__html:n}})]})}},10956:function(e,t,n){"use strict";n.d(t,{default:function(){return f}});var l=n(26705),i=n(20955),a=n(53335),r=n(87227),o=n(50524),s=n(52153),d=e=>{let{className:t,icon:n,name:d,description:c,overviewButtons:u,button:m,userDiscount:p}=e,{t:v}=(0,s.$)();return(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col items-center  justify-center box-border p-8 bg-grey-200 w-full lg:w-[260px] lg:w-[300px] xl:w-[376px]",t),children:[n&&(0,l.jsx)("div",{className:"flex items-center justify-center bg-grey-600 w-12 h-12 mb-6",children:(0,l.jsx)(r.J,{name:n,className:"!h-6 !w-6"})}),(0,l.jsx)("h4",{className:"h4 text-primary-raisin mb-1 inline-block h-[32px]",children:d}),(0,l.jsx)("p",{className:"p4 text-grey-800 h-[19px]",children:c}),(0,l.jsxs)("div",{className:"flex justify-between w-full items-center py-[0.75rem] my-[2.5rem] border-y-[1px] border-secondary-french",children:[(0,l.jsx)("div",{className:"flex items-center gap-[0.5rem]",children:(0,l.jsxs)("p",{className:"p2 text-grey-1000",children:[v("ui","accountCustomerDiscount")," "]})}),(0,l.jsxs)("span",{className:"h4 ",children:[p,"%"]})]}),u&&(0,l.jsx)("div",{className:"flex flex-col items-start justify-start gap-4 mb-8 min-w-[200px]",children:u.map((e,t)=>(0,i.createElement)(o.Button,{...e,key:t}))}),(0,l.jsx)(o.Button,{...m,className:"max-w-[200px]"})]})},c=n(97604),u=n(92201),m=n(58447),p=n(66269),v=n(54013),f=e=>{var t,n,i;let{slugArray:a,children:r,hideAsideOnMobile:o,lang:f,isGuest:x}=e,{userData:h}=(0,v.a)(),{t:y}=(0,s.$)(),g=(0,c.q2)("offers",f),b=(0,c.q2)("orders",f),j=(0,c.q2)("account",f),w=(0,c.q2)("changePassword",f),k=a.join("/"),N={name:"".concat((null==h?void 0:null===(t=h.personalData)||void 0===t?void 0:t.firstName)||""," ").concat((null==h?void 0:null===(n=h.personalData)||void 0===n?void 0:n.lastName)||""),description:(null==h?void 0:null===(i=h.companyData)||void 0===i?void 0:i.name)||" ",button:{icon:"MdEdit",link:{url:"/".concat(f,"/").concat(w),text:y("ui","accountChangePassword")},variant:"secondary",disabled:k===w,size:"small"},overviewButtons:[{type:"link",link:{url:"/".concat(f,"/").concat(b),text:y("ui","accountOrderOverview")},variant:"terciary",iconLeft:!0,iconType:"square"},{type:"link",link:{url:"/".concat(f,"/").concat(g),text:y("ui","accountOfferOverview")},variant:"terciary",iconLeft:!0,iconType:"square"},{type:"link",link:{url:"/".concat(f,"/").concat(j),text:y("ui","accountManagementLower")},variant:"terciary",iconLeft:!0,iconType:"square"}].filter(e=>e.link.url!=="/".concat(f,"/").concat(k)),userDiscount:null==h?void 0:h.discount};return(0,l.jsx)(m.Z,{layout:{presentation:p.c.Default,gap:0},className:"relative box-border mx-0 py-10 md:py-[60px] w-full",children:(0,l.jsx)(u.Z,{hideAsideOnMobile:o,leftChild:r,rightChild:!x&&(0,l.jsx)(d,{...
1N,className:""})})})}},92201:function(e,t,n){"use strict";var l=n(26705),i=n(53335);t.Z=e=>{let{className:t,leftChild:n,rightChild:a,hideAsideOnMobile:r,cartVariant:o}=e;return(0,l.jsxs)("div",{className:(0,i.m6)("relative flex gap-10 xl:gap-[6rem] items-center md:items-start justify-center w-full flex-col-reverse  lg:flex-row",o&&"flex-col lg:flex-col xl:flex-row",t),children:[(0,l.jsx)("div",{className:"flex flex-col self-stretch w-full items-center",children:n}),a&&(0,l.jsx)("div",{className:(0,i.m6)("xl:sticky  xl:top-[180px] w-full lg:w-auto  h-full",r&&"hidden lg:block",o&&"xl:w-auto lg:w-full xl:sticky relative lg:relative lg:top-[0px] xl:top-[10rem]"),children:(0,l.jsx)("div",{className:(0,i.m6)("xl:sticky xl:top-[60px] w-full xl:max-w-[400px] flex items-start justify-end xl:h-[20rem] ",o&&"xl:w-auto lg:w-full w-full xl:sticky relative lg:relative  max-w-full lg:max-w-full"),children:(0,l.jsx)("div",{className:(0,i.m6)("xl:sticky xl:w-fit w-full flex items-center justify-center",o&&"xl:w-fit lg:w-full w-full"),children:a})})})]})}},79988:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var l,i,a=n(26705),r=n(53335),o=n(70801);(l=i||(i={})).Info="info",l.Confirm="confirm",l.Choice="choice";var s=n(50524),d=e=>{let{className:t,...n}=e;return(()=>{switch(n.type){case i.Confirm:return(0,a.jsx)("div",{className:(0,r.m6)("flex",t),children:(0,a.jsx)(s.Button,{variant:"primary",size:"medium",link:{text:n.confirmButton.text,url:"#"},onClick:n.confirmButton.onClick})});case i.Choice:return(0,a.jsxs)("div",{className:(0,r.m6)("flex gap-3",t),children:[(0,a.jsx)(s.Button,{variant:"primary",size:"medium",link:{text:n.confirmButton.text,url:"#"},onClick:n.confirmButton.onClick,className:"w-full"}),(0,a.jsx)(s.Button,{variant:"secondary",size:"medium",link:{text:n.cancelButton.text,url:"#"},onClick:n.cancelButton.onClick,className:"w-full"})]});case i.Info:default:return null}})()},c=n(91543),u=n(27957),m=n(87227),p=n(72420),v=e=>{var t,n,l;let{footer:i,dissmissable:v=!0,className:f,product:x,count:h,lang:y,sliderImages:g}=e,{closePopup:b}=(0,o.B)();return(0,a.jsx)("div",{className:"fixed left-[50%] top-[50%] translate-y-[-50%] translate-x-[-50%] z-[100001] flex justify-center items-center w-full",children:(0,a.jsxs)("div",{className:(0,r.m6)("relative  px-4 md:px-8 pt-10 pb-10 md:pb-8 bg-white w-full max-w-[100%] sm:max-w-[432px] flex flex-col gap-5 z-[100002]",f),children:[v&&(0,a.jsx)("div",{className:"absolute cursor-pointer flex flex-nowrap items-center justify-center right-3 top-3 bg-primary-spring w-5 h-5",onClick:b,onKeyUp:b,children:(0,a.jsx)(m.J,{name:"MdClose",className:"!w-4 !h-4 text-white"})}),x&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h5",{className:"h5 mb-5",children:null===c.K||void 0===c.K?void 0:null===(t=c.K.addedToCartLabel)||void 0===t?void 0:t[y||"cs"]}),(0,a.jsx)("div",{className:(0,r.m6)("block relative border-y-[1px]  border-y-grey-600 w-full py-3","gap-[16px] border-grey-600 border-b-[1px] mb-5 md:mb-8"),children:(0,a.jsxs)("div",{className:(0,r.m6)("flex items-start gap-4 md:gap-[1.25rem] "),children:[(null==g?void 0:g[0])&&(0,a.jsx)(u.Z,{...null==g?void 0:g[0],className:" w-[60px] h-[60px]"}),(0,a.jsxs)("div",{className:(0,r.m6)("font-human flex-col w-[calc(100%-76px)]",""),children:[(null==x?void 0:x.title)&&(0,a.jsx)("p",{className:"font-human text-[12px] font-medium text-primary-raisin mb-3",children:null==x?void 0:x.title}),(0,a.jsxs)("div",{className:"flex flex-nowrap items-start justify-between",children:[(0,a.jsx)("div",{className:"w-full",children:h&&(0,a.jsxs)("p",{className:"p4 text-secondary-dark w-full",children:[null===c.K||void 0===c.K?void 0:null===(n=c.K.ammountLabel)||void 0===n?void 0:n[y||"cs"],": ",h]})}),(0,a.jsxs)("div",{className:"flex flex-col items-end md:items-end justify-center w-[100%] self-start text-end font-human text-primary-raisin h-full",children:[(0,a.jsx)("p",{className:"heading6 font-medium",children:(0,p.x)(null==x?void 0:x.price,{withVAT:!0,showVATLabel:!1}).formattedAmount}),(0,a.jsx)("p",{className:"font-human text-[12px] leading-[160%] tracking-[0.0175rem] -mt-[3px] self-end text-secondary-dark",children:(0,p.x)(null==x?void 0:x.priceWithoutTax,{withVAT:!1,showVATLabel:!0}).formattedAmount})]})]})]})]})}),(0,a.jsx)("div",{className:"flex justify-center flex-nowrap",children:(0,a.jsx)(s.Button,{variant:"primary",size:"medium",className:"max-w-[240px]",onClick:b,link:{text:null===(l=c.K.continueShoppingLabel)||void 0===l?void 0:l[y||"cs"],url:"/".concat(y,"/kosik")}})})]}),i&&(0,a.jsx)(d,{...i})]})})}},43907:function(e,t,n){"use strict";var l=n(26705),i=n(53335),a=n(50524),r=n(27957),o=n(99376);t.default=e=>{let{className:t,thumbnail:n,title:s,file:d}=e,c=(0,o.useRouter)();return(0,l.jsxs)("div",{onClick:()=>c.push(d||""),onKeyUp:e=>{"Enter"===e.key&&c.push(d||"")},role:"button","aria-label":"Prohl\xe9dnout online ".concat(s),className:(0,i.m6)("flex flex-nowrap md:block relative min-w-full md:pt-6 bg-grey-200",t),children:[n&&(0,l.jsx)("div",{className:"thumbnailBlock m-2 block mx-auto relative md:mb-6 overflow-hidden h-[120px] md:h-[252px] w-[87px] md:w-[calc(100%-64px)]",children:(0,l.jsx)(r.Z,{...n,lazy:!0,className:"object-cover md:object-contain w-full h-full max-w-[250px] mx-auto"})}),(0,l.jsxs)("div",{className:"w-[calc(100%-103px)] textBlock md:text-center flex flex-nowrap items-start justify-center flex-col md:block relative md:w-full px-2 md:px-4 md:pb-10",children:[s&&(0,l.jsx)("h5",{className:"h5 block relative mb-[10px] md:mb-[14px] text-primary-raisin",children:s}),(0,l.jsx)("div",{className:"flex flex-nowrap justify-center mb-2",children:(0,l.jsx)(a.Button,{variant:"terciary",size:"small",type:"link",icon:"MdImportContacts",iconRight:!0,iconType:"simple",link:{text:"Prohl\xe9dnout online",url:d,target:"_blank"}})})]})]})}},99062:function(e,t,n){"use strict";var l=n(26705),i=n(20955),a=n(53335),r=n(50524),o=n(27648),s=n(27957);t.default=e=>{var t,n;let{className:d,thumbnail:c,button:u,thumbnailCover:m,onlyGrid:p}=e,[v,f]=(0,i.useState)(!1);if(!c&&!u)return null;let x=null==u?void 0:null===(t=u.link)||void 0===t?void 0:t.url;return(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col justify-between relative h-full group w-full bg-grey-200 md:pt-5 ",m&&"md:pt-0",d),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[c&&(0,l.jsx)(o.default,{href:x||"/","aria-label":null==u?void 0:null===(n=u.link)||void 0===n?void 0:n.text,className:(0,a.m6)("thumbnailBlock m-2 mb-5 block bg-grey-200 relative md:mb-10 overflow-hidden h-[148px] md:h-[242px] w-[calc(100%-16px)] md:w-[calc(100%-64px)] mx-auto",m&&"w-full md:w-full mt-0 mx-[unset] mb-4 md:mb-8"),children:(0,l.jsx)(s.Z,{...c,lazy:!0,className:(0,a.m6)("w-full h-full group-hover:scale-[1.03] md:group-hover:scale-[1.05] transition-all duration-300 ease-in-out",m&&"object-cover")})}),u&&(0,l.jsx)("div",{className:(0,a.m6)("text-block px-3 pb-3 md:px-8 md:pb-8 block relative w-full sm:min-h-[52px] md:min-
1h-[76px]",p&&"md:px-6 md:pb-6"),children:(0,l.jsx)(r.Button,{variant:"terciary",size:"small",iconType:"square",iconLeft:!0,iconRight:!1,active:v,icon:"MdArrowForward",type:"link",link:u.link})})]})}},10075:function(e,t,n){"use strict";n.d(t,{default:function(){return p}});var l=n(26705),i=n(50524),a=n(52153),r=n(63993),o=n(67831),s=n(15921),d=n(20955),c=n(97604),u=n(99376);n(83079);var m=(0,n(12119).$)("da1314f60b774be7a7356ebcaac876776c6bb4df"),p=e=>{let{lang:t,goBackButton:n,button:p,password:v,currentPasswordPlaceholder:f,newPasswordPlaceholder:x,title:h}=e,y=(0,u.useRouter)(),{t:g}=(0,a.$)(),[b,j]=(0,d.useState)(""),[w,k]=(0,d.useState)(""),[N,P]=(0,d.useState)(!1),[C,D]=(0,d.useState)(!1),[S,I]=(0,d.useState)(!1),[E,z]=(0,d.useState)({password:"",newPassword:""}),T=(0,d.useRef)({password:"",newPassword:""}),_=async(e,t)=>{let{resetForm:n}=t,{password:l,newPassword:i}=e;if(l===i){k(g("ui","passwordSameAsOld"));return}P(!0);let a=await m({currentPassword:l,newPassword:i});if(P(!1),!a.success){var r;console.log(a.error),j("Incorrect password"===a.error?(null==v?void 0:null===(r=v.errorMessages)||void 0===r?void 0:r.notCorrectCurrentPassword)||g("ui","passwordIncorrect"):a.error||g("ui","passwordChangeError"));return}j(""),k(""),D(!0),n()};(0,d.useEffect)(()=>{let e=E.password!==T.current.password,t=E.newPassword!==T.current.newPassword;e&&b&&j(""),t&&w&&k(""),T.current={password:E.password,newPassword:E.newPassword}},[E,b,w]);let L=e=>{z(e)};return(0,l.jsx)("div",{className:"w-full flex flex-col",children:(0,l.jsxs)("div",{className:"max-w-[400px]",children:[(0,l.jsx)(i.Button,{className:"mb-4",variant:"terciary",size:"small",type:"button",link:{url:"",text:n},iconLeft:!0,onClick:()=>y.push("".concat((0,c.q2)("account",t))),iconType:"square",icon:"MdArrowBack"}),h&&(0,l.jsx)("h3",{className:"h3 text-primary-raisin self-stretch hidden lg:block lg:mb-16",children:h}),(0,l.jsx)(r.J9,{initialValues:{password:"",newPassword:""},validateOnChange:!1,validateOnBlur:!1,validationSchema:s.Z,onSubmit:_,children:e=>{let{values:n,errors:a,touched:s}=e;return(n.password!==E.password||n.newPassword!==E.newPassword)&&L(n),(0,l.jsxs)(r.l0,{className:"md:w-auto w-full",children:[(0,l.jsx)(o.Z,{language:t,name:"password",password:{placeholder:f},className:"w-full",setShowingPassword:I,showingPassword:S,passwordCriteria:null==v?void 0:v.passwordCriteria,value:n.password,isValid:!a.password,isError:a.password&&s.password?g("ui","passwordRequirements"):b,errorMessage:b}),(0,l.jsx)(o.Z,{language:t,name:"newPassword",password:{...v,placeholder:x},showingPassword:S,setShowingPassword:I,value:n.newPassword,isValid:!a.newPassword,passwordCriteria:null==v?void 0:v.passwordCriteria,isError:a.newPassword&&s.newPassword?g("ui","passwordRequirements"):w,errorMessage:w}),C?(0,l.jsx)("p",{className:"p3 text-primary-spring mt-8",children:g("ui","passwordChangeSuccess")}):(0,l.jsx)("div",{className:"max-w-[200px]",children:(0,l.jsx)(i.Button,{variant:"primary",size:"medium",link:{text:"".concat(p)},className:"mt-[2rem] mb-[1rem] sm:mt-[2.5rem] sm:mb-[1.5rem] w-full max-w-[240px]",type:"submit",disabled:""===n.newPassword||""===n.password||N})})]})}})]})})}},82278:function(e,t,n){"use strict";n.d(t,{C:function(){return s}});var l=n(26705),i=n(50524),a=n(53173),r=n(53335),o=n(27957);let s=e=>{let{backButton:t,logoImage:n,trailingContent:s}=e;return(0,l.jsx)("div",{className:"w-full relative py-[1.125rem] px-[1.25rem] md:py-6 md:px-8 border-b border-primary-raisin bg-white",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)("div",{className:"",children:(0,l.jsx)(i.Button,{...t,type:"back"})}),(0,l.jsx)("div",{className:"hidden md:block absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]",children:n&&(0,l.jsx)(a.LocalizedLink,{href:"/",className:(0,r.m6)("md:max-w-[235px] max-w-[188px]"),children:(0,l.jsx)("div",{className:"block",children:(0,l.jsx)(o.Z,{...n,className:"object-contain"})})})}),(0,l.jsx)("div",{children:s?"string"==typeof s?(0,l.jsx)("div",{className:"h4",children:s}):s:null})]})})}},67831:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var l=n(26705),i=n(7177),a=n(63993),r=n(87227),o=e=>{let{passwordValue:t,passwordCriteria:n}=e;return(0,l.jsxs)("div",{className:"flex flex-col items-start mt-4 bg-[#8FCEA514] p-[0.5rem] gap-1 z-10",children:[(null==n?void 0:n.minOneUpperCase)&&(0,l.jsxs)("p",{className:"text-[14px] ".concat(t.match(/[A-Z]/)?"text-primary-spring":"text-red"),
1children:[(0,l.jsx)(r.J,{name:"MdCheck",className:"inline-block mr-1 mb-1 "}),null==n?void 0:n.minOneUpperCase]}),(null==n?void 0:n.minOneNumber)&&(0,l.jsxs)("p",{className:"text-[14px] ".concat(t.match(/\d/)?"text-primary-spring":"text-red"),children:[(0,l.jsx)(r.J,{name:"MdCheck",className:"inline-block mr-1 mb-1 "}),null==n?void 0:n.minOneNumber]}),(null==n?void 0:n.minAndMaxCharacters)&&(0,l.jsxs)("p",{className:"text-[14px] ".concat(t.length>=8?"text-primary-spring":"text-red"),children:[(0,l.jsx)(r.J,{name:"MdCheck",className:"inline-block mr-1 mb-1 "}),null==n?void 0:n.minAndMaxCharacters]})]})},s=n(20955),d=n(55711),c=n(27648),u=n(97604),m=e=>{let{language:t,forgotPassword:n,name:r,password:m,value:p,passwordCriteria:v,isValid:f,isError:x,errorMessage:h,className:y,setShowingPassword:g,showingPassword:b}=e,[j,w]=(0,s.useState)(b||!1);return(0,s.useEffect)(()=>{w(b||!1)},[b]),(0,s.useEffect)(()=>{null==g||g(j)},[j,g]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.gN,{name:r,as:d.I,className:"my-[0.5rem] w-full ".concat(y),placeholder:"".concat(null==m?void 0:m.placeholder),typeInput:j?"text":"password",errorMessage:h,isError:x}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(null==m?void 0:m.showPasswordLabel)&&(0,l.jsx)("div",{onClick:()=>w(!j),onKeyDown:()=>w(!j),children:(0,l.jsx)(i.Z,{label:"".concat(null==m?void 0:m.showPasswordLabel),checked:j,onChange:()=>w(!j)})}),n&&(0,l.jsx)(c.default,{href:"/".concat((0,u.q2)("forgotPassword",t)),className:"text-primary-spring underline underline-offset-2 relative ",children:n})]}),p&&!f&&v&&(0,l.jsx)(o,{passwordValue:p,passwordCriteria:v})]})}},29522:function(e,t,n){"use strict";var l=n(26705),i=n(50524),a=n(55806),r=n(27648),o=n(20955),s=n(53335),d=n(96169),c=n(70801),u=n(79988),m=n(36498),p=n(59498),v=n(54013);t.default=e=>{let{className:t,links:n,button:f,onClickItem:x,product:h,lang:y,priceOnlyForRegisteredUsers:g}=e,[b,j]=(0,o.useState)(0),[w,k]=(0,o.useState)(!1),{addProduct:N}
1=(0,d.j)(),{openPopup:P}=(0,c.B)(),{userData:C}=(0,v.a)();(0,o.useEffect)(()=>{{m.ZP.registerPlugin(p.i);let e=null,t=document.querySelectorAll("section"),n=null;for(let e of t)if(e.querySelector("h2.h3")){n=e;break}return n?e=p.i.create({trigger:n,start:"bottom top",onEnter:()=>k(!0),onLeaveBack:()=>k(!1)}):t.length>0&&(e=p.i.create({trigger:t[0],start:"bottom top",onEnter:()=>k(!0),onLeaveBack:()=>k(!1)})),()=>{e&&e.kill()}}},[]);let D=()=>{N((null==h?void 0:h.id)||"",1),P((0,l.jsx)(u.Z,{product:{id:(null==h?void 0:h.id)||"",anotation:(null==h?void 0:h.category)||"",title:(null==h?void 0:h.title)||"",price:(null==h?void 0:h.priceWithTAX)||0,priceWithoutTax:(null==h?void 0:h.priceWithoutTAX)||0,recycleFee:(null==h?void 0:h.recycleFee)||0},count:1,sliderImages:[(null==h?void 0:h.thumbnail)||{}],lang:y}))},S=(e,t,n)=>{if(e.preventDefault(),n.url){let e=document.getElementById(n.url.replace("#",""));e&&e.scrollIntoView({behavior:"smooth"})}j(t),null==x||x(n)};return(0,l.jsx)("div",{className:(0,s.m6)("sticky lg:top-[128px] top-[64px] bg-white z-[50]",t),children:(0,l.jsx)(a.Z,{className:"!bg-transparent relative",children:(0,l.jsxs)("div",{className:(0,s.m6)("flex flex-nowrap justify-between items-center border-b-[1px] border-b-secondary-french overflow-hidden"),children:[(0,l.jsx)("div",{className:"flex flex-nowrap items-center gap-0 min-w-[calc(100%)] lg:min-w-[calc(100%-200px)] overflow-x-auto",children:null==n?void 0:n.map((e,t)=>{if(null==e?void 0:e.url)return(0,l.jsx)(r.default,{className:(0,s.m6)("buttonText p-[20px] lg:px-10 lg:py-7 inline-block relative after:content-[''] after:h-[1px] after:absolute after:block after:w-0 after:left-[50%] after:bottom-0 after:opacity-0 after:invisible after:transition-all after:duration-300 after:ease-in-out after:bg-primary-raisin whitespace-nowrap",b===t?"after:opacity-100 after:visible after:left-0 after:w-full":""),href:e.url,onClick:n=>null==S?void 0:S(n,t,e),children:e.text},t)})}),f&&w&&(!g||null!==C)&&(0,l.jsx)(i.Button,{...f,onClick:()=>D(),type:"link",size:"small",variant:"primary",className:(0,s.m6)("max-w-[185px] lg:block hidden",w?"sticky-button":"")})]})})})}},70420:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});var l=n(5032),i=n(77136),a=n(3607);let r=(e,t)=>{var n,r,o,s,d,c,u,m,p,v,f,x,h,y,g;let b=(null==e?void 0:null===(s=e.raynetProductData)||void 0===s?void 0:null===(o=s.category)||void 0===o?void 0:null===(r=o[0])||void 0===r?void 0:null===(n=r.split(","))||void 0===n?void 0:n[0])||"",j=null==t?void 0:t.filter(e=>(null==e?void 0:e.slug)!=="default"),w=null==j?void 0:null===(d=j.find(e=>{var t,n,l,i,a,r,o,s;return(null==e?void 0:null===(n=e.idRaynet)||void 0===n?void 0:null===(t=n.toLowerCase())||void 0===t?void 0:t.normalize("NFD").replaceAll(" ","-"))===(null==b?void 0:null===(l=b.toLowerCase())||void 0===l?void 0:l.normalize("NFD").replaceAll(" ","-"))||(null==b?void 0:null===(s=b.toLowerCase())||void 0===s?void 0:null===(o=s.normalize("NFD"))||void 0===o?void 0:null===(r=o.replaceAll(" ","-"))||void 0===r?void 0:r.includes((null==e?void 0:null===(a=e.idRaynet)||void 0===a?void 0:null===(i=a.toLowerCase())||void 0===i?void 0:i.normalize("NFD").replaceAll(" ","-"))||""))}))||void 0===d?void 0:d.slug;return{id:e._id,thumbnail:(null===(c=e.productImages)||void 0===c?void 0:c[0])?(0,l.Z)(e.productImages[0]):void 0,category:(null==e?void 0:null===(m=e.raynetProductData)||void 0===m?void 0:null===(u=m.category)||void 0===u?void 0:u[0])||"",title:(null===(p=e.raynetProductData)||void 0===p?void 0:p.name)||"Bez n\xe1zvu",label:null===(v=e.raynetProductData)||void 0===v?void 0:v.label,priceOnlyForRegisteredUsers:(null===(f=e.raynetProductData)||void 0===f?void 0:f.priceOnlyForRegisteredUsers)||!1,priceWithTAX:(null===(x=e.raynetProductData)||void 0===x?void 0:x.price)&&(null===(h=e.raynetProductData)||void 0===h?void 0:h.taxRate)!==void 0?(0,i.F)(e.raynetProductData.price,e.raynetProductData.taxRate):0,priceWithoutTAX:(null===(y=e.raynetProductData)||void 0===y?void 0:y.price)||0,recycleFee:(null===(g=e.raynetProductData)||void 0===g?void 0:g.recyclationFee)||0,link:{url:"/produkty/".concat(w||("DOCH\xc1ZKOV\xdd A PŘ\xcdSTUPOV\xdd SYS."===b?"pristupove-systemy":"ostatni"),"/").concat((0,a.N)(e.generatedSlug)),text:"Zobrazit v\xedce"}}}},70433:function(e,t,n){"use strict";n.d(t,{default:function(){return h}});var l=n(26705),i=n(24432),a=n(53335),r=n(87227),o=e=>{let{className:t,text:n,typeTag:i="new",icon:o}=e;return(0,l.jsx)("div",{className:(0,a.m6)("alertText inline-flex flex-nowrap items-center justify-center relative px-[8px] py-[6px] min-h-[24px]","icon"===i&&"w-6 h-6",t,"new"===i?"bg-primary-spring text-white":"discount"===i?"bg-red text-white":"bg-primary-spring text-white"),children:"icon"!==i?(0,l.jsx)(l.Fragment,{children:n}):o&&(0,l.jsx)(r.J,{name:o,className:"text-white !w-5 !h-5"})})},s=n(27648),d=n(27957),c=n(96169),u=n(70801),m=n(79988),p=n(84606),v=n(72420),f=n(54013),x=n(97604),h=e=>{var t;let{id:n,className:r,thumbnail:h,category:y,title:g,label:b,priceWithoutTAX:j,priceWithTAX:w,initialPrice:k,discount:N,link:P,lang:C,recycleFee:D,sliderProps:S,priceOnlyForRegisteredUsers:I}=e,{addProduct:E}=(0,c.j)(),{openPopup:z}=(0,u.B)(),{userData:T}=(0,f.a)(),_=e=>{e.preventDefault(),e.stopPropagation(),E(n,1),z((0,l.jsx)(m.Z,{product:{id:n,anotation:y,title:g,price:w,priceWithoutTax:j,recycleFee:D},count:1,sliderImages:[h||{}],lang:C}))},L=e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),E(n,1),z((0,l.jsx)(m.Z,{product:{id:n,anotation:y,title:g,price:w,priceWithoutTax:j,recycleFee:D},count:1,sliderImages:[h||{}],lang:C})))},A="/".concat(C).concat((null==P?void 0:P.url)||"/".concat(C,"/produkty"));return(0,l.jsx)(s.default,{href:A,className:(0,a.m6)("block relative bg-grey-200 transition-all duration-300 ease-in-out cursor-pointer",S&&"h-full",r),children:(0,l.jsxs)("div",{className:(0,a.m6)("relative transition-all duration-300 ease-in-out pt-2 group",r,"h-full flex flex-col"),children:[(0,l.jsxs)("div",{className:"thumbnailBlock bg-white relative overflow-hidden min-h-[136px] md:min-h-[200px] w-[calc(100%-24px)] md:w-[calc(100%-16px)] block mx-auto mb-4",children:[b&&(0,l.jsx)("div",{className:"absolute right-2 top-2 z-[2]",children:(0,l.jsx)(o,{text:b,typeTag:"new"})}),(0,l.jsx)(d.Z,{...h,src:h?h.src:"/icons/placeholder-white.png",lazy:!0,className:"absolute object-contain left-0 top-0 w-full h-full group-hover:scale-[1.10] transition-all duration-300 ease-in-out"})]}),(0,l.jsxs)("div",{className:(0,a.m6)("textBlock flex flex-col justify-between relative px-3 pb-3 md:px-5 md:pb-5 gap-4 h-full"),children:[g&&(0,l.jsx)("div",{className:"block relative",children:(0,l.jsx)("h3",{className:"font-human line-clamp-4 font-medium text-[14px] leading-[140%] text-primary-raisin",children:g})}),I&&null===T?(0,l.jsxs)("div",{className:"flex justify-between items-center mt-auto relative",children:[(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)("div",{className:"flex flex-nowrap items-end gap-[2px] mt-[-4px]",children:(0,l.jsx)("span",{className:"font-human inline-block font-medium text-[18px] leading-[120%] tracking-[0.02em] pr-[16px]",children:"Cena po registraci"})})}),(0,l.jsx)(s.default,{href:"/cs/".concat((0,x.q2)("registration","cs")),tabIndex:0,role:"button","aria-label":"Registrovat se",children:(0,l.jsx)(i.h,{icon:"MdPerson",size:"small",color:"grey",classIcon:"text-[#1C1B1F]",label:"Registrovat se"})})]}):N?(0,l.jsxs)("div",{className:"flex flex-row flex-nowrap items-center gap-1 md:gap-[8px] w-full",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-[4px] md:gap-[0.5rem] w-full",children:[j&&(0,l.jsx)("div",{className:"font-human text-[14px] leading-[160%] font-normal text-grey-1000 w-full",children:(0,v.x)(j,{withVAT:!1,showVATLabel:!0}).formattedAmount}),(0,l.jsxs)("div",{className:"w-full flex flex-nowrap items-end md:items-center gap-2",children:[(0,l.jsx)(o,{className:"tag",typeTag:"discount",text:"-".concat(N.toString(),"%")}),(0,l.jsxs)("div",{className:"flex flex-nowrap flex-row items-center gap-1 relative top-0 sm:top-[2px]",children:[(0,l.jsxs)("div",{className:"flex flex-nowrap items-end gap-[2px]",children:[(0,l.jsx)("span",{className:"font-human inline-block font-medium text-[18px] md:text-[20px] leading-[160%] tracking-[0.02em] uppercase",children:(0,v.x)(w).formattedAmount})," ",(0,l.jsx)("span",{className:"font-human inline-block font-medium text-[14px] leading-[160%] tracking-[0.02em] relative top-[-2px]",children:null===(t=p.k.currencyLabel)||void 0===t?void 0:t[C||"cs"]})]}),k&&(0,l.jsx)("span",{className:"font-human inline-block font-medium text-[14px] leading-[160%] tracking-[0.02em] relative top-[2px] sm:top-[3px] line-through text-grey-1000",children:(0,v.x)(k).formattedAmount})]})]})]}),(0,l.jsx)("div",{onClick:_,onKeyUp:L,tabIndex:0,role:"button","aria-label":"Přidat do koš\xedku ".concat(g),children:(0,l.jsx)(i.h,{icon:"MdShoppingCart",size:"small",color:"grey",classIcon:"text-[#1C1B1F]",label:"Přidat do koš\xedku ".concat(g)})})]}):(0,l.jsxs)("div",{className:"flex justify-between items-center mt-auto relative",children:[(0,l.jsxs)("div",{className:"w-full",children:[j&&(0,l.jsx)("div",{className:"font-human text-[14px] leading-[160%] font-normal text-secondary-dark w-full",children:(0,v.x)(j,{withVAT:!1,showVATLabel:!0}).formattedAmount}),(0,l.jsxs)("div",{className:"flex flex-nowrap items-end gap-[2px] mt-[-4px]",children:[(0,l.jsx)("span",{className:"font-human inline-block font-medium text-[18px] md:text-[20px] leading-[160%] tracking-[0.02em]",children:(0,v.x)(w).formattedAmount})," "]})]}),(0,l.jsx)("div",{onClick:_,onKeyUp:L,tabIndex:0,role:"button","aria-label":"Přidat do koš\xedku ".concat(g),children:(0,l.jsx)(i.h,{icon:"MdShoppingCart",size:"small",color:"grey",classIcon:"text-[#1C1B1F]",label:"Přidat do koš\xedku ".concat(g)})})]})]})]})})}},20204:function(e,t,n){"use strict";var l=n(26705),i=n(53335);t.Z=e=>{let{configurator:t}=e;return(0,l.jsxs)("div",{className:(0,i.m6)("bg-grey-200 block w-full h-full flex flex-col p-2",t&&"min-w-[250px] md:min-w-[300px] lg:min-w-[360px]"),children:[(0,l.jsx)("div",{className:"thumbnail relative mx-auto block w-full overflow-hidden ",children:(0,l.jsx)("div",{className:"w-full h-[200px] bg-grey-400 animate-pulse"})}),(0,l.jsxs)("div",{className:"textBlock flex flex-col justify-between relative px-3 pb-3 md:px-5 md:pb-5 gap-2",children:[(0,l.jsxs)("div",{className:"mt-3",children:[(0,l.jsx)("div",{className:"h-4 bg-grey-400 rounded w-full animate-pulse mb-2"}),(0,l.jsx)("div",{className:"h-4 bg-grey-400 rounded w-3/4 animate-pulse"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,l.jsx)("div",{className:"h-4 bg-grey-400 rounded w-1/2 animate-pulse"}),(0,l.jsx)("div",{className:"w-full flex flex-nowrap items-end md:items-center gap-2",children:(0,l.jsx)("div",{className:"h-5 bg-grey-400 rounded w-1/3 animate-pulse"})})]})]})]})}},91355:function(e,t,n){"use strict";n.d(t,{default:function(){return p}});var l=n(26705),i=n(20955),a=n(19764);n(61582);var r=n(53335),o=e=>{let{progress:t}=e;return(0,l.jsx)("div",{className:"relative w-full h-[2px] transition ease-in-out duration-100 rounded-sm flex items-start bg-secondary-french overflow-hidden",children:(0,l.jsx)("div",{style:{width:"".concat(Math.ceil(t?100*t:1),"%")},className:"h-[2px] bg-primary-raisin absolute left-0 top-1/2 roun
1ded-sm -translate-y-1/2 transition-all duration-300 ease-in-out"})})},s=n(24432),d=e=>{var t;let{blocks:n,swiperOptions:d,className:c}=e,[u,m]=(0,i.useState)((null==d?void 0:d.initialSlide)||0),p=(0,i.useRef)(null),[v,f]=(0,i.useState)(0),x=(0,i.useCallback)(e=>{e.updateProgress(),m(e.activeIndex),f(e.progress)},[]),[h,y]=(0,i.useState)(!1),g="bg-grey-600 flex items-center justify-center sm:w-[40px] sm:h-[40px] lg:w-[3rem] lg:h-[3rem]",b="lg:w-[1.5rem] lg:h-[1.5rem]",j="number"==typeof(null==d?void 0:d.slidesPerView)?d.slidesPerView:void 0;return(0,l.jsxs)("div",{className:(0,r.m6)(c," hidden sm:block opacity-0 invisible transition-all duration-300 ease-in-out",h&&"opacity-100 visible"),children:[(0,l.jsx)(a.tq,{...d,autoHeight:!1,onSlideChange:x,onSwiper:e=>{var t;p.current=e,y(!0),null===(t=p.current)||void 0===t||t.update()},onResize:e=>{null==e||e.update()},onBeforeInit:e=>{y(!1)},className:"mb-[2.5rem]",children:null==n?void 0:n.map((e,t)=>(0,l.jsx)(a.o5,{className:(0,r.m6)("!h-auto"),children:e},"block".concat(t)))}),(0,l.jsx)(o,{totalNumber:null==n?void 0:n.length,activeIndex:u,slidesPerView:j||0,progress:v}),(0,l.jsxs)("div",{className:"w-full flex items-end justify-end mt-[2.5rem] gap-[1rem]",children:[(0,l.jsx)(s.h,{onClick:()=>{p.current&&p.current.slidePrev()},className:(0,r.m6)(g,"rotate-180"),disabled:0===u,classIcon:b,icon:"MdArrowForward",label:"PrevButton"}),(0,l.jsx)(s.h,{onClick:()=>{p.current&&p.current.slideNext()},disabled:null===(t=p.current)||void 0===t?void 0:t.isEnd,icon:"MdArrowForward",className:(0,r.m6)(g),classIcon:b,label:"NextButton"})]})]})},c=n(50524),u=n(56302),m=n(7336),p=e=>{let{swipper:t,cta:n,className:a,paddingClass:o,onlyGrid:s}=e,[p,v]=(0,i.useState)(!1),[f,x]=(0,i.useState)(!1),h=t.blocks,y=(0,i.useRef)(null),g=(0,u.Y)(y),[b,j]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{g&&!b&&j(!0)},[g,b]),(0,l.jsx)(m.E.div,{initial:{opacity:0}
1,whileInView:{opacity:1,transition:{ease:"easeInOut",duration:0}},className:(0,r.m6)("bg-white w-full ",a),children:(0,l.jsxs)("div",{className:(0,r.m6)(" w-full h-full ".concat(p?"flex flex-col items-center":""),o),children:[(0,l.jsx)("div",{className:"border-b-[1px] pb-8 md:pb-[32px] mb-[2.5rem] border-secondary-french w-full flex items-end flex-row justify-end ",children:(0,l.jsx)("div",{className:"hidden md:block",children:p||s?(0,l.jsx)("div",{className:"relative h-[14px]"}):(0,l.jsx)(c.Button,{variant:"terciary",className:"hidden lg:flex ".concat((null==n?void 0:n.hasInfo)?"self-end":"self-center"," z-100 relative "),icon:null==n?void 0:n.icon,iconRight:!0,iconType:"square",darkMode:!0,size:"medium",type:(null==n?void 0:n.url)?"link":"button",link:{url:(null==n?void 0:n.url)||"",text:(null==n?void 0:n.title)||"ZOBRAZIT VÅ E"},onClick:()=>!(null==n?void 0:n.url)&&v(!0)})})}),(0,l.jsxs)("div",{children:[(()=>{if(s)return(0,l.jsxs)("div",{className:"w-full flex flex-col items-center",children:[(0,l.jsx)("div",{className:"w-full sm:hidden grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-2 pb-[1.25rem] mb-[1.25rem] border-secondary-french border-b-[1px]",children:h.map((e,t)=>f?(0,l.jsx)("div",{children:e},t):t<5?(0,l.jsx)("div",{children:e},t):void 0)}),(0,l.jsx)("div",{className:"w-full hidden sm:grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-2 pb-[1.25rem] mb-[1.25rem] border-secondary-french border-b-[1px]",children:h.map((e,t)=>(0,l.jsx)("div",{children:e},t))})]});if(p)return(0,l.jsx)("div",{className:"w-full hidden sm:flex flex-col items-center",children:(0,l.jsx)("div",{className:"w-full grid grid-cols-4 gap-2 pb-[1.25rem] mb-[1.25rem] border-secondary-french border-b-[1px]",children:h.map((e,t)=>(0,l.jsx)("div",{children:e},t))})});let e={hidden:{opacity:0},show:{opacity:1,transition:{duration:.2,ease:"easeInOut"}}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m.E.div,{variants:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:1}}},initial:"hidden",animate:"show",className:"w-full sm:hidden grid gap-2 grid-cols-1 pb-[1.25rem] mb-[1.25rem] border-secondary-french border-b-[1px]",children:h.map((t,n)=>f?(0,l.jsx)(m.E.div,{initial:{opacity:0}
1,whileInView:{opacity:1,transition:{duration:.2,ease:"easeInOut"}},viewport:{once:!0},children:t},n):n<3?(0,l.jsx)(m.E.div,{variants:e,children:t},n):void 0)}),t&&(0,l.jsx)(d,{...t})]})})(),p&&!s?(0,l.jsx)("div",{className:"flex flex-nowrap justify-center",children:(0,l.jsx)(c.Button,{variant:"terciary",size:"medium",icon:null==n?void 0:n.icon,iconRight:!0,iconType:"square",darkMode:!0,type:"button",className:"z-100 relative",link:{url:"",text:"ZOBRAZIT M\xc9NĚ"},onClick:()=>v(!1)})}):(0,l.jsx)("div",{className:"flex flex-nowrap justify-center sm:hidden w-full",children:f?(0,l.jsx)(c.Button,{variant:"terciary",className:"sm:block md:hidden z-100 relative",icon:null==n?void 0:n.icon,size:"medium",iconType:"square",darkMode:!0,iconRight:!0,type:"button",link:{url:"",text:"ZOBRAZIT M\xc9NĚ"},onClick:()=>x(!1)}):(0,l.jsx)(c.Button,{variant:"terciary",size:"medium",className:"sm:block md:hidden z-100 relative",icon:null==n?void 0:n.icon,iconType:"square",darkMode:!0,iconRight:!0,type:"button",link:{url:"",text:"ZOBRAZIT V\xcdCE"},onClick:()=>x(!0)})})]})]})})}},40238:function(e,t,n){"use strict";n.d(t,{default:function(){return v}});var l=n(26705),i=n(69597),a=n(82278),r=n(20955),o=n(26519),s=n(53335),d=n(10868),c=n(99376),u=e=>{var t,n,u,m,p,v;let{children:f,header:x}=e,h=(0,c.useSearchParams)(),{state:y,getActiveStep:g,getStep:b,canGoToStep:j,setActiveStep:w}=(0,o.hC)(),k=(0,r.useCallback)(()=>{let e=y.orderedProductList.some(e=>"entrySystem"===e.stepId&&"externalControlUnit"===e.productName),t=y.orderedProductList.some(e=>"entryPhonePanel"===e.stepId&&"entryPhonePanel"===e.productName),n=y.orderedProductList.some(e=>"entrySystem"===e.stepId&&"entrySystemPanel"===e.productName),l=t&&n,i=t=>!!l&&(e?"entrySystem"===t.stepId&&"entrySystemPanel"===t.productName:"entryPhonePanel"===t.stepId&&"entryPhonePanel"===t.productName),a=y.orderedProductList.reduce((e,t)=>i(t)||0===t.quantity?e:e+t.totalPrice,0);return a?Intl.NumberFormat("cs-CZ",{currency:"CZK",style:"currency",maximumFractionDigits:2,minimumFractionDigits:0}).format(a):null},[y.orderedProductList]),N=()=>{let e=y.steps;return e?e.map(t=>{var n;return{label:t.stepData.stepName,active:t.stepData.stepId===e[y.activeStepIndex].stepData.stepId,value:t.stepData.stepId,hidden:null!==(n=t.hiddenFromNavigation)&&void 0!==n&&n}}):[]},P=e=>{let t=b(e.value),n=j(e.value);t&&n&&w(t)},C=null!==(v=null===(u=g())||void 0===u?void 0:null===(n=u.configuratorHeader)||void 0===n?void 0:null===(t=n.progressBar)||void 0===t?void 0:t.hidden)&&void 0!==v&&v,D=null===(p=y.steps.find(e=>"system"===e.stepData.stepId))||void 0===p?void 0:null===(m=p.stepData)||void 0===m?void 0:m.system,S={[d.Mv.Melody]:"Syst\xe9m Melody",[d.Mv.DuoPlus]:"Syst\xe9m Duo Plus",[d.Mv.DuoStandard]:"Syst\xe9m Duo Standard"},I=D?(0,l.jsxs)("div",{className:"flex items-end gap-4",children:[(0,l.jsx)("div",{className:"h5 hidden md:block",children:S[D]}),(0,l.jsx)("div",{className:"h4",children:k()})]}):k();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:(0,s.m6)("w-full flex flex-col sticky top-0 bg-grey-200 z-[101]","transition-all duration-300",C?"bg-opacity-0":"bg-opacity-100"),children:[x&&(0,l.jsx)(a.C,{...x,trailingContent:I}),(()=>{let e=N(),t=e.filter(e=>e.hidden).length,n=h.get("token"),a=e.length>0?y.activeStepIndex-t+(n?0:1):0;return e&&(0,l.jsx)(i.k,{activeIndex:a,items:e,onItemClick:P,className:(0,s.m6)("w-full justify-center","transition-all duration-300",C?"pointer-events-none opacity-0":"pointer-events-auto opacity-100","bg-grey-400")})})()]}),(0,l.jsx)("div",{children:f})]})},m=n(63968);let p={header:{backButton:{variant:"terciary",iconType:"square",iconLeft:!0,icon:"MdArrowBack",link:{url:"/",text:"Opustit konfigur\xe1tor"}},logoImage:{src:"/icons/logo-configurator.svg",alt:"logo",width:235,height:40},trailingContent:"0 Kč"}};var v=e=>{let{children:t}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{children:"\n					.
1intercom-launcher {\n						display: none !important;\n						\n					}\n				"}),(0,l.jsx)(o.Wx,{children:(0,l.jsx)(m.Z,{children:(0,l.jsx)(u,{...p,children:t})})})]})}},46441:function(e,t,n){"use strict";n.d(t,{default:function(){return eT}});var l=n(26705),i=n(55806),a=n(20955),r=n(53335),o=n(83403),s=n(55711),d=n(57261),c=e=>{let{radioOptions:t,selectedValue:n,onSelectChange:i,displayType:a="horizontal",descriptionDisplayOption:o="horizontal",className:s}=e,c=e=>{i&&e&&i(e)};return(0,l.jsx)("div",{className:(0,r.m6)("flex gap-10 items-start w-full sm:justify-end justify-start","vertical"===a&&"flex-col w-full gap-1",s),children:t.map((e,t)=>(0,l.jsx)("button",{type:"button",className:(0,r.m6)(e.description&&"w-full"),onClick:()=>c(e.value),children:(0,l.jsx)(d.Z,{...e,checked:n===e.value,displayOption:a,descriptionDisplayOption:o,className:(0,r.m6)("text-left",e.description&&"vertical"===e.displayOption&&"flex-col items-start w-full")})},t))})},u=n(7177),m=e=>{let{className:t,title:n,tooltip:i,input:a,inputType:d,displayType:m="horizontal",descriptionDisplayType:p="horizontal",onValueChange:v}=e,f=e=>{v&&v(e)};return(0,l.jsxs)("div",{className:(0,r.m6)("flex items-center flex-wrap sm:flex-nowrap sm:justify-between gap-4 sm:gap-20 h-auto","input"===d&&"textarea"===a.typeInput&&"sm:h-auto block","radio"===d&&"items-start sm:h-auto",t),children:[(()=>{if(n&&"object"==typeof n){var e,t;return(0,l.jsxs)("div",{className:"flex flex-col gap-y-1 min-w-[200px]",children:[(0,l.jsxs)("div",{className:"flex gap-1 items-center self-stretch w-full sm:w-auto",children:[n&&(0,l.jsx)("h6",{className:"h6 text-primary-raisin",children:n.title}),i&&(0,l.jsx)(o.Z,{onMobileToLeft:!0,...i})]}),n.subtitle&&(0,l.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,l.jsx)("p",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:null===(e=n.subtitle)||void 0===e?void 0:e.label}),(0,l.jsx)("p",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:null===(t=n.subtitle)||void 0===t?void 0:t.value})]})]})}return(0,l.jsxs)("div",{className:(0,r.m6)("flex gap-1 items-center min-w-[200px]","radio"===d?"self-start":"self-center"),children:[n&&(0,l.jsx)("h6",{className:"h6 text-primary-raisin",children:n}),i&&(0,l.jsx)(o.Z,{onMobileToLeft:!0,...i})]})})(),(()=>{switch(d){case"radio":return(0,l.jsx)(c,{descriptionDisplayOption:p,displayType:m||"horizontal",radioOptions:null==a?void 0:a.options,selectedValue:null==a?void 0:a.value,onSelectChange:f});case"input":return(0,l.jsx)(s.I,{...a,className:"w-auto",smaller:!0,onChange:f});case"checkbox":return(0,l.jsx)(u.Z,{...a,onChange:f,readOnly:!0,noLabel:!0})}})()]})},p=n(50524),v=e=>{let{className:t,groups:n,itemGroups:i,button:o,onValueChange:s}=e,d=(e,t)=>{s&&s(e,t)},c=(e,n,i)=>(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-col gap-8 w-full max-w-[646px] mx-auto",t),children:[n&&(0,l.jsx)("h4",{className:"h4 text-primary-raisin text-center block",children:n}),i&&(0,l.jsx)("div",{className:"flex flex-col w-full gap-4",children:i.map((e,t)=>(0,l.jsxs)(a.Fragment,{children:[(0,l.jsx)(m,{...e,onValueChange:t=>d(e,t)}),(0,l.jsx)("span",{className:"w-full h-[1px] bg-secondary-french"},t)]},e.id||"config-item-".concat(t)))}),o&&(0,l.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,l.jsx)(p.Button,{...o,className:"max-w-[200px]"})})]},e);return(0,l.jsx)("div",{className:(0,r.m6)("flex flex-col gap-14 w-full py-[2.5rem] lg:py-[3.5rem]",t),children:null==n?void 0:n.map((e,t)=>{var n;let l=(null===(n=i[t])||void 0===n?void 0:n.items)||[];return c(e.name,e.title,l)})})},f=n(26519);let x=(e,t)=>{var n;if(!t||!e)return null;let l=(null===(n=t.stepContent(e))||void 0===n?void 0:n.itemGroups)||[];return null==l?void 0:l.reduce((e,t)=>{for(let n of t.items)n.id&&(e[n.id]={input:n});return e},{})};var h=e=>{var t,n;let{state:i,stepData:r}=e,{updateStepData:o}=(0,f.hC)(),s=(e,t)=>{switch(e.inputType){case"radio":var n;return{...e,input:{...e,input:{options:null===(n=e.input)||void 0===n?void 0:n.options,value:t}}};case"input":return{...e,input:{...e,input:{...e.input,value:t}}};case"checkbox":return{...e,input:{...e,input:{...e.input,checked:t.target.checked}}}}};(0,a.useEffect)(()=>
1{if(!i||!r||Object.keys(r.attributes).length>0)return;let e=x(i,r);o({...r,attributes:e})},[i,r,o]);let d=e=>r&&e&&r.stepContent?r.stepContent(e):null;return(0,l.jsx)(v,{groups:(null===(t=d(i))||void 0===t?void 0:t.groups)||[],itemGroups:(null===(n=d(i))||void 0===n?void 0:n.itemGroups)||[],onValueChange:(e,t)=>{if(!o||!e.id||!r)return;let n=s(e,t);o({...r,attributes:{...r.attributes,[e.id]:{...n}}})}})},y=n(33145),g=n(36521),b=n(27648),j=n(87227),w=e=>{let{link:t,disabled:n=!1,className:i}=e;if(!(null==t?void 0:t.url))return null;let{url:a}=t;return(0,l.jsx)(b.default,{href:a,target:"_blank",className:(0,r.m6)("group w-5 h-5 bg-primary-spring flex items-center justify-center relative",n&&"bg-secondary-celadon",i),children:(0,l.jsx)("div",{className:(0,r.m6)("absolute flex items-center justify-center z-0 top-0 right-0 bottom-0 left-0 bg-opacity-0 group-active:bg-opacity-80 group-hover:bg-opacity-50 transition-colors duration-150 ease-in-out",n?"bg-transparent":"bg-secondary-forest"),children:(0,l.jsx)(j.J,{name:"MdArrowOutward",className:"!w-4 !h-4 text-white"})})})},k=e=>{let{itemId:t,quantity:n=0,className:i,image:a,title:o,itemUrl:s,table:d,button:c,quanityInputDisabled:u=!1,onSelection:m,onQuantityChange:v,hiddenData:f,selected:x=!1,disabled:h=!1}=e,b=()=>{let e=!u&&h;t&&m&&!e&&m(t,{compatibleProductCategory:null==f?void 0:f.hiddenCategoryData,title:o,price:null==f?void 0:f.hiddenPrice})},j=e=>{t&&v&&!h&&v(t,e.newQuantity)};return(0,l.jsxs)("div",{className:(0,r.m6)("bg-grey-200 h-full lg:max-w-[359px] box-border px-6 py-6 flex flex-col items-center justify-between border-2 border-transparent",i),children:[(0,l.jsxs)("div",{className:"flex-1 flex flex-col justify-between",children:[(0,l.jsxs)("div",{children:[(null==a?void 0:a.url)&&(0,l.jsx)("div",{className:"w-full h-[200px] bg-white relative overflow-hidden flex items-center justify-center mb-8",children:(0,l.jsx)(y.default,{src:a.url,alt:a.alt||"",width:200,height:200,className:"object-fit absolute block left-[50%] top-[50%] transform -translate-x-1/2 -translate-y-1/2"})}),(0,l.jsxs)("div",{className:"flex justify-between items-start w-full mb-[24px] gap-5",children:[o&&(0,l.jsx)("h4",{className:(0,r.m6)("text-primary-raisin block",a?"h4":"h3",s&&"max-w-[calc(100%-44px)]"),children:o}),(0,l.jsx)(w,{link:{url:s,target:"_blank"}})]})]}),null==d?void 0:d.data.map((e,t)=>(0,l.jsx)("div",{className:"w-full ",children:(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-row justify-between w-full pb-5 border-b-[1px] border-b-secondary-french"),children:["object"==typeof e.label?e.label:(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:e.label}),"object"==typeof e.value?e.value:(0,l.jsx)("span",{className:"p2 font-human text-primary-raisin leading-[160%]",children:e.value})]})},t))]}),(0,l.jsx)("div",{className:"mt-8",children:x?u?(0,l.jsx)(p.Button,{...c,link:{text:"Vybr\xe1no",url:"/"},variant:"secondary",onClick:h?void 0:b,className:"w-full min-w-[160px]"}):(0,l.jsx)(g.R,{min:0,value:n||1,onChange:e=>j({newQuantity:Number(e)})}):(0,l.jsx)(p.Button,{...c,variant:"primary",onClick:b,disabled:!u&&h,className:"w-full min-w-[160px]"})})]})},N=n(19764),P=n(62662);n(44915);var C=e=>{let{children:t,swiperOptions:n}=e,[i,o]=(0,a.useState)(!0);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:(0,r.m6)(i&&"bg-grey-400 h-full block absolute left-0 top-0 w-full z-[100] min-h-[500px]")}),(0,l.jsx)(N.tq,{initialSlide:0,spaceBetween:8,onBeforeInit:()=>o(!0),onInit:()=>o(!1),modules:[P.W_,P.gI],effect:"creative",creativeEffect:{prev:{shadow:!0,translate:["-20%",0,-1]},next:{shadow:!0,translate:["100%",0,0]}},speed:600,navigation:{nextEl:".buttonNext",prevEl:".buttonPrev"},breakpoints:{0:{slidesPerView:1},680:{slidesPerView:2}},...n,children:t}),(0,l.jsx)("button",{type:"button",className:"buttonPrev absolute flex flex-nowrap items-center justify-center left-[-8px] z-[100] top-[50%] translate-y-[-50%] w-5 h-5 bg-grey-600",children:(0,l.jsx)(j.J,{name:"MdArrowBack",className:"w-4 h-4 text-primary-raisin"})}),(0,l.jsx)("button",{type:"button",className:"buttonNext absolute flex flex-nowrap items-center justify-center right-[-8px] z-[100] top-[50%] translate-y-[-50%] w-5 h-5 bg-grey-600",children:(0,l.jsx)(j.J,{name:"MdArrowForward",className:"w-4 h-4 text-primary-raisin"})})]})},D=()=>(0,l.jsxs)("div",{className:(0,r.m6)("bg-grey-200 h-full w-full lg:max-w-[359px] box-border px-6 py-6 flex flex-col items-center justify-between"),children:[(0,l.jsxs)("div",{className:"flex-1 flex flex-col justify-between w-full",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"w-full h-[200px] bg-white relative overflow-hidden flex items-center justify-center mb-8",children:(0,l.jsx)("div",{className:"w-full h-[200px] bg-grey-400 animate-pulse"})}),(0,l.jsxs)("div",{className:"flex justify-between items-start w-full mb-[24px] gap-5",children:[(0,l.jsx)("div",{className:"h-6 bg-grey-400 rounded w-3/4 animate-pulse"}),(0,l.jsx)("div",{className:"w-10 h-10 rounded-full bg-grey-400 animate-pulse"})]})]}),[1,2,3].map((e,t)=>(0,l.jsx)("div",{className:"w-full",children:(0,l.jsxs)("div",{className:"flex flex-row justify-between w-full pb-5",children:[(0,l.jsx)("div",{className:"h-5 bg-grey-400 rounded w-1/3 animate-pulse"}),(0,l.jsx)("div",{className:"h-5 bg-grey-400 rounded w-1/4 animate-pulse"})]})},t))]}),(0,l.jsx)("div",{className:"mt-8 w-full",children:(0,l.jsx)("div",{className:"h-10 bg-grey-400 rounded w-full animate-pulse"})})]}),S=e=>{let{className:t,items:n,onItemSelect:i,onItemQuantityChange:a,selectedItems:o}=e,s=e=>o.find(t=>
1t.id===e),d=e=>(e&&[void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(N.o5,{children:(0,l.jsx)(D,{})},t)),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D,{}),(0,l.jsx)(D,{}),(0,l.jsx)(D,{})]})),c=e=>n?0===n.length?(0,l.jsx)("div",{className:"text-center p1",children:"Nenalezeny ž\xe1dn\xe9 položky"}):e?n.map((e,t)=>{let n=s(e.itemId);return(0,l.jsx)(N.o5,{className:"!h-auto",children:(0,l.jsx)(k,{...e,selected:!!n,onSelection:i,onQuantityChange:a,className:(0,r.m6)("border-2 transition-colors ease-in-out duration-300",s(e.itemId)?"border-primary-spring":"border-transparent")})},e.itemId||t)}):n.map((e,t)=>{let n=s(e.itemId);return(0,l.jsx)("div",{children:(0,l.jsx)(k,{...e,selected:!!n,onSelection:i,onQuantityChange:a,className:(0,r.m6)("border-2 transition-colors ease-in-out duration-300",s(e.itemId)?"border-primary-spring":"border-transparent")})},e.itemId||t)}):d(e);return(0,l.jsxs)("div",{className:(0,r.m6)("block py-[2.5rem] lg:py-[3.5rem]",t),children:[(0,l.jsx)("div",{className:"h4 block relative text-center text-primary-raisin mb-8 md:mb-10",children:"Vyberte typ telefonu"}),(0,l.jsx)("div",{className:"hidden lg:flex flex-nowrap gap-2 items-stretch justify-center",children:c(!1)}),(0,l.jsxs)("div",{className:"block lg:hidden relative",children:[(null==n?void 0:n.length)===0&&(0,l.jsx)("div",{className:"text-center p1",children:"Nenalezeny ž\xe1dn\xe9 položky"}),n&&(0,l.jsx)(C,{swiperOptions:{autoHeight:!1,breakpoints:{0:{slidesPerView:1},480:{slidesPerView:1.5},600:{slidesPerView:2},800:{slidesPerView:2.5}}},children:c(!0)})]})]})},I=function(){return{scrollToTop:(0,a.useCallback)(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]),scrollToBottom:(0,a.useCallback)(()=>{window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"})},[])}},E=n(13398),z=n(10868);let T=[z.Mv.Melody];var _=e=>{let{state:t,stepData:n}=e,{updateStepData:i}=(0,f.hC)(),{scrollToBottom:r}=I(),[o,s]=(0,a.useState)(void 0),d=()=>(null==n?void 0:n.items)?Object.keys(n.items).map(e=>({id:e,quantity:n.items[e].quantity,customData:n.items[e].customData})):[],c=()=>{var e,n;return(null===(e=(0,E.LQ)(t,"system"))||void 0===e?void 0:e.system)||(null==t?void 0:null===(n=t.configuration)||void 0===n?void 0:n.system)},u=()=>{var e,n,l,i,a;return null===(a=(0,E.LQ)(t,"info"))||void 0===a?void 0:null===(i=a.attributes)||void 0===i?void 0:null===(l=i.unitsCount)||void 0===l?void 0:null===(n=l.input)||void 0===n?void 0:null===(e=n.input)||void 0===e?void 0:e.value},m=e=>{if(!i||!n)return;let t={...n.items};e in t&&delete t[e],i({...n,items:t})},p=(0,a.useCallback)(async()=>{if(!n||!t)return[];let e=await n.stepContent(t),l=c();return l?e.map(e=>{let t=d().find(t=>t.id===e.itemId);return{...e,selected:!!t,quanitity:null==t?void 0:t.quantity,quanityInputDisabled:!T.includes(l)}}):[]},[n,t]);return(0,a.useEffect)(()=>{p().then(e=>{s(e)})},[p]),(0,l.jsx)(S,{selectedItems:d(),onItemSelect:(e,t)=>{if(!i||!n)return;let l=c(),a=u(),o=1,s={};s=l&&!T.includes(l)&&void 0!==a?{[e]:{quantity:o=a,customData:t}}:{...n.items,[e]:{quantity:o,customData:t}},i({...n,compatibleProductCategory:(null==t?void 0:t.compatibleProductCategory)||null,items:s}),r()},onItemQuantityChange:(e,t)=>
1{if(t<=0)return m(e);if(!i||!n)return;let l={...n.items};e in l&&(l[e].quantity=t),i({...n,items:l})},onItemDeselect:m,items:o})},L=e=>{let{className:t,title:n,description:i,tooltip:a,input:d,disabled:u=!1,onValueChange:m}=e,p=e=>{m&&m(e)};return(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-col gap-y w-full",u&&"opacity-50 cursor-not-allowed"),children:[(0,l.jsxs)("div",{className:(0,r.m6)("flex items-center justify-between gap-2",(null==d?void 0:d.type)==="radio"&&"flex-col items-start",t),children:[n&&(0,l.jsxs)("div",{className:"flex gap-1 items-center",children:[n&&(0,l.jsx)("h6",{className:"h6 text-primary-raisin",children:n}),a&&(0,l.jsx)(o.Z,{...a})]}),(()=>{if(!d)return null;switch(d.type){case"input":return(0,l.jsx)(s.I,{...d.content,smaller:!0,onChange:u?void 0:p,className:"w-auto",isDisabled:u});case"radio":var e;return(0,l.jsx)(c,{radioOptions:null===(e=d.content)||void 0===e?void 0:e.options,displayType:"vertical",selectedValue:null==d?void 0:d.content.value,onSelectChange:u?void 0:p})}})()]}),i&&(0,l.jsx)("div",{className:"flex",children:i?"object"==typeof i?i:(0,l.jsx)("p",{className:"text-sm text-secondary-french",children:i}):null})]})};let A=e=>{var t,n;return!(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.entrySecuritySystem)},B=(e,t)=>{var n,l;let i=!!(null===(l=e.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.einkDisplay);return"eink"===t?i:!i},R=(e,t)=>null==e?void 0:e.find(e=>{var n,l,i,a;return!!(A(e)&&B(e,t.nameTagType))&&(null===(l=e.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.color)===t.color&&(null==t.maxRingbellCount||(null===(a=e.raynetProductData)||void 0===a?void 0:null===(i=a.configurationInfo)||void 0===i?void 0:i.maxRingbellCount)===t.maxRingbellCount)}),M=(e,t)=>{let n=new Map;for(let i of t.colors){var l;let a=R(e,{nameTagType:t.nameTagType,color:i,maxRingbellCount:t.maxRingbellCount}),r=null==a?void 0:null===(l=a.raynetProductData)||void 0===l?void 0:l.price;"number"==typeof r&&n.set(i,r)}if(0===n.size)return Object.fromEntries(t.colors.map(e=>[e,0]));let i=Math.min(...n.values());return Object.fromEntries(t.colors.map(e=>{let t=n.get(e);return[e,null==t?0:t-i]}))};var O=n(91485);let Z=e=>{var t,n,l,i;let a={GEN:"Genova",FL:"Flatline"}[(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.design)||""],r={KL:"Kl\xe1vesnice",TL:"Tlač\xedtka"}[(null===(i=e.raynetProductData)||void 0===i?void 0:null===(l=i.configurationInfo)||void 0===l?void 0:l.inputHardware)||""];return"".concat(a||""," ").concat(r?r.toLocaleLowerCase("cs-CZ"):"")};var V=e=>{var t,n,i,o,s,d,c,u,m;let v;let{selectedItem:f,baseItem:x,allVariants:h,className:g,onItemSelect:b}=e,[j,k]=(0,a.useState)(f||x),N=(null==f?void 0:f._id)===(null==j?void 0:j._id),P=(0,a.useMemo)(()=>null==h?void 0:h.find(e=>{var t,n,l,i;return!(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.einkDisplay)&&!(null===(i=e.raynetProductData)||void 0===i?void 0:null===(l=i.configurationInfo)||void 0===l?void 0:l.entrySecuritySystem)}),[h]),C=(0,a.useMemo)(()=>null==h?void 0:h.find(e=>{var t,n,l,i;return(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.einkDisplay)&&!(null===(i=e.raynetProductData)||void 0===i?void 0:null===(l=i.configurationInfo)||void 0===l?void 0:l.entrySecuritySystem)}),[h]),D={ANT:"Antracid",SED:"Světle šed\xe1",MED:"Měděn\xe1"},[S,I]=(0,a.useState)((null==j?void 0:null===(n=j.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.einkDisplay)?"eink":"paper"),[E,z]=(0,a.useState)((null==j?void 0:null===(o=j.raynetProductData)||void 0===o?void 0:null===(i=o.configurationInfo)||void 0===i?void 0:i.color)||"ANT");(0,a.useEffect)(()=>{var e,t,n,l;j&&(I((null===(t=j.raynetProductData)||void 0===t?void 0:null===(e=t.configurationInfo)||void 0===e?void 0:e.einkDisplay)?"eink":"paper"),z((null==j?void 0:null===(l=j.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.color)||"ANT"))},[j]),(0,a.useEffect)(()=>
1{if(!f)return;let e=null==h?void 0:h.find(e=>e._id===(null==f?void 0:f._id));e&&e._id!==(null==j?void 0:j._id)&&k(e)},[f,h,j]);let T=(e,t)=>{let n;let l="eink"===e;(n=U?null==h?void 0:h.find(e=>{var n,i,a,r,o,s;if(null===(i=e.raynetProductData)||void 0===i?void 0:null===(n=i.configurationInfo)||void 0===n?void 0:n.entrySecuritySystem)return!1;let d=!!(null===(r=e.raynetProductData)||void 0===r?void 0:null===(a=r.configurationInfo)||void 0===a?void 0:a.einkDisplay),c=null===(s=e.raynetProductData)||void 0===s?void 0:null===(o=s.configurationInfo)||void 0===o?void 0:o.color;return d===l&&c===t}):null==h?void 0:h.find(e=>{var t,n,i,a;return(null===(n=e.raynetProductData)||void 0===n||null===(t=n.configurationInfo)||void 0===t||!t.entrySecuritySystem)&&!!(null===(a=e.raynetProductData)||void 0===a?void 0:null===(i=a.configurationInfo)||void 0===i?void 0:i.einkDisplay)===l}))&&n._id!==(null==j?void 0:j._id)&&(k(n),null==b||b(n))},_=(e,t)=>{"nameTags"===e&&(I(t),T(t,E)),"color"===e&&(z(t),T(S,t))},A=Z(j)||(null==j?void 0:null===(s=j.raynetProductData)||void 0===s?void 0:s.name)||"Bez n\xe1zvu",B=null===(d=(0,O.iQ)(null==j?void 0:null===(u=j.productImages)||void 0===u?void 0:null===(c=u[0])||void 0===c?void 0:c.image))||void 0===d?void 0:d.fit("fill").url(),R=(0,a.useMemo)(()=>{var e;return{data:[{label:(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"}),value:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",maximumFractionDigits:2,minimumFractionDigits:0}).format((null==x?void 0:null===(e=x.raynetProductData)||void 0===e?void 0:e.price)||0)," / ks")})}]}},[x]),V=(0,a.useMemo)(()=>{var e,t;if(P&&C)return{id:"nameTags",title:"Jmenovky",input:{type:"radio",content:{value:S,options:[{label:"Pap\xedr",value:"paper",description:Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"always",maximumFractionDigits:2,minimumFractionDigits:0}).format(0)},{label:"Elektronick\xfd pap\xedr",value:"eink",description:Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"always",maximumFractionDigits:2,minimumFractionDigits:0}).format(((null===(e=C.raynetProductData)||void 0===e?void 0:e.price)||0)-((null==x?void 0:null===(t=x.raynetProductData)||void 0===t?void 0:t.price)||0))}]}}}},[P,C,x,S]),F=(0,a.useMemo)(()=>{let e="eink"===S,t=null==h?void 0:h.filter(t=>{var n,l;return!!(null===(l=t.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.einkDisplay)===e});return Array.from(new Set(null==t?void 0:t.map(e=>{var t,n;return null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.color}))).filter(Boolean)},[h,S]),U=(0,a.useMemo)(()=>{var e,t;if(!F||F.length<2)return;let n=M(h,{nameTagType:S,colors:F,maxRingbellCount:null==j?void 0:null===(t=j.raynetProductData)||void 0===t?void 0:null===(e=t.configurationInfo)||void 0===e?void 0:e.maxRingbellCount});return{id:"color",title:"Barva",input:{type:"radio",content:{value:E,options:F.map(e=>{var t;return{label:D[e]||e,value:e,description:Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"always",maximumFractionDigits:2,minimumFractionDigits:0}).format(null!==(t=n[e])&&void 0!==t?t:0)}})}}}},[F,E,S,h,j]),$=[V,U].filter(Boolean),q=()=>{if(j)return"/produkty/zvonkova-tabla/".concat(null==j?void 0:j.generatedSlug)};return(0,l.jsxs)("div",{className:(0,r.m6)("bg-grey-200 w-full lg:h-auto h-full lg:max-w-[359px] box-border px-6 py-8 flex flex-col items-center justify-start","border-2 transition-colors ease-in-out duration-300",N?"border-primary-spring":"border-transparent",g),children:[(0,l.jsx)("div",{className:"w-full h-[200px] min-h-[200px] flex items-center justify-center relative mb-8 bg-white overflow-hidden",children:B&&(0,l.jsx)(y.default,{src:B,alt:(null==j?void 0:null===(m=j.raynetProductData)||void 0===m?void 0:m.name)||"",width:200,height:200,className:"object-contain max-h-full"})}),(0,l.jsxs)("div",{className:"flex justify-between items-center w-full pb-[26px]",children:[A&&(0,l.jsx)("h4",{className:(0,r.m6)("h4 text-primary-raisin",q()&&"max-w-[calc(100%-44px)]"),children:A}),(0,l.jsx)(w,{link:{url:q()||"#",target:"_blank"}})]}),(v="vč. mont\xe1žn\xed krabice a nap\xe1ječe",(0,l.jsxs)("div",{className:"w-full pb-5 mb-5 border-b-[1px] border-b-secondary-french",children:[null==R?void 0:R.data.map((e,t)=>(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-row justify-between w-full",!v&&"mb-[0.5rem]"),children:[e.label,e.value]},t)),v&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)("div",{className:"flex flex-row justify-end w-full mb-[0.5rem]",children:(0,l.jsx)("span",{className:"p4 text-grey-800",children:v})})})]})),(0,l.jsx)("div",{className:"flex flex-col gap-y-5 w-full h-full",children:$.map((e,t)=>(0,l.jsx)(a.Fragment,{children:(0,l.jsx)("div",{className:"flex w-full flex-col gap-y-2 items-center",children:(0,l.jsx)(L,{...e,className:"w-full",onValueChange:t=>_(e.id,t)}
1)})},"attr-".concat(t)))}),(0,l.jsx)(p.Button,{variant:N?"secondary":"primary",size:"small",type:"button",link:{text:N?"Vybr\xe1no":"Vybrat",url:"/"},onClick:()=>{null==b||b(j)},className:"w-full max-w-[200px] mt-8"})]})},F=n(20204);let U=e=>(e&&[void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(N.o5,{children:(0,l.jsx)(F.Z,{configurator:!0})},t)),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(F.Z,{configurator:!0}),(0,l.jsx)(F.Z,{configurator:!0}),(0,l.jsx)(F.Z,{configurator:!0})]}));var $=e=>{let{className:t,itemsInCategory:n,selectedItem:i,loadingError:o,onItemSelect:s}=e,d=(0,a.useMemo)(()=>{var e;return n?null===(e=Object.keys(n))||void 0===e?void 0:e.map(e=>({name:e,items:n[e].sort((e,t)=>{var n,l,i,a;return((null===(l=e.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.maxRingbellCount)||0)-((null===(a=t.raynetProductData)||void 0===a?void 0:null===(i=a.configurationInfo)||void 0===i?void 0:i.maxRingbellCount)||0)})})):[]},[n]),{resetConfigurator:c}=(0,f.hC)(),u=e=>{null==s||s(e)},m=e=>null==d?void 0:d.map(t=>{let n=t.items.find(e=>{var t,n,l,i;return(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.einkDisplay)===!1&&!(null===(i=e.raynetProductData)||void 0===i?void 0:null===(l=i.configurationInfo)||void 0===l?void 0:l.entrySecuritySystem)}),a=t.items[0];return(n&&(a=n),e)?(0,l.jsx)(N.o5,{children:(0,l.jsx)(V,{baseItem:a,selectedItem:i,configuration:t.name,allVariants:t.items,onItemSelect:u})},t.name):(0,l.jsx)(V,{baseItem:a,selectedItem:i,configuration:t.name,allVariants:t.items,onItemSelect:u},t.name)}),v=e=>{if(o)return(0,l.jsxs)("div",{className:"flex flex-col gap-8 p-4 border border-red rounded-lg",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,l.jsx)("div",{className:"sm:text-center p1",children:"Pro zadan\xe9 parametry nevedeme ž\xe1dn\xe9 produkty zvonkov\xfdch tabel."}),(0,l.jsxs)("div",{className:"flex flex-wrap md:flex-nowrap items-center gap-2",children:[(0,l.jsxs)("div",{className:"text-center p1",children:["V př\xedpadě probl\xe9mů n\xe1s kontaktujte na:"," "]}),(0,l.jsx)(b.default,{href:"tel:+420553663322",className:"p1 text-primary-spring flex flex-nowrap items-center gap-2 md:gap-3",children:(0,l.jsx)("span",{children:"+420 553 663 322"})})]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap sm:flex-nowrap items-center justify-center gap-4",children:[(0,l.jsx)(p.Button,{variant:"primary",link:{text:"Zač\xedt znovu",url:"/"},size:"medium",type:"button",onClick:c,className:"w-full md:w-[240px]"}),(0,l.jsx)(p.Button,{variant:"secondary",link:{text:"Domovsk\xe1 str\xe1nka",url:"/"},size:"medium",type:"link",className:"w-full md:max-w-[240px]"})]})]});if(!d||0===d.length)return U(e);if(e){var t;return(0,l.jsxs)(C,{swiperOptions:{autoHeight:!1},children:[(null===(t=Object.keys(d))||void 0===t?void 0:t.length)===0&&(0,l.jsx)("div",{className:"text-center p1",children:"Nenalezeny ž\xe1dn\xe9 položky"}),m(!0)]})}return m(!1)};return(0,l.jsxs)("div",{className:(0,r.m6)("block relative py-[2.5rem] lg:py-[3.5rem]",t),children:[(0,l.jsx)("div",{className:"headlineBlock",children:(0,l.jsx)("h4",{className:"h4 block relative w-full text-center text-primary-raisin mb-8 md:mb-10",children:"Vyberte typ zvonkov\xe9ho tabla"})}),(0,l.jsx)("div",{className:"hidden lg:flex items-stretch justify-center gap-[0.5rem] relative",children:v(!1)}),(0,l.jsx)("div",{className:"block lg:hidden relative w-full",children:v(!0)})]})},q=n(48184);let H=(e,t)=>{var n,l,i,a;return{id:null===(n=e.raynetProductData)||void 0===n?void 0:n.code,attributes:{title:(null==e?void 0:null===(l=e.raynetProductData)||void 0===l?void 0:l.name)||"Bez n\xe1zvu",price:(null===(i=e.raynetProductData)||void 0===i?void 0:i.price)||0,relatedProducts:t,configuration:null===(a=e.raynetProductData)||void 0===a?void 0:a.configurationInfo}}};var J=e=>{let{stepData:t,items:n}=e,{scrollToBottom:i}=I(),r=(0,a.useMemo)(()=>{var e;return n?null===(e=Object.keys(n))||void 0===e?void 0:e.flatMap(e=>null==n?void 0:n[e]):[]},[n]),[o,s]=(0,a.useState)(void 0),[d,c]=(0,a.useState)([]),[u,m]=(0,a.useState)(!1),[p,v]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),{updateStepData:y}=(0,f.hC)();return(0,a.useEffect)(()=>
1{if(!t||!n)return;let e=r.find(e=>{var n,l;return(null===(n=e.raynetProductData)||void 0===n?void 0:n.code)===(null==t?void 0:null===(l=t.item)||void 0===l?void 0:l.id)});e&&s(e)},[t,n,r]),(0,a.useEffect)(()=>{let e=async()=>{var e,t;c(await (0,q.d)((null==p?void 0:null===(t=p.raynetProductData)||void 0===t?void 0:null===(e=t.configurationInfo)||void 0===e?void 0:e.relatedProducts)||[])),m(!1)};p!==o&&e()},[p,o]),(0,a.useEffect)(()=>{if(u||!x||!p)return;let e=H(p,d);y({...t,item:e}),h(()=>!1),v(()=>null),i()},[x,u,d,p,t,y,i]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)($,{itemsInCategory:n,selectedItem:o,loadingError:!u&&0===r.length,onItemSelect:e=>{y&&t&&e&&(v(()=>e),h(()=>!0),m(()=>!0))}})})},K=n(37665),G=n(47785),W=e=>{let{systemId:t,selected:n=!1,className:i,image:a,title:o,items:s,table:d,button:c,link:m,activeAccordionGroup:v,onSelection:f,onClickAccordion:x}=e,h=e=>{x&&x(e)};return(0,l.jsxs)("div",{className:(0,r.m6)("bg-grey-200 w-full lg:max-w-[359px] box-border px-6 py-6 flex flex-col items-center justify-between",i),children:[(0,l.jsxs)("div",{className:"w-full block",children:[a&&(0,l.jsx)("div",{className:"w-full h-[200px] flex items-center justify-center relative mb-8 bg-white overflow-hidden",children:(0,l.jsx)(y.default,{src:a.url||"",alt:a.alt||"",width:200,height:200,className:"object-fit absolute left-[50%] top-[50%] translate-y-[-50%] translate-x-[-50%]"})}),(0,l.jsxs)("div",{className:"flex justify-between items-center w-full pb-[24px] gap-1",children:[o&&(0,l.jsx)("h4",{className:(0,r.m6)("text-primary-raisin max-w-[calc(100%-24px)]",a?"h4":"h3"),children:o}),(0,l.jsx)(w,{link:m})]}),d&&(0,l.jsx)(G.Z,{items:d,configuratorVariant:!0}),null==s?void 0:s.map((e,t)=>{var n;return(0,l.jsx)(K.Z,{iconGrey:!0,title:e.title,icon:"MdArrowDownward",iconLeft:!1,indexAccordion:t,activeAccordion:v,className:"w-full md:py-5 px-0 md:px-0 before:h-[1px] before:bg-secondary-french after:h-[1px] after:bg-secondary-french",onClickAccordion:()=>h(t===v?-1:t),children:(0,l.jsx)("div",{className:"flex flex-col items-start gap-1 ".concat(t===v?"self-stretch":"self-start"),children:null==e?void 0:null===(n=e.props)||void 0===n?void 0:n.map((t,n)=>(0,l.jsx)("div",{className:"flex gap-3 items-center",children:(0,l.jsx)(u.Z,{greyVariant:!0,label:t,id:"item-".concat(e,"-prop-").concat(n),checked:!0,readOnly:!0})},n))})},t)})]}),(0,l.jsx)(p.Button,{...c,size:"medium",variant:n?"secondary":"primary",onClick:()=>{t&&f&&f(t)},className:"w-full max-w-[200px] mt-8"})]})};n(61582);var Q=e=>{var t;let{className:n,systems:i,onSystemSelect:o}=e,[s,d]=(0,a.useState)(-1),c=e=>{d(e)};return(0,l.jsxs)("div",{className:(0,r.m6)("block relative  py-[2.5rem] lg:py-[3.5rem]",n),children:[(0,l.jsx)("div",{className:"headlineBlock",children:(0,l.jsx)("h4",{className:"h4 block relative w-full text-center text-primary-raisin mb-8 md:mb-10",children:"Vyberte typ dorozum\xedvac\xed techniky"})}),(0,l.jsx)("div",{className:"lg:flex hidden items-stretch justify-center gap-[0.5rem] ",children:null==i?void 0:i.map((e,t)=>(0,l.jsx)(W,{...e,activeAccordionGroup:s,onSelection:o,onClickAccordion:c},t))}),(0,l.jsx)("div",{className:"mobile block lg:hidden relative max-w-full py-[2.5rem]",children:(0,l.jsx)(C,{children:(null==(t=i||[])?void 0:t.map((e,t)=>(0,l.jsx)(N.o5,{children:(0,l.jsx)(W,{...e,activeAccordionGroup:s,onSelection:o,onClickAccordion:c})},t)))||[]})})]})},Y=n(54751),X=n(98834);let ee=async e=>{var t,n,l;let i=await X.L.fetch(Y.cs);if(!i)throw Error("Configurator system data not found");let a=i[e];return{systemId:e,category:"sběrnicov\xfd syst\xe9m",title:(null==a?void 0:a.title)||"Bez n\xe1zvu",link:{text:null==a?void 0:null===(t=a.link)||void 0===t?void 0:t.text,url:null==a?void 0:null===(n=a.link)||void 0===n?void 0:n.url,target:(null==a?void 0:null===(l=a.link)||void 0===l?void 0:l.blank)?"_blank":"_self"},table:(null==a?void 0:a.table)||[],items:(null==a?void 0:a.items)||[],button:{variant:"primary",size:"small",type:"button",link:{text:"Konfigurovat",url:"/"}}}};var et=e=>{let{stepData:t}=e,{updateStepData:n}=(0,f.hC)(),[i,r]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{r([await ee(z.Mv.Melody),await ee(z.Mv.DuoPlus),await ee(z.Mv.DuoStandard)])})()},[]),(0,l.jsx)(Q,{selectedSystem:(null==t?void 0:t.system)||null,systems:i,onSystemSelect:e=>{n&&n({...t,system:e})}})},en=e=>{let{state:t,stepData:n}=e,{updateStepData:i}=(0,f.hC)(),a=e=>n&&e?null==n?void 0:n.stepContent(e):null,r=e=>({inWall:"do zdi",onWall:"na zeď"})[e]||e,o=(e,t)=>{if(!i||!e.id||!n)return;let l={...e.input,value:t.target.value},a=n.formFieldsData.find(t=>
1t.id===e.id);a&&(a.input=l),i({...n,formFieldsData:a?n.formFieldsData:[...n.formFieldsData,l]})};return(0,l.jsxs)("div",{className:"py-[2.5rem] lg:py-[3.5rem] flex flex-col gap-8 w-full max-w-[646px] mx-auto",children:[(0,l.jsx)("h4",{className:"h4 text-primary-raisin text-center block",children:"Zkontrolujte svoji popt\xe1vku"}),(()=>{var e,n,i,a,o,s,d,c,u,m,p,v,f,x,h;let y=(null==t?void 0:t.steps.length)||0,g=[],b=null==t?void 0:null===(i=t.steps)||void 0===i?void 0:null===(n=i.find(e=>"info"===e.stepData.stepId))||void 0===n?void 0:null===(e=n.stepData)||void 0===e?void 0:e.attributes;for(let e=0;e<y;e++){let n=null==t?void 0:t.steps[e];switch(null==n?void 0:n.stepData.stepId){case"system":{let e=null==n?void 0:n.stepData,t=null==e?void 0:e.system;g.push({label:(0,l.jsx)("span",{className:"font-human font-normal leading-[160%] text-grey-800",children:"Syst\xe9m"}),description:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[140%] text-right",children:t?t[0].toLocaleUpperCase("cs-CZ")+t.slice(1):""})});break}case"housePhonePicker":{let e=(null==n?void 0:n.stepData).items,t=Object.keys(e).map(t=>{var n;return{name:(null===(n=e[t].customData)||void 0===n?void 0:n.title)||t,quantity:e[t].quantity}});g.push({label:(0,l.jsx)("span",{className:"font-human font-normal leading-[160%] text-grey-800 whitespace-nowrap lg:w-[20%]",children:"Domovn\xed telefon"}),description:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[140%] text-right max-w-[80%] flex flex-col gap-y-2",children:t.map((e,t)=>(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("div",{children:e.name}),(0,l.jsxs)("div",{className:"text-grey-800",children:["x",e.quantity]})]},t))})});break}case"entrySystem":{let e=(null==n?void 0:n.stepData).item,i=null==t?void 0:null===(a=t.compatibleProductList)||void 0===a?void 0:a.find(t=>{var n,l;return(null===(n=t.raynetProductData)||void 0===n?void 0:n.code)===(null==e?void 0:null===(l=e.attributes)||void 0===l?void 0:l.productCode)}),y=null==b?void 0:null===(d=b.entryPhonePanelCount)||void 0===d?void 0:null===(s=d.input)||void 0===s?void 0:null===(o=s.input)||void 0===o?void 0:o.value,j=null==b?void 0:null===(m=b.mountingType)||void 0===m?void 0:null===(u=m.input)||void 0===u?void 0:null===(c=u.input)||void 0===c?void 0:c.value;g.push({label:(0,l.jsx)("span",{className:"font-human font-normal leading-[160%] text-grey-800  whitespace-nowrap lg:w-[20%]",children:"Zvonkov\xe9 tablo"}),description:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[140%] text-right w-full max-w-[80%] flex flex-col gap-y-2",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("div",{children:(null==i?void 0:null===(p=i.raynetProductData)||void 0===p?void 0:p.name)||""}),(0,l.jsxs)("div",{className:"text-grey-800",children:["x",y]})]})})}),j&&g.push({label:(0,l.jsx)("span",{className:"font-human font-normal leading-[160%] text-grey-800",children:"Způsob mont\xe1že zvonkov\xe9ho tabla"}),description:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[140%] text-right max-w-[50%]",children:r(j)})}),(null==i?void 0:null===(f=i.raynetProductData)||void 0===f?void 0:null===(v=f.configurationInfo)||void 0===v?void 0:v.entrySecuritySystem)&&g.push({label:(0,l.jsx)("span",{className:"font-human font-normal leading-[160%] text-grey-800 ",children:"Typ př\xedstupov\xe9ho syst\xe9mu"}),description:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[140%] text-right",children:(null==i?void 0:null===(h=i.raynetProductData)||void 0===h?void 0:null===(x=h.configurationInfo)||void 0===x?void 0:x.entrySecuritySystem)||""})})}}}return(0,l.jsx)("div",{className:"flex flex-col w-full gap-4",children:(0,l.jsx)(G.Z,{items:g,summaryTable:!0})})})(),(0,l.jsx)("div",{className:"w-full",children:(()=>{var e,n;let i=[];if(t){let e=null===(n=t.steps.find(e=>"summary"===e.stepData.stepId))||void 0===n?void 0:n.stepData;i=(null==e?void 0:e.formFieldsData)||[]}else i=(null===(e=a(t))||void 0===e?void 0:e.items)||[];return(0,l.jsx)("div",{className:"flex flex-col gap-4",children:i.map(e=>(0,l.jsx)(m,{...e,className:"w-full",onValueChange:t=>o(e,t)},e.id))})})()})]})},el=n(54013),ei=n(97604),ea=n(84606),er=n(34422),eo=n(71669);let es=(e,t)=>{var n;return(null===(n=t[e])||void 0===n?void 0:n.placeholder)||"Placeholder"},ed=(e,t)=>{var n;return(null===(n=t[e])||void 0===n?void 0:n.errorMessage)||"Chyba"};var ec=e=>{let{fieldsContent:t,dataContent:n,isGuest:i,isDisabled:o=!1,className:d,setGuestData:c,onDataSave:u,lang:m}=e,[v,f]=(0,a.useState)(null),{userData:x}=(0,el.a)(),[h,y]=(0,a.useState)({personalData:!1}),[g,b]=(0,a.useState)({personalData:null}
1),j={personalData:{firstName:"",lastName:"",email:"",phone:""}};(0,a.useEffect)(()=>{null===v&&f(i?j:x)},[x,v,i]),(0,a.useEffect)(()=>{c&&c(v)},[v,c]);let w=e=>{y(t=>({...t,[e]:!t[e]}))},k=(e,t,n)=>{f(l=>l?(b(n=>({...n,[e]:{...n[e]||{},[t]:void 0}})),{...l,[e]:{...l[e],[t]:n}}):null)},N=async e=>{let n=(0,eo.gc)(t,eo.AN);try{if(!v)return;let t=v[e],l=n.fields[e];if(!l)return;await l.validate(t,{abortEarly:!1}),y(t=>({...t,[e]:!1})),b(t=>({...t,[e]:null})),await (null==u?void 0:u(v))}catch(t){if(t instanceof er.p8){let n={};for(let e of t.inner)e.path&&(n[e.path]=e.message);b(t=>({...t,[e]:n})),y(t=>({...t,[e]:!0}))}}},P=[((e,l)=>{let i=v?v[e]:{};return{name:l,button:{variant:"terciary",type:"button",link:{text:h[e]?null==n?void 0:n.saveLabel:null==n?void 0:n.editLabel,url:"#"},icon:h[e]?"MdSave":"MdEdit",label:h[e]?null==n?void 0:n.saveLabel:null==n?void 0:n.editLabel,onClick:()=>{h[e]?N(e):w(e)},iconRight:!0,sizeButton:"small",iconType:"square",darkMode:!0},inputBlocks:Object.keys(i).map(n=>{var l;let a=null==g?void 0:null===(l=g[e])||void 0===l?void 0:l[n];return{label:n.charAt(0).toUpperCase()+n.slice(1),placeholder:es(n,t)||"Placeholder",isDisabled:!1,value:i[n],isError:!!a,errorMessage:a||ed(n,t),onChange:t=>k(e,n,"object"==typeof t?t.target.value:t)}})}})("personalData",null==n?void 0:n.personalLabel)];if(!v&&!i){var C;return(0,l.jsx)("h3",{className:"h3",children:null===ea.k||void 0===ea.k?void 0:null===(C=ea.k.loadingHeading)||void 0===C?void 0:C[m||"cs"]})}return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.title)&&(0,l.jsx)("h3",{className:(0,r.m6)("h3 text-primary-raisin self-stretch hidden lg:block lg:mb-16"),children:n.title}),(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-col items-start gap-14 md:gap-16 w-full",d),children:[null==P?void 0:P.map((e,t)=>(0,l.jsxs)("div",{className:"flex flex-col items-center md:items-start gap-5 w-full",children:[(0,l.jsx)("div",{className:"flex items-start justify-between w-full border-b-[1px] border-secondary-french pb-5",children:(0,l.jsx)("h4",{className:"h4 text-primary-raisin",children:e.name})}),e.inputBlocks&&(0,l.jsx)("div",{className:"grid w-full grid-cols-1 md:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2 grid-flow-row gap-2 place-items-stretch",children:e.inputBlocks.map((e,t)=>(0,l.jsx)(s.I,{...e},t))})]},t)),(0,l.jsx)("div",{className:"w-[240px] self-center mb-[4rem]",children:(0,l.jsx)(p.Button,{onClick:()=>N("personalData"),disabled:o,variant:"primary",type:"button",className:"w-full",link:{text:"Vytvořit nab\xeddku",url:"#"}})})]})]})},eu=n(70212),em=n(73333),ep=n(63993),ev=n(53173),ef=n(52870),ex=n(40598),eh=e=>{var t,n,i,o,d,c;let{loginButton:m,registerButton:v,guestButton:f,className:x,email:h,password:y,errorMessages:g,forgotPassword:b,lang:j,setIsGuest:w}=e,[k,N]=(0,a.useState)(!1),[P,C]=(0,a.useState)(""),[D,S]=(0,a.useState)(!1),{refreshUser:I}=(0,el.a)(),E=()=>{N(e=>!e)},z=async e=>{let{email:t,password:n}=e;S(!0);try{let e=await (0,em.x)({email:t,password:n,errorMessages:g});if(!e.success){S(!1),C(e.error||"");return}I()}catch(e){S(!1),console.error("Login Failed:",e),C((null==g?void 0:g.userNotFound)||"")}};return(0,l.jsxs)("div",{className:(0,r.m6)(x," flex flex-col lg:flex-row  sm:py-0 lg:gap-[5rem] pb-[2.5rem]  w-screen md:w-full "),children:[(0,l.jsxs)("div",{className:" flex flex-col  items-center pb-[2rem]  w-full text-center h-auto px-[1.25rem]",children:[(0,l.jsx)("h4",{className:"h4 font-medium font-human mb-[0.5rem] text-start lg:text-center text-grey-1000",children:null===(t=ea.k.haveAccountLabel)||void 0===t?void 0:t[j||"cs"]}),(0,l.jsx)("p",{className:"p1 font-human text-start lg:text-center mb-[2rem] lg:mb-[2.5rem] text-grey-1000",children:null===(n=ea.k.loginToAccountLabel)||void 0===n?void 0:n[j||"cs"]}),(0,l.jsx)(ep.J9,{initialValues:{email:"",password:""},validationSchema:ex.Z,onSubmit:async e=>await z(e),style:{width:"100%"},children:e=>{var t;let{errors:n,touched:i,isValid:a}=e;return(0,l.jsxs)(ep.l0,{className:"w-full",children:[(0,l.jsx)(ep.gN,{name:"email",as:s.I,className:"w-full",placeholder:"".concat(null==h?void 0:h.placeholder),isError:n.email&&i.email||""!==P,errorMessage:n.email&&i.email?null==h?void 0:null===(t=h.errorMessages)||void 0===t?void 0:t.criteriaNotMet:""}),(0,l.jsx)(ep.gN,{name:"password",as:s.I,className:"my-[0.5rem] w-full",placeholder:"".concat(null==y?void 0:y.placeholder),typeIn
1put:k?"text":"password",isError:""!==P,errorMessage:P}),(0,l.jsxs)("div",{className:"flex justify-between items-center ",children:[(null==y?void 0:y.showPasswordLabel)&&(0,l.jsx)("div",{onClick:E,onKeyDown:E,children:(0,l.jsx)(u.Z,{label:"".concat(null==y?void 0:y.showPasswordLabel),checked:k,className:"mt-[0.5rem]",onChange:E})}),b&&(0,l.jsx)(ev.LocalizedLink,{href:(0,ef.T)("forgotPassword",j),className:"text-primary-spring underline underline-offset-2",children:b})]}),(0,l.jsx)(p.Button,{...m,type:"submit",size:"medium",disabled:D||!a,className:"mb-[1rem] lg:mb-[1.5rem] mt-[2rem] lg:mt-[2.5rem]"})]})}}),(0,l.jsx)("p",{className:"p3 font-human text-grey-1000 leading-[160%] w-[90%]",children:null===(i=ea.k.continueGDPRLabel)||void 0===i?void 0:i[j||"cs"]})]}),(0,l.jsxs)("div",{className:"py-[2.5rem] px-[1rem] lg:p-[2rem] bg-[#F7F7FB] h-full w-full lg:h-[65%] flex items-center flex-col ",children:[(0,l.jsx)("h4",{className:"h4 font-medium font-human mb-[0.5rem]",children:null===(o=ea.k.noAccountLabel)||void 0===o?void 0:o[j||"cs"]}),(0,l.jsx)("p",{className:"p1 font-human",children:null===(d=ea.k.loginIntoAccountLabel)||void 0===d?void 0:d[j||"cs"]}),(0,l.jsxs)("div",{className:"flex flex-col lg:w-full items-center justify-center",children:[(0,l.jsx)("div",{className:"min-w-[240px] ",children:(0,l.jsx)(ev.LocalizedLink,{href:(0,ef.T)("registration",j),className:"inline-block w-full mt-[2rem] mb-[.5rem]",children:(0,l.jsx)(eu.Z,{...v,size:"large",link:{url:(0,ef.T)("registration",j),text:null===(c=ea.k.registrationLabel)||void 0===c?void 0:c[j||"cs"]}})})}),(0,l.jsx)("div",{className:"min-w-[240px] flex items-center justify-center ",children:(0,l.jsx)(p.Button,{...f,type:"button",size:"large",onClick:()=>w(!0),className:"w-full"})})]})]})]})},ey=n(39687),eg=n(63968),eb=n(44442);n(83079);var ej=(0,n(12119).$)("3253603d4442996c5b8f456f698acc7cd45a8224"),ew=n(99376);let ek={firstName:{placeholder:"Jm\xe9no",errorMessage:"Zadajte jm\xe9no",isRequired:!0},lastName:{placeholder:"Př\xedjmen\xed",errorMessage:"Zadajte př\xedjmen\xed",isRequired:!0},email:{placeholder:"Email",errorMessage:"Zadajte email ve spr\xe1vn\xe9m form\xe1tu",isRequired:!0},phone:{placeholder:"Telefon",errorMessage:"Zadajte telefonn\xed č\xedslo ve spr\xe1vn\xe9m formátu",isRequired:!0}},eN={title:"Vaše \xfadaje",editLabel:"Upravit",saveLabel:"Uložit",personalLabel:"Osobn\xed \xfadaje",facturationLabel:"Fakturačn\xed \xfadaje",companyLabel:"N\xe1zev firmy",deliveryLabel:"Doručovac\xed \xfadaje"};var eP=e=>{let{state:t,stepData:n}=e,{userData:i}=(0,el.a)(),{resetConfigurator:r}=(0,f.hC)(),{setIsDirty:o}=(0,eg.P)(),s=(0,ew.useRouter)(),[d,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(void 0),[p,v]=(0,a.useState)(void 0),[x,h]=(0,a.useState)(!1),[y,g]=(0,a.useState)(null),b=e=>n&&e?null==n?void 0:n.stepContent(e):null,j=e=>{h(()=>e)},w=async e=>{var n,l,a,r,o,s,d,u,p,f,x,h,y,g,b,j,w;let k=e;i&&(k=i),c(!0);let N=null==t?void 0:t.orderedProductList.filter(e=>""!==e.stepId);if(!N){console.error("No products in configuration");return}let P=await (0,q.d)(N.map(e=>e.productId)),C=N.map(e=>({...P.find(t=>{var n;return(null===(n=t.raynetProductData)||void 0===n?void 0:n.code)===e.productId}),quantity:e.quantity})),D=null==t?void 0:null===(l=t.steps.find(e=>"system"===e.stepData.stepId))||void 0===l?void 0:null===(n=l.stepData)||void 0===n?void 0:n.system,S=null==t?void 0:null===(a=t.steps.find(e=>"accessories"===e.stepData.stepId))||void 0===a?void 0:a.stepData,I=(null==S?void 0:null===(s=S.attributes.referExternalCamera)||void 0===s?void 0:null===(o=s.input)||void 0===o?void 0:null===(r=o.input)||void 0===r?void 0:r.checked)||!1,E=null==S?void 0:null===(p=S.attributes.lockType)||void 0===p?void 0:null===(u=p.input)||void 0===u?void 0:null===(d=u.input)||void 0===d?void 0:d.value,z=null==S?void 0:null===(h=S.attributes.locksCount)||void 0===h?void 0:null===(x=h.input)||void 0===x?void 0:null===(f=x.input)||void 0===f?void 0:f.value,T=null==t?void 0:null===(y=t.steps.find(e=>"summary"===e.stepData.stepId))||void 0===y?void 0:y.stepData,_=null==T?void 0:null===(j=T.formFieldsData)||void 0===j?void 0:null===(b=j.find(e=>"orderNote"===e.id))||void 0===b?void 0:null===(g=b.input)||void 0===g?void 0:g.value;if(!D){console.error("Invalid configurator data");return}let L={userData:k,productsData:C,configuratorData:{system:D,recommendExternalCamera:I,lockType:E,lockCount:z,userNote:_}},A=await ej(L);if(!A.success){console.error("Error sending offer: ",A),m("error");return}let B=null==A?void 0:null===(w=A.data)||void 0===w?void 0:w.offerId;if(!B){console.error("No offerId"),m("error");return}m("success"),v(await (0,eb.I)(B)),c(!1)};return(()=>{var e;let n=ei.SQ.czech;if(!x&&!i)return(0,l.jsx)(eh,{className:"w-full",...null===(e=b(t))||void 0===e?void 0:e.loginData,setIsGuest:j,lang:n});if(u&&"success"===u){let e=new URL(window.location.href);return e.searchParams.set("page","thankyou"),s.replace(e.pathname+e.search),(0,l.jsx)("div",{className:"w-full flex flex-col items-center",children:(0,l.jsx)(ey.Z,{title:"M\xe1te hotovo!",content:(0,l.jsx)(l.Fragment,{children:"Na z\xe1kladě vaš\xed konfigurace jsme pro v\xe1s vytvořili nab\xeddku na m\xedru. Prohl\xe9dněte si syst\xe9m a upravte ho podle sv\xe9ho nebo nab\xeddku rovnou vložte do koš\xedku. Zaj\xedm\xe1 v\xe1s o syst\xe9mu Melody v\xedc? Všechny podstatn\xe9 informace naleznete\xa0zde."}),actions:[{type:"link",variant:"primary",size:"medium",className:"w-[240px]",link:{text:"Zobrazit nab\xeddku",url:p?"/ucet/nabidky/".concat(p):"#"}},{type:"button",variant:"secondary",size:"medium",className:"w-[240px]",link:{text:"Nov\xe1 konfigurace",url:"/konfigurator"},onClick:()=>{r(),o(!1)}}]})})}return(0,l.jsx)(ec,{fieldsContent:ek,lang:n,isGuest:x,setGuestData:e=>{g(e)},onDataSave:w,dataContent:eN,isDisabled:d})})()},eC=e=>{let{itemId:t,selected:n=!1,className:i,image:o,disabled:s,title:d,itemUrl:c,attributes:u,otherItemAttributes:m,table:v,tableDescription:f,button:x,onSelection:h,onAttributeChange:g}=e,b=(t,n,l)=>{g&&g({...e},t,n,l)};return(0,l.jsxs)("div",{className:(0,r.m6)("bg-grey-200 w-full lg:h-auto h-full lg:max-w-[322px] lg:min-w-[322px] box-border px-6 py-8 flex flex-col items-center justify-start ",i),children:[(0,l.jsx)("div",{className:"w-full h-[200px] min-h-[200px] flex items-center justify-center relative mb-8 bg-white overflow-hidden",children:(null==o?void 0:o.url)&&(0,l.jsx)(y.default,{src:o.url,alt:o.alt||"",width:200,height:200,className:"object-contain max-h-full"})}),(0,l.jsxs)("div",{className:"flex justify-between items-center w-full pb-[26px]",children:[d&&(0,l.jsx)("h4",{className:(0,r.m6)("h4 text-primary-raisin min-h-[94px]",c&&"max-w-[calc(100%-44px)]"),children:d}),(0,l.jsx)(w,{link:{url:c,target:"_blank"}})]}),(0,l.jsxs)("div",{className:"w-full pb-5 mb-5 border-b-[1px] border-b-secondary-french",children:[null==v?void 0:v.data.map((e,t)=>(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-row justify-between w-full",!f&&"mb-[0.5rem]"),children:["object"==typeof e.label?e.label:(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:e.label}),"object"==typeof e.value?e.value:(0,l.jsx)("span",{className:"p2 font-human text-primary-raisin leading-[160%]",children:e.value})]},t)),f&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)("div",{className:(0,r.m6)("flex flex-row justify-end w-full mb-[0.5rem] "),children:"object"==typeof f?f:(0,l.jsx)("span",{className:"p4 text-grey-800",children:f})})})]}),(0,l.jsx)("div",{className:"flex flex-col gap-y-5 w-full h-full ".concat(s?"opacity-50":""),children:null==u?void 0:u.map((e,t)=>(0,l.jsx)(a.Fragment,{children:(0,l.jsx)("div",{className:"flex w-full flex-col gap-y-2 items-center",children:(0,l.jsx)(L,{...e,className:"w-full",onValueChange:t=>b("attributes",e.id,t)})})},"attr-".concat(t)))}),m&&(0,l.jsx)("div",{className:"flex flex-col gap-y-5 w-full h-full pt-5",children:null==m?void 0:m.map((e,t)=>(0,l.jsxs)(a.Fragment,{children:[(0,l.jsx)("div",{className:"h-px bg-secondary-french"}),(0,l.jsx)("div",{className:"flex w-full flex-col gap-y-2 items-center",children:(0,l.jsx)(L,{...e,disabled:!n,className:"w-full",onValueChange:t=>b("otherItemAttributes",e.id,t)})})]},"attr-".concat(t)))}),(0,l.jsx)(p.Button,{...x,variant:n?"secondary":"primary",onClick:()=>{t&&h&&h({...e})},className:"w-full max-w-[200px] mt-8"})]})},eD=e=>{let{className:t,items:n,onItemSelect:i,selectedItem:a,onItemDataChange:o}=e,s=e=>(null==a?void 0:a.itemId)===(null==e?void 0:e.itemId),d=e=>(e&&[void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(N.o5,{children:(0,l.jsx)(F.Z,{configurator:!0})},t)),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(F.Z,{configurator:!0}),(0,l.jsx)(F.Z,{configurator:!0}),(0,l.jsx)(F.Z,{configurator:!0})]})),c=e=>n&&0!==n.length?e?(0,l.jsxs)(C,{swiperOptions:{autoHeight:!1},children:[(null==n?void 0:n.length)===0&&(0,l.jsx)("div",{className:"text-center p1",children:"Nenalezeny ž\xe1dn\xe9 položky"}),null==n?void 0:n.map((e,t)=>{let n=s(e);return(0,l.jsx)(N.o5,{className:"!h-auto",children:(0,l.jsx)(eC,{...e,selected:!!n,onSelection:i,onAttributeChange:o,className:(0,r.m6)("border-2 transition-colors ease-in-out duration-300",s(e)?"border-primary-spring":"border-transparent")})},t)})]}):null==n?void 0:n.map((e,t)=>{let n=s(e);return(0,l.jsx)(eC,{...e,selected:!!n,onSelection:i,onAttributeChange:o,className:(0,r.m6)("border-2 transition-colors ease-in-out duration-300",s(e)?"border-primary-spring":"border-transparent")},t)}):d(e);return(0,l.jsxs)("div",{className:(0,r.m6)("block relative py-[2.5rem] lg:py-[3.5rem]",t),children:[(0,l.jsx)("div",{className:"headlineBlock",children:(0,l.jsx)("h4",{className:"h4 block relative w-full text-center text-primary-raisin mb-8 md:mb-10",children:"Vyberte typ př\xedstupov\xe9ho syst\xe9mu"})}),(0,l.jsx)("div",{className:"hidden lg:flex items-stretch justify-center gap-[0.5rem] relative",children:c(!1)}),(0,l.jsx)("div",{className:"block lg:hidden relative w-full",children:c(!0)})]})},eS=n(72278),eI=e=>{let{state:t,stepData:n}=e,{updateStepData:i}=(0,f.hC)(),{scrollToBottom:a}=I(),r=e=>n&&e?n.stepContent(e):null,o=e=>{var t;return e.itemId||(null===(t=e.hiddenData)||void 0===t?void 0:t.productC
1ode)},s=()=>t&&(null==n?void 0:n.item)&&(null==n?void 0:n.item.id)&&n.stepContent(t).find(e=>{var t;return o(e)===(null===(t=n.item)||void 0===t?void 0:t.id)})||null,d=async e=>await (0,q.d)(e),c=async e=>{var l,r,s,c,u,m,p,v,f,x,h,y,g;if(!i||!n||!e)return;let b={};if(e.attributes)for(let t of e.attributes)if((null===(u=t.input)||void 0===u?void 0:u.type)==="radio"){let e=null!==(p=t.input.content.value)&&void 0!==p?p:null;if(b[t.id]=e,"controlUnitPlacment"===t.id){let n=null!==(x=null===(f=t.input.content.options)||void 0===f?void 0:null===(v=f.find(t=>t.value===e))||void 0===v?void 0:v.productCode)&&void 0!==x?x:null;b.productCode=n,b.controlUnit=e}}else(null===(m=t.input)||void 0===m?void 0:m.type)==="input"&&(b[t.id]=null!==(h=t.input.content.value)&&void 0!==h?h:null);b.productCode||(b.productCode=null!==(g=null===(y=e.hiddenData)||void 0===y?void 0:y.productCode)&&void 0!==g?g:null);let j=null==t?void 0:null===(l=t.compatibleProductList)||void 0===l?void 0:l.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)===b.productCode}),w=await d((null==j?void 0:null===(s=j.raynetProductData)||void 0===s?void 0:null===(r=s.configurationInfo)||void 0===r?void 0:r.relatedProducts)||[]);i({...n,item:{...n.item,id:o(e),attributes:{...b,relatedProducts:w}},otherItemsAttributes:null===(c=e.otherItemAttributes)||void 0===c?void 0:c.reduce((e,t)=>{var n,l,i;return(null===(n=t.input)||void 0===n?void 0:n.content.value)===void 0||(null===(l=t.input)||void 0===l?void 0:l.content.value)===0||(e[t.id]=null===(i=t.input)||void 0===i?void 0:i.content.value),e},{})}),a()},u=async(e,l,a)=>{var r,s,c,u,m,p;if(!i||!n||!l)return;let v={},f=e.attributes;if(!f)return;f.map(e=>{if(e.id===l){var t,n,i,r;v[l]=a;let o=null!==(r=null===(i=e.input)||void 0===i?void 0:null===(n=i.content.options)||void 0===n?void 0:null===(t=n.find(e=>e.value===a))||void 0===t?void 0:t.productCode)&&void 0!==r?r:null;"controlUnitPlacment"===l?(v.productCode=o,v.controlUnit=a):v.productCode=o}});let x=null==t?void 0:null===(r=t.compatibleProductList)||void 0===r?void 0:r.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)===(null==v?void 0:v.productCode)}),h=await d((null==x?void 0:null===(c=x.raynetProductData)||void 0===c?void 0:null===(s=c.configurationInfo)||void 0===s?void 0:s.relatedProducts)||[]),y=null===(u=e.hiddenData)||void 0===u?void 0:u.entrySystem,g=y?(0,eS.f)(y):null,b=null==g?void 0:null===(m=g.externalReaderCode)||void 0===m?void 0:m.join(";"),j={};"PS2"!==a&&(j={...null==n?void 0:n.otherItemsAttributes,...b?{[b]:1}:{}}),i({...n,item:{...n.item,id:o(e),attributes:{...null===(p=n.item)||void 0===p?void 0:p.attributes,...v,relatedProducts:h}},otherItemsAttributes:j})},m=(e,t,l)=>{var a;i&&n&&t&&((null===(a=n.item)||void 0===a?void 0:a.id)!==o(e)||i({...n,otherItemsAttributes:{...null==n?void 0:n.otherItemsAttributes,[t]:l}}))};return(0,l.jsx)(eD,{selectedItem:s(),onItemSelect:c,onItemDataChange:(e,t,n,l)=>{switch(t){case"attributes":u(e,n,l);break;case"otherItemAttributes":m(e,n,l)}},items:(()=>{if(!t||!n)return[];let e=r(t),i=null==e?void 0:e.map(e=>({...e,selected:!1}));if(!(null==n?void 0:n.item))return i;let a=s();if(!a)return i;let o=a.attributes,d=n.otherItemsAttributes;return o&&d?null==i?void 0:i.map(e=>{var i,r,o,s,d,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N,P,C,D,S;let I=e.itemId===a.itemId,z=null===(i=e.attributes)||void 0===i?void 0:i.map(e=>{var t,l,i;let a=null===(l=n.item)||void 0===l?void 0:null===(t=l.attributes)||void 0===t?void 0:t[e.id];if(void 0===a)return e;if((null===(i=e.input)||void 0===i?void 0:i.type)==="input"){let t=e.input.content;return{...e,input:{...e.input,content:{...t,value:a}}}}return e}),T=null===(r=e.otherItemAttributes)||void 0===r?void 0:r.map(e=>{var t,l;let i=null===(t=n.otherItemsAttributes)||void 0===t?void 0:t[e.id];if(void 0===i)return e;if((null===(l=e.input)||void 0===l?void 0:l.type)==="input"){let t=e.input.content;return{...e,input:{...e.input,content:{...t,value:I?i:0}}}}return e}),_=null===(o=e.image)||void 0===o?void 0:o.url,L=null===(c=e.table)||void 0===c?void 0:null===(d=c.data)||void 0===d?void 0:null===(s=d[0])||void 0===s?void 0:s.value,A=null===(u=e.hiddenData)||void 0===u?void 0:u.hiddenPrice,B=e.itemUrl,R=(null==n?void 0:null===(m=n.item)||void 0===m?void 0:m.id)?JSON.parse(n.item.id).code:void 0,M=null===(p=e.hiddenData)||void 0===p?void 0:p.hiddenTitle;if("PS2"!==(null==e?void 0:null===(x=e.attributes)||void 0===x?void 0:null===(f=x.find(e=>"controlUnit"===e.id))||void 0===f?void 0:null===(v=f.input)||void 0===v?void 0:v.content.value)){let e=(0,E.LQ)(t,"entryPhonePanel"),n=null==e?void 0:null===(g=e.item)||void 0===g?void 0:g.id,i=null==t?void 0:null===(b=t.compatibleProductList)||void 0===b?void 0:b.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)===n});if(null==i?void 0:null===(j=i.productImages)||void 0===j?void 0:j.length){let e=null===(C=(0,O.iQ)(null==i?void 0:null===(D=i.productImages[0])||void 0===D?void 0:D.image))||void 0===C?void 0:C.url();e&&(_=e)}(null==i?void 0:null===(w=i.raynetProductData)||void 0===w?void 0:w.price)&&(L=(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",maximumFractionDigits:2,minimumFractionDigits:0}).format((null==i?void 0:null===(S=i.raynetProductData)||void 0===S?void 0:S.price)||0)," / ks")})),(null==i?void 0:i.generatedSlug)&&(B="/produkty/zvonkova-tabla/".concat(null==i?void 0:i.generatedSlug)),M=null==i?void 0:null===(k=i.raynetProductData)||void 0===k?void 0:k.name,R=null==i?void 0:null===(N=i.raynetProductData)||void 0===N?void 0:N.co
1de,A=null==i?void 0:null===(P=i.raynetProductData)||void 0===P?void 0:P.price}return{...e,itemUrl:B,image:{...e.image,url:_},table:{...e.table,data:[{...null===(y=e.table)||void 0===y?void 0:null===(h=y.data)||void 0===h?void 0:h[0],value:L}]},hiddenData:{...e.hiddenData,productCode:R,hiddenPrice:A,hiddenTitle:M},attributes:z,otherItemAttributes:T}}):i})()})},eE=e=>{let{state:t,step:n}=e;switch(null==n?void 0:n.stepType){case"content":{let e=n.stepData;return(0,l.jsx)("div",{className:"flex flex-col items-center w-full justify-center",children:e.content})}case"system":{let e=n.stepData;return(0,l.jsx)(et,{stepData:e})}case"attributes":{let e=n.stepData;return(0,l.jsx)(h,{state:t,stepData:e})}case"multiselect":{let e=n.stepData;return(0,l.jsx)(_,{state:t,stepData:e})}case"select-panel":{let e=n.stepData,i=e.stepContent(t);return(0,l.jsx)(J,{state:t,stepData:e,items:i})}case"select-entry-system":{let e=n.stepData;return(0,l.jsx)(eI,{state:t,stepData:e})}case"summary":{let e=n.stepData;return(0,l.jsx)(en,{state:t,stepData:e})}case"login":{let e=n.stepData;return(0,l.jsx)(eP,{state:t,stepData:e})}}},ez=e=>{let{hidden:t=!1}=e,[n,i]=(0,a.useState)(!1),{state:o,previousStep:s,nextStep:d,canProceed:c,getPreviousStep:u,getNextStep:m,getFooterText:v,validateConfigurator:x,getActiveStep:h,resetConfigurator:y}=(0,f.hC)(),{setIsDirty:g}=(0,eg.P)(),{scrollToTop:b}=I(),j=(e,t)=>{t()&&e()},w=()=>{s(),b()},k=()=>{!m()&&(null==o?void 0:o.initData)?N():j(d,c),b()},N=async()=>{if(n)return;i(!0);let e=null==o?void 0:o.orderedProductList.filter(e=>""!==e.stepId);if(!e){console.error("No products in configuration");return}try{var t,l,a,r,s,d,c,u,m,p,v,f,x,h,b,j,w,k,N;let n=await (0,q.d)(e.map(e=>e.productId)),i=e.map(e=>({...n.find(t=>{var n;return(null===(n=t.raynetProductData)||void 0===n?void 0:n.code)===e.productId}),quantity:e.quantity})),P=null==o?void 0:null===(l=o.steps.find(e=>"system"===e.stepData.stepId))||void 0===l?void 0:null===(t=l.stepData)||void 0===t?void 0:t.system,C=null==o?void 0:null===(a=o.steps.find(e=>"accessories"===e.stepData.stepId))||void 0===a?void 0:a.stepData,D=(null==C?void 0:null===(d=C.attributes.referExternalCamera)||void 0===d?void 0:null===(s=d.input)||void 0===s?void 0:null===(r=s.input)||void 0===r?void 0:r.checked)||!1,S=null==C?void 0:null===(m=C.attributes.lockType)||void 0===m?void 0:null===(u=m.input)||void 0===u?void 0:null===(c=u.input)||void 0===c?void 0:c.value,I=null==C?void 0:null===(f=C.attributes.locksCount)||void 0===f?void 0:null===(v=f.input)||void 0===v?void 0:null===(p=v.input)||void 0===p?void 0:p.value,E=null==o?void 0:null===(x=o.steps.find(e=>"summary"===e.stepData.stepId))||void 0===x?void 0:x.stepData,z=null==E?void 0:null===(j=E.formFieldsData)||void 0===j?void 0:null===(b=j.find(e=>"orderNote"===e.id))||void 0===b?void 0:null===(h=b.input)||void 0===h?void 0:h.value;if(!P){console.error("Invalid configurator data");return}let T={raynetUserData:{id:(null==o?void 0:null===(w=o.initData)||void 0===w?void 0:w.userId)||""},productsData:i,configuratorData:{system:P,recommendExternalCamera:D,lockType:S,lockCount:I,userNote:z},userLoggedIn:null==o?void 0:o.userLoggedIn,offerId:(null==o?void 0:null===(k=o.initData)||void 0===k?void 0:k.offerId)||void 0},_=(null==o?void 0:null===(N=o.initData)||void 0===N?void 0:N.offerId)?"/api/offers/raynetConfig":"/api/offers/createOffer";await fetch(_,{method:"POST",body:JSON.stringify(T)}).then(async e=>{if(!e.ok){console.error("Error sending offer: ",e);return}let t=await e.json();console.log("success"),console.log(t.offerId)}).catch(e=>{console.error("Error sending offer: ",e)}).finally(()=>{var e;y(),g(!1),(null==o?void 0:null===(e=o.initData)||void 0===e?void 0:e.offerId)&&window.close()})}catch(e){console.error("Catched error while sending offer: ",e)}finally{i(!1)}},P=e=>{var t,i,a;switch(e){case"prev":if(!u())return null;return(0,l.jsx)(p.Button,{variant:"secondary",type:"button",link:{text:"Předchoz\xed krok",url:"/"},className:"w-full",onClick:w});case"next":{let e=(null==o||null===(t=o.initData)||void 0===t||!t.offerId)&&(null==o?void 0:o.initData);if(!m()&&e)return null;return(0,l.jsx)(p.Button,{variant:"primary",type:"button",link:{text:m()?"Dalš\xed krok":(null==o?void 0:o.initData)&&"Vytvořit nab\xeddku",url:"/"},disabled:n,className:(0,r.m6)("w-full",c()?"opacity-100 cursor-pointer transition-all duration-300 ease-in-out":"opacity-60 cursor-not-allowed"),onClick:k})}case"createOffer":if(!x()||(null===(a=h())||void 0===a?void 0:null===(i=a.stepData)||void 0===i?void 0:i.stepId
1)!=="accessories")return null;return(0,l.jsx)(p.Button,{variant:"primary",type:"button",link:{text:"Vytvořit nab\xeddku",url:"/"},className:"w-full",onClick:()=>console.log("create offer")})}};return(0,l.jsx)("div",{className:(0,r.m6)("flex flex-wrap sm:flex-nowrap justify-between gap-2 xs:gap-2 items-center w-full py-4 sm:py-0 px-5 md:px-8 h-auto sm:h-20 border-t border-primary-raisin","transition-all duration-300",t?"pointer-events-none opacity-0":"pointer-events-auto opacity-100"),children:(()=>{let e=v();return"object"==typeof e?e:(0,l.jsxs)(l.Fragment,{children:[e&&(0,l.jsx)("div",{className:"h6 text-primary-raisin md:hidden block w-full text-center",children:e}),(0,l.jsx)("div",{className:"w-[135px] xs:w-[48%] md:w-[200px]",children:P("prev")}),e&&(0,l.jsx)("div",{className:"h6 text-primary-raisin md:block hidden",children:e}),(0,l.jsx)("div",{className:"w-[135px] xs:w-[48%] md:w-[200px]",children:P("next")})]})})()})},eT=()=>{var e;let{state:t,getActiveStep:n}=(0,f.hC)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("main",{className:(0,r.m6)("relative justify-center block lg:flex min-h-[calc(100vh-191px)]  lg:min-h-[calc(100vh-226px)] flex items-center"),children:(0,l.jsx)(i.Z,{children:(0,l.jsx)(eE,{state:t,step:n()})})}),(0,l.jsx)(ez,{...null===(e=n())||void 0===e?void 0:e.configuratorFooter})]})}},8213:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});var l=n(26705),i=n(20955),a=n(99376),r=()=>((0,i.useEffect)(()=>{window.close()},[]),null),o=()=>{let e=(0,a.useSearchParams)(),t=null==e?void 0:e.get("offerId"),[n,o]=(0,i.useState)("idle"),[s,d]=(0,i.useState)(""),[c,u]=(0,i.useState)(!1);(0,i.useEffect)(()=>{t||(window.location.href="/404")},[t]);let m=async e=>{if(t){o("loading");try{let n=await fetch("".concat("https://www.czechphone.cz","/api/raynet/hooks/sendOfferEmail"),{method:"POST",body:JSON.stringify({entityId:t,emailType:e})});if(n.ok){let e=await n.json();o("success"),d(e.message||"Email byl \xfaspěšně odesl\xe1n"),u(!0)}else{let e=await n.json();o("error"),d(e.message||"Nastala chyba při odes\xedl\xe1n\xed emailu")}}catch(e){o("error"),d("Nastala chyba při odes\xedl\xe1n\xed emailu")}}};return(0,l.jsxs)("div",{className:"w-screen h-screen flex flex-col items-center justify-center gap-6 bg-white p-4",children:["idle"===n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold text-gray-800 mb-2",children:"Vyberte typ emailu k odesl\xe1n\xed"}),(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4",children:[(0,l.jsx)("button",{type:"button",onClick:()=>m("create"),className:"px-6 py-3 bg-blue-600 text-white rounded-md shadow-md hover:bg-blue-700 transition-colors",children:"Poslat novou nab\xeddku"}),(0,l.jsx)("button",{type:"button",onClick:()=>m("reminder"),className:"px-6 py-3 bg-green-600 text-white rounded-md shadow-md hover:bg-green-700 transition-colors",children:"Poslat připomenut\xed nab\xeddky"})]})]}),"loading"===n&&(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsx)("h1",{className:"text-xl font-semibold text-gray-800",children:"Email se pos\xedl\xe1..."}),(0,l.jsx)("div",{className:"mt-4 w-12 h-12 border-t-4 border-blue-500 border-solid rounded-full animate-spin"})]}),"success"===n&&(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold text-green-600",children:s}),(0,l.jsx)("p",{className:"text-gray-600 mt-2",children:"Okno se automaticky zavře za 3 sekundy..."}),c&&(0,l.jsx)(r,{}),(0,l.jsx)("button",{type:"button",onClick:()=>o("idle"),className:"mt-4 px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300 transition-colors",children:"Zpět"})]}),"error"===n&&(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold text-red-600",children:s}),(0,l.jsx)("button",{type:"button",onClick:()=>o("idle"),className:"mt-4 px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300 transition-colors",children:"Zkusit znovu"})]})]})}},17943:function(e,t,n){"use strict";var l=n(26705),i=n(50524),a=n(20955),r=n(63993),o=n(52151),s=n(99376),d=n(67831),c=n(97604),u=n(79923);t.default=e=>{let{title:t,buttonLabel:n,passwordDoesntMatchCriteriaError:m,password:p,lang:v}=e,[f,x]=(0,a.useState)(""),[h,y]=(0,a.useState)(!1),[g,b]=(0,a.useState)(""),j=(0,s.use
1SearchParams)(),w=(0,s.useRouter)(),k=j.get("token"),N=j.get("email"),P=async e=>{let{password:t}=e;y(!0);let{success:n,error:l}=await (0,u.c)(t,k,N);if(!n){x(l||"An error occurred"),y(!1);return}w.push((0,c.q2)("login",v))};return k&&N?(0,l.jsxs)("div",{className:"w-full flex flex-col items-center justify-start lg:px-[6rem] xl:px-[12.5rem] mb-0 sm:mb-[3.5rem] lg:mb-0   px-[1.25rem] pt-[1.5rem] sm:pt-[0rem] pb-[4rem] sm:pb-[0]",children:[t&&(0,l.jsx)("h3",{className:"h3 mt-[2.5rem] mb-8",children:t}),(0,l.jsx)(r.J9,{initialValues:{password:""},validationSchema:o.Z,onSubmit:e=>P(e),children:e=>{let{errors:t,touched:a,values:o,isValid:s}=e;return o.password!==g&&(b(o.password),f&&x("")),t.password&&a.password&&x(m||"Password doesn't match criteria"),(0,l.jsxs)(r.l0,{className:"md:w-auto w-full",children:[(0,l.jsx)(d.Z,{name:"password",password:p,value:o.password,isValid:s,passwordCriteria:null==p?void 0:p.passwordCriteria,isError:f,errorMessage:f,language:v,className:"md:min-w-[400px]"}),(0,l.jsx)(i.Button,{variant:"primary",size:"medium",link:{url:"/",text:"".concat(n)},className:"mt-[4rem] mb-[1rem] sm:mt-[2.5rem] sm:mb-[1.5rem] w-full max-w-[240px]",type:"submit",disabled:h})]})}})]}):(0,s.notFound)()}},28590:function(e,t,n){"use strict";var l=n(26705),i=n(53335),a=n(99376),r=n(54013),o=n(97604),s=n(27648);t.default=e=>{let{title:t,description:n,questionText:d,questionButtonLabel:c,className:u}=e,m=(0,a.useSearchParams)().get("email"),{authData:p}=(0,r.a)();return(0,l.jsxs)("div",{className:(0,i.m6)(u,"flex flex-col items-center justify-center h-auto lg:h-screen py-[4rem]  w-full px-[1.25rem] md:px-[4.5rem]  xl:px-[12.5rem] relative "),children:[t&&(0,l.jsx)("h3",{className:"h3 text-center mt-[5.875rem] mb-[0.5rem] ",children:t}),n&&(0,l.jsxs)("p",{className:"p1 text-grey-1000  mb-[0rem] md:mb-[2rem] mt-[0.5rem]",children:[n," ",(0,l.jsx)("strong",{children:m||(null==p?void 0:p.email)})]}),(0,l.jsxs)("div",{className:"p1 text-grey-1000 flex flex-col md:flex-row lg:absolute mt-[2.5rem]  lg:bottom-[2.5rem] lg:left-1/2 lg:-translate-x-1/2 gap-[3px]  cursor-pointer",children:[d," ",c&&(0,l.jsx)(s.default,{href:(0,o.q2)("registration","cs"),className:"text-primary-spring underline",children:c})]})]})}},63856:function(e,t,n){"use strict";var l=n(26705),i=n(50524),a=n(55711),r=n(52153),o=n(20955),s=n(63993),d=n(38282),c=n(79923);t.default=e=>{let{forgotPassword:t,emailSend:n}=e,{t:u}=(0,r.$)(),[m,p]=(0,o.useState)(""),[v,f]=(0,o.useState)(!1),[x,h]=(0,o.useState)(!1),[y,g]=(0,o.useState)(""),[b,j]=(0,o.useState)(!1),w=async e=>{let{email:t}=e;f(!0),(await (0,c.f)(t)).success?(p(t),h(!0)):g(u("ui","authForgotPasswordNotFound")),f(!1)};return x?(0,l.jsxs)("div",{className:"w-full flex flex-col items-center justify-start lg:px-[6rem] xl:px-[12.5rem] mb-0 sm:mb-[3.5rem] lg:mb-0  px-[1.25rem] pt-[1.5rem] sm:pt-[0rem] pb-[4rem] sm:pb-[0]",children:[n.title&&(0,l.jsx)("h3",{className:"h3 mt-[2.5rem] mb-2",children:t.title}),n.description&&(0,l.jsxs)("p",{className:"p1 mb-[2rem] sm:mb-[2.5rem] text-secondary-dark",children:[n.description," ",(0,l.jsx)("strong",{children:m})]})]}):(0,l.jsxs)("div",{className:"w-full flex flex-col items-center justify-start lg:px-[6rem] xl:px-[12.5rem] mb-0 sm:mb-[3.5rem] lg:mb-0   px-[1.25rem] pt-[1.5rem] sm:pt-[0rem] pb-[4rem] sm:pb-[0]",children:[t.title&&(0,l.jsx)("h3",{className:"h3 mt-[2.5rem] mb-2",children:t.title}),t.description&&(0,l.jsx)("p",{className:"p1 mb-[2rem] sm:mb-[2.5rem] text-secondary-dark",children:t.description}),(0,l.jsx)(s.J9,{initialValues:{email:""},validationSchema:d.Z,onSubmit:e=>w(e),children:e=>{let{errors:n,setFieldValue:r,handleSubmit:o}=e;return(0,l.jsxs)(s.l0,{className:"md:w-auto w-full",onSubmit:e=>{j(!0),o(e)},children:[(0,l.jsx)(s.gN,{name:"email",as:a.I,className:"w-full lg:min-w-[400px]",placeholder:"".concat(t.inputPlaceholder),isError:!!(b&&n.email||""!==y),errorMessage:y||b&&n.email||"",onChange:e=>{g(""),r("email",e.target.value)}}),(0,l.jsx)(i.Button,{variant:"primary",size:"medium",link:{url:"/",text:"".concat(t.buttonLabel)},className:"mt-[2rem] mb-[1rem] sm:mt-[2.5rem] sm:mb-[1.5rem] w-full max-w-[240px]",type:"submit",disabled:v})]})}})]})}},13709:function(e,t,n){"use strict";var l=n(26705),i=n(50524),a=n(55711),r=n(53173),o=n(33145),s=n(20955),d=n(63993),c=n(40598),u=n(97604),m=n(67831),p=n(54013),v=n(73333),f=n(2664),x=n(7336);t.default=e=>{let{lang:t,title:n,subtitle:h,button:y,gdpr:g,email:b,password:j,forgotPassword:w,question:k,questionButtonLabel:N,errorMessages:P}
1=e,[C,D]=(0,s.useState)(""),[S,I]=(0,s.useState)(!1),{refreshUser:E}=(0,p.a)(),z=(0,f.y)(),T=async e=>{let{email:t,password:n}=e;I(!0);let l=await (0,v.x)({email:t,password:n,errorMessages:P});if(!l.success){I(!1),D(l.error||"");return}E(),z.push("/")};return(0,l.jsxs)(x.E.div,{className:"w-full flex flex-col items-center justify-start lg:px-[6rem] xl:px-[12.5rem] mb-0 sm:mb-[3.5rem] lg:mb-0 px-[1.25rem] pt-[1.5rem] sm:pt-[0rem] pb-[4rem] sm:pb-[0]",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[" ",(0,l.jsx)(r.LocalizedLink,{href:"/",children:(0,l.jsx)(o.default,{src:"/icons/logo.svg",alt:"Czechphone logo",width:75,height:75})}),n&&(0,l.jsx)("h3",{className:"h3 mt-[2.5rem] mb-2",children:n}),h&&(0,l.jsx)("p",{className:"p1 mb-[2rem] sm:mb-[2.5rem] text-secondary-dark",children:h}),(0,l.jsx)(d.J9,{initialValues:{email:"",password:""},validationSchema:c.Z,onSubmit:e=>T(e),children:e=>{let{errors:n,touched:r,values:o,isValid:s}=e;return(0,l.jsxs)(d.l0,{className:"md:w-auto w-full",children:[(0,l.jsx)(d.gN,{name:"email",as:a.I,className:"w-full",placeholder:"".concat(null==b?void 0:b.placeholder),isError:n.email&&r.email||C}),(0,l.jsx)(m.Z,{language:t,forgotPassword:w,name:"password",password:j,value:o.password,isValid:!n.password,isError:n.password&&r.password||C,errorMessage:C,passwordCriteria:null==j?void 0:j.passwordCriteria}),(0,l.jsx)("div",{className:"w-full flex justify-center",children:(0,l.jsx)(i.Button,{variant:"primary",size:"medium",link:{url:"/",text:"".concat(y)},className:"mt-[2rem] mb-[1rem] sm:mt-[2.5rem] sm:mb-[1.5rem] w-full max-w-[240px] font-human",type:"submit",disabled:S||!s})}),g&&(0,l.jsx)("p",{className:"p3 mb-[2.5rem] lg:mb-[6.6563rem] text-center text-secondary-dark font-human",children:g})]})}}),(0,l.jsxs)("p",{className:"p1 mb-[1rem] text-secondary-dark",children:[k," ",(0,l.jsx)(r.LocalizedLink,{href:(0,u.q2)("registration",t),className:"text-primary-spring underline underline-offset-2 font-human",children:N})]})]})}},12339:function(e,t,n){"use strict";n.d(t,{default:function(){return h}});var l=n(26705),i=n(50524),a=n(55711),r=n(97604),o=n(54013),s=n(71669);n(83079);var d=(0,n(12119).$)("5f83daf9fd2d9be33655e30f875654a0a86e9809");async function c(e){let{token:t,userData:n}=e;if(!t||!n)return{success:!1,error:"Missing registration token"};try{let e=await fetch("/api/auth/setupNewUser",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t,userData:n})}),l=await e.json().catch(()=>({}));if(!e.ok)return{success:!1,error:l.message||"User setup failed"};return{success:!0,data:l}}catch(e){return console.error("Error: Setup new user failed",e),{success:!1,error:"User setup failed"}}}var u=n(52153),m=n(63993),p=n(99376),v=n(20955),f=n(53335);let x=n(34422).Ry().shape({firstName:(0,s.Qo)(s.Jb),lastName:(0,s.Qo)(s.$H),telephone:(0,s.Qo)(s.Dg),street:(0,s.Qo)(s.uP),city:(0,s.Qo)(s.k5),psc:(0,s.Qo)(s.TZ),country:(0,s.Qo)(s.dp),ico:s.y$,dic:s.xA,companyName:s.$m});var h=e=>{let{title:t,description:n,inputs:s,button:h,className:y,inputsCompany:g,inputsAddress:b}=e,{t:j}=(0,u.$)(),{authData:w,refreshUser:k}=(0,o.a)(),[N,P]=(0,v.useState)(!1),[C,D]=(0,v.useState)(!1),[S,I]=(0,v.useState)(!1),E=(0,v.useRef)(null),z=(0,p.useRouter)(),T=async e=>{var t,n;P(!0);let l={personalData:{firstName:e.firstName,lastName:e.lastName,phone:e.telephone,email:null!==(t=null==w?void 0:w.email)&&void 0!==t?t:""},facturationData:{street:e.street,city:e.city,zipCode:e.psc,country:e.country},deliveryData:{street:e.street,city:e.city,zipCode:e.psc,country:e.country},companyData:{ic:e.ico,dic:e.dic,name:e.companyName||"".concat(e.firstName," ").concat(e.lastName)}},i=await c({email:null!==(n=null==w?void 0:w.email)&&void 0!==n?n:void 0,token:null!=_?_:void 0,userData:l});(null==i?void 0:i.success)?(D(!1),z.push((0,r.q2)("account","cs")),k()):D(!0),P(!1)},_=(0,p.useSearchParams)().get("token");return((0,v.useEffect)(()=>{_&&E.current!==_&&(E.current=_,I(!1),(async()=>{try{let e=await d(_);if(E.current!==_)return;if(!e.success){I(!0);return}(await k()).success||I(!0)}catch(e){E.current===_&&I(!0)}})())},[k,_]),S||w&&!w.email)?(0,l.jsx)("div",{className:(0,f.m6)(y,"flex flex-col items-center justify-center h-auto lg:h-screen py-[4rem] md:py-[0] w-full px-[1.25rem] lg:px-[12.5rem] relative"),children:t&&(0,l.jsx)("h3",{className:"h3 text-center mt-[0.5rem] md:mt-[1rem] lg:mt-[0] ",children:j("ui","authUserAlreadyVerified")})}):w?(0,l.jsxs)("div",{className:(0,f.m6)(y,"flex flex-col items-center justify-center h-auto lg:h-screen py-[4rem] md:py-[0] w-full px-[1.25rem] lg:px-[3rem] relative w-full max-w-[900px] mx-auto"),children:[t&&(0,l.jsx)("h3",{className:"h3 text-center mt-[0.5rem] md:mt-[1rem] lg:mt-[0] ",children:t}),n&&(0,l.jsx)("p",{className:"p1 text-grey-1000  mt-[0.5rem]",children:n}),(0,l.jsx)(m.J9,{initialValues:{firstName:"",lastName:"",telephone:"",street:"",city:"",psc:"",country:"",ico:"",dic:"",companyName:""},validationSchema:x,onSubmit:e=>T(e),children:e=>{let{errors:n,touched:r}=e;return(0,l.jsxs)(m.l0,{className:"w-full max-w-[900px] mt-[2rem]",children:[(0,l.jsx)("h3",{className:"h4 text-center ",children:j("ui","authPersonalDetailsTitle")}),s&&(0,l.jsx)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-[0.5rem] my-[1.5rem] mt-[2rem]",children:s.map((e,t)=>(0,l.jsx)(m.gN,{...e,as:a.I,isError:n[e.name]&&r[e.name],errorMessage:n[e.name]&&r[e.name]?n[e.name]:void 0},t))}),(0,l.jsx)("h3",{className:"h4 text-center ",children:j("ui","authBillingAddressTitle")}),b&&(0,l.jsx)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-[0.5rem] my-[1.5rem]",children:b.map((e,t)=>(0,l.jsx)(m.gN,{...e,as:a.I,isError:n[e.name]&&r[e.name],errorMessage:n[e.name]&&r[e.name]?n[e.name]:void 0},t))}),t&&(0,l.jsx)("h3",{className:"h4 text-center ",children:j("ui","authCompanyDetailsTitle")}),g&&(0,l.jsx)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-[0.5rem] my-[1.5rem]",children:g.map((e,t)=>(0,l.jsx)(m.gN,{...e,as:a.I,isError:n[e.name]&&r[e.name],errorMessage:n[e.name]&&r[e.name]?n[e.name]:void 0},t))}),C&&(0,l.jsx)("p",{className:"p3 text-center text-red mb-[1rem]",role:"alert",children:j("ui","authSetupFailed")}),h&&(0,l.jsx)("div",{className:"mt-[2.5rem] lg:mt-[2.5rem]",children:(0,l.jsx)(i.Button,{variant:"primary",size:"medium",type:"submit",link:{text:"".concat(h)},disabled:N})})]})}})]}):null}},32900:function(e,t,n){"use strict";n.d(t,{default:function(){return y}});var l=n(26705),i=n(50524),a=n(55711),r=n(53173),o=n(33145),s=n(20955),d=n(63993),c=n(7336),u=n(40598),m=n(2664),p=n(97604),v=n(67831);let f="Failed to send verification email";async function x(e){let{email:t,password:n,language:l,errorMessages:i}=e;try{let e=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:n,language:l})});if(!e.ok){let t=await e.json().catch(()=>({}));if("User already exists"===t.message)return{success:!1,error:(null==i?void 0:i.userWithThisEmailAlreadyExists)||"User with this email already exists"};if("Validation failed"===t.message)return{success:!1,error:(null==i?void 0:i.passwordDoesntMatchCriteria)||"Password doesn't match criteria"};if(t.message===f)return{success:!1,error:(null==i?void 0:i.verificationEmailFailed)||f};return{success:!1,error:t.message||"An error occurred during registration"}}return{success:!0}}catch(e){return console.error("Registration request failed",e),{success:!1,error:"An error occurred during registration"}}}var h=n(52153),y=e=>{let{lang:t,title:n,subtitle:f,button:y,gdpr:g,email:b,password:j,question:w,questionButtonLabel:k,errorMessages:N}=e,P=(0,m.y)(),{t:C}
1=(0,h.$)(),[D,S]=(0,s.useState)(""),[I,E]=(0,s.useState)(""),[z,T]=(0,s.useState)(!1),_=async e=>{let{email:n,password:l}=e;T(!0),S("");try{let e=await x({email:n,password:l,language:t,errorMessages:{...N,verificationEmailFailed:C("ui","authVerificationEmailFailed")}});if(!e.success){S(e.error||"");return}P.push("".concat((0,p.q2)("emailCheck",t),"?email=").concat(n))}catch(e){S("An error occurred during registration")}finally{T(!1)}};return(0,l.jsxs)(c.E.div,{className:"w-full flex flex-col items-center justify-start lg:px-[6rem] xl:px-[12.5rem] mb-0 sm:mb-[3.5rem] lg:mb-0 px-[1.25rem] pt-[1.5rem] sm:pt-[0rem] pb-[4rem] sm:pb-[0]",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,l.jsx)(r.LocalizedLink,{href:"/",children:(0,l.jsx)(o.default,{src:"/icons/logo.svg",alt:"Czechphone logo",width:75,height:75})}),n&&(0,l.jsx)("h3",{className:"h3 mt-[2.5rem] mb-2",children:n}),f&&(0,l.jsx)("p",{className:"p1 mb-[2rem] sm:mb-[2.5rem] text-secondary-dark",children:f}),(0,l.jsx)(d.J9,{initialValues:{email:"",password:"",language:t||"cs"},validationSchema:u.Z,onSubmit:e=>_(e),children:e=>{let{values:n,errors:r,touched:o,isValid:s}=e;return r.password&&o.password&&!D&&E((null==N?void 0:N.passwordDoesntMatchCriteria)||"Password doesn't match criteria"),(0,l.jsxs)(d.l0,{className:"md:w-auto w-full",children:[(0,l.jsx)(d.gN,{name:"email",as:a.I,className:"w-full",placeholder:"".concat(null==b?void 0:b.placeholder),isError:r.email&&o.email||D,errorMessage:D}),(0,l.jsx)(v.Z,{language:t,name:"password",password:j,value:n.password,isValid:!r.password,passwordCriteria:null==j?void 0:j.passwordCriteria,isError:I,errorMessage:I}),(0,l.jsx)(i.Button,{variant:"primary",size:"medium",link:{url:"/",text:"".concat(y)},className:"mt-[2rem] mb-[1rem] sm:mt-[2.5rem] sm:mb-[1.5rem] w-full max-w-[240px]",type:"submit",disabled:z||!s}),g&&(0,l.jsx)("p",{className:"p3 mb-[2.5rem] lg:mb-[6.6563rem] text-center text-secondary-dark",children:g})]})}}),(0,l.jsxs)("p",{className:"p1 mb-[1rem] text-secondary-dark",children:[w," ",(0,l.jsx)(r.LocalizedLink,{href:(0,p.q2)("login",t),className:"text-primary-spring underline underline-offset-2",children:k})]})]})}},85786:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var l=n(26705),i=n(50524),a=n(66269),r=n(20955),o=n(58447),s=n(53335),d=n(24993),c=n(27648),u=e=>{let{icon:t,name:n,className:i,type:a="phone"}=e;return t||n?(0,l.jsxs)(c.default,{href:"phone"===a?"tel:".concat(n):"mailTo:".concat(n),className:(0,s.m6)("flex gap-3 items-center justify-start",i),children:[t&&(0,l.jsx)(d.default,{name:t,className:"w-6 h-6"}),n&&(0,l.jsx)("h4",{className:"h4 text-nowrap",children:n})]}):null},m=n(55711),p=n(7336),v=e=>{var t,n;let{description:s,title:d,button:c,email:v,phone:f,subtitle:x,input:h,hasInput:y,id:g,emailReceiver:b,ecomailId:j}=e,[w,k]=(0,r.useState)(""),[N,P]=(0,r.useState)(!1),C=async()=>{try{if(P(!0),b){let e=await fetch("/api/email/form",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userEmail:w,email:b,generalText:"Uživatel vyplnil formul\xe1ř na webu"})});await e.json()}if(j){let e=await fetch("/api/ecomail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,listName:j})});await e.json()}P(!1)}catch(e){console.log(e),P(!1)}};return y||v||f?(0,l.jsx)(o.Z,{id:g,layout:{presentation:a.c.Default,gap:0},className:" py-10 lg:py-[60px] flex justify-center items-center box-border",children:(0,l.jsxs)("div",{className:"relative px-5 py-14 md:p-16 md:mx-auto flex flex-col items-start justify-center ml-[-16px] w-[calc(100%+32px)] xs:w-[calc(100%+40px)] xs:ml-[-20px] sm:ml-[-32px] sm:w-[calc(100%+64px)] md:ml-auto  md:w-full xl:max-w-[1090px]",children:[(0,l.jsx)(p.E.div,{initial:{opacity:0,scaleX:0},whileInView:{opacity:1,scaleX:1,transition:{duration:.5,delay:.25,ease:"easeInOut"}},viewport:{once:!0},className:"absolute inset-0 z-[-1] pointer-events-none bg-primary-spring"}),(0,l.jsxs)(p.E.div,{initial:{opacity:0}
1,whileInView:{transition:{duration:.25,delay:.75,ease:"easeInOut"},opacity:1},viewport:{once:!0},children:[(0,l.jsx)("p",{className:"subheadlineText text-start text-primary-raisin  mb-3 ".concat(h?"lg:px-[6px] ":""," "),children:s}),(0,l.jsx)("h3",{className:"h3 text-grey-400 md:text-[32px] w-[100%] lg:w-[80%] ".concat(v||f?"mb-7 md:mb-4 lg:mb-2":h?"mb-12 self-stretch lg:pr-24":"mb-0"),children:d}),(v||f)&&(0,l.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-end lg:gap-36 xl:gap-[287px] w-full mt-6",children:[(0,l.jsxs)("div",{className:"flex flex-col lg:flex-row gap-2 lg:gap-12",children:[(0,l.jsx)(u,{...f,type:"phone",className:"text-grey-400 gap-4"}),(0,l.jsx)(u,{...v,type:"email",className:"text-grey-400"})]}),(null==c?void 0:null===(t=c.link)||void 0===t?void 0:t.url)!==void 0&&(null==c?void 0:null===(n=c.link)||void 0===n?void 0:n.url)!=="//undefined"&&(0,l.jsx)("div",{className:"w-[205px] max-w-[205px] flex items-center justify-center overflow-hidden mt-12 md:mt-[-1px]",children:(0,l.jsx)(i.Button,{...c,darkMode:!0,size:"medium"})})]}),y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h4",{className:"h4 text-white mb-4 md:mb-5 mt-[3rem] ",children:x}),(0,l.jsxs)("div",{className:"flex flex-col items-start justify-start md:flex-row gap-3 w-full",children:[(0,l.jsx)("label",{htmlFor:"bannerEmail",className:"opacity-0 invisible absolute left-[-10000px]",children:"E-mail"}),(0,l.jsx)(m.I,{className:"w-full md:w-[480px] h-14 ",placeholder:"Vaše e-mailov\xe1 adresa...",onChange:e=>k(e.target.value),dark:!0,typeInput:"email",id:"bannerEmail"}),(0,l.jsx)("div",{className:"flex items-center md:justify-center overflow-hidden w-[200px]",children:(0,l.jsx)(i.Button,{...c,className:"w-full ",type:"button",size:"large",onClick:()=>C(),darkMode:!0,disabled:N})})]})]})]})]})}):(0,l.jsx)(o.Z,{id:g,layout:{presentation:a.c.Default,gap:0},className:"w-full py-10 lg:py-[80px]",children:(0,l.jsxs)("div",{className:"relative box-border md:mx-auto px-5 py-14 lg:p-16 flex flex-col  md:flex-row md:items-end md:justify-between gap-12 lg:gap-[120px]  ml-[-16px] w-[calc(100%+32px)] xs:w-[calc(100%+40px)]  xs:ml-[-20px] sm:ml-[-32px] sm:w-[calc(100%+64px)] md:ml-auto  md:w-full xl:max-w-[1090px]",children:[(0,l.jsx)(p.E.div,{initial:{opacity:0,scaleX:0},whileInView:{opacity:1,scaleX:1,transition:{duration:.5,delay:.25,ease:"easeInOut"}},viewport:{once:!0},className:"absolute inset-0 z-[-1] pointer-events-none bg-primary-spring"}),(0,l.jsxs)(p.E.div,{initial:{opacity:0}
1,whileInView:{transition:{duration:.25,delay:.75,ease:"easeInOut"},opacity:1},viewport:{once:!0},className:"flex flex-col md:w-[calc(100%-250px)]",children:[s&&(0,l.jsx)("p",{className:"subheadlineText text-start text-primary-raisin mb-3",children:s}),d&&(0,l.jsx)("h3",{dangerouslySetInnerHTML:{__html:d},className:"h3 text-grey-400 md:text-[24px] max-w-[500px]"})]}),c&&(0,l.jsx)(p.E.div,{initial:{opacity:0},whileInView:{transition:{duration:.25,delay:.75,ease:"easeInOut"},opacity:1},viewport:{once:!0},className:"flex items-center md:w-[200px] lg:overflow-hidden",children:(0,l.jsx)(i.Button,{...c,darkMode:!0,size:"large",className:"max-w-[200px]"})})]})})}},58447:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var l=n(26705),i=n(53335),a=e=>{let{children:t,className:n}=e;return(0,l.jsx)("div",{className:(0,i.m6)(n),children:t})},r=n(66269),o=n(55806),s=e=>{let{children:t,id:n,className:s,layout:d,classContainer:c}=e,u=()=>{let e=[];return(null==d?void 0:d.gap)&&e.push("gap-".concat(d.gap)),e},m={[r.c.Default]:["flex flex-col",u()],[r.c.Grid]:["grid gap-4",(null==d?void 0:d.gridColumns)?"grid-cols-".concat(d.gridColumns):"grid-cols-1",u()],[r.c.Row]:["flex flex-row",u()],[r.c.Col]:["flex flex-col",u()]};return(0,l.jsx)("section",{id:n,className:(0,i.m6)(s,"relative w-full"),children:(0,l.jsxs)(o.Z,{className:(0,i.m6)("",c),children:[(0,l.jsx)(a,{children:""}),d&&d.presentation?(0,l.jsx)("div",{className:(0,i.dV)(m[d.presentation],"w-full"),children:t}):t]})})}},34521:function(e,t,n){"use strict";n.d(t,{default:function(){return e1}});var l,i,a,r,o,s,d,c,u=n(26705),m=n(90769),p=n(97604),v=n(63707),f=n(27167);function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2?arguments[2]:void 0,l=Error(e);return l.statusCode=t,n&&(l.errors=n),l}n(99027);var h=n(34422);async function y(e,t){try{return await e.validate(t,{abortEarly:!1}),{isValid:!0}}catch(e){if(e instanceof h.p8){let t={};return e.inner.map(e=>{e.path?(t[e.path]||(t[e.path]=[]),t[e.path].push(e.message)):(t.general||(t.general=[]),t.general.push(e.message))}),0===Object.keys(t).length&&e.message&&(t.general=[e.message]),{isValid:!1,errors:t}}return{isValid:!1,errors:{general:["An unexpected error occurred during validation"]}}}}n(15921),n(52151),n(38282);var g=n(40598),b={userAuthData:async function(e){let t=await y(g.Z,e);if(!t.isValid)throw x("Validation failed",400,t.errors)}};n(83079);var j=(0,n(12119).$)("c2a512a173a00ad7328d142ce1050ce53611c26b");let w=async(e,t)=>{let{rows:n}=await j().query("SELECT * FROM users WHERE email = $1 ",[e]);if(!n||0===n.length)throw x("User not found",401);let{rows:l}=await j().query("UPDATE users SET token = $1 WHERE email = $2 RETURNING *",[t,e]);if(!l||0===l.length)throw x("Token not added",500);return l[0]},k=async(e,t)=>{let{rows:n}=await j().query("SELECT * FROM users WHERE email = $1",[e]);if(!n||0===n.length)throw x("User not found",401);let l=n[0];return await j().query("UPDATE users SET password = $1 WHERE email = $2",[t,e]),l};var N=n(45008),P=n(97172);function C(){let e=(0,N._)(["\n        UPDATE users\n        SET password = ",", token = null\n        WHERE email = "," AND token = ","\n        RETURNING *;\n    "]);return C=function(){return e},e}function D(){let e=(0,N._)(["\n    INSERT INTO users (email, password, token, language, email_verified) \n    VALUES (",", ",", ",", ",", NOW())  \n    RETURNING id, email, token, language, raynet_id, email_verified"]);return D=function(){return e},e}function S(){let e=(0,N._)(["\n		UPDATE users\n		SET password = ",",\n			token = ",",\n			language = ",",\n			email_verified = NOW(),\n			registration_started_at = NOW()\n		WHERE email = ","\n			AND token IS NOT NULL\n			AND raynet_id IS NULL\n		RETURNING id, email, token, language, raynet_id, email_verified, registration_started_at\n	"]);return S=function(){return e},e}function I(){let e=(0,N._)(["\n        UPDATE users\n        SET email_verified = null, token = null, raynet_id = ","\n        WHERE email = "," AND token = ","\n        RETURNING id, email, email_verified, token, language, raynet_id;\n    "]);return I=function(){return e},e}var E=async e=>{let{rows:t}=await j().query("SELECT * FROM users WHERE email = $1",[e]);if(!t||0===t.length)throw x("User not found",401);return t[0]},z=async e=>{let{rows:t}=await j().query("SELECT * FROM users WHERE token = $1",[e]);if(!t||0===t.length)throw x("User not found",401);return t[0]},T=n(34266),_=n.n(T);let L=async(e,t)=>{if(!e||!t||!await _().compare(e,t))throw x("Invalid password",401)},A=async e=>{let t=await E(e.email);return await L(e.password,t.password),t},B=async e=>{if(!e)throw x("User with this token does not exist.",409);return await z(e)};var R=n(51364),M=n.n(R),O=n(3865),Z=n.n(O),V=n(25566);let F=async e=>{var t;let n;let l=V.env.SENDGRID_API_KEY,i=V.env.SENDGRID_EMAIL;if(!l)throw Error("SENDGRID_API_KEY is not configured");if(!i)throw Error("SENDGRID_EMAIL is not configured");if(!e.email||Array.isArray(e.email)&&0===e.email.length)throw Error("SendGrid recipient is missing");M().setApiKey(l),Z().setApiKey(l);let a={email:i,name:"CZECHPHONE"},r={email:"[email protected]",name:"CZECHPHONE"};return n=e.templateId?{to:e.email,from:a,replyTo:r,templateId:e.templateId,dynamicTemplateData:e.data}:{to:e.email,from:a,replyTo:r,subject:e.subject||"No Subject",text:e.message||"No Message"},(null===(t=e.attachments)||void 0===t?void 0:t.length)&&(n.attachments=e.attachments),(await Z().send(n))[0]},U=async(e,t,n)=>{let l="".concat("https://www.czechphone.cz","/").concat(n,"/").concat((0,p.q2)("changePasswordWithToken",n),"?token=").concat(t,"&email=").concat(e);await F({email:e,templateId:"d-dec8a9c2d9a84760a329a7803e535f51",data:{verifyEmail:l}})};var $=n(77398);let q=e=>e===p.SQ.slovak?p.SQ.slovak:p.SQ.czech;(l=o||(o={})).Company="Company",l.Person="Person",l.Contact="Contact",l.Deal="Deal",l.Product="Product",l.Offer="Offer",l.Order="salesOrder",l.offer="offer",l.order="salesOrder",l.BusinessCase="businessCase",l.CustomField="customField",l.File="exportBody",l.Attachment="attachment",l.SalesOrder="SalesOrder",l.User="userAccount";let H=e=>400===e||408===e||422===e||429===e||503===e;var J=n(43741),K=n.n(J),G=n(25566),W=n(82957).Buffer;let Q={username:G.env.RAYNET_CRM_USER,key:G.env.RAYNET_CRM_API_KEY},Y=async e=>{let t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch(e){return{}}};class X{_checkRaynetClient(){if(!this.raynetAPIUrl)throw Error("RAYNET_CRM_API_URL is not set")}_constructEndpointUrl(e,t){if(!this.raynetAPIUrl)throw Error("RAYNET_CRM_API_URL is not set");return K().join(this.raynetAPIUrl,e,t?"?".concat(t.toString()):"")}getAuthenticationToken(){return"Basic ".concat(W.from("".concat(this._authenticationSettings.username,":").concat(this._authenticationSettings.key)).toString("base64"))}static checkRaynetWebhookToken(e,t){let n=e.get("x-raynetcrm-token");return null===n||n!==G.env.RAYNET_CRM_WEBHOOK_TOKEN?(t&&t(!1),!1):(t&&t(!0),!0)}raynetRequestInit(){return{headers:{"Content-Type":"application/json",Authorization:this.getAuthenticationToken(),"X-Instance-Name":"czechphone","no-cache":"true"}}}async getProducts(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.Product.toLowerCase(),e);return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching products",e),{message:"Error fetching products"}))}async getProduct(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Product.toLowerCase(),"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching product",e),{message:"Error fetching product"}))}async getClients(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.Company.toLowerCase(),e);return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching clients",e),{message:"Error fetching clients"}))}async getClient(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Company.toLowerCase(),"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching client",e),{message:"Error fetching client"}))}async getClientByRegNumber(e){var t;this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Company.toLowerCase(),"/?regNumber=").concat(e)),l=await fetch(n,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching client",e),{message:"Error fetching client"}));return(null==l?void 0:l.data)&&(null==l?void 0:null===(t=l.data)||void 0===t?void 0:t.length)!==0?{success:!0,data:null==l?void 0:l.data[0]}:{success:!1,data:void 0}}async getClientByEmail(e){var t;this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Company.toLowerCase(),"/?primaryAddress-contactInfo.email=").concat(e)),l=await fetch(n,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching client",e),{message:"Error fetching client"}));return(null==l?void 0:l.data)&&(null==l?void 0:null===(t=l.data)||void 0===t?void 0:t.length)!==0?{success:!0,data:null==l?void 0:l.data[0]}:{success:!1,data:void 0}}async createClient(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.Company.toLowerCase());return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error creating client",e),{message:"Error creating client"}))}async updateClient(e,t){this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Company.toLowerCase(),"/").concat(e));return await fetch(n,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify(t)}).then(e=>e.json()).catch(e=>(console.error("Error updating client",e),{message:"Error updating client"}))}async createClientAddress(e,t){this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Company.toLowerCase(),"/").concat(e,"/address"));return await fetch(n,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(t)}).then(e=>e.json()).catch(e=>(console.error("Error updating client address",e),{message:"Error updating client address"}))}async updateClientAddress(e,t,n){this._checkRaynetClient();let l=this._constructEndpointUrl("".concat(o.Company.toLowerCase(),"/").concat(e,"/address/").concat(t));return await fetch(l,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify(n)}).then(e=>e.json()).catch(e=>(console.error("Error updating client address",e),{message:"Error updating client address"}))}async updateContactPerson(e,t){this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Person.toLowerCase(),"/").concat(e));return await fetch(n,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify(t)}).then(e=>e.json()).catch(e=>(console.error("Error updating client",e),{message:"Error updating client"}))}async getContactPerson(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Person.toLowerCase(),"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching contact person",e),{message:"Error fetching contact person"}))}async updateContactPersonClient(e,t){this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Person.toLowerCase(),"/").concat(e,"/relationship/").concat(t));return await fetch(n,{method:"POST",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error fetching contact person",e),{message:"Error fetching contact person"}))}async getContactPersonByEmail(e){var t;this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Person.toLowerCase(),"?contactInfo.email=").concat(e)),l=await fetch(n,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching contact person",e),{message:"Error fetching contact person"}));return(null==l?void 0:l.data)&&(null==l?void 0:null===(t=l.data)||void 0===t?void 0:t.length)!==0?{success:!0,data:null==l?void 0:l.data[0]}:{success:!1,data:void 0}}async createContactPerson(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.Person.toLowerCase());return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error creating contact person",e),{message:"Error creating contact person"}))}async createBusinessCase(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.BusinessCase);return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error creating business case",e),{message:"Error creating business case"}))}async getBusinessCaseById(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.BusinessCase,"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching business case",e),{message:"Error fetching business case"}))}async successBusinessCase(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.BusinessCase,"/").concat(e));return{success:(await fetch(t,{...this.raynetRequestInit(),method:"POST",body:JSON.stringify({businessCasePhase:5})})).ok}}async getOffer(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Offer.toLowerCase(),"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching offer",e),{message:"Error fetching offer"}))}async connectPDFtoDeal(e,t,n,l){this._checkRaynetClient();let i=this._constructEndpointUrl("".concat(o.Attachment.toLowerCase(),"/").concat(n,"/").concat(t,"/").concat(l));return await fetch(i,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error uploading PDF",e),{message:e}))}async uploadPdf(e){this._checkRaynetClient();let t=this._constructEndpointUrl("fileUpload");return await fetch(t,{method:"POST",headers:{Authorization:this.getAuthenticationToken(),"X-Instance-Name":"czechphone"},body:e}).then(e=>e.json()).catch(e=>(console.error("Error uploading PDF",e),{message:e}))}async getPDF(e){this._checkRaynetClient();let t=this._constructEndpointUrl("fileHeader/".concat(e));return await fetch(t,{method:"GET",headers:{Authorization:this.getAuthenticationToken(),"X-Instance-Name":"czechphone"}}).then(e=>e.json()).catch(e=>(console.error("Error uploading PDF",e),{message:e}))}async getAllOffers(){this._checkRaynetClient();let e=this._constructEndpointUrl(o.Offer.toLowerCase());return await fetch(e,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching offers",e),{message:"Error fetching offers"}))}async getUserOffers(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Offer.toLowerCase(),"?person=").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching offers",e),{message:"Error fetching offers"}))}async createOffer(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.Offer.toLowerCase());return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error creating order",e),{message:"Error creating order"}))}async updateOffer(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Offer.toLowerCase(),"/").concat(e.id));return await fetch(t,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error updating order",e),{message:"Error updating order"}))}async updateDealProduct(e,t,n,l){this._checkRaynetClient();let i=this._constructEndpointUrl("".concat(o[e],"/").concat(t,"/item/").concat(n));return await fetch(i,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify(l)}).then(e=>e.json()).catch(e=>(console.error("Error updating deal product",e),{message:"Error updating deal product"}))}async addProductToDeal(e,t,n){this._checkRaynetClient();let l=this._constructEndpointUrl("".concat(o[e],"/").concat(t,"/item"));return await fetch(l,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(n)}).then(e=>e.json()).catch(e=>(console.error("Error adding product to deal",e),{message:"Error adding product to deal"}))}async addProductToOffer(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(
1o.Offer.toLowerCase(),"/").concat(e.offerId,"/item"));return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error adding product to order",e),{message:"Error adding product to order"}))}async createOrder(e){this._checkRaynetClient();let t=this._constructEndpointUrl(o.Order);try{let n=await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}),l=await Y(n);if(!n.ok)return console.error("Raynet create order HTTP failure",{status:n.status}),{success:!1,status:n.status,message:"string"==typeof l.message&&l.message?l.message:"Raynet create order failed with HTTP ".concat(n.status),retryable:H(n.status)};return l}catch(e){return console.error("Error creating order",e),{success:!1,message:"Error creating order",retryable:!1}}}async getAllOrders(){this._checkRaynetClient();let e=this._constructEndpointUrl("".concat(o.Order,"/?offset=0"));return await fetch(e,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching orders",e),{message:"Error fetching orders"}))}async getOrder(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Order,"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching order",e),{message:"Error fetching order"}))}async getOwner(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.User,"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching order",e),{message:"Error fetching order"}))}async getUsersOrders(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Order,"?person=").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching orders",e),{message:"Error fetching orders"}))}async addProductToOrder(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Order,"/").concat(e.salesOrderId,"/item"));return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error adding product to order",e),{message:"Error adding product to order"}))}async removeProductToOrder(e,t){this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Order,"/").concat(t,"/item/").concat(e));return await fetch(n,{method:"DELETE",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error removing product from order",e),{message:"Error removing product from order"}))}async removeProductToOffer(e,t){this._checkRaynetClient();let n=this._constructEndpointUrl("".concat(o.Offer,"/").concat(t,"/item/").concat(e));return await fetch(n,{method:"DELETE",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error removing product from offer",e),{message:"Error removing product from offer"}))}async removeProductToDeal(e,t,n){this._checkRaynetClient();let l=this._constructEndpointUrl("".concat(o[e],"/").concat(t,"/item/").concat(n));return await fetch(l,{method:"DELETE",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error removing product from deal",e),{message:"Error removing product from deal"}))}async updateOrder(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Order,"/").concat(e.id));return await fetch(t,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify({...e})}).then(e=>e.json()).catch(e=>(console.error("Error updating order",e),{message:"Error updating order"}))}async updateOrderItem(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Order,"/").concat(e.salesOrderId,"/item/").concat(Number(e.salesOrderItemId)));return await fetch(t,{method:"POST",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error updating order",e),{message:"Error updating order"}))}async createCustomField(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.CustomField,"/config/","salesOrder"));return await fetch(t,{method:"PUT",...this.raynetRequestInit(),body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>(console.error("Error creating custom field",e),{message:"Error creating custom field"}))}async getCustomFields(){this._checkRaynetClient();let e=this._constructEndpointUrl("".concat(o.CustomField,"/config?offset=16"));return await fetch(e,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching custom fields",e),{message:"Error fetching custom fields"}))}async removeOfferProduct(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Offer.toLocaleLowerCase(),"/").concat(e.offerId,"/item/").concat(e.productId));return await fetch(t,{method:"DELETE",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error removing product from order",e),{message:"Error removing product from order"}))}async getOrderPDF(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Order,"/").concat(e,"/pdfExport"));return await fetch(t,{method:"GET",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error fetching order PDF",e),{message:"Error fetching order PDF"}))}async getOfferPDF(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.Offer.toLocaleLowerCase(),"/").concat(e,"/pdfExport"));return await fetch(t,{method:"GET",...this.raynetRequestInit()}).then(e=>e.json()).catch(e=>(console.error("Error fetching offer PDF",e),{message:"Error fetching offer PDF"}))}async getDocBody(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.File,"/").concat(e.uuid,"/").concat(e.accessToken,"/").concat(e.instanceName,"?fileName=").concat(e.fileName.replace(/\s/g,""),"&contentType=").concat(e.contentType));try{let e=await fetch(t,{method:"GET",...this.raynetRequestInit()});if(!e.ok)throw Error("Failed to fetch document body. Status: ".concat(e.status));return await e.arrayBuffer()}catch(e){throw console.error("Error fetching document body",e),Error("Error fetching document body")}}async getUser(e){this._checkRaynetClient();let t=this._constructEndpointUrl("".concat(o.User,"/").concat(e));return await fetch(t,this.raynetRequestInit()).then(e=>e.json()).catch(e=>(console.error("Error fetching user",e),{message:"Error fetching user"}))}constructor(){this.raynetAPIUrl=G.env.RAYNET_CRM_API_URL,this._authenticationSettings=Q}}async function ee(e,t,n){let l=new X,i=await l.getClientByRegNumber(null==e?void 0:e.ic);if(!i.success||!e.ic){var a,r;i=await l.createClient({regNumber:null!==(a=null==e?void 0:e.ic)&&void 0!==a?a:"",taxNumber:null!==(r=null==e?void 0:e.dic)&&void 0!==r?r:"",name:(null==e?void 0:e.name)||"".concat(n.firstName," ").concat(n.lastName),addresses:(null==t?void 0:t.street)?[{address:{name:"Hlavn\xed adresa",street:t.street,city:t.city,zipCode:t.zipCode,country:t.country},contactInfo:{email:n.email,tel1:n.phone}}]:[],rating:s.A,state:d.A_Potential,role:c.A_Subscriber})}return i}async function et(e,t,n,l,i){let a=new X,r=await a.getContactPersonByEmail(e);if(!r.success){var o;if(!(null===(o=(r=await a.createContactPerson({contactInfo:{email:e,tel1:t.phone},firstName:t.firstName,lastName:t.lastName,relationship:{company:l,type:i?"Host":"Uživatel"},privateAddress:(null==n?void 0:n.street)?{street:n.street,city:n.city,zipCode:n.zipCode,country:n.country}:void 0})).data)||void 0===o?void 0:o.id))throw Error("Failed to create contact person");r=await a.getContactPerson(r.data.id)}return r}async function en(e,t){var n,l;let i=new X,a=await i.getContactPerson(e);
1!a.data||(null===(l=a.data.primaryRelationship)||void 0===l?void 0:null===(n=l.company)||void 0===n?void 0:n.id)||await i.updateContactPersonClient(e,t)}(i=s||(s={})).A="A",i.B="B",i.C="C",(a=d||(d={})).A_Potential="A_POTENTIAL",a.B_Actual="B_ACTUAL",a.C_Deferred="C_DEFERRED",a.D_Unattractive="D_UNATTRACTIVE",(r=c||(c={})).A_Subscriber="A_SUBSCRIBER",r.B_Partner="B_PARTNER",r.C_Supplier="C_SUPPLIER",r.D_Rival="D_RIVAL";var el={checkPassword:A,checkToken:B},ei=n(25566);let ea={providers:[(0,f.Z)({name:"Credentials",credentials:{email:{label:"Email",type:"text"},password:{label:"Password",type:"password"},token:{label:"Token",type:"text",optional:!0}},async authorize(e){try{if(null==e?void 0:e.token)return await el.checkToken(e.token);await b.userAuthData({email:e.email,password:e.password});let t=await el.checkPassword({email:e.email,password:e.password});if(null!==t.email_verified)throw Error("Email not verified");return t}catch(e){if(e instanceof Error)throw Error("".concat(e.message));throw Error("An unknown error occurred")}}})],secret:ei.env.AUTH_SECRET,session:{strategy:"jwt"},callbacks:{async session(e){let{session:t}=e,n=await E(t.user.email);return t.user.emailVerified=n.email_verified,t.user.crmId=n.raynet_id,t}}},{handlers:er,signIn:eo,signOut:es,auth:ed}=(0,v.ZP)(ea);var ec=n(99376),eu=n(37774);let em=(e,t,n)=>{let l=eu.Cx[e][t];return l?l[n]||l[p.SQ.czech]||t:(console.warn("Translation missing for ".concat(e,".").concat(t)),t)},ep=e=>({name:{placeholder:em("form","companyName",e),errorMessage:em("form","companyNameError",e),isRequired:!0},firstName:{placeholder:em("form","firstName",e),errorMessage:em("form","firstNameError",e),isRequired:!0},lastName:{placeholder:em("form","lastName",e),errorMessage:em("form","lastNameError",e),isRequired:!0},email:{placeholder:em("form","email",e),errorMessage:em("form","emailError",e),isRequired:!0},phone:{placeholder:em("form","phone",e),errorMessage:em("form","phoneError",e),isRequired:!0},ic:{placeholder:em("form","companyId",e),errorMessage:em("form","companyIdError",e),isRequired:!0},dic:{placeholder:em("form","vatId",e),errorMessage:em("form","vatIdError",e),isRequired:!0},street:{placeholder:em("form","streetAndNumber",e),errorMessage:em("form","streetAndNumberError",e),isRequired:!1},country:{placeholder:em("form","country",e),errorMessage:em("form","countryError",e),isRequired:!1},city:{placeholder:em("form","city",e),errorMessage:em("form","cityError",e),isRequired:!1},zipCode:{placeholder:em("form","postalCode",e),errorMessage:em("form","postalCodeError",e),isRequired:!1}}),ev=e=>({title:em("ui","accountDeliveryInfo",e),editLabel:em("form","edit",e),saveLabel:em("form","save",e),companyLabel:em("ui","authCompanyDetailsTitle",e),personalLabel:em("ui","authPersonalDetailsTitle",e),facturationLabel:em("ui","authBillingAddressTitle",e),deliveryLabel:em("form","deliveryAddress",e)}),ef=[{id:"gls",title:"GLS – Bal\xedk do ruky (doručen\xed na\xa0adresu)",description:"Doručen\xed na vaši adresu nebo do firmy. Dod\xe1n\xed do 1-2 pracovn\xedch dnů od převzet\xed objedn\xe1vky dopravcem.",image:{url:"/images/sections/gls.jpg",alt:""},price:149,freePrice:5e3,button:{variant:"secondary",size:"extraSmall",type:"button",link:{text:"Přidat"}},isDelivery:!0},{id:"personalPickup",title:"Osobn\xed odběr",description:"Na obchodn\xedm oddělen\xed Czechphone – Bolatice, Průmyslov\xe1 969/15.  Otev\xedrac\xed doba: Po-P\xe1 07:30 - 15:00; So – Ne: ZAVŘENO",image:{url:"/images/sections/personalDelivery.jpg",alt:""},price:0,button:{variant:"secondary",size:"extraSmall",type:"button",link:{text:"Přidat"}},isDelivery:!0}],ex={deliveryOptions:[{title:"Platba na dob\xedrku",description:"Zbož\xed zaplat\xedte př\xedmo u řidiče nebo na odběrn\xe9m m\xedstě v hotovosti nebo kartou.",image:{url:"/images/sections/gls.jpg",alt:""},price:50,button:{variant:"secondary",size:"extraSmall",type:"button",link:{text:"Přidat"}},isDelivery:!1},{title:"Platba převodem",description:"Pro st\xe1vaj\xedc\xed z\xe1kazn\xedky s podepsanou r\xe1mcovou kupn\xed smlouvou platba na fakturu se splatnost\xed. Pro nov\xe9 z\xe1kazn\xedky platba předem na z\xe1kladě z\xe1lohov\xe9 faktury. \xdadaje k platbě v\xe1m zašle pracovn\xedk obchodn\xedho oddělen\xed.",image:{url:"/images/sections/personalDelivery.jpg",alt:""},price:0,button:{variant:"secondary",size:"extraSmall",type:"button",link:{text:"Přidat"}},isDelivery:!1}]},eh={deliveryOptions:[{title:"V hotovosti",description:"Na obchodn\xedm oddělen\xed Czechphone – Bolatice, Průmyslov\xe1 969/15.  Otev\xedrac\xed doba: Po-P\xe1 07:30 - 15:00; So – Ne: ZAVŘENO",image:{url:"/images/sections/personalDelivery.jpg",alt:""},price:0,button:{variant:"secondary",size:"extraSmall",type:"button",link:{text:"Přidat"}},isDelivery:!1},{title:"Platba převodem",description:"Pro st\xe1vaj\xedc\xed z\xe1kazn\xedky s podepsanou r\xe1mcovou kupn\xed smlouvou platba na fakturu se splatnost\xed. Pro nov\xe9 z\xe1kazn\xedky platba předem na z\xe1kladě z\xe1lohov\xe9 faktury. \xdadaje k platbě v\xe1m zašle pracovn\xedk obchodn\xedho oddělen\xed.",image:{url:"/images/sections/personalDelivery.jpg",alt:""},price:0,button:{variant:"secondary",size:"extraSmall",type:"button",link:{text:"Přidat"}},isDelivery:!1}]};var ey=n(50524),eg=n(54013),eb=n(96169),ej=n(84606),ew=n(7336),ek=n(20955),eN=n(53335),eP=e=>{var t;let{title:n,subtitle:l,button:i,secondaryButtom:a,className:r,lang:o}=e,{userData:s}=(0,eg.a)(),d=(0,ec.useRouter)(),{orderDetailId:c,confirmationEmailSent:m}=(0,eb.j)();return(0,ek.useEffect)(()=>{let e=new URL(window.location.href);e.searchParams.set("page","thankyou"),d.replace(e.pathname+e.search)},[d]),(0,u.jsxs)(ew.E.div,{className:(0,eN.m6)(r," flex flex-col h-auto  items-center justify-center  pt-[5rem] pb-[5rem] px-[1.25rem] md:py-[2.5rem] md:px-[4rem] "),initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5},children:[n&&(0,u.jsx)("h3",{className:"h3 mb-[1rem]",children:n}),l&&(0,u.jsx)("p",{className:"p1 mb-[4rem] text-center",children:l}),!m&&(0,u.jsx)("p",{role:"status",className:"mb-6 text-center",children:"sk"===o?"Objedn\xe1vka je uložen\xe1, ale potvrdenie e-mailom sa nepodarilo odoslať. Objedn\xe1vku neposielajte znova; v pr\xedpade potreby n\xe1s kontaktujte.":"Objedn\xe1vka je uložen\xe1, ale potvrzen\xed e-mailem se nepodařilo odeslat. Objedn\xe1vku nepos\xedlejte znovu; v př\xedpadě potřeby n\xe1s kontaktujte."}),(0,u.jsxs)("div",{className:"flex flex-col md:flex-row gap-[0.5rem] w-full ",children:[i&&(0,u.jsx)(ey.Button,{...i}),s&&a&&(0,u.jsx)(ey.Button,{...a,link:{url:"/".concat(o||"cs","/").concat((0,p.q2)("orders",o||p.SQ.czech)).concat(c?"/".concat(c):""),text:null===(t=ej.k.showDetailsLabel)||void 0===t?void 0:t[o||"cs"]}})]})]})},eC=n(52870);let eD=e=>({loginButton:{variant:"primary",size:"medium",link:{url:"/",text:"cs"===e?"Přihl\xe1sit se":"Prihl\xe1siť sa"}},registerButton:{variant:"primary",link:{url:(0,eC.T)("registration",e),text:"cs"===e?"registrovat se":"registrovať sa"}},guestButton:{variant:"secondary",iconLeft:!0,icon:"MdArrowForward",link:{url:"/",text:"cs"===e?"Pokračovat jako host":"Pokračovať ako hosť"}},email:{placeholder:"cs"===e?"Vaše e-mailov\xe1 adresa":"Vaša e-mailov\xe1 adresa",errorMessages:{criteriaNotMet:"cs"===e?"Zadejte platnou e-mailovou adresu.":"Zadajte platn\xfa e-mailov\xfa adresu"}},password:{placeholder:"Vaše heslo",passwordCriteria:{minOneUpperCase:"cs"===e?"Minimaln\xed počet velk\xfdch p\xedsmen 1":"Minim\xe1lny počet veľk\xfdch p\xedsmen 1",minAndMaxCharacters:"cs"===e?"Minim\xe1ln\xed počet znaků 8 a max. 20":"Minim\xe1lny počet znakov 8 a max. 20",minOneNumber:"cs"===e?"Minimaln\xed počet č\xedsel 1":"Minim\xe1lny počet č\xedsel 1"},errorMessages:{criteriaNotMet:"cs"===e?"Zadejte platn\xe9 heslo":"Zadajte platn\xe9 heslo"},showPasswordLabel:"cs"===e?"Zobrazit heslo":"Zobraziť heslo"},forgotPassword:"cs"===e?"Zapomenut\xe9 heslo?":"Zabudnut\xe9 heslo?",errorMessages:{userNotFound:"Uživatelsk\xe9 jm\xe9no nebo heslo je nespr\xe1vn\xe9"}});var eS=n(55711),eI=n(7177),eE=n(70212),ez=n(73333),eT=n(63993),e_=n(53173),eL=e=>{var t,n,l,i,a,r,o;let{loginButton:s,registerButton:d,guestButton:c,className:m,email:p,password:v,errorMessages:f,forgotPassword:x,lang:h,setIsGuest:y}=e,[b,j]=(0,ek.useState)(!1),[w,k]=(0,ek.useState)(""),[N,P]=(0,ek.useState)(!1),{refreshUser:C}=(0,eg.a)(),D=()=>{j(e=>!e)},S=async e=>{let{email:t,password:n}=e;P(!0);try{let e=await (0,ez.x)({email:t,password:n,errorMessages:f});if(!e.success){P(!1),k(e.error||"");return}C()}catch(e){P(!1),console.error("Login Failed:",e),k((null==f?void 0:f.userNotFound)||"")}};return(0,u.jsxs)(ew.E.div,{className:(0,eN.m6)(m," flex flex-col lg:flex-row  sm:py-0 lg:gap-[5rem] pb-[2.5rem]  w-screen md:w-full "),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,u.jsxs)("div",{className:" flex flex-col  items-center pb-[2rem]  w-full text-center h-auto px-[1.25rem]",children:[(0,u.jsx)("h4",{className:"h4 font-medium font-human mb-[0.5rem] text-start lg:text-center text-grey-1000",children:null===(t=ej.k.haveAccountLabel)||void 0===t?void 0:t[h||"cs"]}),(0,u.jsx)("p",{className:"p1 font-human text-start lg:text-center mb-[2rem] lg:mb-[2.5rem] text-grey-1000",children:null===(n=ej.k.loginToAccountLabel)||void 0===n?void 0:n[h||"cs"]}),(0,u.jsx)(eT.J9,{initialValues:{email:"",password:""},validationSchema:g.Z,onSubmit:async e=>await S(e),style:{width:"100%"},children:e=>{var t;let{errors:n,touched:l,isValid:i}=e;return(0,u.jsxs)(eT.l0,{className:"w-full",children:[(0,u.jsx)(eT.gN,{name:"email",as:eS.I,className:"w-full",placeholder:"".concat(null==p?void 0:p.placeholder),isError:n.email&&l.email||""!==w,errorMessage:n.email&&l.email?null==p?void 0:null===(t=p.errorMessages)||void 0===t?void 0:t.criteriaNotMet:""}),(0,u.jsx)(eT.gN,{name:"password",as:eS.I,className:"my-[0.5rem] w-full",placeholder:"".concat(null==v?void 0:v.placeholder),typeIn
1put:b?"text":"password",isError:""!==w,errorMessage:w}),(0,u.jsxs)("div",{className:"flex justify-between items-center ",children:[(null==v?void 0:v.showPasswordLabel)&&(0,u.jsx)("div",{onClick:D,onKeyDown:D,children:(0,u.jsx)(eI.Z,{label:"".concat(null==v?void 0:v.showPasswordLabel),checked:b,className:"mt-[0.5rem]",onChange:D})}),x&&(0,u.jsx)(e_.LocalizedLink,{href:(0,eC.T)("forgotPassword",h),className:"text-primary-spring underline underline-offset-2",children:x})]}),(0,u.jsx)(ey.Button,{...s,type:"submit",size:"medium",disabled:N||!i,className:"mb-[1rem] lg:mb-[1.5rem] mt-[2rem] lg:mt-[2.5rem]"})]})}}),(0,u.jsx)("p",{className:"p3 font-human text-grey-1000 leading-[160%] w-[90%]",children:null===(l=ej.k.continueGDPRLabel)||void 0===l?void 0:l[h||"cs"]})]}),(0,u.jsxs)("div",{className:"py-[2.5rem] px-[1rem] lg:p-[2rem] bg-[#F7F7FB] h-full w-full lg:h-[65%] flex items-center flex-col ",children:[(0,u.jsx)("h4",{className:"h4 font-medium font-human mb-[0.5rem]",children:null===(i=ej.k.noAccountLabel)||void 0===i?void 0:i[h||"cs"]}),(0,u.jsx)("p",{className:"p1 font-human",children:null===(a=ej.k.loginIntoAccountLabel)||void 0===a?void 0:a[h||"cs"]}),(0,u.jsxs)("div",{className:"flex flex-col lg:w-full items-center justify-center",children:[(0,u.jsx)("div",{className:"min-w-[240px] ",children:(0,u.jsx)(e_.LocalizedLink,{href:(0,eC.T)("registration",h),"aria-label":null===(r=ej.k.registrationLabel)||void 0===r?void 0:r[h||"cs"],className:"inline-block w-full mt-[2rem] mb-[.5rem]",children:(0,u.jsx)(eE.Z,{...d,size:"large",link:{url:(0,eC.T)("registration",h),text:null===(o=ej.k.registrationLabel)||void 0===o?void 0:o[h||"cs"]}})})}),(0,u.jsx)("div",{className:"min-w-[240px] flex items-center justify-center ",children:(0,u.jsx)(ey.Button,{...c,type:"button",size:"large",onClick:()=>y(!0),className:"w-full"})})]})]})]})},eA=n(33145),eB=n(72420),eR=e=>{let{description:t,title:n,image:l,price:i,freePrice:a,className:r,button:o,isDelivery:s,id:d}=e,{setDelivery:c,setPayment:m,delivery:p,payment:v,totalPriceOfProducts:f}=(0,eb.j)(),x=(e,t,n)=>{c({title:e,price:t,id:n})},h=(e,t,n)=>{m({title:e,price:t,id:n})},y=(0,ek.useMemo)(()=>a&&f&&a<f,[a,f]);return(0,u.jsxs)("div",{className:(0,eN.m6)(r,"flex w-full gap-[1rem] md:gap-[4rem] p-[1.25rem] bg-grey-200 border-grey-200 border-2",p.title===n&&"border-primary-spring",v.title===n&&"border-primary-spring"),children:[(0,u.jsxs)("div",{className:"flex items-center gap-[1.25rem]",children:[l&&(0,u.jsx)(eA.default,{src:(null==l?void 0:l.url)||"",alt:(null==l?void 0:l.alt)||"",width:56,height:42.032,className:"w-[2rem] h-[2rem] self-start md:self-center md:w-[56px] md:h-[56px]"}),(0,u.jsxs)("div",{className:"hidden md:block",children:[n&&(0,u.jsx)("h5",{className:"h5",children:n}),t&&(0,u.jsx)("p",{className:"font-human leading-[160%] text-[14px] text-[#646473]",children:t})]})]}),(0,u.jsxs)("div",{className:"flex flex-col md:flex-row w-full md:w-[50%] gap-[1.25rem] md:gap-[4rem] items-center md:text-end justify-center",children:[(0,u.jsxs)("div",{className:"flex flex-col gap-[0.25rem] md:hidden",children:[n&&(0,u.jsx)("h5",{className:"h5",children:n}),t&&(0,u.jsx)("p",{className:"p3",children:t})]}),(0,u.jsxs)("div",{className:"flex items-center  w-full",children:[(0,u.jsxs)("div",{className:"w-full items-end font-human mr-[2.5rem]",children:[(0,u.jsx)("p",{className:"p2 font-medium whitespace-nowrap",children:(0,eB.x)((y||null===i?0:i||0)*1.21).formattedAmount}),(y||null===i?0:i)!==0&&(0,u.jsx)("p",{className:"text-[0.875rem] leading-[1.4rem] tracking-[0.0175rem]  whitespace-nowrap",children:(0,eB.x)(y||null===i?0:i,{withVAT:!1,showVATLabel:!0}).formattedAmount})]}),(0,u.jsx)(ey.Button,{...o,onClick:()=>s?x(n,y||null===i?0:i||0,d):h(n,y||null===i?0:i||0,d)})]})]})]})},eM=e=>{var t;let{deliveryOptions:n,className:l,title:i,lang:a}=e;return(0,u.jsxs)(ew.E.div,{className:(0,eN.m6)(l,"flex flex-col w-full p-0 m-0 "),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,u.jsx)("h4",{className:"h4 mb-[2rem]",children:i}),(0,u.jsx)("div",{className:"flex flex-col gap-[0.5rem] w-full",children:null==n?void 0:n.map((e,t)=>(0,u.jsx)("div",{children:(0,u.jsx)(eR,{...e})},"option-".concat(t)))}),(0,u.jsx)(ey.Button,{variant:"primary",size:"medium",link:{url:"",text:null===(t=ej.k.cartContinueLabel)||void 0===t?void 0:t[a||"cs"]},className:"mt-[2.5rem] self-center md:hidden "})]})}
1,eO=n(78408),eZ=e=>{var t;let{cartItems:n,lang:l}=e,{userData:i}=(0,eg.a)();return(0,u.jsxs)(ew.E.div,{className:"flex flex-col items-start justify-start w-full  gap-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,u.jsxs)("h4",{className:"h4 text-primary-raisin flex flex-nowrap items-center gap-1 ",children:[(0,u.jsx)("span",{children:null===(t=ej.k.cartMainLabel)||void 0===t?void 0:t[l||"cs"]}),(0,u.jsxs)("span",{className:"text-secondary-french font-ibm text-[1.25rem] md:text-[1.5rem] leading-[130%] font-normal mt-[-4px]",children:["(",n.length,")"]})]}),(0,u.jsx)("div",{className:"w-full pb-[2.5rem]",children:null==n?void 0:n.map((e,t)=>(0,u.jsx)("div",{children:(0,u.jsx)(eO.Z,{...e,currency:"Kč",discountPercent:(null==i?void 0:i.discount)||0})},t))})]})},eV=n(92201),eF=n(58447),eU=n(66269),e$=n(33642),eq=n(86909),eH=e=>{var t,n,l,i,a,r,o,s,d,c;let{button:m,className:p,onClick:v,activeSection:f,setActiveSection:x,guestData:h,cartVariant:y,lang:g}=e,{userData:b}=(0,eg.a)(),[j,w]=(0,ek.useState)(!1),k=(0,ek.useRef)(!1),[N,P]=(0,ek.useState)(null),{delivery:C,payment:D,totalPriceOfOrder:S,totalDPH:I,totalDiscount:E,totalPriceOfProducts:z,recyclationFee:T,sendOrder:_,isCartReady:L,isCartSaving:A}=(0,eb.j)(),B=(0,ek.useMemo)(()=>{if(j||!L||A||3===f&&(null==N?void 0:N.retryable)===!1)return!0;let e=h||b;if(1===f&&!(0,eq.Z)(e)||2===f&&""===C.title||3===f&&(null==D?void 0:D.title)===""||4===f&&""===C.title)return!0},[f,C.title,null==D?void 0:D.title,j,L,A,N,b,h]),R="p2 text-[14px] font-light flex w-full justify-between items-end text-grey-1000 py-[2px]",M="p2 !text-[16px] font-medium text-primary-raisin",O=e=>{let{label:t,value:n,className:l}=e;return(0,u.jsxs)("p",{className:(0,eN.m6)(R,l),children:[t,(0,u.jsx)("span",{className:M,children:(0,eB.x)(n).formattedAmount})]})},Z=async()=>{if(!k.current&&!B&&(null==m||!m.disabled)){k.current=!0,w(!0),P(null);try{await _(),x(4)}catch(e){P({retryable:!(e instanceof e$.p)||e.retryable,orderId:e instanceof e$.p?e.orderId:void 0})}finally{k.current=!1,w(!1)}}};return(0,u.jsxs)("div",{className:(0,eN.m6)("flex flex-col items-center p-[2rem] bg-grey-200 font-human w-full gap-0",y&&"px-4 py-[32px] md:p-[2rem]",p),children:[(0,u.jsx)("h4",{className:"h4 font-medium self-start mb-6 ",children:null===(t=ej.k.summaryMainTitle)||void 0===t?void 0:t[g||"cs"]}),z&&(0,u.jsx)(O,{label:null===(n=ej.k.summaryWithoutTaxLabel)||void 0===n?void 0:n[g||"cs"],value:z}),void 0!==T&&"sk"!==g&&(0,u.jsx)(O,{label:null===(l=ej.k.summaryRecyclationFeeLabel)||void 0===l?void 0:l[g||"cs"],value:null!=T?T:0}),void 0!==E&&(0,u.jsx)(O,{label:null===(i=ej.k.discountLabel)||void 0===i?void 0:i[g||"cs"],value:E}),z&&(0,u.jsx)(O,{label:null===(a=ej.k.summaryDPHLabel)||void 0===a?void 0:a[g||"cs"],value:null!=I?I:0}),void 0===C.price||void 0!==C.price&&(0,u.jsxs)("p",{className:R,children:[null===(r=ej.k.summaryDeliveryLabel)||void 0===r?void 0:r[g||"cs"]," ",(0,u.jsx)("span",{className:(0,eN.m6)(2===f||3===f?M:"font-light"),children:2===f||3===f?void 0===C.price?"-":(0,eB.x)(null===C.price?0:1.21*C.price).formattedAmount:"v dalš\xedm kroku"})]}),(null==D?void 0:D.price)!==void 0&&(0,u.jsxs)("p",{className:R,children:[null===(o=ej.k.summaryPaymentLabel)||void 0===o?void 0:o[g||"cs"]," ",(0,u.jsx)("span",{className:(0,eN.m6)(3===f?M:"font-light"),children:3===f?(null==D?void 0:D.price)===null?(0,eB.x)(0).formattedAmount:(0,eB.x)((null==D?void 0:D.price)*1.21).formattedAmount:"v dalš\xedm kroku"})]}),(0,u.jsx)("div",{className:"w-full h-[1px] bg-secondary-french my-[1rem]"}),z&&(0,u.jsxs)("p",{className:"flex w-full justify-between items-end font-human text-[1rem] leading-[1.6rem] font-normal",children:[(0,u.jsx)("span",{className:"text-[14px] font-light",children:null===(s=ej.k.summaryFullPriceLabel)||void 0===s?void 0:s[g||"cs"]}),(0,u.jsx)("span",{className:"h4 font-medium",children:(0,eB.x)(S).formattedAmount})]}),3===f&&N&&(0,u.jsx)("p",{role:"alert",className:"mt-6 w-full text-sm text-red-700",children:N.retryable?"sk"===g?"Objedn\xe1vku sa nepodarilo odoslať. Obsah koš\xedka zostal zachovan\xfd. Sk\xfaste to znova.":"Objedn\xe1vku se nepodařilo odeslat. Obsah koš\xedku zůstal zachovan\xfd. Zkuste to znovu.":"sk"===g?"Dokončenie objedn\xe1vky sa nepod
1arilo overiÅ¥. Obsah koÅ¡\xedka zostal zachovan\xfd. Pred ďalÅ¡\xedm odoslan\xedm pros\xedm kontaktujte [email protected], aby nevznikla duplicitn\xe1 objedn\xe1vka.".concat(N.orderId?" Referenčn\xe9 č\xedslo: ".concat(N.orderId,"."):""):"Dokončen\xed objedn\xe1vky se nepodařilo ověřit. Obsah koÅ¡\xedku zůstal zachovan\xfd. Před dalÅ¡\xedm odesl\xe1n\xedm pros\xedm kontaktujte [email protected], aby nevznikla duplicitn\xed objedn\xe1vka.".concat(N.orderId?" Referenčn\xed č\xedslo: ".concat(N.orderId,"."):"")}),(0,u.jsx)(ey.Button,{...m,type:"button",variant:"primary",size:"large",link:{url:"",text:3===f?j?"sk"===g?"Odosielam objedn\xe1vku…":"Odes\xedl\xe1m objedn\xe1vku…":(null==N?void 0:N.retryable)?"sk"===g?"Sk\xfasiÅ¥ znova":"Zkusit znovu":null===(d=ej.k.finishOrderLabel)||void 0===d?void 0:d[g||"cs"]:null===(c=ej.k.nextOrderTabLabel)||void 0===c?void 0:c[g||"cs"]},onClick:3===f?Z:B||(null==m?void 0:m.disabled)?void 0:v,className:"mt-[3rem] w-full",disabled:B||(null==m?void 0:m.disabled)})]})},eJ=e=>{let{left:t,onClick:n,activeSection:l,setActiveSection:i,isGuest:a,cartItems:r,guestData:o,lang:s,isLoading:d}=e,[c,m]=ek.useState(window.innerWidth);(0,ek.useEffect)(()=>{let e=()=>m(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[window.innerWidth]);let{userData:p}=(0,eg.a)();return(0,u.jsx)(eF.Z,{layout:{presentation:eU.c.Default,gap:0},className:"flex h-full items-center justify-center flex-col lg:flex-row box-border mx-0 pt-10 pb-2",children:l&&4===l||!p&&1===l&&!a||c<769&&1===l?(0,u.jsx)(eV.Z,{className:"h-full",leftChild:t,cartVariant:!0}):(0,u.jsx)("div",{children:(0,u.jsx)(eV.Z,{cartVariant:!0,className:"h-full",leftChild:t,rightChild:(0,u.jsx)(eH,{cartVariant:!0,activeSection:l,setActiveSection:i,guestData:o,cartItems:r,lang:s,className:"w-[100vw] xl:w-[344px]",button:{type:"button",link:{url:"",text:"pokračovat"},variant:"primary",onClick:n,disabled:d},onClick:n})})})})},eK=n(27648),eG=e=>{let{links:t,copyright:n,className:l}=e;return(0,u.jsxs)("div",{className:(0,eN.m6)("flex flex-col-reverse gap-8 lg:flex-row lg:items-center justify-between py-10 px-[2rem] border-primary-raisin border-t",l),children:[n&&(0,u.jsx)("p",{className:"p2 text-grey-1000 leading-relaxed",children:n}),(0,u.jsx)("div",{className:"flex flex-col gap-y-4 md:flex-row md:gap-[24px] lg:gap-[53px] lg:gap-y-0 text-grey-800 font-medium",children:null==t?void 0:t.map((e,t)=>(0,u.jsx)(eK.default,{href:null==e?void 0:e.url,children:e.text},t))})]})},eW=n(69597),eQ=n(82278),eY=e=>{var t;let{activeSection:n,setActiveSection:l,lang:i}=e,{delivery:a,products:r}=(0,eb.j)(),{userData:o,guestData:s}=(0,eg.a)(),d=(0,ek.useMemo)(()=>{var e,t,n,l;return[{label:null===(e=ej.k.cartMainLabel)||void 0===e?void 0:e[i||"cs"],value:"0"},{label:null===(t=ej.k.cartDeliveryInformationLabel)||void 0===t?void 0:t[i||"cs"],value:"1",close:0===r.length},{label:null===(n=ej.k.summaryDeliveryMenu)||void 0===n?void 0:n[i||"cs"],value:"2",close:s?!(0,eq.Z)(s):!(0,eq.Z)(o)},{label:null===(l=ej.k.summaryPaymentMenu)||void 0===l?void 0:l[i||"cs"],value:"3",close:!a.title}]},[i,r.length,o,s,a]);return(0,u.jsxs)("div",{className:" w-full sticky top-0 bg-white z-50 ",children:[(0,u.jsx)(eQ.C,{backButton:{link:{url:"/",text:null===(t=ej.k.cartContinueShoppingLabel)||void 0===t?void 0:t[i||"cs"]},type:"link",variant:"terciary",iconLeft:!0,iconType:"square",icon:"MdArrowBack"},logoImage:{src:"/logos/czechphone_logo.svg",alt:"logo",width:240,height:54,className:"self-center justify-center"}}),4!==n&&(0,u.jsx)(eW.k,{activeIndex:n,items:d,className:"justify-center",onItemClick:e=>{let{value:t}=e;return l(Number(t))}})]})};let eX=e=>({title:"cs"===e?"Děkujeme":"Ďakujeme",subtitle:"cs"===e?"VaÅ¡e objedn\xe1vka se zpracov\xe1v\xe1, budeme v\xe1s kontaktovat.":"VaÅ¡a objedn\xe1vka sa spracov\xe1va, budeme v\xe1s kontaktovaÅ¥.",button:{type:"link",link:{url:"/",text:"hotovo"},variant:"primary",size:"medium"},secondaryButtom:{type:"link",link:{url:"/ucet/objednavky",text:"cs"===e?"zobrazit detail":"zobraziÅ¥ detail"},variant:"secondary",size:"medium"}});var e0=n(59899),e1=e=>{var t,n,l;let{lang:i,initialSettings:a}=e,[r,o]=(0,ek.useState)(0),[s,d]=(0,ek.useState)(!1),[c,v]=(0,ek.useState)(!1),[f,x]=(0,ek.useState)(!1),h=null==a?void 0:null===(t=a.footer)||void 0===t?void 0:t.footerLinks,{productsData:y,setUserOrderData:g,delivery:b,isCartReady:j,isCartSaving:w,cartError:k,hasCompletedOrder:N,clearCart:P,products:C}=(0,eb.j)(),{guestData:D,setGuestData:S,userData:I}=(0,eg.a)();if((0,ek.useEffect)(()=>
1{if(D){g(D);return}I&&g(I)},[I,D,g]),(0,ek.useEffect)(()=>{o(N?4:0)},[N]),(!j||!y)&&!N)return(0,u.jsxs)("div",{role:"status",className:"min-h-[50vh] p-8 text-center font-human",children:[k||("sk"===i?"Nač\xedtavam koš\xedk…":"Nač\xedt\xe1m koš\xedk…"),k&&C.length>0&&(0,u.jsx)("button",{type:"button",className:"block mx-auto mt-4 underline",disabled:w,onClick:()=>{P().catch(()=>{})},children:"sk"===i?"Vypr\xe1zdniť koš\xedk":"Vypr\xe1zdnit koš\xedk"})]});if(!(null==y?void 0:y.length)&&!N&&!w)return(0,u.jsxs)("div",{className:"min-h-[50vh] p-8 text-center font-human",children:[(0,u.jsx)("h1",{className:"h4 mb-4",children:"sk"===i?"V\xe1š koš\xedk je pr\xe1zdny":"V\xe1š koš\xedk je pr\xe1zdn\xfd"}),(0,u.jsx)("a",{className:"underline",href:"/".concat(i||"cs"),children:"sk"===i?"Pokračovať v n\xe1kupe":"Pokračovat v n\xe1kupu"})]});let E=y||[],z=[(0,u.jsx)(eZ,{cartItems:E,lang:i},"ProductsCart"),I||s?(0,u.jsx)(m.default,{fieldsContent:ep(i||p.SQ.czech),slugArray:[],isCart:!0,lang:i,isGuest:s,activeSection:r,setActiveSection:o,setGuestData:e=>S(e),dataContent:ev(i||p.SQ.czech),validate:c,onValidated:e=>{v(!1),x(!1),e&&o(r+1)}},"AccountDetails"):(0,u.jsx)(eL,{className:"w-full",...eD(i||"cs"),lang:i,activeSection:r,setActiveSection:o,setIsGuest:e=>{d(e)}},"LoginCart"),(0,u.jsx)(eM,{lang:i,deliveryOptions:ef,title:null===(n=ej.k.summaryDeliveryMenu)||void 0===n?void 0:n[i||"cs"]},"DeliveryOptions"),(0,u.jsx)(eM,{lang:i,deliveryOptions:"gls"===b.id?ex.deliveryOptions:eh.deliveryOptions,title:null===(l=ej.k.summaryPaymentMenu)||void 0===l?void 0:l[i||"cs"]},"PaymentOptions"),(0,u.jsx)(eP,{...eX(i||"cs"),lang:i},"ThankCart")];return(0,u.jsxs)("div",{className:"p-0 m-0 w-full min-h-[100vh] flex flex-col justify-center items-center ",children:[(0,u.jsx)(eY,{activeSection:r,setActiveSection:o}),(0,u.jsx)("div",{className:"flex-grow flex flex-col justify-between w-full",children:(E.length>0||4===r||N)&&(0,u.jsx)(eJ,{onClick:()=>{1===r&&(I||s)?(x(!0),v(!0)):o(r+1)}
1,activeSection:r,lang:i,slugArray:[],isGuest:s,guestData:D,cartItems:E,left:z[r]||z[0],setActiveSection:o,isLoading:f&&1===r})}),(0,u.jsx)(eG,{copyright:"\xa9 ".concat(new Date().getFullYear(),". Czechphone. Všechna prava vyhrazena."),links:(null==h?void 0:h.map(e=>{var t,n;let l=(0,e0.Z)({link:e,_type:"button"});return{text:(null==l?void 0:null===(t=l.link)||void 0===t?void 0:t.text)||"",url:(null==l?void 0:null===(n=l.link)||void 0===n?void 0:n.url)||""}}))||[],className:"w-full"})]})}},52870:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var l=n(97604);let i=(e,t)=>{let n=t||l.SQ.czech;return(0,l.q2)(e,n)}},32196:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var l=n(26705),i=n(20955),a=n(58447),r=n(66269),o=n(53335),s=n(48614),d=n(7336),c=n(87227),u=e=>{let{categories:t,visibleItems:n,className:a}=e,[r,u]=(0,i.useState)(t.reduce((e,t)=>(e[t.title]=!t.initiallyCollapsed,e),{})),m=e=>{u(t=>({...t,[e]:!t[e]}))},p=e=>!0===e?(0,l.jsx)("div",{className:"flex items-center justify-center w-full h-full",children:(0,l.jsx)("div",{className:"w-[20px] h-[20px] flex items-center justify-center bg-primary-spring my-auto",children:(0,l.jsx)(c.J,{name:"MdCheck",className:"text-white w-[14px] h-[14px] mx-auto "})})}):(0,l.jsx)("div",{className:"flex items-center justify-center w-full h-full",children:(0,l.jsx)("div",{className:"block w-[16px] h-[1.5px] bg-[#B9B9C3]"})}),v=e=>"boolean"==typeof e||null===e?p(e):(0,l.jsx)("div",{className:"flex items-center justify-center w-full h-full",children:(0,l.jsx)("span",{className:"text-[14px] leading-[160%] font-human font-[400]",children:e})}),f=e=>n.includes(e);return(0,l.jsx)("div",{className:(0,o.m6)("w-full",a),children:t.map((e,t)=>(0,l.jsxs)("div",{className:"border-[#B9B9C3] border-b",children:[(0,l.jsx)("div",{className:"flex items-center justify-between h-[52px] md:h-[64px] pl-[12px] md:pl-[56px] pr-[12px] md:pr-[20px]   text-primary-raisin  ",children:(0,l.jsxs)("div",{className:(0,o.m6)("flex-1 flex items-center justify-between ",e.isCollapsible?"cursor-pointer":""),onClick:()=>e.isCollapsible&&m(e.title),onKeyDown:t=>{"Enter"===t.key&&e.isCollapsible&&m(e.title)},role:e.isCollapsible?"button":void 0,tabIndex:e.isCollapsible?0:void 0,children:[(0,l.jsx)("h3",{className:"text-[12px] md:text-[14px] leading-[120%]  tracking-[2.5px] font-bold uppercase font-human",children:e.title}),e.isCollapsible&&(0,l.jsx)(c.J,{name:r[e.title]?"MdKeyboardArrowDown":"MdKeyboardArrowUp",className:"w-[24px] h-[24px]  md:w-[28px]md:h-[28px] "})]})}),(0,l.jsx)(s.M,{children:(!e.isCollapsible||r[e.title])&&(0,l.jsx)(d.E.div,{initial:{height:"auto",opacity:1},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:"overflow-hidden",children:(0,l.jsx)("div",{className:"grid grid-cols-[144px_1fr] md:grid-cols-[250px_1fr] lg:grid-cols-[320px_1fr]",children:e.rows.map((t,n)=>(0,l.jsxs)("div",{className:"contents",children:[(0,l.jsx)("div",{className:(0,o.m6)("bg-grey-200 py-3 px-[12px] md:px-[56px] flex items-center  border-[#B9B9C3] border-r ",n===e.rows.length-1?"":"border-b"),children:(0,l.jsx)("span",{className:"text-[#232332] font-ibm leading-[160%] text-[14px] font-[500] ",children:t.label})}),(0,l.jsx)("div",{className:(0,o.m6)("bg-grey-200  border-[#B9B9C3]  flex flex-row ",n===e.rows.length-1?"":"border-b"),children:t.values.map((e,t)=>(0,l.jsx)("div",{className:(0,o.m6)("w-full text-center justify-center items-center transition-opacity duration-300 border-[#B9B9C3] last:border-r-0 border-r py-[12px] px-[20px] h-full",f(t)?"block":"hidden xl:block"),children:v(e)},"value-".concat(t)))})]},"row-".concat(n)))})})})]},"category-".concat(t)))})},m=n(24432),p=n(19764),v=n(62662),f=n(50524);n(7354),n(86968);let x=e=>{let{item:t,isSticky:n}=e;return(0,l.jsxs)(l.Fragment,{children:[t.icon&&(0,l.jsx)("div",{className:"mb-1 transition-all duration-300 ease-in-out ".concat(n?"opacity-0 w-0 h-0":"w-12 h-12"),children:(0,l.jsx)("img",{src:t.icon.url,alt:t.icon.alt||t.title,className:"w-full h-full object-contain"})}),(0,l.jsx)("div",{className:"text-center h-12 ",children:(0,l.jsx)("h5",{className:"h5 text-center",children:t.title})}),t.detailButton&&(0,l.jsx)("div",{className:"flex justify-center transition-all duration-300 ease-in-out  ".concat(n?"opacity-0 h-0 mt-0 ":"mt-3"),children:(0,l.jsx)(f.Button,{...t.detailButton,size:"small",variant:"primary",className:" min-w-[120px]"})})]})};var h=e=>{let{title:t,items:n,swiperRef:i,isNavigationNeeded:a,isSticky:r,isBeginning:o,isEnd:s,goToNextSlide:d,goToPrevSlide:c,handleSlideChange:u,checkNavigationNeeded:f}=e;return(0,l.jsxs)("div",{className:"relative bg-grey-200 z-10  ".concat(r?"shadow-md h-[80] max-h-[80px] md:max-h-[106px] ":"h-[242px] md:h-[274px]"),children:[a&&(0,l.jsxs)("div",{className:"xl:hidden",children:[(0,l.jsx)("div",{className:"absolute left-[144px] md:left-[250px] lg:left-[320px]  top-1/2 transform -translate-x-1/2 -translate-y-1/2 z-10 ",children:(0,l.jsx)(m.h,{onClick:c,className:"bg-grey-600 w-9 h-9 flex items-center justify-center rotate-180",disabled:o,classIcon:"w-5 h-5",icon:"MdArrowForward",label:"PrevButton"})}),(0,l.jsx)("div",{className:"absolute right-0 top-1/2 transform -translate-y-1/2 translate-x-1/2 z-10",children:(0,l.jsx)(m.h,{onClick:d,className:"bg-grey-600 w-9 h-9 flex items-center justify-center",disabled:s,classIcon:"w-5 h-5",icon:"MdArrowForward",label:"NextButton"})})]}),(0,l.jsxs)("div",{className:"grid grid-cols-[144px_1fr] md:grid-cols-[250px_1fr] lg:grid-cols-[320px_1fr] border-b-[2px] border-b-black bg-grey-200 z-10 h-full",children:[(0,l.jsx)("div",{className:"flex bg-grey-200 text-primary-raisin border-r-[1px] border-[#B9B9C3]  h-full",children:(0,l.jsx)("h3",{className:"font-medium transition-all leading-[130%] ".concat(r?"text-[0px] hidden md:block opacity-0 md:text-[18px] lg:text-[22px] duration-100 px-[12px] md:px-[56px] my-[20px] ":"text-[20px] md:text-[28px] lg:text-[32px] duration-300 my-[48px] px-[12px] md:px-[56px]  "," w-1/2"),children:t})}),(0,l.jsxs)("div",{className:"relative overflow-hidden  h-full",children:[(0,l.jsx)(p.tq,{slidesPerView:1,spaceBetween:0,modules:[v.W_],onSlideChange:u,onSwiper:e=>{i&&"object"==typeof i&&(i.current=e),f(e),u(e)},onBreakpoint:e=>{f(e)},breakpoints:{0:{slidesPerView:1,spaceBetween:0}
1,860:{slidesPerView:3,spaceBetween:0},1140:{slidesPerView:4,spaceBetween:0}},className:"w-full xl:!hidden h-full",children:n.map((e,t)=>(0,l.jsx)(p.o5,{className:"border-r-[1px] border-[#B9B9C3] last:border-r-0",children:(0,l.jsx)("div",{className:"flex-shrink-0 w-full h-full text-center py-4 md:py-4 px-6 flex flex-col items-center justify-center md:gap-3 bg-grey-200 transition-transform duration-300 ease-in-out",children:(0,l.jsx)(x,{item:e,isSticky:r})})},"system-slide-".concat(t)))}),(0,l.jsx)("div",{className:"hidden xl:grid xl:grid-cols-5 h-full",children:n.map((e,t)=>(0,l.jsx)("div",{className:"flex-shrink-0 w-full h-full md:w-auto text-center py-0 md:py-4 px-4 flex flex-col items-center justify-center md:gap-3 bg-grey-200 transition-transform duration-300 ease-in-out border-r-[1px] border-[#B9B9C3] last:border-r-0",children:(0,l.jsx)(x,{item:e,isSticky:r})},"system-".concat(t)))})]})]})]})},y=n(36498),g=n(59498),b=e=>{var t,n,o,s;let{title:d,items:c,categories:m,id:p}=e,v=(0,i.useRef)(null),f=(0,i.useRef)(null),x=(0,i.useRef)(null),[b,j]=(0,i.useState)([0,1,2,3]),[w,k]=(0,i.useState)(!1),[N,P]=(0,i.useState)(!1),C=c.length;return(0,i.useEffect)(()=>{{y.ZP.registerPlugin(g.i);let e=null;if(f.current&&x.current){let t=window.innerWidth<991;e=g.i.create({trigger:f.current,start:"top top+=".concat(t?64:128),end:"bottom bottom",onEnter:()=>P(!0),onLeaveBack:()=>P(!1)});let n=()=>{let t=window.innerWidth<991;null==e||e.kill(),e=g.i.create({trigger:f.current,start:"top top+=".concat(t?64:128),end:"bottom bottom",onEnter:()=>P(!0),onLeaveBack:()=>P(!1)})};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n),e&&e.kill()}}return()=>{e&&e.kill()}}},[]),(0,l.jsx)("div",{ref:f,children:(0,l.jsx)(a.Z,{id:p,layout:{presentation:r.c.Default,gap:0},className:"py-10 lg:py-[80px]",children:(0,l.jsx)("div",{className:"w-full",children:(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("div",{ref:x,className:"sticky top-[64px] lg:top-[128px]",children:(0,l.jsx)(h,{title:d,items:c,swiperRef:v,isNavigationNeeded:w,isSticky:N,goToNextSlide:()=>{var e;null===(e=v.current)||void 0===e||e.slideNext()},goToPrevSlide:()=>{var e;null===(e=v.current)||void 0===e||e.slidePrev()},handleSlideChange:e=>{let t=e.activeIndex;j(Array.from({length:Math.min(e.params.slidesPerView,C-t)},(e,n)=>t+n))},checkNavigationNeeded:e=>{k(C>e.params.slidesPerView)},isBeginning:null!==(o=null===(t=v.current)||void 0===t?void 0:t.isBeginning)&&void 0!==o&&o,isEnd:null!==(s=null===(n=v.current)||void 0===n?void 0:n.isEnd)&&void 0!==s&&s})}),(0,l.jsx)(u,{categories:m,visibleItems:b})]})})})})}},23273:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var l=n(26705),i=n(27648),a=n(53335),r=n(24993),o=e=>{let{className:t,subtitle:n,icon:o,title:s,position:d,address:c,phone:u,email:m,smallText:p,smallTextLeft:v}=e;return(0,l.jsxs)("div",{className:(0,a.m6)("block relative w-full xxl:h-[353px] xxl:max-w-[432px] bg-grey-200 p-5 sm:p-4 md:p-6 lg:p-5 xl:p-10",t),children:[n&&o&&(0,l.jsxs)("div",{className:"topBar flex flex-nowrap items-center mb-6 md:mb-8 gap-4",children:[(0,l.jsx)("div",{className:"icon w-14 md:w-16 h-14 md:h-16 relative flex flex-nowrap items-center justify-center bg-primary-spring",children:(0,l.jsx)(r.default,{name:o,className:"!w-6 !h-6 text-white"})}),(0,l.jsx)("h3",{className:"h5 text-[16px] text-primary-raisin",children:n})]}),s&&(0,l.jsxs)("div",{className:"flex justify-start items-baseline text-primary-raisin mb-1",children:[p&&!0===v&&(0,l.jsxs)("h6",{className:"h6",children:[p,"\xa0"]}),(0,l.jsx)("h4",{className:"h4",children:s}),p&&!v&&(0,l.jsxs)("h6",{className:"h6",children:["\xa0",p]})]}),d&&(0,l.jsx)("div",{className:"p3 md:text-[14px] text-grey-800 mb-6 md:mb-9",children:d}),c&&(0,l.jsx)("div",{className:"flex flex-col items-start justify-start -mt-2",children:null==c?void 0:c.map((e,t)=>(0,l.jsx)("p",{className:"p1 text-[16px] text-grey-1000",children:e.text},t))}),u&&(0,l.jsxs)(i.default,{href:"tel:".concat(u),className:"p1 text-secondary-dark flex flex-nowrap items-center gap-2 md:gap-3 mb-2",children:[(0,l.jsx)("div",{className:"icon flex flex-nowrap items-center justify-center w-6 h-6 bg-transparent",children:(0,l.jsx)(r.default,{name:"MdCall",className:"text-grey-1000 !w-5 !h-5"})}),(0,l.jsx)("span",{children:u})]}),m&&(0,l.jsxs)(i.default,{href:"mailTo:".concat(m),className:"p1 text-secondary-dark flex flex-nowrap items-center gap-2 md:gap-3",children:[(0,l.jsx)("div",{className:"icon flex flex-nowrap items-center justify-center w-6 h-6 bg-transparent",children:(0,l.jsx)(r.default,{name:"MdDrafts",className:"text-grey-1000 !w-5 !h-5"})}),(0,l.jsx)("span",{children:m})]})]})},s=n(66269),d=n(58447),c=n(7336),u=e=>{let{contacts:t,...n}=e,i={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.5}}};return(0,l.jsx)(d.Z,{id:n.id,layout:{presentation:s.c.Default,gap:0},className:"py-10 lg:py-[80px]",...n,children:t&&(0,l.jsx)(c.E.div,{variants:{hidden:{opacity:0}
1,show:{opacity:1,transition:{staggerChildren:.2}}},initial:"hidden",animate:"show",className:"grid grid-cols-1 sl:grid-cols-2 lg:grid-cols-3 gap-2 xxl:flex xxl:flex-wrap xxl:justify-center",children:t.map((e,t)=>(0,l.jsx)(c.E.div,{variants:i,className:"relative w-full xxl:h-[353px] xxl:max-w-[432px]",children:(0,l.jsx)(o,{...e,className:"h-full"})},t))})})}},19898:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var l=n(26705),i=n(20955),a=n(37665),r=n(53335),o=n(50524),s=e=>{let{className:t,nameFile:n,link:i}=e;return!n&&i?null:(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-nowrap items-center justify-between w-full py-5 md:py-7 border-t-[1px] border-t-grey-600",t),children:[(0,l.jsx)("span",{className:"p2 block relative text-secondary-dark max-w-[160px] xs:max-w-full",children:n}),i&&(0,l.jsx)(o.Button,{link:i,variant:"terciary",type:"link",icon:"MdDownload",iconRight:!0,download:!0,className:"max-w-[200px]"})]})},d=n(66269),c=n(58447),u=n(7336),m=e=>{let{title:t,types:n,idSection:r,id:o}=e,[m,p]=(0,i.useState)(-1),v=e=>{p(e===m?-1:e)};return(0,l.jsxs)(c.Z,{id:r||o,layout:{presentation:d.c.Default,gap:0},className:"py-10 lg:py-[80px] text-primary-raisin scroll-mt-[125px] lg:scroll-mt-[210px]",children:[(0,l.jsx)(u.E.h2,{initial:{opacity:0,transform:"translateY(40px)"},whileInView:{opacity:1,transform:"translateY(0)",transition:{duration:.5,delay:.25,ease:"circIn"}},viewport:{once:!0},className:"h2 mb-8 md:mb-10 lg:mb-12",children:t}),(0,l.jsx)("div",{className:"flex flex-col w-full justify-start items-start",children:null==n?void 0:n.map((e,t)=>{var n,r;return e.title?(0,l.jsx)(a.Z,{className:"w-full",title:e.title,icon:e.icon,activeAccordion:m,indexAccordion:t,onClickAccordion:()=>v(t),children:null===(n=e.files)||void 0===n?void 0:n.map((e,t)=>(0,i.createElement)(s,{className:"w-full",...e,key:t}))},t):(0,l.jsx)(i.Fragment,{children:null===(r=e.files)||void 0===r?void 0:r.map((e,t)=>(0,i.createElement)(s,{className:"w-full",...e,key:t}))},t)})})]})}},19417:function(e,t,n){"use strict";n.r(t);var l=n(26705),i=n(20955),a=n(37665),r=n(50524),o=n(58447),s=n(66269),d=n(31256);t.default=e=>{let{title:t,description:n,button:c,accordions:u,id:m}=e,[p,v]=(0,i.useState)(void 0),f=e=>{v(e===p?void 0:e)};return(0,l.jsx)(o.Z,{id:m,layout:{presentation:s.c.Default,gap:0},className:" py-[2.5rem] sm:py-[80px]",children:(0,l.jsxs)("div",{className:"grid lg:col-span-1 grid-cols-1 lg:grid-cols-3",children:[(0,l.jsxs)("div",{className:"col-span-1 font-human",children:[(0,l.jsxs)(d.default,{animation:{initial:{transform:"translateY(40px)",opacity:0},whileInView:{transition:{duration:.5,delay:.25,ease:"circIn"},transform:"translateY(0)",opacity:1},viewport:{once:!0}},children:[t&&(0,l.jsx)("h2",{className:"h2 text-primary-raisin mb-[0.625rem] sm:mb-[1.25rem]",children:t}),n&&(0,l.jsx)("p",{className:"text-secondary-dark text-[1rem] leading-[1.6rem] font-normal sm:text-[1.125rem] sm:leading-[1.8rem] mb-[2rem] lg:mb-[4rem]",children:n})]}),c&&(0,l.jsx)(d.default,{animation:{initial:{opacity:0,transform:"translateY(40px)"},whileInView:{opacity:1,transform:"translateY(0)",transition:{duration:.5,delay:.25,ease:"circIn"}},viewport:{once:!0}},children:(0,l.jsx)("div",{className:"hidden lg:block",children:(0,l.jsx)(r.Button,{variant:"secondary",...c,size:"large",className:"max-w-[240px]"})})})]}),(0,l.jsxs)("div",{className:"flex items-center flex-col col-span-1 sm:col-span-2 lg:pl-[5rem] xxl:pl-[7.5rem]",children:[null==u?void 0:u.map((e,t)=>(0,l.jsx)("div",{className:"w-full block",children:(0,l.jsx)(a.Z,{activeAccordion:p,onClickAccordion:()=>f(t),...e})},t)),c&&(0,l.jsx)("div",{className:"flex justify-center lg:hidden w-full",children:(0,l.jsx)(r.Button,{variant:"secondary",...c,size:"large",className:"max-w-[240px] w-full mt-[2.5rem] mx-auto"})})]})]})})}},56661:function(e,t,n){"use strict";n.r(t);var l=n(26705),i=n(20955),a=n(58447),r=n(53335),o=n(50524),s=n(66269),d=n(63993),c=n(55711),u=n(7336),m=n(71669),p=n(34422);let v=[{name:"fullName",label:"Jm\xe9no a př\xedjmen\xed",type:"text"},{name:"email",label:"Email",type:"email"},{name:"phone",label:"Telefon",type:"tel"},{name:"message",label:"Zpr\xe1va",type:"textarea"},{name:"checkForm",label:"Souhlas s podm\xednkami",type:"checkbox"},{name:"checkForm",label:"Souhlas s podm\xednkami",type:"checkbox"},{name:"companyName",label:"N\xe1zev firmy",type:"text"},{name:"ico",label:"IČO",type:"text"},{name:"dic",label:"DIČ",type:"text"}];t.default=e=>{let{className:t,layoutForm:n,textButton:f,inputs:x,checkboxLabel:h,formHeading:y,emailContent:g}=e,[b,j]=(0,i.useState)(!1);if(!x)return null;let w=x.map(e=>({...e,type:e.type||"text"})),k=(0,m.eK)(w).shape({checkForm:p.O7().oneOf([!0],"Mus\xedte souhlasit s podm\xednkami").required()}),N=(()=>{let e={};for(let t of x)e[t.name]="";return{...e,checkForm:!1}})(),P=()=>{switch(n){case"column":return"block";case"grid":return"grid grid-cols-1 md:grid-cols-2 gap-2 w-full";default:return""}},C=async(e,t)=>{let n={greeting:(null==g?void 0:g.greeting)||"Dobr\xfd den, evidujeme nov\xfd z\xe1jem o individu\xe1ln\xed Å¡kolen\xed",infoText:(null==g?void 0:g.infoText)||"V př\xedpadě jak\xfdchkoliv dotazů nebo probl\xe9mů n\xe1s nev\xe1hejte kontaktovat na adrese [email protected].",items:Object.keys(e).map(t=>{var n;return{label:(null===(n=v.find(e=>e.name===t))||void 0===n?void 0:n.label)||t.charAt(0).toUpperCase()+t.slice(1),value:e[t]}})};try{let e=await fetch("/api/email/form",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok)throw Error("Error submitting form");await e.json(),t.resetForm(),j(!0)}catch(e){console.error("Form submission failed:",e)}},D=()=>{j(!1)};return(0,l.jsx)(a.Z,{layout:{presentation:s.c.Default,gap:0},className:"pb-10 md:pb-[60px] pt-2 md:pt-[44px]",children:(0,l.jsxs)(u.E.div,{initial:{opacity:0}
1,whileInView:{opacity:1,transition:{duration:.5,delay:.25,ease:"easeInOut"}},viewport:{once:!0},className:(0,r.m6)("mx-auto max-w-[868px] block w-full",t),children:[y&&(0,l.jsx)("h4",{className:"h4 text-black mb-[1.25rem] md:mb-[1.5rem] text-center",children:y}),(0,l.jsx)(d.J9,{initialValues:N,validationSchema:k,validateOnChange:!0,validateOnBlur:!0,validateOnMount:!0,onSubmit:(e,t)=>{C(e,t)},children:e=>{let{errors:t,touched:i,isValid:a,dirty:s,values:m}=e;return(0,l.jsxs)(d.l0,{children:[(0,l.jsx)("div",{className:(0,r.m6)(P()),children:null==x?void 0:x.map((e,a)=>(0,l.jsxs)("div",{className:(0,r.m6)("grid"===n&&"textarea"===e.type?"col-span-2":""),children:[(0,l.jsx)(d.gN,{as:c.I,name:e.name,typeInput:e.type,placeholder:e.placeholder,classForInput:"!mb-0"}),t[e.name]&&i[e.name]&&(0,l.jsx)("p",{className:"p4 text-red",children:t[e.name]})]},a))}),(0,l.jsxs)("div",{className:"flex flex-nowrap items-center justify-center w-full my-6",children:[(0,l.jsxs)("label",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(d.gN,{type:"checkbox",name:"checkForm",className:"mr-2 h-4 w-4 text-primary border-2 border-gray-300 rounded focus:ring-primary focus:ring-2"}),(0,l.jsx)("span",{className:"p2 text-primary-raisin",children:h})]}),t.checkForm&&i.checkForm&&(0,l.jsx)("p",{className:"p4 text-red ml-2",children:t.checkForm})]}),(0,l.jsx)("div",{className:"flex flex-nowrap items-center justify-center w-full",children:b?(0,l.jsxs)(u.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.5},className:"flex flex-col items-center",children:[(0,l.jsx)("span",{className:"font-medium text-green-600 mb-4",children:"Formul\xe1ř byl \xfaspěšně odesl\xe1n"}),(0,l.jsx)(o.Button,{variant:"secondary",size:"large",onClick:D,className:"max-w-[240px]",link:{text:"Odeslat dalš\xed"}})]}):(0,l.jsx)(o.Button,{className:(0,r.m6)("w-full max-w-[240px]",(!a||!s||!m.checkForm)&&"opacity-60"),variant:"primary",size:"large",link:{text:f},type:"submit",disabled:!a||!s||!m.checkForm})})]})}},b?"submitted":"notSubmitted")]})})}},28008:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var l=n(26705),i=n(50524),a=n(53335),r=n(7336),o=e=>{var t;let{title:n,button:o,description:s,className:d}=e;return(0,l.jsx)("div",{className:(0,a.m6)(d,"flex flex-col items-start justify-center h-auto"),children:(0,l.jsxs)("div",{children:[(0,l.jsxs)(r.E.div,{initial:{transform:"translateY(20px)",opacity:0},whileInView:{transition:{duration:.5,ease:"easeInOut"},transform:"translateY(0)",opacity:1},viewport:{once:!0},children:[n&&(0,l.jsx)("h1",{className:"font-human  font-medium text-[40px] leading-[52px] lg:text-[64px] lg:leading-[83px] block text-white mb-8",children:n}),s&&(0,l.jsx)("p",{className:"text-grey-400 p1 lg:mb-20 mb-12 w-full lg:w-[73%] p1 ",children:s})]}),o&&(null==o?void 0:null===(t=o.link)||void 0===t?void 0:t.url)!=="//undefined"&&(0,l.jsx)(r.E.div,{initial:{opacity:0,translateY:20},whileInView:{transition:{duration:.5,delay:.25,ease:"easeInOut"},translateY:0,opacity:1},viewport:{once:!0},children:(0,l.jsx)(i.Button,{...o,className:"max-w-[240px]",variant:"primary",size:"large",darkMode:!0})})]})})},s=n(58447),d=n(66269),c=n(95438);n(22389);var u=n(20955),m=n(72356),p=e=>{var t;let{textBlock:n}=e,[a,r]=(0,u.useState)(!0),p=(0,u.useRef)(null),{currentLanguage:v}=(0,m.o)();return(0,l.jsx)(s.Z,{layout:{presentation:d.c.Default,gap:0},classContainer:"!px-0 !max-w-[1440px] bg-primary-spring pb-[4rem] lg:pb-0 overflow-hidden",children:(0,l.jsxs)("div",{className:"flex flex-col lg:flex-row w-full",children:[(0,l.jsx)(o,{...n,className:"md:w-[55%] md:min-w-[700px] mx-auto lg:mx-0 pt-[4rem] px-[1.25rem] md:pt-[3rem] lg:px-8 lg:px-[4rem] lg:py-[95px] lg:pr-[0rem] bg-primary-spring text-center lg:text-left hideButtonOnMobile"}),(0,l.jsx)("div",{className:"w-full lg:w-[45%] md:min-w-[450px] h-[436px] md:h-[610px] lg:h-[610px] mx-auto lg:mx-0 flex flex-col items-center justify-end gap-[0.5rem] p-[0.5rem] lg:py-[2rem] bg-primary-spring lg:pr-[4rem]",children:(0,l.jsx)(c.y1,{ref:p,src:"/animations/heroanimation-config".concat("cs"===v?"cs":"sk",".lottie"),autoplay:!0,loop:!0,onEvent:e=>{e===c.Bc.LoopComplete&&a&&(r(!1),p.current&&(p.current.seek(35),p.current.play()))}},v)}),(0,l.jsx)("div",{className:"flex justify-center",children:(null==n?void 0:n.button)&&(null===(t=n.button.link)||void 0===t?void 0:t.text)!==""&&(0,l.jsx)(i.Button,{...n.button,className:"max-w-[240px] pt-[4rem] lg:pt-0 lg:hidden",variant:"primary",size:"large",darkMode:!0})})]})})}},9763:function(e,t,n){"use strict";n.d(t,{default:function(){return p}});var l=n(26705),i=n(66269),a=n(58447),r=n(50524),o=n(53335),s=n(55711),d=n(18526),c=n(20955),u=n(31256),m=e=>{var t,n;let i;let{classname:a,title:m,anotation:p,button:v,inputLabel:f,content:x,date:h,ecomailID:y,successMessage:g}=e,[b,j]=(0,c.useState)(""),[w,k]=(0,c.useState)(!1),[N,P]=(0,c.useState)(!1),C=async e=>{try{k(!0);let t=await fetch("/api/ecomail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,listName:y})}),n=await t.json();"Subscriber added successfully"===n.message&&P(!0),k(!1)}catch(e){console.log(e),k(!1)}},D=(0,c.useMemo)(()=>{let e=new Date;return e.setDate(e.getDate()-1),Math.floor(((h?new Date(h):new Date).getTime()-e.getTime())/864e5)},[h]);return(0,l.jsxs)(u.default,{animation:{initial:{opacity:0,transform:"translateY(20px)"}
1,animate:{opacity:1,transform:"translateY(0px)",transition:{duration:.5}}},className:(0,o.m6)(a,"flex flex-col items-start sl:items-center justify-center w-full h-full"),children:[p&&(0,l.jsx)("p",{className:"text-[0.875rem] text-left sl:text-center font-human font-bold mt-[0.75rem] sm:mt-[0] leading-[1.05rem] tracking-[0.175rem] mb-3",children:p.toUpperCase()}),m&&(0,l.jsx)("h1",{className:(0,o.m6)("h1 text-left sl:text-center",x?"mb-8 sm:mb-[2.5rem]":""),children:m}),x&&(0,l.jsx)("div",{className:(0,o.m6)("mx-auto max-w-[868px] block relative",f&&(null==v?void 0:null===(t=v.link)||void 0===t?void 0:t.text)!==void 0&&"mb-12 md:mb-[60px]"),children:(0,l.jsx)(d.Z,{content:x,className:"text-left [&>p]:sl:text-center [&>p]:text-left [&>p]:sm:last-of-type:mb-0 [&>p]:last-of-type:mb-0"})}),f&&(0,l.jsxs)("div",{className:"flex flex-col items-start justify-start sm:items-center mb-6 w-full",children:[D>=0&&(0,l.jsxs)("p",{className:"h4 block mb-5",children:[f," ",h&&(i="",i=0===D?"dnes":"za ".concat(D," ").concat(1===D?"den":D>=2&&D<=4?"dny":"dnů"))]}),(0,l.jsx)(s.I,{className:"font-human max-w-[542px] w-full",typeInput:"email",placeholder:"Vaše e-mailov\xe1 adresa",onChange:e=>{var t;return j(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value)}})]}),v&&(null===(n=v.link)||void 0===n?void 0:n.text)!==""&&!N&&(0,l.jsx)(r.Button,{...v,onClick:()=>f&&C(b),type:f?"button":"link",size:"large",className:"self-start sm:self-center w-full max-w-[320px] ".concat(f?"":"mt-10"),disabled:w}),N&&(0,l.jsx)("p",{className:"text-center text-green-600",children:g})]})},p=e=>(0,l.jsx)(a.Z,{layout:{presentation:i.c.Default,gap:0},className:"box-border md:pt-20 md:pb-10 pt-16 pb-10",classContainer:"",children:(0,l.jsx)("div",{className:"flex flex-col md:flex-row w-full",children:(0,l.jsx)(m,{...e})})})},29123:function(e,t,n){"use strict";n.d(t,{default:function(){return x}});var l=n(26705),i=n(33145),a=n(50524),r=n(53335),o=n(7336),s=e=>{var t,n,i,s;let{anotation:d,title:c,secondaryTitle:u,button1:m,button2:p,classname:v,description:f}=e;return(0,l.jsx)("div",{className:(0,r.m6)(v,"lg:flex lg:flex-col lg:justify-center"),children:(0,l.jsxs)("div",{children:[(0,l.jsxs)(o.E.div,{initial:{transform:"translateY(20px)",opacity:0},whileInView:{transition:{duration:.5,delay:.25,ease:"easeInOut"},transform:"translateY(0)",opacity:1},viewport:{once:!0},children:[d&&(0,l.jsx)("p",{className:"text-[0.875rem] leading-[1.05rem] mb-[0.75rem] font-human tracking-[0.2em] font-bold uppercase text-primary-raisin",children:d}),c&&(0,l.jsx)("h1",{className:"h1",children:c})]}),(0,l.jsxs)(o.E.div,{initial:{transform:"translateY(20px)",opacity:0},whileInView:{transition:{duration:.5,delay:.5,ease:"easeInOut"},transform:"translateY(0)",opacity:1},viewport:{once:!0},children:[u&&(0,l.jsx)("h2",{className:"h4 my-8 lg:my-[2.5rem] block relative",children:u}),f&&(0,l.jsx)("p",{className:"p1 text-secondary-dark",children:f})]}),m&&p&&(0,l.jsxs)(o.E.div,{initial:{opacity:0,transform:"translateY(20px)"},whileInView:{transition:{duration:.5,delay:.5,ease:"easeInOut"},opacity:1,transform:"translateY(0)"},viewport:{once:!0},className:"flex flex-col items-center sm:items-start sm:flex-row gap-3 mt-12 lg:mt-[5rem]",children:[(null==m?void 0:null===(t=m.link)||void 0===t?void 0:t.url)!=="undefined"&&(null==m?void 0:null===(n=m.link)||void 0===n?void 0:n.url)!=="//undefined"&&(0,l.jsx)(a.Button,{...m,type:"link",size:"large",className:"max-w-[240px]"}),(null==p?void 0:null===(i=p.link)||void 0===i?void 0:i.url)!=="undefined"&&(null==p?void 0:null===(s=p.link)||void 0===s?void 0:s.url)!=="//undefined"&&(0,l.jsx)(a.Button,{...p,type:"link",className:"max-w-[240px]",size:"large"})]})]})})},d=e=>{var t;let{title:n,button:i,description:s,className:d}=e;return(0,l.jsx)("div",{className:(0,r.m6)(d,"flex flex-col items-start justify-center h-auto"),children:(0,l.jsxs)("div",{children:[(0,l.jsxs)(o.E.div,{initial:{transform:"translateY(20px)",opacity:0},whileInView:{transition:{duration:.5,ease:"easeInOut"},transform:"translateY(0)",opacity:1},viewport:{once:!0},children:[n&&(0,l.jsx)("h2",{className:"font-human  font-medium text-[40px] leading-[52px] lg:text-[64px] lg:leading-[83px] block text-white mb-8",children:n}),s&&(0,l.jsx)("p",{className:"text-grey-400 p1 lg:mb-20 mb-12 w-full lg:w-[73%] p1 ",children:s})]}),i&&(null==i?void 0:null===(t=i.link)||void 0===t?void 0:t.url)!=="//undefined"&&(0,l.jsx)(o.E.div,{initial:{opacity:0,translateY:20},whileInView:{transition:{duration:.5,delay:.25,ease:"easeInOut"}
1,translateY:0,opacity:1},viewport:{once:!0},children:(0,l.jsx)(a.Button,{...i,className:"max-w-[240px]",variant:"primary",size:"large",darkMode:!0})})]})})},c=n(27648),u=n(20955),m=e=>{var t,n;let{title:o,button:s,image:d,className:m}=e,[p,v]=(0,u.useState)(!1),f=null==s?void 0:null===(t=s.link)||void 0===t?void 0:t.url;return f?(0,l.jsxs)(c.default,{href:f,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:(0,r.m6)(m,"group flex items-center justify-center gap-5 xl:gap-[1.5rem] "),children:[(0,l.jsx)("div",{className:"w-[120px] h-[88px] md:w-[108px] md:h-[80px]  xl:w-[144px] xl:h-[104px] overflow-hidden block relative",children:(null==d?void 0:d.src)&&(null==d?void 0:d.alt)&&(0,l.jsx)(i.default,{src:null==d?void 0:d.src,width:d.width,height:d.height,alt:null==d?void 0:d.alt,className:"object-cover absolute left-0 top-0 w-full h-full transform transition-transform duration-300 scale-100 group-hover:scale-110"})}),(0,l.jsxs)("div",{className:"w-[calc(100%-140px)] md:w-[calc(100%-128px)] xl:w-[calc(100%-168px)]  flex flex-col items-start justify-start gap-[0.75rem] lg:gap-[1.5rem]",children:[o&&(0,l.jsx)("div",{className:"h6 block",children:o}),s&&(0,l.jsx)(a.Button,{...s,type:"button",link:{text:null==s?void 0:null===(n=s.link)||void 0===n?void 0:n.text},active:p,variant:"terciary"})]})]}):null},p=n(58447),v=n(66269),f=n(61199),x=e=>{let{textBlock:t,links:n,hasImage:a,doubleButtonBlock:c,image:u}=e;return(0,l.jsx)(p.Z,{layout:{presentation:v.c.Default,gap:0},className:(0,r.m6)(a?"pb-10 md:pb-[60px]":""),classContainer:"!px-0 !max-w-[1440px] 2xl:!max-w-[1572px]",children:(0,l.jsxs)("div",{className:"flex flex-col lg:flex-row w-full",children:[a?a?(0,l.jsx)(s,{...c,classname:"lg:w-3/5 xxl:w-[calc(100%-599px)] py-[4rem] px-[1.25rem] md:p-[3rem] md:px-8 lg:p-[4rem] md:pr-[4rem] xl:pr-[6rem]"}):void 0:(0,l.jsx)(d,{...t,className:"lg:w-3/5 xxl:w-[calc(100%-552px)]  py-[4rem] px-[1.25rem] md:py-[3rem] md:px-8 lg:px-[4rem] lg:py-[95px] md:pr-[4rem] xl:pr-[10rem] bg-primary-spring "}),a?a&&(null==u?void 0:u.src)&&(null==u?void 0:u.alt)?(0,l.jsxs)("div",{className:"relative w-full lg:w-2/5 xxl:w-[599px] h-[425px] md:h-[520px] lg:h-[600px] xxl:h-[660px] block overflow-hidden",children:[(0,l.jsx)(f.default,{direction:"leftToRight",sorting:10}),(0,l.jsx)(i.default,{src:null==u?void 0:u.src,alt:null==u?void 0:u.alt,width:(null==u?void 0:u.width)||650,height:u.height||650,quality:85,priority:!0,loading:"eager",className:"object-left-top object-cover absolute left-0 top-0 w-full h-full"})]}):void 0:(0,l.jsxs)("div",{className:"relative lg:w-2/5 xxl:w-[552px] flex flex-col items-center justify-center gap-[0.5rem] p-[0.5rem] md:p-8 lg:p-[40px] xl:p-[4rem]",children:[(0,l.jsx)(f.default,{direction:"rightToLeft",preset:"slideIn",sorting:"back",className:"bg-grey-400"}),null==n?void 0:n.map((e,t)=>(0,l.jsx)(o.E.div,{initial:{opacity:0,transform:"translateY(40px)"},whileInView:{opacity:1,transform:"translateY(0)",transition:{duration:.5,delay:.25+.15*t,ease:"circIn"}},viewport:{once:!0},className:"bg-white p-[1rem] sm:p-[1.25rem]  w-full",children:(0,l.jsx)(m,{...e})},t))]})]})})}},68980:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var l=n(26705),i=n(53335),a=n(27648),r=n(24993),o=n(27957),s=e=>{var t;let{title:n,button:s,image:d,className:c}=e,u=null==s?void 0:null===(t=s.link)||void 0===t?void 0:t.url;return u?(0,l.jsxs)(a.default,{href:u,className:(0,i.m6)(c,"group flex items-center justify-center gap-5 xl:gap-[1.5rem] relative"),children:[(null==d?void 0:d.src)&&(null==d?void 0:d.alt)&&(0,l.jsx)("div",{className:"relative w-[108px] h-full min-h-full md:w-[108px] xl:w-[144px] xl:max-h-[104px] overflow-hidden block relative",children:(0,l.jsx)(o.Z,{src:null==d?void 0:d.src,width:d.width,height:d.height,alt:null==d?void 0:d.alt,className:"w-full h-full min-h-full object-cover transition-transform duration-300 group-hover:scale-110"})}),(0,l.jsxs)("div",{className:"w-[calc(100%-140px)] md:w-[calc(100%-128px)] xl:w-[calc(100%-168px)]  flex flex-col items-start justify-center gap-[0.2rem] xl:gap-[1.5rem] h-full min-h-full ",children:[n&&(0,l.jsx)("div",{className:"h6 block pr-[1.5rem] pb-[1rem] text-left",children:n}),(0,l.jsx)("div",{className:(0,i.m6)("transition-all duration-300 ease-in-out flex flex-nowrap items-center justify-center absolute bottom-0 right-0 w-5 h-5 bg-primary-spring linearTerciaryHover linearTerciaryActive ml-auto"),children:(0,l.jsx)(r.default,{name:"MdArrowForward",className:(0,i.m6)("!w-4 !h-4 block relative z-10 text-white")})})]})]}):null},d=n(58447),c=n(66269),u=n(7336),m=e=>{let{links:t}=e;return(0,l.jsx)(d.Z,{layout:{presentation:c.c.Default,gap:0},classContainer:"!px-0 !max-w-[1440px] bg-grey-400  lg:pb-0",children:(0,l.jsx)("div",{className:"relative w-full grid grid-cols-1 lg:grid-cols-3 gap-[0.5rem] py-[1.5rem] md:py-8 px-4 sm:px-8 xl:px-0 xl:py-[32px] mx-auto  xl:max-w-[1218px] xxl:max-w-[1328px] 2xl:max-w-[1380px] my-auto",children:null==t?void 0:t.map((e,t)=>(0,l.jsx)(u.E.div,{initial:{opacity:0,transform:"translateY(40px)"},whileInView:{opacity:1,transform:"translateY(0)",transition:{duration:.5,delay:.25+.15*t,ease:"circIn"}},viewport:{once:!0},className:"bg-white p-[1rem] sm:p-[1.25rem] w-full",children:(0,l.jsx)(s,{...e})},t))})})}},90769:function(e,t,n){"use strict";var l=n(26705),i=n(53335),a=n(50524),r=n(55711),o=n(20955),s=n(54013),d=n(34422),c=n(84606),u=n(7177),m=n(71669),p=n(86909);let v=(e,t)=>
1{var n;return(null===(n=t[e])||void 0===n?void 0:n.placeholder)||"Placeholder"},f=(e,t)=>{var n;return(null===(n=t[e])||void 0===n?void 0:n.errorMessage)||"Chyba"};t.default=e=>{var t,n,x,h;let{fieldsContent:y,dataContent:g,isCart:b,isGuest:j,className:w,setGuestData:k,activeSection:N,setActiveSection:P,lang:C,validateCallback:D,validate:S,onValidated:I}=e,[E,z]=(0,o.useState)(null),{userData:T,guestData:_,updateUser:L}=(0,s.a)(),[A,B]=(0,o.useState)(!1),[R,M]=(0,o.useState)(!1),[O,Z]=(0,o.useState)(!1),[V,F]=(0,o.useState)(0),[U,$]=(0,o.useState)({personalData:!1,facturationData:!1,deliveryData:!1,companyData:!1}),[q,H]=(0,o.useState)({personalData:null,facturationData:null,deliveryData:null,companyData:null}),[J,K]=(0,o.useState)(null),G={personalData:{firstName:"",lastName:"",email:"",phone:""},companyData:{name:"",ic:"",dic:""},facturationData:{street:"",city:"",country:"",zipCode:""},deliveryData:{street:"",city:"",country:"",zipCode:""}};(0,o.useEffect)(()=>{null===E&&(b&&_?z(_):z(j?_||G:T))},[T,E,j,_,b]),(0,o.useEffect)(()=>{var e;(null==T?void 0:null===(e=T.companyData)||void 0===e?void 0:e.ic)&&B(!0)},[T]),(0,o.useEffect)(()=>{k&&!j&&k(E)},[E,j]),(0,o.useEffect)(()=>{b&&2===N&&ee()},[N,b]),(0,o.useEffect)(()=>{D&&D(ee)},[D]),(0,o.useEffect)(()=>{S&&b&&!O&&(Z(!0),ee().then(e=>{I&&I(e),e||W(),Z(!1)}))},[S,b,I,O]);let W=()=>{let e=Object.entries(q).find(e=>{let[t,n]=e;return n&&Object.keys(n).length>0});if(e){let[t,n]=e,l=Object.keys(n)[0],i=document.querySelector('[data-section="'.concat(t,'"][data-field="').concat(l,'"]'));i&&i.scrollIntoView({behavior:"smooth",block:"center"})}},Q=e=>{!U[e]&&E&&K(JSON.parse(JSON.stringify(E))),$(t=>({...t,[e]:!t[e]}))}
1,Y=(e,t,n)=>{z(l=>{if(!l)return null;let i={...l,[e]:{...l[e],[t]:n}};return b&&!R&&(i.deliveryData=i.facturationData),b&&j?(H(n=>{if(!n[e])return n;let l={...n[e]};return l&&delete l[t],{...n,[e]:Object.keys(l||{}).length>0?l:null}}),k&&k(i)):X(e,t,n,i),!b&&j&&setTimeout(()=>{ee()},100),i})},X=async(e,t,n,l)=>{if(b&&j){k&&k(l);return}let i=(0,m.gc)(y,m.iq);try{let a=i.fields[e];if(!a)return;let r=a.fields[t];if(!r)return;await r.validate(n),H(n=>({...n,[e]:{...n[e]||{},[t]:void 0}})),j&&k&&k(l)}catch(n){n instanceof d.p8&&H(l=>({...l,[e]:{...l[e]||{},[t]:n.message}}))}},ee=async()=>{if(!E)return!1;let e=(0,m.gc)(y,m.iq),t=!0,n={personalData:null,facturationData:null,deliveryData:null,companyData:null},l=[];for(let i of(l.push("personalData"),b?(l.push("facturationData"),E.companyData&&Object.values(E.companyData).some(e=>e&&""!==e.trim())&&l.push("companyData"),R&&l.push("deliveryData")):l.push("facturationData","deliveryData","companyData"),l)){let l=E[i],a=e.fields[i];if(a&&l){try{await a.validate(l,{abortEarly:!1})}catch(e){if(t=!1,e instanceof d.p8){let t={};for(let n of e.inner)n.path&&(t[n.path]=n.message);n[i]=t}}if("personalData"===i||"facturationData"===i){let e=m.iq[i],a=n[i]||{};for(let r of e){let e=l[r];if((!e||""===e.trim())&&!a[r]){n[i]||(n[i]={});let e=n[i];e&&(e[r]="Toto pole je povinn\xe9"),t=!1}}}}}return H(n),j&&k&&k(E),t},et=e=>"companyData"!==e&&"facturationData"!==e||!A,en=async e=>{let t=(0,m.gc)(y,m.iq);try{if(!E)return;let n=E[e],l=t.fields[e];if(!l)return;await l.validate(n,{abortEarly:!1}),$(t=>({...t,[e]:!1})),H(t=>({...t,[e]:null})),j&&k?k(E):await L(E)}catch(t){if(t instanceof d.p8){let n={};for(let e of t.inner)e.path&&(n[e.path]=e.message);H(t=>({...t,[e]:n})),$(t=>({...t,[e]:!0}))}}},el=e=>{if(!J||!E){$(t=>({...t,[e]:!1}));return}let t=JSON.parse(JSON.stringify(E));t[e]=JSON.parse(JSON.stringify(J[e])),z(t),requestAnimationFrame(()=>{$(t=>({...t,[e]:!1})),H(t=>({...t,[e]:null})),F(e=>e+1)})},ei=(e,t,n)=>{var l;let i=E?E[e]:{};return{name:t,type:e,disabled:n,forceUpdateCounter:V,buttons:U[e]?[{variant:"primary",type:"button",link:{text:null==g?void 0:g.saveLabel,url:"#"},icon:"MdSave",label:null==g?void 0:g.saveLabel,onClick:()=>en(e),iconRight:!0,size:"mini",iconType:"square",darkMode:!1},{variant:"secondary",type:"button",link:{text:"Zrušit",url:"#"},icon:"MdClose",label:"Zrušit",onClick:()=>el(e),iconRight:!0,size:"mini",iconType:"square",darkMode:!1}]:[{variant:"terciary",type:"button",link:{text:null==g?void 0:g.editLabel,url:"#"},icon:"MdEdit",label:null==g?void 0:g.editLabel,onClick:()=>Q(e),iconRight:!0,sizeButton:"mini",iconType:"square",darkMode:!0}],inputBlocks:null===(l=Object)||void 0===l?void 0:l.keys(i).map(t=>{var l;let a=null==q?void 0:null===(l=q[e])||void 0===l?void 0:l[t];return{label:t.charAt(0).toUpperCase()+t.slice(1),placeholder:v(t,y)||"Placeholder",isDisabled:n||!b&&!U[e]&&!j,value:i[t],options:"country"===t?[{label:"Česk\xe1 republika",value:"Česk\xe1 republika"},{label:"Slovensko",value:"Slovensko"}]:void 0,typeInput:"country"===t?"select":"text",isError:!!a,errorMessage:a||f(t,y),onChange:n=>Y(e,t,"object"==typeof n?n.target.value:n),dataAttributes:{"data-section":e,"data-field":t}}})}},ea=[ei("personalData",null==g?void 0:g.personalLabel,!1),ei("deliveryData",null==g?void 0:g.deliveryLabel,!1),ei("companyData",null==g?void 0:g.companyLabel,!1),ei("facturationData",null==g?void 0:g.facturationLabel,!1)];if(b&&(ea=[ei("personalData",null==g?void 0:g.personalLabel,!1),ei("companyData",null==g?void 0:g.companyLabel,!!(null==T?void 0:null===(x=T.companyData)||void 0===x?void 0:x.name)),ei("facturationData",null==g?void 0:g.facturationLabel,!!(null==T?void 0:null===(h=T.companyData)||void 0===h?void 0:h.name))]),b&&R){let e=ei("deliveryData",null==g?void 0:g.deliveryLabel);ea.push(e)}let er=e=>{M(e.target.checked)},eo=Object.values(U).some(e=>e);return(0,l.jsxs)("div",{className:"mb-20 w-full",children:[(null==g?void 0:g.title)&&(0,l.jsx)("h3",{className:(0,i.m6)("h3 text-primary-raisin self-stretch hidden lg:block lg:mb-16",b?"h4":"h3"),children:g.title}),E||j?(0,l.jsxs)("div",{className:(0,i.m6)("flex flex-col items-start gap-14 md:gap-16 w-full",w),children:[null==ea?void 0:ea.map((e,t)=>(0,l.jsxs)("div",{className:(0,i.m6)("flex flex-col items-center md:items-start gap-5 w-full transition-opacity duration-200",e.disabled||eo&&!U[e.type]?"opacity-60 cursor-not-allowed pointer-events-none":""),children:[(0,l.jsxs)("div",{className:"flex items-start justify-between w-full border-b-[1px] border-secondary-french pb-5",children:[(0,l.jsx)("h4",{className:"h4 text-primary-raisin",children:e.name}),!b&&!j&&et(e.type)&&(0,l.jsx)("div",{className:"flex gap-2",children:e.buttons.map((e,t)=>(0,l.jsx)(a.Button,{...e},t))})]}),e.inputBlocks&&(0,l.jsx)("div",{className:"grid w-full grid-cols-1 md:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2 grid-flow-row gap-2 place-items-stretch",children:e.inputBlocks.map((t,n)=>(0,l.jsx)(r.I,{...t},"".concat(t.dataAttributes["data-field"],"-").concat(n,"-").concat(e.forceUpdateCounter)))})]},t)),b&&(0,l.jsxs)("div",{className:(0,i.m6)("flex flex-col items-start gap-4 mb-4 w-full transition-opacity duration-200 ",eo?"opacity-60":""),onClick:()=>M(!R),onKeyDown:()=>M(!R),children:[!R&&(0,l.jsx)("h4",{className:"h4 text-primary-raisin border-b-[1px] border-secondary-french pb-5 w-full",children:null==g?void 0:g.deliveryLabel}),(0,l.jsx)(u.Z,{className:"".concat(R?"-mt-8":""),checked:R,onChange:e=>er(e),label:null===(t=c.k.differentDeliveryAddressLabel)||void 0===t?void 0:t[C||"cs"]})]}),1===N&&window.innerWidth<768&&(0,l.jsx)("div",{className:"w-[240px] self-center mb-[4rem]",children:(0,l.jsx)(a.Button,{onClick:()=>null==P?void 0:P(2),variant:"primary",size:"small",type:"button",disabled:!(0,p.Z)(_||T),className:"w-full",link:{text:null===(n=c.k.cartContinueLabel)||void 0===n?void 0:n[C||"cs"],url:"#"}})})]}):(0,l.jsx)("p",{})]})}},18533:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return _}});var l=n(26705),i=n(20955),a=n(53335),r=n(50524),o=n(84606),s=n(55711);n(83079);var d=n(12119),c=(0,d.$)("6922516c3694130d3809e854ef4f260c1db9191b"),u=e=>{var t,n,a;let{isOffer:d,deal:u,changeDealName:m,lang:p}=e,[v,f]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1),y=async()=>
1{if(!(null==u?void 0:u.id))return;let e=await c(u.id,v);e.success?(m(v),h(!1)):console.error("Failed to update offer:",e.error)};return(0,l.jsxs)("div",{className:"flex  gap-4 md:gap-0 mt-[3rem] flex-col md:flex-row items-center justify-between pb-6 border-b-[2px] border-b-primary-raisin",children:[u&&!x?(0,l.jsx)("h4",{className:"h4 text-primary-raisin w-full",children:"offer name not provided"!==u.name&&d?u.name:u.code}):(0,l.jsx)(s.I,{value:"offer name not provided"===u.name?u.code:u.name,classForInput:"max-w-[320px]",onChange:e=>f(e.target.value)}),u&&d&&!x&&(0,l.jsx)(r.Button,{variant:"terciary",link:{url:"",text:null===(t=o.k.renameButton)||void 0===t?void 0:t[p||"cs"]},type:"button",icon:"MdModeEdit",iconRight:!0,iconType:"square",darkMode:!0,onClick:()=>h(!0)}),x&&(0,l.jsxs)("div",{className:"flex w-full justify-end gap-4",children:[(0,l.jsx)(r.Button,{variant:"primary",link:{text:null===(n=o.k.saveButton)||void 0===n?void 0:n[p||"cs"]},size:"mini",type:"button",onClick:()=>y()}),(0,l.jsx)(r.Button,{variant:"secondary",link:{text:null===(a=o.k.closeButton)||void 0===a?void 0:a[p||"cs"]},size:"mini",className:"",type:"button",onClick:()=>h(!1)})]})]})},m=e=>{var t;let{deal:n,lang:i,title:a}=e,s={variant:"terciary",icon:"MdArrowForward",iconRight:!0,iconType:"square",type:"link",darkMode:!0,link:{url:(()=>{var e;switch(null==n?void 0:null===(e=n.customFields)||void 0===e?void 0:e.system_8af8c){case"standard":default:return"/cs/duo-standard";case"plus":return"/cs/duo-plus";case"melody":return"/cs/melody"}})(),text:null===(t=o.k.offerSystemButtonLabel)||void 0===t?void 0:t[i||"cs"],target:"_blank"},size:"mini"};return(0,l.jsxs)("div",{className:"border-b-[2px] border-b-primary-raisin pb-4",children:[(0,l.jsx)("h6",{className:"h6 mb-[24px]",children:a}),(0,l.jsxs)("div",{className:"w-full flex justify-between items-center",children:[(0,l.jsx)("p",{className:"font-human text-grey-800 text-[12px] uppercase font-medium leaing-[120%] tracking-[1.8px]",children:(()=>{var e;switch(null==n?void 0:null===(e=n.customFields)||void 0===e?void 0:e.system_8af8c){case"standard":return"Duo Standard";case"plus":return"Duo Plus";case"melody":return"Melody"}})()}),(0,l.jsx)(r.Button,{...s})]})]})},p=n(77398),v=n.n(p);let f=e=>e.street||e.city||e.country||e.zipCode?(0,l.jsxs)(i.Fragment,{children:[e.street&&(0,l.jsx)("p",{children:e.street}),e.city&&(0,l.jsx)("p",{children:e.city}),e.zipCode&&(0,l.jsx)("p",{children:e.zipCode}),(0,l.jsx)("p",{children:e.country||"CZ"})]}):"N/A";var x=e=>{var t,n,i,r,s,d,c,u,m,p,x,h,y,g,b,j,w,k,N;let{className:P,deal:C,lang:D,isOffer:S}=e;if(!C)return null;let I="offerStatus"in C&&(null===(t=C.offerStatus)||void 0===t?void 0:t.value)||"salesOrderStatus"in C&&(null===(n=C.salesOrderStatus)||void 0===n?void 0:n.value)||"",E={count:{label:null===(i=o.k.orderItemsLabel)||void 0===i?void 0:i[D||"cs"],value:null==C?void 0:null===(N=C.items)||void 0===N?void 0:N.filter(e=>"payment"!==e.description&&"delivery"!==e.description&&"recyclationFee"!==e.description).length},status:{label:null===(r=o.k[S?"historyOfferStatusLabel":"historyOrderStatusLabel"])||void 0===r?void 0:r[D||"cs"],value:I},createdAt:{label:null===(s=o.k[S?"offerDateLabel":"orderDateLabel"])||void 0===s?void 0:s[D||"cs"],value:v()(null==C?void 0:C.validFrom).format("DD-MM-YYYY")},...(null==C?void 0:C.expirationDate)&&{validDate:{label:null===(d=o.k.offerDateValidityLabel)||void 0===d?void 0:d[D||"cs"],value:v()(null==C?void 0:C.expirationDate).format("DD-MM-YYYY")}}};return E=S?{offerDetails:{label:null===(u=o.k.offerCodeLabel)||void 0===u?void 0:u[D||"cs"],value:null==C?void 0:C.code},...E}:{...E,..."deliveryAddress"in C&&{deliveryAddress:{label:null===(m=o.k.orderDeliveryAddressLabel)||void 0===m?void 0:m[D||"cs"],value:{street:null==C?void 0:null===(p=C.deliveryAddress)||void 0===p?void 0:p.street,city:null==C?void 0:null===(x=C.deliveryAddress)||void 0===x?void 0:x.city,zipCode:null==C?void 0:null===(h=C.deliveryAddress)||void 0===h?void 0:h.zipCode,country:null==C?void 0:null===(y=C.deliveryAddress)||void 0===y?void 0:y.country}}},..."invoiceAddress"in C&&{invoiceAddress:{label:null===(g=o.k.orderInvoiceAddressLabel)||void 0===g?void 0:g[D||"cs"],value:{street:null==C?void 0:null===(b=C.invoiceAddress)||void 0===b?void 0:b.street,city:null==C?void 0:null===(j=C.invoiceAddress)||void 0===j?void 0:j.city,zipCode:null==C?void 0:null===(w=C.invoiceAddress)||void 0===w?void 0:w.zipCode,country:null==C?void 0:null===(k=C.invoiceAddress)||void 0===k?void 0:k.country}}}},(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col items-start justify-start gap-6 w-full",P),children:[C&&
1(0,l.jsx)("h6",{className:"h6 text-primary-raisin self-stretch",children:null===(c=o.k[S?"offerInformationLabel":"orderInformationLabel"])||void 0===c?void 0:c[D||"cs"]}),(0,l.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 sl:grid-cols-3 lg:grid-cols-3 grid-flow-row gap-4 md:gap-x-20 md:gap-y-6 w-full",children:Object.entries(E).map(e=>{let[t,n]=e;return(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("p",{className:"text-grey-800 font-ibm text-[14px] leading-[160%] font-medium mb-[0.25rem]",children:n.label}),(0,l.jsx)("div",{className:"text-primary-raisin text-[1rem] leading-[160%]  font-human",children:"object"==typeof n.value?f(n.value):"createdAt"===t||"shippedAt"===t?(0,l.jsx)("p",{children:n.value}):(0,l.jsx)("p",{children:n.value||"N/A"})})]},t)})})]})},h=n(91543),y=n(99376),g=e=>{var t,n,a,d,c,u,m,p,v;let{deal:f,lang:x,dealType:g}=e,[b,j]=(0,i.useState)(!1),[w,k]=(0,i.useState)("offer"===g?(null===(t=f.customFields)||void 0===t?void 0:t.UserNote_ce6f3)||"":(null===(n=f.customFields)||void 0===n?void 0:n.userNote_e46a6)||""),N=(0,y.useRouter)(),P=async()=>{try{j(!1);let e=await fetch("/api/raynet/sources/".concat(g,"s/update-").concat(g),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:null==f?void 0:f.id,customFields:{["offer"===g?"UserNote_ce6f3":"userNote_e46a6"]:w}})});await e.json(),N.refresh()}catch(e){console.error("Error updating offer:",e)}},C=async()=>{await P()};return(0,l.jsxs)("div",{className:"border-b-[2px] border-b-primary-raisin pb-4",children:[(0,l.jsxs)("div",{className:"flex  items-start justify-between w-full ".concat(b?"mb-4 md:mb-6":"mb-2"," "),children:[(0,l.jsx)("h6",{className:"h6 block w-full",children:null===(a=h.K.dealDescriptionLabel)||void 0===a?void 0:a[x]}),(0,l.jsxs)("div",{className:"flex gap-4",children:[b&&(0,l.jsx)(r.Button,{type:"button",onClick:()=>C(),link:{url:"",text:null===(d=o.k.orderSaveLabel)||void 0===d?void 0:d[x]},variant:"primary",size:"mini"}),(0,l.jsx)(r.Button,{size:"mini",type:"button",onClick:()=>j(!b),link:{url:"",text:b?null===(c=o.k.orderCloseEditLabel)||void 0===c?void 0:c[x]:null===(u=o.k.orderOpenEditLabel)||void 0===u?void 0:u[x]},variant:b?"secondary":"terciary",icon:"MdEdit",iconRight:!0,darkMode:!0,iconType:"square"})]})]}),(0,l.jsx)("div",{className:"w-full flex justify-between items-center",children:b?(0,l.jsx)("div",{className:"flex w-full items-center justify-between ",children:(0,l.jsx)(s.I,{typeInput:"textarea",value:w,onChange:e=>{var t;k((null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value)||"")},className:"w-full",placeholder:null===(p=o.k.commentPlaceholder)||void 0===p?void 0:p[x||"cs"]})}):(0,l.jsx)("p",{className:"text-sm text-grey-800",dangerouslySetInnerHTML:{__html:(null==w?void 0:w.replace(/\n/g,"<br />"))||(null===(m=o.k.noCommentProvided)||void 0===m?void 0:m[x||"cs"])}})}),f.description&&"<p><br></p>"!==f.description&&(0,l.jsxs)("div",{className:"pt-4",children:[(0,l.jsx)("h6",{className:"h6 block w-full mb-2",children:null===(v=h.K.dealDescriptionSalesLabel)||void 0===v?void 0:v[x]}),(0,l.jsx)("p",{className:"text-sm text-grey-800",dangerouslySetInnerHTML:{__html:f.description||""}})]})]})},b=n(24432),j=n(27957),w=n(5032),k=n(72420),N=e=>{let{className:t,searchVariant:n=!1,products:i,isEdit:r,setUpdatedOrderItems:s,handleRemoveItem:d,lang:c,currency:u}=e,m=e=>{s(t=>t.map(t=>t._id===e?{...t,count:(t.count||0)+1}:t))},p=e=>{s(t=>t.map(t=>t._id===e&&t.count&&t.count>1?{...t,count:t.count-1}:t))},v=(e,t)=>{let n=e.target.value;!Number.isNaN(Number(n))&&Number(n)>=0&&s(e=>e.map(e=>e._id===t?{...e,count:""===n?"":Number(n)}:e))},f=(e,t)=>{(""===t||0>=Number(t))&&s(t=>t.map(t=>t._id===e?{...t,count:1}:t))};return(0,l.jsx)("div",{className:(0,a.m6)("flex items-stretch justify-between w-full",t),children:(0,l.jsx)("div",{className:(0,a.m6)("flex flex-row flex-wrap items-stretch w-full justify-start"),children:null==i?void 0:i.map((e,t)=>{var i,s,x,h,y,g,N,P,C,D,S,I,E,z,T,_,L,A,B,R,M;return(0,l.jsxs)("div",{className:(0,a.m6)("grid  gap-1 w-full border-b-grey-600 border-b-[1px] py-4 md:py-6 last-of-type:border-b-0","grid-cols-8"),children:[(0,l.jsxs)("div",{className:(0,a.m6)("text-grey-800 flex flex-nowrap flex-row gap-4 lg:gap-6 col-span-8 md:col-span-5",r&&"md:col-span-4",n?"font-human text-[12px] leading-[14.4px] tracking-[0.05em] font-medium uppercase":"subscriptionText"),children:[(0,l.jsx)("div",{className:"h-[64px] w-full lg:h-[88px] relative overflow-hidden",children:(null==e?void 0:e.productImages)&&(0,l.jsx)(j.Z,{...(null==e?void 0:e.productImages[0])?(0,w.Z)(null==e?void 0:e.productImages[0]):{src:"/icons/placeholder-white.png",alt:"placeholder"},className:"object-contain w-full h-full object-center"})}
1),(0,l.jsxs)("div",{className:"min-w-[calc(100%-80px)] lg:min-w-[calc(100%-112px)]",children:[(0,l.jsx)("p",{className:"font-human text-primary-raisin text-[14px] font-medium mb-[0.5rem]",children:null!==(P=null==e?void 0:null===(i=e.raynetProductData)||void 0===i?void 0:i.name)&&void 0!==P?P:"-"}),(0,l.jsxs)("div",{className:"flex flex-nowrap items-end justify-between md:block",children:[(0,l.jsxs)("div",{children:[(null==e?void 0:null===(s=e.raynetProductData)||void 0===s?void 0:s.code)&&(0,l.jsxs)("p",{className:"p4 text-secondary-dark",children:[" ",null===o.k||void 0===o.k?void 0:null===(x=o.k.orderCategoryNumberLabel)||void 0===x?void 0:x[c||"cs"],": ",null==e?void 0:null===(h=e.raynetProductData)||void 0===h?void 0:h.code]}),0===e.discountPercent||null===e.discountPercent?(0,l.jsxs)("p",{className:"p4 text-secondary-dark",children:["Cena/ks:"," ",(0,k.x)(e.price,{withVAT:!1,showVATLabel:!0},u).formattedAmount]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{className:"p4 text-secondary-dark",children:["Cena před slevou/ks:"," ",(0,k.x)(e.price,{withVAT:!1,showVATLabel:!0},u).formattedAmount]}),(0,l.jsxs)("p",{className:"p4 text-secondary-dark font-bold",children:["Cena po slevě/ks:"," ",(0,k.x)((null!==(C=e.price)&&void 0!==C?C:0)-(null!==(D=e.price)&&void 0!==D?D:0)*(null!==(S=e.discountPercent)&&void 0!==S?S:0)/100,{withVAT:!1,showVATLabel:!0},u).formattedAmount]})]}),(null===(y=e.raynetProductData)||void 0===y?void 0:y.recyclationFee)!==0&&"Kč"===u&&(0,l.jsxs)("p",{className:"p4 text-secondary-dark",children:["Recyklačn\xed poplatek/ks:"," ",(0,k.x)(null===(g=e.raynetProductData)||void 0===g?void 0:g.recyclationFee,{withVAT:!1,showVATLabel:!0},u).formattedAmount]}),(0,l.jsxs)("p",{className:"font-human text-grey-1000 text-[12px] leading-[160%] block md:hidden",children:[null===o.k||void 0===o.k?void 0:null===(N=o.k.labelTableQuantity)||void 0===N?void 0:N[c||"cs"],":"," ",null==e?void 0:e.count]})]}),(0,l.jsxs)("div",{className:"flex flex-col md:hidden text-right",children:[(0,l.jsx)("h6",{className:"h6 text-primary-raisin",children:(0,k.x)(e.price,{withVAT:!1,showVATLabel:!0},u).formattedAmount}),(0,l.jsxs)("p",{className:"p4 text-grey-1000",children:["s",(0,k.x)((null!==(I=e.price)&&void 0!==I?I:0)*.79,{withVAT:!1,showVATLabel:!0},u).formattedAmount]})]})]})]})]}
1),(0,l.jsxs)("div",{className:(0,a.m6)("self-center text-right hidden items-center justify-center md:flex w-full gap-2 col-span-1",r&&"col-span-6 md:col-span-2 flex justify-start md:justify-center"),children:[r&&(0,l.jsx)(b.h,{icon:"MdRemove",color:"grey",size:"small",onClick:()=>p(e._id),disabled:(null==e?void 0:e.count)===1}),r?(0,l.jsx)("input",{value:e.count,type:"number",className:"max-w-[40px] h-[40px] bg-white border-grey-600 border-[1px] flex items-center justify-center text-center",min:1,onChange:t=>v(t,e._id),onBlur:()=>f(e._id,e.count)}):(0,l.jsxs)("p",{className:"text-[14px] text-primary-raisin",children:[null==e?void 0:e.count," Ks"]}),r&&(0,l.jsx)(b.h,{icon:"MdAdd",color:"grey",size:"small",onClick:()=>m(e._id)})]}),(0,l.jsxs)("div",{className:(0,a.m6)("col-span-2 self-center text-right hidden md:block",r&&"col-span-1"),children:[(0,l.jsx)("h6",{className:"h6 text-primary-raisin",children:(0,k.x)(((null!==(E=e.price)&&void 0!==E?E:0)-(null!==(z=e.price)&&void 0!==z?z:0)*(null!==(T=e.discountPercent)&&void 0!==T?T:0)/100)*(Number(null!==(_=null==e?void 0:e.taxRate)&&void 0!==_?_:0)/100+1)*(null!==(L=e.count)&&void 0!==L?L:1),{withVAT:!1,showVATLabel:!1},u).formattedAmount}),(0,l.jsx)("p",{className:"p4 text-grey-1000",children:(0,k.x)(((null!==(A=e.price)&&void 0!==A?A:0)-(null!==(B=e.price)&&void 0!==B?B:0)*(null!==(R=e.discountPercent)&&void 0!==R?R:0)/100)*(null!==(M=null==e?void 0:e.count)&&void 0!==M?M:1),{withVAT:!1,showVATLabel:!0},u).formattedAmount})]}),r&&(0,l.jsx)("div",{className:(0,a.m6)("col-span-1 flex items-center justify-end w-full text-center",r&&"col-span-2 md:col-span-1"),children:(0,l.jsx)(b.h,{size:"extraSmall",icon:"MdDelete",color:"grey",onClick:()=>null==d?void 0:d(e.itemId)})})]},t)})})})},P=(0,d.$)("b09ad6aa298b77679d186a885169b6b40ac47bdf"),C=(0,d.$)("74a8820081b9b512ea15f2ca4d11d20c8a0740c5"),D=e=>{var t,n,d,c,u,m,p,v,f;let{className:x,order:h,lang:g,isOffer:j,updatedOrderItems:w,setUpdatedOrderItems:D,customProducts:S,setCustomProducts:I,currency:E}=e,[z,T]=(0,i.useState)(!1),[_,L]=(0,i.useState)(!1),[A,B]=(0,i.useState)({}),R=(0,y.useRouter)(),M=()=>{let e=!z;if(T(e),e){let e={};for(let t of S)e[t.id]={...t,_id:t._id||"",itemId:t.id||t.itemId||"",count:t.count||1,price:t.price||0,taxRate:t.taxRate||21,name:t.name||"",_type:t._type||"raynetProduct",_createdAt:t._createdAt||new Date().toISOString(),_updatedAt:new Date().toISOString(),_rev:t._rev||""};B(e)}else B({})},O=async()=>{if(!F()){console.error("Some custom items have invalid data");return}L(!0);try{let e=await P(Number(null==h?void 0:h.id),w.map(e=>{var t;return{id:Number(e.itemId),count:null!==(t=e.count)&&void 0!==t?t:1}}));if(e.success&&Object.keys(A).length>0){let e=Object.entries(A).map(e=>{let[t,n]=e;return{id:Number.isNaN(Number(t))?void 0:Number(t),name:n.name,price:n.price,taxRate:n.taxRate,count:n.count||1}});if((await P(Number(null==h?void 0:h.id),e)).success){let e=S.map(e=>{let t=e.id;if(A[t]){var n;return{...e,...A[t],id:e.id,itemId:null!==(n=e.itemId)&&void 0!==n?n:e.id}}return e});I(e)}}e.success&&(T(!1),B({}),R.refresh()),e.error&&console.error("Error updating offer:",e.error)}catch(e){console.error("Error during update:",e)}finally{L(!1)}},Z=async e=>{let t=await C(Number(null==h?void 0:h.id),e);t.success?(D(w.filter(t=>t.itemId!==e)),R.refresh()):console.error("Failed to remove item:",t.error)},V=async e=>{let t=await C(Number(null==h?void 0:h.id),String(e));t.success?(I(S.filter(t=>t.id!==e&&t.itemId!==e)),z&&B(t=>{let n={...t};return delete n[String(e)],n}),R.refresh()):console.error("Failed to remove custom item:",t.error)},F=()=>{if(0===Object.keys(A).length)return!0;let e=Object.values(A).some(e=>!e.name||""===e.name.trim()||void 0===e.price||e.price<=0);return console.log("Custom items validation:",{editingCustomItems:A,hasInvalidItem:e,itemsCount:Object.keys(A).length}),!e},U=()=>{let e="temp-".concat(Date.now());console.log("Creating empty custom item with ID:",e);let t={_id:"",id:e,itemId:e,name:"",count:1,price:0,taxRate:21,_type:"raynetProduct",_createdAt:new Date().toISOString(),_updatedAt:new Date().toISOString(),_rev:""},n=[...S,t];console.log("Adding empty item to products list:",n),I(n),z||(console.log("Enabling edit mode"),T(!0)),B(n=>{let l={...n,[e]:t};return console.log("Updated editingCustomItems with empty item:",l),l}),setTimeout(()=>{console.log("Items validity after adding new item:",F()),console.log("All editing items:",A)},100)},$=(e,t)=>{if("object"==typeof e&&"target"in e){let{name:n,value:l}=e.target;B(e=>({...e,[t]:{...e[t],[n]:"price"===n?Number.parseFloat(l)||0:l}}))}else if("number"==typeof e)B(n=>({...n,[t]:{...n[t],price:e}}));else if("string"==typeof e&&""!==e){let n=Number.parseFloat(e)||0;B(e=>({...e,[t]:{...e[t],price:n}}))}setTimeout(()=>{F()},100)},q=e=>{switch(e){case 21:return"21% s DPH";case 12:return"12% s DPH";case 0:return"bez DPH";default:return"".concat(e,"% s DPH")}};return(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col items-start justify-start w-full pb-4",x),children:[(0,l.jsxs)("div",{className:"flex  items-start justify-between w-full mb-4 md:mb-6",children:[(0,l.jsx)("h6",{className:"h6 block w-full",children:null===(t=o.k.orderItemsLabel)||void 0===t?void 0:t[g||"cs"]}),(0,l.jsxs)("div",{className:"flex gap-4",children:[z&&(0,l.jsx)(r.Button,{type:"button",onClick:()=>O(),link:{url:"",text:_?"Ukl\xe1d\xe1m...":null===(n=o.k.orderSaveLabel)||void 0===n?void 0:n[g||"cs"]},variant:"primary",size:"mini",disabled:_||!F(),isLoading:_}),j&&(0,l.jsx)(r.Button,{size:"mini",type:"button",onClick:()=>M(),link:{url:"",text:z?null===(d=o.k.orderCloseEditLabel)||void 0===d?void 0:d[g||"cs"]:null===(c=o.k.orderOpenEditLabel)||void 0===c?void 0:c[g||"cs"]},variant:z?"secondary":"terciary",icon:"MdEdit",iconRight:!0,darkMode:!0,disabled:_,iconType:"square"})]})]}),h&&w.length>0?(0,l.jsxs)("div",{className:(0,a.m6)("hidden grid-cols-8 w-full md:grid","grid-cols-8"),children:[(0,l.jsx)("h6",{className:"font-ibm text-[14px] leading-[160%] text-grey-800 self-stretch ".concat(z?"col-span-4":"col-span-5"," pl-[80px] lg:pl-[112px]"),children:null===(u=o.k.labelTableProducts)||void 0===u?void 0:u[g||"cs"]}),(0,l.jsx)("h6",{className:"font-ibm text-[14px] leading-[160%] text-grey-800 self-stretch col-span-1 text-right",children:null===(m=o.k.labelTableQuantity)||void 0===m?void 0:m[g||"cs"]}),(0,l.jsx)("h6",{className:"font-ibm text-[14px] leading-[160%] text-grey-800 self-stretch col-span-2 text-end",children:null===(p=o.k.labelTablePrice)||void 0===p?void 0:p[g||"cs"]}),z&&(0,l.jsx)("p",{className:"block self-stretch col-span-1"})]}):(0,l.jsx)("p",{className:"p4 text-grey-800 mb-2",children:null===o.k||void 0===o.k?void 0:null===(v=o.k.loadingHeading)||void 0===v?void 0:v[g||"cs"]}),(0,l.jsx)(N,{products:w,setUpdatedOrderItems:D,isOffer:j,isEdit:z,lang:g,handleRemoveItem:e=>Z(e),currency:E}),j&&S.length>0&&S.map((e,t)=>{var n,i,a,r,d,c,u,m,p,v,f,x,h,y,j,w,N;return(0,l.jsx)("div",{className:"grid gap-1 w-full border-t-grey-600 border-t-[1px] py-4 md:py-6 border-b-0 grid-cols-8",children:z?(0,l.jsxs)("div",{className:"col-span-8 w-full",children:[(0,l.jsx)("div",{className:"flex w-full items-center justify-between mb-4",children:(0,l.jsx)("p",{className:"text-grey-800 font-human text-[12px] font-medium uppercase leading-[120%] tracking-[1.8px]",children:(null===(n=o.k.orderOwnItemLabel)||void 0===n?void 0:n[g||"cs"])||"Vlastn\xed položka"})}),(0,l.jsxs)("div",{className:"flex w-full gap-3 mb-4",children:[(0,l.jsxs)("div",{className:"flex  flex-col md:flex-row w-full gap-3",children:[(0,l.jsx)(s.I,{placeholder:(null===(i=o.k.placeholderNameItem)||void 0===i?void 0:i[g||"cs"])||"N\xe1zev položky",name:"name",value:(null===(a=A[e.id])||void 0===a?void 0:a.name)||"",onChange:t=>$(t,e.id)}),(0,l.jsx)(s.I,{onChange:t=>$(t,e.id),placeholder:(null===(r=o.k.placeholderNamePrice)||void 0===r?void 0:r[g||"cs"])||"Cena",name:"price",typeInput:"money",min:0,max:1e10,value:(null===(d=A[e.id])||void 0===d?void 0:d.price)||0,currency:E}
1),(0,l.jsx)(s.I,{typeInput:"select",onChange:t=>$(t,e.id),name:"taxRate",value:q((null===(c=A[e.id])||void 0===c?void 0:c.taxRate)||21),placeholder:q(21),options:[{value:21,label:q(21)},{value:12,label:q(12)},{value:0,label:q(0)}]})]}),(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(b.h,{icon:"MdDelete",size:"extraSmall",onClick:()=>V(e.id)})})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"text-grey-800 flex flex-nowrap flex-row gap-4 lg:gap-6 col-span-8  subscriptionText ".concat(z?"md:col-span-4":"md:col-span-5"),children:[(0,l.jsxs)("div",{className:"w-full lg:min-w-[calc(100%-112px)]",children:[(0,l.jsx)("p",{className:"min-w-full font-human text-grey-800 uppercase text-[12px] leading-[120%] font-medium tracking-[1.8px] mb-[0.75rem]",children:null===(u=o.k.orderOwnItemLabel)||void 0===u?void 0:u[g||"cs"]}),(0,l.jsx)("p",{className:"font-human text-primary-raisin text-[14px] uppercase leading-[130%] font-medium tracking-[0.7px] mb-[0.5rem] min-w-full",children:e.name}),(0,l.jsx)("p",{className:"font-human text-grey-800 text-[12px] leading-[160%] mb-[0.5rem]",children:q(e.taxRate||21)})]}),(0,l.jsxs)("div",{className:"flex flex-col md:hidden text-right w-full",children:[(0,l.jsx)("h6",{className:"h6 text-primary-raisin whitespace-nowrap",children:(0,k.x)((null!==(m=null==e?void 0:e.price)&&void 0!==m?m:0)+(null!==(p=null==e?void 0:e.price)&&void 0!==p?p:0)*(null!==(v=null==e?void 0:e.taxRate)&&void 0!==v?v:0)/100,{},E).formattedAmount}),(0,l.jsx)("p",{className:"p4 text-grey-1000 whitespace-nowrap",children:(0,k.x)(Math.ceil((null!==(f=null==e?void 0:e.price)&&void 0!==f?f:0)*(null!==(x=e.count)&&void 0!==x?x:1)),{withVAT:!1,showVATLabel:!0},E).formattedAmount})]})]}),(0,l.jsxs)("div",{className:"col-span-3 self-center text-right hidden md:block w-full",children:[(0,l.jsx)("h6",{className:"h6 text-primary-raisin",children:(0,k.x)((null!==(h=null==e?void 0:e.price)&&void 0!==h?h:0)+(null!==(y=null==e?void 0:e.price)&&void 0!==y?y:0)*(null!==(j=null==e?void 0:e.taxRate)&&void 0!==j?j:0)/100,{},E).formattedAmount}),(0,l.jsx)("p",{className:"p4 text-grey-1000",children:(0,k.x)(Math.ceil((null!==(w=null==e?void 0:e.price)&&void 0!==w?w:0)*(null!==(N=e.count)&&void 0!==N?N:1)),{withVAT:!1,showVATLabel:!0},E).formattedAmount})]})]})},t)}),j&&z&&(0,l.jsx)(r.Button,{variant:"terciary",link:{url:"",text:null===(f=o.k.orderAddOwnItemLabel)||void 0===f?void 0:f[g||"cs"]},size:"medium",type:"button",icon:"MdAdd",iconRight:!0,onClick:()=>U(),iconType:"square",className:"my-[32px]"})]})},S=e=>{var t,n,r,s,d,c,u;let{updatedOrderItems:m,className:p,deal:v,configuratorColumn:f,lang:x,type:h,currency:y,totalDiscount:g}=e,b=(0,i.useMemo)(()=>m.reduce((e,t)=>{var n;let l=t.count||1;return e+(null!==(n=null==t?void 0:t.price)&&void 0!==n?n:0)*l},0),[m]),j="€"===y,w=(0,i.useMemo)(()=>j?0:m.reduce((e,t)=>{var n,l,i;return e+(null!==(l=null==t?void 0:null===(n=t.raynetProductData)||void 0===n?void 0:n.recyclationFee)&&void 0!==l?l:0)*(null!==(i=null==t?void 0:t.count)&&void 0!==i?i:0)},0),[m,j]),N=(null==v?void 0:v.customFields)&&"deliveryPr_b0431"in v.customFields?Number(v.customFields.deliveryPr_b0431):0,P=(null==v?void 0:v.customFields)&&"paymentPri_68c84"in v.customFields?Number(v.customFields.paymentPri_68c84):0,C=(0,i.useMemo)(()=>{var e,t;let n=m.reduce((e,t)=>{var n,l,i,a;let r=null===(n=v.items)||void 0===n?void 0:n.find(e=>e.id===t.itemId),o=t.count||1,s=null!==(l=null==r?void 0:r.discountPercent)&&void 0!==l?l:0;return e+(null!==(i=t.price)&&void 0!==i?i:0)*(1-s/100)/100*(null!==(a=t.taxRate)&&void 0!==a?a:0)*o},0),l=null===(e=v.items)||void 0===e?void 0:e.find(e=>"recyclationFee"===e.description);return n+((null!=w?w:0)/100*(null!==(t=null==l?void 0:l.taxRate)&&void 0!==t?t:0)+.21*N+.21*P)},[m,v.items,w,N,P]),D=b+w+C+N+P-g,S=[{label:null===(t=o.k.paymentBetweenLabel)||void 0===t?void 0:t[x||"cs"],value:"".concat((0,k.x)(b,{},y).formattedAmount)},...j?[]:[{label:null===(n=o.k.summaryRecyclationFeeLabel)||void 0===n?void 0:n[x||"cs"],value:"".concat((0,k.x)(w,{},y).formattedAmount)}],{label:null===(r=o.k.summaryDiscountLabel)||void 0===r?void 0:r[x||"cs"],value:"".concat((0,k.x)(g,{},y).formattedAmount)},..."offer"!==h?[{label:null===(s=o.k.paymentDeliveryLabel)||void 0===s?void 0:s[x||"cs"],value:"".concat((0,k.x)(N,{},y).formattedAmount)},{label:null===(d=o.k.paymnetPaymentLabel)||void 0===d?void 0:d[x||"cs"],value:"".concat((0,k.x)(P,{},y).formattedAmount)}]:[],{label:null===(c=o.k.summaryDPHLabel)||void 0===c?void 0:c[x||"cs"],value:"".concat((0,k.x)(C,{},y).formattedAmount)},{label:null===(u=o.k.paymentSummaryLabel)||void 0===u?void 0:u[x||"cs"],value:"".concat((0,k.x)(Number(D),{},y).formattedAmount)}];return(0,l.jsx)("div",{className:(0,a.m6)("flex flex-col w-full",p),children:v&&(0,l.jsx)("div",{className:(0,a.m6)("w-full flex flex-col items-start gap-3",f&&"gap-1"),children:(0,l.jsx)("div",{className:"w-full ",children:S.map((e,t)=>(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-row justify-between w-full mb-[0.5rem] ",f&&"flex-col"),children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:e.label}),(0,l.jsx)("span",{className:"p2 font-human text-primary-raisin leading-[160%]",children:e.value})]},t))})})})},I=n(54013),E=n(96169),z=e=>{var t,n,i,a,s;let{isOffer:d,deal:c,lang:u,id:m,totalDiscount:p}=e,{userData:v}=(0,I.a)(),{offerToCart:f}=(0,E.j)();return(0,l.jsx)(l.Fragment,{children:d?(0,l.jsxs)("div",{className:"flex justify-between w-full items-center gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[0!==
1p?(0,l.jsx)(r.Button,{variant:"terciary",size:"small",type:"link",link:{text:"".concat(null===(t=o.k.downloadOfferSaleLabel)||void 0===t?void 0:t[u||"cs"]),url:"/api/pdfview?type=".concat(d?"offer":"order","&id=").concat(m,"&saleType=withsale")},icon:"MdDownload",iconType:"square",iconLeft:!0}):null,(0,l.jsx)(r.Button,{variant:"terciary",size:"small",type:"link",iconType:"square",link:{text:"".concat((null==v?void 0:v.discount)!==0?null===(n=o.k.downloadOfferWithoutSaleLabel)||void 0===n?void 0:n[u||"cs"]:null===(i=o.k.downloadOfferLabel)||void 0===i?void 0:i[u||"cs"]),url:"/api/pdfview?type=".concat(d?"offer":"order","&id=").concat(m,"&saleType=withoutsale")},icon:"MdDownload",iconLeft:!0})]}),(0,l.jsx)("div",{children:(0,l.jsx)(r.Button,{variant:"primary",link:{text:"".concat(null===(a=o.k.saveToCartLabel)||void 0===a?void 0:a[u||"cs"]),url:""},type:"button",size:"medium",onClick:()=>f((null==c?void 0:c.items)||[],"object"==typeof c.businessCase?String(c.businessCase.id||""):"").catch(()=>{})})})]}):(0,l.jsx)(r.Button,{variant:"terciary",iconLeft:!0,size:"small",type:"link",iconType:"square",icon:"MdDownload",link:{text:"".concat(null===(s=o.k.downloadOrderLabel)||void 0===s?void 0:s[u||"cs"]),url:"/api/pdfview?type=".concat(d?"offer":"order","&id=").concat(m,"&saleType=withsale")}})})},T=n(97604),_=e=>{var t,n,s,d,c,p,v;let{className:f,slugArray:h,lang:y,dealData:b,dealItems:j,isOffer:w,currency:k}=e,[N,P]=(0,i.useState)(b);(0,i.useEffect)(()=>{P(b)},[b]);let[C,I]=(0,i.useState)(j),[E,_]=(0,i.useState)(null!==(p=null==N?void 0:null===(t=N.items)||void 0===t?void 0:t.filter(e=>(null==e?void 0:e.priceListItem)===null&&!(null==e?void 0:e.description)))&&void 0!==p?p:[]),L=(0,i.useMemo)(()=>{var e;return(null!==(e=N.items)&&void 0!==e?e:[]).reduce((e,t)=>{var n,l;let i=C.find(e=>e.itemId===t.id),a=(null==i?void 0:i.count)||t.count||1,r=null!==(n=t.discountPercent)&&void 0!==n?n:0;return e+(null!==(l=null==t?void 0:t.price)&&void 0!==l?l:0)*(r/100)*a},0)},[C,N.items]);return(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col w-full",f),children:[(0,l.jsx)(r.Button,{variant:"terciary",size:"small",type:"link",link:{url:"/".concat(y,"/").concat((0,T.q2)(w?"offers":"orders",y)),text:"".concat(w?null===(n=o.k.showAllOFferslabel)||void 0===n?void 0:n[y||"cs"]:null===(s=o.k.showAllOrdersLabel)||void 0===s?void 0:s[y||"cs"])},iconLeft:!0,iconType:"square",icon:"MdArrowBack"}),(0,l.jsxs)("div",{className:"flex flex-col gap-5 md:gap-6",children:[(0,l.jsx)(u,{isOffer:w,deal:N,changeDealName:e=>{P({...N,name:e})},lang:y}),(0,l.jsx)(x,{isOffer:w,deal:N,lang:y,className:"border-b-[2px] pb-5 md:pb-6 border-b-primary-raisin"}),(0,l.jsx)(g,{deal:N,lang:y,dealType:w?"offer":"order"}),w&&(null==N?void 0:N.customFields).system_8af8c?(0,l.jsx)(m,{deal:N,title:null===(d=o.k.configurationTypeLabel)||void 0===d?void 0:d[y||"cs"],lang:y}):null,(0,l.jsx)(D,{lang:y,customProducts:E,setCustomProducts:_,updatedOrderItems:C,setUpdatedOrderItems:I,slugArray:h,order:N,isOffer:w,className:"border-b-[2px] border-b-primary-raisin",currency:k}),(0,l.jsx)(S,{updatedOrderItems:[...C,...E],title:null===(c=o.k.orderPaymentLabel)||void 0===c?void 0:c[y||"cs"],deal:N,type:w?"offer":"order",lang:y,currency:k,totalDiscount:L}),(0,l.jsx)(z,{isOffer:w,deal:N,lang:y,id:null!==(v=null==h?void 0:h[2])&&void 0!==v?v:"",totalDiscount:L})]})]})}},6729:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var l=n(26705),i=n(20955),a=n(53335),r=n(50524),o=n(72420),s=e=>{let{className:t,code:n,button:i,columns:s,type:d,companyName:c,name:u}=e;return(0,l.jsxs)("div",{className:(0,a.m6)("block w-full relative bg-grey-200 p-5 md:px-6 lg:px-10 md:py-8",t),children:[n&&i&&s&&u&&(0,l.jsxs)("div",{className:"top flex flex-nowrap items-center justify-between relative pb-[14px] mb-4 border-b-[1px] border-b-secondary-french",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start justify-between ",children:[(0,l.jsx)("h5",{className:"h5 block relative !text-[18px] text-primary-raisin",children:"order"===d?n:"offer name not provided"===u&&"offer"===d?n:u}),c&&(0,l.jsx)("p",{className:"p2 text-grey-1000",children:c})]}),i&&(0,l.jsx)("div",{className:"hidden md:block",children:(0,l.jsx)(r.Button,{...i,variant:"terciary",type:"link",iconRight:!0,iconType:"square"})})]}),s&&(0,l.jsx)("div",{className:"flex flex-nowrap lg:flex xl:flex-nowrap md:flex-row flex-col md:items-center md:justify-between md:gap-[16px] xl:gap-[27px] md:pb-0 pb-4 mb-5 md:mb-0 md:border-b-0 border-b-[1px] border-b-secondary-french",children:(0,l.jsx)("div",{className:"flex flex-nowrap  lg:flex-wrap xl:flex-nowrap  md:flex-row flex-col items-center justify-start md:gap-[40px] lg:gap-[20px] lg:gap-[60px] xl:gap-[80px]  w-full gap-1 mb-1 md:mb-0",children:s.map((e,t)=>(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-nowrap items-center justify-between  md:block w-full md:w-auto",t===s.length-1&&"demand"!==d?"self-end justify-end ml-auto md:text-end":"md:justify-start "),children:[e.label&&(0,l.jsx)("span",{className:"subscriptionText text-grey-800 block relative w-full md:mb-1 text-nowrap ".concat(t===s.length&&"demand"!==d?"md:text-right":"md:text-left"),children:e.label}),e.value&&(0,l.jsx)("span",{className:"p2 text-primary-raisin block relative w-full text-right text-nowrap ".concat(t===s.length-1&&"demand"!==d?"md:text-right":" md:text-left"),children:"number"==typeof e.value?(0,o.x)(e.value).formattedAmount:e.value})]},t))})}),i&&(0,l.jsx)("div",{className:"flex flex-nowrap justify-end md:hidden w-full",children:(0,l.jsx)(r.Button,{...i,variant:"terciary",type:"link",iconRight:!0,iconType:"square",disabled:"demand"===d})})]})},d=n(84606),c=n(33145),u=n(27648),m={src:"/_next/static/media/no-orders.693b430a.png",height:80,width:80,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJFBMVEXb28/g4Onh4eni4uni4uvs7PTo6PLh4erj4+3i4urk5O3h4enSwWB4AAAADHRSTlMBMGgNhaQ3mlNJdtV8+CZJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAANklEQVR4nBXKxxHAMBADsSUvSuq/X4/xBi7ZKlNNBF0oiN0QDubmgNkLeRCbkP3nyXzCA6d1Ph7CAO3LpujEAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8},p=e=>{let{title:t,className:n,lang:i="cs",isOfferPage:r=!1}=e,o="/".concat(i),s=r?"".concat(o,"/konfigurator"):"".concat(o,"/produkty"),d=r?"".concat(o,"/kontakt"):"".concat(o,"/konfigurator");return(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col items-center justify-center w-full lg:pt-12",n),children:[(0,l.jsx)(c.default,{src:m,alt:"No Orders",
1width:73,height:73,className:"mb-8 mt-12 lg:mt-0"}),t&&(0,l.jsx)("h5",{className:"h5 text-primary-raisin mb-2 lg:mb-3 font-medium",children:t}),(0,l.jsxs)("p",{className:"p2 text-grey-1000 text-center",children:[r?"Nab\xeddku z\xedsk\xe1te využit\xedm našeho":"Prohl\xe9dněte si naše"," ",(0,l.jsx)(u.default,{href:s,className:"text-primary-spring underline",children:r?"konfigur\xe1toru":"produkty"})," ","nebo ",r?"se n\xe1m můžete":"vyskoušejte"," ",(0,l.jsx)(u.default,{href:d,className:"text-primary-spring underline",children:r?"ozvat":"konfigur\xe1tor"}),"."]})]})},v=n(97604),f=n(77398),x=n.n(f),h=e=>{var t,n,c;let{className:u,moreButton:m,title:f,lang:h,dealsData:y,dealType:g}=e,[b,j]=(0,i.useState)(!1),w="offers"===g;return(0,l.jsxs)(l.Fragment,{children:[f&&(0,l.jsx)("h3",{className:"h3 text-primary-raisin self-stretch block mb-8 xl:mb-12",children:f}),(0,l.jsxs)("div",{className:(0,a.m6)("flex flex-col items-start gap-16 w-full md:pr-10 xl:pr-0",u),children:[y&&y.length>0?(0,l.jsx)("div",{className:"flex flex-col items-start gap-2 w-full",children:null==y?void 0:y.sort((e,t)=>Number(t.id)-Number(e.id)).slice(0,b?y.length:5).map((e,t)=>{var n,l,a,r,c,u,m;return(0,i.createElement)(s,{...e,type:w?"offer":"order",columns:[{label:null===(n=d.k.offerDateLabel)||void 0===n?void 0:n[h||"cs"],value:x()(e["rowInfo.createdAt"]).format("DD-MM-YYYY")},{label:w?null===(l=d.k.historyOfferStatusLabel)||void 0===l?void 0:l[h||"cs"]:null===(a=d.k.historyOrderStatusLabel)||void 0===a?void 0:a[h||"cs"],value:w?e.offerStatus.value:null===(r=e.salesOrderStatus)||void 0===r?void 0:r.value},{label:null===(c=d.k.historySummaryAmountLabel)||void 0===c?void 0:c[h||"cs"],value:"".concat((0,o.x)(e.totalAmount,{},null===(u=e.currency)||void 0===u?void 0:u.value).formattedAmount)}],button:{variant:"terciary",link:{url:"/".concat(h,"/").concat((0,v.q2)(g,h),"/").concat(e.id),text:null===d.k||void 0===d.k?void 0:null===(m=d.k.historyDetailsLabel)||void 0===m?void 0:m[h||"cs"]},size:"large",icon:"MdArrowForward"},key:t})})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(p,{title:null===d.k||void 0===d.k?void 0:null===(t=d.k["orders"===g?"titleNoOrders":"titleNoOffers"])||void 0===t?void 0:t[h||"cs"],lang:h,isOfferPage:w})}),((null==y?void 0:y.length)||(null==y?void 0:y.length))>5&&(0,l.jsx)(r.Button,{...m,variant:"primary",size:"medium",type:"button",className:"self-center",onClick:()=>{j(e=>!e)},link:{url:"",text:b?null===(n=d.k.showlessButtonHistory)||void 0===n?void 0:n[h||"cs"]:null===(c=d.k.showmoreButtonHistory)||void 0===c?void 0:c[h||"cs"]}})]})]})}},6766:function(e,t,n){"use strict";n.d(t,{ProductHeaderSection:function(){return w}});var l=n(26705),i=n(20955),a=n(50524),r=n(33145),o=n(62662),s=n(19764);n(7354),n(77948),n(44804);var d=n(24432),c=n(18526),u=n(53335),m=n(55806),p=n(96169),v=n(91543),f=n(58903),x=n(87294),h=n(79988),y=n(70801),g=n(72420),b=n(54013),j=n(97604);let w=e=>{var t,n,w,k,N;let{userData:P}=(0,b.a)(),{blocks:C,sliderImages:D,lang:S,slugArray:I,category:E,priceOnlyForRegisteredUsers:z}=e,[T,_]=(0,i.useState)(!1),[L,A]=(0,i.useState)(null),[B,R]=(0,i.useState)(1),M=(0,i.useRef)(null),[O,Z]=(0,i.useState)(!1),{openPopup:V}=(0,y.B)(),{addProduct:F}=(0,p.j)(),U=e=>{let t=Number.parseInt(e.target.value);0===t&&t<0?R(1):R(t)};if(!C)return null;let $=(null===(t=(e=>{var t;if(!e)return"";let n=e.find(e=>"block"===e._type),l="";return null==n||null===(t=n.children)||void 0===t||t.map(e=>{l+=null==e?void 0:e.text}),l})(null==C?void 0:C.description))||void 0===t?void 0:t.length)||0,q=(e,t)=>{F(e,t),Z(!0),null==V||V((0,l.jsx)(h.Z,{product:C,count:t,sliderImages:D,lang:S}))};return(0,l.jsx)("section",{className:(0,u.m6)("md:pt-6 pt-4 lg:pb-20 pb-7"),children:(0,l.jsxs)(m.Z,{children:[(0,l.jsx)(f.Q,{className:"mb-12 !pt-0",...(0,x.U)(I,{slug:(null==E?void 0:E.slug)||"",title:(null==E?void 0:E.title)||""},S,(null==C?void 0:C.title)||"")}),(0,l.jsxs)("div",{className:"flex flex-col lg:flex-row gap-[3rem] lg:gap-[6rem] pt-[0.5rem] lg:pb-0 pb-7 bg-white",children:[(0,l.jsx)("div",{className:(0,u.m6)("w-full lg:w-[45%] flex flex-col relative",D&&D.length<=1&&"justify-start"),children:D&&(null==D?void 0:D.length)>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:(0,u.m6)("flex items-center justify-center md:mb-8"),children:[D&&(null==D?void 0:D.length)>1&&(0,l.jsx)(d.h,{onClick:()=>{M.current&&M.current.slidePrev()},icon:"MdChevronLeft",className:"z-[40] md:block hidden",label:"Previous slide"}),(0,l.jsx)(s.tq,{spaceBetween:20,thumbs:{swiper:L},onSwiper:e=>{M.current=e},className:"w-full lg:w-[100%] h-full flex-1",modules:[o.Rv,o.o3],children:null==D?void 0:D.map((e,t)=>(0,l.jsx)(s.o5,{children:(0,l.jsx)("div",{className:"h-[180px] sl:h-[240px] md:!h-[480px] relative",children:(0,l.jsx)(r.default,{src:e.src||"",alt:e.alt||"",fill:!0,loading:0!==t?"lazy":void 0,priority:0===t,className:"object-contain w-auto h-auto max-h-[320px] lg:max-h-[420px] absolute block !left-[50%] !top-[50%] translate-y-[-50%] translate-x-[-50%]"})})},t))}),D&&(null==D?void 0:D.length)>1&&(0,l.jsx)(d.h,{onClick:()=>{M.current&&M.current.slideNext()},icon:"MdChevronRight",className:"z-[40] md:block hidden",label:"Next slide"})]}),D&&(null==D?void 0:D.length)>1&&(0,l.jsx)(s.tq,{onSwiper:A,spaceBetween:10,slidesPerView:5,className:"flex justify-center items-center gap-3 w-full mt-[2rem] lg:mt-[3.5rem]",modules:[o.Rv,o.o3],children:null==D?void 0:D.map((e,t)=>(0,l.jsx)(s.o5,{children:(0,l.jsx)("div",{className:"h-[88px]",children:(0,l.jsx)(r.default,{src:e.src||"",alt:e.alt||"",fill:!0,loading:"lazy",className:"object-contain w-auto h-auto max-h-[88px] absolute block !left-[50%] !top-[50%] translate-y-[-50%] translate-x-[-50%]"})})},t))})]}):(0,l.jsx)("div",{className:"h-[180px] sl:h-[240px] md:h-[480px] relative overflow-hidden w-full",children:(0,l.jsx)(r.default,{src:"/icons/placeholder-white.png",alt:"Placeholder image",width:400,height:400,priority:!0,className:"object-cover w-full h-auto max-h-[400px] lg:max-h-[420px] absolute block !left-[50%] !top-[50%] translate-y-[-50%] translate-x-[-50%]"})})}),(0,l.jsxs)("div",{className:"w-full lg:w-[55%] h-full flex flex-col items-start justify-between",children:[(null==C?void 0:C.anotation)&&(0,l.jsx)("h2",{className:"font-human font-bold  uppercase text-grey-800 text-[0.75rem] leading-[0.9rem] tracking-[0.1125rem] mb-2",children:C.anotation.toUpperCase()}),(null==C?void 0:C.title)&&(0,l.jsx)("h1",{className:"h3 block relative mb-4 md:mb-8 max-w-full lg:max-w-[90%] text-primary-raisin",children:null==C?void 0:C.title}),(null==C?void 0:C.description)&&(0,l.jsx)(c.Z,{content:null==C?void 0:C.description,className:(0,u.m6)("[&>p]:last-of-type:mb-0 transition-all duration-300 ease-in-out  max-w-full lg:max-w-[90%]",$>220&&"line-clamp-4 md:line-clamp-3 ",T&&"md:line-clamp-none line-clamp-none")}),$>220&&(0,l.jsx)(a.Button,{type:"button",variant:"terciary",icon:"MdArrowDownward",iconType:"square",iconRight:!0,className:(0,u.m6)(T?"":"mt-4"),iconClassName:(0,u.m6)(T?"rotate-[180deg]":""),onClick:()=>_(!T),link:{text:T?null===(n=v.K.showLessLabel)||void 0===n?void 0:n[S||"cs"]:null===(w=v.K.showMoreLabel)||void 0===w?void 0:w[S||"cs"]}}),(0,l.jsxs)("p",{className:(0,u.m6)("font-human text-[0.75rem] font-bold flex gap-[0.75rem] w-full lg:w-[90%] leading-[0.9rem] tracking-[0.1125rem] pb-[2.5rem] border-b-[1px] border-primary-raisin mt-4",$>220&&"mt-10"),children:[(0,l.jsx)("span",{className:"uppercase text-secondary-dark",children:null===(k=v.K.c
1ategoryNumberLabel)||void 0===k?void 0:k[S||"cs"]})," ",(0,l.jsx)("span",{className:"text-grey-800",children:null==C?void 0:C.catalogNumber})]}),z&&null===P?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"flex items-center justify-between w-full lg:w-[90%] mt-[2rem]",children:(0,l.jsx)("p",{className:"text-[2rem] leading-[4rem] font-human text-primary-raisin font-medium",children:"Cena se zobraz\xed po registraci"})}),(0,l.jsx)("div",{className:"flex flex-wrap lg:flex-nowrap items-center gap-8 mt-[2rem] w-full",children:(0,l.jsx)(a.Button,{link:{text:"Registrovat se",url:"/cs/".concat((0,j.q2)("registration","cs"))},type:"link",size:"large",className:" w-full md:max-w-[200px] self-center lg:self-start"})})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between w-full lg:w-[90%] mt-[2rem]",children:[(0,l.jsx)("p",{className:"text-[2.5rem] leading-[4rem] font-human text-primary-raisin font-medium",children:"number"==typeof(null==C?void 0:C.price)?(0,g.x)(C.price).formattedAmount:"string"==typeof(null==C?void 0:C.price)?(0,g.x)(Number(C.price)).formattedAmount:(0,g.x)(0).formattedAmount}),(0,l.jsxs)("div",{className:"flex flex-col justify-between font-human items-end",children:[(0,l.jsx)("p",{className:"text-[0.875rem] leading-[1.4rem] font-medium text-secondary-dark",children:"number"==typeof(null==C?void 0:C.priceWithoutTax)?(0,g.x)(C.priceWithoutTax,{withVAT:!1,showVATLabel:!0}).formattedAmount:"string"==typeof(null==C?void 0:C.priceWithoutTax)?(0,g.x)(Number(C.priceWithoutTax),{withVAT:!1,showVATLabel:!0}).formattedAmount:(0,g.x)(0,{withVAT:!1,showVATLabel:!0}).formattedAmount}),(0,l.jsx)("p",{className:"text-[0.875rem] leading-[1.4rem] font-medium text-secondary-dark",children:(null==C?void 0:C.recycleFee)!==0&&(0,l.jsxs)(l.Fragment,{children:["number"==typeof C.recycleFee?(0,g.x)(C.recycleFee).formattedAmount:"string"==typeof C.recycleFee?(0,g.x)(Number(C.recycleFee)).formattedAmount:(0,g.x)(0).formattedAmount," ",(0,l.jsx)("span",{className:"text-grey-800 font-normal",children:null===(N=v.K.recyclateTaxLabel)||void 0===N?void 0:N[S||"cs"]})]})})]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap lg:flex-nowrap items-center gap-8 mt-[2rem] w-full",children:[(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-[6px]",children:[(0,l.jsx)(d.h,{label:"Minus 1",type:"div",color:"grey",icon:"MdRemove",size:"small",className:"cursor-pointer",disabled:1===B,onClick:()=>R(B-1<1?1:B-1)}),(0,l.jsx)("label",{htmlFor:"activePage",className:"screenReaderElement",children:"ActivePage"}),(0,l.jsx)("input",{"aria-label":"Active page",id:"activepage",name:"activepage",value:B,type:"number",onChange:e=>U(e),className:"max-w-[40px] max-h-[40px] min-h-[40px] text-center border-[1px] border-grey-600 py-1 block w-full relative h-[56px]  p2  focus:border-0 outline-none text-primary-raisin  bg-white placeholder:text-grey-800 ",max:100,min:1}),(0,l.jsx)(d.h,{label:"Plus 1",type:"div",color:"grey",icon:"MdAdd",size:"small",className:"cursor-pointer",onClick:()=>R(B+1>100?100:B+1)})]}),(0,l.jsx)(a.Button,{...null==C?void 0:C.button,size:"large",className:" w-full md:max-w-[240px] self-center lg:self-start",onClick:()=>q(C.id,B)})]})]})]})]})]})})}},75312:function(e,t,n){"use strict";n.d(t,{Z:function(){return P},C:function(){return N}});var l=n(45008),i=n(26705),a=n(5032),r=e=>{var t,n,l,i;return{title:e.title||(null===(n=e.file)||void 0===n?void 0:null===(t=n.asset)||void 0===t?void 0:t._ref),thumbnail:e.thumbnail?(0,a.Z)(e.thumbnail):void 0,file:null===(i=e.file)||void 0===i?void 0:null===(l=i.asset)||void 0===l?void 0:l.url}},o=n(59899),s=e=>({thumbnailCover:(null==e?void 0:e.thumbnailCover)||!1,thumbnail:e.thumbnail?(0,a.Z)(e.thumbnail):void 0,button:e.button?(0,o.Z)(e.button):void 0});let d=e=>({image:e.image?(0,a.Z)(e.image):void 0});var c=e=>{switch(e._type){case"catalogTile":return{type:e._type,data:r(e)};case"categoryTile":return{type:e._type,data:s(e)};case"ImageTile":return{type:e._type,data:d(e)}}},u=n(43907),m=n(99062),p=n(53335),v=n(27957);let f=e=>{let{image:t,className:n}=e;return(null==t?void 0:t.src)?(0,i.jsx)("div",{className:(0,p.m6)("w-full sm:max-w-[350px] block relative overflow-hidden h-[200px] sm:h-[320px] md:h-[374px] group",n),children:(0,i.jsx)(v.Z,{src:t.src,alt:t.alt||"",width:700,height:748,lazy:!0,className:"object-cover w-full min-h-full transition-transform duration-300"})}):null};var x=e=>{if(!e.type)return null;switch(e.type){case"catalogTile":return(0,i.jsx)(u.default,{...e.data});case"categoryTile":return(0,i.jsx)(m.default,{...e.data,onlyGrid:e.onlyGrid});case"ImageTile":return(0,i.jsx)(f,{...e.data})}},h=n(70420),y=n(70433),g=n(31256),b=n(98834),j=n(37634),w=n(54751);function k(){let e=(0,l._)(['*[_type == "raynetProduct" && ',"] | order(raynetProductData.price asc)[0...8]{\n			","\n		}"]);return k=function(){return e},e}let N=async(e,t,n)=>{try{let l=(0,j.Z)(k(),e,w.e3),a=await b.L.fetch(l);if(a&&Array.isArray(a)&&a.length>0)return a.map((e,l)=>{let a=(0,h.r)(e,t);return(0,i.jsx)(y.default,{...a,lang:n,sliderProps:!0},"product-".concat(l))});return[]}catch(e){return console.error("Error fetching products with custom query:",e),[]}};var P=(e,t,n)=>{let{title:l,content:a,tiles:r,sectionLayout:o,onlyGrid:s,customProductQuery:d,customButton:u}=e,m=(null==r?void 0:r.map((e,l)=>{if(!e)return null;if("productTileSlider"===e._type){let a=e.product,r=(null==a?void 0:a.unpublished)===!0,o=!!t&&Array.isArray(null==a?void 0:a.unpublishedLocales)&&a.unpublishedLocales.includes(t);if(!a||r||o)return null;let s=(0,h.r)(a,n);return(0,i.jsx)(y.default,{...s,lang:t,sliderProps:!0},"tile-".concat(l))}return(0,i.jsx)(g.default,{className:"h-full",animation:{initial:{opacity:0,transform:"translateY(40px)"},whileInView:{opacity:1,transform:"translateY(0)",transition:{duration:.5,delay:.25+.15*l,ease:"circIn"}},viewport:{once:!0}},children:(0,i.jsx)(x,{...c(e),onlyGrid:s})},"tile-".concat(l))}).filter(e=>null!==e))||[];return{id:(null==o?void 0:o.idSection)||"",title:l,content:a,onlyGrid:s||!1,customProductQuery:d,customButton:u,blocks:m}}},56408:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var l=n(26705),i=n(53335),a=n(58447),r=n(20955),o=n(27648),s=n(18526),d=n(7336),c=e=>{let{activeTab:t,indexTab:n,content:i,tabList:a}=e;return t!==n?null:(0,l.jsxs)(d.E.div,{initial:{opacity:0}
1,whileInView:{opacity:1,transition:{duration:.5,ease:"easeInOut"}},viewport:{once:!0},className:"block relative mx-auto max-w-[868px]",children:[i&&(0,l.jsx)(s.Z,{content:i,className:"py-6 border-b-[1px]  [&>p]:mb-0 "}),a&&(0,l.jsx)("div",{children:a.map((e,t)=>(0,l.jsxs)("div",{className:"py-6 block relative  ",children:[e.title&&(0,l.jsx)("h3",{className:"p1 font-medium text-primary-raisin block relative mb-4",children:e.title}),e.content&&(0,l.jsx)(s.Z,{content:e.content,className:"[&>div]:mb-0"})]},t))})]})},u=n(31256),m=e=>{let{className:t,title:n,tabs:s,id:d}=e,[m,p]=(0,r.useState)(0),v=(e,t)=>{e.preventDefault(),p(t)};return(0,l.jsxs)(a.Z,{id:d,className:(0,i.m6)("py-10 md:py-[80px] md:pt-[100px]",t),children:[(0,l.jsx)(u.default,{animation:{initial:{transform:"translateY(40px)",opacity:0},whileInView:{transition:{duration:.5,delay:.25,ease:"circIn"},transform:"translateY(0)",opacity:1},viewport:{once:!0}},children:n&&(0,l.jsx)("h2",{className:"h2 block relative mb-10 text-left md:text-center",children:n})}),s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"max-w-full overflow-x-auto overflow-y-hidden relative mb-6 md:mb-10 border-b-[1px]",children:(0,l.jsx)("div",{className:"tab-navigation flex flex-nowrap items-center justify-start lg:justify-center border-secondary-french w-[550px] md:w-[700px] lg:w-full",children:s.map((e,t)=>(0,l.jsx)(u.default,{animation:{initial:{opacity:0}
1,whileInView:{transition:{duration:.75,delay:.25,ease:"easeOut"},opacity:1},viewport:{once:!0}},children:(0,l.jsx)(o.default,{href:"#",onClick:e=>v(e,t),className:(0,i.m6)("buttonText py-5 md:py-[24px] px-6 md:px-10 inline-block relative uppercase transition-all duration-300 ease-in-out whitespace-nowrap","before:content-[''] before:absolute before:w-full before:h-[2px] before:bottom-[-1px] before:left-0 before:scale-x-0 before:origin-left before:opacity-0 before:transition-all before:duration-300 before:ease-in-out before:bg-primary-raisin",t===m?"before:opacity-100 before:scale-x-100 text-primary-raisin":" text-grey-800"),children:e.title})},t))})}),(0,l.jsx)("div",{children:null==s?void 0:s.map((e,t)=>(0,l.jsx)(c,{...e,indexTab:t,activeTab:m},t))})]})]})}},47785:function(e,t,n){"use strict";var l=n(26705),i=n(53335);t.Z=e=>{let{className:t,title:n,items:a,configuratorVariant:r,summaryTable:o}=e;return(0,l.jsxs)("div",{className:(0,i.m6)("flex flex-col items-start justify-start gap-6",t),children:[n&&(0,l.jsxs)("p",{className:"subheadlineText text-primary-raisin w-full",children:[n,"\xa0"]}),a&&(0,l.jsx)("div",{className:(0,i.m6)("w-full",r&&"pb-5 border-b-[1px] border-b-secondary-french"),children:a.map((e,t)=>(0,l.jsxs)("div",{className:(0,i.m6)("box-content first-of-type:pt-0 py-[0.5rem] border-secondary-french border-b-[0.438px] flex justify-between items-start gap-5 md:gap-6",r&&"border-b-0 pb-1 pt-0 last-of-type:pb-0",o&&"py-4"),children:["object"==typeof e.label?e.label:(0,l.jsx)("p",{className:(0,i.m6)("subscriptionText leading-[22px] text-secondary-dark w-full lg:w-[70%] block",r&&"font-human text-[14px] font-normal leading-[160%] text-grey-800"),children:e.label}),"object"==typeof e.description?e.description:(0,l.jsx)("p",{className:(0,i.m6)("p3 md:text-[14px] leading-[22px] text-secondary-dark text-wrap w-full lg:w-[30%] text-right block",r&&"font-human text-[14px] font-medium leading-[160%] text-primary-raisin"),children:e.description})]},t))})]})}},15568:function(e,t,n){"use strict";var l=n(26705),i=n(87227),a=n(33145),r=n(20955),o=n(19764);n(61582),t.default=e=>{let{images:t}=e,n=(0,r.useRef)(null),[s,d]=(0,r.useState)(0),[c,u]=(0,r.useState)(!1),m=e=>{d(e.activeIndex),u(e.isEnd)};return(0,l.jsxs)("div",{className:"relative overflow-hidden xl:sticky xl:top-[15rem]",children:[(0,l.jsx)(o.tq,{slidesPerView:1,spaceBetween:16,onSwiper:e=>{n.current=e,m(e)},onSlideChange:m,className:"w-full",children:t.map((e,t)=>(0,l.jsx)(o.o5,{children:(0,l.jsx)("div",{className:"relative aspect-[4/3] w-full bg-grey-200",children:(0,l.jsx)(a.default,{src:e.src||"",alt:e.alt||"",fill:!0,loading:"lazy",sizes:"(max-width: 1024px) 100vw, 50vw",className:"object-contain"})})},"".concat(e.src,"-").concat(t)))}),(0,l.jsxs)("div",{className:"absolute bottom-4 right-4 z-20 flex items-center gap-2 bg-white/95 p-2 shadow-sm",children:[(0,l.jsx)("button",{type:"button","aria-label":"Previous image",disabled:0===s,onClick:()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.slidePrev()},className:"flex h-10 w-10 items-center justify-center bg-grey-600 transition-opacity disabled:cursor-not-allowed disabled:opacity-40",children:(0,l.jsx)(i.J,{name:"MdChevronLeft",className:"h-5 w-5"})}),(0,l.jsxs)("span",{className:"min-w-12 text-center font-human text-sm text-primary-raisin",children:[s+1," / ",t.length]}),(0,l.jsx)("button",{type:"button","aria-label":"Next image",disabled:c,onClick:()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.slideNext()},className:"flex h-10 w-10 items-center justify-center bg-grey-600 transition-opacity disabled:cursor-not-allowed disabled:opacity-40",children:(0,l.jsx)(i.J,{name:"MdChevronRight",className:"h-5 w-5"})})]})]})}},39687:function(e,t,n){"use strict";var l=n(26705),i=n(50524),a=n(53335);t.Z=e=>{let{title:t,content:n,actions:r,className:o}=e;return(0,l.jsxs)("div",{className:(0,a.m6)("content flex-col justify-start items-center gap-16 inline-flex max-w-[646px]",o),children:[(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("h3",{children:t}),n&&(0,l.jsx)("div",{className:"mt-6 contentParagraph font-normal text-[1rem] leading-[160%] md:text-[1.125rem] md:leading-[160%] tracking-[0px] xl:text-[1.125rem] text-secondary-dark text-wrap",children:n})]}),(()=>{if(!r)return null;let e=r.map((e,t)=>(0,l.jsx)(i.Button,{...e,className:"w-full md:w-auto"},t));return(0,l.jsx)("div",{className:"flex items-center gap-2",children:e})})()]})}},44906:function(e,t,n){"use strict";n.d(t,{default:function(){return es}});var l=n(26705),i=n(50524),a=n(20955),r=n(53335),o=n(24432),s=n(81195);let d=e=>{var t;let{className:n,mainLabel:i,icon:d,items:c,loginButton:u=!1,activeIndex:m,onClickItem:p}=e,[v,f]=(0,a.useState)(!1),[x,h]=(0,a.useState)(m||0);(0,a.useEffect)(()=>{h(m||0)},[m]);let y=(0,a.useRef)(null);(0,a.useEffect)(()=>{function e(e){y.current&&!y.current.contains(e.target)&&v&&f(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}});let g=(0,r.m6)("px-3 py-2 block text-primary-raisin cursor-pointer p3 text-[0.875rem] leading-[160%] hover:bg-grey-200 transition-all duration-300 ease-in-out",u&&"p2 medium lg:text-[1rem] lg:leading-[160%]"),b=()=>f(!v);return(0,l.jsxs)("div",{ref:y,className:(0,r.m6)(n,"inline-flex flex-nowrap justify-end w-auto relative",u&&"bg-grey-400 text-primary-raisin h-[56px] min-w-[unset] justify-stretch px-4"),children:[i&&d&&(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-3 cursor-pointer group",onClick:b,onKeyUp:b,children:[(0,l.jsx)("span",{className:"buttonText text-primary-raisin font-semibold",children:0===x?i:null==c?void 0:null===(t=c[x])||void 0===t?void 0:t.text}),(0,l.jsx)(o.h,{className:"!w-5 !h-5",icon:d,size:"small",color:u?"green":"grey",label:"Menu button",classIcon:(0,r.m6)(u&&(v?"rotate-[-90deg]":"group-hover:rotate-[90deg]")),active:!u&&v})]}),c&&(0,l.jsx)(s.Z,{selectedIndex:x||0,items:c,isOpenMenu:v,itemClass:g,setIsOpenMenu:f,handleClickItem:e=>{f(!v),h(e||0),p&&e?p(e):null==p||p(0)}})]})};var c=n(87227),u=e=>{let{className:t,label:n,value:i,onClick:a,moreOptions:o,moreItem:s}=e;return n&&i?(0,l.jsxs)("div",{className:(0,r.m6)("inline-flex flex-nowrap items-center gap-[6px] relative py-[2px] pl-3 pr-[6px] border-[1px] bg-grey-600 border-grey-600",t),children:[(0,l.jsx)("span",{className:"font-human text-[14px] leading-[160%] font-normal inline-block text-primary-raisin",children:n}),(0,l.jsx)("span",{onClick:()=>null==a?void 0:a(i,o,s),onKeyUp:()=>null==a?void 0:a(i,o,s),className:"flex flex-nowrap items-center justify-center cursor-pointer",children:(0,l.jsx)(c.J,{name:"MdClose",className:"!w-4 !h-4 text-primary-raisin"})})]}):null},m=n(91543),p=e=>{var t;let{className:n,tags:i,productsLabelWithCount:a,sorting:o,clearFiltersText:s,onClearAll:c,onClickTag:p,onClickSorting:v,activeSortIndex:f,lang:x}=e;return(0,l.jsxs)("div",{className:(0,r.m6)("min-w-[250px] w-full flex flex-nowrap justify-between",i&&(null==i?void 0:i.length)>0?"items-end":"items-center",n),children:[i&&(0,l.jsxs)("div",{className:"hidden lg:block relative",children:[(0,l.jsx)("div",{className:"tagsBar flex flex-wrap items-center gap-3 w-full mb-3",children:i.map((e,t)=>(0,l.jsx)(u,{...e,onClick:()=>null==p?void 0:p(e.value,e.moreOptions||!1,null==e?void 0:e.moreItem)},t))}),i.length>0&&(0,l.jsx)("button",{type:"button",onClick:c,onKeyUp:c,className:"font-human text-[14px] leading-[160%] text-primary-spring underline cursor-pointer",children:s||"".concat(null===m.K||void 0===m.K?void 0:null===(t=m.K.disableFilterLabel)||void 0===t?void 0:t[x||"cs"])})]}),a&&o&&(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-[16px] lg:w-auto w-full justify-between lg:justify-normal lg:min-w-[283px]",children:[a&&(0,l.jsxs)("div",{className:"flex flex-nowrap items-center",children:[a.label&&(0,l.jsx)("span",{className:"font-ibm text-[16px] leading-[170%] font-normal text-secondary-french",children:a.label}),a.count?(0,l.jsxs)("span",{className:"font-ibm text-[16px] leading-[170%] font-normal text-secondary-french",children:["(",a.count,")"]}):(0,l.jsxs)("span",{className:"font-ibm text-[16px] leading-[170%] font-normal text-secondary-french",children:["(",0,")"]})]}),o&&(0,l.jsx)(d,{...o,onClickItem:v,activeIndex:f||0})]})]})},v=e=>{var t;let{className:n,currentPage:i,maxPage:s,onChangePage:d,lang:c}=e,[u,p]=(0,a.useState)(i),[v,f]=(0,a.useState)(0),[x,h]=(0,a.useState)(!1),y=u<=1,g=u>=s;return(0,a.useEffect)(()=>{let e=document.getElementsByTagName("body")[0],t=setTimeout(()=>{f(u),e&&e.scrollIntoView({behavior:"smooth"})},700);return()=>{clearTimeout(t)}},[u]),(0,a.useEffect)(()=>{x&&(null==d||d(v),h(!1))},[v,d]),(0,a.useEffect)(()=>{p(i)},[i]),(0,l.jsxs)("div",{className:(0,r.m6)("flex flex-nowrap items-end justify-between lg:justify-end pt-10 gap-8",n),children:[(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-4 h-[48px]",children:[(0,l.jsx)("label",{htmlFor:"activepage",className:"screenReaderElement",children:"Active page"}),(0,l.jsx)("input",{"aria-label":"Active page",id:"activepage",name:"activepage",type:"number",defaultValue:i,onChange:e=>{let t=Number(e.target.value);p(t>s?s:t>0?t:1)},onKeyUp:()=>{h(!0)},className:"w-[48px] h-[48px] flex-grow-0 flex-shrink-0 text-center transition-all duration-300 ease-in-out border-[1px] border-grey-600 py-1 px-1 block relative mb-[-4px] outline-none text-primary-raisin bg-white placeholder:text-grey-800",max:s,min:0}
1,i),(0,l.jsxs)("span",{className:"p2 leading-[16px] text-primary-raisin flex flex-nowrap gap-[5px]",children:[(0,l.jsx)("span",{children:"z"}),(0,l.jsx)("span",{children:s}),(0,l.jsx)("span",{children:null===(t=m.K.paginationCountLabel)||void 0===t?void 0:t[c||"cs"]})]})]}),(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-4",children:[(0,l.jsx)(o.h,{type:"div",color:"grey",icon:"MdArrowBack",size:"medium",className:"cursor-pointer",onClick:()=>{p(v-1)},onMouseUp:()=>h(!0),disabled:y,label:"Previous page"}),(0,l.jsx)(o.h,{type:"div",color:"grey",icon:"MdArrowForward",size:"medium",className:"cursor-pointer",onClick:()=>{p(v+1)},onMouseUp:()=>h(!0),disabled:g,label:"Next page"})]})]})},f=n(70433),x=n(66269),h=n(58447),y=n(37774);let g=e=>{var t,n,l,i;return{sorting:{icon:"MdSwapVert",mainLabel:null===y._t||void 0===y._t?void 0:null===(t=y._t.eshopSortAll)||void 0===t?void 0:t[e||"cs"],items:[{url:"",text:null===y._t||void 0===y._t?void 0:null===(n=y._t.eshopSortRecommended)||void 0===n?void 0:n[e||"cs"]},{url:"",text:null===y._t||void 0===y._t?void 0:null===(l=y._t.eshopSortFromCheapest)||void 0===l?void 0:l[e||"cs"]},{url:"",text:null===y._t||void 0===y._t?void 0:null===(i=y._t.eshopSortFromExpensive)||void 0===i?void 0:i[e||"cs"]}]}}};var b=e=>{let{className:t,name:n,id:i="range-input",min:o,step:s=1,max:d,onChange:c,paramMin:u,paramMax:m}=e,[p,v]=(0,a.useState)(null!=u?u:o),[f,x]=(0,a.useState)(null!=m?m:d),[h,y]=(0,a.useState)(null),g=(0,a.useRef)(null),b=(0,a.useRef)(null),j=(0,a.useRef)(null),w=e=>"".concat(e," Kč"),k=(0,a.useCallback)(e=>{let t=Number.parseInt(e.replace(/[^0-9]/g,""),10);return Number.isNaN(t)?o:t},[o]),N=(0,a.useCallback)(e=>Math.round((e-o)/(d-o)*100),[o,d]),P=(0,a.useCallback)(()=>{if(j.current&&g.current&&b.current){let e=N(p),t=N(f);j.current.style.left="".concat(e,"%"),j.current.style.width="".concat(t-e,"%")}},[N,p,f]),C=(0,a.useCallback)(e=>{let t=Math.min(Number.parseInt(e.target.value,10),f-1);v(t),null==c||c({min:t,max:f})},[f,c]),D=(0,a.useCallback)(e=>{let t=Math.max(Number.parseInt(e.target.value,10),p+1);x(t),null==c||c({min:p,max:t})},[p,c]),S=(0,a.useCallback)(e=>{let t=Math.min(k(e.target.value),f-1);v(t),null==c||c({min:t,max:f})},[f,k,c]),I=(0,a.useCallback)(e=>{let t=Math.max(k(e.target.value),p+1);x(t),null==c||c({min:p,max:t})},[p,k,c]),E=(0,a.useCallback)(e=>{y(e)},[]),z=(0,a.useCallback)(()=>{y(null)},[]);return(0,a.useEffect)(()=>{void 0!==u&&v(u),void 0!==m&&x(m)},[u,m]),(0,a.useEffect)(()=>{P()},[P]),(0,l.jsxs)("div",{className:(0,r.m6)("block relative max-w-[560px]",t),children:[(0,l.jsxs)("div",{className:"relative block w-full mb-3 h-3",children:[(0,l.jsx)("input",{"aria-label":"range Min",type:"range",name:"".concat(n,"-min"),id:"".concat(i,"-min-range"),ref:g,min:o,max:d,value:p,step:s,onChange:C,className:(0,r.m6)("thumb thumb--zindex-3",p>d-100&&"thumb--zindex-5")}),(0,l.jsx)("input",{"aria-label":"Max range",type:"range",name:"".concat(n,"-max"),id:"".concat(i,"-max-range"),ref:b,min:o,value:f,max:d,step:s,onChange:D,className:(0,r.m6)("w-full block thumb thumb--zindex-4")}),(0,l.jsxs)("div",{className:"slider",children:[(0,l.jsx)("div",{className:"slider__track"}),(0,l.jsx)("div",{ref:j,className:"slider__range"})]})]}),(0,l.jsxs)("div",{className:"flex flex-nowrap justify-between items-center",children:[(0,l.jsxs)("div",{className:"block w-[6rem] lg:w-[104px] relative",children:[(0,l.jsx)("label",{htmlFor:"".concat(i,"-min-input"),className:"screenReaderElement",children:"RangeMin"}),(0,l.jsx)("input",{"aria-label":"Min",type:"text",min:o,max:d,value:"min"===h?p:w(p),onBlur:z,onFocus:()=>E("min"),onChange:S,id:"".concat(i,"-min-input"),className:"flex flex-nowrap items-center justify-center h-[32px] p4 !text-[14px] !leading-[160%] text-primary-raisin px-[7px] bg-white border-[1px] border-grey-600 max-w-[104px] w-full text-center"})]}),(0,l.jsxs)("div",{className:"block w-[6rem] lg:w-[104px] relative",children:[(0,l.jsx)("label",{htmlFor:"".concat(i,"-max-input"),className:"screenReaderElement",children:"RangeMax"}
1),(0,l.jsx)("input",{"aria-label":"Max",id:"".concat(i,"-max-input"),type:"text",min:o,max:d,value:"max"===h?f:w(f),onBlur:z,onFocus:()=>E("max"),onChange:I,className:"flex flex-nowrap items-center justify-center h-[32px] p4 !text-[14px] !leading-[160%] text-primary-raisin px-[7px] bg-white border-[1px] border-grey-600 max-w-[104px] w-full text-center"})]})]})]})},j=n(57261),w=n(7177),k=n(83403),N=e=>{let{min:t,max:n,name:i,id:o,step:s,onChange:d,value:c}=e,[u,m]=(0,a.useState)(1),[p,v]=(0,a.useState)(!1),[f,x]=(0,a.useState)(0),h=(0,a.useRef)(null),y=(0,a.useRef)(null);(0,a.useEffect)(()=>{void 0!==c&&m(c)},[c]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{x(u)},700);return()=>{clearTimeout(e)}},[u]),(0,a.useEffect)(()=>{p&&(null==d||d(f),v(!1))},[f,d]);let g=e=>{m(Number(e.target.value))},b=(0,a.useCallback)(e=>Math.round((e-t)/(n-t)*100),[t,n]);return(0,a.useEffect)(()=>{if(h.current){let e=b(u);y.current&&(y.current.style.left="".concat(0,"%"),y.current.style.width="".concat(e,"%"))}},[u,b]),(0,l.jsxs)("div",{className:"block",children:[(0,l.jsxs)("div",{className:"relative block w-full mb-3 h-3",children:[(0,l.jsx)("label",{htmlFor:o,className:"screenReaderElement",children:"Single Range input"}),(0,l.jsx)("input",{"aria-label":"range input single",type:"range",name:i,id:o,min:t,value:u,max:n,step:s,ref:h,onChange:g,onMouseUp:()=>v(!0),className:(0,r.m6)("w-full block relative z-[10] h-[4px] thumb")}),(0,l.jsxs)("div",{className:"slider",children:[(0,l.jsx)("div",{className:"slider__track"}),(0,l.jsx)("div",{ref:y,className:"slider__range"})]})]}),(0,l.jsxs)("div",{className:"w-full block relative",children:[(0,l.jsx)("label",{htmlFor:"number-".concat(o),className:"screenReaderElement",children:"Single Range input"}),(0,l.jsx)("input",{"aria-label":"range input single",id:"number-".concat(o),type:"number",min:t,max:n,value:u,onInput:()=>v(!0),onChange:g,className:"flex flex-nowrap items-center justify-center h-[24px] p4 !leading-[170%] text-primary-raisin px-[7px] bg-grey-400 max-w-[72px] w-full  text-center"})]})]})},P=n(72356),C=n(97604);let D=()=>{let{currentLanguage:e}=(0,P.o)(),t=t=>{let[n,l]=t.split(".");if(!n||!l)return console.warn("Invalid translation key format: ".concat(t,'. Use "category.key" format.')),t;let i=y.Cx[n];if(!i)return console.warn("Translation category not found: ".concat(n)),t;let a=i[l];return a?a[e]||a[C.SQ.czech]||l:(console.warn("Translation missing for ".concat(n,".").concat(l)),l)};return{t,tWithValues:(e,n)=>{let l=t(e);for(let[e,t]of Object.entries(n))l=l.replace("${".concat(e,"}"),String(t));return l},currentLanguage:e}};var S=e=>{let{block:t,clickCloseMenu:n,activeMobileMenu:o,onChangeFilter:s,searchParams:d,clearAllTags:m,showResultMobile:p,countProduct:v,activeCategory:f,tags:x,onClickTag:h,filterOptionCounts:y}=e,{t:g}=D(),P=t.map((e,t)=>({id:t,value:!1})),[C,S]=(0,a.useState)(P),I=(e,t,n)=>{e&&n?null==s||s(e,t||"",n):"category"===e&&(null==s||s(e,"",n))},E=e=>{S(t=>({...t,[e]:{id:e,value:!t[e].value}}))},z=e=>{var t,n,i,a,r,o;if(!e.data)return null;switch(e.type){case"normal":return(0,l.jsx)("div",{className:"flex flex-col gap-[0.5rem]",children:null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>(0,l.jsx)("p",{className:"font-human text-[1rem] leading-[1.6rem]",onClick:()=>I(e.id,t.value,e.type),onKeyDown:()=>I(e.id,t.value,e.type),children:t.label},n))});case"input-range":{let t=null==d?void 0:d[e.id],a=null===(n=e.data[0])||void 0===n?void 0:n.value,r=null===(i=e.data[1])||void 0===i?void 0:i.value,o=t?Number.parseInt(null==t?void 0:t.split("-")[0]):a,s=t?Number.parseInt(null==t?void 0:t.split("-")[1]):r;return(0,l.jsx)(b,{paramMax:s||void 0,paramMin:o||void 0,max:r,min:a,onChange:t=>I(e.id,t,e.type)})}case"radio":{let t=null==f?void 0:f.slug,n=null==d?void 0:d[e.id];return e.data.map((i,a)=>(0,l.jsx)("div",{className:"mb-[7px] block last-of-type:mb-0",children:n===i.value||i.value===t?(0,l.jsx)("div",{onClick:()=>{I(e.id,"","radio")},onKeyUp:()=>{I(e.id,"","radio")},className:"cursor-pointer inline-block z-[10]",children:(0,l.jsx)(j.Z,{label:i.label,name:e.id,id:"".concat(e.id,"-").concat(a),checked:!0,readOnly:!0},a)}
1):(0,l.jsx)(j.Z,{label:i.label,value:i.value,name:e.id,id:"".concat(e.id,"-").concat(a),checked:n===i.value||i.value===t,onChange:t=>{I(e.id,t.target.value,"radio")}},a)},a))}case"checkbox":{let t=null==d?void 0:d[e.id],n=null==t?void 0:t.split(","),i=(null==y?void 0:y[e.id])||{};return e.data.map((t,a)=>{let r=(null==n?void 0:n.includes(t.value))||!1,o=i[String(t.value)];return(0,l.jsx)("div",{className:"mb-[7px] last-of-type:mb-0",children:(0,l.jsx)(w.Z,{label:t.label,name:e.id,id:"".concat(e.id,"-").concat(a),value:t.value,checked:r,filterProps:!1,disabled:0===o&&!r,onChange:t=>{I(e.id,t.target.value,e.type)}})},a)})}case"single-range":{let t=null==d?void 0:d[e.id],n=t?Number.parseInt(t):null===(a=e.data[0])||void 0===a?void 0:a.value,i=null===(r=e.data[0])||void 0===r?void 0:r.value,s=null===(o=e.data[1])||void 0===o?void 0:o.value;return(0,l.jsx)(N,{id:e.id,name:e.id,min:i,max:s,onChange:t=>I(e.id,t,e.type),value:n})}default:return null}};return(0,l.jsxs)("div",{className:(0,r.m6)("fixed w-full h-full top-0 left-0  bg-white z-[0] lg:z-[10] transition-all duration-300 ease-in-out opacity-0 invisible lg:flex lg:flex-col lg:pt-2 lg:relative lg:opacity-100 lg:visible lg:bg-[unset] lg:top-[unset] lg:left-[unset]",o&&"opacity-100 visible z-[10000]"),children:[(0,l.jsxs)("div",{className:"mobileHeader flex flex-nowrap items-center justify-between lg:hidden h-[72px] px-5 border-b-[1px] border-primary-raisin",children:[(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-4",children:[(0,l.jsx)("div",{className:"exit cursor-pointer",onClick:n,onKeyUp:n,children:(0,l.jsx)(c.J,{name:"MdClose",className:"text-primary-spring w-6 h-6"})}),(0,l.jsx)("span",{className:"font-human text-[16px] leading-[18px] font-medium text-primary-spring",children:g("basic.filterLabel")})]}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:m,className:"font-ibm text-[14px] leading-[18px] font-bold tracking-[0.7px] uppercase text-grey-1000",children:g("basic.clearFilters")})})]}),(0,l.jsx)("div",{className:"lg:px-0 px-5 h-[calc(100%-144px)] lg:h-[auto] overflow-y-auto lg:overflow-visible",children:null==t?void 0:t.map((e,t)=>{var n;return(0,l.jsxs)("div",{className:"flex flex-col border-b-[1px] pb-[1.5rem] lg:pt-0 pt-5 lg:mb-[24px] last-of-type:border-b-0",children:[e.title&&(0,l.jsxs)("div",{className:"flex flex-nowrap items-center justify-start gap-2 mb-[1rem]",children:[(0,l.jsx)("p",{className:"font-human text-[14px] font-medium leading-[22.4px] lg:py-0 py-5 lg:block hidden",children:"category"===e.id?g("basic.searchPageCategoriesLabel"):e.title}),e.infoCategory&&(0,l.jsx)(k.Z,{text:e.infoCategory,className:"hidden lg:block"})]}),e.title&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("h6",{onClick:()=>E(t),onKeyUp:()=>E(t),className:"lg:hidden flex flex-nowrap items-center justify-between cursor-pointer mb-1 lg:mb-0",children:[(0,l.jsx)("span",{className:"p2 block font-medium text-primary-raisin",children:"category"===e.id?g("basic.searchPageCategoriesLabel"):e.title}),(0,l.jsx)(c.J,{name:"MdKeyboardArrowDown",className:"text-primary-raisin w-6 h-6"})]}),(0,l.jsx)("div",{className:"flex flex-wrap items-center gap-1 lg:hidden",children:null==x?void 0:x.map((t,n)=>{if((null==t?void 0:t.value)===e.id)return(0,l.jsx)(u,{...t,onClick:()=>null==h?void 0:h(t.value,t.moreOptions||!1,null==t?void 0:t.moreItem)},n)})})]}),(0,l.jsx)("div",{className:(0,r.m6)("lg:block lg:opacity-100 lg:visible lg:max-h-[unset] transition-all duration-300 ease-in-out",(null==C?void 0:null===(n=C[t])||void 0===n?void 0:n.value)===!0?"opacity-100 visible max-h-[10000px] pt-3":"opacity-0 invisible max-h-[0px]"),children:z(e)})]},e.id)})}),(0,l.jsx)("div",{className:"mobileFooter lg:hidden flex flex-nowrap items-center h-[72px] justify-center px-5 border-t-[1px] border-secondary-french",children:(0,l.jsx)(i.Button,{type:"button",variant:"primary",size:"small",className:"w-full",onClick:p,link:{text:"".concat(g("basic.showResults")," ").concat(v," ").concat(g("basic.resultsCount"))}})})]})},I=n(31256),E=e=>{let{title:t,text:n}=e;return(0,l.jsxs)("div",{className:"block relative",children:[t&&(0,l.jsx)(I.default,{animation:{initial:{transform:"translateY(20px)",opacity:0}
1,animate:{transition:{duration:.4,ease:"circIn"},transform:"translateY(0)",opacity:1}},children:(0,l.jsx)("h2",{className:"h3 block relative text-primary-raisin mb-4 md:mb-6",children:t})}),n&&(0,l.jsx)(I.default,{animation:{initial:{transform:"translateY(20px)",opacity:0},animate:{transition:{duration:.4,delay:.25,ease:"circIn"},transform:"translateY(0)",opacity:1}},children:(0,l.jsx)("p",{className:"p2 text-secondary-dark",children:n})})]})},z=n(99376);let T=e=>{if(!e)return"";let t="";for(let n in e){let l=e[n];l&&""!==l&&"undefined"!==l&&null!==l&&"category"!==n&&(t+="&".concat(n,"=").concat(encodeURIComponent(l)))}let n="?".concat(t);return n.slice(0,1)+n.slice(2)},_=e=>{switch(e){case 0:return"normal";case 1:return"price-asc";case 2:return"price-desc"}},L=e=>{let t=e.sort;if(!t)return 0;switch(t){case"normal":return 0;case"price-asc":return 1;case"price-desc":return 2}},A=(e,t,n)=>{let l=e.replace("?","").split("&");if(0===l.length)return null;let i=[];return(l.map(e=>{let[t,l]=e.split("=");if(!t||!l||"undefined"===l)return;let a=decodeURIComponent(l),r=null==n?void 0:n.find(e=>e.id===t),o=e=>{var t;let n=null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.find(t=>t.value===e);return null==n?void 0:n.label};switch(t){case"people":i.push({value:t,label:"".concat((null==r?void 0:r.title)||"",": ").concat(a)});break;case"price":{let[e,n]=a.split("-");i.push({value:t,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e," - ").concat(n," Kč")});break}case"s":i.push({value:t,label:"Hledan\xfd v\xfdraz: ".concat(a)});break;case"mounting":{let e=null==a?void 0:a.split(",");if(e)for(let n of e){let e=o(n);e&&i.push({moreOptions:!0,value:t,moreItem:n,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e)})}break}case"system":{let e=null==a?void 0:a.split(",");if(e)for(let n of e){let e=o(n);e&&i.push({moreOptions:!0,value:t,moreItem:n,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e)})}break}case"typepeople":{let e=null==a?void 0:a.split(",");if(e)for(let n of e){let e=o(n);e&&i.push({moreOptions:!0,value:t,moreItem:n,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e)})}break}case"design":{let e=null==a?void 0:a.split(",");if(e)for(let n of e){let e=o(n);e&&i.push({moreOptions:!0,value:t,moreItem:n,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e)})}break}case"chip":{let e=null==a?void 0:a.split(",");if(e)for(let n of e){let e=o(n);e&&i.push({moreOptions:!0,value:t,moreItem:n,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e)})}break}case"display":{let e=null==a?void 0:a.split(",");if(e)for(let n of e){let e=o(n);e&&i.push({moreOptions:!0,value:t,moreItem:n,label:"".concat((null==r?void 0:r.title)||"",": ").concat(e)})}}}}),t&&i.push({value:"category",label:null==t?void 0:t.title}),0===i.length)?null:i};var B=n(20204),R=n(87294),M=n(58903),O=n(7336),Z=n(48614),V=n(40328);let F=async e=>{let t=await fetch(e,{next:{revalidate:0}});if(!t.ok)throw Error("Failed to fetch products");return t.json()};var U=e=>{var t,n,r;let{headerBlock:o,eshopBlocks:s,filterBlock:d,pagesCount:c,searchParams:u,productCount:y,activeCategory:b,slugArray:j,lang:w}=e,k=(0,R.U)(j,b,w),[N,P]=(0,a.useState)(!1),[C,D]=(0,a.useTransition)(),[I,U]=(0,a.useState)(u||{}),[$,q]=(0,a.useState)(u||{}),[H,J]=(0,a.useState)(!1),K=(0,z.useRouter)(),G=(0,z.usePathname)(),W=L($),Q=A(T($),b,d),Y="/api/products?".concat(new URLSearchParams({...$,categorySlug:(null==b?void 0:b.slug)||"",lang:w||"cs"}).toString()),{data:X,isValidating:ee}=(0,V.ZP)(Y,F,{fallbackData:{products:s||[],productsCount:y||0,pagesCount:c||1},revalidateOnFocus:!1,dedupingInterval:1e4,keepPreviousData:!0}),et=(null==X?void 0:X.products)||s||[],en=(null==X?void 0:X.productsCount)||y||0,el=(null==X?void 0:X.pagesCount)||c||1,ei=(0,a.useCallback)(e=>{J(!0),q(t=>{let n={...t};return Object.entries(e).map(e=>{let[t,l]=e;void 0!==l?n[t]=String(l):delete n[t]}),n}),D(()=>{let t={...I};Object.entries(e).map(e=>{let[n,l]=e;void 0!==l?t[n]=String(l):delete t[n]});let n="".concat(G).concat(T(t));K.push(n,{scroll:!1}),U(t),J(!1)})},[G,K,I]),ea=()=>{P(!1)},er=(e,t,n)=>{if(!0===t){let t=$[e],l=null==t?void 0:t.split(","),i=(null==l?void 0:l.indexOf(n))||0;i>-1&&(null==l||l.splice(i,1)),ei({page:1,[e]:null==l?void 0:l.join(",")})}else if("category"===e){let e="/".concat(w,"/produkty/");K.push(e,{scroll:!1})}else{let t={...$};delete t[e],ei({...t,page:1})}},eo=()=>{q({});let e="/".concat(w,"/produkty/");K.push(e,{scroll:!1}),U({})},es=(0,a.useCallback)(e=>{if(!d)return[];let t=d.find(t=>
1t.id===e);return(null==t?void 0:t.data)?t.data.map(e=>String(e.value)).filter(Boolean):[]},[d]),ed=(0,a.useCallback)(e=>e.toLowerCase().replace(/\s+/g,"-").trim(),[]),ec=(0,a.useCallback)((e,t)=>{let n=decodeURIComponent(e),l=t.map(ed);if(n.includes(",")){let e=n.split(",").filter(e=>{let t=ed(e.trim());return l.includes(t)});return e.length>0?e.join(","):""}let i=ed(n);return l.includes(i)?n:""},[ed]),eu=(0,a.useCallback)(()=>{if(!d)return;let e=d.map(e=>e.id),t={...$},n=!1,l={};for(let[i,a]of Object.entries(t)){if(!a||""===a||"undefined"===a){n=!0;continue}if("page"===i||"sort"===i||"s"===i)l[i]=a;else if(e.includes(i)){if("price"===i||"people"===i)l[i]=a;else if(("system"===i||"mounting"===i||"design"===i)&&a.includes(","))l[i]=a;else{let e=ec(a,es(i));e?l[i]=e:n=!0}}else n=!0}if(n){let e=T(l),t="".concat(G).concat(e);q(l),U(l),K.replace(t,{scroll:!1})}},[d,$,G,K,es,ec]);(0,a.useEffect)(()=>{U(u||{}),q(u||{})},[u]),(0,a.useEffect)(()=>{d&&eu()},[eu,d]);let em=ee||C||H;return(0,l.jsxs)(h.Z,{layout:{presentation:x.c.Default,gap:0},className:"mb-10 md:mb-[60px]",children:[k&&(0,l.jsx)(M.Q,{...k}),(0,l.jsxs)("div",{className:"flex xl:grid-cols-[auto] w-full h-full bg-white pt-10 relative",children:[(0,l.jsx)("div",{className:"lg:w-[calc(240px+32px)] xl:w-[calc(269px+64px)] lg:pr-[2rem] xl:pr-[3rem]",children:d&&(0,l.jsx)("div",{className:"",children:(0,l.jsx)(S,{tags:Q||[],onClickTag:er,searchParams:$,onChangeFilter:(e,t,n)=>{if(e)switch(n){case"single-range":default:ei({page:1,[e]:t});break;case"input-range":{let n=null==t?void 0:t.min,l=null==t?void 0:t.max;ei({page:1,[e]:"".concat(n,"-").concat(l)});break}case"radio":if("category"===e){let e=["system","mounting","display","price","design","chip","typepeople","people"],n={};for(let[t,l]of Object.entries($))(e.includes(t)||"sort"===t||"s"===t)&&(n[t]=l);n.page="1";let l=T(n),i="/".concat(w,"/produkty/").concat(t).concat(l);K.push(i,{scroll:!1})}else ei({page:1,[e]:t});break;case"checkbox":{let n=$[e];if(void 0===n||""===n)ei({page:1,[e]:t});else{let l=n.split(","),i=l.indexOf(t);i>-1?l.splice(i,1):l.push(t),ei({page:1,[e]:l.join(",")})}}}},block:d,activeMobileMenu:N,clickCloseMenu:()=>ea(),clearAllTags:eo,showResultMobile:()=>{P(!1)},countProduct:en,activeCategory:b,filterOptionCounts:null==X?void 0:X.filterOptionCounts})})}),(0,l.jsxs)(O.E.div,{initial:{opacity:0}
1,animate:{opacity:1,transition:{duration:.25,ease:"easeInOut"}},className:"w-full lg:w-[calc(100%-272px)] xl:w-[calc(100%-333px)]",children:[(0,l.jsx)(E,{...o}),(0,l.jsx)("div",{className:"lg:hidden flex flex-nowrap items-center justify-center w-full mt-10",children:(0,l.jsx)(i.Button,{variant:"secondary",size:"small",type:"button",className:"w-full",link:{text:"".concat(null===(t=m.K.filterLabel)||void 0===t?void 0:t[w||"cs"])},onClick:()=>P(!0)})}),(0,l.jsx)(p,{...g(w),tags:Q||[],productsLabelWithCount:{label:"".concat(null===(n=m.K.filterMainLabel)||void 0===n?void 0:n[w||"cs"]),count:en},className:"mt-4 lg:mt-[3rem] lg:mb-[2.5rem] mb-4",onClickTag:er,onClickSorting:e=>{ei({sort:_(e)||"normal"})},onClearAll:eo,activeSortIndex:W,lang:w}),(0,l.jsxs)(Z.M,{mode:"wait",children:[(null==et?void 0:et.length)>0&&!em&&(0,l.jsx)(O.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"grid grid-cols-1 xs:grid-cols-2 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-[0.5rem] py-[2.5rem] border-b-[1px] border-t-[1px] border-secondary-french",children:null==et?void 0:et.map((e,t)=>(0,l.jsx)(f.default,{...e,className:"w-auto h-auto col-span-1",lang:w},"product-".concat(t,"-").concat(e.id||t)))},"products"),em&&(0,l.jsx)(O.E.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.3},className:"grid grid-cols-1 xs:grid-cols-2 md:grid-cols-2 xl:grid-cols-4 gap-[0.5rem] py-[2.5rem] border-b-[1px] border-t-[1px] border-secondary-french",children:[...Array(16)].map((e,t)=>(0,l.jsx)(B.Z,{},"ghost-".concat(t)))},"loading"),(null==et?void 0:et.length)===0&&!em&&(0,l.jsx)(O.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"block min-h-[400px] lg:min-h-[100vh] w-full border-b-[1px] border-t-[1px] py-6 lg:py-10 border-secondary-french",children:(0,l.jsx)("h4",{className:"h4 text-primary-raisin",children:null===(r=m.K.noResultsLabel)||void 0===r?void 0:r[w||"cs"]})},"no-results")]}),el>0&&(0,l.jsx)(v,{maxPage:el,currentPage:Number(null==$?void 0:$.page)||1,onChangePage:e=>{ei({page:e.toString()})},lang:w})]})]})]})},$=n(30166),q=n(59899),H=n(87240),J=n(3607),K=e=>{var t,n;let{subtitle:l,icon:i,smallTextLeft:a,smallText:r,title:o,position:s,address:d,phone:c,email:u}=e;return{subtitle:l?(0,J.N)(l):void 0,icon:(null==i?void 0:null===(t=i.icon)||void 0===t?void 0:t.name)?null==i?void 0:null===(n=i.icon)||void 0===n?void 0:n.name:void 0,smallTextLeft:!!a&&(0,J.N)(a),smallText:r?(0,J.N)(r):void 0,title:o?(0,J.N)(o):void 0,position:s?(0,J.N)(s):void 0,address:(null==d?void 0:d.map(e=>({text:e.text?(0,J.N)(e.text):void 0})))||[],phone:c?(0,J.N)(c):void 0,email:u?(0,J.N)(u):void 0}},G=e=>{let{nameFile:t,file:n,urlFile:l}=e;return l?{nameFile:t?(0,J.N)(t):"",link:{url:l?(0,J.N)(l):"",text:"St\xe1hnout"}}:{nameFile:t?(0,J.N)(t):"",link:n&&{url:n.url?n.url:n.asset._ref,text:"St\xe1hnout"}||void 0}},W=e=>{let{placeEvent:t,labelActiveEvent:n,descriptionLines:l,button:i}=e;return{placeEvent:t||"",labelActiveEvent:n||"",descriptionLines:(null==l?void 0:l.map(e=>({text:e.text?e.text:void 0,icon:e.icon?(0,H.Z)(e.icon):void 0})))||[],button:i?(0,q.Z)(i):void 0}},Q=(e,t)=>{let{title:n,icon:l,iconLeft:i,basicContent:a}=e;return{title:n?(0,J.N)(n):void 0,icon:(0,H.Z)(l),indexAccordion:t,iconLeft:!!i&&i,basicContent:a?(0,J.N)(a):void 0}},Y=e=>{var t,n;let{title:l,description:i,icon:a,number:r}=e;return{title:l?(0,J.N)(l):void 0,description:i?(0,J.N)(i):void 0,number:r?(0,J.N)(r):void 0,icon:(null==a?void 0:null===(t=a.icon)||void 0===t?void 0:t.name)?null===(n=a.icon)||void 0===n?void 0:n.name:void 0}},X=n(5032),ee=n(75312),et=e=>{let{title:t,items:n}=e;return{title:t?(0,J.N)(t):void 0,items:null==n?void 0:n.map(e=>({label:e.label?(0,J.N)(e.label):"",description:e.description?(0,J.N)(e.description):""}))}},en=n(91485);let el=e=>{if(!e)return null;switch(e.valueType){case"text":return e.textValue||"";case"check":return!!e.checkValue;default:return null}};var ei=n(9763),ea=n(29123);let er={contactSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,23273)),{loadableGenerated:{webpack:()=>[23273]}}),convert:e=>{let{contacts:t,sectionLayout:n}=e;return{id:(null==n?void 0:n.idSection)||"",contacts:(null==t?void 0:t.map(e=>K(e)))||[]}}},bannerSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,85786)),{loadableGenerated:{webpack:()=>[85786]}}),convert:e=>{let{description:t,title:n,button:l,subtitle:i,phone:a,email:r,sectionLayout:o,hasInput:s,emailReceiver:d,ecomailId:c}=e;return{id:null==o?void 0:o.idSection,description:t||void 0,title:n?(0,J.N)(n):void 0,button:l?(0,q.Z)(l):void 0,phone:a?{name:(null==a?void 0:a.name)?(0,J.N)(a.name):void 0,icon:(0,H.Z)(a.icon)}:void 0,email:r?{name:(null==r?void 0:r.name)?(0,J.N)(r.name):void 0,icon:(0,H.Z)(r.icon)}:void 0,subtitle:i?(0,J.N)(i):void 0,hasInput:s?(0,J.N)(s):void 0,ecomailId:c,emailReceiver:d?(0,J.N)(d):void 0}}},faqSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,19417)),{loadableGenerated:{webpack:()=>[19417]}}),convert:e=>{let{title:t,description:n,button:l,faqs:i,sectionLayout:a}=e;return{id:(null==a?void 0:a.idSection)||"",title:t?(0,J.N)(t):"",description:n?(0,J.N)(n):"",button:l?(0,q.Z)(l):void 0,accordions:(null==i?void 0:i.map((e,t)=>Q(e,t)))||[]}}},featureSection:{component:(0,$.default)(()=>n.e(3885).then(n.bind(n,3885)),{loadableGenerated:{webpack:()=>[3885]}}),convert:e=>{let{title:t,subtitle:n,features:l,sectionLayout:i}=e;return{id:(null==i?void 0:i.idSection)||"",title:t||void 0,subtitle:n||void 0,features:null==l?void 0:l.map(e=>Y(e))}}},tableSection:{component:(0,$.default)(()=>n.e(5121).then(n.bind(n,45121)),{loadableGenerated:{webpack:()=>[45121]}}),convert:e=>{let{title:t,tables:n,button:l}=e;return{id:"tabulka",title:t?(0,J.N)(t):void 0,button:l?(0,q.Z)(l):void 0,tables:null==n?void 0:n.map(e=>et(e))}}},downloadSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,19898)),{loadableGenerated:{webpack:()=>[19898]}}),convert:e=>{let{title:t,types:n,sectionLayout:l}=e;return{id:(null==l?void 0:l.idSection)||"",title:t?(0,J.N)(t):void 0,types:null==n?void 0:n.map(e=>{var t;return e&&{title:e.title?(0,J.N)(e.title):void 0,icon:(0,H.Z)(e.icon),files:(null===(t=e.files)||void 0===t?void 0:t.map(e=>G(e)))||[]}||[]})}}},pictureSection:{component:(0,$.default)(()=>n.e(1525).then(n.bind(n,81525)),{loadableGenerated:{webpack:()=>[81525]}}),convert:e=>{let{image:t,sectionLayout:n}=e;return{id:(null==n?void 0:n.idSection)||"",image:t?(0,X.Z)(t):void 0}}},textPicSection:{component:(0,$.default)(()=>n.e(1302).then(n.bind(n,11302)),{loadableGenerated:{webpack:()=>[11302]}}),convert:e=>{let{content:t,sectionLayout:n,image:l,images:i,imageLeft:a}=e;return{id:(null==n?void 0:n.idSection)||"",content:t||void 0,image:l&&(0,X.Z)(l),images:null==i?void 0:i.map(e=>(0,X.Z)(e)).filter(e=>!!e.src),imageLeft:!!a&&a}}},headerSection:{component:ea.default,convert:e=>{let{variant:t,headerWithLinks:n,headerWithImage:l,sectionLayout:i}=e;return{layout:i||void 0,textBlock:"HeaderWithLinks"===t&&n&&{title:n.title?n.title:"",description:n.description,button:n.button?(0,q.Z)(n.button):{}}||{},links:"HeaderWithLinks"===t&&(null==n?void 0:n.links)&&n.links.map(e=>({title:e.title,button:e.button?(0,q.Z)(e.button):{},image:e.picture?(0,X.Z)(e.picture):{}}))||[],image:"HeaderWithImage"===t&&(null==l?void 0:l.image)&&(0,X.Z)(l.image)||{},hasImage:"HeaderWithImage"===t&&(null==l?void 0:l.image)&&!0||!1,doubleButtonBlock:"HeaderWithImage"===t&&l&&{anotation:l.anotation?l.anotation:"",title:l.title?l.title:"",secondaryTitle:l.secondaryTitle?l.secondaryTitle:"",description:l.description?l.description:"",button1:l.button1?(0,q.Z)(l.button1):{},button2:l.button2?(0,q.Z)(l.button2):{}}||{}}}},headerContent:{component:ei.default,convert:e=>{let{anotation:t,title:n,content:l,inputLabel:i,button:a,date:r,sectionLayout:o,ecomailID:s,successMessage:d}=e;return{layout:o||void 0,anotation:t||void 0,title:n||void 0,content:l||void 0,inputLabel:i||void 0,ecomailID:s||void 0,date:r||void 0,button:a?(0,q.Z)(a):void 0,successMessage:d||void 0}}},sliderSection:{component:(0,$.default)(()=>n.e(8247).then(n.bind(n,98247)),{loadableGenerated:{webpack:()=>[98247]}}),convert:ee.Z,queryComponent:(0,$.default)(()=>n.e(2647).then(n.bind(n,22647)),{loadableGenerated:{webpack:()=>[22647]}})},roadshowSection:{component:(0,$.default)(()=>n.e(4433).then(n.bind(n,4433)),{loadableGenerated:{webpack:()=>[4433]}}),convert:e=>{let{title:t,roadshowBlock:n,sectionLayout:l}=e;return{id:(null==l?void 0:l.idSection)||"",title:t||"",roadshowBlock:(null==n?void 0:n.map(e=>{var t;return{breakLabel:e.hasbreakLabel?e.breakLabel:"",timeZone:e.hasbreakLabel?"":e.timeZone,list:(null===(t=e.list)||void 0===t?void 0:t.map(e=>e))||[]}}))||[]}}},tabSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,56408)),{loadableGenerated:{webpack:()=>[56408]}}
1),convert:e=>{let{title:t,tabs:n,sectionLayout:l}=e;return{id:(null==l?void 0:l.idSection)||"",title:t||"",tabs:(null==n?void 0:n.map((e,t)=>{var n;return{title:e.title?e.title:"",indexTab:t,content:e.content?e.content:void 0,tabList:(null===(n=e.tabList)||void 0===n?void 0:n.map(e=>({title:e.title?e.title:"",content:e.content?e.content:void 0})))||[]}}))||[]}}},eventSection:{component:(0,$.default)(()=>n.e(6106).then(n.bind(n,6106)),{loadableGenerated:{webpack:()=>[6106]}}),convert:e=>{let{title:t,description:n,events:l,sectionLayout:i}=e;return{id:(null==i?void 0:i.idSection)||"",title:t||"",description:n||"",events:(null==l?void 0:l.map(e=>W(e)))||[]}}},contentSection:{component:(0,$.default)(()=>n.e(7727).then(n.bind(n,57727)),{loadableGenerated:{webpack:()=>[57727]}}),convert:e=>{let{content:t}=e;return{content:t||void 0}}},formSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,56661)),{loadableGenerated:{webpack:()=>[56661]}}),convert:e=>{let{layoutForm:t,textButton:n,inputs:l,formHeading:i,showHeading:a}=e,r=e.emailContent;return{layoutForm:t||"column",textButton:n||"",formHeading:i&&a?i:"",checkboxLabel:e.checkboxLabel?e.checkboxLabel:"Beru na vědom\xed informace o ochraně osobn\xedch \xfadajů",inputs:null==l?void 0:l.map(e=>({placeholder:e.placeholder?e.placeholder:"",type:e.type?e.type:"text",name:e.name?e.name:""})),emailContent:r?{greeting:r.greeting||"Dobr\xfd den, evidujeme nov\xfd z\xe1jem o individu\xe1ln\xed Å¡kolen\xed",infoText:r.infoText||"V př\xedpadě jak\xfdchkoliv dotazů nebo probl\xe9mů n\xe1s nev\xe1hejte kontaktovat na adrese [email protected]."}:{greeting:"Dobr\xfd den, evidujeme nov\xfd z\xe1jem o individu\xe1ln\xed Å¡kolen\xed",infoText:"V př\xedpadě jak\xfdchkoliv dotazů nebo probl\xe9mů n\xe1s nev\xe1hejte kontaktovat na adrese [email protected]."}}}},partnerSection:{component:(0,$.default)(()=>n.e(7371).then(n.bind(n,67371)),{loadableGenerated:{webpack:()=>[67371]}}),convert:e=>{let{content:t,image:n}=e;return{content:t||void 0,image:n&&(0,X.Z)(n)}}},headerAnimationSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,28008)),{loadableGenerated:{webpack:()=>[28008]}}),convert:e=>{let{title:t,description:n,button:l,sectionLayout:i}=e;return{layout:i||void 0,textBlock:{title:t||"",description:n||"",button:l?(0,q.Z)(l):{}}}}},linksSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,68980)),{loadableGenerated:{webpack:()=>[68980]}}),convert:e=>{let{links:t}=e;return{links:(null==t?void 0:t.map(e=>{var t;let n=e.button?(0,q.Z)(e.button):{};return{title:null==n?void 0:null===(t=n.link)||void 0===t?void 0:t.text,button:n,image:e.picture?(0,X.Z)(e.picture):{}}}))||[]}}},comparisonSection:{component:(0,$.default)(()=>Promise.resolve().then(n.bind(n,32196)),{loadableGenerated:{webpack:()=>[32196]}}),convert:e=>{var t,n;let{title:l}=e,i=(null===(t=e.items)||void 0===t?void 0:t.map(e=>{var t,n;return{title:e.title||"",subtitle:e.subtitle||"",icon:{url:(null===(n=(0,en.iQ)(e.icon))||void 0===n?void 0:null===(t=n.quality(100))||void 0===t?void 0:t.url())||"",alt:l},detailButton:(null==e?void 0:e.detailButton)?(0,q.Z)(null==e?void 0:e.detailButton):void 0}}))||[];return{title:l,items:i,categories:(null===(n=e.categories)||void 0===n?void 0:n.map(e=>{var t;let n=(null===(t=e.rows)||void 0===t?void 0:t.map(e=>{let t=(e.values||[]).map(e=>el(e));return{label:e.label||"",values:t}}))||[];return{title:e.title||"",isCollapsible:"boolean"!=typeof e.isCollapsible||e.isCollapsible,initiallyCollapsed:"boolean"==typeof e.initiallyCollapsed&&e.initiallyCollapsed,rows:n}}))||[]}}}};var eo=e=>{var t,n,i;let{pageData:a,settingsPageBuilder:r,lang:o,categories:s}=e;if(!a&&!r)return null;let d=null==r?void 0:null===(t=r.productDetailSections)||void 0===t?void 0:t.pageBuilder,c=null==r?void 0:null===(n=r.productPageSections)||void 0===n?void 0:n.pageBuilder,u=d||c||(null==a?void 0:a.pageBuilder),m=null==u?void 0:null===(i=u.sections)||void 0===i?void 0:i.map(e=>{var t,n,l;return(null==e?void 0:e._type)!=="sharedSection"?e:null==e?void 0:null===(l=e.sharedSection)||void 0===l?void 0:null===(n=l.pageBuilder)||void 0===n?void 0:null===(t=n.sections)||void 0===t?void 0:t[0]});return null==m?void 0:m.map((e,t)=>{let n=null,i=null,a=null;switch(null==e?void 0:e._type){case"contactSection":case"bannerSection":case"faqSection":case"featureSection":case"tableSection":case"downloadSection":case"pictureSection":case"textPicSection":case"headerSection":case"headerContent":case"roadshowSection":case"tabSection":case"eventSection":case"contentSection":case"formSection":case"partnerSection":case"headerAnimationSection":case"linksSection":case"comparisonSection":n=e,a=(i=er[e._type]).convert(n);break;case"sliderSection":if(n=e,(a=(i=er[e._type]).convert(n,o,s)).customProductQuery&&i.queryComponent){let e=i.queryComponent;return(0,l.jsx)(e,{sectionProps:a,lang:o,categories:s},"section-".concat(t))}}let r=null==i?void 0:i.component;return r&&a?(0,l.jsx)(r,{...a},((null==e?void 0:e._type)||"")+t):null})},es=e=>{var t;
1let{products:n,slugArray:i,pagesCount:a,searchParams:r,productCount:o,filterBlocks:s,activeCategory:d,defaultCategory:c,pageBuilder:u,lang:m}=e,p=(null==r?void 0:r.s)?r.s:"";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(U,{headerBlock:d?{title:d.title,text:d.textHeading}:c?{title:c.titleHeading,text:c.textHeading}:p?{title:"".concat(null===(t=y._t.searchMainLabel)||void 0===t?void 0:t[m||"cs"],": ”").concat(p,"”")}:{title:"E-shop",text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at quam nec elit."},eshopBlocks:n,slugArray:i,filterBlock:s,pagesCount:a,searchParams:r,productCount:o,activeCategory:d,defaultCategory:c,lang:m}),u&&(0,l.jsx)(eo,{settingsPageBuilder:u})]})}},73345:function(e,t,n){"use strict";n.d(t,{default:function(){return h}});var l=n(26705),i=n(55806),a=n(70420),r=n(91960),o=n(58447),s=n(53335),d=n(87227),c=n(27648),u=e=>{let{link:t,lang:n}=e;if(!(null==t?void 0:t.url))return null;let i="/".concat(n).concat(t.url);return(0,l.jsxs)(c.default,{href:i,className:"flex flex-nowrap items-center gap-3 px-3 py-5 md:p-8 bg-grey-200",children:[(0,l.jsx)("div",{className:"iconBlock w-5 h-5 flex flex-nowrap items-center justify-center relative bg-primary-spring",children:(0,l.jsx)(d.J,{name:"MdArrowForward",className:"w-4 h-4 text-white"})}),(0,l.jsx)("span",{className:"subscriptionText font-semibold text-grey-1000 uppercase",children:null==t?void 0:t.text})]})},m=n(70433),p=n(50524),v=n(37774),f=n(99062),x=e=>{var t;let{className:n,links:i,title:a,type:r,products:d,value:c,lang:x,categories:h}=e;return(0,l.jsxs)(o.Z,{className:(0,s.m6)("block relative mb-16 last-of-type:mb-0",n),children:[a&&(0,l.jsxs)("div",{className:(0,s.m6)("titleBlock flex flex-nowrap items-center justify-between w-full relative pb-5 mb-5 border-b-[1px] border-b-secondary-french"),children:[(0,l.jsx)("h4",{className:"h5 text-primary-raisin",children:a}),"product"===r&&(null==d?void 0:d.length)!==0&&(0,l.jsx)(p.Button,{variant:"terciary",type:"link",icon:"MdArrowForward",iconType:"square",size:"small",iconRight:!0,darkMode:!0,link:{text:"".concat(null===(t=v._t.searchShowAll)||void 0===t?void 0:t[x||"cs"]),url:"/produkty?s=".concat(c)}})]}),(0,l.jsxs)("div",{className:(0,s.m6)("grid gap-2","page"===r&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4","product"===r&&"grid-cols-1 xs:grid-cols-2 lg:grid-cols-4","categories"===r&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"),children:["page"===r&&(0,l.jsx)(l.Fragment,{children:null==i?void 0:i.map((e,t)=>{if(e.url)return(0,l.jsx)(u,{link:e,lang:x},t)})}),"product"===r&&(0,l.jsx)(l.Fragment,{children:null==d?void 0:d.map((e,t)=>(0,l.jsx)(m.default,{...e,lang:x},t))}),"categories"===r&&(0,l.jsx)(l.Fragment,{children:null==h?void 0:h.map((e,t)=>(0,l.jsx)(f.default,{...e},t))})]})]})},h=e=>{var t,n,o,d,c,u,m,p,f,h,y,g,b;let{data:j,value:w,lang:k,categories:N}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("section",{className:"pb-16 w-full relative",children:(0,l.jsx)(i.Z,{children:(0,l.jsx)("div",{className:"pt-10 block relative w-full",children:(0,l.jsxs)("h2",{className:"h3",children:[null===(t=v._t.searchMainLabel)||void 0===t?void 0:t[k||"cs"],": ",'"'.concat(w,'"')]})})})}),j&&(0,l.jsxs)("div",{className:(0,s.m6)((null===(n=j.productSearch)||void 0===n?void 0:n.length)===0&&(null===(o=j.pageSearch)||void 0===o?void 0:o.length)===0&&(null===(d=j.blogSearch)||void 0===d?void 0:d.length)===0&&"min-h-[50vh]"),children:[(null===(c=j.productSearch)||void 0===c?void 0:c.length)===0&&(null===(u=j.pageSearch)||void 0===u?void 0:u.length)===0&&(null===(m=j.blogSearch)||void 0===m?void 0:m.length)===0&&(null===(p=j.categoriesSearch)||void 0===p?void 0:p.length)===0&&(0,l.jsx)(x,{title:null===(f=v._t.searchNoResult)||void 0===f?void 0:f[k||"cs"],links:void 0,products:void 0,lang:k}),j.pageSearch&&0!==j.pageSearch.length&&(0,l.jsx)(x,{title:null===(h=v._t.searchPageLabel)||void 0===h?void 0:h[k||"cs"],links:(0,r.Md)(j.pageSearch)||void 0,lang:k,type:"page"}),j.blogSearch&&0!==j.blogSearch.length&&(0,l.jsx)(x,{title:null===(y=v._t.searchBlogLabel)||void 0===y?void 0:y[k||"cs"],links:(0,r.px)(j.blogSearch)||void 0,lang:k,type:"page"}),j.categoriesSearch&&0!==j.categoriesSearch.length&&(0,l.jsx)(x,{title:null===(g=v._t.searchPageCategoriesLabel)||void 0===g?void 0:g[k||"cs"],categories:(0,r.SY)(j.categoriesSearch,k)||void 0,lang:k,type:"categories"}),j.productSearch&&0!==j.productSearch.length&&(0,l.jsx)(x,{title:null===(b=v._t.searchProductLabel)||void 0===b?void 0:b[k||"cs"],value:w,lang:k,type:"product",products:j.productSearch.map(e=>(0,a.r)(e,N))||void 0})]})]})}},72278:function(e,t,n){"use strict";n.d(t,{f:function(){return l}});let l=e=>({bod125:{externalReaderCode:["4004005975"],contactLessChipCode:["4110000311"]},bis125:{externalReaderCode:["4004005975"],contactLessChipCode:["4110000311"]},mifare:{externalReaderCode:["4004005739","4002140154"],contactLessChipCode:["4110000199"]},desfire:{externalReaderCode:["4004005739","4002140154"],contactLessChipCode:["4110000426"]}})[null==e?void 0:e.toLowerCase()]||null},10868:function(e,t,n){"use strict";var l,i,a,r;n.d(t,{Mv:function(){return l},VZ:function(){return i}}),(a=l||(l={})).Melody="melody",a.DuoPlus="plus",a.DuoStandard="standard",(r=i||(i={})).Bis125="BIS125",r.Bod125="BOD125",r.Mifare="MIFARE",r.Desfire="DESFIRE";let o=e=>{let{system:t,title:n,table:l,items:i}=e;return{systemId:t,category:"sběrnicov\xfd syst\xe9m",title:n,link:{text:n,url:"melody"===t?"/melody":"plus"===t?"/duo-plus":"/duo-standard",target:"_blank"},table:l,items:i,button:{variant:"primary",size:"small",type:"button",link:{text:"Konfigurovat",url:"/"}}}};o({system:"melody",title:"Melody",table:[{label:"Typ komunikace",description:"audio/video"},{label:"N\xe1klady na poř\xedzen\xed",description:"Vyšš\xed"},{label:"N\xe1klady na instalaci",description:"Středn\xed"},{label:"Spotřeba energie",description:"N\xedzk\xe1"}],items:[{title:"Z\xe1kladn\xed vlastnosti",props:["ovl\xe1d\xe1n\xed el. z\xe1mku","lze doplnit o př\xedstupov\xfd syst\xe9m","LED podsvětlen\xed","indikace stavů LED diodami","rozlišn\xe9 vyzv\xe1něn\xed","vypnut\xed vyzv\xe1něn\xed s LED indikac\xed","regulace hlasitosti vyzv\xe1něn\xed","zpětn\xe9 vol\xe1n\xed do zv. tabla","změna melodie vyzv\xe1něn\xed od zv. tabla","regulace hlasitosti reproduktoru","regulace citlivosti mikrofonu"]},{title:"Specifick\xe9 vlastnosti",props:["nastaven\xed hlasitosti vyzv\xe1něn\xed a melodie vyzv\xe1něn\xed pomoc\xed tlač\xedtek na dom\xe1c\xedm telefonu","LED indikace vyzv\xe1něn\xed","interkom – intern\xed komunikace mezi uživateli","funkce ALARM zabezpečen\xed bytu v dom\xe1c\xedm telefonu","možnost ovl\xe1dat různ\xe1 extern\xed zař\xedzen\xed (v\xfdtahy, osvětlen\xed, br\xe1ny atd..)","možnost napojen\xed extern\xedch kamer","možnost napojen\xed GSM modulu pro zas\xedl\xe1n\xed alarmov\xfdch zpr\xe1v a přesměrov\xe1n\xed hovorů ze zvonkov\xe9ho tabla na mobiln\xed telefon uživatele"]}]}),o({system:"plus",title:"Duo Plus",table:[{label:"Typ komunikace",description:"audio"},{label:"N\xe1klady na poř\xedzen\xed",description:"Středn\xed"},{label:"N\xe1klady na instalaci",description:"N\xedzk\xe9"},{label:"Spotřeba energie",description:"N\xedzk\xe1"}],items:[{title:"Z\xe1kladn\xed vlastnosti",props:["ovl\xe1d\xe1n\xed el. z\xe1mku","lze doplnit o př\xedstupov\xfd syst\xe9m","LED podsvětlen\xed","indikace stavů LED diodami","rozlišn\xe9 vyzv\xe1něn\xed","vypnut\xed vyzv\xe1něn\xed s LED indikac\xed","regulace hlasitosti vyzv\xe1něn\xed","zpětn\xe9 vol\xe1n\xed do zv. tabla","změna melodie vyzv\xe1něn\xed od zv. tabla","regulace hlasitosti reproduktoru (pomoc\xed trimru)","regulace citlivosti mikrofonu"]},{title:"Specifick\xe9 vlastnosti",props:["nastaven\xed hlasitosti vyzv\xe1něn\xed a melodie vyzv\xe1něn\xed pomoc\xed tlač\xedtek na dom\xe1c\xedm telefonu","zapojen\xed DT nez\xe1visl\xe9 na polaritě"]}]}),o({system:"standard",title:"Duo Standard",table:[{label:"Typ komunikace",description:"audio"},{label:"N\xe1klady na poř\xedzen\xed",description:"N\xedzk\xe9"},{label:"N\xe1klady na instalaci",description:"N\xedzk\xe9"},{label:"Spotřeba energie",description:"N\xedzk\xe9"}],items:[{title:"Z\xe1kladn\xed vlastnosti",props:["ovl\xe1d\xe1n\xed el. z\xe1mku","lze doplnit o př\xedstupov\xfd syst\xe9m","LED podsvětlen\xed","indikace stavů LED diodami","rozlišn\xe9 vyzv\xe1něn\xed","vypnut\xed vyzv\xe1něn\xed s LED indikac\xed","regulace hlasitosti vyzv\xe1něn\xed (pomoc\xed trimru)","zpětn\xe9 vol\xe1n\xed do zv. tabla","změna melodie vyzv\xe1něn\xed od zv. tabla (pomoc\xed konfigur\xe1toru)"]},{title:"Specifick\xe9 vlastnosti",props:["signalizace špatn\xe9ho zapojen\xed telefonu (nutn\xe9 dodržen\xed polarity linky)"]}]})},13398:function(e,t,n){"use strict";n.d(t,{EH:function(){return r},LQ:function(){return a},Yp:function(){return i}});let l=(e,t)=>
1{if(e&&t)return e.steps.find(e=>e.stepData.stepId===t)},i=(e,t)=>e.steps.findIndex(e=>e.stepData.stepId===t),a=(e,t)=>{var n;if(e&&t)return null===(n=l(e,t))||void 0===n?void 0:n.stepData},r=e=>{if(e)return e.steps[e.activeStepIndex].stepData}},71669:function(e,t,n){"use strict";n.d(t,{$H:function(){return b},$m:function(){return I},AN:function(){return x},Dg:function(){return h},Jb:function(){return g},QT:function(){return y},Qo:function(){return C},TZ:function(){return k},dp:function(){return N},eK:function(){return z},gc:function(){return T},gt:function(){return P},iq:function(){return f},k5:function(){return w},uP:function(){return j},xA:function(){return S},y$:function(){return D}});var l=n(31644),i=n(97604),a=n(34422);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.SQ.czech;return l.V[e][t]},o=/^(\+42[01]\s*)?[0-9]{3}\s*[0-9]{3}\s*[0-9]{3}$/,s=/^[A-Za-zÀ-ž\s]+$/,d=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}$/,c=/^[A-Za-zÀ-ž0-9\s./-]+$/,u=/^[A-Za-zÀ-ž0-9\s-]+$/,m=/^[0-9]{3}\s?[0-9]{2}$/,p=/^([0-9]{8})?$/,v=/^([A-Z]{0,2}[0-9]{8,10})?$/,f={personalData:["firstName","lastName","email","phone"],companyData:["companyName","ic","dic"],facturationData:["street","city","zipCode","country"],deliveryData:["street","city","zipCode","country"]},x={personalData:["firstName","lastName","email","phone"]},h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().matches(o,r("phoneInvalid",e)).min(9,r("phoneMinLength",e)).max(13,r("phoneMaxLength",e))}(),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().matches(d,r("emailInvalid",e)).email(r("emailInvalid",e)).max(100,r("emailMaxLength",e))}(),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().min(2,r("firstNameMinLength",e)).max(50,r("firstNameMaxLength",e)).matches(s,r("firstNameInvalidChars",e))}(),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().min(2,r("lastNameMinLength",e)).max(50,r("lastNameMaxLength",e)).matches(s,r("lastNameInvalidChars",e))}(),j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().min(3,r("streetMinLength",e)).max(100,r("streetMaxLength",e)).matches(c,r("streetInvalidFormat",e))}(),w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().min(2,r("cityMinLength",e)).max(50,r("cityMaxLength",e)).matches(u,r("cityInvalidChars",e))}(),k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().matches(m,r("postalCodeInvalid",e))}(),N=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().min(2,r("countryMinLength",e)).max(50,r("countryMaxLength",e)).matches(u,r("countryInvalidChars",e))}(),P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().required(r("passwordRequired",e)).matches(/[A-Z]/,r("passwordRequireCapital",e)).matches(/\d/,r("passwordRequireNumber",e)).min(8,r("passwordMinLength",e))}(),C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return t=>t.required(r("fieldRequired",e))}(),D=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().matches(p,r("companyIdInvalid",e))}(),S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().matches(v,r("vatIdInvalid",e))}(),I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SQ.czech;return a.Z_().min(2,r("companyNameMinLength",e)).max(100,r("companyNameMaxLength",e))}(),E=(e,t)=>{switch(e){case"phone":case"telephone":return C(h);case"email":return C(y);case"firstName":return C(g);case"lastName":return C(b);case"street":return C(j);case"city":return C(w);case"zipCode":case"psc":return C(k);case"country":return C(N);case"ico":case"ic":return D;case"dic":return S;case"companyName":return I;default:return t.isRequired?a.Z_().required("Toto pole je povinn\xe9"):a.Z_()}},z=e=>{let t={};for(let n of e)switch(n.name){case"email":t[n.name]=C(y).required("".concat(n.placeholder||"Email").concat(r("fieldRequiredSuffix")));break;case"tel":t[n.name]=C(h).required(r("phoneFieldRequired"));break;case"textarea":t[n.name]=a.Z_().min(5,r("textMinLength")).required(r("textRequired"));break;case"companyName":t[n.name]=I;break;case"ico":t[n.name]=D;break;case"dic":t[n.name]=S;break;default:t[n.name]=a.Z_().min(2,r("fieldMinLengthPrefix")).required(r("fieldRequiredPrefix"))}return a.Ry().shape(t)},T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x,n=Object.entries(t).reduce((t,n)=>{let[l,i]=n,r=i.reduce((t,n)=>{let l=e[n];return l&&(t[n]=E(n,l)),t},{});return t[l]=a.Ry().shape(r),t},{});return a.Ry().shape(n)}},73333:function(e,t,n){"use strict";n.d(t,{x:function(){return l}}),n(83079);var l=(0,n(12119).$)("8a0bcb76ae53014a4a11517b15d0748319c64bfb")},79923:function(e,t,n){"use strict";n.d(t,{c:function(){return i},f:function(){return a}}),n(83079);var l=n(12119),i=(0,l.$)("67ab9f69bac396a4dfdd3de8e311620ddcc0dde7"),a=(0,l.$)("bea53400cebefef97cc63f981f52abcd0b12
1c088")},26519:function(e,t,n){"use strict";n.d(t,{Wx:function(){return eu},hC:function(){return ed}});var l=n(26705),i=n(20955);let a=e=>{let{stepData:t,attrName:n}=e;if("attributes"!==t.stepType)return null;let l=t.attributes[n].input;switch(l.inputType){case"input":return l.input.value||null;case"radio":{let e=l.input.find(e=>e.checked);return e&&e.value||null}default:return null}};var r=n(10868),o=n(13398);let s=e=>{var t,n,l,i,a,s,d,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N,P,C,D,S,I,E,z,T,_,L,A,B,R,M,O,Z,V,F,U,$;if(e.activeStepIndex!==(0,o.Yp)(e,"info"))return;let q=(null===(t=(0,o.LQ)(e,"system"))||void 0===t?void 0:t.system)||(null===(n=e.configuration)||void 0===n?void 0:n.system);if(!q){console.error("No system chosen");return}let H=null===(l=(0,o.EH)(e))||void 0===l?void 0:l.attributes;switch(q){case r.Mv.DuoPlus:return{groups:[{name:"general",title:"Z\xe1kladn\xed informace"}],itemGroups:[{group:"general",items:[{id:"unitsCount",inputType:"input",title:"Zadejte počet bytov\xfdch jednotek",tooltip:{text:"Uveďte celkov\xfd počet bytov\xfdch jednotek v objektu. Tato hodnota ovlivňuje počet domovn\xedch telefonů, tlač\xedtek na zvonkov\xe9m table, popř. velikost jmenovkov\xe9 č\xe1sti."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(s=H.unitsCount)||void 0===s?void 0:null===(a=s.input)||void 0===a?void 0:null===(i=a.input)||void 0===i?void 0:i.value)||1}},{id:"floorCount",inputType:"input",title:"Zadejte počet podlaž\xed",tooltip:{text:"Uveďte celkov\xfd počet podlaž\xed v budově, včetně př\xedzem\xed. Tento \xfadaj pom\xe1h\xe1 určit vhodn\xe9 řešen\xed pro rozvody domovn\xedho dorozum\xedvac\xedho syst\xe9mu."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(u=H.floorCount)||void 0===u?void 0:null===(c=u.input)||void 0===c?void 0:null===(d=c.input)||void 0===d?void 0:d.value)||1}},{id:"entryPhonePanelCount",inputType:"input",title:"Zadejte počet zvonkov\xfdch tabel pro objekt",tooltip:{text:"Specifikujte, kolik zvonkov\xfdch tabel bude instalov\xe1no v objektu (např. hlavn\xed vchod, vedlejš\xed vchod, vstup do gar\xe1že)."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(v=H.entryPhonePanelCount)||void 0===v?void 0:null===(p=v.input)||void 0===p?void 0:null===(m=p.input)||void 0===m?void 0:m.value)||1}},{id:"mountingType",inputType:"radio",title:"Způsob mont\xe1že",tooltip:{text:"Vyberte jednu z možnost\xed: <ul> <li><strong>Do zdi</strong> – tablo je zapuštěn\xe9 do fas\xe1dy, což působ\xed esteticky a chr\xe1n\xed jej v\xedce před poškozen\xedm.</li><li><strong>Na zeď</strong> – tablo je připevněn\xe9 př\xedmo na povrch stěny, což usnadňuje instalaci.</li> </ul>"},input:{options:[{label:"Do zdi",name:"mountingType",value:"inWall"}
1,{label:"Na zeď",name:"mountingType",value:"onWall"}],value:(null==H?void 0:null===(h=H.mountingType)||void 0===h?void 0:null===(x=h.input)||void 0===x?void 0:null===(f=x.input)||void 0===f?void 0:f.value)||void 0}}]}]};case r.Mv.DuoStandard:return{groups:[{name:"general",title:"Z\xe1kladn\xed informace"}],itemGroups:[{group:"general",items:[{id:"unitsCount",inputType:"input",title:"Zadejte počet bytov\xfdch jednotek",tooltip:{text:"Uveďte celkov\xfd počet bytov\xfdch jednotek v objektu. Tato hodnota ovlivňuje počet domovn\xedch telefonů, tlač\xedtek na zvonkov\xe9m table, popř. velikost jmenovkov\xe9 č\xe1sti."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(b=H.unitsCount)||void 0===b?void 0:null===(g=b.input)||void 0===g?void 0:null===(y=g.input)||void 0===y?void 0:y.value)||1}},{id:"floorCount",inputType:"input",title:"Zadejte počet podlaž\xed",tooltip:{text:"Uveďte celkov\xfd počet podlaž\xed v budově, včetně př\xedzem\xed. Tento \xfadaj pom\xe1h\xe1 určit vhodn\xe9 řešen\xed pro rozvody domovn\xedho dorozum\xedvac\xedho syst\xe9mu."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(k=H.floorCount)||void 0===k?void 0:null===(w=k.input)||void 0===w?void 0:null===(j=w.input)||void 0===j?void 0:j.value)||1}},{id:"entryPhonePanelCount",inputType:"input",title:"Zadejte počet zvonkov\xfdch tabel pro objekt",tooltip:{text:"Specifikujte, kolik zvonkov\xfdch tabel bude instalov\xe1no v objektu (např. hlavn\xed vchod, vedlejš\xed vchod, vstup do gar\xe1že)."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(C=H.entryPhonePanelCount)||void 0===C?void 0:null===(P=C.input)||void 0===P?void 0:null===(N=P.input)||void 0===N?void 0:N.value)||1}},{id:"mountingType",inputType:"radio",title:"Způsob mont\xe1že",tooltip:{text:"Vyberte jednu z možnost\xed: <ul> <li><strong>Do zdi</strong> – tablo je zapuštěn\xe9 do fas\xe1dy, což působ\xed esteticky a chr\xe1n\xed jej v\xedce před poškozen\xedm.</li><li><strong>Na zeď</strong> – tablo je připevněn\xe9 př\xedmo na povrch stěny, což usnadňuje instalaci.</li> </ul>"},input:{options:[{label:"Do zdi",name:"mountingType",value:"inWall"}
1,{label:"Na zeď",name:"mountingType",value:"onWall"}],value:(null==H?void 0:null===(I=H.mountingType)||void 0===I?void 0:null===(S=I.input)||void 0===S?void 0:null===(D=S.input)||void 0===D?void 0:D.value)||void 0}}]}]};case r.Mv.Melody:return{groups:[{name:"general",title:"Z\xe1kladn\xed informace"}],itemGroups:[{group:"general",items:[{id:"unitsCount",inputType:"input",title:"Zadejte počet bytov\xfdch jednotek",tooltip:{text:"Uveďte celkov\xfd počet bytov\xfdch jednotek v objektu. Tato hodnota ovlivňuje počet domovn\xedch telefonů, tlač\xedtek na zvonkov\xe9m table, popř. velikost jmenovkov\xe9 č\xe1sti."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(T=H.unitsCount)||void 0===T?void 0:null===(z=T.input)||void 0===z?void 0:null===(E=z.input)||void 0===E?void 0:E.value)||1}},{id:"floorCount",inputType:"input",title:"Zadejte počet podlaž\xed",tooltip:{text:"Uveďte celkov\xfd počet podlaž\xed v budově, včetně př\xedzem\xed. Tento \xfadaj pom\xe1h\xe1 určit vhodn\xe9 řešen\xed pro rozvody domovn\xedho dorozum\xedvac\xedho syst\xe9mu."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(A=H.floorCount)||void 0===A?void 0:null===(L=A.input)||void 0===L?void 0:null===(_=L.input)||void 0===_?void 0:_.value)||1}},{id:"entryPhonePanelCount",inputType:"input",title:"Zadejte počet zvonkov\xfdch tabel pro objekt",tooltip:{text:"Specifikujte, kolik zvonkov\xfdch tabel bude instalov\xe1no v objektu (např. hlavn\xed vchod, vedlejš\xed vchod, vstup do gar\xe1že)."},input:{typeInput:"number",min:1,value:(null==H?void 0:null===(M=H.entryPhonePanelCount)||void 0===M?void 0:null===(R=M.input)||void 0===R?void 0:null===(B=R.input)||void 0===B?void 0:B.value)||1}},{id:"mountingType",inputType:"radio",title:"Způsob mont\xe1že",tooltip:{text:"Vyberte jednu z možnost\xed: <ul> <li><strong>Do zdi</strong> – tablo je zapuštěn\xe9 do fas\xe1dy, což působ\xed esteticky a chr\xe1n\xed jej v\xedce před poškozen\xedm.</li><li><strong>Na zeď</strong> – tablo je připevněn\xe9 př\xedmo na povrch stěny, což usnadňuje instalaci.</li> </ul>"},input:{options:[{label:"Do zdi",name:"mountingType",value:"inWall"}
1,{label:"Na zeď",name:"mountingType",value:"onWall"}],value:(null==H?void 0:null===(V=H.mountingType)||void 0===V?void 0:null===(Z=V.input)||void 0===Z?void 0:null===(O=Z.input)||void 0===O?void 0:O.value)||void 0}},{id:"phoneCommTech",inputType:"radio",title:"Typ komunikace",tooltip:{text:"Zvolte variantu dorozum\xedvac\xedho syst\xe9mu: <ul><li><strong>Audio varianta</strong> – umožňuje hlasovou komunikaci mezi n\xe1vštěvn\xedkem a bytovou jednotkou.</li><li><strong>Audio-video varianta</strong> – kromě hlasov\xe9 komunikace obsahuje i kameru, kter\xe1 umožňuje vizu\xe1ln\xed identifikaci n\xe1vštěvn\xedka.</li></ul>"},input:{options:[{label:"Video syst\xe9m",name:"phoneCommTech",value:"video"},{label:"Audio syst\xe9m",name:"phoneCommTech",value:"audio"}],value:(null==H?void 0:null===($=H.phoneCommTech)||void 0===$?void 0:null===(U=$.input)||void 0===U?void 0:null===(F=U.input)||void 0===F?void 0:F.value)||void 0}}]}]}}},d=(e,t)=>{var n,l,i,a,o,s,d,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N,P,C,D,S,I,E,z,T,_,L,A,B,R,M,O,Z,V;let F=null==t?void 0:null===(n=t.configuration)||void 0===n?void 0:n.system,U=[];switch(F){case r.Mv.DuoPlus:{let t=null===(a=e.attributes)||void 0===a?void 0:null===(i=a.unitsCount)||void 0===i?void 0:null===(l=i.input)||void 0===l?void 0:l.input,n=null==t?void 0:t.value,r=null===(d=e.attributes)||void 0===d?void 0:null===(s=d.floorCount)||void 0===s?void 0:null===(o=s.input)||void 0===o?void 0:o.input,h=null==r?void 0:r.value,y=null===(u=e.attributes)||void 0===u?void 0:null===(c=u.entryPhonePanelCount)||void 0===c?void 0:c.input.input,g=null==y?void 0:y.value,b=null===(v=e.attributes)||void 0===v?void 0:null===(p=v.mountingType)||void 0===p?void 0:null===(m=p.input)||void 0===m?void 0:m.input,j=null==b?void 0:b.value,w=null===(x=e.attributes)||void 0===x?void 0:null===(f=x.hallwayButtonRinging)||void 0===f?void 0:f.input.input,k=(null==w?void 0:w.checked)||!1;U.push(n>0,h>0,g>0,void 0!==j,void 0!==k);break}case r.Mv.DuoStandard:{let t=null===(g=e.attributes)||void 0===g?void 0:null===(y=g.unitsCount)||void 0===y?void 0:null===(h=y.input)||void 0===h?void 0:h.input,n=null==t?void 0:t.value,l=null===(w=e.attributes)||void 0===w?void 0:null===(j=w.floorCount)||void 0===j?void 0:null===(b=j.input)||void 0===b?void 0:b.input,i=null==l?void 0:l.value,a=null===(N=e.attributes)||void 0===N?void 0:null===(k=N.entryPhonePanelCount)||void 0===k?void 0:k.input.input,r=null==a?void 0:a.value,o=null===(D=e.attributes)||void 0===D?void 0:null===(C=D.mountingType)||void 0===C?void 0:null===(P=C.input)||void 0===P?void 0:P.input,s=null==o?void 0:o.value;U.push(n>0,i>0,r>0,void 0!==s);break}case r.Mv.Melody:{let t=null===(E=e.attributes)||void 0===E?void 0:null===(I=E.unitsCount)||void 0===I?void 0:null===(S=I.input)||void 0===S?void 0:S.input,n=null==t?void 0:t.value,l=null===(_=e.attributes)||void 0===_?void 0:null===(T=_.phoneCommTech)||void 0===T?void 0:null===(z=T.input)||void 0===z?void 0:z.input,i=null==l?void 0:l.value,a=null===(B=e.attributes)||void 0===B?void 0:null===(A=B.floorCount)||void 0===A?void 0:null===(L=A.input)||void 0===L?void 0:L.input,r=null==a?void 0:a.value,o=null===(M=e.attributes)||void 0===M?void 0:null===(R=M.entryPhonePanelCount)||void 0===R?void 0:R.input.input,s=null==o?void 0:o.value,d=null===(V=e.attributes)||void 0===V?void 0:null===(Z=V.mountingType)||void 0===Z?void 0:null===(O=Z.input)||void 0===O?void 0:O.input,c=null==d?void 0:d.value;U.push(n>0,void 0!==i,r>0,s>0,void 0!==c)}}return U.length>0&&U.every(e=>e)},c=()=>({stepType:"attributes",stepData:{stepType:"attributes",stepId:"info",stepName:"Z\xe1kladn\xed informace",stepContent:s,attributes:{}},completed:!1,buildStepConfigurationPath:(e,t)=>{var n,l,i,a;let r=t.attributes,o=null==r?void 0:null===(l=r.mountingType)||void 0===l?void 0:null===(n=l.input)||void 0===n?void 0:n.input,s=null==o?void 0:o.value,d=null==r?void 0:null===(a=r.unitsCount)||void 0===a?void 0:null===(i=a.input)||void 0===i?void 0:i.input,c=null==d?void 0:d.value;switch(s){case"inWall":return{...e,minRingbellCount:c,mounting:"D"};case"onWall":return{...e,minRingbellCount:c,mounting:"S"};default:return{...e}}},validator:d});var u=n(91485);let m=async e=>{var t,n;if(!e)return[];let i=new URLSearchParams({system:(null===(t=e.configuration)||void 0===t?void 0:t.system)||""}).toString(),a=await fetch("/api/products/entry-phones?".concat(i),{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).catch(e=>(console.error("Error fetching products",e),[])),r=e.steps.find(e=>
1"housePhonePicker"===e.stepData.stepId),o=null==r?void 0:r.stepData,s=o.items?Object.keys(o.items):[],d=a.filter(e=>{var t;return s.includes((null===(t=e.raynetProductData)||void 0===t?void 0:t.code)||"")}).map(e=>{var t,n,l;return null===(l=e.raynetProductData)||void 0===l?void 0:null===(n=l.customConfigurationData)||void 0===n?void 0:null===(t=n.split(";"))||void 0===t?void 0:t[2]}).find(e=>"portrait"===e||"landscape"===e),c=t=>{var n,l,i,a;let r=null===(n=e.configuration)||void 0===n?void 0:n.videoPhonePanel;return!0===r||(null===(a=t.raynetProductData)||void 0===a?void 0:null===(i=a.customConfigurationData)||void 0===i?void 0:null===(l=i.split(";",2))||void 0===l?void 0:l[1])===(r?"video":"audio")},m=e=>{var t,n,l;let i=null===(l=e.raynetProductData)||void 0===l?void 0:null===(n=l.customConfigurationData)||void 0===n?void 0:null===(t=n.split(";"))||void 0===t?void 0:t[2];return!!i&&!!d&&i!==d},p=a;return(null===(n=e.configuration)||void 0===n?void 0:n.system)==="melody"&&(p=a.filter(e=>c(e))),p.map(e=>{var t,n,i,a,r,o,s,d,c,p,v;return{disabled:m(e),itemId:null===(t=e.raynetProductData)||void 0===t?void 0:t.code,image:{url:null===(i=(0,u.iQ)(null===(r=e.productImages)||void 0===r?void 0:null===(a=r[0])||void 0===a?void 0:a.image))||void 0===i?void 0:null===(n=i.quality(100))||void 0===n?void 0:n.url(),alt:null===(s=e.productImages)||void 0===s?void 0:null===(o=s[0])||void 0===o?void 0:o.alt},category:"Domovn\xed telefon",hiddenData:{hiddenCategoryData:null===(d=e.raynetProductData)||void 0===d?void 0:d.customConfigurationData,hiddenPrice:null===(c=e.raynetProductData)||void 0===c?void 0:c.price},title:null===(p=e.raynetProductData)||void 0===p?void 0:p.name,itemUrl:"/produkty/domovni-telefony-a-prislusenstvi/".concat(e.generatedSlug),table:{data:[{label:"Cena bez DPH",value:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",maximumFractionDigits:2,minimumFractionDigits:0}).format((null===(v=e.raynetProductData)||void 0===v?void 0:v.price)||0)," / ks")})}]},button:{variant:"secondary",size:"small",type:"button",link:{text:"Vybrat",url:"/"}}}})},p=()=>({stepType:"multiselect",stepData:{stepType:"multiselect",stepId:"housePhonePicker",stepName:"Domovn\xed telefon",items:{},compatibleProductCategory:null,stepContent:async e=>await m(e)},completed:!1,configuratorFooter:{footerText(e,t){var n;if(!e||!e.items||0===Object.keys(e.items).length)return"Vyberte domovn\xed telefony";let l=(null===(n=t.steps.find(e=>"info"===e.stepData.stepId))||void 0===n?void 0:n.stepData).attributes.unitsCount.input.input.value,i=Object.values(e.items).reduce((e,t)=>e+t.quantity,0);return"Počet telefonů: ".concat(i," / ").concat(l)}},validator:(e,t)=>{let n=t.steps.find(e=>"info"===e.stepData.stepId);if(!n)return!1;let l=n.stepData.attributes.unitsCount.input.input.value,i=Object.values(e.items).reduce((e,t)=>e+t.quantity,0);return null!==e.items&&i>=l},buildStepConfigurationPath:(e,t)=>{if((null==e?void 0:e.system)!=="melody"){var n;let l=t.compatibleProductCategory,i=(null==l?void 0:null===(n=l.split(";",2))||void 0===n?void 0:n[1])==="video";return{...e,videoPhonePanel:i}}return e}}),v=e=>{if(!e)return{};let t=e.compatibleProductList,n=Array.from(new Set(t.map(e=>{var t,n,l,i,a,r,o,s,d,c;return{system:null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.system,mounting:null===(i=e.raynetProductData)||void 0===i?void 0:null===(l=i.configurationInfo)||void 0===l?void 0:l.mounting,design:null===(r=e.raynetProductData)||void 0===r?void 0:null===(a=r.configurationInfo)||void 0===a?void 0:a.design,inputHardware:null===(s=e.raynetProductData)||void 0===s?void 0:null===(o=s.configurationInfo)||void 0===o?void 0:o.inputHardware,videoPhonePanel:null===(c=e.raynetProductData)||void 0===c?void 0:null===(d=c.configurationInfo)||void 0===d?void 0:d.videoPhonePanel}}))).map(e=>e),l={};return n.map(e=>{let n=t.filter(t=>{var n,l,i,a,r,o,s,d,c,u;return JSON.stringify({system:null===(l=t.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.system,mounting:null===(a=t.raynetProductData)||void 0===a?void 0:null===(i=a.configurationInfo)||void 0===i?void 0:i.mounting,design:null===(o=t.raynetProductData)||void 0===o?void 0:null===(r=o.configurationInfo)||void 0===r?void 0:r.design,inputHardware:null===(d=t.raynetProductData)||void 0===d?void 0:null===(s=d.configurationInfo)||void 0===s?void 0:s.inputHardware,videoPhonePanel:null===(u=t.raynetProductData)||void 0===u?void 0:null===(c=u.configurationInfo)||void 0===c?void 0:c.videoPhonePanel})===JSON.stringify(e)});l={...l,[JSON.stringify(e)]:n}}),l},f=()=>({stepType:"select-panel",stepData:{stepType:"select-panel",stepId:"entryPhonePanel",stepName:"Zvonkov\xe9 tablo",itemType:"productVariants",item:null,stepContent:e=>v(e)},completed:!1,validator:e=>null!==e.item}),x=(e,t)=>e.productList.find(e=>{var n;return(null===(n=e.raynetProductData)||void 0===n?void 0:n.code)===t});var h=n(72278);let y=e=>{switch(null==e?void 0:e.toLocaleLowerCase()){case"bod125":return"Syst\xe9m BOD na čipy o frekvenci 125 kHz";case"bis125":return"Syst\xe9m BIS na čipy o frekvenci 125 kHz";case"mifare":return"Syst\xe9m MIFARE na čipy o frekvenci 13,56 MHz";
1case"desfire":return"Syst\xe9m DESFIRE na šifrovan\xe9 čipy o frekvenci 13,56 MHz";default:return"Bez př\xedstupov\xe9ho syst\xe9mu"}},g=[{system:void 0,accessories:null},{system:r.VZ.Bod125,accessories:(0,h.f)("BIS125")},{system:r.VZ.Mifare,accessories:(0,h.f)("MIFARE")},{system:r.VZ.Desfire,accessories:(0,h.f)("DESFIRE")}],b=[{system:void 0,accessories:null},{system:r.VZ.Bis125,accessories:(0,h.f)("BIS125")},{system:r.VZ.Mifare,accessories:(0,h.f)("MIFARE")},{system:r.VZ.Desfire,accessories:(0,h.f)("DESFIRE")}],j=[{system:void 0,accessories:null},{system:r.VZ.Bis125,accessories:(0,h.f)("BIS125")},{system:r.VZ.Mifare,accessories:(0,h.f)("MIFARE")},{system:r.VZ.Desfire,accessories:(0,h.f)("DESFIRE")}],w=[{system:void 0,accessories:null},{system:r.VZ.Bis125,accessories:(0,h.f)("BIS125")},{system:r.VZ.Mifare,accessories:(0,h.f)("MIFARE")},{system:r.VZ.Desfire,accessories:(0,h.f)("DESFIRE")}],k=(e,t)=>{switch(e){case r.Mv.Melody:return t.find(e=>{var t,n;return(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.entrySecuritySystem)==="BOD125"})?g:b;case r.Mv.DuoStandard:return j;case r.Mv.DuoPlus:return w;default:return[]}},N=e=>{var t,n;if(!e)return[];let l=(0,o.LQ)(e,"entryPhonePanel"),i=null==l?void 0:null===(n=l.item)||void 0===n?void 0:null===(t=n.attributes)||void 0===t?void 0:t.configuration;return e.compatibleProductList.filter(e=>{var t,n,l,a,r,o,s,d;if((null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.einkDisplay)===(null==i?void 0:i.einkDisplay)&&(null===(a=e.raynetProductData)||void 0===a?void 0:null===(l=a.configurationInfo)||void 0===l?void 0:l.design)===(null==i?void 0:i.design)&&(null===(o=e.raynetProductData)||void 0===o?void 0:null===(r=o.configurationInfo)||void 0===r?void 0:r.color)===(null==i?void 0:i.color)&&(null===(d=e.raynetProductData)||void 0===d?void 0:null===(s=d.configurationInfo)||void 0===s?void 0:s.inputHardware)===(null==i?void 0:i.inputHardware))return e})},P=e=>{var t;if(!e)return[];let n=null===(t=e.configuration)||void 0===t?void 0:t.system,l=N(e);return n&&l?k(n,l).map(t=>D(e,t)):[]},C=(e,t,n)=>{var i,a,r,s,d,c,u,m,p,v,f,y,g,b,j,w,k,P,C,D,S,I;if(!t)return{};let E=(0,o.LQ)(e,"entryPhonePanel"),z=N(e),T=(null===(i=e.configuration)||void 0===i?void 0:i.system)==="melody"&&"BOD125"===t&&z.find(e=>{var t,n;return(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.entrySecuritySystem)==="BOD125"}),_=(null===(a=e.configuration)||void 0===a?void 0:a.system)==="melody"&&"BIS125"===t&&z.find(e=>{var t,n;return(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.entrySecuritySystem)==="BIS125"}),L=e.steps[e.activeStepIndex].stepData,A=JSON.parse((null===(r=L.item)||void 0===r?void 0:r.id)||"{}"),B=A.code,R=t===A.entrySystem,M=(null==n?void 0:null===(d=n.raynetProductData)||void 0===d?void 0:null===(s=d.configurationInfo)||void 0===s?void 0:s.entrySecuritySystem)!==void 0,O=(null==n?void 0:null===(c=n.raynetProductData)||void 0===c?void 0:c.code)===B&&R?null==L?void 0:null===(m=L.item)||void 0===m?void 0:null===(u=m.attributes)||void 0===u?void 0:u.controlUnit:M||_?"PS2":"PS2.5",Z=x(e,"4004005740"),V=x(e,"4004005964"),F=x(e,"4004006109"),U=(0,h.f)(t),$=null==U?void 0:U.externalReaderCode.map(t=>x(e,t)),q=null==$?void 0:$.reduce((e,t)=>{var n;return e+((null==t?void 0:null===(n=t.raynetProductData)||void 0===n?void 0:n.price)||0)},0),H=null==U?void 0:U.contactLessChipCode.map(t=>x(e,t)),J=null==H?void 0:H.reduce((e,t)=>{var n;return e+((null==t?void 0:null===(n=t.raynetProductData)||void 0===n?void 0:n.price)||0)},0),K=[],G=[];return(M||_)&&(T?G.push({label:"Integrovan\xe1 MELODY vč. čtečky",value:"PS2",productCode:null==n?void 0:null===(I=n.raynetProductData)||void 0===I?void 0:I.code,description:void 0}):G.push({label:"Integrovan\xe1 PS 2 vč. čtečky",value:"PS2",productCode:null==n?void 0:null===(S=n.raynetProductData)||void 0===S?void 0:S.code,description:void 0})),G.push({label:"Extern\xed řidic\xed jednotka",value:(null==L?void 0:null===(v=L.item)||void 0===v?void 0:null===(p=v.attributes)||void 0===p?void 0:p.controlUnit)!=="PS2"&&(null==n?void 0:null===(f=n.raynetProductData)||void 0===f?void 0:f.code)===B&&R?null==L?void 0:null===(g=L.item)||void 0===g?void 0:null===(y=g.attributes)||void 0===y?void 0:y.controlUnit:"PS2.5",productC
1ode:null==E?void 0:null===(b=E.item)||void 0===b?void 0:b.id,description:void 0}),K.push({label:"PS 2.5",value:"PS2.5",productCode:null==E?void 0:null===(j=E.item)||void 0===j?void 0:j.id,description:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"never",maximumFractionDigits:2,minimumFractionDigits:0}).format((null==Z?void 0:null===(w=Z.raynetProductData)||void 0===w?void 0:w.price)||0))},{label:"PS 3 s Wi-Fi",value:"PS3",productCode:null==E?void 0:null===(k=E.item)||void 0===k?void 0:k.id,description:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"never",maximumFractionDigits:2,minimumFractionDigits:0}).format((null==V?void 0:null===(P=V.raynetProductData)||void 0===P?void 0:P.price)||0))},{label:"Synapp Cloud ONE",value:"SYNAPP",productCode:null==E?void 0:null===(C=E.item)||void 0===C?void 0:C.id,description:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"never",maximumFractionDigits:2,minimumFractionDigits:0}).format((null==F?void 0:null===(D=F.raynetProductData)||void 0===D?void 0:D.price)||0))}),{attributes:[{id:"controlUnitPlacment",title:"Um\xedstěn\xed ř\xedd\xedc\xed jednotky",disabled:!1,input:{type:"radio",content:{options:G,value:O}}},{id:"controlUnit",title:"Extern\xed ř\xedd\xedc\xed jednotka",disabled:"PS2"===O,input:{type:"radio",content:{options:K,value:O}}}],otherItemAttributes:[{id:null==U?void 0:U.externalReaderCode.join(";"),title:"Extern\xed čtečka",disabled:!1,description:(0,l.jsxs)("span",{className:"flex items-center justify-between gap-2 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsxs)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:[Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"never",maximumFractionDigits:2,minimumFractionDigits:0}).format(q||0)," ","/ ks"]})]}),tooltip:{text:"Specifikujte, kolik extern\xedch čteček bude v r\xe1mci objektu instalov\xe1no."},input:{type:"input",content:{typeInput:"number",value:"PS2"===O?0:1,min:"PS2"===O?0:1}}},{id:null==U?void 0:U.contactLessChipCode.join(";"),title:"Bezkontaktn\xed čip",disabled:!1,description:(0,l.jsxs)("span",{className:"flex items-center justify-between gap-2 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsxs)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:[Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"never",maximumFractionDigits:2,minimumFractionDigits:0}).format(J||0)," ","/ ks"]})]}),tooltip:{text:"Uveďte, počet bezkontaktn\xedch čipů bude potřeba pro obyvatele a spr\xe1vu objektu. Každ\xfd čip slouž\xed k pohodln\xe9mu odemyk\xe1n\xed vstupn\xedch dveř\xed bez nutnosti použit\xed kl\xedče. <br /><br /> Tip: Doporučujeme poč\xedtat s rezervou pro nov\xe9 obyvatele, spr\xe1vce budovy nebo v př\xedpadě ztr\xe1ty čipu."},input:{type:"input",content:{typeInput:"number",min:0,value:0}}}]}},D=(e,t)=>{var n,i,a,r,s,d,c,m,p,v,f,x;let h;let g=S(e,t.system),b=null;if(g&&(b=g[JSON.stringify({entrySecuritySystem:null===(x=t.system)||void 0===x?void 0:x.toUpperCase()})]),b&&(null==b?void 0:b.length)>0)h=b[0];else{let t=(0,o.LQ)(e,"entryPhonePanel");h=e.compatibleProductList.find(e=>{var n,l;return(null===(n=e.raynetProductData)||void 0===n?void 0:n.code)===(null==t?void 0:null===(l=t.item)||void 0===l?void 0:l.id)})}return{itemId:JSON.stringify({code:null==h?void 0:null===(n=h.raynetProductData)||void 0===n?void 0:n.code,entrySystem:t.system}),image:{url:null===(a=(0,u.iQ)(null===(s=h.productImages)||void 0===s?void 0:null===(r=s[0])||void 0===r?void 0:r.image))||void 0===a?void 0:null===(i=a.quality(100))||void 0===i?void 0:i.url(),alt:null===(c=h.productImages)||void 0===c?void 0:null===(d=c[0])||void 0===d?void 0:d.alt},category:"Zvonkov\xe9 tablo",title:y(t.system)||"Př\xedstupov\xfd syst\xe9m",itemUrl:"/produkty/zvonkova-tabla/".concat(null==h?void 0:h.generatedSlug),table:{data:[{label:(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"}),value:(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%]",children:"".concat(Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",compactDisplay:"short",signDisplay:"never",maximumFractionDigits:2,minimumFractionDigits:0}).format((null==h?void 0:null===(m=h.raynetProductData)||void 0===m?void 0:m.price)||0)," / ks")})}]},tableDescription:"vč. mont\xe1žn\xed krabice a nap\xe1ječe",hiddenData:{hiddenPrice:(null==h?void 0:null===(p=h.raynetProductData)||void 0===p?void 0:p.price)||0,productC
1ode:null==h?void 0:null===(v=h.raynetProductData)||void 0===v?void 0:v.code,entrySystem:t.system,hiddenTitle:null==h?void 0:null===(f=h.raynetProductData)||void 0===f?void 0:f.name},...C(e,t.system,h),button:{variant:"secondary",size:"small",type:"button",link:{text:"Vybrat",url:"/"}}}},S=(e,t)=>{var n,l,i,a;if(!e)return null;let r=null===(i=(0,o.LQ)(e,"entryPhonePanel"))||void 0===i?void 0:null===(l=i.item)||void 0===l?void 0:null===(n=l.attributes)||void 0===n?void 0:n.configuration,s=N(e),d=s.find(e=>{var n,l;return(null===(l=e.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.entrySecuritySystem)===t});if(!d)return null;let c={system:null==r?void 0:r.system,mounting:null==r?void 0:r.mounting,design:null==r?void 0:r.design,color:null==r?void 0:r.color,inputHardware:null==r?void 0:r.inputHardware,einkDisplay:null==r?void 0:r.einkDisplay,videoPhonePanel:null==r?void 0:r.videoPhonePanel},u=Array.from(new Set(null===(a=s.filter(e=>{var t,n,l,i,a,r,o,s,d,u,m,p,v,f;return JSON.stringify({system:null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.system,mounting:null===(i=e.raynetProductData)||void 0===i?void 0:null===(l=i.configurationInfo)||void 0===l?void 0:l.mounting,design:null===(r=e.raynetProductData)||void 0===r?void 0:null===(a=r.configurationInfo)||void 0===a?void 0:a.design,color:null===(s=e.raynetProductData)||void 0===s?void 0:null===(o=s.configurationInfo)||void 0===o?void 0:o.color,inputHardware:null===(u=e.raynetProductData)||void 0===u?void 0:null===(d=u.configurationInfo)||void 0===d?void 0:d.inputHardware,einkDisplay:null===(p=e.raynetProductData)||void 0===p?void 0:null===(m=p.configurationInfo)||void 0===m?void 0:m.einkDisplay,videoPhonePanel:null===(f=e.raynetProductData)||void 0===f?void 0:null===(v=f.configurationInfo)||void 0===v?void 0:v.videoPhonePanel})===JSON.stringify(c)}))||void 0===a?void 0:a.map(e=>{var t,n;return JSON.stringify({entrySecuritySystem:(null===(n=e.raynetProductData)||void 0===n?void 0:null===(t=n.configurationInfo)||void 0===t?void 0:t.entrySecuritySystem)||null})}))).map(e=>JSON.parse(e)),m={};return u.map(e=>{let t=s.filter(t=>{var n,l,i,a,r,o,s,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N,P,C,D,S,I,E,z,T,_,L,A,B,R,M,O,Z,V,F;return JSON.stringify({system:null===(l=t.raynetProductData)||void 0===l?void 0:null===(n=l.configurationInfo)||void 0===n?void 0:n.system,mounting:null===(a=t.raynetProductData)||void 0===a?void 0:null===(i=a.configurationInfo)||void 0===i?void 0:i.mounting,design:null===(o=t.raynetProductData)||void 0===o?void 0:null===(r=o.configurationInfo)||void 0===r?void 0:r.design,color:null===(c=t.raynetProductData)||void 0===c?void 0:null===(s=c.configurationInfo)||void 0===s?void 0:s.color,inputHardware:null===(m=t.raynetProductData)||void 0===m?void 0:null===(u=m.configurationInfo)||void 0===u?void 0:u.inputHardware,videoPhonePanel:null===(v=t.raynetProductData)||void 0===v?void 0:null===(p=v.configurationInfo)||void 0===p?void 0:p.videoPhonePanel,minRingbellCount:null===(x=t.raynetProductData)||void 0===x?void 0:null===(f=x.configurationInfo)||void 0===f?void 0:f.minRingbellCount,maxRingbellCount:null===(y=t.raynetProductData)||void 0===y?void 0:null===(h=y.configurationInfo)||void 0===h?void 0:h.maxRingbellCount,einkDisplay:null===(b=t.raynetProductData)||void 0===b?void 0:null===(g=b.configurationInfo)||void 0===g?void 0:g.einkDisplay,entrySecuritySystem:(null===(w=t.raynetProductData)||void 0===w?void 0:null===(j=w.configurationInfo)||void 0===j?void 0:j.entrySecuritySystem)||null})===JSON.stringify({system:null===(N=d.raynetProductData)||void 0===N?void 0:null===(k=N.configurationInfo)||void 0===k?void 0:k.system,mounting:null===(C=d.raynetProductData)||void 0===C?void 0:null===(P=C.configurationInfo)||void 0===P?void 0:P.mounting,design:null===(S=d.raynetProductData)||void 0===S?void 0:null===(D=S.configurationInfo)||void 0===D?void 0:D.design,color:null===(E=d.raynetProductData)||void 0===E?void 0:null===(I=E.configurationInfo)||void 0===I?void 0:I.color,inputHardware:null===(T=d.raynetProductData)||void 0===T?void 0:null===(z=T.configurationInfo)||void 0===z?void 0:z.inputHardware,videoPhonePanel:null===(L=d.raynetProductData)||void 0===L?void 0:null===(_=L.configurationInfo)||void 0===_?void 0:_.videoPhonePanel,minRingbellCount:null===(B=d.raynetProductData)||void 0===B?void 0:null===(A=B.configurationInfo)||void 0===A?void 0:A.minRingbellCount,maxRingbellCount:null===(M=d.raynetProductData)||void 0===M?void 0:null===(R=M.configurationInfo)||void 0===R?void 0:R.maxRingbellCount,einkDisplay:null===(Z=d.raynetProductData)||void 0===Z?void 0:null===(O=Z.configurationInfo)||void 0===O?void 0:O.einkDisplay,entrySecuritySystem:(null===(F=d.raynetProductData)||void 0===F?void 0:null===(V=F.configurationInfo)||void 0===V?void 0:V.entrySecuritySystem)||null,...e})});m={...m,[JSON.stringify(e)]:t}}),m},I=()=>({stepType:"select-entry-system",stepData:{stepType:"select-entry-system",stepId:"entrySystem",stepName:"Př\xedstupov\xfd syst\xe9m",item:null,itemType:"productAttributes",stepContent:e=>P(e)},completed:!1,validator:e=>null!==e.item});var E=n(72420);let z=e=>[{name:"entrySysAccessories",title:L(e)},{name:"locks",title:"Požadavky na elektrick\xfd z\xe1mek"}],T=e=>Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",trailingZeroDisplay:"str
1ipIfInteger"}).format(e||0),_=(e,t)=>{var n,l;return"".concat(T(null===(l=t.find(t=>{var n;return(null===(n=t.raynetProductData)||void 0===n?void 0:n.code)===e}))||void 0===l?void 0:null===(n=l.raynetProductData)||void 0===n?void 0:n.price)," / ks")||0},L=e=>{var t;let n=null==e?void 0:null===(t=e.configuration)||void 0===t?void 0:t.system;if(!n)return null;switch(n){case r.Mv.Melody:return"Dalš\xed zař\xedzen\xed k syst\xe9mu Melody";case r.Mv.DuoPlus:return"Dalš\xed zař\xedzen\xed k syst\xe9mu Duo Plus";case r.Mv.DuoStandard:return"Dalš\xed zař\xedzen\xed k syst\xe9mu Duo Standard";default:return null}},A=e=>{var t,n,i,a,r,o;let s=null==e?void 0:null===(n=e.steps.find(e=>"accessories"===e.stepData.stepId))||void 0===n?void 0:null===(t=n.stepData)||void 0===t?void 0:t.attributes,d=(null==e?void 0:e.productList)||[],c=null==s?void 0:null===(a=s.lockType)||void 0===a?void 0:null===(i=a.input.input)||void 0===i?void 0:i.value,u=null==s?void 0:null===(o=s.locksCount)||void 0===o?void 0:null===(r=o.input.input)||void 0===r?void 0:r.value;return{attributes:{lockType:{input:{id:"lockType",inputType:"radio",title:{title:"Typ z\xe1mku"},tooltip:{text:"Pokud chcete v r\xe1mci dod\xe1vky domovn\xed dorozum\xedvac\xed techniky dodat i elektrick\xfd z\xe1mek, uveďte jeho typ a počet."},displayType:"vertical",descriptionDisplayType:"vertical",input:{value:c||"bezElektrickehoZamku",options:[{label:"Bez elektrick\xe9ho z\xe1mku",value:"bezElektrickehoZamku"},{label:"Standardn\xed EFP511 s dlouhou lištou",value:"4005000016",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:_("4005000016",d)})]})},{label:"Standardn\xed EFP511 MB s dlouhou lištou a mech. blok\xe1dou",value:"4005000017",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:_("4005000017",d)})]})},{label:"Standardn\xed v n\xedzkoodběrov\xe9m proveden\xed DS 54 NF 412 (bez lišty)",value:"4005100395",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:_("4005100395",d)})]})},{label:"\xdazk\xfd DS 41-2 NF (bez lišty)",value:"4005000019",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:_("4005000019",d)})]})},{label:"\xdazk\xfd DS 41-2 NDF (bez lišty) s mech. blok\xe1dou",value:"4005100380",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:_("4005100380",d)})]})},{label:"\xdazk\xfd v n\xedzkoodběrov\xe9m proveden\xed DS 41-2 NF 412 (bez lišty)",value:"4005000129",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsx)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:_("4005000129",d)})]})}]}},value:null},locksCount:{input:{id:"locksCount",inputType:"input",title:{title:"Zadejte počet z\xe1mků"},input:{typeInput:"number",min:1,value:u||1}},value:null}}}},B=(e,t)=>{var n,i,a,r,o,s,d,c,u;let m=null===(i=t.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)==="4005100436"}))||void 0===i?void 0:null===(n=i.raynetProductData)||void 0===n?void 0:n.price,p=[null===(r=t.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)==="4110000392"}))||void 0===r?void 0:null===(a=r.raynetProductData)||void 0===a?void 0:a.price,null===(s=t.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)==="6004000043"}))||void 0===s?void 0:null===(o=s.raynetProductData)||void 0===o?void 0:o.price].reduce((e,t)=>
1e+(t||0),0);return{attributes:{powerSupplyType:{input:{id:"powerSupplyType",inputType:"radio",title:"Typ nap\xe1jen\xed",tooltip:{text:"Vyberte jednu z variant nap\xe1jen\xed syst\xe9mu: <ul><li>Doporučovan\xfd zdroj – standardn\xed nap\xe1jen\xed bez z\xe1ložn\xedho akumul\xe1toru.</li><li>Doporučovan\xfd zdroj s bateri\xed pro z\xe1lohov\xe1n\xed syst\xe9mu v momentě v\xfdpadku proudu.</li></ul>"},displayType:"vertical",descriptionDisplayType:"vertical",input:{value:(null==e?void 0:null===(u=e.powerSupplyType)||void 0===u?void 0:null===(c=u.input)||void 0===c?void 0:null===(d=c.input)||void 0===d?void 0:d.value)||"4005100436",options:[{label:"Doporučovan\xfd zdroj",value:"4005100436",hiddenData:"powerSupply",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsxs)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:[(0,E.x)(m||0,{withVAT:!1,showVATLabel:!1}).formattedAmount," ","/ ks"]})]})},{label:"Doporučovan\xfd zdroj s bateri\xed pro z\xe1lohov\xe1n\xed syst\xe9mu v momentě v\xfdpadku proudu",value:"4110000392;6004000043",hiddenData:"powerSupplyWithBattery",description:(0,l.jsxs)("span",{className:"pl-7 flex items-center justify-start gap-4 w-full",children:[(0,l.jsx)("span",{className:"font-ibm text-[14px] font-medium leading-[160%] text-grey-800",children:"Cena bez DPH"})," ",(0,l.jsxs)("span",{className:"p2 font-human font-medium text-primary-raisin leading-[160%] text-right text-nowrap",children:[(0,E.x)(p||0,{withVAT:!1,showVATLabel:!1}).formattedAmount," ","/ ks"]})]})}]}},value:null}}}},R=e=>{var t;return e?null===(t=Object.keys(e))||void 0===t?void 0:t.map(t=>e[t].input):[]},M=(e,t)=>{var n,l,i,a,s,d,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N,P,C,D,S,I,E,z,T,L,A,R;if(!t&&e.activeStepIndex!==(0,o.Yp)(e,"accessories"))return;let M=null==e?void 0:null===(n=e.configuration)||void 0===n?void 0:n.system;if(!M)return console.error("No system chosen"),null;let O=(null==e?void 0:null===(l=e.steps.find(e=>"accessories"===e.stepData.stepId))||void 0===l?void 0:l.stepData).attributes,Z={unitsCount:null===(a=(null==e?void 0:null===(i=e.steps.find(e=>"info"===e.stepData.stepId))||void 0===i?void 0:i.stepData).attributes.unitsCount.input.input)||void 0===a?void 0:a.value},V=null==e?void 0:e.productList;switch(M){case r.Mv.Melody:return{attributes:{videoDistributorsCount:{input:{id:"videoDistributorsCount",inputType:"input",title:{title:"Zadejte počet video distributorů",subtitle:{label:"Cena bez DPH",value:_("4004005623",V)}},tooltip:{text:"Konfigur\xe1tor automaticky doporuč\xed minim\xe1ln\xed počet distributorů na z\xe1kladě počtu domovn\xedch telefonů (1 distributor pro max. 8 telefonů). Pokud ale chcete na každ\xe9 patro samostatn\xfd distributor nebo jin\xe9 rozdělen\xed, můžete počet upravit podle vlastn\xedch potřeb."},input:{typeInput:"number",min:Math.max(1,Math.ceil(Z.unitsCount/8)),value:(null==O?void 0:null===(c=O.videoDistributorsCount)||void 0===c?void 0:null===(d=c.input)||void 0===d?void 0:null===(s=d.input)||void 0===s?void 0:s.value)||Math.max(1,Math.ceil(Z.unitsCount/8))},hiddenData:{productCode:"4004005623"}},value:null},externallyControlledDevicesCount:{input:{id:"externallyControlledDevicesCount",inputType:"input",title:{title:"Počet externě ovl\xe1dan\xfdch zař\xedzen\xed",subtitle:{label:"Cena bez DPH",value:_("4004005994",V)}},tooltip:{text:"Zadejte počet zař\xedzen\xed, kter\xe1 budou ovl\xe1d\xe1na dodatečně pomoc\xed ovl\xe1dac\xedch sp\xednačů OS4. Každ\xfd sp\xednač OS4 umožňuje ovl\xe1dat až dvě extern\xed zař\xedzen\xed (např. světlo, br\xe1nu, dalš\xed dveře)."},input:{typeInput:"number",min:0,value:(null==O?void 0:null===(p=O.externallyControlledDevicesCount)||void 0===p?void 0:null===(m=p.input)||void 0===m?void 0:null===(u=m.input)||void 0===u?void 0:u.value)||0},hiddenData:{productCode:"4004005994"}},value:null},externallyConnectedCamerasCount:{input:{id:"externallyConnectedCamerasCount",inputType:"input",title:{title:"Počet připojen\xfdch extern\xedch kamer",subtitle:{label:"Cena bez DPH",value:_("4004005359",V)}},tooltip:{text:"Zadejte počet dodatečn\xfdch extern\xedch kamer, kter\xe9 chcete připojit k syst\xe9mu mimo intern\xed kameru ve zvonkov\xe9m table."},input:{typeInput:"number",min:0,value:(null==O?void 0:null===(x=O.externallyConnectedCamerasCount)||void 0===x?void 0:null===(f=x.input)||void 0===f?void 0:null===(v=f.input)||void 0===v?void 0:v.value)||0}
1,hiddenData:{productCode:"4004005359"}},value:null},referExternalCamera:{input:{id:"referExternalCamera",inputType:"checkbox",title:"Doručit extern\xed kameru",input:{id:"referExternalCamera",name:"referExternalCamera",checked:(null==O?void 0:null===(g=O.referExternalCamera)||void 0===g?void 0:null===(y=g.input)||void 0===y?void 0:null===(h=y.input)||void 0===h?void 0:h.checked)||!1}},value:null},addGMSModule:{input:{id:"addGMSModule",inputType:"checkbox",title:{title:"Přidat do syst\xe9mu GSM modul pro přesměrov\xe1n\xed hovorů",subtitle:{label:"Cena bez DPH",value:_("4004006124",V)}},tooltip:{text:"Aktivac\xed t\xe9to volby umožn\xedte přesměrov\xe1n\xed hovorů ze zvonkov\xe9ho tabla na mobiln\xed telefon prostřednictv\xedm mobiln\xed s\xedtě přes GSM modul."},input:{id:"addGMSModule",name:"addGMSModule",checked:(null==O?void 0:null===(w=O.addGMSModule)||void 0===w?void 0:null===(j=w.input)||void 0===j?void 0:null===(b=j.input)||void 0===b?void 0:b.checked)||!1},hiddenData:{productCode:"4004006124"}},value:null},addUSBConfigurator:{input:{id:"addUSBConfigurator",inputType:"checkbox",title:{title:"Dodat USB konfigur\xe1tor pro konfigurov\xe1n\xed syst\xe9mu přes poč\xedtač",subtitle:{label:"Cena bez DPH",value:_("4004005368",V)}},tooltip:{text:"Zvolte tuto možnost, pokud chcete syst\xe9m konfigurovat pomoc\xed USB zař\xedzen\xed a připojen\xed k poč\xedtači."},input:{id:"addUSBConfigurator",name:"addUSBConfigurator",checked:(null==O?void 0:null===(P=O.addUSBConfigurator)||void 0===P?void 0:null===(N=P.input)||void 0===N?void 0:null===(k=N.input)||void 0===k?void 0:k.checked)||!1},hiddenData:{productCode:"4004005368"}},value:null},...B(O,V).attributes}};case r.Mv.DuoPlus:return{attributes:{addUSBConfigurator:{input:{id:"addUSBConfigurator",inputType:"checkbox",title:{title:"Dodat USB konfigur\xe1tor pro konfigurov\xe1n\xed syst\xe9mu přes poč\xedtač",subtitle:{label:"Cena bez DPH",value:_("4004005368",V)}},tooltip:{text:"Zvolte tuto možnost, pokud chcete syst\xe9m konfigurovat pomoc\xed USB zař\xedzen\xed a připojen\xed k poč\xedtači."},input:{id:"addUSBConfigurator",name:"addUSBConfigurator",checked:(null==O?void 0:null===(S=O.addUSBConfigurator)||void 0===S?void 0:null===(D=S.input)||void 0===D?void 0:null===(C=D.input)||void 0===C?void 0:C.checked)||!1},hiddenData:{productCode:"4004005368"}},value:null},...B(O,V).attributes}};case r.Mv.DuoStandard:return{attributes:{addGenerator:{input:{id:"addGenerator",inputType:"checkbox",title:{title:"Dodat gener\xe1tor pro možnost vyzv\xe1něn\xed na telefony tak\xe9 tlač\xedtkem na chodbě u dveř\xed bytu (jeden gener\xe1tor pro cel\xfd syst\xe9m)",subtitle:{label:"Cena bez DPH",value:_("4004005156",V)}},tooltip:{text:"Jeden gener\xe1tor slouž\xed pro cel\xfd syst\xe9m v jednom objektu"},input:{id:"addGenerator",name:"addGenerator",checked:null===(R=null==O?void 0:null===(z=O.addGenerator)||void 0===z?void 0:null===(E=z.input)||void 0===E?void 0:null===(I=E.input)||void 0===I?void 0:I.checked)||void 0===R||R},hiddenData:{productCode:"4004005156"}},value:null},addUSBConfigurator:{input:{id:"addUSBConfigurator",inputType:"checkbox",title:{title:"Dodat USB konfigur\xe1tor pro konfigurov\xe1n\xed syst\xe9mu přes poč\xedtač",subtitle:{label:"Cena bez DPH",value:_("4004004930",V)}},tooltip:{text:"Zvolte tuto možnost, pokud chcete syst\xe9m konfigurovat pomoc\xed USB zař\xedzen\xed a připojen\xed k poč\xedtači."},input:{id:"addUSBConfigurator",name:"addUSBConfigurator",checked:(null==O?void 0:null===(A=O.addUSBConfigurator)||void 0===A?void 0:null===(L=A.input)||void 0===L?void 0:null===(T=L.input)||void 0===T?void 0:T.checked)||!1},hiddenData:{productCode:"4004004930"}},value:null},...B(O,V).attributes}};default:return console.error("No attributes for this system"),null}},O=e=>{var t,n;return{groups:z(e),itemGroups:[{group:"entrySysAccessories",items:R(null===(t=M(e))||void 0===t?void 0:t.attributes)},{group:"locks",items:R(null===(n=A(e))||void 0===n?void 0:n.attributes)}]}},Z=e=>e.every(e=>!!e),V=(e,t)=>{var n,l,i,a,o,s,d,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N,P,C,D,S,I;if(!t)return!1;let E=(null===(a=t.attributes)||void 0===a?void 0:null===(i=a.powerSupplyType)||void 0===i?void 0:null===(l=i.input)||void 0===l?void 0:null===(n=l.input)||void 0===n?void 0:n.value)!==void 0&&(null===(c=t.attributes)||void 0===c?void 0:null===(d=c.powerSupplyType)||void 0===d?void 0:null===(s=d.input)||void 0===s?void 0:null===(o=s.input)||void 0===o?void 0:o.value)!==null;switch(e){case r.Mv.Melody:return Z([Number(null!==(k=null===(v=t.attributes)||void 0===v?void 0:null===(p=v.videoDistributorsCount)||void 0===p?void 0:null===(m=p.input)||void 0===m?void 0:null===(u=m.input)||void 0===u?void 0:u.value)&&void 0!==k?k:-1)>=1,Number(null!==(N=null===(y=t.attributes)||void 0===y?void 0:null===(h=y.externallyControlledDevicesCount)||void 0===h?void 0:null===(x=h.input)||void 0===x?void 0:null===(f=x.input)||void 0===f?void 0:f.value)&&void 0!==N?N:0)>=0,Number(null!==(P=null===(w=t.attributes)||void 0===w?void 0:null===(j=w.externallyConnectedCamerasCount)||void 0===j?void 0:null===(b=j.input)||void 0===b?void 0:null===(g=b.input)||void 0===g?void 0:g.value)&&void 0!==P?P:0)>=0,E]);case r.Mv.DuoPlus:return Z([E]);case r.Mv.DuoStandard:return Z([(null===(I=t.attributes)||void 0===I?void 0:null===(S=I.addGenerator)||void 0===S?void 0:null===(D=S.input)||void 0===D?void 0:null===(C=D.input)||void 0===C?void 0:C.checked)||!0,E]);default:return console.error("No validation for this system",e,t),!1}},F=e=>({stepType:"attributes",stepData:{stepType:"attributes",stepId:"accessories",stepName:"Doplňky",stepContent:e=>O(e),initAttributes:e=>{var t;return{...null===(t=M(e,!0))||void 0===t?void 0:t.attributes}}},completed:!1,validator:(e,t)=>
1{var n;return V(null===(n=t.configuration)||void 0===n?void 0:n.system,e)}}),U=[e=>({system:r.Mv.Melody,steps:[c(e),p(e),f(e),I(e),F(e)]}),e=>({system:r.Mv.DuoPlus,steps:[c(e),p(e),f(e),I(e),F(e)]}),e=>({system:r.Mv.DuoStandard,steps:[c(e),p(e),f(e),I(e),F(e)]})];var $=n(39687),q=n(63968);let H={hiddenFromNavigation:!0,stepType:"content",stepData:{stepType:"content",stepId:"intro",stepName:"V\xedtejte v konfigur\xe1toru",content:(0,l.jsx)(()=>{let{nextStep:e}=ed(),{setIsDirty:t}=(0,q.P)();return(0,l.jsx)($.Z,{title:"Nakonfigurujte si syst\xe9m na m\xedru",content:(0,l.jsxs)(l.Fragment,{children:["Zadejte specifick\xe9 parametry a vlastnosti produktů, kter\xe9 potřebujete,",(0,l.jsx)("br",{}),"a my v\xe1m vytvoř\xedme konkr\xe9tn\xed nab\xeddku přizpůsobenou přesně vašim př\xe1n\xedm",(0,l.jsx)("br",{}),"a požadavkům."]}),actions:[{type:"button",size:"medium",onClick:()=>{t(!0),e()},className:"w-[240px]",link:{text:"Jdeme na to",url:"/"}}]})},{})},configuratorFooter:{hidden:!0},configuratorHeader:{progressBar:{hidden:!0}},completed:!0,validator:()=>!0},J={stepType:"system",stepData:{stepType:"system",stepId:"system",stepName:"V\xfdběr syst\xe9mu",system:null},completed:!1,validator:e=>null!==e.system,proceedAutomatically:!0,hiddenFromNavigation:!1,configuratorFooter:{hidden:!0},buildStepConfigurationPath:(e,t)=>{let n=t.system;return{...e,system:n}}},K=n(97604).SQ.czech,G={loginButton:{variant:"primary",size:"medium",link:{url:"/",text:"cs"===K?"Přihl\xe1sit se":"Prihl\xe1siť sa"}},registerButton:{variant:"primary",link:{url:"/",text:"cs"===K?"registrovat se":"registrovať sa"}},guestButton:{variant:"secondary",iconLeft:!0,icon:"MdArrowForward",link:{url:"/",text:"cs"===K?"Pokračovat jako host":"Pokračovať ako hosť"}},email:{placeholder:"cs"===K?"Vaše e-mailov\xe1 adresa":"Vaša e-mailov\xe1 adresa",errorMessages:{criteriaNotMet:"cs"===K?"Zadejte platnou e-mailovou adresu.":"Zadajte platn\xfa e-mailov\xfa adresu"}},password:{placeholder:"Vaše heslo",passwordCriteria:{minOneUpperCase:"cs"===K?"Minimaln\xed počet velk\xfdch p\xedsmen 1":"Minim\xe1lny počet veľk\xfdch p\xedsmen 1",minAndMaxCharacters:"cs"===K?"Minim\xe1ln\xed počet znaků 8 a max. 20":"Minim\xe1lny počet znakov 8 a max. 20",minOneNumber:"cs"===K?"Minimaln\xed počet č\xedsel 1":"Minim\xe1lny počet č\xedsel 1"},errorMessages:{criteriaNotMet:"cs"===K?"Zadejte platn\xe9 heslo":"Zadajte platn\xe9 heslo"},showPasswordLabel:"cs"===K?"Zobrazit heslo":"Zobraziť heslo"},forgotPassword:"cs"===K?"Zapomenut\xe9 heslo?":"Zabudnut\xe9 heslo?",errorMessages:{userNotFound:"Uživatelsk\xe9 jm\xe9no nebo heslo je nespr\xe1vn\xe9"},setIsGuest:()=>{}},W=e=>{let t=e.orderedProductList;return{hiddenFromNavigation:!0,stepType:"login",stepData:{stepType:"login",stepId:"login",stepName:"Přihl\xe1šen\xed",stepContent:()=>({orderedProducts:t,loginData:G})},configuratorHeader:{progressBar:{hidden:!0}},completed:!1,validator:()=>!1}},Q=e=>{var t,n,l;let i=null===(t=e.steps.find(e=>"summary"===e.stepData.stepId))||void 0===t?void 0:t.stepData;return{stepType:"summary",stepData:{stepId:"summary",stepName:"Shrnut\xed",stepType:"summary",formFieldsData:[{id:"orderNote",inputType:"input",input:{typeInput:"textarea",classForInput:"w-full text-left",placeholder:"Vaše pozn\xe1mka",smaller:!1,value:null==i?void 0:null===(l=i.formFieldsData.find(e=>"orderNote"===e.id))||void 0===l?void 0:null===(n=l.input)||void 0===n?void 0:n.value}}],stepContent:()=>({items:[{id:"orderNote",inputType:"input",input:{typeInput:"textarea",placeholder:"Vaše pozn\xe1mka",value:""}}]})},completed:!0,validator:()=>!0}},Y=["4004005623","4004005994","4004005359","4004005376","4004006124","4004005368","4005100436","4110000392","6004000043","4004005156","4004004930","4004005740","4004005964","4004006109","4004001366","4004005975","4110000311","4004005739","4002140154","4110000199","4110000426","4005000016","4005000017","4005100395","4005000019","4005100380","4005000129"],X=(e,t,n)=>{var l,i,a,r,o;let s=[H,J],d=[],c=(null==n?void 0:n.token)||(null==t?void 0:null===(l=t.initData)||void 0===l?void 0:l.token),u=(null==n?void 0:n.userId)||(null==t?void 0:null===(i=t.initData)||void 0===i?void 0:i.userId),m=(null==n?void 0:n.offerId)||(null==t?void 0:null===(a=t.initData)||void 0===a?void 0:a.offerId),p=(null==n?void 0:n.system)||(null==t?void 0:null===(r=t.initData)||void 0===r?void 0:r.system);if(p?s=s.filter(e=>
1!["intro","system"].includes(e.stepData.stepId)):c&&u&&m&&(s=s.filter(e=>"intro"!==e.stepData.stepId)),null===e&&null===t)return[...s,...d];let v=e||p;if(!v)return[...s,...d];let f=t||{configuration:{system:v},steps:[],userLoggedIn:!1,activeStepIndex:0,footerText:null,productList:[],compatibleProductList:[],orderedProductList:[]},x=(null===(o=U.find(e=>e(f).system===v))||void 0===o?void 0:o(f).steps)||[];return d=[Q(f),W(f)],c&&u&&m&&(d=d.filter(e=>!["login","summary"].includes(e.stepData.stepId))),[...s,...x,...d]},ee=(e,t,n)=>{var l,i,a,r,s,d,c,u,m,p,v,f,h,y,g,b,j,w,k,N,P,C,D;let S=n;switch(t.stepData.stepId){case"housePhonePicker":{let e=t.stepData.items,n=null===(l=Object.keys(e))||void 0===l?void 0:l.map(n=>{var l,i;return{stepId:t.stepData.stepId,productId:n,quantity:e[n].quantity,unitPrice:(null===(l=e[n].customData)||void 0===l?void 0:l.price)||0,totalPrice:e[n].quantity*((null===(i=e[n].customData)||void 0===i?void 0:i.price)||0)}});S=S.filter(e=>n.find(t=>t.productId===e.productId)),n.map(e=>{S.find(t=>t.productId===e.productId)?S=S.map(t=>t.productId===e.productId?e:t):S.push(e)});break}case"entryPhonePanel":break;case"entrySystem":{let n=t.stepData,l=null==n?void 0:n.item,I=n.otherItemsAttributes,E=(0,o.LQ)(e,"entryPhonePanel"),z=null==E?void 0:null===(a=E.item)||void 0===a?void 0:null===(i=a.attributes)||void 0===i?void 0:i.configuration;if(!l)break;let T=(null===(c=(null===(r=e.steps.find(e=>"info"===e.stepData.stepId))||void 0===r?void 0:r.stepData).attributes)||void 0===c?void 0:null===(d=c.entryPhonePanelCount)||void 0===d?void 0:null===(s=d.input.input)||void 0===s?void 0:s.value)||1;S=S.filter(e=>e.stepId!==t.stepData.stepId);
1let _=l.attributes.productCode,L=e.compatibleProductList.find(e=>{var t;return(null===(t=e.raynetProductData)||void 0===t?void 0:t.code)===_});if(S.push({stepId:t.stepData.stepId,productId:_,productName:"entrySystemPanel",quantity:T,unitPrice:(null==L?void 0:null===(u=L.raynetProductData)||void 0===u?void 0:u.price)||0,totalPrice:((null==L?void 0:null===(m=L.raynetProductData)||void 0===m?void 0:m.price)||0)*T}),(null==l?void 0:l.id)&&(null==z?void 0:z.videoPhonePanel)&&T>1){let n=x(e,"4004001366");n&&S.push({stepId:t.stepData.stepId,productId:null===(v=n.raynetProductData)||void 0===v?void 0:v.code,productName:"relatedProduct",quantity:T,unitPrice:(null===(f=n.raynetProductData)||void 0===f?void 0:f.price)||0,totalPrice:T*((null===(h=n.raynetProductData)||void 0===h?void 0:h.price)||0)})}if(null==l?void 0:null===(p=l.attributes)||void 0===p?void 0:p.relatedProducts){let e=l.attributes.relatedProducts;null==e||e.map(e=>{var n,l,i;S.push({stepId:t.stepData.stepId,productId:null===(n=e.raynetProductData)||void 0===n?void 0:n.code,productName:"relatedProduct",quantity:T,unitPrice:(null===(l=e.raynetProductData)||void 0===l?void 0:l.price)||0,totalPrice:T*((null===(i=e.raynetProductData)||void 0===i?void 0:i.price)||0)})})}if(l.attributes.controlUnit){let n=x(e,"4004005740"),i=x(e,"4004005964"),a=x(e,"4004006109");switch(l.attributes.controlUnit){case"PS2.5":if(!n)break;S.push({stepId:t.stepData.stepId,productId:null===(y=n.raynetProductData)||void 0===y?void 0:y.code,productName:"externalControlUnit",quantity:1,unitPrice:(null===(g=n.raynetProductData)||void 0===g?void 0:g.price)||0,totalPrice:(null===(b=n.raynetProductData)||void 0===b?void 0:b.price)||0});break;case"PS3":if(!i)break;S.push({stepId:t.stepData.stepId,productId:null===(j=i.raynetProductData)||void 0===j?void 0:j.code,productName:"externalControlUnit",quantity:1,unitPrice:(null===(w=i.raynetProductData)||void 0===w?void 0:w.price)||0,totalPrice:(null===(k=i.raynetProductData)||void 0===k?void 0:k.price)||0});break;case"SYNAPP":if(!a)break;S.push({stepId:t.stepData.stepId,productId:null===(N=a.raynetProductData)||void 0===N?void 0:N.code,productName:"externalControlUnit",quantity:1,unitPrice:(null===(P=a.raynetProductData)||void 0===P?void 0:P.price)||0,totalPrice:(null===(C=a.raynetProductData)||void 0===C?void 0:C.price)||0})}}I&&(null===(D=Object.keys(I))||void 0===D||D.map(n=>{let l=n.split(";");null==l||l.map(l=>{var i,a;let r=x(e,l);if(!r||0===I[n])return null;S.push({stepId:t.stepData.stepId,productId:l,quantity:I[n],unitPrice:(null===(i=r.raynetProductData)||void 0===i?void 0:i.price)||0,totalPrice:((null===(a=r.raynetProductData)||void 0===a?void 0:a.price)||0)*(I[n]||1)})})}));break}case"accessories":{let n=t.stepData.attributes;S=S.filter(e=>e.stepId!==t.stepData.stepId),Object.keys(n).map(l=>{var i,a,r,o,s,d;let c=n[l];if("radio"===c.input.inputType){let l=(null===(d=c.input)||void 0===d?void 0:null===(s=d.input)||void 0===s?void 0:s.value).split(";");null==l||l.map(l=>{var i,a,r,o,s;let d=x(e,l);if(!l||!d)return;let u=1;"lockType"===c.input.id&&(u=(null===(s=n.locksCount)||void 0===s?void 0:null===(o=s.input)||void 0===o?void 0:null===(r=o.input)||void 0===r?void 0:r.value)||1),S.push({stepId:t.stepData.stepId,productId:l,quantity:u,unitPrice:(null==d?void 0:null===(i=d.raynetProductData)||void 0===i?void 0:i.price)||0,totalPrice:((null==d?void 0:null===(a=d.raynetProductData)||void 0===a?void 0:a.price)||0)*u})});return}let u=null===(i=c.input.hiddenData)||void 0===i?void 0:i.productCode,m=x(e,u);if(!u||!(null===(a=c.input)||void 0===a?void 0:a.input))return;let p=0;switch(c.input.inputType){case"input":p=c.input.input.value;break;case"checkbox":p=c.input.input.checked?1:0}0!==p&&S.push({stepId:t.stepData.stepId,productId:u,quantity:p,unitPrice:(null==m?void 0:null===(r=m.raynetProductData)||void 0===r?void 0:r.price)||0,totalPrice:((null==m?void 0:null===(o=m.raynetProductData)||void 0===o?void 0:o.price)||0)*p})})}}return S};var et=n(48184);let en=(e,t)=>{let n=e.activeStepIndex,l=n;return t.proceedAutomatically&&n<e.steps.length-1&&(l=n+1),l};function el(e,t){var n,l,i,r,o,s,d,c,u,m;switch(t.type){case"SET_ACTIVE_STEP":{let i=e.steps.find(e=>e.stepData.stepId===t.payload);return{...e,activeStepIndex:i?e.steps.indexOf(i):0,footerText:(null==i?void 0:null===(l=i.configuratorFooter)||void 0===l?void 0:null===(n=l.footerText)||void 0===n?void 0:n.call(l,i.stepData,e))||null}}case"NEXT_STEP":{let t=e.activeStepIndex;if(t<e.steps.length-1){let n=t+1,l=e.steps[n];if("attributes"===l.stepType){let t=l.stepData,n=null===(o=t.initAttributes)||void 0===o?void 0:o.call(t,e);n&&(t.attributes=n)}l.completed=l.validator(l.stepData,e,{getAttributeValue:a});let s=ee(e,l,e.orderedProductList);return{...e,orderedProductList:s,activeStepIndex:n,footerText:(null==l?void 0:null===(r=l.configuratorFooter)||void 0===r?void 0:null===(i=r.footerText)||void 0===i?void 0:i.call(r,l.stepData,e))||null}}return{...e}}case"PREVIOUS_STEP":{let t=e.activeStepIndex;if(t>0)return{...e,activeStepIndex:t-1};return{...e}}case"UPDATE_STEP_DATA":{let n=e.steps.find(e=>e.stepData.stepId===t.payload.stepId);if(!n)return{...e};let l={...n,stepData:t.payload};e.steps.slice(e.activeStepIndex+1).filter(e=>e.completed).map(t=>{["content","summary"].includes(t.stepType)||(t.completed=!1,e.orderedProductList=e.orderedProductList.filter(e=>
1e.stepId!==t.stepData.stepId))});let i=n.validator(t.payload,e,{getAttributeValue:a});l.completed=i;let r=e.steps;if("system"===l.stepType){let t=l.stepData;null!==t.system&&(r=X(t.system,e),e.steps=r)}if("info"===l.stepData.stepId){let t=l.stepData;if(null!==t.attributes){let n=null===(u=t.attributes.phoneCommTech)||void 0===u?void 0:null===(c=u.input)||void 0===c?void 0:null===(d=c.input)||void 0===d?void 0:d.value;n&&(e.configuration={...e.configuration,videoPhonePanel:"video"===n})}}let o=en(e,l);(null===(s=e.configuration)||void 0===s?void 0:s.system)&&(r=X(null===(m=e.configuration)||void 0===m?void 0:m.system,e),l.stepData={...r[o].stepData,...t.payload});let p=e.steps.map(e=>e.stepData.stepId===l.stepData.stepId?l:e),v=e.configuration;n.buildStepConfigurationPath&&(v=n.buildStepConfigurationPath(e.configuration,l.stepData));let f=ee(e,l,e.orderedProductList);return{...e,steps:p,activeStepIndex:o,configuration:v,orderedProductList:f}}case"UPDATE_CONFIGURATION":return{...e,configuration:{...e.configuration,...t.payload}};case"VALIDATE_STEP":{let n=e.steps.find(e=>e.stepData.stepId===t.payload);if(n){let l={...n};l.completed=n.validator(n.stepData,e,{getAttributeValue:a});let i=e.steps.map(e=>e.stepData.stepId===t.payload?l:e);return{...e,steps:i}}return{...e}}case"UPDATE_COMPATIBLE_PRODUCT_LIST":return{...e,compatibleProductList:t.payload};case"UPDATE_ORDERED_PRODUCT_LIST":{let n=t.payload;if(e.orderedProductList.find(e=>e.productId===n.productId))return{...e,orderedProductList:e.orderedProductList.map(e=>e.productId===n.productId?n:e)};return{...e,orderedProductList:[...e.orderedProductList,n]}}case"UPDATE_FETCHED_PRODUCTS":{let n=t.payload;if(n)return{...e,productList:n};return{...e}}case"ADD_ORDERED_PRODUCT":{let n=t.payload;return{...e,orderedProductList:[...e.orderedProductList,n]}}case"RESET_CONFIGURATOR":return{...ei};default:return{...e}}}let ei={steps:X(null,null),userLoggedIn:!1,activeStepIndex:0,footerText:null,configuration:null,productList:[],compatibleProductList:[],orderedProductList:[]},ea=e=>{let t=null!==e.userId&&null!==e.token&&null!==e.offerId;if(e.system){let n=X(e.system,null,e),l=n.findIndex(e=>"system"===e.stepData.stepId);return -1!==l&&(n[l].completed=!0),{steps:n,userLoggedIn:t,initData:e,activeStepIndex:0,footerText:null,configuration:{system:e.system},productList:[],compatibleProductList:[],orderedProductList:[]}}return{steps:X(null,null,e),userLoggedIn:t,initData:e,activeStepIndex:0,footerText:null,configuration:null,productList:[],compatibleProductList:[],orderedProductList:[]}},er=e=>{let[t,n]=(0,i.useReducer)(el,ea(e));(0,i.useEffect)(()=>{let e=async()=>{n({type:"UPDATE_FETCHED_PRODUCTS",payload:await (0,et.d)(Y)})};(async()=>{null!==t.configuration&&n({type:"UPDATE_COMPATIBLE_PRODUCT_LIST",payload:await (0,et.c)(t.configuration)})})(),e()},[t.configuration]);let l=(0,i.useCallback)(e=>t.steps.find(t=>t.stepData.stepId===e),[t.steps]),r=(0,i.useCallback)(e=>({...t.steps[e]}),[t.steps]),o=(0,i.useCallback)(()=>{let e=t.activeStepIndex;if(e>0)return r(e-1)},[t.activeStepIndex,r]),s=(0,i.useCallback)(()=>{let e=t.activeStepIndex;if(e<t.steps.length-1)return r(e+1)},[t.activeStepIndex,t.steps.length,r]),d=(0,i.useCallback)(()=>r(t.activeStepIndex),[t.activeStepIndex,r]),c=(0,i.useCallback)(e=>{n({type:"SET_ACTIVE_STEP",payload:e.stepData.stepId})},[]),u=(0,i.useCallback)(()=>t.steps.filter(e=>e.completed),[t.steps]),m=(0,i.useCallback)(()=>{n({type:"NEXT_STEP"})},[]),p=(0,i.useCallback)(()=>{n({type:"PREVIOUS_STEP"})},[]),v=(0,i.useCallback)(e=>{n({type:"UPDATE_STEP_DATA",payload:e})},[]),f=(0,i.useCallback)(e=>{n({type:"UPDATE_CONFIGURATION",payload:e})},[]),x=(0,i.useCallback)(e=>e.validator(e.stepData,t,{getAttributeValue:a}),[t]),h=(0,i.useCallback)(()=>{let e=d();return!!e&&e.completed},[d]),y=(0,i.useCallback)(e=>{if(!e)return!1;let n=t.steps.findIndex(t=>t.stepData.stepId===e);return!(n<0)&&!!l(e)&&((n>1?t.steps[n-1]:t.steps[0]).completed||!1)},[l,t.steps]),g=(0,i.useCallback)(e=>{n({type:"UPDATE_ORDERED_PRODUCT_LIST",payload:e})},[]),b=(0,i.useCallback)(e=>{n({type:"UPDATE_FETCHED_PRODUCTS",payload:e})},[]),j=(0,i.useCallback)(e=>{n({type:"ADD_ORDERED_PRODUCT",payload:e})},[]),w=(0,i.useCallback)(()=>t.steps.every(e=>e.completed),[t.steps]),k=(0,i.useCallback)(()=>{throw Error("Method not implemented")},[]),N=(0,i.useCallback)(()=>
1{if(!w())throw Error("Configurator is not valid");throw Error("Method not implemented")},[w]),P=(0,i.useCallback)(()=>{let e=d();if(e){var n,l;return null===(l=e.configuratorFooter)||void 0===l?void 0:null===(n=l.footerText)||void 0===n?void 0:n.call(l,e.stepData,t)}},[t,d]);return{state:t,getStep:l,getStepAtIndex:r,getPreviousStep:o,getNextStep:s,getActiveStep:d,setActiveStep:c,getCompletedSteps:u,nextStep:m,previousStep:p,updateStepData:v,updateConfiguration:f,validateStep:x,canProceed:h,canGoToStep:y,validateConfigurator:w,generateSummary:k,generateOrder:N,updateOrderedProductList:g,addOrderedProduct:j,updateFetchedProductList:b,resetConfigurator:(0,i.useCallback)(()=>{n({type:"RESET_CONFIGURATOR"})},[]),getFooterText:P}};var eo=n(99376);let es=(0,i.createContext)(void 0),ed=()=>{let e=(0,i.useContext)(es);if(!e)throw Error("useConfigurator must be used within a ConfiguratorProvider");return e},ec=e=>e&&Object.values(r.Mv).includes(e)?e:null,eu=e=>{let{children:t}=e,n=(0,eo.useSearchParams)(),i=n.get("token"),a=er({token:i,userId:n.get("user"),offerId:n.get("offerId"),system:ec(n.get("system"))});return(0,l.jsx)(es.Provider,{value:{...a},children:t})}},48184:function(e,t,n){"use strict";n.d(t,{c:function(){return c},d:function(){return u}});var l=n(45008),i=n(37634),a=n(46668);function r(){let e=(0,l._)(['*[\n    _type == "raynetProduct" &&\n    raynetProductData.code in $codes\n  ]\n    {\n        _id,\n        _type,\n        _createdAt,\n        _updatedAt,\n        generatedSlug,\n        relatedProducts,\n        raynetProductData{\n          ...\n        },\n    }']);return r=function(){return e},e}function o(){let e=(0,l._)(['*[\n    _type == "raynetProduct" &&\n    raynetProductData.configurationInfo.system == coalesce($config.system, raynetProductData.configurationInfo.system) &&\n    raynetProductData.configurationInfo.mounting == coalesce($config.mounting, raynetProductData.configurationInfo.mounting) && \n    raynetProductData.configurationInfo.design == coalesce($config.design, raynetProductData.configurationInfo.design) &&\n	raynetProductData.configurationInfo.color == coalesce($config.color, raynetProductData.configurationInfo.color) &&\n    raynetProductData.configurationInfo.inputHardware == coalesce($config.inputHardware, raynetProductData.configurationInfo.inputHardware) && \n	raynetProductData.configurationInfo.minRingbellCount <= $config.minRingbellCount &&\n    raynetProductData.configurationInfo.maxRingbellCount >= $config.minRingbellCount &&\n	raynetProductData.configurationInfo.videoPhonePanel == $config.videoPhonePanel &&\n	raynetProductData.configurationInfo.einkDisplay == coalesce($config.einkDisplay, raynetProductData.configurationInfo.einkDisplay)\n    ] \n    {\n        _id,\n        _type,\n        _createdAt,\n        _updatedAt,\n        generatedSlug,\n        relatedProducts,\n        raynetProductData {\n            ...\n        },\n        productImages[0...1],\n    } | order(raynetProductData.configurationInfo.minRingbellCount asc)']);return o=function(){return e},e}let s=(0,i.Z)(r()),d=(0,a.eI)({projectId:"b6bas0au",dataset:"production",useCdn:!0,apiVersion:"2025-01-17"}),c=async e=>{let t=(0,i.Z)(o());return await d.fetch(t,{config:e},{stega:!1})},u=async e=>await d.fetch(s,{codes:e},{stega:!1})},2664:function(e,t,n){"use strict";n.d(t,{y:function(){return r}});var l=n(99376),i=n(72356),a=n(53173);function r(){let e=(0,l.useRouter)(),{currentLanguage:t}=(0,i.o)();return{...e,push:(n,l)=>{let i=(0,a.getLocalizedUrl)(n,t);e.push(i,l)},replace:(n,l)=>{let i=(0,a.getLocalizedUrl)(n,t);e.replace(i,l)},prefetch:n=>{let l=(0,a.getLocalizedUrl)(n,t);e.prefetch(l)}}}},52153:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var l=n(72356),i=n(37774),a=n(97604);let r=()=>{let{currentLanguage:e}=(0,l.o)(),t=(t,n)=>{let l=i.Cx[t][n];return l?l[e]||l[a.SQ.czech]||n:(console.warn("Translation missing for ".concat(t,".").concat(n)),n)};return{t,tWithValues:(e,n,l)=>{let i=t(e,n);for(let[e,t]of Object.entries(l))i=i.replace("${".concat(e,"}"),String(t));return i},getUrlSegment:t=>"search"===t?e===a.SQ.czech?"vyhledavani":"hladanie":"products"===t?"produkty":"registration"===t?e===a.SQ.czech?"registrace":"registracia":t,currentLanguage:e}}},63968:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});var l=n(26705),i=n(20955);let a=(0,i.createContext)(void 0),r=()=>{let e=(0,i.useContext)(a);if(!e)throw Error("useUnsavedChanges must be used within a UnsavedChangesProvi
1der");return e};t.Z=e=>{let{children:t}=e,[n,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=e=>{if(!n)return;let t="You have unsaved changes. Are you sure you want to leave?";return e.returnValue=t,t};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[n]),(0,l.jsx)(a.Provider,{value:{isDirty:n,setIsDirty:r},children:t})}},38282:function(e,t,n){"use strict";var l=n(34422),i=n(71669);let a=l.Ry().shape({email:(0,i.Qo)(i.QT)});t.Z=a},40598:function(e,t,n){"use strict";var l=n(34422),i=n(71669);let a=l.Ry().shape({email:(0,i.Qo)(i.QT),password:(0,i.Qo)(i.gt)});t.Z=a},15921:function(e,t,n){"use strict";var l=n(34422),i=n(71669);let a=l.Ry().shape({password:(0,i.Qo)(i.gt),newPassword:(0,i.Qo)(i.gt)});t.Z=a},52151:function(e,t,n){"use strict";var l=n(34422),i=n(71669);let a=l.Ry().shape({password:(0,i.Qo)(i.gt),token:l.Z_(),email:i.QT});t.Z=a},98834:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});var l=n(46668),i=n(48372),a=n(25566);let r=(0,l.eI)({projectId:i.Sx,dataset:i.gx,apiVersion:i.tW,token:a.env.SANITY_API_READ_TOKEN,useCdn:!0,perspective:"published",stega:{studioUrl:i.ED,filter:e=>"title"===e.sourcePath.at(-1)||e.filterDefault(e)}})},54751:function(e,t,n){"use strict";n.d(t,{e3:function(){return eo},cs:function(){return eb}});var l=n(45008);let i="\n  ...,\n  link {\n    ...,\n    internalLink->{\n      _type,\n      slug,\n      title,\n      language\n    }\n  },\n",a='\n_type == "bannerSection" => {\n    ...,\n    button {\n      '.concat(i,"\n    }\n},"),r='\n  _type == "contactSection" => {\n    ...,\n  },',o='\n  _type == "downloadSection" => {\n    ...,\n    types[]{\n      ...,\n      files[]{\n        ...,\n        file{\n            "url": asset->url\n        }\n      }\n    }\n},',s='\n  _type == "exampleSection" => {\n    ...,\n  },',d='\n  _type == "faqSection" => {\n    ...,\n    button {\n      '.concat(i,"\n    }\n},"),c='\n    _type == "featureSection" => {\n    ...,\n    },',u="\n    footer{\n        ...,\n        footerLinks[]{\n            ...,\n            internalLink->{\n                _type,\n                slug,\n                title,\n                language\n            },\n        },\n        linkColumns[]{\n            ...,\n            links[]{\n                ...,\n                internalLink->{\n                    _type,\n                    slug,\n                    title,\n                    language\n                }\n            }\n        }\n    }\n",m='\n_type == "categoryTile" => {\n    ...,\n    button{\n        '.concat(i,"\n    }\n},"),p="\ntiles[]{\n    ...,\n    ".concat(m,"\n    ").concat('\n_type == "catalogTile" => {\n    ...,\n    file{\n        ...,\n        asset->{\n            ...,\n            url\n\n        }\n    },\n},',"\n    ").concat('\n_type == "ImageTile" => {\n     ...,\n},\n','\n    _type == "productTileSlider" => {\n          ...,\n          "product": product->{\n          ...,\n          },\n        },\n}'),v='\n  _type == "sliderSection" => {\n    ...,\n    customProductQuery,\n    customButton {\n      '.concat(i,"\n    },\n    ").concat(p,"\n  },\n"),f='\n_type == "tableSection" => {\n    ...,\n    button {\n        ...,\n        '.concat(i,"\n    }\n},"),x='\n  _type == "pictureSection" => {\n          ...,\n  },\n';var h=n(37634);let y="\n    ...,\n    buttons[]{\n      ...,\n        ".concat(i,"\n    },\n    button {\n      ...,\n      ").concat(i,"\n    },\n    list[]{\n      ...,\n      link{\n        ...,\n        internalLink->{\n          _type,\n          slug,\n          title,\n          language\n        }\n      }\n    }\n"),g="\n    header{\n        ...,\n        marketingPopup{\n            ...,\n            content[]{\n                ".concat(y,"\n            }\n        },\n        links[]{\n            ...,\n            link{\n                ...,\n                internalLink->{\n                    _type,\n                    slug,\n                    title,\n                    language\n                },\n            },\n            submenu[]{\n                ...,\n                links[]{\n                    ...,\n                    internalLink->{\n                        _type,\n                        slug,\n                        title,\n                        language\n                    }\n                }\n            }\n        }\n    },"),b='\n  _type == "textPicSection" => {\n    ...,\n    content[]{\n      '.concat(y,"\n    }\n  },\n"),j='\n   _type == "headerSection" => {\n    ...,\n    headerWithImage{\n      ...,\n      button1{\n          '.concat(i,"\n      },\n      button2{\n        ").concat(i,"\n      }\n    },\n    headerWithLinks{\n      ...,\n      button {\n        ").concat(i,"\n      },\n      links[] {\n        ...,\n          button {\n          ").concat(i,"\n          }\n      }\n    }\n  },"),w='\n   _type == "headerContent" => {\n    ...,\n    button {\n      '.concat(i,"\n    }\n  },"),k='\n   _type == "eventSection" => {\n    ...,\n    events[]{\n      ...,\n      button{\n        '.concat(i,"\n      }\n    }\n  },"),N='\n  _type == "linksSection" => {\n    ...,\n    links[] {\n      ...,\n      button {\n        '.concat(i,"\n      },\n    }\n  },"),P='_type == "sharedSection" => {\n         sharedSection->{\n               pageBuilder{\n                    ...,\n                    sections[]{\n                         ...,\n                         '.concat(s,"\n                         ").concat(r,"\n                         ").concat(a,"\n                         ").concat(d,"\n                         ").concat(c,"\n                         ").concat(f,"\n                         ").concat(o,"\n                         ").concat(x,"\n                         ").concat(v,"\n                         ").concat(b,"\n                         ").concat(j,"\n                         ").concat(w,"\n                         ").concat(k,"\n                         ").concat(N,"\n                    }\n               }\n          }\n      },\n"),C='\n  _type == "comparisonSection" => {\n    ...,\n    "items": items[]{\n      ...,\n      detailButton {\n        ...,\n        '.concat(i,"\n      }\n    }\n  },\n");function D(){let e=(0,l._)(['*[_type == "raynetProduct"][0..50]{\n    ...,\n  }\n']);return D=function(){return e},e}function S(){let e=(0,l._)(['*[_type == "raynetProduct" && raynetProductData.code == $id][0]{\n    ...,\n  }']);return S=function(){return e},e}function I(){let e=(0,l._)(['*[\n    _type == "raynetProduct" &&\n    raynetProductData.code in $codes &&\n    unpublished != true &&\n    !($locale in coalesce(unpublishedLocales, []))\n  ]\n    {\n        _id,\n        _type,\n        _createdAt,\n        _updatedAt,\n        generatedSlug,\n        relatedProducts,\n        raynetProductData{\n          ...\n        },\n    }']);return I=function(){return e},e}function E(){let e=(0,l._)(['*[_type == "raynetProduct" && generatedSlug == $slug && unpublished != true && !($locale in coalesce(unpublishedLocales, []))][0]{\n    ...,\n    relatedProducts{\n      ...,\n      tiles[]{\n        _type == "productTileSlider" => {\n          ...,\n          "product": product->{\n          ...,\n          }\n        },\n    }\n    },\n    manuals[]{\n      ...,\n      file {\n        ...,\n        "url": asset->url\n      }\n    }\n  }\n']);return E=function(){return e},e}function z(){let e=(0,l._)(['*[_type == "raynetProduct" && _id == $id && unpublished != true && !($locale in coalesce(unpublishedLocales, []))][0]{\n  ...,\n  relatedProducts{\n    ...,\n    tiles[]{\n      _type == "productTileSlider" => {\n        ...,\n        "product": product->{\n        ...,\n        }\n      },\n  }\n  },\n  manuals{\n    ...,\n      types[]{\n      ...,\n      files[]{\n        ...,\n        file{\n            "url": asset->url\n        }\n      }\n    }\n  }\n}\n']);return z=function(){return e},e}function T(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n  ...,\n  ',"\n  ","\n}"]);return T=function(){return e},e}function _(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n  errorPage{\n    ...,\n    button {\n      ',"\n    }\n  }\n}"]);return _=function(){return e},e}function L(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n  ',"\n  account\n}"]);return L=function(){return e},e}function A(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n    ',"\n}"]);return A=function(){return e},e}function B(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n    productDetailSections{\n      pageBuilder{\n        sections[]{\n          ',"\n        }\n      }\n    },\n    productPageSections{\n      pageBuilder{\n        sections[]{\n          ","\n        }\n      }\n    }\n}"]);return B=function(){return e},e}function R(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n    seo{\n    ...,\n    }\n}']);return R=function(){return e},e}function M(){let e=(0,l._)(['*[_type == "page" && defined(slug.current)] | order(date desc, _updatedAt desc) [0] {\n  ...,\n  content\n}']);return M=function(){return e},e}function O(){let e=(0,l._)(['\n  *[_type == "page" && language == $lang && slug.current == $slug][0] {\n    ...,\n    pageBuilder {\n      ...,\n      sections[] {\n        ','\n      }\n    },\n    "_translations": *[_type == "translation.metadata" && references(^._id)].translations[].value->{\n      title,\n      slug,\n      language\n    },\n  }\n']);return O=function(){return e},e}function Z(){let e=(0,l._)(['*[_type == "page" && language == $lang && slug.current == $slug][0] {\n  title,\n  slug,\n  seo,\n  "_translations": *[_type == "translation.metadata" && references(^._id)].translations[].value->{\n      title,\n      slug,\n      language\n    },\n}']);return Z=function(){return e},e}function V(){let e=(0,l._)(['\n  *[_type == "page" && language == $lang && slug.current == $slug][0]{\n    "_translations": *[_type == "translation.metadata" && references(^._id)].translations[].value->{\n      title,\n      slug,\n      language\n    },\n  }\n']);return V=function(){return e},e}function F(){let e=(0,l._)(['\n  *[_type == "blogPost" && language == $lang] | order(publishedAt desc) [$start...$end] {\n    _id,\n    title,\n    slug,\n    perex,\n    coverImage,\n    category,\n    publishedAt,\n    author-> { name }\n  }\n']);return F=function(){return e},e}function U(){let e=(0,l._)(['\n  count(*[_type == "blogPost" && language == $lang])\n']);return U=function(){return e},e}function $(){let e=(0,l._)(['\n  *[_type == "blogPost" && language == $lang && category == $category] | order(publishedAt desc) [$start...$end] {\n    _id,\n    title,\n    slug,\n    perex,\n    coverImage,\n    category,\n    publishedAt,\n    author-> { name }\n  }\n']);return $=function(){return e},e}function q(){let e=(0,l._)(['\n  count(*[_type == "blogPost" && language == $lang && category == $category])\n']);return q=function(){return e},e}function H(){let e=(0,l._)(['\n  array::unique(*[_type == "blogPost" && language == $lang && defined(category)].category)\n']);return H=function(){return e},e}function J(){let e=(0,l._)(['\n  *[_type == "blogPost" && language == $lang && slug.current == $slug][0] {\n    ...,\n    body[] {\n      ...\n    },\n    author-> { name, role, avatar },\n    relatedPosts[]-> {\n      _id, title, slug, coverImage, publishedAt, category\n    }\n  }\n']);return J=function(){return e},e}function K(){let e=(0,l._)(['\n  *[_type == "blogPost" && language == $lang && slug.current == $slug][0] {\n    title,\n    perex,\n    coverImage,\n    seo,\n    slug\n  }\n']);return K=function(){return e},e}function G(){let e=(0,l._)([""," + "," + "," + ",""]);return G=function(){return e},e}function W(){let e=(0,l._)([""," + "," + "," + ",""]);return W=function(){return e},e}function Q(){let e=(0,l._)(['*[_type == "raynetProduct" && _id in $productIds]{\n  ',"\n}"]);return Q=function(){return e},e}function Y(){let e=(0,l._)(['*[_type == "raynetProduct" && (raynetProductData.code in $productIds || _id in $productIds)]{\n  ',"\n}"]);return Y=function(){return e},e}function X(){let e=(0,l._)(['*[_type == "raynetProduct" && _id in $productIds]{\n  ',"\n}"]);return X=function(){return e},e}function ee(){let e=(0,l._)(['*[_type == "raynetProduct" && raynetProductData.code != "re
1cyclationFee" && (raynetProductData.code in $codes || _id in $codes)]{\n  ',"\n}"]);return ee=function(){return e},e}function et(){let e=(0,l._)(['count(*[_type == "raynetProduct" && generatedSlug match $slug && unpublished != true && !($locale in coalesce(unpublishedLocales, []))])']);return et=function(){return e},e}function en(){let e=(0,l._)(['*[_type == "settings" && _id == $idSettings][0]{\n  productSettingsFilter\n}']);return en=function(){return e},e}function el(){let e=(0,l._)(['*[_type == "configuratorSystemsSettings"][0]{\n  ...,\n}']);return el=function(){return e},e}function ei(){let e=(0,l._)(['*[_type == "raynetProduct"] {\n  raynetProductData {\n    manualsIds\n  }\n}']);return ei=function(){return e},e}function ea(){let e=(0,l._)(['*[_type == "manuals" && filter in $filter] {\n  ...,\n  files[]{\n    ...,\n    file{\n        "url": asset->url\n    }\n  }\n}']);return ea=function(){return e},e}let er="\n  ...,\n  ".concat(s,"\n  ").concat(r,"\n  ").concat(a,"\n  ").concat(d,"\n  ").concat(c,"\n  ").concat(f,"\n  ").concat(o,"\n  ").concat(x,"\n  ").concat(v,"\n  ").concat(b,"\n  ").concat(N,"\n  ").concat(j,"\n  ").concat(w,"\n  ").concat(k,"\n  ").concat(P,"\n  ").concat(C,"\n  ").concat('\n     _type == "partnerSection" => {\n         ...,\n          content[]{\n               '.concat(y,"\n          }\n     }\n"),"\n");(0,h.Z)(D()),(0,h.Z)(S()),(0,h.Z)(I()),(0,h.Z)(E()),(0,h.Z)(z()),(0,h.Z)(T(),g,u),(0,h.Z)(_(),i),(0,h.Z)(L(),g),(0,h.Z)(A(),u),(0,h.Z)(B(),er,er),(0,h.Z)(R()),(0,h.Z)(M()),(0,h.Z)(O(),er),(0,h.Z)(Z()),(0,h.Z)(V()),(0,h.Z)(F()),(0,h.Z)(U()),(0,h.Z)($()),(0,h.Z)(q()),(0,h.Z)(H()),(0,h.Z)(J()),(0,h.Z)(K());let eo="\n  _id,\n  unpublished,\n  raynetProductData {\n    name,\n    label,\n    taxRate,\n    recyclationFee,\n    price,\n    code,\n    category,\n    discount,\n    priceOnlyForRegisteredUsers\n  },\n  productImages,\n  generatedSlug,\n  productDescription,\n",es="\n  _type,\n  id,\n  title,\n  slug,\n",ed="\n  _type,\n  title,\n  slug,\n  perex,\n  coverImage,\n  category,\n",ec='(\n  slug.current match $search || \n  title match $basicValue || \n  content match $basicValue ||\n  pageBuilder.sections[]._type match $basicValue ||\n  pageBuilder.sections[].title match $basicValue ||\n  pageBuilder.sections[].subtitle match $basicValue ||\n  pageBuilder.sections[].description match $basicValue ||\n  pageBuilder.sections[].content[].children[].text match $basicValue ||\n  pageBuilder.sections[].events[].title match $basicValue ||\n  pageBuilder.sections[].events[].description match $basicValue ||\n  pageBuilder.sections[].events[].placeEvent match $basicValue ||\n  pageBuilder.sections[].events[].labelActiveEvent match $basicValue ||\n  pageBuilder.sections[].events[].descriptionLines[].text match $basicValue ||\n  pageBuilder.sections[].events[].button.text match $basicValue ||\n  pageBuilder.sections[].links[].title match $basicValue ||\n  pageBuilder.sections[].links[].description match $basicValue ||\n  pageBuilder.sections[].headerWithImage.title match $basicValue ||\n  pageBuilder.sections[].headerWithImage.description match $basicValue ||\n  pageBuilder.sections[].headerWithLinks.title match $basicValue ||\n  pageBuilder.sections[].headerWithLinks.description match $basicValue ||\n  pageBuilder.sections[].anotation match $basicValue ||\n  pageBuilder.sections[].inputLabel match $basicValue ||\n  pageBuilder.sections[].successMessage match $basicValue ||\n  pageBuilder.sections[].tabs[].title match $basicValue ||\n  pageBuilder.sections[].tabs[].content[].children[].text match $basicValue ||\n  pageBuilder.sections[].tabs[].tabList[].title match $basicValue ||\n  pageBuilder.sections[].tabs[].tabList[].content[].children[].text match $basicValue ||\n  pageBuilder.sections[].features[].title match $basicValue ||\n  pageBuilder.sections[].features[].description match $basicValue ||\n  pageBuilder.sections[].features[].content[].children[].text match $basicValue ||\n  pageBuilder.sections[].faqs[].title match $basicValue ||\n  pageBuilder.sections[].faqs[].content[].children[].text match $basicValue ||\n  pageBuilder.sections[].roadshowBlock[].breakLabel match $basicValue ||\n  pageBuilder.sections[].roadshowBlock[].timeZone match $basicValue ||\n  pageBuilder.sections[].roadshowBlock[].list[] match $basicValue ||\n  pageBuilder.sections[].types[].title match $basicValue ||\n  pageBuilder.sections[].types[].files[].title match $basicValue ||\n  pageBuilder.sections[].types[].files[].description match $basicValue ||\n  pageBuilder.sections[].contacts[].title match $basicValue ||\n  pageBuilder.sections[].contacts[].description match $basicValue ||\n  pageBuilder.sections[].contacts[].email match $basicValue ||\n  pageBuilder.sections[].contacts[].phone match $basicValue ||\n  pageBuilder.sections[].tiles.items[].title match $basicValue ||\n  pageBuilder.sections[].tiles.items[].description match $basicValue ||\n  pageBuilder.sections[].tiles.items[].content[].children[].text match $basicValue ||\n  pageBuilder.sections[]._type == "textPicSection" && pageBuilder.sections[].content[].children[].text match $basicValue\n) && !defined(coalesce(\n  slug.current, \n  title, \n  
1content,\n  pageBuilder.sections[]._type,\n  pageBuilder.sections[].title,\n  pageBuilder.sections[].subtitle,\n  pageBuilder.sections[].description,\n  pageBuilder.sections[].content[].children[].text,\n  pageBuilder.sections[].events[].title,\n  pageBuilder.sections[].events[].description,\n  pageBuilder.sections[].events[].placeEvent,\n  pageBuilder.sections[].events[].labelActiveEvent,\n  pageBuilder.sections[].events[].descriptionLines[].text,\n  pageBuilder.sections[].events[].button.text,\n  pageBuilder.sections[].links[].title,\n  pageBuilder.sections[].links[].description,\n  pageBuilder.sections[].headerWithImage.title,\n  pageBuilder.sections[].headerWithImage.description,\n  pageBuilder.sections[].headerWithLinks.title,\n  pageBuilder.sections[].headerWithLinks.description,\n  pageBuilder.sections[].anotation,\n  pageBuilder.sections[].inputLabel,\n  pageBuilder.sections[].successMessage,\n  pageBuilder.sections[].tabs[].title,\n  pageBuilder.sections[].tabs[].content[].children[].text,\n  pageBuilder.sections[].tabs[].tabList[].title,\n  pageBuilder.sections[].tabs[].tabList[].content[].children[].text,\n  pageBuilder.sections[].features[].title,\n  pageBuilder.sections[].features[].description,\n  pageBuilder.sections[].features[].content[].children[].text,\n  pageBuilder.sections[].faqs[].title,\n  pageBuilder.sections[].faqs[].content[].children[].text,\n  pageBuilder.sections[].roadshowBlock[].breakLabel,\n  pageBuilder.sections[].roadshowBlock[].timeZone,\n  pageBuilder.sections[].roadshowBlock[].list[],\n  pageBuilder.sections[].types[].title,\n  pageBuilder.sections[].types[].files[].title,\n  pageBuilder.sections[].types[].files[].description,\n  pageBuilder.sections[].contacts[].title,\n  pageBuilder.sections[].contacts[].description,\n  pageBuilder.sections[].contacts[].email,\n  pageBuilder.sections[].contacts[].phone,\n  pageBuilder.sections[].tiles.items[].title,\n  pageBuilder.sections[].tiles.items[].description,\n  pageBuilder.sections[].tiles.items[].content[].children[].text,\n  pageBuilder.sections[]._type == "textPicSection" && pageBuilder.sections[].content[].children[].text,\n)[@ != $search && @ != $basicValue][0])',eu="generatedSlug match $search || raynetProductData.code match $search || raynetProductData.category[0] match $search || raynetProductData.category[0] match $basicValue || raynetProductData.name match $basicValue || searchTerms[] match $search || searchTerms[] match $basicValue || raynetProductData.searchKeywords[] match $search || raynetProductData.searchKeywords[] match $basicValue",em="slug.current match $search || title match $basicValue || perex match $basicValue || category match $basicValue || body[].children[].text match $basicValue || seo.seoTitle match $basicValue || seo.seoDescription match $basicValue || seo.seoKeywords[] match $basicValue",ep='*[_type == "page" && language == $lang && '.concat(ec,"][0..10]{").concat(es,"}"),ev='*[_type == "page" && language == $lang && '.concat(ec,"][0..10]{").concat(es,"}"),ef='*[_type == "blogPost" && language == $lang && defined(slug.current) && ('.concat(em,")][0..3]{").concat(ed,"}"),ex='*[_type == "blogPost" && language == $lang && defined(slug.current) && ('.concat(em,")][0..20]{").concat(ed,"}"),eh='*[_type == "raynetProduct" && ('.concat(eu,") && unpublished != true && !($locale in coalesce(unpublishedLocales, []))][0..2]{_type,").concat(eo,"}"),ey='*[_type == "raynetProduct" && ('.concat(eu,") && unpublished != true && !($locale in coalesce(unpublishedLocales, []))][0..99]{_type,").concat(eo,"}");(0,h.Z)(G(),eh,ep,ef,'*[_type == "settings" && _id == $idSettings]{productSettingsFilter{_type,categories[slug.current match $search || idRaynet match $basicValue || title match $basicValue][0..3]}}'),(0,h.Z)(W(),ey,ev,ex,'*[_type == "settings" && _id == $idSettings]{productSettingsFilter{_type,categories[slug.current match $search || idRaynet match $basicValue || title match $basicValue]}}'),(0,h.Z)(Q(),eo),(0,h.Z)(Y(),eo),(0,h.Z)(X(),eo),(0,h.Z)(ee(),eo),(0,h.Z)(et());let eg="\n  (!defined($search) || ".concat(eu,")\n  && ").concat("(!defined($category) || raynetProductData.category[0] match $category)","\n  && ").concat("(!defined($minPrice) || raynetProductData.price >= $minPrice)","\n  && ").concat("(!defined($maxPrice) || raynetProductData.price <= $maxPrice)","\n  && ").concat("(!defined($mounting) || (raynetProductData.configurationInfo.mounting in $mounting || raynetProductData.configurationInfo.mounting match $mounting))","\n  && ").concat("(!defined($system) || (raynetProductData.configurationInfo.system in $system) || (raynetProductData.category[1] in $system))"," \n  && ").concat("(!defined($typePeople) || (raynetProductData.configurationInfo.inputHardware in $typePeople || raynetProductData.configurationInfo.inputHardware match $typePeople))","\n  && ").concat("(!defined($countPeople) || (raynetProductData.configurationInfo.minRingbellCount <= $countPeople && raynetProductData.configurationInfo.maxRingbellCount >= $countPeople))","\n  && ").concat("(!defined($design) || raynetProductData.configurationInfo.design in $design)","\n  && ").concat("(!defined($chip) || raynetProductData.configurationInfo.entrySecuritySystem in $chip || raynetProductData.configurationInfo.entrySecuritySystem match $chip)","\n  && ").concat("(!defined($displayInk) || raynetProductData.configurationInfo.einkDisplay == $displayInk) && (!defined($displayPaper) || raynetProductData.configurationInfo.einkDisplay != $displayPaper)","\n  ");(0,h.Z)(en()),'*[_type == "raynetProduct"  && '.concat(eg," && unpublished != true && !($locale in coalesce(unpublishedLocales, []))]| order(coalesce(raynetProductData.prioritySorting, 999999) asc, raynetProductData.name asc)[$offset..$limit]{\n  ").concat(eo,"\n}"),'*[_type == "raynetProduct" && '.concat(eg," && unpublished != true && !($locale in coalesce(unpublishedLocales, []))] | order(generatedSlug asc)[$offset..$limit]{\n  ").concat(eo,"\n}"),'*[_type == "raynetProduct" && '.concat(eg," && unpublished != true && !($locale in coalesce(unpublishedLocales, []))] | order(generatedSlug desc)[$offset..$limit]{\n  ").concat(eo,"\n}"),'*[_type == "raynetProduct" && '.concat(eg," && unpublished != true && !($locale in coalesce(unpublishedLocales, []))] | order(raynetProductData.price asc)[$offset..$limit]{\n  ").concat(eo,"\n}"),'*[_type == "raynetProduct" && '.concat(eg," && unpublished != true && !($locale in coalesce(unpublishedLocales, []))] | order(raynetProductData.price desc)[$offset..$limit]{\n").concat(eo,"\n}");let eb=(0,h.Z)(el());(0,h.Z)(ei()),(0,h.Z)(ea())},66269:function(e,t,n){"use strict";var l,i;n.d(t,{c:function(){return l}}),(i=l||(l={})).Default="default",i.Grid="grid",i.Row="row",i.Col="col"},86909:function(e,t){"use strict";t.Z=e=>{var t,n,l,i,a,r,o,s,d,c,u,m,p,v,f,x,h,y,g,b,j,w,k,N;return!!e&&null!=e&&null!==(t=e.deliveryData)&&void 0!==t&&!!t.street&&(null==e?void 0:null===(n=e.deliveryData)||void 0===n?void 0:n.street)!==""&&null!=e&&null!==(l=e.deliveryData)&&void 0!==l&&!!l.city&&(null==e?void 0:null===(i=e.deliveryData)||void 0===i?void 0:i.city)!==""&&null!=e&&null!==(a=e.deliveryData)&&void 0!==a&&!!a.country&&(null==e?void 0:null===(r=e.deliveryData)||void 0===r?void 0:r.country)!==""&&null!=e&&null!==(o=e.deliveryData)&&void 0!==o&&!!o.zipCode&&(null==e?void 0:null===(s=e.deliveryData)||void 0===s?void 0:s.zipCode)!==""&&null!=e&&null!==(d=e.facturationData)&&void 0!==d&&!!d.street&&(null==e?void 0:null===(c=e.facturationData)||void 0===c?void 0:c.street)!==""&&null!=e&&null!==(u=e.facturationData)&&void 0!==u&&!!u.city&&(null==e?void 0:null===(m=e.facturationData)||void 0===m?void 0:m.city)!==""&&null!=e&&null!==(p=e.facturationData)&&void 0!==p&&!!p.country&&(null==e?void 0:null===(v=e.facturationData)||void 0===v?void 0:v.country)!==""&&null!=e&&null!==(f=e.facturationData)&&void 0!==f&&!!f.zipCode&&(null==e?void 0:null===(x=e.facturationData)||void 0===x?void 0:x.zipCode)!==""&&null!=e&&null!==(h=e.personalData)&&void 0!==h&&!!h.email&&(null==e?void 0:null===(y=e.personalData)||void 0===y?void 0:y.email)!==""&&null!=e&&null!==(g=e.personalData)&&void 0!==g&&!!g.firstName&&(null==e?void 0:null===(b=e.personalData)||void 0===b?void 0:b.firstName)!==""&&null!=e&&null!==(j=e.personalData)&&void 0!==j&&!!j.lastName&&(null==e?void 0:null===(w=e.personalData)||void 0===w?void 0:w.lastName)!==""&&null!=e&&null!==(k=e.personalData)&&void 0!==k&&!!k.phone&&(null==e?void 0:null===(N=e.personalData)||void 0===N?void 0:N.phone)!==""}}},function(e){e.O(0,[532,1582,6990,922,8218,7287,8798,4171,3830,6169,3257,4121,831,1744],function(){return e(e.s=58569)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.