/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./dev/admin/wp-adminify-menu-editor.js":
/*!**********************************************!*\
  !*** ./dev/admin/wp-adminify-menu-editor.js ***!
  \**********************************************/
/***/ (() => {

eval("function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n// JS codes by WP Adminify\n\njQuery(function ($) {\n  \"use strict\";\n\n  var MenuEditonIconsLibrary = {\n    \"Simple Line Icons\": {\n      \"\": {\n        prefix: \"icon-\",\n        \"list-icon\": \"icon-heart\",\n        \"icon-style\": \"simple-line-icons\",\n        icons: [\"icon-user\", \"icon-people\", \"icon-user-female\", \"icon-user-follow\", \"icon-user-following\", \"icon-user-unfollow\", \"icon-login\", \"icon-logout\", \"icon-emotsmile\", \"icon-phone\", \"icon-call-end\", \"icon-call-in\", \"icon-call-out\", \"icon-map\", \"icon-location-pin\", \"icon-direction\", \"icon-directions\", \"icon-compass\", \"icon-layers\", \"icon-menu\", \"icon-list\", \"icon-options-vertical\", \"icon-options\", \"icon-arrow-down\", \"icon-arrow-left\", \"icon-arrow-right\", \"icon-arrow-up\", \"icon-arrow-up-circle\", \"icon-arrow-left-circle\", \"icon-arrow-right-circle\", \"icon-arrow-down-circle\", \"icon-check\", \"icon-clock\", \"icon-plus\", \"icon-minus\", \"icon-close\", \"icon-event\", \"icon-exclamation\", \"icon-organization\", \"icon-trophy\", \"icon-screen-smartphone\", \"icon-screen-desktop\", \"icon-plane\", \"icon-notebook\", \"icon-mustache\", \"icon-mouse\", \"icon-magnet\", \"icon-energy\", \"icon-disc\", \"icon-cursor\", \"icon-cursor-move\", \"icon-crop\", \"icon-chemistry\", \"icon-speedometer\", \"icon-shield\", \"icon-screen-tablet\", \"icon-magic-wand\", \"icon-hourglass\", \"icon-graduation\", \"icon-ghost\", \"icon-game-controller\", \"icon-fire\", \"icon-eyeglass\", \"icon-envelope-open\", \"icon-envelope-letter\", \"icon-bell\", \"icon-badge\", \"icon-anchor\", \"icon-wallet\", \"icon-vector\", \"icon-speech\", \"icon-puzzle\", \"icon-printer\", \"icon-present\", \"icon-playlist\", \"icon-pin\", \"icon-picture\", \"icon-handbag\", \"icon-globe-alt\", \"icon-globe\", \"icon-folder-alt\", \"icon-folder\", \"icon-film\", \"icon-feed\", \"icon-drop\", \"icon-drawer\", \"icon-docs\", \"icon-doc\", \"icon-diamond\", \"icon-cup\", \"icon-calculator\", \"icon-bubbles\", \"icon-briefcase\", \"icon-book-open\", \"icon-basket-loaded\", \"icon-basket\", \"icon-bag\", \"icon-action-undo\", \"icon-action-redo\", \"icon-wrench\", \"icon-umbrella\", \"icon-trash\", \"icon-tag\", \"icon-support\", \"icon-frame\", \"icon-size-fullscreen\", \"icon-size-actual\", \"icon-shuffle\", \"icon-share-alt\", \"icon-share\", \"icon-rocket\", \"icon-question\", \"icon-pie-chart\", \"icon-pencil\", \"icon-note\", \"icon-loop\", \"icon-home\", \"icon-grid\", \"icon-graph\", \"icon-microphone\", \"icon-music-tone-alt\", \"icon-music-tone\", \"icon-earphones-alt\", \"icon-earphones\", \"icon-equalizer\", \"icon-like\", \"icon-dislike\", \"icon-control-start\", \"icon-control-rewind\", \"icon-control-play\", \"icon-control-pause\", \"icon-control-forward\", \"icon-control-end\", \"icon-volume-1\", \"icon-volume-2\", \"icon-volume-off\", \"icon-calendar\", \"icon-bulb\", \"icon-chart\", \"icon-ban\", \"icon-bubble\", \"icon-camrecorder\", \"icon-camera\", \"icon-cloud-download\", \"icon-cloud-upload\", \"icon-envelope\", \"icon-eye\", \"icon-flag\", \"icon-heart\", \"icon-info\", \"icon-key\", \"icon-link\", \"icon-lock\", \"icon-lock-open\", \"icon-magnifier\", \"icon-magnifier-add\", \"icon-magnifier-remove\", \"icon-paper-clip\", \"icon-paper-plane\", \"icon-power\", \"icon-refresh\", \"icon-reload\", \"icon-settings\", \"icon-star\", \"icon-symbol-female\", \"icon-symbol-male\", \"icon-target\", \"icon-credit-card\", \"icon-paypal\", \"icon-social-tumblr\", \"icon-social-twitter\", \"icon-social-facebook\", \"icon-social-instagram\", \"icon-social-linkedin\", \"icon-social-pinterest\", \"icon-social-github\", \"icon-social-google\", \"icon-social-reddit\", \"icon-social-skype\", \"icon-social-dribbble\", \"icon-social-behance\", \"icon-social-foursqare\", \"icon-social-soundcloud\", \"icon-social-spotify\", \"icon-social-stumbleupon\", \"icon-social-youtube\", \"icon-social-dropbox\", \"icon-social-vkontakte\", \"icon-social-steam\"]\n      }\n    }\n  };\n  var icons_libraries = {\n    \"wp-adminify-simple-line-icons\": \"Simple Line Icons\"\n  };\n  Object.entries(icons_libraries).forEach(function (_ref) {\n    var _ref2 = _slicedToArray(_ref, 2),\n      key = _ref2[0],\n      value = _ref2[1];\n    if (WPAdminifyMenuEditor.assets_manager.includes(key)) {\n      delete MenuEditonIconsLibrary[value];\n    }\n  });\n  $(\".icon-picker-wrap\").ai_icon_picker({\n    iconLibrary: MenuEditonIconsLibrary\n  });\n\n  // Reset Menu Settings\n  $(\".adminify_reset_menu_settings\").on(\"click\", function (e) {\n    e.preventDefault();\n    $.ajax({\n      url: WPAdminifyMenuEditor.ajax_url,\n      type: \"post\",\n      data: {\n        action: \"adminify_reset_menu_settings\",\n        security: WPAdminifyMenuEditor.security\n      },\n      success: function success(response) {\n        if (response) {\n          var data = JSON.parse(response);\n          if (data.error) {\n            $(\"#adminify-data-saved-message\").addClass(\"notification is-warning\");\n            $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n            $(\"#adminify-data-saved-message\").text(data.message);\n            setTimeout(function () {\n              $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n              $(\"#adminify-data-saved-message\").removeClass(\"notification is-warning\");\n              $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n            }, 1500);\n          } else {\n            $(\"#adminify-data-saved-message\").addClass(\"notification is-primary\");\n            $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n            $(\"#adminify-data-saved-message\").text(data.message);\n            setTimeout(function () {\n              $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n              $(\"#adminify-data-saved-message\").removeClass(\"notification is-primary\");\n              $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n              location.reload();\n            }, 1500);\n          }\n        }\n      }\n    });\n  });\n\n  // Export Menu Settings\n  $(\".adminify_export_menu_settings\").on(\"click\", function (e) {\n    $.ajax({\n      url: WPAdminifyMenuEditor.ajax_url,\n      type: \"post\",\n      data: {\n        action: \"adminify_export_menu_settings\",\n        security: WPAdminifyMenuEditor.security\n      },\n      success: function success(response) {\n        var data = response;\n        var today = new Date();\n        var dd = String(today.getDate()).padStart(2, \"0\");\n        var mm = String(today.getMonth() + 1).padStart(2, \"0\"); // January is 0!\n        var yyyy = today.getFullYear();\n        var date_today = mm + \"_\" + dd + \"_\" + yyyy;\n        var filename = \"wpadminify_menu_settings_\" + date_today + \".json\";\n        var dataStr = \"data:text/json;charset=utf-8,\" + encodeURIComponent(data);\n        var dlAnchorElem = document.getElementById(\"adminify_download_settings\");\n        dlAnchorElem.setAttribute(\"href\", dataStr);\n        dlAnchorElem.setAttribute(\"download\", filename);\n        dlAnchorElem.click();\n      }\n    });\n  });\n  $(\".adminify_import_menu_settings\").on(\"click\", function (e) {\n    e.preventDefault();\n    $(\"#adminify_import_menu\").trigger(\"click\");\n  });\n\n  // Import Menu Settings\n  $(\"#adminify_import_menu\").on(\"change\", function (e) {\n    e.preventDefault();\n    var thefile = $(\"#adminify_import_menu\")[0].files[0];\n    if (thefile.type != \"application/json\") {\n      window.alert(\"Please select a valid JSON file.\");\n      return;\n    }\n    if (thefile.size > 100000) {\n      window.alert(\"File is to big.\");\n      return;\n    }\n    var file = document.getElementById(\"adminify_import_menu\").files[0];\n    var reader = new FileReader();\n    reader.readAsText(file, \"UTF-8\");\n    reader.onload = function (evt) {\n      var json_settings = evt.target.result,\n        parsed = JSON.parse(json_settings);\n      if (parsed != null) {\n        $.ajax({\n          url: WPAdminifyMenuEditor.ajax_url,\n          type: \"post\",\n          data: {\n            action: \"adminify_import_menu_settings\",\n            security: WPAdminifyMenuEditor.security,\n            settings: parsed\n          },\n          success: function success(response) {\n            // var message = response;\n            if (response) {\n              var data = JSON.parse(response);\n              if (data.error) {\n                $(\"#adminify-data-saved-message\").addClass(\"notification is-warning\");\n                $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n                $(\"#adminify-data-saved-message\").text(data.message);\n                setTimeout(function () {\n                  $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n                  $(\"#adminify-data-saved-message\").removeClass(\"notification is-warning\");\n                  $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n                }, 1500);\n              } else {\n                $(\"#adminify-data-saved-message\").addClass(\"notification is-primary\");\n                $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n                $(\"#adminify-data-saved-message\").text(data.message);\n                setTimeout(function () {\n                  $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n                  $(\"#adminify-data-saved-message\").removeClass(\"notification is-primary\");\n                  $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n                  location.reload();\n                }, 1500);\n              }\n            }\n          }\n        });\n      }\n    };\n  });\n\n  // menu editor accordin title design conflict by third plugin (instagram-feed)) issue fixed\n  $(\".adminify_menu_item, .adminify_sub_menu_item\").each(function (index, element) {\n    if (!$(element).find(\"> a\").is(\".menu-editor-title, .accordion-button, .p-4\")) {\n      $(element).find(\"> a\").attr({\n        \"class\": \"menu-editor-title accordion-button p-4\"\n      });\n    }\n  });\n  var menuSettings = {};\n  var removed_items = [];\n  function adminify_menu_items_object() {\n    // Menu Items\n    $(\".adminify_menu_item\").each(function (index, element) {\n      var menu_name = $(element).attr(\"name\");\n      var menu_object = menuSettings[menu_name] = {};\n      menuSettings[menu_name][\"order\"] = $(element).index();\n      // menu_object[\"order\"] = $(element).index();\n      $(element).find(\".adminify_top_level_settings .menu_setting\").each(function (index, item) {\n        var setting_name = $(item).attr(\"name\"),\n          value = \"\";\n        if (setting_name === \"separator\") {\n          if ($(item).prop(\"checked\") == true) {\n            value = 1;\n          } else {\n            value = 0;\n          }\n        } else if (setting_name === \"external_link\") {\n          if ($(item).prop(\"checked\") == true) {\n            value = 1;\n          } else {\n            value = 0;\n          }\n        } else {\n          value = $(item).val();\n        }\n        menu_object[setting_name] = value;\n      });\n      if (menu_name.includes(\"adminify-custom-menu-\")) {\n        if (menu_object.link === \"\") {\n          menu_object.link = \"#\".concat(menu_name);\n        }\n      }\n\n      // pro code start\n      // Top Level Live Text Changes\n      var menu_id = $(element).attr(\"id\");\n      $(\"#\" + menu_id + ' input[name=\"name\"]').on(\"keyup\", function () {\n        var data_menu_id = $(this).data(\"top-menu-id\");\n        $(\"#adminify-main-topmenu-\" + data_menu_id).text($(this).val());\n      });\n      // pro code end\n\n      // Sub Level Menu Items\n      if ($(element).find(\".adminify_sub_menu_item\").length > 0) {\n        var submenu_object = menu_object[\"submenu\"] = {};\n        $(element).find(\".adminify_sub_menu_item\").each(function (index, subitem) {\n          var sub_menu_name = $(subitem).attr(\"name\");\n          var submenu_item = submenu_object[sub_menu_name] = {};\n          submenu_item[\"order\"] = $(subitem).index();\n          $(subitem).find(\".sub_menu_setting\").each(function (index, subsubitem) {\n            var sub_setting_name = $(subsubitem).attr(\"name\");\n            var sub_value = $(subsubitem).val();\n            if (sub_setting_name === \"external_link\") {\n              if ($(subsubitem).prop(\"checked\") == true) {\n                sub_value = 1;\n              } else {\n                sub_value = 0;\n              }\n            }\n            submenu_item[sub_setting_name] = sub_value;\n          });\n          if (sub_menu_name.includes(\"adminify-custom-submenu-\")) {\n            if (submenu_item.link === \"\") {\n              submenu_item.link = \"#\".concat(sub_menu_name);\n            }\n          }\n        });\n\n        // pro code start\n        // Sub Menu Level Live Text Changes\n        var sub_menu_id = $(element).attr(\"id\");\n        $(\"#\" + sub_menu_id + ' input[name=\"name\"]').on(\"keyup\", function () {\n          var data_sub_menu_id = $(this).data(\"sub-menu-id\");\n          $(\"#adminify-main-submenu-\" + data_sub_menu_id).text($(this).val());\n        });\n        // pro code end\n      }\n    });\n\n    // removed parent menu items, `parent.remove()` actually doesn't remove item from this menuSettings object.\n    if (removed_items.length) {\n      removed_items.forEach(function (item) {\n        if (item in menuSettings) {\n          delete menuSettings[item];\n        }\n      });\n    }\n  }\n\n  // Live Changes\n  adminify_menu_items_object();\n\n  // Save Settings\n  $(\".adminify_menu_save_settings, .adminify-save-ajax\").on(\"click\", function (e) {\n    e.preventDefault();\n    adminify_menu_items_object();\n    $.ajax({\n      url: WPAdminifyMenuEditor.ajax_url,\n      type: \"POST\",\n      dataType: \"json\",\n      data: {\n        action: \"adminify_save_menu_settings\",\n        security: WPAdminifyMenuEditor.security,\n        options: menuSettings\n      },\n      success: function success(response) {\n        if (response) {\n          var data = response;\n          if (data.error) {\n            $(\"#adminify-data-saved-message\").addClass(\"notification is-warning\");\n            $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n            $(\"#adminify-data-saved-message\").text(data.message);\n            setTimeout(function () {\n              $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n              $(\"#adminify-data-saved-message\").removeClass(\"notification is-warning\");\n              $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n            }, 1500);\n          } else {\n            $(\"#adminify-data-saved-message\").addClass(\"notification is-primary\");\n            $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n            $(\"#adminify-data-saved-message\").text(data.message);\n            setTimeout(function () {\n              $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n              $(\"#adminify-data-saved-message\").removeClass(\"notification is-primary\");\n              $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n            }, 1500);\n          }\n        }\n      }\n    });\n  });\n\n  // Menu Item Sort\n  $(\".wp-adminify--menu--editor--settings\").sortable({\n    handle: \".menu-editor-title svg\"\n  });\n\n  // Menu Item Submenu Sort\n  $(\".wp-adminify--menu--editor--settings > .adminify_menu_item > .accordion-body > .tab-content > .tab-pane--submenu\").sortable({\n    handle: \".menu-editor-title svg\"\n  });\n\n  // Submenu Item Tabs\n  $(\".tab-content > div:not(.wp-adminify-page-speed-wrapper > div,.remove-add-new-menu)\").hide();\n  $(\".tab-content > div:first-of-type\").show();\n  $(\"body\").on(\"click\", \".nav-tabs a:not(.wp-adminify-page-speed-wrapper a)\", function (e // $('.nav-tabs a:not(.wp-adminify-page-speed-wrapper a)').click(function (e)\n  ) {\n    e.preventDefault();\n    var $this = $(this),\n      tabgroup = \"#\" + $this.parents(\".nav-tabs\").data(\"tab-content\"),\n      others = $this.closest(\"li\").siblings().children(\"a\"),\n      target = $this.attr(\"href\");\n    others.removeClass(\"active\");\n    $this.addClass(\"active\");\n    $(tabgroup).children(\"div\").hide();\n    $(target).show();\n    $(target).siblings().hide();\n  });\n\n  /**\n   * Add New Menu Item to Menu Editor\n   */\n  if (WPAdminifyMenuEditor.can_use_premium) {\n    $(\".wp-adminify--menu--editor--settings\").on(\"click\", \".adminify-add-new-menu-editor-item\", function (e) {\n      e.preventDefault();\n      var $this = $(this),\n        $submenu = $(this).hasClass(\"submenu\") || false,\n        $repeater = $this.closest(\".wp-adminify--menu--editor--settings\").find(\".adminify_menu_item\"),\n        count = $repeater.length,\n        $clone = $repeater.first().clone();\n\n      // var randomNumber = Math.floor(Math.random() * 26) + Date.now();\n      var randomNumber = Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(2);\n\n      // Set name, id attribute for newly created custom menu item\n      var uniqueId = \"adminify-custom-menu-\" + randomNumber;\n      var menuNewId = $clone.attr(\"id\").slice(0, 25) + uniqueId;\n      if ($submenu) {\n        $clone.attr(\"class\", \"adminify-accordion adminify_sub_menu_item\");\n        $clone.find(\".accordion-body\").attr(\"class\", \"accordion-body\");\n        $clone.find(\".menu_setting\").attr(\"class\", \"sub_menu_setting\");\n        $clone.find(\".tabs.tabbable,.tab-pane--submenu\").remove();\n        $clone.find(\".tab-content .tab-pane:nth-child(1)\").show();\n        $clone.find(\"select.sub_menu_setting\").addClass(\"adminify-menu-settings\");\n        $clone.find(\".icon-picker-wrap\").siblings(\"label\").html(\"Set Custom Icon <i>(Not available for Submenu.)</i>\");\n        $clone.find(\".icon-picker-wrap\").removeClass(\"is-clickable\").addClass(\"is-clickable-no\");\n        $clone.find(\".menu-editor-form .columns:nth-child(3)\").remove();\n        count += $(this).siblings().length + 2;\n        uniqueId = \"adminify-custom-submenu-\" + randomNumber;\n        menuNewId = \"wp-adminify-sub-menu-menu\" + uniqueId;\n      }\n      $this.siblings().find(\".menu-editor-title\").removeClass(\"show\");\n      $this.siblings().find(\".accordion-body\").removeClass(\"show\").hide();\n      var newTitle = \"Custom Menu\";\n      $clone.attr({\n        id: menuNewId,\n        name: uniqueId\n      });\n      var svg_drag_icon = $(\"<svg class = \\\"drag-icon is-pulled-left mr-2 ui-sortable-handle\\\" width = \\\"24\\\" height = \\\"24\\\" viewBox = \\\"0 0 24 24\\\" fill = \\\"none\\\" xmlns = \\\"http://www.w3.org/2000/svg\\\" >\\n\\t\\t\\t\\t\\t<path d          = \\\"M12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M12 7C13.1046 7 14 6.10457 14 5C14 3.89543 13.1046 3 12 3C10.8954 3 10 3.89543 10 5C10 6.10457 10.8954 7 12 7Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M12 21C13.1046 21 14 20.1046 14 19C14 17.8954 13.1046 17 12 17C10.8954 17 10 17.8954 10 19C10 20.1046 10.8954 21 12 21Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M5 14C6.10457 14 7 13.1046 7 12C7 10.8954 6.10457 10 5 10C3.89543 10 3 10.8954 3 12C3 13.1046 3.89543 14 5 14Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M5 7C6.10457 7 7 6.10457 7 5C7 3.89543 6.10457 3 5 3C3.89543 3 3 3.89543 3 5C3 6.10457 3.89543 7 5 7Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M5 21C6.10457 21 7 20.1046 7 19C7 17.8954 6.10457 17 5 17C3.89543 17 3 17.8954 3 19C3 20.1046 3.89543 21 5 21Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M19 14C20.1046 14 21 13.1046 21 12C21 10.8954 20.1046 10 19 10C17.8954 10 17 10.8954 17 12C17 13.1046 17.8954 14 19 14Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M19 7C20.1046 7 21 6.10457 21 5C21 3.89543 20.1046 3 19 3C17.8954 3 17 3.89543 17 5C17 6.10457 17.8954 7 19 7Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d          = \\\"M19 21C20.1046 21 21 20.1046 21 19C21 17.8954 20.1046 17 19 17C17.8954 17 17 17.8954 17 19C17 20.1046 17.8954 21 19 21Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t</svg >\");\n      $clone.find(\"> .menu-editor-title\").html(svg_drag_icon).append(newTitle);\n      $clone.find(\".nav-tabs li\").each(function (index) {\n        var id = \"#tab-\" + uniqueId + \"-\" + index;\n        $(this).find(\".nav-link\").attr(\"href\", id);\n      });\n      var default_icon = $(\" <img src = \\\"\".concat(WPAdminifyMenuEditor.icon_picker_logo, \"\\\"/> \"));\n      $clone.find(\".icon-picker .select-icon\").addClass(\"custom-icon\");\n      $clone.find(\".icon-picker .select-icon i\").attr(\"class\", \"\").html(default_icon);\n      $clone.find(\".tab-content .tab-pane\").each(function (index) {\n        if ($(this).attr(\"id\") !== undefined) {\n          var id = \"tab-\" + uniqueId + \"-\" + index;\n          $(this).attr(\"id\", id);\n        }\n        if ($(this).hasClass(\"tab-pane--submenu\") == true) {\n          $(this).find(\".adminify_sub_menu_item\").each(function () {\n            $(this).remove();\n          });\n          $(this).prepend($(\"<span>No submenu items are left.</span>\"));\n        }\n      });\n      $clone.find(\".menu-editor-form .column\").each(function () {\n        $(this).find(\"label\").attr(\"for\", uniqueId);\n        $(this).find('[name=\"name\"]').attr({\n          \"data-top-menu-id\": uniqueId,\n          placeholder: newTitle,\n          value: newTitle\n        });\n        $(this).find('[name=\"separator\"]').attr({\n          id: uniqueId\n        });\n      });\n      $clone.find(\".tokenize\").remove();\n      var token_selector = $clone.find(\".adminify-menu-settings\");\n      $clone.find('[name=\"separator\"]').prop(\"checked\", false).val(0);\n      $(token_selector).tokenize2({\n        placeholder: \"Select roles or users\"\n      });\n      $clone.find(\".adminify-menu-settings.menu_setting\").prop('selectedIndex', -1);\n      $clone.find(\".tokenize .token\").remove();\n      $(token_selector).on(\"tokenize:select\", function () {\n        $(this).tokenize2().trigger(\"tokenize:search\", [$(this).tokenize2().input.val()]);\n      });\n      var remove_icon = $(\"<div class = \\\"remove-add-new-menu\\\" > <span data-id = \\\"\".concat(uniqueId, \"\\\"> <i class=\\\"icon-close\\\"> </i> Delete </span > </div>\"));\n      $clone.find(\".tab-content .tab-pane:nth-child(1)\").append(remove_icon);\n      $clone.find(\".menu-editor-title\").addClass(\"show\");\n      $clone.find(\".accordion-body\").addClass(\"show\").css(\"display\", \"block\");\n      $this.prev(\"span\").remove();\n      $clone.insertBefore($this);\n    });\n\n    // remove add new icon\n    $(\"body\").on(\"click\", \".remove-add-new-menu span\", function (e) {\n      var $this = $(this);\n      var id = $this.data(\"id\");\n      var parent = $this.parent(\".remove-add-new-menu\").parent(\".tab-pane\").parent(\".tab-content\").parent(\".accordion-body\").parent(\".accordion\");\n      if (parent.hasClass(\"adminify_sub_menu_item\")) {\n        var num_of_element = parent.siblings(\".adminify_sub_menu_item\").length;\n        if (num_of_element < 1) {\n          parent.parent(\".tab-pane--submenu\").prepend($(\"<span> No submenu items are left.</span>\"));\n        }\n      }\n      if (parent.attr(\"name\") === id) {\n        parent.remove(); // this doesn't atually remove the items from menuSettings object  L276\n        removed_items = [].concat(_toConsumableArray(removed_items), [id]);\n      }\n    });\n  }\n\n  /**\n   * Drag & Drop Custom Icon Uploader for Menu Editor START\n   */\n\n  var displayIconsWrapper = $(\"#display-custom-icons ul\");\n\n  // Click functionality START\n  $(\"body\").on(\"click\", \"#adminify-browse-button\", function (e) {\n    e.preventDefault();\n    $(\"#file\").trigger(\"click\");\n  });\n  $(\"body\").on(\"change\", \"#file\", function (e) {\n    var $this = $(this);\n    // var file_obj = $this.prop('files');\n    var file_obj = e.target.files;\n    var form_data = new FormData();\n    for (var i = 0; i < file_obj.length; i++) {\n      form_data.append(\"my_file_upload[]\", file_obj[i]);\n    }\n    form_data.append(\"action\", \"adminify_file_upload\");\n    form_data.append(\"security\", WPAdminifyMenuEditor.security);\n    uploadImage(form_data, WPAdminifyMenuEditor.ajax_url, $this);\n  });\n\n  // Drag & Drop functinality START\n  $(\"#adminify-drag-drop-area\").on(\"dragover\", function (e) {\n    // preventing page from redirecting\n    e.preventDefault();\n    e.stopPropagation();\n    $(this).css(\"border-color\", \"#0347ff\");\n  });\n  $(\"#adminify-drag-drop-area\").on(\"dragleave\", function (e) {\n    $(this).css(\"border-color\", \"#c3c4c7\");\n  });\n  $(\"#adminify-drag-drop-area\").on(\"drop\", function (e) {\n    e.preventDefault();\n    e.stopPropagation();\n    $(this).css(\"border-color\", \"#0347ff\");\n    e.stopPropagation();\n    e.preventDefault();\n    var $this = $(this).find(\"#file\");\n    var file_obj = e.originalEvent.dataTransfer.files;\n    var form_data = new FormData();\n    for (var i = 0; i < file_obj.length; i++) {\n      form_data.append(\"my_file_upload[]\", file_obj[i]);\n    }\n    form_data.append(\"action\", \"adminify_file_upload\");\n    form_data.append(\"security\", WPAdminifyMenuEditor.security);\n    uploadImage(form_data, WPAdminifyMenuEditor.ajax_url, $this);\n  });\n  function uploadImage(form_data, ajax_url, _this) {\n    $.ajax({\n      xhr: function xhr() {\n        var xhr = new window.XMLHttpRequest();\n        xhr.upload.addEventListener(\"progress\", function (evt) {\n          if (evt.lengthComputable) {\n            var percentComplete = parseInt(evt.loaded / evt.total * 100);\n            $(\"#icon-upload-bar\").addClass(\"show\").width(percentComplete + \"%\");\n          }\n        }, false);\n        return xhr;\n      },\n      url: ajax_url,\n      type: \"POST\",\n      contentType: false,\n      processData: false,\n      data: form_data,\n      success: function success(response) {\n        _this.val(\"\");\n        var data = JSON.parse(response);\n        if (data.status != false) {\n          var images = data.images;\n          for (var key in images) {\n            if (images.hasOwnProperty(key)) {\n              var basename = images[key].split(\"/\").reverse()[0];\n              var image_url = WPAdminifyMenuEditor.baseurl + \"/adminify-custom-icons/\" + basename;\n              var item = \" <li data - id = \\\"\".concat(key, \"\\\" > <img src = \\\"\").concat(image_url, \"\\\" / > </li> \");\n              displayIconsWrapper.prepend(item);\n            }\n          }\n          setTimeout(function () {\n            $(\"#icon-upload-bar\").width(0).removeClass(\"show\");\n            $(\"#adminify-drag-drop-area\").css(\"border-color\", \"#c3c4c7\");\n          }, 100);\n        }\n      }\n    });\n  }\n  /**\n   * Drag & Drop Custom Icon Uploader for Menu Editor END\n   */\n});\n\n//# sourceURL=webpack://adminify/./dev/admin/wp-adminify-menu-editor.js?");

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval devtool is used.
/******/ 	var __webpack_exports__ = {};
/******/ 	__webpack_modules__["./dev/admin/wp-adminify-menu-editor.js"]();
/******/ 	
/******/ })()
;