');\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": 2018, "html": "
", "css": "@import url(\"https://fonts.googleapis.com/css?family=Merriweather:100,200,300,400,700,900|Roboto:100,200,300,400,700,900&display=swap&subset=cyrillic\");\r\n@import url(\"https://fonts.googleapis.com/css?family=Merriweather:400,700|Open+Sans:100,200,300,400,700,900&subset=cyrillic\");\r\n\r\n#popmechanic-form {\r\n \r\n <% if (parseInt(use_custom_font)) { %> \r\n font-family: <%=custom_font%>; \r\n<% } else { %> \r\n font-family:<%=form_font%>; \r\n <% } %>\r\n \r\n width: <%=form_width%>px;\r\n height: <%=form_height%>px;\r\n \r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n position: relative;\r\n border-radius: <%=form_border_radius%>px;\r\n line-height: <%=form_line_height%>;\r\n <%if(parseInt(show_form_bg)) {%>\r\n background: url(<%=form_bg_img%>);\r\n background-repeat: no-repeat;\r\n background-size: cover;\r\n <% } else {%>\r\n background-color: <%=form_bg_color%>;\r\n <% } %>\r\n}\r\n\r\n#popmechanic-form .popmechanic-content {\r\n text-align: center;\r\n padding-top: <%=pad_top%>px;\r\n padding-bottom: <%=pad_bottom%>px;\r\n padding-left: <%=pad_left%>px;\r\n padding-right: <%=pad_right%>px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-main {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-orient: vertical;\r\n -webkit-box-direction: normal;\r\n -ms-flex-direction: column;\r\n flex-direction: column;\r\n height: 100%;\r\n}\r\n\r\n#popmechanic-form .popmechanic-thankyou {\r\n display: none;\r\n}\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-thankyou {\r\n display: block;\r\n}\r\n.popmechanic-success #popmechanic-form .popmechanic-main {\r\n display: none;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form {\r\n width: <%=form_width_mob%>px;\r\n height: <%=form_height_mob%>px;\r\n line-height: <%=form_line_height_mob%>;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-content {\r\n padding-top: <%=pad_top_mob%>px;\r\n padding-bottom: <%=pad_bottom_mob%>px;\r\n padding-left: <%=pad_left_mob%>px;\r\n padding-right: <%=pad_right_mob%>px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-image {\r\n background-position: center center;\r\n background-size: cover;\r\n top: <%=img_top_top%>px;\r\n left: <%=img_top_left%>px;\r\n position: relative;\r\n width: <%=img_top_width%>px;\r\n height: <%=img_top_height%>px;\r\n min-height: <%=img_top_height%>px;\r\n border-top-left-radius: <%=form_border_radius%>px;\r\n border-top-right-radius: <%=form_border_radius%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-image {\r\n top: <%=img_top_top_mob%>px;\r\n left: <%=img_top_left_mob%>px;\r\n width: <%=img_top_width_mob%>px;\r\n height: <%=img_top_height_mob%>px;\r\n min-height: <%=img_top_height_mob%>px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-close {\r\n color: <%=close_color%>;\r\n cursor: pointer;\r\n text-align: center;\r\n right: 7px;\r\n top: 7px;\r\n position: absolute;\r\n background-color: transparent;\r\n font-weight: 300;\r\n line-height: 30px;\r\n width: 30px;\r\n height: 30px;\r\n font-size: 45px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-close {\r\n top: 4px;\r\n right: 4px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-title {\r\n font-size: <%=title_fontsize%>px;\r\n margin-bottom: 18px;\r\n color: <%=title_color%>;\r\n font-weight: 300;\r\n}\r\n\r\n#popmechanic-form .popmechanic-title b {\r\n font-weight: 900;\r\n}\r\n\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-title {\r\n font-size: <%=thanks_title_fontsize%>px;\r\n margin-top: 50px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-post-title {\r\n font-size: <%=thanks_post_title_fontsize%>px;\r\n font-weight: 300;\r\n margin-bottom: 60px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-title {\r\n font-size: <%=title_fontsize_mob%>px;\r\n margin-bottom: 14px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-title {\r\n font-size: <%=thanks_title_fontsize_mob%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-post-title {\r\n font-size: <%=thanks_post_title_fontsize_mob%>px;\r\n margin-bottom: 30px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-orient: vertical;\r\n -webkit-box-direction: normal;\r\n -ms-flex-direction: column;\r\n flex-direction: column;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input {\r\n font-size: <%=inp_fontsize%>px;\r\n background-color: <%=inp_bgcolor%>;\r\n color: <%=inp_color%>;\r\n display: block;\r\n width: <%=inp_width%>px;\r\n font-weight: 300;\r\n text-align: center;\r\n height: <%=inp_height%>px;\r\n margin-bottom: 14px;\r\n outline: none;\r\n border: 1px solid <%=inp_border_color%>;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input::-webkit-input-placeholder {\r\n color: <%=inp_color%>;\r\n font-weight: 300;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input:-ms-input-placeholder {\r\n color: <%=inp_color%>;\r\n font-weight: 300;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input::-ms-input-placeholder {\r\n color: <%=inp_color%>;\r\n font-weight: 300;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input::placeholder {\r\n color: <%=inp_color%>;\r\n font-weight: 300;\r\n}\r\n\r\n#popmechanic-form .popmechanic-invalid {\r\n border-color: red;\r\n}\r\n\r\n#popmechanic-form .popmechanic-close-button {\r\n text-decoration: underline;\r\n font-size: 16px;\r\n color: #8C8686;\r\n font-weight: 400;\r\n cursor: pointer;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-close-button {\r\n font-size: 14px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-input {\r\n width: <%=inp_width_mob%>px;\r\n height: <%=inp_height_mob%>px;\r\n margin-bottom: 10px;\r\n font-size: <%=inp_fontsize_mob%>px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox-block {\r\n display: flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n <%var text_color; if(text_color) {%>\r\n color: <%=text_color%>;\r\n <%} else {%>\r\n color: #646464;\r\n <%}%>\r\n margin-bottom: 14px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox-block span {\r\n text-align: left;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox-block a {\r\n color: inherit;\r\n text-decoration: underline; \r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox-check:before {\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n display: block;\r\n width: 10px;\r\n height: 10px;\r\n background-color: <%=btn_bgcolor%>;\r\n opacity: 0;\r\n -webkit-transition: all .3s;\r\n transition: all .3s;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox-check {\r\n width: 18px;\r\n min-width: 18px;\r\n height: 18px;\r\n <%var inputs_checkbox_color; if(inputs_checkbox_color) {%>\r\n border: 1px solid <%=inputs_checkbox_color%>;\r\n <%} else {%>\r\n border: 1px solid #3C667E;\r\n <%}%>\r\n position: relative;\r\n margin-right: 9px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox {\r\n visibility: hidden;\r\n display: block;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs .popmechanic-checkbox:checked ~ .popmechanic-checkbox-check:before {\r\n opacity: 1; \r\n}\r\n\r\n#popmechanic-form .popmechanic-submit {\r\n display: inline-block;\r\n width: <%=btn_width%>px;\r\n height: <%=btn_height%>px;\r\n background: <%=btn_bgcolor%>;\r\n color: <%=btn_color%>;\r\n font-size: <%=btn_fontsize%>px;\r\n border-radius: <%=btn_border_radius%>px;\r\n font-weight: 700;\r\n line-height: <%=btn_height%>px;\r\n cursor: pointer;\r\n outline: none;\r\n border: none;\r\n text-decoration: none;\r\n -webkit-transition: all .3s;\r\n transition: all .3s;\r\n margin-bottom: 10px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-submit:hover {\r\n color: <%=btn_hover_color%>;\r\n background: <%=btn_hover_bgcolor%>;\r\n}\r\n#popmechanic-form .popmechanic-buttons {\r\n display: flex;\r\n}\r\n#popmechanic-form .popmechanic-buttons .popmechanic-submit {\r\n width: <%=btn_width / 2 - 5%>px;;\r\n}\r\n#popmechanic-form .popmechanic-buttons .popmechanic-submit:not(:last-child) {\r\n margin-right: 10px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-submit {\r\n width: <%=btn_width_mob%>px;\r\n height: <%=btn_height_mob%>px;\r\n font-size: <%=btn_fontsize_mob%>px;\r\n line-height: <%=btn_height_mob%>px;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-buttons {\r\n display: block;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-buttons .popmechanic-submit:not(:last-child) {\r\n margin-right: 0;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy {\r\n margin-top: auto;\r\n padding: 20px 0;\r\n background-color: <%=policy_bgcolor%>;\r\n text-align: center;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n padding-left: <%=pad_left%>px;\r\n padding-right: <%=pad_right%>px;\r\n font-size: <%=policy_fontsize%>px;\r\n font-weight: 300;\r\n text-align: left;\r\n color: <%=policy_color%>;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy a {\r\n color: inherit;\r\n text-decoration: underline;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy label {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -webkit-box-pack: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n -webkit-box-align: center;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy input {\r\n visibility: hidden;\r\n display: block;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy .popmechanic-checkbox-check {\r\n width: 18px;\r\n min-width: 18px;\r\n height: 18px;\r\n border: 1px solid <%=checkbox_border_color%>;\r\n position: relative;\r\n margin-right: 9px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy .popmechanic-checkbox-check::before {\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n display: block;\r\n width: 10px;\r\n height: 10px;\r\n background-color: <%=btn_bgcolor%>;\r\n opacity: 0;\r\n -webkit-transition: all .3s;\r\n transition: all .3s;\r\n}\r\n\r\n#popmechanic-form .popmechanic-policy input:checked ~ .popmechanic-checkbox-check::before {\r\n opacity: 1;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-policy {\r\n font-size: <%=policy_fontsize_mob%>px;\r\n padding: 13px 0;\r\n padding-left: <%=pad_left_mob%>px;\r\n padding-right: <%=pad_right_mob%>px;\r\n}", "button": "", "on_show": "", "on_close": "", "embed_code": "", "behaviors": ["partscreen", "humble", "post-text", "lead"], "template_type": "partscreen-info", "need_reset": true, "parameters": [], "on_targeting_ready": "", "on_child_ready": ""}], "button_templates": [], "integrations": [{"id": 37620, "form": 46157, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_server_json", "customer_extended": [{"value": "%name%", "systemName": "firstName"}, {"value": "%email%", "systemName": "email"}, {"value": "%customs.fields_list.gender%", "systemName": "sex"}], "customer_action_extended": [], "mode": "create", "send_customer": true, "issue_action": true, "operation": "popmechanic-integration-create-46157", "subscriptions": [{"pointOfContact": "Email"}]}, {"id": 15028, "form": 19253, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-19253-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-19253-targeting"}, {"id": 15029, "form": 19254, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-19254-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-19254-targeting"}, {"id": 15030, "form": 17058, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17058-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17058-targeting"}, {"id": 15031, "form": 17059, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17059-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17059-targeting"}, {"id": 15032, "form": 17060, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17060-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17060-targeting"}, {"id": 15033, "form": 17062, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17062-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17062-targeting"}, {"id": 15034, "form": 17063, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17063-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17063-targeting"}, {"id": 15035, "form": 17064, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17064-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17064-targeting"}, {"id": 15036, "form": 17065, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17065-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17065-targeting"}, {"id": 15037, "form": 17061, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-17061-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-17061-targeting"}, {"id": 16465, "form": 29889, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-29889-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-29889-targeting"}, {"id": 16466, "form": 29890, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-29890-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-29890-targeting"}, {"id": 37619, "form": 46157, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-46157-show", "click_operation": "popmechanic-popup-46157-click", "targeting_operation": "popmechanic-popup-46157-targeting"}, {"id": 57917, "form": 59657, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-59657-show", "click_operation": "popmechanic-popup-59657-click", "targeting_operation": "popmechanic-popup-59657-targeting"}, {"id": 58080, "form": 59775, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-59775-show", "click_operation": "popmechanic-popup-59775-click", "targeting_operation": "popmechanic-popup-59775-targeting"}, {"id": 58081, "form": 59776, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-59776-show", "click_operation": "popmechanic-popup-59776-click", "targeting_operation": "popmechanic-popup-59776-targeting"}, {"id": 58083, "form": 59778, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-popup-59778-show", "click_operation": "popmechanic-popup-59778-click", "targeting_operation": "popmechanic-popup-59778-targeting"}, {"id": 67934, "form": 66257, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-66257-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-66257-targeting"}, {"id": 67935, "form": 66258, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-66258-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-66258-targeting"}, {"id": 67936, "form": 66259, "filter": null, "filter_type": null, "account": 10631, "integration_type": "mindbox_tracking", "show_operation": "popmechanic-reco-widget-66259-show", "click_operation": null, "targeting_operation": "popmechanic-reco-widget-66259-targeting"}], "settings": {"hide_copyright": true, "premium": true}, "frequency": {"minimal_timeout": null, "session": 1, "day": null, "week": null, "month": null}, "global_ab_tests": [], "ip": "1.1.1.1", "contacts": [], "geo": null}