PageSourceSearch

https://www.tui.cz/assets/web-prd-cs/28cf6edc7f0aed36e0837619297bb…/[offerCode]/[pageType]-c6a124925f8c1f73.js

js tui.cz collected 2026-10-04 22:24:55 UTC 348,994 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];if(null!=a)for(var i in a)a.hasOwnProperty(i)&&(e[i]=a[i])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:sentry-cz":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ce81f088-26f2-4e8a-8e4c-2fb30d257538",e._sentryDebugIdIdentifier="sentry-dbid-ce81f088-26f2-4e8a-8e4c-2fb30d257538")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54996,93384,77494,3934,22630,63648,15169,44516,52998,98589,40685,77935,87834,93852,7703],{41241:function(e,t,a){"use strict";var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=l.createElement("path",{d:"M101.7 97.1H18.3c-3.3 0-6 2.7-6 6s2.7 6 6 6h83.4c3.3 0 6-2.7 6-6s-2.7-6-6-6M13.9 54.9q.15 0 0 0l81.7 29.7c4.6 1.7 9.8-.7 11.4-5.3 1.7-4.6-.7-9.8-5.3-11.4l-24.7-9-15.6-46.2c-.3-.6-1-1.2-1.7-1.5-1.9-.7-3.3.3-3.9 1.8L43.6 46.7l-13.6-5-10.3-18c-.5-.5-1.1-.7-1.8-.7-1.6-.1-3.1 1.2-3.2 2.8l-2.7 26c-.1 1.2.6 2.6 1.9 3.1"})))}},3934:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:16,height:16,viewBox:"0 0 50 50"},e),i||(i=l.createElement("path",{fill:"#1b115c",fillRule:"evenodd",d:"M37 7.9c3.3 12.8 2.8 23.8-9.5 25.2-.6 0-.9.5-.8 1l.3 5.2c.1.7.6.8 1.1.9l3.4.3c.5.1 2.8.5 2.8 1.3v.8c0 .5-.8.8-1.2.9-2.5.7-5.6.8-8.2.8s-5.7 0-8.2-.8c-.4-.1-1.2-.4-1.2-.9v-.8c0-.8 2.3-1.2 2.8-1.3l3.4-.3c.5 0 1-.2 1-1l.4-5c0-.6-.2-1-.8-1.1C10 31.7 9.5 20.7 12.8 7.9zm-21.7 6.9c-.6 4.3-.7 9.4 1.6 12.3 2 2.5 6 3 9 3 2.2 0 4.6-.2 6.6-1.1-2.2 1.5-5 1.8-7.6 1.8-3.3 0-7.1-.6-9.3-3.4-3.3-4.2-2.1-12-1-16.8v-.3h20.6v.3l.8 4.2H18.4a46 46 0 0 0-.7 7c-.2 1.4-1.1 1-1.3-.6-.2-2.1 0-4.4.3-6.4z",clipRule:"evenodd"})))}},27028:function(e,t,a){"use strict";var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=l.createElement("path",{d:"M106.2 74.6 65.4 33.8c-3.2-3.2-8.4-3.2-11.5 0L13 74.6c-3.2 3.2-3.2 8.4 0 11.5 3.2 3.2 8.4 3.2 11.5 0L59.6 51l35.1 35.1c3.2 3.2 8.4 3.2 11.5 0 1.6-1.6 2.4-3.7 2.4-5.8 0-2-.8-4.1-2.4-5.7"})))}},96967:function(e,t,a){"use strict";var i,l,n=a(44194);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return n.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=n.createElement("path",{d:"M42.1 41.6c2.3 8.6 9.3 15.3 17.6 15.3S75 50.2 77.3 41.6z"})),l||(l=n.createElement("path",{d:"M78.1 96.8H65.8V71.6c15.7-3.1 27.6-18.1 27.6-36.1 0-9.4-3.2-18.4-8.6-24.5H34.6C29.2 17.1 26 26.1 26 35.5c0 18 11.9 33 27.6 36.1v25.1H41.3c-3.4 0-6.1 2.8-6.1 6.1s2.8 6.1 6.1 6.1h36.8c3.4 0 6.1-2.8 6.1-6.1s-2.8-6-6.1-6M38.2 35.5c0-4.5 1.1-8.6 2.9-12.2h37.1c1.8 3.6 2.9 7.8 2.9 12.2C81.1 49 71.5 60 59.7 60S38.2 49 38.2 35.5"})))}},93384:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=l.createElement("path",{fill:"#1b115c",d:"M45 59a4 4 0 0 1-4-4v-5a4 4 0 0 1 4-4h5a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4zm25 0a4 4 0 0 1-4-4v-5a4 4 0 0 1 4-4h5a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4zM45 39a4 4 0 0 1-4-4v-5a4 4 0 0 1 4-4h5a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4zm25 0a4 4 0 0 1-4-4v-5a4 4 0 0 1 4-4h5a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4zm-49 62V15
1a4 4 0 0 1 4-4h70a4 4 0 0 1 4 4v86h6a4 4 0 1 1 0 8H15a4 4 0 1 1 0-8zm43 0h7V79h-7zm-15 0h7V79h-7zm30 0h12V19H29v82h12V75a4 4 0 0 1 4-4h30a4 4 0 0 1 4 4z"})))}},77494:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},e),i||(i=l.createElement("path",{d:"M4.133 3.306A3.306 3.306 0 0 1 7.439 0H19.56a3.306 3.306 0 0 1 3.306 3.306V20.94a3.306 3.306 0 0 1-3.306 3.306H7.44a3.306 3.306 0 0 1-3.306-3.306V3.306zm2.204 0V20.94c0 .608.493 1.102 1.102 1.102H19.56c.609 0 1.102-.494 1.102-1.102V3.306c0-.609-.493-1.102-1.102-1.102H7.44c-.609 0-1.102.493-1.102 1.102M16.53 17.357h-6.062v5.786c.004.397-.207.766-.55.964v1.791a1.102 1.102 0 0 1-2.205 0v-2.755a1.1 1.1 0 0 1 .551-.964v-4.822h-3.03a1.102 1.102 0 0 1 0-2.204h16.53a1.102 1.102 0 1 1 0 2.204h-3.03v4.684a1.1 1.1 0 0 1 .826.386 1.102 1.102 0 0 1 1.929.716v2.755a1.102 1.102 0 0 1-1.929.716 1.102 1.102 0 0 1-1.928-.716v-1.653a1.1 1.1 0 0 1-1.102-1.102zm-8.817 8.541a1.102 1.102 0 0 1-2.204 0v-2.755a1.102 1.102 0 0 1 2.204 0zM2.204 6.337v3.581a1.102 1.102 0 1 1-2.204 0V5.235c0-.609.493-1.102 1.102-1.102h24.796c.609 0 1.102.493 1.102 1.102v4.683a1.102 1.102 0 1 1-2.204 0V6.337z"})))}},63648:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},e),i||(i=l.createElement("path",{d:"M23.418 3.72A3.59 3.59 0 0 1 27 7.3v16.117A3.59 3.59 0 0 1 23.418 27H3.582A3.59 3.59 0 0 1 0 23.418V7.301a3.59 3.59 0 0 1 3.582-3.582h4.114q.178-.596.412-1.173C8.748.976 9.505 0 10.74 0h5.51c1.225 0 1.975.969 2.625 2.54.157.38.297.78.42 1.18zM10.692 2.357c-.177.228-.364.582-.543 1.02a11.6 11.6 0 0 0-.533 1.684c-.113.504-.56.861-1.075.861H3.58c-.755 0-1.377.623-1.377 1.378v16.117c0 .755.622 1.378 1.378 1.378h19.836c.755 0 1.378-.623 1.378-1.378V7.301c0-.755-.623-1.378-1.378-1.378H18.46c-.512 0-.956-.352-1.073-.85a13 13 0 0 0-.547-1.69c-.182-.44-.372-.796-.55-1.025a1 1 0 0 0-.138-.154h-5.319a1 1 0 0 0-.14.154m2.804 20.51a7.714 7.714 0 1 1 0-15.43 7.714 7.714 0 0 1 0 15.43m0-2.205a5.51 5.51 0 1 0 0-11.02 5.51 5.51 0 0 0 0 11.02m8.265-10.47a1.102 1.102 0 1 1 0-2.203 1.102 1.102 0 0 1 0 2.204"})))}},15169:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=l.createElement("path",{fill:"#1b115c",fillRule:"nonzero",d:"M94 104v1a4 4 0 1 1-8 0v-1H34v1a4 4 0 1 1-8 0v-1h-2.993C16.377 104 11 98.63 11 92.004V37.996C11 31.369 16.376 26 23.007 26H41V15a4 4 0 0 1 4-4h30a4 4 0 0 1 4 4v11h17.993C103.623 26 109 31.37 109 37.996v54.008C109 98.631 103.624 104 96.993 104zM49 26h22v-7H49zm-23 9v60a4 4 0 1 0 8 0V35a4 4 0 1 0-8 0m60 0v60a4 4 0 1 0 8 0V35a4 4 0 1 0-8 0"})))}},44516:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:16,height:16,viewBox:"0 0 401.999 401.998"},e),i||(i=l.createElement("path",{d:"M237.543 301.499h-73.091c-4.95 0-9.233 1.811-12.851 5.425q-5.423 5.424-5.424 12.847v63.953q0 7.421 5.424 12.854c3.621 3.61 7.9 5.421 12.851 5.421h73.097c4.942 0 9.227-1.811 12.848-5.421 3.61-3.621 5.42-7.905 5.42-12.854v-63.953c0-4.949-1.813-9.229-5.427-12.847-3.617-3.617-7.902-5.425-12.847-5.425M259.383 5.424C255.862 1.812 251.628 0 246.676 0h-91.359c-4.948 0-9.18 1.812-12.703 5.424q-5.281 5.427-4.996 12.85l7.992 219.265c.19 4.948 2.139 9.236 5.852 12.847q5.566 5.431 12.991 5.431h73.097q7.412 0 12.991-5.431c3.71-3.61 5.653-7.898 5.852-12.847l7.987-219.265c.198-4.948-1.475-9.229-4.997-12.85"})))}},22630:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120"},e),i||(i=l.createElement("g",{fill:"#202f58"},l.createElement("path",{d:"M79.122 119.982c-3.96 0-7.92-1.5-11.46-2.88-2.76-1.08-5.64-2.16-7.68-2.16-2.22 0-5.22 1.14-8.1 2.22-5.1 1.92-10.86 4.08-16.32 1.8s-7.98-7.86-10.26-12.84c-1.26-2.82-2.52-5.76-4.2-7.32-1.44-1.44-4.26-2.7-6.96-3.9-5.04-2.28-10.8-4.8-13.14-10.5s-.12-11.58 1.86-16.74c1.08-2.76 2.16-5.64 2.16-7.68 0-2.22-1.14-5.22-2.22-8.1-1.92-5.1-4.08
1-10.86-1.8-16.32s7.86-8.04 12.84-10.26c2.82-1.26 5.76-2.52 7.32-4.2 1.44-1.44 2.7-4.26 3.9-6.96 2.28-5.04 4.8-10.8 10.5-13.14s11.58-.12 16.74 1.86c2.76 1.08 5.64 2.16 7.68 2.16 2.22 0 5.22-1.14 8.1-2.22 5.1-1.92 10.86-4.08 16.32-1.8s7.98 7.86 10.26 12.84c1.26 2.82 2.52 5.76 4.2 7.32 1.44 1.44 4.26 2.7 6.96 3.9 5.04 2.28 10.8 4.8 13.14 10.5s.12 11.58-1.86 16.74c-1.08 2.76-2.16 5.64-2.16 7.68 0 2.22 1.14 5.22 2.22 8.1 1.92 5.1 4.08 10.86 1.8 16.32s-7.86 8.04-12.84 10.26c-2.82 1.26-5.76 2.52-7.32 4.2-1.44 1.44-2.7 4.26-3.9 6.96-2.28 5.04-4.8 10.8-10.5 13.14-1.74.72-3.48 1.02-5.28 1.02m-19.2-14.04c3.72 0 7.38 1.38 10.92 2.76 3.78 1.44 7.68 2.94 10.08 1.98 2.4-1.02 4.08-4.8 5.76-8.52 1.56-3.48 3.12-7.02 5.76-9.66 2.76-2.76 6.42-4.38 9.96-6 3.6-1.62 7.32-3.3 8.22-5.52.9-2.16-.54-6-1.92-9.72-1.38-3.66-2.82-7.44-2.76-11.28 0-3.72 1.38-7.38 2.76-10.92 1.44-3.78 2.94-7.68 1.98-10.08s-4.8-4.08-8.52-5.76c-3.48-1.56-7.02-3.12-9.66-5.76-2.76-2.76-4.38-6.42-6-9.96-1.62-3.6-3.3-7.32-5.52-8.22s-6 .54-9.72 1.92c-3.66 1.38-7.44 2.82-11.28 2.82-3.72 0-7.38-1.38-10.92-2.76-3.78-1.44-7.68-2.94-10.08-1.98-2.4 1.02-4.08 4.8-5.76 8.52-1.56 3.48-3.12 7.02-5.76 9.66-2.76 2.76-6.42 4.38-9.96 6-3.6 1.62-7.32 3.3-8.22 5.52-.9 2.16.54 6 1.92 9.72 1.38 3.66 2.82 7.44 2.76 11.28 0 3.72-1.38 7.38-2.76 10.92-1.44 3.78-2.94 7.68-1.98 10.08s4.8 4.08 8.52 5.76c3.48 1.56 7.02 3.12 9.66 5.76 2.76 2.76 4.38 6.42 6 9.96 1.62 3.6 3.3 7.32 5.52 8.22 2.16.9 6-.54 9.72-1.92 3.66-1.38 7.44-2.82 11.28-2.82"}),l.createElement("path",{d:"M37.422 86.982c-1.14 0-2.28-.42-3.18-1.26a4.524 4.524 0 0 1 0-6.36l45-45a4.5 4.5 0 0 1 6.36 0 4.5 4.5 0 0 1 0 6.36l-45 45c-.9.84-2.04 1.26-3.18 1.26m6.006-36a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15m33 33a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15"}))))}},1302:function(e,t,a){"use strict";var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120"},e),i||(i=l.createElement("path",{d:"M92.5 101c-8.75 0-16.962-3.373-23.166-9.317a4 4 0 0 0-3.281-1.079Q63.02 90.999 60 91c-22.738 0-41-16.231-41-36 0-19.77 18.262-36 41-36 22.74 0 41 16.23 41 36 0 11.73-6.463 22.561-17.217 29.306a4 4 0 0 0-1.242 5.547 41.7 41.7 0 0 0 10.473 11.143q-.258.004-.514.004m13.834-1.914a33.6 33.6 0 0 1-14.789-10.422C102.459 80.421 109 68.227 109 55c0-24.412-22.039-44-49-44S11 30.589 11 55c0 24.41 22.039 44 49 44q2.604 0 5.209-.251A41.33 41.33 0 0 0 92.5 109c4.758 0 9.417-.81 13.834-2.372 3.555-1.257 3.555-6.285 0-7.542M41 47c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m20 0c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m28 8c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8 8-3.589 8-8"})))}},52998:function(e,t,a){"use strict";a.r(t);var i,l,n,r=a(44194);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return r.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=r.createElement("circle",{cx:49.1,cy:19,r:8,transform:"rotate(-13.286 49.055 18.984)"})),l||(l=r.createElement("path",{d:"M72.4 84.2H53.9l-19.1-67c-1.2-4.3-5.6-6.8-9.9-5.7S18 17 19.2 21.3l18.2 63.9c-2.5 1.4-4.2 4-4.2 7 0 4.4 3.6 8 8.1 8h31c4.5 0 8.1-3.6 8.1-8 .1-4.4-3.5-8-8-8"})),n||(n=r.createElement("path",{d:"m100.2 100.2-2.6-29.9c-.4-4.4-4.3-7.5-8.6-7.5H69.1L61 33.4c-1.1-4.1-5.5-6.5-9.7-5.4v.1c-4.2 1.1-6.7 5.4-5.6 9.6l9.8 35.6c1 3.8 4.2 5.6 8.6 5.6h18.4l1.9 22.7c.4 4.4 4.3 7.8 8.6 7.4 4.4-.4 7.6-4.4 7.2-8.8"})))}},98589:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:16,height:16,viewBox:"0 0 50 50"},e),i||(i=l.createElement("path",{fill:"#1b115c",d:"M47.7 14.4c-2.3-1.4-5.9 1.2-7.6 2L36.9 18a3 3 0 0 0-1.4-1c-.5 0-3.5-1-3.3 1.6 0 .4
1-.8 0-1-.5-.2-.7.6-5.5-.1-5.8-1.6-.7-5.5 1.2-4.9 3.5s1.3 4.6 2 6c-2.6 1-5.3 2-8 3.2-.2-.3-.4-.5-.7-.6-.6-.5-1.8.8-1.9.1-.1-.8.8-4.9.2-5.4-1.5-1-5.7 0-5.6 2.4 0 1.1 2.2 3.3 2.2 4.3.1.7-.1 1.3-.3 1.7l-6.5 2.8c-3 1.5-9.3 2.3-6.3 5.3 4 3.9 7.3 2.9 10.1 1.7C21.1 33 37 25.4 45.4 21c1.5-.8 6.9-3.8 2.3-6.7zM15.6 21c-.4.1-1.4-.3-1-.7.2-.3 1.5-.6 1.8-.4.3.3-.5 1-.8 1.1m13.6-6c-.4.2-1.4 0-1.2-.6.2-.4 1.4-1 1.8-.8.3.2-.3 1.3-.6 1.4"})))}},62931:function(e,t,a){"use strict";var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 36 44"},e),i||(i=l.createElement("path",{fill:"#1b115c",fillRule:"evenodd",d:"M0 3Q0 1.78.89.89 1.782.001 3 0h9q0 2.625 1.734 4.313Q15.446 6 18 6q2.532 0 4.266-1.688Q24 2.626 24 0h9q1.22 0 2.11.89T36 3v38q0 1.22-.89 2.11T33 44H3q-1.22 0-2.11-.89Q.001 42.218 0 41z"})))}},27986:function(e,t,a){"use strict";var i,l,n=a(44194);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return n.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,viewBox:"0 0 36 44"},e),i||(i=n.createElement("defs",null,n.createElement("path",{id:"ticket-43554d__a",d:"M0 3Q0 1.78.89.89 1.782.001 3 0h9q0 2.625 1.734 4.313Q15.446 6 18 6q2.532 0 4.266-1.688Q24 2.626 24 0h9q1.22 0 2.11.89T36 3v38q0 1.22-.89 2.11T33 44H3q-1.22 0-2.11-.89Q.001 42.218 0 41z"}),n.createElement("mask",{id:"ticket-43554d__b",width:36,height:44,x:0,y:0,fill:"#fff",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox"},n.createElement("use",{xlinkHref:"#ticket-43554d__a"})))),l||(l=n.createElement("use",{xlinkHref:"#ticket-43554d__a",fill:"none",fillRule:"evenodd",stroke:"#1b115c",strokeWidth:6,mask:"url(#ticket-43554d__b)"})))}},40685:function(e,t,a){"use strict";a.r(t);var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:16,height:16,viewBox:"0 0 48 48"},e),i||(i=l.createElement("path",{d:"M23.6 6h-.2c-.6.1-1.1.7-1.1 1.4v3.1C13.2 11.1 6 17.4 6 26.6c0 0 2.6-2.7 6-2.7s6.2 2.7 6.2 2.7 2.1-2.7 5.5-2.7c3.5 0 5.5 2.7 5.5 2.7s2.8-2.7 6.2-2.7 6 2.7 6 2.7c0-9.2-7.2-15.5-16.4-16.1V7.4c0-.4-.1-.8-.4-1-.2-.3-.6-.4-1-.4m0 19.2h-.2c-.6.1-1.1.7-1.1 1.4v9.6c0 1.3-.4 1.8-.8 2.2-.5.4-1.2.6-1.9.6-.9 0-1.6-.3-2-.7s-.7-1-.7-2c0-.5-.3-1-.7-1.2s-1-.2-1.4 0c-.4.3-.7.7-.7 1.2 0 1.6.5 3 1.6 4 1 1 2.4 1.5 4 1.5 1.2 0 2.6-.3 3.7-1.2s1.9-2.4 1.9-4.3v-9.6c0-.4-.1-.8-.4-1-.5-.4-.9-.5-1.3-.5",className:"umbrella-b9d8b7__umbrella0"})))}},76696:function(e,t,a){"use strict";var i,l,n=a(44194);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return n.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:213,height:51,viewBox:"0 0 213 51"},e),i||(i=n.createElement("defs",null,n.createElement("filter",{id:"wylot-cfc689__b",width:"113.9%",height:"204.3%",x:"-7%",y:"-52.1%",filterUnits:"objectBoundingBox"},n.createElement("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1})),n.createElement("filter",{id:"wylot-cfc689__c",width:"113.9%",height:"204.3%",x:"-7%",y:"-52.1%",filterUnits:"objectBoundingBox"},n.createElement("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1})),n.createElement("linearGradient",{id:"wylot-cfc689__a",x1:"100%",x2:"8.975%",y1:"49.453%",y2:"50.892%"},n.createElement("stop",{offset:"0%",stopColor:"#F9F6ED"}),n.createElement("stop",{offset:"100%",stopColor:"#E4D4C0"})))),l||(l=n.createElement("g",{fill:"none",fillRule:"evenodd"},n.createElement("path",{fill:"#D42612",d:"M100.05 17.668h5.563l-1.668 11.7h3.894l5.009-11.698h5.256c1.514 0 2.754-.878 2.755-1.951s-1.24-1.95-2.755-1.948h-5.255l-5.009-11.7h-3.895l1.667 11.7h-5.563l-3.895-3.9-1.948 1.949 1.948 3.9-1.948 3.9 1.948 1.95z"}),n.createElement("g",{fill:"#D42612",transform:"translate(0 37)"},n.createElement("ellipse",{cx:7.028,cy:7,rx:7.028,ry:7}),n.createElement("ellipse",{cx:205.028,cy:7,rx:7.028,ry:7})),n.createElement("g",{strokeDasharray:"1 9",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4}
1,n.createElement("path",{stroke:"url(#wylot-cfc689__a)",d:"M74.72 11.541c-23.159 1.196-40.737 0-71.79 9.59",filter:"url(#wylot-cfc689__b)",opacity:.97,transform:"translate(16 15)"}),n.createElement("path",{stroke:"#D42612",d:"M87.79 15.541C64.633 16.737 38.85 21.947 16 36.711"})),n.createElement("g",{strokeDasharray:"1 9",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},n.createElement("path",{stroke:"url(#wylot-cfc689__a)",d:"M74.72 11.541c-23.159 1.196-40.737 0-71.79 9.59",filter:"url(#wylot-cfc689__c)",opacity:.97,transform:"matrix(-1 0 0 1 197 15)"}),n.createElement("path",{stroke:"#D42612",d:"M125.21 15.541c23.157 1.196 48.94 6.406 71.79 21.17"})))))}},94155:function(e,t,a){"use strict";var i,l=a(44194);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 98 98"},e),i||(i=l.createElement("path",{fill:"#D40E14",d:"M49 98C21.938 98 0 76.062 0 49S21.938 0 49 0s49 21.938 49 49-21.938 49-49 49m0-8c22.644 0 41-18.356 41-41S71.644 8 49 8 8 26.356 8 49s18.356 41 41 41m-5.559-31.943V22.778q0-.843.194-1.283.193-.44.58-.756.388-.352 1.372-.546T48.295 20q1.76 0 2.743.193.986.194 1.356.528.369.334.544.739t.177 1.213v35.384q0 .81-.141 1.214a1.63 1.63 0 0 1-.528.721q-.423.352-1.408.616-.983.263-2.743.263-1.723 0-2.708-.228-.985-.23-1.371-.581a2 2 0 0 1-.581-.756q-.195-.44-.194-1.25zM42 71.985q0-1.195.492-2.304a6.33 6.33 0 0 1 3.323-3.289 5.95 5.95 0 0 1 2.376-.492q1.23 0 2.391.475a6.5 6.5 0 0 1 2.04 1.32 6.9 6.9 0 0 1 1.425 1.952 5.2 5.2 0 0 1 .544 2.338q0 1.267-.528 2.357a6.4 6.4 0 0 1-1.388 1.9 6.7 6.7 0 0 1-1.988 1.284 6.1 6.1 0 0 1-2.392.474 6.2 6.2 0 0 1-2.409-.474 6.9 6.9 0 0 1-2.022-1.284 5.8 5.8 0 0 1-1.372-1.9A5.65 5.65 0 0 1 42 71.985"})))}},32970:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[abTestsToken]/checkout/reservation/[offerCode]/[pageType]",function(){return a(66585)}])},23343:function(e,t,a){"use strict";a.d(t,{Q:function(){return r}});var i=a(34022),l=a(32904),n=a(78261);function r(e){let t=(0,i.kG)("services/tui-dictionary/api/seasons"),a=[];for(let t of null!=e?e:[])if("string"==typeof t)a.push(t);else try{a.push((0,l.p6)(t,l.fK.yearMonthDayWithDashes))}catch(e){}t.searchParams.set("dates",a.join(","));let{data:r,isLoading:o}=(0,n.ZP)(a.length>0?t.toString():null);return{seasons:function(e){if(!Array.isArray(e))return;let t=new Set;for(let a of e)a.id&&a.active&&t.add(a.id);return Array.from(t).join(" | ")}(r),isLoading:o}}},96652:function(e,t,a){"use strict";a.d(t,{Z:function(){return I}});var i=a(31549),l=a(34435),n=a(86422),r=a(35937),o=a(87954),s=a(97500),d=a(14693),c=a(41598),u=a(92507),p=a(49527),m=a(61186),v=a(32824),h=a(97796),f=a(43285),g=a(10054),b=a(14895),x=a(25848),y=a(74922),_=a(61522),j=a(62310),w=a(3657),N=a(92430),C=a(44194),k=a(2052),S=a(7356),T=a(7862),P=a.n(T);let Z={upsell:P().shape(S.sw),variants:P().arrayOf(P().shape(S.Ne)),labels:P().shape(S.wE),selectedPlaneSeats:P().arrayOf(P().shape(S.gn)),isMobile:P().bool,hasSelectedVariant:P().bool,isInDialog:P().bool,onVariantButtonClick:P().func,renderButtonLabel:P().func,clearSelectedSeats:P().func};function L(e){var t,a,x,S;let{upsell:T,variants:P,labels:Z,hasSelectedVariant:L,onVariantButtonClick:I,renderButtonLabel:O,isInDialog:E=!1,selectedPlaneSeats:R,clearSelectedSeats:D}=e,[z,M]=(0,C.useState)(!1),[V,A]=(0,C.useState)(null),{query:B}=(0,N.useRouter)(),F=null==B?void 0:B.offerCode,{data:H}=(0,f.ft)(),{data:q}=(0,g.jK)(),{data:U}=(0,h.v)(null==q?void 0:null===(x=q._embedded)||void 0===x?void 0:null===(a=x.offer)||void 0===a?void 0:null===(t=a._links)||void 0===t?void 0:t.offerUrl.href),W=(0,g.QK)(),K=(0,b.En)(),G=(0,k.v9)(y.SV),X=(0,k.v9)(y.o5),Y=(0,w.PR)("cartId"),Q=(0,f.zs)(),$=null==H?void 0:null===(S=H._embedded)||void 0===S?void 0:S.guaranteeFund,J=(0,v.gz)();if(null==P||P.find(e=>e.selected&&!e.hidden),(0,j.Wt)(P))return null;async function ee(e){R.length>0?A(e):(E&&!e.selected&&"data"===J&&(0,_.Dt)("add_to_cart",q,Y,U,F,K,W,G,X,null==Q?void 0:Q.formattedPrice,$,null==T?void 0:T.type,null==T?void 0:T.groupType,null==e?void 0:e.upsellId),I({variant:e,upsell:T}))}function et(){z||A(null)}async function ea(){null!==V&&(M(!0),D(),await I({variant:V,upsell:T}),M(!1)),et()}return(0,i.jsxs)(s.Z,{type:T.type,isInDialog:E,children:[(0,i.jsx)(c.Z,{type:T.type,isInDialog:E,iconName:u.En[T.type],title:T.title,de
1scription:T.description}),(0,i.jsxs)(d.Z,{hasMultipleVariants:!0,children:[null==P?void 0:P.map(e=>{var t,a,n,r,o,s,d;let c="string"==typeof e.ribbon&&e.ribbon.length>0,u=e.status,v=e.selected||u===m.X.ordered,h=e.hidden,f=!L||T.isResignVariantSelected||c&&v,g=Z.departure;(null===(a=e._embedded)||void 0===a?void 0:null===(t=a.upsellOptions)||void 0===t?void 0:t.length)>1?e._embedded.upsellOptions.forEach((t,a)=>{a>0&&t.name===e._embedded.upsellOptions[a-1].name&&(g="".concat(Z.departure," + ").concat(Z.return))}):(null===(o=e._embedded)||void 0===o?void 0:null===(r=o.upsellOptions)||void 0===r?void 0:null===(n=r[0])||void 0===n?void 0:n.code)==="return"&&(g=Z.return);let b=null===(d=e._embedded)||void 0===d?void 0:null===(s=d.upsellOptions)||void 0===s?void 0:s[0].name,x="".concat(g).concat(b?" (".concat(b,")"):"");return!h&&(0,i.jsx)(p.Z,{type:T.type,notAvailableLabel:Z.notAvailable,status:u,isSelected:v,isLoading:e.isLoading,title:e.title,subtitle:x,features:e.options,callCenterLabel:e.ccMessage,buttonLabel:O({variant:e}),withBorderForRecommended:f,withoutRecommendedBackground:L,isRecommended:c,recommendedLabel:e.ribbon,price:e.formattedPrice,currency:(0,l.jK)(e.currency),requestedContact:T.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!0,onButtonClick:()=>ee(e)},e.code)}),E&&(0,i.jsx)(p.Z,{status:m.X.available,isSelected:!1,isOneOfMultipleVariants:!0,type:u.hc.resignHorizontal,title:Z.flightClass.resignVariantTitle,onButtonClick:()=>{I({upsell:T,isResignVariant:!0})}})]}),(0,i.jsx)(r.Z,{isOpen:null!==V,onClick:et,onClose:et,className:"upsell__dialog-wrapper upsell__dialog-wrapper--seats-already-selected",dialogTitle:Z.flightClass.seatsAlreadySelectedDialog.title,variant:o.od.withTitle,testId:"flight-class-change-prompt",children:(0,i.jsxs)("div",{className:"upsell__dialog",children:[(0,i.jsx)("p",{className:"upsell__dialog-description",children:Z.flightClass.seatsAlreadySelectedDialog.description}),(0,i.jsxs)("div",{className:"upsell__dialog-buttons-wrapper",children:[(0,i.jsx)(n.ZP,{variant:n.qh.outlinedBlue,disabled:z,className:"upsell__dialog-button upsell__dialog-button--half",onClick:et,children:Z.flightClass.seatsAlreadySelectedDialog.cancelButtonLabel}),(0,i.jsx)(n.ZP,{variant:n.qh.primary,disabled:z,isLoading:z,className:"upsell__dialog-button upsell__dialog-button--half",onClick:ea,testId:"flight-class-change-prompt-accept-button",children:Z.flightClass.seatsAlreadySelectedDialog.acceptButtonLabel})]})]})})]})}L.propTypes=Z;var I=(0,k.$j)(e=>({selectedPlaneSeats:(0,y.wd)(e)}),e=>({clearSelectedSeats:()=>e((0,x.NI)())}))(L)},55664:function(e,t,a){"use strict";var i=a(31549),l=a(33337),n=a(58967),r=a(60669),o=a(14986),s=a.n(o),d=a(86597);function c(e){let{perPageCount:t,onPerPageCountChange:a,currentPageIndex:o,setCurrentPageIndex:c,totalPagesCount:u,labels:p,isOfficesPage:m,componentOptions:v}=e,h="office-selection-pagination-select";return(0,i.jsx)("div",{className:"office-selection-pagination",children:(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)("div",{className:"col-12 col-md-3 order-md-first order-last",children:(0,i.jsxs)("div",{className:"office-selection-pagination__select-wrapper",children:[(0,i.jsx)("label",{htmlFor:h,className:"office-selection-pagination__select-mobile-label",children:(null==v?void 0:v["offices.results.nav.results"])||p.selectLabel}),(0,i.jsx)(l.Z,{id:h,value:t,label:(null==v?void 0:v["offices.results.nav.results"])||p.selectLabel,className:"office-selection-pagination__select",labelClassName:"office-selection-pagination__select-label",onChange:function(e){a(parseInt(e.currentTarget.value,10))},children:d.tK.map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]})}),(0,i.jsx)("div",{className:"col-12 col-md-9 order-md-last order-first",children:(0,i.jsx)("div",{className:"office-selection-pagination__wrapper",children:(0,i.jsx)(s(),{previousLabel:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.Z,{className:"office-selection-pagination__button-icon"}),(null==v?void 0:v["offices.results.nav.prev"])||p.previousPageLabel]}),nextLabel:(0,i.jsxs)(i.Fragment,{children:[(null==v?void 0:v["offices.results.nav.next"])||p.nextPageLabel,(0,i.jsx)(n.Z,{className:"office-selection-
1pagination__button-icon"})]}),pageCount:u,forcePage:o,onPageChange:e=>{let{selected:t}=e;return c(t)},pageRangeDisplayed:3,marginPagesDisplayed:1,containerClassName:"office-selection-pagination__container",pageClassName:"office-selection-pagination__page",previousClassName:"office-selection-pagination__button-wrapper office-selection-pagination__button-wrapper--prev",previousLinkClassName:(0,r.Z)("office-selection-pagination__button",{"office-selection-pagination__button-offices-results":m,"office-selection-pagination__button-end":m&&0===o}),nextClassName:"office-selection-pagination__button-wrapper office-selection-pagination__button-wrapper--next",nextLinkClassName:(0,r.Z)("office-selection-pagination__button",{"office-selection-pagination__button-offices-results":m,"office-selection-pagination__button-end":m&&o===u-1}),breakClassName:"office-selection-pagination__break",disableInitialCallback:!0})})})]})})}c.propTypes=d.XE,c.defaultProps=d.iD,t.Z=c},86597:function(e,t,a){"use strict";a.d(t,{EA:function(){return d},G7:function(){return s},XE:function(){return c},iD:function(){return u},tK:function(){return n}});var i=a(7862),l=a.n(i);let n=[3,5,10,20],r=l().shape({selectLabel:l().string,previousPageLabel:l().string,nextPageLabel:l().string}),o={selectLabel:"Wyniki na stronie",previousPageLabel:"Poprzednia",nextPageLabel:"Następna"},s={offices:l().arrayOf(l().shape({code:l().string,name:l().string,address:l().string,region:l().string,city:l().string,phone:l().string,fax:l().string,email:l().string,latitude:l().string,longitude:l().string,workingDays:l().arrayOf(l().shape({day:l().number,open:l().string,close:l().string}))})),selectedOffice:l().string,labels:l().shape({select:l().shape({common:l().shape({placeholder:l().string}),voivodeship:l().shape({label:l().string})}),map:l().shape({openHours:l().string,openHoursUnavailable:l().string,selectButtonLabel:l().string,deselectButtonLabel:l().string,selectedLabel:l().string,mobilePlaceholderButtonLabel:l().string}),item:l().shape({openHours:l().string,openHoursUnavailable:l().string,selectButtonLabel:l().string,deselectButtonLabel:l().string,selectedLabel:l().string}),pagination:r,noOfficesMessage:l().string}),isMobile:l().bool,onOfficeSelect:l().func},d={labels:{select:{common:{placeholder:"wszystkie"},voivodeship:{label:"Wojew\xf3dztwo"},city:{label:"Miejscowość"},availability:{label:"Dostępność",openNow:"Otwarte teraz"}},map:{openHours:"Otwarte",openHoursUnavailable:"b.d. - b.d.",selectButtonLabel:"Wybierz",deselectButtonLabel:"Usuń wyb\xf3r",selectedLabel:"Wybrano",mobilePlaceholderButtonLabel:"Wybierz biuro na mapie"},item:{openHours:"Godziny otwarcia",openHoursUnavailable:"b.d. - b.d.",selectButtonLabel:"Wybierz",deselectButtonLabel:"Usuń wyb\xf3r",selectedLabel:"Wybrano"},pagination:o,noOfficesMessage:"Brak biur o wybranych kryteriach. Zmień kryteria wyszukiwania."}},c={perPageCount:l().number,totalPagesCount:l().number,labels:r,onPerPageCountChange:l().func,setCurrentPageIndex:l().func,isOfficesPage:l().bool},u={labels:o,isOfficesPage:!1}},49660:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var i=a(31549);function l(e){let{title:t,children:a,variant:l="default"}=e;return(0,i.jsxs)("div",{className:"participants-table","data-testid":"participants-table","data-component":"ParticipantsTable",children:[(0,i.jsx)("div",{className:"participants-table__header",children:(0,i.jsx)("div",{className:"participants-table__title",children:t})}),(0,i.jsx)("div",{className:"participants-table__body participants-table__body--".concat(l),children:a})]})}},28222:function(e,t,a){"use strict";a.d(t,{EQ:function(){return u},Hb:function(){return s},Hy:function(){return d},R_:function(){return c},Tv:function(){return p}});var i=a(7862),l=a.n(i);let n=l().shape({formattedPrice:l().string,paymentDate:l().string,code:l().string,selected:l().bool,advanced:l().bool,advancePaymentAmount:l().string,remainingAmount:l().string,advancePaymentPercentage:l().string,label:l().string,description:l().string}),r=l().shape({selected:l().bool,iconUrl:l().string,code:l().string,name:l().string,displayPosition:l().number}),o=l().shape({selected:l().bool,hidden:l().bool,type:l().string,name:l().string,title:l().string,availablePaymentVariants:l().arrayOf(l().string),description:l().string,confirmationLabel:l().string,confirmationCode:l().string,_embedded:l().shape({paymentChannelOptions:l().arrayOf(r)})});l().shape({code:l().string,name:l().string,address:l().string,region:l().string,city:l().string,phone:l().string,fax:l().string,email:l().string,latitude:l().string,longitude:l().string,workingDays:l().arrayOf(l().shape({day:l().number,open:l().string,close:l().string}))});let s={data:l().shape({paymentVariants:l().arrayOf(n),paymentChannels:l().arrayOf(o)}),paymentMethodDescriptions:l().objectOf(l().string),labels:l().shape({variantHeading:l().string,methodHeading:l().string,currency:l().string,
1sofort:l().shape({readMoreButton:l().string,dialog:l().shape({title:l().string,intro:l().string,sections:l().arrayOf(l().shape({title:l().string,description:l().string,logos:l().string}))})}),payu:l().shape({chooseBankLabel:l().string})}),isMobile:l().bool,onVariantSelect:l().func,onChannelSelect:l().func,onChannelOptionSelect:l().func,onOfficeSelect:l().func},d={paymentMethodDescriptions:{},labels:{variantHeading:"Wariant płatności",methodHeading:"Metoda płatności",currency:"Kč",sofort:{readMoreButton:"Czytaj więcej",dialog:{title:"Rekomendowana forma płatności",intro:"Przedstawiamy nowy spos\xf3b płatności przelewem elektronicznym. Zobacz, dlaczego warto płacić z&nbsp;Klarna. To proste&nbsp;i bezpieczne!",sections:[{title:"Bez dodatkowej rejestracji",description:"Nie musisz rejestrować się do zewnętrznego systemu. Klarna umożliwia logowanie bezpośrednio do Twojego banku.",logos:["bank-pkobp","bank-ing","bank-mbank","bank-wbk","bank-pekao","bank-millenium","bank-alior","bank-agricole","bank-citi","bank-inteligo","bank-raiffeisen","bank-eurobank","bank-getin","bank-bph","bank-bnp","bank-deutsche"]},{title:"Bezpieczeństwo",description:"Poufne dane, takie jak dane logowania do bankowości internetowej, jak i jednorazowy kod weryfikacyjny nie są zapisywane, jak r\xf3wnież w żadnym momencie nie są udostępniane pracownikom firmy Klarna Bank AB, ani osobom trzecim."},{title:"Szybkość płatności",description:"Klarna umożliwia bezpośrednią i wiążącą płatność. Szybciej niż przy płatności z g\xf3ry przelewem bankowym."},{title:"Gwarancja TUI",description:"Zaufany partner TUI w realizowaniu przelew\xf3w elektronicznych."},{title:"Potwierdzone zaufanie",description:"O wiarygodności płatności Klarna świadczą liczne certyfikaty.",logos:["cert0","cert2","cert3","cert4"]}]}},payu:{chooseBankLabel:"Wybierz sw\xf3j bank:"}}},c={data:n,currency:l().string,onSelect:l().func},u={currency:"Kč"},p={transferTraditional:"transferTraditional",sofort:"sofort",creditcard:"creditcard",electronicFundsTransfer:"electronicFundsTransfer",payAtTuiOffice:"payAtTuiOffice",installments:"installments",installmentsCZ:"installmentsCZ",p24:"p24",p24CreditCard:"p24-creditcard",payuBlik:"payu-blik",imoje:"imoje",imojeBlik:"imoje-blik",imojeCreditCard:"imoje-creditcard",imojeWallet:"imoje-wallet"}},10824:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});let i=(0,a(44194).createContext)({paymentData:void 0,setPaymentData:()=>{}})},24469:function(e,t,a){"use strict";function i(e){return function(t){return!(t&&Array.isArray(t.priceRestrictions))||0===t.priceRestrictions.length||t.priceRestrictions.every(t=>{var a,i;if(void 0===e)return!0;let l=parseInt(e,10);if(Number.isNaN(l))return!0;let n=null!==(a=t.from)&&void 0!==a?a:0,r=null!==(i=t.to)&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return l>=n&&l<=r})}}a.d(t,{t:function(){return i}})},18981:function(e,t,a){"use strict";a.d(t,{Z:function(){return B}});var i=a(31549),l=a(3657),n=a(92430),r=a(44194),o=a(62716),s=a(2052),d=a(60826),c=a(54737),u=a(34435),p=a(5715),m=a(86422),v=a(35937),h=a(87954),f=a(69424),g=a(92945),b=a(97500),x=a(92507),y=a(7862),_=a.n(y);let j={optimal:"optimal",suboptimal:"suboptimal"};_().oneOf(Object.values(x.hc)),_().bool,_().bool,_().bool,_().bool,_().bool,_().bool;var w=a(93789),N=a(9989),C=a(24076),k=a(57664),S=a(61186),T=a(32824),P=a(97796),Z=a(43285),L=a(10054),I=a(14895),O=a(25848),E=a(74922),R=a(61522),D=a(62310),z=a(7356);let M={upsell:_().shape(z.sw),labels:_().shape(z.wE),variants:_().arrayOf(_().shape(z.Ne)),isMobile:_().bool,hasSelectedVariant:_().bool,onVariantButtonClick:_().func,renderButtonLabel:_().func,selectedPlaneSeats:_().arrayOf(_().shape(z.gn)),flightClassUpsell:_().shape(z.sw),updateFlightClassAvailability:_().func,updateSeatMap:_().func,showFlightClassDialog:_().func,isFlightClassDialogOpen:_().bool,selectedFlightClass:_().oneOf(Object.values(p.f$)),seatMapResourceList:_().arrayOf(_().shape(z.G7)),tabData:_().shape(z.G7),participants:_().arrayOf(_().shape(z.VQ)),selectedSeats:_().arrayOf(_().shape(z.gn)),forceOpenPlaneSeatDialog:_().bool,forceOpenPlaneSeatDialogSource:_().string,
1setForceOpenPlaneSeatDialog:_().func,onSeatClick:_().func,onSubmit:_().func,onShowSelectedSeatsClick:_().func};function V(e){let{description:t,onClick:a}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:t}}),(0,i.jsx)("button",{className:"hidden cursor-pointer appearance-none border-none bg-transparent p-0 font-bold underline outline-none",onClick:a,children:"Zobacz mapę samolotu i sprawdź dostępność miejsc"})]})}function A(e){var t,a,y,_,z,M,A,B;let{upsell:F,labels:H,variants:q,hasSelectedVariant:U,onVariantButtonClick:W,renderButtonLabel:K,flightClassUpsell:G,updateFlightClassAvailability:X,updateSeatMap:Y,showFlightClassDialog:Q,isFlightClassDialogOpen:$=!1,selectedFlightClass:J,seatMapResourceList:ee,selectedSeats:et,hasError:ea,forceOpenPlaneSeatDialog:ei,forceOpenPlaneSeatDialogSource:el,setForceOpenPlaneSeatDialog:en,onSeatClick:er,onSubmit:eo,onShowSelectedSeatsClick:es,clearSelectedSeats:ed}=e,ec=(0,d.xi)(),eu=(0,I.z$)("RMWS_STEP"),ep=(0,o.VY)(),[em,ev]=(0,r.useState)(!1),[eh,ef]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(!1),[ex,ey]=(0,r.useState)(!1),[e_,ej]=(0,r.useState)("box"),[ew,eN]=(0,r.useState)("box"),[eC,ek]=(0,r.useState)(!1),[eS,eT]=(0,r.useState)(!1),eP=(0,L.Lo)(),eZ=(0,s.v9)((0,E.E9)(eP)),{data:eL,mutate:eI}=(0,Z.ft)();(0,c.TA)();let eO=(0,u.jK)(null!==(M=null==ee?void 0:null===(t=ee[0])||void 0===t?void 0:t.currency)&&void 0!==M?M:null==eP?void 0:eP.currency),eE=(0,s.I0)(),eR=(0,L.Oe)(),{query:eD}=(0,n.useRouter)(),ez=null==eD?void 0:eD.offerCode,{data:eM}=(0,L.jK)(),{data:eV}=(0,P.v)(null==eM?void 0:null===(_=eM._embedded)||void 0===_?void 0:null===(y=_.offer)||void 0===y?void 0:null===(a=y._links)||void 0===a?void 0:a.offerUrl.href),eA=(0,L.QK)(),eB=(0,I.En)(),eF=(0,s.v9)(E.SV),eH=(0,s.v9)(E.o5),eq=(0,l.PR)("cartId"),eU=(0,Z.zs)(),eW=null==eL?void 0:null===(z=eL._embedded)||void 0===z?void 0:z.guaranteeFund,eK=(0,T.gz)();if((0,r.useEffect)(()=>{ex&&!$&&(void 0!==G._embedded.upsellVariants.find(e=>e.selected)||eY)&&(e4(e_),ey(!1))},[G,ex,$,e_]),(0,r.useEffect)(()=>{ei&&(eE((0,O.D9)(!0)),e3(null!=el?el:"box"),en(!1))},[ei,el,e3,en]),(0,D.Wt)(q))return null;let eG=eR.filter(e=>"INFANT"!==e.type).length,eX=null!==ee&&ee.length===et.length&&et.every(e=>e.places.length===eG),eY=null==G?void 0:G.isResignVariantSelected,eQ=(0,D.Ko)(et,ee);function e$(){ek(!1),eT(!1)}async function eJ(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null!==(A=null!=ew?ew:e_)&&void 0!==A?A:"box";ev(!0),await W({upsell:F,variant:q[0],clickSource:t}),e&&ev(!1)}async function e0(){ev(!0),await W({upsell:F,isResignVariant:!0,clickSource:null!=ew?ew:"box"}),ev(!1)}async function e1(){em||(eY&&W({upsell:F,isResignVariant:!0,clickSource:null!=ew?ew:"box"}),ef(!1),eg?eb(!1):await eJ(),eE((0,O.D9)(!1)))}function e2(){return new Promise((e,t)=>{if(eQ.length>0&&!eS){ek(!0),e({evacuationDisclaimerPopup:!0});return}e$(),ev(!0),eo(et,eS).then(t=>{if("SUCCESS"===t.status){var a,i,l;let e=null==t?void 0:null===(a=t.updatedUpsells)||void 0===a?void 0:a.find(e=>"PLANE_SEATS_RESERVATION"===e.type),n=null==e?void 0:null===(l=e._embedded)||void 0===l?void 0:null===(i=l.upsellVariants)||void 0===i?void 0:i[0];"data"===eK&&(0,R.Dt)("add_to_cart",eM,eq,eV,ez,eB,eA,eF,(null==t?void 0:t.updatedUpsells)||eH,null==eU?void 0:eU.formattedPrice,eW,null==e?void 0:e.type,null==e?void 0:e.groupType,null==n?void 0:n.upsellId),eI(),ev(!1),ef(!1),eE((0,O.D9)(!1))}e(t)}).catch(()=>{eJ(),ep.error(H.errorTogglingVariant),t()})})}async function e4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e_,t="string"==typeof e?e:"box";q[0].status===S.X.notAvailable||q[0].selected&&eX||(await X(),await eJ(!1,t),await Y(),ev(!1),eN(t),ef(!0),eE((0,O.D9)(!0)))}async function e3(){var e,t;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"box",i="string"==typeof a?a:"box";if(q[0].isLoading)return;ej(i);let l=(0,D.Wt)(null==G?void 0:G._embedded.upsellVariants),n=(null==G?void 0:G.isResignVariantSelected)===!0||(null==G?void 0:null===(t=G._embedded)||void 0===t?void 0:null===(e=t.upsellVariants)||void 0===e?void 0:e.some(e=>!1===e.hidden&&e.selected));void 0===G||l||n?await e4(i):(Q(),ey(!0))}async function e5(){if(!F.isResignVariantSelected){let e;eb(!0);try{e=await es()}catch(e){ep.error(p.hF)}e&&(eN("box"),ef(!0),eE((0,O.D9)(!0)))}}function e6(){let{callToAction:e,text:t,title:a}=F[F.isResignVariantSelected?"discouragingText":"recommendingText"];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:(0,i.jsx)("b",{children:a})}),(0,i.jsx)("p",{children:t}),(0,i.jsx)("p",{children:F.isResignVariantSelected?(0,i.jsx)("b",{children:e}):(0,i.jsx)(m.ZP,{className:"upsell-footer__button",variant:m.qh.link,iconName:"arrow",onClick:e5,testId:"plane-seats-reservation-preview-button",children:e})})]})}let e8=void 0!==q,e9=e8&&!q[0].hidden,e7=e8&&q[0].status===S.X.notAvailable,te=e8&&q[0].status,tt=e8&&(q[0].selected&&et.length>0||te===S.X.ordered),ta=F.isResignVariantSelected||!tt,ti=F.isResignVariantSelected?j.suboptimal:j.optimal;return eX||F.isResignVariantSelected||(ti=void 0),e9&&(0,i.jsxs)(b.Z,{type:F.type,isHorizontal:e7,hasError:ea,validationMessage:H.notSelectedWarning,orderedMessage:H.orderedMessage,children:[(0,i.jsx)(C.Z,{isHorizontal:e7,type:F.type,iconName:x.En[F.type],title:F.title,de
1scription:(0,i.jsx)(V,{description:F.description,onClick:e3}),features:e7?null==q?void 0:q[0].options:null}),(0,i.jsxs)(w.Z,{hasMultipleVariants:!e7,isHorizontal:e7,children:[e7&&(0,i.jsx)(k.Z,{headerHasIcon:!0,type:F.type,notAvailableLabel:H.notAvailable,status:S.X.notAvailable}),!e7&&e9&&(0,i.jsx)(k.Z,{type:F.type,status:te,isSelected:tt,disabled:em,isLoading:em,callCenterLabel:q[0].ccMessage,title:q[0].recommendedText||q[0].title,features:q[0].options,buttonLabel:K({variant:q[0],upsell:F,selectionCondition:tt}),withBorderForRecommended:ta,withoutRecommendedBackground:U,isRecommended:!0,recommendedLabel:H.recommended,price:q[0].formattedPrice,currency:(0,u.jK)(q[0].currency),requestedContact:F.requestedContact,pricePrefixLabel:tt?void 0:H.pricePrefixLabel,headerHasIcon:!0,isOneOfMultipleVariants:!0,onButtonClick:e3}),!e7&&(0,i.jsx)(k.Z,{status:F.isResignVariantSelected?S.X.selected:S.X.available,disabled:em,isSelected:F.isResignVariantSelected,isOneOfMultipleVariants:!0,callCenterLabel:q[0].ccMessage,type:x.hc.resign,title:F.disadvantagesHeader,features:F.disadvantages,priceIncludedLabel:H.inPrice,headerHasIcon:!0,buttonLabel:K({variant:{type:x.hc.resign,selected:F.isResignVariantSelected},upsell:F,selectionCondition:F.isResignVariantSelected}),onButtonClick:e0})]}),(0,i.jsx)(N.Z,{selectedVariantGrade:ti,optimalVariantMessage:e6(),suboptimalVariantMessage:e6()}),(0,i.jsx)(v.Z,{isOpen:eh,onClick:e1,onClose:e1,className:"plane-seats-reservation-wrapper",dialogTitle:H.planeSeatsReservation.dialogTitle,variant:h.od.withTitle,testId:"plane-seats-reservation-popup",children:(0,i.jsx)(g.Z,{variant:"A"===ec?"classic":"modern",showRecommended:"C"===ec,recommendedLabel:null==eu?void 0:eu.recommended_seat_label,recommendedNotice:null==eu?void 0:eu.recommended_seats_notice,priceHint:null==eu?void 0:eu.cta_submit_disclaimer,totalPriceLabel:null!==(B=null==eu?void 0:eu.total_price_label)&&void 0!==B?B:"razem",flightClass:J,seatMapResourceList:ee,tabData:eZ,labels:H.planeSeatsReservation,isPreviewMode:eg,participants:eR,selectedSeats:et,onSeatClick:er,onSubmit:e2,closeDialog:e1,clearSelectedSeats:ed,updateSeatMap:Y,currency:eO})}),(0,i.jsx)(f.Z,{isOpen:eC,selectedEvacuationSeats:eQ,evacuationSeatsConfirmed:eS,onConfirm:eT,onSubmit:e2,onReset:function(){e$(),eE(ed())},onClose:e$})]})}A.propTypes=M;var B=(0,s.$j)(e=>({flightClassUpsell:(0,E.WJ)(e,x.hc.flightClass),flightClassAvailability:(0,E.D$)(e),selectedFlightClass:(0,E.wW)(e),seatMapResourceList:(0,E.r3)(e),selectedSeats:(0,E.wd)(e),forceOpenPlaneSeatDialog:(0,E.dX)(e),forceOpenPlaneSeatDialogSource:(0,E.PJ)(e)}),e=>({updateFlightClassAvailability:()=>e((0,O.Yt)()),updateSeatMap:()=>e((0,O.l4)()),clearSelectedSeats:()=>e((0,O.NI)()),onSeatClick:t=>{let{code:a,price:i,flightType:l}=t;return e((0,O.IS)({code:a,price:i,flightType:l}))},onSubmit:(t,a)=>e((0,O.mH)(t,a)),onShowSelectedSeatsClick:()=>e((0,O.d7)()),setForceOpenPlaneSeatDialog:(t,a)=>e((0,O.yU)(t,a))}))(A)},3646:function(e,t,a){"use strict";a.d(t,{Z:function(){return ev}});var i=a(31549),l=a(20678),n=a(19734),r=a(3657),o=a(60669),s=a(63909),d=a.n(s),c=a(92430),u=a(44194),p=a(62716),m=a(2052),v=a(54737),h=a(5715),f=a(54979),g=a(95870),b=a(97500),x=a(14693),y=a(41598),_=a(92507),j=a(8723),w=a(10054),N=a(4063),C=a(16481),k=a(74922),S=a(20852),T=a(11811),P=a(8429),Z=(0,m.$j)(e=>({selectedTrips:(0,k.SV)(e)}),e=>({setSelectedTrips:t=>e((0,C.b)(t))}))(function(e){let{upsell:t,labels:a,selectedTrips:l,setSelectedTrips:r,onTripShowDetails:o,onTripVisibilityChange:s}=e,d=(0,S.p)(),[m,v]=(0,u.useState)(null),C=(0,p.VY)(),k=(0,c.useRouter)(),{mutate:Z}=(0,P.kY)(),{offerCode:L}=k.query,{data:I}=(0,N.Di)(L),O=(0,w.Lo)(),E=null==O?void 0:O._embedded.participants,{mutate:R}=(0,j.q)(),D=Array.isArray(E)?{adults:E.filter(e=>"ADULT"===e.type).length,children:E.filter(e=>"CHILD"===e.type).length,infants:E.filter(e=>"INFANT"===e.type).length}:void 0,z=(0,u.useCallback)(e=>{let{payload:t,name:a,uuid:i}=e;return async function(){v(i);try{return await d("".concat(h.config.urls.checkout.facultativeTrips.upsell,"/").concat(i),{method:"PUT",body:JSON.stringify(t),appendCartId:!0,onSuccess(e){var i;let{headers:l}=e,r={tripName:a,tripAvailable:!0,tripPricePerPerson:t.products[0].price,tripPrice:t.price,tripDate:t.day,tripHour:t.time,tripLanguage:t.language,tripParticipants:null==O?void 0:O.participantsDescription,tripDiscountedPrice:t.discountedPrice,tripDiscountedPricePerPerson:null==t?void 0:null===(i=t.products[0])||void 0===i?void 0:i.discountedPrice};(0,n.yf)({event:"facultativeTripAdded",facultativeTripAdded:r,tui_web:l.get("x-server")})}}),v(null),!0}catch(e){return T.Z.error(e),C.error(h.hF),v(null),!1}}()},[C,O,d]),M=(0,u.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return async function(){v(e);try{return await d("".concat(h.config.urls.checkout.facultativeTrips.upsell,"/").concat(e),{method:"DELETE",appendCartId:!0,onSuccess(a){let{headers:i}=a,r=l.find(t=>t.uuid===e),o={tripName:r.name,tripAvailable:!0,price:r.price,tripPricePerPerson:r.products[0].price,tripDiscountedPrice:r.discountedPrice,tripDiscountedPricePerPerson:r.products[0].discountedPrice,clicked:t?"popup":"box"};(0,n.yf)({event:"facultativeTripRemoved",facultativeTripRemoved:o,tui_web:i.get("x-server")})}}),v(null),!0}catch(e){return T.Z.error(e),C.error(h.hF),v(null),!1}}()},[C,d,l]);async function V(e){let{uuid:t,name:a,group:i,...n}=e;n.featureCode=i;let o=!1;if(0===l.length)(o=await z({payload:n,name:a,uuid:t}))&&r([e]);else{let i=l.filter(e=>e.uuid!==t);if(i.length!==l.length&&!await M(t))return;(o=await z({payload:n,name:a,uuid:t}))&&r([...i,e])}o&&(Z(h.config.urls.checkout.reservation.price),R())}async function A(e,t){let a=l.filter(t=>t.uuid!==e);await M(e,t)&&(r(a),await Z(h.config.urls.checkout.reservation.price),R())}return 0===(Array.isArray(null==I?void 0:I.trips)?I.trips.length:0)?null:(0,i.jsxs)(b.Z,{withCarousel:!0,type:t.type,children:[(0,i.jsx)(y.Z,{iconName:_.En[t.type],type:t.type,title:t.title,de
1scription:null==I?void 0:I.cartInfoHeader}),(0,i.jsxs)(x.Z,{noHorizontalPadding:!0,type:t.type,children:[(0,i.jsx)("div",{className:"w-full min-w-0 px-2 md:px-0",children:(0,i.jsx)(f.Z,{trips:null==I?void 0:I.trips,offerCode:L,labels:a,selectedTrips:l,onTripRemove:A,onTripSelect:V,onTripShowDetails:o,onTripVisibilityChange:s,tripUuidPendingChange:m,participantsDescription:null==O?void 0:O.participantsDescription,participantsCounts:D,priceDescription:null==I?void 0:I.priceDescription,breakpoints:{0:{slidesPerView:1},576:{slidesPerView:2},768:{slidesPerView:3},992:{slidesPerView:2},1200:{slidesPerView:3}}})}),(0,i.jsx)(g.Z,{isLoading:!I.trips})]})]})}),L=a(96652),I=a(18981),O=a(35937),E=a(87954),R=a(38880),D=a(34435),z=a(93789),M=a(24076),V=a(57664),A=a(61186),B=a(2861);function F(e){var t;let{upsell:a,variants:l,hasSelectedVariant:n,labels:r,renderButtonLabel:o,onVariantButtonClick:s,hasError:d,status:c}=e,u=(0,B.L)(),p=null!==(t=null==u?void 0:u.startsWith("mytui"))&&void 0!==t&&t,m=null==l?void 0:l.filter(e=>!e.hidden),v=null==m?void 0:m.some(e=>e.selected||e.status===A.X.ordered),h=null==m?void 0:m.some(e=>e.status===A.X.ordered);return(0,i.jsxs)(b.Z,{type:a.type,hasError:d,status:c,isSelected:v,children:[(0,i.jsx)(M.Z,{type:a.type,iconName:_.En[a.type],title:a.title,description:a.description,isSelected:v,isOrdered:h}),(0,i.jsxs)(z.Z,{status:c,hasMultipleVariants:void 0!==m&&m.length>1,children:[null==l?void 0:l.map(e=>{var t,l;let d=e.status,c=e.selected||d===A.X.ordered,u=e.hidden;return!e.hidden&&(0,i.jsx)(V.Z,{type:a.type,status:d,isSelected:c,isHidden:u,isLoading:e.isLoading,callCenterLabel:e.ccMessage,title:null!==(t=e.recommendedText)&&void 0!==t?t:e.title,features:e.options,buttonLabel:o({upsell:a,variant:e}),price:null!==(l=e.formattedPrice)&&void 0!==l?l:e.price,currency:(0,D.jK)(e.currency),requestedContact:a.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!p,withBorderForRecommended:!0,withoutRecommendedBackground:n,isRecommended:!p,recommendedLabel:r.recommended,onButtonClick:()=>{s({variant:e,upsell:a})}},e.code)}),!p&&"checkoutPaymentSuccess"!==u&&(0,i.jsx)(V.Z,{status:a.isResignVariantSelected?"selected":"available",isSelected:a.isResignVariantSelected,isOneOfMultipleVariants:!0,type:"RESIGN",title:a.resignationHeader,features:"string"==typeof a.resignationDescription?[a.resignationDescription]:void 0,forceFeaturesAsList:!0,headerHasIcon:!0,buttonLabel:o({variant:{selected:a.isResignVariantSelected},upsell:a,selectionCondition:a.isResignVariantSelected}),onButtonClick:()=>{s({upsell:a,isResignVariant:!0})}})]})]})}var H=a(17743),q=a(51403),U=a(96663),W=a(8646),K=a(87878),G=a(97935),X=a(41672),Y=a(92012),Q=a(49527);function $(e){var t;let{upsell:a,variants:l,onVariantButtonClick:n,renderButtonLabel:r,status:o}=e,s=null==l?void 0:l.find(e=>!e.hidden),d=void 0!==s,c=null==s?void 0:s.status,u=(null==s?void 0:s.selected)||c===A.X.ordered;return(0,i.jsxs)(b.Z,{type:a.type,isSelected:u,status:o,isHorizontal:!0,children:[(0,i.jsx)(y.Z,{isHorizontal:!0,type:a.type,iconUrl:a.iconUrl,title:a.title,description:a.description,isSelected:u,isOrdered:"ordered"===c}),(0,i.jsx)(x.Z,{status:o,isHorizontal:!0,children:(0,i.jsx)(Q.Z,{headerHasIcon:!0,type:a.type,status:c,isSelected:u,isHidden:!d,callCenterLabel:null==s?void 0:s.ccMessage,isLoading:null==s?void 0:s.isLoading,buttonLabel:r({variant:s,upsell:a}),price:null!==(t=null==s?void 0:s.formattedPrice)&&void 0!==t?t:null==s?void 0:s.price,currency:(0,D.jK)(null==s?void 0:s.currency),requestedContact:a.requestedContact,onButtonClick:()=>{d&&n({variant:s,upsell:a})}})})]})}var J=a(13282),ee=a(48221),et=a(9989);function ea(e){var t;let{upsell:a,variants:l,labels:n,renderButtonLabel:r,onVariantButtonClick:o,hasError:s,attachments:d,isResignVariantVisible:c,status:u}=e,{isTablet:p,isDesktop:m}=(0,ee.h)(),v=null==l?void 0:l.filter(e=>!e.hidden),h=null==v?void 0:v.some(e=>e.selected||e.status===A.X.ordered),f=null==v?void 0:v.some(e=>"ordered"===e.status),g=null==v?void 0:null===(t=v.find(e=>"string"==typeof e.ribbon&&e.ribbon.length>0))||void 0===t?void 0:t.ribbon;return(0,i.jsxs)(b.Z,{type:a.type,hasError:s,status:u,isSelected:h,validationMessage:n.notSelectedWarning,orderedMessage:n.orderedMessage,children:[g&&(0,i.jsx)(J.Z,{type:"GREEN",className:"upsell__ribbon upsell__ribbon--price-guarantee",name:g,testId:"upsell-ribbon"}),(0,i.jsxs)("div",{className:"flex flex-col md:m-4 md:flex-row md:justify-between md:rounded-md md:border md:border-solid md:border-gray-altoLight md:py-4","data-component":"PriceGuarantee",children:[(0,i.jsx)(M.Z,{type:a.type,iconName:_.En[a.type],title:a.title,de
1scription:a.description,isSelected:h,isOrdered:f}),(0,i.jsx)(z.Z,{status:u,hasMultipleVariants:!p&&!m,children:null==l?void 0:l.map(e=>{var t;let l=e.status,n=e.selected||l===A.X.ordered,s=e.hidden;return!e.hidden&&(0,i.jsx)(V.Z,{headerHasIcon:!0,type:a.type,status:l,isSelected:n,isHidden:s,isOneOfMultipleVariants:!p&&!m,title:p||m?void 0:e.title,isLoading:e.isLoading,buttonLabel:r({upsell:a,variant:e}),price:null!==(t=e.formattedPrice)&&void 0!==t?t:e.price,currency:(0,D.jK)(e.currency),requestedContact:a.requestedContact,onButtonClick:()=>{o({variant:e,upsell:a})}},e.code)})})]}),c&&(0,i.jsx)("div",{className:"md:px-4",children:(0,i.jsx)(V.Z,{status:a.isResignVariantSelected?"selected":"available",isSelected:a.isResignVariantSelected,isOneOfMultipleVariants:!0,type:"RESIGN_HORIZONTAL_PRICE_GUARANTEE",title:n.priceGuarantee.notRecommendedLabel,description:n.priceGuarantee.notRecommendedText,headerHasIcon:!0,onButtonClick:()=>{o({upsell:a,isResignVariant:!0})}})}),(0,i.jsx)(et.Z,{attachments:d})]})}var ei=a(86994),el=a(26881),en=a(32824),er=a(97796),eo=a(43285),es=a(14895),ed=a(61522),ec=a(69152),eu=a(2054),ep=a(98629),em=a(69818);function ev(e){var t,a,s,f,g,b,x;let{upsells:y,labels:j,shouldShowValidation:C,toggleSelection:S,offerType:T,occupancies:P}=e,{query:D}=(0,c.useRouter)(),[z,M]=(0,u.useState)(!1),V=(0,en.gz)(),B=(0,es.En)(),Q=(0,p.VY)(),J=(0,v.TA)(),ee=(0,v.lg)(),{data:et}=(0,eo.ft)(),{data:ev}=(0,w.jK)(),{data:eh}=(0,er.v)(null==ev?void 0:null===(s=ev._embedded)||void 0===s?void 0:null===(a=s.offer)||void 0===a?void 0:null===(t=a._links)||void 0===t?void 0:t.offerUrl.href),ef=(0,w.QK)(),eg=(0,m.v9)(k.SV),eb=(0,m.v9)(k.o5),ex=(0,r.PR)("cartId"),[ey,e_]=(0,u.useState)(),ej=(0,eo.zs)(),ew=null==D?void 0:D.offerCode,eN=T===h.config.checkoutOfferTypes.charter,eC=T===h.config.checkoutOfferTypes.byPlane,ek=[_.hc.transfer,_.hc.digitalCare,_.hc.airportSecurityTax],eS=null==et?void 0:null===(f=et._embedded)||void 0===f?void 0:f.guaranteeFund,{data:eT}=(0,el.z)(),eP=null==y?void 0:y.some(e=>e.type===_.hc.facultativeTrips),{data:eZ}=(0,N.Di)(ew,!eP),eL=(0,u.useRef)(new Map),eI=(0,u.useRef)(new Set);(0,u.useEffect)(()=>{let e=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let i=e.target.getAttribute("data-upsell-key");if(i&&!eI.current.has(i)){eI.current.add(i);let e=null==y?void 0:y.find(e=>{var t;return"".concat(e.type,"-").concat(e.groupType,"-").concat(null!==(t=e.roomIndex)&&void 0!==t?t:0)===i});if(e&&e.type!==_.hc.facultativeTrips){var t,a;let i=null===(a=e._embedded)||void 0===a?void 0:null===(t=a.upsellVariants)||void 0===t?void 0:t.filter(e=>!e.hidden&&e.status===A.X.available);null==i||i.forEach(t=>{(0,ed.Us)("view_item",ev,ex,eh,ew,B,ey,eg,eb,null==ej?void 0:ej.formattedPrice,void 0,eS,void 0,void 0,e.type,e.groupType,t.upsellId)})}}}})},{threshold:.1});return eL.current.forEach(t=>{t&&e.observe(t)}),()=>{e.disconnect()}},[y,eZ]),(0,u.useEffect)(()=>{void 0!==(null==ef?void 0:ef.paymentChannels)&&void 0===ey&&e_(ef)},[ey,ef]),!eN&&eC&&ek.unshift(_.hc.insurance);let eO=Array.isArray(y)&&y.length>0;(0,l.y)(eO);let eE=null==y?void 0:y.find(e=>e.type===_.hc.planeSeatsReservation);(null==eE?void 0:null===(x=eE._embedded)||void 0===x?void 0:null===(b=x.upsellVariants)||void 0===b?void 0:null===(g=b[0])||void 0===g?void 0:g.status)!==A.X.notAvailable&&ek.push(_.hc.planeSeatsReservation);let eR=null==y?void 0:y.find(e=>e.type===_.hc.priceGuarantee);J&&void 0!==eR&&ek.push(_.hc.priceGuarantee);let eD=null==y?void 0:y.find(e=>e.type===_.hc.gtzw);J&&void 0!==eD&&ek.push(_.hc.gtzw);let ez=null==y?void 0:y.find(e=>e.type===_.hc.flightClass);function eM(){var e,t,a;null!==(a=null==ez?void 0:null===(t=ez._embedded)||void 0===t?void 0:null===(e=t.upsellVariants)||void 0===e?void 0:e.some(e=>e.selected))&&void 0!==a&&a||M(!0)}function eV(){M(!1)}let eA=e=>{let{variant:t,upsell:a,selectionCondition:i}=e;return(null==t?void 0:t.status)===A.X.ordered?j.orderedVariantButtonLabel:"paymentSuccess"===V?j.orderVariantButtonLabel:(null==a?void 0:a.type)===_.hc.planeSeatsReservation||(null==a?void 0:a.type)===_.hc.transfer||(null==a?void 0:a.type)===_.hc.gtzw||(null==a?void 0:a.type)===_.hc.airportSecurityTax||(null==a?void 0:a.type)===_.hc.digitalCare?i?j.selectedVariantButtonLabel:j.select:(null==t?void 0:t.selected)===!0?j.selectedVariantButtonLabel:(null==a?void 0:a.type)===_.hc.orderOption?null==t?void 0:t.btnLabel:j.add};async function eB(e){var t,a,i,l,r,o;let{upsell:s,variant:d,isResignVariant:c=!1,roomIndex:u,clickSource:p}=e,m=void 0!==(null===(a=s._embedded)||void 0===a?void 0:null===(t=a.upsellVariants)||void 0===t?void 0:t.find(e=>e.isLoading));if((null==d||!d.isLoading)&&!m){try{let e=null==eT?void 0:null===(i=eT.extras)||void 0===i?void 0:i.some(e=>e.code===(null==s?void 0:s.type)),t=s.isResignVariantSelected?void 0:null===(r=s._embedded)||void 0===r?void 0:null===(l=r.upsellVariants)||void 0===l?void 0:l.find(e=>e.selected),a=!c&&!(null==d?void 0:d.selected)&&t;if(await S({upsellType:null==s?void 0:s.type,upsellGroupType:null==s?void 0:s.groupType,variantId:null!==(o=null==d?void 0:d.upsellId)&&void 0!==o?o:null==d?void 0:d.code,isResignVariant:c,roomIndex:u,clickSource:"string"==typeof p?p:"box",isExtras:e}),c&&t||(null==d?void 0:d.selected)||a){let e=c||a?null==t?void 0:t.upsellId:null==d?void 0:d.upsellId;(0,ed.Dt)("remove_from_cart",ev,ex,eh,ew,B,ey,eg,eb,null==ej?void 0:ej.formattedPrice,eS,null==s?void 0:s.type,null==s?void 0:s.groupType,e)}c||(null==d?void 0:d.selected)||(0,ed.Dt)("add_to_cart",ev,ex,eh,ew,B,ey,eg,eb,null==ej?void 0:ej.formattedPrice,eS,null==s?void 0:s.type,null==s?void 0:s.groupType,null==d?void 0:d.upsellId),(null==s?void 0:s.type)===_.hc.flightClass&&eV()}catch(e){Q.error(j.errorTogglingVariant)}c&&(0,n.yf)({event:"upsell_refused",upsell_refused:null==s?void 0:s.type,roomIndex:u})}}let eF=null==y?void 0:y.reduce((e,t)=>
1{let a=e.find(e=>e.roomIndex===t.roomIndex||void 0===t.roomIndex&&null===e.roomIndex);if(void 0!==a)a.upsells.push(t);else{var i;e.push({roomIndex:null!==(i=t.roomIndex)&&void 0!==i?i:null,upsells:[t]})}return e},[]);function eH(e,t){if(t){let t=null==y?void 0:y.find(e=>e.type===_.hc.facultativeTrips),a=((null==eZ?void 0:eZ.trips)||[]).map(e=>({...e,group:null==t?void 0:t.groupType}));(0,ed.Us)("view_item_list",ev,ex,eh,ew,B,ey,a,eb,null==ej?void 0:ej.formattedPrice,void 0,eS,void 0,void 0,null==t?void 0:t.type,null==t?void 0:t.groupType,e.uuid,!0)}}function eq(e){if(e){let t=null==y?void 0:y.find(e=>e.type===_.hc.facultativeTrips),a=((null==eZ?void 0:eZ.trips)||[]).map(e=>({...e,group:null==t?void 0:t.groupType}));(0,ed.Us)("select_item",ev,ex,eh,ew,B,ey,a,eb,null==ej?void 0:ej.formattedPrice,void 0,eS,void 0,void 0,null==t?void 0:t.type,null==t?void 0:t.groupType,e.uuid,!0),(0,ed.Us)("view_item",ev,ex,eh,ew,B,ey,a,eb,null==ej?void 0:ej.formattedPrice,void 0,eS,void 0,void 0,null==t?void 0:t.type,null==t?void 0:t.groupType,e.uuid,!0)}}return(0,i.jsx)("div",{className:"upsells-list","data-testid":"upsells-list","data-component":"UpsellsList",children:!d()(eF)&&(0,i.jsx)("div",{className:"row",children:null==eF?void 0:eF.map(e=>{var t,a;let{roomIndex:l,upsells:n}=e,r="";if(null!==l&&void 0!==P){let e=P[l];if(void 0===e)return r;let{adultsCount:t,childrenBirthDates:a,personNames:i}=e,n=null==a?void 0:a.length;void 0!==i&&i.length>0?r=i.join(", "):(r="".concat(t," ").concat((0,ep.EK)(t)),void 0!==n&&n>0&&(r="".concat(r,", ").concat(n," ").concat((0,ep.W7)(n))))}let s=(0,o.Z)("upsells-list__group",{"upsells-list__group--room":null!==l});return n.every(e=>{var t,a;return(null===(a=e._embedded)||void 0===a?void 0:null===(t=a.upsellVariants)||void 0===t?void 0:t.every(e=>e.hidden))===!0})?null:(0,i.jsxs)("div",{className:s,children:[null!==l&&(0,i.jsxs)(R.Z,{headingLevel:1,isBold:!0,customClassName:"upsells-list__room-header",children:[null!==(a=null==B?void 0:null===(t=B.localizedContent)||void 0===t?void 0:t["upsell.roomNumber"])&&void 0!==a?a:"Pok\xf3j nr"," ",l+1,": ",r]}),n.map(e=>{var t;let{type:a,groupType:n,isResignVariantSelected:r}=e,o=null===(t=e._embedded)||void 0===t?void 0:t.upsellVariants,s=void 0!==o&&o.every(e=>e.hidden);if("ALL_INCLUSIVE_INSURANCE"===a){let e=void 0!==o&&o.some(e=>e.selected);if(s&&e)return null}else if(s)return null;let d="".concat(a,"-").concat(n,"-").concat(null!=l?l:0),c=!0===r||void 0!==(null==o?void 0:o.find(e=>!1===e.hidden&&e.selected)),p=e.type===_.hc.insurance&&void 0!==o&&(null==o?void 0:o.length)===1,m=C&&ek.includes(a)&&!0!==r&&void 0===(null==o?void 0:o.find(e=>e.selected))&&!p,v=(()=>{var t,n,r,s,v,h;switch(a){case _.hc.insurance:{let a="paymentSuccess"!==V,r=ee?(0,eu.Kc)(D):(0,eu.Oo)(D),s=(0,eu.Vu)(D),u=(0,ec.JF)(r||s),v=null==o?void 0:o.map(e=>({...e,hidden:e.hidden||!ee&&(Array.isArray(e.bundleCodes)&&e.bundleCodes.length>0?(0,ec.Gf)(e.bundleCodes,u):"string"==typeof e.code&&u.includes(e.code))}));if((u.length>0||eN||!eC||p)&&(a=!1),p)return(0,i.jsx)(em.Z,{upsell:e,variants:v,onVariantButtonClick:eB,labels:j,renderButtonLabel:eA,roomIndex:l,attachments:null===(t=e._embedded)||void 0===t?void 0:t.attachments},d);return(0,i.jsx)(Y.Z,{upsell:e,variants:v,onVariantButtonClick:eB,renderButtonLabel:eA,labels:j,hasSelectedVariant:c,hasError:m,roomIndex:l,isResignVariantVisible:a,attachments:null===(n=e._embedded)||void 0===n?void 0:n.attachments},d)}case _.hc.allInclusive:return(0,i.jsx)(H.Z,{upsell:e,variants:o,onVariantButtonClick:eB,renderButtonLabel:eA,labels:j,roomIndex:l},d);case _.hc.flightClass:return(0,i.jsxs)(u.Fragment,{children:[(0,i.jsx)(L.Z,{upsell:e,variants:o,labels:j,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA}),(0,i.jsx)(O.Z,{isOpen:z,onClick:eV,onClose:eV,className:"upsell__dialog-wrapper",dialogTitle:j.flightClass.dialogTitle,variant:E.od.withTitle,testId:"flight-class-popup",children:(0,i.jsx)(L.Z,{upsell:e,variants:o,labels:j,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA,isInDialog:!0})})]},a);case _.hc.baggageChecked:return(0,i.jsx)(q.Z,{upsell:e,variants:o,onVariantButtonClick:eB,renderButtonLabel:eA},a);case _.hc.baggageSki:return(0,i.jsx)(U.Z,{upsell:e,variants:o,onVariantButtonClick:eB,renderButtonLabel:eA},a);case _.hc.planeSeatsReservation:return(0,i.jsx)(I.Z,{upsell:e,variants:o,labels:j,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA,showFlightClassDialog:eM,hasError:m},a);case _.hc.facultativeTrips:if("paymentSuccess"===V)return null;
1return(0,i.jsx)(Z,{upsell:e,labels:j,onTripShowDetails:eq,onTripVisibilityChange:eH},a);case _.hc.transfer:return(0,i.jsx)(ei.Z,{upsell:e,variants:o,labels:j,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA,hasError:m},a);case _.hc.digitalCare:return(0,i.jsx)(W.Z,{upsell:e,variants:o,labels:j,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA,hasError:m},a);case _.hc.flexibleGuarantee:return(0,i.jsx)(G.Z,{upsell:e,variants:o,labels:j,attachments:null===(r=e._embedded)||void 0===r?void 0:r.attachments,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA},a);case _.hc.gtzw:{let t=J&&"paymentSuccess"!==V;return(0,i.jsx)(X.Z,{upsell:e,variants:o,labels:j,attachments:null===(s=e._embedded)||void 0===s?void 0:s.attachments,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA,isResignVariantVisible:t,hasError:m},a)}case _.hc.firstMinute:return(0,i.jsx)(K.Z,{upsell:e,labels:j,attachments:null===(v=e._embedded)||void 0===v?void 0:v.attachments,variants:o,onVariantButtonClick:eB,renderButtonLabel:eA},a);case _.hc.priceGuarantee:{let t=J&&"paymentSuccess"!==V;return(0,i.jsx)(ea,{upsell:e,variants:o,labels:j,attachments:null===(h=e._embedded)||void 0===h?void 0:h.attachments,onVariantButtonClick:eB,renderButtonLabel:eA,isResignVariantVisible:t,hasError:m},a)}case _.hc.orderOption:return(0,i.jsx)($,{upsell:e,variants:o,onVariantButtonClick:eB,renderButtonLabel:eA},a);case _.hc.airportSecurityTax:return(0,i.jsx)(F,{upsell:e,variants:o,labels:j,hasSelectedVariant:c,onVariantButtonClick:eB,renderButtonLabel:eA,hasError:m},a);default:return null}})();return(0,i.jsx)("div",{ref:e=>{e?eL.current.set(d,e):eL.current.delete(d)},"data-upsell-key":d,children:v},d)})]},l)})})})}},96554:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var i=a(31549),l=a(14895),n=a(34954),r=a(78856);let o=[{name:"mainBaggageLimit",icon:"luggageFill"},{name:"carryonBaggageLimit",icon:"luggageHand"},{name:"infantBaggageLimit",icon:"teddy"}];function s(e){var t,a;let{baggageLimit:s}=e,d=(0,l.En)();return o?(0,i.jsxs)("div",{className:"text-sm text-black","data-component":"BaggageLimits",children:[(0,i.jsx)("span",{className:"flex h-[30px] items-center font-bold",children:null!==(a=null==d?void 0:null===(t=d.localizedContent)||void 0===t?void 0:t["baggageLimits.title"])&&void 0!==a?a:"Limit bagażowy w Twojej klasie"}),(0,i.jsx)(n.Z,{customClassNames:"text-black mb-0",children:null==o?void 0:o.map(e=>{var t,a;if(void 0===e.name||!(e.name in s))return null;let l=function(e,t){var a,i,l,n,r,o;switch(e){case"mainBaggageLimit":return null!==(i=null==t?void 0:null===(a=t.localizedContent)||void 0===a?void 0:a["baggageLimits.main"])&&void 0!==i?i:"Rejestrowany";case"carryonBaggageLimit":return null!==(n=null==t?void 0:null===(l=t.localizedContent)||void 0===l?void 0:l["baggageLimits.carryon"])&&void 0!==n?n:"Podręczny";case"infantBaggageLimit":return null!==(o=null==t?void 0:null===(r=t.localizedContent)||void 0===r?void 0:r["baggageLimits.infant"])&&void 0!==o?o:"Bagaż dziecka do 2. roku życia"}}(e.name,d),n="".concat(e.name,"Localized"),o=s[e.name];if(s[n]&&(o=s[n]),s)return(0,i.jsxs)(r.Z,{iconType:e.icon,iconSize:"20",iconColor:"rgba(170, 215, 0, 1)",children:[(0,i.jsx)("b",{children:l}),"\xa0-\xa0",null!==(a=null!=o?o:null==d?void 0:null===(t=d.localizedContent)||void 0===t?void 0:t["baggageLimits.noData"])&&void 0!==a?a:"brak danych"]},e.name)})})]}):null}},36685:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=a(31549),l=a(39370),n=a(60669),r=a(7862),o=a.n(r);let s={items:o().oneOfType([o().string,o().arrayOf(o().shape({name:o().string,url:o().string}))]),pageType:o().string,isPagePart:o().bool,isOfferTile:o().bool,marginTopMedium:o().bool,marginBottomMedium:o().bool,type:o().oneOf(["TOP","BOTTOM","LARGE"])};var d=a(14895);let c=e=>{let{items:t,type:a,pageType:r,isPagePart:o,marginTopMedium:s,marginBottomMedium:c,isOfferTile:u,testId:p=null}=e,m=function(){let e=(0,d.bL)();return null==e?void 0:e.breadcrumbs}(),v=null!=t?t:m;if(void 0===v)return null;let h="string"==typeof v,f=h?v:v.filter(e=>e.name||e.label),g=(0,n.Z)("breadcrumbs breadcrumbs--".concat(a.toLowerCase()," breadcrumbs--").concat(r),{"breadcrumbs__margin-top-medium":s,"breadcrumbs__margin-bottom-medium":c,"breadcrumbs__listing-page-part":"listing"===r&&o}),b="BOTTOM"!==a,x=p;return p||(x=u?"offer-tile-breadcrumbs":"breadcrumbs"),(0,i.jsx)("nav",{className:g,"data-testid":x,children:(0,i.jsxs)("ol",{className:"breadcrumbs__list",itemScope:!!b||void 0,itemType:b?"https://schema.org/BreadcrumbList":void 0,children:[h&&(0,i.jsxs)("li",{className:"breadcrumbs__item",itemProp:b?"itemListElement":void 0,itemScope:!!b||void 0,itemType:b?"https://schema.org/ListItem":void 0,children:[(0,i.jsx)("span",{itemProp:b?"name":void 0,children:t}),b&&(0,i.jsx)("meta",{itemProp:"position",content:"1"})]}),!h&&f.map((e,t)=>{let n=void 0!==e.url&&""!==e.url;return(0,i.jsxs)("li",{className:"breadcrumbs__item",itemProp:b?"itemListElement":void 0,itemScope:!!b||void 0,itemType:b?"https://schema.org/ListItem":void 0,children:[n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("a",{href:(0,l.AR)(e.url),itemProp:b?"item":void 0,className:"breadcrumbs__anchor",target:u?"_blank":"_self","aria-current":"TOP"===a&&t===f.length-1?"location":null,children:(0,i.jsx)("span",{itemProp:b?"name":void 0,children:e.name||e.label})}),b&&(0,i.jsx)("meta",{itemProp:"position",content:t+1,suppressHydrationWarning:!0})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{itemProp:b?"name":void 0,children:e.name||e.label}),b&&(0,i.jsx)("meta",{itemProp:"position",content:t+1,suppressHydrationWarning:!0})]}),t<f.length-1&&(0,i.jsx)("span",{className:"breadcrumbs__separator","aria-hidden":"true"})]},"".concat(e.name||e.label,"-").concat(t))})]})})};c.propTypes=s,c.defaultProps={pageType:null,isPagePart:!1,isOfferTile:!1,marginTopMedium:!1,marginBottomMedium:!1,type:"TOP",items:null};var u=c},62027:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var i=a(31549),l=a(60669),n=a(29796),r=a(44194),o=a(53213),s=a(92671),d=a(60810);let c=(0,n.e)(new Date,30),u=(0,n.e)(new Date,120),p=(0,n.e)(new Date,18);function m(e){let{wrapperClassName:t,calendarWindowClassName:a,renderInput:n,onDateSelect:m,minDate:v,maxDate:h,value:f,activeStartDate:g,isDisabled:b}=e,[x,y]=(0,r.useState)(!1),_=(0,l.Z)("relative",t),j=(0,l.Z)("absolute left-[0] max-w-[calc(100%+1px)] border border-solid border-gray-doveLight top-[64px] z-[3] md:max-w-none",a),w=(0,r.useRef)(null),N=(0,r.useCallback)(()=>{x&&y(!1)},[x]);(0,s.t)(w,N);let C=f?(0,d.sG)(f,d.fK.dayMonthYearWithDots):void 0,k=g;return g||(k=f?(0,d.sG)(f,d.fK.dayMonthYearWithDots):c),(0,i.jsxs)("div",{className:_,ref:w,"data-component":"CalendarDropdown",children:[(0,i.jsx)("div",{className:"w-full cursor-pointer appearance-none border-none bg-transparent p-0 text-left outline-none focus:outline-none",onClick:function(){b||y(e=>!e)}
1,role:"presentation",tabIndex:-1,children:n()}),x&&!b&&(0,i.jsx)("div",{className:j,children:(0,i.jsx)(o.Z,{className:"p-[10px]",activeStartDate:k,minValue:void 0===v?u:v,maxValue:void 0===h?p:h,onChange:function(e){void 0!==m&&m(e),y(!1)},value:C,view:f?"month":"decade"})})]})}},30006:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var i=a(31549),l=a(87113),n=a(60669),r=a(76577);function o(e){let{type:t="generic",className:a,children:o=null,checked:s=!1,...d}=e,c=(0,n.Z)("checkbox","checkbox--".concat(t),a);return(0,i.jsxs)(l.XZ,{className:c,checked:s,inline:!0,...d,children:[s&&"big"===t?(0,i.jsx)(r.default,{className:"checkbox__confirm-icon"}):null,o]})}},69424:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=a(31549),l=a(60669),n=a(71923),r=a(30006),o=a(35937),s=a(87954),d=a(59430),c=a(14895);function u(e){var t;let{isOpen:a,selectedEvacuationSeats:u,evacuationSeatsConfirmed:p,onConfirm:m,onSubmit:v,onReset:h,onClose:f}=e,g=(0,c.z$)("EVACUATION_SEATS_CONFIRMATION_POPUP");return(0,i.jsx)(o.Z,{isOpen:a,onClick:f,onClose:f,dialogTitle:null==g?void 0:g["evacuationSeatsConfirmationPopup.title"],variant:s.od.withTitle,className:"max-w-[500px]",children:(0,i.jsxs)("div",{className:"flex flex-col gap-y-5 p-4 text-sm","data-component":"EvacuationSeatsDisclaimerPopup",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)("div",{className:"flex flex-col gap-y-2",children:u.map((e,t)=>{let a="DEPARTURE"===e.type?null==g?void 0:g["evacuationSeatsConfirmationPopup.departure"]:null==g?void 0:g["evacuationSeatsConfirmationPopup.return"];return(0,i.jsxs)("div",{className:"flex items-baseline gap-x-2",children:[(0,i.jsx)("span",{className:"font-semibold",children:a}),(0,i.jsx)("div",{className:"flex gap-x-1",children:e.places.map((e,t)=>(0,i.jsx)(d.Z,{status:"selected",label:e.replace(/\s/,""),className:"m-0",readOnly:!0},t))})]},t)})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:null!==(t=null==g?void 0:g["evacuationSeatsConfirmationPopup.disclaimer"])&&void 0!==t?t:""}})]}),(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)(r.Z,{id:"evacuation-seats-confirm",type:"generic",className:"shrink-0",checked:p,onChange:e=>m(e.target.checked)}),(0,i.jsx)("label",{className:"mb-0 font-semibold",htmlFor:"evacuation-seats-confirm",children:null==g?void 0:g["evacuationSeatsConfirmationPopup.agreement"]})]}),(0,i.jsxs)("div",{className:"flex w-full flex-col gap-4 sm:flex-row",children:[(0,i.jsx)(n.ZP,{className:(0,l.Z)({"cursor-not-allowed":!p}),disabled:!p,variant:p?"primary":"disabled",onClick:v,children:null==g?void 0:g["evacuationSeatsConfirmationPopup.button_confirm"]}),(0,i.jsx)(n.ZP,{variant:"outlinedBlue",onClick:h,children:null==g?void 0:g["evacuationSeatsConfirmationPopup.button_change"]})]})]})})}},54979:function(e,t,a){"use strict";a.d(t,{Z:function(){return R}});var i=a(31549),l=a(60669),n=a(92430),r=a(44194),o=a(39783),s=a(18662),d=a(50259),c=a.n(d);let u=(0,r.forwardRef)((e,t)=>{let{children:a,type:n,variant:r,className:o,onClick:s,navigationLabel:d}=e;return(0,i.jsx)("button",{ref:t,type:"button",className:(0,l.Z)(c().button,c()[n],c()[r],o),onClick:()=>null==s?void 0:s(n),"aria-label":d,"data-component":"CarouselNavigationButton",children:a})});u.displayName="CarouselNavigationButton";var p=a(98779),m=a(96345),v=a(86445),h=a(34435),f=a(71923),g=a(83560),b=a(21595),x=a(88264),y=a(14895),_=a(13738),j=a(51346),w=a.n(j);function N(e){var t,a,n,r,o,s,d,c,u,p;let{actionButtonLabel:j,discountedPrice:N,topPrice:C,topPriceLabel:k,isSelected:S,isOrdered:T,onActionButtonClick:P,onShowDetailsButtonClick:Z,price:L,pricePrefixLabel:I,priceSuffixLabel:O,priceDescription:E,showDetail
1sButtonLabel:R,trip:D,isTripBeingAddedOrRemoved:z,withWidthConstraint:M,onTripVisibilityChange:V}=e,A=(0,y.En)(),B=(0,l.Z)(w().wrapper,{[w().wrapperSelected]:S,[w().wrapperWithWidthConstraint]:M,[w().wrapperOrdered]:T}),{ref:F}=(0,v.YD)({skip:!V,triggerOnce:!0,threshold:1,onChange(e){e&&(null==V||V(D,e))}}),H=(0,h.jK)(null==D?void 0:D.currency);return(0,i.jsxs)("div",{ref:F,role:"presentation",className:B,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),"data-component":"FacultativeTripItem",children:[(0,i.jsxs)("div",{className:w().photo,children:[(0,i.jsx)(g.Z,{layout:"fill",objectFit:"cover",src:"".concat(D.imageUrl,"?ar=1.5:1&w=400&fit=crop"),alt:D.name}),(0,i.jsx)(_.Z,{reviewsAvg:D.reviews_avg,reviewsNumber:D.reviews_number})]}),(0,i.jsxs)("div",{className:w().body,children:[(0,i.jsx)("div",{className:w().titleWrapper,children:(0,i.jsx)(b.Z,{headingLevel:4,customClassName:w().title,children:D.name})}),(0,i.jsxs)(f.ZP,{variant:f.qh.link,className:w().showDetailsButton,onClick:function(){"function"==typeof Z&&Z(D.uuid)},testId:"facultative-trips-item-details-button",children:[R,"\xa0\xbb"]}),(0,i.jsxs)("div",{className:w().container,children:[void 0!==L&&!T&&(0,i.jsx)(x.Z,{isFacultativeTrip:!0,isCheckout:!0,customClassName:w().price,value:L,valuePrefixLabel:S||T?null:I,discountedValue:N,discountPercentage:(0,m.$Q)(D.discountLabel),discountedValueTooltip:D.discountMessage,currencySymbol:H,customCurrencyText:O,testId:"facultative-trips-item-price",priceDescription:E}),void 0!==C&&C>0&&(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-1",children:[(0,i.jsxs)("div",{className:"mt-[5px] p-0 text-left text-[11px]",children:[k," ",(0,i.jsxs)("span",{className:"whitespace-nowrap",children:[I," ",C," ",H,S?null!==(s=null==A?void 0:null===(t=A.localizedContent)||void 0===t?void 0:t["facultative.trip.price.total"])&&void 0!==s?s:"/razem":null!==(d=null==A?void 0:null===(a=A.localizedContent)||void 0===a?void 0:a["facultative.trip.price.per.person"])&&void 0!==d?d:"/os."]})]}),(0,i.jsxs)("div",{className:"p-0 text-left text-[11px]",children:[null!==(c=null==A?void 0:null===(n=A.localizedContent)||void 0===n?void 0:n["facultative.trip.regular.price"])&&void 0!==c?c:"Cena regularna",":"," ",(0,i.jsxs)("span",{className:"whitespace-nowrap",children:[I," ",void 0!==L?Number(L.toString()):void 0," ",H,S?null!==(u=null==A?void 0:null===(r=A.localizedContent)||void 0===r?void 0:r["facultative.trip.price.total"])&&void 0!==u?u:"/razem":null!==(p=null==A?void 0:null===(o=A.localizedContent)||void 0===o?void 0:o["facultative.trip.price.per.person"])&&void 0!==p?p:"/os."]})]})]}),"function"==typeof P&&(0,i.jsx)(f.ZP,{variant:S||T?f.qh.primarySelected:f.qh.primary,disabled:z,isLoading:z,className:w().actionButton,iconName:S||T?"confirm":"button-arrow",onClick:function(){"function"!=typeof P||T||P(D.uuid,S)},testId:"facultative-trips-item-button",children:j})]})]})]})}var C=a(4063),k=a(2861),S=a(2054);a(24026),a(81953),a(93718);var T=a(49523),P=a(58967),Z=a(35937),L=a(87954),I=a(43645),O=a(33120),E=a.n(O);function R(e){var t;let{trips:a,labels:d,selectedTrips:c,orderedTrips:v,tripUuidPendingChange:h,participantsDescription:g,participantsCounts:b,priceDescription:x,offerCode:y,reservationId:_,breakpoints:j,navigationButtonsVariant:w="inline",preselectedValues:O,onTripRemove:R,onTripSelect:D,onTripDetailsFetchSuccess:z,onTripVisibilityChange:M,onTripShowDetails:V,onTripDetailsRender:A}=e,[B,F]=(0,r.useState)(!1),[H,q]=(0,r.useState)(),[U,W]=(0,r.useState)(),[K,G]=(0,r.useState)(),[X,Y]=(0,r.useState)(),Q=(0,r.useRef)(null),$=(0,r.useRef)(null),J=(0,r.useRef)(null),ee=(0,n.useRouter)(),et=(0,k.L)(),{data:ea,error:ei}=(0,C.Hm)(U,y,_,z),{data:el}=(0,C.Xj)(U,_,y);(0,r.useEffect)(()=>{void 0!==ei&&B&&(F(!1),q("Wybrana wycieczka nie jest dostępna"))},[ei,B]);let{data:en,isValidating:er}=(0,C.T6)(null!=K?K:null==O?void 0:O.pickupUuid,null!=X?X:null==O?void 0:O.date,U,a,null==el?void 0:el.pickups,void 0,_),eo="string"==typeof U&&null!==(t=null==v?void 0:v.some(e=>(0,m._b)(e,U,O)))&&void 0!==t&&t;(0,r.useEffect)(()=>{eo||void 0===en||0!==en.length||(F(!1),q("Oferta nie jest dostępna w sprzedaży"),Y(void 0))},[eo,en]),(0,r.useEffect)(()=>
1{if(void 0!==a&&a.length>0&&void 0!==ee.query.openTripPopupForId){let e=ee.query.openTripPopupForId,t=a.find(t=>t.uuid===e);t&&(G(void 0),Y(void 0),W(t.uuid),F(!0),(0,S.Zx)(ee,"openTripPopupForId"))}},[ee,a]);let es=Array.isArray(a)?a.length:0;if(void 0===a)return null;let ed=w.charAt(0).toUpperCase()+w.slice(1),ec=(0,l.Z)(E().navigationButton,E().navigationButtonPrev,E()["navigationButton".concat(ed)]),eu=(0,l.Z)(E().navigationButton,E().navigationButtonNext,E()["navigationButton".concat(ed)]);function ep(e){G(void 0),Y(void 0),W(e),F(!0),V&&V(null==a?void 0:a.find(t=>t.uuid===e))}function em(){F(!1),G(void 0),Y(void 0)}function ev(){q(void 0)}function eh(e,t){t&&"function"==typeof R?R(e,!1):ep(e)}async function ef(e,t){"function"==typeof R&&await R(e,t),em()}async function eg(e){"function"==typeof D&&await D(e,ea),em()}return void 0!==a&&0===a.length?null:(0,i.jsx)("div",{className:E().wrapper,"data-testid":"facultative-trips-carousel","data-component":"FacultativeTripsCarousel",children:(0,i.jsxs)("div",{className:(0,l.Z)(E().carouselWrapper,E()["".concat(w,"Buttons")]),children:[(0,i.jsx)(u,{ref:Q,className:ec,type:"previous",variant:w,navigationLabel:null==d?void 0:d.prevNavigationLabel,children:(0,i.jsx)(T.Z,{className:E().navigationButtonIcon})}),(0,i.jsx)(u,{ref:$,className:eu,type:"next",variant:w,navigationLabel:null==d?void 0:d.nextNavigationLabel,children:(0,i.jsx)(P.Z,{className:E().navigationButtonIcon})}),(0,i.jsx)("div",{ref:J,className:E().paginationContainer}),(0,i.jsx)(s.tq,{className:"h-full w-full",breakpoints:j,spaceBetween:20,slidesPerView:3,threshold:20,modules:[o.W_,o.tl],pagination:{el:J.current,type:"bullets",clickable:!0,bulletClass:"block w-2.5 h-2.5 bg-gray rounded-full cursor-pointer",bulletActiveClass:"bg-malibu"},navigation:{prevEl:Q.current,nextEl:$.current},onBeforeInit:e=>{e.params.navigation&&(e.params.navigation.prevEl=Q.current,e.params.navigation.nextEl=$.current),e.params.pagination&&(e.params.pagination.el=J.current)},children:a.map((e,t)=>{var a,l;let n=null==c?void 0:c.find(t=>{let a=t.uuid===e.uuid;return void 0!==(null==O?void 0:O.date)?a&&t.day===O.date:a}),r=null==v?void 0:v.find(t=>(0,m._b)(t,e.uuid,O)),o=void 0!==n,u=void 0!==r,p=null==d?void 0:d.select,f=e.price,g=e.discountedPrice,b=e.topPrice,y=e.topPriceLabel;
1return o?(p=null==d?void 0:d.selectedVariantButtonLabel,f=n.price,g=n.discountedPrice,b=n.topPrice,y=n.topPriceLabel):u&&(p=null==d?void 0:d.soldVariantButtonLabel,f=r.price,g=null===(a=r.activityResource)||void 0===a?void 0:a.discountedPrice),(0,i.jsx)(s.o5,{children:(0,i.jsx)(N,{actionButtonLabel:p,discountedPrice:g,topPrice:b,topPriceLabel:y,isSelected:o,isOrdered:u,onActionButtonClick:"checkoutReservation"===et||"hotelCard"===et||(null==et?void 0:et.startsWith("mytui"))?eh:void 0,onShowDetailsButtonClick:ep,price:"checkoutReservation"===et||"hotelCard"===et||(null==et?void 0:et.startsWith("mytui"))?f:void 0,pricePrefixLabel:null==d?void 0:d.pricePrefixLabel,priceSuffixLabel:o?null==d?void 0:d.fullPriceLabel:null==d?void 0:d.personPriceLabel,priceDescription:x,showDetailsButtonLabel:null!==(l=null==d?void 0:d.details)&&void 0!==l?l:"Sprawdź szczeg\xf3ły",trip:e,isTripBeingAddedOrRemoved:h===e.uuid,withWidthConstraint:es<3,onTripVisibilityChange:M})},t)})}),(0,i.jsxs)(Z.Z,{className:E().dialog,isOpen:B,onClose:em,onClick:em,children:[B&&ea&&el&&(0,i.jsx)(p.Z,{availableSchedules:en,preselectedValues:O,onPickupSelect:function(e){G(e)},onDateSelect:function(e){Y(e)},onTripRemove:ef,onTripSelect:eg,participants:g,participantsCounts:b,selectedTrips:c,orderedTrips:v,tripDetails:ea,pickups:el.pickups,tripUuidPendingChange:h,isSchedulesValidating:er,onTripDetailsRender:A},ea.uuid),(0,i.jsx)("div",{className:E().dialogLoadingIconWrapper,children:(0,i.jsx)(I.Z,{isLoading:B&&(!ea||!el),className:E().dialogLoadingIcon})})]}),(0,i.jsx)(Z.Z,{isOpen:void 0!==H,onClick:ev,onClose:ev,dialogTitle:H,className:"max-w-[420px]",variant:L.od.withTitle,theme:L.ie.red,children:(0,i.jsx)("div",{className:"p-[20px]",children:(0,i.jsx)(f.ZP,{variant:f.qh.primary,onClick:ev,className:"mx-auto max-w-[200px] cursor-pointer",children:"Wr\xf3ć do zakup\xf3w"})})})]})})}},7703:function(e,t,a){"use strict";a.d(t,{Z:function(){return w}});var i=a(31549),l=a(84037),n=a(7862),r=a.n(n);let o={flight:r().arrayOf(r().shape(l.IS)).isRequired,type:r().string,travelTimeLabel:r().string,unconfirmedFlightHoursText:r().string,hideHeading:r().bool,isCheckout:r().bool},s={departureFlight:r().arrayOf(r().shape(l.IS)).isRequired,returnFlight:r().arrayOf(r().shape(l.IS)).isRequired,hideHeading:r().bool,unconfirmedFlightHoursText:r().string,totalDepartureFlightTime:r().string,totalReturnFlightTime:r().string,departureBaggageLimit:r().shape(l.Y1),returnBaggageLimit:r().shape(l.Y1),isCheckout:r().bool,testId:r().string};var d=a(34435),c=a(14895),u=a(76696),p=a(60669),m=a(26036),v=a(63909),h=a.n(v),f=a(96554),g=a(38880),b=a(7102),x=a(16923),y=a(40533);let _=e=>{var t,a,l,n,r,o,s,v;let _;let{flight:j,type:w,travelTimeLabel:N,hideHeading:C,baggageLimit:k,unconfirmedFlightHoursText:S,isCheckout:T}=e,P=(0,c.En)(),Z=(0,p.Z)("flight-info__heading",{"sr-only":C}),L=(e,t)=>0===t?e?"oval oval__fill--upper":j.length>1?"oval oval__empty--lower":"oval oval__fill--lower":e?"oval oval__empty--upper":"oval oval__fill--lower",I=(e,t)=>T?"departure"===t?(0,y.nX)(e.departureCode,e.departureAirport):(0,y.nX)(e.arrivalCode,e.arrivalAirport):"departure"===t?(0,y.nX)(e.departurePlaceCode,e.departurePlaceName):(0,y.nX)(e.arrivalPlaceCode,e.arrivalPlaceName),O=e=>{let{airlineName:t,carrierName:a,carrierCode:i,carrier:l,flightNumber:n}=e;return(0,y.N1)(t||a,i||l,n)},E=j[0],R=j[j.length-1],D=E.departureDateTime,z=new Intl.DateTimeFormat((0,d.BH)(),{day:"numeric",month:"long",year:"numeric"});return(0,i.jsxs)("section",{className:"flight-info",children:[(0,i.jsx)(g.Z,{headingLevel:3,stylingLevel:4,customClassName:Z,children:"departure"===w?null!==(r=null==P?void 0:null===(t=P.localizedContent)||void 0===t?void 0:t["flight.departure"])&&void 0!==r?r:"Wylot":null!==(o=null==P?void 0:null===(a=P.localizedContent)||void 0===a?void 0:a["flight.return"])&&void 0!==o?o:"Powr\xf3t"}),(0,i.jsxs)("div",{className:"flight-info__top",children:[(0,i.jsx)(u.Z,{className:"flight-info__main-icon"}),(0,i.jsxs)("div",{className:"flight-info__header flight-info-header",children:[(0,i.jsx)("strong",{className:"flight-info-header__code",children:T?E.departureC
1ode:E.departurePlaceCode}),(0,i.jsxs)("span",{className:"flight-info-header__date",children:[(0,i.jsx)("span",{className:"flight-info-header__day",children:(0,m.D)(D).getDate()}),(0,i.jsx)("span",{className:"flight-info-header__month",children:function(e){var t,a;let i=z.formatToParts((0,m.D)(e)),l=null===(t=i.find(e=>"month"===e.type))||void 0===t?void 0:t.value,n=null===(a=i.find(e=>"year"===e.type))||void 0===a?void 0:a.value;return"".concat(l," ").concat(n)}(D)})]}),(0,i.jsx)("strong",{className:"flight-info-header__code",children:T?R.arrivalCode:R.arrivalPlaceCode})]})]}),(0,i.jsxs)("div",{className:"flight-info__hours flight-info__part",children:[j.map((e,t)=>{var a,l,n,r,o,s;return(0,i.jsxs)("div",{children:[t>0&&e.midTransferMessage&&(0,i.jsx)("div",{className:"airplane-change",children:e.midTransferMessage}),(0,i.jsxs)("div",{className:"flight-info__content-separated",children:[(0,i.jsx)(x.Z,{iconName:"airplane-departure",title:"".concat(null!==(o=null==P?void 0:null===(a=P.localizedContent)||void 0===a?void 0:a["flight.departure"])&&void 0!==o?o:"Wylot",": "),time:(0,y.Yf)(e.departureDateTime,null==P?void 0:null===(l=P.localizedContent)||void 0===l?void 0:l["flight.datePlaceholder"]),content:I(e,"departure")}),(0,i.jsxs)("div",{className:"flight-line-path",children:[(0,i.jsxs)("div",{className:"path",children:[(0,i.jsx)("div",{className:L(!0,t)}),(0,i.jsx)("div",{className:"path-line"}),(0,i.jsx)("div",{className:L(!1,t)})]}),(0,i.jsx)("div",{className:"carrier-label",children:(0,i.jsx)("span",{children:O(e)})})]}),(0,i.jsx)(x.Z,{iconName:"airplane-arrival",title:"".concat(null!==(s=null==P?void 0:null===(n=P.localizedContent)||void 0===n?void 0:n["flight.return"])&&void 0!==s?s:"Powr\xf3t",": "),time:(0,y.Yf)(e.arrivalDateTime,null==P?void 0:null===(r=P.localizedContent)||void 0===r?void 0:r["flight.datePlaceholder"]),content:I(e,"arrival")})]},t)]},t)}),S&&(0,i.jsx)("div",{children:(0,i.jsx)("p",{className:"flight-info__text",children:S})})]}),(0,i.jsx)("div",{className:"flight-info__details flight-info__part",children:(0,i.jsxs)("div",{className:"flight-info__content-separated",children:[(0,i.jsx)(b.Z,{title:"".concat(null!==(s=null==P?void 0:null===(l=P.localizedContent)||void 0===l?void 0:l["flight.flightClass"])&&void 0!==s?s:"Klasa przelotu",":"),content:(_=T?"flightClass":"bookingClass",Array.from(new Set(j.map(e=>e[_]))).join(", "))}),(0,i.jsx)(b.Z,{title:"".concat(null!==(v=null==P?void 0:null===(n=P.localizedContent)||void 0===n?void 0:n["flight.totalFlightTime"])&&void 0!==v?v:"Całkowity czas podr\xf3ży",":"),content:N}),!h()(k)&&(0,i.jsx)(f.Z,{baggageLimit:k})]})})]})};_.propTypes=o,_.defaultProps={type:"departure",hideHeading:!1,unconfirmedFlightHoursText:"",baggageLimit:null,isCheckout:!1};let j=e=>{let{testId:t,departureFlight:a,totalDepartureFlightTime:l,departureBaggageLimit:n,returnFlight:r,totalReturnFlightTime:o,returnBaggageLimit:s,hideHeading:d,unconfirmedFlightHoursText:c,isCheckout:u}=e;return a||r?(0,i.jsxs)("ul",{className:"flight-info-wrapper","data-testid":t,children:[void 0!==a&&(0,i.jsx)("li",{className:"flight-info-wrapper__item",children:(0,i.jsx)(_,{flight:a,travelTimeLabel:l,hideHeading:d,baggageLimit:n,unconfirmedFlightHoursText:c,type:"departure",isCheckout:u})}),void 0!==r&&(0,i.jsx)("li",{className:"flight-info-wrapper__item",children:(0,i.jsx)(_,{flight:r,travelTimeLabel:o,hideHeading:d,baggageLimit:s,unconfirmedFlightHoursText:c,type:"return",isCheckout:u})})]}):null};j.propTypes=s,j.defaultProps={hideHeading:!1,unconfirmedFlightHoursText:"",departureBaggageLimit:null,returnBaggageLimit:null,isCheckout:!1};var w=j},40533:function(e,t,a){"use strict";a.d(t,{N1:function(){return s},Yf:function(){return r},Zo:function(){return n},nX:function(){return o},tf:function(){return d}});var i=a(26036),l=a(60810);function n(e){return e?"".concat("".concat(Math.floor(e/60)," h")," ").concat("".concat(e%60," min")):""}function r(e,t){if(!e)return"";let a=(0,l.p6)((0,i.D)(e),l.fK.dayMonthYearWithDots),n=(0,l.p6)((0,i.D)(e),l.fK.hoursMinutesWithSemicolon);return t?t.replace("{day}",a).replace("{time}",n):"".concat(a,", godz. ").concat(n)}function o(e,t){let a=[];return t?(a.push(t),e&&a.push("(".concat(e,")"))):a.push(e),a.join(" ")}function s(e,t,a){let i=[];if(e&&i.push(e),t||a){let e=[];!t||a&&/^\D/.test(a)||e.push(t),a&&e.push(a),e.length>0&&i.push(e.join(""))}return i.join(", ")}function d(e){return e?e.map(e=>{let t=[];return e.firstName&&t.push(e.firstName),e.lastName&&t.push(e.lastName),e.seatCode&&t.push("(".concat(e.seatCode,")")),t.join(" ")}).join(", "):""}},80096:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var i=a(31549),l=a(60669),n=a(44194),r=e=>{let{className:t,href:a,variant:r,hideText:o,onClick:s,icon:d,iconPlacement:c="left",name:u,...p}=e,m=(0,l.Z)("link-with-icon",t,{["link-with-icon--".concat(r)]:r,"link-with-icon--hide-text":
1o}),v=void 0!==a?"a":"button",h=()=>(0,n.cloneElement)(d,{className:(0,l.Z)(d.props.className,"link-with-icon__icon","link-with-icon__icon--".concat(c))});return(0,i.jsx)(v,{className:m,onClick:s,href:a,rel:"a"===v?"noopener noreferrer":void 0,...p,children:(0,i.jsxs)(i.Fragment,{children:["left"===c&&h(),void 0!==u&&(0,i.jsx)("span",{className:"link-with-icon__name","data-component":"LinkWithIcon",children:u}),"right"===c&&h()]})})}},95870:function(e,t,a){"use strict";a.d(t,{Z:function(){return i.Z}});var i=a(37363)},97120:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var i=a(31549),l=a(69193),n=a.n(l);function r(e){return e.src}function o(e){return(0,i.jsx)(n(),{unoptimized:!0,loader:r,...e,alt:e.alt})}},74329:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var i=a(31549),l=a(19734),n=a(44194),r=a(56321),o=a(71923),s=a(35937),d=a(87954),c=a(55865),u=function(e){let t,{options:a,close:l}=e,n=a.title?d.od.withTitle:void 0;switch(a.type){case c.C.success:t=d.ie.green;break;case c.C.info:t=d.ie.outline;break;case c.C.warning:t=d.ie.orange;break;case c.C.error:t=d.ie.red}let r="message-popup message-popup--".concat(a.type);return(0,i.jsx)(s.Z,{isOpen:!0,isSmallWidth:!0,hideCloseButton:a.hideCloseButton,onClick:l,onClose:l,dialogTitle:a.title,variant:n,theme:t,children:(0,i.jsxs)("div",{className:r,children:[a.body&&(0,i.jsx)("p",{className:"message-popup__body",children:a.body}),a.buttons&&(0,i.jsx)("div",{className:"message-popup__buttons",children:a.buttons.map((e,t)=>(0,i.jsx)(o.ZP,{variant:o.qh.primary,href:e.href,className:"message-popup__button",title:e.label,onClick:e.onClick,children:e.label},t))})]})})},p=a(99301),m=e=>{let{children:t}=e,a=(0,n.useRef)(null),[o,s]=(0,n.useState)([]);(0,n.useEffect)(()=>(a.current=document.createElement("div"),a.current.id="__message-popup__",document.body.appendChild(a.current),()=>{a.current&&document.body.removeChild(a.current)}),[]);let d=(0,n.useCallback)(e=>{s(t=>{var a,i;let l=t.filter(t=>t.id!==e.id);return((null===(a=e.options)||void 0===a?void 0:a.onClose)&&e.options.onClose(),null===(i=e.options)||void 0===i?void 0:i.preventClosing)?t:l})},[]),c=(0,n.useCallback)(()=>{o.forEach(d)},[o,d]),m=(0,n.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o.find(t=>t.options.title===e.title))return;let t={id:Math.random().toString(36).substr(2,9),options:e,close:()=>d(t)};return s(e=>[...e,t]),t.options.onOpen&&t.options.onOpen(),(0,l.yf)({event:"message_popup",type:e.type,title:e.title}),t},[o,d]),v=(0,n.useMemo)(()=>({messages:o,show:m,remove:d,removeAll:c}),[o,d,c,m]);return(0,i.jsxs)(p.Z.Provider,{value:v,children:[t,a.current&&(0,r.createPortal)((0,i.jsx)(i.Fragment,{children:o.length>0?o.map(e=>(0,i.jsx)(u,{...e},e.id)):null}),a.current)]})}},80611:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=a(31549),l=a(60669),n=a(14895),r=a(18871),o=a(71923),s=a(82846);function d(e){let{occupancies:t,withoutNumbers:a=!1}=e;return(0,i.jsx)("ul",{className:"occupancy-rooms-list","data-component":"OccupancyRoomsList",children:t.map((e,t)=>{let{roomName:l,roomCode:n}=e;return(0,i.jsxs)("li",{children:[!a&&"".concat(t+1,".")," ",l," (",n,")"]},t)})})}function c(e){var t,a;let{occupancies:c,allotment:u,isMobile:p,isDesktop:m,customTooltipPosition:v,withItemLink:h,onItemClick:f,className:g}=e,b=(0,n.En)(),x=c.length>1,y=(0,l.Z)("occupancy-rooms__label",{"occupancy-rooms__label--link":h});return(0,i.jsxs)("div",{className:g,"data-component":"OccupancyRooms",children:[p&&(0,i.jsx)(d,{occupancies:c,withoutNumbers:!0}),!p&&(0,i.jsx)(o.ZP,{className:y,onClick:function(e){f&&f(e)},children:(0,r.KX)(c,b)}),void 0!==u&&u<=5&&(0,i.jsx)("span",{className:"occupancy-rooms__allotment-label",children:(0,r.jQ)(u,b)}),x&&!p&&(0,i.jsx)(s.Z,{type:"tooltip",title:null==b?void 0:null===(t=b.localizedContent)||void 0===t?void 0:t["rooms.list.title"],content:(0,i.jsx)(d,{occupancies:c}),customClassName:"occupancy-rooms__info-button",renderAsDialogOnMobile:!0,buttonText:null==b?void 0:null===(a=b.localizedContent)||void 0===a?void 0:a["rooms.list.buttonText"],isMobile:p,position:v||(m?"left"
1:"auto"),tooltipModifiers:{preventOverflow:{boundariesElement:"viewport"}}})]})}},59430:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=a(31549),l=a(60669),n=a(44194),r=a(79372),o=a(47624),s=a(5206),d=a.n(s);function c(e){let{variant:t="classic",recommended:a=!1,recommendedLabel:s,flightClass:c="Economy",status:u,price:p,label:m,code:v,className:h,readOnly:f,isMobile:g,evacuation:b=!1,evacuationSeatTooltip:x,currency:y,onClick:_}=e,j="modern"===t,[w,N]=(0,n.useState)(!1),C=(0,n.useRef)(!1),k=c.toLowerCase(),S=(0,l.Z)(d().wrapper,d()[k],h,{[d()[u]]:void 0!==u,[d().modern]:j,[d().recommended]:j&&a&&"available"===u,[d().readOnly]:f,[d().evacuation]:b}),T=f||"available"!==u&&"selected"!==u,P=!j&&void 0!==p,Z=(P||j&&b&&x)&&!g&&!T&&!f;function L(){"function"==typeof _&&_({code:v,price:p})}let I=(0,i.jsxs)("button",{className:S,onClick:L,onTouchStart:e=>{C.current=(0,o.gn)()&&1===e.touches.length},onTouchMove:()=>{C.current=!1},onTouchCancel:()=>{C.current=!1},onTouchEnd:e=>{let t=C.current&&0===e.touches.length&&!T;C.current=!1,t&&(e.preventDefault(),L())},type:"button",disabled:T,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),"data-testid":f?void 0:"plane-seat-cell-".concat(u),"aria-hidden":j&&"corridor"!==u&&"disabled"!==u?void 0:T,"aria-label":j&&v?[v.replace(/\s/g,""),a?s:void 0,void 0!==p?"".concat(p," ").concat(null!=y?y:""):void 0].filter(Boolean).join(", "):void 0,"aria-pressed":j&&("available"===u||"selected"===u)?"selected"===u:void 0,"data-recommended":!!j&&!!a&&"available"===u||void 0,"data-component":"PlaneSeatCell",children:[j&&b&&(0,i.jsx)("span",{className:d().seatSurface,"aria-hidden":!0}),b&&(0,i.jsx)("span",{className:(0,l.Z)(j&&d().xlRibbon,!j&&"absolute -top-3 left-0 right-0 rounded-t bg-blue-charlotte text-xs leading-tight text-blue"),children:"XL"}),j&&"available"===u&&void 0!==p?"".concat(p):m]});return Z?(0,i.jsx)(r.Z,{content:(0,i.jsxs)("div",{className:"flex flex-col items-center",children:[P&&(0,i.jsxs)("b",{children:[p,y]}),b&&(0,i.jsx)("span",{children:x})]}),position:"top",interactionKind:"hover-target",contentDefinesWidth:!0,smallPopover:!0,isOpen:w,hoverCloseDelay:0,hoverOpenDelay:0,target:I,usePortal:!1}):I}},17060:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=a(31549),l=a(60669),n=a(44194),r=a(34435),o=a(59430),s=a(51687),d=a.n(s);let c=(e,t,a)=>{e(e=>{if(e.filter(e=>e&&e.code===t).length>0)return e.map(e=>e&&e.code!==t?e:null);let i=!1;for(let l=0;l<e.length;l++)if(null===e[l]){e[l]={code:t,price:a},i=!0;break}return i?e:[...e,{code:t,price:a}]})};function u(e){let{className:t,variant:a="classic",showRecommended:s=!1,recommendedLabel:u,seatMapData:p,flightClass:m,selectedSeatCodes:v,nonInfantParticipantsCount:h,isPreviewMode:f,isMobile:g,isLoading:b,flightType:x,onSeatClick:y,areSeatsTaken:_,evacuationSeatTooltip:j}
1=e,w="modern"===a,[N,C]=(0,n.useState)([]),[k,S]=(0,n.useState)([]);(0,n.useEffect)(()=>{_&&(C([]),S([]))},[_]);let T=(0,n.useCallback)(e=>{let{code:t,price:a}=e;b||y({code:t,price:a,flightType:x}),"DEPARTURE"===x?c(C,t,a):c(S,t,a)},[x,b,y]);return(0,i.jsx)("div",{className:(0,l.Z)(d().wrapper,w&&d().modern,t),"data-component":"PlaneSeatsMap",children:null==p?void 0:p.places.map((e,t)=>{let n=e.some(e=>e.evacuation);return(0,i.jsxs)("div",{className:(0,l.Z)(d().row,w&&e.length>8&&d().compactRow,w&&n&&d().xlRow),children:[n&&w&&(0,i.jsx)("div",{className:d().exits,"aria-hidden":!0,children:["left","right"].map(e=>(0,i.jsx)("svg",{width:"14",height:"27.3",viewBox:"0 0 14 27.3",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,i.jsx)("path",{d:"M7.3 8L1.9 13.8L7.3 19.6M1.9 13.8H13.3M1 0V27.3"})},e))}),n&&!w&&(0,i.jsxs)("div",{className:"-mx-2 flex items-center justify-between bg-white py-1 text-silverSand",children:[(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"M6 8L2 12L6 16"}),(0,i.jsx)("path",{d:"M2 12H22"})]}),(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("path",{d:"M18 8L22 12L18 16"}),(0,i.jsx)("path",{d:"M2 12H22"})]})]}),(0,i.jsx)("div",{className:d().seats,children:e.map((n,c)=>{var b,y;let _;let C=-1===v.indexOf(n.code),S="DEPARTURE"===x?N:k;_=C?S.indexOf(null)>-1?S.indexOf(null):v.length:S.map(e=>e&&e.code).indexOf(n.code);let P=w&&_<0?v.indexOf(n.code):w&&_>=h?0:_,Z=null===(b=n.prices)||void 0===b?void 0:b[P],L=(0,r.jK)(p.currency),I=n.status,O=v.length===h||f;return v.includes(n.code)&&(f||(O=!1),I="selected"),(0,i.jsx)(o.Z,{className:(0,l.Z)(w&&0===t&&n.code&&d().columnLabel,w&&e.length>8&&d().compactSeat,w&&e.length>8&&"corridor"===n.status&&(t>0||!n.code)&&d().compactCorridor),variant:a,recommended:s&&!0===n.recommended&&n.available&&!n.reserved,recommendedLabel:u,flightClass:m,status:I,readOnly:O,price:Z,currency:L,code:n.code,label:n.code.replace(/\s/,""),evacuation:null!==(y=n.evacuation)&&void 0!==y&&y,evacuationSeatTooltip:j,isMobile:g,onClick:T},"".concat(n.code,"-").concat(c,"-").concat(I))})})]},t)})})}},17208:function(e,t,a){"use strict";a.d(t,{Z:function(){return i.Z}});var i=a(94681)},78054:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var i=a(72580),l=a(44194),n=a(7862),r=a.n(n);let o={instant:r().bool,children:r().node};class s extends l.Component{componentDidMount(){let{instant:e}=this.props;(0,i.Z)({scrollToTop:!0,instant:e})}render(){return this.props.children}}s.propTypes=o,s.defaultProps={instant:!1,children:null};var d=s},57590:function(e,t,a){"use strict";a.d(t,{Bt:function(){return c},HS:function(){return o},Qi:function(){return d},mV:function(){return u},pQ:function(){return s}});var i=a(98629),l=a(7862),n=a.n(l),r=a(41020);let o=(e,t)=>{if(r.p[e])return r.p[e].type;let a=Object.values(r.p).find(a=>e==="tab-".concat(t,"-").concat((0,i.lV)(a.type)));return a?a.type:null},s=(e,t)=>"tab-".concat(t,"-").concat((0,i.lV)(e)),d=n().shape({type:n().string,name:n().oneOfType([n().string,n().object]),content:n().node,label:n().string}),c={items:n().arrayOf(d).isRequired,id:n().string.isRequired,className:n().string,selectedTabId:n().string,onChange:n().func},u={className:null,onChange:()=>{}}},69794:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var i=a(31549),l=a(95265),n=a(11984),r=a(57590);let o=e=>{let{items:t,id:a,className:o,onChange:s,selectedTabId:d}=e;return(0,i.jsx)(l.m,{id:a,className:o,onChange:e=>s(e,a),selectedTabId:d,animate:!1,renderActiveTabPanelOnly:!0,children:t.map((e,t)=>(0,i.jsx)(n.O,{id:(0,r.pQ)(e.type,a),panel:e.content,disabled:e.disabled||!1,children:e.childrenData||e.name},t))})};o.propTypes=r.Bt,o.defaultProps=r.mV;var s=o},41020:function(e,t,a){"use strict";a.d(t,{p:function(){return l}});var i=a(4581);let l={roomChoice:{type:"roomChoice",required:[i.DropdownTypes.hotelCard.airport,i.DropdownTypes.hotelCard.duration,i.DropdownTypes.hotelCard.travelDate],hidden:[i.DropdownTypes.hotelCard.food]},allOffers:{type:"allOffers"}
1,lowestPrices:{type:"lowestPrices"}}},97500:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=a(31549),l=a(60669),n=a(92430),r=a(44194),o=a(47624),s=a(2861),d=a(2054);function c(e){let{type:t,children:a,isHalfWidth:c,hasError:u,withCarousel:p,isSelected:m,isHorizontal:v,isInDialog:h,status:f,roomIndex:g,validationMessage:b,orderedMessage:x}=e,y=(0,s.L)(),_=(0,n.useRouter)(),j=(0,r.useRef)(null),w="ORDERED"===f;(0,r.useEffect)(()=>{void 0!==_.query.scrollToUpsell&&_.query.scrollToUpsell===t&&null!==j.current&&((0,o.Yk)()?requestIdleCallback(()=>{null!==j.current&&j.current.scrollIntoView({behavior:"smooth"})}):(0,o.dj)()?requestAnimationFrame(()=>{null!==j.current&&j.current.scrollIntoView({behavior:"smooth"})}):j.current.scrollIntoView(),(0,d.Zx)(_,"scrollToUpsell"))},[_,_.query.scrollToUpsell,t]);let N=(0,l.Z)("upsell-wrapper col-12","upsell-wrapper--".concat(y),{"upsell-wrapper--within-room-group":null!=g,"col-md-6":c}),C=(0,l.Z)("upsell","upsell--".concat(t),"upsell--".concat(y),{"upsell--error":u,"upsell--is-selected":m,"upsell--half-width":c,"upsell--with-carousel":p,"upsell--is-horizontal":v,"upsell--is-in-dialog":h,"upsell--is-ordered":w});return(0,i.jsx)("div",{className:N,id:"upsell-".concat(t,"-").concat(g||0),"data-testid":"upsell-".concat(t),ref:j,"data-component":"Upsell",children:(0,i.jsxs)("div",{className:C,children:[w&&(0,i.jsx)("div",{className:"upsell__ordered-message",children:null!=x?x:"Transakcja w trakcie przetwarzania - księgowanie płatności"}),u&&(0,i.jsx)("div",{className:"upsell__validation-message",children:null!=b?b:"Wybierz jedną z opcji"}),(0,i.jsx)("div",{className:"upsell__container",children:a})]})})}},93789:function(e,t,a){"use strict";a.d(t,{Z:function(){return i.Z}});var i=a(14693)},9989:function(e,t,a){"use strict";a.d(t,{Z:function(){return i.Z}});var i=a(24161)},24076:function(e,t,a){"use strict";a.d(t,{Z:function(){return i.Z}});var i=a(41598)},61278:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=a(31549),l=a(14895),n=a(6844),r=a(3934),o=a(77494),s=a(63648),d=a(15169),c=a(76577),u=a(44516),p=a(22630),m=a(52998),v=a(98589),h=a(40685),f=a(60669),g=a(71923),b=a(92507);let x=e=>{var t,a;let x,y,{label:_,status:j,type:w,href:N,onClick:C,roomIndex:k,hideButton:S,variant:T,buttonLabel:P,className:Z}=e,L=T!==b.JP.checkout,I=(0,l.En)(),O=(0,f.Z)("upsell-icon","upsell-icon--".concat(j),{["upsell-icon--".concat(T)]:T}),E=(0,f.Z)("upsell-icon__icon",{"upsell-icon__icon--flipHorizontally":"aircraft"===b.En[w]}),R=(0,f.Z)(Z,{"upsell-icon__wrapper":!L}),D={className:O,"data-testid":"upsell-icon"};switch(L&&(D.href=N),w){case b.hc.insurance:x=h.default;break;case b.hc.allInclusive:x=r.default;break;case b.hc.firstMinute:x=p.default;break;case b.hc.baggageSki:x=v.default;break;case b.hc.baggageChecked:x=d.default;break;case b.hc.flightClass:x=n.default;break;case b.hc.planeSeatsReservation:x=m.default;break;case b.hc.transfer:x=o.default;break;case b.hc.class:x=n.default;break;case b.hc.facultativeTrips:x=s.default}switch(j){case b.xn.sold:y=c.default;break;case b.xn.available:y=u.default}return(0,i.jsxs)("div",{className:R,children:[(0,i.jsxs)(L?"a":"div",{...D,children:[(0,i.jsxs)("div",{className:"upsell-icon__icon-wrapper",children:[x&&(0,i.jsx)("span",{className:E,children:(0,i.jsx)(x,{})}),y&&(0,i.jsx)("span",{className:"upsell-icon__icon-circle",children:(0,i.jsx)(y,{})})]}),(0,i.jsx)("div",{className:"upsell-icon__text",children:void 0!==k?(0,i.jsxs)("div",{className:"flex flex-wrap justify-center gap-x-1 md:flex-col",children:[(0,i.jsx)("span",{children:_}),(0,i.jsxs)("span",{children:["(",null!==(a=null==I?void 0:null===(t=I.localizedContent)||void 0===t?void 0:t["upsell.roomNumber"])&&void 0!==a?a:"Pok\xf3j nr"," ",k+1,")"]})]}):_})]}),!L&&!S&&"SOLD"!==j&&(0,i.jsx)(g.ZP,{variant:g.qh.primary,size:g.Ph.small,onClick:C,className:"upsell-icon__button",testId:"upsell-icon-button-".concat(w),children:P})]})};x.propTypes=b.qQ,x.defaultProps=b.HW;var y=x},57664:function(e,t,a){"use strict";a.d(t,{Z:function(){return i.Z}});var i=a(49527)},8723:function(e,t,a){"use strict";a.d(t,{q:function(){return s}});var i=a(48645),l=a(78261),n=a(5715),r=a(28222),o=a(10054);function s(e){let t;let{data:a}=(0,o.jK)(),{watch:s}=(0,i.Gc)(),d=e||s("channelType");if(void 0!==d)switch(d){case r.Tv.p24:t="P24";break;case r.Tv.electronicFundsTransfer:t="PAYU"}let c="".concat(n.config.urls.checkout.reservation.availableBanks,"?paymentCarrier=").concat(t);return(0,l.ZP)(void 0===a||void 0===t?null:[c,n.pc])}},43285:function(e,t,a){"use strict";a.d(t,{VN:function(){return f},_4:function(){return h},ft:function(){return v},zs:function(){return g}});var i=a(5715),l=a(10824),n=a(92507),r=a(74922),o=a(20852),s=a(19734),d=a(3657),c=a(44194),u=a(2052),p=a(78261),m=a(10054);function v(){let[e,t]=(0,c.useState)(!1),a=(0,u.v9)(r.o5),{data:v}=(0,m.jK)(),{setPaymentData:h}=(0,c.useContext)(l.Z),f=(0,o.p)(),{data:g,isLoading:b,isValidating:x,error:y,mutate:_}=(0,p.ZP)(void 0===v?null:i.config.urls.checkout.reservation.price,e=>f(e,{appendCartId:!0,withHeaders:!0}),{onSuccess(i){var l;e||(function(e,t){var a,i,l,n,r,o,c,u,p,m,v;let h=["offer","paymentChannels","paymentVariants","price","upsellGroups"],f=["tui_season"],g=new URL(window.location.href),b=g.searchParams.get("place"),x=g.searchParams.get("promotedUpsellCodes"),y={event:"Offer Ready",cartUuid:(0,d.PR)("cartId"),travel_totalvalue:e.formattedFullPrice,guaranteeFund:null==e?void 0:null===(a=e._embedded)||void 0===a?void 0:a.guaranteeFund};if(b){if("main_cta"===b)y.insurance_place="main_button";else if("second_cta"===b)y.insurance_place="second_button";else if("popup_no_insurance"===b)y.insurance_place="popup_no_insurance";else if("popup"===b&&x){let e=x.split(",").map(e=>{var a,i;let l;if(Array.isArray(null==t?void 0:null===(a=t._embedded)||void 0===a?void 0:a.upsellGroups)){e:for(let a of t._embedded.upsellGroups)if(Array.isArray(null===(i=a._embedded)||void 0===i?void 0:i.upsellVariants)&&0!==a._embedded.upsellVariants.length){for(let t of a._embedded.upsellVariants)if(t.code===e){l=t.title;break e}}return l}}
1).filter(Boolean);0!==e.length&&(y.insurance_place="popup_".concat(e.join(",")))}}Object.keys(t).forEach(e=>{"_links"!==e&&("_embedded"===e?(h.forEach(a=>{y[a]=t[e][a]}),t._embedded.dataLayer&&f.forEach(e=>{y[e]=t._embedded.dataLayer[e]})):y[e]=t[e])});let _=void 0!==t.ryanairSessionId;if(_){y.data=y.data||{},y.data.ryanair={isRyanairFlight:_,sessionId:null==t?void 0:t.ryanairSessionId,sessionCreatedTime:null==t?void 0:t.ryanairSessionCreatedTime},void 0!==(null==t?void 0:null===(l=t._embedded)||void 0===l?void 0:null===(i=l.price)||void 0===i?void 0:i.price)&&(y.data.ryanair.price=Number(t._embedded.price.price)+Number((null===(v=y.guaranteeFund)||void 0===v?void 0:v.price)||0)),void 0!==(null==y?void 0:null===(o=y.data)||void 0===o?void 0:null===(r=o.priceInformationData)||void 0===r?void 0:null===(n=r.peakworkPriceData)||void 0===n?void 0:n.amount)&&(y.data.ryanair.peakworkPrice=y.data.priceInformationData.peakworkPriceData.amount);let e=null==t?void 0:null===(m=t._embedded)||void 0===m?void 0:null===(p=m.offer)||void 0===p?void 0:null===(u=p._links)||void 0===u?void 0:null===(c=u.offerUrl)||void 0===c?void 0:c.href;if(e){let t=e.split("/").pop(),a=(0,s.IC)("pa")[t];a&&(y.data.ryanair.hotelCardPrice=Number(a))}}(0,s.yf)(y)}(i,v),t(!0)),void 0!==(null==i?void 0:null===(l=i._embedded)||void 0===l?void 0:l.paymentVariants)&&h(e=>({...e,paymentVariants:i._embedded.paymentVariants})),function(e,t){var a,i,l,r,o,d;let c=null==e?void 0:null===(i=e.body)||void 0===i?void 0:null===(a=i._embedded)||void 0===a?void 0:a.upsellPrices,u=null==e?void 0:null===(r=e.body)||void 0===r?void 0:null===(l=r._embedded)||void 0===l?void 0:l.guaranteeFund,p=[];Array.isArray(c)&&c.length>0&&c.forEach(e=>{let a=null==t?void 0:t.find(t=>t.type===n.hc.allInclusive&&t.roomIndex===e.roomIndex);if(a){var i,l,r,o;let t=null==a?void 0:null===(l=a._embedded)||void 0===l?void 0:null===(i=l.upsellVariants)||void 0===i?void 0:i.find(e=>e.selected),n=null!==(r=null==a?void 0:a.title)&&void 0!==r?r:null,s=null!==(o=null==t?void 0:t.formattedPrice)&&void 0!==o?o:null;if(null!==n&&e.label.toLowerCase().includes(n.toLowerCase())){let t=e.label.split(", ").filter(e=>!e.toLowerCase().includes(n.toLowerCase()))[0],a=parseInt(e.formattedPrice,10)-parseInt(s,10);p.push({name:t,price:a.toString(),roomIndex:e.roomIndex}),p.push({name:n,price:s,roomIndex:e.roomIndex});return}}p.push({name:e.label,price:e.formattedPrice,roomIndex:e.roomIndex})}),u&&p.push({name:u.label,price:u.price.toString()});let m={advancedPayment:null==e?void 0:null===(o=e.body)||void 0===o?void 0:o.formattedAdvancePrice,price:null==e?void 0:null===(d=e.body)||void 0===d?void 0:d.formattedFullPrice,products:p};(0,s.yf)({event:"cart_status_clear",cart_status:null}),(0,s.yf)({event:"cart_status",cart_status:m})}(i,a)}});return{data:null==g?void 0:g.body,headers:null==g?void 0:g.headers,isLoading:b,isValidating:x,error:y,mutate:_}}function h(){var e,t;let{data:a}=v();return null==a?void 0:null===(t=a._embedded)||void 0===t?void 0:null===(e=t.paymentVariants)||void 0===e?void 0:e.find(e=>e.selected)}function f(){var e,t;let{data:a}=v();return null==a?void 0:null===(t=a.facultativeTrips)||void 0===t?void 0:null===(e=t.map(e=>e.uuid))||void 0===e?void 0:e.join(",")}function g(){var e,t,a,i;let l,n,r,o;let{data:s,headers:d}=v(),c=null==s?void 0:null===(t=s._embedded)||void 0===t?void 0:null===(e=t.paymentVariants)||void 0===e?void 0:e.find(e=>e.selected),u=null==s?void 0:null===(i=s._embedded)||void 0===i?void 0:null===(a=i.paymentVariants)||void 0===a?void 0:a.find(e=>"advance_payment"===e.code);return(null==c?void 0:c.code)==="order_option"?(l=null==s?void 0:s.formattedFullPrice,n=null==c?void 0:c.formattedPrice,r=null==c?void 0:c.description):(l=null==c?void 0:c.formattedPrice,r=null==u?void 0:u.description),d&&Number.isNaN(o=parseFloat(d.get("x-display-conversion-rate")))&&(o=void 0),{optionPrice:n,formattedPrice:l,conversionRate:o,advancePaymentPercentage:null==c?void 0:c.advancePaymentPercentage,advancePaymentAmount:null==c?void 0:c.advancePaymentAmount,advancePaymentPrice:null==u?void 0:u.advancePaymentAmount,advancePaymentDescription:r,code:null==c?void 0:c.code}}},92671:function(e,t,a){"use strict";a.d(t,{t:function(){return l}});var i=a(44194);function l(e,t){(0,i.useEffect)(()=>{let a=a=>{let i=null==e?void 0:e.current;!i||i.contains(a.target)||t(a)};return document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)}},[t,e])}},7854:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var i=a(31549),l=a(7368),n=a(60669),r=a(34971),o=a(92430),s=a(44194),d=a(54737),c=a(43645),u=a(32824),p=a(97796),m=a(51974),v=a(10054),h=a(76577),f=a(94155);let g=[{id:0,name:"offer",clickable:{always:!0,whenActive:null}},{id:1,name:"recommendations",clickable:{always:!1,whenActive:"data"}},{id:2,name:"data",clickable:{always:!1,whenActive:null}},{id:3,name:"orderPlaced",clickable:{always:!1,whenActive:null},hidden:!0},{id:4,name:"payment",clickable:{always:!1,whenActive:null}},{id:5,name:"paymentConfirm",clickable:{always:!1,whenActive:null},hidden:!0},{id:6,name:"paymentSuccess",clickable:{always:!1,whenActive:null},hidden:!0},{id:7,name:"paymentFailed",clickable:{always:!1,whenActive:null},hidden:!0}];var b=function(e){var t,a,b,x;let{labels:y}
1=e,[_,j]=(0,s.useState)(g[0]),w=(0,u.gz)(),N=(0,p.t)(),C=(0,u.Qx)(),{data:k}=(0,m.fV)(),S=(0,v.Lo)(),{encodedData:T}=(0,o.useRouter)().query,P=(0,r.useSearchParams)(),Z=(0,d.vc)(),L=[null==S?void 0:null===(a=S._embedded)||void 0===a?void 0:null===(t=a.departureFlight)||void 0===t?void 0:t.airlineCode,null==S?void 0:null===(x=S._embedded)||void 0===x?void 0:null===(b=x.returnFlight)||void 0===b?void 0:b.airlineCode].includes("FR"),I="string"==typeof(null==k?void 0:k.ryanairIframeUrl),O=!1;try{O="orderPlaced"===w&&void 0!==JSON.parse(atob(T)).sessionCreatedTime}catch(e){(0,l.uT)("Failed to parse encodedData in ProgressBar",{extra:{error:e,encodedData:T}}),O=!1}let E=L||I||O;if(E&&Z){let e=g.find(e=>"paymentConfirm"===e.name);e&&(e.hidden=!1)}(0,s.useEffect)(()=>{if(null!==w){let e=g.find(e=>e.name===w);e&&j(e)}},[w]);let R=g.filter(e=>!e.hidden),D=null==P?void 0:P.get("e"),z="paymentFailed"===w||"orderPlaced"===w&&"1"===D;return(0,i.jsx)("div",{className:"progress-bar","data-component":"ProgressBar",children:(0,i.jsx)("div",{className:"container",children:(0,i.jsx)("div",{className:"row",children:(0,i.jsx)("div",{className:"col-12",children:(0,i.jsx)("div",{className:"progress-bar__wrapper",children:R.map(e=>{let t=0===e.id,a=e.id===R.length,l=a&&z,r=l||e.id===_.id&&!a,o=!1,s=!l&&e.id<_.id;"payment"===e.name&&"paymentSuccess"===w&&(o=!k,s=(null==k?void 0:k.showClock)===!0,r=!o&&!s);let d=!E&&(e.clickable.always||e.clickable.whenActive===_.name),u=(0,n.Z)("progress-bar__item",{"progress-bar__item--first":t,"progress-bar__item--last":a,"progress-bar__item--active":r,"progress-bar__item--pending":o,"progress-bar__item--done":s,"progress-bar__item--failed":l,"progress-bar__item--clickable":d});return"offer"!==e.name||E?(0,i.jsxs)("button",{type:"button",className:u,disabled:!d,onClick:()=>d&&void("recommendations"===e.name&&C("recommendations")),"data-testid":"progress-bar-".concat(e.name),children:[(0,i.jsx)("span",{className:"progress-bar__item-label",children:null==y?void 0:y[e.name]}),(0,i.jsxs)("div",{className:"progress-bar__item-icon",children:[s&&(0,i.jsx)(h.default,{}),o&&(0,i.jsx)(c.Z,{isLoading:!0}),l&&(0,i.jsx)(f.Z,{className:"h-[20px] w-[20px]"})]})]},e.id):(0,i.jsxs)("a",{href:N,className:u,"data-testid":"progress-bar-offer",children:[(0,i.jsx)("span",{className:"progress-bar__item-label",children:null==y?void 0:y[e.name]}),(0,i.jsx)("div",{className:"progress-bar__item-icon",children:s&&(0,i.jsx)(h.default,{})})]},e.id)})})})})})})},x=function(e){var t;let a={offer:e["navigation.offer.label"],recommendations:e["navigation.recommendations.label"],data:e["navigation.data.label"],payment:e["navigation.payment.label"],paymentConfirm:null!==(t=e["navigation.paymentConfirm.label"])&&void 0!==t?t:"Potwierdzenie przelotu",paymentSuccess:e["navigation.finish.label"]};return(0,i.jsx)(b,{labels:a})}},72580:function(e,t,a){"use strict";var i=a(47624);t.Z=e=>{let t,{event:a,elementId:l,optionalMargin:n,scrollToTop:r=!1,instant:o=!1}=e;if(void 0!==l){let e=document.querySelector(l);e&&(t=e.getBoundingClientRect().top+window.pageYOffset-(null!=n?n:0))}if(r&&(t=0),void 0===t)return;a&&a.preventDefault();let s={behavior:o?"auto":"smooth",left:0,top:t};if((0,i.Ax)()){if("scrollBehavior"in document.documentElement.style)window.scrollTo(s);else{var d,c;window.scrollTo(null!==(d=s.left)&&void 0!==d?d:0,null!==(c=s.top)&&void 0!==c?c:0)}}}},57578:function(e,t,a){"use strict";function i(e){return new Promise(t=>setTimeout(t,e))}a.d(t,{_:function(){return i}})},60765:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=a(31549),l=a(82959),n=a(87113);let r={email:/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-zA-Z]{2,6}(?:\.[a-zA-Z]{2})?)$/},o=e=>void 0!==e,s=e=>o(e)&&r.email.test(e);var d=a(44194),c=a(48645),u=a(49660),p=a(5856),m=a(14895),v=a(26951),h=a(27986);function f(e){var t,a,r,o,f,g,b,x;let{data:y,index:_}=e,{register:j}=(0,c.Gc)(),w=(0,m.En)(),N=null===(t=y.extraCustomerData)||void 0===t?void 0:t.properties,C=null!==(b=null===(a=y.extraCustomerData)||void 0===a?void 0:a.required)&&void 0!==b?b:[],k=void 0!==N&&Object.values(N).length>0,S=null===(r=y.participantSchema)||void 0===r?void 0:r.properties,T=null!==(x=null===(o=y.participantSchema)||void 0===o?void 0:o.required)&&void 0!==x?x:[],P=void 0!==S&&Object.values(S).length>0;return k||P?(0,i.jsx)(u.Z,{title:"".concat((null==w?void 0:null===(f=w.localizedContent)||void 0===f?void 0:f["facultative.trip.details.required.info.prefix"])||"Dane wymagane ze względu na wycieczkę:"," ").concat(y.activityName),variant:"mytui-payment-required-info",children:(0,i.jsxs)("div",{className:"flex flex-col","data-component":"ParticipantsRequiredInfo",children:[(0,i.jsx)("input",{type:"hidden",...j("tripRequiredInfos.".concat(_,".activityUuid"),{value:y.activityUuid,shouldUnregister:!0})}),k&&Object.entries(N).sort((e,t)=>
1{let[a,i]=e,[l,n]=t;return i.propertyOrder-n.propertyOrder}).map((e,t)=>{var a,r;let[o,s]=e,c=void 0!==s.enum&&2===s.enum.length,u=void 0!==s.enum&&s.enum.length>2,m=void 0===s.enum||0===s.enum.length;return(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)("input",{type:"hidden",...j("tripRequiredInfos.".concat(_,".customerInfos.").concat(t,".id"),{value:o,shouldUnregister:!0})}),c&&(0,i.jsx)(l.E,{name:"tripRequiredInfos.".concat(_,".customerInfos.").concat(t,".value"),label:"".concat(s.title).concat(C.includes(o)?"*":""),rules:{required:{value:C.includes(o),message:"Pole wymagane."}},children:null===(a=s.enum)||void 0===a?void 0:a.map((e,t)=>{var a;return(0,i.jsx)(n.Y8,{value:e,children:null===(a=s.enum_titles)||void 0===a?void 0:a[t]},e)})}),u&&(0,i.jsxs)(p.Z,{isSelect:!0,name:"tripRequiredInfos.".concat(_,".customerInfos.").concat(t,".value"),label:"".concat(s.title).concat(C.includes(o)?"*":""),registerOptions:{required:{value:C.includes(o),message:"Pole wymagane."}},children:[(0,i.jsx)("option",{value:"",children:"Wybierz"}),null===(r=s.enum)||void 0===r?void 0:r.map((e,t)=>{var a;return(0,i.jsx)("option",{value:e,children:null===(a=s.enum_titles)||void 0===a?void 0:a[t]},e)})]}),m&&(0,i.jsx)(p.Z,{name:"tripRequiredInfos.".concat(_,".customerInfos.").concat(t,".value"),label:"".concat(s.title).concat(C.includes(o)?"*":""),registerOptions:{required:{value:C.includes(o),message:"Pole wymagane."}}})]},o)}),P&&(null===(g=y.products)||void 0===g?void 0:g.map((e,t)=>{var a;return(0,i.jsxs)("div",{className:"border border-solid border-gray-altoLight",children:[(0,i.jsx)("p",{className:"border-b border-solid border-gray-altoLight px-[10px] py-[8px] text-sm font-bold leading-none text-blue",children:e.name}),(0,i.jsx)("div",{className:"flex flex-col gap-[18px] p-[15px]",children:Array.from({length:null!==(a=e.quantity)&&void 0!==a?a:1}).map((e,a)=>{let r=a+1;return(0,i.jsxs)("div",{className:"flex flex-col gap-y-[8px]",children:[(0,i.jsxs)("div",{className:"flex w-full gap-[6px]",children:[(0,i.jsxs)("div",{className:"relative flex h-[22px]",children:[(0,i.jsx)(h.Z,{className:"h-[22px] w-[18px] shrink-0"}),(0,i.jsx)("span",{className:"absolute left-1/2 top-[1px] -translate-x-1/2 font-bold leading-[22px] text-blue",children:r})]}),(0,i.jsxs)("span",{className:"block grow border-b border-solid border-gray-altoLight pb-[3px] font-bold text-blue",children:["Dane ",r,". uczestnika"]})]}),(0,i.jsx)("div",{className:"grid gap-[8px] md:grid-cols-3",children:Object.entries(S).sort((e,t)=>{let[a,i]=e,[l,n]=t;return i.propertyOrder-n.propertyOrder}).map(e=>{var a,r;let[o,c]=e,u=void 0!==c.enum&&2===c.enum.length,m=void 0!==c.enum&&c.enum.length>2,h=void 0===c.enum||0===c.enum.length,f="email"===c.format?{validate:(0,v.b0)(s,'Podaj poprawny adres e-mail, kt\xf3ry zawiera "@" i nie zawiera polskich znak\xf3w.')}:{required:{value:T.includes(o),message:"Pole wymagane."}};return(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)("input",{type:"hidden",...j("tripRequiredInfos.".concat(_,".participantInfos.").concat(t,".id"),{value:o,shouldUnregister:!0})}),(0,i.jsx)("input",{type:"hidden",...j("tripRequiredInfos.".concat(_,".participantInfos.").concat(t,".ref"),{value:t,shouldUnregister:!0})}),u&&(0,i.jsx)(l.E,{name:"tripRequiredInfos.".concat(_,".participantInfos.").concat(t,".value"),label:"".concat(c.title).concat(T.includes(o)?"*":""),rules:f,children:null===(a=c.enum)||void 0===a?void 0:a.map((e,t)=>{var a;return(0,i.jsx)(n.Y8,{value:e,children:null===(a=c.enum_titles)||void 0===a?void 0:a[t]},e)})}),m&&(0,i.jsxs)(p.Z,{isSelect:!0,name:"tripRequiredInfos.".concat(_,".participantInfos.").concat(t,".value"),label:"".concat(c.title).concat(T.includes(o)?"*":""),registerOptions:f,children:[(0,i.jsx)("option",{value:"",children:"Wybierz"}),null===(r=c.enum)||void 0===r?void 0:r.map((e,t)=>{var a;return(0,i.jsx)("option",{value:e,children:null===(a=c.enum_titles)||void 0===a?void 0:a[t]},e)})]}),h&&(0,i.jsx)(p.Z,{name:"tripRequiredInfos.".concat(_,".participantInfos.").concat(t,".value"),label:"".concat(c.title).concat(T.includes(o)?"*":""),registerOptions:f})]},o)})})]},a)})})]},t)}))]})},y.activityUuid):null}},20861:function(e,t,a){"use strict";a.d(t,{Z:function(){return w}});var i=a(31549),l=a(60669),n=a(44194),r=a(83560),o=a(79372),s=a(62113),d=a(17630),c=a(4567),u=a(76577),p=a(27885),m=a(8182),v=a(77646),h=a(96519),f=a(32657),g=a(48970),b=a(86258),x=a(13031),y=a(57418),_=a(28222);function j(e){var t;let{isSelected:a,iconUrl:l,data:n,Icons:o,iconStyle:s}=e;return(0,i.jsxs)("div",{className:"payment-method-item__content","data-component":"PaymentMethodItem",children:[!l&&(0,i.jsx)("div",{className:"payment-method-item__select-indicator"}),l&&(0,i.jsx)(r.Z,{width:109,height:57,src:l,alt:null!==(t=n.title)&&void 0!==t?t:n.name}),!l&&(0,i.jsxs)("div",{className:"payment-method-item__wrapper",children:[(0,i.jsxs)("span",{className:"payment-method-item__label","data-testid":"payment-method-label",children:[n.name,a&&(0,i.jsx)(u.default,{className:"payment-method-item__checkmark"})]}),(0,i.jsx)("div",{className:"payment-method-item__icons",children:o.map((e,t)=>(0,i.jsx)(e,{className:"payment-method-item__icon","data-testid":"payment-method-icon",style:s},t))})]})]})}function w(e){var t;let a;let{data:r,onSelect:u,iconUrl:w,isInvalid:N,reasonForDisabling:C,deselect:k,children:S,description:T}=e,P=null!==(t=r.selected)&&void 0!==t&&t,Z=void 0!==C,L=(0,l.Z)("payment-method-item",{"payment-method-item--selected":P,"payment-method-item--invalid":N,"payment-method-item--disabled":Z,"payment-method-item--full-width":r.type===_.Tv.payAtTuiOffice&&P}),I=[];switch((0,n.useEffect)(()=>{r.selected&&void 0!==C&&void 0!==k&&k()},[r,r.selected,k,C]),r.type){case _.Tv.transferTraditional:I=[x.Z];break;case _.Tv.sofort:I=[b.Z];break;case _.Tv.p24CreditCard:case _.Tv.creditcard:case _.Tv.imojeCreditCard:I=[y.Z,h.Z];break;case _.Tv.imoje:I=[m.Z];break;case _.Tv.p24:case _.Tv.electronicFundsTransfer:I=[g.Z];break;case _.Tv.imojeBlik:case _.Tv.payuBlik:I=[c.Z];break;case _.Tv.payAtTuiOffice:I=[f.Z];break;case _.Tv.installments:case _.Tv.installmentsCZ:I=[v.Z];break;case _.Tv.imojeWallet:I=[d.Z,p.Z];break;default:I=[]}return(0,i.jsxs)("div",{className:L,children:[(0,i.jsx)("button",{type:"button",className:"payment-method-item__button",onClick:function(){Z||u()},"data-testid":"payment-method",children:Z?(0,i.jsx)(o.Z,{interactionKind:"hover",customClassName:"payment-method-item__tooltip",modifiers:{offset:{offset:"0, 8"}},target:(0,i.jsx)(j,{isSelected:P,iconUrl:w,data:r,Icons:I,iconStyle:a}),variant:s.uY.slim,content:C}):(0,i.jsx)(j,{isSelected:P,iconUrl:w,data:r,Icons:I,iconStyle:a})}),T&&(0,i.jsx)("div",{className:"payment-method-item__description",children:T}),P&&S]})}},7102:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var i=a(31549);function l(e){let{title:t,content:a}=e;return(0,i.jsxs)("div",{className:"flex items-baseline border-b border-solid border-[#0d2a5e] border-opacity-25 py-[4.5px] text-sm text-black","data-component":"FlightInfoDetail
1sItem",children:[void 0!==t&&(0,i.jsxs)("span",{children:[t,"\xa0"]}),(0,i.jsx)("span",{className:"font-bold",children:a})]})}},16923:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var i=a(31549),l=a(41241),n=a(26131);function r(e){let{iconName:t,title:a,time:r,content:o}=e,s="airplane-departure"===t?n.default:l.Z;return(0,i.jsxs)("div",{className:"inline-flex items-start leading-none","data-component":"FlightInfoHours",children:[(0,i.jsx)(s,{className:"mr-2.5 h-[30px] w-[30px] shrink-0 fill-blue"}),(0,i.jsxs)("p",{className:"mb-0",children:[(0,i.jsx)("span",{className:"sr-only",children:a}),(0,i.jsx)("span",{className:"block text-base font-bold leading-none",children:r}),(0,i.jsx)("span",{className:"text-sm font-bold leading-none text-black",children:o})]})]})}},92945:function(e,t,a){"use strict";a.d(t,{Z:function(){return S}});var i=a(31549),l=a(60669),n=a(44194),r=a(5715),o=a(86422),s=a(87954),d=a(82846),c=a(37363),u=a(59430),p=a(17060),m=a(80712),v=a(69794),h=a(62113),f=a(55114),g=a(48221),b=a(14895),x=a(18871),y=a(41241),_=a(26131),j=a(76577),w=a(44516),N=a(51490),C=a(26768);let k="Niewiele Ci zabrakło. Ktoś właśnie zarezerwował te miejsca. Dokonaj wyboru ponownie.";function S(e){var t,a,S,T,P,Z,L,I,O,E;let{variant:R="classic",showRecommended:D=!1,recommendedLabel:z,recommendedNotice:M,priceHint:V,totalPriceLabel:A,flightClass:B,seatMapResourceList:F,tabData:H,labels:q,isPreviewMode:U,participants:W,selectedSeats:K,onSeatClick:G,onSubmit:X,closeDialog:Y,clearSelectedSeats:Q,updateSeatMap:$,currency:J}=e,ee="modern"===R,et=(0,b.En)(),{currentType:ea}=(0,g.h)(),ei="smallMobile"===ea||"mobile"===ea,[el,en]=(0,n.useState)(!1),[er,eo]=(0,n.useState)(!1),es=Object.values(H).filter(e=>"available"===e.status),[ed,ec]=(0,n.useState)(es[0]);function eu(e){let t=Object.values(H).find(t=>t.id===e);void 0!==t&&ec(t)}async function ep(){if(1===es.length||(null==ed?void 0:ed.type)==="RETURN"){if(U&&"function"==typeof Y)Y();else{en(!0);let e=await X();if(null==e?void 0:e.evacuationDisclaimerPopup){en(!1);return}(null==e?void 0:e.status)!=="SUCCESS"&&(eo(!0),eu("tab-plane-seats-reservation-tabs-DEPARTURE"),Q(),$()),en(!1)}}else eo(!1),eu("tab-plane-seats-reservation-tabs-RETURN")}let em=null!==(T=null==F?void 0:null===(t=F[0])||void 0===t?void 0:t.plane)&&void 0!==T&&T;function ev(){var e;return(0,i.jsx)("div",{className:"plane-seats-reservation__info","data-component":"PlaneSeatsReservation",children:(0,i.jsx)(v.Z,{id:"plane-seats-reservation-airplane-map-tabs",className:"tabs--has-icon",items:null!==(e=null==F?void 0:F.map(e=>{var t,a,n;let o=void 0!==e.plane,s=(0,l.Z)("plane-seats-reservation__icon",{"plane-seats-reservation__icon--rotate":e.flightType===r.Tl.return});return{type:e.flightType,childrenData:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(N.Z,{className:s}),(0,i.jsxs)("div",{className:"tab__title",children:[q.departureTabLabel,o&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),null==e?void 0:null===(t=e.plane)||void 0===t?void 0:t.name]})]})]}),content:o&&(0,i.jsx)("div",{className:"plane-seats-reservation__airplane-map-image",children:(0,i.jsx)("img",{src:null!==(n=null==e?void 0:null===(a=e.plane)||void 0===a?void 0:a.imageUrl)&&void 0!==n?n:"",alt:"Plan samolotu"})})}}))&&void 0!==e?e:[]})})}let eh=null==F?void 0:F.find(e=>e.flightType===(null==ed?void 0:ed.type)),ef=N.Z;ee&&(ef=(null==ed?void 0:ed.type)==="RETURN"?y.Z:_.default);let eg=null==K?void 0:K.find(e=>e.type===(null==ed?void 0:ed.type)),eb=null!==(P=null==eg?void 0:eg.places)&&void 0!==P?P:[],ex=null==W?void 0:W.slice().sort((e,t)=>{var a,i,l;return null!==(l=null===(a=e.type)||void 0===a?void 0:a.localeCompare(null!==(i=t.type)&&void 0!==i?i:"ADULT"))&&void 0!==l?l:0}),ey=null!==(Z=null==ex?void 0:ex.filter(e=>"INFANT"!==e.type).length)&&void 0!==Z?Z:1,e_=eb.length===ey,ej=void 0!==(null==eg?void 0:eg.totalPrice),ew=U?null!==(L=null==et?void 0:null===(a=et.declination)||void 0===a?void 0:a["rmws.tab_content_heading.preview"])&&void 0!==L?L:["Wybrane {participantsCount} miejsce:","Wybrane {participantsCount} miejsca:","Wybrane {participantsCount} miejsc:"]:null!==(I=null==et?void 0:null===(S=et.declination)||void 0===S?void 0:S["rmws.tab_content_heading"])&&void 0!==I?I:["Wybierz {participantsCount} miejsce:","Wybierz {participantsCount} miejsca:","Wybierz {participantsCount} miejsc:"],eN=(0,x.px)(ey,...ew).replace("{participantsCount}",ey.toString()),eC=null!==(O=null==ex?void 0:ex.some(e=>"INFANT"===e.type))&&void 0!==O&&O,ek=ee&&D&&(null==M?void 0:M.trim())&&(null==eh?void 0:eh.places.some(e=>e.some(e=>e.recommended&&e.available&&!e.reserved)))?(0,i.jsx)("p",{className:"mb-3 w-fit roun
1ded-md bg-[#f3cb47] px-3 py-1 text-sm font-bold leading-4 text-blue",children:M}):null,eS=()=>(0,i.jsxs)("div",{className:"plane-seats-reservation__info-content",children:[ek,eN,(0,i.jsx)("div",{className:"plane-seats-reservation__seats-info",children:null==ex?void 0:ex.map((e,t)=>{let a="INFANT"===e.type,r="unselected",o="".concat(t+1);return void 0!==eb[t]&&(r="selected",o=eb[t].replace(/\s/,"")),a&&(r="infant"),(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)(u.Z,{className:(0,l.Z)(ee&&"!m-0 !size-6"),flightClass:B,status:r,label:o,readOnly:!0}),a&&(0,i.jsx)(d.Z,{customClassName:"plane-seats-reservation__infant-seat-tooltip",type:"tooltip",tooltipVariant:h.uY.slim,content:q.infantSeatDisclaimer})]},t)})}),ee&&!U&&!ej&&(0,i.jsx)("p",{className:"mb-0 mt-4 text-sm text-gray",children:null!=V?V:"wybierz miejsca aby wyświetlić cenę"}),!U&&ej&&(0,i.jsx)("div",{className:"plane-seats-reservation__info-price",children:(0,i.jsx)(m.Z,{label:ee?void 0:q.priceLabel,value:eg.totalPrice,currencySymbol:J,currencyTextInfo:ee?A:void 0,displayValuesHorizontally:!0,displayValueAsRed:!0})}),!U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.ZP,{variant:e_?o.qh.primary:o.qh.disabled,className:"plane-seats-reservation__info-button",disabled:!e_||el,onClick:ep,isLoading:el,testId:"plane-seats-reservation-submit-button",children:F&&2===F.length&&(null==ed?void 0:ed.type)==="DEPARTURE"?q.nextButtonLabel:q.finishButtonLabel}),er&&(0,i.jsx)("div",{className:"plane-seats-reservation__taken-seats-info",children:k})]}),void 0!==em&&!1!==em&&(0,i.jsx)(d.Z,{customClassName:"plane-seats-reservation__info-link",buttonText:q.airplaneMapButtonLabel,title:q.airplaneMapPopupTitle,type:"dialog",content:ev(),withoutIcon:!0,dialogSettings:{variant:s.od.withTitle,className:"plane-seats-reservation__airplane-map-wrapper",bodyClassName:"plane-seats-reservation__airplane-map-body"}})]}),eT=(0,l.Z)("plane-seats-reservation",{"plane-seats-reservation--preview-mode":U,"plane-seats-reservation--modern":ee}),eP=null!==(E=null==F?void 0:F.some(e=>e.places.some(e=>e.some(e=>e.evacuation))))&&void 0!==E&&E;return(0,i.jsxs)("div",{className:eT,children:[!ei&&q.description&&(0,i.jsx)("p",{className:"plane-seats-reservation__description",children:q.description}),(0,i.jsxs)("div",{className:"plane-seats-reservation__container",children:[(0,i.jsxs)("div",{className:"plane-seats-reservation__info-wrapper",children:[ei&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"plane-seats-reservation__mobile-title",children:eN}),(0,i.jsxs)("div",{className:"plane-seats-reservation__mobile-header",children:[(0,i.jsx)(ef,{className:ee||(null==ed?void 0:ed.type)!=="RETURN"?"plane-seats-reservation__icon":"plane-seats-reservation__icon plane-seats-reservation__icon--rotate"}),"".concat(null==ed?void 0:ed.departurePlaceName," - ").concat(null==ed?void 0:ed.arrivalPlaceName)]}),em&&(0,i.jsx)(d.Z,{customClassName:"plane-seats-reservation__info-link",buttonText:q.airplaneMapButtonLabel,title:q.airplaneMapPopupTitle,type:"dialog",content:ev(),withoutIcon:!0,dialogSettings:{variant:s.od.withTitle,className:"plane-seats-reservation__airplane-map-wrapper",bodyClassName:"plane-seats-reservation__airplane-map-body"}})]}),(0,i.jsxs)(f.Z,{isDisabled:ei,children:[!ei&&(0,i.jsx)("div",{className:"plane-seats-reservation__info",children:(0,i.jsx)(v.Z,{id:"plane-seats-reservation-tabs",className:"tabs--has-icon",onChange:eu,selectedTabId:null==ed?void 0:ed.id,items:Object.keys(H).map((e,t)=>{let a=H[e],n=N.Z;ee&&(n=a.type===r.Tl.return?y.Z:_.default);let o=(0,l.Z)("plane-seats-reservation__icon",{"plane-seats-reservation__icon--rotate":!ee&&e===r.Tl.return.toLowerCase()}),s="unavailable"===a.status,c=s||0!==t&&!e_,u=(0,l.Z)("plane-seats-reservation__tab",{"plane-seats-reservation__tab--unavailable":s});return{type:e.toUpperCase(),childrenData:(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:u,children:[(0,i.jsx)(n,{className:o}),(0,i.jsxs)("div",{className:"tab__title",children:["".concat(a.departurePlaceName," - ").concat(a.arrivalPlaceName),ee&&!er&&!s&&(null==K?void 0:K.some(e=>
1e.type===a.type&&e.places.length===ey))&&(0,i.jsx)("span",{className:"ml-2 inline-flex size-5 items-center justify-center rounded-full bg-green-lightGreen align-middle","data-testid":"plane-seats-flight-complete","aria-hidden":!0,children:(0,i.jsx)(j.default,{className:"fill-blue",style:{width:12,height:12,margin:0}})})]}),er&&(0,i.jsx)("div",{className:"plane-seats-reservation__icon-circle",children:(0,i.jsx)(w.default,{style:{fill:"#fff",width:"12px",height:"20px",margin:"0"}})}),s&&(0,i.jsx)(d.Z,{type:"tooltip",tooltipVariant:h.uY.slim,content:q.oneWayOnly})]})}),disabled:c,content:eS()}})})}),(0,i.jsxs)("ul",{className:"plane-seats-reservation__legend",children:[void 0!==B&&(0,i.jsxs)("li",{className:"plane-seats-reservation__legend-item",children:[(0,i.jsx)(u.Z,{variant:R,className:(0,l.Z)(ee&&"!m-0 !size-6"),flightClass:B,status:"available",readOnly:!0}),q.legendLabel[B.toLowerCase()]]}),!ei&&!ee&&(0,i.jsxs)("li",{className:"plane-seats-reservation__legend-item",children:[(0,i.jsx)(u.Z,{flightClass:B,status:"selected",readOnly:!0}),q.legendLabel.selected]}),!ee&&(0,i.jsxs)("li",{className:"plane-seats-reservation__legend-item",children:[(0,i.jsx)(u.Z,{status:"occupied",readOnly:!0}),q.legendLabel.occupied]}),(0,i.jsxs)("li",{className:"plane-seats-reservation__legend-item",children:[(0,i.jsx)(u.Z,{variant:R,className:(0,l.Z)(ee&&"!m-0 !size-6"),status:"taken",readOnly:!0}),q.legendLabel.taken]}),eP&&(0,i.jsxs)("li",{className:(0,l.Z)("plane-seats-reservation__legend-item",ee?"order-first":"pt-3"),children:[(0,i.jsx)(u.Z,{variant:R,className:(0,l.Z)(ee&&"!m-0 !size-6"),status:"available",readOnly:!0,evacuation:!0}),q.legendLabel.evacuation]})]}),ei&&eC&&(0,i.jsxs)("div",{className:"plane-seats-reservation__mobile-infant-seat-disclaimer",children:[(0,i.jsx)(C.Z,{}),q.mobileInfantSeatDisclaimer]})]})]}),(0,i.jsxs)("div",{className:"plane-seats-reservation__map-wrapper",children:[ei&&ek&&(0,i.jsx)("div",{className:"px-3",children:ek}),(0,i.jsx)(p.Z,{showRecommended:D,recommendedLabel:z,className:(0,l.Z)(ee&&"!px-0"),variant:R,flightClass:B,seatMapData:eh,selectedSeatCodes:eb,nonInfantParticipantsCount:ey,isPreviewMode:U,isMobile:ei,isLoading:el,flightType:null==ed?void 0:ed.type,onSeatClick:G,areSeatsTaken:er,evacuationSeatTooltip:null==q?void 0:q.evacuationSeatTooltip})]})]}),ei&&(0,i.jsxs)("div",{className:"plane-seats-reservation__mobile-footer",children:[(0,i.jsxs)("div",{className:"plane-seats-reservation__price-wrapper",children:[!U&&ej&&(0,i.jsx)(m.Z,{label:ee?void 0:q.priceLabel,value:eg.totalPrice,customClassName:"plane-seats-reservation__price--mobile",currencySymbol:J,currencyTextInfo:ee?A:void 0,displayValuesHorizontally:!0,displayValueAsRed:!0}),(0,i.jsx)(o.ZP,{className:"plane-seats-reservation__info-button",variant:e_?o.qh.primary:o.qh.disabled,disabled:!e_||el,onClick:ep,isLoading:el,testId:"plane-seats-reservation-submit-button",children:F&&2===F.length&&(null==ed?void 0:ed.id)==="tab-plane-seats-reservation-tabs-DEPARTURE"?q.nextButtonLabel:q.finishButtonLabel})]}),er&&(0,i.jsx)("div",{className:"plane-seats-reservation__taken-seats-info",children:k})]}),(0,i.jsx)(c.Z,{isLoading:el})]})}},17743:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=a(31549),l=a(34435),n=a(97500),r=a(14693),o=a(41598),s=a(92507),d=a(61186),c=a(49527);function u(e){var t,a,u,p,m,v,h;let{upsell:f,variants:g,onVariantButtonClick:b,renderButtonLabel:x,labels:y,roomIndex:_,status:j}=e,w=null==g?void 0:g.find(e=>!e.hidden),N=null==g?void 0:g.find(e=>e.hidden),C=null==g?void 0:g.filter(e=>"sold"===e.status),k=void 0!==C&&C.length>0,S=void 0!==w,T=k?"sold":null==w?void 0:w.status,P=k||(null==w?void 0:w.selected)||T===d.X.ordered,Z=(0,l.BH)();return(0,i.jsxs)(n.Z,{type:f.type,isSelected:P,roomIndex:_,status:j,orderedMessage:y.orderedMessage,children:[(0,i.jsx)(o.Z,{type:f.type,iconName:s.En["ro"===Z?s.hc.insurance:f.type],title:f.title,description:f.description,isSelected:P,isOrdered:"ordered"===T}),(0,i.jsx)(r.Z,{status:j,children:(0,i.jsx)(c.Z,{headerHasIcon:!0,type:f.type,status:T,insuranceOnlyInCCMessage:null==w?void 0:w.insuranceOnlyInCCMessage,isSelected:P,isHidden:!S,isLoading:null==w?void 0:w.isLoading,features:f.additionalInformationList,buttonLabel:x({variant:k?null==C?void 0:C[0]:w}),price:null!==(u=null!==(a=null!==(t=null==w?void 0:w.sourceFormattedPrice)&&void 0!==t?t:null==w?void 0:w.sourcePrice)&&void 0!==a?a:null==w?void 0:w.formattedPrice)&&void 0!==u?u:null==w?void 0:w.price,currency:(0,l.jK)(null!==(p=null==w?void 0:w.sourceCurrency)&&void 0!==p?p:null==w?void 0:w.currency),requestedContact:f.requestedContact,hiddenDisclaimer:k?void 0:null!==(m=null==N?void 0:N.hiddenDisclaimer)&&void 0!==m?m:f.popupImageTitle,priceTooltip:null!==(h=null==w?void 0:w.priceTooltip)&&void 0!==h?h:S?f.popupImageTitle:null!==(v=null==N?void 0:N.priceTooltip)&&void 0!==v?v:f.popupText,onButtonClick:()=>{S&&b({variant:w,upsell:f,roomIndex:_})}})})]})}},51403:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=a(31549),l=a(34435),n=a(97500),r=a(14693),o=a(41598),s=a(92507),d=a(61186),c=a(49527);function u(e){var t;let{upsell:a,variants:u,onVariantButtonClick:p,renderButtonLabel:m,status:v}=e,h=null==u?void 0:u.find(e=>!e.hidden),f=void 0!==h,g=null==h?void 0:h.status,b=(null==h?void 0:h.selected)||g===d.X.ordered;return f?(0,i.jsxs)(n.Z,{type:a.type,isSelected:b,status:v,isHorizontal:!0,children:[(0,i.jsx)(o.Z,{isHorizontal:!0,type:a.type,iconName:s.En[a.type],title:a.title,de
1scription:a.description,isSelected:b,isOrdered:"ordered"===g}),(0,i.jsx)(r.Z,{status:v,isHorizontal:!0,children:(0,i.jsx)(c.Z,{headerHasIcon:!0,type:a.type,status:g,isSelected:b,isHidden:!f,isLoading:null==h?void 0:h.isLoading,callCenterLabel:null==h?void 0:h.ccMessage,buttonLabel:m({variant:h}),price:null!==(t=null==h?void 0:h.formattedPrice)&&void 0!==t?t:null==h?void 0:h.price,currency:(0,l.jK)(null==h?void 0:h.currency),requestedContact:a.requestedContact,onButtonClick:()=>{f&&p({variant:h,upsell:a})}})})]}):null}},96663:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=a(31549),l=a(34435),n=a(97500),r=a(14693),o=a(41598),s=a(92507),d=a(61186),c=a(49527),u=a(10054);function p(e){var t,a,p,m,v,h;let{upsell:f,variants:g,onVariantButtonClick:b,renderButtonLabel:x,status:y}=e,_=null==g?void 0:g.find(e=>!e.hidden),j=void 0!==_,w=null==_?void 0:_.status,N=(null==_?void 0:_.selected)||w===d.X.ordered,C=(0,u.Lo)(),k=null==C?void 0:null===(m=C._embedded)||void 0===m?void 0:null===(p=m.participants)||void 0===p?void 0:null===(a=p.filter(e=>"INFANT"!==e.type))||void 0===a?void 0:null===(t=a.map(e=>e.personRef))||void 0===t?void 0:t.filter(e=>void 0!==e);return(0,i.jsxs)(n.Z,{type:f.type,isSelected:N,status:y,isHorizontal:!0,children:[(0,i.jsx)(o.Z,{isHorizontal:!0,type:f.type,iconName:s.En[f.type],title:f.title,description:null==_?void 0:null===(v=_.options)||void 0===v?void 0:v[0],isSelected:N,isOrdered:"ordered"===w}),(0,i.jsx)(r.Z,{status:y,isHorizontal:!0,children:(0,i.jsx)(c.Z,{headerHasIcon:!0,type:f.type,status:w,isSelected:N,isHidden:!j,callCenterLabel:null==_?void 0:_.ccMessage,isLoading:null==_?void 0:_.isLoading,buttonLabel:x({variant:_}),price:null!==(h=null==_?void 0:_.formattedPrice)&&void 0!==h?h:null==_?void 0:_.price,currency:(0,l.jK)(null==_?void 0:_.currency),requestedContact:f.requestedContact,personRefs:null==_?void 0:_.personRefs,variantId:null==_?void 0:_.upsellId,participantsRefs:k,roomIndex:f.roomIndex,onButtonClick:()=>{j&&b({variant:_,upsell:f,roomIndex:f.roomIndex})}})})]})}},69818:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=a(31549),l=a(34435),n=a(97500),r=a(14693),o=a(41598),s=a(92507),d=a(61186),c=a(49527),u=a(9989);function p(e){var t;let{upsell:a,variants:p,onVariantButtonClick:m,labels:v,renderButtonLabel:h,roomIndex:f,status:g,attachments:b}=e,x=null==p?void 0:p.find(e=>!e.hidden),y=null==p?void 0:p.filter(e=>"sold"===e.status),_=void 0!==y&&y.length>0,j=void 0!==x,w=_?"sold":null==x?void 0:x.status,N=_||(null==x?void 0:x.selected)||w===d.X.ordered;return(0,i.jsxs)(n.Z,{type:a.type,isSelected:N,roomIndex:f,status:g,children:[(0,i.jsx)(o.Z,{type:a.type,iconName:s.En[a.type],title:a.title,description:a.description,isSelected:N,isOrdered:"ordered"===w}),(0,i.jsx)(r.Z,{status:g,children:(0,i.jsx)(c.Z,{headerHasIcon:!0,type:a.type,status:w,insuranceOnlyInCCMessage:null==x?void 0:x.insuranceOnlyInCCMessage,isSelected:N,isHidden:!j,isLoading:null==x?void 0:x.isLoading,features:a.additionalInformationList,buttonLabel:h({variant:_?null==y?void 0:y[0]:x}),price:null!==(t=null==x?void 0:x.formattedPrice)&&void 0!==t?t:null==x?void 0:x.price,currency:(0,l.jK)(null==x?void 0:x.currency),requestedContact:a.requestedContact,hiddenDisclaimer:_?void 0:a.popupImageTitle,priceTooltip:j?a.popupImageTitle:a.popupText,onButtonClick:()=>{j&&m({variant:x,upsell:a,roomIndex:f})}})}),(0,i.jsx)(u.Z,{detailsPopupLabel:v.details,detailsPopupTitle:a.popupImageTitle,detailsPopupImageUrl:a.popupImageUrl,attachments:b})]})}},8646:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=a(31549),l=a(34435),n=a(97500),r=a(93789),o=a(24076),s=a(92507),d=a(57664),c=a(61186),u=a(2861);function p(e){var t;let{upsell:a,variants:p,hasSelectedVariant:m,labels:v,renderButtonLabel:h,onVariantButtonClick:f,hasError:g,status:b}=e,x=(0,u.L)(),y=null!==(t=null==x?void 0:x.startsWith("mytui"))&&void 0!==t&&t,_=null==p?void 0:p.filter(e=>!e.hidden),j=null==_?void 0:_.some(e=>e.selected||e.status===c.X.ordered),w=null==_?void 0:_.some(e=>e.status===c.X.ordered);return(0,i.jsxs)(n.Z,{type:a.type,hasError:g,status:b,isSelected:j,validationMessage:v.notSelectedWarning,orderedMessage:v.orderedMessage,children:[(0,i.jsx)(o.Z,{type:a.type,iconName:s.En[a.type],title:a.title,de
1scription:a.description,isSelected:j,isOrdered:w}),(0,i.jsxs)(r.Z,{status:b,hasMultipleVariants:void 0!==_&&_.length>1,children:[null==p?void 0:p.map(e=>{var t,n;let r=e.status,o=e.selected||r===c.X.ordered,s=e.hidden;return!e.hidden&&(0,i.jsx)(d.Z,{type:a.type,status:r,isSelected:o,isHidden:s,isLoading:e.isLoading,callCenterLabel:e.ccMessage,title:null!==(t=e.recommendedText)&&void 0!==t?t:e.title,features:e.options,buttonLabel:h({upsell:a,variant:e}),price:null!==(n=e.formattedPrice)&&void 0!==n?n:e.price,currency:(0,l.jK)(e.currency),requestedContact:a.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!y,withBorderForRecommended:!0,withoutRecommendedBackground:m,isRecommended:!y,recommendedLabel:v.recommended,onButtonClick:()=>{f({variant:e,upsell:a})}},e.code)}),!y&&"checkoutPaymentSuccess"!==x&&(0,i.jsx)(d.Z,{status:a.isResignVariantSelected?"selected":"available",isSelected:a.isResignVariantSelected,isOneOfMultipleVariants:!0,type:"RESIGN",title:a.disadvantagesHeader,features:a.disadvantages,forceFeaturesAsList:!0,priceIncludedLabel:"w cenie",headerHasIcon:!0,buttonLabel:h({variant:{selected:a.isResignVariantSelected},upsell:a,selectionCondition:a.isResignVariantSelected}),onButtonClick:()=>{f({upsell:a,isResignVariant:!0})}})]})]})}},87878:function(e,t,a){"use strict";a.d(t,{Z:function(){return w}});var i=a(31549),l=a(44194),n=a(34435),r=a(86422),o=a(97500),s=a(14693),d=a(41598),c=a(61186),u=a(49527),p=a(62716),m=a(48645),v=a(35937),h=a(87954),f=a(60238),g=a(14895),b=a(77696);let x=(0,a(20852).p)();function y(e){var t,a,n,o;let{onClose:s,reservationData:d,attachments:c}=e,u=(0,p.VY)(),{send:y}=function(){let{data:e}=(0,b.RM)();return{send:async function(t){let a=new FormData;a.append("files",t);let i="/api/services/tui-reservation/api/reservation/"+(null==e?void 0:e.number)+"/upsell-nwfm-document";await x(i,{method:"POST",body:a})}}}(),[_,j]=(0,l.useState)(!1),w=Array.isArray(c),N=(0,m.cI)({mode:"onChange",defaultValues:{files:[]}}),C=(0,g.z$)("MYTUI_FIRST_MINUTE_UPSELL_PRICE_POPUP"),k={amount:null==C?void 0:C["popupData.confirmation_validation_amount"],size:null==C?void 0:C["popupData.confirmation_validation_size"],type:null==C?void 0:C["popupData.confirmation_validation_type"]},S=N.watch("files",[]).filter(Boolean);function T(e){N.setValue("files",e)}async function P(){var e,t;u.removeAll();let a=N.getValues("files")[0];if(!_&&a){try{j(!0),await y(a),u.success(null!==(e=null==C?void 0:C["popupData.confirmation_success_message"])&&void 0!==e?e:"Tw\xf3j plik został przekazany do działu obsługi klienta."),s()}catch(e){u.error(null!==(t=null==C?void 0:C["popupData.confirmation_error_message"])&&void 0!==t?t:"Wystąpił błąd. Tw\xf3j plik nie został przekazany. Spr\xf3buj ponownie.")}j(!1)}}return(0,i.jsx)(v.Z,{isOpen:!0,onClick:s,onClose:s,dialogTitle:null==d?void 0:d.name,variant:h.od.withTitle,headingClassName:"normal-case",className:"w-full max-w-[452px]",children:(0,i.jsxs)("div",{className:"flex flex-col gap-[10px] p-[15px] pb-[20px]","data-component":"FirstMinutePopup",children:[(0,i.jsx)("p",{className:"mb-0 text-sm text-black",children:null==d?void 0:d.formDescription}),w&&(0,i.jsx)("div",{className:"upsell-footer__attachments",children:c.map(e=>(0,i.jsxs)(r.ZP,{size:r.Ph.small,className:"upsell-footer__button",variant:r.qh.link,href:e.url,target:"_blank",children:[e.label,"\xa0\xbb"]},e.url))}),(0,i.jsx)("div",{className:"flex flex-col gap-y-1",children:(0,i.jsx)(m.RV,{...N,children:(0,i.jsxs)("form",{className:"flex flex-col gap-y-3",onSubmit:N.handleSubmit(P),children:[(0,i.jsx)(f.Z,{control:N.control,name:"files",title:"",files:S,maxFiles:1,maxSize:75e5,accept:{"application/pdf":[".pdf"]},description:null!==(t=null==C?void 0:C["popupData.dropzone_label"])&&void 0!==t?t:"Dodaj plik pdf z procesu rezerwacyjnego",buttonLabel:null!==(a=null==C?void 0:C["popupData.dropzone_button"])&&void 0!==a?a:"Wybierz",validationMessages:k,attachmentsDescription:"",removeLabel:null!==(n=null==C?void 0:C["popupData.dropzone_file_remove"])&&void 0!==n?n:"x Usuń",onAddFile:T,onRemoveFile:T}),(0,i.jsx)(r.ZP,{isLoading:_,variant:"outlinedBlue",className:"text-sm disabled:cursor-not-allowed disabled:opacity-30",type:"submit",children:null!==(o=null==C?void 0:C["popupData.confirmation_button"])&&void 0!==o?o:"Wyślij"})]})})})]})})}var _=a(9989),j=a(92507);function w(e){var t;let{upsell:a,variants:p,attachments:m,onVariantButtonClick:v,renderButtonLabel:h,status:f,isMyTui:g,reservationData:b,labels:x}=e,w=null==p?void 0:p.find(e=>!e.hidden),N=void 0!==w,C=null==w?void 0:w.status,k=(null==w?void 0:w.selected)||C===c.X.ordered,[S,T]=(0,l.useState)(!1),P=g&&(null==b?void 0:b.formCode)?null==x?void 0:x.selectedVariantButtonLabel:h({variant:w});return(0,i.jsxs)(o.Z,{type:a.type,isSelected:k,status:f,children:[(0,i.jsx)(d.Z,{type:a.type,title:a.title,iconName:j.En[a.type],description:a.description,isSelected:k,isOrdered:"ordered"===C}),(0,i.jsx)(s.Z,{status:f,children:(0,i.jsx)(u.Z,{headerHasIcon:!0,type:a.type,status:C,isSelected:k,isHidden:!N,callCenterLabel:null==w?void 0:w.ccMessage,isLoading:null==w?void 0:w.isLoading,features:null==w?void 0:w.options,buttonLabel:P,price:null!==(t=null==w?void 0:w.formattedPrice)&&void 0!==t?t:null==w?void 0:w.price,currency:(0,n.jK)(null==w?void 0:w.currency),requestedContact:a.requestedContact,onButtonClick:()=>{N&&v({variant:w,upsell:a})}})}),(0,i.jsxs)("div",{className:"upsell__attachments-wrapper","data-component":"FirstMinute",children:[g&&(null==b?void 0:b.formCode)&&(0,i.jsxs)(r.ZP,{size:r.Ph.small,className:"upsell-footer__button popup-label",variant:r.qh.link,target:"_blank",onClick:()=>T(!0),children:[x.firstMinute.changePricePopupLabel,"\xa0\xbb"]},null==b?void 0:b.formCode),(0,i.jsx)(_.Z,{attachments:m})]}),S&&(0,i.jsx)(y,{reservationData:b,attachments:m,onClose:()=>T(!1)})]})}},97935:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=a(31549),l=a(34435),n=a(97500),r=a(93789),o=a(24076),s=a(92507),d=a(57664),c=a(61186),u=a(9989);function p(e){let{upsell:t,variants:a,hasSelectedVariant:p,labels:m,renderButtonLabel:v,onVariantButtonClick:h,attachments:f,status:g}=e,b=null==a?void 0:a.filter(e=>!e.hidden),x=null==b?void 0:b.some(e=>e.selected||e.status===c.X.ordered),y=null==b?void 0:b.some(e=>"ordered"===e.status);return(0,i.jsxs)(n.Z,{type:t.type,status:g,isSelected:x,children:[(0,i.jsx)(o.Z,{type:t.type,iconName:s.En[t.type],title:t.title,de
1scription:t.description,isSelected:x,isOrdered:y}),(0,i.jsx)(r.Z,{status:g,hasMultipleVariants:!0,children:null==a?void 0:a.map(e=>{var a;let n="string"==typeof e.ribbon&&e.ribbon.length>0,r=e.status,o=e.selected||r===c.X.ordered,s=e.hidden;return!e.hidden&&(0,i.jsx)(d.Z,{type:t.type,status:r,isSelected:o,isHidden:s,isLoading:e.isLoading,callCenterLabel:e.ccMessage,title:e.title,features:e.options,buttonLabel:v({upsell:t,variant:e}),price:null!==(a=e.formattedPrice)&&void 0!==a?a:e.price,currency:(0,l.jK)(e.currency),requestedContact:t.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!0,withBorderForRecommended:!0,withoutRecommendedBackground:p,isRecommended:n,recommendedLabel:m.recommended,onButtonClick:()=>{h({variant:e,upsell:t})}},e.code)})}),(0,i.jsx)(u.Z,{attachments:f})]})}},41672:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=a(31549),l=a(34435),n=a(97500),r=a(93789),o=a(24076),s=a(92507),d=a(57664),c=a(61186),u=a(9989);function p(e){let{upsell:t,variants:a,hasSelectedVariant:p,labels:m,renderButtonLabel:v,onVariantButtonClick:h,hasError:f,attachments:g,isResignVariantVisible:b,status:x}=e,y=null==a?void 0:a.filter(e=>!e.hidden),_=null==y?void 0:y.some(e=>e.selected||e.status===c.X.ordered),j=null==y?void 0:y.some(e=>"ordered"===e.status);return(0,i.jsxs)(n.Z,{type:t.type,hasError:f,status:x,isSelected:_,validationMessage:m.notSelectedWarning,orderedMessage:m.orderedMessage,children:[(0,i.jsx)(o.Z,{type:t.type,iconName:s.En[t.type],title:t.title,description:t.description,isSelected:_,isOrdered:j}),(0,i.jsxs)(r.Z,{status:x,hasMultipleVariants:!0,children:[null==a?void 0:a.map(e=>{var a;let n="string"==typeof e.ribbon&&e.ribbon.length>0,r=e.status,o=e.selected||r===c.X.ordered,s=e.hidden;return!e.hidden&&(0,i.jsx)(d.Z,{type:t.type,status:r,isSelected:o,isHidden:s,isLoading:e.isLoading,title:e.title,callCenterLabel:e.ccMessage,features:e.options,buttonLabel:v({upsell:t,variant:e}),price:null!==(a=e.formattedPrice)&&void 0!==a?a:e.price,currency:(0,l.jK)(e.currency),requestedContact:t.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!0,withBorderForRecommended:!0,withoutRecommendedBackground:p,isRecommended:n,recommendedLabel:m.recommended,onButtonClick:()=>{h({variant:e,upsell:t})}},e.code)}),b&&(0,i.jsx)(d.Z,{status:t.isResignVariantSelected?"selected":"available",isSelected:t.isResignVariantSelected,isOneOfMultipleVariants:!0,type:"RESIGN_HORIZONTAL",title:m.gtzw.notRecommendedLabel,description:m.gtzw.notRecommendedText,headerHasIcon:!0,onButtonClick:()=>{h({upsell:t,isResignVariant:!0})}})]}),(0,i.jsx)(u.Z,{attachments:g})]})}},92012:function(e,t,a){"use strict";a.d(t,{Z:function(){return g}});var i=a(31549),l=a(53664),n=a.n(l),r=a(34435),o=a(97500),s=a(14693),d=a(24161),c=a(41598),u=a(92507),p=a(61186),m=a(49527),v=a(14895);n()(()=>a.e(42861).then(a.bind(a,42861)),{loadableGenerated:{webpack:()=>[42861]}});let h=n()(()=>a.e(21444).then(a.bind(a,21444)),{loadableGenerated:{webpack:()=>[21444]}});function f(e,t){if(t in e)return e[t]}function g(e){var t,a,l;let{upsell:n,variants:g,onVariantButtonClick:b,labels:x,renderButtonLabel:y,hasSelectedVariant:_,hasError:j,roomIndex:w,attachments:N,isResignVariantVisible:C,status:k}=e,S=(0,v.z$)("UPSELLS_INSURANCE_SELECTED_VARIANT_MESSAGE"),T=n.isResignVariantSelected?"suboptimal":"optimal";function P(e){var t,a;return"INSURANCE_CANCELLATION"===n.groupType?null:"suboptimal"===e?null!==(t=f(n,"suboptimalVariantMessage"))&&void 0!==t?t:null==S?void 0:S.not_recommended:null!==(a=f(n,"optimalVariantMessage"))&&void 0!==a?a:null==S?void 0:S.recommended}return _||(T=void 0),(0,i.jsxs)(o.Z,{type:n.type,hasError:j,roomIndex:w,status:k,validationMessage:x.notSelectedWarning,orderedMessage:x.orderedMessage,children:[(0,i.jsx)(c.Z,{type:n.type,iconName:u.En[n.type],title:n.title,description:n.description,badge:(0,i.jsxs)("div",{className:"shrink-0 self-start","data-component":"Insurance",children:[!1,(0,i.jsx)(h,{className:"h-[65px] w-[112px]"}),!1]})}),(0,i.jsxs)(s.Z,{status:k,hasMultipleVariants:!0,children:[null==g?void 0:g.map(e=>{var t,a,l,o,s;let d=null!==(t=e.promoted)&&void 0!==t?t:"string"==typeof e.ribbon&&e.ribbon.length>0,c=e.status,u=e.selected||c===p.X.ordered,v=e.hidden,h=!_||n.isResignVariantSelected||d&&u;return!e.hidden&&(0,i.jsx)(m.Z,{type:n.type,status:c,isSelected:u,isHidden:v,isLoading:e.isLoading,title:e.title,features:e.options,buttonLabel:y({variant:e}),callCenterLabel:x.callCenterInsuranceLabel,insuranceOnlyInCCMessage:e.insuranceOnlyInCCMessage,isRecommended:d,recommendedLabel:e.ribbon,promotionTag:e.promotionTag,price:null!==(o=null!==(l=null!==(a=e.sourceFormattedPrice)&&void 0!==a?a:e.sourcePrice)&&void 0!==l?l:e.formattedPrice)&&void 0!==o?o:e.price,currency:(0,r.jK)(null!==(s=e.sourceCurrency)&&void 0!==s?s:e.currency),pricePerDay:e.pricePerDay,requestedContact:n.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!0,withBorderForRecommended:h,withoutRecommendedBackgroun
1d:_,onButtonClick:()=>{n.requestedContact||b({variant:e,upsell:n,roomIndex:w})}},e.code)}),C&&(0,i.jsx)(m.Z,{status:n.isResignVariantSelected?"selected":"available",isSelected:n.isResignVariantSelected,isOneOfMultipleVariants:!0,type:"RESIGN_HORIZONTAL",title:null!==(t=n.resignationHeader)&&void 0!==t?t:x.insurance.notRecommendedLabel,description:null!==(a=n.resignationDescription)&&void 0!==a?a:x.insurance.notRecommendedText,headerHasIcon:!0,onButtonClick:()=>{b({upsell:n,roomIndex:w,isResignVariant:!0})}})]}),(0,i.jsx)(d.Z,{selectedVariantGrade:T,optimalVariantMessage:P("optimal"),suboptimalVariantMessage:P("suboptimal"),detailsPopupLabel:"detailsPopupLabel"in n&&null!==(l=n.detailsPopupLabel)&&void 0!==l?l:x.details,detailsPopupTitle:n.popupImageTitle,detailsPopupImageUrl:n.popupImageUrl,attachments:N})]})}n()(()=>a.e(45371).then(a.bind(a,45371)),{loadableGenerated:{webpack:()=>[45371]}})},86994:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=a(31549),l=a(34435),n=a(97500),r=a(93789),o=a(24076),s=a(92507),d=a(57664),c=a(61186),u=a(2861);function p(e){var t;let{upsell:a,variants:p,hasSelectedVariant:m,labels:v,renderButtonLabel:h,onVariantButtonClick:f,hasError:g,status:b}=e,x=(0,u.L)(),y=null!==(t=null==x?void 0:x.startsWith("mytui"))&&void 0!==t&&t,_=null==p?void 0:p.filter(e=>!e.hidden),j=null==_?void 0:_.some(e=>e.selected||e.status===c.X.ordered),w=null==_?void 0:_.some(e=>e.status===c.X.ordered);return(0,i.jsxs)(n.Z,{type:a.type,hasError:g,status:b,isSelected:j,validationMessage:v.notSelectedWarning,orderedMessage:v.orderedMessage,children:[(0,i.jsx)(o.Z,{type:a.type,iconName:s.En[a.type],title:a.title,description:a.description,isSelected:j,isOrdered:w}),(0,i.jsxs)(r.Z,{status:b,hasMultipleVariants:void 0!==_&&_.length>1,children:[null==p?void 0:p.map(e=>{var t,n;let r=e.status,o=e.selected||r===c.X.ordered,s=e.hidden;return!e.hidden&&(0,i.jsx)(d.Z,{type:a.type,status:r,isSelected:o,isHidden:s,isLoading:e.isLoading,callCenterLabel:e.ccMessage,title:null!==(t=e.recommendedText)&&void 0!==t?t:e.title,features:e.options,buttonLabel:h({upsell:a,variant:e}),price:null!==(n=e.formattedPrice)&&void 0!==n?n:e.price,currency:(0,l.jK)(e.currency),requestedContact:a.requestedContact,headerHasIcon:!0,isOneOfMultipleVariants:!y,withBorderForRecommended:!0,withoutRecommendedBackground:m,isRecommended:!y,recommendedLabel:v.recommended,onButtonClick:()=>{f({variant:e,upsell:a})}},e.code)}),!y&&"checkoutPaymentSuccess"!==x&&(0,i.jsx)(d.Z,{status:a.isResignVariantSelected?"selected":"available",isSelected:a.isResignVariantSelected,isOneOfMultipleVariants:!0,type:"RESIGN",title:a.disadvantagesHeader,features:a.disadvantages,forceFeaturesAsList:!0,price:0,headerHasIcon:!0,buttonLabel:h({variant:{selected:a.isResignVariantSelected},upsell:a,selectionCondition:a.isResignVariantSelected}),onButtonClick:()=>{f({upsell:a,isResignVariant:!0})}})]}),!y&&(0,i.jsx)("p",{className:"upsell__description-text",dangerouslySetInnerHTML:{__html:v.transfer.disabilitiesDisclaimer},"data-component":"Transfer"})]})}},14693:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var i=a(31549),l=a(60669),n=a(2861);function r(e){let{hasMultipleVariants:t,noHorizontalPadding:a,isHorizontal:r,status:o,type:s,children:d}=e,c=(0,n.L)(),u=(0,l.Z)("upsell-body","upsell-body--".concat(c),{"upsell-body--multiple-variants":t,"upsell-body--no-horizontal-padding":a,"upsell-body--is-horizontal":r,["upsell-body--".concat(s)]:void 0!==s});return"ORDERED"===o?null:(0,i.jsx)("div",{className:u,"data-component":"UpsellBody",children:d})}},24161:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=a(31549),l=a(44194),n=a(86422),r=a(35937),o=a(87954),s=a(83560),d=a(2861);function c(e){let t,a,{selectedVariantGrade:c,optimalVariantMessage:u,suboptimalVariantMessage:p,detailsPopupLabel:m,detailsPopupTitle:v,detailsPopupImageUrl:h,attachments:f}=e,g=(0,d.L)(),[b,x]=(0,l.useState)(!1),y=void 0!==c,_=Array.isArray(f),j=void 0!==m&&void 0!==h;return y&&(t="upsell-footer__selected-variant-info upsell-footer__selected-variant-info--".concat(c),a="optimal"===c?u:p),(0,i.jsxs)("div",{className:"upsell-footer",children:[y&&function(){var e;if(null==g?void 0:g.startsWith("mytui"))return null;let n={className:t};return a?("object"!=typeof(e=a)||null===e||Array.isArray(e)||(0,l.isValidElement)(e)?"string"==typeof a?n.dangerouslySetInnerHTML={__html:a}:n.children=a:n.children=(0,i.jsxs)(i.Fragment,{children:[a.title&&(0,i.jsx)("div",{className:"bold",dangerouslySetInnerHTML:{__html:String(a.title)},"data-component":"UpsellFooter"}),a.description&&(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:String(a.description)}})]}),(0,i.jsx)("div",{...n})):null}(),(j||_)&&(0,i.jsxs)("div",{className:"upsell-footer__buttons-wrapper",children:[j&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.ZP,{size:n.Ph.small,className:"upsell-footer__button",variant:n.qh.link,onClick:()=>x(!0),target:"_blank",children:[m,"\xa0\xbb"]}),(0,i.jsx)(r.Z,{isOpen:b,onClick:()=>x(!1),onClose:()=>x(!1),dialogTitle:v,variant:o.od.withTitle,className:"upsell-footer__details-popup",children:(0,i.jsx)(s.Z,{src:h,alt:v||m,width:914,height:1060,layout:"responsive"})})]}),_&&(0,i.jsx)("div",{className:"upsell-footer__attachments",children:f.map(e=>(0,i.jsxs)(n.ZP,{size:n.Ph.small,className:"upsell-footer__button",variant:n.qh.link,href:e.url,target:"_blank",children:[e.label,"\xa0\xbb"]},e.url))})]})]})}},41598:function(e,t,a){"use strict";a.d(t,{Z:function(){return F}});var i,l,n,r,o,s,d,c,u,p=a(31549),m=a(60669),v=a(34954),h=a(78856),f=a(21595),g=a(2861),b=a(44194);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var y=function(e){return b.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",id:"24h-06cbb8__Warstwa_1",x:0,y:0,viewBox:"0 0 55 61"},e),i||(i=b.createElement("style",null,".24h-06cbb8___24h0{fill:#18095c}")),l||(l=b.createElement("path",{d:"M27.5 60.6C12.3 60.6 0 48.3 0 33.1S12.3 5.6 27.5 5.6 55 17.9 55 33.1 42.7 60.6 27.5 60.6m0-4.5c12.7 0 23-10.3 23-23s-10.3-23-23-23-23 10.3-23 23 10.3 23 23 23M25.2 4.5H19c-1.2 0-2.2-1-2.2-2.2S17.8 0 19 0h16.8C37 0 38 1 38 2.2s-1 2.2-2.2 2.2h-6.2v3.2h-4.5V4.5z",className:"24h-06cbb8___24h0"})),n||(n=b.createElement("path",{d:"M8.8 37.9q0-1.65.9-3c.9-1.35 1.7-1.7 3.1-2.5l2-1.1q1.05-.6 1.5-1.2c.3-.4.4-.8.4-1.4q0-.9-.6-1.5c-.4-.4-1-.5-1.
16-.5-.8 0-1.3.2-1.8.6s-.6.9-.6 1.6c0 .5.1.9.3 1.3l-3 .8c-.3-.6-.4-1.3-.4-2.1s.2-1.6.6-2.3 1.1-1.3 1.9-1.8 1.9-.7 3.1-.7q1.5 0 2.7.6t1.8 1.5c.4.7.6 1.4.6 2.3 0 1.1-.3 2-.8 2.7q-.75 1.05-2.7 2.1l-2 1.1c-1.1.6-1.7 1.2-1.9 1.8H20V39H8.8zM27.9 38.9v-3.1h-6.7v-3.1c1.3-1.2 2.4-2.4 3.2-3.9.9-1.4 1.4-2.9 1.6-4.5h3.2c-.3 1.8-.9 3.4-1.8 4.9s-2 2.8-3.2 3.7h3.7v-2.6h3v2.6h1.7v2.8h-1.7v3.1h-3zM35.9 38.9V24.4h3v5.7c.3-.5.8-1 1.3-1.3s1.1-.4 1.8-.4c1.2 0 2.1.4 2.8 1.1s1 1.7 1 3V39h-3v-6c0-.7-.2-1.2-.4-1.6-.4-.4-.8-.6-1.4-.6q-.9 0-1.5.6c-.4.4-.6 1-.6 1.7v5.8z",className:"24h-06cbb8___24h0"})))};function _(){return(_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var j=function(e){return b.createElement("svg",_({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",id:"48h-e31c21__Warstwa_1",x:0,y:0,viewBox:"0 0 55 61"},e),r||(r=b.createElement("style",null,".48h-e31c21___48h0{fill:#18095c}")),o||(o=b.createElement("path",{d:"M27.5 60.6C12.3 60.6 0 48.3 0 33.1S12.3 5.6 27.5 5.6 55 17.9 55 33.1 42.7 60.6 27.5 60.6m0-4.5c12.7 0 23-10.3 23-23s-10.3-23-23-23-23 10.3-23 23 10.3 23 23 23M25.2 4.5H19c-1.2 0-2.2-1-2.2-2.2S17.8 0 19 0h16.8C37 0 38 1 38 2.2s-1 2.2-2.2 2.2h-6.2v3.2h-4.5V4.5z",className:"48h-e31c21___48h0"})),s||(s=b.createElement("path",{d:"M14.7 38.9v-3.1H8v-3.1c1.3-1.2 2.4-2.4 3.2-3.9.9-1.4 1.4-2.9 1.6-4.5H16c-.3 1.8-.9 3.4-1.8 4.9s-2 2.8-3.2 3.7h3.7v-2.6h3v2.6h1.7v2.8h-1.7v3.1h-3zM23.6 38.7c-.9-.4-1.6-.9-2.1-1.6s-.7-1.5-.7-2.5c0-.8.2-1.4.6-2s1-1.1 1.9-1.4c-.6-.3-1.1-.7-1.4-1.2-.4-.5-.5-1.1-.5-1.8 0-.8.2-1.5.7-2.1s1.1-1.1 1.9-1.4 1.7-.5 2.7-.5 1.9.2 2.7.5 1.5.8 1.9 1.4c.5.6.7 1.3.7 2.1 0 .7-.2 1.3-.5 1.8s-.8.9-1.4 1.2c.8.3 1.4.8 1.8 1.4q.6.9.6 2.1c0 .9-.2 1.8-.7 2.5s-1.2 1.2-2.1 1.6-1.9.5-3.1.5q-1.65-.15-3-.6m5.1-2.4c.5-.4.8-.9.8-1.6s-.3-1.2-.8-1.6-1.2-.6-2-.6-1.4.2-2 .6c-.4.4-.7.9-.7 1.6s.3 1.2.8 1.6 1.2.6 2 .6c.7 0 1.4-.2 1.9-.6m-.4-6.7c.4-.3.6-.8.6-1.3s-.2-1-.6-1.3-1-.5-1.6-.5-1.2.2-1.6.5-.6.8-.6 1.3.2 1 .6 1.3.9.5 1.6.5 1.2-.2 1.6-.5M36.3 38.9V24.4h3v5.7c.3-.5.8-1 1.3-1.3s1.1-.4 1.8-.4c1.2 0 2.1.4 2.8 1.1s1 1.7 1 3V39h-3v-6c0-.7-.2-1.2-.4-1.6-.3-.4-.7-.5-1.3-.5q-.9 0-1.5.6c-.4.4-.6 1-.6 1.7V39h-3.1z",className:"48h-e31c21___48h0"})))},w=a(6844),N=a(3934),C=a(96967),k=a(77494),S=a(63648),T=a(15169),P=a(76577);function Z(){return(Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var L=function(e){return b.createElement("svg",Z({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120"},e),d||(d=b.createElement("g",{fill:"#202f58",fillRule:"evenodd",clipRule:"evenodd"},b.createElement("path",{d:"M42.2 27.7c.3-1.3-.8-1.2-3.2.4-2.1.7-2.6 1.3-1.4 1.9 2 .6 2.9 1.4 2.8 2.6.1 1.7.5 1.7 1.3-.1 0-.4.6-.8 1.7-1.1.8-.2.9-.7.5-1.4-.3-.4.1-1.3 1.2-2.6 2-1.6 2.5-2.4 1.6-2.3-.8-.2-1.6 0-2.3.8-.2 1-.7 1.8-1.6 2.2-.3 0-.5-.1-.6-.4m41.7 11.1c1.7 3 3.1 4.4 4.2 4.1.5-.5 1.1-.5 1.8-.1s1.7.3 2.9 0c1.4-.2 1.7.5.9 2.2-1.2 1.1-3.3 1.4-6.2.7-1.2-.5-2-.5-2.5 0-.8.4-1.8.2-3-.7q-1.35-.15-1.2-1.5 1.2-1.8-3-1.2c-1.6.7-2.8 1.1-3.5 1.1-.1 0-.1.1-.2.1-.9-.2-1-.4-.4-.7 1.6-.1 2.6-.8 2.8-2.1.1-.8.8-1.3 2.2-1.6 1.2-.1 2.1-.6 2.6-1.4.4-.8 1.7-.4 2.6 1.1m-63 9.8C25.2 33.4 38.1 21.9 54 19.5c-1.4.2-1.4.9-1.9 1-1.4.2-2.1.5-2.3.9-1.7 2.9 5.6 2.3 3.2 4.1-.8.4-1.4.8-1.5 1.4s-.3 1-.7 1c-1.1.2-1.9 0-2.9-.5-1.1-.2-1.2-.1-1.5.3-.3.9.3 1.3 1.9 1.4.9-.6 1.3-.6 1.4.1.1 1.1.5 1.8 1.3 1.9 1 .6 1.2 1.3.8 2-.4.6-.4 1.3.1 2.1.3 1-.2 1.2-1.5 1.3-1.1-.1-1.4-.1-1.1-.8 1.3-1 1.5-1.5.8-1.6-1.3.7-2.3 1-2.8.8-.9-.1-1.1.2-.6.7-.3.8.1 1 1.4.7.7.1.7.4.2 1-.5.3-.9.5-1.1.6-1.1.8-1.9 1-2.4.8-.7-.9-3.2.9-4 2.1-1 1.3-1.2 2.1-1.6 2.3-2.9 1.5-3.4 1.9-3.4 5.8-.1.8-1.2.8-1.4.2-.6-1.4-.6-2.3-2.4-2.3-2.9.2-4.6 1-5 2.5s-.4 2.6.2 3.3c.7 1 1.6.7 2.5-.9.6-.7 1.2-.7 1.4 0 .1.5-1.8 4.5.4 3.3.6-.2 1.2-.8 1.3-.3-.3 1.4-.4 2.8-.2 3.7 1.1 1.1 2.2.8 3.2-.3 1.3-2.7 3.8-1.5 5.7-.9 2.3.7 8.5 4.7 8.5 6.4 1 2.2 9.5 1.2 7.1 6.1-2.3 3.6.3 7-2.2 7.6-1.8.5-2.2 1.2-2.2 2.2.3.8-.6 1.7-1.1 2.1-1 2-2.1 3.6-4.2 5.2-1.3 1.1-1.6 2.4-1.8 3.7-.5 1.9.2 3.5 2.2 5 1 .9.9 1.4-.3 1.4-3.9-.7-6.1-2.6-6.9-5.8q-.15-2.55-.6-5.4c-.5-1.6-.7-3.5-.5-5.8 0-3.1-.6-4.8-1.9-5.3-.8-.2-1.5-.7-1.9-1.4-.5-1.2-1.5-3.4-3.1-6.5-.4-.8-.3-1.6.4-2.4.9-.9 1.7-1.8 2.2-2.8.3-.8-.1-1.3-1.1-1.4-.9-.4-2.1-1.2-3.4-2.4-1.2-1.6-2.8-2.9-4.7-2.9-1.6-.8-2.8-1.2-3.7-2.2-.2-1.5-.6-3-1.4-4m-.7 2.7c.1-.3.1-.5.2-.8.3.7.1.9-.2.8m61.4-26.2c10.4 6.4 17.3 15.6 18.8 28.3-1.1.7-1.8 2.6-3.5.3-.8-2.5-2.5-4.4-3.5-5.6-1.4-1-2-1-1.9.1 2 2.7 3.1 4.8 3.3 6.5.6 1.8 1.5 2.9 2.8 3.3.6.1 1.7.2 3.3-.6.1.9.1 1.6.1 2.4v2c-.1.2-.3.3-.5.5-1.9 1.3-3.1 2.5-3.6 3.4-.2 1.4-.1 3.2.1 5.4.3 1.6-.3 2.9-1.6 3.8-1.5 1-2.4 2.5-2.9 4.4-1.5 3-3.1 4.7-4.6 5-3 1.1-4.2 1-3.7-.4-1-6.8-3.4-8.3-3.1-12 0-4.6-1-8.2-3.2-9.8-.8-.6-2.5-.7-5.4-.2-1.6.4-2.7.1-3.3-1-1.3-2.1-2.4-4.3-3.3-6.8-1.1-2.6-.6-4.4 1.4-5.6 2-.9 3.2-1.9 3.4-2.9 1.9-1.4 2.4-2.2 1.6-2.6-.6-.2-.9-.6-.7-1.2 1.3-1.6-.7-3.6 3-3.1 1.2.4 
11.8-2.2-.1-2.5-1-.5-1.3-.6-1-1 .6-1.2 0-1.5-1.6-.8-.7 0-.8-.3-.3-.8.7-1.4 1.5-2.5 2.3-3.3 1.4-1 2.1-.9 1.9.1-.4.7-.4 1.3-.1 1.6.6.5.7.9.5 1.2q-.3 1.2.6.9c.5-.5 1.2-1.1 2.2-2.1.9-.9.6-1.5-.7-1.8-.9-.6-.9-1.2-.2-1.8 1.6-.7 2.6-1.5 3-2.6.1-.3.2-.5.5-.7M60.2 19c3.7 0 7.2.5 10.6 1.4q-.75.6-.9 1.2c-.9 2-.8 2.4-2.3 2.8-3.8 1.2-4.6-.1-8.6 4.2-1.5 1.4-2.1 1.1-2.2-.1-1.3-1-1.4-2.3 0-4.8.3-1.4-.6-2.1-2.6-2.2-.8-.5-.8-1 0-1.3 1.3-.2 1.7-.5 1.2-.8h-1.3c2-.2 4-.4 6.1-.4"}),b.createElement("path",{stroke:"#202f58",strokeMiterlimit:10,strokeWidth:2,d:"M59.9 18.4C37 18.4 18.5 37 18.5 59.8s18.5 41.3 41.3 41.3 41.3-18.5 41.3-41.3-18.4-41.4-41.2-41.4m0-3.7c24.9 0 45.1 20.2 45.1 45.1s-20.2 45.1-45.1 45.1-45.1-20.2-45.1-45.1c-.1-24.9 20.1-45.1 45.1-45.1z"}))))},I=a(22630);function O(){return(O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var E=function(e){return b.createElement("svg",O({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),c||(c=b.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"#1b115c",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:8},b.createElement("path",{d:"M82.5 24.06c-8.735 0-16.66-3.452-22.5-9.06-5.84 5.608-13.765 9.06-22.5 9.06S20.84 20.608 15 15v40c0 40 45 50 45 50s45-10 45-50V15c-5.84 5.608-13.765 9.06-22.5 9.06M60 36v54"}),b.createElement("path",{d:"m50 45 10-10 10 10m10 10 10 10-10 10"}),b.createElement("path",{d:"M90 65H75c-8.284 0-15 6.716-15 15v10M40 55 30 65l10 10"}),b.createElement("path",{d:"M30 65h15c8.284 0 15 6.716 15 15v10"}))))},R=a(1302);function D(){return(D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var z=function(e){return b.createElement("svg",D({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45 43"},e),u||(u=b.createElement("path",{fill:"#082A5E",d:"M9.585 16.248c0 7.132 5.783 12.914 12.915 12.914s12.915-5.782 12.915-12.914c0-7.133-5.783-12.915-12.915-12.915S9.585 9.115 9.585 16.248m27.195 7.757 7.729 7.728c1.05 1.05.306 2.845-1.179 2.845h-6.665v6.666c0 1.484-1.795 2.228-2.845 1.178l-9.927-9.927h-2.786l-9.927 9.927c-1.05 1.05-2.845.306-2.845-1.178v-6.666H1.67c-1.485 0-2.228-1.795-1.179-2.845l7.73-7.728a16.2 16.2 0 0 1-1.969-7.757C6.252 7.275 13.527 0 22.5 0s16.248 7.274 16.248 16.248c0 2.809-.713 5.451-1.968 7.757m-1.922 2.791a16.27 16.27 0 0 1-7.116 4.835l5.59 5.59v-4.31c0-.92.746-1.666 1.666-1.666h4.31zm-17.6 4.835a16.27 16.27 0 0 1-7.116-4.835l-4.45 4.45h4.31c.92 0 1.666.745 1.666 1.666v4.309zm-4.757-15.383c0 5.521 4.477 9.998 9.999 9.998s9.999-4.476 9.999-9.998-4.477-9.999-9.999-9.999-9.999 4.477-9.999 9.999m3.333 0a6.666 6.666 0 1 1 13.332 0 6.666 6.666 0 0 1-13.332 0"})))},M=a(52998),V=a(98589),A=a(40685);function B(e){let{description:t}=e;return"string"==typeof t?(0,p.jsx)("p",{className:"upsell-header__description","data-testid":"upsell-header-description",dangerouslySetInnerHTML:{__html:t},"data-component":"UpsellHeaderDescription"}):(0,p.jsx)("p",{className:"upsell-header__description","data-testid":"upsell-header-description",children:t})}function F(e){let t,{type:a,iconName:i,iconUrl:l,title:n,isInHalfWidthUpsell:r,isSelected:o,description:s,features:d,badge:c,isHorizontal:u,isInDialog:b,isOrdered:x}=e,_=(0,g.L)(),Z=null!=d&&d.length>0,O=(0,m.Z)("upsell-header","upsell-header--".concat(_),{"upsell-header--is-in-half-width-upsell":r,"upsell-header--has-features":Z,"upsell-header--is-selected":o,"upsell-header--is-horizontal":u,"upsell-header--is-in-dialog":b,["upsell-header--".concat(a)]:void 0!==a});switch(i){case"umbrella":t=A.default;break;case"all-inclusive":t=N.default;break;case"first-minute":t=I.default;break;case"bar":t=C.Z;break;case"bus":t=k.default;break;case"ski-baggage":t=V.default;break;case"message-text":t=R.Z;break;case"checked-baggage":t=T.default;break;case"aircraft":t=w.default;break;case"seat-selection":t=M.default;break;case"camera":t=S.default;break;case"flex":t=E;break;case"earth":t=L;break;case"24h":t=y;break;case"48h":t=j;break;case"seal":t=z}return(0,p.jsxs)("div",{className:O,"data-testid":"upsell-header","data-component":"UpsellHeader",children:[l&&!b&&(0,p.jsx)("img",{alt:"",src:l,className:"upsell-header__icon upsell-header__icon--non-mobile"}),t&&!l&&!b&&(0,p.jsx)(t,{className:"upsell-header__icon upsell-header__icon--non-mobile"}),(0,p.jsxs)("div",{className:"upsell-header__wrapper",children:[(0,p.jsxs)("div",{className:"flex grow items-center",children:[t&&!b&&(0,p.jsx)(t,{className:"upsell-header__icon upsell-header__icon--mobile"}),!b&&(0,p.jsxs)("div",{className:"upsell-header__title-wrapper",children:[(0,p.jsxs)(f.Z,{customClassName:"upsell-header__title",headingLevel:2,isBold:!0,children:[(0,p.jsx)("span",{children:n}),o&&!x&&(0,p.jsx)(P.default,{className:"upsell-header__selected-icon"})]}),(0,p.jsx)("div",{className:"md:hidden",children:c})]})]}),void 0!==s&&(0,p.jsx)(B,{description:s}),d&&(0,p.jsx)(v.Z,{customClassNames:"upsell-header__features",children:d.map((e,t)=>(0,p.jsx)(h.Z,{customClassNames:"upsell-header__feature",customContentClassNames:"upsell-header__feature-label",iconType:d.length>1?"checkmark":void 0,iconSize:"16px",iconColor:"#aad700",customIconStyles:{marginRight:"8px"},asHtml:!0,children:e},t))})]}),(0,p.jsx)("div",{className:"hidden md:block",children:c})]})}},49527:function(e,t,a){"use strict";a.d(t,{Z:function(){return S}});var i=a(31549),l=a(60669),n=a(44194),r=a(2052),o=a(54737),s=a(86422),d=a(34954),c=a(78856),u=a(38880),p=a(82846),m=a(43645),v=a(37363),h=a(31381),f=a(56506),g=a(62113),b=a(48221),x=a(14895),y=a(82921),_=a(58724),j=a(2861),w=a(76577),N=a(42987),C=a(5856);let k="abtest_pzInsurancePerDay";function S(e){var t,a,S,T,P,Z,L,I,O,E,R,D,z;let M,V,A;let{currentType:B}=(0,b.h)(),F=(0,j.L)(),H="smallMobile"===B||"mobile"===B,q=null!==(P=null==F?void 0:F.startsWith("mytui"))&&void 0!==P&&P,U=(0,o.i2)(),W=(0,x.z$)(q&&U?"MYTUI_UPSELLS":"UPSELLS"),K=(0,r.I0)(),G=void 0!==e.pricePerDay,X=_.LJ.get(k)==="".concat(k,"_1"),Y=G&&X,[Q,$]=(0,n.use
1State)(Y?"perDay":"total"),J="available"===e.status,ee="ordered"===e.status,et="loadprice"===e.status,ea="notavailable"===e.status,ei="callcenter"===e.status,el=void 0!==e.subtitle,en=void 0!==e.features&&e.features.length>0,er=e.disabled||e.isHidden||ei||"blockedbypendingpayment"===e.status,eo={className:(0,l.Z)("upsell-variant","upsell-variant--".concat(F),{"upsell-variant--mytui":null==F?void 0:F.startsWith("mytui"),"upsell-variant--block":ei&&"INSURANCE"!==e.type,["upsell-variant--".concat(e.status)]:void 0!==e.status,["upsell-variant--".concat(e.additionalStatus)]:void 0!==e.additionalStatus,["upsell-variant--".concat(e.type)]:void 0!==e.type,"upsell-variant--is-selected":e.isSelected,"upsell-variant--is-hidden":e.isHidden,"upsell-variant--has-subtitle":el,"upsell-variant--no-features":!en,"upsell-variant--is-recommended":e.isRecommended,"upsell-variant--is-one-of-multiple":e.isOneOfMultipleVariants,"upsell-variant--is-in-half-width-upsell":e.isInHalfWidthUpsell,"upsell-variant--has-single-feature":(null===(t=e.features)||void 0===t?void 0:t.length)===1,"upsell-variant--force-features-list":e.forceFeaturesAsList,"upsell-variant--requested-contact":e.requestedContact,"upsell-variant--feature-extra-margin":e.headerHasIcon&&!e.isOneOfMultipleVariants&&en,"upsell-variant--with-mobile-select-button":e.withMobileSelectButton,"upsell-variant--with-border-for-recommended":e.withBorderForRecommended&&e.isRecommended,"upsell-variant--no-recommended-background":e.withoutRecommendedBackground,"upsell-variant--is-in-carousel":e.isInCarousel})};e.onButtonClick&&e.isOneOfMultipleVariants&&!er&&"FLIGHT_CLASS"!==e.type&&(H||"RESIGN_HORIZONTAL"===e.type||"RESIGN_HORIZONTAL_PRICE_GUARANTEE"===e.type)&&(eo.onClick=e.onButtonClick);let es=!q&&e.isOneOfMultipleVariants&&e.onButtonClick&&!er&&!ee&&!e.requestedContact&&"FLIGHT_CLASS"!==e.type,ed=es||e.subtitle||e.title,ec=e.isOneOfMultipleVariants&&(e.isSelected||ee),eu=void 0!==e.price&&!ei,ep=e.isSelected||ee?s.qh.primarySelected:s.qh.primary;return e.isSelected&&!ee&&(M="confirm"),er&&(ep=s.qh.disabled),void 0!==e.additionalStatus&&(ep=s.qh.ternary,M=void 0),"perDay"!==Q||e.isSelected||ee?(V=null!==(E=null===(O=e.price)||void 0===O?void 0:O.toString())&&void 0!==E?E:"",A=null!==(R=null==W?void 0:W["upsells.total.price.text"])&&void 0!==R?R:"razem"):(V=null!==(L=null===(Z=e.pricePerDay)||void 0===Z?void 0:Z.toString())&&void 0!==L?L:"",A=null!==(I=null==W?void 0:W["upsells.per.day.price.text"])&&void 0!==I?I:"za dzień"),(0,i.jsxs)("div",{...eo,"data-testid":"upsell-variant-".concat(e.type),"data-component":"UpsellVariant",children:[e.isRecommended&&e.recommendedLabel&&(0,i.jsx)(f.Z,{type:"GREEN",className:"upsell-variant__recommended-ribbon",name:e.recommendedLabel,fontColor:null===(a=e.promotionTag)||void 0===a?void 0:a.textColor,backgroundColor:null===(S=e.promotionTag)||void 0===S?void 0:S.backgroundColor,testId:"upsell-variant-recommended-ribbon"}),ed&&(0,i.jsxs)("div",{className:"upsell-variant__heading-wrapper",children:[es&&(0,i.jsx)(s.ZP,{variant:s.qh.circular,className:"upsell-variant__circular-button",onClick:t=>{t.stopPropagation(),void 0!==e.onButtonClick&&e.onButtonClick()},"aria-label":e.title,"data-testid":"upsell-variant-radio-button"}),(0,i.jsxs)("div",{className:"upsell-variant__title-wrapper",children:[e.subtitle&&(0,i.jsx)(u.Z,{headingLevel:3,customClassName:"upsell-variant__subtitle",children:e.subt
1itle}),e.title&&(0,i.jsx)(u.Z,{headingLevel:el?4:3,customClassName:"upsell-variant__title",testId:"upsell-variant-title",children:e.title})]}),ec&&(0,i.jsx)(w.default,{className:"upsell-variant__selected-icon","data-testid":"upsell-variant-selected-icon"})]}),e.description&&(0,i.jsx)("p",{className:"upsell-variant__description",dangerouslySetInnerHTML:{__html:e.description}}),e.participantsRefs&&(0,i.jsx)("div",{className:"w-full self-end pb-5 md:w-auto md:min-w-[200px] md:px-5 md:pb-0",children:(0,i.jsx)(C.Z,{isSelect:!0,name:"participants_refs",wrapperClassName:"m-0",label:null!==(D=null==W?void 0:W["upsell.variant.baggage.ski.baggage.amount"])&&void 0!==D?D:"Liczba sztuk bagażu",value:e.personRefs||e.participantsRefs.length,onChange:t=>{var a;K((0,y.RJ)(t.currentTarget.value,e.personRefs,e.variantId,e.type,e.roomIndex,null===(a=e.participantsRefs)||void 0===a?void 0:a.length))},children:e.participantsRefs.map(e=>(0,i.jsx)("option",{children:e},e))})}),en&&(0,i.jsx)(d.Z,{customClassNames:"upsell-variant__features",children:null===(T=e.features)||void 0===T?void 0:T.map((t,a)=>{let l=void 0!==e.features&&e.features.length>1?"checkmark":void 0;return e.forceFeaturesAsList&&(l="hyphen"),(0,i.jsx)(c.Z,{customClassNames:"upsell-variant__feature",customContentClassNames:"upsell-variant__feature-label",iconType:l,iconSize:"16px",iconColor:"#aad700",customIconStyles:{marginRight:"8px"},asHtml:!0,children:t},a)})}),e.occupancyBadgeLabel&&J&&(0,i.jsxs)("span",{className:"upsell-variant__plane-seats-occupancy md:hidden",children:[(0,i.jsx)(N.Z,{className:"upsell-variant__plane-seats-occupancy--icon"}),e.occupancyBadgeLabel]}),ea&&(0,i.jsx)("span",{className:"upsell-variant__not-available-disclaimer",children:null!==(z=e.notAvailableLabel)&&void 0!==z?z:"Oferta niedostępna"}),(0,i.jsxs)("div",{className:"upsell-variant__action-wrapper",children:[e.statusLabel&&(0,i.jsxs)("div",{className:"upsell-variant__status",children:[(0,i.jsx)("span",{children:e.statusLabel}),e.statusTooltip&&(0,i.jsx)(p.Z,{type:"tooltip",tooltipVariant:g.uY.slim,content:e.statusTooltip,renderAsDialogOnMobile:!0})]}),e.isHidden&&e.hiddenDisclaimer&&(0,i.jsxs)("div",{className:"upsell-variant__hidden-disclaimer",children:[(0,i.jsx)("span",{children:e.hiddenDisclaimer}),e.priceTooltip&&(0,i.jsx)(p.Z,{type:"tooltip",tooltipVariant:g.uY.slim,content:e.priceTooltip,renderAsDialogOnMobile:!0,wrapperClassName:"upsell-variant__price-tooltip",testId:"upsell-variant-hidden-price-tooltip"})]}),(eu||e.priceIncludedLabel)&&!ee&&!ea&&(0,i.jsxs)("div",{className:"upsell-variant__price-wrapper","data-testid":"upsell-variant-price",children:[e.priceIncludedLabel&&(0,i.jsx)("span",{className:"upsell-variant__price-included-label",children:e.priceIncludedLabel}),eu&&!et&&(0,i.jsxs)(i.Fragment,{children:[void 0!==e.price&&(0,i.jsx)(h.Z,{isCheckout:!0,valuePrefixLabel:e.pricePrefixLabel,value:V,currencySymbol:e.currency,currencyTextInfo:A}),e.priceTooltip&&(0,i.jsx)(p.Z,{type:"tooltip",tooltipVariant:g.uY.slim,content:e.priceTooltip,renderAsDialogOnMobile:!0,wrapperClassName:"upsell-variant__price-tooltip",testId:"upsell-variant-price-tooltip"})]}),et&&(0,i.jsx)(m.Z,{isLoading:!0})]}),ei&&(e.insuranceOnlyInCCMessage?(0,i.jsx)("span",{className:(0,l.Z)("upsell-variant__insurance-only-in-cc-message",{"upsell-variant__insurance-only-in-cc-message--right":"ALL_INCLUSIVE_INSURANCE"===e.type}),dangerouslySetInnerHTML:{__html:e.insuranceOnlyInCCMessage}}):(0,i.jsx)("span",{className:"upsell-variant__call-center-label",children:e.callCenterLabel})),e.buttonLabel&&e.onButtonClick&&!et&&!ea&&!ei&&(!e.requestedContact||ee)&&(0,i.jsx)("div",{onMouseEnter:()=>{Y&&$("total")},onMouseLeave:()=>{Y&&$("perDay")},children:(0,i.jsx)(s.ZP,{variant:ep,disabled:er,className:"upsell-variant__button",iconName:M,isLoading:e.isLoading&&(q||!H),iconClassName:"upsell-variant__button-icon",onClick:e.onButtonClick,"data-testid":"upsell-variant-select-button",children:e.buttonLabel})})]}),(0,i.jsx)(v.Z,{isLoading:!q&&e.isLoading,className:"upsell-variant__loading-overlay"})]})}},60238:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i,l,n,r=a(31549),o=a(62716),s=a(97869),d=a(48645),c=a(71923),u=a(44194);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var m=function(e){return u.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:17,height:20},e),i||(i=u.createElement("g",{fill:"#1B115C"},u.createElement("path",{d:"M13.96 20H2.34C1.05 20 0 18.95 0 17.66V2.34C0 1.05 1.05 0 2.34 0h6.87c.2 0 .39.08.53.22l6.34 6.34c.14.14.22.33.22.53v10.57c0 1.29-1.05 2.34-2.34 2.34M2.34 1.5c-.46 0-.84.38-.84.84v15.33c0 .46.38.84.84.84h11.63c.46 0 .84-.38.84-.84V7.4L8.9 1.5z"}),u.createElement("path",{d:"M15.55 7.84h-4.76c-1.29 0-2.33-1.05-2.33-2.34V.75h1.5v4.76c0 .46.38.84.83.84h4.76v1.5zM11.4 11H4.9a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5m-2 3H4.9a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5"}))))};function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var h=function(e){return u.createElement("svg",v({xmlns:"http://www.w3.org/2000/svg",width:18,height:18},e),l||(l=u.createElement("path",{fill:"#1B115C",d:"M2.75 0C1.24 0 0 1.24 0 2.75v12.5C0 16.76 1.24 18 2.75 18h12.5c1.51 0 2.7
15-1.24 2.75-2.75V2.75C18 1.24 16.76 0 15.25 0zm0 1.5h12.5c.7 0 1.25.55 1.25 1.25v10.227l-3.006-2.908a2.025 2.025 0 0 0-2.813 0l-1.025.992-3.09-2.99A2.02 2.02 0 0 0 5.16 7.5c-.51 0-1.019.196-1.406.57l-.001.001L1.5 10.25v-7.5c0-.7.55-1.25 1.25-1.25m9.5 2c-.688 0-1.298.285-1.685.72A2.3 2.3 0 0 0 10 5.75c0 .542.177 1.093.565 1.53.387.435.998.72 1.685.72s1.298-.285 1.685-.72c.388-.437.565-.988.565-1.53s-.177-1.093-.565-1.53c-.387-.435-.998-.72-1.685-.72m0 1.5c.313 0 .452.09.565.217A.82.82 0 0 1 13 5.75a.82.82 0 0 1-.185.533c-.113.127-.252.217-.565.217s-.452-.09-.565-.217a.82.82 0 0 1-.185-.533c0-.208.073-.407.185-.533.113-.127.252-.217.565-.217M5.16 9c.13 0 .258.047.362.148l.001.001 3.054 2.955L4.032 16.5H2.75c-.7 0-1.25-.55-1.25-1.25v-2.913l3.295-3.188A.52.52 0 0 1 5.159 9zm6.927 2a.5.5 0 0 1 .364.148l4.049 3.917v.185c0 .7-.55 1.25-1.25 1.25H6.19l5.534-5.352a.51.51 0 0 1 .363-.148"})))};function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var g=function(e){return u.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 21"},e),n||(n=u.createElement("path",{d:"M10 20.741c-5.523 0-10-4.485-10-10.018S4.477.705 10 .705 20 5.19 20 10.723s-4.477 10.018-10 10.018m0-1.635c4.621 0 8.367-3.753 8.367-8.383S14.621 2.341 10 2.341s-8.367 3.753-8.367 8.382c0 4.63 3.746 8.383 8.367 8.383m-.816-9.2V5.611a.817.817 0 1 1 1.632 0v4.293h4.286a.817.817 0 0 1 0 1.636h-4.286v4.293a.817.817 0 1 1-1.632 0V11.54H4.898a.817.817 0 0 1 0-1.636h4.286z"})))};function b(e){let{accept:t,attachmentsDescription:a,buttonLabel:i,control:l,description:n,files:u,maxFiles:p,maxSize:v,name:f,removeLabel:b,title:x,validationMessages:y,onAddFile:_,onRemoveFile:j}=e,w=(0,o.VY)(),{getRootProps:N,getInputProps:C}=(0,s.uI)({maxFiles:p,maxSize:v,accept:t,onDrop:e=>{let t=[...u,...e];t.length>p?(w.error(y.amount),_(t.slice(0,p))):_(t)},onDropRejected(e){w.removeAll(),e.every(e=>e.errors.some(e=>"too-many-files"===e.code))?w.error(y.amount):e.forEach(e=>{e.errors.forEach(t=>{"file-invalid-type"===t.code?w.error("".concat(y.type," (").concat(e.file.name,")")):"file-too-large"===t.code&&w.error("".concat(y.size," (").concat(e.file.name,")"))})})}});return(0,r.jsxs)("div",{className:"flex flex-col gap-y-[10px]","data-component":"Dropzone",children:[(0,r.jsx)("span",{className:"text-sm font-bold uppercase text-blue",children:x}),u.length>0&&(0,r.jsx)("div",{className:"flex flex-col gap-y-[6px]",children:u.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-baseline gap-x-2",children:[(0,r.jsx)("span",{className:"flex shrink-0 self-center",children:e.type.startsWith("image")?(0,r.jsx)(h,{}):(0,r.jsx)(m,{})}),(0,r.jsx)("span",{className:"shrink whitespace-pre-wrap leading-[20px] text-black",children:e.name}),(0,r.jsx)(c.ZP,{variant:"link",className:"user-select-none h-auto shrink-0 select-none font-bold",onClick:()=>{j(u.filter(t=>t!==e))},children:b})]},t))}),(0,r.jsx)(d.Qr,{render:()=>(0,r.jsxs)("div",{...N(),className:"rounded-lg border border-dashed border-gray-doveLight p-[22px]",children:[(0,r.jsx)("input",{...C({})}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,r.jsx)(g,{className:"h-5 w-5 fill-blue"}),(0,r.jsx)("p",{className:"mb-0 text-black",children:n})]}),(0,r.jsx)(c.ZP,{variant:"link",className:"h-auto font-bold",children:i})]})]}),name:f,control:l}),"string"==typeof a&&(0,r.jsx)("span",{className:"text-sm text-black",dangerouslySetInnerHTML:{__html:a}})]})}},66585:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return iT},default:function(){return iP}});var i,l,n,r,o,s,d,c,u,p,m=a(31549),v=a(2052),h=a(32904),f=a(88527),g=a(23343),b=a(10054);function x(){var e,t,a,i,l,n,r,o,s,d,c,u,p,v;let{data:x,error:y}=(0,b.jK)(),_=null==x?void 0:null===(t=x._embedded)||void 0===t?void 0:null===(e=t.offer)||void 0===e?void 0:e.startDate,j="string"==typeof _?(0,h.sG)(_,h.fK.dayMonthYearWithDots):void 0,{seasons:w,isLoading:N}=(0,g.Q)(j instanceof Date?[j]:void 0);if(void 0===x&&void 0===y||N)return null;let C=null==x?void 0:null===(i=x._embedded)||void 0===i?void 0:null===(a=i.offer)||void 0===a?void 0:a.offerType,k=null==x?void 0:null===(o=x._embedded)||void 0===o?void 0:null===(r=o.offer)||void 0===r?void 0:null===(n=r._embedded)||void 0===n?void 0:null===(l=n.departureFlight)||void 0===l?void 0:l.arrivalPlaceCode;if(!k){let e=null==x?void 0:null===(v=x._embedded)||void 0===v?void 0:null===(p=v.offer)||void 0===p?void 0:null===(u=p._embedded)||void 0===u?void 0:null===(c=u.hotel)||void 0===c?void 0:c.hotelCode;if(e){let t=e.match(/^[A-Za-z]+/);t&&(k=t[0])}}let S=null==x?void 0:null===(d=x._embedded)||void 0===d?void 0:null===(s=d.dataLayer)||void 0===s?void 0:s.tui_season;return(0,m.jsx)(f.Z,{offerType:C,destinations:k,seasons:S||w})}var y=a(7368),_=a(19734),j=a(10188),w=a(3657),N=a(40466),C=a(9243
10),k=a(44194),S=a(48645),T=a(5715),P=a(71923),Z=a(35937),L=a(87954),I=a(14895);let O={title:"Nie udało się założyć rezerwacji",info:"Twoja rezerwacja nie została założona.",button:"Spr\xf3buj ponownie"};function E(e){var t,a,i;let{isOpen:l,onButtonClick:n}=e,r=(0,I.z$)("FORM_ERROR");return(0,m.jsx)(Z.Z,{isOpen:l,className:"form-error-dialog",variant:L.od.withTitle,theme:L.ie.red,dialogTitle:null!==(t=null==r?void 0:r["formError.title"])&&void 0!==t?t:O.title,hideCloseButton:!0,children:(0,m.jsxs)("div",{className:"form-error-dialog__body","data-component":"FormErrorDialog",children:[null!==(a=null==r?void 0:r["formError.info"])&&void 0!==a?a:O.info,(0,m.jsx)(P.ZP,{variant:P.qh.primary,onClick:n,className:"form-error-dialog__button",children:null!==(i=null==r?void 0:r["formError.button"])&&void 0!==i?i:O.button})]})})}var R=a(95870),D=a(7862),z=a.n(D);let M={isSubmitting:z().bool};function V(e){var t;let{isSubmitting:a}=e,i=(0,I.z$)("FORM_SUBMITTING_OVERLAY");return(0,m.jsx)(R.Z,{className:"form-submitting-overlay",isLoading:a,html:null!==(t=null==i?void 0:i["form.submitting.overlay.label"])&&void 0!==t?t:"Przygotowujemy Twoje zam\xf3wienie.<br>Za chwilę nastąpi przekierowanie."})}V.propTypes=M,V.defaultProps={isSubmitting:!1};var A=a(28222),B=a(10824);let F={email:{short:"email",full:"quickReservation.email"},dialingCode:{short:"dialingCode",full:"quickReservation.dialingCode"},phone:{short:"phone",full:"quickReservation.phone"}},H={quick:"quick",full:"full"},q=(0,k.createContext)({currentType:null,isFormSubmitting:!1,setType:()=>{}});var U=a(42330),W=a(55865),K=a(20696),G=a(17208),X=a(11811);function Y(){let e=(0,k.useRef)(!1),t=(0,C.useRouter)(),a=(0,K.Z)(),i=(0,I.z$)("ERROR_POPUP");return(0,k.useCallback)(l=>{if(!e.current&&l){var n,r,o,s,d,c,u,p;X.Z.error(l);let m=null===(r=l.response)||void 0===r?void 0:null===(n=r.headers)||void 0===n?void 0:n["tui-error-type"],v=null===(s=l.response)||void 0===s?void 0:null===(o=s.headers)||void 0===o?void 0:o["tui-response-stamp"],h=W.C.error,f=null!==(d=null==i?void 0:i.title)&&void 0!==d?d:"Przepraszamy, wystąpił nieoczekiwany błąd";"OFFER_NOT_FOUND"===m?(h=W.C.error,f=null!==(c=null==i?void 0:i.offer_not_found)&&void 0!==c?c:"Przepraszamy, ta oferta jest już nieaktualna"):"ORDER_PLACING"===m&&(h=W.C.warning,f=null!==(u=null==i?void 0:i.order_placing)&&void 0!==u?u:"Jesteś w trakcie składania rezerwacji tego zam\xf3wienia"),e.current=!0,a.show({type:h,title:f,body:v?"Kod serwisowy: ".concat(v):"",hideCloseButton:!0,preventClosing:!0,buttons:[{label:null!==(p=null==i?void 0:i.cta)&&void 0!==p?p:"Wr\xf3ć do strony gł\xf3wnej",href:"/"}],onClose(){t.push("/")}})}},[e,a,t,i])}var Q=a(32824),$=a(97796),J=a(43285),ee=a(25175),et=a(74922),ea=a(61522),ei=a(47624),el=a(60810),en=a(20852),er=a(26951),eo=a(72580),es=a(57578),ed=a(78261);function ec(e){return(0,ed.ZP)(e?"".concat(T.config.urls.mytui.customerParticipants,"?offerCode=").concat(e):null)}function eu(e){var t,a,i,l;let{children:n}=e,[r,o]=(0,k.useState)(null),[s,d]=(0,k.useState)(!1),[c,u]=(0,k.useState)(!1),[p,f]=(0,k.useState)(),[g,x]=(0,k.useState)(null),P=Y(),{data:Z,csrfToken:L,error:O}=(0,b.jK)(),R=(0,b.Oe)(),D=(0,b.QK)(),z=(0,b.y0)(),M=null==z?void 0:z.find(e=>e.default),{query:ed}=(0,C.useRouter)(),eu=null==ed?void 0:ed.offerCode,{data:ep}=(0,ee.P)(),{data:em}=ec((null==ep?void 0:ep.authenticated)?eu:null),{data:ev}=(0,$.v)(null==Z?void 0:null===(i=Z._embedded)||void 0===i?void 0:null===(a=i.offer)||void 0===a?void 0:null===(t=a._links)||void 0===t?void 0:t.offerUrl.href),{data:eh}=(0,J.ft)(),ef=(0,v.v9)(et.SV),eg=(0,v.v9)(et.o5),eb=(0,J.zs)(),ex=(0,I.En)(),ey=(0,w.PR)("cartId"),e_=null==eh?void 0:null===(l=eh._embedded)||void 0===l?void 0:l.guaranteeFund,ej=(0,Q.gz)(),[ew,eN]=(0,k.useState)(!1);O&&P(O);let eC=(0,S.cI)({mode:"onTouched",shouldUnregister:!1}),ek=(0,K.Z)(),eS=(0,en.p)(),eT=(0,k.useMemo)(()=>({currentType:g,isFormSubmitting:s,setType:x}),[g,s]);function eP(e){var t,a,i,l;if(!e)return null;let n=null===(t=e.paymentChannels)||void 0===t?void 0:t.find(e=>e.selected);return(null==n?void 0:n.type)===A.Tv.electronicFundsTransfer||(null==n?void 0:n.type)===A.Tv.p24?null===(l=n._embedded)||void 0===l?void 0:null===(i=l.paymentChannelOptions)||void 0===i?void 0:null===(a=i.find(e=>e.selected))||void 0===a?void 0:a.code:(null==n?void 0:n.type)===A.Tv.payAtTuiOffice?e.selectedOffice:null}async function eZ(e){var t,a;let i={appId:(0,j.rh)(),cartId:ey,email:null===(t=e.purchaserData)||void 0===t?void 0:t.email};try{let t=new Headers({csrfToken:L});(0,y.uT)("checkout_place_order_request",{extra:i});let l=await eS("".concat(T.config.urls.checkout.reservation.data),{method:"POST",body:JSON.stringify(e),headers:t,appendCartId:!0,onSuccess(e){var t;let{body:a,headers:i}=e;((null==a?void 0:a.status)==="OK"||(null==a?void 0:a.status)==="LEAD")&&(0,ea.Us)("purchase",Z,ey,ev,eu,ex,p,ef,eg,null==eb?void 0:eb.formattedPrice,void 0,e_,a),void 0!==(null===(t=a._embedded)||void 0===t?void 0:t.dataLayer)?((0,_.yf)({...a._embedded.dataLayer,tui_web:i.get("x-server")}),void 0!==a._embedded.dataLayer.sha256_email&&(0,_.yf)({event:"pz_form_data",sha256_email:a._embedded.dataLayer.sha256_email})):(0,y.uT)("No dataLayer data in placeOrder response for order: ".concat(null==a?void 0:a.orderNumber,"\n                ").concat(void 0!==a.reservationNumber?" | reservation: ".concat(a.reservationNumber):""))}});if(void 0!==l.guid&&void 0===l._links&&"OK"===l.status){let e={orderNumber:l.orderNumber,guid:l.guid};l.reservationNumber&&(e.reservationNumber=l.reservationNumber),l.ryanairSessionCreatedTime&&(e.sessionCreatedTime=l.ryanairSessionCreatedTime);let t=btoa(JSON.stringify(e));(0,y.uT)("checkout_place_order_response",{extra:{...i,status:"ok",
1navigatingTo:"order-placed"}}),(0,ei.zO)()&&window.sessionStorage.removeItem("cartId"),o({url:"/pz/order-placed/".concat(t),httpMethod:"GET",data:void 0})}else{if(void 0===l.status||!["OK","LEAD"].includes(l.status)||void 0===(null===(a=l._links)||void 0===a?void 0:a.redirectUrl))throw Error(JSON.stringify(l));if((0,ei.zO)()&&window.sessionStorage.removeItem("cartId"),await (0,es._)(5e3),l._links.redirectUrl.data){(0,y.uT)("checkout_place_order_response",{extra:{...i,status:"ok",navigatingTo:"links_redirectUrl_form"}});let{href:e,method:t,data:a}=l._links.redirectUrl;o({url:e,httpMethod:t,data:a})}else(0,y.uT)("checkout_place_order_response",{extra:{...i,status:"ok",navigatingTo:"links_redirectUrl_href"}}),window.location.href=l._links.redirectUrl.href}}catch(e){(0,y.uT)("checkout_place_order_response",{extra:{...i,status:"error",error:e}}),X.Z.error(e),d(!1),u(!0)}}(0,k.useEffect)(()=>{void 0!==Z&&x(Z.reservationType||H.full)},[Z]),(0,k.useEffect)(()=>{void 0!==(null==D?void 0:D.paymentChannels)&&void 0===p&&f(D)},[p,D]),(0,k.useEffect)(()=>{void 0===Z||eC.getValues(U.W.country.full)||eC.reset({[U.W.isParticipating.full]:!0,[U.W.dialingCode.full]:null==M?void 0:M.phonePrefix,[U.W.country.full]:null==M?void 0:M.isoCode,[F.dialingCode.full]:null==M?void 0:M.phonePrefix})},[Z]),(0,k.useEffect)(()=>{!ew&&Z&&D&&"data"===ej&&((0,ea.Us)("begin_checkout",Z,ey,ev,eu,ex,p,ef,eg,null==eb?void 0:eb.formattedPrice,void 0,e_),eN(!0))},[Z,D,ej,ew]);let eL=(0,k.useMemo)(()=>({paymentData:p,setPaymentData:f}),[p]);async function eI(){var e,t,a;let i=eC.getValues();if((null==i?void 0:null===(e=i.finishLater)||void 0===e?void 0:e.isOpen)==="true"||void 0===p)return;let l=i.confirmations?Object.keys(i.confirmations).filter(e=>i.confirmations[e]&&e):void 0,n=eP(p);if(eO(n)){if(d(!0),g===H.quick){let{email:e,dialingCode:t,phone:a}=i.quickReservation,n={email:e,phoneNumber:"".concat(t).concat((0,er.jc)(a))};l&&(n.clientConfirmations={selectedConfirmations:l});try{let e=await eS("".concat(T.config.urls.checkout.reservation.quickReservation),{method:"POST",body:JSON.stringify(n),appendCartId:!0});if((null==e?void 0:e.status)!=="OK")throw Error();ek.show({type:W.C.success,title:"Dziękujemy. Nasz konsultant skontaktuje się z Tobą.",hideCloseButton:!0,preventClosing:!0,buttons:[{label:"Wr\xf3ć do strony gł\xf3wnej",href:"/"}]}),d(!1)}catch(t){let e=ek.show({type:W.C.error,title:"Przepraszamy, szybka rezerwacja nie powiodła się.",hideCloseButton:!0,buttons:[{label:"UŻYJ PEŁNEJ REZERWACJI",onClick(){(0,eo.Z)({scrollToTop:!0}),x(H.full),ek.remove(e)}}]});d(!1)}}else{let{apartmentNumber:e,birthDate:r,city:o,country:s,name:d,dialingCo
1de:c,phone:u,postalCode:m,sex:v,street:f,surname:g,streetNumber:b,email:x,isParticipating:_,requiredInfo:j}=i.user,w=(null==i?void 0:i.participant)?i.participant.filter(Boolean).map(e=>({name:e.name,surname:e.surname,birthDate:e.birthDate,sex:e.sex,personRef:e.personRef,participantType:e.type,participantRequiredInfo:e.requiredInfo?Object.keys(e.requiredInfo).map(t=>({id:t,value:e.requiredInfo[t]})):[]})):[],C=(null==i?void 0:i.participant)?i.participant.filter(e=>e.saveToMytui).map(e=>({firstName:e.name,lastName:e.surname,birthDate:(0,h.p6)((0,N.Qc)(e.birthDate,"dd.MM.yyyy",new Date),el.fK.yearMonthDayWithDashes),gender:e.sex})):[];if(Array.isArray(C)&&C.length>0&&Array.isArray(null==em?void 0:em.participants))try{await eS("".concat(T.config.urls.mytui.customerParticipants),{method:"POST",body:JSON.stringify({participants:[...em.participants.map(e=>({id:e.id,firstName:e.firstName,lastName:e.lastName,gender:e.gender,birthDate:e.birthDate})),...C],termsAccepted:!0})})}catch(e){X.Z.error("Error saving participants to MyTui"),X.Z.error(e),(0,y.Tb)(e,{tags:{component:"Checkout",action:"saveParticipantsToMyTui"},extra:{data:C}})}if(_){let e=null==R?void 0:R[0];w.unshift({name:d,surname:g,birthDate:r,sex:v,participantType:null!==(a=null==e?void 0:e.type)&&void 0!==a?a:"ADULT",personRef:null==e?void 0:e.personRef,participantRequiredInfo:j?Object.keys(j).map(e=>({id:e,value:j[e]})):[]})}let k=w.filter(e=>!!e.name).map((e,t)=>({...e,index:t+1})),S={apartmentNumber:e,birthDate:r,city:o,country:s,email:x,extraCustomerData:j?Object.keys(j).map(e=>({id:e,value:j[e]})):[],name:d,phoneNumber:"".concat(c).concat((0,er.jc)(u)),postalCode:m,sex:v,street:f,streetNumber:b,surname:g},P=null===(t=p.paymentChannels)||void 0===t?void 0:t.find(e=>e.selected),Z={purchaserData:S,participants:k,tripRequiredInfos:i.tripRequiredInfos,invoiceAttachmentSelected:i.invoiceAttachmentSelected};(null==P?void 0:P.type)&&(Z.paymentChannel={paymentMode:P.type,paymentAdditionalInformation:null!=n?n:void 0}),l&&(Z.clientConfirmations={selectedConfirmations:l}),eZ(Z)}}}function eO(e){return void 0===e?(f(e=>({...e,isPaymentChannelCodeMissing:!0})),(0,eo.Z)({elementId:"#payment-method",optionalMargin:60}),!1):(void 0!==p&&p.isPaymentChannelCodeMissing&&f(e=>({...e,isPaymentChannelCodeMissing:!1})),!0)}return(0,m.jsx)(S.RV,{...eC,children:(0,m.jsx)(B.Z.Provider,{value:eL,children:(0,m.jsxs)(q.Provider,{value:eT,children:[null!==r&&(0,m.jsx)(G.Z,{...r}),(0,m.jsx)("form",{onSubmit:eC.handleSubmit(eI,function(){eO(eP(p))}),noValidate:!0,"data-component":"Form",children:n}),(0,m.jsx)(E,{isOpen:c,onButtonClick:function(){u(!1),eI()}}),(0,m.jsx)(V,{isSubmitting:g===H.full&&s})]})})})}var ep=a(60669),em=a(60826),ev=a(54737),eh=a(34435),ef=a(41483),eg=a(7854),eb=a(21595),ex=a(79131),ey=a(48221);function e_(){let{data:e}=(0,b.jK)();return(null==e?void 0:e.lowCostText)?(0,m.jsx)("div",{className:"border border-solid border-red bg-white p-[22px] md:rounded-md","data-component":"LowCostInfo",children:(0,m.jsx)("p",{className:"mb-0 text-red",dangerouslySetInnerHTML:{__html:e.lowCostText}})}):null}var ej=a(92507),ew=a(61186),eN=a(82921),eC=function(e){let{className:t,label:a}=e,[i,l]=(0,k.useState)(!1),n=(0,Q.Qx)(),r=(0,Q.gz)(),o=(0,v.I0)(),{currentType:s,isFormSubmitting:d}=(0,k.useContext)(q),{formState:c,trigger:u}=(0,S.Gc)(),p=(0,b.Lo)(),h=(0,ev.TA)(),f=(0,v.v9)(et.o5),g=(0,v.v9)(et.Wk),x=null==p?void 0:p.offerType,y=x===T.config.checkoutOfferTypes.charter,j=x===T.config.checkoutOfferTypes.byPlane;async function w(e){if("recommendations"===r&&s!==H.quick){var t,a;if(e.preventDefault(),null===f){n("data");return}let i=[ej.hc.transfer,ej.hc.digitalCare,ej.hc.airportSecurityTax];!y&&j&&i.unshift(ej.hc.insurance);let l=f.find(e=>e.type===ej.hc.planeSeatsReservation);(null==l?void 0:null===(a=l._embedded)||void 0===a?void 0:null===(t=a.upsellVariants[0])||void 0===t?void 0:t.status)!==ew.X.notAvailable&&i.push(ej.hc.planeSeatsReservation);let r=f.find(e=>e.type===ej.hc.priceGuarantee);h&&r&&i.push(ej.hc.priceGuarantee);let s=f.find(e=>e.type===ej.hc.gtzw);h&&void 0!==s&&i.push(ej.hc.gtzw);let d=f.filter(e=>{var t,a,l;let n=null===(t=e._embedded)||void 0===t?void 0:t.upsellVariants,r=e.type===ej.hc.insurance&&void 0!==n&&(null==n?void 0:n.length)===1;return i.includes(e.type)&&!e.isResignVariantSelected&&void 0===(null===(l=e._embedded)||void 0===l?void 0:null===(a=l.upsellVariants)||void 0===a?void 0:a.find(e=>e.selected))&&!r});if(d.length>0){let e=d[0];o((0,eN.s2)(!0)),(0,eo.Z)({elementId:"#upsell-".concat(e.type,"-").concat(e.roomIndex||
10),optionalMargin:60}),(0,_.yf)({event:"failed_upsell_validation",failed_upsell_validation:d.map(e=>e.groupType)})}else g&&o((0,eN.s2)(!1)),n("data")}else"data"===r&&(l(!0),(0,_.yf)({event:"click_payment"}))}return(0,k.useEffect)(()=>{if(i&&c.errors&&Object.keys(c.errors).length>0){l(!1);let e=[],t=[],a=[];c.errors.user&&(e=Object.keys(c.errors.user).map(e=>({reason:"user.".concat(e)}))),c.errors.participant&&(t=c.errors.participant.filter(Boolean).map((e,t)=>Object.keys(e).map(e=>({reason:"participant.".concat(t,".").concat(e)})))),c.errors.confirmations&&(a=Object.keys(c.errors.confirmations).map(e=>({reason:e}))),(0,_.yf)({event:"failed_form_validation",failed_form_validation:[...e,...t.flat(),...a]})}},[c.errors,i]),(0,m.jsx)(P.ZP,{type:"submit",className:t,variant:d?P.qh.disabled:P.qh.cta,disabled:d,size:P.Ph.large,onClick:w,isLoading:d,"data-testid":"navigation-button",children:a})};function ek(){let e=(0,ev.vc)(),t=(0,I.z$)("RYANAIR_INFO");return e&&(null==t?void 0:t["ryanair.required.confirmation.info"])?(0,m.jsx)("div",{className:"border border-solid border-red bg-white p-[22px] md:rounded-md","data-component":"RyanairInfo",children:(0,m.jsx)("p",{className:"mb-0 text-red",dangerouslySetInnerHTML:{__html:t["ryanair.required.confirmation.info"]}})}):null}var eS=a(86422),eT=a(34954),eP=a(78856),eZ=a(38880),eL=a(13282),eI=a(79372),eO=a(98629);let eE=z().arrayOf(z().shape({label:z().string,value:z().oneOfType([z().string,z().number]),baseValue:z().oneOfType([z().string,z().number]),dialogContent:z().oneOfType([z().element,z().string]),dialogSettings:z().shape({variant:z().oneOf(Object.values(L.od)),theme:z().oneOf(Object.values(L.ie)),className:z().string,contentClassName:z().string,bodyClassName:z().string}),hasInfoButton:z().bool,isIncluded:z().bool})),eR=z().shape({formattedPrice:z().string,advancePaymentPercentage:z().string,advancePaymentAmount:z().string}),eD={priceData:z().shape({_embedded:z().shape({upsellPrices:z().arrayOf(z().shape({label:z().string,formattedPrice:z().string,roomIndex:z().number})),paymentVariants:z().arrayOf(z().shape({formattedPrice:z().string,paymentDate:z().string,code:z().string,selected:z().bool,advanced:z().bool,advancePaymentAmount:z().string,remainingAmount:z().string,advancePaymentPercentage:z().string,label:z().string,description:z().string,_links:z().shape({selectVariant:z().shape({rel:z().string,href:z().string,method:z().string,templated:z().bool})})})),participantPrices:z().arrayOf(z().shape({personType:z().string,formattedPrice:z().string})),guaranteeFund:z().shape({label:z().string,price:z().number,tooltipText:z().string,tooltipLink:z().string})}),formattedAdvancePrice:z().string,formattedSupplementPrice:z().string,formattedDiscountPrice:z().string,formattedFullPrice:z().string,currency:z().string,flightClass:z().string,upsellPriceResources:z().arrayOf(z().shape({formattedPrice:z().string,status:z().string,upsellId:z().string,hidden:z().bool,selected:z().bool}))}),offerType:z().oneOf(Object.values(T.config.checkoutOfferTypes)),withPaymentInfo:z().bool},ez={data:eR,currency:z().string,isAdvancePayment:z().bool,withPaymentInfo:z().bool},eM={items:eE,currency:z().string,isInDialog:z().bool},eV={titleDialog:"titleDialog",guaranteeFund:"guaranteeFund",includedServices:"includedServices"},eA={variant:z().oneOf(Object.values(eV)),data:z().shape({pricingData:eR,featureList:eE,guaranteeFund:z().shape({tooltipLink:z().string,tooltipText:z().string}),includedFeatures:z().arrayOf(z().string),promotions:z().arrayOf(z().shape({color:z().string,description:z().string,expirationDate:z().string,label:z().string}))}),currency:z().string,isAdvancePayment:z().bool};var eB=a(69152);function eF(e){let{currency:t,isInDialog:a}=e,i=function(){var e,t,a,i,l,n,r,o,s,d,c,u,p,h,f,g,x,y,_,j,w,N,C,k,S,P,Z,O,E;let{isInDialog:R=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:D}=(0,J.ft)(),{data:z}=(0,b.jK)(),M=null==z?void 0:z._embedded.offer,V=(0,I.z$)("PRICE_SUMMARY"),A=(0,I.En)(),B=(0,ev.TA)(),F=(0,ev.lg)(),H=(0,ev.Wv)(),q=(0,v.v9)(et.o5),U=[],W=null!==(n=null==D?void 0:null===(e=D._embedded)||void 0===e?void 0:e.upsellPrices)&&void 0!==n?n:[],K=null!==(r=null==D?void 0:null===(t=D._embedded)||void 0===t?void 0:t.participantPrices)&&void 0!==r?r:[],G=null==D?void 0:null===(a=D._embedded)||void 0===a?void 0:a.guaranteeFund,X=null==D?void 0:null===(i=D._embedded)||void 0===i?void 0:i.priceIncludedServices,Y=(0,eh.jK)(null==D?void 0:D.currency),Q=null==M?void 0:M.offerType,$=void 0!==(null==D?void 0:D.formattedBasePrice),ee=void 0!==(null==D?void 0:null===(l=D._embedded)||void 0===l?void 0:l.promotions)&&D._embedded.promotions.length>0,ea=Q===T.config.checkoutOfferTypes.charter;
1if(R){let e=K.some(e=>e.personType===T.Pl.adult&&"0"===e.formattedPrice);U.push(...K.filter(t=>!e||"0"!==t.formattedPrice).map(t=>{let a,i=t.formattedPrice;return t.formattedDiscountPrice&&(i=t.formattedDiscountPrice,a=t.formattedPrice),{label:function(e,t){var a,i,l,n,r,o;if(t)return null!==(a=null==V?void 0:V["price.summary.room"])&&void 0!==a?a:"Pok\xf3j";if(e.label)return e.label;switch(e.personType){case T.Pl.adult:return null!==(i=null==V?void 0:V["price.summary.adult"])&&void 0!==i?i:"Osoba dorosła";case T.Pl.child:return"".concat(null!==(l=null==V?void 0:V["price.summary.child"])&&void 0!==l?l:"Dziecko"," (").concat(e.birthDate||(null!==(n=null==V?void 0:V["price.summary.no.birth.date"])&&void 0!==n?n:"brak daty ur."),")");case T.Pl.infant:return"".concat(null!==(r=null==V?void 0:V["price.summary.infant"])&&void 0!==r?r:"Dziecko do 2 lat"," (").concat(e.birthDate||(null!==(o=null==V?void 0:V["price.summary.no.birth.date"])&&void 0!==o?o:"brak daty ur."),")")}return""}(t,e),value:i,baseValue:a}}))}else $&&U.push({label:null==V?void 0:V["price.summary.total.discount.price"],baseValue:D.formattedBasePrice}),ee&&U.push(...D._embedded.promotions.map(e=>({label:e.label,value:e.formattedPrice})));if(ea&&U.push({label:null!==(o=null==V?void 0:V["price.summary.hand.luggage"])&&void 0!==o?o:"Bagaż podręczny",value:null!==(s=null==V?void 0:V["price.summary.included"])&&void 0!==s?s:"w cenie",isIncluded:!0}),(null==D?void 0:D.basicInsurance)&&(R?U.push({label:null!==(d=null==V?void 0:V["price.summary.basic.insurance"])&&void 0!==d?d:"Ubezpieczenie: podstawowe",value:null!==(c=null==V?void 0:V["price.summary.included"])&&void 0!==c?c:"w cenie",isIncluded:!0}):U.push({label:"".concat(null==V?void 0:V["price.summary.insurance.prefix"]," <br />").concat(null==V?void 0:V["price.summary.insurance.included"])})),W.length>0){if(B)for(let e of W){let t;let a=null==z?void 0:null===(p=z._embedded)||void 0===p?void 0:null===(u=p.upsellGroups)||void 0===u?void 0:u.find(a=>{var i,l;let n=null==a?void 0:null===(l=a._embedded)||void 0===l?void 0:null===(i=l.upsellVariants)||void 0===i?void 0:i.find(t=>t.upsellId===e.upsellId);if(n)return t=n,!0});if(!a)continue;let i=null==a?void 0:null===(h=a._embedded)||void 0===h?void 0:h.upsellVariants,l=a.title,n=null!==(g=null!==(f=null==t?void 0:t.summaryTitle)&&void 0!==f?f:null==t?void 0:t.title)&&void 0!==g?g:"";if(a.type===ej.hc.insurance){let t=null!==(y=null==A?void 0:null===(x=A.localizedContent)||void 0===x?void 0:x["upsell.title.insurance.prefix"])&&void 0!==y?y:"Dodatkowe";U.push({label:"".concat(t," ").concat(null!==(_=null==l?void 0:l.toLowerCase())&&void 0!==_?_:"",": ").concat(n),value:e.formattedPrice,roomIndex:e.roomIndex})}else a.type===ej.hc.facultativeTrips?U.push({label:e.label,value:e.formattedPrice,roomIndex:e.roomIndex}):a.type===ej.hc.digitalCare||Array.isArray(i)&&i.length>1?U.push({label:"".concat(l,": ").concat(n),value:e.formattedPrice,roomIndex:e.roomIndex}):U.push({label:n,value:e.formattedPrice,roomIndex:e.roomIndex})}else U.push(...W.map(e=>({label:e.label,value:e.formattedPrice,roomIndex:e.roomIndex})))}if(F)for(let e of null!=q?q:[]){if(!(0,eB.gr)(e.type))continue;let t=null===(w=e._embedded)||void 0===w?void 0:null===(j=w.upsellVariants)||void 0===j?void 0:j.find(e=>{var t;return e.selected&&(!e.hidden||(null===(t=e.roles)||void 0===t?void 0:t.includes("BASELINE")))});if(void 0===t)continue;let a=null!==(C=null!==(N=t.summaryTitle)&&void 0!==N?N:t.title)&&void 0!==C?C:"";if(void 0!==W.find(i=>void 0!==i.upsellId&&(i.upsellId===t.upsellId||i.upsellId===t.code)||i.roomIndex===e.roomIndex&&"string"==typeof i.label&&""!==a&&i.label.toLowerCase().includes(a.toLowerCase())))continue;let i=null!==(S=null!==(k=t.priceSummaryPrice)&&void 0!==k?k:t.formattedPrice)&&void 0!==S?S:t.price;if(void 0===i)continue;let l=void 0!==t.priceSummaryCurrency?(0,eh.jK)(t.priceSummaryCurrency):void 0;if(e.type===ej.hc.insurance){let t=null!==(O=null==A?void 0:null===(P=A.localizedContent)||void 0===P?void 0:P["upsell.title.insurance.prefix"])&&void 0!==O?O:"Dodatkowe";U.push({label:"".concat(t," ").concat(null!==(E=null===(Z=e.title)||void 0===Z?void 0:Z.toLowerCase())&&void 0!==E?E:"",": ").concat(a),value:i,currency:l,roomIndex:e.roomIndex});continue}U.push({label:a||e.title,value:i,currency:l,roomIndex:e.roomIndex})}return H&&Array.isArray(null==D?void 0:D.extras)&&D.extras.length>0&&U.push(...D.extras.map(e=>({label:e.title,value:e.price}))),void 0!==G&&U.push({label:G.label,value:G.price,hasInfoButton:!0,dialogContent:(0,m.jsx)(eG,{variant:eV.guaranteeFund,data:{guaranteeFund:G},currency:Y}),dialogSettings:{className:"price-summary-dialog",bodyClassName:"price-summary-dialog__body",variant:L.od.withTitle}}
1),void 0!==X&&U.push(...X.map(e=>{var t;return{label:e.name,isIncluded:0==e.formattedAmount,hasInfoButton:void 0!==e.tooltipText,value:0==e.formattedAmount?null!==(t=null==V?void 0:V["price.summary.included"])&&void 0!==t?t:"w cenie":e.formattedAmount,dialogContent:(0,m.jsx)(eG,{variant:eV.includedServices,data:{includedService:e},currency:Y}),dialogSettings:{className:"price-summary-dialog",bodyClassName:"price-summary-dialog__body",variant:L.od.withTitle}}})),U}({isInDialog:a}),l=(0,I.z$)("PRICE_SUMMARY"),n=(0,ep.Z)("price-summary-feature-list",{"price-summary-feature-list--in-dialog":a});return i&&0!==i.length?(0,m.jsx)("ul",{className:n,children:i.map((e,a)=>{var i,n;let r=void 0!==e.label,o=void 0!==e.value,s=void 0!==e.baseValue,d=void 0!==e.roomIndex,c=null!==(i=e.currency)&&void 0!==i?i:t,u=(0,ep.Z)("price-summary-feature-list__label",{"price-summary-feature-list__label--no-value":!o}),p=(0,ep.Z)("price-summary-feature-list__value price-summary-feature-list__value--base",{"price-summary-feature-list__value--has-both-values":o&&s});return(0,m.jsxs)("li",{className:"price-summary-feature-list__item","data-testid":"price-summary-item",children:[r&&(0,m.jsxs)("span",{className:u,children:[d&&(0,m.jsxs)("span",{children:[null!==(n=null==l?void 0:l["price.summary.room.index"])&&void 0!==n?n:"Pok\xf3j nr"," ",e.roomIndex+1," -"," "]}),(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:e.label}}),e.hasInfoButton&&(0,m.jsx)(ex.Z,{wrapperClassName:"price-summary-feature-list__info-button",type:"dialog",title:e.label,content:(0,m.jsx)("div",{"data-testid":"price-summary-item-dialog",children:e.dialogContent}),dialogSettings:e.dialogSettings,testId:"price-summary-item-info-button"})]}),s&&(0,m.jsxs)("span",{className:p,children:[(0,eO._B)(e.baseValue),!e.isIncluded&&(0,m.jsxs)("span",{className:"price-summary-feature-list__currency",children:[" ",c]})]}),o&&(0,m.jsxs)("span",{className:"price-summary-feature-list__value",children:[(0,m.jsx)("span",{"data-testid":"price-summary-item-price",children:(0,eO._B)(e.value)}),!e.isIncluded&&(0,m.jsxs)("span",{className:"price-summary-feature-list__currency",children:[" ",c]})]})]},a)})}):null}eF.propTypes=eM,eF.defaultProps={currency:"Kč"};var eH=a(17890),eq=a(43405);function eU(e){var t,a,i,l,n,r,o;let{isRyanairFlight:s,priceData:d,className:c}=e,{query:u,isReady:p}=(0,C.useRouter)(),v=(0,ev.Vv)(),[h,f]=(0,k.useState)(!1),g=new Date,b=null==d?void 0:null===(a=d._embedded)||void 0===a?void 0:null===(t=a.participantPrices)||void 0===t?void 0:t.some(e=>{if(!e.birthDate)return!1;let t=(0,eH.o)(g,(0,N.Qc)(e.birthDate,"dd.MM.yyyy",g));return t>=3&&t<=12}),x=v&&s&&b&&d&&p&&"string"==typeof u.offerCode,y=(0,I.z$)("RYANAIR_INFO"),j=!1;if(x&&!h&&Array.isArray(null==d?void 0:null===(i=d._embedded)||void 0===i?void 0:i.participantPrices)){let e=Number((0,_.IC)("pa")[u.offerCode]),t=Number(null!==(n=null===(l=d._embedded.guaranteeFund)||void 0===l?void 0:l.price)&&void 0!==n?n:0);for(let e of d._embedded.participantPrices)t+=Number(e.formattedPrice);e&&t&&(j=t-e>=Number(null!==(r=null==y?void 0:y["ryanair.price.jump.threshold"])&&void 0!==r?r:1))}return x&&j&&!h?(0,m.jsxs)("div",{className:(0,ep.Z)("mb-2 flex gap-2",c),"data-component":"RyanairPriceJumpInfo",children:[(0,m.jsx)("div",{className:"text-sm leading-4",dangerouslySetInnerHTML:{__html:null!==(o=null==y?void 0:y["ryanair.price.jump.info"])&&void 0!==o?o:"Ze względu na wym\xf3g automatycznego przydzielenia miejsc w samolocie przez przewoźnika <strong>Ryanair</strong>, cena oferty uległa zmianie"}}),(0,m.jsx)(eq.Z,{onClick:()=>{f(!0)}})]}):null}function eW(e){var t,a,i;let l,n,{data:r,currency:o,isAdvancePayment:s,withPaymentInfo:d,isInDialog:c,isOrderOption:u,priceData:p,isRyanairFlight:v}=e,h=(0,I.z$)("PRICE_SUMMARY"),f=(0,I.En)(),g=(0,eh.BH)(),b=(0,ep.Z)("price-summary-pricing",{"price-summary-pricing--with-advance-payment":s,"price-summary-pricing--with-order-option":u,"price-summary-pricing--with-payment-info":d,"price-summary-pricing--is-in-dialog":c}),x=void 0!==(null==r?void 0:r.conversionRate);return x&&(r.conversionRate,r.formattedPrice&&(l=(0,eO._B)(Math.round(parseFloat(r.formattedPrice)/r.conversionRate))),s&&r.advancePaymentAmount&&(n=(0,eO._B)(Math.round(parseFloat(r.advancePaymentAmount)/r.conversionRate)))),(0,m.jsxs)("div",{className:b,children:[(0,m.jsxs)("div",{className:"price-summary-pricing__item",children:[(0,m.jsx)(eZ.Z,{headingLevel:2,customClassName:"price-summary-pricing__heading price-summary-pricing__heading--price",children:null==h?void 0:h["price.summary.popup.total.price"]}),void 0!==r.formattedPrice&&(0,m.jsxs)("span",{className:"price-summary-pricing__value","data-testid":"price-summary-total-price",children:[(0,eO._B)(r.formattedPrice)," ",(0,m.jsx)("span",{className:"price-summary__currency",children:o})]})]}),(0,m.jsx)(eU,{className:"hidden md:flex",isRyanairFlight:v,priceData:p}),s&&(0,m.jsxs)("div",{className:"price-summary-pricing__item","data-testid":"price-summary-advance-payment",children:[(0,m.jsxs)(eZ.Z,{headingLevel:2,customClassName:"price-summary-pricing__heading price-summary-pricing__heading--advance-payment",children:[null!==(a=null==h?void 0:h["price.summary.advanced.payment.title"])&&void 0!==a?a:"Zaliczka"," ",r.advancePaymentPercentage,"cs"===g?" ":"","%"]}),(0,m.jsxs)("span",{className:"price-summary-pricing__value price-summary-pricing__value--advance",children:[(0,eO._B)(r.advancePaymentAmount)," ",(0,m.jsx)("span",{className:"price-summary__currency",children:o})]})]}),u&&(0,m.jsxs)("div",{className:"price-summary-pricing__item","data-testid":"price-summary-advance-payment",children:[(0,m.jsx)(eZ.Z,{headingLevel:2,customClassName:"price-summary-pricing__heading price-summary-pricing__heading--advance-payment",children:null!==(i=null==h?void 0:h["price.summary.order.option"])&&void 0!==i?i:"Zatrzymanie ceny"}),(0,m.jsxs)("span",{className:"price-summary-pricing__value price-summary-pricing__value--advance",children:[(0,eO._B)(r.optionPrice)," ",(0,m.jsx)("span",{className:"price-summary__currency",children:o})]})]}),x&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"price-summary-pricing__item price-summary-pricing__item--conversion",children:[(0,m.jsxs)(eZ.Z,{headingLevel:2,customClassName:(0,ep.Z)("price-summary-pricing__heading price-summary-pricing__heading--conversion",{"price-summary-pricing__heading--advance-payment":s,"price-summary-pricing__heading--price":!s}),children:[(0,eO._B)(s?r.advancePaymentAmount:r.formattedPrice)," ",o]}),(0,m.jsx)("span",{className:"text-center",children:"="}),s?(0,m.jsx)(m.Fragment,{children:void 0!==n&&(0,m.jsxs)("span",{className:"price-summary-pricing__value price-summary-pricing__value--conversion","data-testid":"price-summary-total-price",children:[n," ",(0,m.jsx)("span",{className:"price-summary__currency",children:"Kč"})]})}):(0,m.jsx)(m.Fragment,{children:void 0!==l&&(0,m.jsxs)("span",{className:"price-summary-pricing__value price-summary-pricing__value--conversion","data-testid":"price-summary-total-price",children:[l," ",(0,m.jsx)("span",{className:"price-summary__currency",children:"Kč"})]})})]}),c&&(0,m.jsx)("span",{className:"text-xs",children:null==f?void 0:null===(t=f.localizedContent)||void 0===t?void 0:t.conversionRateDisclaimer})]})]})}function eK(e){var t,a,i;let{variant:l,data:n,currency:r,isAdvancePayment:o}=e,s=(0,I.z$)("PRICE_SUMMARY"),d=n.promotions&&n.promotions.length>0,c=n.includedFeatures&&n.includedFeatures.length>0;return(0,m.jsxs)("div",{className:"price-summary-dialog price-summary-dialog--".concat(l),"data-testid":"price-summary-dialog",children:[(0,m.jsxs)("div",{className:"price-summary-dialog__wrapper",children:[l===eV.includedServices&&(0,m.jsxs)(m.Fragment,{children:[n.includedService.tooltipText,(0,m.jsx)(eS.ZP,{className:"price-summary-dialog__read-more",variant:eS.qh.clean,href:n.includedService.tooltipLink,target:"_blank",iconName:"arrow",children:null!==(t=null==s?void 0:s["price.summary.read.more"])&&void 0!==t?t:"Więcej informacji"})]}),l===eV.guaranteeFund&&(0,m.jsxs)(m.Fragment,{children:[n.guaranteeFund.tooltipText,(0,m.jsx)(eS.ZP,{className:"price-summary-dialog__read-more",variant:eS.qh.clean,href:n.guaranteeFund.tooltipLink,target:"_blank",iconName:"arrow",children:null!==(a=null==s?void 0:s["price.summary.read.more"])&&void 0!==a?a:"Więcej informacji"})]}),l===eV.titleDialog&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(eZ.Z,{headingLevel:5,customClassName:"price-summary-dialog__heading",children:null==s?void 0:s["price.summary.popup.details"]}
1),(0,m.jsx)(eF,{currency:r,isInDialog:!0})]})]}),l===eV.titleDialog&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(eW,{data:n.pricingData,currency:r,isAdvancePayment:o,isInDialog:!0}),d&&(0,m.jsx)("div",{className:"price-summary-dialog__promotions",children:n.promotions.map(e=>e.description?(0,m.jsx)(eI.Z,{disabled:!e.description,content:e.description,target:(0,m.jsx)(eL.Z,{name:e.label,backgroundColor:e.color,fontColor:e.fontColor}),interactionKind:"hover",position:"left-top",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},e.label):(0,m.jsx)(eL.Z,{name:e.label,backgroundColor:e.color,fontColor:e.fontColor},e.label))}),d&&(0,m.jsx)("div",{className:"price-summary-dialog__separator"}),c&&(0,m.jsxs)("div",{className:"price-summary-dialog__included-features",children:[(0,m.jsx)("span",{className:"price-summary-dialog__included-features-title",children:null!==(i=null==s?void 0:s["price.summary.popup.included.features"])&&void 0!==i?i:"Co zawiera cena?"}),(0,m.jsx)(eT.Z,{children:n.includedFeatures.map((e,t)=>(0,m.jsx)(eP.Z,{iconType:"checkmark",iconColor:"#aad700",children:e},t))})]})]})]})}eW.propTypes=ez,eW.defaultProps={currency:"Kč"},eK.propTypes=eA,eK.defaultProps={currency:"Kč"};var eG=eK;function eX(){var e,t,a,i,l,n,r,o;let{currentType:s}=(0,k.useContext)(q),{data:d,isValidating:c}=(0,J.ft)(),u=(0,b.Lo)(),p=(0,J._4)(),v=(0,J.zs)(),{isMobile:h}=(0,ey.h)(),f=(0,Q.gz)(),g=[null==u?void 0:null===(t=u._embedded)||void 0===t?void 0:null===(e=t.departureFlight)||void 0===e?void 0:e.airlineCode,null==u?void 0:null===(i=u._embedded)||void 0===i?void 0:null===(a=i.returnFlight)||void 0===a?void 0:a.airlineCode].includes("FR"),x=(0,I.z$)("PRICE_SUMMARY");if(h&&!d&&!c)return null;let y="data"===f,_="recommendations"===f?null!==(l=null==x?void 0:x["price.summary.next.button.label"])&&void 0!==l?l:"Dalej":null!==(n=null==x?void 0:x["price.summary.order.button.label"])&&void 0!==n?n:"Rezerwuj";s===H.quick&&(_=null!==(r=null==x?void 0:x["price.summary.order.button.label"])&&void 0!==r?r:"Rezerwuj");let j=null!==(o=null==p?void 0:p.advanced)&&void 0!==o&&o,w=(null==p?void 0:p.code)==="order_option",N=(0,eh.jK)(null==d?void 0:d.currency),C=null==u?void 0:u.priceIncludes,S=null==u?void 0:u._embedded.promotions,T=(0,ep.Z)("price-summary",{"price-summary--with-advance-payment":j,"price-summary--with-payment-info":y});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"mb-5 hidden md:block lg:hidden",children:[(0,m.jsx)(e_,{}),g&&(0,m.jsx)(ek,{})]}),(0,m.jsxs)("div",{className:T,"data-testid":"price-summary-component",children:[(0,m.jsxs)("div",{className:"price-summary__wrapper",children:[(0,m.jsxs)("div",{className:"price-summary__body",children:[(0,m.jsxs)("div",{className:"price-summary__title",children:[(0,m.jsx)(eb.Z,{headingLevel:1,customClassName:"price-summary__heading",children:null==x?void 0:x["price.summary.label"]}),d&&(0,m.jsx)(ex.Z,{wrapperClassName:"price-summary__tooltip",type:"dialog",title:null==x?void 0:x["price.summary.label"],content:(0,m.jsx)(eG,{variant:eV.titleDialog,data:{pricingData:v,includedFeatures:C,promotions:S},currency:N,isAdvancePayment:j}),dialogSettings:{className:"price-summary-dialog",bodyClassName:"price-summary-dialog__body price-summary-dialog__body--titleDialog",variant:L.od.withTitle},testId:"price-summary-info-button"})]}),(0,m.jsx)(eF,{currency:N})]}),(0,m.jsxs)("div",{className:"price-summary__footer",children:[(0,m.jsx)(eW,{data:v,currency:N,isAdvancePayment:j,withPaymentInfo:y,isOrderOption:w,priceData:d,isRyanairFlight:g}),(0,m.jsxs)("div",{className:"-mx-[15px] md:mx-0 md:hidden",children:[(0,m.jsx)(e_,{}),g&&(0,m.jsx)(ek,{})]}),(0,m.jsx)(eC,{className:"price-summary__pay-button",label:_})]}),y&&(0,m.jsx)("div",{className:"price-summary__payment-info",children:null==x?void 0:x["price.summary.payment.required.info"]}),(0,m.jsx)(R.Z,{isLoading:!d||c})]}),(0,m.jsx)("div",{className:"ios-bottom-bar-fix"})]}),(0,m.jsxs)("div",{className:"hidden lg:block",children:[(0,m.jsx)(e_,{}),g&&(0,m.jsx)(ek,{})]})]})}eX.propTypes=eD;var eY=a(42681),eQ=a(54310),e$=a(39370),eJ=a(83560),e0=a(38938);function e1(e){var t,a,i,l,n;let{banner:r}=e,o={};(null===(t=r.settings)||void 0===t?void 0:t.backgroundColor)&&(o.backgroundColor=r.settings.backgroundColor),(null===(a=r.settings)||void 0===a?void 0:a.textColor)&&(o.color=r.settings.textColor);let s=(null===(i=r.settings.link)||void 0===i?void 0:i.url)?"a":"div",d={style:o};(null===(l=r.settings.link)||void 0===l?void 0:l.url)&&(d.href=r.settings.link.url,d.target=r.settings.link.openInNewTab?"_blank":"_self",d.rel=(0,e$.Gk)(r.settings.link.url),d.title=r.settings.link.title||void 0);let c=(0,e0.gZ)(r.settings.icon);return(0,m.jsxs)(s,{...d,className:"flex w-full items-center gap-x-3 rounded-lg p-[15p
1x]",children:["string"==typeof c&&(0,m.jsx)("div",{className:"flex shrink-0","data-component":"CheckoutOfferNotice",children:(0,m.jsx)(eJ.Z,{height:44,width:44,src:c})}),"string"==typeof(null===(n=r.settings)||void 0===n?void 0:n.copy)&&(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:r.settings.copy},className:"text-center font-semibold"})]})}var e2=a(28615),e4=a(64741),e3=a(62311),e5=a(35405),e6=a(36685),e8=a(82846),e9=a(43645),e7=a(37363),te=a(97120),tt=a(80611),ta=a(25832);let ti=()=>async e=>{let t=(0,en.p)();try{let e=await t(T.config.urls.checkout.cartDetailsFile,{appendCartId:!0});if(e)return e;X.Z.error("No data received while getting link for pdf file")}catch(e){X.Z.error("Error getting link for pdf file")}};var tl=a(2933),tn=a(38592);async function tr(e,t){var a;if(!(0,ei.Ax)())throw Error("You can't prompt a file download without a browser environment, dummy!");let i=null!=t?t:null===(a=e.split("\\").pop())||void 0===a?void 0:a.split("/").pop();try{let t=await (0,tn.Oz)(e,{headers:new Headers({Origin:window.location.origin}),mode:"cors"}),a=window.URL.createObjectURL(t);!function(e,t){let a=document.createElement("a");a.download=null!=t?t:"",a.href=e,document.body.appendChild(a),a.click(),a.remove()}(a,i)}catch(e){X.Z.error(e)}}var to=a(6844),ts=a(52613),td=a(86862),tc=a(90360),tu=a(95428),tp=a(20258),tm=a(62716),tv=a(56129),th=a(7703),tf=a(14784),tg=a(63909),tb=a.n(tg),tx=function(){let e=(0,v.v9)(tl.tq),{data:t}=function(){let[e,t]=(0,k.useState)(),a=(0,en.p)(),{data:i}=(0,b.jK)(),{data:l,error:n}=(0,ed.ZP)(i?T.config.urls.checkout.flightInformation:null,e=>a(e,T.pc));return(0,k.useEffect)(()=>{let e={};void 0!==l&&0!==l._embedded.checkoutDepartureFlights.length&&(e.departureFlightSegmentData=l._embedded.checkoutDepartureFlights[0]._embedded.checkoutFlight.map(e=>{let t=(0,el.sG)(e.departureDateTime,el.sz),a=(0,el.sG)(e.arrivalDateTime,el.sz);return{...e,duration:e.flightDuration,departureDateTime:(0,tf.c)(t),arrivalDateTime:(0,tf.c)(a)}}),e.departureBaggageLimitData=l._embedded.checkoutDepartureFlights[0]._embedded.baggageLimit),void 0!==l&&0!==l._embedded.checkoutReturnFlights.length&&(e.returnFlightSegmentData=l._embedded.checkoutReturnFlights[0]._embedded.checkoutFlight.map(e=>{let t=(0,el.sG)(e.departureDateTime,el.sz),a=(0,el.sG)(e.arrivalDateTime,el.sz);return{...e,duration:e.flightDuration,departureDateTime:(0,tf.c)(t),arrivalDateTime:(0,tf.c)(a)}}),e.returnBaggageLimitData=l._embedded.checkoutReturnFlights[0]._embedded.baggageLimit),0!==Object.keys(e).length&&t(e)},[l]),{data:e,error:n}}(),{flightData:a,unconfirmedFlightHours:i}=(0,b.ke)();return!tb()(t)&&t.departureFlightSegmentData&&t.returnFlightSegmentData?(0,m.jsx)(th.Z,{testId:"your-choice-flight-info",departureFlight:t.departureFlightSegmentData,totalDepartureFlightTime:a.departureFlight.totalFlightTime,departureBaggageLimit:t.departureBaggageLimitData,returnFlight:t.returnFlightSegmentData,totalReturnFlightTime:a.returnFlight.totalFlightTime,returnBaggageLimit:t.returnBaggageLimitData,unconfirmedFlightHoursText:i||"",hideHeading:!e,isCheckout:!0}):null},ty=function(e){let{flight:t,labels:a}=e;return(0,m.jsxs)("ul",{className:"your-choice__charter-info",children:[(0,m.jsx)("li",{className:"your-choice__charter-info-item",children:(0,m.jsxs)("b",{children:[t.departurePlaceName," — ",t.arrivalPlaceName]})}),(0,m.jsxs)("li",{className:"your-choice__charter-info-item",children:[(0,m.jsx)("b",{children:t.departureDate}),(0,m.jsxs)("span",{className:"your-choice__place-code",children:["(",t.departurePlaceCode,")"]}),(0,m.jsx)(tv.Z,{className:"your-choice__icon--arrow-right"}),(0,m.jsx)("b",{children:t.arrivalDate}),(0,m.jsxs)("span",{className:"your-choice__place-code",children:["(",t.arrivalPlaceCode,")"]})]}),(0,m.jsxs)("li",{className:"your-choice__charter-info-item",children:[a.airlineName," ",(0,m.jsxs)("b",{children:[" ",t.airlineName]})]}),(0,m.jsxs)("li",{className:"your-choice__charter-info-item",children:[a.flightClass," ",(0,m.jsxs)("b",{children:[" ",t.flightSegments[0].flightClass]})]}),(0,m.jsx)("li",{className:"your-choice__charter-info-item",children:(0,m.jsx)(e8.Z,{wrapperClassName:"your-choice__charter-info-button",buttonText:a.detailsFlight,title:a.flightDialogTitle,type:"dialog",content:(0,m.jsx)(tx,{}),dialogSettings:{variant:L.od.withTitle,contentClassName:"your-choice__flight-popup-wrapper"}})})]})},t_=function(e){let{flight:t,type:a}=e;return t&&t.flightSegments&&t.flightSegments.map((e,t)=>(0,m.jsxs)("div",{className:"your-choice__item",children:[(0,m.jsxs)("div",{"data-testid":"your-choice-details-".concat(a,"-flight-start"),children:[(0,m.jsx)("b",{children:e.departureTime}),(0,m.jsxs)("span",{className:"your-choice__place",children:[(0,m.jsx)("b",{children:e.departurePlaceName}),(0,m.jsxs)("span",{className:"your-choice__place-code",children:["(",e.departurePlaceCode,")"]})]})]}),(0,m.jsx)(tv.Z,{className:"your-choice__icon--arrow-right"}),(0,m.jsxs)("div",{"data-testid":"your-choice-details-".concat(a,"-flight-finish"),children:[(0,m.jsx)("b",{children:e.arrivalTime}),(0,m.jsxs)("span",{className:"your-choice__place",children:[(0,m.jsx)("b",{children:e.arrivalPlaceName}),(0,m.jsxs)("span",{className:"your-choice__place-code",children:["(",e.arrivalPlaceCode,")"]})]})]})]},t))},tj=a(41241),tw=a(26131);function tN(){return(tN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var tC=function(e){return k.createElement("svg",tN({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 120 120"},e),i||(i=k.createElement("path",{d:"m98.6 20.6-35.1-9.4c-3.2-.9-6.6 1.1-7.4 4.3L54.3 22l6-1.6c3.2-.9 6.6 1.1 7.4 4.3l18 67.3 17.2-64c.8-3.2-1.1-6.5-4.3-7.4"})),l||(l=k.createElement("path",{d:"M63.1 30.8c-.9-3.2-4.2-5.2-7.4-4.3l-35.1 9.4c-3.2.9-5.2 4.2-4.3 7.4l16.4 61.2c.9 3.2 4.2 5.2 7.4 4.3l35.1-9.4c3.2-.9 5.2-4.2 4.3-7.4z"})))},tk=function(e){let t,{title:a,flight:i,isCharter:l,iconName:n="airplane-departure",labels:r,type:o,testId:s}=e;switch(n){case"airplane-departure":t=tw.default;break;case"airplane-arrival":t=tj.Z;break;case"book":t=tC}return(0,m.jsxs)("div",{className:"your-choice__item your-choice__item--highlighted","data-testid":s,children:[(0,m.jsx)(t,{className:"your-choice__icon"}),a," ",!l&&(null==i?void 0:i.departurePlaceName)," ",(0,m.jsxs)("span",{className:"your-choice__place",children:[null==i?void 0:i.flightDate," ",l&&(null==i?void 0:i.flightDay)?(0,m.jsxs)("span",{className:"your-choice__day",children:["(",i.flightDay,")"]}):null==i?void 0:i.departureDate,!l&&(0,m.jsx)(e8.Z,{withoutPadding:!0,type:"dialog",title:r.flightDialogTitle,content:(0,m.jsx)(tx,{}),dialogSettings:{variant:L.od.withTitle,bodyClassName:"your-choice__flight-dialog-body",contentClassName:"your-choice__flight-dialog-content",className:"your-choice__flight-dialog"},testId:"your-choice-info-button-".concat(o)})]})]})},tS=a(61278),tT=a(4063),tP=a(25848),tZ=function(e){var t;let{labels:a,isCharter:i,isFlightOffer:l}=e,{query:n,isReady:r}=(0,C.useRouter)(),o=(0,v.I0)(),s=(0,v.v9)(et.o5),d=(0,Q.gz)(),c=(0,v.v9)(et.SV),u=null!==(t=null==s?void 0:s.some(e=>"FACULTATIVE_TRIPS"===e.type))&&void 0!==t&&t,{data:p}=(0,tT.Di)(n.offerCode,!r||!s||!u),h=(0,ep.Z)("your-choice-upsells",{"your-choice-upsells--charter":i,"your-choice-upsells--not-flight-offer":!l});return(0,m.jsx)("div",{className:h,"data-testid":"your-choice-upsells",children:s&&s.map((e,t)=>{var i,l,n,r;let s=null===(l=e._embedded)||void 0===l?void 0:null===(i=l.upsellVariants)||void 0===i?void 0:i.every(e=>e.status===ew.X.notAvailable),u=null===(r=e._embedded)||void 0===r?void 0:null===(n=r.upsellVariants)||void 0===n?void 0:n.some(e=>e.selected);if("FACULTATIVE_TRIPS"===e.type){if(void 0===(null==p?void 0:p.trips)||0===p.trips.length)return null;Array.isArray(c)&&c.length>0&&(u=!0)}return e.showIcon&&!s&&(0,m.jsx)(tS.Z,{hideButton:"recommendations"!==d,label:e.title,type:e.type,roomIndex:e.roomIndex,status:u?"SOLD":"AVAILABLE",onClick:()=>{!function(e){let{type:t,roomIndex:a}=e,i=t===ej.hc.planeSeatsReservation;(0,eo.Z)({elementId:"#upsell-".concat(t,"-").concat(a||0),optionalMargin:20}),i&&o((0,tP.yU)(!0,"icon")),(0,_.yf)({event:"upsell_icon_click",upsell_icon_click:{action:i?"popup_open":"anchor",product_type:t}})}(e)},variant:ej.JP.checkout,buttonLabel:a.addButton},t)})})},tL=a(91370),tI=function(e){var t,a,i;let{labels:l}=e,[n,r]=(0,k.useState)(!0),[o,s]=(0,k.useState)(!1),d=(0,v.I0)(),c=(0,v.v9)(tl.tq),u=(0,v.v9)(tl.nI),p=Y(),h=(0,J.zs)(),{data:f,error:g}=(0,J.ft)(),{data:x}=(0,b.jK)(),y=(0,b.Lo)(),_=(0,J._4)(),{infoItems:j,flightData:w,offer:N,usp:C,isCharter:S,isLoading:Z}=(0,b.ke)(),I=(0,b.Zb)();g&&p(g);let O=(0,eh.jK)(null==f?void 0:f.currency),E=null==y?void 0:y.priceIncludes,R=null==y?void 0:y._embedded.promotions,D=null!==(i=null==_?void 0:_.advanced)&&void 0!==i&&i,z=(0,tm.VY)(),M=void 0!==(null==w?void 0:w.departureFlight)||void 0!==(null==w?void 0:w.returnFlight),V=[null==w?void 0:null===(t=w.departureFlight)||void 0===t?void 0:t.airlineCode,null==w?void 0:null===(a=w.returnFlight)||void 0===a?void 0:a.airlineCode].includes("FR"),A=(0,ep.Z)("your-choice",{"your-choice--not-flight-offer":!M,"your-choice--charter":S,"your-choice--loading":Z}),B=async()=>{s(!0);try{let e=await d(ti()),t=window.open(e.url,"_blank");(!t||t.closed||void 0===t.closed)&&tr(e.url),s(!1)}catch(e){z.error(T.hF),s(!1)}};return c&&S?(0,m.jsxs)("section",{className:A,children:[(0,m.jsx)("div",{className:"your-choice__top-bar",children:(0,m.jsx)(eL.Z,{name:l.selectedOffer,className:"your-choice__ribbon"})}),(0,m.jsxs)(e5.UQ,{children:[(0,m.jsxs)(e5.Qd,{expanded:n,uuid:"your-choice-mobile-charters-departure",children:[(0,m.jsx)(e5.il,{type:"checkout",iconLabel:l.details,onClick:()=>r(!n)}),(0,m.jsx)("header",{className:"your-choice__header your-choice__header--charter",children:(0,m.jsx)(tk,{title:l.departureFlight,flight:w.departureFlight,isCharter:!0,labels:l})}),(0,m.jsx)(e5.X1,{children:(0,m.jsx)(ty,{flight:w.departureFlight,labels:l})})]}),(0,m.jsxs)(e5.Qd,{expanded:n,uuid:"your-choice-mobile-charters-return",children:[(0,m.jsx)("header",{className:"your-choice__header your-choice__header--charter your-choice__header--no-margin",children:(0,m.jsx)(tk,{title:l.returnFlight,flight:w.returnFlight,isCharter:!0,iconName:"airplane-arrival",labels:l})}),(0,m.jsx)(e5.X1,{children:(0,m.jsx)(ty,{flight:w.returnFlight,labels:l})})]}),(0,m.jsxs)(e5.Qd,{expanded:n,uuid:"your-choice-mobile-charters-features",children:[(0,m.jsx)("header",{className:"your-choice__header your-choice__header--charter your-choice__header--no-margin",children:(0,m.jsx)(tk,{title:null==y?void 0:y.participantsDescription,isCharter:!0,iconName:"book",labels:l})}),(0,m.jsxs)(e5.X1,{children:[(0,m.jsx)(eT.Z,{children:C.map((e,t)=>(0,m.jsx)(eP.Z,{iconType:"checkmark",iconColor:"#aad700",children:e},t))}),(0,m.jsx)(tZ,{labels:l,isCharter:S,isFlightOffer:M})]})]})]})]}):(0,m.jsx)("section",{className:A,children:(0,m.jsx)(e5.UQ,{children:(0,m.jsxs)(e5.Qd,{expanded:!0,uuid:"your-choice-top-bar",children:[(0,m.jsxs)("div",{className:"your-choice__top-bar",children:[(0,m.jsx)(eL.Z,{name:l.selectedOffer,className:"your-choice__ribbon",testId:"your-choice-ribbon"}),!S&&!Z&&!o&&(0,m.jsx)(P.ZP,{variant:P.qh.clean,size:P.Ph.small,onClick:B,iconName:"notes",iconPosition:"left",className:"your-choice__download-button",testId:"your-choice-download-pdf",children:l.download}),o&&(0,m.jsx)(e9.Z,{isLoading:o,className:"your-choice__download-spinner"})]}),Z&&(0,m.jsx)(e5.il,{type:"checkout",iconLabel:l.details}),!Z&&(0,m.jsx)(e5.il,{type:"checkout",iconLabel:l.details,children:S?(0,m.jsx)("div",{className:"row",children:(0,m.jsxs)("header",{className:"your-choice__header",children:[(0,m.jsx)("div",{className:"col-sm-12 col-md-4 col-lg-4",children:(0,m.jsx)(tk,{title:l.departureFlight,flight:w.departureFlight,isCharter:!0,labels:l})}),(0,m.jsx)("div",{className:"col-sm-12 col-md-4 col-lg-4",children:(0,m.jsx)(tk,{title:l.returnFlight,flight:w.returnFlight,isCharter:!0,iconName:"airplane-arrival",labels:l})}),(0,m.jsx)("div",{className:"col-sm-12 col-md-4 col-lg-4",children:(0,m.jsx)(tk,{title:null==y?void 0:y.participantsDescription,isCharter:!0,iconName:"book",labels:l})})]})}):(0,m.jsx)("header",{children:(0,m.jsxs)("div",{className:"your-choice__hotel-name",children:[(0,m.jsx)(eZ.Z,{headingLevel:1,isBold:!0,stylingLevel:3,testId:"your-choice-hotel-name",children:N.hotelName}),N.hotelStars&&(0,m.jsx)(ta.Z,{rate:N.hotelStars,className:"your-choice__hotel-rating",testId:"your-choice-hotel-rating"})]})})}),!S&&!Z&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(e6.Z,{type:"LARGE",items:N.breadcrumbs,testId:"your-choice-breadcrumbs"}),(0,m.jsxs)("div",{className:"your-choice__hotel-code-wrapper","data-testid":"your-choice-hotel-code",children:[(0,m.jsx)("span",{className:"your-choice__hotel-code-label",children:l.hotelCode}),(0,m.jsx)("b",{children:N.hotelCode})]})]}),(0,m.jsxs)(e5.X1,{className:"your-choice__accordion-body",children:[Z&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"your-choice__loading-label",children:l.loading}
1),(0,m.jsx)(e7.Z,{isLoading:!0,noBackground:!0,testId:"your-choice-loading-overlay"})]}),!Z&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"row",children:[S?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"your-choice__content",children:[(0,m.jsx)("div",{className:"col-sm-12 col-md-4 col-lg-4",children:(0,m.jsx)(ty,{flight:w.departureFlight,labels:l})}),(0,m.jsx)("div",{className:"col-sm-12 col-md-4 col-lg-4",children:(0,m.jsx)(ty,{flight:w.returnFlight,labels:l})}),(0,m.jsx)("div",{className:"col-sm-12 col-md-4 col-lg-4",children:(0,m.jsx)(eT.Z,{children:C.map((e,t)=>(0,m.jsx)(eP.Z,{iconType:"checkmark",iconColor:"#aad700",children:e},t))})})]}),(0,m.jsx)("div",{className:"col-12",children:(0,m.jsx)(tZ,{labels:l,isCharter:S,isFlightOffer:M})})]}):(0,m.jsxs)("div",{className:"col-sm-12 col-md-7 col-lg-7",children:[(0,m.jsxs)("div",{className:"your-choice__content",children:[!c&&(0,m.jsx)("div",{className:"your-choice__image-wrapper","data-testid":"your-choice-hotel-image",children:void 0!==N.imageUrl?(0,m.jsx)(eJ.Z,{layout:"fill",objectFit:"cover",src:N.imageUrl,sizes:"280px","aria-label":N.hotelName}):(0,m.jsx)(te.Z,{src:(0,tp.L)("/images/checkout-placeholder.png"),layout:"fill",objectFit:"cover",sizes:"280px","aria-label":N.hotelName})}),(0,m.jsx)("div",{className:"your-choice__content-info",children:j&&j.map((e,t)=>{let a,i;switch(e.type){case tL.R.participants:a="your-choice-details-participants",i=tc.Z;break;case tL.R.date:a="your-choice-details-date",i=ts.Z;break;case tL.R.boarding:a="your-choice-details-boarding",i=td.Z;break;case tL.R.room:a="your-choice-details-room",i=tu.Z;break;case tL.R.flightClass:a="your-choice-details-flight-class",i=to.default}return(0,m.jsxs)("div",{className:"your-choice__item","data-testid":a,children:[i&&(0,m.jsx)(i,{className:"your-choice__icon"}),(null==I?void 0:I.length)>0&&e.type===tL.R.room?(0,m.jsx)(tt.Z,{isMobile:c,isDesktop:u,occupancies:I,customTooltipPosition:"right"}):e.type===tL.R.flightClass?"".concat(l.flightClass,": ").concat(e.label):e.label]},t)})})]}),!c&&(0,m.jsx)(tZ,{labels:l,isCharter:S,isFlightOffer:M})]}),M&&!S&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"col-sm-12 col-md-5 col-lg-5",children:(0,m.jsxs)("div",{className:"flex h-full flex-col",children:[(0,m.jsx)("div",{children:(0,m.jsx)(tk,{title:l.departureFlight,flight:w.departureFlight,labels:l,type:"airplane-departure",testId:"your-choice-details-departure-flight-date"})}),!c&&(0,m.jsx)("div",{children:(0,m.jsx)(t_,{flight:w.departureFlight,type:"departure"})}),(0,m.jsx)("div",{children:(0,m.jsx)(tk,{title:l.returnFlight,flight:w.returnFlight,iconName:"airplane-arrival",labels:l,type:"airplane-arrival",testId:"your-choice-details-return-flight-date"})}),!c&&(0,m.jsx)("div",{children:(0,m.jsx)(t_,{flight:w.returnFlight,type:"return"})}),void 0!==(null==x?void 0:x.flightPartnerLogoUrl)&&(0,m.jsx)("div",{className:"flex grow flex-col items-center justify-center py-2 md:py-0",children:(0,m.jsx)("div",{className:"relative h-10 w-40",children:(0,m.jsx)(eJ.Z,{src:x.flightPartnerLogoUrl,layout:"fill",objectFit:"cover"})})})]})}),c&&(0,m.jsx)("div",{className:"col-12",children:(0,m.jsx)(tZ,{labels:l,isCharter:S,isFlightOffer:M})})]})]}),c&&(0,m.jsxs)("div",{className:"row",children:[(0,m.jsxs)("div",{className:"your-choice__footer",children:[(0,m.jsx)(e8.Z,{buttonText:l.summaryPrice,customClassName:"your-choice__info-button your-choice__info-button--footer",type:"dialog",title:l.priceDialogTitle,content:(0,m.jsx)(eG,{variant:eV.titleDialog,data:{pricingData:h,includedFeatures:E,promotions:R},currency:O,isAdvancePayment:D}),dialogSettings:{className:"price-summary-dialog",bodyClassName:"price-summary-dialog__body price-summary-dialog__body--titleDialog",variant:L.od.withTitle}}),(0,m.jsxs)("div",{className:"your-choice__footer-price",children:[(0,m.jsx)("span",{className:"your-choice__price-value",children:(0,eO._B)(h.formattedPrice)})," ",(0,m.jsx)("span",{className:"your-choice__currency",children:O})]})]}),(0,m.jsx)(eU,{className:"px-4 py-2",isRyanairFlight:V,priceData:f})]})]})]})]})})})},tO=function(e){var t,a,i,l,n,r,o,s,d;let c={download:e["offer.pdf.download"],hotelCode:null!==(t=e["offer.hotel.code"])&&void 0!==t?t:"Kod hotelu:",departureFlight:e["offer.flight.from"],returnFlight:e["offer.flight.to"],currency:"KČ",summaryPrice:null!==(a=e["offer.summary.price"])&&void 0!==a?a:"Cena razem:",addButton:e["offer.upsell.add"],selectedOffer:e["offer.ribbon"],details:e["offer.flight.popup.toggle"],detailsFlight:null!==(i=e["offer.flight.popup.trigger"])&&void 0!==i?i:"Zobacz szczeg\xf3ły lotu",airlineName:e["offer.flight.popup.carrier"],flightClass:e["offer.flight.class"],flightDialogTitle:e["offer.flight.popup.label"],priceDialogTitle:null!==(l=e["offer.price.dialog.title"])&&void 0!==l?l:"PODSUMOWANIE CENY",readMore:null!==(n=e["offer.read.more"])&&void 0!==n?n:"Czytaj więcej",loading:null!==(r=e["offer.loading"])&&void 0!==r?r:"Wczytuję...",popupPromotions:null!==(o=e["offer.popup.promotions"])&&void 0!==o?o:"Promocje",popupIncludedFeatures:null!==(s=e["offer.popup.included.features"])&&void 0!==s?s:"Co zawiera cena?",titleDialogHeading:null!==(d=e["offer.title.dialog.heading"])&&void 0!==d?d:"Szczeg\xf3ły ceny"};return(0,m.jsx)(tI,{labels:c})},tE=a(5856);let tR={wrapperClassName:"forms-container__input-wrapper",labelClassName:"forms-container__input-label",inputClassName:"forms-container__input",withValidIcon:!0,withCapitalization:!0};var tD=a(30006),tz=a(51387),tM=a(71419),tV=a.n(tM);function tA(e){var t,a;let{labels:i,confirmation:l,isSelectAll:n,parentGroup:r,checkedByDefault:o}
1=e,{setValue:s,control:d,getValues:c,formState:u,setError:p,clearErrors:v}=(0,S.Gc)(),[h,f]=(0,k.useState)(null!==(a=l.defaultExpanded)&&void 0!==a&&a);if(!l)return null;function g(e){e.preventDefault(),f(e=>!e)}let b=tV()(u.errors,"confirmations.".concat(l.code)),x=void 0!==r,y=(null===(t=l.confirmations)||void 0===t?void 0:t.length)>0,_=l.description===l.shortDescription;return x&&(_=!0),(0,m.jsx)(S.Qr,{name:"confirmations.".concat(l.code),defaultValue:o||!1,control:d,rules:{required:l.required,validate:y?function(e){let t=null==l?void 0:l.confirmations.filter(e=>c("confirmations.".concat(e.code)));return!!(!e||e&&!tb()(t))||i.selectMarketingChannel}:null},render:e=>{let{field:{onChange:t,onBlur:a,value:o}}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(tD.Z,{type:"big",onBlur:a,className:(null==l?void 0:l.required)&&"statements__checkbox--bold","data-testid":"statements-checkbox",onChange:e=>{let a=e.target.checked;if(t(a),y)a?p("confirmations.".concat(l.code),{message:i.selectMarketingChannel}):(l.confirmations.forEach(e=>{s("confirmations.".concat(e.code),!1)}),s("confirmations.".concat(l.code,"-selectAll"),!1));else if(n)r.confirmations.forEach(e=>{s("confirmations.".concat(e.code),a)}),s("confirmations.".concat(r.code),a),a&&v("confirmations.".concat(r.code));else if(x){let e=r.confirmations.filter(e=>e.code!==l.code&&c("confirmations.".concat(e.code)));0===e.length&&s("confirmations.".concat(r.code),a),e.length+1===r.confirmations.length&&s("confirmations.".concat(r.code,"-selectAll"),!0),a||s("confirmations.".concat(r.code,"-selectAll"),!1),v("confirmations.".concat(r.code))}},checked:o,children:[l.required&&(0,m.jsx)("span",{children:"*"}),(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:n||x||h?l.description:l.shortDescription}}),!n&&!_&&(0,m.jsxs)(eS.ZP,{variant:h?eS.qh.textShrink:eS.qh.textExpand,onClick:g,children:[h?i.readLessButtonLabel:i.readMoreButtonLabel,"\xa0\xbb"]})]}),y&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"statements__item statements__item--confirmation",children:(0,m.jsx)(tA,{labels:i,confirmation:{code:"".concat(l.code,"-selectAll"),defaultExpanded:!1,defaultSelected:!1,description:i.selectAll,required:!1,selected:!1},isSelectAll:!0,parentGroup:l})}),null==l?void 0:l.confirmations.map((e,t)=>(0,m.jsx)("div",{className:"statements__item statements__item--confirmation",children:(0,m.jsx)(tA,{labels:i,confirmation:e,parentGroup:l})},"".concat(l.code,"-").concat(t)))]}),void 0!==b&&(0,m.jsx)(tz.Z,{className:(0,ep.Z)("statements__error-message",{"statements__error-message--nested":y}),children:b.message||i.requiredText})]})}})}function tB(e){var t;let{labels:a,requiredOnly:i,checkedByDefault:l}=e,n=(0,b.PW)(),r=(0,v.v9)(et.$),o=(0,v.v9)(et.SV),{paymentData:s}=(0,k.useContext)(B.Z);if(!n)return null;let d=n.filter(e=>{let t=!0,a=e.requiredUserActions;if(a){let e=-1!==a.indexOf("INSURANCE_SELECTED"),i=-1!==a.indexOf("INSURANCE_NOT_SELECTED"),l=-1!==a.indexOf("FACULTATIVE_TRIPS");e&&(t=r.length>0),i&&(t=0===r.length),l&&(t=o.length>0)}return i?t&&e.required:t}),c=null==s?void 0:null===(t=s.paymentChannels)||void 0===t?void 0:t.find(e=>e.selected);return void 0!==(null==c?void 0:c.confirmationLabel)&&void 0!==(null==c?void 0:c.confirmationCode)&&d.push({code:c.confirmationCode,required:!0,selected:!1,shortDescription:c.confirmationLabel,description:c.description,visible:!0}),(0,m.jsx)("div",{"data-testid":"statements",children:d.map(e=>(0,m.jsx)("div",{className:"statements__item",children:(0,m.jsx)(tA,{labels:a,confirmation:e,checkedByDefault:l})},e.code))})}function tF(e){let{labels:t}=e,{currentType:a}=(0,k.useContext)(q),{getValues:i}=(0,S.Gc)(),l=(0,b.v8)(),n=(0,b.vy)();return a!==H.quick?null:(0,m.jsxs)("div",{className:"quick-reservation",children:[(0,m.jsx)("span",{className:"quick-reservation__description",children:t.description}),(0,m.jsxs)("div",{className:"quick-reservation__form",children:[(0,m.jsx)("div",{className:"quick-reservation__row",children:(0,m.jsx)(tE.Z,{name:F.email.full,shortName:F.email.short,type:"email",autoComplete:"email",label:t.email.label,placeholder:t.email.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.email.validation,(0,er.Xf)("EMAIL",n))},...tR})}),(0,m.jsxs)("div",{className:"quick-reservation__row",children:[(0,m.jsx)(tE.Z,{isSelect:!0,name:F.dialingCo
1de.full,shortName:F.dialingCode.short,autoComplete:"tel-country-code",label:t.phone.label,...tR,children:null==l?void 0:l.map(e=>(0,m.jsx)("option",{value:e,children:e},e))}),(0,m.jsx)(tE.Z,{type:"tel",name:F.phone.full,shortName:F.phone.short,autoComplete:"tel-national",label:t.phone.label,placeholder:t.phone.placeholder,registerOptions:{validate:(0,er.b0)((e,t)=>(0,er.Hy)("".concat(i(F.dialingCode.full)).concat(e),t),t.phone.validation,(0,er.Xf)("PHONE",n))},...tR})]})]}),(0,m.jsx)("div",{className:"quick-reservation__statements",children:(0,m.jsx)(tB,{labels:t,requiredOnly:!0,checkedByDefault:!0})})]})}var tH=a(82959),tq=a(87113);function tU(e){let{labels:t}=e,a=(0,b.uS)(),{currentType:i,setType:l}=(0,k.useContext)(q);return void 0===a?null:(0,m.jsx)(tH.E,{className:"reservation-type-switch",onChange:function(e){l(e.target.value)},selectedValue:i,children:Object.values(H).map(e=>(0,m.jsx)(tq.Y8,{className:"reservation-type-switch__radio",label:null==t?void 0:t[e],value:e},e))})}var tW=a(3646),tK=a(26254),tG=a.n(tK),tX=(0,v.$j)(e=>({upsells:(0,et.o5)(e),selectedFlightClass:(0,et.wW)(e),shouldShowValidation:(0,et.Wk)(e)}),e=>({toggleSelection:t=>{let{upsellType:a,upsellGroupType:i,variantId:l,isResignVariant:n,roomIndex:r,clickSource:o,isExtras:s,newInsurancesEnabled:d}=t;return e((0,eN.kq)({upsellType:a,upsellGroupType:i,variantId:l,isResignVariant:n,roomIndex:r,clickSource:o,isExtras:s,newInsurancesEnabled:d}))}}))(function(e){var t;let{labels:a,upsells:i,shouldShowValidation:l,toggleSelection:n}=e,{currentType:r}=(0,k.useContext)(q),o=(0,Q.gz)(),s=(0,b.Lo)(),d=(0,ev.lg)(),c=null==s?void 0:s.offerType;if(r===H.quick)return null;let u=(0,ep.Z)(tG().wrapper,tG()[null!=o?o:"offer"]),p=void 0!==s&&"paymentSuccess"!==o;return(0,m.jsxs)("div",{className:u,"data-component":"ReservationUpsellsContainer",children:[(0,m.jsx)(tW.Z,{upsells:i,labels:a,offerType:c,occupancies:null==s?void 0:null===(t=s._embedded)||void 0===t?void 0:t.occupancyDataList,shouldShowValidation:l,toggleSelection:e=>n({...e,newInsurancesEnabled:d})}),p?(0,m.jsx)(eC,{className:tG().navigationButton,label:a.nextButtonLabel}):null]})}),tY=a(62310);let tQ={QUICK_ORDER_SWITCH:function(e){let t={quick:e["quick.order.switch.use.form"],full:e["quick.order.switch.use.full"]};return(0,m.jsx)(tU,{labels:t})},QUICK_ORDER_FORM:function(e){let t={description:e["quick.order.form.description"],phone:{validation:e["quick.order.form.phone.validation"],label:e["quick.order.form.phone.label"],placeholder:e["quick.order.form.phone.placeholder"]},email:{validation:e["quick.order.form.email.validation"],label:e["quick.order.form.email.label"],placeholder:e["quick.order.form.email.placeholder"]},readMoreButtonLabel:e["quick.order.form.read.more"],requiredText:e["confirmation.required.text"]||"Powyższa zgoda jest wymagana."};return(0,m.jsx)(tF,{labels:t})},OFFER:tO,UPSELLS:function(e){let t=(0,tY.wE)(e);return(0,m.jsx)(tX,{labels:t})},CHECKOUT_OFFER_NOTICE:function(){let{data:e}=function(){var e,t,a,i,l,n,r,o,s,d,c,u;let p=(0,ev.PA)(),{data:m}=(0,b.jK)(),v=null==m?void 0:null===(i=m._embedded)||void 0===i?void 0:null===(a=i.offer)||void 0===a?void 0:null===(t=a._embedded)||void 0===t?void 0:null===(e=t.returnFlight)||void 0===e?void 0:e.departurePlaceCode,h=null==m?void 0:null===(n=m._embedded)||void 0===n?void 0:null===(l=n.dataLayer)||void 0===l?void 0:l.tui_season,f=null==m?void 0:null===(d=m._embedded)||void 0===d?void 0:null===(s=d.offer)||void 0===s?void 0:null===(o=s._embedded)||void 0===o?void 0:null===(r=o.hotel)||void 0===r?void 0:r.hotelCode,g=(0,e2.ZD)(null==m?void 0:null===(u=m._embedded)||void 0===u?void 0:null===(c=u.offer)||void 0===c?void 0:c.offerType),x=(0,e3.NJ)(function(e){var t,a,i,l,n,r,o,s;if(!e)return null;let d=null==e?void 0:null===(l=e._embedded)||void 0===l?void 0:null===(i=l.offer)||void 0===i?void 0:null===(a=i._embedded)||void 0===a?void 0:null===(t=a.returnFlight)||void 0===t?void 0:t.departurePlaceCode;return{availableUpsellGroups:null==e?void 0:null===(r=e._embedded)||void 0===r?void 0:null===(n=r.upsellGroups)||void 0===n?void 0:n.map(e=>e.groupType),destinationCodes:void 0!==d?[d]:void 0,pageType:"CHECKOUTRESERVATION",season:null==e?void 0:null===(s=e._embedded)||void 0===s?void 0:null===(o=s.dataLayer)||void 0===o?void 0:o.tui_season,mobile:!1}}(m),!1),y=(0,e3.Fj)(m?function(e,t,a,i){let l={page:(0,e4.R)("checkout")};return e&&(l.directionCode=e),t&&(l.hotelCode=t),a&&(l.season=a),i&&(l.tripType=i),l}(v,f,h,g):null);return p?y:x}(),t=null==e?void 0:e.filter(e=>"CHECKOUT_OFFER_NOTICE"===e.type);return Array.isArray(t)&&0!==t.length?t.map(e=>(0,m.jsx)("div",{className:"my-[21px]","data-component":"CheckoutOfferNotice",children:(0,m.jsx)(e1,{banner:e})},e.code)):null}};var t$=a(78054);function tJ(e){let{fullInfo:t,shortInfo:a,expandLabel:i,shrinkLabel:l,testId:n}=e,[r,o]=(0,k.useState)(!1);return t?void 0!==a&&a.length>0?(0,m.jsxs)("div",{className:"data-processing","data-testid":n,children:[(0,m.jsx)("span",{className:"[&_ol]:list-decimal [&_ol]:ps-10 [&_ul]:list-disc [&_ul]:ps-10",dangerouslySetInnerHTML:{__html:r?t:a}}),(0,m.jsxs)(P.ZP,{variant:r?P.qh.textShrink:P.qh.textExpand,onClick:function(e){e.preventDefault(),o(e=>!e)},testId:"data-processing-toggle",children:[r?l:i,"\xa0\xbb"]})]}):(0,m.jsx)("span",{"data-testid":n,dangerouslySetInnerHTML:{__html:t},"data-component":"DataProcessing"}):null}function t0(){let e=(0,I.z$)("INVOICE_REQUEST"),{control:t}=(0,S.Gc)();return(0,m.jsx)("div",{className:"[&>.bp3-control]:pl-[39px] [&_.bp3-control-indicator]:ml-[-39px]","data-component":"InvoiceRequest",children:(0,m.jsx)(S.Qr,{name:"invoiceAttachmentSelected",defaultValue:!1,control:t,render:t=>{var a;
1let{field:{onChange:i,onBlur:l,value:n}}=t;return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(tD.Z,{type:"big",onBlur:l,onChange:i,checked:n,children:(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:null!==(a=null==e?void 0:e.checkbox_label)&&void 0!==a?a:""}})})})}})})}var t1=a(49660),t2=a(30670),t4=a(58724),t3=a(76577),t5=a(52998),t6=a(62931),t8=a(27986),t9=a(62027);let t7={customer:"customer",participant:"participant"};function ae(e){let{type:t,selectedFacultativeTrips:a,commonInputProps:i,inputNamePrefix:l}=e,{getValues:n,setValue:r,clearErrors:o}=(0,S.Gc)();return(0,m.jsx)("div",{className:"facultative-trip-extra-data",children:a.map(e=>{if(!e.extraData)return null;let a=t===t7.customer?e.extraData.customerRequiredInfo:e.extraData.participantsRequiredInfo;return a?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("span",{className:"facultative-trip-extra-data__heading",children:[e.extraData.formHeader," ",e.name]}),(0,m.jsx)("div",{className:"row",children:a.map((e,t)=>{let a="".concat(l,".requiredInfo.").concat(e.name);return(0,m.jsxs)("div",{className:"col-12 col-lg-6",children:["date"!==e.datatype&&(0,m.jsx)(tE.Z,{name:a,shortName:e.name,label:e.formLabel,placeholder:e.placeholder,registerOptions:{validate:(0,er.b0)(er.UE,e.popupLabel)},...i}),"date"===e.datatype&&(0,m.jsx)(t9.Z,{wrapperClassName:"user-data__calendar-dropdown-wrapper",onDateSelect:e=>{r(a,(0,el.p6)(e,el.fK.dayMonthYearWithDots),{shouldValidate:!0,shouldDirty:!0}),o(a)},value:n(a),renderInput:()=>(0,m.jsx)(tE.Z,{name:a,shortName:e.name,label:e.formLabel,placeholder:e.placeholder,registerOptions:{validate:(0,er.b0)(er.UE,e.popupLabel)},initialValue:n(a),customIcon:(0,m.jsx)(ts.Z,{className:"user-data__calendar-icon"}),disabled:!0,...i})})]},"".concat(t,"-").concat(e.name))})})]}):null})})}var at=a(70634);let aa={type:"type",sex:"sex",name:"name",surname:"surname",birthDate:"birthDate",personRef:"personRef",saveToMytui:"saveToMytui"};function ai(e){let{participantNumber:t,savedParticipant:a,isParticipantTheSame:i,isParticipantUsedElsewhere:l,clearInputs:n}=e,{setValue:r}=(0,S.Gc)();if(!a.gender||!a.firstName||!a.lastName||!a.birthDate)return null;let o="".concat(a.firstName[0]).concat(a.lastName[0]),s=i(a),d=(0,el.p6)((0,N.Qc)(a.birthDate,"yyyy-MM-dd",new Date),el.fK.dayMonthYearWithDots),c=l("".concat(null==a?void 0:a.gender," ").concat(null==a?void 0:a.firstName," ").concat(null==a?void 0:a.lastName," ").concat(d));return(0,m.jsxs)("div",{className:"flex items-center gap-1","data-component":"SavedParticipant",children:[(0,m.jsxs)("button",{type:"button",className:"m-0 flex items-center gap-1 border-0 bg-transparent p-0 hover:underline disabled:cursor-not-allowed disabled:hover:no-underline",disabled:c,onClick:()=>{r("participant.".concat(t,".").concat(aa.name),a.firstName,{shouldValidate:!0,shouldDirty:!0}),r("participant.".concat(t,".").concat(aa.surname),a.lastName,{shouldValidate:!0,shouldDirty:!0}),r("participant.".concat(t,".").concat(aa.birthDate),d,{shouldValidate:!0,shouldDirty:!0}),r("participant.".concat(t,".").concat(aa.sex),a.gender,{shouldValidate:!0,shouldDirty:!0})},children:[(0,m.jsxs)("div",{className:(0,ep.Z)("relative flex size-[24px] items-center justify-center rounded-full bg-blue text-[10px] font-bold uppercase text-white",{"bg-gray-altoLight hover:no-underline":c}),children:[o,s&&(0,m.jsx)("div",{className:"absolute -bottom-[3px] right-0 flex size-[10px] items-center justify-center rounded-full bg-green-lightGreen text-blue",children:(0,m.jsx)(t3.default,{className:"size-[7px]"})})]}),(0,m.jsxs)("span",{className:(0,ep.Z)("font-bold text-blue-deepCerulean",{"text-gray-altoLight":c}),children:[a.firstName,"\xa0\xbb"]})]}),s&&(0,m.jsx)("button",{type:"button",className:"m-0 border-0 bg-transparent p-0",children:(0,m.jsx)(at.Z,{className:"size-[10px] fill-red",onClick:()=>n()})})]},a.id)}let al=e=>(0,et.wd)(e),an=e=>(0,et.tO)(e),ar=e=>(0,et.ET)(e),ao=e=>(0,et.dX)(e);function as(e){var t,a,i;let{participantNumber:l,labels:n,commonInputProps:r,participant:o,selectedFacultativeTrips:s,participantNumbers:d}=e,c=(0,v.I0)(),u=(0,b.zl)(),p=(0,b.vy)(),{query:h}=(0,C.useRouter)(),{data:f}=(0,ee.P)(),{data:g}=ec((null==f?void 0:f.authenticated)?null==h?void 0:h.offerCode:null),{getValues:x,setValue:y,clearErrors:_,formState:j,getFieldState:w,register:N,
1control:k,watch:T,resetField:Z}=(0,S.Gc)(),L=(0,v.v9)(al),I=(0,v.v9)(an),O=(0,v.v9)(ar),E=(0,v.v9)(ao),R=(0,ev.h7)()&&!!(0,t2.E)("statistics")&&"testab_rmwsform_1"===t4.LJ.get("test_ab"),D=E||O,z=Array.isArray(L)&&I.data,M=z?L.map(e=>{var t;return"".concat(n.flightType[null==e?void 0:e.type],": ").concat(null==e?void 0:null===(t=e.places)||void 0===t?void 0:t[l-1])}):[],V=1===l,A=(null==o?void 0:o.type)==="INFANT",B=void 0!==(null==o?void 0:o.birthDate),F=(null==o?void 0:o.type)!=="ADULT"||B,H=(0,ep.Z)("participants-data-item__number",{"participants-data-item__number--first":V}),q=x(U.W.isParticipating.full),W=!1;if(V){let e=void 0===U._.find(e=>{let t=tV()(j.dirtyFields,e),a=tV()(j.errors,e);return void 0===t||void 0!==a});W=q&&e}let K="participant.".concat(l,".").concat(aa.birthDate),G=V&&q?"user":"participant.".concat(l),X=s.length>0&&void 0!==s.find(e=>{var t,a;return(null===(a=e.extraData)||void 0===a?void 0:null===(t=a.participantsRequiredInfo)||void 0===t?void 0:t.length)>0}),Y=T("participant.".concat(l,".").concat(aa.sex)),Q=T("participant.".concat(l,".").concat(aa.name)),$=T("participant.".concat(l,".").concat(aa.surname)),J=T(K),et=(null==d?void 0:d.filter(e=>e!==l))||[],ea=T("user.sex"),ei=T("user.name"),en=T("user.surname"),eo=T("user.birthDate"),es=[...et.map(e=>{let t=T("participant.".concat(e,".").concat(aa.sex)),a=T("participant.".concat(e,".").concat(aa.name)),i=T("participant.".concat(e,".").concat(aa.surname)),l=T("participant.".concat(e,".").concat(aa.birthDate));return t&&a&&i&&l?"".concat(t," ").concat(a," ").concat(i," ").concat(l):""}).filter(Boolean),ea&&ei&&en&&eo&&"".concat(ea," ").concat(ei," ").concat(en," ").concat(eo)];function ed(e){return e.firstName===Q&&e.lastName===$&&e.gender===Y&&(0,el.p6)(e.birthDate,el.fK.dayMonthYearWithDots)===J}function eu(e){return e&&es.includes(e)}function em(){Z("participant.".concat(l,".").concat(aa.name),{keepDirty:!1,keepError:!1,keepTouched:!1}),Z("participant.".concat(l,".").concat(aa.surname)),void 0===o.birthDate&&Z("participant.".concat(l,".").concat(aa.birthDate)),Z("participant.".concat(l,".").concat(aa.sex))}let eh=Y&&Q&&$&&J&&(null!==(i=null==g?void 0:null===(t=g.participants)||void 0===t?void 0:t.filter(e=>e.firstName===Q&&e.lastName===$&&e.gender===Y&&(0,el.p6)(e.birthDate,el.fK.dayMonthYearWithDots)===J))&&void 0!==i?i:[]).length>0;return(0,m.jsxs)("div",{className:"participants-data-item","data-testid":"participants-data-item",children:[(0,m.jsxs)("div",{className:"participants-data-item__header",children:[(0,m.jsxs)("div",{className:"participants-data-item__icon-wrapper",children:[V?(0,m.jsx)(t6.Z,{className:"participants-data-item__icon"}):(0,m.jsx)(t8.Z,{className:"participants-data-item__icon"}),(0,m.jsx)("span",{className:H,children:l})]}),(0,m.jsxs)("span",{className:"participants-data-item__title",children:[n.participantLabel.replace("{}",l),A&&" ".concat(n.infantSuffix),W&&(0,m.jsx)(t3.default,{className:"participants-data-item__confirm-icon"})]})]}),(0,m.jsxs)("div",{className:"participants-data-item__body",children:[V&&q&&(0,m.jsxs)("div",{className:"participants-data-item__user-participating-info","data-testid":"participants-data-user-participating-info",children:[n.editUserInfo,(0,m.jsxs)(P.ZP,{variant:P.qh.link,className:"participants-data-item__edit-user-button",onClick:function(){y(U.W.isParticipating.full,!1,{shouldValidate:!1,shouldDirty:!0}),_()},testId:"participants-data-edit-user-participating",children:[n.editUserButton,"\xa0\xbb"]})]}),R&&z&&!A&&(0===M.length&&(0,m.jsxs)("div",{className:"flex flex-col items-start gap-1 md:flex-row md:items-center",children:[(0,m.jsxs)("div",{className:"flex items-center gap-1",children:[(0,m.jsx)(t5.default,{className:"size-5 fill-red"}),(0,m.jsx)("span",{className:"text-sm font-bold text-red",children:n.planeSeats.noSeats})]}),(0,m.jsx)(P.ZP,{variant:"primary",className:"ml-1 w-fit text-sm disabled:bg-gray-altoLight disabled:hover:cursor-default",onClick:function(){c((0,tP.yU)(!0,"participants_form"))},type:"button",disabled:D,isLoading:D,children:n.planeSeats.select})]})||M.length>0&&(0,m.jsx)("div",{className:"flex items-center gap-1 rounded-l-sm rounded-r-md border-l-8 border-solid border-l-green-lightGreen bg-green-lightGreen/10 px-4 py-2",children:(0,m.jsxs)("span",{className:"text-sm font-bold text-blue",children:[n.planeSeats.yourSeats," -"," ",M.join(", ")
1]})})),(!V||!q)&&(0,m.jsxs)(m.Fragment,{children:[f.authenticated&&Array.isArray(null==g?void 0:g.participants)&&g.participants.length>0&&(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsxs)("span",{children:[n.yourSavedParticipants,":"]}),null===(a=g.participants)||void 0===a?void 0:a.filter(e=>void 0!==o.birthDate?(0,el.p6)(e.birthDate,el.fK.dayMonthYearWithDots)===o.birthDate:"ADULT"===e.participantType).map(e=>(0,m.jsx)(ai,{participantNumber:l,savedParticipant:e,isParticipantTheSame:ed,isParticipantUsedElsewhere:eu,clearInputs:em},e.id))]}),(0,m.jsxs)("div",{className:"participants-data-item__row",children:[(0,m.jsx)("input",{type:"hidden",name:"participant.".concat(l,".").concat(aa.type),value:null==o?void 0:o.type,...N("participant.".concat(l,".").concat(aa.type),{shouldUnregister:!0})}),(0,m.jsx)("input",{type:"hidden",name:"participant.".concat(l,".").concat(aa.personRef),value:null==o?void 0:o.personRef,...N("participant.".concat(l,".").concat(aa.personRef),{shouldUnregister:!0})}),(0,m.jsxs)(tE.Z,{isSelect:!0,name:"participant.".concat(l,".").concat(aa.sex),shortName:aa.sex,autoComplete:"sex",label:n.sex.label,placeholder:n.sex.placeholder,registerOptions:{validate:(0,er.b0)(er.UE,n.sex.validation),shouldUnregister:!0},...r,withoutValidBorder:"FEMALE"!==Y&&"MALE"!==Y,withValidIcon:"FEMALE"===Y||"MALE"===Y,"data-testid":"participant-data-".concat(l,"-sex"),children:[(0,m.jsx)("option",{value:"",children:n.sex.placeholder}),null==u?void 0:u.map(e=>(0,m.jsx)("option",{value:e.type,children:e.value},e.type))]}),(0,m.jsx)(tE.Z,{name:"participant.".concat(l,".").concat(aa.name),shortName:aa.name,autoComplete:"given-name",label:n.name.label,placeholder:n.name.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,n.name.validation,(0,er.Xf)("NAME",p)),shouldUnregister:!0},...r,withoutValidBorder:!Q,withValidIcon:Q,"data-testid":"participant-data-".concat(l,"-first-name")}),(0,m.jsx)(tE.Z,{name:"participant.".concat(l,".").concat(aa.surname),shortName:aa.surname,autoComplete:"family-name",label:n.surname.label,placeholder:n.surname.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,n.surname.validation,(0,er.Xf)("SURNAME",p)),shouldUnregister:!0},...r,withoutValidBorder:!$,withValidIcon:$,"data-testid":"participant-data-".concat(l,"-last-name")}),(0,m.jsx)(t9.Z,{wrapperClassName:"user-data__calendar-dropdown-wrapper",onDateSelect:function(e){y(K,(0,el.p6)(e,el.fK.dayMonthYearWithDots),{shouldValidate:!0,shouldDirty:!0}),_(K)},value:x(K),isDisabled:F,renderInput:()=>(0,m.jsx)(tE.Z,{name:K,shortName:aa.birthDate,autoComplete:"bday",label:n.birthDate.label,placeholder:n.birthDate.placeholder,registerOptions:{validate:(0,er.b0)(er.UE,n.birthDate.validation),shouldUnregister:!0},initialValue:(null==o?void 0:o.birthDate)||x(K),hasInitialBirthDateValue:B,customIcon:(0,m.jsx)(ts.Z,{className:"user-data__calendar-icon"}),readOnly:!0,...r,withoutValidBorder:!J,withValidIcon:J,"data-testid":"participant-data-".concat(l,"-birth-date")})}),f.authenticated&&!eh&&(0,m.jsx)("div",{className:"ml-[6px] mt-5 flex items-center md:mt-1 lg:ml-4 lg:mt-1",children:(0,m.jsx)(S.Qr,{name:"participant.".concat(l,".").concat(aa.saveToMytui),control:k,render:e=>{var t;let{field:a}=e;return(0,m.jsx)(tD.Z,{type:"big",className:"flex items-center",onBlur:a.onBlur,onChange:a.onChange,checked:a.value,name:a.name,inputRef:a.ref,children:null!==(t=n.saveToMytui)&&void 0!==t?t:"Zapisz w myTUI"})}})})]})]}),X&&(0,m.jsx)("div",{className:"participants-data-item__row",children:(0,m.jsx)(ae,{type:t7.participant,selectedFacultativeTrips:s,commonInputProps:r,inputNamePrefix:G})})]})]})}var ad=a(60765);function ac(e){var t;let{labels:a,commonInputProps:i}=e,l=(0,b.Oe)(),n=(0,v.v9)(et.SV),r=(0,b.Zb)(),o=(0,J.VN)(),{data:s}=(0,tT.pW)(o);return l?(0,m.jsxs)(m.Fragment,{children:[r?function(e,t,a,i,l){let n=t.map(e=>parseInt(e.personRef,10));return e.map((e,r)=>{let{personRefs:o,roomCode:s,roomName:d,boardName:c}=e,u="".concat(a.roomNumber," ").concat(r+1,": ").concat(d," (").concat(s,"); ").concat(a.food," ").concat(c);return(0,m.jsx)(t1.Z,{title:u,children:t.filter(e=>o.includes(e.personRef)).map((e,t)=>(0,m.jsx)(as,{labels:a,participant:e,participantNumber:parseInt(e.personRef,10),participantNumbers:n,commonInputProps:i,selectedFacultativeTrips:l},"".concat(r).concat(t)))},r)})}(r,l,a,i,n):function(e,t,a,i){let l=e.map((e,t)=>t+1);return e.map((e,n)=>(0,m.jsx)(as,{labels:t,participant:e,participantNumber:n+1,participantNumbers:l,commonInputProps:a,selectedFacultativeTrips:i},n))}(l,a,i,n),null==s?void 0:null===(t=s.items)||void 0===t?void 0:t.map((e,t)=>(0,m.jsx)(ad.Z,{data:e,index:t},e.activityUuid))]}):null}var au=a(96652),ap=a(18981);let am=e=>(0,et.o5)(e);function av(){var e,t,a,i;let l=(0,Q.gz)(),n=(0,v.v9)(am),r=(0,v.I0)(),o=(0,tm.VY)(),s=(0,I.En)(),[d,c]=(0,k.useState)(!1),u=null==n?void 0:n.find(e=>e.type===ej.hc.planeSeatsReservation),p=null!==(a=null==u?void 0:null===(e=u._embedded)||void 0===e?void 0:e.upsellVariants)&&void 0!==a?a:[],h=(0,k.useMemo)(()=>{var e;return(0,tY.wE)(null!==(e=null==s?void 0:s.localizedContent)&&void 0!==e?e:{})},[s]),f=(0,k.useCallback)(e=>{let{variant:t,selectionCondition:a}=e;return(null==t?void 0:t.status)===ew.X.ordered?h.orderedVariantButtonLabel:(void 0!==a?a:(null==t?void 0:t.selected)===!0)?h.selectedVariantButtonLabel:h.select},[h]),g=(0,k.useCallback)(async e=>{var t,a,i;let{upsell:l,variant:n,isResignVariant:s=!1,roomIndex:d=null,clickSource:u}=e;if(!l)return;let p=(null!==(a=null===(t=l._embedded)||void 0===t?void 0:t.upsellVariants)&&void 0!==a?a:[]).some(e=>e.isLoading);if((null==n||!n.isLoading)&&!p)try{await r((0,eN.kq)({upsellType:l.type,upsellGroupType:l.groupType,variantId:null==n?void 0:n.upsellId,isResignVariant:s,roomIndex:null!==(i=null!=d?d:l.roomIndex)&&void 0!==i?i:null,clickSource:null!=u?u:"participants_form",isExtras:!1})),l.type===ej.hc.flightClass&&c(!1)}catch(e){o.error(h.errorTogglingVariant)}},[o,r,h.errorTogglingVariant]),b=(0,k.useCallback)(()=>{c(!0)},[]),x=(0,k.useCallback)(()=>{c(!1),r((0,tP.yU)(!1,void 0)),r((0,tP.D9)(!1))},[r]);if("recommendations"===l||void 0===u||0===p.length)return null;let y=!0===u.isResignVariantSelected||p.some(e=>!1===e.hidden&&e.selected),_=null==n?void 0:n.find(e=>e.type===ej.hc.flightClass),j=null!==(i=null==_?void 0:null===(t=_._embedded)||void 0===t?void 0:t.upsellVariants)&&void 0!==i?i:[],w=(null==_?void 0:_.isResignVariantSelected)===!0||j.some(e=>!1===e.hidden&&e.selected);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{display:"none"},"aria-hidden":"true","data-component":"PlaneSeatsReservationDialogBridge",children:(0,m.jsx)(ap.Z,{upsell:u,variants:p,labels:h,hasSelectedVariant:y,onVariantButtonClick:g,renderButtonLabel:f,showFlightClassDialog:b,isFlightClassDialogOpen:d,hasError:!1})}),_?(0,m.jsx)(Z.Z,{isOpen:d,onClick:x,onClose:x,className:"upsell__dialog-wrapper",dialogTitle:h.flightClass.dialogTitle,variant:L.od.withTitle,testId:"flight-class-popup",children:(0,m.jsx)(au.Z,{upsell:_,variants:j,labels:h,hasSelectedVariant:w,onVariantButtonClick:g,renderButtonLabel:f,isInDialog:!0})}):null]})}var ah=a(8723),af=a(1953),ag=a(28839),ab=a(8429),ax=a(97739),ay=a(34022),a_=a(33337),aj=a(12643),aw=a(61617
1),aN=a(18871),aC=a(29371),ak=a(83945),aS=a(68e3),aT=a(62113),aP=a(93384),aZ=a(55118),aL=a(33050),aI=a(53147),aO=a(62207);let aE=new Date;var aR=function(e){let{data:t,labels:a,onSelect:i,selectedOffice:l}=e,[n,r]=(0,k.useState)(!1),o=t.identity===l,s=(0,ep.Z)("office-selection-item",{"office-selection-item--selected":o});return(0,m.jsxs)("div",{className:s,children:[(0,m.jsx)("div",{className:"office-selection-item__name",children:t.name}),(0,m.jsxs)("ul",{className:"office-selection-item__details",children:[(0,m.jsxs)("li",{className:"office-selection-item__detail office-selection-item__detail--address",children:[(0,m.jsx)(aP.default,{className:"office-selection-item__icon"}),t.address]}),(0,m.jsxs)("li",{className:"office-selection-item__detail",children:[(0,m.jsx)(aO.Z,{className:"office-selection-item__icon"}),(0,m.jsx)("b",{children:(0,m.jsx)("a",{href:"tel:".concat(t.phone),rel:"nofollow noopener noreferrer",children:t.phone})})]}),(0,m.jsxs)("li",{className:"office-selection-item__detail",children:[(0,m.jsx)(aI.default,{className:"office-selection-item__icon"}),(0,m.jsx)("b",{children:(0,m.jsx)("a",{href:"mailto:".concat(t.email),rel:"nofollow noopener noreferrer",children:t.email})})]}),(0,m.jsxs)("li",{className:"office-selection-item__detail office-selection-item__detail--hours",children:[(0,m.jsx)(aL.Z,{className:"office-selection-item__icon"}),function(){var e;let i=t.workingDays.find(e=>{let[t]=e.day.split(" ");return t===aE.getDay().toString()}),l=a.openHoursUnavailable;if(i){let[e,t]=i.day.split(" ");l=t.split("-").join(" - ")}let o=(0,m.jsxs)(m.Fragment,{children:[a.openHours,": ",(0,m.jsx)("b",{children:l})]});if((null===(e=t.workingDays)||void 0===e?void 0:e.length)>0){let e=(0,ep.Z)("office-selection-item__open-hours-arrow",{"office-selection-item__open-hours-arrow--open":n});return(0,m.jsx)(eI.Z,{target:(0,m.jsxs)(m.Fragment,{children:[o,(0,m.jsx)(aZ.default,{className:e})]}),variant:aT.uY.default,position:"bottom",customClassName:"office-selection-item__open-hours-tooltip",onTooltipInteraction:r,content:(0,m.jsx)("ul",{className:"office-selection-item__open-hours-list",children:t.workingDays.map((e,t)=>{let[i,l]=e.day.split(" "),n=i===aE.getDay().toString(),r=(0,ep.Z)("office-selection-item__open-hours-item",{"office-selection-item__open-hours-item--today":n}),o=a.openHoursUnavailable;return l&&(o=l.split("-").join(" - ")),(0,m.jsxs)("li",{className:r,children:[(0,m.jsx)("span",{children:(0,el.Td)(i,"long")}),(0,m.jsx)("span",{children:o})]},t)})})})}return o}()]})]}),(0,m.jsxs)("div",{className:"office-selection-item__action",children:[(0,m.jsx)("div",{className:"office-selection-item__selection",children:o&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"office-selection-item__selection-label",children:a.selectedLabel}),(0,m.jsx)(t3.default,{className:"office-selection-item__selection-icon"})]})}),(0,m.jsx)(P.ZP,{variant:P.qh.clean,onClick:function(e){i(t,o,e)},className:"office-selection-item__button",iconName:o?"clear-round":"arrow",iconClassName:"office-selection-item__button-icon",children:o?a.deselectButtonLabel:a.selectButtonLabel})]})]})},aD=a(55664),az=a(86597);function aM(e){let{labels:t,isMobile:a,onOfficeSelect:i,selectedOffice:l}=e,{data:n,isLoading:r,error:o}=function(){let e=(0,eh.BH)(),t=(0,ay.jh)("/api/offices/checkout?locale=".concat(e,"&market=").concat("cz"));return(0,ed.ZP)(t.toString())}(),s=new Date,d="default",[c,u]=(0,k.useState)(!1),[p,v]=(0,k.useState)(d),[h,f]=(0,k.useState)(d),[g,b]=(0,k.useState)(d),[x,y]=(0,k.useState)(),[_,j]=(0,k.useState)(0),[w,N]=(0,k.useState)(az.tK[0]),C=(0,k.useRef)(null),S=(0,k.useRef)(null),T=null!=n?n:[],L=(0,k.useRef)(null),I=(0,k.useRef)(null),[O,E]=(0,k.useState)({lat:51.88805128684143,lng:18.93549083125003}),D={zoomControl:!0,fullscreenControl:!0,mapTypeControl:!0,clickableIcons:!1,gestureHandling:"cooperative"},z=g===t.select.availability.openNow,M=T.filter(e=>{if(p!==d&&e.region!==p||h!==d&&e.city!==h)return!1;if(!(0,aN.j_)({latitude:e.position[1],longitude:e.position[0]}))return null;if(g!==d){let t=e.workingDays.find(e=>{let[t]=e.day.split(" ");return t===s.getDay().toString()});if(void 0!==t){let[e,a]=t.day.split(" "),[i,l]=a.split("-"),n=(0,el.sG)(i,el.fK.hoursMinutesWithSemicolon),r=(0,el.sG)(l,el.fK.hoursMinutesWithSemicolon);return!(0,aC.R)(s,n)&&!(0,ak.A)(s,r)}return!1}return!0}),V=!r&&0===M.length,A=_*w,B=M.slice(A,A+w),F=(0,k.useCallback)(()=>
1{if(null!==I.current&&!r&&!V){let e=new I.current.LatLngBounds;return M.forEach(t=>{let a=new I.current.LatLng(t.position[1],t.position[0]);a&&e.extend(a)}),e}return null},[M,r]);function H(){let{allowHigherZoom:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!==L.current){let t=L.current.getZoom();t<6?L.current.setZoom(6):t>16&&!e&&L.current.setZoom(16)}}let q=(0,k.useCallback)(()=>{if(null!==L.current&&null!==I.current){let e=F();null!==e&&(L.current.fitBounds(e),H())}},[F]);function U(e){v(e.currentTarget.value),"default"!==h&&f("default")}function W(e){f(e.currentTarget.value)}function K(e){var t,a;let{map:i,maps:l}=e;L.current=i,I.current=l,(null===(a=window)||void 0===a?void 0:null===(t=a.navigator)||void 0===t?void 0:t.geolocation)&&window.navigator.geolocation.getCurrentPosition(e=>{let t={lat:e.coords.latitude,lng:e.coords.longitude};new I.current.Marker({position:t,map:L.current}),S.current=setTimeout(()=>{E(t),L.current.setZoom(10)})})}function G(e,t){let a=new I.current.OverlayView,i=new I.current.LatLng(e,t);a.onAdd=function(){let e=this.getProjection(),t=e.fromLatLngToContainerPixel(i);t.y-=120;let a=e.fromContainerPixelToLatLng(t);E({lat:a.lat(),lng:a.lng()}),H({allowHigherZoom:!0})},a.draw=function(){},a.setMap(L.current)}function X(){return(0,m.jsx)(aS.default,{center:O,zoom:6,bootstrapURLKeys:{key:"AIzaSyCbmAwD56oK2TQ2UKvUBXJbC8TMobT05Vc"},onGoogleApiLoaded:K,options:D,yesIWantToUseGoogleMapApiInternals:!0,onChange:e=>{let{center:t}=e;(t.lng!==O.lng||t.lat!==O.lat)&&E(t)},children:M.map(e=>(0,m.jsx)(aj.Z,{type:aw.A.checkoutOffice,style:{width:"51px",height:"68px"},lat:e.position[1],lng:e.position[0],officeData:e,officeLabels:t.map,selectedOffice:l,onOfficeSelect:i,forceOpenTooltip:e.identity===x,onTooltipClose:()=>{y(void 0)},clickHandler:t=>{G(e.position[1],e.position[0]),C.current=setTimeout(()=>{y(t)},500)}},e.id))})}function Y(e,t,a){a.preventDefault();let{position:l,identity:n}=e;i(n),!t&&Array.isArray(l)&&2===l.length&&(G(l[0],l[1]),C.current=setTimeout(()=>{y(n)},500))}(0,k.useEffect)(()=>(q(),()=>{C.current&&clearTimeout(C.current),S.current&&clearTimeout(S.current)}),[p,h,g,C,S]);let Q=[...new Set(null==T?void 0:T.map(e=>e.region).sort((e,t)=>e.localeCompare(t)))],$=p?[...new Set(T.filter(e=>e.region===p).map(e=>e.city))]:[];return(0,m.jsxs)("div",{className:"office-selection",children:[(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-12 col-md-4",children:(0,m.jsxs)(a_.Z,{value:p,label:t.select.voivodeship.label,className:"office-selection__select",labelClassName:"office-selection__select-label",onChange:U,children:[(0,m.jsx)("option",{value:d,children:t.select.common.placeholder}),Q.map(e=>(0,m.jsx)("option",{value:e,children:e},e))]})}),(0,m.jsx)("div",{className:"col-12 col-md-4",children:(0,m.jsxs)(a_.Z,{value:h,label:t.select.city.label,className:"office-selection__select",labelClassName:"office-selection__select-label",onChange:W,children:[(0,m.jsx)("option",{value:d,children:t.select.common.placeholder}),$.map(e=>(0,m.jsx)("option",{value:e,children:e},e))]})}),(0,m.jsx)("div",{className:"col-12 col-md-4",children:(0,m.jsxs)(a_.Z,{value:g,label:t.select.availability.label,className:"office-selection__select",labelClassName:"office-selection__select-label",onChange:function(e){b(e.currentTarget.value)},children:[(0,m.jsx)("option",{value:d,children:t.select.common.placeholder}),(0,m.jsx)("option",{value:t.select.availability.openNow,children:t.select.availability.openNow.toLowerCase()})]})})]}),(0,m.jsxs)("div",{className:"office-selection__map",children:[a&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"office-selection__mobile-placeholder",children:[(0,m.jsx)(te.Z,{src:(0,tp.L)("/images/office-map-placeholder.png"),width:750,height:505,alt:t.map.mobilePlaceholderButtonLabel}),(0,m.jsx)(P.ZP,{variant:P.qh.primary,className:"office-selection__mobile-map-opener",onClick:e=>{e.preventDefault(),u(!0)},children:t.map.mobilePlaceholderButtonLabel})]}),(0,m.jsxs)(Z.Z,{className:"office-selection__mobile-map-dialog",isOpen:c,dialogTitle:t.map.mobilePlaceholderButtonLabel,onClose:()=>u(!1),onClick:()=>u(!1),children:[(0,m.jsx)("div",{className:"office-selection__map office-selection__map--mobile",children:X()}),(0,m.jsx)("div",{className:"office-selection__mobile-select-wrapper",children:(0,m.jsx)("div",{className:"container",children:(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsxs)(a_.Z,{value:p,label:t.select.voivodeship.label,className:"office-selection__select",labelClassName:"office-selection__select-label",onCh
1ange:U,children:[(0,m.jsx)("option",{value:d,children:t.select.common.placeholder}),Q.map(e=>(0,m.jsx)("option",{value:e,children:e},e))]})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsxs)(a_.Z,{value:h,label:t.select.city.label,className:"office-selection__select",labelClassName:"office-selection__select-label",onChange:W,children:[(0,m.jsx)("option",{value:d,children:t.select.common.placeholder}),$.map(e=>(0,m.jsx)("option",{value:e,children:e},e))]})}),(0,m.jsx)("div",{className:"col-12",children:(0,m.jsx)(tD.Z,{className:"office-selection__checkbox",checked:z,onChange:function(e){e.currentTarget.checked?b(t.select.availability.openNow):b(d)},children:t.select.availability.openNow})})]})})})]})]}),!a&&X()]}),!V&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"office-selection__list",children:B.map(e=>(0,m.jsx)(aR,{data:e,labels:t.item,onSelect:Y,selectedOffice:l},e.identity))}),(0,m.jsx)(aD.Z,{labels:t.pagination,currentPageIndex:_,setCurrentPageIndex:j,totalPagesCount:Math.ceil(M.length/w),perPageCount:w,onPerPageCountChange:function(e){let t=Math.ceil(M.length/e);_>=t&&j(t-1),N(e)}})]}),V&&(0,m.jsx)("div",{className:"office-selection__no-offices-message",children:t.noOfficesMessage}),(0,m.jsx)(R.Z,{isLoading:r})]})}aM.propTypes=az.G7,aM.defaultProps=az.EA;var aV=a(86258);let aA={labels:z().shape({title:z().string,intro:z().string,sections:z().arrayOf(z().shape({title:z().string,description:z().string,logos:z().string}))}),isOpen:z().bool,onClose:z().func};function aB(e){let{isOpen:t,onClose:a,labels:i}=e;return(0,m.jsx)(Z.Z,{className:"sofort-dialog",isOpen:t,onClick:a,onClose:a,dialogTitle:(0,m.jsxs)(m.Fragment,{children:[i.title," ",(0,m.jsx)(aV.Z,{className:"sofort-dialog__title-icon"})]}),variant:L.od.withTitle,children:(0,m.jsxs)("div",{className:"sofort-dialog__wrapper",children:[(0,m.jsx)("p",{className:"sofort-dialog__intro",dangerouslySetInnerHTML:{__html:i.intro}}),i.sections.map((e,t)=>{var a;return(0,m.jsxs)("div",{className:"sofort-dialog__section","data-index":t+1,children:[(0,m.jsx)(eZ.Z,{customClassName:"sofort-dialog__section-title",headingLevel:4,children:e.title}),e.description&&(0,m.jsx)("p",{className:"sofort-dialog__section-description",children:e.description}),e.logos&&"string"==typeof e.logos&&(0,m.jsx)("div",{className:"sofort-dialog__logos",children:(null==(a=e.logos)?void 0:a.split(",")).map((e,t)=>(0,m.jsx)("div",{className:"sofort-dialog__logo",children:(0,m.jsx)(eJ.Z,{src:e,alt:"logo link",layout:"fill",objectFit:"contain"})},t))})]},t)})]})})}aB.propTypes=aA;var aF=a(20861);function aH(e){let{data:t,onSelect:a,currency:i}=e,l=(0,eh.BH)(),n="advance_payment"===t.code,r=void 0!==t.description,o=(0,ep.Z)("payment-method-variant",{"payment-method-variant--selected":t.selected}),s=(0,ep.Z)("payment-method-variant__wrapper",{"payment-method-variant__wrapper--with-description-below":r}),d=(0,v.I0)(),c=t.label;return n&&(c="".concat(t.label," ").concat(t.advancePaymentPercentage).concat("cs"===l?" ":"","%")),(0,m.jsxs)("button",{type:"button",title:t.title,onClick:()=>d(a(t.code)),className:o,"data-testid":"payment-variant-".concat(n?"advance":"full"),children:[(0,m.jsxs)("div",{className:s,children:[(0,m.jsx)("div",{className:"payment-method-variant__select-indicator"}),(0,m.jsxs)("span",{className:"payment-method-variant__label",children:[c,t.selected&&(0,m.jsx)(t3.default,{className:"payment-method-variant__label--checkmark"})]}),(0,m.jsxs)("div",{className:"payment-method-variant__price-wrapper",children:[(0,m.jsx)("span",{className:"payment-method-variant__price-value",children:(0,eO._B)(n?t.advancePaymentAmount:t.formattedPrice)}),(0,m.jsx)("span",{className:"payment-method-variant__currency",children:i})]})]}),r&&(0,m.jsx)("p",{className:"payment-method-variant__description",children:t.description})]})}aH.propTypes=A.R_,aH.defaultProps=A.EQ;var aq=a(24469);function aU(e){var t,a,i,l,n,r,o;let s,{labels:d,isMobile:c,paymentMethodDescriptions:u}=e,[p,h]=(0,k.useState)(!1),[f,g]=(0,k.useState)(),[x,y]=(0,k.useState)(!1),j=(0,k.useRef)(!1),{paymentData:N,setPaymentData:Z}=(0,k.useContext)(B.Z),{resetField:L}=(0,S.Gc)(),{mutate:O}=(0,ab.kY)(),E=(0,en.p)(),{data:D,isValidating:z}=(0,J.ft)(),{data:M}=(0,b.jK)(),{data:V}=(0,$.v)(null==M?void 0:null===(i=M._embedded)||void 0===i?void 0:null===(a=i.offer)||void 0===a?void 0:null===(t=a._links)||void 0===t?void 0:t.offerUrl.href),F=(0,I.En)(),H=(0,b.QK)(),q=(0,v.v9)(et.SV),U=(0,v.v9)(et.o5),{query:W}=(0,C.useRouter)(),K=null==W?void 0:W.offerCode,G=(0,w.PR)("cartId"),[Y,Q]=(0,k.useState)(),ee=(0,eh.jK)(null==D?void 0:D.currency),ei=null!==(r=null==D?void 0:null===(l=D._embedded)||void 0===l?void 0:l.paymentVariants)&&void 0!==r?r:[],el=null!==(o=null==N?void 0:N.paymentChannels)&&void 0!==o?o:[],er=el.find(e=>e.selected),{data:eo,mutate:es}=(0,ah.q)(null==er?void 0:er.type),ed=(0,J.zs)(),ec=ei.find(e=>e.selected),eu=null==D?void 0:null===(n=D._embedded)||void 0===n?void 0:n.guaranteeFund,ep=(0,I.z$)("PRICE_RESTRICTIONS");function em(e){if(void 0!==(null==e?void 0:e.confirmationLabel)&&void 0!==(null==e?void 0:e.confirmationCode))return e.confirmationCode}(0,k.useEffect)(()=>{void 0!==(null==H?void 0:H.paymentChannels)&&void 0===Y&&Q(H)},[Y,H]),(0,k.useEffect)(()=>{j.current&&!z&&(j.current=!1,y(!1))},[z]),void 0!==ec&&(s=ec.advanced?ec.advancePaymentAmount:ec.formattedPrice);let ev=e=>!(0,aq.t)(s)(e);function ef(e){e.preventDefault(),h(!0)}function eg(){h(!1)}let eb=e=>async(t,a)=>{try{let i=await E("".concat(T.config.urls.checkout.reservation.paymentVariant).concat(e),{method:"POST",appendCartId:!0}),l=(0,et.o5)(a()),n=(0,tY.Yp)(i.upsellVariants,l);n&&t({type:ax.v$,payload:n}),O(T.config.urls.checkout.reservation.price),es()}catch(e){X.Z.error(e)}},ex=e=>t=>{j.current=!0,y(!0),t(eb(e)),Z(t=>({...t,paymentVariants:t.paymentVariants.map(t=>({...t,selected:e===t.code}))}));let a=N.paymentVariants.find(t=>t.code===e),i={name:a.label,price:a.formattedPrice};a.advanced&&(i.advancePaymentAmount=a.advancePaymentAmount,i.advancePaymentPercentage=a.advancePaymentPercentage,i.paymentDate=a.paymentDate,i.remainingAmou
1nt=a.remainingAmount),(0,ea.Us)("add_shipping_info",M,G,V,K,F,Y,q,U,null==ed?void 0:ed.formattedPrice,a,eu),(0,_.yf)({event:"payment_variant_change",payment_variant_change:i})},ey=(0,k.useCallback)(()=>{Z(e=>(0,ag.ZP)(e,e=>{if(!e)return e;e.paymentChannels.forEach(e=>{e.selected&&e._embedded.paymentChannelOptions.forEach(e=>{e.selected&&(e.selected=!1)})})}))},[Z]);function e_(e){Z(t=>({...t,isPaymentChannelCodeMissing:!1,selectedOffice:t.selectedOffice===e?void 0:e}))}return(0,m.jsxs)("div",{className:"payment-method",id:"payment-method","data-testid":"payment",children:[ei.length>0&&(0,m.jsxs)("div",{className:"payment-method__section relative",children:[(0,m.jsx)(eZ.Z,{headingLevel:3,customClassName:"payment-method__heading",children:d.variantHeading}),ei.map(e=>(0,m.jsx)(aH,{data:e,onSelect:ex,currency:ee},e.code)),(0,m.jsx)(R.Z,{className:"w-full sm:max-w-[575px]",isLoading:x||z})]}),el.length>0&&(0,m.jsxs)("div",{className:"payment-method__section",children:[(0,m.jsx)(eZ.Z,{headingLevel:3,customClassName:"payment-method__heading",children:d.methodHeading}),(0,m.jsx)("div",{className:"payment-method__channels-wrapper",children:el.map(e=>{var t,a;let i=e.type===A.Tv.sofort,l=e.type===A.Tv.electronicFundsTransfer,n=e.type===A.Tv.p24,r=e.type===A.Tv.payAtTuiOffice,o=null!==(a=null==e?void 0:null===(t=e._embedded)||void 0===t?void 0:t.paymentChannelOptions)&&void 0!==a?a:[],s=ev(e);return(0,m.jsxs)(aF.Z,{data:e,onSelect:()=>(function(e){(function(e){var t,a;let i=null==N?void 0:null===(t=N.paymentChannels)||void 0===t?void 0:t.find(e=>e.selected),l=null!=f?f:em(i),n=em(null==N?void 0:null===(a=N.paymentChannels)||void 0===a?void 0:a.find(t=>t.type===e));l!==n&&(void 0!==l&&L("confirmations.".concat(l),{defaultValue:!1}),g(n))})(e),Z(t=>({...t,paymentChannels:t.paymentChannels.map(t=>({...t,selected:e===t.type}))}));let t=N.paymentChannels.find(t=>t.type===e),a={...N,paymentChannels:N.paymentChannels.map(t=>({...t,selected:e===t.type}))};(0,ea.Us)("add_payment_info",M,G,V,K,F,a,q,U,null==ed?void 0:ed.formattedPrice,ec,eu),(0,_.yf)({event:"payment_method_change",payment_method:t.name})})(e.type),description:function(e){switch(e){case A.Tv.transferTraditional:return null==u?void 0:u.transferTraditional;case A.Tv.sofort:return null==u?void 0:u.sofort;case A.Tv.creditcard:case A.Tv.p24CreditCard:case A.Tv.imojeCreditCard:return null==u?void 0:u.creditcard;case A.Tv.imoje:return null==u?void 0:u.imoje;case A.Tv.electronicFundsTransfer:case A.Tv.p24:return null==u?void 0:u.payu;case A.Tv.imojeBlik:case A.Tv.payuBlik:return null==u?void 0:u.blik;case A.Tv.payAtTuiOffice:return null==u?void 0:u.payAtTuiOffice;case A.Tv.installments:case A.Tv.installmentsCZ:return null==u?void 0:u.installments;case A.Tv.imojeWallet:return null==u?void 0:u.imojeWallet}}(e.type),selectedHasCheckmark:!0,reasonForDisabling:s?function(e){switch(e){case A.Tv.imojeBlik:case A.Tv.payuBlik:return null==ep?void 0:ep.blik}}(e.type):void 0,children:[i&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"payment-method__channel-additional-description",children:e.title}),(0,m.jsx)(P.ZP,{className:"payment-method__channel-read-more",variant:P.qh.clean,onClick:ef,iconName:"arrow",children:d.sofort.readMoreButton}),(0,m.jsx)(aB,{labels:d.sofort.dialog,isOpen:p,onClose:eg})]}),(l||n)&&o.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("span",{className:"payment-method__channel-additional-description",children:[d.payu.chooseBankLabel,N.isPaymentChannelCodeMissing&&(0,m.jsx)(tz.Z,{className:"payment-method__channel-error-message",children:d.payu.selectionRequired})]}),(0,m.jsx)("div",{className:"payment-method__channel-options",children:o.map(t=>(0,m.jsx)(aF.Z,{data:t,onSelect:()=>(function(e,t){Z(a=>({...a,isPaymentChannelCodeMissing:!1,paymentChannels:a.paymentChannels.map(a=>a.type===e?{...a,_embedded:{...a._embedded,paymentChannelOptions:a._embedded.paymentChannelOptions.map(e=>({...e,selected:t===e.code}))}}:a)}));let a=N.paymentChannels.find(t=>t.type===e),i=a._embedded.paymentChannelOptions.find(e=>e.code===t),l={...N,paymentChannels:N.paymentChannels.map(t=>({...t,selected:e===t.type}))};(0,ea.Us)("add_payment_info",M,G,V,K,F,l,q,U,null==ed?void 0:ed.formattedPrice,ec,eu,void 0,null==i?void 0:i.name),(0,_.yf)({event:"payment_method_change_option",payment_method:a.name,payment_method_option:i.name})})(e.type,t.code),iconUrl:t.iconUrl,isInvalid:N.isPaymentChannelCodeMissing,reasonForDisabling:(0,af.Q)(eo,t.code),deselect:ey},t.code))})]}),r&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"payment-method__channel-additional-description",children:e.title}),(0,m.jsx)(aM,{labels:d,isMobile:c,onOfficeSelect:e_,selectedOffice:N.selectedOffice})]})]},e.type)})})]})]})}function aW(e){let{labels:t,commonInputProps:a}=e,{data:i}=(0,ee.P)(),{getValues:l,setValue:n,control:r,clearErrors:o}=(0,S.Gc)(),s=(0,en.p)(),d=(0,eh.BH)(),c=(0,b.zl)(),u=(0,b.v8)(),p=(0,b.vy)(),h=(0,b.y0)(),f=l(U.W.isParticipating.full),g=(0,b.RN)(i.authenticated),x=(0,v.v9)(et.SV),_=async()=>
1{if(g&&void 0!==g.email)try{let{email:e,sex:t,name:a,surname:i,phonePrefix:l,phoneNumber:r,street:o,streetNumber:s,apartmentNumber:d,city:c,postalCode:u,country:p,birthDate:m}=g;n(U.W.email.full,e,{shouldValidate:!0,shouldDirty:!0}),n(U.W.sex.full,t,{shouldValidate:!0,shouldDirty:!0}),n(U.W.name.full,a,{shouldValidate:!0,shouldDirty:!0}),n(U.W.surname.full,i,{shouldValidate:!0,shouldDirty:!0}),n(U.W.dialingCode.full,l,{shouldValidate:!0,shouldDirty:!0}),n(U.W.phone.full,r,{shouldValidate:!0,shouldDirty:!0}),n(U.W.street.full,o,{shouldValidate:!0,shouldDirty:!0}),n(U.W.streetNumber.full,s,{shouldValidate:!0,shouldDirty:!0}),n(U.W.apartmentNumber.full,d,{shouldValidate:!0,shouldDirty:!0}),n(U.W.city.full,c,{shouldValidate:!0,shouldDirty:!0}),n(U.W.postalCode.full,u,{shouldValidate:!0,shouldDirty:!0}),n(U.W.country.full,p,{shouldValidate:!0,shouldDirty:!0}),m&&n(U.W.birthDate.full,(0,el.p6)(m,el.fK.dayMonthYearWithDots),{shouldValidate:!0,shouldDirty:!0})}catch(e){X.Z.error("Error filling user data from previous order:"),X.Z.error(e),(0,y.Tb)("Error filling user data from previous order",{extra:{error:e,previousOrderData:g,userInfo:i}})}},j=x.length>0&&void 0!==x.find(e=>{var t,a;return(null===(a=e.extraData)||void 0===a?void 0:null===(t=a.customerRequiredInfo)||void 0===t?void 0:t.length)>0}),w="true"===t4.LJ.get("pz_user_email_prefill_testab"),N=i.authenticated&&g&&void 0!==g.email&&t.previousOrder.buttonLabel,C=w?null==i?void 0:i.user_uid:void 0;return(0,m.jsxs)("div",{className:"user-data","data-testid":"user-data",children:[(0,m.jsxs)("div",{className:"user-data__row",children:[(0,m.jsx)(tE.Z,{name:U.W.email.full,shortName:U.W.email.short,defaultValue:C,type:"email",autoComplete:"email",label:t.email.label,placeholder:t.email.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.email.validation,(0,er.Xf)("EMAIL",p)),onBlur:function(e){let t=e.target.value;if((0,er.Hy)(t,p.email))try{s(T.config.urls.checkout.saveEmailAddress,{method:"POST",body:JSON.stringify({email:t})})}catch(e){X.Z.error("Error saving user email address:"),X.Z.error(e)}}},"data-testid":"user-data-email",...a}),N&&(0,m.jsx)("div",{className:"user-data__previous-order-wrapper",children:(0,m.jsxs)("div",{className:"user-data__previous-order",children:[(0,m.jsx)(P.ZP,{variant:"link",className:"user-data__previous-order--cta",onClick:_,id:"previous-order-data","data-testid":"previous-order-data",children:t.previousOrder.buttonLabel})," ",t.previousOrder.afterButtonLabel]})})]}),(0,m.jsxs)("div",{className:"user-data__row",children:[(0,m.jsxs)(tE.Z,{isSelect:!0,name:U.W.sex.full,shortName:U.W.sex.short,autoComplete:"sex",label:t.sex.label,placeholder:t.sex.placeholder,registerOptions:{validate:(0,er.b0)(er.UE,t.sex.validation)},"data-testid":"user-data-sex",...a,children:[(0,m.jsx)("option",{value:"",children:t.sex.placeholder}),null==c?void 0:c.map(e=>(0,m.jsx)("option",{value:e.type,children:e.value},e.type))]}),(0,m.jsx)(tE.Z,{name:U.W.name.full,shortName:U.W.name.short,autoComplete:"given-name",label:t.name.label,placeholder:t.name.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.name.validation,(0,er.Xf)("NAME",p))},"data-testid":"user-data-first-name",...a}),(0,m.jsx)(tE.Z,{name:U.W.surname.full,shortName:U.W.surname.short,autoComplete:"family-name",label:t.surname.label,placeholder:t.surname.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.surname.validation,(0,er.Xf)("SURNAME",p))},"data-testid":"user-data-last-name",...a})]}),(0,m.jsxs)("div",{className:"user-data__row",children:[(0,m.jsx)(tE.Z,{isSelect:!0,name:U.W.dialingCode.full,shortName:U.W.dialingCode.short,label:t.phone.label,"data-testid":"user-data-dialing-code",...a,children:null==u?void 0:u.map(e=>(0,m.jsx)("option",{value:e,children:e},e))}),(0,m.jsx)(tE.Z,{type:"tel",name:U.W.phone.full,shortName:U.W.phone.short,autoComplete:"tel-national",label:t.phone.label,placeholder:t.phone.placeholder,registerOptions:{validate:(0,er.b0)((e,t)=>(0,er.Hy)("".concat(l(U.W.dialingCode.full)).concat(e),t),t.phone.validation,(0,er.Xf)("PHONE",p))},"data-testid":"user-data-phone",...a})]}),(0,m.jsx)("div",{className:"user-data__row user-data__row--non-mobile-no-wrap",children:"ro"===d?(0,m.jsx)(tE.Z,{name:U.W.street.full,shortName:U.W.street.short,autoComplete:"address-line1",label:t.address.label,placeholder:t.address.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.address.validation,(0,er.Xf)("STREET",p))},nonMobileAuto:!0,"data-testid":"user-data-address",...a}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tE.Z,{name:U.W.street.full,shortName:U.W.street.short,autoComplete:"address-line1",label:t.street.label,placeholder:t.street.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.street.validation,(0,er.Xf)("STREET",p))},nonMobileAuto:!0,"data-testid":"user-data-street",...a}),(0,m.jsx)(tE.Z,{name:U.W.streetNumber.full,shortName:U.W.streetNumber.short,autoComplete:"address-line2",label:t.streetNumber.label,placeholder:t.streetNumber.placeholder,registerOptions:{validate:(0,er.b0)(er.fY,t.streetNumber.validation,(0,er.Xf)("APARTMENT_NUMBER",p))}
1,mobileHalf:!0,nonMobileAuto:!0,"data-testid":"user-data-street-number",...a}),(0,m.jsx)(tE.Z,{name:U.W.apartmentNumber.full,shortName:U.W.apartmentNumber.short,autoComplete:"address-line3",label:t.apartmentNumber.label,placeholder:t.apartmentNumber.placeholder,registerOptions:{validate:(0,er.b0)(er.Yp,t.apartmentNumber.validation,(0,er.Xf)("APARTMENT_NUMBER",p))},mobileHalf:!0,nonMobileAuto:!0,"data-testid":"user-data-apartment-number",...a})]})}),(0,m.jsxs)("div",{className:"user-data__row user-data__row--non-mobile-no-wrap",children:[(0,m.jsx)(tE.Z,{name:U.W.postalCode.full,shortName:U.W.postalCode.short,autoComplete:"postal-code",label:t.postalCode.label,placeholder:t.postalCode.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.postalCode.validation,(0,er.Xf)("POSTAL_CODE",p))},mobileHalf:!0,nonMobileAuto:!0,"data-testid":"user-data-postal-code",...a}),(0,m.jsx)(tE.Z,{name:U.W.city.full,shortName:U.W.city.short,autoComplete:"address-level2",label:t.city.label,placeholder:t.city.placeholder,registerOptions:{validate:(0,er.b0)(er.Hy,t.city.validation,(0,er.Xf)("CITY",p))},mobileHalf:!0,nonMobileAuto:!0,"data-testid":"user-data-city",...a}),(0,m.jsx)(tE.Z,{isSelect:!0,name:U.W.country.full,shortName:U.W.country.short,autoComplete:"country-name",label:t.country.label,placeholder:t.country.placeholder,nonMobileAuto:!0,...a,children:null==h?void 0:h.map(e=>(0,m.jsx)("option",{value:e.isoCode,children:e.name},e.isoCode))})]}),(0,m.jsx)("div",{className:"user-data__row",children:(0,m.jsx)("div",{className:"".concat(a.wrapperClassName," ").concat(a.wrapperClassName,"--checkbox"),children:(0,m.jsx)(S.Qr,{name:U.W.isParticipating.full,control:r,render:e=>{let{field:{onChange:a,onBlur:i,value:l}}=e;return(0,m.jsx)(tD.Z,{type:"big",className:"user-data__checkbox",checked:l,onBlur:i,onChange:e=>a(e.target.checked),"data-testid":"user-data-participating-checkbox",children:t.checkbox.label})}})})}),(f||void 0===f)&&(0,m.jsx)("div",{className:"user-data__row",children:(0,m.jsx)(t9.Z,{wrapperClassName:"user-data__calendar-dropdown-wrapper",onDateSelect:function(e){n(U.W.birthDate.full,(0,el.p6)(e,el.fK.dayMonthYearWithDots),{shouldValidate:!0,shouldDirty:!0}),o(U.W.birthDate.full)},value:l(U.W.birthDate.full),renderInput:()=>(0,m.jsx)(tE.Z,{name:U.W.birthDate.full,shortName:U.W.birthDate.short,autoComplete:"bday",label:t.birthDate.label,placeholder:t.birthDate.placeholder,registerOptions:{validate:(0,er.b0)(er.UE,t.birthDate.validation)},initialValue:l(U.W.birthDate.full),customIcon:(0,m.jsx)(ts.Z,{className:"user-data__calendar-icon"}),readOnly:!0,"data-testid":"user-data-birth-date",...a})})}),j&&(0,m.jsx)(ae,{type:t7.customer,selectedFacultativeTrips:x,commonInputProps:a,inputNamePrefix:"user"})]})}aU.propTypes=A.Hb,aU.defaultProps=A.Hy;var aK=function(e){let{labels:t}=e,{isMobile:a}=(0,ey.h)(),{data:i}=(0,b.jK)(),l=(0,I.z$)("INVOICE_DISCLAIMER"),n=(0,I.z$)("INVOICE_REQUEST"),r=(0,I.z$)("PAYMENT_METHOD_DESCRIPTION"),{fullBasicInfo:o,shortBasicInfo:s,insuranceInfo:d}=function(){var e;let{data:t}=(0,b.jK)(),a=(0,v.v9)(et.$),i=null==t?void 0:null===(e=t._embedded)||void 0===e?void 0:e.personalDataProcessing,l=null==i?void 0:i.fullInformation,n=null==i?void 0:i.shortInformation,r=null==i?void 0:i.insurance,o=(null==i?void 0:i.insuranceSelectionRequired)||!1,s=!a||0===a.length;return{fullBasicInfo:l,shortBasicInfo:n,insuranceInfo:!r||o&&s?void 0:r}}(),c=(0,k.useMemo)(()=>{var e,i,c;return[o||s?{id:"data-processing-info-basic",title:t.dataProcessing.basicInfoTitle,body:(0,m.jsx)(tJ,{shortInfo:s,fullInfo:o,expandLabel:t.dataProcessing.basicInfoReadMore,shrinkLabel:t.dataProcessing.basicInfoReadLess,testId:"data-processing-basic"})}:void 0,d?{id:"data-processing-info-insurance",title:t.dataProcessing.insuranceInfoTitle,body:(0,m.jsx)(tJ,{fullInfo:d,testId:"data-processing-insurance"})}:void 0,{id:"user-data",title:t.userData.title,body:(0,m.jsx)(aW,{labels:t.userData,commonInputProps:tR})},{id:"participants-data",title:t.participantsData.title,body:(0,m.jsx)(ac,{labels:t.participantsData,commonInputProps:tR})},{id:"payment-method",title:t.paymentMethod.title,body:(0,m.jsx)(aU,{labels:t.paymentMethod,isMobile:a,paymentMethodDescriptions:r})},void 0!==l?{id:"invoice-disclaimer",title:null!==(e=null==l?void 0:l.title)&&void 0!==e?e:"Zamawianie faktury",body:(0,m.jsx)("p",{className:"mb-0",children:null!==(i=null==l?void 0:l.disclaimer)&&void 0!==i?i:"Zam\xf3wienie na fakturę złożysz po opłaceniu rezerwacji w serwisie myTUI."})}:void 0,void 0!==n?{id:"invoice-request",title:null!==(c=null==n?void 0:n.title)&&void 0!==c?c:"Zamawianie faktury",body:(0,m.jsx)(t0,{})}:void 0,{id:"statements",title:t.statements.title,body:(0,m.jsx)(tB,{labels:t.statements})}
1].filter(Boolean)},[o,d,t,s,a,l,n]);return(0,m.jsxs)("div",{className:"forms-container","data-testid":"forms-container",children:[c.length>0&&(0,m.jsx)(e5.UQ,{children:c.map((e,t)=>(0,m.jsxs)(e5.Qd,{type:"checkout",expanded:!0,uuid:e.id,className:"forms-container__item",children:[(0,m.jsx)(e5.il,{type:"checkout",currentSectionIndex:t+1,allSectionNumber:c.length,children:e.title}),(0,m.jsx)(e5.X1,{type:"checkout",className:"forms-container__item-body",children:e.body})]},e.id))}),void 0!==i&&(0,m.jsx)(eC,{className:"forms-container__navigation-button",label:t.placeOrder}),(0,m.jsx)(av,{})]})};let aG={OFFER:tO,FORMS:function(e){var t,a,i,l,n;let r={dataProcessing:{basicInfoTitle:e["form.step.tui.data.processing.label"],basicInfoReadMore:e["form.data.processing.read.more"],basicInfoReadLess:e["form.data.processing.read.less"],insuranceInfoTitle:e["form.step.allianz.data.processing.label"]},userData:{title:e["form.step.owner.data.label"],email:{label:e["form.step.owner.data.email.label"],placeholder:e["form.step.owner.data.email.placeholder"],validation:e["form.step.owner.data.email.validation"]},sex:{label:e["form.step.owner.data.gender.label"],placeholder:e["form.step.owner.data.gender.placeholder"],validation:e["form.step.owner.data.gender.validation"]},name:{label:e["form.step.owner.data.firstname.label"],placeholder:e["form.step.owner.data.firstname.placeholder"],validation:e["form.step.owner.data.firstname.validation"]},surname:{label:e["form.step.owner.data.lastname.label"],placeholder:e["form.step.owner.data.lastname.placeholder"],validation:e["form.step.owner.data.lastname.validation"]},phone:{label:e["form.step.owner.data.phone.label"],placeholder:e["form.step.owner.data.phone.placeholder"],validation:e["form.step.owner.data.phone.validation"]},street:{label:e["form.step.owner.data.street.label"],placeholder:e["form.step.owner.data.street.placeholder"],validation:e["form.step.owner.data.street.validation"]},streetNumber:{label:e["form.step.owner.data.street.nr.label"],placeholder:e["form.step.owner.data.street.nr.placeholder"],validation:e["form.step.owner.data.street.nr.validation"]},apartmentNumber:{label:e["form.step.owner.data.appartment.label"],placeholder:e["form.step.owner.data.appartment.placeholder"],validation:"Podaj poprawny numer mieszkania"},address:{label:e["form.step.owner.data.address.label"],placeholder:e["form.step.owner.data.address.placeholder"],validation:e["form.step.owner.data.address.validation"]},postalCode:{label:e["form.step.owner.data.zip.label"],placeholder:e["form.step.owner.data.zip.placeholder"],validation:e["form.step.owner.data.zip.validation"]},city:{label:e["form.step.owner.data.city.label"],placeholder:e["form.step.owner.data.city.placeholder"],validation:e["form.step.owner.data.city.validation"]},country:{label:e["form.step.owner.data.country.label"]},checkbox:{label:e["form.step.owner.data.checkbox"]},birthDate:{label:e["form.step.owner.data.birthdate.label"],placeholder:e["form.step.owner.data.birthdate.placeholder"],validation:e["form.step.owner.data.birthdate.validation"]},previousOrder:{buttonLabel:e["form.step.owner.data.previous.order.button"],afterButtonLabel:e["form.step.owner.data.previous.order.after.button"]}},participantsData:{title:e["form.step.participants.data.label"],editUserInfo:e["form.step.participant.data.owner.text"],editUserButton:e["form.step.participant.data.owner.edit"],participantLabel:e["form.step.participant.data.label"],childSuffix:e["form.step.participant.data.kids.label.suffix"],infantSuffix:e["form.step.participant.data.infant.label.suffix"],roomNumber:null!==(t=e["form.step.participant.data.room.number"])&&void 0!==t?t:"Pok\xf3j nr",food:null!==(a=e["form.step.participant.data.food"])&&void 0!==a?a:"Wyżywienie:",sex:{label:e["form.step.owner.data.gender.label"],placeholder:e["form.step.owner.data.gender.placeholder"],validation:e["form.step.owner.data.gender.validation"]},name:{label:e["form.step.owner.data.firstname.label"],placeholder:e["form.step.owner.data.firstname.placeholder"],validation:e["form.step.owner.data.firstname.validation"]},surname:{label:e["form.step.owner.data.lastname.label"],placeholder:e["form.step.owner.data.lastname.placeholder"],validation:e["form.step.owner.data.lastname.validation"]},birthDate:{label:e["form.step.owner.data.birthdate.label"],placeholder:e["form.step.owner.data.birthdate.placeholder"],validation:e["form.step.owner.data.birthdate.validation"]},flightType:{DEPARTURE:e["form.step.participant.data.flight.type.departure"],RETURN:e["form.step.participant.data.flight.type.return"]},planeSeats:{noSeats:e["form.step.participant.data.plane.seats.no.seats"],select:e["form.step.participant.data.plane.seats.select"],yourSeats:e["form.step.participant.data.plane.seats.your.seats"]},yourSavedParticipants:e["form.step.participant.data.saved.participants.label"],saveToMytui:e["form.step.owner.data.mytui.label"]},paymentMethod:{title:e["form.step.payment.label"],variantHeading:e["form.payment.variant"],methodHeading:e["form.payment.method"],currency:"Kč",sofort:{readMoreButton:e["confirmation.read.more.btn.label"],dialog:{title:e["form.payment.klarna.popup.label"],intro:e["form.payment.klarna.popup.description"],sections:[{title:e["form.payment.klarna.popup.box.1.label"],description:e["form.payment.klarna.popup.box.1.description"],logos:e["form.payment.klarna.popup.banks"]},{title:e["form.payment.klarna.popup.box.2.label"],description:e["form.payment.klarna.popup.box.2.description"]},{title:e["form.payment.klarna.popup.box.3.label"],description:e["form.payment.klarna.popup.box.3.description"]},{title:e["form.payment.klarna.popup.box.4.label"],description:e["form.payment.klarna.popup.box.4.description"]},{title:e["form.payment.klarna.popup.box.5.label"],description:e["form.payment.klarna.popup.box.5.description"],logos:e["form.payment.klarna.popup.cert
1s"]}]}},payu:{chooseBankLabel:e["form.payment.bank.selection"],selectionRequired:e["form.payment.bank.selection.required"]},select:{common:{placeholder:e["form.payment.office.dropdown.all"]},voivodeship:{label:e["form.payment.office.area.label"]},city:{label:e["form.payment.office.city.label"]},availability:{label:e["form.payment.office.availability"],openNow:e["form.payment.office.open.now"]}},map:{openHours:e["form.payment.office.open"],openHoursUnavailable:e["form.payment.office.no.data"],selectButtonLabel:e["form.payment.office.select"],deselectButtonLabel:e["form.payment.office.remove.selection"],selectedLabel:e["form.payment.office.selected"],mobilePlaceholderButtonLabel:e["form.payment.office.select.on.map"]},item:{openHours:e["form.payment.office.open.hours"],openHoursUnavailable:e["form.payment.office.no.data"],selectButtonLabel:e["form.payment.office.select"],deselectButtonLabel:e["form.payment.office.remove.selection"],selectedLabel:e["form.payment.office.selected"]},pagination:{selectLabel:e["form.payment.office.nav.limit.label"],previousPageLabel:e["form.payment.office.nav.page.prev"],nextPageLabel:e["form.payment.office.nav.page.next"]},noOfficesMessage:e["form.payment.office.change.criteria"]},statements:{title:e["form.step.statements.label"],requiredText:e["confirmation.required.text"],readMoreButtonLabel:e["confirmation.read.more.btn.label"],readLessButtonLabel:e["confirmation.read.less.btn.label"],selectAll:null!==(i=e["confirmation.select.all"])&&void 0!==i?i:"TAK, zaznacz wszystkie",selectMarketingChannel:null!==(l=e["confirmation.select.marketing.channel"])&&void 0!==l?l:"Wybierz spos\xf3b otrzymywania informacji handlowo-marketingowych."},placeOrder:null!==(n=e["form.place.order"])&&void 0!==n?n:"Rezerwuj"};return(0,m.jsx)(t$.Z,{instant:!0,children:(0,m.jsx)(aK,{labels:r})})}},aX={HEADER:ef.Z,NAVIGATION:eg.Z,RECOMMENDATIONS:function(e){let{items:t,name:a,...i}=e;return t.map((e,t)=>(0,eQ.Z)({...i,component:e,index:t,pageType:T.config.pageTypes.checkoutReservation,pagePartsMap:tQ}))},STATEMENTS:function(e){let{items:t,name:a,...i}=e;return t.map((e,t)=>(0,eQ.Z)({...i,component:e,index:t,pageType:T.config.pageTypes.checkoutReservation,pagePartsMap:aG}))},PRICE_SUMMARY:function(){return(0,m.jsx)(eY.Z,{children:(0,m.jsx)(eX,{})})}};var aY=a(91074);let aQ=(0,a(45279).P1)([aY.F],e=>{let t=["CheckoutHeader","CheckoutContent","CheckoutRightColumn","CheckoutBottom"],a=T.config.pageTypes.checkoutReservation;return e?e.filter(e=>t.includes(e.name)).reduce((e,t)=>{let{name:i,components:l}=t;return{...e,[i]:l.map((e,t)=>(0,eQ.Z)({component:e,index:t,pageType:a,pagePartsMap:aX}))}},{}):e});function a$(){let e=(0,Q.gz)(),t=(0,v.v9)(aQ);if(!e)return null;let a=null==t?void 0:t.CheckoutContent,i=null==t?void 0:t.CheckoutRightColumn,l=null==a?void 0:a.filter((t,a)=>Q.DX.indexOf(e)===a);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"col-12 col-lg-9","data-component":"MainContent",children:l}),(0,m.jsx)("div",{className:"col-12 col-lg-3",children:i})]})}var aJ=a(79328),a0=a(18119),a1=a(59430);function a2(e){let{variant:t="classic",flightClass:a,labels:i,withEvacuation:l}=e,n="modern"===t;return n?(0,m.jsxs)("ul",{className:"m-0 flex items-center gap-2.5 py-0 xl:py-3 text-xs leading-3 text-black","data-testid":"plane-seat-legend","data-component":"Legend",children:[l&&(0,m.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,m.jsx)(a1.Z,{variant:"modern",className:"!m-0 !size-6",status:"available",readOnly:!0,evacuation:!0}),(0,m.jsx)("span",{className:"w-24",children:i.evacuation})]}),void 0!==a&&(0,m.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,m.jsx)(a1.Z,{variant:"modern",className:"!m-0 !size-6",flightClass:a,status:"available",readOnly:!0}),(0,m.jsx)("span",{children:i[a.toLowerCase()]})]}),(0,m.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,m.jsx)(a1.Z,{variant:"modern",className:"!m-0 !size-6",status:"taken",readOnly:!0}),(0,m.jsx)("span",{children:i.taken})]})]}):(0,m.jsxs)("div",{className:"m-0 flex flex-col gap-y-4 p-2 xl:px-0",children:[(0,m.jsxs)("ul",{className:"flex flex-wrap items-center gap-x-3",children:[void 0!==a&&(0,m.jsxs)("li",{className:"flex items-center gap-x-1 text-sm",children:[(0,m.jsx)(a1.Z,{variant:t,flightClass:a,status:"available",readOnly:!0}),i[a.toLowerCase()]]}),(0,m.jsxs)("li",{className:"hidden items-center gap-x-1 text-sm",children:[(0,m.jsx)(a1.Z,{variant:t,flightClass:a,status:"selected",readOnly:!0}),i.selected]}),!n&&(0,m.jsxs)("li",{className:"flex items-center gap-x-1 text-sm",children:[(0,m.jsx)(a1.Z,{status:"occupied",readOnly:!0}),i.occupied]}),(0,m.jsxs)("li",{className:"flex items-center gap-x-1 text-sm",children:[(0,m.jsx)(a1.Z,{variant:t,status:"taken",readOnly:!0}),i.taken]})]}),l&&(0,m.jsxs)("div",{className:"flex items-center gap-x-1 text-sm",children:[(0,m.jsx)(a1.Z,{variant:t,status:"available",readOnly:!0,evacuation:!0}),i.evacuation]})]})}var a4=a(17060);let a3={sm:576,md:768,lg:992,xl:1200,"2xl":1536};function a5(e){let t="(min-width: ".concat(a3[e],"px)");function a(e){return window.matchMedia(e).matches}let[i,l]=(0,k.useState)(a(t));return(0,k.useEffect)(()=>{let e=window.matchMedia(t);function i(){l(a(t))}
1return i(),e.addEventListener("change",i),()=>{e.removeEventListener("change",i)}},[t]),i}var a6=a(51490),a8=a(26768);function a9(e){var t,a,i,l,n,r,o,s,d,c;let{className:u,variant:p="classic",showRecommended:h=!1,participants:f,infants:g,flightType:b,flightClass:x,selectedSeats:y,labels:_,areSeatsTaken:j,seatMapData:w}=e,N="modern"===p,C=(0,I.En)(),k=(0,I.z$)("RMWS_STEP"),S=(0,I.z$)("UPSELLS"),P=(0,v.I0)(),Z=a5("md"),O=null!==(n=null==y?void 0:null===(t=y.find(e=>e.type===b))||void 0===t?void 0:t.places)&&void 0!==n?n:[],E=void 0!==(null==w?void 0:w.plane),R=null!==(r=null==C?void 0:null===(a=C.declination)||void 0===a?void 0:a["rmws.tab_content_heading"])&&void 0!==r?r:["Wybierz {participantsCount} miejsce:","Wybierz {participantsCount} miejsca:","Wybierz {participantsCount} miejsc:"],D=(0,aN.px)(f,...R).replace("{participantsCount}",f.toString()),z=null!==(o=null==w?void 0:w.places.some(e=>e.some(e=>e.evacuation)))&&void 0!==o&&o;return(0,m.jsxs)("div",{className:(0,ep.Z)("mx-auto flex max-w-xl flex-col gap-y-4",N&&"w-full min-w-0",u),"data-component":"TabContent",children:[(0,m.jsxs)("div",{className:(0,ep.Z)("flex flex-col gap-y-2",N&&"hidden"),children:[(0,m.jsxs)("div",{className:"flex items-center gap-x-2 lg:flex-col lg:items-start",children:[(0,m.jsx)("span",{children:D}),(0,m.jsx)("div",{className:"flex",children:Array.from({length:f+g}).map((e,t)=>{let a=t>=f,i="unselected",l="".concat(t+1);if(void 0!==O[t]){var n,r;i="selected",l=null!==(r=null===(n=O[t])||void 0===n?void 0:n.replace(/\s/,""))&&void 0!==r?r:""}return a&&(i="infant"),(0,m.jsxs)("div",{className:"flex items-center gap-x-1",children:[(0,m.jsx)(a1.Z,{className:"size-6",flightClass:x,status:i,label:l,readOnly:!0}),a&&(0,m.jsx)(e8.Z,{customClassName:"m-0 hidden lg:block",type:"tooltip",tooltipVariant:aT.uY.slim,content:_.infantSeatDisclaimer,testId:"infant-seat-disclaimer"})]},t)})})]}),g>0&&(0,m.jsxs)("div",{className:"flex items-center gap-x-1 border-b border-solid border-gray-altoLight pb-2 lg:hidden",children:[(0,m.jsx)(a8.Z,{className:"size-6 shrink-0 fill-bismark"}),(0,m.jsx)("span",{className:"text-sm",children:_.mobileInfantSeatDisclaimer})]}),j&&(0,m.jsx)("div",{className:"plane-seats-reservation__taken-seats-info",children:null!==(s=null==k?void 0:k.seats_taken)&&void 0!==s?s:"Niewiele Ci zabrakło. Ktoś właśnie zarezerwował te miejsca. Dokonaj\n            wyboru ponownie."})]}),E&&(0,m.jsx)(e8.Z,{customClassName:"text-blue underline cursor-pointer text-base mt-2 justify-center",buttonText:_.airplaneMapButtonLabel,title:_.airplaneMapPopupTitle,type:"dialog",testId:"airplane-seats-map-popup",content:(0,m.jsxs)("div",{className:"border border-solid border-porcelain",children:[(0,m.jsxs)("div",{className:"flex items-center justify-center gap-x-2 py-1 text-sm",children:[(0,m.jsx)(a6.Z,{className:(0,ep.Z)("size-6 shrink-0 fill-blue",{"-scale-x-100":b===T.Tl.return})}),(0,m.jsxs)("div",{className:"tab__title",children:[b===T.Tl.departure?_.departureTabLabel:_.returnTabLabel,void 0!==w.plane&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("br",{}),null==w?void 0:null===(i=w.plane)||void 0===i?void 0:i.name]})]})]}),(0,m.jsx)("div",{className:"plane-seats-reservation__airplane-map-image",children:(0,m.jsx)("img",{src:null!==(d=null==w?void 0:null===(l=w.plane)||void 0===l?void 0:l.imageUrl)&&void 0!==d?d:"",alt:""})})]}),withoutIcon:!0,dialogSettings:{variant:L.od.withTitle,className:"w-screen lg:w-auto my-0 h-screen mx-auto p-0 lg:min-w-96 lg:max-h-[calc(100vh-20px)]",contentClassName:"flex flex-col h-screen lg:w-auto lg:max-h-[calc(100vh-20px)]",bodyClassName:"max-h-[calc(100vh-50px)] overflow-y-auto"}}),(0,m.jsx)("div",{className:(0,ep.Z)("border-y border-solid border-gray-altoLight",N&&"hidden"),children:(0,m.jsx)(a2,{flightClass:x,labels:_.legendLabel,withEvacuation:z})}),N&&j&&(0,m.jsx)("p",{role:"alert",children:null!==(c=null==k?void 0:k.seats_taken)&&void 0!==c?c:"Niewiele Ci zabrakło. Ktoś właśnie zarezerwował te miejsca. Dokonaj wyboru ponownie."}),(0,m.jsx)("div",{className:N?"overflow-x-auto px-2":void 0,children:(0,m.jsx)(a4.Z,{variant:p,showRecommended:h,recommendedLabel:null==k?void 0:k.recommended_seat_label,flightClass:x,seatMapData:w,selectedSeatCo
1des:O,nonInfantParticipantsCount:f,isMobile:!Z,flightType:b,onSeatClick:function(e){P((0,tP.IS)(e))},areSeatsTaken:j,evacuationSeatTooltip:null==S?void 0:S["upsells.planeSeatsReservation.evacuation_seat_tooltip"]})})]})}var a7=a(44516);function ie(e){let{variant:t="classic",selected:a,disabled:i,tabItem:l,areSeatsTaken:n,isFlightTypeUnavailable:r,oneWayOnlyLabel:o}=e,s="modern"===t,d=a6.Z;return s&&(d=tw.default,l.type===T.Tl.return&&(d=tj.Z)),(0,m.jsxs)("div",{className:(0,ep.Z)("flex min-h-9 w-full items-center justify-center gap-x-2 p-1 md:py-0",{"bg-white":a,"md:justify-start":!s,"bg-porcelain lg:bg-white":!s&&(i||!a),"xl:border-b border-solid border-gray-altoLight px-3 py-2 md:py-2 xl:py-0":s,"bg-blue text-white max-xl:border-b-blue xl:bg-white":s&&!a,"cursor-not-allowed":i}),"data-component":"TabTitle",children:[(0,m.jsx)(d,{className:(0,ep.Z)("shrink-0 fill-blue",{"size-6":!s,"size-4 max-xl:self-start max-xl:mt-0.5":s,"-scale-x-100":!s&&l.type===T.Tl.return,"lg:fill-gray":!s&&(i||!a),"fill-white xl:fill-blue":s&&!a})}),(0,m.jsx)("span",{className:(0,ep.Z)("text-blue",{"text-sm md:text-base md:font-bold":!s,"font-headings text-sm font-semibold leading-5 max-xl:text-left xl:text-base xl:font-bold":s,"lg:text-gray":!s&&(i||!a),"text-white xl:text-blue":s&&!a}),children:"DEPARTURE"===l.type?"".concat(l.departurePlaceName," - ").concat(l.arrivalPlaceName):"".concat(l.arrivalPlaceName," - ").concat(l.departurePlaceName)}),n&&(0,m.jsx)("div",{className:"flex size-5 items-center justify-center rounded-full bg-sunsetOrange",children:(0,m.jsx)(a7.default,{style:{fill:"#fff",width:"12px",height:"20px",margin:"0"}})}),r&&(0,m.jsx)(e8.Z,{customClassName:"flex items-center m-0",type:"tooltip",tooltipVariant:aT.uY.slim,content:o})]})}var it=a(69424),ia=a(31381),ii=a(27028),il=a(42987);function ir(e){let{tabItem:t,disabled:a,areSeatsTaken:i,oneWayOnlyLabel:l}=e;return(0,m.jsx)(ie,{selected:!1,disabled:a,tabItem:t,areSeatsTaken:i,isFlightTypeUnavailable:!0,oneWayOnlyLabel:l})}function io(e){var t,a,i,l,n,r,o,s,d,c,u,p,h;let{liftingVariant:f="A",currentState:g,seatMapResources:b,onCancel:x,onSubmit:y,currency:j}=e,[w,N]=(0,k.useState)(!1),[C,S]=(0,k.useState)(!1),Z=(0,I.z$)("UPSELLS"),L=(0,tY.wE)(null!=Z?Z:{}),O=(0,I.z$)("RMWS_STEP"),E="classic";("B"===f||"C"===f)&&(E="modern");let D="modern"===E,z=a5("xl"),M=D&&!z,V="C"===f,A=null==O?void 0:O.cancel_disclaimer,B=(0,v.I0)(),F=(0,v.v9)(et.r3),H=function(e){var t,a,i,l,n,r,o,s;let d=null===(t=e.seatMaps)||void 0===t?void 0:t.find(e=>"DEPARTURE"===e.flightType),c=null===(a=e.seatMaps)||void 0===a?void 0:a.find(e=>"RETURN"===e.flightType);return[{type:"DEPARTURE",id:"tab-plane-seats-reservation-tabs-DEPARTURE",departurePlaceName:null!==(i=e.departurePlaceName)&&void 0!==i?i:"",arrivalPlaceName:null!==(l=e.arrivalPlaceName)&&void 0!==l?l:"",status:void 0!==d?"available":"unavailable",flightClassType:null!==(n=null==d?void 0:d.flightClassType)&&void 0!==n?n:T.f$.economy},{type:"RETURN",id:"tab-plane-seats-reservation-tabs-RETURN",departurePlaceName:null!==(r=e.departurePlaceName)&&void 0!==r?r:"",arrivalPlaceName:null!==(o=e.arrivalPlaceName)&&void 0!==o?o:"",status:void 0!==c?"available":"unavailable",flightClassType:null!==(s=null==c?void 0:c.flightClassType)&&void 0!==s?s:T.f$.economy}]}(b),q=H.filter(e=>"available"===e.status),[U,W]=(0,k.useState)(q[0]),[K,G]=(0,k.useState)(!1),[X,Y]=(0,k.useState)(!1),Q=q.findIndex(e=>e.type===(null==U?void 0:U.type)),$=(0,v.v9)(et.wd),J=null!==(a=null==$?void 0:$.reduce((e,t)=>e+t.totalPrice,0))&&void 0!==a?a:0,ee=null==$?void 0:$.find(e=>e.type===(null==U?void 0:U.type)),ea=void 0!==ee&&ee.places.length===b.participants,ei=(0,tY.Ko)($,F);function el(){N(!1),S(!1)}async function en(){if(ei.length>0&&!C){N(!0);return}el(),"ERROR"===await y($,C)&&(Y(!0),W(q[0]))}let er=void 0!==$&&$.length===q.length&&$.every(e=>e.places.length===b.participants),eo=void 0===g||"init"===g,es=eo||"submitting"===g,ed=V&&(null==F?void 0:F.some(e=>(z||e.flightType===(null==U?void 0:U.type))&&e.places.some(e=>e.some(e=>e.recommended&&e.available&&!e.reserved))))&&(null==O?void 0:null===(t=O.recommended_seats_notice)||void 0===t?void 0:t.trim())?(0,m.jsx)("p",{className:"mb-0 rounded-md bg-[#f3cb47] px-3 py-2 text-sm font-bold text-blue max-xl:w-fit max-xl:py-1 max-xl:leading-4","data-testid":"recommended-seats-notice","data-component":"SeatMaps",children:null==O?void 0:O.re
1commended_seats_notice}):null;return(0,m.jsxs)("div",{className:D?"relative flex min-h-0 grow flex-col overflow-auto overscroll-contain pb-56 md:overflow-visible md:overscroll-auto xl:pb-0":"relative flex grow flex-col gap-y-2 overflow-auto overscroll-contain p-2.5 pb-44 lg:m-2.5 lg:overflow-visible lg:rounded-md lg:border lg:border-solid lg:border-gray-altoLight lg:px-5 lg:pt-2 xl:pb-2.5",children:[(0,m.jsx)("div",{className:D?"flex flex-col gap-y-2 xl:hidden":"flex flex-col gap-y-2 lg:hidden",children:(0,m.jsxs)(a0.O.Group,{as:k.Fragment,selectedIndex:Q,onChange:function(e){W(q[e])},children:[(0,m.jsx)(a0.O.List,{className:(0,ep.Z)("flex w-full",D&&"border-t-[3px] border-solid border-blue"),children:Object.values(H).map((e,t)=>{if("unavailable"===e.status)return(0,m.jsx)("div",{className:"grow appearance-none border-none bg-transparent p-0 outline-none",children:(0,m.jsx)(ir,{tabItem:e,disabled:!0,areSeatsTaken:X,oneWayOnlyLabel:L.planeSeatsReservation.oneWayOnly})},t);let a=t>0&&!function(e){let t=null==$?void 0:$.find(t=>{var a;return void 0!==t&&t.type===(null===(a=q[e])||void 0===a?void 0:a.type)});return void 0!==t&&t.places.length===b.participants}(t-1)&&q.length>1;return(0,m.jsx)(a0.O,{disabled:a,className:"grow appearance-none border-none bg-transparent p-0 outline-none",children:t=>{let{selected:i}=t;return(0,m.jsx)(ie,{variant:E,selected:i,disabled:a,tabItem:e,areSeatsTaken:X})}},t)})}),D&&ed&&(0,m.jsx)("div",{className:"px-3",children:ed}),(0,m.jsx)(a0.O.Panels,{children:Object.values(q).map((e,t)=>(0,m.jsx)(a0.O.Panel,{children:(0,m.jsx)(a9,{variant:E,showRecommended:V,participants:b.participants,infants:b.infants,flightType:e.type,flightClass:e.flightClassType,selectedSeats:$,labels:L.planeSeatsReservation,areSeatsTaken:X,seatMapData:null==F?void 0:F.find(t=>t.flightType===e.type)})},t))})]})}),(0,m.jsxs)("div",{className:D?"relative flex min-w-0":"relative flex gap-x-10",children:[(0,m.jsx)("div",{className:D?"hidden min-w-0 grow items-start xl:flex":"hidden shrink grow items-start gap-x-5 lg:flex",children:Object.values(q).map((e,t)=>{let a=null==F?void 0:F.find(t=>t.flightType===e.type),i=H.findIndex(t=>t.type===e.type),l=H[i-1],n=void 0!==l&&"unavailable"===l.status,r=H[i+1],o=void 0!==r&&"unavailable"===r.status;return(0,m.jsxs)("div",{className:D?"flex min-w-0 flex-1 flex-col border-solid border-gray-altoLight pb-3 last:border-r":"flex grow flex-col gap-y-2",children:[(0,m.jsxs)("div",{className:"flex w-full gap-x-2",children:[n&&(0,m.jsx)(ir,{tabItem:l,disabled:!1,areSeatsTaken:X,oneWayOnlyLabel:L.planeSeatsReservation.oneWayOnly}),(0,m.jsx)(ie,{variant:E,selected:!0,disabled:!1,tabItem:e,areSeatsTaken:X,isFlightTypeUnavailable:!1,oneWayOnlyLabel:L.planeSeatsReservation.oneWayOnly}),o&&(0,m.jsx)(ir,{tabItem:r,disabled:!1,areSeatsTaken:X,oneWayOnlyLabel:L.planeSeatsReservation.oneWayOnly})]}),(0,m.jsx)(a9,{className:(0,ep.Z)(D&&t<q.length-1&&"border-r border-solid border-gray-altoLight"),variant:E,showRecommended:V,participants:b.participants,infants:b.infants,flightType:e.type,flightClass:e.flightClassType,selectedSeats:$,labels:L.planeSeatsReservation,areSeatsTaken:X,seatMapData:a},t)]},t)})}),(0,m.jsxs)("div",{className:(0,ep.Z)("fixed bottom-0 left-0 right-0 flex flex-col gap-y-1 border-t border-solid border-gray-altoLight bg-white p-2.5 lg:gap-y-3 lg:px-5 lg:py-4 xl:sticky xl:bottom-auto xl:left-auto xl:right-auto xl:top-2.5 xl:self-start",D?"z-10 max-h-[70dvh] gap-y-4 overflow-y-auto lg:gap-y-4 xl:max-h-[calc(100dvh-20px)] xl:w-96 xl:shrink-0 xl:border-t-0 xl:px-2.5 xl:gap-y-2":"basis-96 xl:rounded-md xl:border"),"aria-busy":M&&es,children:[M&&eo&&(0,m.jsx)(R.Z,{isLoading:!0,noDelay:!0,testId:"plane-seat-map-panel-loading"}),(0,m.jsxs)("div",{className:"flex flex-col lg:gap-y-2",children:[(0,m.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-3",children:[(0,m.jsx)("div",{className:(0,ep.Z)("block xl:hidden",D&&"order-last",D&&0===J&&!er&&"hidden"),children:(J>0||D&&er)&&(0,m.jsx)(ia.Z,{isCheckout:!0,value:J,currencySymbol:j,currencyTextInfo:"razem"})}),(0,m.jsxs)("p",{className:(0,ep.Z)("mb-0 flex items-center gap-x-2 font-headings font-bold text-blue",D?"text-lg max-[400px]:text-base max-[400px]:gap-x-1 xl:relative xl:-top-0.5":"lg:text-2xl"),children:[null!==(i=null==O?void 0:O.cta_title)&&void 0!==i?i:"Wybierz miejsca już teraz!",(0,m.jsx)("button",{className:(0,ep.Z)("flex size-6 appearance-none items-center justify-center border-none bg-transparent p-0 outline-none xl:hidden",D&&"max-[400px]:size-5"),type:"button",onClick:()=>G(e=>!e),"aria-label":null!==(l=null==O?void 0:O.cta_title)&&void 0!==l?l:"Wybierz miejsca już teraz!",children:(0,m.jsx)(ii.Z,{className:(0,ep.Z)("size-5 fill-blue",D&&"max-[400px]:size-4",{"rotate-180 transform":K})})})]})]}),D&&ed&&(0,m.jsx)("div",{className:"hidden xl:block",children:ed}),!D&&void 0!==b.description&&b.description.length>0&&(0,m.jsx)("p",{className:(0,ep.Z)("mb-0 leading-tight",{"hidden xl:block":!K}),children:b.description})]}),void 0!==b.options&&b.options.length>0&&(0,m.jsxs)("div",{className:(0,ep.Z)({"hidden xl:block":!K}),children:[(0,m.jsx)("p",{className:(0,ep.Z)("mb-0 text-blue lg:text-xl",D&&"hidden"),children:null!==(n=null==O?void 0:O.cta_benefits_heading)&&void 0!==n?n:"Dlaczego warto wybrać miejsca?"}
1),(0,m.jsx)(eT.Z,{customClassNames:(0,ep.Z)(!D&&"gap-y-0 lg:gap-y-1 mb-1",D&&"mb-0 gap-y-1 text-black"),children:b.options.map((e,t)=>(0,m.jsx)(eP.Z,{customClassNames:(0,ep.Z)(D&&"leading-5"),customContentClassNames:(0,ep.Z)(D&&"leading-5"),iconType:"checkmark",iconSize:"16px",iconColor:D?"#30b675":"#aad700",asHtml:!0,children:e},t))})]}),D&&(0,m.jsxs)("div",{className:(0,ep.Z)("flex flex-wrap gap-3 max-xl:order-3 max-xl:justify-between xl:mt-1 xl:flex-col",K&&A&&"max-xl:-mt-2"),"data-testid":"plane-seat-passengers",children:[(0,m.jsx)("p",{className:(0,ep.Z)("mb-0 w-full text-sm text-black",!K&&"hidden xl:block"),children:null==O?void 0:O.participants_required}),q.map(e=>{var t,a;let i=null!==(a=null==$?void 0:null===(t=$.find(t=>t.type===e.type))||void 0===t?void 0:t.places)&&void 0!==a?a:[];return(0,m.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:["DEPARTURE"===e.type&&(0,m.jsx)(tw.default,{className:"hidden size-4 shrink-0 fill-blue xl:block","aria-hidden":!0}),"RETURN"===e.type&&(0,m.jsx)(tj.Z,{className:"hidden size-4 shrink-0 fill-blue xl:block","aria-hidden":!0}),(0,m.jsxs)("span",{className:"text-sm font-bold text-blue",children:["DEPARTURE"===e.type?L.planeSeatsReservation.departureTabLabel:L.planeSeatsReservation.returnTabLabel,":"]}),Array.from({length:b.participants+b.infants},(e,t)=>{var a,l;return(0,m.jsx)(a1.Z,{className:"!m-0 max-xl:!size-6 max-xl:!text-sm",readOnly:!0,status:t>=b.participants?"infant":i[t]?"selected":"unselected",label:null!==(l=null===(a=i[t])||void 0===a?void 0:a.replace(/\s/g,""))&&void 0!==l?l:String(t+1)},t)}),b.infants>0&&(0,m.jsx)(e8.Z,{type:"tooltip",tooltipVariant:aT.uY.slim,content:L.planeSeatsReservation.infantSeatDisclaimer})]},e.type)})]}),D&&0===J&&!er&&(0,m.jsx)("p",{className:"mb-0 hidden text-center text-sm text-gray xl:block",children:null!==(r=null==O?void 0:O.cta_submit_disclaimer)&&void 0!==r?r:"wybierz miejsca, aby wyświetlić cenę"}),(J>0||D&&er)&&(0,m.jsx)("div",{className:"hidden text-center xl:block",children:(0,m.jsx)(ia.Z,{isCheckout:!0,value:J,currencySymbol:j,currencyTextInfo:null!==(o=null==O?void 0:O.total_price_label)&&void 0!==o?o:"razem"})}),A&&(0,m.jsxs)("span",{className:(0,ep.Z)("leading-snug xl:hidden",!D&&"mb-2 text-xs",D&&"order-2 gap-1 rounded-md bg-blue-ice p-2 text-sm",D&&K&&"flex",!K&&"hidden"),children:[D&&(0,m.jsx)(il.Z,{className:"mt-0.5 size-4 shrink-0 fill-blue","aria-hidden":!0}),(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:A}})]}),(0,m.jsxs)("div",{className:(0,ep.Z)("flex flex-wrap justify-between gap-4 xl:flex-col",!D&&"xl:gap-8",D&&"max-xl:order-4 xl:gap-3 max-xl:[&>button]:whitespace-nowrap",D&&"[&>.button--disabled]:!bg-blue-disabled",D&&"max-[400px]:[&>button]:px-2 max-[400px]:[&>button]:text-sm"),children:[(0,m.jsx)(P.ZP,{className:(0,ep.Z)("order-1 w-auto min-w-fit grow basis-[calc(50%-8px)] xl:order-3 xl:basis-auto",D&&"disabled:!border-blue-disabled disabled:!text-blue-disabled",{"cursor-not-allowed":es}),isLoading:!M&&eo,disabled:es,variant:D?"outlinedBlue":es?"disabled":"primary",onClick:x,"data-testid":"plane-seat-map-resign-button",children:D?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"xl:hidden",children:null!==(d=null!==(s=null==O?void 0:O.cta_cancel_mobile)&&void 0!==s?s:null==O?void 0:O.cta_cancel_alt)&&void 0!==d?d:"Kontynuuj bez wyboru miejsc"}),(0,m.jsx)("span",{className:"hidden xl:inline",children:null!==(c=null==O?void 0:O.cta_cancel_alt)&&void 0!==c?c:"Kontynuuj bez wyboru miejsc"})]}):null!==(u=null==O?void 0:O.cta_cancel)&&void 0!==u?u:"Nie, dziękuję"}),(0,m.jsx)(P.ZP,{className:(0,ep.Z)("order-2 w-auto min-w-fit grow basis-[calc(50%-8px)] xl:hidden",{hidden:er,"cursor-not-allowed":!ea}),variant:ea&&!es?"primary":"disabled",disabled:!ea||es,onClick:function(){Q<q.length-1&&W(q[Q+1])},children:L.planeSeatsReservation.nextButtonLabel}),(0,m.jsx)(P.ZP,{className:(0,ep.Z)("order-3 w-auto min-w-fit grow basis-[calc(50%-8px)] focus-visible:!outline focus-visible:!outline-2 focus-visible:!outline-offset-2 focus-visible:!outline-blue xl:order-1 xl:basis-auto",{"hidden xl:flex":!er||"init"===g,"cursor-not-allowed":!er||"init"===g}),variant:er&&!es?"primary":"disabled",disabled:es,"aria-disabled":!er||es,isLoading:!M&&es,onClick:function(){!es&&((0,_.yf)({event:"componentClick",componentSource:"PZ",componentId:"seatmap_add_seats_button_".concat(er?"active":"inactive")}),er&&en())},"data-testid":"plane-seat-map-submit-button",children:null!==(p=null==O?void 0:O.cta_submit)&&void 0!==p?p:"Dodaj wybrane miejsca"})]}),A&&(0,m.jsxs)("span",{className:(0,ep.Z)("hidden text-xs leading-snug",!D&&"xl
1:block",D&&"gap-1 rounded-md bg-blue-ice p-2 xl:mt-1 xl:flex"),children:[D&&(0,m.jsx)(il.Z,{className:"mt-0.5 size-4 shrink-0 fill-blue","aria-hidden":!0}),(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:A}})]}),D&&(0,m.jsx)("div",{className:(0,ep.Z)("max-xl:order-1 xl:border-t xl:border-solid xl:border-gray-altoLight",!K&&"hidden xl:block"),children:(0,m.jsx)(a2,{variant:"modern",flightClass:null==U?void 0:U.flightClassType,labels:L.planeSeatsReservation.legendLabel,withEvacuation:null!==(h=null==F?void 0:F.some(e=>e.places.some(e=>e.some(e=>e.evacuation))))&&void 0!==h&&h})})]})]}),(0,m.jsx)(it.Z,{isOpen:w,selectedEvacuationSeats:ei,evacuationSeatsConfirmed:C,onConfirm:S,onSubmit:en,onReset:function(){el(),B((0,tP.NI)())},onClose:el})]})}var is=a(63873),id=a(26881);function ic(){var e,t,a,i,l,n,r;let[o,s]=(0,k.useState)(),[d,c]=(0,k.useState)(!1),u=(0,ev.Sn)(),{data:p,isValidating:h}=function(e){let{query:t}=(0,C.useRouter)(),a=(0,v.I0)(),i=(0,en.p)(),l=(0,ev.TA)();return(0,ed.ZP)(void 0!==t.offerCode?"".concat(T.config.urls.checkout.rmws.seatMap,"/").concat(t.offerCode):null,async e=>{var t;let a=await i(e,{noContentShouldThrow:!0});if(!l)return a;let n=await (0,aJ.FR)(["plane_seats"]);return Array.isArray(n.docs)&&0!==n.docs.length&&Array.isArray(null===(t=n.docs[0])||void 0===t?void 0:t.options)&&(a.options=n.docs[0].options.map(e=>e.option)),a},{onSuccess(e){let t=(0,tP.du)(e.seatMaps);a({type:ax.Ut,payload:t})},...e})}({onError(e){s("unavailable"),(null==e?void 0:e.status)===409&&u&&c(!0)}}),{data:f,mutate:g}=(0,J.ft)(),{data:x}=(0,b.jK)(),{data:j,isLoading:N}=(0,$.v)(null==x?void 0:null===(a=x._embedded)||void 0===a?void 0:null===(t=a.offer)||void 0===t?void 0:null===(e=t._links)||void 0===e?void 0:e.offerUrl.href),S=(0,b.QK)(),P=(0,I.En)(),Z=(0,v.v9)(et.SV),L=(0,v.v9)(et.o5),O=(0,w.PR)("cartId"),E=(0,J.zs)(),[D,z]=(0,k.useState)();(0,id.z)(),(0,k.useEffect)(()=>{(0,is.x)()},[]);let M=(0,I.z$)("RMWS_STEP"),V=(0,v.v9)(et.o5),A=void 0!==V,B=(0,v.I0)(),F=(0,b.Lo)(),{query:H}=(0,C.useRouter)(),q=null==H?void 0:H.offerCode,U=(0,k.useRef)(!1),W=null==f?void 0:null===(i=f._embedded)||void 0===i?void 0:i.guaranteeFund,K=(0,k.useRef)(!0),G=(0,k.useRef)(void 0),X=(0,em.xi)(),Y=(0,em.Rl)(),Q=null==V?void 0:V.find(e=>"PLANE_SEATS_RESERVATION"===e.type),ee=null==Q?void 0:null===(n=Q._embedded)||void 0===n?void 0:null===(l=n.upsellVariants)||void 0===l?void 0:l[0],ei=void 0!==ee;function el(e){return"".concat(null==e?void 0:e.airlineCode).concat(null==e?void 0:e.flightNumber)}async function er(){s("submitting"),void 0!==ee&&ee.selected&&await B((0,eN.kq)({upsellType:null==Q?void 0:Q.type,upsellGroupType:null==Q?void 0:Q.groupType,variantId:null==ee?void 0:ee.upsellId,isResignVariant:!0,roomIndex:null,clickSource:"popup",rmwsResignationAbTest:Y})),(0,_.yf)({event:"upsell_refused",upsell_refused:null==Q?void 0:Q.type,roomIndex:null}),s("cancelled")}async function eo(e,t){try{s("submitting");let n=await B((0,tP.mH)(e,t)),r=null==n?void 0:n.status;if("SUCCESS"===r){var a,i,l;let e=null==n?void 0:null===(a=n.updatedUpsells)||void 0===a?void 0:a.find(e=>"PLANE_SEATS_RESERVATION"===e.type),t=null==e?void 0:null===(l=e._embedded)||void 0===l?void 0:null===(i=l.upsellVariants)||void 0===i?void 0:i[0];return(0,ea.Dt)("add_to_cart",x,O,j,q,P,D,Z,(null==n?void 0:n.updatedUpsells)||L,null==E?void 0:E.formattedPrice,W,null==e?void 0:e.type,null==e?void 0:e.groupType,null==t?void 0:t.upsellId),s("submitted"),await g(),r}throw Error("Error submitting seats")}catch(e){return B((0,tP.NI)()),await B((0,tP.l4)()),s("available"),"ERROR"}}return((0,k.useEffect)(()=>{void 0!==(null==S?void 0:S.paymentChannels)&&void 0===D&&z(S)},[D,S]),(0,k.useEffect)(()=>{!U.current&&F&&x&&!N&&f&&E&&(U.current=!0,(0,ea.Dt)("add_to_cart",x,O,j,q,P,D,Z,L,null==E?void 0:E.formattedPrice,W))},[F,x,j,N,O,q,P,D,Z,L,null==E?void 0:E.formattedPrice,W,f,E]),(0,k.useEffect)(()=>{var e,t,a,i,l;let n=null==x?void 0:null===(l=x._embedded)||void 0===l?void 0:null===(i=l.upsellGroups)||void 0===i?void 0:null===(a=i.find(e=>"FACULTATIVE_TRIPS"===e.type))||void 0===a?void 0:null===(t=a._embedded)||void 0===t?void 0:null===(e=t.upsellVariants)||void 0===e?void 0:e.filter(e=>e.selected);if(n&&n.length>0&&K.current){K.current=!1,G.current=Z;return}if(U.current&&F&&x&&j&&f&&E){let e,t;let a=null==V?void 0:V.find(e=>"FACULTATIVE_TRIPS"===e.type),i=G.current||[],l=Z||[],n=new Set(i.map(e=>e.uuid)),r=new Set(l.map(e=>e.uuid)),o=l.find(e=>!n.has(e.uuid)),s=i.find(e=>!r.has(e.uuid));if(o)e="add_to_cart",t=[o];else{if(!s)return;e="remove_from_cart",t=[s]}(0,ea.Dt)(e,x,O,j,q,P,D,t,L,null==E?void 0:E.formattedPrice,W,null==a?void 0:a.type,null==a?void 0:a.groupType,void 0,!0),G.current=Z}}
1,[Z]),(0,k.useEffect)(()=>{if(d&&F){var e,t,a,i,l,n,r,o;let s=window.location.href,d=H.offerCode?H.offerCode:"",u=el(null==F?void 0:null===(i=F._embedded)||void 0===i?void 0:null===(a=i.departureFlight)||void 0===a?void 0:null===(t=a._embedded)||void 0===t?void 0:null===(e=t.flightSegments)||void 0===e?void 0:e[0]),p=el(null==F?void 0:null===(o=F._embedded)||void 0===o?void 0:null===(r=o.returnFlight)||void 0===r?void 0:null===(n=r._embedded)||void 0===n?void 0:null===(l=n.flightSegments)||void 0===l?void 0:l[0]),m={url:s,offerCode:d,reason:"RMWS upsell is available but seatmap is missing in Hybris configuration"};u&&p&&(m.flightNumbers="".concat(u," / ").concat(p)),(0,y.Tb)("RMWS seatmap configuration error",{extra:m}),c(!1)}},[c,F,H.offerCode]),(0,k.useEffect)(()=>{async function e(){try{if(s("init"),!ei||(null==ee?void 0:ee.status)==="notavailable"){s("unavailable");return}await B((0,eN.kq)({upsellType:null==Q?void 0:Q.type,upsellGroupType:null==Q?void 0:Q.groupType,variantId:null==ee?void 0:ee.upsellId,isResignVariant:!1,roomIndex:null,clickSource:"popup"})),await B((0,tP.l4)()),s("available")}catch(e){s("unavailable")}}void 0===o&&void 0!==f&&A&&e()},[A,o,B,ei,f,null==Q?void 0:Q.type,null==Q?void 0:Q.groupType,null==ee?void 0:ee.status,null==ee?void 0:ee.upsellId]),h)?(0,m.jsx)("div",{className:"col-12 relative mt-3 min-h-96 md:mt-1","data-component":"PlaneSeatsReservationStep",children:(0,m.jsx)(R.Z,{isLoading:!0})}):"unavailable"===o||"notApplicable"===o||"cancelled"===o||"submitted"===o||void 0===p||void 0===p.participants||void 0===p.infants||void 0===p.seatMaps?(0,m.jsx)(a$,{}):(0,m.jsxs)("div",{"data-testid":"plane-seat-map",className:(0,ep.Z)("fixed inset-0 z-10 mb-2.5 flex w-full flex-col border border-solid border-gray-altoLight bg-white md:relative md:z-auto md:min-h-96 md:rounded-md","A"!==X&&"md:mt-3.5 max-xl:border-0 max-xl:rounded-none md:max-xl:left-1/2 md:max-xl:w-screen md:max-xl:-ml-[50vw]"),children:[(0,m.jsx)("div",{className:(0,ep.Z)("border-b border-solid border-gray-altoLight font-headings text-lg font-bold text-blue","A"===X&&"p-2.5","A"!==X&&"flex h-10 shrink-0 items-center px-4"),children:null!==(r=null==M?void 0:M.heading)&&void 0!==r?r:"Wybierz swoje miejsca w samolocie"}),(0,m.jsx)(io,{liftingVariant:X,currentState:o,seatMapResources:p,currency:(0,eh.jK)(null==f?void 0:f.currency),onCancel:er,onSubmit:eo}),(0,m.jsx)(R.Z,{className:"md:items-start md:pt-32",isLoading:"submitting"===o})]})}var iu=a(74329),ip=a(76167),im=a(58926);function iv(){return(iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}var ih=function(e){return k.createElement("svg",iv({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 278.4 197.4"},e),n||(n=k.createElement("path",{fill:"#ffdf9e",stroke:"#ffdf9e",strokeMiterlimit:10,d:"M94.8 27.8c12.3-5.4 27.7-8.3 43-8.3a103.5 103.5 0 0 1 41.7 8.3 43 43 0 0 0-41.7 43 43 43 0 0 0-43-43z"})),r||(r=k.createElement("circle",{cx:93.5,cy:70.8,r:7,fill:"#ec2227"})),o||(o=k.createElement("circle",{cx:180.2,cy:70.7,r:7,fill:"#07a64f"})),s||(s=k.createElement("path",{fill:"#010101",d:"M94.6 49.9a21 21 0 1 0 20.9 20.9 21 21 0 0 0-21-21zm0 35.4A14.5 14.5 0 1 1 109 70.8a14.5 14.5 0 0 1-14.5 14.5zm130.1-56.9H196c-14.7-9.9-34.7-16-57.7-16s-44.5 6.1-59.1 16H51.5a40.2 40.2 0 0 1 8.6 17.2A43 43 0 0 0 128.5 98a108.5 108.5 0 0 1 9.7 13.5s6.2-9.2 9.6-13.5a43 43 0 0 0 68.3-52.4c.8-4.9 4.1-12 8.6-17.2M95.1 105.6a34.7 34.7 0 1 1 34.7-34.7A34.7 34.7 0 0 1 95 105.6zm0-77.8c12.4-5.4 27.7-8.3 43-8.3a103.5 103.5 0 0 1 41.8 8.3 43 43 0 0 0-41.8 43 43 43 0 0 0-43-43m86.2 77.8a34.7 34.7 0 1 1 34.6-34.7 34.7 34.7 0 0 1-34.6 34.7m0-55.8a21 21 0 1 0 20.9 20.9 21 21 0 0 0-21-21zm0 35.4a14.5 14.5 0 1 1 14.4-14.5 14.5 14.5 0 0 1-14.5 14.5z"})),d||(d=k.createElement("g",{fill:"#231f20"},k.createElement("path",{d:"M234.4 35.4H233v-5.8h2c1 0 2.3.2 2.3 1.7a1.4 1.4 0 0 1-1.2 1.5l1.4 2.6H236l-1.1-2.4h-.5zm0-3.3a3.6 3.6 0 0 0 1.1 0c.4-.2.5-.5.5-.8s-.2-.6-.4-.7a3.7 3.7 0 0 0-1.2 0z"}),k.createElement("path",{d:"M235.3 27.5a5.2 5.2 0 1 0 5.2 5.2 5.2 5.2 0 0 0-5.2-5.2m0 9.4a4.2 4.2 0 1 1 4.2-4.2 4.2 4.2 0 0 1-4.2 4.2"}
1))),c||(c=k.createElement("g",{fill:"#07a64f"},k.createElement("path",{d:"M270.1 154.7h-1.4v-5.8h2c1 0 2.4.1 2.4 1.7a1.4 1.4 0 0 1-1.2 1.5l1.3 2.5h-1.5l-1.2-2.3h-.4zm0-3.3a3.3 3.3 0 0 0 1.1 0c.4-.2.5-.5.5-.8s-.2-.6-.4-.7a4 4 0 0 0-1.2 0z"}),k.createElement("path",{d:"M271 146.8a5.2 5.2 0 1 0 5.2 5.2 5.2 5.2 0 0 0-5.2-5.2m0 9.4a4.2 4.2 0 1 1 4.2-4.2 4.2 4.2 0 0 1-4.2 4.2"}))),u||(u=k.createElement("path",{fill:"#231f20",d:"M20.1 153.8v-4.7h-7.7V142l-5.9 1.8v5.3H2v4.7h4.5v15.1c0 6.8 2.8 10.2 8.2 10.2a14.4 14.4 0 0 0 5-.8h.2l-.3-4.7h-.3a11.5 11.5 0 0 1-3 .4 3.3 3.3 0 0 1-3-1.2 7.3 7.3 0 0 1-.9-4.2v-14.8zm20.5-5.3a12 12 0 0 0-1.5 0 8.3 8.3 0 0 0-5.1 1.7 9.9 9.9 0 0 0-3 3.8l-.3-5h-5.4v.3l.2 9.1v20h6v-15.5a9.4 9.4 0 0 1 2.1-6.5 6.6 6.6 0 0 1 5-2.3 8.8 8.8 0 0 1 1.9.2h.3v-5.7zM46.1 149.1h6v29.4h-6zm2.9-4.8a3.7 3.7 0 0 0 3.9-3.8 3.6 3.6 0 0 0-1-2.6 3.7 3.7 0 0 0-2.8-1 3.8 3.8 0 0 0-2.7 1 3.6 3.6 0 0 0-1.1 2.7 3.7 3.7 0 0 0 1 2.6 3.6 3.6 0 0 0 2.8 1.1zM81.5 152.5a11.2 11.2 0 0 0-8.9-4.2 11.5 11.5 0 0 0-10 5l-.2-4.4h-5.5v.4l.2 9.5v31.6h6.1v-15a9.3 9.3 0 0 0 3.2 2.6 11.6 11.6 0 0 0 5.3 1.2 12.2 12.2 0 0 0 9.5-4.3 17 17 0 0 0 3.8-11.6 16.3 16.3 0 0 0-3.5-10.8M66.7 155a7.2 7.2 0 0 1 4.2-1.4 6.9 6.9 0 0 1 5.8 2.8 11.5 11.5 0 0 1 2.2 7.2 12.3 12.3 0 0 1-2.2 7.8 7.6 7.6 0 0 1-11.3.5 7.7 7.7 0 0 1-2.2-5.5v-4.7a10.2 10.2 0 0 1 .8-3.3 7.5 7.5 0 0 1 2.7-3.4"})),p||(p=k.createElement("path",{fill:"#07a64f",d:"M112 178.2a40 40 0 0 1-.5-7v-10.5c0-4-1-7-3-9.1s-4.8-3.2-8.6-3.2a18.6 18.6 0 0 0-10.1 2.7h-.2l1.5 4.2.2-.2a14.2 14.2 0 0 1 7.8-2.1 6.5 6.5 0 0 1 4.8 1.6 6.3 6.3 0 0 1 1.6 4.7v.3a26 26 0 0 0-13.2 2.8 9.1 9.1 0 0 0-4.7 8.2 8.2 8.2 0 0 0 2.6 6 9.3 9.3 0 0 0 6.7 2.5 11 11 0 0 0 9-4l.6 3.4h5.6zm-8.5-5.6a7.4 7.4 0 0 1-5.1 2 4.8 4.8 0 0 1-3.4-1.3 4.5 4.5 0 0 1-1.3-3.5 4.9 4.9 0 0 1 2.6-4.3c1.7-1.1 4.9-1.7 9.3-1.7v4.6a5.7 5.7 0 0 1-2 4.2zm39.1 6v-.4l-.2-7.6v-35.3h-6.1V152a9.7 9.7 0 0 0-3-2.4 11.4 11.4 0 0 0-5.4-1.2 11.9 11.9 0 0 0-9.3 4.5c-2.5 3-3.8 6.8-3.8 11.4a16.1 16.1 0 0 0 3.6 10.8 11.3 11.3 0 0 0 9 4.3 11.5 11.5 0 0 0 6-1.6 10.3 10.3 0 0 0 3.4-3.3l.3 4.2zm-6.3-17.4v4.6a8 8 0 0 1-2.3 6 7.1 7.1 0 0 1-5 2.2 6.8 6.8 0 0 1-6-2.8 12 12 0 0 1-2-7.3 12.1 12.1 0 0 1 2.2-7.6 7.3 7.3 0 0 1 11-.7 7.7 7.7 0 0 1 2.1 5.6m31.1-12.2s-7.6 15.5-8 17.2c-.8-2-8.3-17.1-8.3-17.1h-6.5l14.8 29.4 14.4-29.4zM176.8 149.1h6v29.4h-6zm3-4.8a3.7 3.7 0 0 0 3.8-3.8 3.6 3.6 0 0 0-1-2.6 3.7 3.7 0 0 0-2.8-1 3.8 3.8 0 0 0-2.7 1 3.6 3.6 0 0 0-1.1 2.7 3.7 3.7 0 0 0 1 2.6 3.6 3.6 0 0 0 2.8 1.1M206.6 164.8a14.9 14.9 0 0 0-6-3.6 13.8 13.8 0 0 1-4.5-2.2 3.2 3.2 0 0 1-1-2.4 3.3 3.3 0 0 1 1.2-2.6 5 5 0 0 1 3.3-1 12.2 12.2 0 0 1 6.1 1.7l.3.1 1.5-4.4-.2-.1a14.7 14.7 0 0 0-7.5-1.9 11.3 11.3 0 0 0-7.7 2.6 8.1 8.1 0 0 0-2.9 6.3c0 3.7 2.8 6.6 8.1 8.4a11.8 11.8 0 0 1 4.2 2.1 3.7 3.7 0 0 1 1 2.8 3.4 3.4 0 0 1-1.3 2.9 6.5 6.5 0 0 1-4 1 13.7 13.7 0 0 1-7.1-2l-.3-.2-1.5 4.7.2.1a17.8 17.8 0 0 0 8.6 2 13 13 0 0 0 8.3-2.4 8 8 0 0 0 3.1-6.6 7.7 7.7 0 0 0-1.9-5.3m29.6-12.2a13.2 13.2 0 0 0-10.1-4.2 13.9 13.9 0 0 0-10.4 4.3 15.7 15.7 0 0 0-4.1 11.3 15.3 15.3 0 0 0 4 10.9 13.4 13.4 0 0 0 10 4.2 14.6 14.6 0 0 0 7.4-1.9 13.2 13.2 0 0 0 5.2-5.5 17.5 17.5 0 0 0 1.9-8.2 15.4 15.4 0 0 0-3.9-10.9m-10.5 21.9a7.2 7.2 0 0 1-5.9-3 12.2 12.2 0 0 1-2.3-7.7 12.8 12.8 0 0 1 2.2-7.7 7.2 7.2 0 0 1 6.1-3 7 7 0 0 1 6 3 12.7 12.7 0 0 1 2.3 7.6 12.2 12.2 0 0 1-2.5 7.8 7.4 7.4 0 0 1-6 3zm34.7-26a12 12 0 0 0-1.6 0 8.3 8.3 0 0 0-5 1.7 10 10 0 0 0-3 3.8l-.3-5H245v.3c.2 2.4.2 5.4.2 9.2v19.9h6v-15.5a9.4 9.4 0 0 1 2.1-6.5 6.6 6.6 0 0 1 5-2.3 8.8 8.8 0 0 1 1.9.2h.3v-5.7z"})))};let ig={title:"Jeśli opuścisz tę stronę, <b>Twoje dane nie zostaną zapisane.",subtitle:"Dokończ i zagwarantuj swoją rezerwację już teraz!",remainingRoomsSubtitle:"Zarezerwuj, zanim zrobi to ktoś inny.",tripAdvisorTitle:"Wybrany przez Ciebie hotel został oceniony, jako",tripAdvisorBasedOnText:"na podstawie",tripAdvisorSubtitle:"wiarygodnych opinii Trip Advisor."};function ib(e){var t,a;let{items:i}=e,l=(0,I.z$)("INCENTIVE"),n=(0,I.En)();return(0,m.jsxs)("div",{className:"incentive","data-component":"Incentive",children:[(0,m.jsx)("span",{dangerouslySetInnerHTML:{__html:null!==(t=null==l?void 0:l["incentive.title"])&&void 0!==t?t:ig.title}}
1),(0,m.jsx)("br",{}),null!==(a=null==l?void 0:l["incentive.subtitle"])&&void 0!==a?a:ig.subtitle,(0,m.jsx)("ul",{className:"incentive__body",children:i.map(e=>{var t,a,i,r;let o=(0,ep.Z)("incentive__icon",{"incentive__icon--large":"tripAdvisor"===e.type}),s=()=>null;return"remainingRooms"===e.type?s=tu.Z:"tripAdvisor"===e.type&&(s=ih),(0,m.jsxs)("li",{className:"incentive__item",children:[(0,m.jsx)("div",{className:"incentive__icon-wrapper",children:(0,m.jsx)(s,{className:o})}),"remainingRooms"===e.type&&(0,m.jsxs)("div",{className:"incentive__item-content",children:[(0,m.jsx)("span",{className:"incentive__highlighted-negative",children:e.title}),(0,m.jsx)("br",{}),null!==(t=null==l?void 0:l["incentive.remainingRoomsSubtitle"])&&void 0!==t?t:ig.remainingRoomsSubtitle]}),"tripAdvisor"===e.type&&(0,m.jsxs)("div",{className:"incentive__item-content",children:[null!==(a=null==l?void 0:l["incentive.tripAdvisorTitle"])&&void 0!==a?a:ig.tripAdvisorTitle," ","number"==typeof e.tripAdvisorRating&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"incentive__highlighted-positive",children:(0,im.Z)(e.tripAdvisorRating,n)})," "]}),null!==(i=null==l?void 0:l["incentive.tripAdvisorBasedOnText"])&&void 0!==i?i:ig.tripAdvisorBasedOnText," ",(0,m.jsxs)("span",{className:"incentive__highlighted-positive",children:[e.tripAdvisorReviewsNumber," ",null!==(r=null==l?void 0:l["incentive.tripAdvisorSubtitle"])&&void 0!==r?r:ig.tripAdvisorSubtitle]})]})]},e.type)})})]})}function ix(){var e;let t=function(){var e,t,a,i;let l=(0,b.Lo)(),n=null==l?void 0:l.remainingRooms,r=null==l?void 0:null===(t=l._embedded)||void 0===t?void 0:null===(e=t.hotel)||void 0===e?void 0:e.tripAdvisorReviewsNumber,o=null==l?void 0:null===(i=l._embedded)||void 0===i?void 0:null===(a=i.hotel)||void 0===a?void 0:a.tripAdvisorRating,s=[];return n&&s.push({type:"remainingRooms",title:n}),r&&o&&s.push({type:"tripAdvisor",tripAdvisorRating:o,tripAdvisorReviewsNumber:r}),s}(),{isFormSubmitting:a}=(0,k.useContext)(q),[i,l]=(0,k.useState)(!1),[n,r]=(0,k.useState)(!1),o=(0,I.z$)("INCENTIVE");function s(){l(!1)}return((0,k.useEffect)(()=>{function e(e){!(t.length>0)||a||i||n||!(e.clientY<21)||(l(!0),r(!0),(0,_.yf)({event:"Checkoutleave"}))}return i||document.body.addEventListener("mousemove",e),()=>{document.body.removeEventListener("mousemove",e)}},[i,n,t.length,a]),o)?(0,m.jsx)(Z.Z,{isOpen:i,onClick:s,onClose:s,dialogTitle:null!==(e=null==o?void 0:o["incentive.dialogTitle"])&&void 0!==e?e:"Dokończ rezerwację, a wymarzony wyjazd będzie Tw\xf3j!",variant:L.od.withTitle,className:"incentive-wrapper",theme:L.ie.outline,children:(0,m.jsx)(ib,{items:t})}):null}var iy=a(8734),i_=a(19991),ij=a(85871);let iw={endDate:z().instanceOf(Date),buttonLabel:z().string,isSessionExpired:z().bool,onSubmit:z().func};function iN(e){let{isSessionExpired:t,buttonLabel:a,onClick:i,endDate:l}=e;return(0,m.jsxs)("div",{className:"session-alert",children:[!t&&(0,m.jsx)("div",{className:"session-alert__countdown-wrapper",children:(0,m.jsx)(i_.Z,{variant:ij.Id.digital,endDate:l,timeUnitLabelType:ij.Z$.short,timeUnitsToShow:[el.FW.minute,el.FW.second]})}),(0,m.jsx)(eS.ZP,{variant:eS.qh.primary,onClick:i,className:"session-alert__button",children:a})]})}iN.propTypes=iw,iN.defaultProps={endDate:null,buttonLabel:null,isSessionExpired:!1,onSubmit:()=>{}};let iC={backToCheckoutLabel:"Wr\xf3ć do zakup\xf3w",backToOfferLabel:"Powr\xf3t do oferty",refreshLabel:"Odśwież",titleExpiredSession:"Twoja sesja wygasła",title:"Twoja sesja wygaśnie za"};function ik(){var e,t,a,i,l;let n=(0,C.useRouter)(),[r,o]=(0,k.useState)(!1),[s,d]=(0,k.useState)(!1),[c,u]=(0,k.useState)(!1),[p,v]=(0,k.useState)(null),h=(0,k.useRef)(),f=(0,I.z$)("SESSION_ALERT"),g=(0,$.t)(),x=(0,b.VV)(),y=void 0!==g;function _(){if(s){if(y){window.location.href=g;return}n.reload();return}h.current&&(clearInterval(h.current),u(!0),o(!1))}void 0===x||p||v((0,el.sG)(x,el.Km)),(0,k.useEffect)(()=>{if(null!==p&&!c){let e=(0,iy._)(p,5);h.current=window.setInterval(()=>{let t=new Date,a=(0,ak.A)(t,e);(0,ak.A)(t,p)?(d(!0),o(!0),clearInterval(h.current)):a&&(d(!1),o(!0))},500)}return()=>{h.current&&clearInterval(h.current)}},[p,c]);let j=s?null!==(e=null==f?void 0:f["sessionAlert.title.expired"])&&void 0!==e?e:iC.titleExpiredSession:null!==(t=null==f?void 0:f["sessionAlert.title"])&&void 0!==t?t:iC.title,w=null!==(a=null==f?void 0:f["sessionAlert.backToCheckout"])&&void 0!==a?a:iC.backToCheckoutLabel;return s&&(w=y?null!==(i=null==f?void 0:f["sessionAlert.backToOffer"])&&void 0!==i?i:iC.backToOfferLabel:null!==(l=null==f?void 0:f["sessionAlert.refresh"])&&void 0!==l?l:iC.refreshLabel),(0,m.jsx)(Z.Z,{isOpen:r,onClick:_,onClose:_,dialogTitle:j,variant:L.od.withTitle,className:"session-alert-wrapper",endDate:s?void 0:p,theme:s?L.ie.red:L.ie.orange,children:(0,m.jsx)(iN,{isSessionExpired:s,onClick:_,endDate:p,buttonLabel:w})})}var iS=a(86389),iT=!0;function iP(e){let{initialPageData:t,dictionary:a,featureFlags:i,header:l}=e,n=(0,v.v9)(aQ),r=null==n?void 0:n.CheckoutHeader;return(0,m.jsx)(iu.Z,{children:(0,m.jsx)(ip.Z,{initialPageData:t,fallback:{"cms-dictionary":a,"feature-flags":i,header:l},children:(0,m.jsx)(eu,{"data-component":"[pageType]",children:(0,m.jsxs)(iS.Z,{header:r,children:[(0,m.jsx)("div",{className:"container",children:(0,m.jsx)("div",{className:"row",children:(0,m.jsx)(ic,{})})}),(0,m.jsx)(ix,{}),(0,m.jsx)(ik,{}),(0,m.jsx)(x,{})]})})})})}},20678:function(e,t,a){"use strict";a.d(t,{y:function(){return l}});var i=a(44194);function l(e){(0,i.useEffect)(()=>
1{if(e){let e=window.location.hash;if(""!==e){let t=document.querySelector(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),window.history.replaceState(null,"",window.location.pathname+window.location.search))}}},[e])}},50259:function(e){e.exports={button:"CarouselNavigationButton_button__JD3jx",previous:"CarouselNavigationButton_previous__bYxHX",next:"CarouselNavigationButton_next__PJKBz",floating:"CarouselNavigationButton_floating__6O9Ch"}},51346:function(e){e.exports={wrapper:"FacultativeTripItem_wrapper__wwgWF",photo:"FacultativeTripItem_photo__Wd7zK",body:"FacultativeTripItem_body__nFGsh",titleWrapper:"FacultativeTripItem_titleWrapper__ufHoB",title:"FacultativeTripItem_title__kx1xl",selectedIcon:"FacultativeTripItem_selectedIcon__pKzgc",showDetailsButton:"FacultativeTripItem_showDetailsButton__E2LXf",container:"FacultativeTripItem_container___3DYZ",price:"FacultativeTripItem_price__QmMEK",actionButton:"FacultativeTripItem_actionButton__VdStH",wrapperSelected:"FacultativeTripItem_wrapperSelected___p95G",wrapperOrdered:"FacultativeTripItem_wrapperOrdered__t9wmS",wrapperWithWidthConstraint:"FacultativeTripItem_wrapperWithWidthConstraint__fyHYx"}},33120:function(e){e.exports={wrapper:"FacultativeTripsCarousel_wrapper__LVMn0",description:"FacultativeTripsCarousel_description__rqFKw",carouselWrapper:"FacultativeTripsCarousel_carouselWrapper__WPsj5",inlineButtons:"FacultativeTripsCarousel_inlineButtons__EQaCC",carousel:"FacultativeTripsCarousel_carousel___Js5l",carouselItem:"FacultativeTripsCarousel_carouselItem__nqPjT",navigationButton:"FacultativeTripsCarousel_navigationButton__v2_q_",navigationButtonIcon:"FacultativeTripsCarousel_navigationButtonIcon__SjI_D",navigationButtonFloating:"FacultativeTripsCarousel_navigationButtonFloating__PTIMI",navigationButtonPrev:"FacultativeTripsCarousel_navigationButtonPrev__kEeZg",navigationButtonNext:"FacultativeTripsCarousel_navigationButtonNext__7J5Bk",indicators:"FacultativeTripsCarousel_indicators__oJ4Wo",dialog:"FacultativeTripsCarousel_dialog__OmbK2",dialogLoadingIconWrapper:"FacultativeTripsCarousel_dialogLoadingIconWrapper__Qd7gq",dialogLoadingIcon:"FacultativeTripsCarousel_dialogLoadingIcon__YRE_w",paginationContainer:"FacultativeTripsCarousel_paginationContainer__ZAz65"}},5206:function(e){e.exports={wrapper:"PlaneSeatCell_wrapper__db7zX",available:"PlaneSeatCell_available__2bhEJ",readOnly:"PlaneSeatCell_readOnly__4OH2e",economy:"PlaneSeatCell_economy__19yBz",business:"PlaneSeatCell_business__A6BI7",evacuation:"PlaneSeatCell_evacuation__9Ce36",selected:"PlaneSeatCell_selected__V_nx5",unselected:"PlaneSeatCell_unselected__0hvgS",corridor:"PlaneSeatCell_corridor__aJo2r",taken:"PlaneSeatCell_taken__R30Om",infant:"PlaneSeatCell_infant__abBQy",occupied:"PlaneSeatCell_occupied__EY5Cs",modern:"PlaneSeatCell_modern__duz04",recommended:"PlaneSeatCell_recommended__tw7PE",xlRibbon:"PlaneSeatCell_xlRibbon__KNIoM",seatSurface:"PlaneSeatCell_seatSurface__QK3tk"}},51687:function(e){e.exports={wrapper:"PlaneSeatsMap_wrapper__KT092",row:"PlaneSeatsMap_row__h0iIg",seats:"PlaneSeatsMap_seats__7DGm9",modern:"PlaneSeatsMap_modern__dc1BG",columnLabel:"PlaneSeatsMap_columnLabel__02J53",compactSeat:"PlaneSeatsMap_compactSeat__tchtn",compactRow:"PlaneSeatsMap_compactRow___rxo5",xlRow:"PlaneSeatsMap_xlRow__lQ_x9",exits:"PlaneSeatsMap_exits__2xf4m",compactCorridor:"PlaneSeatsMap_compactCorridor__LEkvm"}},26254:function(e){e.exports={wrapper:"ReservationUpsellsContainer_wrapper__GNaCG",paymentSuccess:"ReservationUpsellsContainer_paymentSuccess__wLO1T",navigationButton:"ReservationUpsellsContainer_navigationButton__t1jQV"}}},function(e){e.O(0,[50895,85772,99239,62716,45749,1552,34971,53907,4978,50062,58563,97044,17314,3806,30054,38938,33659,88440,11783,77696,90872,29233,27422,20626,61522,23071,13715,68153,70662,92888,49774,40179],function(){return e(e.s=32970)}),_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.