const h = {
  all: {
    name: "All",
    characters: [
      "€",
      "£",
      "¥",
      "¢",
      "₹",
      "₽",
      "₩",
      "₿",
      "₺",
      "₴",
      "₦",
      "₨",
      "₪",
      "₫",
      "₭",
      "₮",
      "₯",
      "₰",
      "₱",
      "₲",
      "₳",
      "₴",
      "₵",
      "₶",
      "₷",
      "₹",
      "₺",
      "₼",
      "₽",
      "₾",
      "₿",
      '"',
      "'",
      "«",
      "»",
      "„",
      "‟",
      "‹",
      "›",
      "‚",
      "‛",
      "〝",
      "〞",
      "〟",
      "‟",
      "„",
      "©",
      "®",
      "™",
      "°",
      "§",
      "¶",
      "†",
      "‡",
      "•",
      "‣",
      "⁃",
      "‰",
      "‱",
      "′",
      "″",
      "‴",
      "‵",
      "‶",
      "‷",
      "※",
      "‼",
      "‽",
      "‾",
      "‿",
      "⁀",
      "⁁",
      "⁂",
      "⁃",
      "⁇",
      "⁈",
      "⁉",
      "+",
      "-",
      "×",
      "÷",
      "=",
      "≠",
      "≈",
      "≡",
      "≤",
      "≥",
      "<",
      ">",
      "±",
      "∓",
      "∴",
      "∵",
      "∶",
      "∷",
      "∸",
      "∹",
      "∺",
      "∻",
      "∼",
      "∽",
      "∾",
      "∿",
      "≀",
      "≁",
      "≂",
      "≃",
      "≄",
      "≅",
      "≆",
      "≇",
      "≈",
      "≉",
      "≊",
      "≋",
      "≌",
      "≍",
      "≎",
      "≏",
      "≐",
      "≑",
      "≒",
      "≓",
      "≔",
      "≕",
      "≖",
      "≗",
      "≘",
      "≙",
      "≚",
      "≛",
      "≜",
      "≝",
      "≞",
      "≟",
      "≠",
      "≡",
      "≢",
      "≣",
      "≤",
      "≥",
      "≦",
      "≧",
      "≨",
      "≩",
      "≪",
      "≫",
      "≬",
      "≭",
      "≮",
      "≯",
      "≰",
      "≱",
      "≲",
      "≳",
      "≴",
      "≵",
      "≶",
      "≷",
      "≸",
      "≹",
      "≺",
      "≻",
      "≼",
      "≽",
      "≾",
      "≿",
      "À",
      "Á",
      "Â",
      "Ã",
      "Ä",
      "Å",
      "Æ",
      "Ç",
      "È",
      "É",
      "Ê",
      "Ë",
      "Ì",
      "Í",
      "Î",
      "Ï",
      "Ð",
      "Ñ",
      "Ò",
      "Ó",
      "Ô",
      "Õ",
      "Ö",
      "×",
      "Ø",
      "Ù",
      "Ú",
      "Û",
      "Ü",
      "Ý",
      "Þ",
      "ß",
      "à",
      "á",
      "â",
      "ã",
      "ä",
      "å",
      "æ",
      "ç",
      "è",
      "é",
      "ê",
      "ë",
      "ì",
      "í",
      "î",
      "ï",
      "ð",
      "ñ",
      "ò",
      "ó",
      "ô",
      "õ",
      "ö",
      "÷",
      "ø",
      "ù",
      "ú",
      "û",
      "ü",
      "ý",
      "þ",
      "ÿ",
      "¡",
      "¿",
      "‽",
      "‼",
      "⁇",
      "⁈",
      "⁉",
      "※",
      "‾",
      "‿",
      "⁀",
      "⁁",
      "⁂",
      "⁃",
      "←",
      "↑",
      "→",
      "↓",
      "↔",
      "↕",
      "↖",
      "↗",
      "↘",
      "↙",
      "↚",
      "↛",
      "↜",
      "↝",
      "↞",
      "↟",
      "↠",
      "↡",
      "↢",
      "↣",
      "↤",
      "↥",
      "↦",
      "↧",
      "↨",
      "↩",
      "↪",
      "↫",
      "↬",
      "↭",
      "↮",
      "↯",
      "↰",
      "↱",
      "↲",
      "↳",
      "↴",
      "↵",
      "↶",
      "↷",
      "↸",
      "↹",
      "↺",
      "↻",
      "↼",
      "↽",
      "↾",
      "↿",
      "⇀",
      "⇁",
      "⇂",
      "⇃",
      "⇄",
      "⇅",
      "⇆",
      "⇇",
      "⇈",
      "⇉",
      "⇊",
      "⇋",
      "⇌",
      "⇍",
      "⇎",
      "⇏",
      "⇐",
      "⇑",
      "⇒",
      "⇓",
      "⇔",
      "⇕",
      "⇖",
      "⇗",
      "⇘",
      "⇙",
      "⇚",
      "⇛",
      "⇜",
      "⇝",
      "⇞",
      "⇟",
      "⇠",
      "⇡",
      "⇢",
      "⇣",
      "⇤",
      "⇥",
      "⇦",
      "⇧",
      "⇨",
      "⇩",
      "⇪",
      "⇫",
      "⇬",
      "⇭",
      "⇮",
      "⇯",
      "⇰",
      "⇱",
      "⇲",
      "⇳",
      "⇴",
      "⇵",
      "⇶",
      "⇷",
      "⇸",
      "⇹",
      "⇺",
      "⇻",
      "⇼",
      "⇽",
      "⇾",
      "⇿"
    ]
  },
  currency: {
    name: "Currency",
    characters: ["€", "£", "¥", "¢", "₹", "₽", "₩", "₿", "₺", "₴", "₦", "₨", "₪", "₫", "₭", "₮", "₯", "₰", "₱", "₲", "₳", "₵", "₶", "₷", "₼", "₾", "₿"]
  },
  text: {
    name: "Text",
    characters: ["©", "®", "™", "°", "§", "¶", "†", "‡", "•", "‣", "⁃", "‰", "‱", "′", "″", "‴", "‵", "‶", "‷", "※", "‼", "‽", "‾", "‿", "⁀", "⁁", "⁂"]
  },
  quotation: {
    name: "Quotation",
    characters: ['"', "'", "«", "»", "„", "‟", "‹", "›", "‚", "‛", "〝", "〞", "〟"]
  },
  mathematical: {
    name: "Mathematical",
    characters: ["+", "-", "×", "÷", "=", "≠", "≈", "≡", "≤", "≥", "<", ">", "±", "∓", "∴", "∵", "∶", "∷", "∸", "∹", "∺", "∻", "∼", "∽", "∾", "∿", "≀", "≁", "≂", "≃", "≄", "≅", "≆", "≇", "≉", "≊", "≋", "≌", "≍", "≎", "≏", "≐", "≑", "≒", "≓", "≔", "≕", "≖", "≗", "≘", "≙", "≚", "≛", "≜", "≝", "≞", "≟", "≢", "≣", "≦", "≧", "≨", "≩", "≪", "≫", "≬", "≭", "≮", "≯", "≰", "≱", "≲", "≳", "≴", "≵", "≶", "≷", "≸", "≹", "≺", "≻", "≼", "≽", "≾", "≿"]
  },
  "extended-latin": {
    name: "Extended Latin",
    characters: ["À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "Þ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ"]
  },
  symbols: {
    name: "Symbols",
    characters: ["¡", "¿", "‽", "‼", "⁇", "⁈", "⁉", "※", "‾", "‿", "⁀", "⁁", "⁂", "⁃"]
  },
  arrows: {
    name: "Arrows",
    characters: ["←", "↑", "→", "↓", "↔", "↕", "↖", "↗", "↘", "↙", "↚", "↛", "↜", "↝", "↞", "↟", "↠", "↡", "↢", "↣", "↤", "↥", "↦", "↧", "↨", "↩", "↪", "↫", "↬", "↭", "↮", "↯", "↰", "↱", "↲", "↳", "↴", "↵", "↶", "↷", "↸", "↹", "↺", "↻", "↼", "↽", "↾", "↿", "⇀", "⇁", "⇂", "⇃", "⇄", "⇅", "⇆", "⇇", "⇈", "⇉", "⇊", "⇋", "⇌", "⇍", "⇎", "⇏", "⇐", "⇑", "⇒", "⇓", "⇔", "⇕", "⇖", "⇗", "⇘", "⇙", "⇚", "⇛", "⇜", "⇝", "⇞", "⇟", "⇠", "⇡", "⇢", "⇣", "⇤", "⇥", "⇦", "⇧", "⇨", "⇩", "⇪", "⇫", "⇬", "⇭", "⇮", "⇯", "⇰", "⇱", "⇲", "⇳", "⇴", "⇵", "⇶", "⇷", "⇸", "⇹", "⇺", "⇻", "⇼", "⇽", "⇾", "⇿"]
  }
}, f = {
  "€": "euro",
  "£": "pound",
  "¥": "yen",
  "¢": "cent",
  "₹": "rupee",
  "₽": "ruble",
  "₩": "won",
  "₿": "bitcoin",
  '"': "quote",
  "'": "apostrophe",
  "«": "left angle quote",
  "»": "right angle quote",
  "„": "low quote",
  "©": "copyright",
  "®": "registered",
  "™": "trademark",
  "°": "degree",
  "§": "section",
  "¶": "paragraph",
  "†": "dagger",
  "‡": "double dagger",
  "•": "bullet",
  "‰": "per mille",
  "′": "prime",
  "″": "double prime",
  "+": "plus",
  "-": "minus",
  "×": "multiplication",
  "÷": "division",
  "=": "equals",
  "≠": "not equal",
  "≈": "approximately",
  "≡": "identical",
  "≤": "less or equal",
  "≥": "greater or equal",
  "±": "plus minus",
  À: "a grave",
  Á: "a acute",
  Â: "a circumflex",
  Ã: "a tilde",
  Ä: "a diaeresis",
  Ç: "c cedilla",
  "←": "left arrow",
  "↑": "up arrow",
  "→": "right arrow",
  "↓": "down arrow",
  "↔": "left right arrow"
};
let u = !1;
const m = () => {
  if (typeof document == "undefined") return;
  const c = "special-characters-plugin-styles";
  if (document.getElementById(c)) return;
  const a = document.createElement("style");
  a.id = c, a.textContent = `
    .special-characters-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
    }

    .special-characters-dialog {
      background: white;
      border-radius: 8px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
      max-width: 800px;
      width: 90%;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
    }

    .special-characters-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-bottom: 1px solid #e1e5e9;
    }

    .special-characters-header h2 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #1a202c;
    }

    .special-characters-close {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #718096;
      padding: 0;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
    }

    .special-characters-close:hover {
      background-color: #f7fafc;
      color: #2d3748;
    }

    .special-characters-content {
      display: flex;
      flex: 1;
      overflow: hidden;
    }

    .special-characters-main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .special-characters-search {
      padding: 16px 16px 0 16px;
    }

    .special-characters-search-input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #e1e5e9;
      border-radius: 6px;
      font-size: 14px;
      color: #2d3748;
      background-color: #ffffff;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
      box-sizing: border-box;
    }

    .special-characters-search-input:focus {
      outline: none;
      border-color: #4299e1;
      box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    }

    .special-characters-tabs {
      display: flex;
      flex-direction: column;
      width: 180px;
      border-right: 1px solid #e1e5e9;
      background-color: #f8fafc;
    }

    .special-characters-tab {
      padding: 12px 16px;
      border: none;
      background: none;
      text-align: left;
      cursor: pointer;
      font-size: 14px;
      color: #4a5568;
      border-bottom: 1px solid #e1e5e9;
      transition: all 0.2s ease;
    }

    .special-characters-tab:hover {
      background-color: #edf2f7;
      color: #2d3748;
    }

    .special-characters-tab.active {
      background-color: #4299e1;
      color: white;
      font-weight: 500;
    }

    .special-characters-grid {
      padding: 16px;
      overflow-y: auto;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
      gap: 8px;
    }

    .special-characters-item {
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #e1e5e9;
      background: white;
      border-radius: 4px;
      cursor: pointer;
      font-size: 18px;
      transition: all 0.2s ease;
      color: #2d3748;
    }

    .special-characters-item:hover {
      background-color: #4299e1;
      border-color: #4299e1;
      color: white;
      transform: scale(1.05);
    }

    .special-characters-item:active {
      transform: scale(0.95);
    }

    .special-characters-no-results {
      grid-column: 1 / -1;
      text-align: center;
      color: #718096;
      font-size: 14px;
      padding: 40px 20px;
      background-color: #f8fafc;
      border-radius: 6px;
      border: 1px solid #e1e5e9;
    }

    @media (max-width: 768px) {
      .special-characters-dialog {
        width: 95%;
        max-height: 90vh;
      }

      .special-characters-content {
        flex-direction: column;
      }

      .special-characters-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
        flex-direction: row;
        overflow-x: auto;
      }

      .special-characters-tab {
        border-bottom: none;
        border-right: 1px solid #e1e5e9;
        white-space: nowrap;
      }
    }
  `, document.head.appendChild(a);
}, x = (c) => {
  const a = window.getSelection();
  if (a && a.rangeCount > 0) {
    const t = a.getRangeAt(0);
    t.deleteContents();
    const r = document.createTextNode(c);
    t.insertNode(r), t.setStartAfter(r), t.setEndAfter(r), a.removeAllRanges(), a.addRange(t);
  }
}, b = () => {
  if (typeof window == "undefined" || u) return;
  u = !0, m();
  let c = "all", a = "";
  const t = document.createElement("div");
  t.className = "special-characters-overlay";
  const r = document.createElement("div");
  r.className = "special-characters-dialog";
  const l = () => {
    const o = h[c].characters.filter((e) => {
      if (!a.trim()) return !0;
      const s = a.toLowerCase();
      return e.toLowerCase().includes(s) || (f[e] || "").toLowerCase().includes(s);
    });
    r.innerHTML = `
      <div class="special-characters-header">
        <h2>Insert Special Characters</h2>
        <button class="special-characters-close">×</button>
      </div>
      <div class="special-characters-content">
        <div class="special-characters-tabs">
          ${Object.keys(h).map((e) => `
            <button class="special-characters-tab ${c === e ? "active" : ""}" data-category="${e}">
              ${h[e].name}
            </button>
          `).join("")}
        </div>
        <div class="special-characters-main-content">
          <div class="special-characters-search">
            <input type="text" placeholder="Search characters..." value="${a}" class="special-characters-search-input">
          </div>
          <div class="special-characters-grid">
            ${o.length > 0 ? o.map((e) => `
                  <button class="special-characters-item" data-char="${e}" title="${f[e] || e}">
                    ${e}
                  </button>
                `).join("") : `<div class="special-characters-no-results">No characters found for "${a}"</div>`}
          </div>
        </div>
      </div>
    `;
    const d = r.querySelector(".special-characters-close");
    d == null || d.addEventListener("click", n), r.querySelectorAll(".special-characters-tab").forEach((e) => {
      e.addEventListener("click", (s) => {
        const i = s.target.getAttribute("data-category");
        i && (c = i, l());
      });
    });
    const p = r.querySelector(".special-characters-search-input");
    p == null || p.addEventListener("input", (e) => {
      a = e.target.value, l();
    }), r.querySelectorAll(".special-characters-item").forEach((e) => {
      e.addEventListener("click", (s) => {
        const i = s.target.getAttribute("data-char");
        i && (x(i), n());
      });
    });
  }, n = () => {
    t.parentNode && t.parentNode.removeChild(t), u = !1, document.removeEventListener("keydown", g);
  }, g = (o) => {
    o.key === "Escape" && (o.preventDefault(), o.stopPropagation(), n());
  };
  t.addEventListener("click", (o) => {
    o.target === t && n();
  }), document.addEventListener("keydown", g), l(), t.appendChild(r), document.body.appendChild(t);
}, v = () => ({
  name: "specialCharacters",
  toolbar: [{
    label: "Special Characters",
    command: "insertSpecialCharacter",
    icon: '<svg width="24" height="24" focusable="false"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"></path></svg>'
  }],
  commands: {
    insertSpecialCharacter: () => (b(), !0)
  },
  keymap: {}
});
export {
  v as SpecialCharactersPlugin
};
//# sourceMappingURL=SpecialCharactersPlugin.native-x7a2SWXc.mjs.map
