(function () {
  const _0x393c90 = function () {
    let _0x3ab886 = true;
    return function (_0x21c27b, _0x7e82b9) {
      const _0x142601 = _0x3ab886 ? function () {
        if (_0x7e82b9) {
          const _0x168e39 = _0x7e82b9.apply(_0x21c27b, arguments);
          _0x7e82b9 = null;
          return _0x168e39;
        }
      } : function () {};
      _0x3ab886 = false;
      return _0x142601;
    };
  }();
  const _0x251786 = _0x393c90(this, function () {
    return _0x251786.toString().search("(((.+)+)+)+$").toString().constructor(_0x251786).search("(((.+)+)+)+$");
  });
  _0x251786();
  const _0x2a2182 = function () {
    let _0x5c21a0 = true;
    return function (_0x39b816, _0x2737d5) {
      const _0x1a256f = _0x5c21a0 ? function () {
        if (_0x2737d5) {
          const _0x2123ac = _0x2737d5.apply(_0x39b816, arguments);
          _0x2737d5 = null;
          return _0x2123ac;
        }
      } : function () {};
      _0x5c21a0 = false;
      return _0x1a256f;
    };
  }();
  (function () {
    _0x2a2182(this, function () {
      const _0x2a9843 = new RegExp("function *\\( *\\)");
      const _0x337050 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
      const _0x38286b = _0x524f54("init");
      if (!_0x2a9843.test(_0x38286b + 'chain') || !_0x337050.test(_0x38286b + 'input')) {
        _0x38286b('0');
      } else {
        _0x524f54();
      }
    })();
  })();
  const _0x3877eb = function () {
    let _0x1bcee8 = true;
    return function (_0x119ac0, _0x37b77e) {
      const _0x61ddd7 = _0x1bcee8 ? function () {
        if (_0x37b77e) {
          const _0x26f59c = _0x37b77e.apply(_0x119ac0, arguments);
          _0x37b77e = null;
          return _0x26f59c;
        }
      } : function () {};
      _0x1bcee8 = false;
      return _0x61ddd7;
    };
  }();
  const _0x2ca27e = _0x3877eb(this, function () {
    const _0x44c3d8 = function () {
      let _0x2d9afe;
      try {
        _0x2d9afe = Function("return (function() {}.constructor(\"return this\")( ));")();
      } catch (_0x27c70e) {
        _0x2d9afe = window;
      }
      return _0x2d9afe;
    };
    const _0x212677 = _0x44c3d8();
    const _0x3ea34e = _0x212677.console = _0x212677.console || {};
    const _0xcd0951 = ["log", "warn", 'info', "error", "exception", "table", 'trace'];
    for (let _0x564c23 = 0; _0x564c23 < _0xcd0951.length; _0x564c23++) {
      const _0x2339b1 = _0x3877eb.constructor.prototype.bind(_0x3877eb);
      const _0x3c77ed = _0xcd0951[_0x564c23];
      const _0x4b6abd = _0x3ea34e[_0x3c77ed] || _0x2339b1;
      _0x2339b1.__proto__ = _0x3877eb.bind(_0x3877eb);
      _0x2339b1.toString = _0x4b6abd.toString.bind(_0x4b6abd);
      _0x3ea34e[_0x3c77ed] = _0x2339b1;
    }
  });
  _0x2ca27e();
  'use strict';
  console.log("Tu Cac Bu");
  let _0x1a6acb = null;
  let _0x232323 = 0;
  let _0x1304dd = 0;
  const _0x3c8a8f = document.createElement("div");
  _0x3c8a8f.innerHTML = '💬';
  const _0x54cd71 = {
    position: "fixed",
    bottom: "20px",
    right: "20px",
    width: "55px",
    height: "55px",
    borderRadius: "50%",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    fontSize: '24px',
    color: '#fff',
    background: "linear-gradient(135deg,#1877F2,#42A5F5)",
    boxShadow: "0 6px 16px rgba(0,0,0,0.25)",
    cursor: 'pointer',
    zIndex: 0xf423f
  };
  Object.assign(_0x3c8a8f.style, _0x54cd71);
  document.body.appendChild(_0x3c8a8f);
  const _0x494a7e = document.createElement("div");
  _0x494a7e.innerHTML = "\n  <div style=\"position:fixed;top:100px;right:20px;z-index:999999;\n              width:340px;border-radius:12px;overflow:hidden;\n              box-shadow:0 8px 24px rgba(0,0,0,0.25);font-family:sans-serif;\n              background:#fff;display:flex;flex-direction:column;\">\n    \n    <div style=\"background:linear-gradient(135deg,#1877F2,#42A5F5);\n                color:#fff;font-weight:bold;padding:10px 14px;text-align:center;\">\n      Auto Comment Facebook\n    </div>\n    <div\n      fb.com/anhtunguyen17 \n    </div>\n    \n    <div style=\"padding:14px;\">\n      <label>Nội dung (| để random):</label>\n      <textarea id=\"messages\"\n        style=\"width:100%;height:60px;margin:6px 0;padding:8px;\n               border-radius:8px;border:1px solid #ccc;\n               box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);\">Nguyễn Anh Tú ✓|Tu Meomeo✅|Tus Senpaiii</textarea>\n      \n      <label>Tag bạn bè (| để random):</label>\n      <input id=\"tags\" type=\"text\"\n        style=\"width:100%;margin:6px 0;padding:8px;border-radius:8px;\n               border:1px solid #ccc;box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);\"\n        placeholder=\"@Tên1|@Tên2|@Tên3\">\n      \n      <label>Delay Random (giây):</label>\n      <div style=\"display:flex;gap:8px;margin:6px 0;\">\n        <input id=\"delayMin\" type=\"number\" value=\"90\"\n          style=\"flex:1;padding:8px;border-radius:8px;border:1px solid #ccc;\">\n        <input id=\"delayMax\" type=\"number\" value=\"180\"\n          style=\"flex:1;padding:8px;border-radius:8px;border:1px solid #ccc;\">\n      </div>\n\n      <label>Số lượng comment (0 = vô hạn):</label>\n      <input id=\"maxComments\" type=\"number\" value=\"0\"\n        style=\"width:100%;margin:6px 0;padding:8px;border-radius:8px;\n               border:1px solid #ccc;box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);\">\n      \n      <div style=\"margin-top:12px;text-align:center;\">\n        <button id=\"startBtn\"\n          style=\"background:#1877F2;color:#fff;border:none;padding:8px 16px;\n                 border-radius:8px;cursor:pointer;font-weight:bold;\n                 box-shadow:0 2px 6px rgba(0,0,0,0.2);\">▶️ Start</button>\n        <button id=\"stopBtn\"\n          style=\"background:#E53935;color:#fff;border:none;padding:8px 16px;\n                 border-radius:8px;cursor:pointer;font-weight:bold;margin-left:8px;\n                 box-shadow:0 2px 6px rgba(0,0,0,0.2);\">⏹ Stop</button>\n                 <button id=\"stopBtn\"\n          <label>Make By</label> \n          <label>Nguyễn Anh Tú ♡\xA0✓</label> ( Fb anhtunguyen17 )</label>\n      </div>\n      \n      <pre id=\"logBox\"\n        style=\"margin-top:12px;max-height:120px;overflow:auto;\n               font-size:12px;background:#111;color:#0f0;\n               padding:8px;border-radius:8px;font-family:monospace;\">\n      </pre>\n    </div>\n  </div>";
  document.body.appendChild(_0x494a7e);
  _0x494a7e.style.display = "none";
  _0x3c8a8f.onclick = () => {
    _0x494a7e.style.display = _0x494a7e.style.display === "none" ? "block" : "none";
  };
  const _0x39518e = document.getElementById("logBox");
  function _0x16d904(_0x18348b) {
    console.log(_0x18348b);
    _0x39518e.innerHTML += '[' + new Date().toLocaleTimeString() + "] " + _0x18348b + "\n";
    _0x39518e.scrollTop = _0x39518e.scrollHeight;
  }
  async function _0x4709eb() {
    if (_0x1304dd > 0 && _0x232323 >= _0x1304dd) {
      _0x16d904("⏹ Đã đủ số lượng, dừng lại.");
      _0x3beac6();
      return;
    }
    let _0x3061b9 = document.querySelector("div[contenteditable=\"true\"][role=\"textbox\"]");
    if (!_0x3061b9) {
      _0x16d904("❌ Không tìm thấy ô comment! Hãy mở sẵn trước.");
      return;
    }
    let _0x3d55eb = document.getElementById("messages").value.split('|').map(_0x2bd640 => _0x2bd640.trim()).filter(_0x1560fe => _0x1560fe);
    let _0x3aabc1 = _0x3d55eb[Math.floor(Math.random() * _0x3d55eb.length)];
    let _0x21aba6 = document.getElementById("tags").value.trim();
    let _0x296eba = '';
    if (_0x21aba6 && Math.random() < 0.7) {
      let _0x5d0614 = _0x21aba6.split('|').map(_0x3d2e8c => _0x3d2e8c.trim()).filter(_0x24b9c5 => _0x24b9c5);
      _0x296eba = " " + _0x5d0614[Math.floor(Math.random() * _0x5d0614.length)];
    }
    let _0x41a8a5 = " [" + Math.floor(Math.random() * 1000) + ']';
    let _0x9518b4 = _0x3aabc1 + _0x296eba + _0x41a8a5;
    _0x3061b9.focus();
    document.execCommand("selectAll", false, null);
    document.execCommand('delete', false, null);
    document.execCommand("insertText", false, _0x9518b4);
    await new Promise(_0x2b0cc5 => setTimeout(_0x2b0cc5, 1000));
    _0x3061b9.dispatchEvent(new KeyboardEvent("keydown", {
      'key': "Enter",
      'code': "Enter",
      'bubbles': true
    }));
    _0x232323++;
    _0x16d904("✅ Đã comment (" + _0x232323 + '/' + (_0x1304dd || '∞') + "): " + _0x9518b4);
    let _0x4a4059 = parseInt(document.getElementById("delayMin").value) || 90;
    let _0x52099b = parseInt(document.getElementById('delayMax').value) || 180;
    let _0x5edf48 = Math.floor(Math.random() * (_0x52099b - _0x4a4059 + 1)) + _0x4a4059;
    _0x16d904("⏳ Chờ " + _0x5edf48 + 's...');
    clearTimeout(_0x1a6acb);
    _0x1a6acb = setTimeout(_0x4709eb, _0x5edf48 * 1000);
  }
  function _0x2dd630() {
    if (_0x1a6acb) {
      clearTimeout(_0x1a6acb);
    }
    _0x232323 = 0;
    _0x1304dd = parseInt(document.getElementById("maxComments").value) || 0;
    _0x16d904("▶️ Auto bật! Sẽ chạy " + (_0x1304dd > 0 ? _0x1304dd + " lần" : "vô hạn"));
    _0x4709eb();
  }
  function _0x3beac6() {
    if (_0x1a6acb) {
      clearTimeout(_0x1a6acb);
    }
    _0x16d904("⏹ Auto tắt!");
  }
  document.getElementById("startBtn").addEventListener("click", _0x2dd630);
  document.getElementById("stopBtn").addEventListener("click", _0x3beac6);
})();
function _0x524f54(_0x195877) {
  function _0x28666c(_0x165b57) {
    if (typeof _0x165b57 === "string") {
      return function (_0x1b0a69) {}.constructor("while (true) {}").apply("counter");
    } else if (('' + _0x165b57 / _0x165b57).length !== 1 || _0x165b57 % 20 === 0) {
      (function () {
        return true;
      }).constructor("debugger").call('action');
    } else {
      (function () {
        return false;
      }).constructor("debugger").apply("stateObject");
    }
    _0x28666c(++_0x165b57);
  }
  try {
    if (_0x195877) {
      return _0x28666c;
    } else {
      _0x28666c(0);
    }
  } catch (_0x3450d3) {}
}