1Shopify.Wishlist=(function(){var config={howManyToShow:4,howManyToStoreInMemory:4,storeSelector:"add-product-wishlist",removeSelector:"remove-product-wishlist",showwishlist:"show-wishlist",wrapperId:"product-wishlist",templateId:"product-wishlist-template-wrapper",onComplete:null},productHandleQueue=[],wrapper=null,template=null,shown=0,feature_template="",cookie={configuration:{expires:90,path:"/",domain:window.location.hostname},name:"shopify_product_wishlist",write:function(productwishlist){jQuery.cookie(this.name,productwishlist.join(" "),this.configuration)},read:function(){var productwishlist=[],cookieValue=jQuery.cookie(this.name);return typeof cookieValue!="undefined"&&cookieValue!==null&&cookieValue.length>0&&(productwishlist=cookieValue.split(" ")),productwishlist},destroy:function(){jQuery.cookie(this.name,null,this.configuration)},remove:function(productHandle){var productwishlist=this.read(),position=jQuery.inArray(productHandle,productwishlist);position!==-1&&(productwishlist.splice(position,1),this.write(productwishlist))}},finalize=function(){if(jQuery(".loading").hide(),jQuery.fancybox(jQuery("#"+config.wrapperId),{autoDimensions:!1,height:690,width:1170,autoSize:!1,transitionIn:"fade",transitionOut:"fade",afterShow:function(){switch($("#product-wishlist").removeClass(),shown){case 1:$("#product-wishlist").addClass("one-prods");break;case 2:$("#product-wishlist").addClass("two-prods");break;case 3:$("#product-wishlist").addClass("three-prods");break;case 4:$("#product-wishlist").addClass("four-prods");break}shown=0,Currency.convertAll("TTD",Currency.currentCurrency)}}),config.onComplete)try{config.onComplete()}catch(error){}},buildwishlistObject=function(_product,_template){if(typeof _product!="undefined"){var _return_template={features:_template.features,availability:_template.availability,options:_template.options,vendor:_template.vendor,collection:_template.collection,rating:_template.rating};_template.features=_template.features.replace(/___product_id___/gi,_product.id),_template.features=_template.features.replace(/___product_url___/gi,_product.uri),_template.features=_template.features.replace(/___product_handle___/gi,_product.handle),_template.features=_template.features.replace("att-image-src=","src="),_template.features=_template.features.replace(/___product_image___/gi,_product.featured_image),_template.features=_template.features.replace(/___product_title___/gi,_product.title),_template.features=_template.features.replace(/___product_availability___/gi,_product.available),_template.features=_template.features.replace(/___product_price___/gi,_product.price),_template.features=_template.features.replace(/___product_label_sale___/gi,_product.sale_label),_template.features=_template.features.replace(/___product_label_new___/gi,_product.new_label),_product.has_wishlist_price&&(_template.features=_template.features.replace(/price price-wishlist product-old-price hidden/gi,"price price-wishlist product-old-price")),_template.features=_template.features.replace(/___product_old_price___/gi,_product.wishlist_price),_template.features=_template.features.replace(/___product_variant_id___/gi,_product.variants[0].id),_template.availability=_template.availability.replace(/___product_id___/gi,_product.id),_template.availability=_template.availability.replace(/___product_availability___/gi,_product.available),_template.vendor=_template.vendor.replace(/___product_id___/gi,_product.id),_template.vendor=_template.vendor.replace(/___product_vendor___/gi,_product.vendor),_template.rating=_template.rating.replace(/___product_id___/gi,_product.id);var _rating='<span class="spr-starrating spr-summary-starrating" itemscope="" ><i style="" class="spr-icon spr-icon-star-empty"></i><i style="" class="spr-icon spr-icon-star-empty"></i><i style="" class="spr-icon spr-icon-star-empty"></i><i style="" class="spr-icon spr-icon-star-empty"></i><i style="" class="spr-icon spr-icon-star-empty"></i></span>';if(_product.rating.length>0&&(_rating=jQuery("<div>"+_product.rating+"</div>"),_rating='<span class="spr-starrating spr-summary-starrating" itemscope="" >'+_rating.find("span.spr-starrating").html()+"</span>"),_template.rating=_template.rating.replace(/___product_rating___/gi,_rating),_template.collection=_template.collection.replace(/___product_id___/gi,_product.id),_template.collection=_template.collection.replace(/___product_collection___/gi,_product.collections),_template.options=_template.options.replace(/___product_id___/gi,_product.id),_product.options.length==1&&_product.options[0]=="Title"&&_product.option_value.option1.length==1&&_product.option_value.option1[0]=="Default Title")_template.options=_template.options.replace(/___product_options___/gi,"");else{for(var _option_htmls="",_counter=0;_counter<_product.options.length;_counter++)switch(_counter){case 0:_option_htmls=_option_htmls+'<span class="line"><label class="heading">'+_product.options[_counter]+"</label>"+_product.option_value.option1.join(",")+"</span>";break;case 1:_option_htmls=_option_htmls+'<span class="line"><label class="heading">'+_product.options[_counter]+"</label>"+_product.option_value.option2.join(",")+"</span>";break;case 2:_option_htmls=_option_htmls+'<span class="line"><label class="heading">'+_product.options[_counter]+"</label>"+_product.option_value.option3.join(",")+"</span>";break}_template.options=_template.options.replace(/___product_options___/gi,_option_htmls)}return{before:_return_template,after:_template}}},moveAlong=function(table_template,template2,wrapper2){productHandleQueue.length&&shown<config.howManyToShow?jQuery.ajax({url:"/products/"+productHandleQueue[0],data:{view:"wishlist"},cache:!0,success:function(respond){var _product=jQuery.parseJSON(respond),_current_template=buildwishlistObject(_product,table_template);table_template=_current_template.before,_current_template=_current_template.after,template2.find("tr.features").append(_current_template.features),template2.find("tr.availability").append(_current_template.availability),template2.find("tr.vend
1or").append(_current_template.vendor),template2.find("tr.collection").append(_current_template.collection),template2.find("tr.options").append(_current_template.options),template2.find("tr.rating").append(_current_template.rating),wrapper2.html(template2.html()),productHandleQueue.shift(),shown++,moveAlong(table_template,template2,wrapper2)},error:function(){cookie.remove(productHandleQueue[0]),productHandleQueue.shift(),moveAlong(table_template,template2,wrapper2)}}):(finalize(),template2.find("td.product-col.wishlist_features").html(feature_template))};return{resizeImage:function(src,size){if(size==null)return src;if(size=="master")return src.replace(/http(s)?:/,"");var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i);if(match!=null){var prefix=src.split(match[0]),suffix=match[0];return(prefix[0]+"_"+size+suffix).replace(/http(s)?:/,"")}else return null},showProductwishlist:function(params){var params=params||{};if(jQuery.extend(config,params),productHandleQueue=cookie.read(),jQuery(".loading").show(),productHandleQueue.length<1)return jQuery.fancybox(jQuery('<p class="bc-error"><span>You have to add at least one product</span></p>'),{autoDimensions:!1,autoSize:!1,width:350,height:150,afterShow:function(){setTimeout(function(){jQuery.fancybox.close()},3e4)}}),jQuery(".loading").hide(),-1;template=jQuery("#"+config.templateId),wrapper=jQuery("#"+config.wrapperId);var features_html=template.find("td.product-col.wishlist_features").html(),features_col='<td class="product-col wishlist_features product-___product_id___">'+features_html+"</td>",availability_col='<td class="product-col wishlist_availability product-___product_id___">___product_availability___</td>',options_col='<td class="product-col wishlist_options product-___product_id___">___product_options___</td>',vendor_col='<td class="product-col wishlist_vendor product-___product_id___">___product_vendor___<span class="shopify-product-reviews-badge" data-id="___product_id___"></span></td>',collection_col='<td class="product-col wishlist_collection product-___product_id___">___product_collection___</td>',rating_col='<td class="product-col wishlist_rating product-___product_id___">___product_rating___</td>',table_template={features:features_col,availability:availability_col,options:options_col,vendor:vendor_col,collection:collection_col,rating:rating_col};template.find("td.product-col").remove(),feature_template.length==0&&(feature_template=features_html),config.howManyToShow&&template.length&&wrapper.length&&moveAlong(table_template,template,wrapper)},getConfig:function(){return config},clearList:function(){cookie.destroy()},removeProductwishlist:function(params){var params=params||{};jQuery.extend(config,params);var productwishlist=cookie.read();if(jQuery(".loading").show(),params.handle.length>0){var productHandle=params.handle,position=jQuery.inArray(productHandle,productwishlist);position!==-1&&productwishlist.splice(position,1),cookie.write(productwishlist)}jQuery(".wishlist-icon").children("span.number").text(productwishlist.length),jQuery(".loading").hide()},recordProductwishlist:function(params){var params=params||{};jQuery.extend(config,params),jQuery(".loading").show();var productwishlist=cookie.read();if(params.handle.length>0){var productHandle=params.handle,position=jQuery.inArray(productHandle,productwishlist);if(position===-1)if(productwishlist.length<config.howManyToStoreInMemory){productwishlist.push(productHandle),productwishlist=productwishlist.splice(0,config.howManyToStoreInMemory),cookie.write(productwishlist),jQuery.fancybox(jQuery('<p class="bc-success"><span>Product added to wishlist list</span></p>'),{autoDimensions:!1,autoSize:!1,width:350,height:60,afterShow:function(){setTimeout(function(){jQuery.fancybox.close()},3e4)}}),jQuery(".wishlist-icon").children("span.number").text(productwishlist.length),jQuery(".loading").hide();return}else{jQuery.fancybox(jQuery('<p class="bc-error"><span>Your wishlist list is full</span></p>'),{autoDimensions:!1,autoSize:!1,width:350,height:60,afterShow:function(){setTimeout(function(){jQuery.fancybox.close()},3e4)}}),jQuery(".loading").hide();return}else{jQuery.fancybox(jQuery('<p class="bc-error"><span>Product already on wishlist list</span></p>'),{autoDimensions:!1,autoSize:!1,width:350,height:60,afterShow:function(){setTimeout(function(){jQuery.fancybox.close()},3e4)}}),jQuery(".loading").hide();return}}},initWishlist:function(params){var _product_wishlist=this,_storedProductwishlist=cookie.read();jQuery(".wishlist-icon").children("span.number").text(_storedProductwishlist.length);var params=params||{};jQuery.extend(config,params),jQuery("a."+config.storeSelector).bind("click",function(){var _handle=jQuery(this).attr("data-handle-product");_product_wishlist.recordProductwishlist({handle:_handle})});var _removeSelector="a."+config.removeSelector;jQuery("body").delegate(_removeSelector,"click",function(event){event.preventDefault();var _handle=jQuery(this).attr("data-handle-product"),_id=jQuery(this).attr("data-id-product");jQuery("#"+config.wrapperId).find("td.product-col.product-"+_id).remove(),_product_wishlist.removeProductwishlist({handle:_handle})}),jQuery("a."+config.showwishlist).bind("click",function(){_product_wishlist.showProductwishlist()})}}})(); 2//# sourceMappingURL=/cdn/shop/t/4/assets/bc.wishlist.js.map?v=86651927247775033821751325306
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.