');\r\n\r\n for (var i = 0; i < recommendations.length; i++) {\r\n var product = recommendations[i];\r\n if (product.oldPrice && product.oldPrice <= product.price) {\r\n product.oldPrice = null;\r\n }\r\n product.customFields = product.customFields || {};\r\n product.discount = (product.oldPrice && product.price !== product.oldPrice) ? (100 * (product.oldPrice - product.price) / product.oldPrice).toFixed(0) + '%' : null;\r\n /*try {\r\n product.formattedPrice = product.price.toLocaleString().replace(',', ' ');\r\n if (product.oldPrice) { product.formattedOldPrice = product.oldPrice.toLocaleString().replace(',', ' '); }\r\n } catch (e) {}*/\r\n\r\n try {\r\n var $item = PopMechanic.$(\r\n cardTemplate({\r\n product: product,\r\n recommendations: recommendations,\r\n index: i\r\n })\r\n );\r\n } catch (e) {\r\n if (location.href.indexOf('pm-debug') > -1) {\r\n console.log('card template error', e);\r\n }\r\n continue;\r\n }\r\n if (groupSlidesBy === 1) {\r\n $carousel.append($item);\r\n } else {\r\n slideAccumulator.push($item);\r\n $slideContainer.append($item);\r\n if (slideAccumulator.length == groupSlidesBy) {\r\n slideAccumulator = [];\r\n $carousel.append($slideContainer);\r\n $slideContainer = PopMechanic.$('
');\r\n }\r\n }\r\n\r\n (function(i, product) {\r\n $item.attr('data-click-track', i);\r\n PopMechanic.$('#popmechanic-container-' + formId).on('click', '[data-click-track=\"' + i + '\"]', function(event) {\r\n event.stopPropagation();\r\n mindbox(\"async\", {\r\n operation: \"popmechanic-widget-click-\" + formId,\r\n data: {\r\n clicked: {\r\n product: {\r\n ids: product.ids,\r\n }\r\n }\r\n },\r\n onSuccess: function() {},\r\n onError: function(error) {\r\n console.log(error);\r\n }\r\n });\r\n\r\n settings.gaTracker.selectItem(product, i);\r\n return true;\r\n });\r\n }(i, product));\r\n }\r\n\r\n recommendations.map(function(product, i) {\r\n impressionMap[i] = function() {\r\n settings.gaTracker.viewItemList(product, i, { non_interaction: true });\r\n };\r\n });\r\n\r\n onInit();\r\n }\r\n\r\n var recommendationsLimit = recommendations.length;\r\n\r\n if (recommendationsLimit) {\r\n if (lessCount === 0 || lessCount <= recommendationsLimit) {\r\n renderProductList();\r\n } else {\r\n PopMechanic.$('[data-popmechanic-embed=\"' + formId + '\"]').remove();\r\n PopMechanic.$('#popmechanic-container-' + formId).remove();\r\n console.log('PopMechanic widget ' + formId + ': empty response');\r\n form.reportSlaSuccess();\r\n }\r\n } else {\r\n form.reportSlaSuccess();\r\n throw new Error('no data from mindbox');\r\n }\r\n} catch (e) {\r\n PopMechanic.$('#popmechanic-container-' + formId).remove();\r\n PopMechanic.$('[data-popmechanic-embed=\"' + form.id + '\"]').remove();\r\n console.error('PopMechanic widget ' + formId, e.message);\r\n form.reportSlaSuccess();\r\n}", "on_close": "var form = arguments[0] || {};\r\nwindow.PopMechanicSlider && window.PopMechanicSlider[form.id] && window.PopMechanicSlider[form.id].destroy && window.PopMechanicSlider[form.id].destroy();", "embed_code": "", "behaviors": ["info", "reco-sla", "reco_data", "tns"], "template_type": "embedded", "need_reset": false, "parameters": [], "on_targeting_ready": "", "on_child_ready": ""}, {"id": 2003, "html": "
", "css": "<% if(!parseInt(font_custom_show)) { %>\r\n\t@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');\r\n<% } %>\r\n\r\n<% var show1button = true;\r\nfor (var i = 0; i < fields_list.length; i++) {\r\n\tvar field = fields_list[i];\r\n\tif (field.type == \"submit\") show1button = field.params.submits_count == 1;\r\n}\r\n%>\r\n.popmechanic-reset,\r\n.popmechanic-reset * {\r\n\tfont-size: inherit;\r\n\tbox-sizing: border-box;\r\n\t-webkit-font-smoothing: antialiased;\r\n}\r\n#popmechanic-form {\r\n\tposition: relative;\r\n\tdisplay: inline-block !important;\r\n\tvertical-align: middle;\r\n\tpadding: <%=otstup2%>px 0 0 300px;\r\n\t<% if(parseInt(font_custom_show)) { %>\r\n\t\tfont-family: <%= font_custom %>;\r\n\t<% } else { %>\r\n\t\tfont-family: <%= font_family %>;\r\n\t<% } %>\r\n}\r\n#popmechanic-form .popmechanic-picture {\r\n\twidth: <%=img_size1%>px;\r\n\theight: <%=img_size1%>px;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 9;\r\n\tbackground: url(<%=image%>);\r\n\tbackground-size: cover;\r\n\tbackground-position: 50% 50%;\r\n}\r\n.popmechanic-success #popmechanic-form .popmechanic-picture {\r\n\tbackground-image: url(<%=thankyouImage%>);\r\n\tbackground-size: cover;\r\n\tbackground-position: 50% 50%;\r\n}\r\n#popmechanic-form .popmechanic-main, #popmechanic-form .popmechanic-thankyou {\r\n\tbackground: <%=bg_col1%>;\r\n\ttext-align: center;\r\n\twidth: 440px;\r\n\tmin-height:440px;\r\n\theight: auto;\r\n\tposition: relative;\r\n\tz-index: 10;\r\n\tpadding: <%=otstup1%>px 35px;\r\n}\r\n#popmechanic-form .popmechanic-main .popmechanic-content,\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-content {\r\n\tfont-weight: 100;\r\n\tfont-size: <%=font_size1%>px;\r\n\tline-height: <%=line%>;\r\n\tcolor: <%=font_col1%>;\r\n}\r\n#popmechanic-form .popmechanic-main .popmechanic-content .popmechanic-second-line,\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-content .popmechanic-second-line {\r\n\tfont-weight: 700;\r\n\tline-height: <%=line%>;\r\n\tfont-size: <%=font_size2%>px;\r\n\tcolor: <%=font_col2%>;\r\n}\r\n#popmechanic-form .popmechanic-main .popmechanic-content .popmechanic-third-line,\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-content .popmechanic-third-line {\r\n\tfont-size: <%=font_size3%>px;\r\n\tline-height: <%=line%>;\r\n\ttext-transform: none;\r\n\tcolor: <%=font_col3%>;\r\n}\r\n#popmechanic-form .popmechanic-inputs {\r\n\tmargin-top: 30px;\r\n}\r\n#popmechanic-form input,\r\n#popmechanic-form select {\r\n\tdisplay: block;\r\n\twidth: 350px;\r\n\theight: 45px;\r\n\tline-height: 43px;\r\n\ttext-align: center;\r\n\tpadding: 0;\r\n\tfont-size: 14px;\r\n\tborder: 1px solid <%=inp_col1%>;\r\n\tmargin: 19px auto;\r\n\tfont-weight: 100;\r\n\tcolor: #000;\r\n}\r\n#popmechanic-form input::-webkit-input-placeholder {\r\n\tcolor: #797979\r\n}\r\n#popmechanic-form input::-moz-placeholder {\r\n\tcolor: #797979\r\n}\r\n#popmechanic-form input::placeholder {\r\n\tcolor: #797979\r\n}\r\n\r\n<% if (show1button) { %>\r\n#popmechanic-form button {\r\n\tpadding: 0;\r\n\tdisplay: block;\r\n\twidth: 350px;\r\n\theight: 45px;\r\n\tline-height: 43px;\r\n\ttext-align: center;\r\n\tfont-size: 14px;\r\n\tborder: 1px solid <%=but_col1%>;\r\n\tmargin: 19px auto;\r\n\tbackground: <%=but_col1%>;\r\n\tcolor: <%=but_col3%>;\r\n}\r\n#popmechanic-form button:hover {\r\n\tbackground: <%=bg_col2%>;\r\n\tcolor: <%=but_col3%>;\r\n\tborder: 1px solid <%=bg_col2%>;\r\n}\r\n<% } else { %>\r\n#popmechanic-form .popmechanic-buttons {\r\n\tfont-size: 0;\r\n\twidth: 350px;\r\n\tmargin: 19px auto;\r\n}\r\n#popmechanic-form button {\r\n\tpadding: 0;\r\n\tdisplay: inline-block;\r\n\tmargin-right: 10px;\r\n\twidth: 170px;\r\n\theight: 45px;\r\n\tline-height: 43px;\r\n\ttext-align: center;\r\n\tfont-size: 14px;\r\n\tborder: 1px solid <%=but_col1%>;\r\n\tbackground: <%=but_col1%>;\r\n\tcolor: <%=but_col3%>;\r\n}\r\n#popmechanic-form button:hover {\r\n\tbackground: <%=bg_col2%>;\r\n\tcolor: <%=but_col3%>;\r\n\tborder: 1px solid <%=bg_col2%>;\r\n}\r\n#popmechanic-form button:last-child {\r\n\tmargin-right: 0;\r\n}\r\n<% } %>\r\n#popmechanic-form .popmechanic-agree {\r\n\tfont-size: 11px;\r\n\tfont-weight: 100;\r\n\tcolor: <%=agree_col%>;\r\n\tvertical-align: middle;\r\n\tposition: relative;\r\n\tdisplay: inline-block;\r\n\tpadding-left: 22px;\r\n\tmargin-top: 15px;\r\n\tmargin-bottom: 10px;\r\n}\r\n#popmechanic-form .popmechanic-agree br {\r\n\tdisplay: none;\r\n}\r\n#popmechanic-form .popmechanic-agree a {\r\n\tcolor: inherit;\r\n}\r\n#popmechanic-form .popmechanic-agree input {\r\n\tdisplay: none;\r\n}\r\n#popmechanic-form .popmechanic-agree input.popmechanic-invalid + .popmechanic-check {\r\n\tbox-shadow: 0 0 0 1px red;\r\n}\r\n#popmechanic-form .popmechanic-agree .popmechanic-check {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 12px;\r\n\theight: 12px;\r\n\tborder-radius: 0;\r\n\tleft: 0;\r\n\tmargin-right: 10px;\r\n\tbackground: #fff;\r\n\tborder: 3px solid #fff;\r\n\tbox-shadow: 0 0 0 1px #000;\r\n\tcursor: pointer;\r\n}\r\n#popmechanic-form .popmechanic-agree input:checked + .popmechanic-check {\r\n\tbackground: <%=but_col1%>;\r\n}\r\n#popmechanic-form .popmechanic-close {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\ttop: 45px;\r\n\tright: 10px;\r\n\ttext-decoration: none;\r\n\twidth: 15px;\r\n\theight: 15px;\r\n\tline-height: 15px;\r\n\tfont-size: 40px;\r\n\tcursor: pointer;\r\n\tz-index: 11;\r\n\tcolor: <%=but_col1%>;\r\n\tfont-weight: 100;\r\n}\r\n#popmechanic-form .popmechanic-close:hover {\r\n\tcolor: <%=bg_col2%>;\r\n\tcursor: pointer;\r\n}\r\n#popmechanic-form input.popmechanic-invalid {\r\n\tborder-color: #e84e4e;\r\n}\r\n#popmechanic-form .popmechanic-thankyou {\r\n\tdisplay: none;\r\n}\r\n.popmechanic-success #popmechanic-form .popmechanic-main {\r\n\tdisplay: none;\r\n}\r\n.popmechanic-success #popmechanic-form .popmechanic-thankyou {\r\n\tpadding-top: 190px;\r\n\tdisplay: block;\r\n}\r\n.popmechanic-mobile #popmechanic-form {\r\n\twidth: 320px;\r\n\tpadding: 0px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-picture {\r\n\twidth: 320px;\r\n\tmax-height:440px;\r\n\theight: 440px;\r\n\tbackground: url(<%=image%>);\r\n\tbackground-size: cover;\r\n\tbackground-position: 50% 50%;\r\n}\r\n.popmechanic-mobile .popmechanic-success #popmechanic-form .popmechanic-picture {\r\n\twidth: 320px;\r\n\tmax-height:440px;\r\n\tbackground-image: url(<%=thankyouImage%>)\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main, .popmechanic-mobile #popmechanic-form .popmechanic-thankyou {\r\n\twidth: 280px;\r\n\tmax-height:400px;\r\n\tvertical-align: middle;\r\n\tmargin-left: auto;\r\n\tmargin: 20px;\r\n\tmargin-right: auto;\r\n\theight: 390px;\r\n\tmin-height: 390px;\r\n\tbackground: rgba(255, 255, 255, 0.9);\r\n\tpadding: 10px 10px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main .popmechanic-inputs,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-inputs {\r\n\tmargin-top: 6px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main input,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou input {\r\n\twidth: 226px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main .popmechanic-buttons,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-buttons {\r\n\twidth: 226px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main button,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou button {\r\n\twidth: 226px;\r\n\tmargin: 10px auto;\r\n\tdisplay: block;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main .popmechanic-content,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-content {\r\n\tfont-size: 20px;\r\n\tline-height: <%=line_mob%>;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main .popmechanic-content .popmechanic-first-line,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-content .popmechanic-first-line {\r\n\tfont-size: <%=font_sizemob1%>px;\r\n\tline-height: <%=line_mob%>;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main .popmechanic-content .popmechanic-third-line,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-content .popmechanic-third-line {\r\n\tfont-size: <%=font_sizemob3%>px;\r\n\tline-height: <%=line_mob%>;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main .popmechanic-content .popmechanic-second-line,\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-content .popmechanic-second-line {\r\n\tfont-size: <%=font_sizemob2%>px;\r\n\tline-height: <%=line_mob%>;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-legal {\r\n\ttext-align: left;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-agree {\r\n\ttext-align: left;\r\n\tmargin-top: 6px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-agree br {\r\n\tdisplay: inline;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou {\r\n\tpadding-top: 166px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-content {\r\n\tfont-size: 26px;\r\n\tline-height: 33px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-close {\r\n\ttop: 27px;\r\n\tright: 25px;\r\n}", "button": "", "on_show": "", "on_close": "", "embed_code": "", "behaviors": ["post-text", "lead", "partscreen"], "template_type": "popup-subscribe", "need_reset": true, "parameters": [], "on_targeting_ready": "", "on_child_ready": ""}], "button_templates": [], "integrations": [{"id": 45821, "form": 50768, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_server_json", "customer_extended": [{"value": "%email%", "systemName": "email"}], "customer_action_extended": [], "mode": "create", "send_customer": true, "issue_action": true, "operation": "popmechanic-integration-create-50768", "subscriptions": [{"pointOfContact": "Email"}]}, {"id": 88079, "form": 79814, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_server_json", "customer_extended": [{"value": "%email%", "systemName": "email"}], "customer_action_extended": [], "mode": "create", "send_customer": true, "issue_action": true, "operation": "popmechanic-integration-create-79814", "subscriptions": [{"pointOfContact": "Email"}]}, {"id": 43616, "form": 50382, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-50382-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-50382-targeting"}, {"id": 45820, "form": 50768, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-50768-show", "click_operation": "popmechanic-popup-50768-click", "targeting_operation": "popmechanic-popup-50768-targeting"}, {"id": 48352, "form": 53811, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-53811-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-53811-targeting"}, {"id": 53290, "form": 56803, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-56803-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-56803-targeting"}, {"id": 83680, "form": 77046, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-77046-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-77046-targeting"}, {"id": 88080, "form": 79814, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-79814-show", "click_operation": "popmechanic-popup-79814-click", "targeting_operation": "popmechanic-popup-79814-targeting"}, {"id": 94856, "form": 84099, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-84099-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-84099-targeting"}, {"id": 94879, "form": 84111, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-84111-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-84111-targeting"}, {"id": 98182, "form": 86254, "filter": null, "filter_type": null, "account": 35567, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-86254-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-86254-targeting"}], "settings": {"hide_copyright": true, "premium": true}, "frequency": {"minimal_timeout": null, "session": null, "day": null, "week": null, "month": null}, "global_ab_tests": [], "ip": "1.1.1.1", "contacts": [], "geo": null}