1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[8761],{2546:function(e,t,o){o.r(t),o.d(t,{default:function(){return b}});var n=o(6540),i=o(5338),a=o(1145),r=o(4848);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function s(e,t,o){return t=m(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,o||[],m(e).constructor):t.apply(e,o))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var b=function(e){function t(e){var o,n,a,c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=s(this,t,[e]),n=o,c=void 0,(a=f(a="lastFocusedElement"))in n?Object.defineProperty(n,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):n[a]=c,document.querySelectorAll(".cmp-booking-payment-confirmation").forEach(function(e){e.hasAttribute("data-react-initialized")||(e.setAttribute("data-react-initialized","true"),(0,i.createRoot)(e).render((0,r.jsx)(t,{})))}),o.state={automationId:"",bookingPaymentConfirmationMessageDetails:{}},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),o=t,c=[{key:"componentDidMount",value:function(){var e,t,o,n="",i={};document.querySelector(".cmp-booking-payment-confirmation")&&(n=null===(t=document.querySelector(".cmp-booking-payment-confirmation"))||void 0===t?void 0:t.getAttribute("data-automation-id"),i=null===(o=document.querySelector(".cmp-booking-payment-confirmation"))||void 0===o?void 0:o.getAttribute("data-booking-payment-confirmation-message-details")),this.setState({automationId:n,bookingPaymentConfirmationMessageDetails:(null===(e=this.props)||void 0===e?void 0:e.bookingPaymentConfirmationMessageDetails)||i}),this.showBookingPaymentConfirmationModal()}},{key:"componentDidUpdate",value:function(e){var t,o;e.automationId!==this.props.automationId&&this.setState({automationId:null===(t=this.props)||void 0===t?void 0:t.automationId}),e.bookingPaymentConfirmationMessageDetails!==this.props.bookingPaymentConfirmationMessageDetails&&this.setState({bookingPaymentConfirmationMessageDetails:null===(o=this.props)||void 0===o?void 0:o.bookingPaymentConfirmationMessageDetails}),this.showBookingPaymentConfirmationModal()}},{key:"showBookingPaymentConfirmationModal",value:function(){var e=this;this.lastFocusedElement=document.activeElement,this.removeModal();var t=document.getElementById("bookingPaymentConfirmationModal"),o=Math.max(document.body.scrollHeight,document.body.offsetHeight,window.innerHeight,window.outerHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight);t.style.height="".concat(o,"px"),t.classList.add("cmp-booking-payment-confirmation-modal--visible"),t.addEventListener("keydown",function(o){if
1(o.keyCode===a.escapeKeyCode)e.removeModal(),e.lastFocusedElement.focus();else if(o.keyCode===a.tabKeyCode){var n=t.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [tabindex="-1"], [contenteditable]'),i=n[0],r=n[n.length-1];o.shiftKey&&document.activeElement===i?(o.preventDefault(),r.focus()):o.shiftKey||document.activeElement!==r||(o.preventDefault(),i.focus())}});var n=t.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [tabindex="-1"], [contenteditable]'),i=(n=Array.prototype.slice.call(n))[0],r=n[n.length-1];i.focus(),t.addEventListener("keydown",function(t){t.keyCode===a.tabKeyCode&&(t.shiftKey?document.activeElement===i&&(t.preventDefault(),r.focus()):document.activeElement===r&&(t.preventDefault(),i.focus())),t.keyCode===a.escapeKeyCode&&(e.props.handleSucessModal(),e.removeModal())})}},{key:"removeModal",value:function(){var e,t="cmp-booking-payment-confirmation-modal--visible";document.querySelector("."+t)&&(null===(e=document.querySelector("."+t))||void 0===e||null===(e=e.classList)||void 0===e||e.remove(t)),this.lastFocusedElement&&this.lastFocusedElement.focus()}},{key:"onConfirmBtnClick",value:function(){this.props.handleSucessModal(),this.removeModal()}},{key:"render",value:function(){var e=this;return(0,r.jsx)(n.Fragment,{children:(0,r.jsx)("div",{className:"cmp-booking-payment-confirmation-modal",id:"bookingPaymentConfirmationModal",tabIndex:"-1",role:"dialog",onClick:function(){return e.removeModal()},"aria-label":this.state.bookingPaymentConfirmationMessageDetails.modalLabel,children:(0,r.jsxs)("div",{className:"cmp-booking-payment-confirmation-modal--content text-center",children:[(0,r.jsx)("div",{className:"tick-circle"}),(0,r.jsx)("div",{className:"title",children:(0,r.jsx)("div",{className:"cmp-title",children:(0,r.jsx)("h3",{className:"cmp-title__text text-center",children:this.state.bookingPaymentConfirmationMessageDetails.title})})}),(0,r.jsx)("div",{className:"text",children:(0,r.jsx)("div",{className:"cmp-text text-center",children:(0,r.jsx)("p",{children:this.state.bookingPaymentConfirmationMessageDetails.description})})}),(0,r.jsx)("div",{className:"button cmp-button--primary",children:(0,r.jsx)("a",{href:"#",className:"cmp-button","aria-label":this.state.bookingPaymentConfirmationMessageDetails.arialabel,onClick:function(){return e.onConfirmBtnClick()},"aria-disabled":"false","data-component":"button-component","data-automation-id":this.state.automationId+"-confirm-button",children:(0,r.jsx)("span",{className:"cmp-button__text",children:this.state.bookingPaymentConfirmationMessageDetails.ctalabel})})})]})})})}}],c&&l(o.prototype,c),u&&l(o,u),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,c,u}(n.Component)}}]);
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.