function getQueryStringParameters(){for(var t=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<r.length;i++)n=r[i].split("="),t.push(n[0]),t[n[0]]=n[1];return t}function truncateField(n,t){var i=t.target,u=i.value,r;return u.length>0&&(r=-1,i.getAttribute("maxlength")!=null?r=parseInt(i.getAttribute("maxlength"),10):i.getAttribute("max")!=null&&(r=i.getAttribute("max").length),r>0&&i.value.length>=r&&(i.value=u.substring(0,r),i.focus())),!0}function searchInputKeyDownHandler(n){n.keyCode==13&&(n.preventDefault(),submitSearch(n))}function submitSearch(){$("#recaptcha-error-message-search").text(null);var n=$("#siteSearch").val().trim();if($("#siteSearch").val(n.replace(/[^a-zA-Z0-9\s]+/gi,"")),window.RecaptchaEnabled)try{grecaptcha.execute(window.RecaptchaPublicV3,{action:"KeywordSearch"}).then(function(n){$("#g_recaptcha_response_v3").val(n);$("#search_form").submit()})}catch(t){let n="Recaptcha can't be fired due to the connectivity issue.";$("#recaptcha-error-message-search").text(n+" Please try again.");console.error(n+"\n"+t)}else $("#search_form").submit()}function submitEmail(n,t,i){if(window.RecaptchaEnabled&&(!n||!t||!i))throw"Invalid arguments passed for submitEmail when recaptcha is enabled.";let r={};r.email=$("#emailAddress").val();window.RecaptchaEnabled&&(r["g-recaptcha-response"]=n);$.ajax({method:"POST",url:"/sign-up-for-special-offers",data:r,dataType:"json"}).done(function(n){if($("#error-message-sign-up").text(null),!n.success){window.RecaptchaEnabled?(t.text(n.message),$("#"+i).empty()):($("#error-message-sign-up").text(n.message),console.error(n.message));return}window.RecaptchaEnabled&&$("#"+i).empty();$(".js-subscribe-success").removeClass("hidden");$(".js-special-offers :input").prop("disabled",!0);try{_satellite.track("email_signup")}catch(r){console.error("The tracking data for Adobe has been fallen. "+r)}})}(function(){"use strict";window.ChecksGalleryApp={pageData:{},viewModels:{},utils:{updateViewModel:function(n,t,i){if($.isPlainObject(t)){$.isPlainObject(i)||(i={});var r=function(n){return ko.utils.arrayMap(ChecksGalleryApp.utils.objectKeys(n),function(n){return{key:n,cc:ChecksGalleryApp.utils.toCamelCase(n),lc:n.toLowerCase()}})},u=function(n,t){var i=ChecksGalleryApp.utils.toCamelCase(n),r=n.toLowerCase();return(ko.utils.arrayFirst(t,function(t){return t.key==n})||ko.utils.arrayFirst(t,function(n){return n.cc==i})||ko.utils.arrayFirst(t,function(n){return n.lc==r})||{}).key},f=r(n),e=r(i);return ko.utils.arrayForEach(ChecksGalleryApp.utils.objectKeys(t),function(r){var s=u(r,f),c=u(r,e),o=s?n[s]:null,h=t[r];(typeof o!="function"||ko.isWritableObservable(o))&&(c?i[c].call(n,o,s,h):s&&(ko.isWritableObservable(o)?o(h):o!=null&&typeof o=="object"&&typeof o.update=="function"?o.update(h):ko.isObservable(o)||(n[s]=h)))}),n}},objectKeys:function(n){var t=[];for(var i in n)n.hasOwnProperty(i)&&t.push(i);return t},toCamelCase:function(n){return(n||"").replace(/([A-Z]|^)([A-Z]+)/g,function(n,t,i){return t+i.toLowerCase()})},sortBy:function(n,t){if(n=ko.unwrap(n),$.isArray(n)){var i=1;return t[0]==="-"&&(i=-1,t=t.substr(1)),n.sort(function(n,r){var u=ko.unwrap(n[t]),f=ko.unwrap(r[t]),e=u<f?-1:u>f?1:0;return e*i})}},makeImageRenderUrl:function(n,t,i,r,u,f,e){return"/imagerender/?text={text}&font={font}&size={size}&textcase={textCase}&bold={bold}&maxwidth={maxWidth}&maxheight={maxHeight}".replace("{text}",encodeURIComponent(ko.unwrap(n)||"")).replace("{font}",ko.unwrap(t)).replace("{size}",ko.unwrap(i)).replace("{textCase}",ko.unwrap(r)).replace("{bold}",ko.unwrap(u)?"y":"n").replace("{maxWidth}",ko.unwrap(f)||"").replace("{maxHeight}",ko.unwrap(e)||"")},getMonogramLetterImageUrl:function(n,t){var i,u=$('input[name="__RequestVerificationToken"]').val(),r={};return r.__RequestVerificationToken=u,$.ajax({method:"POST",url:"/pz/get-monogram-image",data:{productCode:n,letter:t},headers:r,context:this,async:!1}).done(function(n){i=n}),i},resetValidation:function(n){var t=$(n);t.removeData("unobtrusiveValidation");t.validate().destroy();$.validator.unobtrusive.parse(n);t.find("[data-valmsg-summary=true]").removeClass("validation-summary-errors").addClass("validation-summary-valid").find("ul").empty();t.find("[data-valmsg-replace]").removeClass("field-validation-error").addClass("field-validation-valid").empty()},replaceAll:function(n,t,i){return(n||"").replace(new RegExp(t,"g"),i)},resetDataLayerObject:function(){dataLayer.push({ecommerce:null})},getMappedGA4Items:function(n,t){const i=[];return n.forEach(function(n,r){let f=0,u=0,e=null,o=null,s=n.quantity?n.quantity:1;n.selectedTier?(f=n.selectedTier.price,u=n.selectedTier.regularPrice):(f=n.price,u=n.regularPrice);!u&&f&&(u=f);n.type?e=n.type:n.productType&&(e=n.productType);n.subType?o=n.subType:n.productSubType&&(o=n.productSubType);i.push({item_id:n.productCode?n.productCode:null,item_name:n.name?n.name:n.description?n.description:null,affiliation:window.configurationData.affiliationGA4?window.configurationData.affiliationGA4:null,coupon:ko.unwrap(t.offer.offerApplied)?ko.unwrap(t.offer.keycode):null,currency:window.configurationData.defaultCurrency?window.configurationData.defaultCurrency:null,discount:!u||!f?0:u-f,index:r,item_brand:window.configurationData.brandGA4?window.configurationData.brandGA4:null,item_category:e,item_category2:o,item_category3:null,item_category4:null,item_category5:null,item_list_id:null,item_list_name:null,item_variant:null,location_id:window.configurationData.locationIdGA4?window.configurationData.locationIdGA4:null,price:!u||!s?0:u/s,quantity:n.quantity?n.quantity:1})}),i},fireGA4Event:function(n,t,i){try{const r=ko.toJS(t);if(!n||!r||r.length==0||!window.configurationData||!i)return;const f=ChecksGalleryApp.utils.getMappedGA4Items(r,i);ChecksGalleryApp.utils.resetDataLayerObject();let u={items:f};n==="view_cart"&&(u.currency=window.configurationData.defaultCurrency?window.configurationData.defaultCurrency:null,u.value=i.orderTotal.total());dataLayer.push({event:n,ecommerce:u})}catch(r){console.error("The tracking data for GA4 has been fallen. "+r)}},fireGA4PurchaseEvent:function(n,t,i,r){try{const u=ko.toJS(i);if(!u||!t||u.length==0||!window.configurationData||!r)return;const e=ko.unwrap(t.total),f=ko.unwrap(t.shippingAmount),o=ko.unwrap(t.taxAmount),s=ko.unwrap(n),h=ChecksGalleryApp.utils.getMappedGA4Items(u,r);ChecksGalleryApp.utils.resetDataLayerObject();dataLayer.push({event:"purchase",ecommerce:{transaction_id:s?s:null,value:e?e:0,tax:o?o:0,shipping:f&&typeof f!="string"?f:0,affiliation:window.configurationData.affiliationGA4?window.configurationData.affiliationGA4:null,coupon:ko.unwrap(r.offer.offerApplied)?ko.unwrap(r.offer.keycode):null,currency:window.configurationData.defaultCurrency?window.configurationData.defaultCurrency:null,items:h}})}catch(u){console.error("The tracking data for GA4 has been fallen. "+u)}},fireAdobeConfirmationEvent:function(n){const a=ko.unwrap(n.isCCPaymentMethod),v=ko.unwrap(n.isXSellItemsAdded),r=[{eventName:"purchase"}],i=ko.unwrap(n.orderTotal.shippingAmount),o=ko.unwrap(n.orderTotal.handlingAmount),s=ko.unwrap(n.orderTotal.taxAmount),h=ko.unwrap(n.orderTotal.subTotal),c=ko.unwrap(n.orderTotal.total),l=ko.unwrap(n.webOrderId);v&&r.push({eventName:"event60"});const u={profile:{shippingAddress:{stateProvince:ko.unwrap(n.shippingAddress.state),postalCode:ko.unwrap(n.shippingAddress.zip)}},details:{shippingMethod:ko.unwrap(n.selectedShippingMethodName),shippingAmt:i?i.toFixed(2).toString():"",handlingAmt:o?o.toFixed(2).toString():"",tax:s?s.toString():"",subTotal:h?h.toString():"",orderTotal:c?c.toString():"",paymentMethod:a===!1?"Secure Online Payment":"Credit Card"},purchase:{purchaseID:l?l.toString():null}},t=[];t.push({productInfo:{productID:"CHKGLRYSHP"},price:{basePrice:i?i.toFixed(2).toString():"",quantity:"1"}});const f=ko.unwrap(n.lineItems);f&&f.length>0&&f.forEach(n=>{let i=0,r=0,o=ko.unwrap(n.quantity);o||(o=1);ko.unwrap(n.selectedTier)?(i=ko.unwrap(n.selectedTier).price,r=ko.unwrap(n.selectedTier).regularPrice):(i=ko.unwrap(n.total),r=ko.unwrap(n.regularTotal));!r&&i&&(r=i);let s=ko.unwrap(n.quantity);const u=!r||!i?0:r-i;t.push({productInfo:{productID:ko.unwrap(n.productCode)},price:{basePrice:r?r.toFixed(2).toString():"",quantity:s?s.toString():"1",discount:u&&u!=0?u.toFixed(2).toString():"",discountBasePrice:u&&u!=0&&i?i.toFixed(2).toString():""}});const f=ko.unwrap(n.services);f&&f.length>0&&f.forEach(n=>{const r=ko.unwrap(n.price),u=ko.unwrap(n.regularPrice),i=!u||!r?0:u-r;t.push({productInfo:{productID:ko.unwrap(n.productCode)},price:{basePrice:u?u.toFixed(2).toString():"",quantity:"1",discount:i&&i!=0?i.toFixed(2).toString():"",discountBasePrice:i&&i!=0&&r?r.toFixed(2).toString():""}})});const e=ko.unwrap(n.enhancements);e&&e.length>0&&e.forEach(n=>{const r=ko.unwrap(n.type);if(!r||r!="IL"&&r!="PL"&&r!="PR"){const u=ko.unwrap(n.price),f=ko.unwrap(n.regularPrice),i=!f||!u?0:f-u;t.push({productInfo:{productID:ko.unwrap(n.productCode)},price:{basePrice:f?f.toFixed(2).toString():"",quantity:"1",discount:i&&i!=0?i.toFixed(2).toString():"",discountBasePrice:i&&i!=0&&u?u.toFixed(2).toString():""}})}})});const e=ko.unwrap(n.services);if(e&&e.length>0&&e.forEach(n=>{const r=ko.unwrap(n.price),u=ko.unwrap(n.regularPrice),i=!u||!r?0:u-r;t.push({productInfo:{productID:ko.unwrap(n.productCode)},price:{basePrice:u?u.toFixed(2).toString():"",quantity:"1",discount:i&&i!=0?i.toFixed(2).toString():"",discountBasePrice:i&&i!=0&&r?r.toFixed(2).toString():""}})}),ko.unwrap(n.offer.offerApplied)){const i=ko.unwrap(n.offer.keycode),t=ko.unwrap(n.orderTotal.saved),f=t?"event82="+t.toFixed(2).toString():"event82=0";r.push({eventName:f});u.details.promotionalCode=i?i.toString():null;u.details.promotionalDiscount=t?t.toFixed(2).toString():""}digitalData.events=r;digitalData.transaction=u;digitalData.lineItems=t}},monogramLetters:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]}})();window.addEventListener=window.addEventListener||function(n,t){window.attachEvent("on"+n,t)};window.addEventListener("error",function(n){n=n||window.event;dataLayer.push({errorDescription:n.message+" "+(n.filename||"")+":"+(n.lineno||"")+":"+(n.colno||""),errorPage:window.location.href,event:"error"})},!1),function(n){function t(t,i){n.ajax({url:t,dataType:i,cache:!0,global:!1,crossDomain:!1})}n(function(){n(document).on("keydown","input[type=number]",function(n){var t="which"in n?n.which:n.keyCode;(t==38||t==40)&&n.preventDefault()});n(".js-cart-info").text().indexOf("(0")!=-1&&n(".js-business-checks").removeAttr("data-toggle");n(document).on("click",".js-toggle-links-button",function(){n(this).toggleClass("open");n(this).closest(".toggle-links-module").toggleClass("active")});n(".js-owl-carousel[data-owl-carousel]").each(function(){n(this).owlCarousel(n(this).data("owl-carousel"))});n(document).on("click",".js-mobile-navigation-click",function(t){t.preventDefault();t.stopPropagation();var i=n(this).attr("data-toggle");n(i).toggle(300);n(this).toggleClass("open")});n("[data-toggle='tooltip']").each(function(){n(this).tooltip()});n(document).on("mouseover",".js-slide",function(){n(this).closest(".js-slider").find(".js-preview").attr("src",n(this).attr("src")).attr("sizes",n(this).attr("sizes")).attr("srcset",n(this).attr("srcset")).end().find(".js-slide-to").attr("data-slide-to",n(this).data("slide-to"))});n(document).on("click",".js-toggle-sliding",function(){var t=n(this).closest(".carousel"),i=(t.data()||{})["bs.carousel"];i&&(i.paused?t.carousel("cycle"):t.carousel("pause"),n(".js-toggle-sliding").toggleClass("fa-pause"),n(".js-toggle-sliding").toggleClass("fa-play"))});n(document).on("click",".dropdown-menu .js-dropdown-item",function(){var t=n(this),i=t.closest(".dropdown"),r=i.find(".js-dropdown-value:input"),u=i.find(".js-dropdown-selected"),f=i.find(".dropdown-menu .js-dropdown-item");f.removeClass("js-dropdown-item-selected");t.addClass("js-dropdown-item-selected");u.html(t.children().clone());r.val(t.data("value")).trigger("changed")});n(".dropdown").each(function(){var i=n(this),f=i.find(".js-dropdown-value:input"),u=i.find(".js-dropdown-selected"),r=i.find(".dropdown-menu .js-dropdown-item"),t;r.length!=0&&u.length!=0&&(t=r.filter(".js-dropdown-item-selected"),t.length==0&&(t=r.first()),t.trigger("click"))});n(document).on("click","[data-form-to-submit]",function(t){t.preventDefault();n(n(this).data("form-to-submit")).submit()});n(document).on("submit",".js-close-modal",function(){n(this).closest(".modal").modal("hide")});var i=null;n(".js-special-offers").validate({submitHandler:function(){if(window.RecaptchaEnabled){let r="recaptcha_container_sign_up",t=n("#recaptcha-error-message-sign-up");t.text(null);try{i==null?i=grecaptcha.render(r,{sitekey:window.RecaptchaPublicV2,size:"normal",callback:function(n){submitEmail(n,t,r)},"error-callback":function(){t.text("Recaptcha validation failed. Please try again.");n("#"+r).empty()}}):i!=null&&grecaptcha.reset(i)}catch(t){let n="Recaptcha can't be fired due to the connectivity issue.";t.text(n+" Please try again.");console.error(n+"\n"+t)}}else submitEmail()}});Modernizr.placeholder||t("/Scripts/Placeholders.jquery.min.js","script");n("#siteSearch").typeahead({autoSelect:!0,minLength:2,delay:400,source:function(t,i){return n.post("/Content/Autosuggest",{input:n("#siteSearch").val()},function(n){return i(n)},"json")},afterSelect:function(){n("#isAutosuggestSelected").val("true");submitSearch()}})});n(document).ajaxSend(function(t,i,r){var u=null;(r.headers==null||r.headers.__RequestVerificationToken==null)&&(u=n('input[name="__RequestVerificationToken"]').val(),(r.contentType!=!1||t.contentType)&&i.setRequestHeader("Content-Type",r.contentType),i.setRequestHeader("__RequestVerificationToken",u))});jQuery.fn.resetSummary=function(){var n=this.is("form")?this:this.closest("form");return n.find("[data-valmsg-summary=true]").removeClass("validation-summary-errors").addClass("validation-summary-valid").find("ul").empty(),this}}(jQuery);var dcfParam=getQueryStringParameters().dcf