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/vote/analytics/dist/ |
Upload File : |
this.BX=this.BX||{};(function(t,e,o){"use strict";const s=Object.freeze({publishPoll:"publish_poll",finishPoll:"finish_poll",vote:"vote",cancelVote:"cancel_vote",copyPollLink:"copy_poll_link",setOptions:"set_options",isMultipleChoice:"is_multiple_choice",setCancelVote:"set_cancel_vote",setTimeLimit:"set_time_limit",downloadResult:"download_result"});const l=Object.freeze({pollSettings:"poll_settings",polls:"polls"});const n=async(t,o)=>{try{const{Analytics:s}=await e.Runtime.loadExtension("im.v2.lib.analytics");const l=s.getInstance();const n=l.vote.getAnalyticsOptions(t);n.p3=`pollId_${o}`;return n}catch(t){console.error(t);return null}};const i=(t,e)=>{const{searchParams:l}=new URL(document.location.href);const n={tool:l.get("st[tool]"),event:s.publishPoll,type:t?"anonymous":"public",category:l.get("st[category]"),p1:l.get("st[p1]"),p2:l.get("st[p2]"),p3:`pollId_${e}`,p5:l.get("st[p5]")};if(l.has("st[p4]")){n.p4=l.get("st[p4]")}o.sendData(n)};const c=async(t,e,l,i)=>{const c=await n(t,e);if(!c){return}c.event=l;if(l===s.finishPoll){o.sendData({...c,type:i});return}const{p4:a,p5:p,...r}=c;if(i){r.type=i}o.sendData(r)};const a=t=>{const e={tool:"im",event:s.downloadResult,category:l.polls,p3:`pollId_${t}`};o.sendData(e)};const p=(t,e,n)=>{let i="";switch(e){case s.isMultipleChoice:i=t?"Y":"N";break;case s.setCancelVote:i=t?"Y":"N";break;case s.setTimeLimit:i=t?"limited":"";break;case s.setOptions:i=t>2?"multiple":"two";break;default:break}const c={tool:"im",category:l.pollSettings,event:e,type:i,p3:`pollId_${n}`};o.sendData(c)};const r={publishVote:i,downloadResult:a,setupVote:p,vote:(t,e)=>{c(t,e,s.vote)},revokeVote:(t,e)=>{c(t,e,s.cancelVote)},completeVote:(t,e)=>{c(t,e,s.finishPoll,"user")},copyLink:(t,e,o)=>{c(t,e,s.copyPollLink,o)}};t.VoteAnalytics=r;t.AnalyticsEvents=s})(this.BX.Vote=this.BX.Vote||{},BX,BX.UI.Analytics); //# sourceMappingURL=analytics.bundle.map.js