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ourcesContent":["/* script for Location page */\r\n$(document).ready(function() {\r\n if ( $(\".section--locations-expanders\").length ) {\r\n var offset = $(\".section--locations-expanders\").offset().top;\r\n offset = offset - 50;\r\n $(\".filters-nav-anchor\").on(\"click\", function() {\r\n $(\"html, body\").animate({\r\n scrollTop: offset\r\n }, 500);\r\n });\r\n }\r\n \r\n \r\n let locationSearchInput = $( '#pac-input' );\r\n \r\n let locationSearchResults = $( '#box_location_search' );\r\n \r\n if ( locationSearchInput.length > 0 ) {\r\n \r\n $( document ).on( 'click', '#box_location_search p', function() {\r\n \r\n locationSearchInput.val( $( this ).text() );\r\n \r\n locationSearchResults.empty();\r\n \r\n } );\r\n }\r\n \r\n /*\r\n * Populate expert title in the hidden field on clicking email icon\r\n * on Wrapper-get-in-touch and Wrapper-people-slider blocks\r\n */\r\n $('a[data-bs-expert-title]').click( function(event) {\r\n let expert_title = $( this ).attr('data-bs-expert-title');\r\n let bs_target = $( this ).attr('data-bs-target');\r\n let getInTouchForm = $( bs_target ).find( '.mf_form__form' );\r\n let hidden_field = getInTouchForm.find( 'input[data-hidden-field-tag=\"expert_title\"]' );\r\n hidden_field.val( expert_title );\r\n });\r\n \r\n $( '.bs-modal-get-in-touch' ).on( 'shown.bs.modal', function () {\r\n \r\n let $this = $( this );\r\n \r\n let getInTouchForm = $this.find( '.mf_form__form' );\r\n \r\n getInTouchForm.trigger( 'reset' );\r\n \r\n let select2s = getInTouchForm.find( '.select2-hidden-accessible' );\r\n \r\n if ( select2s.length > 0 ) {\r\n \r\n select2s.each( function () {\r\n \r\n $( this ).val( null ).trigger( 'change' );\r\n \r\n } );\r\n }\r\n \r\n // Reset captcha.\r\n if ( 'undefined' !== typeof grecaptcha ) {\r\n \r\n grecaptcha.reset();\r\n }\r\n \r\n getInTouchForm.removeClass( 'was-validated' );\r\n \r\n getInTouchForm.show();\r\n \r\n $this.find( '.mf_form__success' ).hide();\r\n \r\n } );\r\n\r\n\r\n// Location map adjusts height in case of browser zooming\r\n\r\nconst updatePixelRatio = () => {\r\n let pr = window.devicePixelRatio;\r\n //let prString = (pr * 100).toFixed(0);\r\n //console.log(`${prString}% (${pr.toFixed(2)})`);\r\n if(pr > 1.5) {\r\n $('.section--locations-map #map').css('max-height', '100vh');\r\n } else {\r\n $('.section--locations-map #map').css('max-height', 'calc(100vh - 136px)');\r\n }\r\n matchMedia(`(resolution: ${pr}dppx)`).addEventListener(\"change\", updatePixelRatio, { once: true })\r\n }\r\n\r\n updatePixelRatio();\r\n \r\n });"],"names":["$","document","ready","length","offset","top","on","animate","scrollTop","locationSearchInput","locationSearchResults","val","this","text","empty","click","event","expert_title","attr","bs_target","find","$this","getInTouchForm","trigger","select2s","each","grecaptcha","reset","removeClass","show","hide","updatePixelRatio","pr","window","devicePixelRatio","css","matchMedia","addEventListener","once"],"sourceRoot":""}