Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/landing/metrika/dist/ |
Upload File : |
this.BX=this.BX||{};(function(e,t){"use strict";var i=function(){function e(t){babelHelpers.classCallCheck(this,e);this.sendedLabel=[];if(t===true){return}this.formSelector=".bitrix24forms";this.widgetBlockItemSelector=".landing-b24-widget-button-social-item";this.formBlocks=babelHelpers.toConsumableArray(document.querySelectorAll(this.formSelector));this.siteType=this.getSiteType();this.formsLoaded=[];this.widgetOpened=false;this.widgetBlockHover=false;this.waitForWidget();this.detectAnchor()}babelHelpers.createClass(e,[{key:"getSiteType",value:function e(){var t=document.querySelector('meta[property="Bitrix24SiteType"]');if(t){return t.getAttribute("content")}return null}},{key:"isFormsExists",value:function e(){return this.formBlocks.length>0}},{key:"detectAnchor",value:function e(){var i=this;babelHelpers.toConsumableArray(document.querySelectorAll("a")).map((function(e){var n=t.Dom.attr(e,"href");if(n){n=n.toString()}if(n&&n.indexOf(":")){var a=n.split(":")[0];if(["callto","tel","mailto"].includes(a)){t.Event.bind(e,"click",(function(){i.sendLabel("","addressClick",a)}))}}}))}},{key:"waitForWidget",value:function e(){var i=this;babelHelpers.toConsumableArray(document.querySelectorAll(this.widgetBlockItemSelector)).map((function(e){t.Event.bind(e,"mouseover",(function(){i.widgetBlockHover=true}));t.Event.bind(e,"mouseout",(function(){i.widgetBlockHover=false}));t.Event.bind(e,"click",(function(){babelHelpers.toConsumableArray(e.classList).map((function(e){if(e.indexOf("ui-icon-service-")===0){var t=e.substr("ui-icon-service-".length);i.sendLabel("","olOpenedFromWidget",t)}}))}))}));window.addEventListener("onBitrixLiveChat",(function(e){var t=e.detail,n=t.widget,a=t.widgetHost;n.subscribe({type:BX.LiveChatWidget.SubscriptionType.every,callback:function e(t){if(t.type===BX.LiveChatWidget.SubscriptionType.widgetOpen){if(i.widgetBlockHover){i.sendLabel(a,"chatOpenedFromWidget")}else{i.sendLabel(a,"chatOpened")}}}})}))}},{key:"waitForForms",value:function e(){var i=this;window.addEventListener("b24:form:show:first",(function(e){var t=e.detail.object.identification,n=t.id,a=t.sec,s=t.address;var o=e.detail.object.disabled;i.formsLoaded.push(n+"|"+a);if(o){i.sendLabel(s,"formDisabledLoad",n+"|"+a)}else{i.sendLabel(s,"formSuccessLoad",n+"|"+a)}}));setTimeout((function(){i.formBlocks.map((function(e){var n=t.Dom.attr(e,"data-b24form");if(n&&n.indexOf("|")){var a=n.split("|");if(!i.formsLoaded.includes(a[0]+"|"+a[1])){i.sendLabel(null,"formFailLoad",a[1]?a[0]+"|"+a[1]:a[0])}}}))}),5e3)}},{key:"clearSendedLabel",value:function e(){this.sendedLabel=[]}},{key:"sendLabel",value:function e(t,i,n){if(this.sendedLabel.includes(i+n)){return}if(n&&n.substr(0,1)==="#"){n=n.substr(1)}this.sendedLabel.push(i+n);BX.ajax({url:(t?t:"")+"/bitrix/images/landing/analytics/pixel.gif?action="+i+(n?"&value="+n:"")+(this.siteType?"&siteType="+this.siteType:"")+"&time="+(new Date).getTime()})}},{key:"sendData",value:function i(n){t.Runtime.loadExtension("ui.analytics").then((function(i){var a={tool:e.TOOL_NAME};["category","event","type","c_section","c_sub_section","c_element","status"].forEach((function(e){if(n[e]){a[e]=n[e]}}));if(n.params&&t.Type.isObject(n.params)){var s=1;var o=5;Object.keys(n.params).forEach((function(e){if(s<=o){var i="p"+s++;t.Text.toCamelCase(e);a[i]=t.Text.toCamelCase(e)+"_"+t.Text.toCamelCase(n.params[e])}}));delete a.params}var r=i.sendData;r(a)}))["catch"]((function(e){console.error("Metrika send error",e)}))}}]);return e}();babelHelpers.defineProperty(i,"TOOL_NAME","landing");e.Metrika=i})(this.BX.Landing=this.BX.Landing||{},BX); //# sourceMappingURL=metrika.bundle.map.js