File: /home/swifizcd/julnohub.com.ng/wp-content/plugins/cleantalk-spam-protect/js/public-3-trp.min.js.map
{"version":3,"file":"public-3-trp.min.js","sources":["public-3-trp.js"],"sourcesContent":["document.addEventListener('DOMContentLoaded', function() {\n let ctTrpLocalize = undefined;\n let ctTrpIsAdminCommentsList = false;\n\n if ( typeof ctPublic !== 'undefined' || typeof ctTrpAdminLocalize !== 'undefined' ) {\n if ( typeof ctPublic !== 'undefined' && ctPublic.theRealPerson ) {\n ctTrpLocalize = ctPublic.theRealPerson;\n }\n if (\n typeof ctTrpLocalize === 'undefined' &&\n typeof ctTrpAdminLocalize !== 'undefined' &&\n ctTrpAdminLocalize.theRealPerson\n ) {\n ctTrpLocalize = ctTrpAdminLocalize.theRealPerson;\n ctTrpIsAdminCommentsList = true;\n }\n }\n\n if ( ! ctTrpLocalize ) {\n return;\n }\n\n // Selectors. Try to handle the WIDE range of themes.\n let themesCommentsSelector = '.apbct-trp > .comment-body *[class*=\"comment-author\"]';\n // For Twenty Twenty-Five theme\n let twentyTwentyFiveCommentsSelector = '.apbct-trp > .wp-block-group *[class*=\"comment-author\"]';\n if ( document.querySelector('.apbct-trp .comment-author .comment-author-link') ) {\n // For Spacious theme\n themesCommentsSelector = '.apbct-trp *[class*=\"comment-author-link\"]';\n }\n let woocommerceReviewsSelector = '.apbct-trp *[class*=\"review__author\"]';\n let adminCommentsListSelector = '.apbct-trp td[class*=\"column-author\"] > strong';\n const trpComments = document.querySelectorAll(\n themesCommentsSelector + ',' +\n twentyTwentyFiveCommentsSelector + ',' +\n woocommerceReviewsSelector + ',' +\n adminCommentsListSelector);\n\n if ( trpComments.length === 0 ) {\n return;\n }\n\n trpComments.forEach(( element, index ) => {\n // Exceptions for items that are included in the selection\n if (\n element.className.indexOf('review') < 0 &&\n typeof pagenow == 'undefined' &&\n element.parentElement.className.indexOf('group') < 0 &&\n element.tagName != 'DIV'\n ) {\n return;\n }\n\n // Do not add a badge if there is one inside the element .comment-metadata\n if (element.querySelector('.comment-metadata')) return;\n\n let trpLayout = document.createElement('div');\n trpLayout.setAttribute('class', 'apbct-real-user-badge');\n\n let trpImage = document.createElement('img');\n trpImage.setAttribute('src', ctTrpLocalize.imgPersonUrl);\n trpImage.setAttribute('class', 'apbct-real-user-popup-img');\n\n let trpDescription = document.createElement('div');\n trpDescription.setAttribute('class', 'apbct-real-user-popup');\n\n let trpDescriptionHeading = document.createElement('strong');\n trpDescriptionHeading.append(ctTrpLocalize.phrases.trpHeading);\n\n let trpDescriptionContent = document.createElement('div');\n trpDescriptionContent.setAttribute('class', 'apbct-real-user-popup-content_row');\n trpDescriptionContent.setAttribute('style', 'white-space: nowrap');\n\n let trpDescriptionContentFirstLine = document.createElement('div');\n trpDescriptionContentFirstLine.append(trpDescriptionHeading);\n trpDescriptionContentFirstLine.append(' ');\n trpDescriptionContentFirstLine.append(ctTrpLocalize.phrases.trpContent1);\n\n let trpDescriptionContentSecondLine = document.createElement('div');\n trpDescriptionContentSecondLine.style.display = 'flex';\n trpDescriptionContentSecondLine.style.gap = '5px';\n let trpDescriptionContentSecondLineTxt = document.createElement('div');\n trpDescriptionContentSecondLineTxt.append(ctTrpLocalize.phrases.trpContent2);\n trpDescriptionContentSecondLine.append(trpDescriptionContentSecondLineTxt);\n\n if (ctTrpIsAdminCommentsList) {\n let learnMoreLinkWrap = document.createElement('div');\n let learnMoreLink = document.createElement('a');\n learnMoreLink.setAttribute('href', ctTrpLocalize.trpContentLink);\n learnMoreLink.setAttribute('target', '_blank');\n let learnMoreLinkImg = document.createElement('img');\n learnMoreLinkImg.setAttribute('src', ctAdminCommon.new_window_gif);\n learnMoreLinkImg.setAttribute('alt', 'New window');\n learnMoreLinkImg.setAttribute('style', 'padding-top:3px');\n learnMoreLink.append(learnMoreLinkImg);\n learnMoreLinkWrap.append(learnMoreLink);\n trpDescriptionContentSecondLine.append(learnMoreLinkWrap);\n }\n\n trpDescriptionContent.append(trpDescriptionContentFirstLine, trpDescriptionContentSecondLine);\n\n trpDescription.append(trpDescriptionContent);\n trpLayout.append(trpImage);\n element.append(trpLayout);\n element.append(trpDescription);\n });\n\n const badges = document.querySelectorAll('.apbct-real-user-badge');\n\n badges.forEach((badge) => {\n let hideTimeout = undefined;\n\n this.body.addEventListener('click', function(e) {\n if (\n e.target.className.indexOf('apbct-real-user') == -1 &&\n e.target.parentElement.className.indexOf('apbct-real-user') == -1\n ) {\n closeAllPopupTRP();\n }\n });\n\n badge.addEventListener('click', function() {\n const popup = this.nextElementSibling;\n if (popup && popup.classList.contains('apbct-real-user-popup')) {\n popup.classList.toggle('visible');\n }\n });\n\n badge.addEventListener('mouseenter', function() {\n closeAllPopupTRP();\n const popup = this.nextElementSibling;\n if (popup && popup.classList.contains('apbct-real-user-popup')) {\n popup.classList.add('visible');\n }\n });\n\n badge.addEventListener('mouseleave', function() {\n hideTimeout = setTimeout(() => {\n const popup = this.nextElementSibling;\n if (popup && popup.classList.contains('apbct-real-user-popup')) {\n popup.classList.remove('visible');\n }\n }, 1000);\n });\n\n const popup = badge.nextElementSibling;\n popup.addEventListener('mouseenter', function() {\n clearTimeout(hideTimeout);\n popup.classList.add('visible');\n });\n\n popup.addEventListener('mouseleave', function() {\n hideTimeout = setTimeout(() => {\n if (popup.classList.contains('apbct-real-user-popup')) {\n popup.classList.remove('visible');\n }\n }, 1000);\n });\n\n // For mobile devices\n badge.addEventListener('touchend', function() {\n hideTimeout = setTimeout(() => {\n const popup = this.nextElementSibling;\n const selection = window.getSelection();\n // Check if no text is selected\n if (popup && selection && popup.classList.contains('apbct-real-user-popup') &&\n selection.toString().length === 0\n ) {\n popup.classList.remove('visible');\n } else {\n clearTimeout(hideTimeout);\n document.addEventListener('selectionchange', function onSelectionChange() {\n const selection = window.getSelection();\n if (selection && selection.toString().length === 0) {\n // Restart the hide timeout when selection is cleared\n hideTimeout = setTimeout(() => {\n const popup = badge.nextElementSibling;\n if (popup && popup.classList.contains('apbct-real-user-popup')) {\n popup.classList.remove('visible');\n }\n }, 3000);\n document.removeEventListener('selectionchange', onSelectionChange);\n }\n });\n }\n }, 3000);\n });\n });\n});\n\n/**\n * Closing all TRP popup\n */\nfunction closeAllPopupTRP() {\n let allDisplayPopup = document.querySelectorAll('.apbct-real-user-popup.visible');\n if (allDisplayPopup.length > 0) {\n allDisplayPopup.forEach((element) => {\n element.classList.remove('visible');\n });\n }\n}\n"],"names":["closeAllPopupTRP","let","allDisplayPopup","document","querySelectorAll","length","forEach","element","classList","remove","addEventListener","ctTrpLocalize","undefined","ctTrpIsAdminCommentsList","ctPublic","ctTrpAdminLocalize","theRealPerson","themesCommentsSelector","querySelector","trpComments","index","trpLayout","trpImage","trpDescription","trpDescriptionContent","trpDescriptionContentFirstLine","trpDescriptionContentSecondLine","learnMoreLinkWrap","learnMoreLink","learnMoreLinkImg","className","indexOf","pagenow","parentElement","tagName","createElement","setAttribute","imgPersonUrl","trpDescriptionHeading","append","phrases","trpHeading","trpContent1","style","display","gap","trpDescriptionContentSecondLineTxt","trpContent2","trpContentLink","ctAdminCommon","new_window_gif","hideTimeout","popup","this","body","e","target","badge","nextElementSibling","contains","toggle","add","setTimeout","clearTimeout","selection","window","getSelection","toString","onSelectionChange","removeEventListener"],"mappings":"AAiMA,SAASA,mBACLC,IAAIC,EAAkBC,SAASC,iBAAiB,gCAAgC,EACnD,EAAzBF,EAAgBG,QAChBH,EAAgBI,QAAQ,IACpBC,EAAQC,UAAUC,OAAO,SAAS,CACtC,CAAC,CAET,CAxMAN,SAASO,iBAAiB,mBAAoB,WAC1CT,IAAIU,EAAgBC,KAAAA,EAChBC,EAA2B,CAAA,EAgB/B,GAdyB,aAApB,OAAOC,UAA0D,aAA9B,OAAOC,oBAKd,KAAA,KAHzBJ,EADqB,aAApB,OAAOG,UAA4BA,SAASE,cAC7BF,SAASE,cAGlBL,IACuB,aAA9B,OAAOI,oBACPA,mBAAmBC,gBAEnBL,EAAgBI,mBAAmBC,cACnCH,EAA2B,CAAA,GAI5BF,EAAP,CAKAV,IAAIgB,EAAyB,wDA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