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('
') : $msg.find("#footer_btns").html(n), $("#modal2").modal("open") } function verify(t, e, n, o) { null == o && (o = "javascript:MeDroidJD.close_msg();"), MeDroidJS.msg(t, e, "") } function go3(t) { window.open("./main2.php?action=" + t, "_blank", "fullscreen=yes,height=768,resizable=no,titlebar=no,toolbar=no,left=0,top=0,menubar=no") } function go4(t) { window.location = "./main2.php?action=" + t } function wait1(t) { msg("", t==null?"در حال پردازش اطلاعات":t, ""); } function guide(t) { msg("\u0631\u0627\u0647\u0646\u0645\u0627\u06CC \u0633\u0627\u0645\u0627\u0646\u0647", "\u0631\u0627\u0647\u0646\u0645\u0627 \u0628\u0627 \u06A9\u062F " + t) } String.prototype.toPersianDigit = function(a) { return this.replace(/\d+/g, function(e) { for (var b = [], f = [], c = 0; c < e.length; c++) b.push(e.charCodeAt(c)); for (var d = 0; d < b.length; d++) f.push(String.fromCharCode(b[d] + (a && 1 == a ? 1584 : 1728))); return f.join("") }) }, String.prototype.toEnglishDigit = function(a) { var b = { "\u06F0": "0", "\u06F1": "1", "\u06F2": "2", "\u06F3": "3", "\u06F4": "4", "\u06F5": "5", "\u06F6": "6", "\u06F7": "7", "\u06F8": "8", "\u06F9": "9", "\u0660": "0", "\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9" }; return (a1 = this.replace(/[٠-٩]/g, function(a) { return b[a] })).replace(/[۰-۹]/g, function(a) { return b[a] }) }, window.goBack = function(a) { var c = "http://www.mysite.com", b = window.location.hash; return history.back(), window.location.hash !== b || "string" == typeof document.referrer && "" !== document.referrer || window.setTimeout(function() { window.location.href = c }, 1e3), a && (a.preventDefault && a.preventDefault(), a.preventPropagation && a.preventPropagation()), !1 }