var DownloadableProductsHelper=function(){var i=this;this.downloadUrl="";this.downloadTitle="vue.downloadnotification.title";this.maxConcurrencyDownloads=1;var n={downloadCheckbox:".downloadCheckbox",downloadButton:".download-btn"};this.setSelectors=function(t){n=t};var t,f=function(){$(n.downloadCheckbox).change(function(){$(n.downloadCheckbox+":checked").length>0?$(n.downloadButton).show():$(n.downloadButton).hide()})},a=function(){$(n.downloadButton).click(function(){for(var f=$(n.downloadCheckbox+":checked"),e=[],o=[],t=0;t=i.maxConcurrencyDownloads?r(!0):setTimeout(()=>{r(!1)},1e3)},u=function(n,r){(!t||t.isDestroyed)&&(t=cfVue.immediateAction.open({position:"is-bottom-right",title:i.downloadTitle,onStatusChanged:s,onClose:o}));var u=null;r&&(u=h(r));t.insert(n,u);window.immediateActionData=t},h=function(n){var t=l(n),i=c(t,3);return t.length>3?i.join(", ")+"...":t.join(", ")};function c(n,t){return n.slice(0,Math.min(n.length,t))}var l=function(n){return n.filter(function(n,t,i){return i.indexOf(n)==t})};this.init=function(n){i.downloadUrl=n;e()};this.setDialogTitle=function(n){i.downloadTitle=n}};function CartInit(n){const{downloadNotificationTitle:r,downloadUrl:i,errors:u}=n;var t=new DownloadableProductsHelper;t.setDialogTitle(r);t.init(i);$(".downloadCheckbox").removeAttr("disabled");$(".download-btn").click(function(){for(var r=$(".downloadCheckbox:checked"),u=[],f=[],n=0;nr)return n.toggleClass("input-validation-error",!0),e.text(u),!1;var s=o.split(",").map(function(n){return n.trim()}).filter(function(n){return n.length>0}),f=s.length===0?!0:s.every(function(n){return t.test(n)});return n.toggleClass("input-validation-error",!f),e.text(f?"":i),f}function QuickSelectionInit(n){const{url:t}=n;$("li.quick-selection-item").click(function(){var n={productVariantId:$(this).data("id")};$.post(t,n,function(n){n=="success"?window.location=window.location:alert(n)})})}function EstimateShippingInit(n){const{countryIdFieldId:t,stateProvinceIdFieldId:i,getStatesByCountryIdUrl:r}=n;$(t).change(function(){var u=$(this).val(),t=$(i),n=$("#estimate-shipping-loading-progress");n.show();$.ajax({cache:!1,type:"GET",url:r,data:"countryId="+u,success:function(i){t.html("");$.each(i,function(n,i){t.append($("