1/** 2 * Stellar 3 * Stellar is star rating system helps you rate and like articles on a website and keep track of results. 4 * Exclusively on https://1.envato.market/stellar 5 * 6 * @encoding UTF-8 7 * @version 2.1.6 8 * @copyright (C) 2018 - 2021 Merkulove ( https://merkulov.design/ ). All rights reserved. 9 * @license Envato License https://1.envato.market/KYbje 10 * @contributors Nemirovskiy Vitaliy ([email protected]), Dmitry Merkulov ([email protected]) 11 * @support [email protected] 12 **/ 13!function(){"use strict";document.addEventListener("DOMContentLoaded",(function(){if(document.querySelectorAll(".mdp-stellar-box").length<1)return;const e=document.querySelector(".mdp-stellar-box").id.replace("mdp-stellar-","");let t=1,l=function(){let e=JSON.parse(window.localStorage.getItem("mdpLocalStellarData"));null===e&&(e={},e.guid=o(),window.localStorage.setItem("mdpLocalStellarData",JSON.stringify(e)),window.sessionStorage.setItem("mdpSessionStellarData",JSON.stringify(e)));return e}(),r=window.mdpStellar;void 0!==r.reset_timestamp&&l.timestamp<r.reset_timestamp&&(l={},l.guid=o(),l.timestamp=Math.floor(Date.now()/1e3),window.localStorage.setItem("mdpLocalStellarData",JSON.stringify(l)),window.sessionStorage.setItem("mdpSessionStellarData",JSON.stringify(l)));const a=document.querySelectorAll(".mdp-stellar-box");let s=JSON.parse(window.localStorage.getItem("mdpLocalStellarData")),n=JSON.parse(window.sessionStorage.getItem("mdpSessionStellarData"));function o(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function i(e){if(null!==e.target.closest("i")){const t=e.target.closest("i"),l=t.closest(".mdp-box-icon"),r=l.getElementsByTagName("i"),a=t.getAttribute("data-id");if(r.length>0)for(let e=0;e<a;e++)r[e].classList.add("mdp-box-list-hover");if(t.classList.remove("mdp-stellar-hover"),null!==l.querySelector(".mdp-rating-res")&&(l.querySelector(".mdp-rating-res").innerText=a),null!==l.querySelector(".mdp-stellar-tooltip")){const e=l.querySelector(".mdp-stellar-tooltip"),r=t.getBoundingClientRect(),a=l.getBoundingClientRect();e.classList.add("mdp-stellar-tooltip-show"),e.style.bottom=r.top-a.top+r.height+16+4+"px",e.style.left=r.left-a.left+(r.width-e.getBoundingClientRect().width)/2+"px"}}}function c(e){const t=e.toElement||e.relatedTarget,l=e.target;if(null!==e.target.closest("i")){const t=e.target.closest("i"),l=t.closest(".mdp-box-icon"),r=l.getElementsByTagName("i"),a=t.getAttribute("data-id");if(t.classList.remove("mdp-stellar-hover"),r.length>0)for(let e=0;e<r.length;e++)r[e].classList.remove("mdp-box-list-hover");null!==l.querySelector(".mdp-rating-res")&&(null!==l.querySelector(".mdp-stellar-tooltip")?l.querySelector(".mdp-rating-res").innerText=a:l.querySelector(".mdp-rating-res").innerText=0)}null!==t&&(null!==t.querySelector(".mdp-box-icon")||l.classList.contains("mdp-stellar-tooltip")||"SPAN"===l.tagName)&&null!==document.querySelector(".mdp-stellar-tooltip-show")&&document.querySelector(".mdp-stellar-tooltip-show").classList.remove("mdp-stellar-tooltip-show")}function d(e){const t=new XMLHttpRequest;t.open("POST",r.url+"?action=stellar_page_rating",!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(encodeURI("page_rating=1&stellar_id="+e.stellar_id)),t.onload=function(){if(t.status){if(200!==t.status)console.error("Request error. Returned status of "+t.status);else if(200===t.status){let e=JSON.parse(t.response);if(document.getElementsByClassName("mdp-stellar-results").length>0){const t=document.getElementsByClassName("mdp-stellar-results");for(let l=0;l<t.length;l++)t[l].innerText=e.page_rating}}}else console.warn("Request failed! See below:")}}function g(a){if(null!==a.target.closest("i")){const s=a.target.closest("i"),n=s.closest(".mdp-box-icon"),o=n.getElementsByTagName("i"),i=s.getAttribute("data-id"),c=n.getAttribute("data-rating"),g={stellar_id:e,rating:i,length:r.length,new_stellar:t};if(function(e){const l=new XMLHttpRequest;let a=JSON.parse(window.localStorage.getItem("mdpLocalStellarData"));l.open("POST",r.url+"?action=process_stellar",!0),l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.send(encodeURI("stellar_id="+e.stellar_id+"&rating="+e.rating+"&length="+e.length+"&guid="+a.guid+"&new_stellar="+e.new_stellar)),l.onload=function(){if(l.status){if(2
1300!==l.status)console.error("Request error. Returned status of "+l.status);else if(200===l.status){t=0;let e=JSON.parse(l.response);void 0!==e.message&&console.warn(e.message)}}else console.warn("Request failed! See below:"),console.error(e)}}(g),setTimeout(()=>{d(g)},200),l["rating_"+e]=i,l.timestamp=Math.floor(Date.now()/1e3),l.best_rating=c,window.localStorage.setItem("mdpLocalStellarData",JSON.stringify(l)),window.sessionStorage.setItem("mdpSessionStellarData",JSON.stringify(l)),o.length>0){for(let e=0;e<o.length;e++)o[e].classList.remove("mdp-stellar-active"),o[e].querySelector("div").style.width="0";for(let e=0;e<i;e++)o[e].classList.add("mdp-stellar-active")}n.parentNode.querySelector(".mdp-stellar-your-rating span").innerHTML=i,function(e){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.classList.add("mdp-stellar-bubbles"),t.innerHTML='<g id="grp7" opacity="0" transform="translate(7 6)">\n <circle class="oval1" cx="2" cy="6" r="6"/><circle class="oval2" cx="5" cy="2" r="6"/>\n</g>\n<g id="grp6" opacity="0" transform="translate(0 28)">\n <circle class="oval1" cx="2" cy="7" r="5"/><circle class="oval2" cx="3" cy="2" r="7"/>\n</g>\n<g id="grp3" opacity="0" transform="translate(52 28)">\n <circle class="oval2" cx="2" cy="7" r="6"/><circle class="oval1" cx="4" cy="2" r="6"/>\n</g>\n<g id="grp2" opacity="0" transform="translate(44 6)">\n <circle class="oval2" cx="5" cy="6" r="5"/><circle class="oval1" cx="2" cy="2" r="7"/>\n</g>\n<g id="grp5" opacity="0" transform="translate(14 50)">\n <circle class="oval1" cx="6" cy="5" r="6"/><circle class="oval2" cx="2" cy="2" r="6"/>\n</g>\n<g id="grp4" opacity="0" transform="translate(35 50)">\n <circle class="oval1" cx="6" cy="5" r="5"/><circle class="oval2" cx="2" cy="2" r="7"/>\n</g>\n<g id="grp1" opacity="0" transform="translate(24 0)">\n <circle class="oval1" cx="2" cy="6" r="5"/><circle class="oval2" cx="5" cy="2" r="7"/>\n</g>',"object"==typeof getComputedStyle(e)&&getComputedStyle(e)["font-size"].length>0&&(t.style.top="-"+(getComputedStyle(e).paddingLeft.replace("px","")-1)+"px",t.style.transform="scale("+e.offsetWidth/60+")"),e.appendChild(t),setTimeout((function(){e.classList.add("mdp-stellar-rated"),t.classList.add("mdp-stellar-click")}),50),setTimeout((function(){e.classList.remove("mdp-stellar-rated"),t.remove()}),1e3)}(s),null!==n.querySelector(".mdp-rating-res")&&(n.querySelector(".mdp-rating-res").innerText=i)}}function m(t){if(null===JSON.parse(window.localStorage.getItem("mdpLocalStellarData")))return;let r=JSON.parse(window.localStorage.getItem("mdpLocalStellarData"));const a=t.getElementsByTagName("i").length;let s=0;void 0!==l["rating_"+e]&&(s=a===r.best_rating?l["rating_"+e]:Math.round(l["rating_"+e]/r.best_rating*a)),0!==s&&"off"===t.getAttribute("data-secrecy")&&t.setAttribute("data-rating",s),y(t),null!==t.querySelector(".mdp-rating-res")&&(t.querySelector(".mdp-rating-res").innerText=s)}function u(e){const t=e.querySelector(".mdp-box-icon");t.removeEventListener("mouseout",c),t.addEventListener("mouseout",c);const l=t.getElementsByTagName("i");if(l.length>0)for(let e=0;e<l.length;e++)l[e].removeEventListener("mouseover",i),l[e].addEventListener("mouseover",i),l[e].removeEventListener("click",g),l[e].addEventListener("click",g)}function p(e){const t=e.target.closest(".mdp-box-icon"),l=document.createElement("span");l.classList.add("mdp-stellar-message"),l.innerText=r.limitText,t.appendChild(l),setTimeout((function(){l.remove()}),2e3)}function f(e){const t=e.getAttribute("data-round"),l=e.getAttribute("data-rating");return"up"===t?Math.ceil(l):"no"===t?l:"down"===t?Math.floor(l):void 0}function y(t){if(t.getElementsByTagName("i").length<1)return;const r="on"!==t.getAttribute("data-secrecy"),a=void 0!==l["rating_"+e],s=t.getElementsByTagName("i");for(let e=0;e<s.length;e++){const l=s[e].querySelector("div"),n=f(t)-Math.floor(t.getAttribute("data-rating"));l.style.width=e<f(t)?"100%":"0",0!==n&&e===Math.floor(t.getAttribute("data-rating"))&&(l.style.width=100*n+"%"),r&&!a&&(l.style.width="0")}}function S(l){const r=l.querySelector(".mdp-box-icon");void 0!==s["rating_"+e]?null===n?(r.classList.add("mdp-stellar-unable"),r.addEventListener("click",p)):(t=0,u(l)):u(l)}for(let t=0;t<a.length;t++){const l=a[t];"stars"!==l.getAttribute("data-your-rating")?(y(l),"text"===(x=l).getAttribute("data-your-rating")&&void 0!==s["rating_"+e]&&(x.querySelector(".mdp-stellar-your-rating").
13classList.remove("mdp-hidden"),x.querySelector(".mdp-stellar-your-rating span").innerHTML+=" "+s["rating_"+e]),"on"===r.session?S(l):u(l)):(m(l),"on"===r.session?S(l):u(l))}var x;sessionStorage.setItem("is_reloaded",!0);window.addEventListener("storage",(function(l){if("mdpLocalStellarData"===l.key){let l=JSON.parse(window.localStorage.getItem("mdpLocalStellarData"));for(let e=0;e<l.best_rating;e++)a[0].getElementsByTagName("i")[e].classList.remove("mdp-stellar-active");for(let r=0;r<parseInt(l["rating_"+e]);r++)t=0,a[0].getElementsByTagName("i")[r].classList.add("mdp-stellar-active");const s={stellar_id:e,rating:l["rating_"+e],length:r.length,new_stellar:t};setTimeout(()=>{d(s)},200)}}))}))}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.