{"html":"<div class=\"blox-border-bar-counter\" id=\"{{uc_id}}\">\n\t<div class=\"blox-bar-row progress-new progress-all\" role=\"progressbar\" data-goal=\"{{amount}}\" data-speed=\"{{speed}}\">\n        <div class=\"blox-bar-heading\">\n            <div class=\"blox-bar-title\">{{title|raw}}<\/div>\n            <div class=\"blox-border-bar-percentage progressnew__label\" style=\"color:{{amount_color}};\"><\/div>\n        <\/div>\n        <div class=\"blox-border-bar\" style=\"background-color:{{border_color}};\">\n            <div class=\"blox-border-progress-bar progressnew__bar\" ><\/div>\n        <\/div>\n    <\/div>\n<\/div>","html_item":"<div class=\"blox-bar-row progress-new\" role=\"progressbar\" data-goal=\"{{item.amount}}\" data-speed=\"{{speed}}\">\n    <div class=\"blox-bar-heading\">\n        <div class=\"blox-bar-title\">{{item.title|raw}}<\/div>\n        <div class=\"blox-border-bar-percentage progressnew__label\"><\/div>\n    <\/div>\n    <div class=\"blox-border-bar\" style=\"background-color:{{border_color}};\">\n        <div class=\"blox-border-progress-bar progressnew__bar\" style=\"background-color:{{item.color}};\"><\/div>\n    <\/div>\n<\/div>","css":"\/*border-bar-counter*\/\n\n#{{uc_id}}.blox-border-bar-counter .blox-border-bar{\n  \tborder-top: {{top_border}}px solid {{top_border_color}};\n}\n\n#{{uc_id}} .blox-bar-heading{\n\tdisplay:flex;\n    align-items:center;\n    justify-content:space-between;\n\t} \n\n\n\n#{{uc_id}} .blox-bar-row{\n\tpadding-bottom:10px;\n\t}\n\n#{{uc_id}} .blox-bar-heading{\n\toverflow:hidden;\n\t}\n#{{uc_id}} .blox-border-bar{\n\tdisplay:block;\n\twidth:100%;\n  \toverflow: hidden;\n\t}\n#{{uc_id}} .blox-border-progress-bar{\n\tdisplay:block;\n\twidth: 0;\n\t-webkit-transition: width 0.5s ease;\n       -o-transition: width 0.5s ease;\n          transition: width 0.5s ease;\n\t}\n\n\n#{{uc_id}} .blox-border-progress-bar{\n\tdisplay:block;\n\twidth: 0;\n\t-webkit-transition: width 0.5s ease;\n       -o-transition: width 0.5s ease;\n          transition: width 0.5s ease;\n\t}","js":"jQuery(document).ready(function(){\t\nfunction {{uc_id}}_start(){\n  \n  var objBar = jQuery(\"#{{uc_id}}\");\n  var objProgress = objBar.find(\".progress-all\");\n  var isVisible = isElementInViewport(objBar);\n  var objParentTempalteSwitcher = objBar.parents(\".uc-template-holder\");\n  var isInsideTemplateSwitcher = objParentTempalteSwitcher && objParentTempalteSwitcher.length > 0;\n  var objParentSimplePopup = objBar.parents(\".ue-simple-popup\");\n  var isInsideSimplePopup = objParentSimplePopup && objParentSimplePopup.length > 0;\n  \n  \/**\n  * start function\n  *\/\n  function startBar(){    \n  \tvar waypoints = objBar.waypoint({\n    \thandler: function(direction) {\n            objProgress.asProgress({'namespace': 'progressnew'});\n        \tobjProgress.asProgress('start');\n        },\n        offset: \"100%\"\n     });        \n  }\n  \n  \/**\n  * check if in viewport\n  *\/\n  function isElementInViewport(objElement) {\n\t\t  \n\t\t  var elementTop = objElement.offset().top;\n\t\t  var elementBottom = elementTop + objElement.outerHeight();\n\n\t\t  var viewportTop = jQuery(window).scrollTop();\n\t\t  var viewportBottom = viewportTop + jQuery(window).height();\n\n\t\t  return (elementBottom > viewportTop && elementTop < viewportBottom);\n  } \n  \n  \/**\n  * init for simple popup\n  *\/\n  function initForSimplePopup(){\n    if(isInsideSimplePopup == false)\n      return(false);\n    \n    var objSimplePopupBtn = objParentSimplePopup.find(\".ue-simple-popup-trigger\");\n    \n    objSimplePopupBtn.on(\"click\", function(){\n           var isInited = objBar.data(\"inited\");\n          \tif(isInited == true)\n              return(true);\n                \n           var isVisible = isElementInViewport(objBar);\n           if(isVisible){\n               objBar.data(\"inited\", true);\n              startBar();\n           }   \n    });\n  }\n  \n  \/\/do not init if in Simple Popup, or is not in viewport\n  if(isVisible && isInsideSimplePopup == false || isInsideTemplateSwitcher == true && isInsideSimplePopup == false){\n      startBar();\n  }else{\n  \tjQuery(window).on(\"scroll\",function(){\n        var isInited = objBar.data(\"inited\");\n        if(isInited == true)\n        \treturn(true);\n      \n        if(isInsideSimplePopup == true)\n         return(true);\n            \n        var isVisible = isElementInViewport(objBar);\n        if(isVisible){\n        \tobjBar.data(\"inited\", true);\n            startBar();\n    \t}\n            \n  \t});\n  }\n  \n  initForSimplePopup();\n  \n}if(jQuery(\"#{{uc_id}}\").length) {{uc_id}}_start(); else\n\tjQuery( document ).on( 'elementor\/popup\/show', () => { if(jQuery(\"#{{uc_id}}\").length) {{uc_id}}_start();});\n});"}