1(function(a){var C=a(document),g=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/i.test(navigator.userAgent);a.expr[":"].style=function(t,p,u){t=a(t);p=u[3].split(",");p=a.map(p,function(b){return a.trim(b)});u=p[0];p=p[1];if(t.css(u)==p)return!0};a.s3throttle=function(t,p,u){var b=a.s3throttle.timeouts[t];b&&clearTimeout(b);a.s3throttle.timeouts[t]=setTimeout(p,u)};a.s3escape=function(t){return a("<div>").text(t).html()};a.s3throttle.timeouts={};a.fn.s3center=function(){return this.each(function(){var t= 2a(this),p=t.is(":visible");p||t.show();t.css({marginLeft:-t.outerWidth()/2,marginTop:-t.outerHeight()/2});p||t.hide()})};a.fn.s3deserializeArray=function(t){return this.each(function(){var p=a(this);a.each(t,function(){var u=p.find('[name="'+this.name+'"]');u.length&&(u.is("input[type=radio]")?u.filter('[value="'+this.value+'"]').trigger("click"):u.val(this.value).trigger("change"))})})};a.fn.caret=function(t,p){if(this.length!==0&&!this.is(":hidden")){if(a.type(t)==="number")return p=a.type(p)=== 3"number"?p:t,this.each(function(){this.setSelectionRange?this.setSelectionRange(t,p):this.createTextRange&&(u=this.createTextRange(),u.collapse(!0),u.moveEnd("character",p),u.moveStart("character",t),u.select())});if(this[0].setSelectionRange)t=this[0].selectionStart,p=this[0].selectionEnd;else if(document.selection&&document.selection.createRange){var u=document.selection.createRange();t=0-u.duplicate().moveStart("character",-1E5);p=t+u.text.length}return{begin:t,end:p}}};a.keys={};a.KEYS={Digit:[48, 457],Backspace:8,Comma:44,Point:46};a.each(a.KEYS,function(t,p){a.keys["is"+t]=function(u){return a.isArray(p)?p[0]<=u&&u<=p[1]:p===u}});a.fn.getVal=function(){var t=[];this.each(function(){var p=a(this).val();(p=parseFloat(p))||(p=0);t.push(p)});return t};a.fn.keyFilter=function(t,p){p=a.extend({type:"int",def:"",callback:a.noop},p);return this.each(function(){var u=a(this);u.on("keypress",t,function(b){var c=a(this);if(b.shiftKey&&b.key!==","&&(b.shiftKey||b.ctrlKey))return!1;if(b.which===0)return!0; 5var d=a.keys.isDigit(b.which);var f=a.keys.isPoint(b.which)||a.keys.isComma(b.which);b=a.keys.isBackspace(b.which);if(!d&&!f&&!b||p.type==="int"&&f)return!1;b=c.val().replace(/,/g,".");d=c.caret();c.val(b);c.caret(d.begin,d.end);if(f&&b.indexOf(".")!==-1)return!1});u.on("keyup",t,function(){var b=a(this);p.callback(b)});u.on("blur",t,function(){var b=a(this);b.val()===""&&(b.val(p.def),p.callback(b))})})};a.fn.getHeights=function(){var t=[],p=0;this.each(function(){var u=a(this);u.css("min-height", 60);u=u.height();t.push(u);u>p&&(p=u)});return{values:t,max:p}};a.fn.eachRow=function(t,p){var u=this.parent(),b=0,c;if(u.get(0)&&this.get(0)){u=u.width();var d=this.outerWidth(!0);p&&(u+=parseFloat(this.css("margin-right")));p=Math.floor(u/d);if(p>1)for(c=this.length;b<c;b+=p)u=b,d=b+p,d>c&&(d=c),t(this.slice(u,d),this.eq(u),this.eq(d-1))}return this};a.on=function(t,p){a.each(p,function(u,b){C.on(u,t,b)})};a.fn.s3tooltip=function(t){t=a.extend({data:function(){return this.alt||""},cls:"tooltip-1", 7slide:!0,dir:"bottom"},t);var p=a("#shop2-tooltip");p.get(0)||(p=a('<div id="shop2-tooltip"></div>'),a("body").append(p));var u=this.selector,b=a(window),c,d,f,h;a.on(u,{mouseenter:function(k){if(k=t.data.call(this))c=b.width(),d=b.height(),p.html(k),p.addClass(t.cls),p.show(),f=p.outerWidth(!0),h=p.outerHeight(!0)},mouseleave:function(k){p.hide();p.removeClass(t.cls)},mousemove:function(k){var l=k.pageX;k=k.pageY;var m=C.scrollTop();l+f>c&&(l-=f);g&&l<0&&a("#shop2-tooltip").hasClass("shop2_multi_tooltip")&& 8(l=20);t.dir=="top"?(k-=h,k<m&&(k=t.slide?m:k+h)):k+h>d+m&&(k=t.slide?d+m-h:k-h);p.css({left:l,top:k})}})}})(jQuery); 9(function(a,C){var g={queue:{},callbacks:{},init:function(b){a.extend(this,b);this.my=this.my||{};a(function(){var c=g.queue;a.each(c,function(d){d=c[d];a.isFunction(d)&&d()})})}};document.location.search.indexOf("debug")!=-1&&(g.debug=!0);try{if(window.sessionStorage){var t=sessionStorage.getItem("shop2_current_url"),p=location.pathname+location.search;t!=p&&sessionStorage.setItem("shop2_back_url",t);sessionStorage.setItem("shop2_current_url",p)}g.back=function(){if(window.sessionStorage){var b= 10sessionStorage.getItem("shop2_back_url");b==="null"&&(b="/")}else b=document.referrer;document.location=b||"/";return!1}}catch(b){g.back=function(){document.location=document.referrer}}g.on=function(b,c){var d=this;a.each(b.split(","),function(f,h){h=a.trim(h);d.callbacks[h]||(d.callbacks[h]=a.Callbacks());d.callbacks[h].add(c)})};g.off=function(b,c){this.callbacks[b]&&(c?this.callbacks[b].remove(c):this.callbacks[b].empty())};g.trigger=function(b){this.callbacks[b]&&this.callbacks[b].fireWith(C,
11[].slice.call(arguments,1))};g.fire=function(b,c){a.isFunction(c)&&(this.callbacks&&this.callbacks[b]&&this.callbacks[b].has(c)||c.apply(C,[].slice.call(arguments,2)))};g.filter={_pre_params:"",init:function(){var b=decodeURIComponent(document.location.search);b&&=b.slice(1);this.str=b},escape:function(b){return b.replace(/(\[|\])/g,"\\$1")},remove:function(b,c){b+="=";typeof c!=="undefined"&&(b+=c);c=new RegExp("(.*)("+this.escape(b)+"[^&]*&*)(.*)","ig");this.str=this.str.replace(c,"$1$3").replace(/&$/, 12"");return this},add:function(b,c){this.remove(b,c);this.str+=this.str!==""?"&":"";this.str+=b+"="+c;return this},has:function(b,c){b+="=";typeof c!=="undefined"&&(b+=c);return this.str.indexOf(b)>-1?!0:!1},get:function(b){b=new RegExp(this.escape(b)+"=([^&]*)");return(b=this.str.match(b))&&b.length==2?b[1]:!1},toggle:function(b,c){if(b=="s[amount][min]"){if(this.get("s[amount][max]")==="0")return this.remove("s[amount][max]"),this.add("s[amount][min]",0),this;if(this.get("s[amount][min]")==="0")return this.remove("s[amount][min]"), 13this.add("s[amount][max]",0),this}else if(b=="s[amount][max]"){if(this.get("s[amount][min]")==="1")return this.remove("s[amount][min]"),this.add("s[amount][min]",0),this;if(this.get("s[amount][min]")==="0")return this.remove("s[amount][min]"),this.add("s[amount][min]",1),this}this.has(b,c)?this.remove(b,c):this.add(b,c);return this},sort:function(b){var c=new RegExp(this.escape("s[sort_by]")+"=([^&]*)");c=this.str.match(c);var d=b+" desc";b+=" asc";c=c&&c.length>1?c[1]:"";c=c.indexOf(d)!==-1?c.replace(d, 14b):c.indexOf(b)!==-1?c.replace(b,d):c!==""?c+(","+d):d;this.remove("s[sort_by]");this.add("s[sort_by]",c);return this},go:function(){var b="";this.str&&(b+=this.str.charAt(0)=="?"?"":"?",b+=this.str);document.location=document.location.pathname.replace(/\/p\/\d*/g,"")+b+document.location.hash;return!1},count:function(b){var c="/-/shop2-api/?cmd=getSearchMatches&hash="+g.apiHash.getSearchMatches+"&ver_id="+g.verId+"&"+this.str+this._pre_params;g.trigger("beforeGetSearchMatches");a.get(c,function(d, 15f){f=="success"&&a.type(d)==="string"&&(d=a.parseJSON(d));g.facets.enabled&&g.facets.aggregation(d);g.fire("afterGetSearchMatches",b,d,f);g.trigger("afterGetSearchMatches",d,f)})}};g.search={getParams:function(b,c){g.trigger("beforeGetFolderCustomFields");b>0&&(b="/-/shop2-api/?cmd=getFolderCustomFields&hash="+g.apiHash.getFolderCustomFields+"&ver_id="+g.verId+"&folder_id="+b+"&"+decodeURIComponent(document.location.search).replace(/[^&]*=(&|$)/g,""),a.getJSON(b,function(d,f){g.fire("afterGetFolderCustomFields", 16c,d,f);g.trigger("afterGetFolderCustomFields",d,f)}))}};g.facets={enabled:!1,aggs:null,_data:{},emptyClass:"empty-val",mask:'[data-name^="s[field]"][data-value="key"],[name="s[parentField][parentKey]"] [value="key"],[name="s[field]"] [value="key"],[data-name="s[field][index]"],[data-name="s[field][key]"],[name="s[field][key]"]',filter:{wrapper:".shop2-filter, #shop2-color-ext-list",items:"[data-name], [name], [name] [value]"},search:{wrapper:".shop2-block.search-form form, #shop2-color-ext-select", 17items:"[data-name], [name], [name] [value]"},ignoreClear:function(b){this._data.attrName=b.attr("name")?b.attr("name"):b.parent().attr("name");this._data.isSelect=b.prop("tagName").toLowerCase()==="select";this._data.val=b.prop("tagName").toLowerCase()==="option"&&b.val()==="";return/s\[(folder_id|products_per_page)\]/i.test(this._data.attrName)||this._data.isSelect||this._data.val},set:function(b){var c=g.facets[b];if(c){var d=a(c.wrapper);c=d.find(c.items);this._data.$wrapper=d;this.clearItems(c); 18this.insertData(this.aggs);b="afterFacets"+b.charAt(0).toUpperCase()+b.slice(1);g.trigger(b,this.aggs)}},searchSetup:function(){if(this.search){var b=a(this.search.wrapper);if(b.length){var c=b.find(this.search.items),d=this,f="/-/shop2-api/?cmd=getSearchMatches&hash="+g.apiHash.getSearchMatches+"&ver_id="+g.verId+"&",h=f+b.serialize();this.getDataSearch(h);c.on("change",function(k){k.target.name!="s[products_per_page]"&&(h=f+b.serialize(),d.getDataSearch(h))})}}},getDataSearch:function(b){a.get(b,
19function(c,d){d=="success"&&(a.type(c)==="string"&&(c=a.parseJSON(c)),g.facets.aggregation(c),g.facets.set("search"))})},clearItems:function(b){var c=this.emptyClass,d=this,f,h;b.each(function(k,l){f=a(l);if(d.ignoreClear(f))return!0;h=f.prop("tagName").toLowerCase();switch(h){case "input":f.attr("placeholder","");break;case "option":f.attr("value")&&f.attr("disabled","disabled")}f.attr("data-param-val","0");f.addClass(c)})},aggregation:function(b){typeof b==="object"&&b.data.aggs&&(this.aggs=this.dataSetup(b.data.aggs)); 20return this.aggs},dataSetup:function(b){var c=b.cf,d;for(d in c){var f=c[d];a.isArray(f)&&!f.length&&delete c[d]}return b},insertData:function(b,c,d){a.each(b,a.proxy(function(f,h){if(typeof h==="object")this.insertData(h,f,c);else{this._data.$item=this.getItem(c,f,d);if(!this._data.$item.length||!h&&h!=0)return!0;switch(this._data.$item.prop("tagName").toLowerCase()){case "input":this._data.$item.attr("placeholder",h);break;case "option":this._data.$item.removeAttr("disabled")}this._data.$item.attr("data-param-val", 21h);this._data.$item.removeClass(this.emptyClass)}},this))},getItem:function(b,c,d){this._data.selector=d&&d!=="cf"?this.mask.replace(/parentField/g,d).replace(/parentKey/g,b).replace(/key/g,c):this.mask.replace(/field/g,b).replace(/key/g,c);return this._data.$wrapper.find(this._data.selector)},setMask:function(b){this.mask=b},setEmptyClass:function(b){this.emptyClass=b},setContainers:function(b,c){this[b]=c}};g.cart={add:function(b,c,d){g.trigger("beforeCartAddItem");a.post("/-/shop2-api/?cmd=cartAddItem", 22{hash:g.apiHash.cartAddItem,ver_id:g.verId,kind_id:b,amount:c},function(f,h){g.fire("afterCartAddItem",d,f,h);g.trigger("afterCartAddItem",f,h)},"json")},addMultiple:function(b,c){g.trigger("beforeCartAddMultipleItems");b=a.extend({hash:g.apiHash.cartAddItem,ver_id:g.verId},b);a.post("/-/shop2-api/?cmd=cartAddItem",b,function(d,f){g.fire("afterCartAddMultipleItems",c,d,f);g.trigger("afterCartAddMultipleItems",d,f)},"json")},remove:function(b,c){b=b.toString().replace(/"/g,'\\"').replace(/'/g,'"'); 23b=a.parseJSON(b);g.trigger("beforeCartRemoveItem");a.getJSON("/-/shop2-api/?cmd=cartRemoveItem",{hash:g.apiHash.del,ver_id:g.verId,kind_id:b},function(d,f){g.fire("afterCartRemoveItem",c,d,f);g.trigger("afterCartRemoveItem",d,f)});return!1},clear:function(){g.trigger("beforeCartClear");a.get(g.uri+"?mode=cart&action=cleanup",function(b,c){g.trigger("afterCartClear",b,c)})},update:function(b,c){b=b.serialize();g.trigger("beforeCartUpdate");a.post("/-/shop2-api/?cmd=cartUpdate","ver_id="+g.verId+"&hash="+ 24g.apiHash.up+"&"+b,function(d,f){g.fire("afterCartUpdate",c,d,f);g.trigger("afterCartUpdate",d,f)});return!1},addCoupon:function(b,c){g.trigger("beforeCartAddCoupon");a.getJSON("/-/x-api/v1/public/?method=cart/addCoupon",{param:{coupon:b}},function(d,f){g.fire("afterCartAddCoupon",c,d,f);g.trigger("afterCartAddCoupon",d,f)});return!1},removeCoupon:function(b,c){g.trigger("beforeCartRemoveCoupon");a.getJSON("/-/x-api/v1/public/?method=cart/removeCoupon",{param:{coupon:b}},function(d,f){g.fire("afterCartRemoveCoupon", 25c,d,f);g.trigger("afterCartRemoveCoupon",d,f)})}};g.delivery={deligate:!1,ymapsMap:null,ymapsData:[],ymapsIconsData:{"default":"/g/shop2v2/default/images/map-pin-grey.svg",spsr:"/g/shop2v2/default/images/map-pin-red.svg",dellin:"/g/shop2v2/default/images/map-pin-purple.svg",edostavka:"/g/shop2v2/default/images/map-pin-green.svg",pickp
25oint:"/g/shop2v2/default/images/map-pin-grey.svg",boxberry:"/g/shop2v2/default/images/map-pin-boxberry.svg",delica:"/g/shop2v2/default/images/map-pin-grey.svg",selected:"/g/shop2v2/default/images/map-pin-blue.svg"}, 26calc:function(b,c,d){g.trigger("beforeDeliveryCalc");a.getJSON("/-/shop2-api/?cmd=deliveryCalc",{hash:g.apiHash.calc,ver_id:g.verId,attach_id:b,params:c},function(f,h){g.fire("afterDeliveryCalc",d,f,h);g.trigger("afterDeliveryCalc",f,h)})},YmapsInit:function(b,c){var d=Object.keys(g.delivery.ymapsData).length,f=a(".baloon-content-localize");f.data("point-text");var h=f.data("term-text");f.data("price-text");f.data("address-text");var k=f.data("phone-text"),l=f.data("worktime-text"),m=f.data("url-text"), 27n=f.data("more-text"),r=f.data("choose-text");if(!d)return a(".shop2-delivery--item__tab.points").addClass("disabled"),!1;d=a.parseJSON(a("#dadata").val());var q=[d.geo_lat,d.geo_lon];ymaps.ready(function(){g.delivery.ymapsMap=new ymaps.Map(b,{center:q,zoom:11,controls:["zoomControl"]});var v={};typeof c!="undefined"&&(v=c,v.context="lpc",v.baloonClassBtn1=" lp-button lpc-button--type-1",v.baloonClassBtn2=" lp-button lpc-button--type-2");var x=a("[data-deligate-address-index]").data("deligate-address-index")|| 280,w=ymaps.templateLayoutFactory.createClass('<div class="delivery-baloon-content"><h3>$[properties.address]</h3><div class="buttons"><button type="button" class="shop2-btn'+(v.baloonClassBtn1||"")+'" id="balloon-select">'+r+'</button>[if properties.site]<a target="_blank" class="shop2-btn'+(v.baloonClassBtn2||"")+'" href="$[properties.site]">'+n+'</a>[endif]</div><div class="note-block">[if properties.term] <p><span>'+h+':</span><strong class="term">$[properties.term]</strong></p>[endif] <p>$[properties.cost]</p> </div>[if properties.phone]<div class="phone"><span>'+ 29k+':</span>$[properties.phone]</div>[endif][if properties.worktime]<div class="worktime"><span>'+l+':</span>$[properties.worktime]</div>[endif][if properties.desc]<div class="desc"><span>'+m+':</span>$[properties.desc]</div>[endif]<form data-attach_id="$[properties.attach_id]"><input type="hidden" name="delivery_type" value="$[properties.delivery_type]"><input class="point-address" type="hidden" name="$[properties.attach_id]['+x+']" value="$[properties.address]"><input type="hidden" name="$[properties.attach_id][deligate][tarif]" class="tariff" value="$[properties.tariff_hash]"><input type="hidden" name="$[properties.attach_id][deligate][terminal]" value="$[properties.id]"></form></div>', 30{build:function(){w.superclass.build.call(this);a("#balloon-select").bind("click",this.onCounterClick)},clear:function(){a("#balloon-select").unbind("click",this.onCounterClick);w.superclass.clear.call(this)},onCounterClick:function(z){z.preventDefault();var A=a(this).parents(".delivery-baloon-content:first");z=A.find("form");var F=A.find("h3").text(),D=A.find("label.cost input:checked"),J=D.parent().data("cost");A=A.find(".term").text();var G=z.data("attach_id"),B=a("#shop2-order-delivery");B.find(".option-label"); 31B.find(".option-type");B.find(".option-details");B.find(".shop2-delivery--item__tab.points");B=a(g.delivery.ymapsMap.container._parentElement).next();var H=z.find("input.point-address").val(),I=a(g.delivery.ymapsMap.container._parentElement).parents(".option-details:first");a("#delivery_id_deligate").val(G);z.find("input.tariff").val(D.val());B.find(".fields").html(z.html());B.find(".point-name").html(F);B.find(".point-cost").html(J);B.find(".point-term").html(A);B.find(".point-address").html(H); 32I.addClass("selected");a("html, body").scrollTop(I.parent().offset().top-60);if(g.shop2_cart_order_payments==6){let E={};E.property_attach={delivery_type:z.find('[name="delivery_type"]').val(),deligate:{tarif:D.val(),terminal:z.find('[name="900[deligate][terminal]"]').val()}};E.property_attach["0"]=H;E.value=G;a(this).closest(".option-details").find(".g-form-field__value .g-form-control-value").each(function(K,L){E.property_attach[`${K+1}`]=L.value});g.queue.orderGetPayments(!0,E)}g.delivery.ymapsMap.balloon.close(); 33z=g.my.on_shop2_btn?".shop2-btn":".g-button";a(`.form-item ${z}.shop2-disabled`).length&&(a(`.form-item ${z}.shop2-disabled`).removeClass("shop2-disabled"),a(".order_design_five").addClass("hide"))}}),y=new ymaps.GeoObjectCollection;a.each(g.delivery.ymapsData[b],function(z,A){z=g.delivery.ymapsIconsData[b]||g.delivery.ymapsIconsData["default"];A.service_code==b&&(A=new ymaps.Placemark(A.coords,A,{balloonContentLayout:w,iconLayout:"default#image",iconImageHref:z,iconImageSize:[26,36],iconImageOffset:[-13, 34-36],balloonMaxWidth:530,balloonPanelMaxMapArea:"Infinity",balloonMinHeight:330,balloonshadow:!1}),A.events.add("click",function(F){for(var D=0;D<y.getLength();D++)y.get(D).options.set("iconImageHref",g.delivery.ymapsIconsData["default"]);F.get("target").options.set("iconImageHref",g.delivery.ymapsIconsData.selected)}),y.add(A))});g.delivery.ymapsMap.geoObjects.add(y);g.delivery.ymapsMap.container.fitToViewport();g.delivery.ymapsMap.behaviors.disable("multiTouch")})},changeDeliveryPoint:function(b,
35c,d){b=a(b).parents(".option-details:first");g.delivery.ymapsMap&&(g.delivery.ymapsMap.destroy(),g.delivery.ymapsMap=null);b.find(".map-select select option:first").prop("selected",!0);b.find(".map-select select").trigger("refresh");b.find(".deligate_points_fields .fields").empty();b.removeClass("selected");a("html, body").scrollTop(b.parent().offset().top-60);typeof d!="undefined"?g.delivery.YmapsInit(c,d):g.delivery.YmapsInit(c);c=g.my.on_shop2_btn?".shop2-btn":".g-button";a(`.form-item ${c}`).length&& 36(a(`.form-item ${c}`).addClass("shop2-disabled"),a(".order_design_five").removeClass("hide"));return!1},selectSuggestion:function(b,c){a.ajax({url:"/-/x-api/v1/public/?method=deligate/suggestAddress",type:"POST",dataType:"json",data:JSON.stringify({query:b,count:1}),success:function(d){d.result.suggestions&&(d.result.suggestions[0].data.source=b);c||(a("#dadata").val(JSON.stringify(d.result.suggestions[0].data)),a("#address").val(d.result.suggestions[0].value));a("#shop2-deligate-calc").trigger("click")}})}}; 37g.compare={add:function(b,c){this.action("add",b,c)},remove:function(b,c){this.action("del",b,c)},clear:function(b){this.action("clear",null,b)},action:function(b,c,d){var f=a.camelCase("Compare-"+b);g.trigger("before"+f);a.post("/-/x-api/v1/public/?method=shop2/compare",{kind_id:c,action:b},function(h,k){g.fire("after"+f,d,h.result,k);g.trigger("after"+f,h.result,k)})}};g.product={getProductListItem:function(b,c,d,f){var h="/-/shop2-api/?cmd=getProductListItem&hash="+g.apiHash.getProductListItem+ 38"&ver_id="+g.verId;g.trigger("beforeGetProductListItem");a.post(h,{product_id:b,kind_id:c,params:f},function(k,l){g.fire("afterGetProductListItem",d,k,l);g.trigger("afterGetProductListItem",k,l)})},checkMetaItemValue:function(b,c,d){b=b[c];if(b=="undefined"||b==null)return!1;if(b==d)return!0;if(b instanceof Object)for(var f in b)if(b[f]==d)return!0;return!1},getMetaItemValue:function(b,c){b=b[c];if(a.type(b)==="undefined")return!1;if(a.type(b)==="object"){if(a.type(b.v)!=="undefined")return b.v;if(a.type(b.image_id)!== 39"undefined")return b.image_id}return b},findKindId:function(b,c,d,f,h,k){var l,m=0,n=a.extend(!0,{},g.productRefs[b]);k&&a.each(n,function(x){k[x]||delete n[x]});if(c.length==1)return c[0];a.type(h)!=="object"&&(h=a.parseJSON(h));b=0;for(l=c.length;b<l;b+=1){var r=Number(c[b]);var q=0;a.each(n,function(x,w){a.each(w,function(y){x==d?y==f&&(q+=1):String(n[x][y]).indexOf(r)!==-1&&(q+=1,h&&g.product.checkMetaItemValue(h,x,y)&&(q+=1))})});if(q>m){var v=r;m=q}}return v},getNodeData:function(b,c,d){var f= 40!1;b.tagName=="SELECT"?f=a(b.options[b.selectedIndex]).data(c):b.nodeType==1&&(f=a(b).data(c));d&&(f=this.decodeFieldData(f));return f},decodeFieldData:function(b){if(a.type(b)!=="string")return[b];b=b.split(",");return a.map(b,function(c){return a.trim(c)})},hasKindId:function(b,c){var d;if(b){var f=0;for(d=c.length;f<d;f+=1)if(b.indexOf(c[f])!==-1)return!0}return!1},deleteUploadProduct:function(b,c){var d=new FormData;d.append("kind_id",c);d.append("code",b);a.ajax({url:"/-/x-api/v1/public/?method=shop2/removeUploadFileProduct", 41type:"post",dataType:"json",processData:!1,contentType:!1,data:d,success:function(f){f=typeof f.result!="undefined"?f.result:f;f.success?document.location.reload(!0):alert(f.error)}})},uploadProduct:function(b,c,d,f){var h=new FormData,k=a("#_upload_"+b+c).parent(),l=a("#_upload_"+b+c).get(0).files,m='<span class="delete-upload-file shop2-btn" onclick="shop2.product.deleteUploadProduct(\''+b+"',"+c+')">\u0443\u0434\u0430\u043b\u0438\u0442\u044c</span>';if(l.length==0)return alert(_s3Lang.JS_FILES_NOT_SELECTED), 42!1;a.each(l,function(n,r){h.append(b,r)});h.append("kind_id",c);h.append("code",b);d&&(h.append("image",!0),f&&h.append("params",JSON.stringify(f)));a.ajax({url:"/-/x-api/v1/public/?method=shop2/uploadFileProduct",type:"post",dataType:"json",processData:!1,contentType:!1,data:h,success:function(n){n=typeof n.result!="undefined"?n.result:n;n.success?d?k.empty().html('<img src="'+n.data+'">'+m):k.empty().html('<a href="'+n.data+'" target="_blank">'+n.data+"</a>"+m):alert(n.error)}})},uploadInCart:function(b, 43c,d,f,h){var k=new FormData,l=a("#_upload_in_cart_"+b+"_"+c+"_"+d).parent(),m=a("#_upload_in_cart_"+b+"_"+c+"_"+d).get(0).files,n='<span class="delete-upload-file shop2-btn" onclick="shop2.product.deleteUploadInCart('+b+", "+c+", '"+d+"')\">\u0443\u0434\u0430\u043b\u0438\u0442\u044c</span>";if(m.length==0)return alert(_s3Lang.JS_FILES_NOT_SELECTED),!1;a.each(m,function(r,q){k.append(d,q)});k.append("kind_id",b);k.append("code",d);k.append("pos",c);f&&(k.append("image",!0),h&&k.append("params",JSON.stringify(h)));
44a.ajax({url:"/-/x-api/v1/public/?method=shop2/uploadFileProductInCart",type:"post",dataType:"json",processData:!1,contentType:!1,data:k,success:function(r){r=typeof r.result!="undefined"?r.result:r;r.success?f?l.empty().html('<img src="'+r.data+'">'+n):l.empty().html('<a href="'+r.data+'" target="_blank">'+r.data+"</a>"+n):alert(r.error)}})},deleteUploadInCart:function(b,c,d){var f=new FormData;f.append("kind_id",b);f.append("code",d);f.append("pos",c);a.ajax({url:"/-/x-api/v1/public/?method=shop2/removeUploadFileProductInCart", 45type:"post",dataType:"json",processData:!1,contentType:!1,data:f,success:function(h){h=typeof h.result!="undefined"?h.result:h;h.success?document.location.reload(!0):alert(h.error)}})},productDatePicker:function(){a(".shop2-date_interval , .shop2-date").each(function(b,c){a(this).datepicker({minDate:0,changeMonth:!1,numberOfMonths:1,showOn:"button",buttonImage:"/g/shop2v2/default/images/shop2_calendar.svg",buttonImageOnly:!1,buttonText:"Select date"})})}};g.options={amountDefaultValue:1,amountDefaultInc:1, 46amountType:"float",msgTime:3E3,printCSS:"/g/shop2v2/default/css/print.less.css"};g.user={activate:function(b,c){var d=a(c);d.attr("disabled",!0);a.post("/-/x-api/v1/public/?method=user/reactivation",{user_id:b},function(){var f=d.parent(),h=a("<div>").addClass("shop2-info").html(window._s3Lang.ACTIVATION_MAIL_SENT);d.hide();f.append(h)})}};g.orderCancelling={alert:function(){var b=a(".order-cancelling"),c=b.data("href"),d=b.data("cancellingTitle"),f=b.data("cancellingButtonTitle");b=b.data("cancellingClose"); 47g.alert('<div class="order-cancel-title">'+d+'</div><div class="order-cancel-buttons"><a class="shop2-btn" href="'+c+'">'+f+'</a><a class="shop2-alert-close" onclick="shop2.alert.hide(); return false;" href="#">'+b+"</a></div>","","shop2-alert--warning order-cancel")}};a(document).on("click",".order-cancelling",function(b){b.preventDefault();g.orderCancelling.alert()});g.orderRepeat={alert:function(b){var c=b.filter(".order-repeat");b=c.data("href");var d=c.data("repeatTitle"),f=c.data("repeatButtonTitle"); 48c=c.data("repeatClose");g.alert('<div class="order-repeat-title">'+d+'?</div><div class="order-repeat-buttons"><a class="shop2-btn" href="'+b+'">'+f+'</a><a class="shop2-alert-close" onclick="shop2.alert.hide(); return false;" href="#">'+c+"</a></div>","\u0417\u0430\u043a\u0440\u044b\u0442\u044c","shop2-alert--warning order-cancel")}};a(document).on("click",".order-repeat",function(b){b.preventDefault();g.orderRepeat.alert(a(this))});g.paymentChange={alert:function(b){b=b.filter(".order-payment-change"); 49var c=b.data("href"),d=b.data("title"),f=b.data("button-title"),h=b.data("close");a.ajax({url:c,type:"POST",dataType:"json",data:{},success:function(k){k='<div class="payment-change-title">'+d+'</div><div class="error"></div>'+k.data+'<div class="payment-change-buttons"><a class="shop2-btn" onclick="shop2.paymentChange.save(\''+c.replace("act=list","act=save")+'\');" href="#">'+f+'</a><a class="shop2-alert-close" onclick="shop2.alert.hide(); return false;" href="#">'+h+"</a></div>";g.alert(k,h,"shop2-alert--warning order-cancel")}})}, 50save:function(b){var c=a("#shop2-alert-body .shop2-payment-options").serialize();a.ajax({url:b+"&"+c,type:"POST",dataType:"json",data:{},success:function(d){d.data==="OK"?document.location.reload():a("#shop2-alert-body .error").html(d.data)}});return!1}};a(document).on("click",".order-payment-change",function(b){b.preventDefault();g.paymentChange.alert(a(this))});a(document).on("click.getPromoLink",".get-promo-link",function(b){b.preventDefault();b=a(this).data("ver-id");var c=a(this).data("cmd"), 51d=g.apiHash.getPromoProducts,f=a(this).data("is-main"),h=a(this).data("kind-id"),k=a(this).data("discount-id");a.ajax({url:"/-/shop2-api/?ver_id="+b+"&cmd="+c+"&hash="+d+"&kind_id="+h+"&discount_id="+k+"&is_main="+f,type:"POST",dataType:"json",data:{},success:function(l){g.alert(l.data,"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","promo-products-list")}})});a(document).on("click.promoPagelist",".promo-products-list li",function(b){b.preventDefault();b=a(this).find("a").attr("href");a.ajax({url:b, 52type:"POST",dataType:"json",data:{},success:function(c){g.alert(c.data,"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","promo-products-list")}})});g.msg=function(b,c){var d=a("#shop2-msg"),f=c.offset(),h=c.outerWidth(!0);c=c.outerHeight(!0);d.get(0)||(d=a('<div id="shop2-msg">'),a(document.body).append(d),d=a("#shop2-msg"));d.html(b).show();b=d.outerWidth();h=f.left+h;c=f.top+c;h+b>a(window).width()&&(h=f.left-b);d.css({left:h,top:c});a.s3throttle("msg",function(){d.hide()},g.options.msgTime)};g.queue= 53{cookiesDisabled:function(){navigator&&navigator.cookieEnabled==0&&a(".shop2-cookies-disabled").html("<p>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0443 \u0412\u0430\u0441 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 cookie. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 cookie \u0443 \u0412\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.</p>").removeClass("hide")}, 54cartState:function(){try{window.sessionStorage}catch(b){return}window.chrome&&sessionStorage&&g.my.save_cart_state&&(readCookie("s3s2_cart")||(sessionStorage.removeItem("cart-reload"),sessionStorage.removeItem("cart-state")),sessionStorage.getItem("cart-reload")==1&&(sessionStorage.removeItem("cart-reload"),sessionStorage.setItem("cart-state",a("<div>").append(a("#shop2-cart-preview").clone()).html())),g.on("afterCartAddItem",function(b,c){b
54=b.data;c!="success"&&(b="");sessionStorage.setItem("cart-state", 55b)}),g.on("afterCartRemoveItem, afterCartUpdate",function(){sessionStorage.setItem("cart-reload",1)}),a(window).on("pageshow",function(){var b=sessionStorage.getItem("cart-state");b&&a("#shop2-cart-preview").replaceWith(b)}))},keys:function(){a(document).keyFilter("input.shop2-input-int");a(document).keyFilter("input.shop2-input-float",{type:"float"})},heights:function(){a(".product-list-thumbs").each(function(){a(this).find(".product-item-thumb").eachRow(function(b){var c=b.find(".product-name"); 56c.css("min-height",0);var d=c.getHeights();c.css("min-height",d.max);c=b.find(".product-amount");if(c.length){c.css("margin-top",0);var f=b.getHeights();b.each(function(h){a(this).find(".product-amount").css("margin-top",f.max-f.values[h])})}else b.each(function(){var h=a(this),k=h.find(".shop2-product-actions");k.length||(k=h.find(".product-bot"));var l=k.data("padding-top");a.type(l)==="undefined"&&(l=parseInt(h.css("padding-top")),k.data("padding-top",l));k.css("padding-top",l)}),f=b.getHeights(), 57b.each(function(h){var k=a(this),l=k.find(".shop2-product-actions");l.length||(l=k.find(".product-bot"));k=l.data("padding-top");l.css("padding-top",f.max-f.values[h]+k)})})})},resize:function(){a(window).resize(function(){g.queue.heights()})},product:function(){g.product._reload=function(b){var c=a(b),d=g.product.getNodeData(b,"kinds",!0),f=g.product.getNodeData(b,"name"),h=g.product.getNodeData(b,"value"),k=c.closest("form"),l=k.get(0),m={},n={};b=!1;if(d&&a.type(f)!=="undefined"&&a.type(h)!=="undefined"&& 58l){var r=k.find("input[name=meta]").val();l=k.find("input[name=product_id]").val();k.find("[name=submit]").prop("disabled",!0);k.find("select.shop2-cf>option, li.shop2-cf, li.shop2-color-ext-selected, ul.shop2-color-ext-list>li").each(function(){var q=a(this).data("name");q&&(m[q]=!0)});d=g.product.findKindId(l,d,f,h,r,m);d||(d=k.find("[name=kind_id]").val(),b=!0);k.find(".js-calc-custom-fields.additional-cart-params").each(function(){var q=a(this).attr("name");n[q]=a(this).find("option:selected").data("item-id")}); 59k.find(".js-calc-custom-fields.shop2-color-ext-selected").each(function(){var q=a(this).data("name");n[q]=a(this).data("item-id")});b?g.product.getProductListItem(l,d,function(q,v){v==="success"&&(v=a.trim(q.data.body),q=a(".product-price",v).html(),v=a(".shop2-product-actions",v).html(),k.find(".product-price").html(q),k.find(".shop2-product-actions").html(v),g.trigger("afterProductReloaded"),g.queue.heights())},n):g.mode==="product"?document.location=g.uri?g.uri+"/product/"+d:document.location.href.replace(/\/product\/.+/, 60"/product/"+d):g.product.getProductListItem(l,d,function(q,v){v==="success"&&(g.trigger("afterProductReloaded"),v=c.closest(".shop2-product-item"),v.hide(),q=a.trim(q.data.body),a(q).insertBefore(v),v.remove(),g.queue.heights())},n)}};a.on("select.shop2-cf",{change:function(){g.product._reload(this)}});a.on("li.shop2-cf:not(.active-color, .active-texture)",{click:function(){g.product._reload(this)}});a.on("span.shop2-path-show-folders",{click:function(b){b.preventDefault();a(this).next().show();a(this).hide()}})}, 61addToCart:function(){a(document).on("click",".shop2-product-btn:not(.preorder-btn-js)",function(b){var c=a(this),d=c.closest("form"),f=d.get(0);d=d.find(".additional-cart-params");var h=d.length,k=f.amount.value;f=f.kind_id.value;b.preventDefault();if(h)for(k={amount:k},b=0;b<h;b+=1){var l=d[b];l.value&&(k[l.name]=l.value)}g.cart.add(f,k,function(m){a("#shop2-cart-preview").replaceWith(m.data);m.errstr?g.msg(m.errstr,c):g.msg(window._s3Lang.JS_SHOP2_ADD_CART_WITH_LINK.replace("%s",g.uri+"/cart"), 62c);m.panel&&a("#shop2-panel").replaceWith(m.panel)})})},amount:function(){function b(d,f,h,k){d=h>0?d+h*k:d+g.options.amountDefaultInc*k;return d=d.toFixed(2)-0}var c=a(document);c.on("click",".amount-minus",function(){var d=a(this).siblings("input:text"),f=d.getVal(),h=parseFloat(d.data("min")),k=parseFloat(d.data("multiplicity"));f&&=f[0];h&&f<=h||(f=b(f,h,k,-1),h>0?f<=h&&(f=h):f<=g.options.amountDefaultValue&&(f=g.options.amountDefaultValue),d.val(f),d.trigger("change"))});c.on("click",".amount-plus", 63function(){var d=a(this).siblings("input:text"),f=d.getVal(),h=parseFloat(d.data("min")),k=parseFloat(d.data("multiplicity"));f&&=f[0];f=b(f,h,k,1);d.val(f);d.trigger("change")});
63c.on("change",".shop2-product-amount input:text",function(){var d=a(this),f=d.data("kind"),h=d.data("max"),k=Number(d.val()),l=parseFloat(d.data("min")),m=parseFloat(d.data("multiplicity"));if(l||m){if(m){var n=(k-l)%m;k=n<m/2?k-n:k+(m-n);l===1&&m>1&&k--;k=k.toFixed(2)-0;d.val(k)}l>0?l&&k<=l&&d.val(l):k<=g.options.amountDefaultValue&& 64d.val(g.options.amountDefaultValue)}f&&h>0&&(f=Number(d.val()),f>h&&(h=h-f+k,m>0&&h>=m&&(h=Math.floor(h/m)*m),d.val(h),h=h.toFixed(2)-0,g.msg(_s3Lang.JS_AVAILABLE_ONLY+" "+h,d)))});c.keyFilter(".shop2-product-amount input:text",{type:g.options.amountType})},kindAvailable:function(){var b=function(f,h){a.ajax({url:"/-/x-api/v1/public/?method=shop2/addKindEmailNotification",method:"post",xhrFields:{withCredentials:!0},data:f,success:function(k){h(k)}})},c,d;a(document).on("click",".preorder-btn-js", 65function(f){f.preventDefault();c={};d=a(this);c.kind_id=d.data("product-kind_id");c.email=d.data("user-email")||0;f=c.email?` 66 <div class="preorder-field preorder-email"> 67 <span class="preorder-email_text"> 68 ${g.my.preorder_email_text||"\u0414\u0430\u043d\u043d\u044b\u0439 email \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438."} 69 </span> 70 <div class="preorder-email-input"> 71 <div class="preorder-field-title">E-mail: <span class="preorder-mark">*</span></div> 72 <div class="preorder-field-value"> 73 <input type="text" name="email" required value="${c.email}"> 74 </div> 75 </div> 76 </div> 77 `:'\n <div class="preorder-field preorder-email">\n <div class="preorder-email-input">\n <div class="preorder-field-title">E-mail: <span class="preorder-mark">*</span></div>\n <div class="preorder-field-value">\n <input type="text" name="email" required value="">\n </div>\n </div>\n </div>\n ';var h=g.my.preorder_form_title|| 78window._s3Lang.GR_ADMISSION_NOTICE,k=g.my.preorder_form_title||window._s3Lang.GR_PREORDER_FORM_TEXT,l=g.my.preorder_form_submitt||window._s3Lang.SHOP2_SEND,m=a("#shop-captcha-sitekey").html()||"";g.alert(` 79 <div class="preorder-form-wrap preorder-popup"> 80 <form class="preorder-popup-body" action="/-/x-api/v1/public/?method=shop2/addKindEmailNotification" method="post"> 81 <h2 class="preorder-popup-title"> 82 ${h} 83 </h2> 84 <div class="preorder-popup-text preorder-field type-html"> 85 ${k} 86 </div> 87 ${f} 88 <input type="hidden" name="kind_id" value="${c.kind_id}"> 89 90 <div class="preorder-field preorder-field-button preorder_send"> 91 <button type="submit" class="shop2-btn">${l}</button> 92 </div> 93 ${m} 94 </form> 95 <div class="block-recaptcha"></div> 96 </div> 97 <div class="preorder-form-close"></div> 98 `,"close","preorder-alert")});a(document).on("click",".preorder-form-close",function(f){a("#shop2-alert-ok").click()});a(document).on("submit",".block-recaptcha form",function(f){f.preventDefault();f=a(this).serializeArray();for(let h=0;h<f.length;h++)f[h].name=="_sitekey"&&(c._sitekey=f[h].value),f[h].name=="g-recaptcha-response"&&(c["g-recaptcha-response"]=f[h].value);b(c,h=>{d.get(0).setAttribute("disabled","disabled");a(".preorder-form-wrap").html(` 99 <h3 class="preorder-popup-success"> 100 ${g.my.preorder_form_success||"\u0421\u043f\u0430\u0441\u0438\u0431\u043e!"} 101 </h3> 102 `);d.closest("form").length&&(h=d.closest("form").find(".favorite_btn"),h.length&&!h.is(":hidden")&&h.trigger("click"))})});a(document).on("submit",".preorder-popup-body",function(f){f.preventDefault();var h=a(this);c.email=this.email.value;f=/^[\w-\.]+@[\w-]+\.[a-z]{2,4}$/i.test(c.email);c["smart-token"]=a('.preorder-popup-body textarea[name="smart-token"]').text();f?a.get("/-/x-api/v1/public/?method=shop2/addKindEmailNotification",function(k){k=k.result.html.match(new RegExp(/<body[^>]*>(.*?)<\/body>/ig)); 103h.parent(".preorder-popup").find(".block-recaptcha").html(k)}):h.find(".preorder-email").hasClass("field-error")||h.find(".preorder-email").addClass("field-error").find(".preorder-email-input .preorder-field-value").before('<div class="error-message">\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b</div>')})},discounts:function(){a(document).on("click", 104".shop2-product-actions dt",function(b){var c=a(this),d=c.next();c=c.position().left;b.stopPropagation();d.is(":hidden")&&(a(".shop2-product-actions dd").hide(),d.show(),d.css("left",c))});a(document).on("click",".close-desc-action",function(b){var c=a(this).closest("dd");b.stopPropagation();c.hide()});a(document).on("click",function(){a(".shop2-product-actions dd").hide()})},question:function(){a(document).on("mouseenter",".price-old.question, .shop2-cart-total .question",function(){var b=a(this), 105c=b.next().show();b=b.position();var d=c.outerHeight(!0);
105c.css({top:b.top-d-5,left:b.left})}).on("mouseleave",".price-old.question, .shop2-cart-total .question",function(){a(this).next().hide()})},tabs:function(){var b=a(".shop2-product-tabs li"),c=b.find("a"),d=a(".shop2-product-desc > div");c.on("click",function(f){var h=a(this),k=h.attr("href");f.preventDefault();b.removeClass("active-tab");h.parent().addClass("active-tab");d.removeClass("active-area");a(k).addClass("active-area")})},filter:function(){var b= 106a(".shop2-filter"),c=a(".result");g.filter.init();g.on("afterGetSearchMatches",function(d,f){d.data.total_found===0?c.addClass("no-result"):c.removeClass("no-result");g.facets.enabled&&g.facets.set("filter");a("#filter-result").html(d.data.total_found);c.removeClass("hide")});b.find(".param-val").on("click",function(d){var f=a(this),h=f.data("name"),k=f.data("value");d.preventDefault();f.toggleClass("active-val");g.filter.toggle(h,k);g.filter.count()});b.find("select").on("change",function(){var d= 107a(this),f=this.name;d=d.val();g.filter.add(f,d);g.filter.count()});b.find("input:text").keyup(function(){var d=a(this),f=d.attr("name");a.s3throttle("filter: "+f,function(){var h=d.val();g.filter.add(f,h);g.filter.count()},500)});b.find(".shop2-filter-go").on("click",function(d){d.preventDefault();g.filter.go()})},sort:function(){var b=a(".sorting");b.find(".sort-param").on("click",function(c){var d=a(this).data("name");c.preventDefault();g.filter.sort(d);g.filter.go()});b.find(".sort-reset").on("click", 108function(c){c.preventDefault();g.filter.remove("s[sort_by]");g.filter.go()})},views:function(){a(".view-shop a").on("click",function(b){var c=a(this).data("value");b.preventDefault();g.filter.remove("view");g.filter.add("view",c);g.filter.go()})},toggle:function(){function b(c,d,f,h){a(document).on("click",d+" "+c,function(k){var l=a(d);k.preventDefault();l.hasClass(f)?(l.removeClass(f),eraseCookie(h)):(l.addClass(f),createCookie(h,1,7))})}b(".block-title",".cart-preview","opened","cart_opened"); 109b(".block-title",".search-form","opened","search_opened");b(".block-title",".login-form ","opened","login_opened")},search:function(){var b=a("#shop2_search_custom_fields"),c=a("#shop2_search_global_fields");g.on("afterGetFolderCustomFields",function(d,f){b.html(d.data);c.find("input, select").prop("disabled",!0);c.hide()});a("#s\\[folder_id\\]").on("change",function(){var d=a(this).val();d?g.search.getParams(d):(b.html(""),c.find("input, select").prop("disabled",!1),c.show())}).trigger("change"); 110g.facets.enabled&&!g.my.lazy_search_activation&&g.facets.searchSetup()},cart:function(){function b(){c.show()}var c=a(".shop2-cart-update"),d=a(".shop2-cart-table"),f=a("#shop2-cart");g.on("afterCartRemoveItem, afterCartUpdate",function(){document.location.reload()});var h;["keypress","keyup","keydown"].forEach(function(k){if("on"+k in document)return h=k,!1});d.find("input:text").on(h,function(k){k.keyCode==13?g.cart.update(f):b()});a(document).on("click","li.param-value:not(.shop2-color-ext-selected)", 111function(){b()});a(document).on("change","select.param-value",function(){b()});d.find(".amount-minus, .amount-plus").on("click",b);c.on("click",function(k){k.preventDefault();g.cart.update(f);return!1});a(".cart-delete a").on("click",function(k){var l=a(this).data("id");k.preventDefault();g.cart.remove(l)});a(document).on("click","#shop2-deligate-calc",function(k){var l={},m=a("#shop2-order-delivery"),n=m.find(".shop2-delivery--item__tab");a("#shop2-perfect-form").find("input, textearea, select").each(function(){a(this); 112this.tagName==="INPUT"&&this.type==="checkbox"?this.checked&&(l[this.name]="on"):l[this.name]=a(this).val()});k.preventDefault();n.removeClass("active-tab");n.removeClass("point");m.addClass("preloader");a("#shop2-delivery-wait").show();a("input#address").blur();a("#shop2-deligate-calc").hide();a.ajax({url:"/-/x-api/v1/public/?method=deligate/calc¶m[get_vars][]",type:"post",dataType:"json",data:l,success:function(r){m.removeClass("preloader");a("#shop2-delivery-wait").hide();a("#shop2-order-delivery").html(r.result.html); 113a("#shop2-order-delivery").append('<div class="preloader"><div class="spinner"></div></div>');
113a("#shop2-order-delivery").find(".delivery-items").each(function(){var q=a(this);a.trim(q.text())==""&&q.parents(".shop2-delivery--item__tab:first").addClass("disabled")});if(r.result.error){g.alert(r.result.error);let q=g.my.on_shop2_btn?".shop2-btn":".g-button";a(".order_design_five").length&&(a(".order_design_five ul li").length<=1&&a(".order_design_five ul li").before(`<li>${r.result.error}</li>`), 114a(`.form-item ${q}`).addClass("shop2-disabled"),a(".order_design_five").removeClass("hide"))}else a.parseJSON(a("#dadata").val()),r=g.my.on_shop2_btn?".shop2-btn":".g-button",a(".order_design_five ").length&&(a(".order_design_five ul li").length>1&&a(".order_design_five ul li").first().remove(),a(`.form-item ${r}`).removeClass("shop2-disabled"),a(".order_design_five").addClass("hide")),g.queue.edost2(),a("#shop2-ems-calc, #shop2-edost-calc").on("click",function(q){var v=a(this).data("attach-id"), 115x=a("select[name="+v+"\\[to\\]]"),w=a("input[name="+v+"\\[zip\\]]"),y=a("input[name="+v+"\\[order_value\\]]");x.length==0&&(x=a("#shop2-edost2-to"));q.preventDefault();x=x.get(0)?x.val():"";w=w.get(0)?w.val():"";y=y.prop("checked")?"on":"";g.delivery.calc(v,"to="+x+"&zip="+w+"&order_value="+y,function(z){!z.data&&z.errstr?(g.alert(z.errstr),a("#delivery-"+v+"-cost").html(0)):(a("#delivery-"+v+"-cost").html(z.data.cost),z.data.html&&(a("#delivery-"+v+"-html").html(z.data.html),g.queue.edost()))})}), 116a("#shop2-deligate-calc").hide()}})})},coupon:function(){g.on("afterCartAddCoupon, afterCartRemoveCoupon",function(){document.location.reload()});a(".coupon-btn").on("click",function(b){var c=a("#coupon").val();b.preventDefault();c&&g.cart.addCoupon(c)});a(".coupon-delete").on("click",function(b){var c=a(this).data("code");b.preventDefault();c&&g.cart.removeCoupon(c)})},delivery:function(){a("#shop2-order-delivery").find(".delivery-items").each(function(){var b=a(this);a.trim(b.text())==""&&b.parents(".shop2-delivery--item__tab:first").addClass("disabled")}); 117a(document).on("change",".map-select select",function(){var b=a(this),c=b.find("option:selected").index();b.find("option:selected").text();b=b.val();if(c==0)g.delivery.ymapsMap.balloon.close();else for(c=g.delivery.ymapsMap.geoObjects.getIterator();c=c.getNext();){for(var d=0,f=c.getLength();d<f;d++){var h=c.get(d);h.properties.get("id")===b?(h.options.set("iconImageHref",g.delivery.ymapsIconsData.selected),h.balloon.isOpen()?h.balloon.close():h.balloon.open()):h.options.set("iconImageHref",g.delivery.ymapsIconsData["default"])}break}}); 118a(".shop2-payment-options .option-type").each(function(){if(a(this).hasClass("option-payment-systems")&&a(this).hasClass("active-type")){var b=a(".shop2-payment-options .shop2-payment-btn");a(".shop2-payment-options .shop2-payment-btn").attr("data-continue-text");var c=a(".shop2-payment-options .shop2-payment-btn").attr("data-pay-text");b.text(c)}});a(document).on("click",".shop2-cart-order-payments .options-list .option-type:not(.active-type) .option-label.payments-label",function(b){b.stopPropagation(); 119b=a(this);a(document).find(".shop2-cart-order-payments .option-type").removeClass("active-type");b.parent().addClass("active-type")});a(document).on("click",".option-label:not(.payments-label)",function(b){var c=a(this),d=a(this).parents(".options-list"),f=d.find(".option-label");d=d.find(".option-type");f=f.next();c.parent().index();b.target.nodeName!="INPUT"&&g.delivery.deligate&&g.mode!="orders"&&b.preventDefault();g.delivery.ymapsMap&&(g.delivery.ymapsMap.destroy(),g.delivery.ymapsMap=null);b= 120g.my.on_shop2_btn?".shop2-btn":".g-button";var h=c.parents(".option-type").find(".option-details.map.selected");c.hasClass("ymap")&&!h.length?a(`.form-item ${b}`).length&&(a(`.form-item ${b}`).addClass("shop2-disabled"),a(".order_design_five").removeClass("hide")):a(`.form-item ${b}.shop2-disabled`).length&&(a(`.form-item ${b}.shop2-disabled`).removeClass("shop2-disabled"),a(".order_design_five").addClass("hide"));d.removeClass("active-type");c.parent().addClass("active-type");f.find("input, textarea, select").prop("disabled", 121!0);c.next().find("input, textarea, select").prop("disabled",!1);g.delivery.deligate&&c.find("input:first").prop("checked",!0);c.hasClass("ymap")&&g.delivery.YmapsInit(c.data("service-code"));a(".shop2-payment-options .shop2-btn").hasClass("shop2-payment-btn")&&(d=a(".shop2-payment-options .shop2-payment-btn"),b=a(".shop2-payment-options .shop2-payment-btn").attr("data-continue-text"),f=a(".shop2-payment-options .shop2-payment-btn").attr("data-pay-text"),c.parent().hasClass("option-
121payment-systems")? 122d.text(f):d.text(b))});a(document).on("click",".shop2-delivery--item__tab .tab-label",function(){var b=a(document).find(".shop2-delivery--item__tab"),c=a(this).parents(".shop2-delivery--item__tab:first"),d=c.index(),f=c.data("index");if(c.hasClass("disabled"))return!1;c.hasClass("active-tab")?c.removeClass("active-tab"):(b.removeClass("active-tab").eq(d).addClass("active-tab"),localStorage.setItem("activeDeliveryTab",f),b=a(".active-tab .tab-label").offset().top-10,a("html, body").animate({scrollTop:b}, 123800))});a(document).on("click",".option-label:not(.payments-label)",function(e){if(e.target.tagName!=="INPUT"){var b=a(this);b.find('input[type="radio"]').prop("checked",!0);var c=b.data("attach_id"),d=b.parent().siblings(".option-type"),f=b.parents(".shop2-delivery--item__tab:first").siblings();a("#delivery_id_deligate").val(c);a("#deligate_points_fields .fields").empty();a("#deligate_points_fields").hide();f.find(".option-type input").prop("checked",!1);f.removeClass("point");d.find("input").prop("checked", 124!1);if(b=b.data("service-code"))localStorage.setItem("activeAttachId",b),b=="selfdelivery"&&localStorage.setItem("activeDeliveryOption","selfdelivery")}});a("#shop2-ems-calc, #shop2-edost-calc").on("click",function(b){var c=a(this).data("attach-id"),d=a("select[name="+c+"\\[to\\]]"),f=a("input[name="+c+"\\[zip\\]]"),h=a("input[name="+c+"\\[order_value\\]]");d.length==0&&(d=a("#shop2-edost2-to"));b.preventDefault();d=d.get(0)?d.val():"";f=f.get(0)?f.val():"";h=h.prop("checked")?"on":"";g.delivery.calc(c, 125"to="+d+"&zip="+f+"&order_value="+h,function(k){!k.data&&k.errstr?(g.alert(k.errstr),a("#delivery-"+c+"-cost").html(0)):(a("#delivery-"+c+"-cost").html(k.data.cost),k.data.html&&(a("#delivery-"+c+"-html").html(k.data.html),g.queue.edost()))})});(function(){var b=localStorage.getItem("activeDeliveryTab");b=a('.shop2-delivery--item__tab[data-index="'+b+'"]');b.length&&!b.hasClass("disabled")&&(a(".shop2-delivery--item__tab").removeClass("active-tab"),b.addClass("active-tab"))})();(function(){var b= 126localStorage.getItem("activeAttachId"),c=a(".shop2-delivery--item__tab.active-tab");setTimeout(function(){c.find('.option-label[data-service-code="'+b+'"]').find("input").prop("checked",!0)},10)})();(function(){var b=localStorage.getItem("activeDeliveryOption"),c=a(".shop2-delivery--item__tab.active-tab"),d=function(){var h=c.find('.option-details[data-id="'+b+'"]');return h.length?(h.addClass("selected"),h.closest(".option-type").addClass("active-type"),h.find("input, textarea, select").prop("disabled", 127!1),!0):!1};if(!d()){var f=setInterval(function(){d()&&clearInterval(f)},300);setTimeout(function(){clearInterval(f)},5E3)}})();(function(){(new MutationObserver(function(b){b.forEach(function(c){c.type==="attributes"&&c.attributeName==="class"&&(c=a(c.target),c.hasClass("option-details")&&c.hasClass("selected")&&(c=c.data("id"))&&localStorage.setItem("activeDeliveryOption",c))})})).observe(document.body,{attributes:!0,subtree:!0,attributeFilter:["class"]})})()},edost:function(){function b(h){h="[name="+ 128h.replace(/([\[\]])/g,"\\$1")+"]";return a(h)}function c(h){h=a.trim(h.text()).replace(/\s*\n\s*/g,"\n").split("\n").splice(1).join("\n");f.val(h).prop("readonly",!0)}var d=a("#shop2-edost-calc").data("attach-id"),f=b(d+"[address]");b(d+"[edost][office]").on("click",function(){var h=a(this),k=h.closest(".shop2-edost-office");c(k);h.prop("checked",!0)});b(d+"[edost][tarif]").on("click",function(){var h=a(this).closest(".shop2-edost-variant"),k=h.siblings(),l=h.find(".shop2-edost-office");k.find(".shop2-edost-office input, .shop2-edost-pickpointmap input").prop({disabled:!0, 129checked:!1}
129);k=h.find(".shop2-edost-office input, .shop2-edost-pickpointmap input").prop({disabled:!1}).filter(":radio");h=k.filter(":checked");k.get(0)?h.get(0)?h.trigger("click"):k.eq(0).trigger("click"):l.length==1?c(l):f.prop("readonly")&&f.prop("readonly",!1).val("");g.trigger("afterEdostSet")}).filter(":checked").trigger("click");a(".shop2-edost-pickpointmap a").on("click",function(){var h=a(this),k=h.children(),l=h.data("city");h.closest(".shop2-edost-variant").find("> label input").trigger("click"); 130PickPoint.open(function(m){var n={};a.each(["name","address","id"],function(r,q){n[q]=m[q]});h.next().val(JSON.stringify(n));k.html(": "+n.name);f.val(n.name+",\n"+n.address).prop("readonly",!0)},{city:l,ids:null});return!1})},edost2:function(){function b(w){return a.map(w,function(y){return'<option value="'+y.id+'">'+y.name+"</option>"}).join("")}function c(w){w.html("").closest(".option-item").addClass("hide")}function d(w){w.closest(".option-item").removeClass("hide")}if(window.shop2EdostRegions){var f= 131a("#shop2-edost2-country"),h=f.html(),k=a("#shop2-edost2-region"),l=k.html(),m=a("#shop2-edost2-city"),n=m.html(),r=a("#shop2-edost2-to");if(f.length){var q=a.grep(shop2EdostRegions,function(w){return w.is_country});f.html(h+b(q));c(k);c(m);f.on("change",function(){var w=a(this).val();k.length?(q=a.grep(shop2EdostRegions,function(y){return y.is_region&&y.country==w}),k.html(l+b(q)),q.length==0?(c(k),c(m),r.val(w)):(d(k),r.val(""))):m.length?(q=a.grep(shop2EdostRegions,function(y){return y.is_city&& 132y.country==w}),m.html(n+b(q)),q.length==0?(c(m),r.val(w)):(d(m),r.val(""))):r.val(w)})}k.length&&(f.length||(q=a.grep(shop2EdostRegions,function(w){return w.is_region}),k.html(l+b(q)),c(m)),k.on("change",function(){var w=a(this).val();q=a.grep(shop2EdostRegions,function(y){return y.is_city&&y.region==w});m.html(n+b(q));q.length==0?c(m):d(m);r.val(w)}));f.length||k.length||(q=a.grep(shop2EdostRegions,function(w){return w.is_city}),m.html(l+b(q)));m.on("change",function(){var w=a(this).val();w==="default"? 133k.length&&r.val(k.val()):w&&r.val(w)});h=f.data("value");var v=k.data("value"),x=m.data("value");h&&f.val(h);f.trigger("change");v&&k.val(v);k.trigger("change");x&&m.val(x);m.trigger("change")}},print:function(){a("#order-print").on("click",function(){s3.printMe("shop2-order",{stylesheet:g.options.printCSS});return!1})},hs:function(){a(".shop2-compare-product-image a img, .shop2-compare-data a img, .shop2-product .product-image a img, .shop2-product .product-thumbnails li a img, .cart-product-image a img, .cart-product-param a img").closest("a").on("click", 134function(){hs.expand(this);return!1}
134).addClass("highslide");a(document).on("click",".shop2-edost-office-address a",function(){hs.htmlExpand(this,{objectType:"iframe",wrapperClassName:"draggable-header",outlineType:"rounded-white",width:900,height:600,align:"center"});return!1})},vendors:function(){a(".shop2-vendor").eachRow(function(b){var c=b.getHeights();b.each(function(d){var f=a(this);d=c.max-c.values[d];f=f.find(".vendor-name");var h=f.height();f.css("min-height",h+d)})})},toggleFields:function(){var b= 135a(".shop2-filter-fields"),c=readCookie("filter_opened"),d=a(".shop2-toggle-fields");d.on("click",function(){var f=a(this),h=f.data("alt"),k=f.html();b.hasClass("hide")?createCookie("filter_opened",1,7):eraseCookie("filter_opened");b.toggleClass("hide");f.html(h);f.data("alt",k);return!1});c||d.trigger("click")},lazyLoad:function(){var b=a(document),c=a(window),d=!1,f=a(".product-list"),h=1E6;g.my.lazy_load_subpages&&f.get(0)&&b.scroll(function(){var k=a(".shop2-pagelist:last"),l=a(".product-list:last"), 136m=l.offset().top+l.height();typeof g.page=="undefined"&&(g.page=1);if(b.scrollTop()+c.height()>=m&&!d&&g.page<h){d=!0;m="/-/x-api/v1/public/?method=shop2/lazyLoad";var n={param:{page_num:g.page,url:window.location.pathname}};window.location.search&&(m+="&"+window.location.search.substring(1));k.length&&a(".custom-shop2-pagelist").length<1&&a.ajax({url:m,type:"GET",dataType:"json",data:n,success:function(r){l.after("<hr />"+r.result.data.html);g.page=parseInt(g.page)+1;g.productRefs=Object.assign(g.productRefs, 137r.result.data.product_refs);h=r.result.data.pages;k.hide();g.queue.heights();d=!1;g.trigger("afterProductsLazyLoaded")}})}})},compare:function(){a(document).on("click",".product-compare input:checkbox",function(){var b=a(this),c=b.attr("checked")?"del":"add";g.compare.action(c,b.val(),function(d,f){f=="success"&&(d.errstr?(g.alert(d.errstr),b.prop("checked",!1)):(a("input[type=checkbox][value="+b.val()+"]").closest(".product-compare").replaceWith(d.data),a(".product-compare-added a span").html("("+ 138d.count+")"),d.panel&&a("#shop2-panel").replaceWith(d.panel)))})})},compareTable:function(){a(".shop2-compare-table").each(function(){var b=a(this),c=b.find(".shop2-compare-switch a"),d=b.find(".shop2-compare-data");b.find(".shop2-compare-delete").on("click",function(){var f=a(this).data().id;g.compare.remove(f,function(){document.location.reload()});return!1});c.on("click",function(){var f=a(this);c.removeClass("shop2-compare-switch-active");f.addClass("shop2-compare-switch-active");f.index()=== 1390?d.show():d.each(function(){var h=a(this);var k=h.find("td");var l=k.eq(1).html(),m=!1,n=2,r=k.length;if(r<=2)k=!1;else{for(;n<r;n+=1){if(l!=k.eq(n).html()){m=!0;break}l=k.eq(n).html()}k=m}k?h.show():h.hide()});return!1}).eq(1).trigger("click")})},favorite:function(){a(document).on("click",".favorite_btn",function(){var b=a(this),c=b.parents("form").find('input[name="kind_id"]').val(),d=b.parents(".favorite_btn_wrapper").find(".favorite_btn_active");a.ajax({url:"/-/x-api/v1/public/?method=shop2/addFavoriteProduct¶m[kind_id]="+ 140c,type:"post",dataType:"json",data:c,success:function(f){f=f.result.count;a(".favorite_btn_active a > span").text(f);a(".shop2_favorite_cart_link span").text(f);a(".favorite_panel").removeClass("not-null");g.msg("\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0432 <a href='%s'>\u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435</a>".replace("%s",g.uri+"/favorites"),b);b.hide();d.show()}})});a(document).on("click",".favorite_btn_active .icon",function(){var b=a(this).parents("form").find('input[name="kind_id"]').val(); 141a('<div class="shop2-popup_favorite"><div class="popup_inner"><div class="text">\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e?</div><div class="btns"><div class="shop2-btn delete_fovorite" data-kind_id="'+b+'">\u0423\u0434\u0430\u043b\u0438\u0442\u044c</div><div class="shop2-btn-close close_favorite">\u0417\u0430\u043a\u0440\u044b\u0442\u044c</div></div></div></div>').appendTo("body")});a(document).on("click", 142".delete_fovorite",function(){var b=a(this).data("kind_id"),c=a("body").find('form input[value="'+b+'"]').closest("form"),d=c.find(".favorite_btn"),f=c.find(".favorite_btn_active");
142a.ajax({url:"/-/x-api/v1/public/?method=shop2/removeFavoriteProduct¶m[kind_id]="+b,type:"post",dataType:"json",data:b,success:function(h){h=h.result.count;a(".favorite_btn_active a > span").text(h);a(".shop2_favorite_cart_link span").text(h);h==0&&a(".favorite_panel").addClass("not-null");f.hide();d.show()}});a(".shop2-popup_favorite").remove()}); 143a(document).on("click",".close_favorite",function(){a(".shop2-popup_favorite").remove()});a(document).on("click",".shop2-btn_popup_favorite",function(b){a('<div class="shop2-popup_favorite"><div class="popup_inner"><div class="text">\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e?</div><div class="btns"><div class="shop2-btn clear_fovorite">\u0423\u0434\u0430\u043b\u0438\u0442\u044c</div><div class="shop2-btn-close close_favorite">\u0417\u0430\u043a\u0440\u044b\u0442\u044c</div></div></div></div>').appendTo("body"); 144b.preventDefault()});a(document).on("click",".clear_fovorite",function(b){a.ajax({url:"/-/x-api/v1/public/?method=shop2/clearFavoriteProducts",type:"post",dataType:"json",success:function(c){}});location.reload()})},paySelected:function(){if(g.mode=="orders"&&a("[data-continue-text]").length)a(".options-list input").on("change",function(b){b=a(this);
144var c=a("[data-continue-text]"),d=c.data("continue-text"),f=c.data("pay-text");b.hasClass("shop2-payments-radio")?c.text(d):c.text(f)})},buyOneClick:function(){function b(){typeof shop2_gr!= 145"undefined"&&typeof shop2_gr.methods.amountInit!="undefined"&&shop2_gr.methods.amountInit()}function c(){typeof grFormDatePicker!="undefined"?grFormDatePicker.init():a(".datepickerInit").each(function(l,m){a(this).datepicker({minDate:0,changeMonth:!1,numberOfMonths:1})})}function d(l){l=l.closest(".shop2-buy-one-click__product-right");var m=+String(l.find(".shop2-buy-one-click__total").data("price")).replace(/\u00A0/g,"");l.find(".shop2-product-amount input").data("min");var n=+l.find(".shop2-product-amount input").val(); 146m*=n;l.find(".shop2-buy-one-click__total .price-current strong").text(Math.floor(m).toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))}function f(l){var m=l.requestType||"post";if(m=="get"){var n="/-/x-api/v1/public/?method=shop2/buyOneClick¶m[kind_id]="+h.kind_id,r=a(k.str_btn).data("images-size"),q=a(k.str_btn).data("images-view");q&&(n+="&gr_images_view="+q);r&&(n+="&gr_images_size="+r);a.ajax({url:n,type:m,cache:!1,dataType:"json"}).done(function(v){l.callback&&l.callback(v)})}else{n="/-/x-api/v1/public/?method=shop2/buyOneClick"; 147r=l.serializeData;q=a(k.str_btn).data("images-size");let v=a(k.str_btn).data("images-view");v&&(n+="&gr_images_view="+v);q&&(n+="&gr_images_size="+q);a.ajax({url:n,data:r,type:m,cache:!1,dataType:"json"}).done(function(x){if(x.result.error)return a(k.str_block+" .shop2-warning").remove(),a(k.str_block+" .shop2-buy-one-click__result").prepend('<div class="shop2-warning">'+x.result.error+"</div>"),k.up_scroll(),!1;if(x.result.redirect_payment_url)return window.location.replace(x.result.redirect_payment_url), 148!1;var w=a.trim(x.result.html).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a(k.str_block).find(".shop2-buy-one-click-block").html(w);c();a(".order_one_click_amount_js input").trigger("change");b();l.callback&&l.callback(x)})}}if(a(".buy-one-click-js").length){var h={status_modal:!1};if(a('[data-remodal-id="buy-in-one-click"]').length){var k=a('[data-remodal-id="buy-in-one-click"]').remodal();k.str_block='[data-remodal-id="buy-in-one-click"]';k.str_btn=".buy-one-click-js";k.settings.hashTracking= 149!1;k.open_modal=function(l){a(this.str_block).find(".shop2-buy-one-click-block").html(l);this.open()};k.up_scroll=function(){this.$wrapper.scrollTop(0)}}else{k={str_block:".buy-one-click-container",str_btn:".buy-one-click-js",open_modal:function(n){h.opening(` 150 <div class="${this.str_block.replace(".","")}"> 151 <div class="preorder-form-close"></div> 152 <div class="shop2-buy-one-click-block">${n}</div> 153 </div> 154 `)},up_scroll:function(){a(this.str_block).parent().parent().scrollTop(0)}};a(document).on("keyup.esc_keyup",function(n){n.keyCode==27&&h.status_modal&&l.apply(h);return!1});a(document).on("click",function(n){n.stopPropagation();n=a(n.target);(n.is(".buy-one-click-container .preorder-form-close")||n.is(".shop2-buy-one-click-popup"))&&l.apply(h)});function l(){a("html").removeClass("oveflowHidden");this.current_modal.removeClass("opened");this.status_modal=!1}function m(){a("html").addClass("oveflowHidden"); 155this.current_modal.addClass("opened");this.status_modal=!0}(function(){window.$popup=a('<div class="shop2-buy-one-click-popup">\n\t\t\t\t\t<div class="shop2-buy-one-click-popup__inner">\n\t\t\t\t\t</div>\n\t\t\t\t</div>');a("body").append($popup);h.current_modal=$popup;h.opening=function(n){this.current_modal.find(".shop2-buy-one-click-popup__inner").html(n);m.apply(this)}})()}a(document).on("click",k.str_block+" .order_one_click_amount_js",function(l){l=a(l.target);(l.hasClass("amount-plus")||l.hasClass("amount-minus"))&& 156d(l)});a(document).on("change",".order_one_click_amount_js input",function(){var l=a(this);setTimeout(function(){d(l)},100)});a(document).on("click",k.str_btn,function(l){l.preventDefault();h._this=this;h.kind_id=+a(h._this).data("product-kind_id");h.form=a(h._this).closest("form");f({requestType:"get",callback:function(m){m=a.trim(m.result.html).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");k.open_modal(m);c();a(".order_one_click_amount_js input").val(h.form[0].amount.value).trigger("change"); 157b()}})});a(document).on("submit",k.str_block+" form",function(l){l.preventDefault();l=a(this).serializeArray();var m=!0;a(k.str_block+" .order_field_email").each(function(){var n=a(this).val();if(!/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/.test(String(n).toLowerCase()))return a(this).closest(".tpl-field").addClass("field-error").find(".error-message").removeClass("hide"),m=!1});m&&f({requestType:"post",serializeData:l})})}}, 158alert:function(){function b(){f.hide();d.hide();d.removeAttr("class");c="";g.trigger("alertHide",d);return!1}var c;a(document.body).append('<div id="shop2-alert">\n<div id="shop2-alert-body"></div>\n<a href="#" id="shop2-alert-ok" class="shop2-btn"></a>\n</div>\n<div id="shop2-alert-overlay"></div>');var d=a("#shop2-alert");var f=a("#shop2-alert-overlay");var h=a("#shop2-alert-body");var k=a("#shop2-alert-ok");f.on("click",b);k.on("click",b);g.alert=function(l,m,n){k.html(m||"Ok");h.html(l);c=n|| 159"shop2-alert--warning";f.show();d.attr("class",c);d.show().s3center();g.trigger("alertShow",d)};g.alert.hide=b},tooltip:function(){a(".shop2-tooltip").s3tooltip({cls:"shop2-color-ext-tooltip",dir:"top",data:function(){return a(this).data("tooltip")}})},colorTooltip:function(){a(".shop2-color-ext-list li").s3tooltip({cls:"shop2-color-ext-tooltip",dir:"top",data:function(){return a(this).children("div").html()}});a(".shop2-color-ext-multi").s3tooltip({cls:"shop2-color-ext-tooltip shop2_multi_tooltip", 160dir:"top",data:function(){var b=this.getElementsByTagName("ul");if(b.length)return b[0].outerHTML}})},colorPopup:function(){var b=a('<div id="shop2-color-ext-popup"></div>'),c=a('<div id="shop2-color-ext-close"></div>'),d=a('<ul id="shop2-color-ext-list" class="shop2-color-ext-list"></ul>'),f=null;b.append(c);b.append(d);a(document.body).append(b);a.on(".shop2-color-ext-caption",{click:function(){var h=a(this),k=h.closest(".shop2-color-ext-popup").find(".shop2-color-ext-list");h=h.offset();f=k.children("li"); 161d.html(k.html());b.css(h).show();return!1}});a(document).on("click",".shop2-color-ext-list li",function(){var h=a(this),k=h.data(),l=h.parent().find("input.additional-cart-params"),m=h.is(".shop2-color-ext-selected");typeof k.kinds!=="undefined"||l.length?(h.addClass("shop2-color-ext-selected").siblings().removeClass("shop2-color-ext-selected"),l.length?l.val(k.value):m||g.product._reload(this)):(l=h.index(),h.closest("#shop2-color-ext-popup").length&&(h.toggleClass("shop2-color-ext-selected"),f.eq(l).toggleClass("shop2-color-ext-selected"), 162g.filter.toggle(k.name,k.value),g.filter.count()))});a(document).on("click",function(h){a(h.target).closest("#shop2-color-ext-popup").get(0)&&h.target!=c.get(0)||b.hide()})},colorSelect:function(){function b(){if(c.is(":visible"))return c.hide(),!0}var c=a('<div id="shop2-color-ext-select"><ins></ins></div>'),d=null,f=null;a(document.body).append(c);a(document).on("click",b);a.on(".shop2-color-ext-select",{click:function(){if(!b()){var h=a(this),k=h.find(".shop2-color-ext-options"),l=h.offset(),m= 163'<div class="baron-wrapper"> <div class="baron-scroller"> <div class="baron-container"> <div class="shop2-color-ext-options">'+k.html()+' </div> </div> <div class="baron-scroller-bar"></div> </div></div>';d=k.children("li");f=h.find("input");c.html(m);c.show();h=h.width();(k=c.data("width"))||(k=c.width(),c.data("width",k));h>k?c.css("width",h):c.css("width",k);baron(c,{scroller:".baron-scroller",container:".baron-container",bar:".baron-scroller-bar"});c.css(l);return!1}}});a.on("#shop2-color-ext-select li:not(.shop2-color-ext-selected)", 164{click:function(){var h=a(this),k=h.index(),l=h.data();h.addClass("shop2-color-ext-selected").siblings().removeClass("shop2-color-ext-selected");d.removeClass("shop2-color-ext-selected");d.eq(k).addClass("shop2-color-ext-selected");l.kinds?g.product._reload(d.get(k)):(f.val(l.value),a(f).closest(".search-form").length||g.cf_margin_price_enabled&&g.margin_price.price_change(f,"form"),h.hasClass("js-calc-custom-fields")&&g.product._reload(d.get(k)))}});a.on(".js-calc-custom-fields",{change:function(){var h= 165a(this);g.product._reload(h.find(":selected").parent())}});a.on(".shop2-color-ext-list .js-calc-custom-fields:not(select)",{click:function(){var h=a(this);g.product._reload(h.parent())}})},coordinates:function(){a(document).on("click",".shop2-map-link",function(b){b.preventDefault();b=a(this);var c=b.data(),d=c.map;d.title||(d.title=b.text());g.maps.alert(c.mapType,d)})},fixDoubleOrders:function(){var b=a(".shop2-order-form, .shop2-order-in-one-page-form"),c=b.find("[type=submit]");b.on("submit", 166function(){c.prop("disabled",!0);setTimeout(function(){c.prop("disabled",!1)},1E3)})},paymentMethods:function(){var b=a(".shop2-payment-type input"),c=a(".shop2-payment-methods input");b.on("change",function(){var d=a(this).closest(".shop2-payment-type").next(".shop2-payment-methods").find("input:first");c.prop("checked",!1);d.prop("checked",!0)});c.on("change",function(){var d=a(this).closest(".shop2-payment-methods").prev(".
166shop2-payment-type").find("input:first");b.prop("checked",!1);d.prop("checked", 167!0)})},auth:function(){a(document).on("click",".js-shop2-cart-auth__expand",function(b){b.preventDefault();a(".js-shop2-cart-auth__form").toggle()})},orderGetPayments:function(b,c){b=b||!1;c=c||!1;if(g.shop2_cart_order_payments==6){var d=a(".shop2-order-options.shop2-delivery"),f=d.find(".option-type");d=d.find('.option-label [name="delivery_id"]');var h=a(".shop2-cart-order-payments");function k(l,m){var n=this.value;l=this.property_attach||0;var r=this.tarif||0,q=this.delivery_type||0;n&&(n={attach_id:n, 168html:!0,mode:"one-page"},l?n.attach=l:r&&(n.deligate={},n.deligate.tarif=r),q&&(n.attach={delivery_type:q,deligate:{tarif:this.tarif,pos:this.pos,code:this.code,insurance_type:this.insurance_type,tariff_id:this.tariff_id}}),a.ajax({method:"GET",url:"/-/x-api/v1/public/?method=shop2/getPayments",data:{param:n},success:function(v){typeof v.result!="undefined"&&typeof v.result.html!="undefined"?(h.html(v.result.html),typeof m!="undefined"&&m()):typeof v.error!="undefined"&&v.error.message&&h.html(v.error.message); 169g.trigger("afterGetDeliveryPayments")}}))}if(!b&&(d.off("paymentClick").on("click.paymentClick",k),a("#shop2-order-delivery .tab-label").length&&(a(document).off("click.paymentClick").on("click.paymentClick","#shop2-order-delivery .option-type:not(.active-type)",function(l){l={};var m=a(this),n=m.find(".option-label"),r=n.find("input")[0];l.value=n.data("attach_id");typeof m.attr("data-option-for-paymethod")!="undefined"?(m=m.attr("data-option-for-paymethod"),m=JSON.parse(m),l.delivery_type=m.delivery_type, 170l.value=m.attach_id,l.tarif=m.tariff_hash,l.pos=m.pos,l.code=m.code,l.insurance_type=m.insurance_type,l.tariff_id=m.tariff_id):r.name.match("tarif")&&(l.tarif=r.value);k.call(l,"")}),a(".shop2-warning").hasClass("hide")))){let l=a("#shop2-order-delivery .option-type").filter(".active-type");l.trigger("click.paymentClick");l.closest(".shop2-delivery--item__tab").addClass("active-tab");g.shop2_cart_order_payments==6&&g.queue.orderGetPayments(!0,l.find('[name="delivery_id"]')[0])}h.length&&d.length&& 171!localStorage.getItem("delivery_item_active")&&(f=f.filter(".active-type").find('.option-label [name="delivery_id"]'),k.call(f,"",()=>{var l=h.attr("data-payment_id")||!1;if(l){var m=h.find('.option-label [name="payment_id"]');m.first().removeAttr("checked");m=m.filter(function(n,r){return a(r).val()==l||a(r).val()=="-"+l});m.attr("checked","checked");m.closest(".option-type").addClass("active-type").siblings().removeClass("active-type")}}));b&&k.call(c)}}};g.cart.applyBonusPoint=function(b,c){g.trigger("beforeCartApplyBonus"); 172a.getJSON("/-/x-api/v1/public/?method=cart/applyBonusPoints",{param:{hash:g.hash.cart,bonus_points:b}},function(d,f){g.fire("afterCartApplyBonusPoints",c,d,f);g.trigger("afterCartApplyBonusPoints",d,f)});return!1};g.cart.removeBonusPoint=function(b){g.trigger("beforeCartRemoveCartBonusPoints");a.getJSON("/-/x-api/v1/public/?method=cart/RemoveBonusPoints",{param:{hash:g.hash.cart}},function(c,d){g.fire("afterCartRemoveCartBonusPoints",b,c,d);g.trigger("afterCartRemoveCartBonusPoints",c,d)})};g.margin_price= 173{price_change:function(b,c){if(g.mode=="cart")f=a("#shop2-cart"),g.cart.update(f);else{var d=a(b).closest(c);if(!d.hasClass("shop2-filter")){var f=d.get(0);b=d.find(".additional-cart-params");c=b.length;var h={kind_id:f.kind_id.value,params:{}};if(c)for(var k=0;k<c;k+=1)f=b[k],f.value&&(h.params[f.name]=f.value);a.ajax({url:"/-/x-api/v1/public/?method=shop2/getPrice",type:"get",data:{param:h},dataType:"json",success:function(l){d.find(".price-current").replaceWith(l.result.data.html.price);d.find(".price-old ").replaceWith(l.result.data.html.price_old)}})}}}, 174select_change:function(){if(g.cf_margin_price_enabled&&(a(document).on("click",".shop2-color-ext-list li",function(){var b=a(this);setTimeout(function(){g.margin_price.price_change(b,"form")},10)}),a("select.additional-cart-params").length))a.on("select.additional-cart-params",{change:function(b){g.margin_price.price_change(a(b.target),"form")}})}};g.queue.margin_price=function(){if(g.mode=="cart"&&!a("#delivery_id_deligate").length){if(localStorage.getItem("delivery_item_active")){let b=a(".shop2-order-in-one-page-form .shop2-delivery .options-list .option-type").eq(+localStorage.getItem("delivery_item_active")).find(".option-label"); 175b.trigger("click").addClass("active-type");g.queue.orderGetPayments(!0,b.find('[name="delivery_id"]')[0])}else g.shop2_cart_order_payments==6&&a(".shop2-order-in-one-page-form .shop2-delivery > .options-list > .option-type.active-type > .option-label input").trigger("click");a(".shop2-order-in-one-page-form .shop2-delivery .options-list .option-type .option-label").on("click",function(){var b=a(".shop2-order-in-one-page-form .shop2-delivery .options-list .option-type.active-type").index();localStorage.setItem("delivery_item_active", 176b)})}g.margin_price.select_change()};g.queue.bonus=function(){g.on("afterCartApplyBonusPoints, afterCartRemoveCartBonusPoints",function(){document.location.reload()});a(".bonus-apply").on("click",function(b){var c=a("#bonus-points");c=Number(c.val());var d=Number(a(".bonus-amount").html());switch(!0){case c==""||c>d:b.preventDefault();break;case d>=c:g.cart.applyBonusPoint(c)}});a(".bonus-delete").on("click",function(b){g.cart.removeBonusPoint()});a.fn.inputFilter=function(b){return this.on("input keydown keyup mousedown mouseup select contextmenu drop", 177function(){b(this.value)?(this.oldValue=this.value,this.oldSelectionStart=this.selectionStart,this.oldSelectionEnd=this.selectionEnd):this.hasOwnProperty("oldValue")&&(this.value=this.oldValue,this.setSelectionRange(this.oldSelectionStart,this.oldSelectionEnd))})};a("#bonus-points").inputFilter(function(b){return/^\d*$/.test(b)})};var u=g.maps={};u.alert=function(b,c){g.alert('<div id="shop2-alert-map"></div>',"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","shop2-alert--map");u[b].ready(function(){u[b].draw("shop2-alert-map", 178c)})};u.getCenter=function(b){a.each(b,function(){})};u.yandex={ymaps:window.ymaps,_loading:a.Deferred(),_loading_init:!1,_loading_callback:function(b){this.ymaps=b;this._loading.resolve(b)},ready:function(b){this._loading.done(b);this.ymaps?this._loading.resolve(this.ymaps):this._loading_init||(g.maps_yandex_key!=""?a("head").append('<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=shop2.maps.yandex._loading_callback&apikey='+g.maps_yandex_key+'" type="text/javascript">'):a("head").append('<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&onload=shop2.maps.yandex._loading_callback" type="text/javascript">'), 179this._loading_init=!0)},draw:function(b,c){c=a.extend({},c);c.title=a.s3escape(c.title);c.text=a.s3escape(c.text);b=new this.ymaps.Map(b,{zoom:c.z,center:[c.x,c.y],behaviors:["drag","rightMouseButtonMagnifier","scrollZoom"]});var d=this.ymaps.templateLayoutFactory.createClass('<div class="shop2-map-baloon-content"><h3>$[properties.title]</h3>$[properties.text]</div>');c=new C.ymaps.Placemark([c.x,c.y],c,{balloonContentLayout:d});b.geoObjects.add(c)}};u.google={gmaps:window.google&&window.google.maps? 180window.google.maps:!1,_loading:a.Deferred(),_loading_init:!1,_loading_callback:function(){try{this.gmaps=window.google.maps,this._loading.resolve(this.gmaps)}catch(b){console.log(b)}},ready:function(b){this._loading.done(b);this.gmaps?this._loading.resolve(this.gmaps):this._loading_init||(a("head").append('<script src="https://maps.googleapis.com/ma
180ps/api/js?v=3.exp&callback=shop2.maps.google._loading_callback&key='+g.maps_google_key+'" type="text/javascript">'),this._loading_init=!0)},draw:function(b, 181c){var d=new this.gmaps.Map(document.getElementById(b),{zoom:Number(c.z),center:new google.maps.LatLng(c.x,c.y)}),f=new google.maps.Marker({position:new google.maps.LatLng(c.x,c.y),map:d,title:c.title}),h=new google.maps.InfoWindow({content:'<div class="shop2-map-baloon-content"><h3>'+a.s3escape(c.title)+"</h3>"+a.s3escape(c.text)+"</div>"});this.gmaps.event.addListener(f,"click",function(){h.open(d,f)})}};a(window).on("load",function(){g.queue.heights();g.product.productDatePicker()});C.shop2=g; 182a(function(){var b=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/i.test(navigator.userAgent)?"touchend.respons":"click.respons";a(".personal-html-btn, .close-btn").on(b,function(c){c.preventDefault();a(".personal-html-content").toggleClass("active")});a(document).on("click",".btn_payment_rest",function(){a(".shop2-order-options-wrapper").slideToggle()});a(document).on(b,function(c){a(c.target).closest(".personal-html-content-in, .personal-html-btn").length||a(".personal-html-content").removeClass("active")}); 183a(this).keydown(function(c){c.which==27&&a(".personal-html-content").removeClass("active")});a(document).on("click","#shop2-color-ext-select li",function(){g.facets.enabled&&setTimeout(function(){var c="/-/shop2-api/?cmd=getSearchMatches&hash="+g.apiHash.getSearchMatches+"&ver_id="+g.verId+"&"+a(g.facets.search.wrapper).serialize();g.facets.getDataSearch(c)},100)});a(document.body).on("change",".shop2-block.search-form #shop2_search_custom_fields select, .shop2-block.search-form #shop2_search_custom_fields input", 184function(){g.facets.enabled&&setTimeout(function(){var c="/-/shop2-api/?cmd=getSearchMatches&hash="+g.apiHash.getSearchMatches+"&ver_id="+g.verId+"&"+a(g.facets.search.wrapper).serialize();g.facets.getDataSearch(c)},100)})})})(jQuery,window);
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.