text: void 0===window.tribe&&(window.tribe={}),window.tribe.tickets=window.tribe.tickets||{},window.tribe.dialogs=window.tribe.dialogs||{},window.tribe.dialogs.events=window.tribe.dialogs.events||{},window.tribe.tickets.block={num_attendees:0,event:{}},function(t,e,i){e.selector={blockFooter:".tribe-tickets__footer",blockFooterAmount:".tribe-amount",blockFooterQuantity:".tribe-tickets__footer__quantity__number",blockSubmit:"#tribe-tickets__submit",classicSubmit:"#tribe-tickets__buy",container:"#tribe-tickets",hidden:"tribe-common-a11y-hidden",item:".tribe-tickets__item",itemExtraAvailable:".tribe-tickets__item__extra__available",itemExtraAvailableQuantity:".tribe-tickets__item__extra__available__quantity",itemOptOut:".tribe-tickets-attendees-list-optout--wrapper",itemOptOutInput:"#tribe-tickets-attendees-list-optout-",itemPrice:".tribe-tickets__sale_price .tribe-amount",itemQuantity:".tribe-tickets__item__quantity",itemQuantityInput:".tribe-tickets-quantity",loader:".tribe-common-c-loader",submit:".tribe-tickets__buy",ticketLoader:".tribe-tickets-loader__tickets-block",validationNotice:".tribe-tickets__notice--error",ticketInCartNotice:"#tribe-tickets__notice__tickets-in-cart",horizontal_datepicker:{container:".tribe_horizontal_datepicker__container",select:".tribe_horizontal_datepicker__container select",day:".tribe_horizontal_datepicker__day",month:".tribe_horizontal_datepicker__month",year:".tribe_horizontal_datepicker__year",value:".tribe_horizontal_datepicker__value"}};const o=t(e.selector.container);0!==o.length&&(e.document=t(document),e.modalSelector={cartForm:".tribe-modal__wrapper--ar #tribe-modal__cart",container:".tribe-modal__wrapper--ar",form:"#tribe-tickets__modal-form",itemRemove:".tribe-tickets__item__remove",itemTotal:".tribe-tickets__item__total .tribe-amount",loader:".tribe-tickets-loader__modal",metaField:".ticket-meta",metaForm:".tribe-modal__wrapper--ar #tribe-modal__attendee_registration",metaItem:".tribe-ticket",submit:".tribe-block__tickets__item__attendee__fields__footer_submit"},e.commerceSelector={edd:"Tribe__Tickets_Plus__Commerce__EDD__Main",rsvp:"Tribe__Tickets__RSVP",tpp:"Tribe__Tickets__Commerce__PayPal__Main",Tribe__Tickets__Commerce__PayPal__Main:"tribe-commerce",Tribe__Tickets__RSVP:"rsvp",Tribe__Tickets_Plus__Commerce__EDD__Main:"edd",Tribe__Tickets_Plus__Commerce__WooCommerce__Main:"woo",tribe_eddticket:"Tribe__Tickets_Plus__Commerce__EDD__Main",tribe_tpp_attendees:"Tribe__Tickets__Commerce__PayPal__Main",tribe_wooticket:"Tribe__Tickets_Plus__Commerce__WooCommerce__Main",woo:"Tribe__Tickets_Plus__Commerce__WooCommerce__Main"},e.tribe_ticket_provider=o.data("provider"),e.postId=TribeTicketOptions.post_id,e.init=function(){0<TribeTicketOptions.availability_check_interval&&e.checkAvailability(),TribeTicketOptions.ajax_preload_ticket_form&&(e.loaderShow(),e.initPrefill()),e.disable(t(e.selector.submit),!0)},e.updateAvailability=function(i){Object.keys(i).forEach(function(o){const r=i[o].available,a=i[o].max_purchase,n=t(e.selector.item+'[data-ticket-id="'+o+'"]');if(0===r){const t=i[o].unavailable_html;n.attr("available",!1),n.removeClass("instock"),n.removeClass("purchasable"),n.find(e.selector.itemQuantity).html(t),n.find(e.selector.itemExtraAvailable).html("")}1<r&&(n.find(e.selector.itemQuantityInput).attr({max:a}),n.find(e.selector.itemExtraAvailableQuantity).html(r))})},e.updateFooter=function(t){e.updateFooterCount(t),e.updateFooterAmount(t),t.find(".tribe-tickets__footer").addClass("tribe-tickets__footer--active")},e.updateFooterCount=function(i){const o=i.find(e.selector.blockFooter+" "+e.selector.blockFooterQuantity);let r=0;i.find(e.selector.item+" "+e.selector.itemQuantityInput).each(function(){let e=parseInt(t(this).val(),10);e=isNaN(e)?0:e,r+=e});const a=0>=r;e.disable(t(e.selector.submit),a),0>r||o.text(r)},e.updateFooterAmount=function(i){const o=i.find(e.selector.blockFooter+" "+e.selector.blockFooterAmount);let r=0;i.find(e.selector.item+" "+e.selector.itemQuantityInput).each(function(){const i=t(this).closest(e.selector.item).find(e.selector.itemPrice).first();let o=parseInt(t(this).val(),10);o=isNaN(o)?0:o;let a=i.text();a=e.cleanNumber(a),r+=a*o}),0>r||o.text(e.numberFormat(r))},e.updateFormTotals=function(t){e.updateFooter(t),e.appendARFields(t)},e.updateItem=function(i,o,r){const a={};if(a.id=i,r){a.qty=e.getQty(r),a.price=e.getPrice(o),o.find(e.selector.itemQuantityInput).val(a.qty).trigger("change");const i=e.selector.itemOptOutInput+r.data("ticket-id");a.$optOut=t(i);const n=t(i+"-modal");a.$optOut.length&&a.$optOut.is(":checked")?n.val("1"):n.val("0")}else a.qty=e.getQty(o),a.price=e.getPrice(o);return e.updateTotal(a.qty,a.price,o),a},e.updateTotal=function(t,i,o){const r=(t*i).toFixed(e.getCurrencyFormatting().number_of_decimals);return o.find(e.modalSelector.itemTotal).text(e.numberFormat(r)),r},e.maybeShowNonMetaNotice=function(i){let o=0,r=0;const a=i.find(e.selector.item).filter(function(){return t(this).find(e.selector.itemQuantityInput).val()>0});if(!a.length)return;a.each(function(){const i=t(this),a=i.closest(e.selector.item).data("ticket-id");t(e.modalSelector.metaForm).find('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+a+'"]').length?r+=e.getQty(i):o+=e.getQty(i)});const n=t(".tribe-tickets__notice--non-ar"),c=t(".tribe-tickets__item__attendee__fields__title");0<o&&0<r?(t("#tribe-tickets__non-ar-count").text(o),n.removeClass("tribe-common-a11y-hidden"),c.show()):(n.addClass("tribe-common-a11y-hidden"),c.hide())},e.getRestEndpoint=function(){return TribeCartEndpoint.url},e.getTickets=function(){return t(e.selector.item).map(function(){return t(this).data("ticket-id")}).get()},e.maybeShowOptOut=function(t,i){if(t.has(e.selector.itemOptOut).length){const o=t.closest(e.selector.item);0<i?o.addClass("show-optout"):o.removeClass("show-optout")}},e.appendARFields=function(i){i.find(e.selector.item).each(function(){const i=t(this);if(i.is(":visible")){const o=i.closest(e.selector.item).data("ticket-id"),r=t(e.modalSelector.metaForm).find('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+o+'"]');if(!r.length)return;const a=r.find(e.modalSelector.metaItem),n=e.getQty(i);if(0>=n)return r.removeClass("tribe-tickets--has-tickets"),void r.find(e.modalSelector.metaItem).remove();if(a.length>n){const t=a.length-n;r.find(".tribe-ticket:nth-last-child( -n+"+t+" )").remove()}else if(a.length<n){const t=window.wp.template("tribe-registration--"+o),i=0<a.length?a.length+1:1;r.addClass("tribe-tickets--has-tickets");for(let o=i;o<=n;o++){const i={attendee_id:o};r.append(t(i)),e.maybeHydrateAttendeeBlockFromLocal(a.length)}}}}),e.maybeShowNonMetaNotice(i),e.loaderHide(),e.document.trigger("tribe-ar-fields-appended")},e.stepUp=function(t,i){const o=t.attr("max")?Number(t.attr("max")):-1,r=t.attr("step")?Number(t.attr("step")):1;let a=-1===o||o>=i+r?i+r:o;const n=t.closest(e.selector.item);if("true"===n.attr("data-has-shared-cap")){const t=n.closest("form");a=e.checkSharedCapacity(t,a)}if(0!==a)if(0>a)t[0].value=i+a;else if("function"==typeof t[0].stepUp)try{if(o<i+r)return;t[0].stepUp()}catch(e){t.val(a)}else t.val(a)},e.stepDown=function(t,e){const i=t.attr("min")?Number(t.attr("min")):0,o=t.attr("step")?Number(t.attr("step")):1,r=i<=e-o&&0<e-o?e-o:i;if("function"==typeof t[0].stepDown)try{t[0].stepDown()}catch(e){t[0].value=r}else t[0].value=r},e.checkAvailability=function(){const i={action:"ticket_availability_check",tickets:e.getTickets()};t.post(TribeTicketOptions.ajaxurl,i,function(t){if(!t.success)return;const i=t.data.tickets;e.updateAvailability(i)}),0<TribeTicketOptions.availability_check_interval&&setTimeout(e.checkAvailability,TribeTicketOptions.availability_check_interval)},e.checkSharedCapacity=function(i,o){let r=[],a=[];const n=i.find(e.selector.item).filter('[data-has-shared-cap="true"]'),c=n.find(e.selector.itemQuantityInput);if(!n.length)return o;n.each(function(){r.push(parseInt(t(this).attr("data-shared-cap"),10))}),c.each(function(){a.push(parseInt(t(this).val(),10))}),r=Math.max.apply(this,r),a=a.reduce(function(t,e){return t+e},0);const s=r-a;return Math.min(s,o)},e.getQty=function(t){const i=parseInt(t.find(e.selector.itemQuantityInput).val(),10);return isNaN(i)?0:i},e.getPrice=function(t){const i=e.cleanNumber(t.find(e.selector.itemPrice).first().text());return isNaN(i)?0:i},e.getCurrencyFormatting=function(){return JSON.parse(TribeCurrency.formatting)[e.tribe_ticket_provider]},e.cleanNumber=function(t){let i=t;const o=e.getCurrencyFormatting();if(0===parseInt(o.number_of_decimals)&&""===o.thousands_sep)return i;if(o.thousands_sep===o.decimal_point){const t=i.length-(o.number_of_decimals+1);i=i.substr(0,t)+"_"+i.substr(t+1),""!==o.thousands_sep&&(i=i.split(o.thousands_sep).join("")),i=i.split("_").join(".")}else""!==o.thousands_sep&&(i=i.split(o.thousands_sep).join("")),""!==o.decimal_point&&(i=i.split(o.decimal_point).join("."));return i},e.numberFormat=function(t){const i=e.getCurrencyFormatting();if(!i)return!1;const o=i.number_of_decimals,r=i.decimal_point,a=i.thousands_sep,n=isFinite(+t)?+t:0,c=isFinite(+o)?Math.abs(o):0,s=void 0===a?",":a,l=void 0===r?".":r,d=function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i};let _=(c?d(n,c):Math.round(n)).toString().split(l);return"."===i.thousands_sep&&(_=(c?d(n,c):Math.round(n)).toString().split(".")),_[0].length>3&&(_[0]=_[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(_[1]||"").length<c&&(_[1]=_[1]||"",_[1]+=new Array(c-_[1].length+1).join("0")),_.join(l)},e.focusTicketBlock=function(i){t(i).closest(e.modalSelector.metaItem).addClass("tribe-ticket-item__has-focus")},e.unfocusTicketBlock=function(i){t(i).closest(e.modalSelector.metaItem).removeClass("tribe-ticket-item__has-focus")},e.loaderShow=function(i){const o=i||e.selector.ticketLoader;t(e.selector.loader).filter(o).removeClass(e.selector.hidden)},e.loaderHide=function(i){const o=i||e.selector.ticketLoader;t(e.selector.loader).filter(o).addClass(e.selector.hidden)},e.disable=function(t,e){e?t.prop("disabled",!0).attr({disabled:"true","aria-disabled":"true"}):t.prop("disabled",!1).removeProp("disabled").removeAttr("disabled aria-disabled")},e.initPrefill=function(){e.prefillTicketsBlock()},e.initModalFormPrefills=function(){e.loaderShow(e.modalSelector.loader),t.when(e.getData()).then(function(i){e.prefillModalCartForm(t(e.modalSelector.cartForm)),i.meta&&t.each(i.meta,function(t){o.find('[data-ticket-id="'+t.ticket_id+'"]').length&&e.prefillModalMetaForm(i.meta)});const r=e.getLocal();r.meta&&e.prefillModalMetaForm(r.meta),window.setTimeout(e.loaderHide,500,e.modalSelector.loader)})},e.prefillModalMetaForm=function(i){if(void 0===i||0>=i.length)return;const o=t(e.modalSelector.metaForm).find(".tribe-tickets__item__attendee__fields__container");t.each(i,function(i,r){let a=0;const n=o.find(e.modalSelector.metaItem).filter('[data-ticket-id="'+r.ticket_id+'"]');n.length&&t.each(r.items,function(e,i){"object"==typeof i&&(t.each(i,function(e,i){const o=n.eq(a).find('[name*="'+e+'"]');o.is(":radio")||o.is(":checkbox")?o.each(function(){const e=t(this);i===e.val()&&e.prop("checked",!0)}):o.val(i)}),a++)})}),e.loaderHide(e.modalSelector.loader)},e.prefillModalCartForm=function(i){i.find(e.selector.item).hide();const r=o.find(e.selector.item);t.each(r,function(e,o){const r=t(o),a=i.find('[data-ticket-id="'+r.attr("data-ticket-id")+'"]');if(a){0<r.find(".tribe-tickets-quantity").val()&&a.fadeIn()}}),e.appendARFields(i),e.loaderHide(e.modalSelector.loader)},e.prefillTicketsBlock=function(){t.when(e.getData(!0)).then(function(i){const o=i.tickets;if(o.length){let i=0;o.forEach(function(o){const r=t('.tribe-tickets__item[data-ticket-id="'+o.ticket_id+'"]');if("true"===r.attr("data-available")){const t=r.find(e.selector.itemQuantityInput),a=r.find(e.selector.itemOptOutInput+o.ticket_id);t.length&&(t.val(o.quantity),t.trigger("change"),i+=o.quantity,1===parseInt(o.optout,10)&&a.prop("checked","true"))}}),0<i&&t(e.selector.ticketInCartNotice).fadeIn()}e.loaderHide()},function(){const i=t(e.selector.ticketInCartNotice);i.removeClass("tribe-tickets__notice--barred tribe-tickets__notice--barred-left").addClass("tribe-tickets__notice--error"),i.find(".tribe-tickets-notice__title").text(TribeMessages.api_error_title),i.find(".tribe-tickets-notice__content").text(TribeMessages.connection_error),i.fadeIn(),e.loaderHide()})},e.storeLocal=function(){const t=e.getMetaForSave();sessionStorage.setItem("tribe_tickets_attendees-"+e.postId,window.JSON.stringify(t));const i=e.getTicketsForCart();sessionStorage.setItem("tribe_tickets_cart-"+e.postId,window.JSON.stringify(i))},e.getLocal=function(t){const i=t||e.postId,o=window.JSON.parse(sessionStorage.getItem("tribe_tickets_attendees-"+i)),r=window.JSON.parse(sessionStorage.getItem("tribe_tickets_cart-"+i)),a={};return a.meta=o,a.tickets=r,a},e.clearLocal=function(t){const i=t||e.postId;sessionStorage.removeItem("tribe_tickets_attendees-"+i),sessionStorage.removeItem("tribe_tickets_cart-"+i)},e.maybeHydrateAttendeeBlockFromLocal=function(i){t.when(e.getData()).then(function(o){if(!o.meta)return;const r=o.meta.length;if(i<r)return void e.prefillModalMetaForm(o.meta);const a=t(e.modalSelector.metaForm).find(e.modalSelector.metaItem).slice(i-1);a&&a.find(e.modalSelector.metaField).each(function(){const e=t(this),i=e.attr("name"),r=o[i];r&&e.val(r)})})},e.getTicketsForCart=function(){const i=[];let o=t(e.modalSelector.cartForm);return o.length||(o=t(e.selector.container)),o.find(e.selector.item).each(function(){const o=t(this),r=o.data("ticketId"),a=o.find(e.selector.itemQuantityInput).val(),n=o.find('[name="attendee[optout]"]');let c=n.val();n.is(":checkbox")&&(c=n.prop("checked")?1:0);const s={};s.ticket_id=r,s.quantity=a,s.optout=c,i.push(s)}),i},e.getMetaForSave=function(){const i=t(e.modalSelector.metaForm).find(e.modalSelector.metaItem),o=[],r=[];return i.each(function(){const i={},o=t(this),a=o.data("ticketId"),n=o.find(e.modalSelector.metaField);n.length&&(r[a]||(r[a]={},r[a].ticket_id=a,r[a].items=[]),n.each(function(){const e=t(this);let o=e.val();const r=e.is(":radio");let a=e.attr("name");if(a=(a=a.split("[")).pop().replace("]",""),(r||e.is(":checkbox"))&&!e.prop("checked")){if(r&&""!==i[a])return;o=""}i[a]=o}),r[a].items.push(i))}),Object.keys(r).forEach(function(t){const e={ticket_id:t,items:r[t].items};o.push(e)}),o},e.getData=function(i){let r={meta:{},tickets:{}};const a=t.Deferred(),n=window.JSON.parse(sessionStorage.getItem("tribe_tickets_attendees-"+e.postId));if(null!==n&&(r.meta=n),!i){const t=window.JSON.parse(sessionStorage.getItem("tribe_tickets_cart-"+e.postId));null!==t&&t.length&&(r.tickets=t),a.resolve(r)}return r.tickets&&r.meta||t.ajax({type:"GET",data:{provider:o.data("providerId"),post_id:e.postId},dataType:"json",url:e.getRestEndpoint(),success:function(t){null===n&&sessionStorage.setItem("tribe_tickets_attendees-"+e.postId,window.JSON.stringify(t.meta)),sessionStorage.setItem("tribe_tickets_cart-"+e.postId,window.JSON.stringify(t.tickets)),r={meta:t.meta,tickets:t.tickets},a.resolve(r)},error:function(){a.reject(!1)}}),a.promise()},e.validateForm=function(i){const o=i.find(e.modalSelector.metaItem);let r=!0,a=0;return o.each(function(){const i=t(this);e.validateBlock(i)||(a++,r=!1)}),[r,a]},e.validateBlock=function(i){const o=i.find(e.modalSelector.metaField);let r=!0;return o.each(function(){const i=t(this);e.validateField(i[0])||(r=!1)}),r?i.removeClass("tribe-ticket-item__has-error"):i.addClass("tribe-ticket-item__has-error"),r},e.validateCheckboxRadioGroup=function(t){const e=t.find("input:checked").length,i=t.find("input:required").length;return!!(!i||i&&e)},e.validateHorizontalDatePickerValue=function(t){if(""===t.val()||"null-null-null"===t.val())return!0;const i=t.closest(e.selector.horizontal_datepicker.container),o=i.find(e.selector.horizontal_datepicker.day),r=i.find(e.selector.horizontal_datepicker.month),a=i.find(e.selector.horizontal_datepicker.year);let n=!0;return[o,r,a].forEach(function(t){isNaN(parseInt(t.val()))||parseInt(t.val())<=0?(t.addClass("ticket-meta__has-error"),n=!1):t.removeClass("ticket-meta__has-error")},n),n},e.validateField=function(i){let o=t(i),r=i.checkValidity();if(!r)if((o=t(i)).is(":checkbox")||o.is(":radio")){const t=o.closest(".tribe-common-form-control-checkbox-radio-group");t.length&&(r=e.validateCheckboxRadioGroup(t))}else r=!1;return o.is(e.selector.horizontal_datepicker.value)&&(r=e.validateHorizontalDatePickerValue(o)),r?o.removeClass("ticket-meta__has-error"):o.addClass("ticket-meta__has-error"),r},e.document.on("click",".tribe-tickets__item__quantity__remove, .tribe-tickets__item__quantity__add",function(i){i.preventDefault();const o=t(this).parent().find('input[type="number"]');if(o.is(":disabled"))return!1;const r=Number(o[0].value),a=o.closest(e.modalSelector.cartForm);if(t(this).hasClass("tribe-tickets__item__quantity__add")?e.stepUp(o,r):e.stepDown(o,r),e.updateFooter(o.closest("form")),r!==o[0].value&&o.trigger("change"),a.length){const t=o.closest(e.selector.item);e.updateTotal(e.getQty(t),e.getPrice(t),t)}}),e.document.on("click",e.modalSelector.itemRemove,function(i){i.preventDefault();const o={},r=t(this).closest("form"),a=t(this).closest(e.selector.item);a.find(e.selector.itemQuantity).val(0),a.fadeOut(),o.id=a.data("ticketId"),o.qty=0,a.find(e.selector.itemQuantityInput).val(o.qty),o.price=e.getPrice(a),e.updateTotal(o.qty,o.price,a),e.updateFormTotals(r),t('.tribe-tickets__item__attendee__fields__container[data-ticket-id="'+o.id+'"]').removeClass("tribe-tickets--has-tickets").find(e.modalSelector.metaItem).remove(),window.setTimeout(e.maybeShowNonMetaNotice,500,r),window.setTimeout(function(){if(0>=r.find(e.selector.item).filter(":visible").length){const i=t(e.selector.blockSubmit).attr("data-content"),o="dialog_obj_"+i.substring(i.lastIndexOf("-")+1);window[o].hide(),e.disable(t(e.selector.submit),!1)}},500)}),e.document.on("focus",".tribe-ticket .ticket-meta",function(t){const i=t.target;e.focusTicketBlock(i)}),e.document.on("blur",".tribe-ticket .ticket-meta",function(t){const i=t.target;e.unfocusTicketBlock(i)}),e.document.on("change keyup",e.selector.itemQuantityInput,function(i){const o=t(i.target),r=o.closest(e.selector.item),a=o.closest("form"),n=o.attr("max");let c=0,s=parseInt(o.val(),10);n<(s=isNaN(s)?0:s)&&(s=n,o.val(n)),"true"===r.attr("data-has-shared-cap")&&(c=e.checkSharedCapacity(a,s)),0>c&&(s+=c,o.val(s)),i.preventDefault(),e.maybeShowOptOut(r,s),e.updateFooter(a),e.updateFormTotals(a)}),e.document.on("beforeunload",function(){window.tribe.tickets.modal_redirect?e.clearLocal():e.storeLocal()}),e.document.on("keypress",e.modalSelector.form,function(i){if(13===i.keyCode){const o=t(i.target).closest(e.modalSelector.form);if("undefined"===o)return;i.preventDefault(),i.stopPropagation(),o.find('[name="cart-button"]').click()}}),e.document.on("click",e.modalSelector.submit,function(i){i.preventDefault();const o=t(this),r=t(e.modalSelector.form),a=t(e.modalSelector.metaForm),n=e.validateForm(a),c=t(e.selector.validationNotice),s=o.attr("name"),l=r.data("provider");if(e.loaderShow(e.modalSelector.loader),!n[0])return c.find(".tribe-tickets-notice__title").text(TribeMessages.validation_error_title),c.find("p").html(TribeMessages.validation_error),t(e.selector.validationNotice+"__count").text(n[1]),c.show(),e.loaderHide(e.modalSelector.loader),document.getElementById("tribe-tickets__notice__attendee-modal").scrollIntoView({behavior:"smooth",block:"start"}),!1;c.hide(),e.loaderShow(e.modalSelector.loader);let d=TribeTicketsURLs.checkout[l];-1!==s.indexOf("cart")&&(d=TribeTicketsURLs.cart[l]),t(e.modalSelector.form).attr("action",d);const _={tribe_tickets_provider:e.commerceSelector[e.tribe_ticket_provider],tribe_tickets_tickets:e.getTicketsForCart(),tribe_tickets_meta:e.getMetaForSave(),tribe_tickets_post_id:e.postId};t("#tribe_tickets_ar_data").val(JSON.stringify(_)),window.tribe.tickets.modal_redirect=!0,e.clearLocal(),r.submit()}),e.document.on("click",e.selector.classicSubmit,function(i){i.preventDefault();const o=t(e.selector.container);e.loaderShow(e.selector.loader);const r={tribe_tickets_provider:e.commerceSelector[e.tribe_ticket_provider],tribe_tickets_tickets:e.getTicketsForCart(),tribe_tickets_meta:{},tribe_tickets_post_id:e.postId};o.find("#tribe_tickets_block_ar_data").val(JSON.stringify(r)),o.submit()}),e.document.on("keypress",e.selector.itemQuantityInput,function(t){if(13===t.keyCode)return t.preventDefault(),void t.stopPropagation()}),t(i).on("tribe_dialog_show_ar_modal",function(){e.loaderShow(),e.loaderShow(e.modalSelector.loader);const i=t(e.modalSelector.cartForm);o.find(e.selector.item).each(function(){const o=t(this),r=o.data("ticketId"),a=i.find('[data-ticket-id="'+r+'"]');a&&e.updateItem(r,a,o)}),e.initModalFormPrefills(),e.updateFormTotals(i),e.loaderHide(),e.loaderHide(e.modalSelector.loader)}),t(i).on("tribe_dialog_close_ar_modal",function(){e.storeLocal()}),e.init(),window.addEventListener("pageshow",function(t){(t.persisted||void 0!==window.performance&&2===window.performance.navigation.type)&&e.init()}))}(jQuery,window.tribe.tickets.block,window.tribe.dialogs.events);