!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";t.r(n);t(1);function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var c,l=e[Symbol.iterator]();!(r=(c=l.next()).done)&&(t.push(c.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var o=wp.element,a=(o.createElement,o.useState),c=o.useEffect,l=o.Fragment,i=o.render,u=wp.data,s=(u.dispatch,u.select,function(e){var n=r(a(document.querySelector("#menu-icon-"+e.id).value),2),t=n[0],o=n[1],i=r(a(!1),2),u=i[0],s=i[1],m=r(a(""),2),p=m[0],d=m[1],f=r(a(""),2),w=f[0],_=f[1],v=r(a(""),2),b=v[0],y=v[1];c((function(){t.length>80&&o(atob(t))}),[]);var E=[];E=p.length?window.menu_icons.icons.filter((function(e){return-1!=e.indexOf(p)})):window.menu_icons.icons;var g=function(n){document.querySelector("#menu-icon-"+e.id).value=btoa(n),o(n),s(!1)};return wp.element.createElement("div",{className:"vibe_menu_selector"},t.length>80?wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:t}}):t?wp.element.createElement("span",{className:t}):"",wp.element.createElement("a",{className:"menu_selector_button",onClick:function(e){s(!0)}},window.menu_icons.translations.select_icon),u?ReactDOM.createPortal(wp.element.createElement("div",{className:"menu_icon_selector_background"},wp.element.createElement("span",{onClick:function(){return s(!1)}}),wp.element.createElement("div",{className:"menu_icon_selector_wrapper"},w?wp.element.createElement(l,null,wp.element.createElement("textarea",{onChange:function(e){return y(e.target.value)},value:b,placeholder:window.menu_icons.translations.add_svg_icon_text}),wp.element.createElement("div",{className:"action_buttons"},wp.element.createElement("button",{onClick:function(e){return g(b)}},window.menu_icons.translations.add_icon))):wp.element.createElement(l,null,wp.element.createElement("div",{className:"input_search"},wp.element.createElement("input",{type:"text",value:p,onChange:function(e){return d(e.target.value)},placeholder:window.menu_icons.translations.search_icon}),wp.element.createElement("span",{className:"vicon vicon-search"})),wp.element.createElement("div",{className:"icons_list"},E.map((function(e){return wp.element.createElement("span",{className:"icon_wrapper",onClick:function(n){return g(e)}},wp.element.createElement("span",{className:e}))})))),wp.element.createElement("button",{onClick:function(e){return _(!w)}},w?window.menu_icons.translations.select_icon:window.menu_icons.translations.svg_icon))),document.body):"")});document.querySelectorAll(".select_vicon_popup").forEach((function(e){i(wp.element.createElement(s,{id:e.getAttribute("data-id")}),e)}))},function(e,n,t){}]);