PageSourceSearch

https://www.bakgoed.nl/wp-content/plugins/et-core-plugin/packages/xstore-waitlist/assets/js/script.min.js

js bakgoed.nl collected 2026-10-02 07:11:01 UTC 16,048 bytes, 1 lines download raw bytes

1!function(S){"use strict";etTheme.autoinit.XStoreWaitlist=etTheme.XStoreWaitlist=function(){if("undefined"==typeof Cookies)return;etTheme.xstore_waitlist={};var u="xstore-waitlist",m=xstore_waitlist_params.waitlist_id,i=null,_=0,n=0,l=0,c=etTheme.et_global.w_width<etTheme.et_global.mob_header_start||etConfig.layoutSettings.is_mobile?S(".mobile-header-wrapper"):S(".header-wrapper"),d=S("body").hasClass("xstore-waitlist-page"),f=S("body").hasClass("xstore-waitlist-owner"),e=0,p=(xstore_waitlist_params.ajax_fragments&&(S(document).on("xstore_waitlist_initialized",function(t,e){S(document).trigger("xstore_waitlist_fragment_refresh",[e])}),S(window).on("pageshow",function(t){t.originalEvent.persisted&&(S(".et_b_waitlist-dropdown").empty(),S(document).trigger("xstore_waitlist_fragment_refresh",[x()]))}),S(document).on("xstore_waitlist_force_fragment_refresh",function(){S(".et_b_waitlist-dropdown").empty(),S(document).trigger("xstore_waitlist_fragment_refresh",[x()])})),S(document).on("click","."+u,function(t,e){t.preventDefault();var i,a,s=S(this).attr("data-action"),o=S(this).attr("data-id"),r=S(this).data("settings")||{},n=S(this).hasClass(u+"-redirect"),l=e&&!!e.is_multiple,c={},d=(l&&(c={is_multiple:!0,i:e.i,max:e.max,buttons:e.buttons}),S(this).parents("td"));switch((l||d)&&(c.table_row=S(this).parents("tr")),s){case"add":let e=S(this).parents("."+u+"-info").find("."+u+"-email");if(k(e)){let t=S(this).parents("."+u+"-info").find("."+u+"-consent");C(t)?(S(this).addClass("processing"),c.email=e.get(0).value,c.button=S(this),c.button_settings=r,c.button_action=s,[i,a={}]=[o,c],i=parseInt(i),-1===v().indexOf(i)&&((i,a)=>new Promise((t,e)=>{y(i.email,a,t,e)}))(a,i).then(t=>{var e;t.success?((e=x()).push(JSON.stringify({id:i,time:Math.floor((new Date).getTime()/1e3),email:a.email})),etTheme.setCookie(m,e.join("|"),xstore_waitlist_params.days_cache),a.table_row&&!f&&(a.table_row.css({position:"relative",zoom:1}),a.table_row.find("td:last-child").block({message:null,overlayCSS:{opacity:.6}}).attr("style",null),a.table_row.find("td:last-child").unblock(),setTimeout(function(){a.table_row.attr("style",null)},500)),xstore_waitlist_params.is_loggedin&&(clearTimeout(_),_=setTimeout(function(){T(e.join("|"))},1500)),S(document).find("."+u+"[data-id="+i+"]").each(function(){S(this).addClass("processing"),p(S(this),JSON.parse(S(this).attr("data-settings")))}),a.is_multiple?(a.i++,S(document).trigger("xstore_waitlist/adding_product",[e,i,a.is_multiple,a.i,a.max,a.buttons])):S(document).trigger("xstore_waitlist/adding_product",[e,i])):alert(t.message)}).catch(t=>{let e=a.button.parents("."+u+"-info").find("."+u+"-error-message");e.removeClass("woocommerce-error woocommerce-info").addClass("woocommerce-"+t.type).attr("style",null).text(t.message),setTimeout(function(){e.slideUp()},2e3),setTimeout(function(){e.text("")},2500)}),n&&S(this).addClass(u+"-redirect-ready")):(t.parent().css({color:"var(--et_red-color)"}),setTimeout(function(){t.parent().attr("style",null)},700))}else e.addClass("invalid"),setTimeout(function(){e.removeClass("invalid")},700);break;case"remove":if(n&&S(this).hasClass(u+"-redirect-ready"))window.location.href=xstore_waitlist_params.waitlist_page_url;else{if(r.email)c.email=r.email;else{let t=S(this).parents("."+u+"-info").find("."+u+"-email");if(!k(t))return t.addClass("invalid"),void setTimeout(function(){t.removeClass("invalid")},700);let e=S(this).parents("."+u+"-info").find("."+u+"-consent");if(!C(e))return e.parent().css({color:"var(--et_red-color)"}),void setTimeout(function(){e.parent().attr("style",null)},700);S(this).addClass("processing"),c.email=t.get(0).value,f||d||S(this).addClass("processing")}c.button=S(this),c.button_settings=r,c.button_action=s,l&&p(S(this),r,s),b(o,c)}}}),function(t,e,i="add"){var a=t.parents(".single-product-availability-notify-wrapper"),s=a.find(".et-call-popup");a.find(".et-close-popup").trigger("click"),a.find("."+u+"-error-message").hide(),setTimeout(function(){t.removeClass("processing in-process")},300),"add"==i?(e.removeText&&(s.find(".button-text").text(e.removeText),s.find(".mt-mes").text(e.removeText)),e.iconRemove&&s.find(".et-icon").addClass(e.iconRemove).removeClass(e.iconAdd),t.attr("data-action","remove")):(e.addText&&(s.find(".button-text").text(e.addText),s.find(".mt-mes").text(e.addText)),e.iconAdd&&s.find(".et-icon").addClass(e.iconAdd).removeClass(e.iconRemove),t.attr("data-action","add"));let o="add"==i?"remove":"add";a.find("[data-"+o+"-text]").each(function(){var t=S(this).attr("data-"+o+"-text"),e=S(this).text();S(this).text(t),S(this).attr("data-"+i+"-text")||S(this).attr("data-"+i+"-text",e)}),t.removeClass(u+"-redirect-ready"),setTimeout(function(){t.removeClass("processing in-process")},300)});function h(s,o,r){s<o?S(r[s]).hasClass("processing")||(S(r[s]).trigger("click").addClass("processing"),S(document.body).on("added_to_cart",function(t,e,
1i,a){a.attr("data-product_id")==S(r[s]).attr("data-product_id")&&(a.removeClass("processing in-process"),h(++s,o,r))})):S(r[s-1]).parent().hasClass("keeper-all-products-buttons")&&S(".et_b_header-waitlist").find("li").unblock()}function g(t,e,i){t<e&&(S(i[t]).hasClass("processing")||S(i[t]).trigger("click",{is_multiple:!0,i:t,max:e,buttons:i}).addClass("processing"))}function w(t,e,i){var a;t<e&&(a=f?"in-process":"processing",S(i[t]).hasClass(a)||S(i[t]).trigger("click",{is_multiple:!0,i:t,max:e,buttons:i}).addClass(a))}function x(){var t;return i||(S.ajax({url:xstore_waitlist_params.ajaxurl,dataType:"json",method:"POST",data:{cookie_key:m,action:"xstore_get_user_waitlist"},success:function(t){return i=t.products.products.map(t=>JSON.stringify(t))},error:function(){},complete:function(){}}),(t=etTheme.getCookie(m))?t.split("|"):[])}function v(){var t;return i?i.map(t=>JSON.parse(t).id):(S.ajax({url:xstore_waitlist_params.ajaxurl,dataType:"json",method:"POST",data:{cookie_key:m,action:"xstore_get_user_waitlist"},success:function(t){var e=t.products.products;return i=t.products.products.map(t=>JSON.stringify(t)),e},error:function(){},complete:function(){}}),(t=etTheme.getCookie(m))&&S.isArray(t)?t.split("|").map(t=>JSON.parse(t).id):[])}S(document).on("click",".xstore-miniwaitlist-remove",function(t){t.preventDefault(),b(S(this).data("id"),{miniwaitlist:!0,email:S(this).data("email"),liItem:S(this).parents("li")})}),S(".xstore-waitlist-table :checkbox").on("click",function(){var t;"product-bulk-select"==S(this).attr("name")?S(this).closest("table").children("tbody").find(":checkbox").prop("checked",S(this).prop("checked")):(t=S(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked"),S(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===t.length}))}),S(document).on("click",".xstore-waitlist-form .add-all-products",function(t){t.preventDefault(),confirm(xstore_waitlist_params.confirmQuestion)&&(etConfig.ajaxProductAddedNotify.type="alert",(t=S(this).closest(".xstore-waitlist-form").find("table").children("tbody").find(":checkbox").parents("tr").find(".ajax_add_to_cart")).length<1?alert(xstore_waitlist_params.no_products_available):h(0,t.length,t))}),S(document).on("click",".et_b_header-waitlist .add-all-products",function(t){var e;t.preventDefault(),confirm(xstore_waitlist_params.confirmQuestion)&&(etConfig.ajaxProductAddedNotify.type="alert",(e=(t=S(this).parents(".et_b_header-waitlist")).find(".keeper-all-products-buttons .ajax_add_to_cart")).length?(t.find("li").block({message:null,overlayCSS:{opacity:.6}}),h(0,e.length,e)):e.length<1&&alert(xstore_waitlist_params.no_products_available))}),S(".xstore-waitlist-actions").on("click",function(t){t.preventDefault();var e=S(this).closest(".xstore-waitlist-form").find("table").children("tbody").find(":checkbox:checked").parents("tr");if(e.length<1)alert(xstore_waitlist_params.no_active_checkbox);else if(confirm(xstore_waitlist_params.confirmQuestion))switch(S(this).parent().find("select").val()){case"add":(i=e.find(".ajax_add_to_cart")).length<1?alert(xstore_waitlist_params.no_products_available):h(0,i.length,i);break;case"add_waitlist":(i=e.find("."+u+'[data-action="add"]')).addClass("in-process"),g(0,i.length,i);break;case"remove":var i=e.find("."+u+'[data-action="remove"]');f?S(this).closest(".xstore-waitlist-form").find("table").children("tbody").find("tr"):i.addClass("in-process"),w(0,i.length,i)}});etTheme.xstore_waitlist.force_init_active_waitlist=function(){S.ajax({url:xstore_waitlist_params.ajaxurl,dataType:"json",method:"POST",data:{cookie_key:m,action:"xstore_get_user_waitlist"},success:function(t){i=t.products.products.map(t=>JSON.stringify(t)),S(document).trigger("xstore_waitlist_initialized",[i])},error:function(){},complete:function(){}})};function b(e,i={}){e=parseInt(e);var a,s,o=x();let r=o.map(t=>JSON.parse(t).id).indexOf(e);-1<r&&(a=i,s=e,new Promise((t,e)=>{y(a.email,s,t,e,!0)}).then(t=>{t.success?(o.splice(r,1),etTheme.setCookie(m,o.join("|")),i.table_row&&(i.table_row.css({position:"relative",zoom:1}),i.table_row.find("td:last-child").block({message:null,overlayCSS:{opacity:.6}}).attr("style",null),f?setTimeout(function(){i.table_row.remove()},1500):(i.table_row.find("td:last-child").unblock(),setTimeout(function(){i.table_row.attr("style",null)},500))),S(document).find("."+u+"[data-id="+e+"]").each(function(){i.table_row||S(this).addClass("processing"),p(S(this),JSON.parse(S(this).attr("data-settings")),"remove")}),i.miniwaitlist&&i.liItem.block({message:null,overlayCSS:{opacity:.6}}),xstore_waitlist_params.is_loggedin&&(clearTimeout(_),_=setTimeout(function(){T(o.join("|"))},1500)),i.is_multiple?(i.i++,S(document).trigger("xstore_waitlist/removing_product",[o,e,i.is_multiple,i.i,i.max,i.buttons])):S(document).trigger("xstore_waitlist/removing_product",[o,e])):alert(t.message)}
1).catch(e=>{if(i.miniwaitlist)i.liItem.unblock();else{let t=i.button.parents("."+u+"-info").find("."+u+"-error-message");t.removeClass("woocommerce-error woocommerce-info").addClass("woocommerce-"+e.type).attr("style",null).html(e.message),"error"!=e.type&&(setTimeout(function(){t.slideUp()},2e3),setTimeout(function(){t.text("")},2500))}}))}function y(t,e,i,a,s=!1){S.ajax({url:xstore_waitlist_params.ajaxurl,dataType:"json",method:"POST",data:{action:"xstore_update_waitlist",email:t,product_id:e,reset:!!s&&"yes"},success:function(t){(t.success?i:a)(t)},error:function(t){a(t)},complete:function(){}})}function T(t){S.ajax({url:xstore_waitlist_params.ajaxurl,dataType:"json",method:"POST",data:{action:"xstore_update_user_waitlist",cookie_key:m,products:t},success:function(t){},error:function(){},complete:function(){}})}function a(t,e){t.length&&(e?(t.attr("data-o_id")||t.attr("data-o_id",t.data("id")),t.attr("data-id",e)):void 0!==t.attr("data-o_id")&&t.attr("data-id",t.attr("data-o_id")),o(t,parseInt(e)))}function s(t){void 0!==t.attr("data-o_id")&&(t.attr("data-id",t.attr("data-o_id")),o(t,t.attr("data-o_id")))}S(document).on("xstore_waitlist/removing_product",function(t,e,i,a,s,o,r){if(a&&s<o)setTimeout(function(){w(s,o,r)},1700);else{if(clearTimeout(l),l=setTimeout(function(){S(document).trigger("xstore_waitlist_fragment_refresh",[e])},700),d&&void 0!==etTheme.quickView&&S(t.target.activeElement).parents(".et-quick-view-wrapper").length){let t=S(document).find(".xstore-waitlist-form ."+u+"[data-id="+i+"]").parents("tr");t.css({position:"relative",zoom:1}),t.find("td:last-child").block({message:null,overlayCSS:{opacity:.6}}).attr("style",null),f?setTimeout(function(){t.remove()},1500):(t.find("td:last-child").unblock(),setTimeout(function(){t.attr("style",null)},500)),etTheme.et_woocommerce.quick_view_opened&&etTheme.closeQuickView()}S(document).trigger("xstore_waitlist/removed_product")}}),S(document).on("xstore_waitlist/adding_product",function(t,a,s,e,i,o,r){if(e&&i<o)setTimeout(function(){g(i,o,r)},1700);else switch(clearTimeout(l),l=setTimeout(function(){S(document).trigger("xstore_waitlist_fragment_refresh",[a])},700),clearTimeout(n),S(document).trigger("xstore_waitlist/added_product"),xstore_waitlist_params.notify_type){case"alert":etTheme.notify(etConfig.successfullyAdded);break;case"alert_advanced":S.ajax({url:xstore_waitlist_params.ajaxurl,data:{product_id:s,action:"xstore_get_waitlist_product_info"},method:"POST",success:function(t){var e=S("<a>",{class:"et-notify-image",href:t.product_link,target:"_self"}).html(t.product_image),t=S("<div>",{class:"et-notify-info"}).html(t.product_title);S("<a>",{class:"et-notify-button",href:xstore_waitlist_params.waitlist_page_url}).html(xstore_waitlist_params.view_waitlist);etTheme.notify(e[0].outerHTML+t[0].outerHTML,"info",5e3,!0)}});break;case"mini_waitlist":let t=S(c).find(".et_b_header-waitlist.et_element-top-level"),e=S(c).find(".et_b_header-waitlist.et_element-top-level.et-off-canvas .et-mini-content"),i=S(c).find(".et_b_header-waitlist.et_element-top-level.et-off-canvas");i.length&&(etTheme.closeQuickView(),etTheme.showHideElementsOnCanvasActions(!0),etTheme.et_global.deny_link_click=!0,S(".et-mobile-panel-wrapper").addClass("outside")),t.addClass("active"),e.addClass("active"),i.addClass("et-content-shown"),n=setTimeout(function(){t.removeClass("active")},1e3)}}),S(document).on("found_variation","form.variations_form",function(t,e){var i=S(t.target).closest(".product").find(".xstore-waitlist-single");i.length&&(xstore_waitlist_params.is_multilingual?(i.block({message:null,overlayCSS:{opacity:.6}}),S.ajax({url:xstore_waitlist_params.ajaxurl,data:{variation_id:e.variation_id,action:"xstore_get_origin_waitlist_product_variation_id"},method:"POST",success:function(t){a(i,t.variation_id),i.unblock()}})):a(i,e.variation_id))}),S(document).on("reset_data","form.variations_form",function(t){t=S(t.target).closest(".product").find(".xstore-waitlist-single");t.length&&s(t)}),S(document).on("found_variation","div.st-swatch-in-loop",function(t,e){var i=S(t.target).closest(".product").find(".xstore-waitlist");i.length&&(xstore_waitlist_params.is_multilingual?(i.block({message:null,overlayCSS:{opacity:.6}}),S.ajax({url:xstore_waitlist_params.ajaxurl,data:{variation_id:e.variation_id,action:"xstore_get_origin_waitlist_product_variation_id"},method:"POST",success:function(t){a(i,t.variation_id),i.unblock()}})):a(i,e.variation_id))}),S(document).on("reset_data","div.st-swatch-in-loop",function(t){t=S(t.target).closest(".product").find(".xstore-waitlist");t.length&&s(t)}),S(document).on("change",".xstore-waitlist-form .xstore-waitlist-quantity .qty",function(){if(clearTimeout(e),0==S(this).val()){let t=S(this).parents("tr").find("."+u+'[data-action="remove"]');e=setTimeout(function(){t.trigger("click")},1500)}});var o=etTheme.xstore_waitlist.switch_variation_button=function(t,e){-1===v().indexOf(e)?p(t,JSON.parse(t.attr("data-settings")),"remove"):p(t,JSON.parse(t.attr("data-settings")))},k=function(t){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(t.get(0).value)},C=function(t){return t.get(0).checked};const r=()=>{etTheme.xstore_waitlist.force_init_active_waitlist(),t.forEach(t=>window.removeEventListener(t,r,{passive:!0}))},t=["mousemove","mousedown","keydown","touchstart","wheel"];t.forEach(t=>window.addEventListener(t,r,{passive:!0})),S(document).on("xstore_waitlist_fragment_refresh",function(t,e){var i;i=e,S.ajax({url:xstore_waitlist_params.ajaxurl,data:{products:i,products_count:i.length,action:"xstore_waitlist_fragments"},method:"POST",success:function(t){t&&t.fragments&&S.each(t.fragments,function(t,e){S(t).replaceWith(e)}),i.length<1?(S(".et_b_header-waitlist").find(".product_list-popup-footer-wrapper").hide(),f&&d&&S.ajax({url:xstore_waitlist_params.ajaxurl,data:{action:"xstore_empty_waitlist_page"},method:"POST",success:function(t){t&&t.page_content&&(S(document).find("form.xstore-waitlist-form").replaceWith(t.page_content),S(document).find(".xstore-waitlist-share").remove())}})):S(".et_b_header-waitlist").find(".product_list-popup-footer-wrapper").attr("style",null),S(document).trigger("xstore_waitlist_fragment_refreshed",[i])}})})}}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.