{"version":3,"names":[],"mappings":"","sources":["bundle-help.js"],"sourcesContent":["(()=>{var B=Object.create;var I=Object.defineProperty,N=Object.defineProperties,P=Object.getOwnPropertyDescriptor,z=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertyNames,C=Object.getOwnPropertySymbols,_=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var S=(i,e,t)=>e in i?I(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,D=(i,e)=>{for(var t in e||(e={}))M.call(e,t)&&S(i,t,e[t]);if(C)for(var t of C(e))V.call(e,t)&&S(i,t,e[t]);return i},q=(i,e)=>N(i,z(e));var Z=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var J=(i,e,t,n)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let r of U(e))!M.call(i,r)&&r!==t&&I(i,r,{get:()=>e[r],enumerable:!(n=P(e,r))||n.enumerable});return i};var H=(i,e,t)=>(t=i!=null?B(_(i)):{},J(e||!i||!i.__esModule?I(t,\"default\",{value:i,enumerable:!0}):t,i));var j=(i,e,t)=>new Promise((n,r)=>{var s=u=>{try{l(t.next(u))}catch(a){r(a)}},o=u=>{try{l(t.throw(u))}catch(a){r(a)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);l((t=t.apply(i,e)).next())});var k=Z((x,F)=>{(function(i){\"use strict\";var e=function(){},t=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||function(a){return setTimeout(a,16)};function n(){var a=this;a.reads=[],a.writes=[],a.raf=t.bind(i),e(\"initialized\",a)}n.prototype={constructor:n,runTasks:function(a){e(\"run tasks\");for(var p;p=a.shift();)p()},measure:function(a,p){e(\"measure\");var h=p?a.bind(p):a;return this.reads.push(h),r(this),h},mutate:function(a,p){e(\"mutate\");var h=p?a.bind(p):a;return this.writes.push(h),r(this),h},clear:function(a){return e(\"clear\",a),o(this.reads,a)||o(this.writes,a)},extend:function(a){if(e(\"extend\",a),typeof a!=\"object\")throw new Error(\"expected object\");var p=Object.create(this);return l(p,a),p.fastdom=this,p.initialize&&p.initialize(),p},catch:null};function r(a){a.scheduled||(a.scheduled=!0,a.raf(s.bind(null,a)),e(\"flush scheduled\"))}function s(a){e(\"flush\");var p=a.writes,h=a.reads,v;try{e(\"flushing reads\",h.length),a.runTasks(h),e(\"flushing writes\",p.length),a.runTasks(p)}catch(O){v=O}if(a.scheduled=!1,(h.length||p.length)&&r(a),v)if(e(\"task errored\",v.message),a.catch)a.catch(v);else throw v}function o(a,p){var h=a.indexOf(p);return!!~h&&!!a.splice(h,1)}function l(a,p){for(var h in p)p.hasOwnProperty(h)&&(a[h]=p[h])}var u=i.fastdom=i.fastdom||new n;typeof define==\"function\"?define(function(){return u}):typeof F==\"object\"&&(F.exports=u)})(typeof window!=\"undefined\"?window:typeof x!=\"undefined\"?x:globalThis)});var f=class{static trackException(e){d.deferTask(()=>{typeof appInsights!=\"undefined\"&&appInsights.trackException(e)})}static trackEvent(e,t){d.deferTask(()=>{typeof appInsights!=\"undefined\"&&appInsights.trackEvent(e,t)})}};window.Logger=f;var E=H(k());var d=class i{constructor(){this.detectTouch(),this.detectKeyboard()}detectTouch(){window.addEventListener(\"touchstart\",e=>{document.getElementsByTagName(\"html\")[0].classList.add(\"user-has-touched\")})}static isTouch(){return document.documentElement.classList.contains(\"touch\")}detectKeyboard(){let e=document.getElementsByTagName(\"html\")[0],t=\"using-keyboard\";document.addEventListener(\"keydown\",()=>{E.default.mutate(()=>{e.classList.add(t)})}),document.addEventListener(\"mousedown\",()=>{E.default.mutate(()=>{e.classList.remove(t)})}),document.addEventListener(\"touchstart\",()=>{E.default.mutate(()=>{e.classList.remove(t)})})}static isUsingKeyboard(){return document.getElementsByTagName(\"html\")[0].classList.contains(\"using-keyboard\")}static hasUserTouched(){return document.getElementsByTagName(\"html\")[0].classList.contains(\"user-has-touched\")}static createEventForDispatch(e){let t;return typeof Event==\"function\"?t=new Event(e):(t=document.createEvent(\"Event\"),t.initEvent(e,!0,!0)),t}static createCustomEventForDispatch(e,t={}){let n;return window.CustomEvent&&typeof window.CustomEvent==\"function\"?n=new CustomEvent(e,{detail:t}):(n=document.createEvent(\"CustomEvent\"),n.initCustomEvent(e,!0,!0,t)),n}static getOffset(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}static debounce(e,t){let n=null;t=t||300;let r=function(){let s=this,o=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(s,o)},t)};return r.cancel=function(){clearTimeout(n)},r}static getKeypressed(e){let t=e.key;if(t!==void 0)return t;let n=e.keyCode;if(n!==void 0)return n}static hash(e){let t=0;if(e.length)for(let n=0;n{o+=s;let u=i.easeInOutQuad(o,n,r,t);window.scrollTo(0,u),ot(),r.onerror=()=>n(),r.src=e,r.style.opacity=\"0.0001\",r.style.position=\"fixed\",r.style.pointerEvents=\"none\",r.style.top=\"0px\",r.style.left=navigator.userAgent.toLowerCase().indexOf(\"firefox\")>-1?\"0px\":\"calc(100% - 1px)\",r.style.zIndex=\"100\",document.body.appendChild(r);var s='';document.getElementsByTagName(\"head\")[0].insertAdjacentHTML(\"beforeend\",s)}})}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static fadeOut(e,t){e.style.opacity=1,function n(){(e.style.opacity-=.1)<0?(e.style.display=\"none\",t()):requestAnimationFrame(n)}()}static fadeIn(e,t=\"block\",n){e.style.opacity=0,e.style.display=t||\"block\",function r(){var s=parseFloat(e.style.opacity);(s+=.1)>1?n():(e.style.opacity=s,requestAnimationFrame(r))}()}static pagination(e,t,n){let r=Math.ceil(e/t);return{currentPage:Math.ceil(n/t+1),totalPages:r}}static truncateText(e,t,n=\"...\"){let r=e.trim();if(e.length>r.length){let s=e.substr(0,t);s=s.substr(0,Math.min(s.length,s.lastIndexOf(\" \"))),r=s+n}return r}static isHidden(e){return e?e.offsetParent===null:!0}static getBrowser(){var e=navigator.userAgent,t,n=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i)||[];return/trident/i.test(n[1])?(t=/\\brv[ :]+(\\d+)/g.exec(e)||[],{name:\"IE\",version:t[1]||\"\"}):n[1]===\"Chrome\"&&(t=e.match(/\\bOPR|Edge\\/(\\d+)/),t!=null)?{name:\"Opera\",version:t[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,\"-?\"],(t=e.match(/version\\/(\\d+)/i))!=null&&n.splice(1,1,t[1]),{name:n[0],version:n[1]})}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isWholeElementInViewport(e){let t=e.offsetTop,n=e.offsetLeft,r=e.offsetWidth,s=e.offsetHeight;for(;e.offsetParent;)e=e.offsetParent,t+=e.offsetTop,n+=e.offsetLeft;return t>=window.pageYOffset&&n>=window.pageXOffset&&t+s<=window.pageYOffset+window.innerHeight&&n+r<=window.pageXOffset+window.innerWidth}static clamp(e,t,n){return e>n?n:e/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\")}static getPageTemplate(){let e=document.body.getAttribute(\"data-page-template\");return e||null}static fetchWithTimeout(r){return j(this,arguments,function*(e,t={},n=5e3){let s=new AbortController,{signal:o}=s,l=fetch(e,q(D({},t),{signal:o})),u=setTimeout(()=>s.abort(),n);try{let a=yield l;return clearTimeout(u),a}catch(a){throw clearTimeout(u),a}})}static objectsAreTheSame(e,t){try{return JSON.stringify(e)===JSON.stringify(t)}catch(n){return f.trackException(n),!1}}static deferTask(e,t=250){requestIdleCallback(()=>{e()},{timeout:t})}static getElementIndex(e){return!e||!e.parentNode?-1:Array.prototype.slice.call(e.parentNode.children).indexOf(e)}static roundToTwoDecimals(e){return Math.round((e+Number.EPSILON)*100)/100}static searchDataLayer(e){for(let t=0;t{c.html.addClass(i?\"touch\":\"no-touch\")})},preInit:function(){c.detectTouch(),c.standalone(),c.userNav(),c.detectNoHover(),c.detectDefaultFontSize(),c.detectInteractionMediaQuerySupport(),c.detectGridSupport(),c.instantPageLinks(),c.openLiveChat(),c.disableFooterNewsletterInput(),c.init()},init:function(){c.smoothScroll(),c.forms.init(),c.cms.init()},debugFontWeight:function(){for(var i=document.querySelectorAll(\"*\"),e=0;e{$(this).addClass(t)})},function(){!c.modernizrIsTouch()&&window.matchMedia(n).matches&&m.default.mutate(()=>{$(this).removeClass(t)})}),e.find(\"a\").on(\"click\",function(){var r=$(this).parent();if(c.modernizrIsTouch()&&window.matchMedia(n).matches)return m.default.mutate(()=>{r.toggleClass(t)}),!1}),$(window).on(\"resize\",function(){m.default.mutate(()=>{e.removeClass(t)})}))},smoothScroll:function(){$('a[href*=\"#\"]:not(.scrollDone):not(.js-tooltip-trigger):not(.js-ignore-scroll):not(.js-print):not(.js-skip-link)').each(function(){var i=$(this);i.on(\"click\",function(){if(location.pathname.replace(/^\\//,\"\")==this.pathname.replace(/^\\//,\"\")&&location.hostname==this.hostname){var e=$(this.hash);if(e=e.length<=1&&e||$(\"[name=\"+this.hash.slice(1)+\"]\"),e.length){var t=e.offset().top;return $(window).scrollTop!=t&&$(\"html, body\").animate({scrollTop:t},c.transitionSpeed*2),!1}}}),i.addClass(\"scrollDone\")})},forms:{init:function(){c.forms.adapters(),c.forms.disabled(),c.forms.submit(),c.forms.autocomplete.init(),c.forms.maxlength(),c.forms.rating(),c.forms.showIf(),c.forms.captcha(),c.forms.scrollToFormMessages()},adapters:function(){$.validator.unobtrusive.adapters.addBool(\"mandatory\",\"required\"),$.validator.addMethod(\"filesize\",function(i,e,t){for(var n=parseInt(e.getAttribute(\"data-max-upload-size\")),r=!0,s=0,o=0;on&&(r=!1),this.optional(e)||r},function(i,e){var t=parseInt(e.getAttribute(\"data-max-upload-size\")),n=(t/(1024*1024)).toFixed(2);return\"Total file size must be less than \"+n+\"MB\"}),$.validator.unobtrusive.adapters.add(\"requiredif\",[\"dependentproperty\",\"dependentvalue\",\"pattern\"],function(i){i.rules.requiredif=i.params,i.message&&(i.messages.requiredif=i.message)}),$.validator.addMethod(\"requiredif\",function(i,e,t){var n=t.dependentproperty;e.closest(\".js-address-lookup\")&&(n=\"AddressViewModel.\"+t.dependentproperty);var r=$(e).closest(\"form\").find('[name=\"'+n+'\"]').val();if(r==t.dependentvalue){var s=new RegExp(t.pattern.replaceAll(\"^(?i)\",\"^\"),\"i\");return $(e).attr(\"name\").toLowerCase().indexOf(\"postcode\")>-1?s=new RegExp(t.pattern.replaceAll(\"^(?i)\",\"^\"),\"i\"):s=new RegExp(t.pattern),s.test(i)}return!0})},disabled:function(){$(\"a.disabled, button.disabled, input.disabled\").off(\"click.site.disabled\").on(\"click.site.disabled\",function(){return!1})},submit:function(){$(\"form:not(.formDone)\").each(function(){var i=$(this),e=$(window);i.on(\"submit\",function(){i.removeData(\"validator\"),i.removeData(\"unobtrusiveValidation\"),$.validator.setDefaults({ignore:\":hidden:not(select)\"}),$.validator.unobtrusive.parse(i),c.forms.addFilesizeRule()}),i.addClass(\"formDone\")}),$('form[data-autosubmit=\"true\"]:not(.formAutoDone)').each(function(){var i=$(this);i.find('[data-autosubmit=\"true\"]').on(\"change\",function(){i.submit()}),i.addClass(\"formAutoDone\")})},autocomplete:{init:function(){c.forms.autocomplete.simple(),c.forms.autocomplete.products()},simple:function(){$(\"div#autocomplete\").length<1&&$(\"body\").append('
'),$(\"input[data-autocomplete]:not(.autocompleteDone,.addressLookup)\").each(function(){var i=$(this),e=i.attr(\"data-autocomplete\");i.autocomplete({minLength:2,source:e,appendTo:\"#autocomplete\",open:function(){c.win.width()<1420&&$(\"#autocomplete .ui-menu\").width(340)},select:function(t,n){window.location.href=n.item.Url},create:function(){$(this).data(\"ui-autocomplete\")._renderItem=function(t,n){return $(\"
  • \").append(\"\"+n.DisplayName+\"\").appendTo(t)}}}).attr(\"autocomplete\",\"off\"),c.win.resize(function(){i.autocomplete(\"close\")}),i.addClass(\"autocompleteDone\")})},products:function(){$(\"div#autocompleteProducts\").length<1&&$(\"body\").append('
    '),$(\"input[data-autocomplete-products]:not(.autocompleteProductsDone)\").each(function(){var i=$(this),e=i.attr(\"data-autocomplete-products\");i.autocomplete({minLength:3,source:e,position:{at:\"left-120px top+100%\"},appendTo:\"#autocompleteProducts\",select:function(t,n){return location.href=n.item.Url,!1}}).attr(\"autocomplete\",\"off\").data(\"ui-autocomplete\")._renderItem=function(t,n){t.addClass(\"autocomplete-products\");var r=$(n.Template).html();return Mustache.parse(r),$(Mustache.render(r,n)).data(\"item.autocomplete\",n).appendTo(t)},c.win.resize(function(){i.autocomplete(\"close\")}),i.addClass(\"autocompleteProductsDone\")})}},maxlength:function(){$(\"input[data-maxlength]:not(.maxlengthDone), textarea[data-maxlength]:not(.maxlengthDone)\").each(function(){var i=$(this),e=i.parent().find(\".count\"),t=parseInt(i.attr(\"data-maxlength\"),10);i.on(\"keyup click blur\",function(){var n=t-i.val().length;n<=0&&(i.val(i.val().substr(0,t)),n=0),e.text(n)}).blur(),i.addClass(\"maxlengthDone\")})},addFilesizeRule:function(){$(\"[data-max-upload-size]\").length&&$(\"[data-max-upload-size]\").rules(\"add\",{filesize:!0})},rating:function(){$(\".formRadiosRating:not(.ratingDone)\").each(function(){var i=$(this),e=i.find('input[type=\"radio\"]'),t=e.filter(\":checked\").val();function n(r){typeof r==\"undefined\"&&(r=0),r=parseInt(r,10),(isNaN(r)||r<1||r>5)&&(r=0),e.each(function(){var s=$(this),o=s.closest(\"label\");o.removeClass(\"hover\"),s.val()<=r&&o.addClass(\"hover\")})}n(t),e.closest(\"label\").hover(function(){var r=$(this).find('input[type=\"radio\"]');n(r.val())},function(){n(t)}),e.on(\"change\",function(){t=parseInt($(this).val(),10)}),i.addClass(\"ratingDone\")})},showIf:function(){$(\".formChecks[data-show-if] input[data-show-if]:checkbox:not(.showIfDone)\").each(function(){var e=$(this),t=e.attr(\"data-reverse\")==\"true\",n=e.attr(\"data-show-if\").split(\",\");function r(){if(!e.is(\":checked\")&&t)for(var s=0;s'),i.addClass(\"cmsTableDone\")})}},detectNoHover:function(){matchMedia(\"(hover: none)\").matches&&m.default.mutate(()=>{c.html.addClass(\"matchmedia-no-hover\")})},detectDefaultFontSize:function(){var i=document.getElementsByTagName(\"html\")[0],e=Number(window.getComputedStyle(i).getPropertyValue(\"font-size\").match(/\\d+/)[0]);e>16&&(i.classList.add(\"has-scaled-up-text\"),e>23&&i.classList.add(\"has-scaled-up-text-large\"))},detectInteractionMediaQuerySupport:function(){!matchMedia(\"(hover)\").matches&&!matchMedia(\"(hover: none)\").matches&&m.default.mutate(()=>{c.html.addClass(\"interaction-media-query-not-supported\")})},detectGridSupport:function(){var i=document.createElement(\"div\"),e=typeof i.style.grid==\"string\";e||m.default.mutate(()=>{c.html.addClass(\"grid-not-supported\")})},getKeyPressed:function(i){if(i.key!==void 0)return i.key;if(i.keyIdentifier!==void 0)return i.keyIdentifier;if(i.keyCode!==void 0)return i.keyCode},debounce:function(i,e,t){var n;return function(){var r=this,s=arguments,o=function(){n=null,t||i.apply(r,s)},l=t&&!n;clearTimeout(n),n=setTimeout(o,e),l&&i.apply(r,s)}},instantPageLinks:function(){let i=document.querySelectorAll(\".js-instant-page-links a\");d.scopedLoop(i,(e,t,n)=>{m.default.mutate(()=>{e.setAttribute(\"data-instant\",\"\")})},this)},openLiveChat:function(){for(var i=document.querySelectorAll(\".js-open-live-chat\"),e=0;e{i.removeAttribute(\"disabled\")},500))}},Q=c;var g=class{constructor(){this.basketSummaryEndpoint=\"/api/basketsummary\";this.authenticatedEndpoint=\"/api/authenticated\";window.fetch&&(this.getBasketSummary(),this.getAuthenticatedState())}getBasketSummary(){let e=document.querySelector(\"#navBasketCount\");fetch(this.basketSummaryEndpoint).then(t=>t.json()).then(t=>{e.textContent=t.TotalItemQuantity}).catch(t=>{f.trackException(t),d.removeElement(e)})}getAuthenticatedState(){fetch(this.authenticatedEndpoint).then(e=>e.json()).then(e=>{e.IsAuthenticated&&this.setupAuthenticatedAccountNavigation()}).catch(()=>{})}setupAuthenticatedAccountNavigation(){let e=document.querySelector(\".js-header-account-item\");e.classList.add(\"c-header__utils__item--with-sub\"),e.classList.add(\"js-header-utils-item\"),document.querySelector(\".js-header-account-nav\").setAttribute(\"aria-hidden\",\"false\"),Q.userNav()}};var b=class{constructor(){this.init()}init(){this.triggers=document.querySelectorAll(\".js-show-content\"),this.triggers.length&&this.triggerClicks()}triggerClicks(){for(let e=0;e{let n=t.target,r=document.querySelector(\"#\"+n.getAttribute(\"aria-controls\"));d.removeElement(n),r.setAttribute(\"aria-hidden\",\"false\"),r.classList.remove(\"u-hide\")})}};var w=class{constructor(){if(!document.querySelector(\".js-help-form-container\"))return;let e=document.querySelector(\".js-help-form-data\");if(e)try{this.data=JSON.parse(e.innerHTML)}catch(t){f.trackException(t);return}this.formContainer=document.querySelector(\".js-help-form\"),this.formFieldsContainer=document.querySelector(\".js-help-form-container\"),this.formOpenButtons=document.querySelectorAll(\".js-help-form-open\"),this.formCloseButtons=document.querySelectorAll(\".js-help-form-close\"),this.formTopicInput=document.querySelector(\".js-selected-form-topic-input\"),this.formQuestionInput=document.querySelector(\".js-selected-form-question-input\"),this.selectedFormTopic=this.formTopicInput&&this.formTopicInput.value?parseInt(this.formTopicInput.value):null,this.selectedFormQuestion=this.formQuestionInput&&this.formQuestionInput.value?parseInt(this.formQuestionInput.value):null,this.renderFormTopics(),this.renderFormQuestions(),this.attachEvents()}renderFormTopics(){if(!document.querySelector(\".js-help-form-topics\"))return;let e='
      ';for(var t=0;t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t`}if(e+=\"
    \",document.querySelector(\".js-help-form-topics\").innerHTML=e,this.selectedFormTopic){let n=document.querySelector('.js-help-form-topic-button[data-help-id=\"'+this.selectedFormTopic+'\"]');n.classList.add(\"is-selected\"),n.focus();let r=this.getSelectedTopic();r.formQuestions.length?(this.numberOfQuestionLevels=2,this.hideForm()):(r&&r.hasAnswerText&&this.renderAnswer(r,document.querySelector(\".js-help-form-topics\")),this.numberOfQuestionLevels=1,this.showForm())}}renderFormQuestions(){let e=document.querySelector(\".js-help-form-questions-container\");if(!e)return;if(!this.selectedFormTopic||this.numberOfQuestionLevels===1){e.setAttribute(\"aria-hidden\",\"true\");return}e.setAttribute(\"aria-hidden\",\"false\");let t='
      ',n=this.getSelectedTopic();for(var r=0;r\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t`}if(t+=\"
    \",document.querySelector(\".js-help-form-questions\").innerHTML=t,this.selectedFormQuestion){let s=document.querySelector('.js-help-form-question-button[data-help-id=\"'+this.selectedFormQuestion+'\"]');s.classList.add(\"is-selected\"),s.focus();let o=n.formQuestions.find(l=>l.id===this.selectedFormQuestion);o&&o.hasAnswerText&&this.renderAnswer(o,document.querySelector(\".js-help-form-questions\")),this.showForm()}else this.hideForm()}renderAnswer(e,t){let n=`\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    ${e.answerTitle}

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t${e.answerText}\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t${e.hasReadMoreLinkUrl?`${e.readMoreLinkText}`:\"\"}\n\t\t\t\t\t
    \n\t\t\t\t\t`;t.insertAdjacentHTML(\"beforeend\",n)}getSelectedTopic(){return this.data.find(e=>e.id===this.selectedFormTopic)}attachEvents(){document.querySelector(\".js-help-form\").addEventListener(\"click\",e=>{let t=e.target;t&&t.classList.contains(\"js-help-form-topic-button\")&&(this.hideForm(),this.selectedFormQuestion=null,this.formQuestionInput.value=\"\",this.selectedFormTopic===parseInt(t.getAttribute(\"data-help-id\"))?(this.selectedFormTopic=null,this.formTopicInput.value=\"\",this.renderFormTopics(),this.renderFormQuestions()):(this.selectedFormTopic=parseInt(t.getAttribute(\"data-help-id\")),this.renderFormTopics(),this.renderFormQuestions(),this.numberOfQuestionLevels===1?(this.formQuestionInput.value=t.getAttribute(\"data-help-id\"),this.formTopicInput.value=t.getAttribute(\"data-help-id\")):this.formTopicInput.value=t.getAttribute(\"data-help-id\"),this.scrollToForm())),t&&t.classList.contains(\"js-help-form-question-button\")&&(this.selectedFormQuestion===parseInt(t.getAttribute(\"data-help-id\"))?(this.selectedFormQuestion=null,this.formQuestionInput.value=\"\",this.renderFormQuestions()):(this.selectedFormQuestion=parseInt(t.getAttribute(\"data-help-id\")),this.formQuestionInput.value=t.getAttribute(\"data-help-id\"),this.renderFormQuestions(),this.scrollToForm()))}),this.formOpenButtons.length&&d.scopedLoop(this.formOpenButtons,(e,t,n)=>{e.addEventListener(\"click\",r=>{r.preventDefault(),this.formContainer.setAttribute(\"aria-hidden\",\"false\"),this.scrollToForm()})},this),this.formCloseButtons.length&&d.scopedLoop(this.formCloseButtons,(e,t,n)=>{e.addEventListener(\"click\",r=>{r.preventDefault(),this.formContainer.setAttribute(\"aria-hidden\",\"true\")})},this)}scrollToForm(){this.formContainer.scrollIntoView()}showForm(){this.formFieldsContainer.setAttribute(\"aria-hidden\",\"false\")}hideForm(){this.formFieldsContainer.setAttribute(\"aria-hidden\",\"true\")}};var y=class{constructor(){this.attachEvents()}attachEvents(){let e=document.querySelectorAll(\".js-live-chat-open\");d.scopedLoop(e,(t,n,r)=>{t.addEventListener(\"click\",()=>{try{LC_API.open_chat_window()}catch(s){f.trackException(s);let o=t.closest(\".js-live-chat-container\").querySelector(\".js-live-chat-message\");o.setAttribute(\"aria-hidden\",\"false\"),o.setAttribute(\"role\",\"alert\")}})},this)}};var T=class{constructor(){this.attachEvents()}attachEvents(){let e=document.querySelectorAll(\".js-help-vote\");d.scopedLoop(e,(t,n,r)=>{t.addEventListener(\"click\",()=>{for(let s=0;s{this.dropArea.addEventListener(e,this.preventDefaults,!1),document.body.addEventListener(e,this.preventDefaults,!1)}),[\"dragenter\",\"dragover\"].forEach(e=>{this.dropArea.addEventListener(e,()=>this.highlight(),!1)}),[\"dragleave\",\"drop\"].forEach(e=>{this.dropArea.addEventListener(e,()=>this.unhighlight(),!1)}),this.dropArea.addEventListener(\"drop\",e=>this.handleDrop(e),!1),this.dropAreaInput.addEventListener(\"input\",()=>this.handleFiles(this.dropAreaInput.files),!1)}preventDefaults(e){e.preventDefault(),e.stopPropagation()}highlight(){this.dropArea.classList.add(\"active\")}unhighlight(){this.dropArea.classList.remove(\"active\")}handleDrop(e){let n=e.dataTransfer.files;this.handleFiles(n)}handleFiles(e){if(this.status!==0)return!1;this.status=1;let t=[...e];this.mergeFilesWithPreviouslyUploaded(t);for(let n=0;n{let r=\"\";e.type===\"application/pdf\"?r=\"data:image/png;base64,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\":r=t.result;let s=document.createElement(\"div\");s.classList.add(\"c-thumbnails__thumbnail\");let o=document.createElement(\"img\");o.src=r,o.setAttribute(\"alt\",\"\"),o.classList.add(\"c-thumbnails__image\");let l=document.createElement(\"button\");l.setAttribute(\"type\",\"button\"),l.classList.add(\"c-thumbnails__remove\"),l.insertAdjacentHTML(\"beforeend\",`\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tRemove file\n\t\t\t`),l.addEventListener(\"click\",()=>n.removeFileFromFileList(e,s)),s.appendChild(o),s.appendChild(l);let u=document.querySelector(\".js-file-drop-thumbnails\");u&&u.appendChild(s)}}removeFileFromFileList(e,t){if(this.status=2,!this.dataTransferConstructorSupported){d.empty(document.querySelector(\".js-file-drop-thumbnails\")),this.dropAreaInput.value=\"\",this.dropAreaInput.files=null,this.currentFileList=null,this.status=0;return}let n=new DataTransfer;if(!this.dropAreaInput.files){this.status=0;return}for(let r=0;r{this.processNewsletterSubscription(e)})}processNewsletterSubscription(e){if(e.preventDefault(),!$(this.form).valid()||this.isSubmitting===!0)return;this.isSubmitting=!0;let t=this.form.parentElement,n=this.form.querySelector(\".js-newsletter-form-first-name\"),r=this.form.querySelector(\".js-newsletter-form-email\"),s={firstname:n.value,email:r.value,newsletteroptin:!0};fetch(\"/api/newsletter/subscribe\",{headers:{\"Content-Type\":\"application/json\"},method:\"POST\",body:JSON.stringify(s)}).then(o=>o.json()).then(o=>{if(o.SuccessMessages.length==0&&o.ErrorMessages.length>0){let a=t.querySelector(\".js-newsletter-error\");a.textContent=o.ErrorMessages[0];return}t.querySelector(\".js-newsletter-title\").remove(),t.querySelector(\".js-newsletter-description\").remove(),this.form.remove();let l=t.querySelector(\".js-newsletter-success-title\"),u=t.querySelector(\".js-newsletter-success-description\");l.classList.remove(\"u-visuallyhidden\"),l.setAttribute(\"aria-hidden\",\"false\"),l.setAttribute(\"role\",\"alert\"),u.classList.remove(\"u-visuallyhidden\"),u.setAttribute(\"aria-hidden\",\"false\"),u.setAttribute(\"role\",\"alert\")}).catch(o=>{this.isSubmitting=!1})}};new g;new d;new b;new w;new y;new T;var R=document.querySelectorAll(\".js-file-drop-area\");for(let i=0;i