function getRotationDegrees(t) {
var e = t.css("-webkit-transform") || t.css("-moz-transform") || t.css("-ms-transform") || t.css("-o-transform") || t.css("transform");
if ("none" !== e) var n = e.split("(")[1].split(")")[0].split(","),
o = n[0],
i = n[1],
s = Math.round(Math.atan2(i, o) * (180 / Math.PI));
else var s = 0;
return 0 > s ? s + 360 : s
}
function share_telegram(t) {
window.open("https://telegram.me/share/url?url=" + t)
}
function open_function(code) {
dir = getRotationDegrees($("#function_opener_" + code)) ? 0 : 180;
$("#functions_" + code).slideToggle(), $("#function_opener_" + code).rotate(dir)
//dir = 180 == (dir = getRotationDegrees($("#function_opener_" + t))) ? 0 : 180, $("#functions_" + t).slideToggle(), $("#function_opener_" + t).rotate(dir)
}
function toast(t, e) {
null == e && (e = 4e3), M.toast({html: t})
}
function getSelectValues(t) {
for (var e, n = [], o = t && t.options, i = 0, s = o.length; s > i; i++)(e = o[i]).selected && n.push(e.value || e.text);
return n
}
function checkCodeMeli(t) {
var e = t.length;
if (8 > e || 0 == parseInt(t, 10) || 0 == parseInt((t = ("0000" + t).substr(e + 4 - 10)).substr(3, 6), 10)) return !1;
for (var n = parseInt(t.substr(9, 1), 10), o = 0, i = 0; 9 > i; i++) o += parseInt(t.substr(i, 1), 10) * (10 - i);
return 2 > (o %= 11) && n == o || o >= 2 && n == 11 - o
}
function goFullscreen() {
try {
(mf = document.getElementById("main_frame")).webkitRequestFullscreen(), mf.style.display = "", document.getElementById("starter").style.display = "none", document.getElementById("warning").style.display = "none"
} catch (t) {
msg("\u062E\u0637\u0627", "\u0645\u062A\u0627\u0633\u0641\u0627\u0646\u0647 \u0645\u0631\u0648\u0631\u06AF\u0631 \u0634\u0645\u0627 \u0627\u0632 \u0627\u0645\u06A9\u0627\u0646 \u062A\u0645\u0627\u0645 \u0635\u0641\u062D\u0647 \u0634\u062F\u0646 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC \u06A9\u0646\u062F
\u062C\u0647\u062A \u0634\u0631\u0648\u0639 \u0622\u0632\u0645\u0648\u0646 \u0628\u0647 \u0631\u0648\u0634 \u0645\u0639\u0645\u0648\u0644 \u0631\u0648\u06CC \u062F\u06A9\u0645\u0647 \u0627\u062F\u0627\u0645\u0647 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F", "")
}
}
function validatePhone(t) {
return /^\d{11}$/.test(t)
}
function validateEmail(t) {
return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)
}
function fullscreenChanged() {
null == document.webkitFullscreenElement && ((mf = document.getElementById("main_frame")).style.display = "none", document.getElementById("warning").style.display = "", alert($("#result").val()))
}
function foot(t, e, n) {
$msg = $("#modal2"), "" == t ? $msg.find("#footer_title").hide() : $msg.find("#footer_title").show(), "" == e ? ($msg.find("#footer_body").hide(), $msg.css("max-height", "80%"), $msg.css("min-height", "112px"), $msg.css("height", "auto")) : ($msg.find("#footer_body").show(), $msg.css("max-height", "80%"), $msg.css("min-height", "112px"), $msg.css("height", "80%")), $msg.find("#footer_title").html(t), $msg.find("#footer_content").html(e), null == n ? $msg.find("#btn").html("") : "" == n ? $msg.find("#footer_btns").html('