PageSourceSearch

https://princeseating.furniture/cdn/shop/t/3/assets/globorequestforquote.js?v=166984254155853387631599613491

js princeseating.furniture collected 2026-10-07 17:30:46 UTC 56,183 bytes, 9 lines download raw bytes

vendor: 4,663 bytes, lines 1-8
1/*!
2 * Validator v0.11.9 for Bootstrap 3, by @1000hz
3 * Copyright 2017 Cina Saffary
4 * Licensed under http://opensource.org/licenses/MIT
5 *
6 * https://github.com/1000hz/bootstrap-validator
7 RFQv2.0
8 */+(function(a){"use strict";function b(b2){return b2.is('[type="checkbox"]')?b2.prop("checked"):b2.is('[type="radio"]')?!!a('[name="'+b2.attr("name")+'"]:checked').length:b2.is("select[multiple]")?(b2.val()||[]).length:b2.val()}function c(b2){return this.each(function(){var c2=a(this),e2=a.extend({},d.DEFAULTS,c2.data(),typeof b2=="object"&&b2),f=c2.data("bs.validator");(f||b2!="destroy")&&(f||c2.data("bs.validator",f=new d(this,e2)),typeof b2=="string"&&f[b2]())})}var d=function(c2,e2){this.options=e2,this.validators=a.extend({},d.VALIDATORS,e2.custom),this.$element=a(c2),this.$btn=a('button[type="submit"], input[type="submit"]').filter('[form="'+this.$element.attr("id")+'"]').add(this.$element.find('input[type="submit"], button[type="submit"]')),this.update(),this.$element.on("input.bs.validator change.bs.validator focusout.bs.validator",a.proxy(this.onInput,this)),this.$element.on("submit.bs.validator",a.proxy(this.onSubmit,this)),this.$element.on("reset.bs.validator",a.proxy(this.reset,this)),this.$element.find("[data-match]").each(function(){var c3=a(this),d2=c3.attr("data-match");a(d2).on("input.bs.validator",function(){b(c3)&&c3.trigger("input.bs.validator")})}),this.$inputs.filter(function(){return b(a(this))&&!a(this).closest(".has-error").length}).trigger("focusout"),this.$element.attr("novalidate",!0)};d.VERSION="0.11.9",d.INPUT_SELECTOR=':input:not([type="hidden"], [type="submit"], [type="reset"], button)',d.FOCUS_OFFSET=20,d.DEFAULTS={delay:500,html:!1,disable:!0,focus:!0,custom:{},errors:{match:"Does not match",minlength:"Not long enough"},feedback:{success:"glyphicon-ok",error:"glyphicon-remove"}},d.VALIDATORS={native:function(a2){var b2=a2[0];return b2.checkValidity?!b2.checkValidity()&&!b2.validity.valid&&(b2.validationMessage||"error!"):void 0},match:function(b2){var c2=b2.attr("data-match");return b2.val()!==a(c2).val()&&d.DEFAULTS.errors.match},minlength:function(a2){var b2=a2.attr("data-minlength");return a2.val().length<b2&&d.DEFAULTS.errors.minlength}},d.prototype.update=function(){var b2=this;return this.$inputs=this.$element.find(d.INPUT_SELECTOR).add(this.$element.find('[data-validate="true"]')).not(this.$element.find('[data-validate="false"]').each(function(){b2.clearErrors(a(this))})),this.toggleSubmit(),this},d.prototype.onInput=function(b2){var c2=this,d2=a(b2.target),e2=b2.type!=="focusout";this.$inputs.is(d2)&&this.validateInput(d2,e2).done(function(){c2.toggleSubmit()})},d.prototype.validateInput=function(c2,d2){var e2=(b(c2),c2.data("bs.validator.errors"));c2.is('[type="radio"]')&&(c2=this.$element.find('input[name="'+c2.attr("name")+'"]'));var f=a.Event("validate.bs.validator",{relatedTarget:c2[0]});if(this.$element.trigger(f),!f.isDefaultPrevented()){var g=this;return this.runValidators(c2).done(function(b2){c2.data("bs.validator.errors",b2),b2.length?d2?g.defer(c2,g.showErrors):g.showErrors(c2):g.clearErrors(c2),e2&&b2.toString()===e2.toString()||(f=b2.length?a.Event("invalid.bs.validator",{relatedTarget:c2[0],detail:b2}):a.Event("valid.bs.validator",{relatedTarget:c2[0],detail:e2}),g.$element.trigger(f)),g.toggleSubmit(),g.$element.trigger(a.Event("validated.bs.validator",{relatedTarget:c2[0]}))})}},d.prototype.runValidators=function(c2){function d2(a2){return c2.attr("data-"+a2+"-error")}function e2(){var a2=c2[0].validity;return a2.typeMismatch?c2.attr("data-type-error"):a2.patternMismatch?c2.attr("data-pattern-error"):a2.stepMismatch?c2.attr("data-step-error"):a2.rangeOverflow?c2.attr("data-max-error"):a2.rangeUnderflow?c2.attr("data-min-error"):a2.valueMissing?c2.attr("data-required-error"):null}function f(){return c2.attr("data-error")}function g(a2){return d2(a2)||e2()||f()}var h=[],i=a.Deferred();return c2.data("bs.validator.deferred")&&c2.data("bs.validator.deferred").reject(),c2.data("bs.validator.deferred",i),a.each(this.validators,a.proxy(function(a2,d3){var e3=null;!b(c2)&&!c2.attr("required")||c2.attr("data-"+a2)===void 0&&a2!="native"||!(e3=d3.call(this,c2))||(e3=g(a2)||e3,!~h.indexOf(e3)&&h.push(e3))},this)),!h.length&&b(c2)&&c2.attr("data-remote")?this.defer(c2,function(){var d3={};d3[c2.attr("name")]=b(c2),a.get(c2.attr("data-remote"),d3).fail(function(a2,b2,c3){h.push(g("remote")||c3)}).always(function(){i.resolve(h)})}):i.resolve(h),i.promise()},d.prototype.validate=function(){var b2=this;return a.when(this.$inputs.map(function(){return b2.validateInput(a(this),!1)})).then(function(){b2.toggleSubmit(),b2.focusError()}),this}
8,d.prototype.focusError=function(){if(this.options.focus){var b2=this.$element.find(".has-error:first :input");b2.length!==0&&(a("html, body").animate({scrollTop:b2.offset().top-d.FOCUS_OFFSET},250),b2.focus())}},d.prototype.showErrors=function(b2){var c2=this.options.html?"html":"text",d2=b2.data("bs.validator.errors"),e2=b2.closest(".form-group"),f=e2.find(".help-block.with-errors"),g=e2.find(".form-control-feedback");d2.length&&(d2=a("<ul/>").addClass("list-unstyled").append(a.map(d2,function(b3){return a("<li/>")[c2](b3)})),f.data("bs.validator.originalContent")===void 0&&f.data("bs.validator.originalContent",f.html()),f.empty().append(d2),e2.addClass("has-error has-danger"),e2.hasClass("has-feedback")&&g.removeClass(this.options.feedback.success)&&g.addClass(this.options.feedback.error)&&e2.removeClass("has-success"))},d.prototype.clearErrors=function(a2){var c2=a2.closest(".form-group"),d2=c2.find(".help-block.with-errors"),e2=c2.find(".form-control-feedback");d2.html(d2.data("bs.validator.originalContent")),c2.removeClass("has-error has-danger has-success"),c2.hasClass("has-feedback")&&e2.removeClass(this.options.feedback.error)&&e2.removeClass(this.options.feedback.success)&&b(a2)&&e2.addClass(this.options.feedback.success)&&c2.addClass("has-success")},d.prototype.hasErrors=function(){function b2(){return!!(a(this).data("bs.validator.errors")||[]).length}return!!this.$inputs.filter(b2).length},d.prototype.isIncomplete=function(){function c2(){var c3=b(a(this));return!(typeof c3=="string"?a.trim(c3):c3)}return!!this.$inputs.filter("[required]").filter(c2).length},d.prototype.onSubmit=function(a2){this.validate(),(this.isIncomplete()||this.hasErrors())&&a2.preventDefault()},d.prototype.toggleSubmit=function(){this.options.disable&&this.$btn.toggleClass("disabled",this.isIncomplete()||this.hasErrors())},d.prototype.defer=function(b2,c2){return c2=a.proxy(c2,this,b2),this.options.delay?(window.clearTimeout(b2.data("bs.validator.timeout")),void b2.data("bs.validator.timeout",window.setTimeout(c2,this.options.delay))):c2()},d.prototype.reset=function(){return this.$element.find(".form-control-feedback").removeClass(this.options.feedback.error).removeClass(this.options.feedback.success),this.$inputs.removeData(["bs.validator.errors","bs.validator.deferred"]).each(function(){var b2=a(this),c2=b2.data("bs.validator.timeout");window.clearTimeout(c2)&&b2.removeData("bs.validator.timeout")}),this.$element.find(".help-block.with-errors").each(function(){var b2=a(this),c2=b2.data("bs.validator.originalContent");b2.removeData("bs.validator.originalContent").html(c2)}),this.$btn.removeClass("disabled"),this.$element.find(".has-error, .has-danger, .has-success").removeClass("has-error has-danger has-success"),this},d.prototype.destroy=function(){return this.reset(),this.$element.removeAttr("novalidate").removeData("bs.validator").off(".bs.validator"),this.$inputs.off(".bs.validator"),this.options=null,this.validators=null,this.$element=null,this.$btn=null,this.$inputs=null,this};var e=a.fn.validator;a.fn.validator=c,a.fn.validator.Constructor=d,a.fn.validator.noConflict=function(){return a.fn.validator=e,this},a(window).on("load",function(){a('form[data-toggle="validator"]').each(function(){var b2=a(this);c.call(b2,b2.data())})})})(jQuery);function GRFQ_setCookie(cname,cvalue,exdays){var d=new Date;d.setTime(d.getTime()+exdays*24*60*60*1e3);var expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";path=/"}function GRFQ_getCookie(cname){for(var name=cname+"=",decodedCookie=decodeURIComponent(document.cookie),ca=decodedCookie.split(";"),i=0;i<ca.length;i++){for(var c=ca[i];c.charAt(0)==" ";)c=c.substring(1);if(c.indexOf(name)==0)return c.substring(name.length,c.length)}return""}(function(){window.GRFQApp={};var loadScript=function(url,callback,errcallback){var script=document.createElement("script");script.type="text/javascript",script.readyState?(script.onreadystatechange=function(){(script.readyState=="loaded"||script.readyState=="complete")&&(script.onreadystatechange=null,callback())},setTimeout(function(){script.onreadystatechange!==null&&errcallback!==void 0&&errcallback()},3e3)):(script.onload=function(){callback()},script.onerror=function(){errcallback!==void 0&&errcallback()}),script.src=url,document.getElementsByTagName("head")[0].appendChild(script)};if(GRFQApp.AppURL=GRFQConfigs.app_url,GRFQApp.init=function($2){window.spuritJQ=$2,GRFQApp.UpdateQuoteCart();var installed=!1;if($2("script").each(function(){$2(this).text().indexOf("globorequestforquote_init.js?")!=-1&&$2(this).text().indexOf("asyncLoad")!=-1&&$2(this).text().indexOf("initSchema")==-1&&(installed=!0)}),$2("body").on("change",".groupCheckbox .checkboxgroup",function(){var list=$2(this).closest(".form-group").find(".checkboxgroup");let pass=!1;list.each(function(i,ckb){$2(ckb).prop("checked")&&(pass=!0)}),pass?$2(this).closest(".form-group").find(".hiddenGroupCheckBox").removeAttr("required"):$2(this).closest(".form-group").find(".hiddenGroupCheckBox").attr("required",!0)}
8),$2("body").on("change",".rfq-table .item_qty",function(){GRFQApp.updateRows()}),installed&&GRFQApp.getPageType()!="page"){if($2(window).keydown(function(event){if(event.keyCode==13){var parent_=event.target.closest("#rfq_form");if(parent_!=null&&event.target.tagName!="TEXTAREA")return event.preventDefault(),!1}}),GRFQConfigs.show_atc=="0"&&$2(GRFQConfigs.selector.addtocart_selector).attr("style","display:none !important"),GRFQConfigs.show_price=="0"&&$2(GRFQConfigs.selector.price_selector).attr("style","display:none !important"),(GRFQApp.getPageType()=="collection"||GRFQApp.getPageType()=="product"||GRFQApp.getPageType()=="search"||GRFQApp.getPageType()==""||typeof forceRFQCollectionPage<"u")&&$2(".rfq-collection-script").each(function(k,elem){let value=$2(elem).attr("data-id");if(value&&!!GRFQApp.isEnabled(GRFQCollection[value])){for(var parent_cart_selector=$2(this).parent(),cart_selector=parent_cart_selector.find(GRFQConfigs.selector.addtocart_selector+",.rfq-add-to-cart:not(.rfq-product-selector)"),max_loop=0;cart_selector.length==0&&max_loop<3;)max_loop++,parent_cart_selector=parent_cart_selector.parent(),cart_selector=parent_cart_selector.find(GRFQConfigs.selector.addtocart_selector+",.rfq-add-to-cart:not(.rfq-product-selector)");cart_selector.length>0&&GRFQConfigs.show_atc=="1"&&cart_selector.attr("style","display:none !important");for(var parent_price_selector=$2(this).parent(),price_selector=parent_price_selector.find(GRFQConfigs.selector.price_selector+",.rfq-price:not(.rfq-product-selector)"),max_loop_=0;price_selector.length==0&&max_loop_<3;)max_loop_++,parent_price_selector=parent_price_selector.parent(),price_selector=parent_price_selector.find(GRFQConfigs.selector.price_selector+",.rfq-price:not(.rfq-product-selector)");price_selector.length>0&&GRFQConfigs.show_price=="1"&&price_selector.attr("style","display:none !important")}}),GRFQApp.getPageType()=="product"||typeof forceRFQProductPage<"u"){GRFQConfigs.shop_url=="mueblesysillones.myshopify.com"&&GRFQConfigs.show_atc=="0"&&$2(GRFQConfigs.selector.addtocart_selector).attr("style","display:none !important"),GRFQConfigs.show_atc=="0"&&$2(GRFQConfigs.selector.addtocart_selector).attr("style","display:none !important"),GRFQConfigs.shop_url=="mueblesysillones.myshopify.com"&&GRFQConfigs.show_price=="0"&&$2(GRFQConfigs.selector.price_selector).attr("style","display:none !important"),GRFQConfigs.show_price=="0"&&$2(GRFQConfigs.selector.price_selector).attr("style","display:none !important");var id_product=GRFQConfigs.product.id,is_disabled=!GRFQApp.isEnabled(GRFQConfigs.product);if(is_disabled?($2(GRFQConfigs.selector.price_selector).find($2(GRFQConfigs.selector.price_selector)).attr("style","display: "),$2(GRFQConfigs.selector.addtocart_selector).eq(0).attr("style","display: ")):(GRFQConfigs.show_atc=="1"&&(GRFQConfigs.shop_url=="mueblesysillones.myshopify.com"||GRFQConfigs.shop_url=="gripps-global.myshopify.com"?$2(GRFQConfigs.selector.addtocart_selector).attr("style","display: none !important"):$2(GRFQConfigs.selector.addtocart_selector).eq(0).attr("style","display: none !important"),typeof window.forceProductCartSelector<"u"&&$2(window.forceProductCartSelector).attr("style","display: none !important")),GRFQConfigs.show_price=="1"&&(GRFQConfigs.shop_url=="mueblesysillones.myshopify.com"||GRFQConfigs.shop_url=="the-real-fur-deal.myshopify.com"||GRFQConfigs.shop_url=="lamporia-com.myshopify.com"||GRFQConfigs.shop_url=="amazontomaldives.myshopify.com"||GRFQConfigs.shop_url=="digital-base-australia.myshopify.com"||GRFQConfigs.shop_url=="elbow45-com.myshopify.com"||GRFQConfigs.shop_url=="samantha1.myshopify.com"||GRFQConfigs.shop_url=="gripps-global.myshopify.com"||GRFQConfigs.shop_url=="devon-lifestyle-nz.myshopify.com"?($2(GRFQConfigs.selector.price_selector).attr("style","display: none !important"),$2(GRFQConfigs.selector.price_selector).find($2(GRFQConfigs.selector.price_selector)).attr("style","display: none !important")):($2(GRFQConfigs.selector.price_selector).eq(0).attr("style","display: none !important"),$2(GRFQConfigs.selector.price_selector).eq(0).find($2(GRFQConfigs.selector.price_selector)).attr("style","display: none !important")),typeof window.forceProductPriceSelector<"u"&&$2(window.forceProductPriceSelector).attr("style","display: none !important"))),GRFQConfigs.shop_url=="lamporia-com.myshopify.com"&&!is_disabled&&console.log($2('form[action="/cart/add"]').addClass("globo-rfq-hide-buynow")),GRFQConfigs.product_enable!=!1&&is_disabled==!1){if(GRFQConfigs.product_enable==2){var ajax_data="shop="+GRFQConfigs.shop_url;GRFQConfigs.customer.name!=!1&&(ajax_data+="&customer_name="+GRFQConfigs.customer.name),GRFQConfigs.customer.email!=!1&&(ajax_data+="&customer_email="+GRFQConfigs.customer.email),GRFQConfigs.customer.id!=!1&&(ajax_data+="&customer_id="+GRFQConfigs.customer.id);var quote_id=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");typeof quote_id<"u"&&(ajax_data+="&quote="+quote_id),$2.ajax({url:GRFQApp.AppURL+"/getform",dataType:"jsonp",type:"POST",data:ajax_data,success:function(result){if(result.success==!0){var addtocart_btn2=$2(".g-atc");$2(addtocart_btn2).length==0&&(addtocart_btn2=$2("form[action*='cart']:visible, form[action*='checkout']:visible").first()),$2("#rfq_product_form").length==0&&$2(result.html).insertAfter(addtocart_btn2),$2(".datepicker").length>0&&typeof jQuery.ui>"u"&&loadScript("//code.jquery.com/ui/1.10.4/jquery-ui.min.js",function(){$2(".datepicker").datepicker({dateFormat:"d MM, yy"})}),$2("#rfq_product_form").validator({custom:{filename:function($el){var str="";$el[0].files.length&&(str=$el[0].files[0].name);const regex=/^\..*$/;let m;return(m=regex.exec(str))!==null},filesize:function($el){if($el[0].files.length){var size=$el[0].files[0].size/1024/1024,maxSize=$el.attr("data-filesize");if(size>maxSize)return!0}return!1},fileextension:function($el){if($el[0].files.length){var allowed_extensions=JSON.parse($el.attr("data-fileextension"));if(allowed_extensions!=null){var ext=/^.+\.([^.]+)$/.exec($el[0].files[0].name);return ext=ext==null?"":ext[1],console.log(ext),!(ext!=""&&ext!=null&&allowed_extensions.indexOf(ext.toLowerCase())>-1)}}return!1}}}).on("submit",function(e){if(e.isDefaultPrevented())return!1;e.preventDefault();var product_id=GRFQConfigs.product.id;data=$2("#rfq_product_form").serialize(),data+="&product_id="+GRFQConfigs.product.id;var options2="";if($2("[name=id]").length>0){if($2("[name=id]").length>1)var variant_id=$2("[name=id]:checked").val();if(typeof variant_id>"u")var variant_id=$2("[name=id]").val();variant_id!=null&&(data+="&variant_id="+variant_id),data+="&name="+encodeURIComponent(GRFQConfigs.product.title);var variant_price=0;$2.each(GRFQConfigs.product.variants,function(i,variant){variant.id==variant_id&&(variant.title.indexOf("Default")==-1&&(options2="&option="+variant.title),variant_price=variant.price,variant.featured_image!=null?data+="&image="+variant.featured_image.src:GRFQConfigs.product.featured_image!=null?data+="&image="+GRFQConfigs.product.featured_image:data+="&image="+GRFQConfigs.product.images[0])})}if($2('[name^="properties"]').length){console.log(1.2);var properties={};options2!=""&&(typeof options2!="string"?$2.each(JSON.parse(JSON.stringify(options2)),function(k2,v){properties[k2]={},properties[k2].name=v.name}):properties.Variant={name:options2}),$2.each($2('[name^="properties"]').serializeArray(),function(i,input){if(input.name.indexOf("properties[_")>-1){if(input.name==="properties[_boldVariantPrices]"){var prices=input.value.split(",");boldPrice=0;for(var i=0;i<prices.length;i++)boldPrice+=parseInt(prices[i])}return!0}if(input.value&&input.value!=""){var k2=input.name.replace("properties[","").replace("]","");properties[k2]={},properties[k2].name=k2+": "+input.value}}),options2=JSON.stringify(properties)}var add_data="product_id="+product_id+"&shop="+GRFQConfigs.shop_url,form=$2("#rfq_product_form"),variant_selector=form.find("[name=id]"),qty=0;if($2(variant_selector).length>0){if($2(variant_selector).length>1)var variant_id=form.find("[name=id]:checked").val();else var variant_id=$2(variant_selector).val();if(variant_id){var sku=0;$2.each(GRFQConfigs.product.variants,function(key,item){item.id==variant_id&&(sku
8=item.sku)}),sku&&(add_data+="&sku="+sku)}add_data+="&variant_id="+variant_id}var vendor=GRFQConfigs.product.vendor;vendor!=""&&(add_data+="&vendor="+vendor),$2("input[name=quantity]").length>0?(add_data+="&qty="+$2("[name=quantity]").val(),qty=$2("[name=quantity]").val()):(qty=1,add_data+="&qty=1"),add_data+="&name="+encodeURIComponent(GRFQConfigs.product.title);var options2="",quote_id2=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");typeof quote_id2<"u"&&quote_id2!=""&&(add_data+="&quote="+quote_id2);var wrong_variant=!0,image="";$2.each(GRFQConfigs.product.variants,function(i,variant){variant.id==variant_id&&(wrong_variant=!1,console.log("Right variant"),variant.title.indexOf("Default")==-1&&(options2=variant.title),variant.featured_image!=null?(image=variant.featured_image.src,add_data+="&image="+variant.featured_image.src):GRFQConfigs.product.featured_image!=null?(image=GRFQConfigs.product.featured_image,add_data+="&image="+GRFQConfigs.product.featured_image):(image=GRFQConfigs.product.images[0],add_data+="&image="+GRFQConfigs.product.images[0]))}),wrong_variant&&(image=GRFQConfigs.product.featured_image,add_data+="&image="+GRFQConfigs.product.featured_image);var product_url="";if(GRFQConfigs.product&&GRFQConfigs.product.handle!=null&&(product_url="//"+GRFQConfigs.shop_url+"/products/"+GRFQConfigs.product.handle,wrong_variant||(product_url+="?variant="+variant_id)),add_data+="&product_url="+product_url,console.log("option has value is : "+options2),$2('[name^="properties"]').length)if(console.log("1"),$2('[name="properties[_boldProductIds]"]').length){console.log("1.1");var properties={},product_ids="",variant_ids="",product_names="",product_prices="",product_qties="";$2('[name="properties[_boldProductIds]"]').length&&(product_ids=$2('[name="properties[_boldProductIds]"]').val().split(",")),$2('[name="properties[_boldVariantIds]"]').length&&(variant_ids=$2('[name="properties[_boldVariantIds]"]').val().split(",")),$2('[name="properties[_boldVariantNames]"]').length&&(product_names=$2('[name="properties[_boldVariantNames]"]').val().split(",")),$2('[name="properties[_boldVariantPrices]"]').length&&(product_prices=$2('[name="properties[_boldVariantPrices]"]').val().split(",")),$2('[name="properties[_boldVariantQtys]"]').length&&(product_qties=$2('[name="properties[_boldVariantQtys]"]').val().split(",")),options2!=""&&(properties[product_id]={variant_id:null,name:options2,price:null,qty:null});var boldPrice=0;$2.each(product_ids,function(i,propertie_product_id){properties[propertie_product_id]={},properties[propertie_product_id].variant_id=variant_ids[i]||null,properties[propertie_product_id].name=product_names[i].replace("%2C",",")||null,properties[propertie_product_id].price=product_prices[i]||null,properties[propertie_product_id].qty=product_qties[i]||1,boldPrice+=parseInt(product_prices[i])||0}
8),console.log("1.1.1 Prop: "),console.log(properties),options2=JSON.stringify(properties)}else{console.log("1.2");var properties={};if(options2!=""&&(properties.Variant={name:options2}),$2.each($2('[name^="properties"]').serializeArray(),function(i,input){if(input.value&&input.value!=""){var k2=input.name.replace("properties[","").replace("]","");properties[k2]={},properties[k2].name=k2+": "+input.value}}),console.log(properties),options2=JSON.stringify(properties),$2(".pricing-info-total-price").length){var w3Qty=parseInt($2('[name="quantity"]').val()),w3Price=Number($2(".pricing-info-total-price").text().replace(/[^0-9.-]+/g,""));w3Qty!==NaN&&w3Qty&&(w3Price=w3Price/w3Qty*100)}}var priceSelector2=$2(GRFQConfigs.selector.price_selector);if(priceSelector2.length>0||GRFQConfigs.product.price||typeof w3Price<"u"){var price=0;if(variant_id&&variant_id>0)for(var k=0;k<GRFQConfigs.product.variants.length;k++)GRFQConfigs.product.variants[k].id==variant_id&&(price=GRFQConfigs.product.variants[k].price);else price=GRFQConfigs.product.price;typeof $2(priceSelector2).attr("data-mw-orig-price")<"u"&&(price=$2(priceSelector2).attr("data-mw-orig-price")),priceSelector2.length==1&&typeof options2!="string"&&(price=parseFloat(priceSelector2.html().replace(/\D+/g,""))),typeof boldPrice<"u"&&boldPrice>0&&(price=boldPrice),typeof w3Price<"u"&&w3Price>0&&(price=w3Price),typeof forceRFQPrice<"u"&&(price=forceRFQPrice),add_data+="&price="+price}add_data+="&option="+options2,console.log(options2),$2("input[type=file]",$2("#rfq_product_form")).each(function(){var files=$2(this).prop("files");files!=null&&files.length<=0&&$2(this).removeAttr("name")});var dataForm=new FormData($2("#rfq_product_form")[0]);if(dataForm.append("shop",GRFQConfigs.shop_url),dataForm.append("name",GRFQConfigs.product.title),dataForm.append("product_id",product_id),variant_id!=null&&dataForm.append("variant_id",variant_id),dataForm.append("vendor",vendor),dataForm.append("sku",sku),dataForm.append("product_url",product_url),dataForm.append("image",image),dataForm.append("option",options2),dataForm.append("qty",qty),dataForm.append("price",price),$2("[name=quantity]").length>0&&(data+="&qty="+$2("[name=quantity]").val()),$2("#rfq_form .g-recaptcha").length){if(!grecaptcha.getResponse())return alert("Please verify you are not a robot."),!1;dataForm.append("g-recaptcha-response",grecaptcha.getResponse())}return $2.ajax({url:GRFQApp.AppURL+"/quickquote",type:"POST",dataType:"json",cache:!1,contentType:!1,processData:!1,data:dataForm,crossDomain:!0,headers:{"X-CSRF-TOKEN":$2('meta[name="csrf-token"]').attr("content")},success:function(result2){if(result2.success==!0){$2("#rfq_product_form").html(result2.html);var offsetTop=$2("#rfq_product_form").offset().top-window.innerHeight/2;$2("html, body").animate({scrollTop:offsetTop},800)}GRFQConfigs.redirectUrl!=null&&GRFQConfigs.redirectUrl!=""&&setTimeout(function(){window.location.href=GRFQConfigs.redirectUrl},2e3)},beforeSend:function(){$2("#submitRFQForm").attr("disabled","disabled")},complete:function(){$2("#submitRFQForm").removeAttr("disabled")}}),!1});var evt=document.createEvent("Event");evt.initEvent("GRFQ_product_page_loaded",!0,!0),document.dispatchEvent(evt)}}})}else if(GRFQConfigs.product_enable==1){var index_form=0,addtocart_btn=$2(".g-atc");$2(addtocart_btn).length==0&&(addtocart_btn=$2(GRFQConfigs.selector.addtocart_selector).first());var class_by_theme="";if(typeof GRFQConfigs.theme_store_id<"u"&&(class_by_theme="rfq-btn-"+GRFQConfigs.theme_store_id,GRFQConfigs.theme_store_id==782?class_by_theme+=" btn--fill btn--regular btn--color":GRFQConfigs.theme_store_id==578&&(class_by_theme+=" btn--secondary")),$2(".button.rfq-btn:not(.rfq-collection-btn-0)").length==0){var additional_button_html="";GRFQConfigs.shop_url=="foundpop.myshopify.com"&&(additional_button_html='<svg xmlns="http://www.w3.org/2000/svg" class="foundop-custom-icon" data-name="Layer 1" viewBox="0 0 25 25"><title>FoundPop-Icons</title><path d="M12,0h1V25H12ZM0,13H8.83V12H0Zm16.17-1v1H25V12Z"/></svg>'),GRFQConfigs.shop_url!="jndaudio.myshopify.com"?(addtocart_btn.length==0&&(addtocart_btn=$2("form[action*='cart']:visible, form[action*='checkout']:visible").first().find(addtocart_btn)),$2(addtocart_btn).length||GRFQConfigs.shop_url=="tierzerovip.myshopify.com"?($2('<button type="button" class="btn button rfq-btn '+class_by_theme+'" onclick="GRFQApp.addProduct(this, '+GRFQConfigs.product.id+')">'+GRFQConfigs.translations.button+additional_button_html+"</button>").insertAfter($2(addtocart_btn)),console.log($2(addtocart_btn))):$2("form[action*='cart'], form[action*='checkout']").length?$2("form[action*='cart']:visible, form[action*='checkout']:visible").first().append($2('<button type="button" class="btn button rfq-btn '+class_by_theme+'" onclick="GRFQApp.addProduct(this, '+GRFQConfigs.product.id+')">'+GRFQConfigs.translations.button+additional_button_html+"</button>")):$2('<button type="button" class="btn button rfq-btn '+class_by_theme+'" onclick="GRFQApp.addProduct(this, '+GRFQConfigs.product.id+')">'+GRFQConfigs.translations.button+additional_button_html+"</button>").insertAfter('select[name="id"]')):$2(addtocart_btn).length?$2('<button type="button" class="btn btn-primary rfq-btn '+class_by_theme+'" onclick="GRFQApp.addProduct(this, '+GRFQConfigs.product.id+')">'+GRFQConfigs.translations.button+"</button>").insertAfter($2(addtocart_btn)):$2("form[action*='cart'], form[action*='checkout']").length?$2("form[action*='cart']:visible, form[action*='checkout']:visible").first().append($2('<button type="button" class="btn btn-primary rfq-btn '+class_by_theme+'" onclick="GRFQApp.addProduct(this, '+GRFQConfigs.product.id+')">'+GRFQConfigs.translations.button+"</button>")):$2('<button type="button" class="btn btn-primary rfq-btn '+class_by_theme+'" onclick="GRFQApp.addProduct(this, '+GRFQConfigs.product.id+')">'+GRFQConfigs.translations.button+"</button>").insertAfter('select[name="id"]')}}}}else if(GRFQApp.getPageType()=="rfq_page"){var quote_id=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");
8$2("body").on("change",".rfq-table input.item_qty",function(){let quote_item_id=$2(this).closest("tr").attr("data-id"),url=GRFQApp.AppURL+"/shop/"+GRFQConfigs.shop_url+"/quote_item/"+quote_item_id+"/qty/"+($2(this).val()>0?$2(this).val():1);$2.ajax({url,success:function(){GRFQApp.UpdateQuoteCart()}}),GRFQApp.UpdateTotal()});var ajax_data="shop="+GRFQConfigs.shop_url;GRFQConfigs.customer.name!=!1&&(ajax_data+="&customer_name="+encodeURIComponent(GRFQConfigs.customer.name)),GRFQConfigs.customer.email!=!1&&(ajax_data+="&customer_email="+GRFQConfigs.customer.email),GRFQConfigs.customer.id!=!1&&(ajax_data+="&customer_id="+GRFQConfigs.customer.id),typeof quote_id<"u"&&(ajax_data+="&quote="+quote_id),$2.ajax({url:GRFQApp.AppURL+"/getmainform",dataType:"jsonp",type:"POST",data:ajax_data,success:function(result){if($2("body").find(":contains('{rfq_content}')").length){var parent_contain2=$2("body").find(":contains('{rfq_content}')")[$2("body").find(":contains('{rfq_content}')").length-1];parent_contain2.tagName=="SCRIPT"&&$2("body").find(":contains('{rfq_content}')").length>1&&(parent_contain2=$2("body").find(":contains('{rfq_content}')")[$2("body").find(":contains('{rfq_content}')").length-2])}if(result.success==!0){let bindRFQHTML2=function(){if(GRFQConfigs.shop_url=="foundpop.myshopify.com"&&$2("body").on("change","#rfq_form td .item_qty",function(){var qty=$2(this).val(),price=$2(this).closest("tr").find(".rfq-price").attr("data-price"),subtotal=0;typeof price<"u"&&(subtotal=parseInt(qty)*parseFloat(price)),subtotal=subtotal/100,$2(this).closest("tr").find(".rfq-subtotal").text(subtotal.formatMoney(2,",","."));var quote_item_id=$2(this).closest("tr").attr("id");quote_item_id=quote_item_id.replace("item-",""),GRFQApp.UpdateTotal(),$2.ajax({url:GRFQApp.AppURL+"/update",dataType:"jsonp",type:"GET",data:{quantity:qty,quote_item_id,shop_url:GRFQConfigs.shop_url},success:function(result2){GRFQApp.UpdateQuoteCart()}})}),GRFQConfigs.shop_url=="che-event-hire.myshopify.com"&&$2("body").on("change","#rfq_form td .item_qty",function(){var row=$2(this).closest("tr"),single_price=$2(this).val(),qty=row.find(".td_price .rfq-price").text(),subtotal=parseInt(single_price)*parseInt(qty);row.find(".td_subtotal .rfq-subtotal").text(subtotal),GRFQApp.UpdateTotal()}),GRFQConfigs.shop_url=="foundpop.myshopify.com"){var isMobile=window.matchMedia("only screen and (max-width: 749px)");isMobile.matches?$2.each($2(".rfq-table tbody tr"),function(key,row){var price_area=$2(this).find(".item_price");price_area.length&&($2(this).closest("tr").find("td.cart_meta").append(price_area.html()),price_area.parent().remove())}):loadScript("//unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js",function(){$2("#rfq_form").imagesLoaded(function(){var height_table=$2("#rfq_form > table").height();height_table<200&&(height_table=200,$2("#rfq_form > table").css("min-height",$2(".g-first-left").height()+1)),$2(".g-first-left").css("min-height",height_table+30)})})}};var bindRFQHTML=bindRFQHTML2;if(typeof parent_contain2<"u"){var parentContent2=$2(parent_contain2).html();parentContent2=parentContent2.replace("{rfq_content}",result.html),$2(parent_contain2).html($2('<div class="rfq_form_page">'+parentContent2+"</div>"))}else $2(".rfq_form_page").html(result.html).promise().done(bindRFQHTML2);$2(".datepicker").length>0&&(typeof jQuery.ui>"u"||GRFQConfigs.shop_url=="vizvi.myshopify.com")&&loadScript("//code.jquery.com/ui/1.10.4/jquery-ui.min.js",function(){if(GRFQConfigs.shop_url=="foundpop.myshopify.com"){var today=new Date,next2week=new Date(today.getFullYear(),today.getMonth(),today.getDate()+14);$2(".datepicker").datepicker({dateFormat:"d MM, yy",minDate:next2week})}else $2(".datepicker").datepicker({dateFormat:"d MM, yy"})}),$2("#rfq_form").validator({custom:{filename:function($el){var str="";$el[0].files.length&&(str=$el[0].files[0].name);const regex=/^\..*$/;let m;return(m=regex.exec(str))!==null},filesize:function($el){if($el[0].files.length){var size=$el[0].files[0].size/1024/1024,maxSize=$el.attr("data-filesize");if(size>maxSize)return!0}return!1},fileextension:function($el){if($el[0].files.length){var allowed_extensions=JSON.parse($el.attr("data-fileextension"));if(allowed_extensions!=null){var ext=/^.+\.([^.]+)$/.exec($el[0].files[0].name);return ext=ext==null?"":ext[1],console.log(ext),!(ext!=""&&ext!=null&&allowed_extensions.indexOf(ext.toLowerCase())>-1)}}return!1}}}).on("submit",function(e){var offsetTop=$2("#rfq_form").offset().top-window.innerHeight/2,hasClass_disable=$2("#submitRFQForm").hasClass("g-disabled");if(e.isDefaultPrevented()||hasClass_disable)return!1;if(e.preventDefault(),$2("input[type=file]",$2("#rfq_form")).each(function(){var files=$2(this).prop("files");files!=null&&files.length<=0&&$2(this).removeAttr("name")}
8),data=new FormData($2("form#rfq_form")[0]),typeof quote_id<"u"&&data.append("quote",quote_id),data.append("shop",GRFQConfigs.shop_url),$2("#rfq_form .g-recaptcha").length){if(!grecaptcha.getResponse())return alert("Please verify you are not a robot."),!1;data.append("g-recaptcha-response",grecaptcha.getResponse())}var csrf=$2("input#_token").val();return $2.ajax({url:$2("#rfq_form").attr("action"),type:"POST",dataType:"json",cache:!1,contentType:!1,processData:!1,data,crossDomain:!0,success:function(result2){result2.success==!0?(GRFQ_setCookie(GRFQConfigs.shop_url+"quote.id",{path:"/"},0),$2(".rfq_form_page").addClass("text-center").html(result2.html)):($2("#submitRFQForm").val(GRFQConfigs.translations.button),$2("#submitRFQForm").removeAttr("disabled").parent().removeClass("g-disabled"),$2(".submit_error").remove(),$2("#submitRFQForm").parent().prepend('<div class="submit_error">'+result2.html+"</div>"))},beforeSend:function(){GRFQConfigs.shop_url=="foundpop.myshopify.com"||$2("#submitRFQForm").attr("disabled","disabled").parent().addClass("g-disabled"),$2("#submitRFQForm").val(GRFQConfigs.translations.pagesubmitting)},complete:function(data2){JSON.parse(data2.responseText).success==!0&&($2("#submitRFQForm").val(GRFQConfigs.translations.button),$2("#submitRFQForm").removeAttr("disabled").parent().removeClass("g-disabled"),offsetTop<0&&(offsetTop=0),$2("html, body").animate({scrollTop:offsetTop},800),GRFQConfigs.redirectUrl!=null&&GRFQConfigs.redirectUrl!=""&&setTimeout(function(){window.location.href=GRFQConfigs.redirectUrl},2e3))}}),!1});var evt=document.createEvent("Event");evt.initEvent("GRFQ_quote_page_loaded",!0,!0),document.dispatchEvent(evt)}}})}else if((GRFQApp.getPageType()=="rfq_history"||GRFQApp.getPageType()=="account")&&($2(".rfq_history_page").length||$2("body").find(":contains('{rfq_history}')").length))if(GRFQConfigs.customer.id!=!1)$2.ajax({url:GRFQApp.AppURL+"/history",dataType:"jsonp",type:"POST",data:"customer="+GRFQConfigs.customer.id+"&shop="+GRFQConfigs.shop_url,success:function(result){if($2("body").find(":contains('{rfq_history}')").length)var parent_contain2=$2("body").find(":contains('{rfq_history}')")[$2("body").find(":contains('{rfq_history}')").length-1];if(result.success){if(typeof parent_contain2<"u"){var parentContent2=$2(parent_contain2).html();parentContent2=parentContent2.replace("{rfq_history}",result.html),$2(parent_contain2).html($2('<div class="rfq_form_page">'+parentContent2+"</div>"))}else $2(".rfq_history_page").html(result.html);var evt=document.createEvent("Event");evt.initEvent("GRFQ_history_page_loaded",!0,!0),document.dispatchEvent(evt)}}});else{if(($2("body").find(":contains('{rfq_history}')").length||$2(".rfq_history_page").length)&&GRFQConfigs.settings.historylogin!=null){var parent_contain=$2("body").find(":contains('{rfq_history}')")[$2("body").find(":contains('{rfq_history}')").length-1];if(typeof parent_contain<"u"){var parentContent=$2(parent_contain).html();parentContent=parentContent.replace("{rfq_history}",GRFQApp.replaceLinkCode(GRFQConfigs.settings.historylogin,"login")),$2(parent_contain).html($2('<div class="rfq_form_page">'+parentContent+"</div>"))}else $2(".rfq_history_page").html(GRFQApp.replaceLinkCode(GRFQConfigs.settings.historylogin,"login"))}typeof GRFQConfigs.settings!==void 0&&typeof GRFQConfigs.settings.historylogin!==void 0&&GRFQConfigs.settings.historylogin!=null||(window.location.href="/account/login?checkout_url="+window.location.href)}GRFQConfigs.collection_enable==!0&&$2(".rfq-collection-script").each(function(){var id_product2=$2(this).data("id"),is_disabled2=!GRFQApp.isEnabled(GRFQCollection[id_product2]),rfq_btn=$2(this).closest("div").find(".button.rfq-btn");is_disabled2==!1&&$2(rfq_btn).length==0&&$2('<button class="btn button rfq-btn rfq-collection-btn-'+GRFQConfigs.theme_store_id+'" onclick="return GRFQApp.add(this, '+id_product2+')">'+GRFQConfigs.translations.button+"</button>").insertAfter(this)})}typeof GRFQConfigs.theme_store_id<"u"&&GRFQConfigs.theme_store_id==782&&$2("button.rfq-btn").addClass("btn--fill btn--regular btn--color")},GRFQApp.replaceLinkCode=function(initialStr,code){var anchor="",regex_replace=/{.*}/,m_replace=regex_replace.exec(initialStr);if(m_replace&&m_replace.length){code=m_replace[0];var m_type=/[^\{]+(?=\|)/g.exec(initialStr),m_trans=/[^\|]+(?=\})/g.exec(initialStr);m_type[0]=="login"&&m_trans[0]!=""&&(anchor='<a href="#" style="text-decoration: underline;" class="login" onclick="gotoLogin(event)">'+m_trans[0]+"</a>",gotoLogin=function(event){event.preventDefault(),window.location.href="/account/login?checkout_url="+window.location.href})}return initialStr.replace(code,anchor)},GRFQApp.add=function(el,product_id){var product_name=GRFQCollection[product_id].title,option="";if(GRFQConfigs.shop_url=="airbag-man-suspension.myshopify.com"){option=$(el).closest("div.product__inside").find("div.hidden div.rfq_collection div.title").text(),option==""&&(option=$("#pageContent div.hidden div.rfq_collection div.title").text()),option=option.replace("Air bag suspension for","");var productDetail="",listDetail=$(el).closest("div.product__inside").find("div.hidden div.rfq_collection div.detail ul.vpdetail
8s > li");listDetail.length==0&&(listDetail=$("#pageContent div.hidden div.rfq_collection div.detail ul.vpdetails > li")),$.each(listDetail,function(k,line){productDetail+="<li class='bullet'>"+$(line).text()+"</li>"}),option=encodeURIComponent("<span class='main_option'> "+option+"</span><br><b>Product/Vehicle Details:</b><br><ul class='product_detail'>"+productDetail+"</ul>")}if(GRFQConfigs.shop_url=="pasartap.myshopify.com"){var variant_id=null,variant_title=null;GRFQCollection[product_id].variants[0].id&&(variant_id=GRFQCollection[product_id].variants[0].id),GRFQCollection[product_id].variants[0].title&&(variant_title=GRFQCollection[product_id].variants[0].title);var qty=0;parseInt($(el).closest("div.product-list-item").find("input.qty").val())>0&&(qty=parseInt($(el).closest("div.product-list-item").find("input.qty").val()))}var variant_id=$(el).closest("form").find('[name="id"]').val(),quantity=$(el).closest("form").find('[name="quantity"]').val();typeof quantity<"u"&&(qty=quantity),GRFQCollection[product_id].featured_image!=null?product_image=GRFQCollection[product_id].featured_image:GRFQCollection[product_id].images[0]?product_image=GRFQCollection[product_id].images[0].src:product_image="";var product_url="";GRFQCollection[product_id].handle!=null&&(product_url="//"+GRFQConfigs.shop_url+"/products/"+GRFQCollection[product_id].handle);var add_data="product_id="+product_id+"&name="+encodeURIComponent(product_name)+"&image="+product_image+"&product_url="+product_url+"&option="+option+"&shop="+GRFQConfigs.shop_url;if(typeof variant_id<"u"){add_data+="&variant_id="+variant_id;for(var i=0;i<GRFQCollection[product_id].variants.length;i++)if(GRFQCollection[product_id].variants[i].id==variant_id)var variant_title=GRFQCollection[product_id].variants[i].title;typeof variant_title<"u"&&(add_data+="&option="+variant_title)}qty&&qty>0&&(add_data+="&qty="+qty);var price=0;price=GRFQCollection[product_id].price,typeof GRFQCollection[product_id].price>"u"&&(GRFQCollection[product_id]&&GRFQCollection[product_id].price?(priceSelector.length==1&&typeof options!="string"?price=parseFloat(priceSelector.html().replace(/\D+/g,"")):price=GRFQCollection[product_id].price,typeof $(priceSelector).attr("data-mw-orig-price")<"u"&&(price=$(priceSelector).attr("data-mw-orig-price"))):GRFQCollection[product_id]&&GRFQCollection[product_id].price_min&&(price=GRFQCollection[product_id].price_min)),typeof forceRFQPrice<"u"&&(price=forceRFQPrice),add_data+="&price="+price;var vendor=GRFQCollection[product_id].vendor;vendor!=""&&(add_data+="&vendor="+vendor);var sku=GRFQCollection[product_id].variants[0].sku;sku!=""&&(add_data+="&sku="+sku);var quote_id=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");return typeof quote_id<"u"&&(add_data+="&quote="+quote_id),console.log(add_data),$.ajax({url:GRFQApp.AppURL+"/add",type:"GET",dataType:"jsonp",data:add_data,success:function(response){if(console.log(response),response.success==!0){if(GRFQ_setCookie(GRFQConfigs.shop_url+"quote.id",response.quote,{expires:7,path:"/"}),GRFQConfigs.shop_url=="textile-technologies-europe-ltd.myshopify.com"||GRFQConfigs.shop_url=="dev-nassauelectrical.myshopify.com"||GRFQConfigs.shop_url=="sunstatebrp18.myshopify.com"||GRFQConfigs.shop_url=="sunstatemc.myshopify.com"||GRFQConfigs.shop_url=="j-carp.myshopify.com"||GRFQConfigs.shop_url=="inflataad.myshopify.com"||GRFQConfigs.shop_url=="uiisii.myshopify.com"||GRFQConfigs.shop_url=="artwork-by-adrianne.myshopify.com")return window.location.href="//"+GRFQConfigs.shop_url+"/pages/"+GRFQConfigs.rfq_page,!1;$("body").append(response.html),console.log(response.html),$(".rfq_overlay").fadeIn(),$("#rfq_continue_shopping, #close_rfq_popup").click(function(){$(".rfq_overlay").fadeOut(300,function(){$(".rfq_overlay").remove()})}),GRFQApp.UpdateQuoteCart()}},beforeSend:function(){$(el).attr("disabled","disabled")},complete:function(){$(el).removeAttr("disabled")}}),!1},GRFQApp.addProduct=function(el,product_id,product=!1){var targetProduct=GRFQConfigs.product;product!==!1&&(targetProduct=product);var add_data="product_id="+product_id+"&shop="+GRFQConfigs.shop_url,form=$(el).closest("form"),variant_selector=form.find("[name=id]");if($(variant_selector).length>0){if($(variant_selector).length>1)var variant_id=form.find("[name=id]:checked").val();else var variant_id=$(variant_selector).val();if(variant_id){var sku="";$.each(targetProduct.variants,function(key,item){item.id==variant_id&&(sku
8=item.sku)}),sku&&(add_data+="&sku="+sku)}variant_id!=null&&(add_data+="&variant_id="+variant_id)}var vendor=targetProduct.vendor;vendor!=""&&(add_data+="&vendor="+vendor);var qty=1,quantity=$(el).closest("form").find('[name="quantity"]').val();typeof quantity<"u"&&(qty=quantity),add_data+="&qty="+qty,add_data+="&name="+encodeURIComponent(targetProduct.title);var options2="",quote_id=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");typeof quote_id<"u"&&(add_data+="&quote="+quote_id);var wrong_variant=!0,variant_object;$.each(targetProduct.variants,function(i,variant){variant.id==variant_id&&(wrong_variant=!1,variant_object=variant,variant.title.indexOf("Default")==-1&&(options2=variant.title),variant.featured_image!=null?add_data+="&image="+variant.featured_image.src:targetProduct.featured_image!=null?add_data+="&image="+targetProduct.featured_image:add_data+="&image="+targetProduct.images[0],targetProduct.selected_or_first_available_variant=variant_object)}),wrong_variant&&(add_data+="&image="+targetProduct.featured_image);var product_url="";if(targetProduct&&targetProduct.handle!=null&&(product_url="//"+GRFQConfigs.shop_url+"/products/"+targetProduct.handle,wrong_variant||(product_url+="?variant="+variant_id)),add_data+="&product_url="+product_url,console.log("option has value is : "+options2),(options2=="default title"||options2=="Default Title")&&(options2=""),GRFQConfigs.shop_url=="textile-technologies-europe-ltd.myshopify.com"){var selectlist=$(form).find("select.single-option-selector");if(selectlist&&selectlist.length>0){var options_prop={};$.each(selectlist,function(k,select){options_prop[k]={};var label=$(select).siblings("label").text().trim(),selected=$(select).find(":selected").text();options_prop[k].name=label+selected}),options2=options_prop}}var boldPrice;if($(el).closest("form").find('[name^="properties"]').length){var properties={};if(options2!=""&&(typeof options2!="string"?$.each(JSON.parse(JSON.stringify(options2)),function(k,v){properties[k]={},properties[k].name=v.name}):properties.Variant={name:options2}),$.each($(el).closest("form").find('[name^="properties"]').serializeArray(),function(i,input){if(input.name.indexOf("properties[_")>-1){if(input.name==="properties[_boldVariantPrices]"){var prices=input.value.split(",");boldPrice=typeof targetProduct.selected_or_first_available_variant<"u"?targetProduct.selected_or_first_available_variant.price:targetProduct.price;for(var i=0;i<prices.length;i++)boldPrice+=parseInt(prices[i])}return!0}if(input.value&&input.value!=""){var k=input.name.replace("properties[","").replace("]","");properties[k]={},properties[k].name=k+": "+input.value}}),options2=properties,$(".pricing-info-total-price").length){var w3Qty=parseInt($('[name="quantity"]').val()),w3Price=Number($(".pricing-info-total-price").text().replace(/[^0-9.-]+/g,""));w3Qty!==NaN&&w3Qty&&(w3Price=w3Price/w3Qty*100)}}if(console.log(options2),$(".rfq-metafields-wrapper").length&&typeof options2=="string"){var metafields=encodeURIComponent($(".rfq-metafields-wrapper").html());options2+=metafields}typeof options2=="string"&&options2==""&&$(form).find("select:visible").each(function(index,item){var slash=" / ";index==0&&(slash=""),options2+=slash+$(item).val()});var priceSelector2=$(GRFQConfigs.selector.price_selector);if(priceSelector2.length>0||targetProduct.price){var price=0;typeof variant_object<"u"&&variant_object?price=variant_object.price:typeof targetProduct.selected_or_first_available_variant<"u"?price=targetProduct.selected_or_first_available_variant.price:price=targetProduct.price,typeof $(priceSelector2).attr("data-mw-orig-price")<"u"&&(price=$(priceSelector2).attr("data-mw-orig-price")),priceSelector2.length==1&&typeof options2!="string"&&(price=parseFloat(priceSelector2.html().replace(/\D+/g,""))*100),typeof boldPrice<"u"&&boldPrice>0&&(price=boldPrice),typeof w3Price<"u"&&w3Price>0&&(price=w3Price),typeof forceRFQPrice<"u"&&(price=forceRFQPrice),add_data+="&price="+price}if(typeof options2!="string"&&(options2=JSON.stringify(options2)),options2!='""'||options2!=""){var find="&",re=new RegExp(find,"g"),find=" ",ra=new RegExp(find,"g");add_data+="&option="+options2.replace(re,"%26").replace(ra,"%20");var sharp=new RegExp("#","g");add_data=add_data.replace(sharp,"")}console.log(add_data),$.ajax({url:GRFQApp.AppURL+"/add",type:"GET",dataType:"jsonp",data:add_data,success:function(response){if(response.success==!0){if(GRFQ_setCookie(GRFQConfigs.shop_url+"quote.id",response.quote,{expires:7,path:"/"}),GRFQConfigs.shop_url=="textile-technologies-europe-ltd.myshopify.com"||GRFQConfigs.shop_url=="dev-nassauelectrical.myshopify.com"||GRFQConfigs.shop_url=="sunstatebrp18.myshopify.com"||GRFQConfigs.shop_url=="sunstatemc.myshopify.com"||GRFQConfigs.shop_url=="j-carp.myshopify.com"||GRFQConfigs.shop_url=="inflataad.myshopify.com"||GRFQConfigs.shop_url=="uiisii.myshopify.com"||GRFQConfigs.shop_url=="artwork-by-adrianne.myshopify.com")return window.location.href="//"+GRFQConfigs.shop_url+"/pages/"+GRFQConfigs.rfq_page,!1;$("body").append(response.html),$(".rfq_overlay").fadeIn(),$("#rfq_continue_shopping, #close_rfq_popup").click(function(){$(".rfq_overlay").fadeOut(300,function(){$(".rfq_overlay").remove()})})}},beforeSend:function(){$(el).attr("disabled","disabled")},complete:function(){$(el).removeAttr("disabled"),GRFQApp.UpdateQuoteCart()}})},GRFQApp.addCustom=function(el,product_id,product_name,product_option,product_image2){console.log(GRFQConfigs.shop_url);var add_data="product_id="+product_id+"&name="+product_name+"&image="+product_image2+"&option="+product_option+"&shop="+GRFQConfigs.shop_url,quote_id=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");typeof quote_id<"u"&&(add_data+="&quote="+quote_id),$.ajax({url:GRFQConfigs.app_url+"/add",type:"GET",dataType:"jsonp",data:add_data,success:function(response){response.success==!0&&(GRFQ_setCookie(GRFQConfigs.shop_url+"quote.id",response.quote,{expires:7,path:"/"}),$("body").append(response.html),$(".rfq_overlay").fadeIn(),$("#rfq_continue_shopping, #close_rfq_popup").click(function(){$(".rfq_overlay").fadeOut(300,function(){$(".rfq_overlay").remove()})}),GRFQApp.UpdateQuoteCart())},beforeSend:function(){$(el).attr("disabled","disabled")},complete:function(){$(el).removeAttr("disabled")}})},GRFQApp.viewQuote=function(quote_id){return $.ajax({url:GRFQApp.AppURL+"/viewquote",dataType:"jsonp",type:"POST",data:"id="+quote_id+"&shop="+GRFQConfigs.shop_url,beforeSend:function(){$("body, html").animate({scrollTop:$("#quote-preview").offset().top}
8,300),$("#quote-preview #quote-preview-loaded").slideUp(150,function(){$("#quote-preview #quote-preview-loaded").html(""),$("#quote-preview #loading-mask").show(150)})},success:function(result){$("#quote-preview #loading-mask").hide(150,function(){$("#quote-preview #quote-preview-loaded").html(result.html).slideDown(150)})}}),!1},GRFQApp.remove=function(el,item_id){var data2="shop="+GRFQConfigs.shop_url+"&item_id="+parseInt(item_id),quote_id=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");typeof quote_id<"u"&&(data2+="&quote="+quote_id),$.ajax({url:GRFQApp.AppURL+"/delete",type:"GET",dataType:"jsonp",data:data2,success:function(response){if(response.success==!0){GRFQ_setCookie(GRFQConfigs.shop_url+"quote.id",response.quote,{expires:7,path:"/"});var last_row_h=$("#item-"+parseInt(item_id)).height();if($("#item-"+parseInt(item_id)).fadeOut(150,function(){$("#item-"+parseInt(item_id)).remove(),GRFQApp.updateRows(),GRFQApp.UpdateTotal(),UpdatePrice()}),response.html!=""&&$(".rfq_form_page").html(response.html),GRFQApp.UpdateQuoteCart(),GRFQConfigs.shop_url=="foundpop.myshopify.com"){var height_table=$("#rfq_form > table").height()-last_row_h,height_left=$(".g-first-left").height();height_table<200&&(height_table=200,$("#rfq_form > table").css("min-height",$(".g-first-left").height()+1)),height_left>height_table&&(height_table=height_left-50,$("#rfq_form > table").css("min-height",height_table)),setTimeout(function(){$(".g-first-left").css("min-height",height_table+30)},150)}}},beforeSend:function(){$(el).attr("disabled","disabled")},complete:function(){$(el).removeAttr("disabled")}})},GRFQApp.getPageType=function(){var url=window.location.toString();return url.match(/\/products\//)!==null||url.match(/\/products_preview/)!==null?"product":url.match(/\/cart/)!==null?"cart":url.match(/\/collections\//)!==null?"collection":url.match(/\/account/)!==null?"account":url.match(/\/pages\//)!==null?url.indexOf(GRFQConfigs.rfq_page)!==-1?"rfq_page":url.indexOf(GRFQConfigs.rfq_history)!==-1?"rfq_history":typeof forceRFQCollectionPage<"u"?"collection":typeof forceRFQProductPage<"u"?"product":"page":url.match(/\/search\?/)!==null?"search":""},GRFQApp.UpdateQuoteCart=function(){var quote_id__=GRFQ_getCookie(GRFQConfigs.shop_url+"quote.id");$.ajax({url:GRFQApp.AppURL+"/numitem",type:"GET",dataType:"jsonp",data:"&quote_id="+quote_id__,success:function(result){$(".quotecounter .bigquotecounter").text(result.numberofenquiry),$(".cart-icon .quotecount").text(result.numberofenquiry),$(".cart-icon .count").text(result.numberofenquiry),$('[id="quoteCount"]').text(result.numberofenquiry),$(".quoteCount").text(result.numberofenquiry),$(".g-quote-item span.g-badge").text(result.numberofenquiry),$(".medium-up--hide.small--one-half .site-header__cart span.quotecount").text(result.numberofenquiry),result.numberofenquiry==0?$(".quoteCount").css("display","none"):($(".g-quote-item span.g-wrapper-badge , .medium-up--hide.small--one-half .site-header__cart span.quotecount-wrapper").css("display",""),$(".cart-icon .count, #quoteCount,.quoteCount").css("display",""))}})},GRFQApp.UpdateTotal=function(){function convertNumber(num){for(var t="",i=0;i<num.length;i++)num[i]=="."?t+="":num[i]==","?t+=".":t+=num[i];return t}if(GRFQConfigs.shop_url=="che-event-hire.myshopify.com"){var rows=$("table.rfq-table tbody tr");if(rows.length){var total=0;$.each(rows,function(k,row){total+=parseFloat(parseFloat($(row).find(".rfq-subtotal").text()).toFixed(2))}),GRFQConfigs.shop_url=="promoland-test.myshopify.com"&&(total+=parseFloat(parseFloat(total*.25).toFixed(2))),$("#rfq_form .rfq-total").text(parseFloat(parseFloat(total).toFixed(2)))}}if(GRFQConfigs.shop_url=="promoland-test.myshopify.com"){var rows=$("table.rfq-table tbody tr");if(rows.length){var total=0;$.each(rows,function(k,row){var price=$(row).find(".rfq-price").attr("data-price"),qty=$(row).find(".item_qty").val();total+=parseFloat(convertNumber($(row).find(".rfq-subtotal").text())),$(row).find(".rfq-subtotal").text((qty*parseInt(price)/100).toFixed(2).replace(".",","))}),$("#rfq_form .rfq-total").text((total/100).toFixed(2).replace(".",","))}}if(GRFQConfigs.shop_url=="prinsa-mx.myshopify.com"||GRFQConfigs.shop_url=="industralia-mexico.myshopify.com"){var rows=$("table.rfq-table tbody tr");if(rows.length){var total=0;$.each(rows,function(k,row){$(row).find(".rfq-subtotal .amount").text((convertNumber($(row).find("input.item_qt
8y").val())*parseFloat(convertNumber($(row).find(".rfq-price").attr("data-price")))/100).formatMoney(2,".",",")),total+=convertNumber($(row).find("input.item_qty").val())*parseFloat(convertNumber($(row).find(".rfq-price").attr("data-price")))}),$("#rfq_form .rfq-total .amount").text((total/100).formatMoney(2,".",","))}}},GRFQApp.updateRows=function(){var total=0;$(".rfq-table tbody tr").each(function(index,item){var qty=$(item).find(".item_qty").val(),price=$(item).find(".rfq-price").attr("data-price");total+=qty*parseInt(price);var moneyFomart=$(item).find(".rfq-subtotal").siblings(".rfq_money_formart");moneyFomart.length?$(item).find(".rfq-subtotal").text((qty*parseInt(price)/100).toFixed(2)):$(item).find(".rfq-subtotal").text(GRFQConfigs.money_format+" "+(qty*parseInt(price)/100).toFixed(2))}),$("#rfq_form").find(".rfq-total").text(GRFQConfigs.money_format+" "+(total/100).toFixed(2))},GRFQApp.UpdateQuantity=function(quote_item_id,qty){$.ajax({url:"https://"+GRFQApp.AppURL+"/updateqty",type:"GET",dataType:"jsonp",data:"&quote_item_id="+quote_item_id+"&qty="+qty,success:function(result){}})},GRFQApp.isEnabled=function(product){let is_enable=!1;if(GRFQConfigs.rules&&typeof GRFQConfigs.rules.all<"u"&&GRFQConfigs.rules.all.enable&&!is_enable)return!0;if(GRFQConfigs.rules.manual.enable&&GRFQConfigs.rules.manual.manual_products.split(",").indexOf(product.id+"")>-1&&(is_enable=!0),GRFQConfigs.rules.automate.enable&&!is_enable&&typeof GRFQConfigs.rules.automate.automate_rule<"u"){let res=[];for(var i=0;i<GRFQConfigs.rules.automate.automate_rule.length;i++){let r=GRFQConfigs.rules.automate.automate_rule[i],field,match=!1;switch(r.select){case"TITLE":field="title";break;case"TYPE":field="type";break;case"VENDOR":field="vendor";break;case"PRICE":field="price";break;case"TAG":field="tags";break;case"COLLECTION":field="collection";break;case"VARIANT_COMPARE_AT_PRICE":field="compare_at_price";break;case"VARIANT_WEIGHT":field="compare_at_price";break;case"VARIANT_INVENTORY":field="compare_at_price";break;case"VARIANT_TITLE":field="compare_at_price";break;default:}switch(r.where){case"EQUALS":field=="tags"||field=="collection"?match=product[field].indexOf(r.value)>-1:match=product[field]==r.value;break;case"NOT_EQUALS":match=product[field]!=r.value;break;case"GREATER_THAN":field=="price"?match=parseFloat(product[field])>parseFloat(r.value)*100:match=parseFloat(product[field])>parseFloat(r.value);break;case"LESS_THAN":field=="price"?match=parseFloat(product[field])<parseFloat(r.value)*100:match=parseFloat(product[field])<parseFloat(r.value);break;case"STARTS_WITH":match=product[field].startsWith(r.value);break;case"ENDS_WITH":match=product[field].endsWith(r.value);break;case"CONTAINS":match=product[field].indexOf(r.value)>-1;break;case"NOT_CONTAINS":match=product[field].indexOf(r.value)==-1;break;default:}res.push(match)}if(res.length){is_enable=res[0];for(var i=1;i<res.length;i++)GRFQConfigs.rules.automate.automate_operator=="and"?is_enable=is_enable&&res[i]:is_enable=is_enable||res[i]}}return console.log(product.title+"---"+is_enable),is_enable},Number.prototype.formatMoney=function(c,d,t){var n=this,c=isNaN(c=Math.abs(c))?2:c,d=d??".",t=t??",",s=n<0?"-":"",i=String(parseInt(n=Math.abs(Number(n)||0).toFixed(c))),j=(j=i.length)>3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"")},Object.size=function(obj){var size=0,key;for(key in obj)obj.hasOwnProperty(key)&&size++;return size},typeof jQuery>"u"||jQuery.fn.jquery.split(".")[0]<2&&jQuery.fn.jquery.split(".")[1]<7){var doNoConflict=!0;typeof jQuery>"u"&&(doNoConflict=!1),loadScript("//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js",function(){doNoConflict?jQuery17=jQuery.noConflict(!0):jQuery17=jQuery,GRFQApp.init(jQuery17)})}else GRFQApp.init(jQuery)})();
9//# sourceMappingURL=/cdn/shop/t/3/assets/globorequestforquote.js.map?v=166984254155853387631599613491

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.