Version Description
- Add: Support overriding roles.
- Fix: The layout of the dashboard was broken by WPBakery.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media File Renamer |
Version | 5.1.0 |
Comparing to | |
See all releases |
Code changes from version 5.0.9 to 5.1.0
- app/index.js +1 -1
- classes/admin.php +5 -3
- classes/core.php +12 -1
- classes/rest.php +0 -3
- classes/ui.php +1 -1
- media-file-renamer.php +2 -2
- readme.txt +5 -1
app/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(e){function n(n){for(var r,i,l=n[0],c=n[1],u=n[2],f=0,d=[];f<l.length;f++)i=l[f],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&d.push(a[i][0]),a[i]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(s&&s(n);d.length;)d.shift()();return o.push.apply(o,u||[]),t()}function t(){for(var e,n=0;n<o.length;n++){for(var t=o[n],r=!0,l=1;l<t.length;l++){var c=t[l];0!==a[c]&&(r=!1)}r&&(o.splice(n--,1),e=i(i.s=t[0]))}return e}var r={},a={0:0},o=[];function i(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=r,i.d=function(e,n,t){i.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,n){if(1&n&&(e=i(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)i.d(t,r,function(n){return e[n]}.bind(null,r));return t},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,"a",n),n},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.p="";var l=window.wpJsonMfrh=window.wpJsonMfrh||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var u=0;u<l.length;u++)n(l[u]);var s=c;o.push([79,1]),t()}({0:function(e,n){e.exports=React},70:function(e,n){e.exports=ReactDOM},79:function(e,n,t){"use strict";t.r(n);var r=t(6),a=t(0),o=t.n(a),i=t(1),l=t.n(i);function c(){return(c=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){f(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function f(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var p=function(e){var n=e.spinner,t=void 0===n||n,r=e.busy,i=void 0!==r&&r,l=e.overlayStyle,u=d(Object(a.useState)(!0),2),f=u[0],m=u[1];Object(a.useEffect)((function(){var e;return i?m(!0):e=setTimeout((function(){m(!1),e=null}),250),function(){e&&clearTimeout(e)}}),[i]);var p=f?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"overlay "+(i?"":"overlayHidden"),style:l},Boolean(t)&&o.a.createElement("div",{className:"lds-ellipsis "+(i?"":"spinnerHidden")},o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null))),o.a.createElement("style",{jsx:!0},"\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n ")):null,h=s(s({},e),{},{busy:void 0,spinner:void 0});return o.a.createElement("div",c({style:{position:"relative"}},h),p,e.children)};p.propTypes={busy:l.a.bool.isRequired,spinner:l.a.bool,children:l.a.oneOfType([l.a.arrayOf(l.a.node),l.a.node]).isRequired};var h=p,b=t(2),g=t(4),y={black:"black",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#F1F1F1",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#134675",proGray:"#7F8EA0",progress:"#8414a8",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"white",fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"},v=t(3),E=t(29),w=t.n(E),k=t(30),R=t.n(k),O=t(31),j=t.n(O),S=t(9),P=t.n(S),C=t(10),_=t.n(C),A=t(11),T=t.n(A),N=t(7),I=t.n(N),z=t(5),M=t.n(z),F=t(8),L=t.n(F),B=t(12),D=t.n(B),q=t(13),U=t.n(q),G=t(32),H=t.n(G),W=t(33),$=t.n(W),Y=t(14),J=t.n(Y),V=t(34),K=t.n(V),Z=t(35),X=t.n(Z),Q=t(36),ee=t.n(Q),ne=t(37),te=t.n(ne),re=(t(61),t(38)),ae=t.n(re),oe=t(39),ie=t.n(oe),le=t(40),ce=t.n(le),ue=t(41),se=t.n(ue),fe=t(42),de=t.n(fe),me=t(43),pe=t.n(me),he=t(44),be=t.n(he),ge=t(45),ye=t.n(ge),ve=t(46),Ee=t.n(ve),xe={lock:w.a,"lock-open":R.a,"file-undo":j.a,"chevron-double-left":P.a,"chevron-double-right":_.a,"chevron-left":T.a,"chevron-right":I.a,"chevron-down":M.a,"chevron-up":L.a,pause:D.a,play:U.a,replay:H.a,check:$.a,stop:J.a,delete:K.a,undo:X.a,alert:ee.a,database:te.a,tools:ae.a,cog:ie.a,close:ce.a,cat:se.a,upload:de.a,trash:pe.a,pencil:be.a,dashboard:ye.a,search:Ee.a};function we(){return(we=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function ke(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Re(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ",";\n font-size: ",";\n padding: 0 15px;\n\n background-color: ",";\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n\n &.danger {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.success {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n ","\n"]);return Re=function(){return e},e}var Oe=Object(b.a)((function(e){var n=e.className,t=e.icon,r=void 0===t?null:t,a=e.onClick,i=e.disabled,l=void 0!==i&&i,c=e.color,u=void 0===c?null:c,s=e.children,f=ke(e,["className","icon","onClick","disabled","color","children"]),d=!!r,m="nui-button ".concat(n||"").concat(d?" has-icon":""," ").concat(u?"custom-color":"");return o.a.createElement("button",we({type:"button",className:m,onClick:a,disabled:l},f),d&&o.a.createElement(v.Icon,{icon:"string"==typeof r?xe[r]||null:r,width:"24",height:"24",style:{marginRight:"4px"}}),o.a.createElement("span",null,s))}))(Re(),y.fontFamily,y.fontSizeText,y.blue,Object(g.a)(.1,y.blue),y.lightBlue,y.blue,y.blue,Object(g.a)(.1,y.lightBlue),y.red,y.red,Object(g.a)(.1,y.red),y.green,y.green,Object(g.a)(.1,y.green),(function(e){return je(e.color)})),je=function(e){if(e)return"\n &.custom-color {\n background-color: ".concat(e,";\n border: 1px solid ").concat(e,";\n\n &:hover {\n background-color: ").concat(Object(g.a)(.1,e),";\n }\n }\n ")},Se=function(e){return o.a.createElement(Oe,e)};function Pe(){return(Pe=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ce(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function _e(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n position: relative;\n border-radius: 10px;\n color: ",";\n font-family: ",";\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n"]);return _e=function(){return e},e}Se.propTypes={className:l.a.oneOf(["primary","secondary","danger","success"]),disabled:l.a.bool,icon:l.a.oneOfType([l.a.instanceOf(v.IconifyIcon),l.a.oneOf(["setting","edit","trash"])]),color:l.a.string,onClick:l.a.func.isRequired},Se.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){}};var Ae=b.a.a(_e(),y.yellow,y.white,y.fontFamily,y.white),Te=function(e){var n=e.show,t=void 0===n||n,r=e.className,a=Ce(e,["show","className"]);return t?o.a.createElement(Ae,Pe({href:"https://store.meowapps.com",target:"_blank",className:"".concat(r||"")},a),"Pro Only"):null},Ne=function(e){return o.a.createElement(Te,e)};Ne.propTypes={show:l.a.bool,className:l.a.string},Ne.defaultProps={show:!0,className:void 0};var Ie=t(21),ze=t.n(Ie);function Me(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=De(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Fe(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Le(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Fe(o,r,a,i,l,"next",e)}function l(e){Fe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Be(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||De(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,n){if(e){if("string"==typeof e)return qe(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(e,n):void 0}}function qe(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object(a.useState)(n),o=Be(r,2),i=o[0],l=o[1],c=Object(a.useState)(null),u=Be(c,2),s=u[0],f=u[1],d=Object(a.useState)(t),m=Be(d,2),p=m[0],h=m[1],b=Object(a.useState)(0),g=Be(b,2),y=g[0],v=g[1];return Object(a.useEffect)((function(){void 0!==e&&(e.success?(f(null),l(e.data),v(e.total?e.total:0)):f(e.error)),h(void 0===e)}),[e]),{busy:p,data:i,total:y,error:s}},Ge=function(){var e=Object(a.useRef)(),n=Be(Object(a.useState)({}),2),t=n[0],r=n[1];return Object(a.useEffect)((function(){if(e&&e.current){var n=new ResizeObserver((function(e){var n=e[0];n.contentRect&&r({width:n.contentRect.left+n.contentRect.right,height:n.contentRect.top+n.contentRect.bottom})}));return n.observe(e.current),function(){n.unobserve(e.current)}}}),[]),{ref:e,width:t.width?t.width:0,height:t.height?t.height:0}},He=function(e){var n=Object(a.useRef)(),t=function(t){e&&!n.current.contains(t.target)&&e()};return Object(a.useEffect)((function(){return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}})),n},We=null,$e=new ze.a({concurrency:1,autoStart:!1});function Ye(){var e=Qe(["\n align-items: center;\n background-color: ",";\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ",";\n font-size: ",";\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ",";\n justify-content: space-between;\n }\n"]);return Ye=function(){return e},e}function Je(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ve(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ke(){var e=Qe(["\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ",";\n position: absolute;\n z-index: 10;\n box-shadow: ",';\n\n &:before {\n content: "";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ',";\n }\n"]);return Ke=function(){return e},e}function Ze(){var e=Qe(["\n align-items: center;\n background-color: ",";\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n"]);return Ze=function(){return e},e}function Xe(){var e=Qe(["\n display: inline-block;\n"]);return Xe=function(){return e},e}function Qe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var en=b.a.div(Xe()),nn=b.a.button(Ze(),y.blue,y.fontFamily,y.fontSizeText,Object(g.a)(.1,y.blue)),tn=b.a.div(Ke(),y.blue,y.lightShadow,y.blue),rn=function(e){var n=e.title,t=e.disabled,r=void 0!==t&&t,a=e.isPro,i=void 0!==a&&a,l=e.style,c=void 0===l?{}:l,u=Je(o.a.useState(!1),2),s=u[0],f=u[1],d=He((function(){f(!1)})),m=Ge(),p=m.ref,h=m.width,b=function(){f(!s)},g=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{isPro:i,disabled:e.props.disabled||r,onClick:function(){e.props.onClick&&e.props.onClick(),b()}})}));return o.a.createElement(en,{ref:d},o.a.createElement(nn,{ref:p,type:"button",disabled:r,onClick:b,style:c},o.a.createElement("span",null,n),o.a.createElement(v.Icon,{icon:M.a,width:"24",height:"24",style:{marginLeft:"4px"}})),s&&o.a.createElement(tn,{style:{transform:"translateX(calc(-50% + ".concat(h/2,"px))")}},g))},an=b.a.button(Ye(),y.blue,y.fontFamily,y.fontSizeText,Object(g.a)(.1,y.blue),y.proGray),on=function(e){var n=e.onClick,t=e.children,r=e.isPro,a=e.requirePro,i=void 0!==a&&a,l=e.disabled,c=i&&!r;return o.a.createElement(an,{type:"button",className:c?"is-pro":"",onClick:n,disabled:l||c},o.a.createElement("span",null,t),c&&!r&&o.a.createElement(Ne,null))},ln=function(e){return o.a.createElement(rn,e)},cn=function(e){return o.a.createElement(on,e)};function un(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||sn(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sn(e,n){if(e){if("string"==typeof e)return fn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fn(e,n):void 0}}function fn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function dn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n"]);return dn=function(){return e},e}ln.propTypes={title:l.a.string,disabled:l.a.bool,isPro:l.a.bool},ln.defaultProps={title:void 0,disabled:!1,isPro:!1},cn.propTypes={onClick:l.a.func.isRequired,requirePro:l.a.bool},cn.defaultProps={onClick:function(){},requirePro:!1};var mn=b.a.div(dn()),pn=function(e){var n=e.className,t=e.children,r=e.nekoErrors,i=void 0===r?[]:r,l=e.style,c=void 0===l?{}:l,u=un(Object(a.useState)(!1),2),s=u[0],f=u[1],d=un(Object(a.useState)(!1),2),m=d[0],p=d[1];if(i&&!s){var h,b=function(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=sn(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}(i);try{for(b.s();!(h=b.n()).done;){var g=h.value;if(g){f(g);break}}}catch(e){b.e(e)}finally{b.f()}}return o.a.createElement(mn,{className:n||"",style:c},s&&o.a.createElement("div",{className:"neko-rest-error"},o.a.createElement("div",{className:"container"},!m&&o.a.createElement(o.a.Fragment,null,o.a.createElement("h3",null,"The Rest API is disabled or broken 😢"),o.a.createElement("p",null,"The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled."),o.a.createElement("p",null,o.a.createElement("i",null,"Last but not least: check your PHP Error Logs and your Debugging Console.")),o.a.createElement("p",{className:"neko-debug"},o.a.createElement("small",null,"URL: ",s.url,o.a.createElement("br",null),"CODE: ",s.code,o.a.createElement("br",null),"MESSAGE: ",s.message,o.a.createElement("br",null)))),s.body&&m&&o.a.createElement("p",{className:"neko-debug"},o.a.createElement("div",{dangerouslySetInnerHTML:{__html:s.body}})),s.body&&o.a.createElement(Se,{color:"#a94242",onClick:function(){return p(!m)}},m?"Hide":"Display"," response from server"),o.a.createElement(Se,{color:"#a94242",onClick:function(){window.open("https://meowapps.com/debugging-wordpress/","_blank")}},"Learn about WordPress Debugging"))),t)},hn=function(e){return o.a.createElement(pn,e)};function bn(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function gn(){var e=xn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return gn=function(){return e},e}function yn(){var e=xn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return yn=function(){return e},e}function vn(){var e=xn(["\n font-family: ",";\n font-size: ",";\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return vn=function(){return e},e}function En(){var e=xn(["\n font-family: ",";\n font-weight: normal;\n font-size: ",";\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return En=function(){return e},e}function xn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}hn.propTypes={className:l.a.string,style:l.a.object,nekoErrors:l.a.bool},hn.defaultProps={className:void 0,style:{},nekoErrors:!1};var wn=b.a.h1(En(),y.fontFamily,y.fontSizeH1),kn=b.a.h2(vn(),y.fontFamily,y.fontSizeH2),Rn=b.a.p(yn(),y.fontFamily,y.fontSizeText),On=b.a.span(gn(),y.fontFamily,y.fontSizeText),jn=function(e){var n=e.children,t=bn(e,["children"]);return e.h1?o.a.createElement(wn,t,n):e.h2?o.a.createElement(kn,t,n):e.p?o.a.createElement(Rn,t,n):o.a.createElement(On,t,n)},Sn=function(e){return o.a.createElement(jn,e)};function Pn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-size: ",";\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ",";\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ",";\n\n .nui-block-title {\n color: ",";\n }\n\n .nui-block-content {\n background-color: ",";\n }\n }\n"]);return Pn=function(){return e},e}Sn.propTypes={h1:l.a.any,h2:l.a.any,p:l.a.any},Sn.defaultProps={h1:void 0,h2:void 0,p:void 0};var Cn=b.a.div(Pn(),y.fontSizeText,y.blue,y.blue,y.white,y.white),_n=function(e){var n=e.title,t=e.children,r=e.className,a=e.busy,i=void 0!==a&&a,l=e.style,c=void 0===l?{}:l;return o.a.createElement(Cn,{className:"nui-block "+(r||""),style:c},o.a.createElement(h,{busy:i},o.a.createElement(Sn,{h2:!0,className:"nui-block-title"},n),o.a.createElement("div",{className:"nui-block-content"},t)))},An=function(e){return o.a.createElement(_n,e)};function Tn(){var e=In(["\n justify-content: flex-start;\n background-color: ",";\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n"]);return Tn=function(){return e},e}function Nn(){var e=In(["\n font-size: ",";\n font-family: ",";\n background-color: ",";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ",";\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n"]);return Nn=function(){return e},e}function In(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}An.propTypes={title:l.a.string,className:l.a.oneOf(["","primary"]),style:l.a.object},An.defaultProps={title:void 0,className:"",style:{}};var zn=b.a.div(Nn(),y.fontSizeText,y.fontFamily,y.white,y.blue),Mn=b.a.div(Tn(),y.lightGray),Fn=function(e){var n=e.children,t=e.header,r=e.headerAlign,a=void 0===r?"left":r,i=e.footer,l=e.footerAlign,c=void 0===l?"right":l,u=e.className,s=e.style,f=void 0===s?{}:s;return o.a.createElement(zn,{className:u||"",style:f},t&&o.a.createElement(Mn,{className:"align-".concat(a)},t),o.a.createElement("div",{className:"content"},n),i&&o.a.createElement(Mn,{className:"align-".concat(c)},i))},Ln=function(e){return o.a.createElement(Fn,e)};function Bn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n font-family: ",";\n\n > .nui-settings-head {\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n"]);return Bn=function(){return e},e}Ln.propTypes={header:l.a.element,headerAlign:l.a.oneOf(["left","right"]),footer:l.a.element,footerAlign:l.a.oneOf(["left","right"]),className:l.a.string,style:l.a.object},Ln.defaultProps={header:void 0,headerAlign:"left",footer:void 0,footerAlign:"right",className:void 0,style:{}};var Dn=Object(b.a)((function(e){var n=e.title,t=void 0===n?"":n,r=e.contentAlign,a=void 0===r?"left":r;return o.a.createElement("div",{className:e.className||""},t?o.a.createElement("div",{className:"nui-settings-head"},t):null,o.a.createElement("div",{className:"nui-settings-content nui-settings-content-align-".concat(a)},e.children))}))(Bn(),y.fontFamily,y.fontFamily),qn=function(e){return o.a.createElement(Dn,e)};function Un(){var e=Hn(["\n background-color: ",";\n color: white;\n"]);return Un=function(){return e},e}function Gn(){var e=Hn(["\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n"]);return Gn=function(){return e},e}function Hn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}qn.propTypes={title:l.a.string,className:l.a.string,contentAlign:l.a.string},qn.defaultProps={title:"",className:void 0,contentAlign:"left"};var Wn=b.a.div(Gn()),$n=Object(b.a)((function(e){return e.children?o.a.createElement("div",{className:e.className},e.children):null}))(Un(),y.blue),Yn=function(e){return o.a.createElement(Wn,{className:"window"},o.a.createElement($n,null,e.title),e.children)},Jn=function(e){return o.a.createElement(Yn,e)};function Vn(){return(Vn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Kn(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Zn(){var e=Qn(["\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n"]);return Zn=function(){return e},e}function Xn(){var e=Qn(["\n display: flex;\n flex-wrap: wrap;\n"]);return Xn=function(){return e},e}function Qn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Jn.propTypes={title:l.a.string},Jn.defaultProps={title:void 0};var et=b.a.div(Xn()),nt=b.a.div(Zn()),tt=function(e){return o.a.createElement(et,null,e.children)},rt=function(e){var n=e.full,t=e.minimal,r=Kn(e,["full","minimal"]),a=n?"full":"";return a+=t?" minimal":"",o.a.createElement(nt,Vn({className:a},r),e.children)},at=function(e){return o.a.createElement(tt,e)},ot=function(e){return o.a.createElement(rt,e)};at.propTypes={},at.defaultProps={},ot.propTypes={full:l.a.any},ot.defaultProps={full:void 0};var it=t(16),lt=t.n(it),ct=t(17),ut=t.n(ct);function st(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-family: ",";\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n"]);return st=function(){return e},e}var ft=Object(b.a)((function(e){var n=e.id,t=e.name,r=e.checked,a=void 0!==r&&r,i=e.onChange,l=e.label,c=e.description,u=e.isPro,s=e.disabled,f=e.requirePro,d=void 0!==f&&f&&!u,m=s||d,p=m?"disabled":"";return o.a.createElement("div",{className:["nui-checkbox",e.className,p].join(" ")},o.a.createElement("input",{id:n,name:t,type:"checkbox",defaultChecked:!1,onClick:function(){i?i(!a,n):console.log("The onChange handler it not set for this checkbox.",e)},disabled:m}),o.a.createElement("label",{htmlFor:n},o.a.createElement("div",{className:"nui-checkbox-check-container"},o.a.createElement(v.Icon,{icon:a?ut.a:lt.a,width:"30px",height:"30px",color:m?y.disabledForm:y.blue})),o.a.createElement("div",{className:"nui-checkbox-inner-container"},o.a.createElement("span",{className:"label"},l,o.a.createElement(Ne,{className:"inline",show:d})),c?o.a.createElement("small",{className:"description"},c):null)))}))(st(),y.fontFamily,y.disabledForm),dt=function(e){return o.a.createElement(ft,e)};function mt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n"]);return mt=function(){return e},e}dt.propTypes={id:l.a.string,name:l.a.string,checked:l.a.bool,label:l.a.string,description:l.a.string,isPro:l.a.bool,requirePro:l.a.bool},dt.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1};var pt=Object(b.a)((function(e){var n=e.name,t=(e.max,e.isPro),r=void 0!==t&&t;return o.a.Children.map(e.children,(function(e){return e.props.name?e:o.a.cloneElement(e,{name:n,isPro:r})}))}))(mt()),ht=function(e){return o.a.createElement(pt,e)};function bt(){return(bt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function gt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return yt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function vt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Et(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-input {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return Et=function(){return e},e}ht.propTypes={name:l.a.string,mas:l.a.number,isPro:l.a.bool},ht.defaultProps={name:void 0,mas:-1,isPro:!1};var xt=Object(b.a)((function(e){var n=e.id,t=e.name,r=e.value,i=void 0===r?"":r,l=e.description,c=e.placeholder,u=void 0===c?"":c,s=e.onEnter,f=void 0===s?null:s,d=e.readOnly,m=void 0!==d&&d,p=e.type,h=void 0===p?"text":p,b=e.step,g=void 0===b?1:b,y=e.min,v=void 0===y?1:y,E=e.max,x=void 0===E?999:E,w=e.maxLength,k=void 0===w?3:w,R=e.className,O=e.style,j=e.natural,S=void 0!==j&&j,P=vt(e,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural"]),C=gt(Object(a.useState)(i),2),_=C[0],A=C[1],T=!!e.onChange;Object(a.useEffect)((function(){T||A(i)}),[i]);var N=function(t){T?e.onChange(t.target.value,n):A(t.target.value,n)},I=function(t){f&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},z=function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},M="neko-input ".concat(S?" natural":"");return o.a.createElement("div",{className:[R].join(" "),style:O},"number"===h?o.a.createElement("input",bt({className:[M].join(" ")},P,{id:n,name:t,value:T?i:_,type:h,step:g,min:v,max:x,maxlength:k,placeholder:u,onChange:N,onKeyPress:I,onBlur:z,readOnly:m})):o.a.createElement("input",bt({className:[M].join(" ")},P,{id:n,name:t,value:T?i:_,type:h,spellcheck:"false",placeholder:u,onChange:N,onKeyPress:I,onBlur:z,readOnly:m})),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(Et(),y.fontFamily,y.fontSizeText,y.blue,y.gray,y.fontFamily,y.fontSizeSmall),wt=function(e){return o.a.createElement(xt,e)};function kt(){return(kt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Rt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ot(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ot(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function jt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function St(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return St=function(){return e},e}wt.propTypes={id:l.a.string,type:l.a.oneOf(["number","text"]),name:l.a.string,value:l.a.string,description:l.a.string,placeholder:l.a.string,onChange:l.a.func,onEnter:l.a.func,onBlur:l.a.func,readOnly:l.a.bool,step:l.a.number,min:l.a.number,max:l.a.number,maxLength:l.a.number,natural:l.a.bool},wt.defaultProps={id:void 0,type:"text",name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1,step:1,min:1,max:999,maxLength:3,natural:!1};var Pt=Object(b.a)((function(e){var n=e.id,t=e.name,r=e.value,i=void 0===r?"":r,l=e.description,c=e.placeholder,u=void 0===c?"":c,s=e.onEnter,f=void 0===s?null:s,d=e.readOnly,m=void 0!==d&&d,p=(e.maxLength,e.className),h=e.style,b=jt(e,["id","name","value","description","placeholder","onEnter","readOnly","maxLength","className","style"]),g=Rt(Object(a.useState)(i),2),y=g[0],v=g[1],E=!!e.onChange;Object(a.useEffect)((function(){E||v(i)}),[i]);return o.a.createElement("div",{className:[p].join(" "),style:h},o.a.createElement("textarea",kt({className:"neko-textarea"},b,{id:n,name:t,spellCheck:"false",placeholder:u,onChange:function(t){E?e.onChange(t.target.value,n):v(t.target.value,n)},onKeyPress:function(t){f&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},onBlur:function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},readOnly:m}),E?i:y),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(St(),y.fontFamily,y.fontSizeText,y.blue,y.gray,y.fontFamily,y.fontSizeSmall),Ct=function(e){return o.a.createElement(Pt,e)};Ct.propTypes={id:l.a.string,name:l.a.string,value:l.a.string,description:l.a.string,placeholder:l.a.string,onChange:l.a.func,onEnter:l.a.func,onBlur:l.a.func,readOnly:l.a.bool},Ct.defaultProps={id:void 0,name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1};var _t=t(50),At=t.n(_t),Tt=t(51),Nt=t.n(Tt);function It(){var e=Wt(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ",";\n display: flex;\n justify-content: space-between;\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n"]);return It=function(){return e},e}function zt(){var e=Wt(["\n font-family: ",";\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n"]);return zt=function(){return e},e}function Mt(){return(Mt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ft(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Lt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Bt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Dt(){var e=Wt(["\n background-color: ",";\n"]);return Dt=function(){return e},e}function qt(){var e=Wt(["\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n"]);return qt=function(){return e},e}function Ut(){var e=Wt(["\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n"]);return Ut=function(){return e},e}function Gt(){var e=Wt(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 8px;\n display: flex;\n font-family: ",";\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return Gt=function(){return e},e}function Ht(){var e=Wt(["\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ",";\n border-radius: 8px 8px 0 0;\n }\n"]);return Ht=function(){return e},e}function Wt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var $t=b.a.div(Ht(),y.blue),Yt=b.a.div(Gt(),y.white,y.blue,y.fontFamily),Jt=b.a.div(Ut()),Vt=b.a.div(qt()),Kt=b.a.div(Dt(),y.white),Zt=function(e){var n,t=e.id,r=e.name,i=e.value,l=e.scrolldown,c=void 0!==l&&l,u=e.isPro,s=void 0!==u&&u,f=e.onChange,d=Bt(e,["id","name","value","scrolldown","isPro","onChange"]),m=null===(n=o.a.Children.toArray(e.children).find((function(e){return e.props.value===i||e.props.checked})))||void 0===n?void 0:n.props,p=(null==m?void 0:m.label)||"Select",h=(null==m?void 0:m.description)||e.description,b=(null==m?void 0:m.requirePro)||!1,g=Ft(Object(a.useState)(!1),2),y=g[0],E=g[1],x=c?He((function(){E(!1)})):null,w=b&&!s,k=function(n){if(n!==i){if(!f)return void console.log("The onChange handler it not set for this checkbox.",e);f(n,t)}c&&E(!1)},R=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{name:e.props.name||r,checked:e.props.value===i||e.props.checked,onClick:k,scrolldown:c,isPro:s})}));return c?o.a.createElement($t,Mt({id:t,ref:x},d,{onClick:function(){return E(!y)},className:["nui-select",y?"show-options":""],childrenLength:R.length}),o.a.createElement(Yt,null,p,o.a.createElement("div",{className:"rightContent"},w&&o.a.createElement(Ne,null),o.a.createElement(v.Icon,{icon:y?L.a:M.a,width:"24"}))),h&&o.a.createElement(Jt,null,h),y&&o.a.createElement(Vt,{className:y?"":"hidden"},o.a.createElement(Kt,null,[R]))):R},Xt=b.a.div(zt(),y.fontFamily,y.disabledForm),Qt=b.a.div(It(),y.blue,y.fontFamily,y.white,y.fontFamily),er=function(e){var n=e.id,t=e.name,r=e.value,a=e.checked,i=e.label,l=e.description,c=e.onClick,u=e.scrolldown,s=e.isPro,f=void 0!==s&&s,d=e.requirePro,m=void 0!==d&&d&&!f,p=m?"disabled":"",h=o.a.createElement(Xt,{className:"nui-select ".concat(e.className||""," ").concat(p)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(e){return c(e.target.value)},disabled:m}),o.a.createElement("label",{htmlFor:n},o.a.createElement(v.Icon,{icon:a?Nt.a:At.a,width:"24px",color:m?y.disabledForm:y.blue}),o.a.createElement("div",{className:"inner-container"},o.a.createElement("span",{className:"label"},i,o.a.createElement(Ne,{className:"inline",style:{top:-1},show:m})),l?o.a.createElement("small",{className:"description"},l):null))),b=o.a.createElement(Qt,{className:"nui-select ".concat(e.className||""," ").concat(p)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,disabled:m}),o.a.createElement("div",{className:"option",onClick:function(){return c(r)}},i,o.a.createElement(Ne,{show:m})));return u?b:h},nr=function(e){return o.a.createElement(Zt,e)};nr.propTypes={id:l.a.string,name:l.a.string,description:l.a.string,scrolldown:l.a.bool,isPro:l.a.bool,onChange:l.a.func},nr.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0};var tr=function(e){return o.a.createElement(er,e)};tr.propTypes={id:l.a.string,name:l.a.string,value:l.a.string,checked:l.a.bool,label:l.a.string,description:l.a.string,onClick:l.a.func,scrolldown:l.a.bool,isPro:l.a.bool,requirePro:l.a.bool},tr.defaultProps={id:void 0,name:void 0,value:void 0,checked:!1,label:void 0,description:void 0,onClick:void 0,scrolldown:!1,isPro:!1,requirePro:!1};var rr=t(18),ar=t.n(rr),or=t(52),ir=t.n(or),lr=t(53),cr=t.n(lr),ur=t(54),sr=t.n(ur);function fr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return dr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function mr(){var e=gr(["\n margin-left: 5px;\n"]);return mr=function(){return e},e}function pr(){var e=gr(["\n border-left: 1px solid ",";\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n"]);return pr=function(){return e},e}function hr(){var e=gr(["\n height: 24px;\n width: 24px;\n"]);return hr=function(){return e},e}function br(){var e=gr(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n"]);return br=function(){return e},e}function gr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var yr=function(e){var n=e.chevron,t=void 0===n||n;return o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:t})}))},vr=b.a.div(br()),Er=b.a.div(hr()),xr=b.a.div(pr(),y.finderBorder),wr=b.a.div(mr()),kr=function(e){var n={gallery:cr.a,tag:sr.a},t=e.title,r=e.chevron,a=e.rightElement,i=void 0===a?null:a,l=e.showRightElement,c=void 0!==l&&l,u=!e.icon,s=!!e.icon,f=!!e.children,d=fr(o.a.useState(!1),2),m=d[0],p=d[1],h=fr(o.a.useState((function(){return"string"==typeof e.icon&&Object.keys(n).includes(e.icon)?n[e.icon]:e.icon?e.icon:ar.a})),2),b=h[0],g=h[1],E=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:r})}));return o.a.createElement("div",null,o.a.createElement(vr,{onClick:function(){(u||f)&&(s||g(m?ar.a:ir.a),p(!m))},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,className:"".concat(u||E?"can-expand":"")},r?u||E?o.a.createElement(v.Icon,{icon:m?M.a:I.a,width:"24",height:"24"}):o.a.createElement(Er,null):null,o.a.createElement(v.Icon,{icon:b,color:y.blue,width:"24",height:"24"}),o.a.createElement("p",null,t),c&&o.a.createElement(wr,null,i)),m&&o.a.createElement(xr,{className:"".concat(u?"":"no-line"," ").concat(r?"":"no-chevron")},E))},Rr=function(e){return o.a.createElement(yr,e)};Rr.propTypes={chevron:l.a.bool},Rr.defaultProps={chevron:!0};var Or=function(e){return o.a.createElement(kr,e)};function jr(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n"]);return jr=function(){return e},e}Or.propTypes={icon:l.a.oneOfType([l.a.instanceOf(v.IconifyIcon),l.a.oneOf(["gallery"])]),title:l.a.string},Or.defaultProps={icon:ar.a,title:void 0};var Sr=b.a.div(jr()),Pr=function(){return o.a.createElement(Sr,null,o.a.createElement("svg",{width:"54",height:"38",viewBox:"0 0 54 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z",fill:"#724024",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",stroke:"black"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",stroke:"black"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",stroke:"black"}),o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z",fill:"white",stroke:"black",strokeWidth:"2.1869"})))},Cr=function(e){return o.a.createElement(Pr,e)};function _r(e){return(_r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ar(){var e=Nr(["\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ",";\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ",";\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ",";\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n"]);return Ar=function(){return e},e}function Tr(){var e=Nr(["\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &.stop {\n background: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return Tr=function(){return e},e}function Nr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Cr.propTypes={},Cr.defaultProps={};var Ir=Object(b.a)((function(e){var n=e.value,t=void 0===n?0:n,r=e.max,a=void 0===r?100:r,i=e.busy,l=void 0!==i&&i,c=e.status;t=Math.min(t,a);var u=parseFloat(t)/parseFloat(a);return o.a.createElement("div",{className:e.className},o.a.createElement(zr,{ratio:u,busy:e.busy,status:c}),o.a.createElement("div",{className:"nui-progress-buttons"},l&&e.onPauseClick&&o.a.createElement("div",{className:"nui-progress-button pause",onClick:e.onPauseClick},e.paused?o.a.createElement(v.InlineIcon,{icon:U.a}):o.a.createElement(v.InlineIcon,{icon:D.a})),l&&e.onStopClick&&o.a.createElement("div",{className:"nui-progress-button stop",onClick:e.onStopClick},o.a.createElement(v.InlineIcon,{icon:J.a}))))}))(Tr(),y.blue,Object(g.a)(.1,y.blue),y.red,Object(g.a)(.1,y.red)),zr=Object(b.a)((function(e){var n,t,r,a=isNaN(e.ratio)?0:parseInt(Math.round(100*e.ratio)),i=_r(e.status),l="undefined"!==i?"string"===i?e.status:e.status(a):"".concat(a,"%");return o.a.createElement("div",{className:e.className,style:(n={minWidth:28},t="minWidth",r=a+"%",t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n)},o.a.createElement("div",null,l))}))(Ar(),y.progress,y.fontFamily,(function(e){return e.busy?"animate-stripes 1.6s linear infinite":"none"})),Mr=function(e){return o.a.createElement(Ir,e)};function Fr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Lr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Br(){var e=qr(["\n\tbackground-color: rgba(",", 0.8);\n\tborder-radius: 4px;\n\tcolor: ",";\n\tfont-family: ",";\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ",";\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ",';\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(',", 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t","\n"]);return Br=function(){return e},e}function Dr(){var e=qr(["\n\tdisplay: flex;\n"]);return Dr=function(){return e},e}function qr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Mr.propTypes={value:l.a.number,max:l.a.number,busy:l.a.bool,paused:l.a.bool,onPauseClick:l.a.func,onStopClick:l.a.func,status:l.a.oneOf([l.a.string,l.a.func])},Mr.defaultProps={value:0,max:100,busy:!1,paused:!1,onPauseClick:void 0,onStopClick:void 0,status:void 0};var Ur=b.a.div(Dr()),Gr=b.a.div(Br(),y.blackRGB,y.white,y.fontFamily,y.fontSizeText,(function(e){return e.visible?"inline-block":"none"}),y.blackRGB,y.blackRGB,y.blackRGB,y.blackRGB,(function(e){return e.style})),Hr=function(e){var n=e.text,t=void 0===n?"Hello world!":n,r=e.position,i=void 0===r?"top":r,l=Fr(Object(a.useState)(!1),2),c=l[0],u=l[1],s=Ge(),f=s.ref,d=s.width,m=s.height,p=Ge(),h=p.ref,b=p.width,g=p.height,y=Object(a.useMemo)((function(){var e=0,n=0;if("top"===i)e=-1*m-5,n=d/2*-1+b/2;else if("bottom"===i)e=g+5,n=d/2*-1+b/2;else if("left"===i){e=(m-g)/2*-1,n=-1*d-5}else if("right"===i){e=(m-g)/2*-1,n=b+5}return{transform:"translateX(".concat(n,"px) translateY(").concat(e,"px)")}}),[i,d,m,b,g]);return o.a.createElement(Ur,null,o.a.createElement(Gr,{ref:f,visible:c,className:i,style:y},t),o.a.createElement("div",{ref:h,onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)}},e.children))},Wr=function(e){return o.a.createElement(Hr,e)};function $r(){return($r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Yr(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Jr(){var e=Kr(["\n\n path {\n fill: ",";\n }\n\n ","\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n"]);return Jr=function(){return e},e}function Vr(){var e=Kr(["\n display: flex;\n align-items: center;\n"]);return Vr=function(){return e},e}function Kr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Wr.propTypes={text:l.a.string,position:l.a.oneOf(["top","right","bottom","left"])},Wr.defaultProps={text:"Hello world!",position:"top"};var Zr=b.a.div(Vr()),Xr=Object(b.a)(v.Icon)(Jr(),(function(e){return e.color}),(function(e){return function(e){if(e)return"\n &:hover {\n path {\n fill: ".concat(Object(g.a)(.1,e),";\n }\n }\n ")}(e.color)})),Qr=function(e){var n=e.icon,t=e.spinning,r=void 0!==t&&t,a=e.className,i=void 0===a?"":a,l=e.title,c=e.tooltip,u=e.containerStyle,s=e.color,f=Yr(e,["icon","spinning","className","title","tooltip","containerStyle","color"]);f.width||f.height||(f.width=f.height=30);var d=function(){return"string"==typeof n?xe[n]||null:n},m="nui-icon ".concat(i).concat(f.onClick?" nui-clickable":"").concat(r?" spin":"");return c?o.a.createElement(Wr,{text:c.text,position:c.position||"top"},o.a.createElement(Zr,{style:u},o.a.createElement(Xr,$r({icon:d(),className:m,color:s},f)))):o.a.createElement(Zr,{style:u,title:l},o.a.createElement(Xr,$r({icon:d(),className:m,color:s},f)),c?o.a.createElement(Wr,null,c):null)},ea=function(e){return o.a.createElement(Qr,e)};ea.propTypes={icon:l.a.oneOfType([l.a.instanceOf(v.IconifyIcon),l.a.oneOf(["lock","lock-open","file-undo","chevron-double-left","chevron-double-right","chevron-left","chevron-right","chevron-down","chevron-up","pause","play","replay","check","stop","delete","undo","alert","database","pencil","tools","cog","close","cat","upload"])]),color:l.a.string,spinning:l.a.bool,className:l.a.string,tooltip:l.a.string},ea.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0};var na=t(55),ta=t.n(na);function ra(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n color: white;\n font-family: ",";\n font-size: ",";\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ",";\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ",";\n line-height: normal;\n font-size: ",";\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n"]);return ra=function(){return e},e}var aa=b.a.div(ra(),y.fontFamily,y.fontSizeText,y.header,y.fontFamily,y.fontFamily,y.fontSizeText),oa=function(e){var n=e.title,t=void 0===n?"NekoUI":n,r=e.subtitle,a=void 0===r?"By Jordy Meow":r,i=e.children,l=e.saving,c=void 0!==l&&l;return o.a.createElement(aa,null,o.a.createElement("div",{className:"nui-header-logo-container"},o.a.createElement(Cr,null)),o.a.createElement("div",{className:"nui-header-title-container"},o.a.createElement("h1",{className:"nui-header-title"},t),o.a.createElement("small",{className:"nui-header-subtitle"},o.a.createElement("a",{target:"_blank",href:"https://meowapps.com",style:{color:"white",textDecoration:"none"}},a))),o.a.createElement("div",{className:"nui-header-extra-content"},i),c&&o.a.createElement(ea,{icon:ta.a,width:"36",height:"36"}))},ia=function(e){return o.a.createElement(oa,e)};function la(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(",", 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ",";\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ",";\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ",";\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n }\n"]);return la=function(){return e},e}ia.propTypes={title:l.a.string,subtitle:l.a.string,saving:l.a.bool},ia.defaultProps={title:"NekoUI",subtitle:"By Jordy Meow",saving:!1};var ca=b.a.div(la(),y.fontFamily,y.blueRGB,y.white,y.darkGray,y.white,y.fontFamily),ua=function(e){var n=e.currentPage,t=e.limit,r=e.onClick,a=e.total,i=Math.ceil(0===a?1:t>0?a/t:1),l="nako-paging-controller-icon ".concat(1===n?"disabled":""),c="nako-paging-controller-icon ".concat(n===i?"disabled":""),u=function(e){r(e)};return o.a.createElement(ca,null,o.a.createElement("span",{className:"neko-paging-text"},a," result",a>0?"s":""),o.a.createElement("div",{className:"neko-paging-controller"},o.a.createElement(v.Icon,{icon:P.a,className:l,onClick:function(){return u(1)}}),o.a.createElement(v.Icon,{icon:T.a,className:l,onClick:function(){return u(n-1)}}),o.a.createElement("p",{className:"nako-paging-controller-text"},"Page ",n," of ",i),o.a.createElement(v.Icon,{icon:I.a,className:c,onClick:function(){return u(n+1)}}),o.a.createElement(v.Icon,{icon:_.a,className:c,onClick:function(){return u(i)}})))},sa=function(e){return o.a.createElement(ua,e)};function fa(){var e=ma(["\n color: ",";\n cursor: pointer;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ",';\n font-weight: bold;\n }\n\n &::after {\n content: "|";\n color: ',";\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ",";\n font-weight: normal;\n margin-left: 4px;\n }\n"]);return fa=function(){return e},e}function da(){var e=ma(["\n display: flex;\n align-items: center;\n"]);return da=function(){return e},e}function ma(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}sa.propTypes={currentPage:l.a.number,limit:l.a.number,total:l.a.number,onClick:l.a.func},sa.defaultProps={currentPage:void 0,limit:void 0,total:void 0,onClick:void 0};var pa=b.a.div(da()),ha=b.a.span(fa(),y.blue,y.fontFamily,y.black,y.darkGray,y.darkGray),ba=function(e){var n=e.id,t=e.value,r=e.onChange,a=e.busy,i=void 0!==a&&a,l=o.a.Children.map(e.children,(function(e,a){return o.a.cloneElement(e,{busy:i,isActive:e.props.value===t,onClick:function(e){e!==t&&r(e,n)}})}));return o.a.createElement(pa,null,l)},ga=function(e){var n=e.title,t=e.value,r=void 0===t?0:t,a=e.count,i=e.onClick,l=e.busy,c=e.isActive;return o.a.createElement(ha,{onClick:function(){return i(r)},className:"".concat(c?"is-active":"")},n,null===a?null:o.a.createElement("span",null,"(",l?o.a.createElement(ea,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):a,")"))},ya=function(e){return o.a.createElement(ba,e)};ya.propTypes={id:l.a.string,value:l.a.string,onChange:l.a.func},ya.defaultProps={id:void 0,value:void 0,onChange:void 0};var va=function(e){return o.a.createElement(ga,e)};function Ea(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ","px;\n height: ","px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ","px;\n height: ",'px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: "";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ',";\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ","px;\n height: ",'px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ',"px;\n height: ","px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ","px;\n height: ","px;\n \n .semi-circle--mask {\n transform: rotate(","deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ","px;\n height: ","px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return Ea=function(){return e},e}va.propTypes={title:l.a.string,value:l.a.string,count:l.a.number,onClick:l.a.func,isActive:l.a.bool},va.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1};var xa=b.a.section(Ea(),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.backgroundColor}),(function(e){return e.width}),(function(e){return e.width}),(function(e){return e.width+2}),(function(e){return e.width/2+2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.degrees}),(function(e){return e.width+2}),(function(e){return e.width/2})),wa=function(e){var n=e.value,t=void 0===n?1e3:n,r=(e.min,e.max),a=void 0===r?2500:r,i=e.width,l=void 0===i?200:i,c=e.background,u=void 0===c?"#007cba":c,s=e.children,f=180*(t<=a?t:a)/a;return o.a.createElement(xa,{backgroundColor:u,degrees:f,width:l},o.a.createElement("div",{class:"gauge"},o.a.createElement("div",{class:"mask"},o.a.createElement("div",{class:"semi-circle"}),o.a.createElement("div",{class:"semi-circle--mask"})),o.a.createElement("div",{class:"child-container"},o.a.createElement("div",{class:"child"},o.a.createElement("div",{class:"spacing"}),s))))};function ka(){var e=Oa(["\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return ka=function(){return e},e}function Ra(){var e=Oa(["\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return Ra=function(){return e},e}function Oa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}wa.propTypes={value:l.a.number,min:l.a.number,max:l.a.number,width:l.a.number,background:l.a.string},wa.defaultProps={value:1e3,min:0,max:2500,width:200,background:"#007cba"};var ja=b.a.p(Ra()),Sa=b.a.p(ka());function Pa(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ca(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pa(Object(t),!0).forEach((function(n){_a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pa(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function _a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Aa(e){return function(e){if(Array.isArray(e))return za(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ia(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ta(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Na(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Ia(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ia(e,n){if(e){if("string"==typeof e)return za(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?za(e,n):void 0}}function za(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ma(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n background: #f1f1f1;\n border: 2px dashed rgb(0 0 0 / 30%);\n color: rgb(0 0 0 / 60%);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.25s ease;\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n"]);return Ma=function(){return e},e}var Fa=b.a.div(Ma()),La=function(e){var n=e.width,t=void 0===n?"100%":n,r=e.height,i=void 0===r?"100%":r,l=e.iconSize,c=void 0===l?48:l,u=e.onSuccess,s=void 0===u?function(){}:u,f=e.onFailure,d=void 0===f?function(){}:f,m=e.style,p=void 0===m?{}:m,b=e.apiUrl,g=e.apiConfig,y=Na(Object(a.useState)(!1),2),v=y[0],E=y[1],x=Na(Object(a.useState)(!1),2),w=x[0],k=x[1],R=function(){var e,n=(e=regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),g.file=n[0],e.next=4,Jo(b,g);case 4:(t=e.sent).success?s(t):d(t),k(!1);case 7:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Ta(o,r,a,i,l,"next",e)}function l(e){Ta(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),O=function(e){e.preventDefault(),e.stopPropagation()},j=function(e){e.preventDefault(),e.stopPropagation(),E(!0)};return o.a.createElement(h,{busy:w},o.a.createElement(Fa,{style:Ca(Ca({},p),{},{width:t,height:i}),className:v?"dropping":"",onDragOver:O,onDragEnter:j,onDragLeave:function(e){e.preventDefault(),e.stopPropagation(),E(!1)},onDrop:function(e){var n=Aa(e.dataTransfer.files);e.preventDefault(),e.stopPropagation(),E(!1),R(n)}},o.a.createElement(ea,{width:c,height:c,icon:"upload",spinning:w,onDragOver:O,onDragEnter:j})))};La.propTypes={width:l.a.string,height:l.a.string,onSuccess:l.a.func,onFailure:l.a.func,style:l.a.object,apiUrl:l.a.string,apiConfig:l.a.object},La.defaultProps={width:"100%",height:"100%",onSuccess:function(){},onFailure:function(){},style:{}};var Ba=t(56),Da=t.n(Ba);function qa(){return(qa=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ua(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Ga(){var e=Wa(["\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n"]);return Ga=function(){return e},e}function Ha(){var e=Wa(["\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: "," !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ",";\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n"]);return Ha=function(){return e},e}function Wa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var $a=b.a.div(Ha(),y.overlay,y.white),Ya=b.a.div(Ga(),y.fontFamily,y.fontFamily),Ja=function(e){var n=e.children,t=e.className,r=e.style,a=e.ok,i=void 0===a?"OK":a,l=e.cancel,c=void 0===l?"Cancel":l,u=e.customButtons,s=void 0===u?null:u,f=e.title,d=void 0===f?"":f,m=e.content,p=void 0===m?"":m,h=e.onOkClick,b=e.onCancelClick,g=Ua(e,["children","className","style","ok","cancel","customButtons","title","content","onOkClick","onCancelClick"]),y=r?"custom-modal":"",v=n||o.a.createElement(Ya,null,d&&o.a.createElement("p",{className:"title"},d),p&&o.a.createElement("p",{className:"content"},p),o.a.createElement("div",{className:"button-group"},b&&o.a.createElement(Se,{className:"danger",onClick:b},c),h&&o.a.createElement(Se,{onClick:h},i),s));return o.a.createElement(o.a.Fragment,null,o.a.createElement($a,{id:"neko-modal-parent"}),o.a.createElement(Da.a,qa({ariaHideApp:!1,parentSelector:function(){return document.getElementById("neko-modal-parent")},closeTimeoutMS:200,className:"neko-modal ".concat(t||""," ").concat(y)},g),v))},Va=function(e){return o.a.createElement(Ja,e)};Va.propTypes={className:l.a.string,style:l.a.object,ok:l.a.string,cancel:l.a.string,title:l.a.string,content:l.a.string,onOkClick:l.a.func,onCancelClick:l.a.func,customButtons:l.a.object},Va.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null};var Ka=t(57),Za=t.n(Ka);function Xa(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Qa(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(",", 0.1);\n border-right: 1px solid rgba(",", 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ",";\n color: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: rgba(",", 0.8);\n color: ",";\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n"]);return Qa=function(){return e},e}var eo=b.a.table(Qa(),y.white,y.fontFamily,y.blackRGB,y.blackRGB,y.blue,y.white,y.tableGray,y.blueRGB,y.white),no=function(e){var n=e.checked,t=e.intermediate,r=void 0!==t&&t,a=e.onSelect,i=void 0===a?function(){}:a,l=e.onUnselect,c=void 0===l?function(){}:l;Xa(e,["checked","intermediate","onSelect","onUnselect"]);return o.a.createElement(v.Icon,{icon:r?Za.a:n?ut.a:lt.a,width:"24px",height:"24px",onClick:function(){n?c():i()}})},to=function(e){var n=e.columns,t=e.data,r=e.busy,a=void 0!==r&&r,i=e.onSelect,l=e.onUnselect,c=e.selectedItems,u=e.sort,s=e.onSortChange,f=n.length+(i?1:0),d=t.map((function(e){var t=n.map((function(n){return{value:e[n.accessor],style:n.style||{}}}));return{id:e.id,cells:t}})),m=d.map((function(e){return e.id})),p=m.filter((function(e){return c.includes(e)})).length===m.length,b=!p&&c.length>0,g=n.reduce((function(e,n,t){return!1===n.visible&&e.push(t),e}),[]),E=o.a.createElement("tr",null,i&&o.a.createElement("th",{className:"table-checkbox-cell"},o.a.createElement(no,{checked:p,intermediate:b,onSelect:function(){return i(m)},onUnselect:function(){l(b?c:m)}})),n.filter((function(e,n){return!g.includes(n)})).map((function(e){var n=u&&u.accessor===e.accessor,t=u&&"asc"===u.by,r=e.style||{};return o.a.createElement("th",{style:r,key:e.accessor},o.a.createElement("div",{className:e.sortable?"sortable":"",onClick:e.sortable?function(){s(e.accessor,n&&t?"desc":"asc")}:void 0},o.a.createElement("div",null,e.title),o.a.createElement("div",null,e.sortable&&o.a.createElement(v.Icon,{icon:n?t?M.a:L.a:M.a,color:n?y.white:"rgba(".concat(y.blackRGB,", 0.1)"),width:"1.6rem",height:"1.6rem"}))))})));return o.a.createElement(h,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},o.a.createElement(eo,null,o.a.createElement("thead",null,E),o.a.createElement("tbody",null,!d.length&&o.a.createElement("tr",null,o.a.createElement("td",{colspan:f,style:{textAlign:"center",height:40,color:"gray"}},"Empty.")),d.map((function(e){return o.a.createElement("tr",{className:c.includes(e.id)?"selected":""},i&&o.a.createElement("td",{className:"table-checkbox-cell"},o.a.createElement(no,{checked:c.includes(e.id),onSelect:function(){return i([e.id])},onUnselect:function(){return l([e.id])}})),e.cells.filter((function(e,n){return!g.includes(n)})).map((function(e){return o.a.createElement("td",{style:e.style},e.value)})))}))),o.a.createElement("tfoot",null,E)))},ro=function(e){return o.a.createElement(to,e)};function ao(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return oo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function io(){var e=so(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return io=function(){return e},e}function lo(){var e=so(["\n font-family: ",";\n font-size: ",";\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ",";\n color: ",";\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n"]);return lo=function(){return e},e}function co(){var e=so(["\n"]);return co=function(){return e},e}function uo(){var e=so(["\n"]);return uo=function(){return e},e}function so(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}ro.propTypes={columns:l.a.arrayOf(l.a.any),data:l.a.arrayOf(l.a.any),busy:l.a.arrayOf(l.a.bool),onSelect:l.a.func,onUnselect:l.a.func,selectedItems:l.a.arrayOf(l.a.object),onSortChange:l.a.func},ro.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0};var fo=b.a.div(uo()),mo=b.a.div(co()),po=b.a.button(lo(),y.fontFamily,y.fontSizeText,y.blue,y.white),ho=b.a.div(io(),y.blue),bo=function(e){var n=ao(o.a.useState(0),2),t=n[0],r=n[1],a=o.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),i=o.a.Children.map(e.children,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})}));return o.a.createElement(fo,null,o.a.createElement(mo,null,a.map((function(n,a){return o.a.createElement(po,{key:n.key,className:"neko-tab-title ".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(t){!function(n,t,a){t.requirePro||(r(n),e.onChange&&e.onChange(n,t,a))}(a,n,t)}},n.title,o.a.createElement(Ne,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:n.requirePro}))}))),i)},go=function(e){var n=e.children,t=e.isActive;return o.a.createElement(ho,{className:"".concat(t?"active":"")},n)},yo=function(e){return o.a.createElement(bo,e)};yo.propTypes={isPro:l.a.bool,onChange:l.a.func},yo.defaultProps={isPro:!1,onChange:void 0};var vo=function(e){return o.a.createElement(go,e)};function Eo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return xo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function wo(){var e=Oo(["\n background-color: ",";\n display: none;\n\n &.active {\n display: block;\n }\n"]);return wo=function(){return e},e}function ko(){var e=Oo(["\n align-items: center;\n background-color: ",";\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(",", 0.25);\n cursor: default;\n }\n\n p {\n color: ",";\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ",";\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n"]);return ko=function(){return e},e}function Ro(){var e=Oo(["\n"]);return Ro=function(){return e},e}function Oo(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}vo.propTypes={isActive:l.a.bool,requirePro:l.a.bool,title:l.a.string},vo.defaultProps={isActive:!1,requirePro:!1,title:void 0};var jo=b.a.div(Ro()),So=b.a.div(ko(),y.blue,y.yellowRGB,y.white,y.fontFamily,y.white),Po=b.a.div(wo(),y.white),Co=function(e){var n=Eo(o.a.useState(),2),t=n[0],r=n[1],a=o.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),i=o.a.Children.map(e.children,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})}));return o.a.createElement(jo,null,a.map((function(n,a){return o.a.createElement(o.a.Fragment,null,o.a.createElement(So,{key:n.key,className:"".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(o){!function(n,a,o){if(!a.requirePro){var i=n===t?null:n;r(i),e.onChange&&e.onChange(i,a,o)}}(a,n,o)}},o.a.createElement("p",null,n.title,o.a.createElement(Ne,{className:"inline",show:n.requirePro})),o.a.createElement(v.Icon,{icon:a===t?M.a:I.a,className:"neko-side-tab-icon"})),i[a])})))},_o=function(e){var n=e.children,t=e.isActive;return o.a.createElement(Po,{className:"".concat(t?"active":"")},n)},Ao=function(e){return o.a.createElement(Co,e)};Ao.propTypes={isPro:l.a.bool,onChange:l.a.func},Ao.defaultProps={isPro:!1,onChange:void 0};var To=function(e){return o.a.createElement(_o,e)};function No(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ",";\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(",", 0.1);\n\n &.left {\n justify-content: flex-start;\n }\n\n &.right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n"]);return No=function(){return e},e}To.propTypes={isActive:l.a.bool,requirePro:l.a.bool,title:l.a.string},To.defaultProps={isActive:!1,requirePro:!1,title:void 0};var Io=b.a.div(No(),y.white,y.blackRGB),zo=function(e){var n=e.align,t=void 0===n?"left":n;return o.a.createElement(Io,{className:t},e.children)},Mo=function(e){return o.a.createElement(zo,e)};Mo.propTypes={align:l.a.oneOf(["left","right"])},Mo.defaultProps={align:"left"};t(22);function Fo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var Lo=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Fo(this,e),this.url=r,this.message=n,this.code=t,this.body=a,this.debug=o};function Bo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Go(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Do(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function qo(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Do(o,r,a,i,l,"next",e)}function l(e){Do(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Uo(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=Go(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Go(e,n){if(e){if("string"==typeof e)return Ho(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ho(e,n):void 0}}function Ho(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Wo(e,n){for(var t=[],r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}var $o=function(e){if(!e.data)return e;if(e.data.length>0&&e.data[0].meta){var n,t=Uo(e.data);try{for(t.s();!(n=t.n()).done;){var r=n.value;try{r.meta=JSON.parse(r.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",r.meta)}}}catch(e){t.e(e)}finally{t.f()}}else if(e.data.meta)try{e.data.meta=JSON.parse(e.data.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",x.meta)}return e},Yo=function(){var e=qo(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>1&&void 0!==f[1]?f[1]:{},r=null,a={},o=null,i=null,e.prev=5,(t=t||{}).headers=t.headers?t.headers:{},t.headers.Pragma="no-cache",t.headers["Cache-Control"]="no-cache",e.next=12,fetch("".concat(n),t);case 12:return i=e.sent,e.next=15,i.text();case 15:r=e.sent,(a=JSON.parse(r)).success||(l=!1===a.success?"NOT-SUCCESS":"N/A",c=a.message?a.message:"Unknown error. Check your Console Logs.","rest_no_route"===a.code?(c="The API can't be accessed. Is Rest API enabled?",l="NO-ROUTE"):"internal_server_error"===a.code&&(c="Server error. Please check your PHP Error Logs.",l="SERVER-ERROR"),o=new Lo(c,l,n,r||i)),e.next=26;break;case 20:e.prev=20,e.t0=e.catch(5),u="BROKEN-REPLY",s="The reply sent by the server is broken.",i&&i.status&&408===i.status&&(u="REQUEST-TIMEOUT",s="The request generated a timeout."),o=new Lo(s,u,n,r||i,e.t0);case 26:return o&&(console.error("[NekoError] JsonFetcher",o.url,{code:o.code,error:o.error,body:o.body}),a.success=!1,a.error=o),e.abrupt("return",$o(a));case 28:case"end":return e.stop()}}),e,null,[[5,20]])})));return function(n){return e.apply(this,arguments)}}(),Jo=function(){var e=qo(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,f,d,m,p,h=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.length>1&&void 0!==h[1]?h[1]:{},r=t.json,a=void 0===r?{}:r,o=t.signal,i=t.file,l=t.nonce,c=i?new FormData:null,i)for(c.append("file",i),u=0,s=Object.entries(a);u<s.length;u++)f=Bo(s[u],2),d=f[0],m=f[1],c.append(d,m);return p=l?{"X-WP-Nonce":l}:{},c||(p["Content-Type"]="application/json"),e.abrupt("return",Yo(n,{method:"POST",headers:p,body:c||JSON.stringify(a),signal:o}));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Vo=wp.i18n.__,Ko={};Ko.RENAME=Vo("Rename","media-file-renamer"),Ko.DASHBOARD=Vo("Dashboard","media-file-renamer"),Ko.PENDING=Vo("Pending","media-file-renamer"),Ko.RENAMED=Vo("Renamed","media-file-renamer"),Ko.ALL=Vo("All","media-file-renamer"),Ko.THUMB=Vo("Thumb","media-file-renamer"),Ko.TITLE=Vo("Title","media-file-renamer"),Ko.ATTACHED_TO=Vo("Attached To","media-file-renamer"),Ko.FILENAME=Vo("Filename","media-file-renamer");var Zo=Ko,Xo=mfrh_media_file_renamer.prefix,Qo=mfrh_media_file_renamer.domain,ei=mfrh_media_file_renamer.rest_url.replace(/\/+$/,""),ni=mfrh_media_file_renamer.api_url.replace(/\/+$/,""),ti=mfrh_media_file_renamer.plugin_url.replace(/\/+$/,""),ri="1"===mfrh_media_file_renamer.is_pro,ai=ri&&"1"===mfrh_media_file_renamer.is_registered,oi=mfrh_media_file_renamer.rest_nonce,ii="1"===mfrh_media_file_renamer.mfrh_undo,li="1"===mfrh_media_file_renamer.mfrh_manual_rename;function ci(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function ui(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){ci(o,r,a,i,l,"next",e)}function l(e){ci(o,r,a,i,l,"throw",e)}i(void 0)}))}}function si(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return fi(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fi(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var di=wp.element,mi=di.useState,pi=di.useEffect,hi=function(e){var n=e.mutate,t=si(mi(e.entry),2),r=t[0],a=t[1],o=si(mi(!1),2),i=o[0],l=o[1],c=si(mi(""),2),u=c[0],s=c[1],f=si(mi(null),2),d=f[0],m=f[1],p=e.natural,b=void 0!==p&&p,g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!We){var n=e.concurrency,t=void 0===n?2:n;We=new ze.a({concurrency:t,autoStart:!0})}var r=function(){var e=Le(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,We.add(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return{runTask:r}}({concurrency:2}).runTask;pi((function(){s(""),e.entry?a(e.entry):e.mediaId&&v(e.mediaId)}),[e.entry]);var v=function(){var e=ui(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,g(ui(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Jo("".concat(ni,"/analyze"),{nonce:oi,json:{mediaId:n}}));case 1:case"end":return e.stop()}}),e)}))));case 3:t=e.sent,a(t.data),l((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=ui(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(n);case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=ui(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a(t),n&&n();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/rename"),{nonce:oi,json:{mediaId:r.ID}});case 3:n=e.sent,x(n.data),m(null),l((function(e){return e-1}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/rename"),{nonce:oi,json:{mediaId:r.ID,filename:u}});case 3:n=e.sent,x(n.data),m(null),s(""),l((function(e){return e-1}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/undo"),{nonce:oi,json:{mediaId:r.ID}});case 3:n=e.sent,x(n.data,r.current_filename),l((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/set_lock"),{nonce:oi,json:{mediaId:r.ID,lock:!r.locked}});case 3:n=e.sent,x(n.data),l((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=!!u,S=j?u:d||(null==r?void 0:r.current_filename);return React.createElement(h,{busy:i},React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(wt,{natural:b,readOnly:!li||i,value:S,onChange:E,onEnter:k,style:{marginRight:0,flex:"auto"}}),!j&&React.createElement(ea,{icon:(null==r?void 0:r.locked)?"lock":"lock-open",width:24,title:(null==r?void 0:r.locked)?"Unlock, to allow future actions":"Lock, to avoid future actions",style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?y.blue:"#5a5a5a82",onClick:O}),j&&React.createElement(ea,{icon:"close",width:24,style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?y.blue:"#5a5a5a82",onClick:function(){s("")}}),!j&&(null==r?void 0:r.proposed_filename)&&!(null==r?void 0:r.proposed_filename_exists)&&React.createElement(Se,{style:{marginLeft:5},title:"Rename automatically",onMouseEnter:function(){return m(null==r?void 0:r.proposed_filename)},onMouseLeave:function(){return m(null)},onClick:w},"Auto Rename"),li&&j&&React.createElement(Se,{style:{marginLeft:5},title:"Rename manually",onClick:k},Zo.RENAME),(null==r?void 0:r.proposed_filename_exists)&&React.createElement(ea,{icon:"alert",color:"orange",tooltip:{text:"The ideal filename (".concat(r.proposed_filename,") already exists."),position:"left"}}),ii&&!j&&(null==r?void 0:r.original_filename)&&React.createElement(ea,{icon:"file-undo",title:"Rollback to original",color:y.red,onClick:R,onMouseEnter:function(){return m(null==r?void 0:r.original_filename)},onMouseLeave:function(){return m(null)}})))};function bi(){var e=xi(["\n color: white;\n margin: 0px 15px 15px 15px;\n\n .fatal {\n padding: 8px 12px;\n border-radius: 10px;\n background: #ab3014;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .warning {\n padding: 8px 12px;\n border-radius: 10px;\n background: #b98c0e;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .notice {\n padding: 8px 12px;\n border-radius: 10px;\n background: #23ad74;\n margin: 0 0 10px 0;\n border: 0;\n }\n"]);return bi=function(){return e},e}function gi(){var e=xi(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n font-family: Lato;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]);return gi=function(){return e},e}function yi(){var e=xi(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]);return yi=function(){return e},e}function vi(){var e=xi(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]);return vi=function(){return e},e}function Ei(){var e=xi(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]);return Ei=function(){return e},e}function xi(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var wi=b.a.div(Ei()),ki=Object(b.a)(An)(vi()),Ri=b.a.img(yi()),Oi=b.a.div(gi()),ji=b.a.div(bi());function Si(e){return function(e){if(Array.isArray(e))return Ti(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ai(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Ci(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Pi(o,r,a,i,l,"next",e)}function l(e){Pi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function _i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Ai(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ai(e,n){if(e){if("string"==typeof e)return Ti(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ti(e,n):void 0}}function Ti(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ni=wp.element,Ii=Ni.useState,zi=Ni.useEffect,Mi="".concat(ei,"/meow-common/v1"),Fi=function(e){var n=e.request,t=e.title,r=e.max,a=_i(Ii(!1),2),o=a[0],i=a[1],l=_i(Ii([]),2),c=l[0],u=l[1],s=c.length>0?c.reduce((function(e,n){return e+n})):0,f=c.length>0?Math.ceil(s/c.length):0,d=!c.length&&o;zi((function(){o&&setTimeout(Ci(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(new Date).getTime(),e.next=3,Jo("".concat(Mi,"/").concat(n));case 3:r=(new Date).getTime(),a=r-t,u((function(e){return[].concat(Si(e),[a])}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[c]);return React.createElement(wi,{style:{width:200,textAlign:"center"}},React.createElement(Sn,{h2:!0,style:{color:"white"}},t),React.createElement(wa,{size:200,value:d?r:f,max:r},React.createElement("span",{style:{fontSize:20}},d?"START":f+" ms"),React.createElement("span",{style:{fontSize:12}},d?"YOUR ENGINE":c.length+" requests")),React.createElement(Se,{style:{width:"100%",marginTop:10},color:o?"#cc3627":"#ccb027",onClick:function(){o||u([]),i(!o)}},o?"Stop":"Start"))};function Li(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Bi(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Li(Object(t),!0).forEach((function(n){Di(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Li(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Di(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Ui(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Gi(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Gi(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Hi=wp.element,Wi=Hi.useState,$i=Hi.useEffect;ni&&ei&&ti||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var Yi="".concat(ei,"/meow-common/v1"),Ji=React.createElement(wi,null,React.createElement(Sn,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),Vi=React.createElement(wi,null,React.createElement(Sn,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(Sn,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),Ki=React.createElement(wi,null,React.createElement(Sn,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(Sn,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(Sn,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/debugging-wordpress/",target:"_blank"},"How To Debug")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/seo-optimization/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/",target:"_blank"},"Clean Up and Optimize")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/optimize-images-cdn/",target:"_blank"},"Optimize Images")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/best-hosting-services-wordpress/",target:"_blank"},"Best Hosting Services"))))),Zi=React.createElement(wi,null,React.createElement(Sn,{p:!0},"A summarized version of your PHP Error Logs will be displayed here, with the latest errors at the top. After it, you will find information about your PHP, so make sure your scroll down.")),Xi=function(){var e=Ui(Wi(!1),2),n=e[0],t=e[1],a=Object(r.b)("".concat(Yi,"/all_settings/"),Yo),o=a.data,i=a.mutate,l=a.error,c=null==o?void 0:o.data,u=null==c?void 0:c.meowapps_hide_meowapps,s=null==c?void 0:c.force_sslverify,f=Ui(Wi(!1),2),d=f[0],m=f[1],p=Ui(Wi(""),2),h=p[0],b=p[1],g=Ui(Wi(""),2),y=g[0],v=g[1];$i((function(){l&&!n&&(t(!0),console.error("Error from UseSWR",l.message))}),[l]),$i((function(){var e=document.getElementById("meow-common-phperrorlogs"),n=document.getElementById("meow-common-phpinfo");b(e.innerHTML),v(n.innerHTML)}),[]);var E=function(){var e,n=(e=regeneratorRuntime.mark((function e(n,t){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Bi({},o.data))[t]=n,i(Bi(Bi({},o),{},{data:r}),!1),m(!0),e.next=6,Jo("".concat(Yi,"/update_option"),{json:{name:t,value:n},nonce:oi});case 6:a=e.sent,m(!1),a.success||alert(a.message),i();case 10:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){qi(o,r,a,i,l,"next",e)}function l(e){qi(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e,t){return n.apply(this,arguments)}}(),x=React.createElement(qn,{title:"Main Menu"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(Sn,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:d,checked:u,onChange:E}))),w=React.createElement(qn,{title:"SSL Verify"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(Sn,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:d,checked:s,onChange:E})));return React.createElement(hn,{showRestError:n},React.createElement(ia,{title:"The Dashboard"}),React.createElement(at,null,React.createElement(ot,{full:!0},React.createElement(yo,null,React.createElement(vo,{title:"Meow Apps"},Ji,React.createElement(at,null,React.createElement(ot,{minimal:!0},React.createElement(ki,{title:"Media Cleaner",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/media-cleaner.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(ki,{title:"Media File Renamer",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/media-file-renamer.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(ki,{title:"Contact Form Block",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress."))),React.createElement(ki,{title:"Meow Analytics",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(ot,{minimal:!0},React.createElement(ki,{title:"Meow Gallery",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/meow-gallery.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(ki,{title:"Meow Lightbox",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/meow-lightbox.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(ki,{title:"WP/LR Sync",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/wplr-sync.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"WP/LR Sync")),React.createElement("p",null,"Are you using Lightroom? So you know WP/LR Sync already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(ki,{title:"Perfect Images + Retina",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/wp-retina-2x.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"Perfect Images + Retina")),React.createElement("p",null,"It handles Retina, help you managing the Image Sizes registered in your WP, and much more.")))))),React.createElement(vo,{title:"Performance"},Vi,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(Fi,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(Fi,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(Fi,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(vo,{title:"Recommendations"},Ki),React.createElement(vo,{title:"PHP Errors & Info"},Zi,React.createElement(ji,{dangerouslySetInnerHTML:{__html:h}}),React.createElement(Oi,{dangerouslySetInnerHTML:{__html:y}})),React.createElement(vo,{title:"Settings"},React.createElement(An,{title:"Settings",className:"primary"},x,w))))))};function Qi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function el(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Qi(o,r,a,i,l,"next",e)}function l(e){Qi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function nl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return tl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tl(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var rl=wp.element,al=rl.useState,ol=rl.useEffect,il="".concat(ei,"/meow-licenser/").concat(Xo,"/v1"),ll=function(){var e=nl(al(!1),2),n=e[0],t=e[1],r=nl(al(null),2),a=r[0],o=r[1],i=nl(al(null),2),l=i[0],c=i[1],u=nl(al(""),2),s=u[0],f=u[1],d=ai&&(!l||"valid"!==l.license),m=function(){var e=el(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ri){e.next=2;break}return e.abrupt("return");case 2:return t(!0),e.next=5,Jo("".concat(il,"/get_license"),{nonce:oi});case 5:n=e.sent,c(n.data),n.data.key&&f(n.data.key),t(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=el(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,Jo("".concat(il,"/set_license"),{nonce:oi,json:{serialKey:null}});case 3:e.sent.success&&(f(""),c(null),o("licenseRemoved")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),h=function(){var e=el(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,Jo("".concat(il,"/set_license"),{nonce:oi,json:{serialKey:s}});case 3:(n=e.sent).success&&(c(n.data),n.data&&!n.data.issue&&o("licenseAdded")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();ol((function(){m()}),[]);var b=d?"Forced License":ai?"Enabled":"Disabled",g=l&&"valid"===l.license,y="Your license is active. Thanks a lot for your support :)";g||(l?"no_activations_left"===l.issue?y=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===l.issue?y=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),"."):"missing"===l.issue?y="This license does not exist.":"disabled"===l.issue?y="This license has been disabled.":"item_name_mismatch"===l.issue?y="This license seems to be for a different plugin... isn't it? :)":(y=React.createElement("span",null,"There is an unknown error related to this serial key. Really sorry about this! Please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:l})):y="Unknown error :(");var v=React.createElement(An,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/plugin/".concat(Qo,"/")},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com/"},"Meow Apps Store"),"."),E=React.createElement(An,{title:"Pro Version (".concat(b,")"),busy:n,className:"primary"},React.createElement(qn,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(wt,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:n,value:s,onChange:function(e){return f(e)},placeholder:""})),l&&!g&&React.createElement(ja,null,y),l&&g&&React.createElement(Sa,null,y),!l&&React.createElement(Sn,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"/plugin/media-file-renamer/"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(qn,{contentAlign:"right"},l&&!g&&React.createElement(Se,{className:"secondary",disabled:n||!s,onClick:h},"Retry to validate"),l&&l.key===s&&React.createElement(Se,{className:"secondary",disabled:n||!s,onClick:p},"Remove License"),React.createElement(Se,{disabled:n||!s||l&&l.key===s,onClick:h},"Validate License")),React.createElement(Va,{isOpen:"licenseAdded"===a,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(Va,{isOpen:"licenseRemoved"===a,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return ri?E:v},cl=wp.element.render;function ul(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function sl(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ul(Object(t),!0).forEach((function(n){fl(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ul(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function fl(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function dl(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function ml(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){dl(o,r,a,i,l,"next",e)}function l(e){dl(o,r,a,i,l,"throw",e)}i(void 0)}))}}function pl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return hl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hl(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}document.meowDashboardLoaded||(document.meowDashboardLoaded=!0,document.addEventListener("DOMContentLoaded",(function(e){var n=document.getElementById("meow-common-dashboard");n&&cl(React.createElement(Xi,null),n)})));var bl=wp.element.useState,gl={marginTop:10,background:"rgb(0, 72, 88)",padding:10,color:"rgb(58, 212, 58)",maxHeight:600,minHeight:200,display:"block",fontFamily:"monospace",fontSize:12,whiteSpace:"pre",overflowX:"auto",width:"calc(100vw - 276px)"},yl=function(){var e=Object(r.b)("".concat(ni,"/all_settings/")),n=e.data,t=e.mutate,a=Ue(n,{},!0),o=a.busy,i=a.data,l=a.error,c=pl(bl(""),2),u=c[0],s=c[1],f=pl(bl(!1),2),d=f[0],m=f[1],p=o||d,h=null==i?void 0:i.mfrh_auto_rename,b=null==i?void 0:i.mfrh_on_upload,g=null==i?void 0:i.mfrh_rename_slug,y=null==i?void 0:i.mfrh_convert_to_ascii,v=null==i?void 0:i.mfrh_update_posts,E=null==i?void 0:i.mfrh_update_postmeta,x=null==i?void 0:i.mfrh_undo,w=null==i?void 0:i.mfrh_manual_rename,k=null==i?void 0:i.mfrh_numbered_files,R=null==i?void 0:i.mfrh_sync_alt,O=null==i?void 0:i.mfrh_sync_media_title,j=null==i?void 0:i.mfrh_force_rename,S=null==i?void 0:i.mfrh_log,P=null==i?void 0:i.mfrh_logsql,C=null==i?void 0:i.mfrh_rename_guid,_=null==i?void 0:i.mfrh_case_insensitive_check,A=null==i?void 0:i.mfrh_rename_on_save,T=[{id:"media_title",value:"media_title",label:React.createElement("span",null,"Based on Media Title"),requirePro:!1},{id:"post_title",value:"post_title",label:React.createElement("span",null,"Based on Attached Post Title"),requirePro:!ai},{id:"alt_text",value:"alt_text",label:React.createElement("span",null,"Based on Alternative Text"),requirePro:!ai},{id:"anonymize_md5",value:"anonymize_md5",label:React.createElement("span",null,"Anonymize with MD5"),requirePro:!ai},{id:"none",value:"none",label:React.createElement("span",null,"Disable Automatic Rename"),requirePro:!1}],N=function(){var e=ml(regeneratorRuntime.mark((function e(r,a){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=sl({},n.data))[a]=r,t(sl(sl({},n),{},{data:o}),!1),m(!0),e.prev=4,e.next=7,Jo("".concat(ni,"/update_option"),{nonce:oi,json:{name:a,value:r}});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),alert(e.t0.message);case 12:return e.prev=12,m(!1),t(),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[4,9,12,16]])})));return function(n,t){return e.apply(this,arguments)}}(),I=function(){var e=ml(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.next=3,Jo("".concat(ni,"/refresh_logs"));case 3:(n=e.sent).success&&s(n.data),m(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=ml(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.next=3,Jo("".concat(ni,"/clear_logs"));case 3:(n=e.sent).success&&s(n.data),m(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=React.createElement(An,{busy:p,title:"Side Updates",className:"primary"},React.createElement(Sn,{p:!0,style:{marginTop:0}},"When the files are renamed, many links to them on your WordPress might be broken. Those options are updating the references to those files. ",React.createElement("strong",null,"Give it a try, every install is different and it might not work for certain kind of references.")),React.createElement(qn,{title:"Posts"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_update_posts",disabled:p,label:"Enable",description:React.createElement(Sn,{p:!0},"Update the references to the renamed files in the ",React.createElement("strong",null,"content")," content and ",React.createElement("strong",null,"excerpt")," of the posts (pages and custom types included)."),value:"1",checked:v,onChange:N}))),React.createElement(qn,{title:"Post Meta"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_update_postmeta",disabled:p,label:"Enable",description:React.createElement(Sn,{p:!0},"Update the references in the ",React.createElement("strong",null,"custom fields")," of the posts (including pages and custom types metadata)."),value:"1",checked:E,onChange:N})))),F=React.createElement(qn,{title:"Method"},React.createElement(nr,{id:"mfrh_auto_rename",disabled:p,value:h,scrolldown:!0,name:"mfrh_auto_rename",description:"Attached Post includes all kinds of Post Types: Posts, Pages, Products, etc.",onChange:N},T.map((function(e){return React.createElement(tr,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),L=React.createElement(qn,{title:"On Upload"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_on_upload",disabled:p,label:"Enable",description:React.createElement(React.Fragment,null,React.createElement("span",null,"If your image has an EXIF title, it will be used to decide the filename. "),"post_title"===h&&React.createElement("span",null,"Note: The Attached Post Title ",React.createElement("u",null,"will not be used")," at the time of the upload due to WordPress API constraints.")),value:"1",checked:b,onChange:N}))),B=React.createElement(qn,{title:"Slug/Permalink"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_rename_slug",disabled:p,label:"Sync with filename",description:"Better to keep this un-checked as the link might have been referenced somewhere else.",value:"1",checked:g,onChange:N}))),D=React.createElement(qn,{title:"Transliteration"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_convert_to_ascii",disabled:p,label:"Enable (Recommended)",description:React.createElement(Sn,{p:!0},"Replace accents, emoticons, diacritics, umlauts, cyrillic and any kind of tricky characters by their ASCII equivalent.",React.createElement("br",null)," ",React.createElement("i",null,"Examples: tête → tete, schön → schon, Добро → dobro, etc.")),value:"1",requirePro:!ai,checked:y,onChange:N}))),q=React.createElement(qn,{title:"Undo"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_undo",disabled:p,label:"Enable",description:"An undo icon will be added to the UI. This allows to rollback to the original filename.",value:"1",checked:x,onChange:N}))),U=React.createElement(qn,{title:"Manual Rename"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_manual_rename",disabled:p,label:"Enable",description:"An editable field will be added everywhere your files appear in the UI.",value:"1",checked:w,onChange:N}))),G=React.createElement(qn,{title:"Force Rename"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_force_rename",disabled:p,label:"Enable",description:"Update the references to the file even if the file renaming itself was not successful. You might want to use that option if your install is broken and you are trying to link your Media to files for which the filenames has been altered (after a migration for exemple)",value:"1",requirePro:!ai,checked:j,onChange:N}))),H=React.createElement(qn,{title:"Numbered Files"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_numbered_files",disabled:p,label:"Enable Numbering",description:"Identical filenames will be allowed by the plugin and a number will be appended automatically (myfile.jpg, myfile-2.jpg, myfile-3.jpg, etc).",requirePro:!ai,value:"1",checked:k,onChange:N}))),W=React.createElement(qn,{title:"ALT Text"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_sync_alt",disabled:p||!("media_title"===h||"post_title"===h),label:React.createElement(Sn,null,"Synchronize"),description:"The ALT Text will be synchronized with the same source used for the filename.",requirePro:!ai,value:"1",checked:R,onChange:N}))),$=React.createElement(qn,{title:"Media Title"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_sync_media_title",disabled:p||"post_title"!==h,label:React.createElement(Sn,null,"Synchronize"),description:"The Media Title will be synchronized with the same source used for the filename.",requirePro:!ai,value:"1",checked:O,onChange:N}))),Y=React.createElement(qn,{title:"Logs"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_log",label:"Enable",description:React.createElement(Sn,{p:!0},"Simple logging that explains which actions has been run."),value:"1",checked:S,onChange:N}),React.createElement("div",{style:{marginTop:20}},React.createElement(Se,{onClick:I},"Refresh Logs"),React.createElement(Se,{className:"danger",onClick:z},"Clear Logs")))),J=React.createElement(qn,{title:"SQL Logs"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_logsql",disabled:p,label:"Enable",description:React.createElement(Sn,{p:!0},"The files mfrh_sql.log and mfrh_sql_revert.log will be created in the /logs directory and will include the raw SQL queries which were run by the plugin. If there is an issue, the revert SQL file can help you."),requirePro:!ai,value:"1",checked:P,onChange:N}))),V=React.createElement(qn,{title:"GUID"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_rename_guid",disabled:p,label:"Sync with filename",description:"The GUID will be renamed like the new filename. Better to keep this un-checked.",value:"1",checked:C,onChange:N}))),K=React.createElement(qn,{title:"Case Insensitive"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_case_insensitive_check",label:"Enable",value:"1",checked:_,onChange:N,description:React.createElement(React.Fragment,null,'This will consider the file such as "abc.jpg" and "ABC.JPG" as the same file. More information ',React.createElement("a",{target:"_blank",href:"https://meowapps.com/media-file-renamer-faq-issues/"},"here"),". You should check this if you are on a Windows-based server.")}))),Z=React.createElement(qn,{title:"Rename on Post Save"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_rename_on_save",disabled:p,label:"Enable (Unsafe)",description:"You can modify the titles of your media while editing a post but, of course, the plugin can't update the HTML at this stage. With this option, the plugin will update the filenames and HTML after that you saved the post.",value:"1",checked:A,onChange:N})));return React.createElement(hn,{nekoErrors:[l]},React.createElement(ia,{title:"Media File Renamer | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(Se,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(Se,{className:"primary",icon:"dashboard",color:"#8554bb",onClick:function(){return location.href="upload.php?page=mfrh_dashboard"}},"Dashboard"))),React.createElement(at,null,React.createElement(ot,{full:!0},React.createElement(Ln,null,React.createElement(Sn,{p:!0},"It works out of the box, the default settings are good for most installs. However, you should really have a look at the ",React.createElement("a",{href:"https://meowapps.com/plugin/media-file-renamer/"},"tutorial"),".")),React.createElement(yo,null,React.createElement(vo,{title:"Basic"},React.createElement(at,null,React.createElement(ot,{minimal:!0},React.createElement(An,{busy:p,title:"Settings",className:"primary"},React.createElement(Sn,{h2:!0},"Automatic"),React.createElement(Sn,{p:!0},"This plugin's main goal is to make the process of optimizing your filenames entirely automatic. By default, your files will be named after the title of your media entry."),F,L,React.createElement(Sn,{h2:!0},"Manual"),U,React.createElement(Sn,{p:!0},"If you are a SEO guru or someone who loves having a perfectly neat filesystem, it is recommended to use automatic renaming first, then to tweak specific files with manual renaming. The ",React.createElement("a",{href:"/wp-admin/upload.php?page=mfrh_dashboard"},"Renamer Dashboard")," makes it very easy."))),React.createElement(ot,{minimal:!0},M,React.createElement(An,{busy:p,title:"UI (Extra Features)",className:"primary"},q)))),React.createElement(vo,{title:"Advanced"},React.createElement(at,null,React.createElement(ot,{minimal:!0},React.createElement(An,{busy:p,title:"Advanced Settings",className:"primary"},D,H),React.createElement(An,{busy:p,title:"Fields Syncing",className:"primary"},B,V,W,$,React.createElement(Sn,{p:!0},"The fields in the database will be synchronized, but the data already written in your HTML will not be overwritten."))),React.createElement(ot,{minimal:!0},React.createElement(An,{busy:p,title:"Developer Settings",className:"primary"},K,G,J,Z)))),React.createElement(vo,{title:"Pro Version"},React.createElement(ll,{domain:Qo,prefix:Xo,isPro:ri,isRegistered:ai})),React.createElement(vo,{title:"Logs & Debug"},React.createElement(An,{busy:p,className:"primary"},Y),React.createElement("div",{style:gl},u))))))};function vl(e){return function(e){if(Array.isArray(e))return Rl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||kl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function El(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function xl(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){El(o,r,a,i,l,"next",e)}function l(e){El(o,r,a,i,l,"throw",e)}i(void 0)}))}}function wl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||kl(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kl(e,n){if(e){if("string"==typeof e)return Rl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Rl(e,n):void 0}}function Rl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ol=wp.element,jl=Ol.useState,Sl=Ol.useEffect,Pl=Ol.useMemo,Cl={width:40,height:40,objectFit:"cover"},_l=[{accessor:"thumbnail_url",title:Zo.THUMB,style:{width:16}},{accessor:"post_title",title:Zo.TITLE,sortable:!0,style:{width:"25%"}},{accessor:"post_parent",title:Zo.ATTACHED_TO,sortable:!0,style:{width:"25%"}},{accessor:"current_filename",title:Zo.FILENAME,sortable:!0}],Al={accessor:"id",by:"asc"},Tl=function(){var e,n,t,o=wl(jl("pending"),2),i=o[0],l=o[1],c=wl(jl(),2),u=c[0],s=c[1],f=wl(jl([]),2),d=f[0],m=f[1],p=wl(jl(!1),2),h=p[0],b=p[1],g=wl(jl(""),2),y=g[0],v=g[1],E=wl(jl(""),2),x=E[0],w=E[1],k=wl(jl(Al),2),R=k[0],O=k[1],j=wl(jl(1),2),S=j[0],P=j[1],C=wl(jl(10),2),_=C[0],A=C[1],T=function(){var e=Be(Object(a.useState)(new AbortController),2),n=e[0],t=e[1],r=Object(a.useRef)(!1),o=Object(a.useRef)(0),i=Be(Object(a.useState)(null),2),l=i[0],c=i[1],u=Be(Object(a.useState)(!1),2),s=u[0],f=u[1],d=Be(Object(a.useState)(0),2),m=d[0],p=d[1],h=Be(Object(a.useState)(!1),2),b=h[0],g=h[1],y=Be(Object(a.useState)(!1),2),v=y[0],E=y[1],x=Be(Object(a.useState)(0),2),w=x[0],k=x[1],R=function(){var e=Le(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new AbortController,t(n),g(!1),o.current=0,r.current=!1,f(!1),E(!1),k(0),p(0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=Le(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){g(!1),o.current=0,r.current=!1,f(!1),E(!1),A(n),c(!0),$e.start(),$e.onIdle().then((function(){C(),e()}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,$e.pause(),f(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,g(!1),f(!1),$e.start();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,$e.pause(),n.abort(),c(!1),g(!1),E(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,E(!0),c(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=Le(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$e.add(Le(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n.signal);case 3:(a=e.sent)&&a.success||console.error("[useNekoTasks] Task returned nothing.",a),a.success||(o.current++,r.current||(g(a.error),j())),e.next=17;break;case 8:if(e.prev=8,e.t0=e.catch(0),"AbortError"!==e.t0.name){e.next=15;break}return console.log("Aborted"),e.abrupt("return");case 15:o.current++,r.current||(g("An error was caught (more information in the console)."),j());case 17:return e.prev=17,k((function(e){return e+1})),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[0,8,17,20]])})))),p((function(e){return e+1}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=Le(regeneratorRuntime.mark((function e(n){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$e.clear(),t=Me(n);try{for(t.s();!(r=t.n()).done;)a=r.value,_(a)}catch(e){t.e(e)}finally{t.f()}k(0);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=Object(a.useCallback)((function(){r.current=!0}),[]),N=Object(a.useCallback)((function(){return o.current}),[]);return{start:O,stop:P,pause:j,resume:S,reset:R,addTask:_,setAlwaysSkip:T,getErrorCount:N,error:b,success:v,busy:l,paused:s,value:w,max:m}}(),N=(S-1)*_,I=R.accessor,z=R.by,M=Object(r.b)("".concat(ni,"/stats")),F=M.data,L=M.mutate,B=Object(r.b)((e="".concat(ni,"/media"),n={limit:_,skip:N,filterBy:i,orderBy:I,order:z},t=e.includes("index.php?rest_route"),e+(t?"&":"?")+new URLSearchParams(n).toString())),D=B.data,q=B.mutate,U=Ue(F,{pending:"-",renamed:"-",all:"-"},!0),G=U.busy,H=U.data,W=U.error,$=Ue(D,[],!0),Y=$.busy,J=$.data,V=$.total,K=$.error,Z=Y||G||h,X=Pl((function(){return J.map((function(e){return{id:e.ID,thumbnail_url:React.createElement("img",{src:e.thumbnail_url,style:Cl}),post_title:React.createElement("a",{href:"post.php?post=".concat(e.ID,"&action=edit")},e.post_title),post_parent:React.createElement("div",{style:{maxHeight:35,overflow:"hidden"}},e.post_parent_title?e.post_parent_title:React.createElement("i",{style:{color:"#c1c1c1"}},"None")),current_filename:React.createElement(hi,{entry:e,mutate:function(){q(),L()}})}}))}),[J]);Sl((function(){m([]),O(Al),P(1)}),[i]),Sl((function(){if(null!==T.busy&&(b(T.busy),!T.busy)){var e=T.getErrorCount();e>0&&w("The process has finished, but ".concat(e," error(s) occurred (check your console).")),T.reset(),m([]),q(),L()}}),[T.busy]);var Q=function(){var e=xl(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jo("".concat(ni,"/get_all_ids"),{nonce:oi,json:{unlockedOnly:n}});case 2:if((t=e.sent).success){e.next=6;break}return alert(t.message),e.abrupt("return",[]);case 6:return e.abrupt("return",t.data);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,Q(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=16;break}return v("Undoing..."),r=t.map((function(e){return function(){var n=xl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Undo Media ".concat(e)),n.next=3,Jo("".concat(ni,"/undo"),{nonce:oi,json:{mediaId:e},signal:t});case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(r),e.abrupt("return");case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,Q(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=17;break}return v("Analyzing..."),r=Wo(t,20),a=r.map((function(e){return function(){var n=xl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Jo("".concat(ni,"/analyze"),{nonce:oi,json:{mediaIds:e},signal:t});case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(a),e.abrupt("return");case 17:b(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a,o,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(i.length>0&&void 0!==i[0])||i[0],t=i.length>1&&void 0!==i[1]?i[1]:null,v("Preparing..."),b(!0),!t){e.next=8;break}e.t0=t,e.next=11;break;case 8:return e.next=10,Q(n);case 10:e.t0=e.sent;case 11:if(!(r=e.t0)){e.next=18;break}return v("".concat(n?"Locking..":"Unlocking...")),a=Wo(r,50),o=a.map((function(e){return function(){var e=xl(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jo("".concat(ni,"/set_lock"),{nonce:oi,json:{mediaIds:r,lock:n},signal:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})),T.start(o),e.abrupt("return");case 18:b(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,Q(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=15;break}return r=t.map((function(e){return function(){var n=xl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Renaming #".concat(e)),n.next=3,Jo("".concat(ni,"/rename"),{nonce:oi,json:{mediaId:e},signal:t});case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(r),e.abrupt("return");case 15:b(!1);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/media-file-renamer/","_blank")}},"Get the Pro Version"),React.createElement(Se,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(hn,{nekoErrors:[W,K]},React.createElement(ia,{title:"Media File Renamer | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(Se,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(Se,{icon:"cog",color:"#8554bb",onClick:function(){return location.href="admin.php?page=mfrh_settings"}},"Settings"))),React.createElement(at,null,React.createElement(ot,{full:!0},!ai&&React.createElement(Ln,{footer:ae},React.createElement(Sn,{p:!0},"You must ",React.createElement("b",null,"backup the uploads folder and DB")," before using the Renamer. If you don't know how, give a try to ",React.createElement("a",{target:"_blank",href:"https://meow.click/blogvault"},"BlogVault"),". It is also highly recommanded to read the tutorial. Last but not least, check the ",React.createElement("b",null,"Pro Version"),", as it adds many features and also supports the development. This message is only displayed in the free version. Thank you!")),React.createElement(Mo,null,React.createElement(Se,{onClick:function(){return ne()}},"Analyze Library"),React.createElement(ln,{title:"Actions"},React.createElement(cn,{requiredPro:!0,onClick:function(){s("autoAttach")}},"Auto-Attach")),"pending"===i&&d.length>0&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return re(d)}},"Rename ",React.createElement("strong",null,d.length)," entries"),React.createElement(Se,{className:"secondary",onClick:function(){return te(!0,d)}},"Lock ",React.createElement("strong",null,d.length)," entries")),ii&&"renamed"===i&&d.length>0&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return ee(d)}},"Undo ",React.createElement("strong",null,d.length)," entries")),React.createElement("div",{style:{flex:1}},h&&React.createElement(Mr,{status:function(e){return"".concat(y," (").concat(e,"%)")},busy:h,value:T.value,max:T.max,onStopClick:T.stop})),"all"===i&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return te(!0)}},"Lock ",React.createElement("strong",null,"All")),React.createElement(Se,{className:"secondary",onClick:function(){return te(!1)}},"Unlock ",React.createElement("strong",null,"All"))),("all"===i||"pending"===i)&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"primary",onClick:function(){return s("renameAll")}},"Rename ",React.createElement("strong",null,"All"))),ii&&("all"===i||"renamed"===i)&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"danger",onClick:function(){return s("undoAll")}},"Undo ",React.createElement("strong",null,"All")))),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(ya,{value:i,busy:G,onChange:function(e){l(e),P(1)}},React.createElement(va,{title:Zo.PENDING,value:"pending",count:H.pending}),React.createElement(va,{title:"Renamed",value:"renamed",count:H.renamed}),React.createElement(va,{title:"All",value:"all",count:H.all})),React.createElement(sa,{currentPage:S,limit:_,total:V,onClick:function(e){return P(e)}})),React.createElement(ro,{busy:Z,data:X,columns:_l,sort:R,onSortChange:function(e,n){O({accessor:e,by:n})},onSelect:function(e){m([].concat(vl(d),vl(e)))},onUnselect:function(e){m(vl(d.filter((function(n){return!e.includes(n)}))))},selectedItems:d}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(nr,{scrolldown:!0,value:_,onChange:function(e){A(e),P(1)}},React.createElement(tr,{value:5,label:"5 items per page"}),React.createElement(tr,{value:10,label:"10 items per page"}),React.createElement(tr,{value:25,label:"25 items per page"}),React.createElement(tr,{value:50,label:"50 items per page"})),React.createElement(sa,{currentPage:S,limit:_,total:V,onClick:function(e){return P(e)}}))),React.createElement(Va,{isOpen:"renameAll"===u,onRequestClose:function(){return s(null)},title:"You are about to rename all your (unlocked) files",content:"Renaming files is a dangerous operation. Please make sure you made a backup or your entire WordPress install. Should we start?",onOkClick:function(){s(null),re()},onCancelClick:function(){s(null)}}),React.createElement(Va,{isOpen:"undoAll"===u,onRequestClose:function(){return s(null)},title:"You are about to undo the renaming for all your files",content:"Are you sure you would like to proceed?",onOkClick:function(){s(null),ee()},onCancelClick:function(){s(null)}}),React.createElement(Va,{isOpen:"autoAttach"===u,onRequestClose:function(){return s(null)},title:"Coming soon!",content:"This feature, for Pro users, will scan your WordPress install to attach your unattached files to what they belong to (for example, an image to a product). That will also allow to rename those images automatically.",onOkClick:function(){s(null)}}),React.createElement(Va,{isOpen:x,title:"Success",ok:"Close",content:x,onOkClick:function(){w(""),T.reset()}})))},Nl=wp.element.render,Il={fetcher:Yo,revalidateOnFocus:!1};function zl(){Array.from(document.getElementsByClassName("mfrh-renamer-field")).forEach((function(e){var n=e.getAttribute("data-id");Nl(React.createElement(hi,{natural:!0,mediaId:n}),e)}))}document.addEventListener("DOMContentLoaded",(function(e){var n,t;new MutationObserver((function(){zl()})).observe(document.documentElement,{childList:!0,subtree:!0}),(n=document.getElementById("mfrh-admin-settings"))&&Nl(React.createElement(r.a,{value:Il},React.createElement(yl,null)),n),(t=document.getElementById("mfrh-media-rename"))&&Nl(React.createElement(r.a,{value:Il},React.createElement(Tl,null)),t),zl()}))}});
|
2 |
//# sourceMappingURL=index.js.map
|
1 |
+
!function(e){function n(n){for(var r,i,l=n[0],c=n[1],u=n[2],f=0,d=[];f<l.length;f++)i=l[f],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&d.push(a[i][0]),a[i]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(s&&s(n);d.length;)d.shift()();return o.push.apply(o,u||[]),t()}function t(){for(var e,n=0;n<o.length;n++){for(var t=o[n],r=!0,l=1;l<t.length;l++){var c=t[l];0!==a[c]&&(r=!1)}r&&(o.splice(n--,1),e=i(i.s=t[0]))}return e}var r={},a={0:0},o=[];function i(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=r,i.d=function(e,n,t){i.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,n){if(1&n&&(e=i(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)i.d(t,r,function(n){return e[n]}.bind(null,r));return t},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,"a",n),n},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.p="";var l=window.wpJsonMfrh=window.wpJsonMfrh||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var u=0;u<l.length;u++)n(l[u]);var s=c;o.push([79,1]),t()}({0:function(e,n){e.exports=React},70:function(e,n){e.exports=ReactDOM},79:function(e,n,t){"use strict";t.r(n);var r=t(6),a=t(0),o=t.n(a),i=t(1),l=t.n(i);function c(){return(c=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){f(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function f(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var p=function(e){var n=e.spinner,t=void 0===n||n,r=e.busy,i=void 0!==r&&r,l=e.overlayStyle,u=d(Object(a.useState)(!0),2),f=u[0],m=u[1];Object(a.useEffect)((function(){var e;return i?m(!0):e=setTimeout((function(){m(!1),e=null}),250),function(){e&&clearTimeout(e)}}),[i]);var p=f?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"overlay "+(i?"":"overlayHidden"),style:l},Boolean(t)&&o.a.createElement("div",{className:"lds-ellipsis "+(i?"":"spinnerHidden")},o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null))),o.a.createElement("style",{jsx:!0},"\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n ")):null,h=s(s({},e),{},{busy:void 0,spinner:void 0});return o.a.createElement("div",c({style:{position:"relative"}},h),p,e.children)};p.propTypes={busy:l.a.bool.isRequired,spinner:l.a.bool,children:l.a.oneOfType([l.a.arrayOf(l.a.node),l.a.node]).isRequired};var h=p,b=t(2),g=t(4),y={black:"black",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#F1F1F1",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#134675",proGray:"#7F8EA0",progress:"#8414a8",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"white",fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"},v=t(3),E=t(29),w=t.n(E),k=t(30),R=t.n(k),O=t(31),j=t.n(O),S=t(9),P=t.n(S),C=t(10),_=t.n(C),A=t(11),T=t.n(A),N=t(7),I=t.n(N),z=t(5),M=t.n(z),F=t(8),L=t.n(F),B=t(12),D=t.n(B),q=t(13),U=t.n(q),G=t(32),H=t.n(G),W=t(33),$=t.n(W),Y=t(14),J=t.n(Y),V=t(34),K=t.n(V),Z=t(35),X=t.n(Z),Q=t(36),ee=t.n(Q),ne=t(37),te=t.n(ne),re=(t(61),t(38)),ae=t.n(re),oe=t(39),ie=t.n(oe),le=t(40),ce=t.n(le),ue=t(41),se=t.n(ue),fe=t(42),de=t.n(fe),me=t(43),pe=t.n(me),he=t(44),be=t.n(he),ge=t(45),ye=t.n(ge),ve=t(46),Ee=t.n(ve),xe={lock:w.a,"lock-open":R.a,"file-undo":j.a,"chevron-double-left":P.a,"chevron-double-right":_.a,"chevron-left":T.a,"chevron-right":I.a,"chevron-down":M.a,"chevron-up":L.a,pause:D.a,play:U.a,replay:H.a,check:$.a,stop:J.a,delete:K.a,undo:X.a,alert:ee.a,database:te.a,tools:ae.a,cog:ie.a,close:ce.a,cat:se.a,upload:de.a,trash:pe.a,pencil:be.a,dashboard:ye.a,search:Ee.a};function we(){return(we=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function ke(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Re(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ",";\n font-size: ",";\n padding: 0 15px;\n\n background-color: ",";\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n\n &.danger {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.success {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n ","\n"]);return Re=function(){return e},e}var Oe=Object(b.a)((function(e){var n=e.className,t=e.icon,r=void 0===t?null:t,a=e.onClick,i=e.disabled,l=void 0!==i&&i,c=e.color,u=void 0===c?null:c,s=e.children,f=ke(e,["className","icon","onClick","disabled","color","children"]),d=!!r,m="nui-button ".concat(n||"").concat(d?" has-icon":""," ").concat(u?"custom-color":"");return o.a.createElement("button",we({type:"button",className:m,onClick:a,disabled:l},f),d&&o.a.createElement(v.Icon,{icon:"string"==typeof r?xe[r]||null:r,width:"24",height:"24",style:{marginRight:"4px"}}),o.a.createElement("span",null,s))}))(Re(),y.fontFamily,y.fontSizeText,y.blue,Object(g.a)(.1,y.blue),y.lightBlue,y.blue,y.blue,Object(g.a)(.1,y.lightBlue),y.red,y.red,Object(g.a)(.1,y.red),y.green,y.green,Object(g.a)(.1,y.green),(function(e){return je(e.color)})),je=function(e){if(e)return"\n &.custom-color {\n background-color: ".concat(e,";\n border: 1px solid ").concat(e,";\n\n &:hover {\n background-color: ").concat(Object(g.a)(.1,e),";\n }\n }\n ")},Se=function(e){return o.a.createElement(Oe,e)};function Pe(){return(Pe=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ce(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function _e(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n position: relative;\n border-radius: 10px;\n color: ",";\n font-family: ",";\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n"]);return _e=function(){return e},e}Se.propTypes={className:l.a.oneOf(["primary","secondary","danger","success"]),disabled:l.a.bool,icon:l.a.oneOfType([l.a.instanceOf(v.IconifyIcon),l.a.oneOf(["setting","edit","trash"])]),color:l.a.string,onClick:l.a.func.isRequired},Se.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){}};var Ae=b.a.a(_e(),y.yellow,y.white,y.fontFamily,y.white),Te=function(e){var n=e.show,t=void 0===n||n,r=e.className,a=Ce(e,["show","className"]);return t?o.a.createElement(Ae,Pe({href:"https://store.meowapps.com",target:"_blank",className:"".concat(r||"")},a),"Pro Only"):null},Ne=function(e){return o.a.createElement(Te,e)};Ne.propTypes={show:l.a.bool,className:l.a.string},Ne.defaultProps={show:!0,className:void 0};var Ie=t(21),ze=t.n(Ie);function Me(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=De(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Fe(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Le(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Fe(o,r,a,i,l,"next",e)}function l(e){Fe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Be(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||De(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,n){if(e){if("string"==typeof e)return qe(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(e,n):void 0}}function qe(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object(a.useState)(n),o=Be(r,2),i=o[0],l=o[1],c=Object(a.useState)(null),u=Be(c,2),s=u[0],f=u[1],d=Object(a.useState)(t),m=Be(d,2),p=m[0],h=m[1],b=Object(a.useState)(0),g=Be(b,2),y=g[0],v=g[1];return Object(a.useEffect)((function(){void 0!==e&&(e.success?(f(null),l(e.data),v(e.total?e.total:0)):f(e.error)),h(void 0===e)}),[e]),{busy:p,data:i,total:y,error:s}},Ge=function(){var e=Object(a.useRef)(),n=Be(Object(a.useState)({}),2),t=n[0],r=n[1];return Object(a.useEffect)((function(){if(e&&e.current){var n=new ResizeObserver((function(e){var n=e[0];n.contentRect&&r({width:n.contentRect.left+n.contentRect.right,height:n.contentRect.top+n.contentRect.bottom})}));return n.observe(e.current),function(){n.unobserve(e.current)}}}),[]),{ref:e,width:t.width?t.width:0,height:t.height?t.height:0}},He=function(e){var n=Object(a.useRef)(),t=function(t){e&&!n.current.contains(t.target)&&e()};return Object(a.useEffect)((function(){return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}})),n},We=null,$e=new ze.a({concurrency:1,autoStart:!1});function Ye(){var e=Qe(["\n align-items: center;\n background-color: ",";\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ",";\n font-size: ",";\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ",";\n justify-content: space-between;\n }\n"]);return Ye=function(){return e},e}function Je(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ve(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ke(){var e=Qe(["\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ",";\n position: absolute;\n z-index: 10;\n box-shadow: ",';\n\n &:before {\n content: "";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ',";\n }\n"]);return Ke=function(){return e},e}function Ze(){var e=Qe(["\n align-items: center;\n background-color: ",";\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n"]);return Ze=function(){return e},e}function Xe(){var e=Qe(["\n display: inline-block;\n"]);return Xe=function(){return e},e}function Qe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var en=b.a.div(Xe()),nn=b.a.button(Ze(),y.blue,y.fontFamily,y.fontSizeText,Object(g.a)(.1,y.blue)),tn=b.a.div(Ke(),y.blue,y.lightShadow,y.blue),rn=function(e){var n=e.title,t=e.disabled,r=void 0!==t&&t,a=e.isPro,i=void 0!==a&&a,l=e.style,c=void 0===l?{}:l,u=Je(o.a.useState(!1),2),s=u[0],f=u[1],d=He((function(){f(!1)})),m=Ge(),p=m.ref,h=m.width,b=function(){f(!s)},g=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{isPro:i,disabled:e.props.disabled||r,onClick:function(){e.props.onClick&&e.props.onClick(),b()}})}));return o.a.createElement(en,{ref:d},o.a.createElement(nn,{ref:p,type:"button",disabled:r,onClick:b,style:c},o.a.createElement("span",null,n),o.a.createElement(v.Icon,{icon:M.a,width:"24",height:"24",style:{marginLeft:"4px"}})),s&&o.a.createElement(tn,{style:{transform:"translateX(calc(-50% + ".concat(h/2,"px))")}},g))},an=b.a.button(Ye(),y.blue,y.fontFamily,y.fontSizeText,Object(g.a)(.1,y.blue),y.proGray),on=function(e){var n=e.onClick,t=e.children,r=e.isPro,a=e.requirePro,i=void 0!==a&&a,l=e.disabled,c=i&&!r;return o.a.createElement(an,{type:"button",className:c?"is-pro":"",onClick:n,disabled:l||c},o.a.createElement("span",null,t),c&&!r&&o.a.createElement(Ne,null))},ln=function(e){return o.a.createElement(rn,e)},cn=function(e){return o.a.createElement(on,e)};function un(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||sn(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sn(e,n){if(e){if("string"==typeof e)return fn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fn(e,n):void 0}}function fn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function dn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n"]);return dn=function(){return e},e}ln.propTypes={title:l.a.string,disabled:l.a.bool,isPro:l.a.bool},ln.defaultProps={title:void 0,disabled:!1,isPro:!1},cn.propTypes={onClick:l.a.func.isRequired,requirePro:l.a.bool},cn.defaultProps={onClick:function(){},requirePro:!1};var mn=b.a.div(dn()),pn=function(e){var n=e.className,t=e.children,r=e.nekoErrors,i=void 0===r?[]:r,l=e.style,c=void 0===l?{}:l,u=un(Object(a.useState)(!1),2),s=u[0],f=u[1],d=un(Object(a.useState)(!1),2),m=d[0],p=d[1];if(i&&!s){var h,b=function(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=sn(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}(i);try{for(b.s();!(h=b.n()).done;){var g=h.value;if(g){f(g);break}}}catch(e){b.e(e)}finally{b.f()}}return o.a.createElement(mn,{className:n||"",style:c},s&&o.a.createElement("div",{className:"neko-rest-error"},o.a.createElement("div",{className:"container"},!m&&o.a.createElement(o.a.Fragment,null,o.a.createElement("h3",null,"The Rest API is disabled or broken 😢"),o.a.createElement("p",null,"The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled."),o.a.createElement("p",null,o.a.createElement("i",null,"Last but not least: check your PHP Error Logs and your Debugging Console.")),o.a.createElement("p",{className:"neko-debug"},o.a.createElement("small",null,"URL: ",s.url,o.a.createElement("br",null),"CODE: ",s.code,o.a.createElement("br",null),"MESSAGE: ",s.message,o.a.createElement("br",null)))),s.body&&m&&o.a.createElement("p",{className:"neko-debug"},o.a.createElement("div",{dangerouslySetInnerHTML:{__html:s.body}})),s.body&&o.a.createElement(Se,{color:"#a94242",onClick:function(){return p(!m)}},m?"Hide":"Display"," response from server"),o.a.createElement(Se,{color:"#a94242",onClick:function(){window.open("https://meowapps.com/debugging-wordpress/","_blank")}},"Learn about WordPress Debugging"))),t)},hn=function(e){return o.a.createElement(pn,e)};function bn(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function gn(){var e=xn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return gn=function(){return e},e}function yn(){var e=xn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return yn=function(){return e},e}function vn(){var e=xn(["\n font-family: ",";\n font-size: ",";\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return vn=function(){return e},e}function En(){var e=xn(["\n font-family: ",";\n font-weight: normal;\n font-size: ",";\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return En=function(){return e},e}function xn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}hn.propTypes={className:l.a.string,style:l.a.object,nekoErrors:l.a.bool},hn.defaultProps={className:void 0,style:{},nekoErrors:!1};var wn=b.a.h1(En(),y.fontFamily,y.fontSizeH1),kn=b.a.h2(vn(),y.fontFamily,y.fontSizeH2),Rn=b.a.p(yn(),y.fontFamily,y.fontSizeText),On=b.a.span(gn(),y.fontFamily,y.fontSizeText),jn=function(e){var n=e.children,t=bn(e,["children"]);return e.h1?o.a.createElement(wn,t,n):e.h2?o.a.createElement(kn,t,n):e.p?o.a.createElement(Rn,t,n):o.a.createElement(On,t,n)},Sn=function(e){return o.a.createElement(jn,e)};function Pn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-size: ",";\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ",";\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ",";\n\n .nui-block-title {\n color: ",";\n }\n\n .nui-block-content {\n background-color: ",";\n }\n }\n"]);return Pn=function(){return e},e}Sn.propTypes={h1:l.a.any,h2:l.a.any,p:l.a.any},Sn.defaultProps={h1:void 0,h2:void 0,p:void 0};var Cn=b.a.div(Pn(),y.fontSizeText,y.blue,y.blue,y.white,y.white),_n=function(e){var n=e.title,t=e.children,r=e.className,a=e.busy,i=void 0!==a&&a,l=e.style,c=void 0===l?{}:l;return o.a.createElement(Cn,{className:"nui-block "+(r||""),style:c},o.a.createElement(h,{busy:i},o.a.createElement(Sn,{h2:!0,className:"nui-block-title"},n),o.a.createElement("div",{className:"nui-block-content"},t)))},An=function(e){return o.a.createElement(_n,e)};function Tn(){var e=In(["\n justify-content: flex-start;\n background-color: ",";\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n"]);return Tn=function(){return e},e}function Nn(){var e=In(["\n font-size: ",";\n font-family: ",";\n background-color: ",";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ",";\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n"]);return Nn=function(){return e},e}function In(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}An.propTypes={title:l.a.string,className:l.a.oneOf(["","primary"]),style:l.a.object},An.defaultProps={title:void 0,className:"",style:{}};var zn=b.a.div(Nn(),y.fontSizeText,y.fontFamily,y.white,y.blue),Mn=b.a.div(Tn(),y.lightGray),Fn=function(e){var n=e.children,t=e.header,r=e.headerAlign,a=void 0===r?"left":r,i=e.footer,l=e.footerAlign,c=void 0===l?"right":l,u=e.className,s=e.style,f=void 0===s?{}:s;return o.a.createElement(zn,{className:u||"",style:f},t&&o.a.createElement(Mn,{className:"align-".concat(a)},t),o.a.createElement("div",{className:"content"},n),i&&o.a.createElement(Mn,{className:"align-".concat(c)},i))},Ln=function(e){return o.a.createElement(Fn,e)};function Bn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n font-family: ",";\n\n > .nui-settings-head {\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n"]);return Bn=function(){return e},e}Ln.propTypes={header:l.a.element,headerAlign:l.a.oneOf(["left","right"]),footer:l.a.element,footerAlign:l.a.oneOf(["left","right"]),className:l.a.string,style:l.a.object},Ln.defaultProps={header:void 0,headerAlign:"left",footer:void 0,footerAlign:"right",className:void 0,style:{}};var Dn=Object(b.a)((function(e){var n=e.title,t=void 0===n?"":n,r=e.contentAlign,a=void 0===r?"left":r;return o.a.createElement("div",{className:e.className||""},t?o.a.createElement("div",{className:"nui-settings-head"},t):null,o.a.createElement("div",{className:"nui-settings-content nui-settings-content-align-".concat(a)},e.children))}))(Bn(),y.fontFamily,y.fontFamily),qn=function(e){return o.a.createElement(Dn,e)};function Un(){var e=Hn(["\n background-color: ",";\n color: white;\n"]);return Un=function(){return e},e}function Gn(){var e=Hn(["\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n"]);return Gn=function(){return e},e}function Hn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}qn.propTypes={title:l.a.string,className:l.a.string,contentAlign:l.a.string},qn.defaultProps={title:"",className:void 0,contentAlign:"left"};var Wn=b.a.div(Gn()),$n=Object(b.a)((function(e){return e.children?o.a.createElement("div",{className:e.className},e.children):null}))(Un(),y.blue),Yn=function(e){return o.a.createElement(Wn,{className:"window"},o.a.createElement($n,null,e.title),e.children)},Jn=function(e){return o.a.createElement(Yn,e)};function Vn(){return(Vn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Kn(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Zn(){var e=Qn(["\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n"]);return Zn=function(){return e},e}function Xn(){var e=Qn(["\n display: flex;\n flex-wrap: wrap;\n"]);return Xn=function(){return e},e}function Qn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Jn.propTypes={title:l.a.string},Jn.defaultProps={title:void 0};var et=b.a.div(Xn()),nt=b.a.div(Zn()),tt=function(e){return o.a.createElement(et,null,e.children)},rt=function(e){var n=e.full,t=e.minimal,r=Kn(e,["full","minimal"]),a=n?"full":"";return a+=t?" minimal":"",o.a.createElement(nt,Vn({className:a},r),e.children)},at=function(e){return o.a.createElement(tt,e)},ot=function(e){return o.a.createElement(rt,e)};at.propTypes={},at.defaultProps={},ot.propTypes={full:l.a.any},ot.defaultProps={full:void 0};var it=t(16),lt=t.n(it),ct=t(17),ut=t.n(ct);function st(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-family: ",";\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n"]);return st=function(){return e},e}var ft=Object(b.a)((function(e){var n=e.id,t=e.name,r=e.checked,a=void 0!==r&&r,i=e.onChange,l=e.label,c=e.description,u=e.isPro,s=e.disabled,f=e.requirePro,d=void 0!==f&&f&&!u,m=s||d,p=m?"disabled":"";return o.a.createElement("div",{className:["nui-checkbox",e.className,p].join(" ")},o.a.createElement("input",{id:n,name:t,type:"checkbox",defaultChecked:!1,onClick:function(){i?i(!a,n):console.log("The onChange handler it not set for this checkbox.",e)},disabled:m}),o.a.createElement("label",{htmlFor:n},o.a.createElement("div",{className:"nui-checkbox-check-container"},o.a.createElement(v.Icon,{icon:a?ut.a:lt.a,width:"30px",height:"30px",color:m?y.disabledForm:y.blue})),o.a.createElement("div",{className:"nui-checkbox-inner-container"},o.a.createElement("span",{className:"label"},l,o.a.createElement(Ne,{className:"inline",show:d})),c?o.a.createElement("small",{className:"description"},c):null)))}))(st(),y.fontFamily,y.disabledForm),dt=function(e){return o.a.createElement(ft,e)};function mt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n"]);return mt=function(){return e},e}dt.propTypes={id:l.a.string,name:l.a.string,checked:l.a.bool,label:l.a.string,description:l.a.string,isPro:l.a.bool,requirePro:l.a.bool},dt.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1};var pt=Object(b.a)((function(e){var n=e.name,t=(e.max,e.isPro),r=void 0!==t&&t;return o.a.Children.map(e.children,(function(e){return e.props.name?e:o.a.cloneElement(e,{name:n,isPro:r})}))}))(mt()),ht=function(e){return o.a.createElement(pt,e)};function bt(){return(bt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function gt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return yt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function vt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Et(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-input {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return Et=function(){return e},e}ht.propTypes={name:l.a.string,mas:l.a.number,isPro:l.a.bool},ht.defaultProps={name:void 0,mas:-1,isPro:!1};var xt=Object(b.a)((function(e){var n=e.id,t=e.name,r=e.value,i=void 0===r?"":r,l=e.description,c=e.placeholder,u=void 0===c?"":c,s=e.onEnter,f=void 0===s?null:s,d=e.readOnly,m=void 0!==d&&d,p=e.type,h=void 0===p?"text":p,b=e.step,g=void 0===b?1:b,y=e.min,v=void 0===y?1:y,E=e.max,x=void 0===E?999:E,w=e.maxLength,k=void 0===w?3:w,R=e.className,O=e.style,j=e.natural,S=void 0!==j&&j,P=vt(e,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural"]),C=gt(Object(a.useState)(i),2),_=C[0],A=C[1],T=!!e.onChange;Object(a.useEffect)((function(){T||A(i)}),[i]);var N=function(t){T?e.onChange(t.target.value,n):A(t.target.value,n)},I=function(t){f&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},z=function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},M="neko-input ".concat(S?" natural":"");return o.a.createElement("div",{className:[R].join(" "),style:O},"number"===h?o.a.createElement("input",bt({className:[M].join(" ")},P,{id:n,name:t,value:T?i:_,type:h,step:g,min:v,max:x,maxlength:k,placeholder:u,onChange:N,onKeyPress:I,onBlur:z,readOnly:m})):o.a.createElement("input",bt({className:[M].join(" ")},P,{id:n,name:t,value:T?i:_,type:h,spellcheck:"false",placeholder:u,onChange:N,onKeyPress:I,onBlur:z,readOnly:m})),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(Et(),y.fontFamily,y.fontSizeText,y.blue,y.gray,y.fontFamily,y.fontSizeSmall),wt=function(e){return o.a.createElement(xt,e)};function kt(){return(kt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Rt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ot(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ot(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function jt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function St(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return St=function(){return e},e}wt.propTypes={id:l.a.string,type:l.a.oneOf(["number","text"]),name:l.a.string,value:l.a.string,description:l.a.string,placeholder:l.a.string,onChange:l.a.func,onEnter:l.a.func,onBlur:l.a.func,readOnly:l.a.bool,step:l.a.number,min:l.a.number,max:l.a.number,maxLength:l.a.number,natural:l.a.bool},wt.defaultProps={id:void 0,type:"text",name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1,step:1,min:1,max:999,maxLength:3,natural:!1};var Pt=Object(b.a)((function(e){var n=e.id,t=e.name,r=e.value,i=void 0===r?"":r,l=e.description,c=e.placeholder,u=void 0===c?"":c,s=e.onEnter,f=void 0===s?null:s,d=e.readOnly,m=void 0!==d&&d,p=(e.maxLength,e.className),h=e.style,b=jt(e,["id","name","value","description","placeholder","onEnter","readOnly","maxLength","className","style"]),g=Rt(Object(a.useState)(i),2),y=g[0],v=g[1],E=!!e.onChange;Object(a.useEffect)((function(){E||v(i)}),[i]);return o.a.createElement("div",{className:[p].join(" "),style:h},o.a.createElement("textarea",kt({className:"neko-textarea"},b,{id:n,name:t,spellCheck:"false",placeholder:u,onChange:function(t){E?e.onChange(t.target.value,n):v(t.target.value,n)},onKeyPress:function(t){f&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},onBlur:function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},readOnly:m}),E?i:y),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(St(),y.fontFamily,y.fontSizeText,y.blue,y.gray,y.fontFamily,y.fontSizeSmall),Ct=function(e){return o.a.createElement(Pt,e)};Ct.propTypes={id:l.a.string,name:l.a.string,value:l.a.string,description:l.a.string,placeholder:l.a.string,onChange:l.a.func,onEnter:l.a.func,onBlur:l.a.func,readOnly:l.a.bool},Ct.defaultProps={id:void 0,name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1};var _t=t(50),At=t.n(_t),Tt=t(51),Nt=t.n(Tt);function It(){var e=Wt(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ",";\n display: flex;\n justify-content: space-between;\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n"]);return It=function(){return e},e}function zt(){var e=Wt(["\n font-family: ",";\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n"]);return zt=function(){return e},e}function Mt(){return(Mt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ft(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Lt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Bt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Dt(){var e=Wt(["\n background-color: ",";\n"]);return Dt=function(){return e},e}function qt(){var e=Wt(["\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n"]);return qt=function(){return e},e}function Ut(){var e=Wt(["\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n"]);return Ut=function(){return e},e}function Gt(){var e=Wt(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 8px;\n display: flex;\n font-family: ",";\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return Gt=function(){return e},e}function Ht(){var e=Wt(["\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ",";\n border-radius: 8px 8px 0 0;\n }\n"]);return Ht=function(){return e},e}function Wt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var $t=b.a.div(Ht(),y.blue),Yt=b.a.div(Gt(),y.white,y.blue,y.fontFamily),Jt=b.a.div(Ut()),Vt=b.a.div(qt()),Kt=b.a.div(Dt(),y.white),Zt=function(e){var n,t=e.id,r=e.name,i=e.value,l=e.scrolldown,c=void 0!==l&&l,u=e.isPro,s=void 0!==u&&u,f=e.onChange,d=Bt(e,["id","name","value","scrolldown","isPro","onChange"]),m=null===(n=o.a.Children.toArray(e.children).find((function(e){return e.props.value===i||e.props.checked})))||void 0===n?void 0:n.props,p=(null==m?void 0:m.label)||"Select",h=(null==m?void 0:m.description)||e.description,b=(null==m?void 0:m.requirePro)||!1,g=Ft(Object(a.useState)(!1),2),y=g[0],E=g[1],x=c?He((function(){E(!1)})):null,w=b&&!s,k=function(n){if(n!==i){if(!f)return void console.log("The onChange handler it not set for this checkbox.",e);f(n,t)}c&&E(!1)},R=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{name:e.props.name||r,checked:e.props.value===i||e.props.checked,onClick:k,scrolldown:c,isPro:s})}));return c?o.a.createElement($t,Mt({id:t,ref:x},d,{onClick:function(){return E(!y)},className:["nui-select",y?"show-options":""],childrenLength:R.length}),o.a.createElement(Yt,null,p,o.a.createElement("div",{className:"rightContent"},w&&o.a.createElement(Ne,null),o.a.createElement(v.Icon,{icon:y?L.a:M.a,width:"24"}))),h&&o.a.createElement(Jt,null,h),y&&o.a.createElement(Vt,{className:y?"":"hidden"},o.a.createElement(Kt,null,[R]))):R},Xt=b.a.div(zt(),y.fontFamily,y.disabledForm),Qt=b.a.div(It(),y.blue,y.fontFamily,y.white,y.fontFamily),er=function(e){var n=e.id,t=e.name,r=e.value,a=e.checked,i=e.label,l=e.description,c=e.onClick,u=e.scrolldown,s=e.isPro,f=void 0!==s&&s,d=e.requirePro,m=void 0!==d&&d&&!f,p=m?"disabled":"",h=o.a.createElement(Xt,{className:"nui-select ".concat(e.className||""," ").concat(p)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(e){return c(e.target.value)},disabled:m}),o.a.createElement("label",{htmlFor:n},o.a.createElement(v.Icon,{icon:a?Nt.a:At.a,width:"24px",color:m?y.disabledForm:y.blue}),o.a.createElement("div",{className:"inner-container"},o.a.createElement("span",{className:"label"},i,o.a.createElement(Ne,{className:"inline",style:{top:-1},show:m})),l?o.a.createElement("small",{className:"description"},l):null))),b=o.a.createElement(Qt,{className:"nui-select ".concat(e.className||""," ").concat(p)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,disabled:m}),o.a.createElement("div",{className:"option",onClick:function(){return c(r)}},i,o.a.createElement(Ne,{show:m})));return u?b:h},nr=function(e){return o.a.createElement(Zt,e)};nr.propTypes={id:l.a.string,name:l.a.string,description:l.a.string,scrolldown:l.a.bool,isPro:l.a.bool,onChange:l.a.func},nr.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0};var tr=function(e){return o.a.createElement(er,e)};tr.propTypes={id:l.a.string,name:l.a.string,value:l.a.string,checked:l.a.bool,label:l.a.string,description:l.a.string,onClick:l.a.func,scrolldown:l.a.bool,isPro:l.a.bool,requirePro:l.a.bool},tr.defaultProps={id:void 0,name:void 0,value:void 0,checked:!1,label:void 0,description:void 0,onClick:void 0,scrolldown:!1,isPro:!1,requirePro:!1};var rr=t(18),ar=t.n(rr),or=t(52),ir=t.n(or),lr=t(53),cr=t.n(lr),ur=t(54),sr=t.n(ur);function fr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return dr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function mr(){var e=gr(["\n margin-left: 5px;\n"]);return mr=function(){return e},e}function pr(){var e=gr(["\n border-left: 1px solid ",";\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n"]);return pr=function(){return e},e}function hr(){var e=gr(["\n height: 24px;\n width: 24px;\n"]);return hr=function(){return e},e}function br(){var e=gr(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n"]);return br=function(){return e},e}function gr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var yr=function(e){var n=e.chevron,t=void 0===n||n;return o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:t})}))},vr=b.a.div(br()),Er=b.a.div(hr()),xr=b.a.div(pr(),y.finderBorder),wr=b.a.div(mr()),kr=function(e){var n={gallery:cr.a,tag:sr.a},t=e.title,r=e.chevron,a=e.rightElement,i=void 0===a?null:a,l=e.showRightElement,c=void 0!==l&&l,u=!e.icon,s=!!e.icon,f=!!e.children,d=fr(o.a.useState(!1),2),m=d[0],p=d[1],h=fr(o.a.useState((function(){return"string"==typeof e.icon&&Object.keys(n).includes(e.icon)?n[e.icon]:e.icon?e.icon:ar.a})),2),b=h[0],g=h[1],E=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:r})}));return o.a.createElement("div",null,o.a.createElement(vr,{onClick:function(){(u||f)&&(s||g(m?ar.a:ir.a),p(!m))},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,className:"".concat(u||E?"can-expand":"")},r?u||E?o.a.createElement(v.Icon,{icon:m?M.a:I.a,width:"24",height:"24"}):o.a.createElement(Er,null):null,o.a.createElement(v.Icon,{icon:b,color:y.blue,width:"24",height:"24"}),o.a.createElement("p",null,t),c&&o.a.createElement(wr,null,i)),m&&o.a.createElement(xr,{className:"".concat(u?"":"no-line"," ").concat(r?"":"no-chevron")},E))},Rr=function(e){return o.a.createElement(yr,e)};Rr.propTypes={chevron:l.a.bool},Rr.defaultProps={chevron:!0};var Or=function(e){return o.a.createElement(kr,e)};function jr(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n"]);return jr=function(){return e},e}Or.propTypes={icon:l.a.oneOfType([l.a.instanceOf(v.IconifyIcon),l.a.oneOf(["gallery"])]),title:l.a.string},Or.defaultProps={icon:ar.a,title:void 0};var Sr=b.a.div(jr()),Pr=function(){return o.a.createElement(Sr,null,o.a.createElement("svg",{width:"54",height:"38",viewBox:"0 0 54 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z",fill:"#724024",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",stroke:"black"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",stroke:"black"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",stroke:"black"}),o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z",fill:"white",stroke:"black",strokeWidth:"2.1869"})))},Cr=function(e){return o.a.createElement(Pr,e)};function _r(e){return(_r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ar(){var e=Nr(["\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ",";\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ",";\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ",";\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n"]);return Ar=function(){return e},e}function Tr(){var e=Nr(["\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &.stop {\n background: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return Tr=function(){return e},e}function Nr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Cr.propTypes={},Cr.defaultProps={};var Ir=Object(b.a)((function(e){var n=e.value,t=void 0===n?0:n,r=e.max,a=void 0===r?100:r,i=e.busy,l=void 0!==i&&i,c=e.status;t=Math.min(t,a);var u=parseFloat(t)/parseFloat(a);return o.a.createElement("div",{className:e.className},o.a.createElement(zr,{ratio:u,busy:e.busy,status:c}),o.a.createElement("div",{className:"nui-progress-buttons"},l&&e.onPauseClick&&o.a.createElement("div",{className:"nui-progress-button pause",onClick:e.onPauseClick},e.paused?o.a.createElement(v.InlineIcon,{icon:U.a}):o.a.createElement(v.InlineIcon,{icon:D.a})),l&&e.onStopClick&&o.a.createElement("div",{className:"nui-progress-button stop",onClick:e.onStopClick},o.a.createElement(v.InlineIcon,{icon:J.a}))))}))(Tr(),y.blue,Object(g.a)(.1,y.blue),y.red,Object(g.a)(.1,y.red)),zr=Object(b.a)((function(e){var n,t,r,a=isNaN(e.ratio)?0:parseInt(Math.round(100*e.ratio)),i=_r(e.status),l="undefined"!==i?"string"===i?e.status:e.status(a):"".concat(a,"%");return o.a.createElement("div",{className:e.className,style:(n={minWidth:28},t="minWidth",r=a+"%",t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n)},o.a.createElement("div",null,l))}))(Ar(),y.progress,y.fontFamily,(function(e){return e.busy?"animate-stripes 1.6s linear infinite":"none"})),Mr=function(e){return o.a.createElement(Ir,e)};function Fr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Lr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Br(){var e=qr(["\n\tbackground-color: rgba(",", 0.8);\n\tborder-radius: 4px;\n\tcolor: ",";\n\tfont-family: ",";\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ",";\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ",';\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(',", 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t","\n"]);return Br=function(){return e},e}function Dr(){var e=qr(["\n\tdisplay: flex;\n"]);return Dr=function(){return e},e}function qr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Mr.propTypes={value:l.a.number,max:l.a.number,busy:l.a.bool,paused:l.a.bool,onPauseClick:l.a.func,onStopClick:l.a.func,status:l.a.oneOf([l.a.string,l.a.func])},Mr.defaultProps={value:0,max:100,busy:!1,paused:!1,onPauseClick:void 0,onStopClick:void 0,status:void 0};var Ur=b.a.div(Dr()),Gr=b.a.div(Br(),y.blackRGB,y.white,y.fontFamily,y.fontSizeText,(function(e){return e.visible?"inline-block":"none"}),y.blackRGB,y.blackRGB,y.blackRGB,y.blackRGB,(function(e){return e.style})),Hr=function(e){var n=e.text,t=void 0===n?"Hello world!":n,r=e.position,i=void 0===r?"top":r,l=Fr(Object(a.useState)(!1),2),c=l[0],u=l[1],s=Ge(),f=s.ref,d=s.width,m=s.height,p=Ge(),h=p.ref,b=p.width,g=p.height,y=Object(a.useMemo)((function(){var e=0,n=0;if("top"===i)e=-1*m-5,n=d/2*-1+b/2;else if("bottom"===i)e=g+5,n=d/2*-1+b/2;else if("left"===i){e=(m-g)/2*-1,n=-1*d-5}else if("right"===i){e=(m-g)/2*-1,n=b+5}return{transform:"translateX(".concat(n,"px) translateY(").concat(e,"px)")}}),[i,d,m,b,g]);return o.a.createElement(Ur,null,o.a.createElement(Gr,{ref:f,visible:c,className:i,style:y},t),o.a.createElement("div",{ref:h,onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)}},e.children))},Wr=function(e){return o.a.createElement(Hr,e)};function $r(){return($r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Yr(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Jr(){var e=Kr(["\n\n path {\n fill: ",";\n }\n\n ","\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n"]);return Jr=function(){return e},e}function Vr(){var e=Kr(["\n display: flex;\n align-items: center;\n"]);return Vr=function(){return e},e}function Kr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Wr.propTypes={text:l.a.string,position:l.a.oneOf(["top","right","bottom","left"])},Wr.defaultProps={text:"Hello world!",position:"top"};var Zr=b.a.div(Vr()),Xr=Object(b.a)(v.Icon)(Jr(),(function(e){return e.color}),(function(e){return function(e){if(e)return"\n &:hover {\n path {\n fill: ".concat(Object(g.a)(.1,e),";\n }\n }\n ")}(e.color)})),Qr=function(e){var n=e.icon,t=e.spinning,r=void 0!==t&&t,a=e.className,i=void 0===a?"":a,l=e.title,c=e.tooltip,u=e.containerStyle,s=e.color,f=Yr(e,["icon","spinning","className","title","tooltip","containerStyle","color"]);f.width||f.height||(f.width=f.height=30);var d=function(){return"string"==typeof n?xe[n]||null:n},m="nui-icon ".concat(i).concat(f.onClick?" nui-clickable":"").concat(r?" spin":"");return c?o.a.createElement(Wr,{text:c.text,position:c.position||"top"},o.a.createElement(Zr,{style:u},o.a.createElement(Xr,$r({icon:d(),className:m,color:s},f)))):o.a.createElement(Zr,{style:u,title:l},o.a.createElement(Xr,$r({icon:d(),className:m,color:s},f)),c?o.a.createElement(Wr,null,c):null)},ea=function(e){return o.a.createElement(Qr,e)};ea.propTypes={icon:l.a.oneOfType([l.a.instanceOf(v.IconifyIcon),l.a.oneOf(["lock","lock-open","file-undo","chevron-double-left","chevron-double-right","chevron-left","chevron-right","chevron-down","chevron-up","pause","play","replay","check","stop","delete","undo","alert","database","pencil","tools","cog","close","cat","upload"])]),color:l.a.string,spinning:l.a.bool,className:l.a.string,tooltip:l.a.string},ea.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0};var na=t(55),ta=t.n(na);function ra(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n color: white;\n font-family: ",";\n font-size: ",";\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ",";\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ",";\n line-height: normal;\n font-size: ",";\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n"]);return ra=function(){return e},e}var aa=b.a.div(ra(),y.fontFamily,y.fontSizeText,y.header,y.fontFamily,y.fontFamily,y.fontSizeText),oa=function(e){var n=e.title,t=void 0===n?"NekoUI":n,r=e.subtitle,a=void 0===r?"By Jordy Meow":r,i=e.children,l=e.saving,c=void 0!==l&&l;return o.a.createElement(aa,null,o.a.createElement("div",{className:"nui-header-logo-container"},o.a.createElement(Cr,null)),o.a.createElement("div",{className:"nui-header-title-container"},o.a.createElement("h1",{className:"nui-header-title"},t),o.a.createElement("small",{className:"nui-header-subtitle"},o.a.createElement("a",{target:"_blank",href:"https://meowapps.com",style:{color:"white",textDecoration:"none"}},a))),o.a.createElement("div",{className:"nui-header-extra-content"},i),c&&o.a.createElement(ea,{icon:ta.a,width:"36",height:"36"}))},ia=function(e){return o.a.createElement(oa,e)};function la(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(",", 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ",";\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ",";\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ",";\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n }\n"]);return la=function(){return e},e}ia.propTypes={title:l.a.string,subtitle:l.a.string,saving:l.a.bool},ia.defaultProps={title:"NekoUI",subtitle:"By Jordy Meow",saving:!1};var ca=b.a.div(la(),y.fontFamily,y.blueRGB,y.white,y.darkGray,y.white,y.fontFamily),ua=function(e){var n=e.currentPage,t=e.limit,r=e.onClick,a=e.total,i=Math.ceil(0===a?1:t>0?a/t:1),l="nako-paging-controller-icon ".concat(1===n?"disabled":""),c="nako-paging-controller-icon ".concat(n===i?"disabled":""),u=function(e){r(e)};return o.a.createElement(ca,null,o.a.createElement("span",{className:"neko-paging-text"},a," result",a>0?"s":""),o.a.createElement("div",{className:"neko-paging-controller"},o.a.createElement(v.Icon,{icon:P.a,className:l,onClick:function(){return u(1)}}),o.a.createElement(v.Icon,{icon:T.a,className:l,onClick:function(){return u(n-1)}}),o.a.createElement("p",{className:"nako-paging-controller-text"},"Page ",n," of ",i),o.a.createElement(v.Icon,{icon:I.a,className:c,onClick:function(){return u(n+1)}}),o.a.createElement(v.Icon,{icon:_.a,className:c,onClick:function(){return u(i)}})))},sa=function(e){return o.a.createElement(ua,e)};function fa(){var e=ma(["\n color: ",";\n cursor: pointer;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ",';\n font-weight: bold;\n }\n\n &::after {\n content: "|";\n color: ',";\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ",";\n font-weight: normal;\n margin-left: 4px;\n }\n"]);return fa=function(){return e},e}function da(){var e=ma(["\n display: flex;\n align-items: center;\n"]);return da=function(){return e},e}function ma(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}sa.propTypes={currentPage:l.a.number,limit:l.a.number,total:l.a.number,onClick:l.a.func},sa.defaultProps={currentPage:void 0,limit:void 0,total:void 0,onClick:void 0};var pa=b.a.div(da()),ha=b.a.span(fa(),y.blue,y.fontFamily,y.black,y.darkGray,y.darkGray),ba=function(e){var n=e.id,t=e.value,r=e.onChange,a=e.busy,i=void 0!==a&&a,l=o.a.Children.map(e.children,(function(e,a){return o.a.cloneElement(e,{busy:i,isActive:e.props.value===t,onClick:function(e){e!==t&&r(e,n)}})}));return o.a.createElement(pa,null,l)},ga=function(e){var n=e.title,t=e.value,r=void 0===t?0:t,a=e.count,i=e.onClick,l=e.busy,c=e.isActive;return o.a.createElement(ha,{onClick:function(){return i(r)},className:"".concat(c?"is-active":"")},n,null===a?null:o.a.createElement("span",null,"(",l?o.a.createElement(ea,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):a,")"))},ya=function(e){return o.a.createElement(ba,e)};ya.propTypes={id:l.a.string,value:l.a.string,onChange:l.a.func},ya.defaultProps={id:void 0,value:void 0,onChange:void 0};var va=function(e){return o.a.createElement(ga,e)};function Ea(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ","px;\n height: ","px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ","px;\n height: ",'px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: "";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ',";\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ","px;\n height: ",'px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ',"px;\n height: ","px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ","px;\n height: ","px;\n \n .semi-circle--mask {\n transform: rotate(","deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ","px;\n height: ","px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return Ea=function(){return e},e}va.propTypes={title:l.a.string,value:l.a.string,count:l.a.number,onClick:l.a.func,isActive:l.a.bool},va.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1};var xa=b.a.section(Ea(),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.backgroundColor}),(function(e){return e.width}),(function(e){return e.width}),(function(e){return e.width+2}),(function(e){return e.width/2+2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.degrees}),(function(e){return e.width+2}),(function(e){return e.width/2})),wa=function(e){var n=e.value,t=void 0===n?1e3:n,r=(e.min,e.max),a=void 0===r?2500:r,i=e.width,l=void 0===i?200:i,c=e.background,u=void 0===c?"#007cba":c,s=e.children,f=180*(t<=a?t:a)/a;return o.a.createElement(xa,{backgroundColor:u,degrees:f,width:l},o.a.createElement("div",{class:"gauge"},o.a.createElement("div",{class:"mask"},o.a.createElement("div",{class:"semi-circle"}),o.a.createElement("div",{class:"semi-circle--mask"})),o.a.createElement("div",{class:"child-container"},o.a.createElement("div",{class:"child"},o.a.createElement("div",{class:"spacing"}),s))))};function ka(){var e=Oa(["\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return ka=function(){return e},e}function Ra(){var e=Oa(["\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return Ra=function(){return e},e}function Oa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}wa.propTypes={value:l.a.number,min:l.a.number,max:l.a.number,width:l.a.number,background:l.a.string},wa.defaultProps={value:1e3,min:0,max:2500,width:200,background:"#007cba"};var ja=b.a.p(Ra()),Sa=b.a.p(ka());function Pa(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ca(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pa(Object(t),!0).forEach((function(n){_a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pa(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function _a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Aa(e){return function(e){if(Array.isArray(e))return za(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ia(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ta(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Na(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Ia(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ia(e,n){if(e){if("string"==typeof e)return za(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?za(e,n):void 0}}function za(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ma(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n background: #f1f1f1;\n border: 2px dashed rgb(0 0 0 / 30%);\n color: rgb(0 0 0 / 60%);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.25s ease;\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n"]);return Ma=function(){return e},e}var Fa=b.a.div(Ma()),La=function(e){var n=e.width,t=void 0===n?"100%":n,r=e.height,i=void 0===r?"100%":r,l=e.iconSize,c=void 0===l?48:l,u=e.onSuccess,s=void 0===u?function(){}:u,f=e.onFailure,d=void 0===f?function(){}:f,m=e.style,p=void 0===m?{}:m,b=e.apiUrl,g=e.apiConfig,y=Na(Object(a.useState)(!1),2),v=y[0],E=y[1],x=Na(Object(a.useState)(Math.floor(1e8*Math.random())),2),w=x[0],k=(x[1],Object(a.useRef)(null)),R=Na(Object(a.useState)(!1),2),O=R[0],j=R[1],S=function(){var e,n=(e=regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(!0),g.file=n[0],e.next=4,Jo(b,g);case 4:(t=e.sent).success?s(t):d(t),j(!1);case 7:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Ta(o,r,a,i,l,"next",e)}function l(e){Ta(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),P=function(e){e.preventDefault(),e.stopPropagation()},C=function(e){e.preventDefault(),e.stopPropagation(),E(!0)},_=function(e,n){n.preventDefault(),n.stopPropagation(),E(!1),console.log(e),S(e)};return o.a.createElement(h,{busy:O},o.a.createElement("input",{type:"file",id:w,accept:"image/*",ref:k,onChange:function(e){var n=[e.target.files[0]];_(n,e)},style:{display:"none"}}),o.a.createElement(Fa,{onClick:function(){k.current.click()},style:Ca(Ca({},p),{},{width:t,height:i}),className:v?"dropping":"",onDragOver:P,onDragEnter:C,onDragLeave:function(e){e.preventDefault(),e.stopPropagation(),E(!1)},onDrop:function(e){var n=Aa(e.dataTransfer.files);_(n,e)}},o.a.createElement(ea,{width:c,height:c,icon:"upload",spinning:O,onDragOver:P,onDragEnter:C})))};La.propTypes={width:l.a.string,height:l.a.string,onSuccess:l.a.func,onFailure:l.a.func,style:l.a.object,apiUrl:l.a.string,apiConfig:l.a.object},La.defaultProps={width:"100%",height:"100%",onSuccess:function(){},onFailure:function(){},style:{}};var Ba=t(56),Da=t.n(Ba);function qa(){return(qa=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ua(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Ga(){var e=Wa(["\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n"]);return Ga=function(){return e},e}function Ha(){var e=Wa(["\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: "," !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ",";\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n"]);return Ha=function(){return e},e}function Wa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var $a=b.a.div(Ha(),y.overlay,y.white),Ya=b.a.div(Ga(),y.fontFamily,y.fontFamily),Ja=function(e){var n=e.children,t=e.className,r=e.style,a=e.ok,i=void 0===a?"OK":a,l=e.cancel,c=void 0===l?"Cancel":l,u=e.customButtons,s=void 0===u?null:u,f=e.title,d=void 0===f?"":f,m=e.content,p=void 0===m?"":m,h=e.onOkClick,b=e.onCancelClick,g=Ua(e,["children","className","style","ok","cancel","customButtons","title","content","onOkClick","onCancelClick"]),y=r?"custom-modal":"",v=n||o.a.createElement(Ya,null,d&&o.a.createElement("p",{className:"title"},d),p&&o.a.createElement("p",{className:"content"},p),o.a.createElement("div",{className:"button-group"},b&&o.a.createElement(Se,{className:"danger",onClick:b},c),h&&o.a.createElement(Se,{onClick:h},i),s));return o.a.createElement(o.a.Fragment,null,o.a.createElement($a,{id:"neko-modal-parent"}),o.a.createElement(Da.a,qa({ariaHideApp:!1,parentSelector:function(){return document.getElementById("neko-modal-parent")},closeTimeoutMS:200,className:"neko-modal ".concat(t||""," ").concat(y)},g),v))},Va=function(e){return o.a.createElement(Ja,e)};Va.propTypes={className:l.a.string,style:l.a.object,ok:l.a.string,cancel:l.a.string,title:l.a.string,content:l.a.string,onOkClick:l.a.func,onCancelClick:l.a.func,customButtons:l.a.object},Va.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null};var Ka=t(57),Za=t.n(Ka);function Xa(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Qa(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(",", 0.1);\n border-right: 1px solid rgba(",", 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ",";\n color: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: rgba(",", 0.8);\n color: ",";\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n"]);return Qa=function(){return e},e}var eo=b.a.table(Qa(),y.white,y.fontFamily,y.blackRGB,y.blackRGB,y.blue,y.white,y.tableGray,y.blueRGB,y.white),no=function(e){var n=e.checked,t=e.intermediate,r=void 0!==t&&t,a=e.onSelect,i=void 0===a?function(){}:a,l=e.onUnselect,c=void 0===l?function(){}:l;Xa(e,["checked","intermediate","onSelect","onUnselect"]);return o.a.createElement(v.Icon,{icon:r?Za.a:n?ut.a:lt.a,width:"24px",height:"24px",onClick:function(){n?c():i()}})},to=function(e){var n=e.columns,t=e.data,r=e.busy,a=void 0!==r&&r,i=e.onSelect,l=e.onUnselect,c=e.selectedItems,u=e.sort,s=e.onSortChange,f=n.length+(i?1:0),d=t.map((function(e){var t=n.map((function(n){return{value:e[n.accessor],style:n.style||{}}}));return{id:e.id,cells:t}})),m=d.map((function(e){return e.id})),p=m.filter((function(e){return c.includes(e)})).length===m.length,b=!p&&c.length>0,g=n.reduce((function(e,n,t){return!1===n.visible&&e.push(t),e}),[]),E=o.a.createElement("tr",null,i&&o.a.createElement("th",{className:"table-checkbox-cell"},o.a.createElement(no,{checked:p,intermediate:b,onSelect:function(){return i(m)},onUnselect:function(){l(b?c:m)}})),n.filter((function(e,n){return!g.includes(n)})).map((function(e){var n=u&&u.accessor===e.accessor,t=u&&"asc"===u.by,r=e.style||{};return o.a.createElement("th",{style:r,key:e.accessor},o.a.createElement("div",{className:e.sortable?"sortable":"",onClick:e.sortable?function(){s(e.accessor,n&&t?"desc":"asc")}:void 0},o.a.createElement("div",null,e.title),o.a.createElement("div",null,e.sortable&&o.a.createElement(v.Icon,{icon:n?t?M.a:L.a:M.a,color:n?y.white:"rgba(".concat(y.blackRGB,", 0.1)"),width:"1.6rem",height:"1.6rem"}))))})));return o.a.createElement(h,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},o.a.createElement(eo,null,o.a.createElement("thead",null,E),o.a.createElement("tbody",null,!d.length&&o.a.createElement("tr",null,o.a.createElement("td",{colspan:f,style:{textAlign:"center",height:40,color:"gray"}},"Empty.")),d.map((function(e){return o.a.createElement("tr",{className:c.includes(e.id)?"selected":""},i&&o.a.createElement("td",{className:"table-checkbox-cell"},o.a.createElement(no,{checked:c.includes(e.id),onSelect:function(){return i([e.id])},onUnselect:function(){return l([e.id])}})),e.cells.filter((function(e,n){return!g.includes(n)})).map((function(e){return o.a.createElement("td",{style:e.style},e.value)})))}))),o.a.createElement("tfoot",null,E)))},ro=function(e){return o.a.createElement(to,e)};function ao(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return oo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function io(){var e=so(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return io=function(){return e},e}function lo(){var e=so(["\n font-family: ",";\n font-size: ",";\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ",";\n color: ",";\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n"]);return lo=function(){return e},e}function co(){var e=so(["\n"]);return co=function(){return e},e}function uo(){var e=so(["\n"]);return uo=function(){return e},e}function so(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}ro.propTypes={columns:l.a.arrayOf(l.a.any),data:l.a.arrayOf(l.a.any),busy:l.a.arrayOf(l.a.bool),onSelect:l.a.func,onUnselect:l.a.func,selectedItems:l.a.arrayOf(l.a.object),onSortChange:l.a.func},ro.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0};var fo=b.a.div(uo()),mo=b.a.div(co()),po=b.a.button(lo(),y.fontFamily,y.fontSizeText,y.blue,y.white),ho=b.a.div(io(),y.blue),bo=function(e){var n=ao(o.a.useState(0),2),t=n[0],r=n[1],a=o.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),i=o.a.Children.map(e.children,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})}));return o.a.createElement(fo,null,o.a.createElement(mo,null,a.map((function(n,a){return o.a.createElement(po,{key:n.key,className:"neko-tab-title ".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(t){!function(n,t,a){t.requirePro||(r(n),e.onChange&&e.onChange(n,t,a))}(a,n,t)}},n.title,o.a.createElement(Ne,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:n.requirePro}))}))),i)},go=function(e){var n=e.children,t=e.isActive;return o.a.createElement(ho,{className:"".concat(t?"active":"")},n)},yo=function(e){return o.a.createElement(bo,e)};yo.propTypes={isPro:l.a.bool,onChange:l.a.func},yo.defaultProps={isPro:!1,onChange:void 0};var vo=function(e){return o.a.createElement(go,e)};function Eo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return xo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function wo(){var e=Oo(["\n background-color: ",";\n display: none;\n\n &.active {\n display: block;\n }\n"]);return wo=function(){return e},e}function ko(){var e=Oo(["\n align-items: center;\n background-color: ",";\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(",", 0.25);\n cursor: default;\n }\n\n p {\n color: ",";\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ",";\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n"]);return ko=function(){return e},e}function Ro(){var e=Oo(["\n"]);return Ro=function(){return e},e}function Oo(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}vo.propTypes={isActive:l.a.bool,requirePro:l.a.bool,title:l.a.string},vo.defaultProps={isActive:!1,requirePro:!1,title:void 0};var jo=b.a.div(Ro()),So=b.a.div(ko(),y.blue,y.yellowRGB,y.white,y.fontFamily,y.white),Po=b.a.div(wo(),y.white),Co=function(e){var n=Eo(o.a.useState(),2),t=n[0],r=n[1],a=o.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),i=o.a.Children.map(e.children,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})}));return o.a.createElement(jo,null,a.map((function(n,a){return o.a.createElement(o.a.Fragment,null,o.a.createElement(So,{key:n.key,className:"".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(o){!function(n,a,o){if(!a.requirePro){var i=n===t?null:n;r(i),e.onChange&&e.onChange(i,a,o)}}(a,n,o)}},o.a.createElement("p",null,n.title,o.a.createElement(Ne,{className:"inline",show:n.requirePro})),o.a.createElement(v.Icon,{icon:a===t?M.a:I.a,className:"neko-side-tab-icon"})),i[a])})))},_o=function(e){var n=e.children,t=e.isActive;return o.a.createElement(Po,{className:"".concat(t?"active":"")},n)},Ao=function(e){return o.a.createElement(Co,e)};Ao.propTypes={isPro:l.a.bool,onChange:l.a.func},Ao.defaultProps={isPro:!1,onChange:void 0};var To=function(e){return o.a.createElement(_o,e)};function No(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ",";\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(",", 0.1);\n\n &.neko-align-left {\n justify-content: flex-start;\n }\n\n &.neko-align-right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n"]);return No=function(){return e},e}To.propTypes={isActive:l.a.bool,requirePro:l.a.bool,title:l.a.string},To.defaultProps={isActive:!1,requirePro:!1,title:void 0};var Io=b.a.div(No(),y.white,y.blackRGB),zo=function(e){var n=e.align,t=void 0===n?"left":n;return o.a.createElement(Io,{className:"neko-align-".concat(t)},e.children)},Mo=function(e){return o.a.createElement(zo,e)};Mo.propTypes={align:l.a.oneOf(["left","right"])},Mo.defaultProps={align:"left"};t(22);function Fo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var Lo=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Fo(this,e),this.url=r,this.message=n,this.code=t,this.body=a,this.debug=o};function Bo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Go(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Do(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function qo(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Do(o,r,a,i,l,"next",e)}function l(e){Do(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Uo(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=Go(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Go(e,n){if(e){if("string"==typeof e)return Ho(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ho(e,n):void 0}}function Ho(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Wo(e,n){for(var t=[],r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}var $o=function(e){if(!e.data)return e;if(e.data.length>0&&e.data[0].meta){var n,t=Uo(e.data);try{for(t.s();!(n=t.n()).done;){var r=n.value;try{r.meta=JSON.parse(r.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",r.meta)}}}catch(e){t.e(e)}finally{t.f()}}else if(e.data.meta)try{e.data.meta=JSON.parse(e.data.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",x.meta)}return e},Yo=function(){var e=qo(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>1&&void 0!==f[1]?f[1]:{},r=null,a={},o=null,i=null,e.prev=5,(t=t||{}).headers=t.headers?t.headers:{},t.headers.Pragma="no-cache",t.headers["Cache-Control"]="no-cache",e.next=12,fetch("".concat(n),t);case 12:return i=e.sent,e.next=15,i.text();case 15:r=e.sent,(a=JSON.parse(r)).success||(l=!1===a.success?"NOT-SUCCESS":"N/A",c=a.message?a.message:"Unknown error. Check your Console Logs.","rest_no_route"===a.code?(c="The API can't be accessed. Is Rest API enabled?",l="NO-ROUTE"):"internal_server_error"===a.code&&(c="Server error. Please check your PHP Error Logs.",l="SERVER-ERROR"),o=new Lo(c,l,n,r||i)),e.next=26;break;case 20:e.prev=20,e.t0=e.catch(5),u="BROKEN-REPLY",s="The reply sent by the server is broken.",i&&i.status&&408===i.status&&(u="REQUEST-TIMEOUT",s="The request generated a timeout."),o=new Lo(s,u,n,r||i,e.t0);case 26:return o&&(console.error("[NekoError] JsonFetcher",o.url,{code:o.code,error:o.error,body:o.body}),a.success=!1,a.error=o),e.abrupt("return",$o(a));case 28:case"end":return e.stop()}}),e,null,[[5,20]])})));return function(n){return e.apply(this,arguments)}}(),Jo=function(){var e=qo(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,f,d,m,p,h=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.length>1&&void 0!==h[1]?h[1]:{},r=t.json,a=void 0===r?{}:r,o=t.signal,i=t.file,l=t.nonce,c=i?new FormData:null,i)for(c.append("file",i),u=0,s=Object.entries(a);u<s.length;u++)f=Bo(s[u],2),d=f[0],m=f[1],c.append(d,m);return p=l?{"X-WP-Nonce":l}:{},c||(p["Content-Type"]="application/json"),e.abrupt("return",Yo(n,{method:"POST",headers:p,body:c||JSON.stringify(a),signal:o}));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Vo=wp.i18n.__,Ko={};Ko.RENAME=Vo("Rename","media-file-renamer"),Ko.DASHBOARD=Vo("Dashboard","media-file-renamer"),Ko.PENDING=Vo("Pending","media-file-renamer"),Ko.RENAMED=Vo("Renamed","media-file-renamer"),Ko.ALL=Vo("All","media-file-renamer"),Ko.THUMB=Vo("Thumb","media-file-renamer"),Ko.TITLE=Vo("Title","media-file-renamer"),Ko.ATTACHED_TO=Vo("Attached To","media-file-renamer"),Ko.FILENAME=Vo("Filename","media-file-renamer");var Zo=Ko,Xo=mfrh_media_file_renamer.prefix,Qo=mfrh_media_file_renamer.domain,ei=mfrh_media_file_renamer.rest_url.replace(/\/+$/,""),ni=mfrh_media_file_renamer.api_url.replace(/\/+$/,""),ti=mfrh_media_file_renamer.plugin_url.replace(/\/+$/,""),ri="1"===mfrh_media_file_renamer.is_pro,ai=ri&&"1"===mfrh_media_file_renamer.is_registered,oi=mfrh_media_file_renamer.rest_nonce,ii="1"===mfrh_media_file_renamer.mfrh_undo,li="1"===mfrh_media_file_renamer.mfrh_manual_rename;function ci(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function ui(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){ci(o,r,a,i,l,"next",e)}function l(e){ci(o,r,a,i,l,"throw",e)}i(void 0)}))}}function si(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return fi(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fi(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var di=wp.element,mi=di.useState,pi=di.useEffect,hi=function(e){var n=e.mutate,t=si(mi(e.entry),2),r=t[0],a=t[1],o=si(mi(!1),2),i=o[0],l=o[1],c=si(mi(""),2),u=c[0],s=c[1],f=si(mi(null),2),d=f[0],m=f[1],p=e.natural,b=void 0!==p&&p,g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!We){var n=e.concurrency,t=void 0===n?2:n;We=new ze.a({concurrency:t,autoStart:!0})}var r=function(){var e=Le(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,We.add(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return{runTask:r}}({concurrency:2}).runTask;pi((function(){s(""),e.entry?a(e.entry):e.mediaId&&v(e.mediaId)}),[e.entry]);var v=function(){var e=ui(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,g(ui(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Jo("".concat(ni,"/analyze"),{nonce:oi,json:{mediaId:n}}));case 1:case"end":return e.stop()}}),e)}))));case 3:t=e.sent,a(t.data),l((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=ui(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(n);case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=ui(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a(t),n&&n();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/rename"),{nonce:oi,json:{mediaId:r.ID}});case 3:n=e.sent,x(n.data),m(null),l((function(e){return e-1}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/rename"),{nonce:oi,json:{mediaId:r.ID,filename:u}});case 3:n=e.sent,x(n.data),m(null),s(""),l((function(e){return e-1}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/undo"),{nonce:oi,json:{mediaId:r.ID}});case 3:n=e.sent,x(n.data,r.current_filename),l((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=ui(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l((function(e){return e+1})),e.next=3,Jo("".concat(ni,"/set_lock"),{nonce:oi,json:{mediaId:r.ID,lock:!r.locked}});case 3:n=e.sent,x(n.data),l((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=!!u,S=j?u:d||(null==r?void 0:r.current_filename);return React.createElement(h,{busy:i},React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(wt,{natural:b,readOnly:!li||i,value:S,onChange:E,onEnter:k,style:{marginRight:0,flex:"auto"}}),!j&&React.createElement(ea,{icon:(null==r?void 0:r.locked)?"lock":"lock-open",width:24,title:(null==r?void 0:r.locked)?"Unlock, to allow future actions":"Lock, to avoid future actions",style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?y.blue:"#5a5a5a82",onClick:O}),j&&React.createElement(ea,{icon:"close",width:24,style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?y.blue:"#5a5a5a82",onClick:function(){s("")}}),!j&&(null==r?void 0:r.proposed_filename)&&!(null==r?void 0:r.proposed_filename_exists)&&React.createElement(Se,{style:{marginLeft:5},title:"Rename automatically",onMouseEnter:function(){return m(null==r?void 0:r.proposed_filename)},onMouseLeave:function(){return m(null)},onClick:w},"Auto Rename"),li&&j&&React.createElement(Se,{style:{marginLeft:5},title:"Rename manually",onClick:k},Zo.RENAME),(null==r?void 0:r.proposed_filename_exists)&&React.createElement(ea,{icon:"alert",color:"orange",tooltip:{text:"The ideal filename (".concat(r.proposed_filename,") already exists."),position:"left"}}),ii&&!j&&(null==r?void 0:r.original_filename)&&React.createElement(ea,{icon:"file-undo",title:"Rollback to original",color:y.red,onClick:R,onMouseEnter:function(){return m(null==r?void 0:r.original_filename)},onMouseLeave:function(){return m(null)}})))};function bi(){var e=xi(["\n color: white;\n margin: 0px 15px 15px 15px;\n\n .fatal {\n padding: 8px 12px;\n border-radius: 10px;\n background: #ab3014;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .warning {\n padding: 8px 12px;\n border-radius: 10px;\n background: #b98c0e;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .notice {\n padding: 8px 12px;\n border-radius: 10px;\n background: #23ad74;\n margin: 0 0 10px 0;\n border: 0;\n }\n"]);return bi=function(){return e},e}function gi(){var e=xi(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n font-family: Lato;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]);return gi=function(){return e},e}function yi(){var e=xi(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]);return yi=function(){return e},e}function vi(){var e=xi(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]);return vi=function(){return e},e}function Ei(){var e=xi(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]);return Ei=function(){return e},e}function xi(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var wi=b.a.div(Ei()),ki=Object(b.a)(An)(vi()),Ri=b.a.img(yi()),Oi=b.a.div(gi()),ji=b.a.div(bi());function Si(e){return function(e){if(Array.isArray(e))return Ti(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ai(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Ci(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Pi(o,r,a,i,l,"next",e)}function l(e){Pi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function _i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Ai(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ai(e,n){if(e){if("string"==typeof e)return Ti(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ti(e,n):void 0}}function Ti(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ni=wp.element,Ii=Ni.useState,zi=Ni.useEffect,Mi="".concat(ei,"/meow-common/v1"),Fi=function(e){var n=e.request,t=e.title,r=e.max,a=_i(Ii(!1),2),o=a[0],i=a[1],l=_i(Ii([]),2),c=l[0],u=l[1],s=c.length>0?c.reduce((function(e,n){return e+n})):0,f=c.length>0?Math.ceil(s/c.length):0,d=!c.length&&o;zi((function(){o&&setTimeout(Ci(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(new Date).getTime(),e.next=3,Jo("".concat(Mi,"/").concat(n));case 3:r=(new Date).getTime(),a=r-t,u((function(e){return[].concat(Si(e),[a])}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[c]);return React.createElement(wi,{style:{width:200,textAlign:"center"}},React.createElement(Sn,{h2:!0,style:{color:"white"}},t),React.createElement(wa,{size:200,value:d?r:f,max:r},React.createElement("span",{style:{fontSize:20}},d?"START":f+" ms"),React.createElement("span",{style:{fontSize:12}},d?"YOUR ENGINE":c.length+" requests")),React.createElement(Se,{style:{width:"100%",marginTop:10},color:o?"#cc3627":"#ccb027",onClick:function(){o||u([]),i(!o)}},o?"Stop":"Start"))};function Li(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Bi(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Li(Object(t),!0).forEach((function(n){Di(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Li(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Di(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Ui(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Gi(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Gi(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Hi=wp.element,Wi=Hi.useState,$i=Hi.useEffect;ni&&ei&&ti||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var Yi="".concat(ei,"/meow-common/v1"),Ji=React.createElement(wi,null,React.createElement(Sn,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),Vi=React.createElement(wi,null,React.createElement(Sn,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(Sn,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),Ki=React.createElement(wi,null,React.createElement(Sn,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(Sn,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(Sn,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/debugging-wordpress/",target:"_blank"},"How To Debug")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/seo-optimization/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/",target:"_blank"},"Clean Up and Optimize")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/optimize-images-cdn/",target:"_blank"},"Optimize Images")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/best-hosting-services-wordpress/",target:"_blank"},"Best Hosting Services"))))),Zi=React.createElement(wi,null,React.createElement(Sn,{p:!0},"A summarized version of your PHP Error Logs will be displayed here, with the latest errors at the top. After it, you will find information about your PHP, so make sure your scroll down.")),Xi=function(){var e=Ui(Wi(!1),2),n=e[0],t=e[1],a=Object(r.b)("".concat(Yi,"/all_settings/"),Yo),o=a.data,i=a.mutate,l=a.error,c=null==o?void 0:o.data,u=null==c?void 0:c.meowapps_hide_meowapps,s=null==c?void 0:c.force_sslverify,f=Ui(Wi(!1),2),d=f[0],m=f[1],p=Ui(Wi(""),2),h=p[0],b=p[1],g=Ui(Wi(""),2),y=g[0],v=g[1];$i((function(){l&&!n&&(t(!0),console.error("Error from UseSWR",l.message))}),[l]),$i((function(){var e=document.getElementById("meow-common-phperrorlogs"),n=document.getElementById("meow-common-phpinfo");b(e.innerHTML),v(n.innerHTML)}),[]);var E=function(){var e,n=(e=regeneratorRuntime.mark((function e(n,t){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Bi({},o.data))[t]=n,i(Bi(Bi({},o),{},{data:r}),!1),m(!0),e.next=6,Jo("".concat(Yi,"/update_option"),{json:{name:t,value:n},nonce:oi});case 6:a=e.sent,m(!1),a.success||alert(a.message),i();case 10:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){qi(o,r,a,i,l,"next",e)}function l(e){qi(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e,t){return n.apply(this,arguments)}}(),x=React.createElement(qn,{title:"Main Menu"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(Sn,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:d,checked:u,onChange:E}))),w=React.createElement(qn,{title:"SSL Verify"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(Sn,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:d,checked:s,onChange:E})));return React.createElement(hn,{showRestError:n},React.createElement(ia,{title:"The Dashboard"}),React.createElement(at,null,React.createElement(ot,{full:!0},React.createElement(yo,null,React.createElement(vo,{title:"Meow Apps"},Ji,React.createElement(at,null,React.createElement(ot,{minimal:!0},React.createElement(ki,{title:"Media Cleaner",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/media-cleaner.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(ki,{title:"Media File Renamer",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/media-file-renamer.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(ki,{title:"Contact Form Block",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress."))),React.createElement(ki,{title:"Meow Analytics",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(ot,{minimal:!0},React.createElement(ki,{title:"Meow Gallery",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/meow-gallery.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(ki,{title:"Meow Lightbox",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/meow-lightbox.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(ki,{title:"WP/LR Sync",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/wplr-sync.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"WP/LR Sync")),React.createElement("p",null,"Are you using Lightroom? So you know WP/LR Sync already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(ki,{title:"Perfect Images + Retina",className:"primary"},React.createElement(Ri,{src:"".concat(ti,"/common/img/wp-retina-2x.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"Perfect Images + Retina")),React.createElement("p",null,"It handles Retina, help you managing the Image Sizes registered in your WP, and much more.")))))),React.createElement(vo,{title:"Performance"},Vi,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(Fi,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(Fi,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(Fi,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(vo,{title:"Recommendations"},Ki),React.createElement(vo,{title:"PHP Errors & Info"},Zi,React.createElement(ji,{dangerouslySetInnerHTML:{__html:h}}),React.createElement(Oi,{dangerouslySetInnerHTML:{__html:y}})),React.createElement(vo,{title:"Settings"},React.createElement(An,{title:"Settings",className:"primary"},x,w))))))};function Qi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function el(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Qi(o,r,a,i,l,"next",e)}function l(e){Qi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function nl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return tl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tl(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var rl=wp.element,al=rl.useState,ol=rl.useEffect,il="".concat(ei,"/meow-licenser/").concat(Xo,"/v1"),ll=function(){var e=nl(al(!1),2),n=e[0],t=e[1],r=nl(al(null),2),a=r[0],o=r[1],i=nl(al(null),2),l=i[0],c=i[1],u=nl(al(""),2),s=u[0],f=u[1],d=ai&&(!l||"valid"!==l.license),m=function(){var e=el(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ri){e.next=2;break}return e.abrupt("return");case 2:return t(!0),e.next=5,Jo("".concat(il,"/get_license"),{nonce:oi});case 5:n=e.sent,c(n.data),n.data.key&&f(n.data.key),t(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=el(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,Jo("".concat(il,"/set_license"),{nonce:oi,json:{serialKey:null}});case 3:e.sent.success&&(f(""),c(null),o("licenseRemoved")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),h=function(){var e=el(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,Jo("".concat(il,"/set_license"),{nonce:oi,json:{serialKey:s}});case 3:(n=e.sent).success&&(c(n.data),n.data&&!n.data.issue&&o("licenseAdded")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();ol((function(){m()}),[]);var b=d?"Forced License":ai?"Enabled":"Disabled",g=l&&"valid"===l.license,y="Your license is active. Thanks a lot for your support :)";g||(l?"no_activations_left"===l.issue?y=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===l.issue?y=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),"."):"missing"===l.issue?y="This license does not exist.":"disabled"===l.issue?y="This license has been disabled.":"item_name_mismatch"===l.issue?y="This license seems to be for a different plugin... isn't it? :)":(y=React.createElement("span",null,"There is an unknown error related to this serial key. Really sorry about this! Please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:l})):y="Unknown error :(");var v=React.createElement(An,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/plugin/".concat(Qo,"/")},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com/"},"Meow Apps Store"),"."),E=React.createElement(An,{title:"Pro Version (".concat(b,")"),busy:n,className:"primary"},React.createElement(qn,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(wt,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:n,value:s,onChange:function(e){return f(e)},placeholder:""})),l&&!g&&React.createElement(ja,null,y),l&&g&&React.createElement(Sa,null,y),!l&&React.createElement(Sn,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"/plugin/media-file-renamer/"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(qn,{contentAlign:"right"},l&&!g&&React.createElement(Se,{className:"secondary",disabled:n||!s,onClick:h},"Retry to validate"),l&&l.key===s&&React.createElement(Se,{className:"secondary",disabled:n||!s,onClick:p},"Remove License"),React.createElement(Se,{disabled:n||!s||l&&l.key===s,onClick:h},"Validate License")),React.createElement(Va,{isOpen:"licenseAdded"===a,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(Va,{isOpen:"licenseRemoved"===a,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return ri?E:v},cl=wp.element.render;function ul(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function sl(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ul(Object(t),!0).forEach((function(n){fl(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ul(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function fl(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function dl(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function ml(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){dl(o,r,a,i,l,"next",e)}function l(e){dl(o,r,a,i,l,"throw",e)}i(void 0)}))}}function pl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return hl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hl(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}document.meowDashboardLoaded||(document.meowDashboardLoaded=!0,document.addEventListener("DOMContentLoaded",(function(e){var n=document.getElementById("meow-common-dashboard");n&&cl(React.createElement(Xi,null),n)})));var bl=wp.element.useState,gl={marginTop:10,background:"rgb(0, 72, 88)",padding:10,color:"rgb(58, 212, 58)",maxHeight:600,minHeight:200,display:"block",fontFamily:"monospace",fontSize:12,whiteSpace:"pre",overflowX:"auto",width:"calc(100vw - 276px)"},yl=function(){var e=Object(r.b)("".concat(ni,"/all_settings/")),n=e.data,t=e.mutate,a=Ue(n,{},!0),o=a.busy,i=a.data,l=a.error,c=pl(bl(""),2),u=c[0],s=c[1],f=pl(bl(!1),2),d=f[0],m=f[1],p=o||d,h=null==i?void 0:i.mfrh_auto_rename,b=null==i?void 0:i.mfrh_on_upload,g=null==i?void 0:i.mfrh_rename_slug,y=null==i?void 0:i.mfrh_convert_to_ascii,v=null==i?void 0:i.mfrh_update_posts,E=null==i?void 0:i.mfrh_update_postmeta,x=null==i?void 0:i.mfrh_undo,w=null==i?void 0:i.mfrh_manual_rename,k=null==i?void 0:i.mfrh_numbered_files,R=null==i?void 0:i.mfrh_sync_alt,O=null==i?void 0:i.mfrh_sync_media_title,j=null==i?void 0:i.mfrh_force_rename,S=null==i?void 0:i.mfrh_log,P=null==i?void 0:i.mfrh_logsql,C=null==i?void 0:i.mfrh_rename_guid,_=null==i?void 0:i.mfrh_case_insensitive_check,A=null==i?void 0:i.mfrh_rename_on_save,T=[{id:"media_title",value:"media_title",label:React.createElement("span",null,"Based on Media Title"),requirePro:!1},{id:"post_title",value:"post_title",label:React.createElement("span",null,"Based on Attached Post Title"),requirePro:!ai},{id:"alt_text",value:"alt_text",label:React.createElement("span",null,"Based on Alternative Text"),requirePro:!ai},{id:"anonymize_md5",value:"anonymize_md5",label:React.createElement("span",null,"Anonymize with MD5"),requirePro:!ai},{id:"none",value:"none",label:React.createElement("span",null,"Disable Automatic Rename"),requirePro:!1}],N=function(){var e=ml(regeneratorRuntime.mark((function e(r,a){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=sl({},n.data))[a]=r,t(sl(sl({},n),{},{data:o}),!1),m(!0),e.prev=4,e.next=7,Jo("".concat(ni,"/update_option"),{nonce:oi,json:{name:a,value:r}});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),alert(e.t0.message);case 12:return e.prev=12,m(!1),t(),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[4,9,12,16]])})));return function(n,t){return e.apply(this,arguments)}}(),I=function(){var e=ml(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.next=3,Jo("".concat(ni,"/refresh_logs"));case 3:(n=e.sent).success&&s(n.data),m(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=ml(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.next=3,Jo("".concat(ni,"/clear_logs"));case 3:(n=e.sent).success&&s(n.data),m(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=React.createElement(An,{busy:p,title:"Side Updates",className:"primary"},React.createElement(Sn,{p:!0,style:{marginTop:0}},"When the files are renamed, many links to them on your WordPress might be broken. Those options are updating the references to those files. ",React.createElement("strong",null,"Give it a try, every install is different and it might not work for certain kind of references.")),React.createElement(qn,{title:"Posts"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_update_posts",disabled:p,label:"Enable",description:React.createElement(Sn,{p:!0},"Update the references to the renamed files in the ",React.createElement("strong",null,"content")," content and ",React.createElement("strong",null,"excerpt")," of the posts (pages and custom types included)."),value:"1",checked:v,onChange:N}))),React.createElement(qn,{title:"Post Meta"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_update_postmeta",disabled:p,label:"Enable",description:React.createElement(Sn,{p:!0},"Update the references in the ",React.createElement("strong",null,"custom fields")," of the posts (including pages and custom types metadata)."),value:"1",checked:E,onChange:N})))),F=React.createElement(qn,{title:"Method"},React.createElement(nr,{id:"mfrh_auto_rename",disabled:p,value:h,scrolldown:!0,name:"mfrh_auto_rename",description:"Attached Post includes all kinds of Post Types: Posts, Pages, Products, etc.",onChange:N},T.map((function(e){return React.createElement(tr,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),L=React.createElement(qn,{title:"On Upload"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_on_upload",disabled:p,label:"Enable",description:React.createElement(React.Fragment,null,React.createElement("span",null,"If your image has an EXIF title, it will be used to decide the filename. "),"post_title"===h&&React.createElement("span",null,"Note: The Attached Post Title ",React.createElement("u",null,"will not be used")," at the time of the upload due to WordPress API constraints.")),value:"1",checked:b,onChange:N}))),B=React.createElement(qn,{title:"Slug/Permalink"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_rename_slug",disabled:p,label:"Sync with filename",description:"Better to keep this un-checked as the link might have been referenced somewhere else.",value:"1",checked:g,onChange:N}))),D=React.createElement(qn,{title:"Transliteration"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_convert_to_ascii",disabled:p,label:"Enable (Recommended)",description:React.createElement(Sn,{p:!0},"Replace accents, emoticons, diacritics, umlauts, cyrillic and any kind of tricky characters by their ASCII equivalent.",React.createElement("br",null)," ",React.createElement("i",null,"Examples: tête → tete, schön → schon, Добро → dobro, etc.")),value:"1",requirePro:!ai,checked:y,onChange:N}))),q=React.createElement(qn,{title:"Undo"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_undo",disabled:p,label:"Enable",description:"An undo icon will be added to the UI. This allows to rollback to the original filename.",value:"1",checked:x,onChange:N}))),U=React.createElement(qn,{title:"Manual Rename"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_manual_rename",disabled:p,label:"Enable",description:"An editable field will be added everywhere your files appear in the UI.",value:"1",checked:w,onChange:N}))),G=React.createElement(qn,{title:"Force Rename"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_force_rename",disabled:p,label:"Enable",description:"Update the references to the file even if the file renaming itself was not successful. You might want to use that option if your install is broken and you are trying to link your Media to files for which the filenames has been altered (after a migration for exemple)",value:"1",requirePro:!ai,checked:j,onChange:N}))),H=React.createElement(qn,{title:"Numbered Files"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_numbered_files",disabled:p,label:"Enable Numbering",description:"Identical filenames will be allowed by the plugin and a number will be appended automatically (myfile.jpg, myfile-2.jpg, myfile-3.jpg, etc).",requirePro:!ai,value:"1",checked:k,onChange:N}))),W=React.createElement(qn,{title:"ALT Text"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_sync_alt",disabled:p||!("media_title"===h||"post_title"===h),label:React.createElement(Sn,null,"Synchronize"),description:"The ALT Text will be synchronized with the same source used for the filename.",requirePro:!ai,value:"1",checked:R,onChange:N}))),$=React.createElement(qn,{title:"Media Title"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_sync_media_title",disabled:p||"post_title"!==h,label:React.createElement(Sn,null,"Synchronize"),description:"The Media Title will be synchronized with the same source used for the filename.",requirePro:!ai,value:"1",checked:O,onChange:N}))),Y=React.createElement(qn,{title:"Logs"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_log",label:"Enable",description:React.createElement(Sn,{p:!0},"Simple logging that explains which actions has been run."),value:"1",checked:S,onChange:N}),React.createElement("div",{style:{marginTop:20}},React.createElement(Se,{onClick:I},"Refresh Logs"),React.createElement(Se,{className:"danger",onClick:z},"Clear Logs")))),J=React.createElement(qn,{title:"SQL Logs"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_logsql",disabled:p,label:"Enable",description:React.createElement(Sn,{p:!0},"The files mfrh_sql.log and mfrh_sql_revert.log will be created in the /logs directory and will include the raw SQL queries which were run by the plugin. If there is an issue, the revert SQL file can help you."),requirePro:!ai,value:"1",checked:P,onChange:N}))),V=React.createElement(qn,{title:"GUID"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_rename_guid",disabled:p,label:"Sync with filename",description:"The GUID will be renamed like the new filename. Better to keep this un-checked.",value:"1",checked:C,onChange:N}))),K=React.createElement(qn,{title:"Case Insensitive"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_case_insensitive_check",label:"Enable",value:"1",checked:_,onChange:N,description:React.createElement(React.Fragment,null,'This will consider the file such as "abc.jpg" and "ABC.JPG" as the same file. More information ',React.createElement("a",{target:"_blank",href:"https://meowapps.com/media-file-renamer-faq-issues/"},"here"),". You should check this if you are on a Windows-based server.")}))),Z=React.createElement(qn,{title:"Rename on Post Save"},React.createElement(ht,{max:"1"},React.createElement(dt,{id:"mfrh_rename_on_save",disabled:p,label:"Enable (Unsafe)",description:"You can modify the titles of your media while editing a post but, of course, the plugin can't update the HTML at this stage. With this option, the plugin will update the filenames and HTML after that you saved the post.",value:"1",checked:A,onChange:N})));return React.createElement(hn,{nekoErrors:[l]},React.createElement(ia,{title:"Media File Renamer | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(Se,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(Se,{className:"primary",icon:"dashboard",color:"#8554bb",onClick:function(){return location.href="upload.php?page=mfrh_dashboard"}},"Dashboard"))),React.createElement(at,null,React.createElement(ot,{full:!0},React.createElement(Ln,null,React.createElement(Sn,{p:!0},"It works out of the box, the default settings are good for most installs. However, you should really have a look at the ",React.createElement("a",{href:"https://meowapps.com/plugin/media-file-renamer/"},"tutorial"),".")),React.createElement(yo,null,React.createElement(vo,{title:"Basic"},React.createElement(at,null,React.createElement(ot,{minimal:!0},React.createElement(An,{busy:p,title:"Settings",className:"primary"},React.createElement(Sn,{h2:!0},"Automatic"),React.createElement(Sn,{p:!0},"This plugin's main goal is to make the process of optimizing your filenames entirely automatic. By default, your files will be named after the title of your media entry."),F,L,React.createElement(Sn,{h2:!0},"Manual"),U,React.createElement(Sn,{p:!0},"If you are a SEO guru or someone who loves having a perfectly neat filesystem, it is recommended to use automatic renaming first, then to tweak specific files with manual renaming. The ",React.createElement("a",{href:"/wp-admin/upload.php?page=mfrh_dashboard"},"Renamer Dashboard")," makes it very easy."))),React.createElement(ot,{minimal:!0},M,React.createElement(An,{busy:p,title:"UI (Extra Features)",className:"primary"},q)))),React.createElement(vo,{title:"Advanced"},React.createElement(at,null,React.createElement(ot,{minimal:!0},React.createElement(An,{busy:p,title:"Advanced Settings",className:"primary"},D,H),React.createElement(An,{busy:p,title:"Fields Syncing",className:"primary"},B,V,W,$,React.createElement(Sn,{p:!0},"The fields in the database will be synchronized, but the data already written in your HTML will not be overwritten."))),React.createElement(ot,{minimal:!0},React.createElement(An,{busy:p,title:"Developer Settings",className:"primary"},K,G,J,Z)))),React.createElement(vo,{title:"License (Pro)"},React.createElement(ll,{domain:Qo,prefix:Xo,isPro:ri,isRegistered:ai})),React.createElement(vo,{title:"Logs & Debug"},React.createElement(An,{busy:p,className:"primary"},Y),React.createElement("div",{style:gl},u))))))};function vl(e){return function(e){if(Array.isArray(e))return Rl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||kl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function El(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function xl(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){El(o,r,a,i,l,"next",e)}function l(e){El(o,r,a,i,l,"throw",e)}i(void 0)}))}}function wl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||kl(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kl(e,n){if(e){if("string"==typeof e)return Rl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Rl(e,n):void 0}}function Rl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ol=wp.element,jl=Ol.useState,Sl=Ol.useEffect,Pl=Ol.useMemo,Cl={width:40,height:40,objectFit:"cover"},_l=[{accessor:"thumbnail_url",title:Zo.THUMB,style:{width:16}},{accessor:"post_title",title:Zo.TITLE,sortable:!0,style:{width:"25%"}},{accessor:"post_parent",title:Zo.ATTACHED_TO,sortable:!0,style:{width:"25%"}},{accessor:"current_filename",title:Zo.FILENAME,sortable:!0}],Al={accessor:"id",by:"asc"},Tl=function(){var e,n,t,o=wl(jl("pending"),2),i=o[0],l=o[1],c=wl(jl(),2),u=c[0],s=c[1],f=wl(jl([]),2),d=f[0],m=f[1],p=wl(jl(!1),2),h=p[0],b=p[1],g=wl(jl(""),2),y=g[0],v=g[1],E=wl(jl(""),2),x=E[0],w=E[1],k=wl(jl(Al),2),R=k[0],O=k[1],j=wl(jl(1),2),S=j[0],P=j[1],C=wl(jl(10),2),_=C[0],A=C[1],T=function(){var e=Be(Object(a.useState)(new AbortController),2),n=e[0],t=e[1],r=Object(a.useRef)(!1),o=Object(a.useRef)(0),i=Be(Object(a.useState)(null),2),l=i[0],c=i[1],u=Be(Object(a.useState)(!1),2),s=u[0],f=u[1],d=Be(Object(a.useState)(0),2),m=d[0],p=d[1],h=Be(Object(a.useState)(!1),2),b=h[0],g=h[1],y=Be(Object(a.useState)(!1),2),v=y[0],E=y[1],x=Be(Object(a.useState)(0),2),w=x[0],k=x[1],R=function(){var e=Le(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new AbortController,t(n),g(!1),o.current=0,r.current=!1,f(!1),E(!1),k(0),p(0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=Le(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){g(!1),o.current=0,r.current=!1,f(!1),E(!1),A(n),c(!0),$e.start(),$e.onIdle().then((function(){C(),e()}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,$e.pause(),f(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,g(!1),f(!1),$e.start();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,$e.pause(),n.abort(),c(!1),g(!1),E(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=Le(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,E(!0),c(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=Le(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$e.add(Le(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n.signal);case 3:(a=e.sent)&&a.success||console.error("[useNekoTasks] Task returned nothing.",a),a.success||(o.current++,r.current||(g(a.error),j())),e.next=17;break;case 8:if(e.prev=8,e.t0=e.catch(0),"AbortError"!==e.t0.name){e.next=15;break}return console.log("Aborted"),e.abrupt("return");case 15:o.current++,r.current||(g("An error was caught (more information in the console)."),j());case 17:return e.prev=17,k((function(e){return e+1})),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[0,8,17,20]])})))),p((function(e){return e+1}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=Le(regeneratorRuntime.mark((function e(n){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$e.clear(),t=Me(n);try{for(t.s();!(r=t.n()).done;)a=r.value,_(a)}catch(e){t.e(e)}finally{t.f()}k(0);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=Object(a.useCallback)((function(){r.current=!0}),[]),N=Object(a.useCallback)((function(){return o.current}),[]);return{start:O,stop:P,pause:j,resume:S,reset:R,addTask:_,setAlwaysSkip:T,getErrorCount:N,error:b,success:v,busy:l,paused:s,value:w,max:m}}(),N=(S-1)*_,I=R.accessor,z=R.by,M=Object(r.b)("".concat(ni,"/stats")),F=M.data,L=M.mutate,B=Object(r.b)((e="".concat(ni,"/media"),n={limit:_,skip:N,filterBy:i,orderBy:I,order:z},t=e.includes("index.php?rest_route"),e+(t?"&":"?")+new URLSearchParams(n).toString())),D=B.data,q=B.mutate,U=Ue(F,{pending:"-",renamed:"-",all:"-"},!0),G=U.busy,H=U.data,W=U.error,$=Ue(D,[],!0),Y=$.busy,J=$.data,V=$.total,K=$.error,Z=Y||G||h,X=Pl((function(){return J.map((function(e){return{id:e.ID,thumbnail_url:React.createElement("img",{src:e.thumbnail_url,style:Cl}),post_title:React.createElement("a",{href:"post.php?post=".concat(e.ID,"&action=edit")},e.post_title),post_parent:React.createElement("div",{style:{maxHeight:35,overflow:"hidden"}},e.post_parent_title?e.post_parent_title:React.createElement("i",{style:{color:"#c1c1c1"}},"None")),current_filename:React.createElement(hi,{entry:e,mutate:function(){q(),L()}})}}))}),[J]);Sl((function(){m([]),O(Al),P(1)}),[i]),Sl((function(){if(null!==T.busy&&(b(T.busy),!T.busy)){var e=T.getErrorCount();e>0&&w("The process has finished, but ".concat(e," error(s) occurred (check your console).")),T.reset(),m([]),q(),L()}}),[T.busy]);var Q=function(){var e=xl(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jo("".concat(ni,"/get_all_ids"),{nonce:oi,json:{unlockedOnly:n}});case 2:if((t=e.sent).success){e.next=6;break}return alert(t.message),e.abrupt("return",[]);case 6:return e.abrupt("return",t.data);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,Q(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=16;break}return v("Undoing..."),r=t.map((function(e){return function(){var n=xl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Undo Media ".concat(e)),n.next=3,Jo("".concat(ni,"/undo"),{nonce:oi,json:{mediaId:e},signal:t});case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(r),e.abrupt("return");case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,Q(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=17;break}return v("Analyzing..."),r=Wo(t,20),a=r.map((function(e){return function(){var n=xl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Jo("".concat(ni,"/analyze"),{nonce:oi,json:{mediaIds:e},signal:t});case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(a),e.abrupt("return");case 17:b(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a,o,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(i.length>0&&void 0!==i[0])||i[0],t=i.length>1&&void 0!==i[1]?i[1]:null,v("Preparing..."),b(!0),!t){e.next=8;break}e.t0=t,e.next=11;break;case 8:return e.next=10,Q(n);case 10:e.t0=e.sent;case 11:if(!(r=e.t0)){e.next=18;break}return v("".concat(n?"Locking..":"Unlocking...")),a=Wo(r,50),o=a.map((function(e){return function(){var e=xl(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jo("".concat(ni,"/set_lock"),{nonce:oi,json:{mediaIds:r,lock:n},signal:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})),T.start(o),e.abrupt("return");case 18:b(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=xl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,Q(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=15;break}return r=t.map((function(e){return function(){var n=xl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Renaming #".concat(e)),n.next=3,Jo("".concat(ni,"/rename"),{nonce:oi,json:{mediaId:e},signal:t});case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(r),e.abrupt("return");case 15:b(!1);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/media-file-renamer/","_blank")}},"Get the Pro Version"),React.createElement(Se,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(hn,{nekoErrors:[W,K]},React.createElement(ia,{title:"Media File Renamer | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(Se,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(Se,{icon:"cog",color:"#8554bb",onClick:function(){return location.href="admin.php?page=mfrh_settings"}},"Settings"))),React.createElement(at,null,React.createElement(ot,{full:!0},!ai&&React.createElement(Ln,{footer:ae},React.createElement(Sn,{p:!0},"You must ",React.createElement("b",null,"backup the uploads folder and DB")," before using the Renamer. If you don't know how, give a try to ",React.createElement("a",{target:"_blank",href:"https://meow.click/blogvault"},"BlogVault"),". It is also highly recommanded to read the tutorial. Last but not least, check the ",React.createElement("b",null,"Pro Version"),", as it adds many features and also supports the development. This message is only displayed in the free version. Thank you!")),React.createElement(Mo,null,React.createElement(Se,{onClick:function(){return ne()}},"Analyze Library"),React.createElement(ln,{title:"Actions"},React.createElement(cn,{requiredPro:!0,onClick:function(){s("autoAttach")}},"Auto-Attach")),"pending"===i&&d.length>0&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return re(d)}},"Rename ",React.createElement("strong",null,d.length)," entries"),React.createElement(Se,{className:"secondary",onClick:function(){return te(!0,d)}},"Lock ",React.createElement("strong",null,d.length)," entries")),ii&&"renamed"===i&&d.length>0&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return ee(d)}},"Undo ",React.createElement("strong",null,d.length)," entries")),React.createElement("div",{style:{flex:1}},h&&React.createElement(Mr,{status:function(e){return"".concat(y," (").concat(e,"%)")},busy:h,value:T.value,max:T.max,onStopClick:T.stop})),"all"===i&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"secondary",onClick:function(){return te(!0)}},"Lock ",React.createElement("strong",null,"All")),React.createElement(Se,{className:"secondary",onClick:function(){return te(!1)}},"Unlock ",React.createElement("strong",null,"All"))),("all"===i||"pending"===i)&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"primary",onClick:function(){return s("renameAll")}},"Rename ",React.createElement("strong",null,"All"))),ii&&("all"===i||"renamed"===i)&&React.createElement(React.Fragment,null,React.createElement(Se,{className:"danger",onClick:function(){return s("undoAll")}},"Undo ",React.createElement("strong",null,"All")))),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(ya,{value:i,busy:G,onChange:function(e){l(e),P(1)}},React.createElement(va,{title:Zo.PENDING,value:"pending",count:H.pending}),React.createElement(va,{title:"Renamed",value:"renamed",count:H.renamed}),React.createElement(va,{title:"All",value:"all",count:H.all})),React.createElement(sa,{currentPage:S,limit:_,total:V,onClick:function(e){return P(e)}})),React.createElement(ro,{busy:Z,data:X,columns:_l,sort:R,onSortChange:function(e,n){O({accessor:e,by:n})},onSelect:function(e){m([].concat(vl(d),vl(e)))},onUnselect:function(e){m(vl(d.filter((function(n){return!e.includes(n)}))))},selectedItems:d}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(nr,{scrolldown:!0,value:_,onChange:function(e){A(e),P(1)}},React.createElement(tr,{value:5,label:"5 items per page"}),React.createElement(tr,{value:10,label:"10 items per page"}),React.createElement(tr,{value:25,label:"25 items per page"}),React.createElement(tr,{value:50,label:"50 items per page"})),React.createElement(sa,{currentPage:S,limit:_,total:V,onClick:function(e){return P(e)}}))),React.createElement(Va,{isOpen:"renameAll"===u,onRequestClose:function(){return s(null)},title:"You are about to rename all your (unlocked) files",content:"Renaming files is a dangerous operation. Please make sure you made a backup or your entire WordPress install. Should we start?",onOkClick:function(){s(null),re()},onCancelClick:function(){s(null)}}),React.createElement(Va,{isOpen:"undoAll"===u,onRequestClose:function(){return s(null)},title:"You are about to undo the renaming for all your files",content:"Are you sure you would like to proceed?",onOkClick:function(){s(null),ee()},onCancelClick:function(){s(null)}}),React.createElement(Va,{isOpen:"autoAttach"===u,onRequestClose:function(){return s(null)},title:"Coming soon!",content:"This feature, for Pro users, will scan your WordPress install to attach your unattached files to what they belong to (for example, an image to a product). That will also allow to rename those images automatically.",onOkClick:function(){s(null)}}),React.createElement(Va,{isOpen:x,title:"Success",ok:"Close",content:x,onOkClick:function(){w(""),T.reset()}})))},Nl=wp.element.render,Il={fetcher:Yo,revalidateOnFocus:!1};function zl(){Array.from(document.getElementsByClassName("mfrh-renamer-field")).forEach((function(e){var n=e.getAttribute("data-id");Nl(React.createElement(hi,{natural:!0,mediaId:n}),e)}))}document.addEventListener("DOMContentLoaded",(function(e){var n,t;new MutationObserver((function(){zl()})).observe(document.documentElement,{childList:!0,subtree:!0}),(n=document.getElementById("mfrh-admin-settings"))&&Nl(React.createElement(r.a,{value:Il},React.createElement(yl,null)),n),(t=document.getElementById("mfrh-media-rename"))&&Nl(React.createElement(r.a,{value:Il},React.createElement(Tl,null)),t),zl()}))}});
|
2 |
//# sourceMappingURL=index.js.map
|
classes/admin.php
CHANGED
@@ -2,10 +2,12 @@
|
|
2 |
|
3 |
class Meow_MFRH_Admin extends MeowCommon_Admin {
|
4 |
|
5 |
-
public function __construct() {
|
6 |
parent::__construct( MFRH_PREFIX, MFRH_ENTRY, MFRH_DOMAIN, class_exists( 'MeowPro_MFRH_Core' ) );
|
7 |
if ( is_admin() ) {
|
8 |
-
|
|
|
|
|
9 |
|
10 |
// Load the scripts only if they are needed by the current screen
|
11 |
$uri = $_SERVER['REQUEST_URI'];
|
@@ -57,7 +59,7 @@ class Meow_MFRH_Admin extends MeowCommon_Admin {
|
|
57 |
|
58 |
function admin_menu() {
|
59 |
add_submenu_page( 'meowapps-main-menu', __( 'Renamer', MFRH_DOMAIN ), __( 'Renamer', MFRH_DOMAIN ),
|
60 |
-
'
|
61 |
);
|
62 |
}
|
63 |
|
2 |
|
3 |
class Meow_MFRH_Admin extends MeowCommon_Admin {
|
4 |
|
5 |
+
public function __construct( $allow_setup ) {
|
6 |
parent::__construct( MFRH_PREFIX, MFRH_ENTRY, MFRH_DOMAIN, class_exists( 'MeowPro_MFRH_Core' ) );
|
7 |
if ( is_admin() ) {
|
8 |
+
if ( $allow_setup ) {
|
9 |
+
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
10 |
+
}
|
11 |
|
12 |
// Load the scripts only if they are needed by the current screen
|
13 |
$uri = $_SERVER['REQUEST_URI'];
|
59 |
|
60 |
function admin_menu() {
|
61 |
add_submenu_page( 'meowapps-main-menu', __( 'Renamer', MFRH_DOMAIN ), __( 'Renamer', MFRH_DOMAIN ),
|
62 |
+
'read', 'mfrh_settings', array( $this, 'admin_settings' )
|
63 |
);
|
64 |
}
|
65 |
|
classes/core.php
CHANGED
@@ -10,6 +10,8 @@ class Meow_MFRH_Core {
|
|
10 |
public $upload_folder = null;
|
11 |
public $site_url = null;
|
12 |
public $contentDir = null; // becomes 'wp-content/uploads'
|
|
|
|
|
13 |
|
14 |
public function __construct() {
|
15 |
$this->site_url = get_site_url();
|
@@ -21,10 +23,19 @@ class Meow_MFRH_Core {
|
|
21 |
}
|
22 |
|
23 |
function init() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
load_plugin_textdomain( MFRH_DOMAIN, false, basename( MFRH_PATH ) . '/languages' );
|
25 |
|
26 |
// Part of the core, settings and stuff
|
27 |
-
$this->admin = new Meow_MFRH_Admin();
|
28 |
if ( class_exists( 'MeowPro_MFRH_Core' ) ) {
|
29 |
new MeowPro_MFRH_Core( $this, $this->admin );
|
30 |
$this->pro = true;
|
10 |
public $upload_folder = null;
|
11 |
public $site_url = null;
|
12 |
public $contentDir = null; // becomes 'wp-content/uploads'
|
13 |
+
private $allow_usage = null;
|
14 |
+
private $allow_setup = null;
|
15 |
|
16 |
public function __construct() {
|
17 |
$this->site_url = get_site_url();
|
23 |
}
|
24 |
|
25 |
function init() {
|
26 |
+
|
27 |
+
// Check the roles
|
28 |
+
$this->allow_usage = apply_filters( 'mfrh_allow_usage', current_user_can( 'administrator' ) );
|
29 |
+
$this->allow_setup = apply_filters( 'mfrh_allow_setup', current_user_can( 'manage_options' ) );
|
30 |
+
if ( !$this->allow_usage ) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Languages
|
35 |
load_plugin_textdomain( MFRH_DOMAIN, false, basename( MFRH_PATH ) . '/languages' );
|
36 |
|
37 |
// Part of the core, settings and stuff
|
38 |
+
$this->admin = new Meow_MFRH_Admin( $this->allow_setup );
|
39 |
if ( class_exists( 'MeowPro_MFRH_Core' ) ) {
|
40 |
new MeowPro_MFRH_Core( $this, $this->admin );
|
41 |
$this->pro = true;
|
classes/rest.php
CHANGED
@@ -7,9 +7,6 @@ class Meow_MFRH_Rest
|
|
7 |
private $namespace = 'media-file-renamer/v1';
|
8 |
|
9 |
public function __construct( $core ) {
|
10 |
-
if ( !current_user_can( 'administrator' ) ) {
|
11 |
-
return;
|
12 |
-
}
|
13 |
$this->core = $core;
|
14 |
$this->admin = $core->admin;
|
15 |
|
7 |
private $namespace = 'media-file-renamer/v1';
|
8 |
|
9 |
public function __construct( $core ) {
|
|
|
|
|
|
|
10 |
$this->core = $core;
|
11 |
$this->admin = $core->admin;
|
12 |
|
classes/ui.php
CHANGED
@@ -19,7 +19,7 @@ class Meow_MFRH_UI {
|
|
19 |
}
|
20 |
|
21 |
function admin_menu() {
|
22 |
-
add_media_page( 'Media File Renamer', __( 'Renamer', 'media-file-renamer' ), '
|
23 |
'mfrh_dashboard', array( $this, 'rename_media_files' ), 1 );
|
24 |
}
|
25 |
|
19 |
}
|
20 |
|
21 |
function admin_menu() {
|
22 |
+
add_media_page( 'Media File Renamer', __( 'Renamer', 'media-file-renamer' ), 'read',
|
23 |
'mfrh_dashboard', array( $this, 'rename_media_files' ), 1 );
|
24 |
}
|
25 |
|
media-file-renamer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Media File Renamer
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
6 |
-
Version: 5.0
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-file-renamer
|
@@ -14,7 +14,7 @@ Originally developed for two of my websites:
|
|
14 |
- Haikyo (https://haikyo.org)
|
15 |
*/
|
16 |
|
17 |
-
define( 'MFRH_VERSION', '5.0
|
18 |
define( 'MFRH_PREFIX', 'mfrh' );
|
19 |
define( 'MFRH_DOMAIN', 'media-file-renamer' );
|
20 |
define( 'MFRH_ENTRY', __FILE__ );
|
3 |
Plugin Name: Media File Renamer
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
6 |
+
Version: 5.1.0
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-file-renamer
|
14 |
- Haikyo (https://haikyo.org)
|
15 |
*/
|
16 |
|
17 |
+
define( 'MFRH_VERSION', '5.1.0' );
|
18 |
define( 'MFRH_PREFIX', 'mfrh' );
|
19 |
define( 'MFRH_DOMAIN', 'media-file-renamer' );
|
20 |
define( 'MFRH_ENTRY', __FILE__ );
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a95
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 5.0
|
9 |
|
10 |
Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
11 |
|
@@ -66,6 +66,10 @@ The plugin can be tweaked in many ways, there are many actions and filters avail
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
69 |
= 5.0.9 =
|
70 |
* Fix: Rules for renaming files with slashes were imperfect.
|
71 |
* Fix: ArgumentCountError with action_sync_alt (too few arguments).
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 5.1.0
|
9 |
|
10 |
Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
11 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 5.1.0 =
|
70 |
+
* Add: Support overriding roles.
|
71 |
+
* Fix: The layout of the dashboard was broken by WPBakery.
|
72 |
+
|
73 |
= 5.0.9 =
|
74 |
* Fix: Rules for renaming files with slashes were imperfect.
|
75 |
* Fix: ArgumentCountError with action_sync_alt (too few arguments).
|