(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?module.exports=b(require('popper.js')):'function'==typeof define&&define.amd?define(['popper.js'],b):a.tippy=b(a.Popper)})(this,function(a){'use strict';function b(a){return'[object Object]'==={}.toString.call(a)}function c(a){return[].slice.call(a)}function d(a){if(a instanceof Element||b(a))return[a];if(a instanceof NodeList)return c(a);if(Array.isArray(a))return a;try{return c(document.querySelectorAll(a))}catch(a){return[]}}function f(a){a.refObj=!0,a.attributes=a.attributes||{},a.setAttribute=function(b,c){a.attributes[b]=c},a.getAttribute=function(b){return a.attributes[b]},a.removeAttribute=function(b){delete a.attributes[b]},a.hasAttribute=function(b){return b in a.attributes},a.addEventListener=function(){},a.removeEventListener=function(){},a.classList={classNames:{},add:function(b){return a.classList.classNames[b]=!0},remove:function(b){return delete a.classList.classNames[b],!0},contains:function(b){return b in a.classList.classNames}}}function g(a){for(var b=['','webkit'],c=a.charAt(0).toUpperCase()+a.slice(1),d=0;d'):i.classList.add('tippy-arrow'),e.appendChild(i)}if(c.animateFill){e.setAttribute('data-animatefill','');var j=h();j.classList.add('tippy-backdrop'),j.setAttribute('data-state','hidden'),e.appendChild(j)}c.inertia&&e.setAttribute('data-inertia',''),c.interactive&&e.setAttribute('data-interactive','');var k=c.html;if(k){var l;k instanceof Element?(f.appendChild(k),l='#'+(k.id||'tippy-html-template')):(f.innerHTML=document.querySelector(k).innerHTML,l=k),d.setAttribute('data-html',''),e.setAttribute('data-template-id',l),c.interactive&&d.setAttribute('tabindex','-1')}else f[c.allowTitleHTML?'innerHTML':'textContent']=b;return e.appendChild(f),d.appendChild(e),d}function j(a,b,c,d){var e=c.onTrigger,f=c.onMouseLeave,g=c.onBlur,h=c.onDelegateShow,i=c.onDelegateHide,j=[];if('manual'===a)return j;var k=function(a,c){b.addEventListener(a,c),j.push({event:a,handler:c})};return d.target?(T.supportsTouch&&d.touchHold&&(k('touchstart',h),k('touchend',i)),'mouseenter'===a&&(k('mouseover',h),k('mouseout',i)),'focus'===a&&(k('focusin',h),k('focusout',i)),'click'===a&&k('click',h)):(k(a,e),T.supportsTouch&&d.touchHold&&(k('touchstart',e),k('touchend',f)),'mouseenter'===a&&k('mouseleave',f),'focus'===a&&k(S?'focusout':'blur',g)),j}function k(a,b){var c=W.reduce(function(c,d){var e=a.getAttribute('data-tippy-'+d.toLowerCase())||b[d];return'false'===e&&(e=!1),'true'===e&&(e=!0),isFinite(e)&&!isNaN(parseFloat(e))&&(e=parseFloat(e)),'target'!==d&&'string'==typeof e&&'['===e.trim().charAt(0)&&(e=JSON.parse(e)),c[d]=e,c},{});return Z({},b,c)}function l(a,b){return b.arrow&&(b.animateFill=!1),b.appendTo&&'function'==typeof b.appendTo&&(b.appendTo=b.appendTo()),'function'==typeof b.html&&(b.html=b.html(a)),b}function m(a){var b=function(b){return a.querySelector(b)};return{tooltip:b(U.TOOLTIP),backdrop:b(U.BACKDROP),content:b(U.CONTENT),arrow:b(U.ARROW)||b(U.ROUND_ARROW)}}function n(a){var b=a.getAttribute('title');b&&a.setAttribute('data-original-title',b),a.removeAttribute('title')}function o(a){void a.offsetHeight}function p(a,b,c){var d=a.popper,e=a.options,f=e.onCreate,g=e.onUpdate;e.onCreate=e.onUpdate=function(){o(d),b&&b(),g(),e.onCreate=f,e.onUpdate=g},c||a.scheduleUpdate()}function q(a){return a.getAttribute('x-placement').replace(/-.+/,'')}function r(a,b,c){if(!b.getAttribute('x-placement'))return!0;var d=a.clientX,e=a.clientY,f=c.interactiveBorder,g=c.distance,h=b.getBoundingClientRect(),i=q(b),j=f+g,k={top:h.top-e>f,bottom:e-h.bottom>f,left:h.left-d>f,right:d-h.right>f};return'top'===i?k.top=h.top-e>j:'bottom'===i?k.bottom=e-h.bottom>j:'left'===i?k.left=h.left-d>j:'right'===i?k.right=d-h.right>j:void 0,k.top||k.bottom||k.left||k.right}function s(a,b,c,d){if(!b.length)return'';var e={scale:function(){return 1===b.length?''+b[0]:c?b[0]+', '+b[1]:b[1]+', '+b[0]}(),translate:function(){return 1===b.length?d?-b[0]+'px':b[0]+'px':c?d?b[0]+'px, '+-b[1]+'px':b[0]+'px, '+b[1]+'px':d?-b[1]+'px, '+b[0]+'px':b[1]+'px, '+b[0]+'px'}()};return e[a]}function t(a,b){if(!a)return'';return b?a:{X:'Y',Y:'X'}[a]}function u(a,b,c){var d=q(a),e='top'===d||'bottom'===d,f='right'===d||'bottom'===d,h=function(a){var b=c.match(a);return b?b[1]:''},i=function(a){var b=c.match(a);return b?b[1].split(',').map(parseFloat):[]},j={translate:/translateX?Y?\(([^)]+)\)/,scale:/scaleX?Y?\(([^)]+)\)/},k={translate:{axis:h(/translate([XY])/),numbers:i(j.translate)},scale:{axis:h(/scale([XY])/),numbers:i(j.scale)}},l=c.replace(j.translate,'translate'+t(k.translate.axis,e)+'('+s('translate',k.translate.numbers,e,f)+')').replace(j.scale,'scale'+t(k.scale.axis,e)+'('+s('scale',k.scale.numbers,e,f)+')');b.style[g('transform')]=l}function v(a){return-(a-V.distance)+'px'}function w(a,b){var c=Element.prototype.closest||function(a){for(var b=this;b;){if(e.call(b,a))return b;b=b.parentElement}};return c.call(a,b)}function x(a,b){return Array.isArray(a)?a[b]:a}function y(a,b){a.forEach(function(a){a&&a.setAttribute('data-state',b)})}function z(a,b){a.filter(Boolean).forEach(function(a){a.style[g('transitionDuration')]=b+'ms'})}function A(a){var b=window.scrollX||window.pageXOffset,c=window.scrollY||window.pageYOffset;a.focus(),scroll(b,c)}function B(){var a=this._(aa).lastTriggerEvent;return this.options.followCursor&&!T.usingTouch&&a&&'focus'!==a.type}function C(a){var b=w(a.target,this.options.target);if(b&&!b._tippy){var c=b.getAttribute('title')||this.title;c&&(b.setAttribute('title',c),Q(b,Z({},this.options,{target:null})),D.call(b._tippy,a))}}function D(a){var b=this,c=this.options;if(I.call(this),!this.state.visible){if(c.target)return void C.call(this,a);if(this._(aa).isPreparingToShow=!0,c.wait)return void c.wait.call(this.popper,this.show.bind(this),a);if(B.call(this)){this._(aa).followCursorListener||J.call(this);var d=m(this.popper),e=d.arrow;e&&(e.style.margin='0'),document.addEventListener('mousemove',this._(aa).followCursorListener)}var f=x(c.delay,0);f?this._(aa).showTimeout=setTimeout(function(){b.show()},f):this.show()}}function E(){var a=this;if(I.call(this),!!this.state.visible){this._(aa).isPreparingToShow=!1;var b=x(this.options.delay,1);b?this._(aa).hideTimeout=setTimeout(function(){a.state.visible&&a.hide()},b):this.hide()}}function F(){var a=this;return{onTrigger:function(b){if(a.state.enabled){var c=T.supportsTouch&&T.usingTouch&&-1<['mouseenter','mouseover','focus'].indexOf(b.type);c&&a.options.touchHold||(a._(aa).lastTriggerEvent=b,'click'===b.type&&'persistent'!==a.options.hideOnClick&&a.state.visible?E.call(a):D.call(a,b))}},onMouseLeave:function(b){if(!(-1<['mouseleave','mouseout'].indexOf(b.type)&&T.supportsTouch&&T.usingTouch&&a.options.touchHold)){if(a.options.interactive){var c=E.bind(a),d=function b(d){var e=w(d.target,U.REFERENCE),f=w(d.target,U.POPPER)===a.popper,g=e===a.reference;f||g||r(d,a.popper,a.options)&&(document.body.removeEventListener('mouseleave',c),document.removeEventListener('mousemove',b),E.call(a,b))};return document.body.addEventListener('mouseleave',c),void document.addEventListener('mousemove',d)}E.call(a)}},onBlur:function(b){if(!(b.target!==a.reference||T.usingTouch)){if(a.options.interactive){if(!b.relatedTarget)return;if(w(b.relatedTarget,U.POPPER))return}E.call(a)}},onDelegateShow:function(b){w(b.target,a.options.target)&&D.call(a,b)},onDelegateHide:function(b){w(b.target,a.options.target)&&E.call(a)}}}function G(){var b=this,c=this.popper,d=this.reference,e=this.options,f=m(c),g=f.tooltip,h=e.popperOptions,i='round'===e.arrowType?U.ROUND_ARROW:U.ARROW,j=g.querySelector(i),k=Z({placement:e.placement},h||{},{modifiers:Z({},h?h.modifiers:{},{arrow:Z({element:i},h&&h.modifiers?h.modifiers.arrow:{}),flip:Z({enabled:e.flip,padding:e.distance+5,behavior:e.flipBehavior},h&&h.modifiers?h.modifiers.flip:{}),offset:Z({offset:e.offset},h&&h.modifiers?h.modifiers.offset:{})}),onCreate:function(){g.style[q(c)]=v(e.distance),j&&e.arrowTransform&&u(c,j,e.arrowTransform)},onUpdate:function(){var a=g.style;a.top='',a.bottom='',a.left='',a.right='',a[q(c)]=v(e.distance),j&&e.arrowTransform&&u(c,j,e.arrowTransform)}});return L.call(this,{target:c,callback:function(){b.popperInstance.update()},options:{childList:!0,subtree:!0,characterData:!0}}),new a(d,c,k)}function H(a){var b=this.options;if(this.popperInstance?(this.popperInstance.scheduleUpdate(),b.livePlacement&&!B.call(this)&&this.popperInstance.enableEventListeners()):(this.popperInstance=G.call(this),!b.livePlacement&&this.popperInstance.disableEventListeners()),!B.call(this)){var c=m(this.popper),d=c.arrow;d&&(d.style.margin=''),this.popperInstance.reference=this.reference}p(this.popperInstance,a,!0),b.appendTo.contains(this.popper)||b.appendTo.appendChild(this.popper)}function I(){var a=this._(aa),b=a.showTimeout,c=a.hideTimeout;clearTimeout(b),clearTimeout(c)}function J(){var a=this;this._(aa).followCursorListener=function(b){var c=a._(aa).lastMouseMoveEvent=b,d=c.clientX,e=c.clientY;a.popperInstance&&(a.popperInstance.reference={getBoundingClientRect:function(){return{width:0,height:0,top:e,left:d,right:d,bottom:e}},clientWidth:0,clientHeight:0},a.popperInstance.scheduleUpdate())}}function K(){var a=this,b=function(){a.popper.style[g('transitionDuration')]=a.options.updateDuration+'ms'},c=function(){a.popper.style[g('transitionDuration')]=''};(function d(){a.popperInstance&&a.popperInstance.update(),b(),a.state.visible?requestAnimationFrame(d):c()})()}function L(a){var b=a.target,c=a.callback,d=a.options;if(window.MutationObserver){var e=new MutationObserver(c);e.observe(b,d),this._(aa).mutationObservers.push(e)}}function M(a,b){if(!a)return b();var c=m(this.popper),d=c.tooltip,f=function(a,b){b&&d[a+'EventListener']('transition'in document.body.style?'transitionend':'webkitTransitionEnd',b)},e=function a(c){c.target===d&&(f('remove',a),b())};f('remove',this._(aa).transitionendListener),f('add',e),this._(aa).transitionendListener=e}function N(a,b){return a.reduce(function(a,c){var d=da,e=l(c,b.performance?b:k(c,b)),f=c.getAttribute('title');if(!f&&!e.target&&!e.html&&!e.dynamicTitle)return a;c.setAttribute(e.target?'data-tippy-delegate':'data-tippy',''),n(c);var g=i(d,f,e),h=new ca({id:d,reference:c,popper:g,options:e,title:f,popperInstance:null});e.createPopperInstanceOnInit&&(h.popperInstance=G.call(h),h.popperInstance.disableEventListeners());var o=F.call(h);return h.listeners=e.trigger.trim().split(' ').reduce(function(a,b){return a.concat(j(b,c,o,e))},[]),e.dynamicTitle&&L.call(h,{target:c,callback:function(){var a=m(g),b=a.content,d=c.getAttribute('title');d&&(b[e.allowTitleHTML?'innerHTML':'textContent']=h.title=d,n(c))},options:{attributes:!0}}),c._tippy=h,g._tippy=h,g._reference=c,a.push(h),da++,a},[])}function O(a){var b=c(document.querySelectorAll(U.POPPER));b.forEach(function(b){var c=b._tippy;if(c){var d=c.options;(!0===d.hideOnClick||-1b-a&&(T.usingTouch=!1,document.removeEventListener('mousemove',d),!T.iOS&&document.body.classList.remove('tippy-touch'),T.onUserInputChange('mouse')),a=b}}();document.addEventListener('click',function(a){if(!(a.target instanceof Element))return O();var b=w(a.target,U.REFERENCE),c=w(a.target,U.POPPER);if(!(c&&c._tippy&&c._tippy.options.interactive)){if(b&&b._tippy){var d=b._tippy.options,e=-1c&&(c=n.length),n}),function(e,t){return p(e)&&e.length').appendTo(this.$el));var i=e.datepicker(n[0],{mode:"range",altInput:!1,clickOpens:!1,closeOnSelect:!0,onReady:function(e,t,n){n.calendarContainer.classList.add("awebooking-datepicker"),this.config.ignoredFocusElements.push(u()(".searchbox__box--checkin",r.$el)[0]),this.config.ignoredFocusElements.push(u()(".searchbox__box--checkout",r.$el)[0])},onChange:function(e){0===e.length?(t.model.checkIn(null),t.model.checkIn(null)):1===e.length?(t.model.checkIn(e[0]),t.model.checkOut(null)):(t.model.checkIn(e[0]),t.model.checkOut(e[1]))},onPreCalendarPosition:function(e,t,n){var i=this;n._positionElement=u()(".searchbox__box--checkout",r.$el)[0],setTimeout(function(){i._positionElement=i._input},0)}});u()(this.$el).on("click",".searchbox__box--checkin, .searchbox__box--checkout",function(e){e.preventDefault(),i.isOpen=!1,i.open(void 0,e.currentTarget)})}},{key:"_setuptPopper",value:function(e){var t=window.awebooking;0!==u()(e).find(".searchbox__popup").length&&t.utils.dropdown(u()(e).find(".searchbox__box-wrap"),{drop:".searchbox__popup",display:"static"})}}]),i}();u()(function(){u()(".searchbox, .abrs-searchbox").each(function(e,t){var n=new p(t,e);t.classList.contains("searchbox--experiment-style")||new y(t,n)})})},pRvc:function(e,t,n){"use strict";var i=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!r.default.isMoment(e)||!r.default.isMoment(t))&&e.date()===t.date()&&e.month()===t.month()&&e.year()===t.year()};var r=i(n("wy2R"))},wy2R:function(e,t){!function(){e.exports=this.moment}()},xeH2:function(e,t){!function(){e.exports=this.jQuery}()}})); (function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$('
    '); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mdc=t():e.mdc=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/assets/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.autoInit=t.select=t.menu=t.textfield=t.drawer=t.snackbar=t.ripple=t.radio=t.iconToggle=t.checkbox=t.base=void 0;var o=n(1),a=i(o),s=n(12),u=i(s),c=n(19),l=i(c),d=n(24),f=i(d),_=n(2),p=i(_),h=n(13),v=i(h),y=n(33),m=i(y),g=n(31),b=i(g),C=n(6),O=i(C),T=n(28),E=i(T),A=n(8),I=r(A);I.default.register("MDCCheckbox",u.MDCCheckbox),I.default.register("MDCTemporaryDrawer",v.MDCTemporaryDrawer),I.default.register("MDCRipple",p.MDCRipple),I.default.register("MDCIconToggle",l.MDCIconToggle),I.default.register("MDCRadio",f.MDCRadio),I.default.register("MDCSnackbar",b.MDCSnackbar),I.default.register("MDCTextfield",m.MDCTextfield),I.default.register("MDCSimpleMenu",O.MDCSimpleMenu),I.default.register("MDCSelect",E.MDCSelect),t.base=a,t.checkbox=u,t.iconToggle=l,t.radio=f,t.ripple=p,t.snackbar=b,t.drawer=v,t.textfield=m,t.menu=O,t.select=E,t.autoInit=I.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(5);Object.defineProperty(t,"MDCFoundation",{enumerable:!0,get:function(){return r(i).default}});var o=n(9);Object.defineProperty(t,"MDCComponent",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCRipple=t.MDCRippleFoundation=void 0;var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.isUnbounded,i=void 0===r?void 0:r,o=new t(e);return void 0!==i&&(o.unbounded=i),o}},{key:"createAdapter",value:function(e){return{browserSupportsCssVars:function(){return(0,d.supportsCssVariables)(window)},isUnbounded:function(){return e.unbounded},isSurfaceActive:function(){return e.root_[f](":active")},addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},registerInteractionHandler:function(t,n){return e.root_.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(t,n)},registerResizeHandler:function(e){return window.addEventListener("resize",e)},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},updateCssVariable:function(t,n){return e.root_.style.setProperty(t,n)},computeBoundingRect:function(){return e.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),t}(u.MDCComponent)},function(e,t){"use strict";function n(e){return void 0!==e.document&&"function"==typeof e.document.createElement}function r(e){return e in u||e in c}function i(e,t,n){switch(e){case"animationstart":case"animationend":case"animationiteration":return"animation"in n.style?t[e].noPrefix:t[e].webkitPrefix;case"transitionend":return"transition"in n.style?t[e].noPrefix:t[e].webkitPrefix;default:return t[e].noPrefix}}function o(e,t){if(!n(e)||!r(t))return t;var o=t in u?u:c,a=e.document.createElement("div"),s="";return s=o===u?i(t,o,a):o[t].noPrefix in a.style?o[t].noPrefix:o[t].webkitPrefix}function a(e,t){return o(e,t)}function s(e,t){return o(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getCorrectEventName=a,t.getCorrectPropertyName=s;var u={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}}},function(e,t){"use strict";function n(e){var t=e.CSS&&"function"==typeof e.CSS.supports;if(t){var n=e.CSS.supports("--css-vars","yes"),r=e.CSS.supports("(--css-vars: yes)")&&e.CSS.supports("color","#00000000");return n||r}}function r(e){return["webkitMatchesSelector","msMatchesSelector","matches"].filter(function(t){return t in e}).pop()}function i(e,t,n){var r=!1,i=function i(){r||(r=!0,e.removeClass(t),e.deregisterInteractionHandler(n,i))};return e.registerInteractionHandler(n,i),e.addClass(t),i}function o(e,t,n){var r=t.x,i=t.y,o=r+n.left,a=i+n.top,s=void 0,u=void 0;return"touchend"===e.type?(s=e.changedTouches[0].pageX-o,u=e.changedTouches[0].pageY-a):(s=e.pageX-o,u=e.pageY-a),{x:s,y:u}}Object.defineProperty(t,"__esModule",{value:!0}),t.supportsCssVariables=n,t.getMatchesProperty=r,t.animateWithClass=i,t.getNormalizedEventCoords=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.adapter_=t}return r(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),r(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);Object.defineProperty(t,"MDCSimpleMenu",{enumerable:!0,get:function(){return r.MDCSimpleMenu}}),Object.defineProperty(t,"MDCSimpleMenuFoundation",{enumerable:!0,get:function(){return r.MDCSimpleMenuFoundation}})},function(e,t){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===s||t){var n=e.document.createElement("div"),r="transform"in n.style?"transform":"webkitTransform";s=r}return s}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(n,Math.max(t,e))}function i(e,t,n,r,i){return o(a(e,t,r),n,i)}function o(e,t,n){if(0===e||1===e)return e;var r=e*t,i=t+e*(n-t),o=n+e*(1-n);return r+=e*(i-r),i+=e*(o-i),r+e*(i-r)}function a(e,t,n){var r=1e-6,i=8;if(e<=0)return 0;if(e>=1)return 1;for(var a=e,s=0,u=1,c=0,l=0;lr&&f0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,o=t.querySelectorAll("[data-mdc-auto-init]"),a=0;e=o[a];a++){var s=e.dataset.mdcAutoInit;if(!s)throw new Error("(mdc-auto-init) Constructor name must be given.");var u=r[s];if("function"!=typeof u)throw new Error("(mdc-auto-init) Could not find constructor in registry for "+s);if(e[s])n("(mdc-auto-init) Component already initialized for "+e+". Skipping...");else{var c=u.attachTo(e);Object.defineProperty(e,s,{value:c,writable:!1,enumerable:!1,configurable:!0})}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=Object.create(null),i=console.warn.bind(console);n.register=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;if("function"!=typeof t)throw new Error("(mdc-auto-init) Invalid Ctor value "+t+". Expected function");r[e]&&n("(mdc-auto-init) Overriding registration for "+e+" with "+t+". Was: "+r[e]),r[e]=t},n.deregister=function(e){delete r[e]},n.deregisterAll=function(){Object.keys(r).forEach(this.deregister,this)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.getDefaultFoundation();i(this,e),this.root_=t;for(var r=arguments.length,o=Array(r>2?r-2:0),a=2;a0&&(clearTimeout(this.animEndLatchTimer_),this.adapter_.forceLayout(),this.adapter_.removeClass(this.currentAnimationClass_)),this.currentAnimationClass_=this.getTransitionAnimationClass_(t,n),this.currentCheckState_=n,this.adapter_.isAttachedToDOM()&&this.currentAnimationClass_.length>0&&(this.adapter_.addClass(this.currentAnimationClass_),this.adapter_.registerAnimationEndHandler(this.animEndHandler_)))}}},{key:"determineCheckState_",value:function(e){var t=l.strings.TRANSITION_STATE_INDETERMINATE,n=l.strings.TRANSITION_STATE_CHECKED,r=l.strings.TRANSITION_STATE_UNCHECKED;return e.indeterminate?t:e.checked?n:r}},{key:"getTransitionAnimationClass_",value:function(e,n){var r=l.strings.TRANSITION_STATE_INIT,i=l.strings.TRANSITION_STATE_CHECKED,o=l.strings.TRANSITION_STATE_UNCHECKED,a=t.cssClasses,s=a.ANIM_UNCHECKED_CHECKED,u=a.ANIM_UNCHECKED_INDETERMINATE,c=a.ANIM_CHECKED_UNCHECKED,d=a.ANIM_CHECKED_INDETERMINATE,f=a.ANIM_INDETERMINATE_CHECKED,_=a.ANIM_INDETERMINATE_UNCHECKED;switch(e){case r:if(n===o)return"";case o:return n===i?s:u;case i:return n===o?c:d;default:return n===i?f:_}}},{key:"getNativeControl_",value:function(){return this.adapter_.getNativeControl()||{checked:!1,indeterminate:!1,disabled:!1}}}]),t}(c.MDCFoundation);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCCheckbox=t.MDCCheckboxFoundation=void 0;var s=Object.assign||function(e){for(var t=1;t=.5?this.close():this.open()}}},{key:"updateDrawer_",value:function(){if(this.touchingSideNav_){requestAnimationFrame(this.updateDrawer_.bind(this));var e=null,t=null;e=1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_),t=Math.max(0,1+this.direction_*(e/this.drawerWidth_)),this.adapter_.setTranslateX(e),this.adapter_.updateCssVariable(t)}}}]),t}(u.MDCFoundation);t.default=l},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCTemporaryDrawer=t.MDCTemporaryDrawerFoundation=void 0;var u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:window;if(!("ontouchstart"in t.document))switch(e){case"touchstart":return"pointerdown";case"touchmove":return"pointermove";case"touchend":return"pointerup";default:return e}return e}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===l||t){var n=e.document.createElement("div"),r="transform"in n.style?"transform":"-webkit-transform";l=r}return l}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return"CSS"in e&&e.CSS.supports("(--color: red)")}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===d||t){var n=!1;try{e.document.addEventListener("test",null,{get passive(){n=!0}})}catch(e){}d=n}return!!d&&{passive:!0}}function a(e){e.hasAttribute("tabindex")&&e.setAttribute(u,e.getAttribute("tabindex")),e.setAttribute(c,!0)}function s(e){e.hasAttribute(c)&&(e.hasAttribute(u)?(e.setAttribute("tabindex",e.getAttribute(u)),e.removeAttribute(u)):e.removeAttribute("tabindex"),e.removeAttribute(c))}Object.defineProperty(t,"__esModule",{value:!0}),t.remapEvent=n,t.getTransformPropertyName=r,t.supportsCssCustomProperties=i,t.applyPassive=o,t.saveElementTabState=a,t.restoreElementTabState=s;var u="data-mdc-tabindex",c="data-mdc-tabindex-handled",l=void 0,d=void 0},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){var t=e.key,n=e.keyCode;return t&&"Space"===t||32===n}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:!this.on_;this.on_=e;var n=t.strings,r=n.ARIA_LABEL,i=n.ARIA_PRESSED,o=this.on_?this.toggleOnData_:this.toggleOffData_,a=o.content,s=o.label,u=o.cssClass,c=this.on_?this.toggleOffData_:this.toggleOnData_,l=c.cssClass;this.on_?this.adapter_.setAttr(i,"true"):this.adapter_.setAttr(i,"false"),l&&this.adapter_.removeClass(l),u&&this.adapter_.addClass(u),a&&this.adapter_.setText(a),s&&this.adapter_.setAttr(r,s)}},{key:"parseJsonDataAttr_",value:function(e){var t=this.adapter_.getAttr(e);return t?JSON.parse(t):{}}},{key:"isDisabled",value:function(){return this.disabled_}},{key:"setDisabled",value:function(e){this.disabled_=e;var n=t.cssClasses.DISABLED,r=t.strings.ARIA_DISABLED;this.disabled_?(this.savedTabIndex=this.adapter_.getTabIndex(),this.adapter_.setTabIndex(-1),this.adapter_.setAttr(r,"true"),this.adapter_.addClass(n)):(this.adapter_.setTabIndex(this.savedTabIndex),this.adapter_.rmAttr(r),this.adapter_.removeClass(n))}},{key:"isKeyboardActivated",value:function(){return this.isHandlingKeydown_}}]),t}(c.MDCFoundation);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCIconToggle=t.MDCIconToggleFoundation=void 0;var s=Object.assign||function(e){for(var t=1;t0;u&&s0,f=l>0;this.adapter_.isRtl()?(n="right",f&&c0&&void 0!==arguments[0]?arguments[0]:{},r=n.focusIndex,i=void 0===r?null:r;this.adapter_.saveFocus(),this.adapter_.addClass(t.cssClasses.ANIMATING),this.animationRequestId_=requestAnimationFrame(function(){e.dimensions_=e.adapter_.getInnerDimensions(),e.applyTransitionDelays_(),e.autoPosition_(),e.animateMenu_(),e.adapter_.addClass(t.cssClasses.OPEN),e.focusOnOpen_(i),e.adapter_.registerDocumentClickHandler(e.documentClickHandler_)}),this.isOpen_=!0}},{key:"close",value:function(){var e=this;this.adapter_.deregisterDocumentClickHandler(this.documentClickHandler_),this.adapter_.addClass(t.cssClasses.ANIMATING),requestAnimationFrame(function(){e.removeTransitionDelays_(),e.animateMenu_(),e.adapter_.removeClass(t.cssClasses.OPEN)}),this.isOpen_=!1,this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}}]),t}(c.MDCFoundation);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCSimpleMenu=t.MDCSimpleMenuFoundation=void 0;var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.focusIndex,n=void 0===t?null:t;this.foundation_.open({focusIndex:n})}},{key:"hide",value:function(){this.foundation_.close()}},{key:"getDefaultFoundation",value:function(){var e=this;return new l.default({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},hasClass:function(t){return e.root_.classList.contains(t)},hasNecessaryDom:function(){return Boolean(e.itemsContainer_)},getInnerDimensions:function(){var t=e.itemsContainer_;return{width:t.offsetWidth,height:t.offsetHeight}},hasAnchor:function(){return e.root_.parentElement&&e.root_.parentElement.classList.contains("mdc-menu-anchor")},getAnchorDimensions:function(){return e.root_.parentElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},setScale:function(t,n){e.root_.style[(0,d.getTransformPropertyName)(window)]="scale("+t+", "+n+")"},setInnerScale:function(t,n){e.itemsContainer_.style[(0,d.getTransformPropertyName)(window)]="scale("+t+", "+n+")"},getNumberOfItems:function(){return e.items.length},registerInteractionHandler:function(t,n){return e.root_.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(t,n)},registerDocumentClickHandler:function(e){return document.addEventListener("click",e)},deregisterDocumentClickHandler:function(e){return document.removeEventListener("click",e)},getYParamsForItemAtIndex:function(t){var n=e.items[t],r=n.offsetTop,i=n.offsetHeight;return{top:r,height:i}},setTransitionDelayForItemAtIndex:function(t,n){return e.items[t].style.setProperty("transition-delay",n)},getIndexForEventTarget:function(t){return e.items.indexOf(t)},notifySelected:function(t){return e.emit("MDCSimpleMenu:selected",{index:t.index,item:e.items[t.index]})},notifyCancel:function(){return e.emit("MDCSimpleMenu:cancel")},saveFocus:function(){e.previousFocus_=document.activeElement},restoreFocus:function(){e.previousFocus_&&e.previousFocus_.focus()},isFocused:function(){return document.activeElement===e.root_},focus:function(){return e.root_.focus()},getFocusedItemIndex:function(){return e.items.indexOf(document.activeElement)},focusItemAtIndex:function(t){return e.items[t].focus()},isRtl:function(){return"rtl"===getComputedStyle(e.root_).getPropertyValue("direction")},setTransformOrigin:function(t){e.root_.style[(0,d.getTransformPropertyName)(window)+"-origin"]=t},setPosition:function(t){e.root_.style.left="left"in t?t.left:null,e.root_.style.right="right"in t?t.right:null,e.root_.style.top="top"in t?t.top:null,e.root_.style.bottom="bottom"in t?t.bottom:null}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(e){e?this.foundation_.open():this.foundation_.close()}},{key:"itemsContainer_",get:function(){return this.root_.querySelector(l.default.strings.ITEMS_SELECTOR)}},{key:"items",get:function(){var e=this.itemsContainer_;return[].slice.call(e.querySelectorAll(".mdc-list-item[role]"))}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(u.MDCComponent)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;ni){var l=Math.min((n-i)/this.xfDuration_,1);c=l*this.fgScale_}var d=s,f=Math.min(n/a,1),_=Math.max(u,1e3*f/o);return{transformDuration:d,opacityDuration:_,approxCurScale:c}}},{key:"animateBoundedDeactivation_",value:function(e,n){var r=void 0;r=n?(0,d.getNormalizedEventCoords)(e,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},r={x:r.x-this.initialSize_/2,y:r.y-this.initialSize_/2};var i={x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2},o=t.strings,a=o.VAR_FG_TRANSLATE_START,s=o.VAR_FG_TRANSLATE_END,u=t.cssClasses,l=u.BG_BOUNDED_ACTIVE_FILL,f=u.FG_BOUNDED_ACTIVE_FILL;this.adapter_.updateCssVariable(a,r.x+"px, "+r.y+"px"),this.adapter_.updateCssVariable(s,i.x+"px, "+i.y+"px"),this.cancelBgBounded_=(0,d.animateWithClass)(this.adapter_,l,(0,c.getCorrectEventName)(window,"transitionend")),this.cancelFgBounded_=(0,d.animateWithClass)(this.adapter_,f,(0,c.getCorrectEventName)(window,"animationend"))}},{key:"destroy",value:function(){var e=this;if(this.isSupported_){this.removeEventListeners_();var n=t.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame(function(){e.adapter_.removeClass(r),e.adapter_.removeClass(i),e.removeCssVars_()})}}},{key:"removeEventListeners_",value:function(){var e=this;this.listenerInfos_.forEach(function(t){Object.keys(t).forEach(function(n){e.adapter_.deregisterInteractionHandler(t[n],e.listeners_[n])})}),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"removeCssVars_",value:function(){var e=this,n=t.strings;Object.keys(n).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(n[t],null)})}},{key:"layout",value:function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){e.layoutInternal_(),e.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){this.frame_=this.adapter_.computeBoundingRect();var e=Math.max(this.frame_.height,this.frame_.width),n=Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2));this.initialSize_=e*t.numbers.INITIAL_ORIGIN_SCALE,this.maxRadius_=n+t.numbers.PADDING,this.fgScale_=this.maxRadius_/this.initialSize_,this.xfDuration_=1e3*Math.sqrt(this.maxRadius_/1024),this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var e=t.strings,n=e.VAR_SURFACE_WIDTH,r=e.VAR_SURFACE_HEIGHT,i=e.VAR_FG_SIZE,o=e.VAR_FG_UNBOUNDED_TRANSFORM_DURATION,a=e.VAR_LEFT,s=e.VAR_TOP,u=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.frame_.width+"px"),this.adapter_.updateCssVariable(r,this.frame_.height+"px"),this.adapter_.updateCssVariable(i,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.xfDuration_+"ms"),this.adapter_.updateCssVariable(u,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(a,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(s,this.unboundedCoords_.top+"px"))}}]),t}(u.MDCFoundation);t.default=_},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0&&this.adapter_.rmAttrForOptionAtIndex(this.selectedIndex_,"aria-selected"),this.selectedIndex_=e>=0&&e=0&&(n=this.adapter_.getTextForOptionAtIndex(this.selectedIndex_).trim(),this.adapter_.setAttrForOptionAtIndex(this.selectedIndex_,"aria-selected","true")),this.adapter_.setSelectedTextContent(n)}},{key:"isDisabled",value:function(){return this.disabled_}},{key:"setDisabled",value:function(e){var n=t.cssClasses.DISABLED;this.disabled_=e,this.disabled_?(this.adapter_.addClass(n),this.adapter_.setAttr("aria-disabled","true"),this.adapter_.makeUntabbable()):(this.adapter_.removeClass(n),this.adapter_.rmAttr("aria-disabled"),this.adapter_.makeTabbable())}},{key:"resize",value:function(){var e=this.adapter_.getComputedStyleValue("font"),t=parseFloat(this.adapter_.getComputedStyleValue("letter-spacing"));if(e)this.ctx_.font=e;else{var n=this.adapter_.getComputedStyleValue("font-family").split(",")[0],r=this.adapter_.getComputedStyleValue("font-size");this.ctx_.font=r+" "+n}for(var i=0,o=0,a=this.adapter_.getNumberOfOptions();ot;return c?s=0:l&&(s=Math.max(0,s-u)),{left:r+"px",top:s+"px",transformOrigin:"center "+a+"px"}}},{key:"close_",value:function(){var e=t.cssClasses.OPEN;this.adapter_.removeClass(e),this.adapter_.focus()}},{key:"handleDisplayViaKeyboard_",value:function(e){var t=2;if(e.eventPhase===t){var n="keydown"===e.type&&("Space"===e.key||32===e.keyCode);n&&e.preventDefault();var r=l.some(function(t){var n=t.key,r=t.keyCode,i=t.forType;return e.type===i&&(e.key===n||e.keyCode===r)});r&&this.displayHandler_(e)}}}]),t}(u.MDCFoundation);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCSelect=t.MDCSelectFoundation=void 0;var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(e){return new c.MDCSimpleMenu(e)};this.menuEl_=this.root_.querySelector(".mdc-select__menu"),this.menu_=e(this.menuEl_),this.selectedText_=this.root_.querySelector(".mdc-select__selected-text")}},{key:"getDefaultFoundation",value:function(){var e=this;return new d.default({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},setAttr:function(t,n){return e.root_.setAttribute(t,n)},rmAttr:function(t,n){return e.root_.removeAttribute(t,n)},computeBoundingRect:function(){return e.root_.getBoundingClientRect()},registerInteractionHandler:function(t,n){return e.root_.addEventListener(t,n)},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(t,n)},focus:function(){return e.root_.focus()},makeTabbable:function(){e.root_.tabIndex=0},makeUntabbable:function(){e.root_.tabIndex=-1},getComputedStyleValue:function(t){return window.getComputedStyle(e.root_).getPropertyValue(t)},setStyle:function(t,n){return e.root_.style.setProperty(t,n)},create2dRenderingContext:function(){return document.createElement("canvas").getContext("2d")},setMenuElStyle:function(t,n){return e.menuEl_.style.setProperty(t,n)},setMenuElAttr:function(t,n){return e.menuEl_.setAttribute(t,n)},rmMenuElAttr:function(t){return e.menuEl_.removeAttribute(t)},getMenuElOffsetHeight:function(){return e.menuEl_.offsetHeight},openMenu:function(t){return e.menu_.show({focusIndex:t})},isMenuOpen:function(){return e.menu_.open},setSelectedTextContent:function(t){e.selectedText_.textContent=t},getNumberOfOptions:function(){return e.options.length},getTextForOptionAtIndex:function(t){return e.options[t].textContent},setAttrForOptionAtIndex:function(t,n,r){return e.options[t].setAttribute(n,r)},rmAttrForOptionAtIndex:function(t,n){return e.options[t].removeAttribute(n)},getOffsetTopForOptionAtIndex:function(t){return e.options[t].offsetTop},registerMenuInteractionHandler:function(t,n){return e.menu_.listen(t,n)},deregisterMenuInteractionHandler:function(t,n){return e.menu_.unlisten(t,n)},notifyChange:function(){return e.emit("MDCSelect:change",e)},getWindowInnerHeight:function(){return window.innerHeight}})}},{key:"initialSyncWithDOM",value:function(){var e=this.selectedOptions[0],t=e?this.options.indexOf(e):-1;t>=0&&(this.selectedIndex=t),"true"===this.root_.getAttribute("aria-disabled")&&(this.disabled=!0)}},{key:"options",get:function(){return this.menu_.items}},{key:"selectedOptions",get:function(){return this.root_.querySelectorAll("[aria-selected]")}},{key:"selectedIndex",get:function(){return this.foundation_.getSelectedIndex()},set:function(e){this.foundation_.setSelectedIndex(e)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(e){this.foundation_.setDisabled(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(u.MDCComponent)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="mdc-snackbar",r=t.cssClasses={ROOT:n,TEXT:n+"__text",ACTION_WRAPPER:n+"__action-wrapper",ACTION_BUTTON:n+"__action-button",ACTIVE:n+"--active",MULTILINE:n+"--multiline",ACTION_ON_BOTTOM:n+"--action-on-bottom"};t.strings={get TEXT_SELECTOR(){return"."+r.TEXT},get ACTION_WRAPPER_SELECTOR(){return"."+r.ACTION_WRAPPER},get ACTION_BUTTON_SELECTOR(){return"."+r.ACTION_BUTTON}},t.numbers={MESSAGE_TIMEOUT:2750}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a(t.defaultAdapter,e)));return n.receivedUserInput_=!1,n.inputFocusHandler_=function(){return n.activateFocus_()},n.inputBlurHandler_=function(){return n.deactivateFocus_()},n.inputInputHandler_=function(){return n.autoCompleteFocus_()},n.inputKeydownHandler_=function(){return n.receivedUserInput_=!0},n}return o(t,e),s(t,null,[{key:"cssClasses",get:function(){return{ROOT:c,UPGRADED:c+"--upgraded",DISABLED:c+"--disabled",FOCUSED:c+"--focused",INVALID:c+"--invalid",HELPTEXT_PERSISTENT:c+"-helptext--persistent",HELPTEXT_VALIDATION_MSG:c+"-helptext--validation-msg",LABEL_FLOAT_ABOVE:c+"__label--float-above"}}},{key:"strings",get:function(){return{ARIA_HIDDEN:"aria-hidden",ROLE:"role"}}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},addClassToLabel:function(){},removeClassFromLabel:function(){},addClassToHelptext:function(){},removeClassFromHelptext:function(){},helptextHasClass:function(){return!1},registerInputFocusHandler:function(){},deregisterInputFocusHandler:function(){},registerInputBlurHandler:function(){},deregisterInputBlurHandler:function(){},registerInputInputHandler:function(){},deregisterInputInputHandler:function(){},registerInputKeydownHandler:function(){},deregisterInputKeydownHandler:function(){},setHelptextAttr:function(){},removeHelptextAttr:function(){},getNativeInput:function(){return{}}}}}]),s(t,[{key:"init",value:function(){this.adapter_.addClass(t.cssClasses.UPGRADED),this.adapter_.registerInputFocusHandler(this.inputFocusHandler_),this.adapter_.registerInputBlurHandler(this.inputBlurHandler_),this.adapter_.registerInputInputHandler(this.inputInputHandler_),this.adapter_.registerInputKeydownHandler(this.inputKeydownHandler_)}},{key:"destroy",value:function(){this.adapter_.removeClass(t.cssClasses.UPGRADED),this.adapter_.deregisterInputFocusHandler(this.inputFocusHandler_),this.adapter_.deregisterInputBlurHandler(this.inputBlurHandler_),this.adapter_.deregisterInputInputHandler(this.inputInputHandler_),this.adapter_.deregisterInputKeydownHandler(this.inputKeydownHandler_)}},{key:"activateFocus_",value:function(){var e=t.cssClasses,n=e.FOCUSED,r=e.LABEL_FLOAT_ABOVE;this.adapter_.addClass(n),this.adapter_.addClassToLabel(r),this.showHelptext_()}},{key:"autoCompleteFocus_",value:function(){this.receivedUserInput_||this.activateFocus_()}},{key:"showHelptext_",value:function(){var e=t.strings.ARIA_HIDDEN;this.adapter_.removeHelptextAttr(e)}},{key:"deactivateFocus_",value:function(){var e=t.cssClasses,n=e.FOCUSED,r=e.INVALID,i=e.LABEL_FLOAT_ABOVE,o=this.getNativeInput_(),a=o.checkValidity();this.adapter_.removeClass(n),o.value||(this.adapter_.removeClassFromLabel(i),this.receivedUserInput_=!1),a?this.adapter_.removeClass(r):this.adapter_.addClass(r),this.updateHelptextOnDeactivation_(a)}},{key:"updateHelptextOnDeactivation_",value:function(e){var n=t.cssClasses,r=n.HELPTEXT_PERSISTENT,i=n.HELPTEXT_VALIDATION_MSG,o=t.strings.ROLE,a=this.adapter_.helptextHasClass(r),s=this.adapter_.helptextHasClass(i),u=s&&!e;u?this.adapter_.setHelptextAttr(o,"alert"):this.adapter_.removeHelptextAttr(o),a||u||this.hideHelptext_()}},{key:"hideHelptext_",value:function(){var e=t.strings.ARIA_HIDDEN;this.adapter_.setHelptextAttr(e,"true")}},{key:"isDisabled",value:function(){return this.getNativeInput_().disabled}},{key:"setDisabled",value:function(e){var n=t.cssClasses.DISABLED;this.getNativeInput_().disabled=e,e?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"getNativeInput_",value:function(){return this.adapter_.getNativeInput()||{checkValidity:function(){return!0},value:"",disabled:!1}}}]),t}(u.MDCFoundation);t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MDCTextfield=t.MDCTextfieldFoundation=void 0;var s=Object.assign||function(e){for(var t=1;t-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){e.indexOf(n)===-1&&(e.push(n),t.push(o))},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1))}}}(),d=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){d=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(l=function(e){return e},l.destroy=function(e){return e},l.update=function(e){return e}):(l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},l.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=l}); (function($){ $(document).ready(function(){ window.cf7mdId=0; $('.cf7md-form').each(function(){ var $this=$(this); $this.siblings('p') .add($this.find('p')) .filter(function (){ return $.trim(this.innerHTML)=="" }).remove(); $('.cf7md-text, .cf7md-textarea').find('.wpcf7-validates-as-required').each(function(){ $(this).attr('required', 'required'); }); }); $('.cf7md-item').each(function(){ var $this=$(this), $span=$this.find('.wpcf7-form-control-wrap'); $this.find('br').remove(); $span.addClass('mdc-form-field cf'); }); $('.cf7md-text, .cf7md-textarea').each(function(){ var $this=$(this), $input=$this.find('input, textarea'), $span=$this.find('.wpcf7-form-control-wrap'), $tpl=$this.find('.cf7md-text-html').find('> div'), $label=$tpl.find('label'); $input.detach().prependTo($tpl); $tpl.detach().appendTo($span); $input.addClass('mdc-textfield__input'); $label.attr('for', $input.attr('name')); if($this.hasClass('cf7md-textarea-autosize')){ $input.attr('rows', '2'); autosize($input); }}); $('.cf7md-text [type="date"]').each(function(){ var $this=$(this); $this.change(function(){ if($this.val()!==''){ $this.addClass('cf7md-has-input'); }else{ $this.removeClass('cf7md-has-input'); }}); }); $('.cf7md-select').each(function(){ var $this=$(this), $select=$this.find('select'), label=$this.find('.cf7md-select-label').text(), $option1=$select.children('option').first(); if($select.hasClass('wpcf7-validates-as-required')){ label +='*'; } if($this.hasClass('cf7md-select--multi')){ $select.addClass('mdc-multi-select mdc-list'); $select.attr('size', '5'); }else{ $select.addClass('mdc-select'); if($option1.attr('value')===''){ $option1.text(label); }else{ $option1.before(''); }} }); $('.cf7md-checkbox, .cf7md-radio').each(function(){ var $this=$(this), type=$this.hasClass('cf7md-radio') ? 'radio':'checkbox', $items=$this.find('.wpcf7-list-item'), tpl=$this.find('.cf7md-' + type + '-html').html(); $items.each(function(){ var $item=$(this), $checkbox=$item.find('input'), $label=$item.find('.wpcf7-list-item-label'), $labelWrap=$label.parents('label'), label=$label.text(), $html=$(tpl).clone(), $wrap=$('
    '), mdcCheckbox=$wrap[0], id='cf7md' + ++cf7mdId; $checkbox.addClass('mdc-' + type + '__native-control').attr('id', id); $item.addClass('cf7md-' + type + '-item mdc-form-field cf'); $item.append($wrap); $label.remove(); $labelWrap.remove(); $checkbox.detach().appendTo($wrap); $wrap.append($html); $wrap.after(''); }); }); $('.cf7md-switch').each(function(){ var $this=$(this), type='switch', $items=$this.find('.wpcf7-list-item'), tpl=$this.find('.cf7md-switch-html').html(); $items.each(function(){ var $item=$(this), $checkbox=$item.find('input'), $label=$item.find('.wpcf7-list-item-label'), $labelWrap=$label.parents('label'), label=$label.text(), $html=$(tpl).clone(), $switch_wrap=$html.find('.mdc-switch'), id='cf7md' + ++cf7mdId, $newlabel=$(''); $checkbox.addClass('mdc-' + type + '__native-control').attr('id', id); $item.addClass('cf7md-' + type + '-item cf'); $item.append($html); $checkbox.detach().prependTo($switch_wrap); $newlabel.appendTo($html); $label.remove(); }); }); $('.cf7md-accept').each(function(){ var $this=$(this), $form=$this.closest('#cf7md-form'), $span=$this.find('.wpcf7-form-control-wrap'), $control=$span.find('.wpcf7-form-control'), $checkbox=$this.find('input'), $tpl=$this.find('.cf7md-checkbox-html').find('> div'), $mdWrap=$('
    '), $wrap=$('
    '), $label=$this.find('.cf7md-accept-label'), $cf7Label=$span.find('.wpcf7-list-item-label'), id='cf7md' + ++cf7mdId; if($cf7Label.length&&$cf7Label.html().length){ $label.html($cf7Label.html()); $cf7Label.detach(); } $mdWrap.addClass('mdc-form-field'); $checkbox.addClass('mdc-checkbox__native-control').attr('id', id); $span.append($mdWrap); $mdWrap.append($wrap); $checkbox.detach().appendTo($wrap); $wrap.append($tpl); $label.attr('for', id); $label.detach().insertAfter($wrap); if($this.hasClass('cf7md-is-wpcf7v5')){ $control.hide(); } $checkbox.click(function(){ toggleSubmit($form); }); toggleSubmit($form); }); function toggleSubmit($form){ if($form.find('.cf7md-accept').hasClass('cf7md-is-wpcf7v5')){ var $acceptances=$form.find('.wpcf7-acceptance'), $submit=$form.find('.cf7md-submit-btn'), $formTag=$form.closest('form.wpcf7-form'); if($formTag.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.removeAttr('disabled'); $acceptances.each(function(i, span){ var $span=$(span), $input=$span.closest('.wpcf7-form-control-wrap').find('input'); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.attr('disabled', 'disabled'); return false; }} }); }else{ var $acceptances=$form.find('input:checkbox.wpcf7-acceptance'), $submit=$form.find('.cf7md-submit-btn'); $submit.removeAttr('disabled'); $acceptances.each(function(i, node){ $this=$(node); if($this.hasClass('wpcf7-invert')&&$this.is(':checked') || ! $this.hasClass('wpcf7-invert')&&! $this.is(':checked')){ $submit.attr('disabled', 'disabled'); }}); }} $('.cf7md-file').each(function(){ var $this=$(this), $file=$this.find('[type="file"]'), $value=$this.find('.cf7md-file--value'), $btn=$this.find('.cf7md-file--btn'), $label=$this.find('.cf7md-label--static'), $wrap=$this.find('.cf7md-file--label'), $error=$this.find('.wpcf7-not-valid-tip'); $error.detach().insertAfter($wrap); $value.css({ paddingLeft: $btn.outerWidth() + 12 + 'px', top: $btn.outerHeight() / 2 + 'px' }); if($file.val()){ fileName=$file.val().split('\\').pop(); $value.text(fileName); } $file.on('change', function(e){ if(e.target.value){ fileName=e.target.value.split('\\').pop(); $value.text(fileName); }}); }); function cf7mdQuiz(refresh){ $('.cf7md-quiz').each(function(){ var $this=$(this), $input=$this.find('.wpcf7-quiz'), $newInput=$input.clone(), $span=$this.find('.wpcf7-form-control-wrap'), $tpl=$this.find('.mdc-textfield'), $label=$tpl.find('label'), $question=$this.find('.wpcf7-quiz-label'), $cf7label=$span.find('> label'); $label.attr('for', $input.attr('name')); $label.text($question.text()); $question.hide(); $input.detach().prependTo($tpl); $question.detach().prependTo($tpl); $tpl.detach().appendTo($span); $input.addClass('mdc-textfield__input'); $cf7label.hide(); }); } cf7mdQuiz(false); $(window).on('wpcf7submit', function(e){ cf7mdQuiz(true); }); $('.cf7md-submit').each(function(){ var $this=$(this), $form=$this.closest('#cf7md-form'), $inputs=$this.find('input, button'); $inputs.each(function(){ var $input=$(this), $val=$input.is('input') ? $input.attr('value'):$input.text(), $svg=$this.find('svg'), $btn=$(''); $btn.addClass($input[0].className); $btn.attr('id', $input.attr('id')); $btn.attr('type', $input.attr('type')); $btn.attr('data-mdc-auto-init', 'MDCRipple'); $btn.addClass('cf7md-submit-btn mdc-button mdc-button--raised mdc-button--primary mdc-ripple-surface'); $input.replaceWith($btn); if($input.attr('type')==='submit'){ toggleSubmit($form); $btn.click(function(){ var $spinner=$(this).parents('.cf7md-submit').find('.ajax-loader'); $svg.detach().appendTo($spinner); }); }}); }); setTimeout(function(){ $('.mdc-textfield').each(function(){ var $label=$(this).find('.mdc-textfield__label'), $field=$(this).find('.mdc-textfield__input'), val=$field.val(); if(val){ $label.addClass('mdc-textfield__label--float-above'); }}); }, 200); function conditionalFieldGroupToggled(event){ $('.cf7md-file').each(function(){ var $this=$(this), $file=$this.find('[type="file"]'), $value=$this.find('.cf7md-file--value'), $btn=$this.find('.cf7md-file--btn'); $value.css({ paddingLeft: $btn.outerWidth() + 12 + 'px', top: $btn.outerHeight() / 2 + 'px' }); }); } var MutationObserver=(function (){ var prefixes=['WebKit', 'Moz', 'O', 'Ms', ''] for(var i=0; i < prefixes.length; i++){ if(prefixes[i] + 'MutationObserver' in window){ return window[prefixes[i] + 'MutationObserver']; }} return false; }()); if(MutationObserver){ var groups=$('[data-class="wpcf7cf_group"]') groups.each(function(i, element){ var observer=new MutationObserver(conditionalFieldGroupToggled); observer.observe(element, { attributes: true, attributeFilter: ['class'], childList: false, characterData: false }); }) } if(typeof ajax_object!=='undefined'){ $('.cf7md-hide-customize-message').click(function(e){ e.preventDefault(); $(this).closest('.cf7md-admin-customize-message').hide(); $.post(ajax_object.ajax_url, { action: 'cf7md_close_customize_link' }, function(response){ console.log('Close link response: ', response) }); }); } window.mdc.autoInit(); }); }(jQuery)); !function(){"use strict";function e(e){function t(t,n){var s,h,k=t==window,y=n&&n.message!==undefined?n.message:undefined;if(!(n=e.extend({},e.blockUI.defaults,n||{})).ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=y===undefined?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&"string"!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,g={};e(t).data("blockUI.history",g),g.el=m,g.parent=m.parentNode,g.display=m.style.display,g.position=m.style.position,g.parent&&g.parent.removeChild(m)}e(t).data("blockUI.onUnblock",n.onUnblock);var v,I,w,U,x=n.baseZ;v=e(r||n.forceIframe?'':''),I=e(n.theme?'':''),n.theme&&k?(U='"):n.theme?(U='"):U=k?'':'',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&v.css("opacity",0);var C=[v,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=a(t,"borderTopWidth"),T=a(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';o.setExpression("top",i)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&v.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):d(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,d=e(t),a=d.data("blockUI.history"),c=d.data("blockUI.timeout");c&&(clearTimeout(c),d.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var r;r=l?e(document.body).children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0==--s&&n(r,a,o,t)})):n(r,a,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(d,n,s):e(document).unbind(d,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,d=e(t.target);return d.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),d.parents("div."+s.blockMsgClass).length>0||0===d.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[!0===e?b.length-1:0];t&&t.focus()}}function d(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-a(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-a(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function a(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('
    ');t&&s.append("

    "+t+"

    "),o&&s.append("

    "+o+"

    "),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"

    Please wait...

    ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(); jQuery(function(o){if("undefined"==typeof wc_add_to_cart_params)return!1;function t(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),o(document.body).on("click",".add_to_cart_button",{addToCartHandler:this},this.onAddToCart).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart removed_from_cart",{addToCartHandler:this},this.updateFragments)}t.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},t.prototype.run=function(){var t=this,a=t.requests[0].complete;t.requests[0].complete=function(){"function"==typeof a&&a(),t.requests.shift(),0'+wc_add_to_cart_params.i18n_view_cart+""),o(document.body).trigger("wc_cart_button_updated",[e]))},t.prototype.updateFragments=function(t,a){a&&(o.each(a,function(t){o(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),o.each(a,function(t,a){o(t).replaceWith(a),o(t).stop(!0).css("opacity","1").unblock()}),o(document.body).trigger("wc_fragments_loaded"))},new t}); (function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};o.zoom=function(t,n,e,i){var u,c,a,r,m,l,s,f=o(t),h=f.css("position"),d=o(n);return t.style.position=/(absolute|fixed)/.test(h)?h:"relative",t.style.overflow="hidden",e.style.width=e.style.height="",o(e).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:e.width*i,height:e.height*i,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){c=f.outerWidth(),u=f.outerHeight(),n===t?(r=c,a=u):(r=d.outerWidth(),a=d.outerHeight()),m=(e.width-c)/r,l=(e.height-u)/a,s=d.offset()},move:function(o){var t=o.pageX-s.left,n=o.pageY-s.top;n=Math.max(Math.min(n,a),0),t=Math.max(Math.min(t,r),0),e.style.left=t*-m+"px",e.style.top=n*-l+"px"}}},o.fn.zoom=function(n){return this.each(function(){var e=o.extend({},t,n||{}),i=e.target&&o(e.target)[0]||this,u=this,c=o(u),a=document.createElement("img"),r=o(a),m="mousemove.zoom",l=!1,s=!1;if(!e.url){var f=u.querySelector("img");if(f&&(e.url=f.getAttribute("data-src")||f.currentSrc||f.src),!e.url)return}c.one("zoom.destroy",function(o,t){c.off(".zoom"),i.style.position=o,i.style.overflow=t,a.onload=null,r.remove()}.bind(this,i.style.position,i.style.overflow)),a.onload=function(){function t(t){f.init(),f.move(t),r.stop().fadeTo(o.support.opacity?e.duration:0,1,o.isFunction(e.onZoomIn)?e.onZoomIn.call(a):!1)}function n(){r.stop().fadeTo(e.duration,0,o.isFunction(e.onZoomOut)?e.onZoomOut.call(a):!1)}var f=o.zoom(i,u,a,e.magnify);"grab"===e.on?c.on("mousedown.zoom",function(e){1===e.which&&(o(document).one("mouseup.zoom",function(){n(),o(document).off(m,f.move)}),t(e),o(document).on(m,f.move),e.preventDefault())}):"click"===e.on?c.on("click.zoom",function(e){return l?void 0:(l=!0,t(e),o(document).on(m,f.move),o(document).one("click.zoom",function(){n(),l=!1,o(document).off(m,f.move)}),!1)}):"toggle"===e.on?c.on("click.zoom",function(o){l?n():t(o),l=!l}):"mouseover"===e.on&&(f.init(),c.on("mouseenter.zoom",t).on("mouseleave.zoom",n).on(m,f.move)),e.touch&&c.on("touchstart.zoom",function(o){o.preventDefault(),s?(s=!1,n()):(s=!0,t(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),f.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}).on("touchend.zoom",function(o){o.preventDefault(),s&&(s=!1,n())}),o.isFunction(e.callback)&&e.callback.call(a)},a.setAttribute("role","presentation"),a.alt="",a.src=e.url})},o.fn.zoom.defaults=t})(window.jQuery); !function(m){var a=!0;m.flexslider=function(g,e){var h=m(g);"undefined"==typeof e.rtl&&"rtl"==m("html").attr("dir")&&(e.rtl=!0),h.vars=m.extend({},m.flexslider.defaults,e);var t,c=h.vars.namespace,S=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,u=("ontouchstart"in window||S||window.DocumentTouch&&document instanceof DocumentTouch)&&h.vars.touch,l="click touchend MSPointerUp keyup",d="",x="vertical"===h.vars.direction,y=h.vars.reverse,b=0'),1").attr("href","#").text(n),"thumbnails"===h.vars.controlNav&&(e=m("").attr("src",t.attr("data-thumb"))),""!==t.attr("data-thumb-alt")&&e.attr("alt",t.attr("data-thumb-alt")),"thumbnails"===h.vars.controlNav&&!0===h.vars.thumbCaptions){var r=t.attr("data-thumbcaption");if(""!==r&&undefined!==r){var s=m("").addClass(c+"caption").text(r);e.append(s)}}var o=m("
  • ");e.appendTo(o),o.append("
  • "),h.controlNavScaffold.append(o),n++}h.controlsContainer?m(h.controlsContainer).append(h.controlNavScaffold):h.append(h.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),h.controlNavScaffold.delegate("a, img",l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(h.direction=a>h.currentSlide?"next":"prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},setupManual:function(){h.controlNav=h.manualControls,p.controlNav.active(),h.controlNav.bind(l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(a>h.currentSlide?h.direction="next":h.direction="prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===h.vars.controlNav?"img":"a";h.controlNav=m("."+c+"control-nav li "+e,h.controlsContainer?h.controlsContainer:h)},active:function(){h.controlNav.removeClass(c+"active").eq(h.animatingTo).addClass(c+"active")},update:function(e,t){1'+h.count+"")):1===h.pagingCount?h.controlNavScaffold.find("li").remove():h.controlNav.eq(t).closest("li").remove(),p.controlNav.set(),1
  • '+h.vars.prevText+'
  • '+h.vars.nextText+"
  • ");h.customDirectionNav?h.directionNav=h.customDirectionNav:h.controlsContainer?(m(h.controlsContainer).append(e),h.directionNav=m("."+c+"direction-nav li a",h.controlsContainer)):(h.append(e),h.directionNav=m("."+c+"direction-nav li a",h)),p.directionNav.update(),h.directionNav.bind(l,function(e){var t;e.preventDefault(),""!==d&&d!==e.type||(t=m(this).hasClass(c+"next")?h.getTarget("next"):h.getTarget("prev"),h.flexAnimate(t,h.vars.pauseOnAction)),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(){var e=c+"disabled";1===h.pagingCount?h.directionNav.addClass(e).attr("tabindex","-1"):h.vars.animationLoop?h.directionNav.removeClass(e).removeAttr("tabindex"):0===h.animatingTo?h.directionNav.removeClass(e).filter("."+c+"prev").addClass(e).attr("tabindex","-1"):h.animatingTo===h.last?h.directionNav.removeClass(e).filter("."+c+"next").addClass(e).attr("tabindex","-1"):h.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=m('
    ');h.controlsContainer?(h.controlsContainer.append(e),h.pausePlay=m("."+c+"pauseplay a",h.controlsContainer)):(h.append(e),h.pausePlay=m("."+c+"pauseplay a",h)),p.pausePlay.update(h.vars.slideshow?c+"pause":c+"play"),h.pausePlay.bind(l,function(e){e.preventDefault(),""!==d&&d!==e.type||(m(this).hasClass(c+"pause")?(h.manualPause=!0,h.manualPlay=!1,h.pause()):(h.manualPause=!1,h.manualPlay=!0,h.play())),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(e){"play"===e?h.pausePlay.removeClass(c+"pause").addClass(c+"play").html(h.vars.playText):h.pausePlay.removeClass(c+"play").addClass(c+"pause").html(h.vars.pauseText)}},touch:function(){var i,r,s,o,l,d,e,n,c,u=!1,t=0,a=0,v=0;if(S){g.style.msTouchAction="none",g._gesture=new MSGesture,(g._gesture.target=g).addEventListener("MSPointerDown",function p(e){e.stopPropagation(),h.animating?e.preventDefault():(h.pause(),g._gesture.addPointer(e.pointerId),v=0,o=x?h.h:h.w,d=Number(new Date),s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o)},!1),g._slider=h,g.addEventListener("MSGestureChange",function m(e){e.stopPropagation();var t=e.target._slider;if(!t)return;var a=-e.translationX,n=-e.translationY;if(v+=x?n:a,l=(t.vars.rtl?-1:1)*v,u=x?Math.abs(v)o/2)?t.flexAnimate(n,t.vars.pauseOnAction):w||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=l=r=i=null,v=0},!1)}else e=function(e){h.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(h.pause(),o=x?h.h:h.w,d=Number(new Date),t=e.touches[0].pageX,a=e.touches[0].pageY,s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o,i=x?a:t,r=x?t:a,g.addEventListener("touchmove",n,!1),g.addEventListener("touchend",c,!1))},n=function(e){t=e.touches[0].pageX,a=e.touches[0].pageY,l=x?i-a:(h.vars.rtl?-1:1)*(i-t);(!(u=x?Math.abs(l)o/2)?h.flexAnimate(a,h.vars.pauseOnAction):w||h.flexAnimate(h.currentSlide,h.vars.pauseOnAction,!0)}g.removeEventListener("touchend",c,!1),s=l=r=i=null},g.addEventListener("touchstart",e,!1)},resize:function(){!h.animating&&h.is(":visible")&&(b||h.doMath(),w?p.smoothHeight():b?(h.slides.width(h.computedW),h.update(h.pagingCount),h.setProps()):x?(h.viewport.height(h.h),h.setProps(h.h,"setTotal")):(h.vars.smoothHeight&&p.smoothHeight(),h.newSlides.width(h.computedW),h.setProps(h.computedW,"setTotal")))},smoothHeight:function(e){if(!x||w){var t=w?h:h.viewport;e?t.animate({height:h.slides.eq(h.animatingTo).innerHeight()},e):t.innerHeight(h.slides.eq(h.animatingTo).innerHeight())}},sync:function(e){var t=m(h.vars.sync).data("flexslider"),a=h.animatingTo;switch(e){case"animate":t.flexAnimate(a,h.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=m(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=p.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){p.pauseInvisible.isHidden()?h.startTimeout?clearTimeout(h.startTimeout):h.pause():h.started?h.play():0h.currentSlide?"next":"prev"),v&&1===h.pagingCount&&(h.direction=h.currentItemh.limit&&1!==h.visible?h.limit:l):0===h.currentSlide&&e===h.count-1&&h.vars.animationLoop&&"next"!==h.direction?y?(h.count+h.cloneOffset)*d:0:h.currentSlide===h.last&&0===e&&h.vars.animationLoop&&"prev"!==h.direction?y?0:(h.count+1)*d:y?(h.count-1-e+h.cloneOffset)*d:(e+h.cloneOffset)*d,h.setProps(o,"",h.vars.animationSpeed),h.transitions?(h.vars.animationLoop&&h.atEnd||(h.animating=!1,h.currentSlide=h.animatingTo),h.container.unbind("webkitTransitionEnd transitionend"),h.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(h.ensureAnimationEnd),h.wrapup(d)}),clearTimeout(h.ensureAnimationEnd),h.ensureAnimationEnd=setTimeout(function(){h.wrapup(d)},h.vars.animationSpeed+100)):h.container.animate(h.args,h.vars.animationSpeed,h.vars.easing,function(){h.wrapup(d)})}h.vars.smoothHeight&&p.smoothHeight(h.vars.animationSpeed)}},h.wrapup=function(e){w||b||(0===h.currentSlide&&h.animatingTo===h.last&&h.vars.animationLoop?h.setProps(e,"jumpEnd"):h.currentSlide===h.last&&0===h.animatingTo&&h.vars.animationLoop&&h.setProps(e,"jumpStart")),h.animating=!1,h.currentSlide=h.animatingTo,h.vars.after(h)},h.animateSlides=function(){!h.animating&&a&&h.flexAnimate(h.getTarget("next"))},h.pause=function(){clearInterval(h.animatedSlides),h.animatedSlides=null,h.playing=!1,h.vars.pausePlay&&p.pausePlay.update("play"),h.syncExists&&p.sync("pause")},h.play=function(){h.playing&&clearInterval(h.animatedSlides),h.animatedSlides=h.animatedSlides||setInterval(h.animateSlides,h.vars.slideshowSpeed),h.started=h.playing=!0,h.vars.pausePlay&&p.pausePlay.update("pause"),h.syncExists&&p.sync("play")},h.stop=function(){h.pause(),h.stopped=!0},h.canAdvance=function(e,t){var a=v?h.pagingCount-1:h.last;return!!t||(v&&h.currentItem===h.count-1&&0===e&&"prev"===h.direction||(!v||0!==h.currentItem||e!==h.pagingCount-1||"next"===h.direction)&&((e!==h.currentSlide||v)&&(!!h.vars.animationLoop||(!h.atEnd||0!==h.currentSlide||e!==a||"next"===h.direction)&&(!h.atEnd||h.currentSlide!==a||0!==e||"next"!==h.direction))))},h.getTarget=function(e){return"next"===(h.direction=e)?h.currentSlide===h.last?0:h.currentSlide+1:0===h.currentSlide?h.last:h.currentSlide-1},h.setProps=function(e,t,a){var n,i=(n=e||(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo,function(){if(b)return"setTouch"===t?e:y&&h.animatingTo===h.last?0:y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:h.animatingTo===h.last?h.limit:n;switch(t){case"setTotal":return y?(h.count-1-h.currentSlide+h.cloneOffset)*e:(h.currentSlide+h.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return y?e:h.count*e;case"jumpStart":return y?h.count*e:e;default:return e}}()*(h.vars.rtl?1:-1)+"px");h.transitions&&(i=x?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)",a=a!==undefined?a/1e3+"s":"0s",h.container.css("-"+h.pfx+"-transition-duration",a),h.container.css("transition-duration",a)),h.args[h.prop]=i,(h.transitions||a===undefined)&&h.container.css(h.args),h.container.css("transform",i)},h.setup=function(e){var t,a;w?(h.vars.rtl?h.slides.css({width:"100%","float":"right",marginLeft:"-100%",position:"relative"}):h.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(u?h.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+h.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(h.currentSlide).css({opacity:1,zIndex:2}):0==h.vars.fadeFirstSlide?h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).css({opacity:1}):h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).animate({opacity:1},h.vars.animationSpeed,h.vars.easing)),h.vars.smoothHeight&&p.smoothHeight()):("init"===e&&(h.viewport=m('
    ').css({overflow:"hidden",position:"relative"}).appendTo(h).append(h.container),h.cloneCount=0,h.cloneOffset=0,y&&(a=m.makeArray(h.slides).reverse(),h.slides=m(a),h.container.empty().append(h.slides))),h.vars.animationLoop&&!b&&(h.cloneCount=2,h.cloneOffset=1,"init"!==e&&h.container.find(".clone").remove(),h.container.append(p.uniqueID(h.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(p.uniqueID(h.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),h.newSlides=m(h.vars.selector,h),t=y?h.count-1-h.currentSlide+h.cloneOffset:h.currentSlide+h.cloneOffset,x&&!b?(h.container.height(200*(h.count+h.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){h.newSlides.css({display:"block"}),h.doMath(),h.viewport.height(h.h),h.setProps(t*h.h,"init")},"init"===e?100:0)):(h.container.width(200*(h.count+h.cloneCount)+"%"),h.setProps(t*h.computedW,"init"),setTimeout(function(){h.doMath(),h.vars.rtl?h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"right",display:"block"}):h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"left",display:"block"}),h.vars.smoothHeight&&p.smoothHeight()},"init"===e?100:0)));b||h.slides.removeClass(c+"active-slide").eq(h.currentSlide).addClass(c+"active-slide"),h.vars.init(h)},h.doMath=function(){var e=h.slides.first(),t=h.vars.itemMargin,a=h.vars.minItems,n=h.vars.maxItems;h.w=h.viewport===undefined?h.width():h.viewport.width(),h.isFirefox&&(h.w=h.width()),h.h=e.height(),h.boxPadding=e.outerWidth()-e.width(),b?(h.itemT=h.vars.itemWidth+t,h.itemM=t,h.minW=a?a*h.itemT:h.w,h.maxW=n?n*h.itemT-t:h.w,h.itemW=h.minW>h.w?(h.w-t*(a-1))/a:h.maxWh.w?h.w:h.vars.itemWidth,h.visible=Math.floor(h.w/h.itemW),h.move=0h.w?h.itemW*(h.count-1)+t*(h.count-1):(h.itemW+t)*h.count-h.w-t):(h.itemW=h.w,h.itemM=t,h.pagingCount=h.count,h.last=h.count-1),h.computedW=h.itemW-h.boxPadding,h.computedM=h.itemM},h.update=function(e,t){h.doMath(),b||(eh.controlNav.length?p.controlNav.update("add"):("remove"===t&&!b||h.pagingCounth.last&&(h.currentSlide-=1,h.animatingTo-=1),p.controlNav.update("remove",h.last))),h.vars.directionNav&&p.directionNav.update()},h.addSlide=function(e,t){var a=m(e);h.count+=1,h.last=h.count-1,x&&y?t!==undefined?h.slides.eq(h.count-t).after(a):h.container.prepend(a):t!==undefined?h.slides.eq(t).before(a):h.container.append(a),h.update(t,"add"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.added(h)},h.removeSlide=function(e){var t=isNaN(e)?h.slides.index(m(e)):e;h.count-=1,h.last=h.count-1,isNaN(e)?m(e,h.slides).remove():x&&y?h.slides.eq(h.last).remove():h.slides.eq(e).remove(),h.doMath(),h.update(t,"remove"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.removed(h)},p.init()},m(window).blur(function(e){a=!1}).focus(function(e){a=!0}),m.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},m.fn.flexslider=function(n){if(n===undefined&&(n={}),"object"==typeof n)return this.each(function(){var e=m(this),t=n.selector?n.selector:".slides > li",a=e.find(t);1===a.length&&!1===n.allowOneSlide||0===a.length?(a.fadeIn(400),n.start&&n.start(e)):e.data("flexslider")===undefined&&new m.flexslider(this,n)});var e=m(this).data("flexslider");switch(n){case"play":e.play();break;case"pause":e.pause();break;case"stop":e.stop();break;case"next":e.flexAnimate(e.getTarget("next"),!0);break;case"prev":case"previous":e.flexAnimate(e.getTarget("prev"),!0);break;default:"number"==typeof n&&e.flexAnimate(n,!0)}}}(jQuery); !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f0&&(g=parseInt(g[1],10),g>=1&&g<8&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(i<4.4&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;n<4;n++){c=m[n];for(var o=0;o<3;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;hb-1?a-b:a<0?b+a:a},Ba={},Ca=function(a,b){return Ba[a]||(Ba[a]=[]),Ba[a].push(b)},Da=function(a){var b=Ba[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;df.currItem.fitRatio?ya||(mc(f.currItem,!1,!0),ya=!0):ya&&(mc(f.currItem),ya=!1)),Ga(ea,pa.x,pa.y,s))},Ia=function(a){a.container&&Ga(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ja=function(a,b){b[E]=u+a+"px, 0px"+v},Ka=function(a,b){if(!i.loop&&b){var c=m+(ta.x*ra-a)/ta.x,d=Math.round(a-tb.x);(c<0&&d>0||c>=ac()-1&&d<0)&&(a=tb.x+d*i.mainScrollEndFriction)}tb.x=a,Ja(a,n)},La=function(a,b){var c=ub[a]-sa[a];return oa[a]+na[a]+c-c*(b/t)},Ma=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Na=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Oa=null,Pa=function(){Oa&&(e.unbind(document,"mousemove",Pa),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Da("mouseUsed")),Oa=setTimeout(function(){Oa=null},100)},Qa=function(){e.bind(document,"keydown",f),N.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Pa),e.bind(window,"resize scroll orientationchange",f),Da("bindEvents")},Ra=function(){e.unbind(window,"resize scroll orientationchange",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Pa),N.transform&&e.unbind(f.scrollWrap,"click",f),V&&e.unbind(window,p,f),clearTimeout(O),Da("unbindEvents")},Sa=function(a,b){var c=ic(f.currItem,qa,a);return b&&(da=c),c},Ta=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ua=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Va=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=La(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ha=function(){if(ea){var a=ea,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=pa.x+"px",a.top=pa.y+"px"}}},Xa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Ya=function(a){a&&(Y||X||fa||T)&&(a.preventDefault(),a.stopPropagation())},Za=function(){f.setScrollOffset(0,e.getScrollY())},$a={},_a=0,ab=function(a){$a[a]&&($a[a].raf&&I($a[a].raf),_a--,delete $a[a])},bb=function(a){$a[a]&&ab(a),$a[a]||(_a++,$a[a]={})},cb=function(){for(var a in $a)$a.hasOwnProperty(a)&&ab(a)},db=function(a,b,c,d,e,f,g){var h,i=Ea();bb(a);var j=function(){if($a[a]){if(h=Ea()-i,h>=d)return ab(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),$a[a].raf=H(j)}};j()},eb={shout:Da,listen:Ca,viewportSize:qa,options:i,isMainScrollAnimating:function(){return fa},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return V},isZooming:function(){return aa},setScrollOffset:function(a,b){sa.x=a,M=sa.y=b,Da("updateScrollOffset",sa)},applyZoomPan:function(a,b,c,d){pa.x=b,pa.y=c,s=a,Ha(d)},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),J=a.className,j=!0,N=e.detectFeatures(),H=N.raf,I=N.caf,E=N.transform,L=N.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=y=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],y[0].el.style.display=y[2].el.style.display="none",Wa(),r={resize:f.updateSize,orientationchange:function(){clearTimeout(O),O=setTimeout(function(){qa.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:Za,keydown:Xa,click:Ya};var d=N.isOldIOSPhone||N.isOldAndroid||N.isMobileOpera;for(N.animationName&&N.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;c=ac())&&(m=0),f.currItem=_b(m),(N.isOldIOSPhone||N.isOldAndroid)&&(va=!1),a.setAttribute("aria-hidden","false"),i.modal&&(va?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===M&&(Da("initialLayout"),M=K=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=G?"pswp--touch":"pswp--notouch",l+=N.animationName?" pswp--css_animation":"",l+=N.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,ua=null,c=0;cda.min.x?a=da.min.x:ada.min.y?b=da.min.y:b=h&&(o+=ua+(ua>0?-h:h),c=h);for(var d=0;d0?(b=y.shift(),y[h-1]=b,o++,Ja((o+2)*ta.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=y.pop(),y.unshift(b),o--,Ja(o*ta.x,b.el.style),f.setContent(b,m+c-d-1-1));if(ea&&1===Math.abs(ua)){var e=_b(z);e.initialZoomLevel!==s&&(ic(e,qa),mc(e),Ia(e))}ua=0,f.updateCurrZoomItem(),z=m,Da("afterChange")}}},updateSize:function(b){if(!va&&i.modal){var c=e.getScrollY();if(M!==c&&(a.style.top=c+"px",M=c),!b&&xa.x===window.innerWidth&&xa.y===window.innerHeight)return;xa.x=window.innerWidth,xa.y=window.innerHeight,a.style.height=xa.y+"px"}if(qa.x=f.scrollWrap.clientWidth,qa.y=f.scrollWrap.clientHeight,Za(),ta.x=qa.x+Math.round(qa.x*i.spacing),ta.y=qa.y,Ka(ta.x*ra),Da("beforeResize"),void 0!==o){for(var d,g,j,k=0;k2&&(j=Aa(j)),g=_b(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):d.index===-1&&j>=0&&f.setContent(d,j),g&&g.container&&(ic(g,qa),mc(g),Ia(g));x=!1}t=s=f.currItem.initialZoomLevel,da=f.currItem.bounds,da&&(pa.x=da.center.x,pa.y=da.center.y,Ha(!0)),Da("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,ub.x=Math.abs(b.x)-pa.x,ub.y=Math.abs(b.y)-pa.y,Ma(oa,pa));var g=Sa(a,!1),h={};Va("x",g,h,a),Va("y",g,h,a);var i=s,j={x:pa.x,y:pa.y};Na(h);var k=function(b){1===b?(s=a,pa.x=h.x,pa.y=h.y):(s=(a-i)*b+i,pa.x=(h.x-j.x)*b+j.x,pa.y=(h.y-j.y)*b+j.y),f&&f(b),Ha(1===b)};c?db("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},fb=30,gb=10,hb={},ib={},jb={},kb={},lb={},mb=[],nb={},ob=[],pb={},qb=0,rb=ma(),sb=0,tb=ma(),ub=ma(),vb=ma(),wb=function(a,b){return a.x===b.x&&a.y===b.y},xb=function(a,b){return Math.abs(a.x-b.x)-1)&&(b(a)?a:Cb(a.parentNode,b)))},Db={},Eb=function(a,b){return Db.prevent=!Cb(a.target,i.isClickableElement),Da("preventDragEvent",a,b,Db),Db.prevent},Fb=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Gb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Hb=function(a,b,c){if(a-Q>50){var d=ob.length>2?ob.shift():{};d.x=b,d.y=c,ob.push(d),Q=a}},Ib=function(){var a=pa.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(qa.y/2))},Jb={},Kb={},Lb=[],Mb=function(a){for(;Lb.length>0;)Lb.pop();return F?(la=0,mb.forEach(function(a){0===la?Lb[0]=a:1===la&&(Lb[1]=a),la++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Lb[0]=Fb(a.touches[0],Jb),a.touches.length>1&&(Lb[1]=Fb(a.touches[1],Kb))):(Jb.x=a.pageX,Jb.y=a.pageY,Jb.id="",Lb[0]=Jb),Lb},Nb=function(a,b){var c,d,e,g,h=0,j=pa[a]+b[a],k=b[a]>0,l=tb.x+b.x,m=tb.x-nb.x;return c=j>da.min[a]||jda.min[a]&&(c=i.panEndFriction,h=da.min[a]-j,d=da.min[a]-oa[a]),(d<=0||m<0)&&ac()>1?(g=l,m<0&&l>nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j)):(j0)&&ac()>1?(g=l,m>0&&lf.currItem.fitRatio&&(pa[a]+=b[a]*c)):(void 0!==g&&(Ka(g,!0),$=g!==nb.x),da.min.x!==da.max.x&&(void 0!==e?pa.x=e:$||(pa.x+=b.x*c)),void 0!==g)},Ob=function(a){if(!("mousedown"===a.type&&a.button>0)){if($b)return void a.preventDefault();if(!U||"mousedown"!==a.type){if(Eb(a,!0)&&a.preventDefault(),Da("pointerDown"),F){var b=e.arraySearch(mb,a.pointerId,"id");b<0&&(b=mb.length),mb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Mb(a),d=c.length;_=null,cb(),V&&1!==d||(V=ha=!0,e.bind(window,p,f),S=ka=ia=T=$=Y=W=X=!1,ga=null,Da("firstTouchStart",c),Ma(oa,pa),na.x=na.y=0,Ma(kb,c[0]),Ma(lb,kb),nb.x=ta.x*ra,ob=[{x:kb.x,y:kb.y}],Q=P=Ea(),Sa(s,!0),zb(),Ab()),!aa&&d>1&&!fa&&!$&&(t=s,X=!1,aa=W=!0,na.y=na.x=0,Ma(oa,pa),Ma(hb,c[0]),Ma(ib,c[1]),Gb(hb,ib,vb),ub.x=Math.abs(vb.x)-pa.x,ub.y=Math.abs(vb.y)-pa.y,ba=ca=yb(hb,ib))}}},Pb=function(a){if(a.preventDefault(),F){var b=e.arraySearch(mb,a.pointerId,"id");if(b>-1){var c=mb[b];c.x=a.pageX,c.y=a.pageY}}if(V){var d=Mb(a);if(ga||Y||aa)_=d;else if(tb.x!==ta.x*ra)ga="h";else{var f=Math.abs(d[0].x-kb.x)-Math.abs(d[0].y-kb.y);Math.abs(f)>=gb&&(ga=f>0?"h":"v",_=d)}}},Qb=function(){if(_){var a=_.length;if(0!==a)if(Ma(hb,_[0]),jb.x=hb.x-kb.x,jb.y=hb.y-kb.y,aa&&a>1){if(kb.x=hb.x,kb.y=hb.y,!jb.x&&!jb.y&&wb(_[1],ib))return;Ma(ib,_[1]),X||(X=!0,Da("zoomGestureStarted"));var b=yb(hb,ib),c=Vb(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ka=!0);var d=1,e=Ta(),g=Ua();if(c1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);d<0&&(d=0),ba=b,Gb(hb,ib,rb),na.x+=rb.x-vb.x,na.y+=rb.y-vb.y,Ma(vb,rb),pa.x=La("x",c),pa.y=La("y",c),S=c>s,s=c,Ha()}else{if(!ga)return;if(ha&&(ha=!1,Math.abs(jb.x)>=gb&&(jb.x-=_[0].x-lb.x),Math.abs(jb.y)>=gb&&(jb.y-=_[0].y-lb.y)),kb.x=hb.x,kb.y=hb.y,0===jb.x&&0===jb.y)return;if("v"===ga&&i.closeOnVerticalDrag&&!Bb()){na.y+=jb.y,pa.y+=jb.y;var k=Ib();return T=!0,Da("onVerticalDrag",k),Fa(k),void Ha()}Hb(Ea(),hb.x,hb.y),Y=!0,da=f.currItem.bounds;var l=Nb("x",jb);l||(Nb("y",jb),Na(pa),Ha())}}},Rb=function(a){if(N.isOldAndroid){if(U&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(U),U=setTimeout(function(){U=0},600))}Da("pointerUp"),Eb(a,!1)&&a.preventDefault();var b;if(F){var c=e.arraySearch(mb,a.pointerId,"id");if(c>-1)if(b=mb.splice(c,1)[0],navigator.msPointerEnabled){var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}else b.type=a.pointerType||"mouse"}var g,h=Mb(a),j=h.length;if("mouseup"===a.type&&(j=0),2===j)return _=null,!0;1===j&&Ma(lb,h[0]),0!==j||ga||fa||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Da("touchRelease",a,b));var k=-1;if(0===j&&(V=!1,e.unbind(window,p,f),zb(),aa?k=0:sb!==-1&&(k=Ea()-sb)),sb=1===j?Ea():-1,g=k!==-1&&k<150?"zoom":"swipe",aa&&j<2&&(aa=!1,1===j&&(g="zoomPointerUp"),Da("zoomGestureEnded")),_=null,Y||X||fa||T)if(cb(),R||(R=Sb()),R.calculateSwipeSpeed("x"),T){var l=Ib();if(lf.currItem.fitRatio&&Tb(R))}},Sb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){ob.length>1?(a=Ea()-Q+50,b=ob[ob.length-2][d]):(a=Ea()-P,b=lb[d]),c.lastFlickOffset[d]=kb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(pa[a]>da.min[a]?c.backAnimDestination[a]=da.min[a]:pa[a]fb&&(h||b.lastFlickOffset.x>20)?d=-1:g<-fb&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,m<0?(m=i.loop?ac()-1:0,j=!0):m>=ac()&&(m=i.loop?0:ac()-1,j=!0),j&&!i.loop||(ua+=d,ra-=d,c=!0));var k,l=ta.x*ra,n=Math.abs(l-tb.x);return c||l>tb.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,qb===m&&(c=!1),fa=!0,Da("mainScrollAnimStart"),db("mainScroll",tb.x,l,k,e.easing.cubic.out,Ka,function(){cb(),fa=!1,qb=-1,(c||qb!==m)&&f.updateCurrItem(),Da("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Vb=function(a){return 1/ca*a*t},Wb=function(){var a=s,b=Ta(),c=Ua();sc&&(a=c);var d,g=1,h=ja;return ia&&!S&&!ka&&s1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=G,r[A]=Ob,r[B]=Pb,r[C]=Rb,D&&(r[D]=r[C]),N.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[A],r.mousemove=r[B],r.mouseup=r[C]),G||(i.allowPanToNext=!1)}}});var Xb,Yb,Zb,$b,_b,ac,bc,cc=function(b,c,d,g){Xb&&clearTimeout(Xb),$b=!0,Zb=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){ab("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Fa(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Da("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),$b=!1};if(!j||!h||void 0===h.x)return Da("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),a.style.opacity=d?0:1,Fa(1),void(j?setTimeout(function(){k()},j):k());var n=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,pa.x=h.x,pa.y=h.y-K,f[g?"template":"bg"].style.opacity=.001,Ha()),bb("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Xb=setTimeout(function(){if(Da("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:pa.x,y:pa.y},l=s,m=ja,n=function(b){1===b?(s=f,pa.x=h.x,pa.y=h.y-M):(s=(f-l)*b+l,pa.x=(h.x-i.x)*b+i.x,pa.y=(h.y-M-i.y)*b+i.y),Ha(),g?a.style.opacity=1-b:Fa(m-b*m)};c?db("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Xb=setTimeout(k,j+20))}else s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),Fa(1),g?a.style.opacity=1:Fa(1),Xb=setTimeout(k,j+20)},d?25:90)};n()},dc={},ec=[],fc={index:0,errorMsg:'
    The image could not be loaded.
    ',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Yb.length}},gc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},hc=function(a,b,c){var d=a.bounds;d.center.x=Math.round((dc.x-b)/2),d.center.y=Math.round((dc.y-c)/2)+a.vGap.top,d.max.x=b>dc.x?Math.round(dc.x-b):d.center.x,d.max.y=c>dc.y?Math.round(dc.y-c)+a.vGap.top:d.center.y,d.min.x=b>dc.x?0:d.center.x,d.min.y=c>dc.y?a.vGap.top:d.center.y},ic=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Da("parseVerticalMargin",a)),dc.x=b.x,dc.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=dc.x/a.w,f=dc.y/a.h;a.fitRatio=e1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=gc())}if(!c)return;return hc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=gc(),a.initialPosition=a.bounds.center,a.bounds},jc=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,mc(b,d,b===f.currItem&&ya),c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},kc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},lc=function(a,b){if(a.src&&a.loadError&&a.container)return b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0},mc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},nc=function(){if(ec.length){for(var a,b=0;b=0,e=Math.min(c[0],ac()),g=Math.min(c[1],ac());for(b=1;b<=(d?g:e);b++)f.lazyLoadItem(m+b);for(b=1;b<=(d?e:g);b++)f.lazyLoadItem(m-b)}),Ca("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ca("mainScrollAnimComplete",nc),Ca("initialZoomInEnd",nc),Ca("destroy",function(){for(var a,b=0;b=0&&(void 0!==Yb[a]&&Yb[a])},allowProgressiveImg:function(){return i.forceProgressiveLoading||!G||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=Aa(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Da("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),lc(g),ic(g,qa),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=g.src,mc(g,d),jc(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(a&&a.index===b){if(lc(c,!0))return c.loadComplete=c.img=null,ic(c,qa),Ia(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!$b&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):N.transform&&(fa||$b)?ec.push({item:c,baseDiv:h,img:c.img,index:b,holder:a,clearPlaceholder:!0}):jc(b,c,h,c.img,fa||$b,!0)}c.loadComplete=null,c.img=null,Da("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),mc(g,l),h.appendChild(l),g.placeholder=l}g.loading||kc(g),f.allowProgressiveImg()&&(!Zb&&N.transform?ec.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):jc(b,g,h,g.img,!0,!0))}Zb||b!==m?Ia(g):(ea=h.style,cc(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var oc,pc={},qc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};za("Tap",{publicMethods:{initTap:function(){Ca("firstTouchStart",f.onTapStart),Ca("touchRelease",f.onTapRelease),Ca("destroy",function(){pc={},oc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(oc),oc=null)},onTapRelease:function(a,b){if(b&&!Y&&!W&&!_a){var c=b;if(oc&&(clearTimeout(oc),oc=null,xb(c,pc)))return void Da("doubleTap",c);if("mouse"===b.type)return void qc(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void qc(a,b);Ma(pc,c),oc=setTimeout(function(){qc(a,b),oc=null},300)}}}});var rc;za("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(G?Ca("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){rc={};var c="wheel mousewheel DOMMouseScroll";Ca("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ca("unbindEvents",function(){rc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),s<1?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ca("resize",g),Ca("afterChange",g),Ca("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ca("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.modal&&(!i.closeOnScroll||_a||V?a.preventDefault():E&&Math.abs(a.deltaY)>2&&(l=!0,f.close())),!0;if(a.stopPropagation(),rc.x=0,"deltaX"in a)1===a.deltaMode?(rc.x=18*a.deltaX,rc.y=18*a.deltaY):(rc.x=a.deltaX,rc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(rc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?rc.y=-.16*a.wheelDeltaY:rc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;rc.y=a.detail}Sa(s,!0);var b=pa.x-rc.x,c=pa.y-rc.y;(i.modal||b<=da.min.x&&b>=da.max.x&&c<=da.min.y&&c>=da.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:qa.x/2+sa.x,y:qa.y/2+sa.y};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec={history:!0,galleryUID:1},Fc=function(){return Cc.hash.substring(1)},Gc=function(){sc&&clearTimeout(sc),uc&&clearTimeout(uc)},Hc=function(){var a=Fc(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c-1&&(yc=yc.substring(0,b),"&"===yc.slice(-1)&&(yc=yc.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Fc()===yc?(Ac=!0,void f.close()):void(vc||(wc=!0,f.goTo(Hc().pid),wc=!1))},updateURL:function(){Gc(),wc||(zc?sc=setTimeout(Ic,800):Ic())}}}),e.extend(f,eb)};return a}); !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g