Version Description
(2022/03/18) = * Fix: Compatibility with the latest version of Gutenberg Gallery. * Info: If you like the plugin, your reviews are welcome here. Thank you :)
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Gallery Custom Links |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- app/index.js.map +1 -1
- common/admin.php +4 -3
- common/js/components/LicenseBlock.js +5 -5
- common/premium/licenser.php +10 -5
- gallery-custom-links.php +2 -2
- readme.txt +6 -4
app/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactDOM\"","webpack:///../neko-ui/src/common/NekoBusyOverlay.js","webpack:///../neko-ui/src/common/NekoTheme.js","webpack:///../neko-ui/src/common/PresetIcons.js","webpack:///../neko-ui/src/misc/Spinner.js","webpack:///../neko-ui/src/button/Button.js","webpack:///../neko-ui/src/label/ProOnly.js","webpack:///../neko-ui/src/hooks.js","webpack:///../neko-ui/src/button/MenuButton.js","webpack:///../neko-ui/src/container/Page.js","webpack:///../neko-ui/src/misc/Typography.js","webpack:///../neko-ui/src/container/Block.js","webpack:///../neko-ui/src/container/Container.js","webpack:///../neko-ui/src/container/Settings.js","webpack:///../neko-ui/src/container/Window.js","webpack:///../neko-ui/src/container/Wrapper.js","webpack:///../neko-ui/src/form/Checkbox.js","webpack:///../neko-ui/src/form/CheckboxGroup.js","webpack:///../neko-ui/src/form/Input.js","webpack:///../neko-ui/src/form/TextArea.js","webpack:///../neko-ui/src/misc/Tooltip.js","webpack:///../neko-ui/src/misc/Icon.js","webpack:///../neko-ui/src/form/Select.js","webpack:///../neko-ui/src/form/Form.js","webpack:///../neko-ui/src/form/Switch.js","webpack:///../neko-ui/src/misc/Finder.js","webpack:///../neko-ui/src/misc/Logo.js","webpack:///../neko-ui/src/misc/Progress.js","webpack:///../neko-ui/src/misc/Header.js","webpack:///../neko-ui/src/misc/Paging.js","webpack:///../neko-ui/src/misc/Links.js","webpack:///../neko-ui/src/misc/Gauge.js","webpack:///../neko-ui/src/misc/Message.js","webpack:///../neko-ui/src/misc/Upload.js","webpack:///../neko-ui/src/misc/UploadDropArea.js","webpack:///../neko-ui/src/modal/Modal.js","webpack:///../neko-ui/src/table/Table.js","webpack:///../neko-ui/src/modal/MediaLibraryModal.js","webpack:///../neko-ui/src/tabs/Tabs.js","webpack:///../neko-ui/src/tabs/SideTabs.js","webpack:///../neko-ui/src/toolbar/Toolbar.js","webpack:///../neko-ui/src/errors.js","webpack:///../neko-ui/src/helpers.js","webpack:///./app/js/settings.js","webpack:///./app/js/components/Settings.js","webpack:///./app/js/i18n.js","webpack:///./app/js/components/EditLinkField.js","webpack:///./app/js/index.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","React","ReactDOM","NekoBusyOverlay","props","spinner","busy","overlayStyle","useState","showLoader","setShowLoader","useEffect","timeout","setTimeout","clearTimeout","loader","Fragment","className","style","Boolean","jsx","propsForElement","undefined","position","children","propTypes","PropTypes","bool","isRequired","oneOfType","arrayOf","node","NekoColors","black","blackRGB","blue","blueRGB","deepBlue","finderBorder","lightBlue","lightGray","lightGray2","lightPurple","gray","green","darkGray","disabledForm","orange","overlay","red","redHighlight","header","proGray","progress","purple","tableGray","yellow","yellowRGB","white","whiteRGB","NekoColorTheme","danger","primary","secondary","success","NekoTheme","fontFamily","fontSizeH1","fontSizeH2","fontSizeText","fontSizeSmall","fontSizeSmallButton","lightShadow","presetIcons","lockCheck","lockOpenVariant","fileUndo","chevronDoubleLeft","chevronDoubleRight","chevronLeft","chevronRight","chevronDown","chevronUp","pauseIcon","playIcon","replayIcon","checkIcon","stopIcon","deleteIcon","undoIcon","alertCircle","databaseIcon","toolsIcon","cogIcon","closeIcon","catIcon","arrowUpBoldCircleOutline","trashCan","leadPencil","viewDashboard","databaseSearch","folderIcon","folderOpen","imageMultipleOutline","plusIcon","folderPlus","imagePlus","viewGrid","formatListBulleted","twitterIcon","instagramIcon","facebookIcon","starIcon","timerOutline","linkVariant","linkedin","pinterest","zoomIn","infoOutline","arrowUp","arrowDown","sort","eye","rocketLaunch","StyledCircleSpinner","Styled","div","size","color","CircleSpinner","StyledNekoSpinner","type","rest","NekoSpinner","string","defaultProps","StyledButton","icon","onClick","disabled","small","isBusy","rounded","busyText","hasIcon","classNames","marginLeft","marginRight","PresetIcons","width","height","Theme","lighten","additionalColor","NekoButton","oneOf","instanceOf","IconifyIcon","func","Tag","a","Colors","StyledProOnly","show","href","target","ProOnly","useComponentSize","ref","useRef","setSize","current","observer","ResizeObserver","entries","element","contentRect","left","right","top","bottom","observe","unobserve","useOutsideClick","onOutsideClick","componentRef","handleOutsideClick","e","contains","document","addEventListener","removeEventListener","PQueue","concurrency","autoStart","MenuButtonWrapper","MenuButton","button","MenuItemContainer","StyledMenuButton","title","isPro","isOpen","setIsOpen","wrapperRef","buttonRef","buttonWidth","Children","map","child","cloneElement","transform","MenuItem","StyledNekoMenuItem","requirePro","needsProUser","NekoMenuButton","NekoMenuItem","Page","StyledNekoPage","nekoErrors","fatalError","setFatalError","showBody","setShowBody","error","url","code","message","body","dangerouslySetInnerHTML","__html","open","NekoPage","NekoH1","h1","NekoH2","h2","NekoP","NekoSpan","span","NekoLabel","label","StyledNekoTypo","NekoTypo","any","Block","StyledNekoBlock","action","NekoBlock","Container","Bar","StyledNekoContainer","headerAlign","footer","footerAlign","NekoContainer","StyledNekoSettings","contentAlign","NekoSettings","WindowBase","TitleBar","StyledNekoWindow","NekoWindow","Wrapper","Column","StyledNekoWrapper","StyledNekoColumn","full","minimal","NekoWrapper","NekoColumn","StyledNekoCheckbox","id","checked","onChange","description","showUpProOnly","isDisabled","disabledClass","join","defaultChecked","console","log","htmlFor","checkboxMarked","checkboxBlankOutline","NekoCheckbox","StyledNekoCheckboxGroup","max","NekoCheckboxGroup","mas","number","StyledNekoInput","placeholder","onEnter","readOnly","step","min","maxLength","defaultMaxLength","natural","inputStyle","onCustomChange","onCustomBlur","onBlur","newValue","setNewValue","isControlled","onKeyPress","event","preventDefault","autoComplete","spellCheck","NekoInput","StyledNekoTextArea","avoidOnEnterWithShift","textAreaStyle","countable","count","setCount","pressShift","setPressShift","keydownFunction","useCallback","shiftKey","keyupFunction","substr","rows","NekoTextArea","TooltipContainer","Tooltip","prop","visible","StyledNekoTooltip","text","setShow","tooltipRef","tooltipWidth","tooltipHeight","childRef","childWidth","childHeight","transformStyle","useMemo","transY","transX","onMouseEnter","onMouseLeave","NekoTooltip","StyledIconContainer","StyledIcon","Icon","hoverColor","StyledNekoIcon","spinning","tooltip","containerStyle","raw","getIcon","iconClassName","NekoIcon","Select","SelectedOption","Description","Options","OptionsContainer","StyledNekoSelect","scrolldown","currentOption","toArray","find","showOptions","toggleOptions","onOptionClick","childrenLength","data-is-disabled","RadioOption","SelectOption","StyledNekoOption","radioOption","recordCircle","checkboxBlankCircleOutline","selectOption","NekoSelect","NekoOption","Form","StyledNekoForm","NekoForm","StyledNekoSwitch","fontSize","onValue","offValue","onBackgroundColor","offBackgroundColor","onLabel","offLabel","onToggle","v","NekoSwitch","StyledNekoFinder","chevron","FinderTitleContainer","FinderTitle","ChevronSpace","FinderTitleIconDropZone","FinderTitleIconDroppableArea","ItemContainer","StyledNekoFinderItem","defaultIcons","gallery","tag","tagIcon","rightElement","rightElementStyle","showRightElement","selected","draggable","onDragStart","onDragOver","onDragEnd","onDrop","isExpanded","dragging","rightAction","rightActionOnHover","onDragLeave","isCustomizedIcon","preventClose","hasChild","expanded","setExpanded","keys","includes","setIcon","isFolder","showRightAction","setShowRightAction","iconColor","stopPropagation","NekoFinder","NekoFinderItem","Logo","StyledNekoLogo","viewBox","fill","xmlns","stroke","strokeWidth","NekoLogo","StyledNekoProgress","status","Math","ratio","parseFloat","ProgressCurrent","onPauseClick","paused","onStopClick","percent","isNaN","parseInt","round","typeOfStatus","minWidth","NekoProgress","HeaderBase","StyledNekoHeader","subtitle","saving","textDecoration","contentSave","NekoHeader","PagingContainer","StyledNekoPaging","currentPage","limit","total","onCurrentPageChanged","isEditable","maxPage","ceil","prevIconClassName","nextIconClassName","showCurrentPageInput","setShowCurrentPageInput","fullClassName","onClickHandle","page","getValidPage","numberPage","Number","currentPageJsx","autoFocus","defaultValue","onControllerClick","currentTarget","NekoPaging","LinkContainer","Link","variant","StyledNekoQuickLinks","isActive","StyledNekoLink","variantValue","display","NekoQuickLinks","NekoLink","StyledSection","section","backgroundColor","degrees","NekoGauge","background","class","StyledUpload","NekoUpload","multiple","iconSize","onSuccess","onFailure","apiUrl","apiConfig","inDropZone","setInDropZone","floor","random","inputId","inputEl","divEl","setBusy","pointerEvents","uploadFile","files","upload","file","postFetch","Promise","all","response","successResponses","filter","failerResponses","onDragEnter","uploadFiles","accept","click","dataTransfer","StyledUploadDropArea","NekoUploadDropArea","forwardRef","NekoModalParent","NekoModalContent","StyledNekoModal","ok","cancel","customButtons","customButtonsPosition","content","onOkClick","onCancelClick","okOnEnter","thumbnail","customClassName","showCustomButtons","keyUpHandler","modalContent","ariaHideApp","parentSelector","getElementById","closeTimeoutMS","NekoModal","Table","table","TableCheckBox","intermediate","onSelect","onUnselect","checkboxMultipleMarked","alignToJustifyContent","center","StyledNekoTable","columns","selectedItems","onSortChange","columnsCount","getColumnStyle","column","align","textAlign","justifyContent","cells","accessor","currentRowsIds","x","areAllRowsSelected","isIntermediate","hiddenColumnIndexes","reduce","headersFooters","beingSorted","beingSortedAsc","by","columnStyle","sortable","colspan","row","cell","NekoTable","removeClass","Array","forEach","getElementsByClassName","ele","classList","remove","displayModes","StyledNekoMediaLibraryModal","images","onRefresh","onNextPage","onPreviousPage","onRemoveClick","onZoomClick","onSearch","searchValue","onPageChange","multiSelect","showUploader","uploader","onSelectedOrderChanged","onUploadSuccess","onUploadFailure","uploadApiUrl","uploadApiConfig","uploadMultiple","onClose","onCancel","onSave","search","setSerch","dragImageIndex","setDragImageIndex","displayMode","setDisplayMode","getBoundingClientRect","clientX","add","currentIndex","afterIndex","selectedMediaJsx","dummyElementForDrop","selectedElement","image","src","zoom_src","mediaGridJsx","some","mediaRows","thumbnail_url","objectFit","filename","mediaListJsx","ids","cursor","NekoMediaLibraryModal","array","TabContainer","TabGroup","Tab","TabContent","StyledNekoTabs","isActiveTabIndex","setIsActiveTabIndex","childrenProp","keepTabOnReload","URL","location","searchParams","searchTitle","decodeURIComponent","index","replaceAll","indexOf","tabAttributes","toLowerCase","hidden","onTabClick","tabIndex","tabAttr","ev","history","pushState","URLSearchParams","encodeURIComponent","set","newUrl","protocol","host","pathname","toString","replaceState","path","keepTab","attr","StyledNekoTab","NekoTabs","NekoTab","StyledNekoSideTabs","activeTabIndex","rightActions","newTabIndex","StyledNekoSideTab","NekoSideTabs","NekoSideTab","ToolbarBase","StyledNekoToolbar","NekoToolbar","NekoError","debug","this","consolidateJsonResult","json","meta","JSON","parse","err","jsonFetcher","options","nekoError","rawBody","headers","fetch","config","signal","nonce","formData","FormData","append","method","stringify","mgcl_gallery_custom_links","prefix","domain","rest_url","replace","api_url","restNonce","plugin_url","is_pro","is_registered","rest_nonce","wp","Settings","swrAllSettingsKey","useSWR","swrSettings","mutateSwrSettings","mutate","swrData","defaultData","defaultBusy","setData","setError","setTotal","useHandleSWR","busySettings","settings","swrError","busyAction","setBusyAction","obmode","mgcl_obmode","parsingEngine","mgcl_parsing_engine","mgcl_log","buttonEnabled","mgcl_button_enabled","buttonLabel","mgcl_button_label","updateOption","newSettingsData","alert","jsxOBMode","jsxParsingEngine","option","jsxLog","jsxUseButtons","jsxButtonLabel","__","i18n","PENDING","RENAME","TITLE","SAME_PAGE","NEW_PAGE","LINK_URL","LINK_TARGET","LINK_REL","ARIAL_LABEL","targets","GroupContainer","EditLinkField","postId","setUrl","setTarget","rel","setRel","aria","setAria","openModal","setOpenModal","post_id","_gallery_link_url","_gallery_link_target","_gallery_link_rel","_gallery_link_aria","res","onCloseModal","onKeyDown","keyCode","onRequestClose","onInput","isMediaLibrary","container","render","from","field","getAttribute"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAi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etB,OAAQA,EAAQjkB,IAAKA,EAAK7D,OAAQA,EAAQioB,IAAKA,EAAKE,KAAMA,IAAWmB","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"wpJsonMgcl\"] = window[\"wpJsonMgcl\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([99,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports = React;","module.exports = ReactDOM;","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst NekoBusyOverlay = (props) => {\n const { spinner = true, busy = false, overlayStyle } = props;\n const [ showLoader, setShowLoader ] = useState(true);\n\n useEffect(() => {\n let timeout;\n\n // Show the loader\n if (!busy) { \n timeout = setTimeout(() => { \n setShowLoader(false); \n timeout = null; \n }, 250);\n }\n else { \n setShowLoader(true);\n }\n\n // Cleanup\n return (() => {\n if (timeout) {\n clearTimeout(timeout);\n }\n });\n }, [busy]);\n\n const loader = !showLoader ? null : (\n <React.Fragment>\n <div className={'overlay' + ' ' + (!busy ? 'overlayHidden' : '')} style={overlayStyle}>\n {Boolean(spinner) && \n <div className={'lds-ellipsis ' + (!busy ? 'spinnerHidden' : '')}>\n <div></div><div></div><div></div><div></div>\n </div>\n }\n </div>\n <style jsx>{`\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 `}</style>\n </React.Fragment>\n );\n\n // I am removing the busy because I like it as a boolean...\n // ... but React doesn't like pure boolean value here.\n const propsForElement = { ...props, busy: undefined, spinner: undefined };\n return (\n <div style={{ position: 'relative' }} {...propsForElement}> \n {loader}\n {props.children}\n </div>\n );\n};\n\nNekoBusyOverlay.propTypes = {\n busy: PropTypes.bool.isRequired,\n spinner: PropTypes.bool,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired\n};\n\nexport default NekoBusyOverlay;","export const NekoColors = {\n black: '#000000',\n blackRGB: '0, 0, 0',\n blue: '#007cba',\n blueRGB: '0, 124, 186',\n deepBlue: '#134575',\n finderBorder: '#DEDEDE',\n lightBlue: '#EBF3FF',\n lightGray: '#cacaca',\n lightGray2: '#F5F5F5',\n lightPurple: '#D8B1FF',\n gray: '#E8E8E8',\n green: '#0EA480',\n darkGray: '#A0A0A0',\n disabledForm: '#828282',\n orange: '#daa827',\n overlay: 'rgba(16, 16, 16, 0.92)',\n red: '#ba4300',\n redHighlight: '#de5307',\n header: '#007cba',\n proGray: '#7F8EA0',\n progress: '#8414a8',\n purple: '#956DBE',\n tableGray: '#FAFAFA',\n yellow: '#e4b42b',\n yellowRGB: '224, 156, 54',\n white: '#ffffff',\n whiteRGB: '255, 255, 255',\n}\n\nexport const NekoColorTheme = {\n danger: NekoColors.red,\n primary: NekoColors.blue,\n secondary: NekoColors.lightBlue,\n success: NekoColors.green,\n}\n\nconst NekoTheme = {\n\n // COLORS\n ...NekoColors,\n ...NekoColorTheme,\n\n // FONT\n\n fontFamily: 'Lato',\n fontSizeH1: '24px',\n fontSizeH2: '18px',\n fontSizeText: '13px',\n fontSizeSmall: '12px',\n fontSizeSmallButton: '10px',\n\n // SHADOW\n\n lightShadow: '0px 0px 10px rgba(0,0,0,0.1)',\n};\n\nexport default NekoTheme;\n","import lockCheck from '@iconify/icons-mdi/lock-check';\nimport lockOpenVariant from '@iconify/icons-mdi/lock-open-variant';\nimport fileUndo from '@iconify/icons-mdi/file-undo';\nimport chevronDoubleLeft from '@iconify/icons-mdi/chevron-double-left';\nimport chevronDoubleRight from '@iconify/icons-mdi/chevron-double-right';\nimport chevronLeft from '@iconify/icons-mdi/chevron-left';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport pauseIcon from '@iconify/icons-mdi/pause';\nimport playIcon from '@iconify/icons-mdi/play';\nimport replayIcon from '@iconify/icons-mdi/replay';\nimport checkIcon from '@iconify/icons-mdi/check';\nimport stopIcon from '@iconify/icons-mdi/stop';\nimport deleteIcon from '@iconify/icons-mdi/delete';\nimport undoIcon from '@iconify/icons-mdi/undo';\n//import alertIcon from '@iconify/icons-mdi/alert';\nimport alertCircle from '@iconify/icons-mdi/alert-circle';\nimport databaseIcon from '@iconify/icons-mdi/database';\nimport pencilIcon from '@iconify/icons-mdi/pencil';\nimport toolsIcon from '@iconify/icons-mdi/tools';\nimport cogIcon from '@iconify/icons-mdi/cog';\nimport closeIcon from '@iconify/icons-mdi/close';\nimport catIcon from '@iconify/icons-mdi/cat';\nimport trashCan from '@iconify/icons-mdi/trash-can';\nimport leadPencil from '@iconify/icons-mdi/lead-pencil';\nimport viewDashboard from '@iconify/icons-mdi/view-dashboard';\nimport databaseSearch from '@iconify/icons-mdi/database-search';\nimport folderIcon from '@iconify/icons-mdi/folder';\nimport folderOpen from '@iconify/icons-mdi/folder-open';\nimport imageMultipleOutline from '@iconify/icons-mdi/image-multiple-outline';\nimport plusIcon from '@iconify/icons-mdi/plus';\nimport folderPlus from '@iconify/icons-mdi/folder-plus';\nimport imagePlus from '@iconify/icons-mdi/image-plus';\nimport viewGrid from '@iconify/icons-mdi/view-grid';\nimport formatListBulleted from '@iconify/icons-mdi/format-list-bulleted';\nimport twitterIcon from '@iconify/icons-mdi/twitter';\nimport instagramIcon from '@iconify/icons-mdi/instagram';\nimport facebookIcon from '@iconify/icons-mdi/facebook';\nimport starIcon from '@iconify/icons-mdi/star';\nimport timerOutline from '@iconify/icons-mdi/timer-outline';\nimport arrowUpBoldCircleOutline from '@iconify/icons-mdi/arrow-up-bold-circle-outline';\nimport linkVariant from '@iconify/icons-mdi/link-variant';\nimport linkedin from '@iconify/icons-mdi/linkedin';\nimport pinterest from '@iconify/icons-mdi/pinterest';\nimport zoomIn from '@iconify/icons-mdi/zoom-in'\nimport infoOutline from '@iconify/icons-mdi/info-outline'\nimport arrowUp from '@iconify/icons-mdi/arrow-up'\nimport arrowDown from '@iconify/icons-mdi/arrow-down'\nimport sort from '@iconify/icons-mdi/sort'\nimport eye from '@iconify/icons-mdi/eye'\nimport rocketLaunch from '@iconify/icons-mdi/rocket-launch'\n\nconst presetIcons = {\n 'lock': lockCheck,\n 'lock-open': lockOpenVariant,\n 'file-undo': fileUndo,\n 'chevron-double-left': chevronDoubleLeft,\n 'chevron-double-right': chevronDoubleRight,\n 'chevron-left': chevronLeft,\n 'chevron-right': chevronRight,\n 'chevron-down': chevronDown,\n 'chevron-up': chevronUp,\n 'pause': pauseIcon,\n 'play': playIcon,\n 'replay': replayIcon,\n 'check': checkIcon,\n 'stop': stopIcon,\n 'delete': deleteIcon,\n 'undo': undoIcon,\n 'alert': alertCircle,\n 'database': databaseIcon,\n 'tools': toolsIcon,\n 'cog': cogIcon,\n 'close': closeIcon,\n 'cat': catIcon,\n 'upload': arrowUpBoldCircleOutline,\n 'trash': trashCan,\n 'pencil': leadPencil,\n 'dashboard': viewDashboard,\n 'search': databaseSearch,\n 'folder': folderIcon,\n 'folder-open': folderOpen,\n 'image-multiple-outline': imageMultipleOutline,\n 'plus': plusIcon,\n 'folder-plus': folderPlus,\n 'image-plus': imagePlus,\n 'view-grid': viewGrid,\n 'format-list-bulleted': formatListBulleted,\n 'twitter': twitterIcon,\n 'instagram': instagramIcon,\n 'facebook': facebookIcon,\n 'star': starIcon,\n 'timer-outline': timerOutline,\n 'link': linkVariant,\n 'linkedin': linkedin,\n 'pinterest': pinterest,\n 'zoom-in': zoomIn,\n 'info-outline': infoOutline,\n 'arrow-up': arrowUp,\n 'arrow-down': arrowDown,\n 'sort': sort,\n 'eye': eye,\n 'rocket-launch': rocketLaunch,\n};\n\nexport default presetIcons;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Styled from \"styled-components\";\n\nconst StyledCircleSpinner = Styled.div`\n width: ${props => props.size || '50%'};\n padding-top: ${props => props.size || '50%'};\n position: relative;\n margin: 0 auto;\n\n .double-bounce1, .double-bounce2 {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: ${props => props.color || '#333'};\n opacity: 0.6;\n position: absolute;\n top: 0;\n left: 0;\n\n -webkit-animation: sk-bounce 2.0s infinite ease-in-out;\n animation: sk-bounce 2.0s infinite ease-in-out;\n }\n\n .double-bounce2 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n }\n\n @-webkit-keyframes sk-bounce {\n 0%, 100% { -webkit-transform: scale(0.0) }\n 50% { -webkit-transform: scale(1.0) }\n }\n\n @keyframes sk-bounce {\n 0%, 100% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 50% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n }\n`;\n\nconst CircleSpinner = (props) => {\n return (\n <StyledCircleSpinner {...props}>\n <div className=\"double-bounce1\"></div>\n <div className=\"double-bounce2\"></div>\n </StyledCircleSpinner>\n );\n};\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoSpinner = (props) => {\n const { type = 'circle', ...rest } = props;\n\n switch (type) {\n case 'circle':\n return <CircleSpinner {...rest} />\n\n default:\n return null;\n }\n};\n\nconst NekoSpinner = (props) => {\n return <StyledNekoSpinner {...props} />;\n};\n\nNekoSpinner.propTypes = {\n type: PropTypes.string,\n};\n\nNekoSpinner.defaultProps = {\n type: 'circle',\n};\n\nexport { NekoSpinner };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport Theme from '../common/NekoTheme';\nimport { Icon, IconifyIcon } from '@iconify/react';\nimport PresetIcons from '../common/PresetIcons';\nimport { NekoSpinner } from '../misc/Spinner';\n\nconst StyledButton = Styled(props => {\n\n const { className, icon = null, onClick, disabled = false, color = null, small, isBusy = false, children, rounded, busyText, ...rest } = props;\n const hasIcon = !!icon;\n\n const getIcon = () => {\n if (typeof icon === 'string') {\n return PresetIcons[icon] || null;\n }\n return icon;\n };\n\n const classNames = `nui-button ${className || ''}${hasIcon ? ' has-icon' : ''}${color ? ' custom-color' : ''}${small ? ' small' : ''}${rounded ? ' rounded' : ''}`;\n\n return (\n <button type=\"button\" className={classNames} onClick={onClick} disabled={disabled} {...rest}>\n {isBusy && <NekoSpinner type=\"circle\" color=\"#fff\" size={rounded ? '82%' : '35%'} />}\n {isBusy && !!busyText && <span style={{ marginLeft: '4px', marginRight: '2xp' }}>{busyText}</span>}\n {!isBusy && hasIcon && <Icon icon={getIcon()} width={rounded ? 20 : 24} height={rounded ? 20 : 24} />}\n {!!children && !isBusy && <span style={{ marginLeft: hasIcon ? '4px' : 0, marginRight: hasIcon ? '2xp' : 0 }}>{children}</span>}\n </button>\n );\n})`\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n padding: 0 15px;\n\n background-color: ${Theme.blue};\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ${lighten(0.1, Theme.blue)};\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 8px;\n }\n\n &.secondary {\n background-color: ${Theme.lightBlue};\n border: 1px solid ${Theme.blue};\n color: ${Theme.blue};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.lightBlue)};\n }\n }\n\n &.danger {\n background-color: ${Theme.red};\n border-color: ${Theme.red};\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.red)};\n\t }\n }\n\n &.success {\n background-color: ${Theme.green};\n border-color: ${Theme.green};\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.green)};\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n &.small {\n font-size: ${Theme.fontSizeSmallButton};\n height: 24px;\n }\n\n &.header {\n background-color: ${Theme.deepBlue};\n border-color: ${Theme.deepBlue};\n height: 40px;\n padding: 0 20px;\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.deepBlue)};\n\t }\n }\n\n &.rounded {\n border-radius: 100%;\n min-width: 30px;\n height: 30px;\n width: 30px;\n padding: 3px;\n }\n\n ${props => additionalColor(props.color)}\n`;\n\nconst additionalColor = (color) => {\n if (color) {\n return `\n &.custom-color {\n background-color: ${color};\n border: 1px solid ${color};\n\n &:hover {\n background-color: ${lighten(0.1, color)};\n }\n }\n `;\n }\n};\n\n/**\n * The NekoButton works out of the box without specific attributes.\n */\nconst NekoButton = (props) => {\n return (<StyledButton {...props} />);\n};\n\nNekoButton.propTypes = {\n className: PropTypes.oneOf(['primary', 'secondary', 'danger', 'success', 'header']),\n disabled: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['setting', 'edit', 'trash'])]),\n color: PropTypes.string,\n onClick: PropTypes.func.isRequired,\n rounded: PropTypes.bool,\n isBusy: PropTypes.bool,\n busyText: PropTypes.string\n};\n\nNekoButton.defaultProps = {\n className: 'primary',\n disabled: false,\n icon: null,\n color: null,\n onClick: () => {},\n rounded: undefined,\n isBusy: false,\n busyText: undefined\n};\n\nexport { NekoButton };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\nimport Theme from '../common/NekoTheme';\n\nconst Tag = Styled.a`\n background-color: ${Colors.yellow};\n position: relative;\n border-radius: 10px;\n color: ${Colors.white};\n font-family: ${Theme.fontFamily};\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: ${Colors.white};\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n`;\n\n/**\n * @param {string} className\n * @param {string|object} icon\n * @param {bool} disabled\n * @param {function} onClick\n */\nconst StyledProOnly = (props) => {\n\n const { show = true, className, ...rest } = props;\n\n if (!show) {\n return null;\n }\n\n return (\n <Tag href='https://store.meowapps.com' target='_blank' className={`${className || ''}`} {...rest}>\n Pro Only\n </Tag>\n );\n};\n\nconst ProOnly = (props) => {\n return (<StyledProOnly {...props} />);\n}\n\nProOnly.propTypes = {\n show: PropTypes.bool,\n className: PropTypes.string\n};\n\nProOnly.defaultProps = {\n show: true,\n className: undefined\n};\n\nexport { ProOnly };\n","import React, { useState, useRef, useEffect, useCallback } from 'react';\nimport PQueue from 'p-queue';\n\nconst useHandleSWR = (swrData = undefined, defaultData = null, defaultBusy = false) => {\n const [ data, setData ] = useState(defaultData);\n const [ error, setError ] = useState(null);\n const [ busy, setBusy ] = useState(defaultBusy);\n const [ total, setTotal ] = useState(0);\n\n useEffect(() => {\n if (swrData !== undefined) { \n if (swrData.success) {\n setError(null);\n setData(swrData.data);\n setTotal(swrData.total ? swrData.total : 0);\n }\n else {\n setError(swrData.error);\n }\n }\n setBusy(swrData === undefined);\n }, [ swrData ]);\n\n return { busy, data, total, error };\n}\n\n// Sometimes, we need to align or place elements depending on other dynamic elements.\n// This hook returns a ref (which should be assign to a component), and the size of\n// this element every time it changes.\n\nconst useComponentSize = () => {\n const ref = useRef();\n const [ size, setSize ] = useState({});\n\n useEffect(() => {\n if (ref && ref.current) {\n const observer = new ResizeObserver(entries => {\n let element = entries[0];\n if (element.contentRect) {\n setSize({ \n width: element.contentRect.left + element.contentRect.right, \n height: element.contentRect.top + element.contentRect.bottom \n });\n }\n });\n observer.observe(ref.current);\n return () => { observer.unobserve(ref.current); };\n }\n }, []);\n return { ref, width: size.width ? size.width : 0, height: size.height ? size.height : 0 };\n};\n\n// If a click is made outside the component, then the function onOutsideClick is called.\n// This function returns a ref which needs to be assigned to the component.\n\nconst useOutsideClick = (onOutsideClick) => {\n const componentRef = useRef();\n const handleOutsideClick = (e) => {\n if (!onOutsideClick || componentRef.current.contains(e.target)) {\n return;\n }\n onOutsideClick();\n };\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleOutsideClick);\n return () => { document.removeEventListener(\"mousedown\", handleOutsideClick); };\n });\n return componentRef;\n};\n\n\n// This hook allows calling many requests without having too many of them\n// running concurrently.\n\nlet GlobalQueue = null;\n\nconst useNekoGlobalQueue = (params = {}) => {\n\n if (!GlobalQueue) {\n let { concurrency = 2 } = params;\n GlobalQueue = new PQueue({ concurrency, autoStart: true });\n }\n\n const runTask = async (func) => {\n return await GlobalQueue.add(func);\n }\n\n return { runTask };\n};\n\n// This hook handles batch of asynchronous requests, and provide everything\n// the NekoProgress might need.\n\nconst isDebug = false;\nconst UploadQueue = new PQueue({ concurrency: 1, autoStart: false });\n\nconst useNekoTasks = () => {\n\n // We should be able to kill fetch requests using this\n // Interesting article: https://davidwalsh.name/cancel-fetch\n const [ controller, setController ] = useState(new AbortController());\n const refSkip = useRef(false);\n const refErrors = useRef(0);\n const [ busy, setBusy ] = useState(null);\n const [ paused, setPaused ] = useState(false);\n const [ max, setMax ] = useState(0);\n const [ error, setError ] = useState(false);\n const [ success, setSuccess ] = useState(false);\n const [ value, setValue ] = useState(0);\n\n const reset = async () => {\n let newController = new AbortController();\n setController(newController);\n setError(false);\n refErrors.current = 0;\n refSkip.current = false;\n setPaused(false);\n setSuccess(false);\n setValue(0);\n setMax(0);\n };\n\n const start = async (tasks) => {\n const runnerPromise = new Promise((resolve, reject) => {\n setError(false);\n refErrors.current = 0;\n refSkip.current = false;\n setPaused(false);\n setSuccess(false);\n setTasks(tasks);\n setBusy(true);\n if (isDebug) { console.log('Started process.'); }\n UploadQueue.start();\n UploadQueue.onIdle().then(() => {\n onIdle();\n resolve();\n }); \n });\n return runnerPromise;\n };\n\n const pause = async () => {\n if (isDebug) { console.log('Paused process.'); }\n UploadQueue.pause();\n setPaused(true);\n };\n\n const resume = async () => {\n if (isDebug) { console.log('Resume process.'); }\n setError(false);\n setPaused(false);\n UploadQueue.start();\n };\n\n const stop = async () => {\n if (isDebug) { console.log('Cancelled process.'); }\n UploadQueue.pause();\n controller.abort();\n setBusy(false);\n setError(false);\n setSuccess(false);\n };\n\n const onIdle = async () => {\n if (isDebug) { console.log('onIdle.'); }\n setSuccess(true);\n setBusy(false);\n };\n\n const addTask = async (task) => {\n UploadQueue.add(async () => {\n try {\n let res = await task(controller.signal);\n if (!res || !res.success) {\n console.error('[useNekoTasks] Task returned nothing.', res);\n }\n if (!res.success) {\n refErrors.current++;\n if (!refSkip.current) {\n setError(res.error);\n pause();\n }\n }\n }\n catch (err) {\n if (err.name === 'AbortError') {\n console.log('Aborted');\n return;\n }\n else {\n refErrors.current++;\n if (!refSkip.current) {\n setError(\"An error was caught (more information in the console).\");\n pause();\n }\n }\n }\n finally {\n setValue(value => value + 1);\n }\n });\n setMax(max => max + 1);\n }\n\n const setTasks = async (tasks) => {\n UploadQueue.clear();\n for (let task of tasks) {\n addTask(task);\n }\n setValue(0);\n };\n\n const setAlwaysSkip = useCallback((value = true) => {\n refSkip.current = true;\n }, []);\n\n const getErrorCount = useCallback(() => {\n return refErrors.current;\n }, []);\n\n return { start, stop, pause, resume, reset, \n addTask, setAlwaysSkip, getErrorCount,\n error, success, busy, paused, value, max };\n};\n\nexport { useHandleSWR, useOutsideClick, useNekoGlobalQueue, useNekoTasks, useComponentSize };","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { Icon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport { useOutsideClick, useComponentSize } from '../hooks';\n\nconst MenuButtonWrapper = Styled.div`\n display: inline-block;\n`;\n\nconst MenuButton = Styled.button`\n align-items: center;\n background-color: ${Theme.blue};\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: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\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: ${lighten(0.1, Theme.blue)};\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`;\n\nconst MenuItemContainer = Styled.div`\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ${Theme.blue};\n position: absolute;\n z-index: 10;\n box-shadow: ${Theme.lightShadow};\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 ${Theme.blue};\n }\n`;\n\nconst StyledMenuButton = props => {\n\n const { title, disabled = false, isPro = false, style = {} } = props;\n const [ isOpen, setIsOpen ] = React.useState(false);\n const wrapperRef = useOutsideClick(() => { setIsOpen(false) });\n const { ref: buttonRef, width: buttonWidth } = useComponentSize();\n\n const onClick = () => {\n setIsOpen(!isOpen);\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n isPro,\n disabled: child.props.disabled || disabled,\n onClick: () => {\n if (child.props.onClick) {\n child.props.onClick();\n }\n onClick();\n }\n });\n });\n\n return (\n <MenuButtonWrapper ref={wrapperRef}>\n <MenuButton ref={buttonRef} type=\"button\" disabled={disabled} onClick={onClick} style={style}>\n <span>{title}</span>\n <Icon icon={chevronDown} width=\"24\" height=\"24\" style={{ marginLeft: '4px' }} />\n </MenuButton>\n {isOpen &&\n <MenuItemContainer style={{ transform: `translateX(calc(-50% + ${buttonWidth / 2}px))` }}>\n {children}\n </MenuItemContainer>\n }\n </MenuButtonWrapper>\n );\n};\n\nconst MenuItem = Styled.button`\n align-items: center;\n background-color: ${Theme.blue};\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\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: ${lighten(0.1, Theme.blue)};\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: ${Theme.proGray};\n justify-content: space-between;\n }\n`;\n\nconst StyledNekoMenuItem = props => {\n\n const { onClick, children, isPro, requirePro = false, disabled } = props;\n const needsProUser = requirePro && !isPro;\n\n return (\n <MenuItem type=\"button\" className={needsProUser? 'is-pro' : ''} onClick={onClick} disabled={disabled || needsProUser}>\n <span>{children}</span>\n {needsProUser && !isPro && <ProOnly />}\n </MenuItem>\n );\n};\n\n/**\n * The NekoMenuButton works out of the box without specific attributes.\n */\nconst NekoMenuButton = (props) => {\n return (<StyledMenuButton {...props} />);\n}\nconst NekoMenuItem = (props) => {\n return (<StyledNekoMenuItem {...props} />);\n}\n\nNekoMenuButton.propTypes = {\n title: PropTypes.string,\n disabled: PropTypes.bool,\n isPro: PropTypes.bool\n};\n\nNekoMenuButton.defaultProps = {\n title: undefined,\n disabled: false,\n isPro: false\n};\n\nNekoMenuItem.propTypes = {\n onClick: PropTypes.func.isRequired,\n requirePro: PropTypes.bool\n};\n\nNekoMenuItem.defaultProps = {\n onClick: () => {},\n requirePro: false\n};\n\nexport { NekoMenuButton, NekoMenuItem };\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoButton } from '../button/Button';\n\nconst Page = Styled.div`\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`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoPage = props => {\n\n const { className, children, nekoErrors = [], style = {} } = props;\n const [ fatalError, setFatalError ] = useState(false);\n const [ showBody, setShowBody ] = useState(false);\n\n if (nekoErrors && !fatalError) {\n for (let error of nekoErrors) {\n if (error) {\n setFatalError(error);\n break\n }\n }\n }\n\n return (\n <Page className={className || ''} style={style}>\n {fatalError && \n <div className='neko-rest-error'>\n <div className='container'>\n {!showBody &&\n <>\n <h3>The Rest API is disabled or broken 😢</h3>\n <p>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.</p>\n <p><i>Last but not least: check your PHP Error Logs and your Debugging Console.</i></p>\n <p className='neko-debug'>\n <small>\n URL: {fatalError.url}<br />\n CODE: {fatalError.code}<br />\n MESSAGE: {fatalError.message}<br />\n </small>\n </p>\n </>\n }\n {fatalError.body && showBody &&\n <p className='neko-debug'>\n <div dangerouslySetInnerHTML={{ __html: fatalError.body }}></div>\n </p>\n }\n {fatalError.body &&\n <NekoButton color=\"#a94242\" onClick={() => setShowBody(!showBody)}>\n {showBody ? 'Hide' : 'Display'} response from server\n </NekoButton>\n }\n <NekoButton color=\"#a94242\" onClick={() => { window.open('https://meowapps.com/fix-wordpress-rest-api/', '_blank') }}>\n Learn about WordPress Debugging\n </NekoButton>\n </div>\n </div>}\n {children}\n </Page>\n );\n};\n\nconst NekoPage = (props) => {\n return (<StyledNekoPage {...props} />);\n};\n\nNekoPage.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n nekoErrors: PropTypes.bool\n};\n\nNekoPage.defaultProps = {\n className: undefined,\n style: {},\n nekoErrors: false\n};\n\nexport { NekoPage };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nimport Theme from '../common/NekoTheme';\n\nconst NekoH1 = Styled.h1`\n font-family: ${Theme.fontFamily};\n font-weight: normal;\n font-size: ${Theme.fontSizeH1};\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n`;\n\nconst NekoH2 = Styled.h2`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeH2};\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n`;\n\nconst NekoP = Styled.p`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n`;\n\nconst NekoSpan = Styled.span`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 0;\n padding: 0;\n`;\n\nconst NekoLabel = Styled.label`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 0;\n padding: 0;\n`;\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoTypo = props => {\n const { children, ...rest } = props;\n\n return (\n props.h1 ? <NekoH1 {...rest}>{children}</NekoH1>\n : props.h2 ? <NekoH2 {...rest}>{children}</NekoH2>\n : props.p ? <NekoP {...rest}>{children}</NekoP>\n : props.label ? <NekoLabel {...rest}>{children}</NekoLabel>\n : <NekoSpan {...rest}>{children}</NekoSpan>\n );\n};\n\nconst NekoTypo = (props) => {\n return (<StyledNekoTypo {...props} />);\n}\n\nNekoTypo.propTypes = {\n h1: PropTypes.any,\n h2: PropTypes.any,\n p: PropTypes.any\n};\n\nNekoTypo.defaultProps = {\n h1: undefined,\n h2: undefined,\n p: undefined\n};\n\nexport { NekoTypo };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoTypo } from '../misc/Typography';\nimport NekoBusyOverlay from '../common/NekoBusyOverlay';\n\nconst Block = Styled.div`\n font-size: ${Theme.fontSizeText};\n margin-bottom: 15px;\n\n .nui-block-header {\n display: flex;\n justify-content: space-between;\n }\n\n .nui-block-title {\n color: ${Theme.blue};\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: ${Theme.blue};\n\n .nui-block-title {\n color: ${Theme.white};\n }\n\n .nui-block-content {\n background-color: ${Theme.white};\n }\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoBlock = props => {\n\n const { title, children, className, busy = false, style = {}, action } = props;\n\n return (\n <Block className={'nui-block ' + (className || '')} style={style}>\n <NekoBusyOverlay busy={busy}>\n <div className=\"nui-block-header\">\n <NekoTypo h2 className=\"nui-block-title\">{title}</NekoTypo>\n {!!action && action}\n </div>\n <div className=\"nui-block-content\">\n {children}\n </div>\n </NekoBusyOverlay>\n </Block>\n );\n};\n\nconst NekoBlock = (props) => {\n return (<StyledNekoBlock {...props} />);\n}\n\nNekoBlock.propTypes = {\n title: PropTypes.string,\n className: PropTypes.oneOf(['', 'primary']),\n style: PropTypes.object,\n action: PropTypes.element,\n};\n\nNekoBlock.defaultProps = {\n title: undefined,\n className: '',\n style: {},\n action: undefined,\n};\n\nexport { NekoBlock };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst Container = Styled.div`\n font-size: ${Theme.fontSizeText};\n font-family: ${Theme.fontFamily};\n background-color: ${Theme.white};\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ${Theme.blue};\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`;\n\nconst Bar = Styled.div`\n justify-content: flex-start;\n background-color: ${Theme.lightGray2};\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoContainer = props => {\n\n const { children, header, headerAlign = 'left', footer, footerAlign = 'right', className, style = {} } = props;\n\n return (\n <Container className={className || ''} style={style}>\n {header && <Bar className={`align-${headerAlign}`}>{ header }</Bar>}\n <div className=\"content\">\n { children }\n </div>\n {footer && <Bar className={`align-${footerAlign}`}>{ footer }</Bar>}\n </Container>\n );\n};\n\nconst NekoContainer = (props) => {\n return (<StyledNekoContainer {...props} />);\n}\n\nNekoContainer.propTypes = {\n header: PropTypes.element,\n headerAlign: PropTypes.oneOf(['left', 'right']),\n footer: PropTypes.element,\n footerAlign: PropTypes.oneOf(['left', 'right']),\n className: PropTypes.string,\n style: PropTypes.object\n};\nNekoContainer.defaultProps = {\n header: undefined,\n headerAlign: 'left',\n footer: undefined,\n footerAlign: 'right',\n className: undefined,\n style: {}\n};\n\nexport { NekoContainer };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} title=''\n */\nconst StyledNekoSettings = Styled(props => {\n const { title = '', contentAlign = 'left' } = props;\n return (\n <div className={props.className || ''}>\n {title ? <div className=\"nui-settings-head\">{title}</div> : null}\n <div className={`nui-settings-content nui-settings-content-align-${contentAlign}`}>\n {props.children}\n </div>\n </div>\n );\n})`\n display: flex;\n font-family: ${Theme.fontFamily};\n\n > .nui-settings-head {\n font-family: ${Theme.fontFamily};\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`;\n\nconst NekoSettings = (props) => {\n return (<StyledNekoSettings {...props} />);\n}\n\nNekoSettings.propTypes = {\n title: PropTypes.string,\n className: PropTypes.string,\n contentAlign: PropTypes.string\n};\n\nNekoSettings.defaultProps = {\n title: '',\n className: undefined,\n contentAlign: 'left'\n};\n\nexport { NekoSettings };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst WindowBase = Styled.div`\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`;\n\nconst TitleBar = Styled(props => (\n props.children ? (\n <div className={props.className}>\n {props.children}\n </div>\n ) : null\n))`\n background-color: ${Theme.blue};\n color: white;\n`;\n\nconst StyledNekoWindow = props => (\n <WindowBase className='window'>\n <TitleBar>{props.title}</TitleBar>\n {props.children}\n </WindowBase>\n);\n\nconst NekoWindow = (props) => {\n return (<StyledNekoWindow {...props} />);\n}\n\nNekoWindow.propTypes = {\n title: PropTypes.string\n};\nNekoWindow.defaultProps = {\n title: undefined\n};\n\nexport { NekoWindow };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst Wrapper = Styled.div`\n display: flex;\n flex-wrap: wrap;\n`;\n\nconst Column = Styled.div`\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`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoWrapper = props => {\n return (\n <Wrapper>\n { props.children }\n </Wrapper>\n );\n};\n\nconst StyledNekoColumn = props => {\n const { full, minimal, ...rest } = props;\n let className = full ? 'full' : '';\n className += minimal ? ' minimal' : '';\n return (\n <Column className={className} {...rest}>{props.children}</Column>\n );\n};\n\nconst NekoWrapper = (props) => {\n return (<StyledNekoWrapper {...props} />);\n};\n\nconst NekoColumn = (props) => {\n return (<StyledNekoColumn {...props} />);\n};\n\nNekoWrapper.propTypes = {\n};\nNekoWrapper.defaultProps = {\n};\n\nNekoColumn.propTypes = {\n full: PropTypes.any\n};\nNekoColumn.defaultProps = {\n full: undefined\n};\n\nexport { NekoWrapper, NekoColumn };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\n\nimport { Icon } from '@iconify/react';\nimport checkboxBlankOutline from '@iconify/icons-mdi/checkbox-blank-outline';\nimport checkboxMarked from '@iconify/icons-mdi/checkbox-marked';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n */\nconst StyledNekoCheckbox = Styled(props => {\n const { id, name, checked = false, onChange, label, description, isPro, disabled, requirePro = false } = props;\n\n const showUpProOnly = requirePro && !isPro;\n const isDisabled = disabled || showUpProOnly;\n const disabledClass = isDisabled ? 'disabled' : '';\n\n const onClick = () => {\n if (!onChange) {\n console.log(`The onChange handler it not set for this checkbox.`, props);\n return;\n }\n onChange(!checked, id);\n };\n\n return (\n <div className={['nui-checkbox', props.className, disabledClass].join(' ')}>\n <input id={id} name={name} type=\"checkbox\" defaultChecked={false} onClick={onClick} disabled={isDisabled} />\n <label htmlFor={id}>\n <div className=\"nui-checkbox-check-container\">\n <Icon icon={checked ? checkboxMarked : checkboxBlankOutline} width=\"30px\" height=\"30px\" \n color={isDisabled ? Theme.disabledForm : Theme.blue} />\n </div>\n <div className=\"nui-checkbox-inner-container\">\n <span className=\"label\">{label}<ProOnly className=\"inline\" show={showUpProOnly} /></span>\n {description ? <small className=\"description\">{description}</small> : null}\n </div>\n </label>\n </div>\n );\n})`\n font-family: ${Theme.fontFamily};\n\n &.disabled {\n color: ${Theme.disabledForm};\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`;\n\nconst NekoCheckbox = (props) => {\n return (<StyledNekoCheckbox {...props} />);\n};\n\nNekoCheckbox.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n label: PropTypes.string,\n description: PropTypes.string,\n isPro: PropTypes.bool,\n requirePro: PropTypes.bool\n};\n\nNekoCheckbox.defaultProps = {\n id: undefined,\n name: undefined,\n checked: false,\n label: undefined,\n description: undefined,\n isPro: false,\n requirePro: false\n};\n\nexport { NekoCheckbox };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\n/**\n * @param {string} name\n * @param {int} max=-1 Max number of checkboxes to be checked. Negative number means unlimited\n */\nconst StyledNekoCheckboxGroup = Styled(props => {\n const { name, max = -1, isPro = false } = props;\n\n // React.Children.toArray(props.children)\n\n // Modify child components (Checkboxes)\n const children = React.Children.map(props.children, child => {\n if (child.props.name) return child; // Do not modify if the child has its own name\n return React.cloneElement(child, {\n name: name, // Apply the group's name\n isPro\n });\n });\n\n return children;\n})`\n`;\n\nconst NekoCheckboxGroup = (props) => {\n return (<StyledNekoCheckboxGroup {...props} />);\n}\n\nNekoCheckboxGroup.propTypes = {\n name: PropTypes.string,\n mas: PropTypes.number,\n isPro: PropTypes.bool\n};\n\nNekoCheckboxGroup.defaultProps = {\n name: undefined,\n mas: -1,\n isPro: false\n}\n\nexport { NekoCheckboxGroup };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoInput = Styled(props => {\n const { id, name, value = '', description, placeholder = '', onEnter = null,\n readOnly = false, type = 'text', step = 1, min = 1, max = 999, maxLength : defaultMaxLength = undefined,\n className, style, natural = false, inputStyle, onChange: onCustomChange, onBlur: onCustomBlur, ...rest } = props;\n\n const [ newValue, setNewValue ] = useState(value);\n const isControlled = !!onCustomChange;\n const maxLength = defaultMaxLength ? defaultMaxLength : (type === 'number' ? 3 : undefined);\n\n useEffect(() => {\n if (!isControlled) {\n setNewValue(value);\n }\n }, [ value ]);\n\n const onChange = (e) => {\n if (isControlled) { \n onCustomChange(e.target.value, id);\n }\n else {\n setNewValue(e.target.value, id);\n }\n };\n\n const onKeyPress = (e) => {\n if (onEnter && event.key === 'Enter') {\n e.preventDefault();\n onEnter(e.target.value, id);\n }\n };\n\n const onBlur = (e) => {\n if (onCustomBlur && value !== e.target.value) {\n onCustomBlur(e.target.value, id);\n }\n };\n\n const classNames = `neko-input ${natural ? ' natural' : ''}`;\n\n return (\n <div className={[className].join(' ')} style={style}>\n {type === 'number'\n ? <input className={[classNames].join(' ')} id={id} name={name} value={isControlled ? value : newValue} type={type} \n step={step} min={min} max={max} maxLength={maxLength}\n autoComplete=\"off\"\n placeholder={placeholder} style={inputStyle}\n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} {...rest} />\n : <input className={[classNames].join(' ')} {...rest} id={id} name={name} value={isControlled ? value : newValue} type={type} \n spellCheck=\"false\"\n autoComplete=\"off\"\n placeholder={placeholder} style={inputStyle} maxLength={maxLength}\n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} {...rest} />\n }\n {description && <p className=\"neko-input-description\">{description}</p>}\n </div>\n );\n})`\n .neko-input {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border: 2px solid ${Theme.blue};\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: ${Theme.gray};\n }\n }\n\n .neko-input-description {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeSmall};\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n`;\n\nconst NekoInput = (props) => {\n return (<StyledNekoInput {...props} />);\n};\n\nNekoInput.propTypes = {\n id: PropTypes.string,\n type: PropTypes.oneOf(['number', 'text']),\n name: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool,\n step: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n maxLength: PropTypes.number,\n natural: PropTypes.bool\n};\n\nNekoInput.defaultProps = {\n id: undefined,\n type: 'text',\n name: undefined,\n value: '',\n description: undefined,\n placeholder: '',\n onChange: undefined,\n onEnter: undefined,\n onBlur: undefined,\n readOnly: false,\n step: 1,\n min: 1,\n max: 999,\n maxLength: undefined,\n natural: false\n};\n\nexport { NekoInput };\n","import React, { useState, useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoTextArea = Styled(props => {\n const { id, name, value = '', description, placeholder = '', avoidOnEnterWithShift = false, onEnter = null, readOnly = false, \n maxLength = null, className, style, textAreaStyle = {}, countable = false, ...rest } = props;\n\n const [ newValue, setNewValue ] = useState(value);\n const [ count, setCount ] = useState(0);\n const [ pressShift, setPressShift ] = useState(false);\n const isControlled = !!props.onChange;\n\n const keydownFunction = useCallback((e) => {\n setPressShift(e.shiftKey);\n }, []);\n const keyupFunction = useCallback(() => {\n setPressShift(false);\n }, []);\n\n useEffect(() => {\n document.addEventListener(\"keydown\", keydownFunction, false);\n document.addEventListener(\"keyup\", keyupFunction, false);\n\n return () => {\n document.removeEventListener(\"keydown\", keydownFunction, false);\n document.removeEventListener(\"keyup\", keyupFunction, false);\n }\n }, []);\n\n useEffect(() => {\n if (!isControlled) {\n setNewValue(value);\n }\n if (countable) {\n setCount(value.length);\n }\n }, [ value, countable ]);\n\n const onChange = useCallback((e) => {\n const newValue = maxLength ? e.target.value.substr(0, maxLength): e.target.value;\n if (isControlled) { \n props.onChange(newValue, id);\n }\n else {\n setNewValue(newValue, id);\n }\n }, [maxLength]);\n\n const onKeyPress = (e) => {\n if (onEnter && !e.shiftKey && e.key === 'Enter') {\n if (avoidOnEnterWithShift && pressShift) return;\n\n e.preventDefault();\n props.onEnter(e.target.value, id);\n }\n };\n\n const onBlur = (e) => {\n if (props.onBlur && value !== e.target.value) {\n props.onBlur(e.target.value, id);\n }\n };\n\n return (\n <div className={[className].join(' ')} style={style}>\n <div className=\"neko-textarea-container\">\n <textarea className=\"neko-textarea\" rows={6} {...rest} id={id} name={name} spellCheck=\"false\" placeholder={placeholder} \n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} style={textAreaStyle}\n value={isControlled ? value : newValue} />\n {countable && <p className=\"neko-textarea-count\">{count} / {maxLength} characters</p>}\n </div>\n {description && <p className=\"neko-input-description\">{description}</p>}\n </div>\n );\n})`\n .neko-textarea-container {\n position: relative;\n }\n .neko-textarea {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border: 2px solid ${Theme.blue};\n box-sizing: border-box;\n background: rgb(0 124 186 / 10%);\n padding: 5px 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: ${Theme.gray};\n }\n }\n .neko-textarea-count {\n color: rgba(${Theme.blackRGB}, 0.4);\n font-size: 11px;\n margin: 0;\n position: absolute;\n right: 13px;\n bottom: 10px;\n }\n\n .neko-input-description {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeSmall};\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n`;\n\nconst NekoTextArea = (props) => {\n return (<StyledNekoTextArea {...props} />);\n};\n\nNekoTextArea.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool,\n avoidOnEnterWithShift: PropTypes.bool\n};\n\nNekoTextArea.defaultProps = {\n id: undefined,\n name: undefined,\n value: '',\n description: undefined,\n placeholder: '',\n onChange: undefined,\n onEnter: undefined,\n onBlur: undefined,\n readOnly: false,\n avoidOnEnterWithShift: false\n};\n\nexport { NekoTextArea };\n","import React, { useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nimport { useComponentSize } from '../hooks';\nimport Theme from '../common/NekoTheme';\n\nconst TooltipContainer = Styled.div`\n\tdisplay: flex;\n`;\n\nconst Tooltip = Styled.div`\n\tbackground-color: rgba(${Theme.blackRGB}, 0.8);\n\tborder-radius: 4px;\n\tcolor: ${Theme.white};\n\tfont-family: ${Theme.fontFamily};\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ${Theme.fontSizeText};\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tword-break: break-word;\n\tdisplay: ${prop => prop.visible ? 'inline-block' : 'none'};\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(${Theme.blackRGB}, 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(${Theme.blackRGB}, 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(${Theme.blackRGB}, 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(${Theme.blackRGB}, 0.8);\n\t\t}\n\t}\n\n\t${prop => prop.style}\n`;\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoTooltip = props => {\n\tconst { text = 'Hello world!', position = 'top' } = props;\n\tconst [ show, setShow ] = useState(false);\n\tconst { ref: tooltipRef, width: tooltipWidth, height: tooltipHeight } = useComponentSize();\n\tconst { ref: childRef, width: childWidth, height: childHeight } = useComponentSize();\n\n\tconst transformStyle = useMemo(() => {\n\t\tconst pointerSize = 5;\n\t\tlet transY = 0;\n\t\tlet transX = 0;\n\n\t\tif (position === 'top') {\n\t\t\ttransY = -1 * tooltipHeight - pointerSize;\n\t\t\ttransX = -1 * (tooltipWidth / 2) + (childWidth / 2);\n\t\t}\n\t\telse if (position === 'bottom') {\n\t\t\ttransY = childHeight + pointerSize;\n\t\t\ttransX = -1 * (tooltipWidth / 2) + (childWidth / 2);\n\t\t}\n\t\telse if (position === 'left') {\n\t\t\tconst diff = tooltipHeight - childHeight;\n\t\t\ttransY = -1 * (diff / 2);\n\t\t\ttransX = -1 * tooltipWidth - pointerSize;\n\t\t}\n\t\telse if (position === 'right') {\n\t\t\tconst diff = tooltipHeight - childHeight;\n\t\t\ttransY = -1 * (diff / 2);\n\t\t\ttransX = childWidth + pointerSize;\n\t\t}\n\t\t\n\t\treturn { \n\t\t\ttransform: `translateX(${transX}px) translateY(${transY}px)`\n\t\t};\n\n\t}, [position, tooltipWidth, tooltipHeight, childWidth, childHeight])\n\n\treturn (\n\t\t<TooltipContainer>\n\t\t\t<Tooltip ref={tooltipRef} visible={show} className={position} style={transformStyle}>\n\t\t\t\t{text}\n\t\t\t</Tooltip>\n\t\t\t<div ref={childRef} onMouseEnter={() => text && setShow(true)} onMouseLeave={() => setShow(false)}>\n\t\t\t\t{props.children}\n\t\t\t</div>\n\t\t</TooltipContainer>\n\t);\n};\n\nconst NekoTooltip = (props) => {\n return (<StyledNekoTooltip {...props} />);\n}\n\nNekoTooltip.propTypes = {\n\ttext: PropTypes.string,\n\tposition: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])\n};\n\nNekoTooltip.defaultProps = {\n\ttext: 'Hello world!',\n\tposition: 'top'\n};\n\nexport { NekoTooltip };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport { Icon, IconifyIcon } from '@iconify/react';\n\nimport PresetIcons from '../common/PresetIcons';\nimport { NekoTooltip } from './Tooltip';\n\nconst StyledIconContainer = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst hoverColor = (color, hoverColor) => {\n if (hoverColor) {\n return `\n &:hover {\n path {\n fill: ${hoverColor};\n }\n }\n `;\n }\n if (color) {\n return `\n &:hover {\n path {\n fill: ${lighten(0.1, color)};\n }\n }\n `;\n }\n};\n\nconst StyledIcon = Styled(Icon)`\n\n path {\n fill: ${props => props.color};\n }\n\n ${props => hoverColor(props.color, props.hoverColor)}\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\n &.disabled {\n pointer-events: none;\n opacity: 0.35;\n cursor: default;\n }\n`;\n\nconst StyledNekoIcon = props => {\n\n let { icon, spinning = false, className = '', title, tooltip, containerStyle, color, hoverColor, disabled = false, raw, ...rest } = props;\n\n if (!rest.width && !rest.height) {\n rest.width = rest.height = 30;\n }\n\n const getIcon = () => {\n if (typeof icon === 'string') {\n return PresetIcons[icon] || null;\n }\n return icon;\n };\n\n const iconClassName = `nui-icon ${className}${rest.onClick ? ' nui-clickable' : ''}${spinning ? ' spin' : ''}${disabled ? ' disabled' : ''}`;\n\n if (tooltip) {\n return (\n <NekoTooltip text={tooltip.text} position={tooltip.position || 'top'}>\n <StyledIconContainer style={containerStyle}>\n <StyledIcon icon={getIcon()} className={iconClassName} color={color} hoverColor={hoverColor} {...rest}/>\n </StyledIconContainer>\n </NekoTooltip>\n );\n }\n\n if (raw) {\n return <StyledIcon icon={getIcon()} className={iconClassName} color={color} hoverColor={hoverColor} {...rest} />\n }\n\n return (\n <StyledIconContainer style={containerStyle} title={title}>\n <StyledIcon icon={getIcon()} className={iconClassName} color={color} hoverColor={hoverColor} {...rest} />\n {!tooltip ? null : <NekoTooltip>{tooltip}</NekoTooltip>}\n </StyledIconContainer>\n );\n};\n\nconst NekoIcon = (props) => {\n return (<StyledNekoIcon {...props} />);\n};\n\nNekoIcon.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.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'])]),\n color: PropTypes.string,\n spinning: PropTypes.bool,\n className: PropTypes.string,\n tooltip: PropTypes.string,\n raw: PropTypes.bool,\n};\n\nNekoIcon.defaultProps = {\n icon: undefined,\n color: undefined,\n spinning: false,\n className: '',\n tooltip: undefined,\n raw: undefined,\n};\n\nexport { NekoIcon };\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { useOutsideClick } from '../hooks';\n\nimport { Icon } from '@iconify/react';\nimport checkboxBlankCircleOutline from '@iconify/icons-mdi/checkbox-blank-circle-outline';\nimport recordCircle from '@iconify/icons-mdi/record-circle';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport { NekoIcon } from '../misc/Icon';\n\nconst Select = Styled.div`\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ${Theme.blue};\n border-radius: 8px 8px 0 0;\n }\n\n &[data-is-disabled=true] {\n cursor: none;\n pointer-events: none;\n }\n`;\n\nconst SelectedOption = Styled.div`\n align-items: center;\n background-color: ${Theme.white};\n border: 2px solid ${Theme.blue};\n border-radius: 8px;\n display: flex;\n font-family: ${Theme.fontFamily};\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`;\n\nconst Description = Styled.div`\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`;\n\nconst Options = Styled.div`\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`;\n\nconst OptionsContainer = Styled.div`\n background-color: ${Theme.white};\n`;\n\n/**\n * @param {string} name\n */\nconst StyledNekoSelect = props => {\n const { id, name, value, scrolldown = false, isPro = false, onChange, className, disabled, ...rest } = props;\n\n const currentOption = React.Children.toArray(props.children)\n .find(child => child.props.value === value || child.props.checked)?.props;\n\n const label = currentOption?.label || 'Select';\n const description = currentOption?.description || props.description;\n const requirePro = currentOption?.requirePro || false;\n const icon = currentOption?.icon;\n //const id = scrolldown ? props.id : currentOption?.id;\n\n const [ showOptions, toggleOptions ] = useState(false);\n const componentRef = scrolldown ? useOutsideClick(() => { toggleOptions(false) }) : null;\n const showUpProOnly = requirePro && !isPro;\n\n const onOptionClick = (newValue) => {\n if (newValue !== value) {\n if (!onChange) {\n console.log(`The onChange handler it not set for this checkbox.`, props);\n return;\n }\n onChange(newValue, id);\n }\n if (scrolldown) {\n toggleOptions(false);\n }\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n name: child.props.name || name,\n checked: child.props.value === value || child.props.checked,\n onClick: onOptionClick,\n scrolldown,\n isPro,\n disabled\n });\n });\n\n return scrolldown\n ? <Select id={id} ref={componentRef} {...rest}\n onClick={() => toggleOptions(!showOptions)}\n className={[ 'nui-select', className, showOptions ? 'show-options' : '']}\n childrenLength={children.length} data-is-disabled={disabled}\n >\n <SelectedOption>\n {icon && <NekoIcon icon={icon} width={20} height={20} style={{ marginRight: '9px' }} />}\n {label}\n <div className=\"rightContent\">\n {showUpProOnly && <ProOnly />}\n {!disabled && <Icon icon={showOptions ? chevronUp : chevronDown} width=\"24\" />}\n </div>\n </SelectedOption>\n {description && <Description>{description}</Description>}\n \n {showOptions &&\n <Options className={`nui-option ${showOptions ? '' : 'hidden'}`}>\n <OptionsContainer>{[children]}</OptionsContainer>\n </Options>\n }\n </Select>\n : children;\n};\n\nconst RadioOption = Styled.div`\n font-family: ${Theme.fontFamily};\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: ${Theme.disabledForm};\n\n label {\n cursor: default;\n }\n }\n`;\n\nconst SelectOption = Styled.div`\n background-color: ${Theme.blue};\n cursor: pointer;\n font-family: ${Theme.fontFamily};\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ${Theme.white};\n display: flex;\n justify-content: space-between;\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n padding: 8px 12px;\n\n .option-group {\n align-items: center;\n display: flex;\n }\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`;\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n * @param {function} onClick\n */\nconst StyledNekoOption = props => {\n const { id, name, value, checked, icon, label, description, onClick, scrolldown, isPro = false, requirePro = false, disabled } = props;\n\n const showUpProOnly = requirePro && !isPro;\n const disabledClass = showUpProOnly || disabled ? 'disabled' : '';\n\n const radioOption = (\n <RadioOption className={`nui-select ${props.className || ''} ${disabledClass}`}>\n <input id={id} name={name} type=\"radio\" value={value} defaultChecked={checked} onClick={(e) => onClick(e.target.value)} disabled={showUpProOnly || disabled} />\n <label htmlFor={id}>\n <Icon icon={checked ? recordCircle : checkboxBlankCircleOutline} width=\"24px\" color={showUpProOnly ? Theme.disabledForm : Theme.blue}/>\n <div className=\"inner-container\">\n <span className=\"label\">{label}<ProOnly className=\"inline\" style={{ top: -1 }} show={showUpProOnly} /></span>\n {description ? <small className=\"description\">{description}</small> : null}\n </div>\n </label>\n </RadioOption>\n );\n\n const selectOption = (\n <SelectOption className={`nui-select ${props.className || ''} ${disabledClass}`}>\n <input id={id} name={name} type=\"radio\" value={value} defaultChecked={checked} disabled={showUpProOnly || disabled} />\n <div className=\"option\" onClick={() => onClick(value)}>\n <div className=\"option-group\">\n {icon && <NekoIcon icon={icon} width={20} height={20} style={{ marginRight: '9px' }} />}\n {label}\n </div>\n <ProOnly show={showUpProOnly} />\n </div>\n </SelectOption>\n );\n\n return scrolldown ? selectOption : radioOption;\n};\n\n/**\n * The NekoSelect has 2 types, radio (default) or select.\n */\nconst NekoSelect = (props) => {\n return (<StyledNekoSelect {...props} />);\n}\n\nNekoSelect.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n description: PropTypes.string,\n scrolldown: PropTypes.bool,\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoSelect.propTypes = {\n id: undefined,\n name: undefined,\n description: undefined,\n scrolldown: false,\n isPro: false,\n onChange: undefined\n};\n\nconst NekoOption = (props) => {\n return (<StyledNekoOption {...props} />);\n}\n\nNekoOption.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.string,\n checked: PropTypes.bool,\n label: PropTypes.string,\n description: PropTypes.string,\n onClick: PropTypes.func,\n scrolldown: PropTypes.bool,\n isPro: PropTypes.bool,\n requirePro: PropTypes.bool,\n icon: PropTypes.string\n};\n\nNekoOption.defaultProps = {\n id: undefined,\n name: undefined,\n value: undefined,\n checked: false,\n label: undefined,\n description: undefined,\n onClick: undefined,\n scrolldown: false,\n isPro: false,\n requirePro: false,\n icon: undefined\n};\n\nexport { NekoSelect, NekoOption };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst Form = Styled.div`\n label {\n display: block;\n margin-bottom: 3px;\n }\n\n .neko-input, .neko-textarea {\n margin-bottom: 5px;\n }\n`;\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoForm = (props) => {\n return (\n <Form>\n {props.children || null}\n </Form>\n );\n};\n\nconst NekoForm = (props) => {\n return (<StyledNekoForm {...props} />);\n};\n\nNekoForm.propTypes = {\n};\n\nNekoForm.defaultProps = {\n};\n\nexport { NekoForm };\n","import React, { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n */\nconst StyledNekoSwitch = Styled(props => {\n const { width = '100%', height = '20px', fontSize = '12px', onValue, offValue, checked = false,\n onBackgroundColor, offBackgroundColor, onLabel, offLabel, onChange, disabled, ...rest } = props;\n\n const onToggle = useCallback((v) => {\n onChange(v.target.checked ? onValue : offValue);\n }, [onChange, onValue, offValue]);\n\n return (\n <label {...rest} data-is-disabled={disabled ? 'disabled' : ''}>\n <input type=\"checkbox\" onChange={onToggle} checked={checked} disabled={disabled} />\n <span className=\"nui-switch-slider\"></span>\n </label>\n );\n})`\n color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-size: ${props => props.fontSize};\n position: relative;\n display: inline-block;\n width: ${props => props.width};\n height: ${props => props.height};\n\n &[data-is-disabled=disabled] {\n opacity: 0.4;\n\n .nui-switch-slider {\n cursor: auto;\n }\n }\n\n input {\n opacity: 0;\n width: 0;\n height: 0;\n border: 0;\n }\n\n .nui-switch-slider {\n background-color: ${props => props.offBackgroundColor};\n border-radius: ${props => props.height};\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n transition: .4s;\n }\n\n .nui-switch-slider:before {\n border-radius: 50%;\n position: absolute;\n content: \"\";\n height: ${props => `calc(${props.height} - 8px)`};\n width: ${props => `calc(${props.height} - 8px)`};\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: .3s;\n }\n\n .nui-switch-slider:after {\n content: \"${props => props.offLabel}\";\n margin-left: auto;\n margin-right: ${props => `calc(${props.height} / 2)`};\n }\n\n input:checked + .nui-switch-slider {\n background-color: ${props => props.onBackgroundColor};\n }\n\n input:checked + .nui-switch-slider:before {\n transform: translateX(${props => `calc(${props.width} - ${props.height})` });\n }\n\n input:checked + .nui-switch-slider:after {\n content: \"${props => props.onLabel}\";\n margin-left: ${props => `calc(${props.height} / 2)`};\n margin-right: auto;\n }\n`;\n\nconst NekoSwitch = (props) => {\n return (<StyledNekoSwitch {...props} />);\n};\n\nNekoSwitch.propTypes = {\n width: PropTypes.string,\n height: PropTypes.string,\n fontSize : PropTypes.string,\n onValue: PropTypes.string,\n offValue: PropTypes.string,\n checked: PropTypes.bool,\n onBackgroundColor: PropTypes.string,\n offBackgroundColor: PropTypes.string,\n onLabel: PropTypes.string,\n offLabel: PropTypes.string\n};\n\nNekoSwitch.defaultProps = {\n width: '100%',\n height: '20px',\n fontSize: '12px',\n checked: false\n};\n\nexport { NekoSwitch };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\nimport { Icon, InlineIcon, IconifyIcon } from '@iconify/react';\nimport folderIcon from '@iconify/icons-mdi/folder';\nimport folderOpen from '@iconify/icons-mdi/folder-open';\nimport imageMultipleOutline from '@iconify/icons-mdi/image-multiple-outline';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport tagIcon from '@iconify/icons-mdi/tag';\n\nconst StyledNekoFinder = props => {\n\n const { chevron = true } = props;\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n chevron\n });\n });\n\n return (\n children\n );\n};\n\nconst FinderTitleContainer = Styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin-bottom: 5px;\n font-family: Lato;\n`;\n\nconst FinderTitle = Styled.div`\n align-items: center;\n display: flex;\n\n &.can-expand {\n cursor: pointer;\n }\n\n &.selected {\n color: #956DBE;\n }\n\n span {\n font-weight: normal;\n font-size: 13px;\n margin: 0 0 0 8px;\n }\n`;\n\nconst ChevronSpace = Styled.div`\n height: 24px;\n width: 24px;\n`;\n\nconst FinderTitleIconDropZone = Styled.div`\n position: relative;\n width: 24px;\n height: 24px;\n`;\n\nconst FinderTitleIconDroppableArea = Styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n`;\n\nconst ItemContainer = Styled.div`\n border-left: 1px solid ${Colors.finderBorder};\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`;\n\nconst StyledNekoFinderItem = props => {\n\n const defaultIcons = {\n gallery: imageMultipleOutline,\n tag: tagIcon\n }\n\n const { title, chevron, rightElement = null, rightElementStyle = { marginLeft: '5px' }, showRightElement = false, selected = false,\n draggable = false, onDragStart, onDragOver, onDragEnd, onDrop, isExpanded = false, dragging = false, rightAction = null,\n rightActionOnHover = null, onDragLeave, preventClose = false } = props;\n const isCustomizedIcon = !!props.icon;\n const hasChild = !!props.children;\n const [ expanded, setExpanded ] = useState(isExpanded);\n const [ icon, setIcon ] = useState(() => {\n if (typeof props.icon === 'string' && Object.keys(defaultIcons).includes(props.icon)) {\n return defaultIcons[props.icon];\n } else if (props.icon) {\n return props.icon;\n }\n return folderIcon\n });\n const isFolder = Boolean(icon);\n const [ showRightAction, setShowRightAction ] = useState(false);\n\n useEffect(() => {\n setExpanded(isExpanded);\n if (!isCustomizedIcon) {\n setIcon(isExpanded ? folderIcon : folderOpen);\n }\n }, [isExpanded]);\n\n const onClick = () => {\n if (props.onClick) {\n props.onClick();\n }\n }\n\n const onChevronClick = (e) => {\n e.stopPropagation();\n setExpanded(!expanded);\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n chevron\n });\n });\n\n const iconColor = dragging || selected ? Colors.purple : (selected ? Colors.black : Colors.blue);\n\n return (\n <div>\n <FinderTitleContainer onMouseEnter={() => setShowRightAction(true)} onMouseLeave={() => setShowRightAction(false)}>\n <FinderTitle onClick={onClick} onMouseEnter={props.onMouseEnter} onMouseLeave={props.onMouseLeave} draggable={draggable} onDragStart={onDragStart} onDragOver={onDragOver} onDrop={onDrop} className={`${isFolder || children || props.onClick ? 'can-expand' : ''} ${selected ? 'selected' : ''}`} onDragLeave={onDragLeave} onDragEnd={onDragEnd}>\n {chevron\n ? (isFolder && hasChild)\n ? <Icon icon={expanded ? chevronDown : chevronRight} width=\"24\" height=\"24\" onClick={onChevronClick} />\n : <ChevronSpace></ChevronSpace>\n : null\n }\n <FinderTitleIconDropZone>\n <FinderTitleIconDroppableArea />\n <Icon icon={icon} color={iconColor} width=\"24\" height=\"24\" />\n </FinderTitleIconDropZone>\n <span>{title}</span>\n {showRightElement &&\n <div style={rightElementStyle}>{rightElement}</div>\n }\n </FinderTitle>\n {showRightAction ? (rightActionOnHover || rightAction) : rightAction}\n </FinderTitleContainer>\n {expanded && <ItemContainer className={`${isFolder ? '' : 'no-line'} ${chevron ? '' : 'no-chevron'}`}>{children}</ItemContainer>}\n </div>\n )\n}\n\nconst NekoFinder = (props) => {\n return (<StyledNekoFinder {...props} />);\n}\n\nNekoFinder.propTypes = {\n chevron: PropTypes.bool\n};\n\nNekoFinder.defaultProps = {\n chevron: true\n};\n\nconst NekoFinderItem = (props) => {\n return (<StyledNekoFinderItem {...props} />);\n}\n\nNekoFinderItem.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['gallery'])]),\n title: PropTypes.string,\n isExpanded: PropTypes.bool\n};\n\nNekoFinderItem.defaultProps = {\n icon: folderIcon,\n title: undefined,\n isExpanded: false\n};\n\nexport { NekoFinder, NekoFinderItem };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst Logo = Styled.div`\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`;\n\nconst StyledNekoLogo = () => {\n return (\n <Logo>\n <svg width=\"54\" height=\"38\" viewBox=\"0 0 54 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n </svg>\n </Logo>\n );\n}\n\nconst NekoLogo = (props) => {\n return (<StyledNekoLogo {...props} />);\n}\n\nNekoLogo.propTypes = {\n};\n\nNekoLogo.defaultProps = {\n};\n\nexport { NekoLogo };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport { Icon, InlineIcon } from '@iconify/react';\nimport pauseIcon from '@iconify/icons-mdi/pause';\nimport stopIcon from '@iconify/icons-mdi/stop';\nimport playIcon from '@iconify/icons-mdi/play';\n\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {number} value Current progress\n * @param {number} max Max progress\n */\nconst StyledNekoProgress = Styled(props => {\n let { value = 0, max = 100, busy = false, status } = props;\n value = Math.min(value, max);\n let ratio = parseFloat(value) / parseFloat(max);\n\n return (\n <div className={props.className}>\n <ProgressCurrent ratio={ratio} busy={props.busy} status={status} />\n <div className=\"nui-progress-buttons\">\n {busy && props.onPauseClick && \n <div className='nui-progress-button pause' onClick={props.onPauseClick}>\n {props.paused ? <InlineIcon icon={playIcon} /> : <InlineIcon icon={pauseIcon} />}\n </div>\n }\n {busy && props.onStopClick && \n <div className='nui-progress-button stop' onClick={props.onStopClick}>\n <InlineIcon icon={stopIcon} />\n </div>\n }\n </div>\n </div>\n );\n})`\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: ${Theme.blue};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.blue)};\n }\n\n &.stop {\n background: ${Theme.red};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.red)};\n }\n }\n }\n }\n`;\n\n/**\n * @param {float} ratio Progress ratio (0.0 to 1.0)\n */\nconst ProgressCurrent = Styled(props => {\n const percent = !isNaN(props.ratio) ? parseInt(Math.round(props.ratio * 100)) : 0;\n const typeOfStatus = typeof props.status;\n let status = typeOfStatus !== 'undefined'\n ? (typeOfStatus === 'string') ? props.status : props.status(percent)\n : `${percent}%`;\n\n return (\n <div className={props.className} style={{ minWidth: 28, minWidth: percent + '%' }}>\n <div>{status}</div>\n </div>\n );\n})`\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ${Theme.progress};\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ${Theme.fontFamily};\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: ${props => props.busy ? 'animate-stripes 1.6s linear infinite' : 'none'};\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n`;\n\nconst NekoProgress = (props) => {\n return (<StyledNekoProgress {...props} />);\n}\n\nNekoProgress.propTypes = {\n value: PropTypes.number,\n max: PropTypes.number,\n busy: PropTypes.bool,\n paused: PropTypes.bool,\n onPauseClick: PropTypes.func,\n onStopClick: PropTypes.func,\n status: PropTypes.oneOf([PropTypes.string, PropTypes.func])\n};\n\nNekoProgress.defaultProps = {\n value: 0,\n max: 100,\n busy: false,\n paused: false,\n onPauseClick: undefined,\n onStopClick: undefined,\n status: undefined\n};\n\nexport { NekoProgress };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoLogo } from './Logo';\nimport { NekoIcon } from './Icon';\nimport Theme from '../common/NekoTheme';\nimport contentSave from '@iconify/icons-mdi/content-save';\n\nconst HeaderBase = Styled.div`\n position: relative;\n color: white;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n display: flex;\n height: 61px;\n overflow: hidden;\n align-items: center;\n padding: 15px 20px;\n background-color: ${Theme.header};\n display: flex;\n\n .nui-header-logo-container {\n width: 102px;\n height: 102px;\n padding: 20px;\n margin-right: 25px;\n background: rgba(${Theme.blackRGB}, 0.1);\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(-29.83deg);\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: ${Theme.fontFamily};\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ${Theme.fontFamily};\n line-height: normal;\n font-size: ${Theme.fontSizeText};\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n`;\n\nconst StyledNekoHeader = props => {\n\n const { title = 'NekoUI', subtitle = 'By Jordy Meow', children, saving = false } = props;\n\n return (\n <HeaderBase>\n <div className='nui-header-logo-container'>\n <NekoLogo />\n </div>\n <div className=\"nui-header-title-container\">\n <h1 className=\"nui-header-title\">{title}</h1>\n <small className=\"nui-header-subtitle\"><a target='_blank' href='https://meowapps.com' \n style={{ color: 'white', textDecoration: 'none' }}>{subtitle}</a></small>\n </div>\n <div className=\"nui-header-extra-content\">{children}</div>\n {saving && <NekoIcon icon={contentSave} width=\"36\" height=\"36\" />}\n </HeaderBase>\n );\n};\n\nconst NekoHeader = (props) => {\n return (<StyledNekoHeader {...props} />);\n}\n\nNekoHeader.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n saving: PropTypes.bool\n};\n\nNekoHeader.defaultProps = {\n title: 'NekoUI',\n subtitle: 'By Jordy Meow',\n saving: false\n};\n\nexport { NekoHeader };\n","import React, { useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { Icon } from '@iconify/react';\nimport chevronDoubleLeft from '@iconify/icons-mdi/chevron-double-left';\nimport chevronLeft from '@iconify/icons-mdi/chevron-left';\nimport chevronDoubleRight from '@iconify/icons-mdi/chevron-double-right';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport Theme from '../common/NekoTheme';\n\nconst PagingContainer = Styled.div`\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ${Theme.fontFamily};\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(${Theme.blueRGB}, 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: ${Theme.white};\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: ${Theme.darkGray};\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: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n\n span.neko-paging-current-page {\n cursor: pointer;\n text-decoration: underline;\n }\n input.neko-paging-current-page {\n width: 1.5rem;\n }\n }\n\n &.neko-paging-full {\n flex-grow: 1;\n\n .neko-paging-controller {\n flex-grow: 1;\n }\n .nako-paging-controller-text {\n margin: 0 auto;\n }\n }\n`;\n\n/**\n * @param {number} currentPage Current page\n * @param {number} limit Items per page\n */\nconst StyledNekoPaging = props => {\n const { currentPage, limit, onClick, total, onCurrentPageChanged, full } = props;\n const isEditable = !!onCurrentPageChanged;\n const maxPage = Math.ceil(total === 0 ? 1 : (limit > 0 ? (total / limit) : 1));\n const prevIconClassName = `nako-paging-controller-icon ${currentPage === 1 ? 'disabled' : ''}`;\n const nextIconClassName = `nako-paging-controller-icon ${currentPage === maxPage ? 'disabled' : ''}`;\n const [ showCurrentPageInput, setShowCurrentPageInput ] = useState(false);\n const fullClassName = full ? 'neko-paging-full' : '';\n\n const onClickHandle = (page) => {\n setShowCurrentPageInput(false);\n onClick(page);\n };\n\n const getValidPage = (page) => {\n const numberPage = Number(page);\n return numberPage > maxPage ? maxPage : (numberPage < 1 ? 1 : numberPage);\n }\n\n const onBlur = (e) => {\n const page = e.target.value;\n\n if (!isNaN(page)) {\n onCurrentPageChanged(getValidPage(page));\n }\n setShowCurrentPageInput(false);\n }\n\n const onKeyPress = (e) => {\n if (event.key === 'Enter') {\n e.preventDefault();\n const page = e.target.value;\n if (!isNaN(page)) {\n onCurrentPageChanged(getValidPage(page));\n }\n setShowCurrentPageInput(false);\n }\n };\n\n const currentPageJsx = useMemo(() => {\n if (!showCurrentPageInput) {\n const onClick = () => {\n if (!isEditable) {\n return;\n }\n setShowCurrentPageInput(true);\n }\n return <span className={isEditable ? 'neko-paging-current-page' : ''} onClick={onClick}>{currentPage}</span>;\n }\n return <input autoFocus type=\"text\" className={isEditable ? 'neko-paging-current-page' : ''} \n defaultValue={currentPage} onBlur={onBlur} onKeyPress={onKeyPress} />;\n }, [currentPage, showCurrentPageInput, onCurrentPageChanged]);\n\n const onControllerClick = (e) => {\n if (!showCurrentPageInput || e.target !== e.currentTarget) return;\n\n setShowCurrentPageInput(false);\n }\n\n return (\n <PagingContainer className={fullClassName}>\n\n <span className=\"neko-paging-text\">{total} result{total > 0 ? 's' : ''}</span>\n\n <div className=\"neko-paging-controller\" onClick={onControllerClick}>\n <Icon icon={chevronDoubleLeft}\n className={prevIconClassName}\n onClick={() => onClickHandle(1)}\n />\n <Icon icon={chevronLeft}\n className={prevIconClassName}\n onClick={() => onClickHandle(currentPage - 1)}\n />\n <p className=\"nako-paging-controller-text\" onClick={onControllerClick}>\n Page {currentPageJsx} of {maxPage}\n </p>\n <Icon icon={chevronRight}\n className={nextIconClassName}\n onClick={() => onClickHandle(currentPage + 1)}\n />\n <Icon icon={chevronDoubleRight}\n className={nextIconClassName}\n onClick={() => onClickHandle(maxPage)}\n />\n </div>\n </PagingContainer>\n );\n};\n\nconst NekoPaging = (props) => {\n return (<StyledNekoPaging {...props} />);\n};\n\nNekoPaging.propTypes = {\n currentPage: PropTypes.number,\n limit: PropTypes.number,\n total: PropTypes.number,\n onClick: PropTypes.func\n};\n\nNekoPaging.defaultProps = {\n currentPage: undefined,\n limit: undefined,\n total: undefined,\n onClick: undefined\n};\n\nexport { NekoPaging };\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoIcon } from '../misc/Icon';\n\nconst LinkContainer = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Link = Styled.span`\n color: ${props => props.variant || Theme.blue};\n cursor: pointer;\n font-family: ${Theme.fontFamily};\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: ${Theme.black};\n font-weight: bold;\n }\n\n &::after {\n content: \"|\";\n color: ${Theme.darkGray};\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ${Theme.darkGray};\n font-weight: normal;\n margin-left: 4px;\n }\n`;\n\nconst StyledNekoQuickLinks = props => {\n const { id, value, onChange, busy = false, className } = props;\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n busy: busy,\n isActive: child.props.value === value,\n onClick: (newValue) => {\n if (newValue !== value) {\n onChange(newValue, id);\n }\n }\n });\n });\n\n return (\n <LinkContainer className={className}>{children}</LinkContainer>\n );\n};\n\nconst StyledNekoLink = props => {\n\n const { title, value = 0, count, onClick, busy, isActive, className, variant } = props;\n\n const variantValue = useMemo(() => {\n if (!variant) return undefined\n return Object.keys(Theme).includes(variant) ? Theme[variant] : variant\n }, [variant])\n\n return (\n <Link onClick={() => onClick(value)} className={`${isActive ? 'is-active' : ''} ${className}`} variant={variantValue}>\n {title}\n {count === null ? null :\n <span>(\n {busy ? \n <NekoIcon icon=\"replay\" spinning={true} width={12} containerStyle={{ display: 'inline' }} /> : \n count\n })\n </span>\n }\n </Link>\n );\n};\n\nconst NekoQuickLinks = (props) => {\n return (<StyledNekoQuickLinks {...props} />);\n};\n\nNekoQuickLinks.propTypes = {\n id: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func\n};\n\nNekoQuickLinks.defaultProps = {\n id: undefined,\n value: undefined,\n onChange: undefined\n};\n\nconst NekoLink = (props) => {\n return (<StyledNekoLink {...props} />);\n};\n\nNekoLink.propTypes = {\n title: PropTypes.string,\n value: PropTypes.string,\n count: PropTypes.number,\n onClick: PropTypes.func,\n isActive: PropTypes.bool,\n variant: PropTypes.string,\n};\n\nNekoLink.defaultProps = {\n title: undefined,\n value: 'default',\n count: 0,\n onClick: undefined,\n isActive: false,\n variant: undefined,\n};\n\nexport { NekoQuickLinks, NekoLink };\n","import React, { useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst StyledSection = Styled.section`\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ${props => props.width}px;\n height: ${props => props.width / 2}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: ${props => props.backgroundColor};\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: ${props => props.width}px;\n height: ${props => props.width}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: ${props => props.width + 2}px;\n height: ${props => props.width / 2 + 2}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: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n \n .semi-circle--mask {\n transform: rotate(${props => props.degrees}deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ${props => props.width + 2}px;\n height: ${props => props.width / 2}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`;\n\nconst NekoGauge = ({ value = 1000, min = 0, max = 2500, width = 200, background = '#007cba', children }) => {\n const degrees = 180 * (value <= max ? value : max) / max;\n return (\n <StyledSection backgroundColor={background} degrees={degrees} width={width}>\n <div class=\"gauge\">\n <div class=\"mask\">\n <div class=\"semi-circle\"></div>\n <div class=\"semi-circle--mask\"></div>\n </div>\n <div class=\"child-container\">\n <div class=\"child\">\n <div class=\"spacing\" />\n {children}\n </div>\n </div>\n </div>\n </StyledSection>\n )\n};\n\nNekoGauge.propTypes = {\n value : PropTypes.number,\n min : PropTypes.number,\n max : PropTypes.number,\n width : PropTypes.number,\n background : PropTypes.string,\n};\n\nNekoGauge.defaultProps = {\n value : 1000,\n min : 0,\n max : 2500,\n width : 200,\n background : '#007cba',\n};\n\nexport { NekoGauge };\n","import Styled from 'styled-components';\n\nconst NekoMessageDanger = Styled.p`\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`;\n\nconst NekoMessageSuccess = Styled.p`\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`;\n\nexport { NekoMessageDanger, NekoMessageSuccess };","import React, { useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoIcon, postFetch } from '../../index';\n\nconst StyledUpload = Styled.div`\n box-sizing: border-box;\n background: #C4C4C4;\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 &[data-is-disabled=true] {\n svg {\n opacity: 0.7;\n }\n }\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n max-width: 100%;\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n`;\n\nconst NekoUpload = (props) => {\n\n const { multiple, width = '100%', height = '100%', iconSize = 48, iconColor = '#A9A9A9', onSuccess = () => {}, \n onFailure = () => {}, style = {}, apiUrl, apiConfig, onClick, disabled, ...rest } = props;\n const [ inDropZone, setInDropZone ] = useState(false);\n const [ inputId, setInputId ] = useState(Math.floor(Math.random() * 100000000));\n const inputEl = useRef(null);\n const divEl = useRef(null);\n const [ busy, setBusy ] = useState(false);\n\n useEffect(() => {\n if (!divEl) return;\n\n divEl.current.style.pointerEvents = busy ? 'none' : 'auto';\n }, [divEl, busy])\n\n const uploadFile = async (files) => {\n setBusy(true);\n const upload = async (file) => {\n apiConfig.file = file;\n return await postFetch(apiUrl, apiConfig);\n }\n const response = await Promise.all(files.map(async (file) => {\n return await upload(file);\n }))\n const successResponses = response.filter(v => v.success);\n const failerResponses = response.filter(v => !v.success);\n if (successResponses.length) {\n onSuccess(multiple ? successResponses : successResponses[0]);\n }\n if (failerResponses.length) {\n onFailure(multiple ? failerResponses : failerResponses[0]);\n }\n setBusy(false);\n }\n\n const onDragOver = (e) => {\n e.preventDefault();\n e.stopPropagation();\n }\n\n const onDragEnter = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(true);\n }\n\n const onDragLeave = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n }\n\n const onDrop = (e) => {\n const files = [...e.dataTransfer.files];\n uploadFiles(files, e);\n }\n\n const onUploaderClick = () => {\n if (onClick) {\n onClick();\n return;\n }\n inputEl.current.click();\n }\n\n const onInputUpload = (e) => {\n const files = [...e.target.files];\n uploadFiles(files, e);\n }\n\n const uploadFiles = (files, e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n console.log(files);\n uploadFile(files);\n }\n\n return (\n <div ref={divEl}>\n <input type=\"file\" id={inputId} accept=\"image/*\" ref={inputEl} onChange={onInputUpload} style={{ display: 'none' }} disabled={disabled} multiple={multiple} />\n <StyledUpload onClick={onUploaderClick} style={{ ...style, width, height }} className={inDropZone ? 'dropping' : ''} \n onDragOver={onDragOver} onDragEnter={onDragEnter} onDragLeave={onDragLeave} onDrop={onDrop} data-is-disabled={disabled} {...rest}>\n <NekoIcon width={iconSize} height={iconSize} icon='upload' spinning={busy} color={iconColor}\n onDragOver={onDragOver} onDragEnter={onDragEnter} />\n </StyledUpload>\n </div>\n );\n}\n\nNekoUpload.propTypes = {\n width : PropTypes.string,\n height : PropTypes.string,\n onSuccess : PropTypes.func,\n onFailure : PropTypes.func,\n style : PropTypes.object,\n apiUrl : PropTypes.string,\n apiConfig : PropTypes.object\n};\n\nNekoUpload.defaultProps = {\n width : '100%',\n height : '100%',\n onSuccess : () => {},\n onFailure : () => {},\n style : {}\n};\n\nexport { NekoUpload };\n","import React, { useState, forwardRef, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoBusyOverlay, postFetch } from '../../index';\n\nconst StyledUploadDropArea = Styled.div`\n &.dropping {\n background: #a4d5ff;\n }\n`;\n\nconst NekoUploadDropArea = forwardRef((props, ref) => {\n\n const { onSuccess = () => {}, onFailure = () => {}, apiUrl, apiConfig, className, disabled = false, children, multiple, ...rest } = props;\n const [ inDropZone, setInDropZone ] = useState(false);\n const [ busy, setBusy ] = useState(false);\n\n const uploadFile = async (files) => {\n setBusy(true);\n const upload = async (file) => {\n apiConfig.file = file;\n return await postFetch(apiUrl, apiConfig);\n }\n const response = await Promise.all(files.map(async (file) => {\n return await upload(file);\n }))\n const successResponses = response.filter(v => v.success);\n const failerResponses = response.filter(v => !v.success);\n if (successResponses.length) {\n onSuccess(multiple ? successResponses : successResponses[0]);\n }\n if (failerResponses.length) {\n onFailure(multiple ? failerResponses : failerResponses[0]);\n }\n setBusy(false);\n }\n\n const onDragOver = useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n }, [disabled]);\n\n const onDragEnter = useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled) return;\n setInDropZone(true);\n }, [disabled]);\n\n const onDragLeave = useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled) return;\n setInDropZone(false);\n }, [disabled]);\n\n const onDrop = useCallback((e) => {\n if (disabled) return;\n const files = [...e.dataTransfer.files];\n uploadFiles(files, e);\n }, [disabled]);\n\n const onInputUpload = (e) => {\n const files = [...e.target.files];\n uploadFiles(files, e);\n }\n\n const uploadFiles = (files, e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n // console.log(files);\n uploadFile(files);\n }\n\n return (\n <NekoBusyOverlay busy={busy}>\n <input type=\"file\" accept=\"image/*\" ref={ref} onChange={onInputUpload} style={{ display: 'none' }} multiple={multiple} />\n <StyledUploadDropArea className={`${className ? className : ''} ${inDropZone ? 'dropping' : ''}`}\n onDragOver={onDragOver} onDragEnter={onDragEnter} onDragLeave={onDragLeave} onDrop={onDrop} {...rest}>\n {children}\n </StyledUploadDropArea>\n </NekoBusyOverlay>\n );\n});\n\nNekoUploadDropArea.propTypes = {\n ref: PropTypes.ref,\n onSuccess : PropTypes.func,\n onFailure : PropTypes.func,\n apiUrl : PropTypes.string,\n apiConfig : PropTypes.object,\n disabled: PropTypes.bool\n};\n\nNekoUploadDropArea.defaultProps = {\n onSuccess : () => {},\n onFailure : () => {},\n disabled : false\n};\n\nexport { NekoUploadDropArea };\n","import React, { useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-modal';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoButton } from '../button/Button';\n\nconst NekoModalParent = Styled.div`\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: ${Theme.overlay} !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: ${Theme.white};\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`;\n\nconst NekoModalContent = Styled.div`\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content-container {\n display: flex;\n margin-top: 15px;\n\n .thumbnail {\n margin-right: 15px;\n width: 240px;\n overflow: hidden;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n .content {\n flex: auto;\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n width: 100%;\n }\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n`;\n\nconst StyledNekoModal = (props) => {\n\n const {\n id = 'neko-modal-parent',\n isOpen,\n children,\n className,\n style,\n ok = 'OK',\n cancel = 'Cancel',\n customButtons = null,\n customButtonsPosition = 'right',\n title = '',\n content = '',\n onOkClick,\n onCancelClick,\n okOnEnter = false,\n thumbnail,\n ...rest\n } = props;\n const customClassName = style ? 'custom-modal' : '';\n const showCustomButtons = customButtons !== null;\n\n const keyUpHandler = useCallback(({ key }) => {\n if (key === 'Enter') {\n onOkClick();\n }\n }, [onOkClick]);\n\n useEffect(() => {\n if (!okOnEnter || !isOpen) return;\n\n window.addEventListener(\"keyup\", keyUpHandler);\n return () => {\n window.removeEventListener(\"keyup\", keyUpHandler);\n };\n }, [isOpen, keyUpHandler]);\n\n const modalContent = children\n ? children\n : <NekoModalContent>\n {title && <p className=\"title\">{title}</p>}\n <div className=\"content-container\">\n {thumbnail && <div className=\"thumbnail\">{thumbnail}</div>}\n {content && <p className=\"content\">{content}</p>}\n </div>\n <div className=\"button-group\">\n {showCustomButtons && customButtonsPosition === 'left' && customButtons}\n {onCancelClick && <NekoButton className=\"danger\" onClick={onCancelClick}>{cancel}</NekoButton>}\n {onOkClick && <NekoButton onClick={onOkClick}>{ok}</NekoButton>}\n {showCustomButtons && customButtonsPosition === 'right' && customButtons}\n </div>\n </NekoModalContent>;\n\n return (\n <React.Fragment>\n <NekoModalParent id={id} />\n <Modal ariaHideApp={false}\n parentSelector={() => document.getElementById(id)}\n closeTimeoutMS={200}\n className={`neko-modal ${className || ''} ${customClassName}`}\n isOpen={isOpen}\n {...rest}\n >\n {modalContent}\n </Modal>\n </React.Fragment>\n );\n};\n\nconst NekoModal = (props) => {\n return (<StyledNekoModal {...props} />);\n};\n\nNekoModal.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n title: PropTypes.string,\n content: PropTypes.string,\n onOkClick: PropTypes.func,\n onCancelClick: PropTypes.func,\n customButtons: PropTypes.object,\n okOnEnter: PropTypes.bool,\n thumbnail: PropTypes.element\n};\n\nNekoModal.defaultProps = {\n className: undefined,\n style: undefined,\n ok: 'OK',\n cancel: 'Cancel',\n title: '',\n content: '',\n onOkClick: undefined,\n onCancelClick: undefined,\n customButtons: null,\n okOnEnter: false,\n thumbnail: undefined\n};\n\nexport { NekoModal };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { Icon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport checkboxBlankOutline from '@iconify/icons-mdi/checkbox-blank-outline';\nimport checkboxMarked from '@iconify/icons-mdi/checkbox-marked';\nimport checkboxMultipleMarked from '@iconify/icons-mdi/checkbox-multiple-marked';\n\nimport Theme from '../common/NekoTheme';\nimport NekoBusyOverlay from '../common/NekoBusyOverlay';\n\nconst Table = Styled.table`\n font-family: ${Theme.fontFamily};\n border-spacing: 0;\n width: 100%;\n word-break: break-all;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(${Theme.blackRGB}, 0.1);\n border-right: 1px solid rgba(${Theme.blackRGB}, 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n &.nekotable-raw {\n th, td {\n border: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ${Theme.blue};\n color: ${Theme.white};\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 thead tr th:first-child {\n border-top-left-radius: 10px;\n }\n\n thead tr th:last-child {\n border-top-right-radius: 10px;\n }\n\n tfoot tr th:first-child {\n border-bottom-left-radius: 10px;\n }\n\n tfoot tr th:last-child {\n border-bottom-right-radius: 10px;\n }\n\n &.nekotable-raw {\n th {\n font-weight: bold;\n }\n th, tfoot td {\n background-color: ${Theme.white};\n color: ${Theme.black};\n }\n }\n\n tbody {\n background-color: ${Theme.white};\n \n tr {\n :nth-child(even) {\n background-color: ${Theme.tableGray};\n }\n &.selected {\n background-color: rgba(${Theme.blueRGB}, 0.8);\n color: ${Theme.white};\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n &.nekotable-raw {\n tbody {\n tr {\n :nth-child(even) {\n background-color: ${Theme.white};\n }\n &.selected {\n background-color: ${Theme.white};\n color: ${Theme.black};\n }\n }\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`;\n\nconst TableCheckBox = (props) => {\n const { checked, intermediate = false, onSelect = () => {}, onUnselect = () => {}, ...rest } = props;\n\n const onClick = (e) => { \n checked ? onUnselect(e) : onSelect(e);\n };\n\n return (\n <Icon icon={intermediate ? checkboxMultipleMarked : (checked ? checkboxMarked : checkboxBlankOutline)}\n width=\"24px\" height=\"24px\" onClick={onClick} />\n );\n};\n\nconst alignToJustifyContent = {\n left: 'start',\n center: 'center',\n right: 'end',\n};\n\n/**\n * @param {string} className\n * @param {string|object} icon\n * @param {bool} disabled\n * @param {function} onClick\n */\nconst StyledNekoTable = (props) => {\n const { columns, data, busy = false, onSelect, onUnselect, selectedItems, sort, onSortChange, variant = 'default' } = props;\n const columnsCount = columns.length + (onSelect ? 1 : 0);\n\n const getColumnStyle = (column) => {\n let style = {};\n if (column.align) {\n style = { textAlign: column.align, justifyContent: alignToJustifyContent[column.align] };\n }\n if (column.width) {\n style = { ...style, width: column.width };\n }\n if (column.style) {\n style = { ...style, ...column.style };\n }\n return style;\n }\n\n const rows = data.map(v => {\n const cells = columns.map(c => {\n return { value: v[c.accessor], style: getColumnStyle(c) }\n });\n return { id: v.id, cells };\n });\n\n const currentRowsIds = rows.map(x => x.id);\n const currentSelectedRows = currentRowsIds.filter(x => selectedItems.includes(x));\n const areAllRowsSelected = currentSelectedRows.length === currentRowsIds.length;\n const isIntermediate = !areAllRowsSelected && selectedItems.length > 0;\n\n const hiddenColumnIndexes = columns.reduce(function(a, e, i) {\n if (e.visible === false)\n a.push(i);\n return a;\n }, []);\n\n const headersFooters = <tr>\n {onSelect && \n <th className='table-checkbox-cell'>\n <TableCheckBox checked={areAllRowsSelected} intermediate={isIntermediate}\n onSelect={(e) => onSelect(currentRowsIds, e) } \n onUnselect={(e) => { \n // The unselect on selectedItems never happens, but I keep it here in case\n // we find an elegant UI solution to unselect all the invisible selected rows as well.\n isIntermediate ? onUnselect(selectedItems, e) : onUnselect(currentRowsIds, e);\n }}\n />\n </th>\n }\n {columns.filter((x, i) => !hiddenColumnIndexes.includes(i)).map(column => {\n let beingSorted = sort && sort.accessor === column.accessor;\n let beingSortedAsc = sort && sort.by === 'asc';\n const columnStyle = getColumnStyle(column);\n return (<th style={columnStyle} key={column.accessor}>\n <div className={column.sortable ? 'sortable' : ''} style={columnStyle}\n onClick={column.sortable ? (e) => { \n onSortChange(column.accessor, beingSorted && beingSortedAsc ? 'desc' : 'asc', e)\n } : undefined}>\n <div>{column.title}</div>\n <div>{column.sortable && \n <Icon icon={!beingSorted ? chevronDown : (beingSortedAsc ? chevronDown : chevronUp)} \n color={beingSorted ? Theme.white : `rgba(${Theme.blackRGB}, 0.1)`} \n width=\"26px\" height=\"26px\" />}\n </div>\n </div>\n </th>)\n })}\n </tr>;\n\n return (\n <NekoBusyOverlay busy={busy} overlayStyle={{ top: '36px', height: 'calc(100% - 76px)' }}>\n <Table className={`nekotable-${variant}`}>\n <thead>{headersFooters}</thead>\n <tbody>\n {!rows.length && \n <tr><td colspan={columnsCount} style={{ textAlign: 'center', height: 40, color: 'gray' }}>\n Empty.\n </td></tr>\n }\n {rows.map(row => {\n return (\n <tr className={selectedItems.includes(row.id) ? 'selected' : ''}>\n {onSelect && \n <td className='table-checkbox-cell'>\n <TableCheckBox \n checked={selectedItems.includes(row.id)}\n onSelect={(e) => onSelect([ row.id ], e)}\n onUnselect={(e) => onUnselect([ row.id ], e)} \n />\n </td>\n }\n {row.cells.filter((x, i) => !hiddenColumnIndexes.includes(i)).map(cell => {\n return <td style={cell.style}>{cell.value}</td>;\n })}\n </tr>\n );\n })}\n </tbody>\n {variant === 'default' && <tfoot>{headersFooters}</tfoot>}\n </Table>\n </NekoBusyOverlay>\n );\n};\n\nconst NekoTable = (props) => {\n return (<StyledNekoTable {...props} />);\n};\n\nNekoTable.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any),\n data: PropTypes.arrayOf(PropTypes.any),\n busy: PropTypes.arrayOf(PropTypes.bool),\n onSelect: PropTypes.func,\n onUnselect: PropTypes.func,\n selectedItems: PropTypes.arrayOf(PropTypes.object),\n onSortChange: PropTypes.func,\n variant: PropTypes.string,\n};\n\nNekoTable.defaultProps = {\n columns: undefined,\n data: undefined,\n busy: false,\n onSelect: undefined,\n onUnselect: undefined,\n selectedItems: undefined,\n onSortChange: undefined,\n variant: 'default',\n};\n\nexport { NekoTable };\n","import React, { useMemo, useState, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Styled from \"styled-components\";\nimport Theme from '../common/NekoTheme';\nimport { NekoModal } from \"./Modal\";\nimport { NekoTypo } from \"./../misc/Typography\";\nimport { NekoInput } from \"./../form/Input\";\nimport { NekoButton } from \"../button/Button\";\nimport { NekoPaging } from \"../misc/Paging\";\nimport NekoBusyOverlay from \"../common/NekoBusyOverlay\";\nimport { NekoIcon } from \"../misc/Icon\";\nimport { NekoUploadDropArea } from \"../misc/UploadDropArea\";\nimport { NekoTable } from \"../table/Table\";\n\nconst StyledNekoModal = Styled(NekoModal)`\n width: 633px;\n\n &.custom-modal {\n padding: 0;\n }\n\n .neko-modal-wrapper {\n padding: 15px;\n }\n\n .neko-media-library-modal-content-header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n\n h1 {\n font-size: 21px;\n font-weight: bold;\n margin: 0;\n }\n\n input {\n background-color: ${Theme.white};\n border: 1px solid ${Theme.black};\n border-radius: 3px;\n }\n }\n .neko-media-library-modal-content-body {\n margin-top: 33px;\n margin-bottom: 36px;\n\n .neko-media-library-modal-content-body-list {\n max-height: 406px;\n overflow-y: scroll;\n margin-bottom: 10px;\n width: 100%;\n }\n .neko-media-library-modal-content-body-gallery {\n display: grid;\n gap: 10px;\n grid-template-columns: repeat(6, 1fr);\n margin-bottom: 10px;\n\n .neko-media-library-modal-content-media-container {\n cursor: pointer;\n position: relative;\n\n img {\n box-sizing: border-box;\n }\n\n &.selected {\n img {\n border: 5px solid ${Theme.blue};\n }\n }\n\n &:hover {\n .zoom-button {\n display: block;\n }\n }\n\n .zoom-button {\n background-color: rgba(${Theme.blackRGB}, 0.4);\n border: 0;\n border-radius: 30px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 2px;\n left: 2px;\n width: 30px;\n height: 30px;\n }\n }\n }\n\n .neko-media-library-modal-content-body-selected-gallery {\n display: flex;\n\n .neko-media-library-modal-content-selected-media-container {\n overflow: hidden;\n position: relative;\n height: 50px;\n width: 50px;\n padding-right: 5px;\n\n &.dummy {\n width: 50px;\n\n &.drag-over {\n width: 50px;\n }\n }\n\n &.drag-over {\n width: 105px;\n\n .zoom-button {\n left: 56px;\n }\n }\n\n &.drag-over::before {\n content: '';\n display: inline-block;\n width: 50px;\n height: 50px;\n background-color: ${Theme.blue};\n }\n\n img {\n box-sizing: border-box;\n width: 100%;\n max-width: 50px;\n }\n\n &.drag-over {\n img {\n margin-left: 5px;\n }\n }\n\n &:hover {\n .remove-button,\n .zoom-button {\n display: block;\n }\n }\n\n .remove-button {\n background-color: rgba(${Theme.blackRGB}, 0.4);\n border: 0;\n border-radius: 20px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 1px;\n right: 1px;\n width: 20px;\n height: 20px;\n }\n\n .zoom-button {\n background-color: rgba(${Theme.blackRGB}, 0.4);\n border: 0;\n border-radius: 20px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 1px;\n left: 1px;\n width: 20px;\n height: 20px;\n }\n }\n }\n }\n .neko-media-library-modal-content-footer {\n display: flex;\n justify-content: space-between;\n }\n .neko-media-library-modal-search {\n position: relative;\n }\n`;\n\nconst selectedImageBaseWidth = 55;\nconst nextItemRange = 25;\nconst selectedImageIdPrefix = 'nmlm-selected-';\nconst dragOverClassName = 'drag-over';\nconst removeClass = (className) => {\n Array.prototype.forEach.call(document.getElementsByClassName(className), (ele) => {\n ele.classList.remove(className);\n });\n}\nconst displayModes = {\n grid: 'grid',\n list: 'list'\n};\nconst columns = [\n { accessor: 'thumbnail_url', title: 'Thumb', style: { width: '42px' } },\n { accessor: 'title', title: 'Title' },\n { accessor: 'size', title: 'Size', style: { width: '70px' } },\n { accessor: 'filename', title: 'Filename' },\n];\n\nconst StyledNekoMediaLibraryModal = (props) => {\n const { images, onNextPage, onPreviousPage, onRefresh, onClick, onRemoveClick, onZoomClick, onSearch, searchValue, busy,\n currentPage, limit, total, onPageChange, selected, multiSelect = false, showUploader = false, uploader, onSelectedOrderChanged,\n onUploadSuccess = () => {}, onUploadFailure = () => {}, uploadApiUrl, uploadApiConfig, uploadMultiple, onClose, onCancel, onSave, ...rest } = props;\n const [ search, setSerch ] = useState(searchValue);\n const [ dragImageIndex, setDragImageIndex ] = useState(null);\n const [ displayMode, setDisplayMode ] = useState(displayModes.grid);\n const ref = useRef(null);\n\n const onDragOver = (e, i) => {\n e.preventDefault();\n if (dragImageIndex === null) return;\n const { width, left, right } = e.currentTarget.getBoundingClientRect();\n let target = i;\n // Only tweak the index if the element dragged over is the right on the image dragged.\n if (dragImageIndex < i) {\n if (i > 0 && i < selected.length) {\n if (target + 1 === dragImageIndex && e.clientX >= right - nextItemRange) {\n target -= 1\n } else if (target - 1 === dragImageIndex && e.clientX >= left - nextItemRange) {\n target += 1;\n } else if (width !== selectedImageBaseWidth && e.clientX >= right - nextItemRange) {\n target += 1;\n }\n } else if (width !== selectedImageBaseWidth && e.clientX >= right - nextItemRange) {\n target += 1;\n }\n }\n removeClass(dragOverClassName);\n if (dragImageIndex === target || (dragImageIndex + 1) === target) return;\n document.getElementById(`${selectedImageIdPrefix}${target}`).classList.add(dragOverClassName);\n }\n\n const onDragEnd = (e) => {\n e.preventDefault();\n setDragImageIndex(null);\n removeClass(dragOverClassName);\n }\n\n const onDrop = (e, i) => {\n e.preventDefault();\n if (dragImageIndex === null || dragImageIndex === i || (dragImageIndex + 1) === i) return;\n onSelectedOrderChanged({ currentIndex: dragImageIndex, afterIndex: dragImageIndex > i ? i : i - 1});\n }\n\n const selectedMediaJsx = useMemo( () => {\n if ( !multiSelect ) return [];\n const dummyElementForDrop = <div id={`nmlm-selected-${selected.length}`} className=\"neko-media-library-modal-content-selected-media-container dummy\" draggable={false} onDragEnd={(e) => onDragEnd(e)} onDragOver={(e) => onDragOver(e, selected.length)} onDrop={(e) => onDrop(e, selected.length)} onDragLeave={() => removeClass(dragOverClassName)}></div>\n const selectedElement = selected.map( (image, i) => {\n return (\n <div id={`nmlm-selected-${i}`} key={image.id} className=\"neko-media-library-modal-content-selected-media-container\" draggable={true} onDragStart={() => setDragImageIndex(i)} onDragEnd={onDragEnd} onDragOver={(e) => onDragOver(e, i)} onDrop={(e) => onDrop(e, i)}>\n <img src={image.src} className=\"neko-media-library-modal-content-media\" />\n <button className=\"remove-button\" onClick={() => onRemoveClick({ id: image.id, src: image.src })}>\n <NekoIcon icon=\"close\" color={Theme.white} width={19} height={19} />\n </button>\n <button className=\"zoom-button\" onClick={() => onZoomClick({ id: image.id, src: image.zoom_src })}>\n <NekoIcon icon=\"zoom-in\" color={Theme.white} width={19} height={19} />\n </button>\n </div>\n );\n } );\n\n return [...selectedElement, dummyElementForDrop];\n\n }, [ selected, dragImageIndex ] );\n\n const mediaGridJsx = useMemo(() => {\n return images.map((image) => {\n return (\n <div key={image.id} className={`neko-media-library-modal-content-media-container ${selected.some(v => v.id === image.id) ? 'selected' : ''}`}\n onClick={() => {\n onClick({ id: image.id, src: image.src, zoom_src: image.zoom_src })\n }}>\n <img src={image.src} className=\"neko-media-library-modal-content-media\" width=\"90\" height=\"90\" />\n <button className=\"zoom-button\" onClick={(e) => { e.stopPropagation(); onZoomClick({ id: image.id, src: image.zoom_src }); }}>\n <NekoIcon icon=\"zoom-in\" color={Theme.white} width={29} height={29} />\n </button>\n </div>\n );\n });\n }, [images, selected]);\n\n const mediaRows = useMemo(() => {\n return images.map(x => ({\n id: x.id,\n thumbnail_url: <img src={x.src} style={{ width: 40, height: 40, objectFit: 'cover' }} />,\n title: x.title,\n size: x.size,\n filename: x.filename\n }));\n }, [images]);\n\n const onReset = () => {\n setSerch(\"\");\n onRefresh();\n }\n\n const mediaListJsx = useMemo(() => {\n const onSelect = (ids, e) => {\n const image = images.find(v => ids.includes(v.id));\n onClick({ id: image.id, src: image.src, zoom_src: image.zoom_src });\n }\n return <NekoTable\n data={mediaRows}\n columns={columns}\n onSelect={onSelect}\n onUnselect={onSelect}\n selectedItems={selected.map(v => v.id)}\n />\n }, [images, mediaRows, selected, onClick]);\n\n return (\n <StyledNekoModal style={true} {...rest}>\n <div className=\"neko-modal-wrapper\" draggable={true} onDragOver={() => removeClass(dragOverClassName)}>\n <NekoUploadDropArea ref={ref} onSuccess={onUploadSuccess} onFailure={onUploadFailure} apiUrl={uploadApiUrl} apiConfig={uploadApiConfig} disabled={!showUploader || dragImageIndex !== null} multiple={uploadMultiple}>\n <div className=\"neko-media-library-modal-content\">\n <div className=\"neko-media-library-modal-content-header\">\n <NekoTypo h1>Media Library</NekoTypo>\n <div style={{ display: 'flex' }}>\n <div className=\"neko-media-library-modal-search\">\n <NekoInput value={search} disabled={busy} onEnter={onSearch} onChange={(v) => setSerch(v)} placeholder=\"Search...\" />\n {search !== \"\" && <NekoIcon icon=\"close\" containerStyle={{ width: '20px', position: 'absolute', right: '5px', top: '5px', cursor: 'pointer' }} width={20} height={20} color={Theme.darkGray} onClick={onReset} />}\n </div>\n <NekoButton onClick={() => onSearch(search)} style={{ marginLeft: '4px', marginRight: '4px' }}>Search</NekoButton>\n <NekoIcon color={displayMode === displayModes.grid ? Theme.black : Theme.blue} icon='view-grid' onClick={() => setDisplayMode(displayModes.grid)} width=\"20\" height=\"20\" />\n <NekoIcon color={displayMode === displayModes.list ? Theme.black : Theme.blue} icon='format-list-bulleted' onClick={() => setDisplayMode(displayModes.list)} width=\"20\" height=\"20\" />\n </div>\n </div>\n <div>\n <div className=\"neko-media-library-modal-content-body\">\n <NekoBusyOverlay busy={busy}>\n <div className={`${displayMode === displayModes.grid ? 'neko-media-library-modal-content-body-gallery' : 'neko-media-library-modal-content-body-list'}`}>\n {displayMode === displayModes.grid && showUploader && uploader}\n {displayMode === displayModes.grid ? mediaGridJsx : mediaListJsx}\n </div>\n </NekoBusyOverlay>\n <div className=\"neko-media-library-modal-content-body-selected-gallery\">\n {selectedMediaJsx}\n </div>\n </div>\n </div>\n <div className=\"neko-media-library-modal-content-footer\">\n <NekoPaging limit={limit} currentPage={currentPage} total={total} onClick={onPageChange} />\n <div style={{ display: 'flex' }}>\n {!!onClose && <NekoButton onClick={() => onClose()}>\n Close\n </NekoButton>}\n {!!onCancel && <NekoButton className=\"danger\" onClick={() => onCancel()}>\n Cansel\n </NekoButton>}\n {!!onSave && <NekoButton onClick={() => onSave()}>\n Save\n </NekoButton>}\n </div>\n </div>\n </div>\n </NekoUploadDropArea>\n </div>\n </StyledNekoModal>\n );\n};\n\nconst NekoMediaLibraryModal = (props) => {\n return <StyledNekoMediaLibraryModal {...props} />;\n};\n\nNekoMediaLibraryModal.propTypes = {\n images: PropTypes.array,\n onNextPage: PropTypes.func,\n onPreviousPage: PropTypes.func,\n onRefresh: PropTypes.func,\n onClick: PropTypes.func,\n onSearch: PropTypes.func,\n searchValue: PropTypes.string,\n busy: PropTypes.bool,\n currentPage: PropTypes.number,\n limit: PropTypes.number,\n total: PropTypes.number,\n onPageChange: PropTypes.func,\n multiSelect: PropTypes.bool,\n selected: PropTypes.array,\n onClose: PropTypes.func,\n onCancel: PropTypes.func,\n onSave: PropTypes.func,\n};\n\nNekoMediaLibraryModal.defaultProps = {\n multiSelect: false\n};\n\nexport { NekoMediaLibraryModal };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { NekoIcon } from '../misc/Icon';\n\nconst TabContainer = Styled.div`\n`;\n\nconst TabGroup = Styled.div`\n display: flex;\n`;\n\nconst Tab = Styled.button`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 65%);\n display: flex;\n align-items: center;\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: ${Theme.blue};\n color: ${Theme.white};\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n\n &.hidden {\n display: none;\n }\n`;\n\nconst TabContent = Styled.div`\n background-color: ${Theme.blue};\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n`;\n\n/**\n * Need to use with NecoTab\n */\nconst StyledNekoTabs = props => {\n const [isActiveTabIndex, setIsActiveTabIndex] = React.useState(0);\n const childrenProp = props.children\n ? (\n props.children.length\n ? props.children.filter(x => !!x)\n : [props.children]\n )\n : [];\n\n React.useEffect(() => {\n if (props.keepTabOnReload) {\n const url = new URL(window.location.href);\n const title = url.searchParams.get('nekoTab');\n if (!title) {\n setIsActiveTabIndex(0);\n return;\n }\n const searchTitle = decodeURIComponent(title);\n const index = React.Children.toArray(childrenProp).map(c => c.props.title.replaceAll(' ', '')).indexOf(searchTitle);\n if (index === -1) {\n setIsActiveTabIndex(0);\n return;\n }\n setIsActiveTabIndex(index);\n return;\n }\n setIsActiveTabIndex(0);\n }, [])\n\n const tabAttributes = React.Children.map(childrenProp, (child, i) => {\n const title = child.props.title || (\"Untitled Tab \" + (i + 1));\n const key = child.props.key || 'neko-tab-' + title.toLowerCase();\n const onClick = child.props.onClick ? child.props.onClick : null;\n const requirePro = !props.isPro && (child.props.requirePro || false);\n const hidden = child.props.hidden || false;\n const icon = child.props.icon || false;\n return { key, title, onClick, requirePro, hidden, icon };\n });\n\n const children = React.Children.map(childrenProp, (child, i) => {\n return React.cloneElement(child, {\n isActive: i === isActiveTabIndex\n });\n });\n\n const keepTab = (title) => {\n if (history.pushState && title) {\n let searchParams = new URLSearchParams(window.location.search);\n const value = encodeURIComponent(title.replaceAll(' ', ''));\n searchParams.set('nekoTab', value);\n let newUrl = window.location.protocol + \"//\" + window.location.host + window.location.pathname + '?' + searchParams.toString();\n window.history.replaceState({ path: newUrl }, '', newUrl);\n }\n }\n\n const onTabClick = (tabIndex, tabAttr, ev) => {\n if (tabAttr.requirePro) return;\n setIsActiveTabIndex(tabIndex);\n if (props.onChange) {\n props.onChange(tabIndex, tabAttr, ev);\n }\n if (props.keepTabOnReload) {\n keepTab(tabAttr.title);\n }\n };\n\n return (\n <TabContainer>\n <TabGroup>\n {tabAttributes.map((attr, i) =>\n <Tab \n key={attr.key} \n className={`neko-tab-title ${i === isActiveTabIndex ? 'active' : ''} ${attr.requirePro ? 'disabled' : ''} ${attr.hidden ? `hidden` : ''}`} \n onClick={(ev) => { onTabClick(i, attr, ev) }}\n >\n {attr.icon && <NekoIcon icon={attr.icon} width={15} height={15} style={{ marginRight: '2px' }} raw />}\n {attr.title}<ProOnly className=\"inline\" style={{ marginLeft: 10, marginRight: -5, top: -1 }} show={attr.requirePro} />\n </Tab>\n )}\n </TabGroup>\n {children}\n </TabContainer>\n );\n};\n\n\n/**\n * @oaram {string} title\n * @param {bool} isActive\n */\nconst StyledNekoTab = props => {\n\n const { children, isActive } = props;\n\n return (\n <TabContent className={`${isActive ? 'active' : ''}`}>\n {!!isActive && children}\n </TabContent>\n );\n};\n\nconst NekoTabs = (props) => {\n return (<StyledNekoTabs {...props} />);\n};\n\nNekoTabs.propTypes = {\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoTabs.defaultProps = {\n isPro: false,\n onChange: undefined\n};\n\nconst NekoTab = (props) => {\n return (<StyledNekoTab {...props} />);\n};\n\nNekoTab.propTypes = {\n isActive: PropTypes.bool,\n requirePro: PropTypes.bool,\n title: PropTypes.string,\n icon: PropTypes.string,\n};\n\nNekoTab.defaultProps = {\n isActive: false,\n requirePro: false,\n title: undefined,\n icon: undefined,\n};\n\nexport { NekoTab, NekoTabs };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { Icon, InlineIcon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\n\nconst TabContainer = Styled.div`\n`;\n\nconst Tab = Styled.div`\n align-items: center;\n background-color: ${Theme.blue};\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(${Theme.yellowRGB}, 0.25);\n cursor: default;\n }\n\n p {\n color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ${Theme.white};\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n`;\n\nconst TabContent = Styled.div`\n background-color: ${Theme.white};\n display: none;\n\n &.active {\n display: block;\n }\n`;\n\n/**\n * Need to use with NecoTab\n */\nconst StyledNekoSideTabs = props => {\n\n const [activeTabIndex, setIsActiveTabIndex] = React.useState(props.activeTabIndex);\n\n const tabAttributes = React.Children.map(props.children, (child, i) => {\n const title = child.props.title || (\"Untitled Tab \" + (i + 1));\n const key = child.props.key || 'neko-tab-' + title.toLowerCase();\n const onClick = child.props.onClick ? child.props.onClick : null;\n const requirePro = !props.isPro && (child.props.requirePro || false);\n const onDragOver = child.props.onDragOver;\n const onDrop = child.props.onDrop;\n const rightActions = child.props.rightActions || null;\n return { key, title, onClick, requirePro, onDragOver, onDrop, rightActions };\n });\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n isActive: i === activeTabIndex\n });\n });\n\n const onTabClick = (tabIndex, tabAttr, ev) => {\n if (tabAttr.requirePro) return;\n const newTabIndex = tabIndex === activeTabIndex ? null : tabIndex;\n setIsActiveTabIndex(newTabIndex);\n if (props.onChange) {\n props.onChange(newTabIndex, tabAttr, ev);\n }\n };\n\n return (\n <TabContainer>\n {tabAttributes.map((attr, i) =>\n <React.Fragment>\n <Tab\n key={attr.key}\n className={`${i === activeTabIndex ? 'active' : ''} ${attr.requirePro ? 'disabled' : ''}`}\n onClick={(ev) => { onTabClick(i, attr, ev); }}\n onDragOver={attr.onDragOver}\n onDrop={attr.onDrop}\n >\n <p>\n <span style={{ fontSize: 15 }}>{attr.title}</span>\n <ProOnly className=\"inline\" show={attr.requirePro} />\n </p>\n {attr.rightActions === null\n ? <Icon icon={i === activeTabIndex ? chevronDown : chevronRight } className=\"neko-side-tab-icon\" />\n : (\n i === activeTabIndex\n ? <div style={{ marginLeft: 'auto' }}>{attr.rightActions}</div>\n : <Icon icon={chevronRight} className=\"neko-side-tab-icon\" />\n )\n }\n </Tab>\n { children[i] }\n </React.Fragment>\n )}\n </TabContainer>\n );\n};\n\n\n/**\n * @oaram {string} title\n * @param {bool} isActive\n */\nconst StyledNekoSideTab = props => {\n\n const { children, isActive } = props;\n\n return (\n <TabContent className={`${isActive ? 'active' : ''}`}>\n { children }\n </TabContent>\n );\n};\n\nconst NekoSideTabs = (props) => {\n return (<StyledNekoSideTabs {...props} />);\n};\n\nNekoSideTabs.propTypes = {\n isPro: PropTypes.bool,\n onChange: PropTypes.func,\n activeTabIndex: PropTypes.number\n};\n\nNekoSideTabs.defaultProps = {\n isPro: false,\n onChange: undefined,\n activeTabIndex: null\n};\n\nconst NekoSideTab = (props) => {\n return (<StyledNekoSideTab {...props} />);\n};\n\nNekoSideTab.propTypes = {\n isActive: PropTypes.bool,\n requirePro: PropTypes.bool,\n title: PropTypes.string,\n onDragOver: PropTypes.func,\n onDrop: PropTypes.func,\n rightActions: PropTypes.element\n};\n\nNekoSideTab.defaultProps = {\n isActive: false,\n requirePro: false,\n title: undefined,\n onDragOver: undefined,\n onDrop: undefined,\n rightActions: undefined\n};\n\nexport { NekoSideTab, NekoSideTabs };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\n\nconst ToolbarBase = Styled.div`\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ${Colors.white};\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(${Colors.blackRGB}, 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`;\n\nconst StyledNekoToolbar = ({ align = 'left', ...props }) => {\n return (\n <ToolbarBase className={`neko-align-${align}`} {...props}>\n {props.children}\n </ToolbarBase>\n );\n};\n\nconst NekoToolbar = (props) => {\n return (<StyledNekoToolbar {...props} />);\n};\n\nNekoToolbar.propTypes = {\n align: PropTypes.oneOf(['left', 'right'])\n};\n\nNekoToolbar.defaultProps = {\n align: 'left'\n};\n\nexport { NekoToolbar };","class NekoError {\n\n constructor(message, code = '', url = null, body = null, debug = {}, ) {\n this.url = url;\n this.message = message;\n this.code = code;\n this.body = body;\n this.debug = debug;\n }\n}\n\nexport { NekoError };","import { cache, mutate } from 'swr';\nimport { NekoError } from './errors';\n\n// This function allows to invalidate a SWR key which might\n// have been use for paging, for example: swrInvalidateMany('/api/items')\n// will reset everything which happens around this key.\n\nfunction swrInvalidateMany(select) {\n const keys = cache.keys();\n const mutations = [];\n let regexp = new RegExp(`(.*)${select}(.*)`);\n for (let key of keys) {\n if (regexp.test(key)) {\n mutations.push(mutate(key, null, true));\n }\n }\n return Promise.all(mutations);\n}\n\nfunction chunkArrayInGroups(arr, size) {\n let result = [];\n for (let i = 0; i < arr.length; i += size)\n result.push(arr.slice(i, i + size));\n return result;\n}\n\nconst consolidateJsonResult = (json) => {\n if (!json.data) {\n return json;\n }\n if (json.data.length > 0 && json.data[0].meta) {\n for (let x of json.data) {\n try { x.meta = JSON.parse(x.meta); }\n catch (err) { console.error('[JsonFetcher]', 'Could not decode meta.', x.meta); }\n }\n }\n else if (json.data.meta) {\n try { json.data.meta = JSON.parse(json.data.meta); }\n catch (err) { console.error('[JsonFetcher]', 'Could not decode meta.', x.meta); }\n }\n return json;\n}\n\nconst jsonFetcher = async (url, options = {}) => {\n let body = null;\n let json = {};\n let nekoError = null;\n let rawBody = null;\n\n try {\n options = options ? options : {};\n options.headers = options.headers ? options.headers : {};\n options.headers['Pragma'] = 'no-cache';\n options.headers['Cache-Control'] = 'no-cache';\n rawBody = await fetch(`${url}`, options);\n body = await rawBody.text();\n json = JSON.parse(body);\n if (!json.success) {\n let code = json.success === false ? 'NOT-SUCCESS' : 'N/A';\n let message = json.message ? json.message : 'Unknown error. Check your Console Logs.';\n if (json.code === 'rest_no_route') {\n message = \"The API can't be accessed. Is Rest API enabled?\";\n code = 'NO-ROUTE';\n }\n else if (json.code === 'internal_server_error') {\n message = \"Server error. Please check your PHP Error Logs.\";\n code = 'SERVER-ERROR';\n }\n nekoError = new NekoError(message, code, url, body ? body : rawBody);\n }\n }\n catch (error) {\n let code = 'BROKEN-REPLY';\n let message = \"The reply sent by the server is broken.\";\n if (rawBody && rawBody.status) {\n if (rawBody.status === 408) {\n code = \"REQUEST-TIMEOUT\";\n message = \"The request generated a timeout.\";\n }\n }\n nekoError = new NekoError(message, code, url, body ? body : rawBody, error);\n }\n\n // Rewrite the Json if there is an error\n if (nekoError) {\n console.error('[NekoError] JsonFetcher', nekoError.url, { code: nekoError.code, \n error: nekoError.error, body: nekoError.body });\n json.success = false;\n json.error = nekoError;\n }\n return consolidateJsonResult(json);\n}\n\nconst getFetch = async (url, json, signal, nonce) => {\n const nonceHeader = nonce ? { 'X-WP-Nonce': nonce } : {};\n return jsonFetcher(url, { \n method: 'GET', \n headers: { 'Content-Type': 'application/json', ...nonceHeader },\n signal: signal\n });\n}\n\nconst postFetch = async (url, config = {}) => {\n const { json = {}, signal, file, nonce } = config;\n let formData = file ? new FormData() : null;\n if (file) {\n formData.append('file', file);\n for (const [key, value] of Object.entries(json)) {\n formData.append(key, value);\n }\n }\n\n const headers = nonce ? { 'X-WP-Nonce': nonce } : {};\n if (!formData) {\n headers['Content-Type'] = 'application/json';\n }\n\n return jsonFetcher(url, { \n method: 'POST',\n headers: headers,\n body: formData ? formData :JSON.stringify(json) ,\n signal: signal\n });\n}\n\nconst buildUrlWithParams = (apiUrl, params) => {\n const isPlainPermalink = apiUrl.includes('index.php?rest_route');\n const urlParams = new URLSearchParams(params);\n const finalUrl = apiUrl + (isPlainPermalink ? '&' : '?') + urlParams.toString();\n return finalUrl;\n}\n\nexport { getFetch, postFetch, jsonFetcher, swrInvalidateMany, chunkArrayInGroups, buildUrlWithParams };","const prefix = mgcl_gallery_custom_links.prefix;\nconst domain = mgcl_gallery_custom_links.domain;\nconst restUrl = mgcl_gallery_custom_links.rest_url.replace(/\\/+$/, \"\");\nconst apiUrl = mgcl_gallery_custom_links.api_url.replace(/\\/+$/, \"\");\nconst pluginUrl = mgcl_gallery_custom_links.plugin_url.replace(/\\/+$/, \"\");\nconst isPro = mgcl_gallery_custom_links.is_pro === '1';\nconst isRegistered = isPro && mgcl_gallery_custom_links.is_registered === '1';\nconst restNonce = mgcl_gallery_custom_links.rest_nonce;\n\nexport { prefix, domain, apiUrl, restUrl, pluginUrl, isPro, isRegistered, restNonce };\n","// React & Vendor Libs\nconst { useState, useMemo } = wp.element;\nimport useSWR from 'swr';\n\n// NekoUI\nimport { NekoInput, NekoTypo, NekoPage, NekoBlock, NekoHeader, NekoContainer, NekoSettings,\n NekoTabs, NekoTab, NekoCheckboxGroup, NekoCheckbox, NekoWrapper, NekoSelect, NekoOption,\n NekoColumn } from '@neko-ui';\nimport { jsonFetcher, postFetch, useHandleSWR } from '@neko-ui';\n\nimport { apiUrl, restNonce } from '@app/settings';\n\nconst Settings = () => {\n\n const swrAllSettingsKey = useMemo(() => {\n return [`${apiUrl}/all_settings/`, { headers: { 'X-WP-Nonce': restNonce } }];\n }, [apiUrl, restNonce]);\n const { data: swrSettings, mutate: mutateSwrSettings } = useSWR(swrAllSettingsKey, jsonFetcher);\n const { busy: busySettings, data: settings, error: swrError } = useHandleSWR(swrSettings, {}, true);\n const [ busyAction, setBusyAction ] = useState(false);\n const busy = busySettings || busyAction;\n\n const obmode = settings?.mgcl_obmode;\n const parsingEngine = settings?.mgcl_parsing_engine;\n const log = settings?.mgcl_log;\n const buttonEnabled = settings?.mgcl_button_enabled;\n const buttonLabel = settings?.mgcl_button_label;\n\n const parsingEngineOptions = [\n { id: \"none\", value: \"None\", label: \"None (Not Supported Yet)\"},\n { id: \"htmldomparser\", value: \"HtmlDomParser\", label: \"HtmlDomParser\" },\n { id: \"didom\", value: \"DiDom\", label: \"DiDom\" }\n ]\n\n const updateOption = async (value, id) => {\n let newSettingsData = { ...swrSettings.data };\n newSettingsData[id] = value;\n mutateSwrSettings({ ...swrSettings, data: newSettingsData }, false);\n setBusyAction(true);\n try {\n await postFetch(`${apiUrl}/update_option`, { json: { name: id, value }, nonce: restNonce });\n }\n catch (err) {\n alert(err.message);\n }\n finally {\n setBusyAction(false);\n mutateSwrSettings();\n }\n }\n\n /**\n * Settings\n */\n\n const jsxOBMode =\n <NekoSettings title=\"OB Mode\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_obmode\" label=\"Enabled\" value=\"1\" checked={obmode} onChange={updateOption} description=\"If the linked images are outside of the main content (header, sidebar, etc), OB Mode is needed. This slows down the processing (cache recommended).\" />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n const jsxParsingEngine =\n <NekoSettings title=\"Parsing Engine\" description=\"Hello\">\n <NekoSelect id=\"mgcl_parsing_engine\" onChange={updateOption}>\n {parsingEngineOptions.map(option => <NekoOption id={`mgcl_parsing_engine_${option.id}`} value={option.value} label={option.label} checked={parsingEngine === option.value} /> )}\n </NekoSelect>\n </NekoSettings>;\n\n const jsxLog =\n <NekoSettings title=\"Logs\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_log\" label=\"Logs\" value=\"1\" checked={log} onChange={updateOption} description=\"Simple logging, written directly in the PHP Error Logs.\" />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n /**\n * CTA Buttons\n */\n const jsxUseButtons =\n <NekoSettings title=\"Use Buttons\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_button_enabled\" label=\"Enabled\" value=\"1\" description=\"A call-to-action button will be used of a clickable image.\" checked={buttonEnabled} onChange={updateOption} />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n const jsxButtonLabel =\n <NekoSettings title=\"Label\">\n <NekoInput id=\"mgcl_button_label\" name=\"mgcl_button_label\" value={buttonLabel} description=\"A call-to-action button will be used of a clickable image.\" onBlur={updateOption} />\n </NekoSettings>;\n\n return (\n <NekoPage nekoErrors={[ swrError ]}>\n\n <NekoHeader title='Gallery Custom Links | Settings' subtitle='By Jordy Meow' />\n\n <NekoWrapper>\n\n <NekoColumn full>\n <NekoContainer>\n <NekoTypo p>This plugin works out of the box, the default settings are the best for most installs. Don't hesitate to take a look at the <a href=\"https://meowapps.com/plugin/gallery-custom-links/\">official page</a>.</NekoTypo>\n </NekoContainer>\n\n <NekoTabs>\n\n <NekoTab title='Settings'>\n <NekoWrapper>\n\n <NekoColumn minimal>\n <NekoBlock busy={busy} title=\"Settings\" className=\"primary\">\n {jsxParsingEngine}\n {jsxOBMode}\n {jsxLog}\n </NekoBlock>\n </NekoColumn>\n\n <NekoColumn minimal>\n <NekoBlock busy={busy} title=\"CTA Buttons\" className=\"primary\">\n <NekoTypo p><b>Currently works with the <a href=\"https://wordpress.org/plugins/meow-gallery/\">Meow Gallery</a> and Gutenberg Galleries.</b> In a future Pro version, support for additional galleries might be added (please contact <a href=\"https://meowapps.com/contact/\">Meow Apps</a> for this).</NekoTypo>\n {jsxUseButtons}\n {!buttonEnabled ? null : jsxButtonLabel}\n </NekoBlock>\n </NekoColumn>\n\n </NekoWrapper>\n </NekoTab>\n\n </NekoTabs>\n\n </NekoColumn>\n\n </NekoWrapper>\n\n </NekoPage>\n );\n};\n\nexport default Settings;","const { __ } = wp.i18n;\n\nconst i18n = {};\n\ni18n.PENDING = __( 'Pending', 'gallery-custom-links' );\ni18n.RENAME = __( 'Rename', 'gallery-custom-links' );\ni18n.TITLE = __( 'Title', 'gallery-custom-links' );\ni18n.SAME_PAGE = __( 'Same page', 'gallery-custom-links' );\ni18n.NEW_PAGE = __( 'New page', 'gallery-custom-links' );\ni18n.LINK_URL = __( 'Link URL', 'gallery-custom-links' );\ni18n.LINK_TARGET = __( 'Link Target', 'gallery-custom-links' );\ni18n.LINK_REL = __( 'Link Rel', 'gallery-custom-links' );\ni18n.ARIAL_LABEL = __( 'Arial Label', 'gallery-custom-links' );\n\nexport default i18n;\n\n","// React & Vendor Libs\nconst { useState, useCallback } = wp.element;\nimport Styled from \"styled-components\";\n\n// Libs\nimport i18n from '@app/i18n';\nimport { apiUrl, restNonce } from '@app/settings';\n\n// NekoUI\nimport { NekoTypo, NekoIcon, NekoModal, NekoInput, NekoSelect, NekoOption } from '@neko-ui';\nimport { postFetch } from '@neko-ui';\n\nconst targets = [\n\t{ label: i18n.SAME_PAGE, value: '_self' },\n\t{ label: i18n.NEW_PAGE, value: '_blank' }\n];\n\nconst GroupContainer = Styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\tmargin-bottom: 10px;\n\n\tp {\n\t\tmargin: 0 !important;\n\t\twidth: 20%;\n\t}\n\n\t> div {\n\t\tflex-grow: 1;\n\t}\n`;\n\nconst EditLinkField = ( props ) => {\n\n\tconst [ busyAction, setBusyAction ] = useState(false);\n\tconst busy = busyAction;\n\n\tconst { postId } = props;\n\tconst [ url, setUrl ] = useState( props.url );\n\tconst [ target, setTarget ] = useState( props.target ? props.target : '_self' );\n\tconst [ rel, setRel ] = useState( props.rel );\n\tconst [ aria, setAria ] = useState( props.aria );\n\tconst [ openModal, setOpenModal ] = useState( false );\n\n\tconst updateOption = async (postId, url, target, rel, aria) => {\n\t\tsetBusyAction( true );\n\t\tlet result = true;\n\t\ttry {\n\t\t\tconst res = await postFetch( `${apiUrl}/update_meta`, { json: {\n\t\t\t\tpost_id: postId,\n\t\t\t\t_gallery_link_url: url,\n\t\t\t\t_gallery_link_target: target,\n\t\t\t\t_gallery_link_rel: rel,\n\t\t\t\t_gallery_link_aria: aria,\n\t\t\t}, nonce: restNonce } );\n\t\t\tif ( !res.success ) {\n\t\t\t\tresult = false;\n\t\t\t\talert(res.message);\n\t\t\t}\n\t\t} catch ( err ) {\n\t\t\tresult = false;\n\t\t\talert( err.message );\n\t\t} finally {\n\t\t\tif ( result ) onCloseModal();\n\t\t\tsetBusyAction( false );\n\t\t}\n\t};\n\n\tconst onCloseModal = () => setOpenModal( false )\n\n\tconst onOkClick = useCallback(() => {\n\t\tupdateOption( postId, url, target, rel, aria );\n\t}, [postId, url, target, rel, aria, updateOption, onCloseModal]);\n\n const onKeyDown = useCallback((e) => {\n if (e.key === 'Enter' || e.keyCode === 13) {\n e.preventDefault();\n onOkClick();\n }\n }, [onOkClick]);\n\n\treturn (\n\t\t<>\n\t\t\t<span onClick={() => setOpenModal( true )} style={{ cursor: 'pointer' }}>\n\t\t\t\t<NekoIcon icon=\"link\" disabled={!url} />\n\t\t\t</span>\n\t\t\t<NekoModal\n\t\t\t\tisOpen={openModal}\n\t\t\t\tonRequestClose={onCloseModal}\n\t\t\t\ttitle=\"Edit the custom link\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.LINK_URL}</NekoTypo>\n\t\t\t\t\t\t\t<NekoInput disabled={busy} onInput={(e) => setUrl(e.target.value)}\n onKeyDown={onKeyDown} value={url} autoFocus />\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.LINK_TARGET}</NekoTypo>\n\t\t\t\t\t\t\t<NekoSelect scrolldown={true} value={target} onChange={(v) => setTarget(v)} disabled={busy}>\n\t\t\t\t\t\t\t\t{targets.map(target => <NekoOption value={target.value} label={target.label} />)}\n\t\t\t\t\t\t\t</NekoSelect>\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.LINK_REL}</NekoTypo>\n\t\t\t\t\t\t\t<NekoInput disabled={busy} onInput={(e) => setRel(e.target.value)} value={rel} />\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.ARIAL_LABEL}</NekoTypo>\n\t\t\t\t\t\t\t<NekoInput disabled={busy} onInput={(e) => setAria(e.target.value)} value={aria} />\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tonOkClick={onOkClick}\n\t\t\t\tonCancelClick={onCloseModal}\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default EditLinkField;","// React & Vendor Libs\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// Gallery Custom Links\nimport Settings from '@app/components/Settings';\nimport EditLinkField from '@app/components/EditLinkField';\n\nlet isMediaLibrary = null;\n\nfunction init() {\n\tisMediaLibrary = document.getElementsByClassName('upload-php')[0];\n}\n\n// Gallery Custom Links Settings\nfunction addSettings() {\n\tconst container = document.getElementById('mgcl-admin-settings');\n\tif (container) {\n\t\tReactDOM.render((<Settings />), container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\ndocument.addEventListener('DOMContentLoaded', function(event) {\n\n\tinit();\n\n\tif (addSettings() || !isMediaLibrary) {\n\t\treturn;\n\t}\n\n\t// Edit Link Fields need to be added in the Media Library\n\tconst fields = Array.from(document.getElementsByClassName('mgcl-edit-link-field'));\n\tfields.forEach(field => {\n\t\tconst postId = field.getAttribute('data-post-id');\n\t\tconst url = field.getAttribute('data-url');\n\t\tconst target = field.getAttribute('data-target');\n\t\tconst rel = field.getAttribute('data-rel');\n\t\tconst aria = field.getAttribute('data-aria');\n\t\tReactDOM.render((<EditLinkField postId={postId} url={url} target={target} rel={rel} aria={aria} />), field);\n\t});\n\n});\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///external \"ReactDOM\"","webpack:///../neko-ui/src/common/NekoBusyOverlay.js","webpack:///../neko-ui/src/common/NekoTheme.js","webpack:///../neko-ui/src/common/PresetIcons.js","webpack:///../neko-ui/src/misc/Spinner.js","webpack:///../neko-ui/src/button/Button.js","webpack:///../neko-ui/src/label/ProOnly.js","webpack:///../neko-ui/src/hooks.js","webpack:///../neko-ui/src/button/MenuButton.js","webpack:///../neko-ui/src/container/Page.js","webpack:///../neko-ui/src/misc/Typography.js","webpack:///../neko-ui/src/container/Block.js","webpack:///../neko-ui/src/container/Container.js","webpack:///../neko-ui/src/container/Settings.js","webpack:///../neko-ui/src/container/Window.js","webpack:///../neko-ui/src/container/Wrapper.js","webpack:///../neko-ui/src/form/Checkbox.js","webpack:///../neko-ui/src/form/CheckboxGroup.js","webpack:///../neko-ui/src/form/Input.js","webpack:///../neko-ui/src/form/TextArea.js","webpack:///../neko-ui/src/misc/Tooltip.js","webpack:///../neko-ui/src/misc/Icon.js","webpack:///../neko-ui/src/form/Select.js","webpack:///../neko-ui/src/form/Form.js","webpack:///../neko-ui/src/form/Switch.js","webpack:///../neko-ui/src/misc/Finder.js","webpack:///../neko-ui/src/misc/Logo.js","webpack:///../neko-ui/src/misc/Progress.js","webpack:///../neko-ui/src/misc/Header.js","webpack:///../neko-ui/src/misc/Paging.js","webpack:///../neko-ui/src/misc/Links.js","webpack:///../neko-ui/src/misc/Gauge.js","webpack:///../neko-ui/src/misc/Message.js","webpack:///../neko-ui/src/misc/Upload.js","webpack:///../neko-ui/src/misc/UploadDropArea.js","webpack:///../neko-ui/src/modal/Modal.js","webpack:///../neko-ui/src/table/Table.js","webpack:///../neko-ui/src/modal/MediaLibraryModal.js","webpack:///../neko-ui/src/tabs/Tabs.js","webpack:///../neko-ui/src/tabs/SideTabs.js","webpack:///../neko-ui/src/toolbar/Toolbar.js","webpack:///../neko-ui/src/errors.js","webpack:///../neko-ui/src/helpers.js","webpack:///./app/js/settings.js","webpack:///./app/js/components/Settings.js","webpack:///./app/js/i18n.js","webpack:///./app/js/components/EditLinkField.js","webpack:///./app/js/index.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","React","ReactDOM","NekoBusyOverlay","props","spinner","busy","overlayStyle","useState","showLoader","setShowLoader","useEffect","timeout","setTimeout","clearTimeout","loader","Fragment","className","style","Boolean","jsx","propsForElement","undefined","position","children","propTypes","PropTypes","bool","isRequired","oneOfType","arrayOf","node","NekoColors","black","blackRGB","blue","blueRGB","deepBlue","finderBorder","lightBlue","lightGray","lightGray2","lightPurple","gray","green","darkGray","disabledForm","orange","overlay","red","redHighlight","header","proGray","progress","purple","tableGray","yellow","yellowRGB","white","whiteRGB","NekoColorTheme","danger","primary","secondary","success","NekoTheme","fontFamily","fontSizeH1","fontSizeH2","fontSizeText","fontSizeSmall","fontSizeSmallButton","lightShadow","presetIcons","lockCheck","lockOpenVariant","fileUndo","chevronDoubleLeft","chevronDoubleRight","chevronLeft","chevronRight","chevronDown","chevronUp","pauseIcon","playIcon","replayIcon","checkIcon","stopIcon","deleteIcon","undoIcon","alertCircle","databaseIcon","toolsIcon","cogIcon","closeIcon","catIcon","arrowUpBoldCircleOutline","trashCan","leadPencil","viewDashboard","databaseSearch","folderIcon","folderOpen","imageMultipleOutline","plusIcon","folderPlus","imagePlus","viewGrid","formatListBulleted","twitterIcon","instagramIcon","facebookIcon","starIcon","timerOutline","linkVariant","linkedin","pinterest","zoomIn","infoOutline","arrowUp","arrowDown","sort","eye","rocketLaunch","StyledCircleSpinner","Styled","div","size","color","CircleSpinner","StyledNekoSpinner","type","rest","NekoSpinner","string","defaultProps","StyledButton","icon","onClick","disabled","small","isBusy","rounded","busyText","hasIcon","classNames","marginLeft","marginRight","PresetIcons","width","height","Theme","lighten","additionalColor","NekoButton","oneOf","instanceOf","IconifyIcon","func","Tag","a","Colors","StyledProOnly","show","href","target","ProOnly","useComponentSize","ref","useRef","setSize","current","observer","ResizeObserver","entries","element","contentRect","left","right","top","bottom","observe","unobserve","useOutsideClick","onOutsideClick","componentRef","handleOutsideClick","e","contains","document","addEventListener","removeEventListener","PQueue","concurrency","autoStart","MenuButtonWrapper","MenuButton","button","MenuItemContainer","StyledMenuButton","title","isPro","isOpen","setIsOpen","wrapperRef","buttonRef","buttonWidth","Children","map","child","cloneElement","transform","MenuItem","StyledNekoMenuItem","requirePro","needsProUser","NekoMenuButton","NekoMenuItem","Page","StyledNekoPage","nekoErrors","fatalError","setFatalError","showBody","setShowBody","error","url","code","message","body","dangerouslySetInnerHTML","__html","open","NekoPage","NekoH1","h1","NekoH2","h2","NekoP","NekoSpan","span","NekoLabel","label","StyledNekoTypo","NekoTypo","any","Block","StyledNekoBlock","action","NekoBlock","Container","Bar","StyledNekoContainer","headerAlign","footer","footerAlign","NekoContainer","StyledNekoSettings","contentAlign","NekoSettings","WindowBase","TitleBar","StyledNekoWindow","NekoWindow","Wrapper","Column","StyledNekoWrapper","StyledNekoColumn","full","minimal","NekoWrapper","NekoColumn","StyledNekoCheckbox","id","checked","onChange","description","showUpProOnly","isDisabled","disabledClass","join","defaultChecked","console","log","htmlFor","checkboxMarked","checkboxBlankOutline","NekoCheckbox","StyledNekoCheckboxGroup","max","NekoCheckboxGroup","mas","number","StyledNekoInput","placeholder","onEnter","readOnly","step","min","maxLength","defaultMaxLength","natural","inputStyle","onCustomChange","onCustomBlur","onBlur","newValue","setNewValue","isControlled","onKeyPress","event","preventDefault","autoComplete","spellCheck","NekoInput","StyledNekoTextArea","avoidOnEnterWithShift","textAreaStyle","countable","count","setCount","pressShift","setPressShift","keydownFunction","useCallback","shiftKey","keyupFunction","substr","rows","NekoTextArea","TooltipContainer","Tooltip","prop","visible","StyledNekoTooltip","text","setShow","tooltipRef","tooltipWidth","tooltipHeight","childRef","childWidth","childHeight","transformStyle","useMemo","transY","transX","onMouseEnter","onMouseLeave","NekoTooltip","StyledIconContainer","StyledIcon","Icon","hoverColor","StyledNekoIcon","spinning","tooltip","containerStyle","raw","getIcon","iconClassName","NekoIcon","Select","SelectedOption","Description","Options","OptionsContainer","StyledNekoSelect","scrolldown","currentOption","toArray","find","showOptions","toggleOptions","onOptionClick","childrenLength","data-is-disabled","RadioOption","SelectOption","StyledNekoOption","radioOption","recordCircle","checkboxBlankCircleOutline","selectOption","NekoSelect","NekoOption","Form","StyledNekoForm","NekoForm","StyledNekoSwitch","fontSize","onValue","offValue","onBackgroundColor","offBackgroundColor","onLabel","offLabel","onToggle","v","NekoSwitch","StyledNekoFinder","chevron","FinderTitleContainer","FinderTitle","ChevronSpace","FinderTitleIconDropZone","FinderTitleIconDroppableArea","ItemContainer","StyledNekoFinderItem","defaultIcons","gallery","tag","tagIcon","rightElement","rightElementStyle","showRightElement","selected","draggable","onDragStart","onDragOver","onDragEnd","onDrop","isExpanded","dragging","rightAction","rightActionOnHover","onDragLeave","isCustomizedIcon","preventClose","hasChild","expanded","setExpanded","keys","includes","setIcon","isFolder","showRightAction","setShowRightAction","iconColor","stopPropagation","NekoFinder","NekoFinderItem","Logo","StyledNekoLogo","viewBox","fill","xmlns","stroke","strokeWidth","NekoLogo","StyledNekoProgress","status","Math","ratio","parseFloat","ProgressCurrent","onPauseClick","paused","onStopClick","percent","isNaN","parseInt","round","typeOfStatus","minWidth","NekoProgress","HeaderBase","StyledNekoHeader","subtitle","saving","textDecoration","contentSave","NekoHeader","PagingContainer","StyledNekoPaging","currentPage","limit","total","onCurrentPageChanged","isEditable","maxPage","ceil","prevIconClassName","nextIconClassName","showCurrentPageInput","setShowCurrentPageInput","fullClassName","onClickHandle","page","getValidPage","numberPage","Number","currentPageJsx","autoFocus","defaultValue","onControllerClick","currentTarget","NekoPaging","LinkContainer","Link","variant","StyledNekoQuickLinks","isActive","StyledNekoLink","variantValue","display","NekoQuickLinks","NekoLink","StyledSection","section","backgroundColor","degrees","NekoGauge","background","class","StyledUpload","NekoUpload","multiple","iconSize","onSuccess","onFailure","apiUrl","apiConfig","inDropZone","setInDropZone","floor","random","inputId","inputEl","divEl","setBusy","pointerEvents","uploadFile","files","upload","file","postFetch","Promise","all","response","successResponses","filter","failerResponses","onDragEnter","uploadFiles","accept","click","dataTransfer","StyledUploadDropArea","NekoUploadDropArea","forwardRef","NekoModalParent","NekoModalContent","StyledNekoModal","ok","cancel","customButtons","customButtonsPosition","content","onOkClick","onCancelClick","okOnEnter","thumbnail","customClassName","showCustomButtons","keyUpHandler","modalContent","ariaHideApp","parentSelector","getElementById","closeTimeoutMS","NekoModal","Table","table","TableCheckBox","intermediate","onSelect","onUnselect","checkboxMultipleMarked","alignToJustifyContent","center","StyledNekoTable","columns","selectedItems","onSortChange","columnsCount","getColumnStyle","column","align","textAlign","justifyContent","cells","accessor","currentRowsIds","x","areAllRowsSelected","isIntermediate","hiddenColumnIndexes","reduce","headersFooters","beingSorted","beingSortedAsc","by","columnStyle","sortable","colspan","row","cell","NekoTable","removeClass","Array","forEach","getElementsByClassName","ele","classList","remove","displayModes","StyledNekoMediaLibraryModal","images","onRefresh","onNextPage","onPreviousPage","onRemoveClick","onZoomClick","onSearch","searchValue","onPageChange","multiSelect","showUploader","uploader","onSelectedOrderChanged","onUploadSuccess","onUploadFailure","uploadApiUrl","uploadApiConfig","uploadMultiple","onClose","onCancel","onSave","search","setSerch","dragImageIndex","setDragImageIndex","displayMode","setDisplayMode","getBoundingClientRect","clientX","add","currentIndex","afterIndex","selectedMediaJsx","dummyElementForDrop","selectedElement","image","src","zoom_src","mediaGridJsx","some","mediaRows","thumbnail_url","objectFit","filename","mediaListJsx","ids","cursor","NekoMediaLibraryModal","array","TabContainer","TabGroup","Tab","TabContent","StyledNekoTabs","isActiveTabIndex","setIsActiveTabIndex","childrenProp","keepTabOnReload","URL","location","searchParams","searchTitle","decodeURIComponent","index","replaceAll","indexOf","tabAttributes","toLowerCase","hidden","onTabClick","tabIndex","tabAttr","ev","history","pushState","URLSearchParams","encodeURIComponent","set","newUrl","protocol","host","pathname","toString","replaceState","path","keepTab","attr","StyledNekoTab","NekoTabs","NekoTab","StyledNekoSideTabs","activeTabIndex","rightActions","newTabIndex","StyledNekoSideTab","NekoSideTabs","NekoSideTab","ToolbarBase","StyledNekoToolbar","NekoToolbar","NekoError","debug","this","consolidateJsonResult","json","meta","JSON","parse","err","jsonFetcher","options","nekoError","rawBody","headers","fetch","config","signal","nonce","formData","FormData","append","method","stringify","mgcl_gallery_custom_links","prefix","domain","rest_url","replace","api_url","restNonce","plugin_url","is_pro","is_registered","rest_nonce","wp","Settings","swrAllSettingsKey","useSWR","swrSettings","mutateSwrSettings","mutate","swrData","defaultData","defaultBusy","setData","setError","setTotal","useHandleSWR","busySettings","settings","swrError","busyAction","setBusyAction","obmode","mgcl_obmode","parsingEngine","mgcl_parsing_engine","mgcl_log","buttonEnabled","mgcl_button_enabled","buttonLabel","mgcl_button_label","updateOption","newSettingsData","alert","jsxOBMode","jsxParsingEngine","option","jsxLog","jsxUseButtons","jsxButtonLabel","__","i18n","PENDING","RENAME","TITLE","SAME_PAGE","NEW_PAGE","LINK_URL","LINK_TARGET","LINK_REL","ARIAL_LABEL","targets","GroupContainer","EditLinkField","postId","setUrl","setTarget","rel","setRel","aria","setAria","openModal","setOpenModal","post_id","_gallery_link_url","_gallery_link_target","_gallery_link_rel","_gallery_link_aria","res","onCloseModal","onKeyDown","keyCode","onRequestClose","onInput","isMediaLibrary","container","render","from","field","getAttribute"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAi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etB,OAAQA,EAAQjkB,IAAKA,EAAK7D,OAAQA,EAAQioB,IAAKA,EAAKE,KAAMA,IAAWmB","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"wpJsonMgcl\"] = window[\"wpJsonMgcl\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([99,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports = React;","module.exports = ReactDOM;","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst NekoBusyOverlay = (props) => {\n const { spinner = true, busy = false, overlayStyle } = props;\n const [ showLoader, setShowLoader ] = useState(true);\n\n useEffect(() => {\n let timeout;\n\n // Show the loader\n if (!busy) { \n timeout = setTimeout(() => { \n setShowLoader(false); \n timeout = null; \n }, 250);\n }\n else { \n setShowLoader(true);\n }\n\n // Cleanup\n return (() => {\n if (timeout) {\n clearTimeout(timeout);\n }\n });\n }, [busy]);\n\n const loader = !showLoader ? null : (\n <React.Fragment>\n <div className={'overlay' + ' ' + (!busy ? 'overlayHidden' : '')} style={overlayStyle}>\n {Boolean(spinner) && \n <div className={'lds-ellipsis ' + (!busy ? 'spinnerHidden' : '')}>\n <div></div><div></div><div></div><div></div>\n </div>\n }\n </div>\n <style jsx>{`\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 `}</style>\n </React.Fragment>\n );\n\n // I am removing the busy because I like it as a boolean...\n // ... but React doesn't like pure boolean value here.\n const propsForElement = { ...props, busy: undefined, spinner: undefined };\n return (\n <div style={{ position: 'relative' }} {...propsForElement}> \n {loader}\n {props.children}\n </div>\n );\n};\n\nNekoBusyOverlay.propTypes = {\n busy: PropTypes.bool.isRequired,\n spinner: PropTypes.bool,\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired\n};\n\nexport default NekoBusyOverlay;","export const NekoColors = {\n black: '#000000',\n blackRGB: '0, 0, 0',\n blue: '#007cba',\n blueRGB: '0, 124, 186',\n deepBlue: '#134575',\n finderBorder: '#DEDEDE',\n lightBlue: '#EBF3FF',\n lightGray: '#cacaca',\n lightGray2: '#F5F5F5',\n lightPurple: '#D8B1FF',\n gray: '#E8E8E8',\n green: '#0EA480',\n darkGray: '#A0A0A0',\n disabledForm: '#828282',\n orange: '#daa827',\n overlay: 'rgba(16, 16, 16, 0.92)',\n red: '#ba4300',\n redHighlight: '#de5307',\n header: '#007cba',\n proGray: '#7F8EA0',\n progress: '#8414a8',\n purple: '#956DBE',\n tableGray: '#FAFAFA',\n yellow: '#e4b42b',\n yellowRGB: '224, 156, 54',\n white: '#ffffff',\n whiteRGB: '255, 255, 255',\n}\n\nexport const NekoColorTheme = {\n danger: NekoColors.red,\n primary: NekoColors.blue,\n secondary: NekoColors.lightBlue,\n success: NekoColors.green,\n}\n\nconst NekoTheme = {\n\n // COLORS\n ...NekoColors,\n ...NekoColorTheme,\n\n // FONT\n\n fontFamily: 'Lato',\n fontSizeH1: '24px',\n fontSizeH2: '18px',\n fontSizeText: '13px',\n fontSizeSmall: '12px',\n fontSizeSmallButton: '10px',\n\n // SHADOW\n\n lightShadow: '0px 0px 10px rgba(0,0,0,0.1)',\n};\n\nexport default NekoTheme;\n","import lockCheck from '@iconify/icons-mdi/lock-check';\nimport lockOpenVariant from '@iconify/icons-mdi/lock-open-variant';\nimport fileUndo from '@iconify/icons-mdi/file-undo';\nimport chevronDoubleLeft from '@iconify/icons-mdi/chevron-double-left';\nimport chevronDoubleRight from '@iconify/icons-mdi/chevron-double-right';\nimport chevronLeft from '@iconify/icons-mdi/chevron-left';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport pauseIcon from '@iconify/icons-mdi/pause';\nimport playIcon from '@iconify/icons-mdi/play';\nimport replayIcon from '@iconify/icons-mdi/replay';\nimport checkIcon from '@iconify/icons-mdi/check';\nimport stopIcon from '@iconify/icons-mdi/stop';\nimport deleteIcon from '@iconify/icons-mdi/delete';\nimport undoIcon from '@iconify/icons-mdi/undo';\n//import alertIcon from '@iconify/icons-mdi/alert';\nimport alertCircle from '@iconify/icons-mdi/alert-circle';\nimport databaseIcon from '@iconify/icons-mdi/database';\nimport pencilIcon from '@iconify/icons-mdi/pencil';\nimport toolsIcon from '@iconify/icons-mdi/tools';\nimport cogIcon from '@iconify/icons-mdi/cog';\nimport closeIcon from '@iconify/icons-mdi/close';\nimport catIcon from '@iconify/icons-mdi/cat';\nimport trashCan from '@iconify/icons-mdi/trash-can';\nimport leadPencil from '@iconify/icons-mdi/lead-pencil';\nimport viewDashboard from '@iconify/icons-mdi/view-dashboard';\nimport databaseSearch from '@iconify/icons-mdi/database-search';\nimport folderIcon from '@iconify/icons-mdi/folder';\nimport folderOpen from '@iconify/icons-mdi/folder-open';\nimport imageMultipleOutline from '@iconify/icons-mdi/image-multiple-outline';\nimport plusIcon from '@iconify/icons-mdi/plus';\nimport folderPlus from '@iconify/icons-mdi/folder-plus';\nimport imagePlus from '@iconify/icons-mdi/image-plus';\nimport viewGrid from '@iconify/icons-mdi/view-grid';\nimport formatListBulleted from '@iconify/icons-mdi/format-list-bulleted';\nimport twitterIcon from '@iconify/icons-mdi/twitter';\nimport instagramIcon from '@iconify/icons-mdi/instagram';\nimport facebookIcon from '@iconify/icons-mdi/facebook';\nimport starIcon from '@iconify/icons-mdi/star';\nimport timerOutline from '@iconify/icons-mdi/timer-outline';\nimport arrowUpBoldCircleOutline from '@iconify/icons-mdi/arrow-up-bold-circle-outline';\nimport linkVariant from '@iconify/icons-mdi/link-variant';\nimport linkedin from '@iconify/icons-mdi/linkedin';\nimport pinterest from '@iconify/icons-mdi/pinterest';\nimport zoomIn from '@iconify/icons-mdi/zoom-in'\nimport infoOutline from '@iconify/icons-mdi/info-outline'\nimport arrowUp from '@iconify/icons-mdi/arrow-up'\nimport arrowDown from '@iconify/icons-mdi/arrow-down'\nimport sort from '@iconify/icons-mdi/sort'\nimport eye from '@iconify/icons-mdi/eye'\nimport rocketLaunch from '@iconify/icons-mdi/rocket-launch'\n\nconst presetIcons = {\n 'lock': lockCheck,\n 'lock-open': lockOpenVariant,\n 'file-undo': fileUndo,\n 'chevron-double-left': chevronDoubleLeft,\n 'chevron-double-right': chevronDoubleRight,\n 'chevron-left': chevronLeft,\n 'chevron-right': chevronRight,\n 'chevron-down': chevronDown,\n 'chevron-up': chevronUp,\n 'pause': pauseIcon,\n 'play': playIcon,\n 'replay': replayIcon,\n 'check': checkIcon,\n 'stop': stopIcon,\n 'delete': deleteIcon,\n 'undo': undoIcon,\n 'alert': alertCircle,\n 'database': databaseIcon,\n 'tools': toolsIcon,\n 'cog': cogIcon,\n 'close': closeIcon,\n 'cat': catIcon,\n 'upload': arrowUpBoldCircleOutline,\n 'trash': trashCan,\n 'pencil': leadPencil,\n 'dashboard': viewDashboard,\n 'search': databaseSearch,\n 'folder': folderIcon,\n 'folder-open': folderOpen,\n 'image-multiple-outline': imageMultipleOutline,\n 'plus': plusIcon,\n 'folder-plus': folderPlus,\n 'image-plus': imagePlus,\n 'view-grid': viewGrid,\n 'format-list-bulleted': formatListBulleted,\n 'twitter': twitterIcon,\n 'instagram': instagramIcon,\n 'facebook': facebookIcon,\n 'star': starIcon,\n 'timer-outline': timerOutline,\n 'link': linkVariant,\n 'linkedin': linkedin,\n 'pinterest': pinterest,\n 'zoom-in': zoomIn,\n 'info-outline': infoOutline,\n 'arrow-up': arrowUp,\n 'arrow-down': arrowDown,\n 'sort': sort,\n 'eye': eye,\n 'rocket-launch': rocketLaunch,\n};\n\nexport default presetIcons;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Styled from \"styled-components\";\n\nconst StyledCircleSpinner = Styled.div`\n width: ${props => props.size || '50%'};\n padding-top: ${props => props.size || '50%'};\n position: relative;\n margin: 0 auto;\n\n .double-bounce1, .double-bounce2 {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: ${props => props.color || '#333'};\n opacity: 0.6;\n position: absolute;\n top: 0;\n left: 0;\n\n -webkit-animation: sk-bounce 2.0s infinite ease-in-out;\n animation: sk-bounce 2.0s infinite ease-in-out;\n }\n\n .double-bounce2 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n }\n\n @-webkit-keyframes sk-bounce {\n 0%, 100% { -webkit-transform: scale(0.0) }\n 50% { -webkit-transform: scale(1.0) }\n }\n\n @keyframes sk-bounce {\n 0%, 100% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 50% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n }\n`;\n\nconst CircleSpinner = (props) => {\n return (\n <StyledCircleSpinner {...props}>\n <div className=\"double-bounce1\"></div>\n <div className=\"double-bounce2\"></div>\n </StyledCircleSpinner>\n );\n};\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoSpinner = (props) => {\n const { type = 'circle', ...rest } = props;\n\n switch (type) {\n case 'circle':\n return <CircleSpinner {...rest} />\n\n default:\n return null;\n }\n};\n\nconst NekoSpinner = (props) => {\n return <StyledNekoSpinner {...props} />;\n};\n\nNekoSpinner.propTypes = {\n type: PropTypes.string,\n};\n\nNekoSpinner.defaultProps = {\n type: 'circle',\n};\n\nexport { NekoSpinner };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport Theme from '../common/NekoTheme';\nimport { Icon, IconifyIcon } from '@iconify/react';\nimport PresetIcons from '../common/PresetIcons';\nimport { NekoSpinner } from '../misc/Spinner';\n\nconst StyledButton = Styled(props => {\n\n const { className, icon = null, onClick, disabled = false, color = null, small, isBusy = false, children, rounded, busyText, ...rest } = props;\n const hasIcon = !!icon;\n\n const getIcon = () => {\n if (typeof icon === 'string') {\n return PresetIcons[icon] || null;\n }\n return icon;\n };\n\n const classNames = `nui-button ${className || ''}${hasIcon ? ' has-icon' : ''}${color ? ' custom-color' : ''}${small ? ' small' : ''}${rounded ? ' rounded' : ''}`;\n\n return (\n <button type=\"button\" className={classNames} onClick={onClick} disabled={disabled} {...rest}>\n {isBusy && <NekoSpinner type=\"circle\" color=\"#fff\" size={rounded ? '82%' : '35%'} />}\n {isBusy && !!busyText && <span style={{ marginLeft: '4px', marginRight: '2xp' }}>{busyText}</span>}\n {!isBusy && hasIcon && <Icon icon={getIcon()} width={rounded ? 20 : 24} height={rounded ? 20 : 24} />}\n {!!children && !isBusy && <span style={{ marginLeft: hasIcon ? '4px' : 0, marginRight: hasIcon ? '2xp' : 0 }}>{children}</span>}\n </button>\n );\n})`\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n padding: 0 15px;\n\n background-color: ${Theme.blue};\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ${lighten(0.1, Theme.blue)};\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 8px;\n }\n\n &.secondary {\n background-color: ${Theme.lightBlue};\n border: 1px solid ${Theme.blue};\n color: ${Theme.blue};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.lightBlue)};\n }\n }\n\n &.danger {\n background-color: ${Theme.red};\n border-color: ${Theme.red};\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.red)};\n\t }\n }\n\n &.success {\n background-color: ${Theme.green};\n border-color: ${Theme.green};\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.green)};\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n &.small {\n font-size: ${Theme.fontSizeSmallButton};\n height: 24px;\n }\n\n &.header {\n background-color: ${Theme.deepBlue};\n border-color: ${Theme.deepBlue};\n height: 40px;\n padding: 0 20px;\n\n\t &:hover {\n\t\t background-color: ${lighten(0.1, Theme.deepBlue)};\n\t }\n }\n\n &.rounded {\n border-radius: 100%;\n min-width: 30px;\n height: 30px;\n width: 30px;\n padding: 3px;\n }\n\n ${props => additionalColor(props.color)}\n`;\n\nconst additionalColor = (color) => {\n if (color) {\n return `\n &.custom-color {\n background-color: ${color};\n border: 1px solid ${color};\n\n &:hover {\n background-color: ${lighten(0.1, color)};\n }\n }\n `;\n }\n};\n\n/**\n * The NekoButton works out of the box without specific attributes.\n */\nconst NekoButton = (props) => {\n return (<StyledButton {...props} />);\n};\n\nNekoButton.propTypes = {\n className: PropTypes.oneOf(['primary', 'secondary', 'danger', 'success', 'header']),\n disabled: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['setting', 'edit', 'trash'])]),\n color: PropTypes.string,\n onClick: PropTypes.func.isRequired,\n rounded: PropTypes.bool,\n isBusy: PropTypes.bool,\n busyText: PropTypes.string\n};\n\nNekoButton.defaultProps = {\n className: 'primary',\n disabled: false,\n icon: null,\n color: null,\n onClick: () => {},\n rounded: undefined,\n isBusy: false,\n busyText: undefined\n};\n\nexport { NekoButton };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\nimport Theme from '../common/NekoTheme';\n\nconst Tag = Styled.a`\n background-color: ${Colors.yellow};\n position: relative;\n border-radius: 10px;\n color: ${Colors.white};\n font-family: ${Theme.fontFamily};\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: ${Colors.white};\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n`;\n\n/**\n * @param {string} className\n * @param {string|object} icon\n * @param {bool} disabled\n * @param {function} onClick\n */\nconst StyledProOnly = (props) => {\n\n const { show = true, className, ...rest } = props;\n\n if (!show) {\n return null;\n }\n\n return (\n <Tag href='https://store.meowapps.com' target='_blank' className={`${className || ''}`} {...rest}>\n Pro Only\n </Tag>\n );\n};\n\nconst ProOnly = (props) => {\n return (<StyledProOnly {...props} />);\n}\n\nProOnly.propTypes = {\n show: PropTypes.bool,\n className: PropTypes.string\n};\n\nProOnly.defaultProps = {\n show: true,\n className: undefined\n};\n\nexport { ProOnly };\n","import React, { useState, useRef, useEffect, useCallback } from 'react';\nimport PQueue from 'p-queue';\n\nconst useHandleSWR = (swrData = undefined, defaultData = null, defaultBusy = false) => {\n const [ data, setData ] = useState(defaultData);\n const [ error, setError ] = useState(null);\n const [ busy, setBusy ] = useState(defaultBusy);\n const [ total, setTotal ] = useState(0);\n\n useEffect(() => {\n if (swrData !== undefined) { \n if (swrData.success) {\n setError(null);\n setData(swrData.data);\n setTotal(swrData.total ? swrData.total : 0);\n }\n else {\n setError(swrData.error);\n }\n }\n setBusy(swrData === undefined);\n }, [ swrData ]);\n\n return { busy, data, total, error };\n}\n\n// Sometimes, we need to align or place elements depending on other dynamic elements.\n// This hook returns a ref (which should be assign to a component), and the size of\n// this element every time it changes.\n\nconst useComponentSize = () => {\n const ref = useRef();\n const [ size, setSize ] = useState({});\n\n useEffect(() => {\n if (ref && ref.current) {\n const observer = new ResizeObserver(entries => {\n let element = entries[0];\n if (element.contentRect) {\n setSize({ \n width: element.contentRect.left + element.contentRect.right, \n height: element.contentRect.top + element.contentRect.bottom \n });\n }\n });\n observer.observe(ref.current);\n return () => { observer.unobserve(ref.current); };\n }\n }, []);\n return { ref, width: size.width ? size.width : 0, height: size.height ? size.height : 0 };\n};\n\n// If a click is made outside the component, then the function onOutsideClick is called.\n// This function returns a ref which needs to be assigned to the component.\n\nconst useOutsideClick = (onOutsideClick) => {\n const componentRef = useRef();\n const handleOutsideClick = (e) => {\n if (!onOutsideClick || componentRef.current.contains(e.target)) {\n return;\n }\n onOutsideClick();\n };\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleOutsideClick);\n return () => { document.removeEventListener(\"mousedown\", handleOutsideClick); };\n });\n return componentRef;\n};\n\n\n// This hook allows calling many requests without having too many of them\n// running concurrently.\n\nlet GlobalQueue = null;\n\nconst useNekoGlobalQueue = (params = {}) => {\n\n if (!GlobalQueue) {\n let { concurrency = 2 } = params;\n GlobalQueue = new PQueue({ concurrency, autoStart: true });\n }\n\n const runTask = async (func) => {\n return await GlobalQueue.add(func);\n }\n\n return { runTask };\n};\n\n// This hook handles batch of asynchronous requests, and provide everything\n// the NekoProgress might need.\n\nconst isDebug = false;\nconst UploadQueue = new PQueue({ concurrency: 1, autoStart: false });\n\nconst useNekoTasks = () => {\n\n // We should be able to kill fetch requests using this\n // Interesting article: https://davidwalsh.name/cancel-fetch\n const [ controller, setController ] = useState(new AbortController());\n const refSkip = useRef(false);\n const refErrors = useRef(0);\n const [ busy, setBusy ] = useState(null);\n const [ paused, setPaused ] = useState(false);\n const [ max, setMax ] = useState(0);\n const [ error, setError ] = useState(false);\n const [ success, setSuccess ] = useState(false);\n const [ value, setValue ] = useState(0);\n\n const reset = async () => {\n let newController = new AbortController();\n setController(newController);\n setError(false);\n refErrors.current = 0;\n refSkip.current = false;\n setPaused(false);\n setSuccess(false);\n setValue(0);\n setMax(0);\n };\n\n const start = async (tasks) => {\n const runnerPromise = new Promise((resolve, reject) => {\n setError(false);\n refErrors.current = 0;\n refSkip.current = false;\n setPaused(false);\n setSuccess(false);\n setTasks(tasks);\n setBusy(true);\n if (isDebug) { console.log('Started process.'); }\n UploadQueue.start();\n UploadQueue.onIdle().then(() => {\n onIdle();\n resolve();\n }); \n });\n return runnerPromise;\n };\n\n const pause = async () => {\n if (isDebug) { console.log('Paused process.'); }\n UploadQueue.pause();\n setPaused(true);\n };\n\n const resume = async () => {\n if (isDebug) { console.log('Resume process.'); }\n setError(false);\n setPaused(false);\n UploadQueue.start();\n };\n\n const stop = async () => {\n if (isDebug) { console.log('Cancelled process.'); }\n UploadQueue.pause();\n controller.abort();\n setBusy(false);\n setError(false);\n setSuccess(false);\n };\n\n const onIdle = async () => {\n if (isDebug) { console.log('onIdle.'); }\n setSuccess(true);\n setBusy(false);\n };\n\n const addTask = async (task) => {\n UploadQueue.add(async () => {\n try {\n let res = await task(controller.signal);\n if (!res || !res.success) {\n console.error('[useNekoTasks] Task returned nothing.', res);\n }\n if (!res.success) {\n refErrors.current++;\n if (!refSkip.current) {\n setError(res.error);\n pause();\n }\n }\n }\n catch (err) {\n if (err.name === 'AbortError') {\n console.log('Aborted');\n return;\n }\n else {\n refErrors.current++;\n if (!refSkip.current) {\n setError(\"An error was caught (more information in the console).\");\n pause();\n }\n }\n }\n finally {\n setValue(value => value + 1);\n }\n });\n setMax(max => max + 1);\n }\n\n const setTasks = async (tasks) => {\n UploadQueue.clear();\n for (let task of tasks) {\n addTask(task);\n }\n setValue(0);\n };\n\n const setAlwaysSkip = useCallback((value = true) => {\n refSkip.current = true;\n }, []);\n\n const getErrorCount = useCallback(() => {\n return refErrors.current;\n }, []);\n\n return { start, stop, pause, resume, reset, \n addTask, setAlwaysSkip, getErrorCount,\n error, success, busy, paused, value, max };\n};\n\nexport { useHandleSWR, useOutsideClick, useNekoGlobalQueue, useNekoTasks, useComponentSize };","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { Icon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport { useOutsideClick, useComponentSize } from '../hooks';\n\nconst MenuButtonWrapper = Styled.div`\n display: inline-block;\n`;\n\nconst MenuButton = Styled.button`\n align-items: center;\n background-color: ${Theme.blue};\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: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\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: ${lighten(0.1, Theme.blue)};\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`;\n\nconst MenuItemContainer = Styled.div`\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ${Theme.blue};\n position: absolute;\n z-index: 10;\n box-shadow: ${Theme.lightShadow};\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 ${Theme.blue};\n }\n`;\n\nconst StyledMenuButton = props => {\n\n const { title, disabled = false, isPro = false, style = {} } = props;\n const [ isOpen, setIsOpen ] = React.useState(false);\n const wrapperRef = useOutsideClick(() => { setIsOpen(false) });\n const { ref: buttonRef, width: buttonWidth } = useComponentSize();\n\n const onClick = () => {\n setIsOpen(!isOpen);\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n isPro,\n disabled: child.props.disabled || disabled,\n onClick: () => {\n if (child.props.onClick) {\n child.props.onClick();\n }\n onClick();\n }\n });\n });\n\n return (\n <MenuButtonWrapper ref={wrapperRef}>\n <MenuButton ref={buttonRef} type=\"button\" disabled={disabled} onClick={onClick} style={style}>\n <span>{title}</span>\n <Icon icon={chevronDown} width=\"24\" height=\"24\" style={{ marginLeft: '4px' }} />\n </MenuButton>\n {isOpen &&\n <MenuItemContainer style={{ transform: `translateX(calc(-50% + ${buttonWidth / 2}px))` }}>\n {children}\n </MenuItemContainer>\n }\n </MenuButtonWrapper>\n );\n};\n\nconst MenuItem = Styled.button`\n align-items: center;\n background-color: ${Theme.blue};\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\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: ${lighten(0.1, Theme.blue)};\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: ${Theme.proGray};\n justify-content: space-between;\n }\n`;\n\nconst StyledNekoMenuItem = props => {\n\n const { onClick, children, isPro, requirePro = false, disabled } = props;\n const needsProUser = requirePro && !isPro;\n\n return (\n <MenuItem type=\"button\" className={needsProUser? 'is-pro' : ''} onClick={onClick} disabled={disabled || needsProUser}>\n <span>{children}</span>\n {needsProUser && !isPro && <ProOnly />}\n </MenuItem>\n );\n};\n\n/**\n * The NekoMenuButton works out of the box without specific attributes.\n */\nconst NekoMenuButton = (props) => {\n return (<StyledMenuButton {...props} />);\n}\nconst NekoMenuItem = (props) => {\n return (<StyledNekoMenuItem {...props} />);\n}\n\nNekoMenuButton.propTypes = {\n title: PropTypes.string,\n disabled: PropTypes.bool,\n isPro: PropTypes.bool\n};\n\nNekoMenuButton.defaultProps = {\n title: undefined,\n disabled: false,\n isPro: false\n};\n\nNekoMenuItem.propTypes = {\n onClick: PropTypes.func.isRequired,\n requirePro: PropTypes.bool\n};\n\nNekoMenuItem.defaultProps = {\n onClick: () => {},\n requirePro: false\n};\n\nexport { NekoMenuButton, NekoMenuItem };\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoButton } from '../button/Button';\n\nconst Page = Styled.div`\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`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoPage = props => {\n\n const { className, children, nekoErrors = [], style = {} } = props;\n const [ fatalError, setFatalError ] = useState(false);\n const [ showBody, setShowBody ] = useState(false);\n\n if (nekoErrors && !fatalError) {\n for (let error of nekoErrors) {\n if (error) {\n setFatalError(error);\n break\n }\n }\n }\n\n return (\n <Page className={className || ''} style={style}>\n {fatalError && \n <div className='neko-rest-error'>\n <div className='container'>\n {!showBody &&\n <>\n <h3>The Rest API is disabled or broken 😢</h3>\n <p>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.</p>\n <p><i>Last but not least: check your PHP Error Logs and your Debugging Console.</i></p>\n <p className='neko-debug'>\n <small>\n URL: {fatalError.url}<br />\n CODE: {fatalError.code}<br />\n MESSAGE: {fatalError.message}<br />\n </small>\n </p>\n </>\n }\n {fatalError.body && showBody &&\n <p className='neko-debug'>\n <div dangerouslySetInnerHTML={{ __html: fatalError.body }}></div>\n </p>\n }\n {fatalError.body &&\n <NekoButton color=\"#a94242\" onClick={() => setShowBody(!showBody)}>\n {showBody ? 'Hide' : 'Display'} response from server\n </NekoButton>\n }\n <NekoButton color=\"#a94242\" onClick={() => { window.open('https://meowapps.com/fix-wordpress-rest-api/', '_blank') }}>\n Learn about WordPress Debugging\n </NekoButton>\n </div>\n </div>}\n {children}\n </Page>\n );\n};\n\nconst NekoPage = (props) => {\n return (<StyledNekoPage {...props} />);\n};\n\nNekoPage.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n nekoErrors: PropTypes.bool\n};\n\nNekoPage.defaultProps = {\n className: undefined,\n style: {},\n nekoErrors: false\n};\n\nexport { NekoPage };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nimport Theme from '../common/NekoTheme';\n\nconst NekoH1 = Styled.h1`\n font-family: ${Theme.fontFamily};\n font-weight: normal;\n font-size: ${Theme.fontSizeH1};\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n`;\n\nconst NekoH2 = Styled.h2`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeH2};\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n`;\n\nconst NekoP = Styled.p`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n`;\n\nconst NekoSpan = Styled.span`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 0;\n padding: 0;\n`;\n\nconst NekoLabel = Styled.label`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n line-height: normal;\n margin: 0;\n padding: 0;\n`;\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoTypo = props => {\n const { children, ...rest } = props;\n\n return (\n props.h1 ? <NekoH1 {...rest}>{children}</NekoH1>\n : props.h2 ? <NekoH2 {...rest}>{children}</NekoH2>\n : props.p ? <NekoP {...rest}>{children}</NekoP>\n : props.label ? <NekoLabel {...rest}>{children}</NekoLabel>\n : <NekoSpan {...rest}>{children}</NekoSpan>\n );\n};\n\nconst NekoTypo = (props) => {\n return (<StyledNekoTypo {...props} />);\n}\n\nNekoTypo.propTypes = {\n h1: PropTypes.any,\n h2: PropTypes.any,\n p: PropTypes.any\n};\n\nNekoTypo.defaultProps = {\n h1: undefined,\n h2: undefined,\n p: undefined\n};\n\nexport { NekoTypo };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoTypo } from '../misc/Typography';\nimport NekoBusyOverlay from '../common/NekoBusyOverlay';\n\nconst Block = Styled.div`\n font-size: ${Theme.fontSizeText};\n margin-bottom: 15px;\n\n .nui-block-header {\n display: flex;\n justify-content: space-between;\n }\n\n .nui-block-title {\n color: ${Theme.blue};\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: ${Theme.blue};\n\n .nui-block-title {\n color: ${Theme.white};\n }\n\n .nui-block-content {\n background-color: ${Theme.white};\n }\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoBlock = props => {\n\n const { title, children, className, busy = false, style = {}, action } = props;\n\n return (\n <Block className={'nui-block ' + (className || '')} style={style}>\n <NekoBusyOverlay busy={busy}>\n <div className=\"nui-block-header\">\n <NekoTypo h2 className=\"nui-block-title\">{title}</NekoTypo>\n {!!action && action}\n </div>\n <div className=\"nui-block-content\">\n {children}\n </div>\n </NekoBusyOverlay>\n </Block>\n );\n};\n\nconst NekoBlock = (props) => {\n return (<StyledNekoBlock {...props} />);\n}\n\nNekoBlock.propTypes = {\n title: PropTypes.string,\n className: PropTypes.oneOf(['', 'primary']),\n style: PropTypes.object,\n action: PropTypes.element,\n};\n\nNekoBlock.defaultProps = {\n title: undefined,\n className: '',\n style: {},\n action: undefined,\n};\n\nexport { NekoBlock };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst Container = Styled.div`\n font-size: ${Theme.fontSizeText};\n font-family: ${Theme.fontFamily};\n background-color: ${Theme.white};\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ${Theme.blue};\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`;\n\nconst Bar = Styled.div`\n justify-content: flex-start;\n background-color: ${Theme.lightGray2};\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoContainer = props => {\n\n const { children, header, headerAlign = 'left', footer, footerAlign = 'right', className, style = {} } = props;\n\n return (\n <Container className={className || ''} style={style}>\n {header && <Bar className={`align-${headerAlign}`}>{ header }</Bar>}\n <div className=\"content\">\n { children }\n </div>\n {footer && <Bar className={`align-${footerAlign}`}>{ footer }</Bar>}\n </Container>\n );\n};\n\nconst NekoContainer = (props) => {\n return (<StyledNekoContainer {...props} />);\n}\n\nNekoContainer.propTypes = {\n header: PropTypes.element,\n headerAlign: PropTypes.oneOf(['left', 'right']),\n footer: PropTypes.element,\n footerAlign: PropTypes.oneOf(['left', 'right']),\n className: PropTypes.string,\n style: PropTypes.object\n};\nNekoContainer.defaultProps = {\n header: undefined,\n headerAlign: 'left',\n footer: undefined,\n footerAlign: 'right',\n className: undefined,\n style: {}\n};\n\nexport { NekoContainer };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} title=''\n */\nconst StyledNekoSettings = Styled(props => {\n const { title = '', contentAlign = 'left' } = props;\n return (\n <div className={props.className || ''}>\n {title ? <div className=\"nui-settings-head\">{title}</div> : null}\n <div className={`nui-settings-content nui-settings-content-align-${contentAlign}`}>\n {props.children}\n </div>\n </div>\n );\n})`\n display: flex;\n font-family: ${Theme.fontFamily};\n\n > .nui-settings-head {\n font-family: ${Theme.fontFamily};\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`;\n\nconst NekoSettings = (props) => {\n return (<StyledNekoSettings {...props} />);\n}\n\nNekoSettings.propTypes = {\n title: PropTypes.string,\n className: PropTypes.string,\n contentAlign: PropTypes.string\n};\n\nNekoSettings.defaultProps = {\n title: '',\n className: undefined,\n contentAlign: 'left'\n};\n\nexport { NekoSettings };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst WindowBase = Styled.div`\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`;\n\nconst TitleBar = Styled(props => (\n props.children ? (\n <div className={props.className}>\n {props.children}\n </div>\n ) : null\n))`\n background-color: ${Theme.blue};\n color: white;\n`;\n\nconst StyledNekoWindow = props => (\n <WindowBase className='window'>\n <TitleBar>{props.title}</TitleBar>\n {props.children}\n </WindowBase>\n);\n\nconst NekoWindow = (props) => {\n return (<StyledNekoWindow {...props} />);\n}\n\nNekoWindow.propTypes = {\n title: PropTypes.string\n};\nNekoWindow.defaultProps = {\n title: undefined\n};\n\nexport { NekoWindow };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst Wrapper = Styled.div`\n display: flex;\n flex-wrap: wrap;\n`;\n\nconst Column = Styled.div`\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`;\n\n/**\n * @oaram {string} className\n */\nconst StyledNekoWrapper = props => {\n return (\n <Wrapper>\n { props.children }\n </Wrapper>\n );\n};\n\nconst StyledNekoColumn = props => {\n const { full, minimal, ...rest } = props;\n let className = full ? 'full' : '';\n className += minimal ? ' minimal' : '';\n return (\n <Column className={className} {...rest}>{props.children}</Column>\n );\n};\n\nconst NekoWrapper = (props) => {\n return (<StyledNekoWrapper {...props} />);\n};\n\nconst NekoColumn = (props) => {\n return (<StyledNekoColumn {...props} />);\n};\n\nNekoWrapper.propTypes = {\n};\nNekoWrapper.defaultProps = {\n};\n\nNekoColumn.propTypes = {\n full: PropTypes.any\n};\nNekoColumn.defaultProps = {\n full: undefined\n};\n\nexport { NekoWrapper, NekoColumn };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\n\nimport { Icon } from '@iconify/react';\nimport checkboxBlankOutline from '@iconify/icons-mdi/checkbox-blank-outline';\nimport checkboxMarked from '@iconify/icons-mdi/checkbox-marked';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n */\nconst StyledNekoCheckbox = Styled(props => {\n const { id, name, checked = false, onChange, label, description, isPro, disabled, requirePro = false } = props;\n\n const showUpProOnly = requirePro && !isPro;\n const isDisabled = disabled || showUpProOnly;\n const disabledClass = isDisabled ? 'disabled' : '';\n\n const onClick = () => {\n if (!onChange) {\n console.log(`The onChange handler it not set for this checkbox.`, props);\n return;\n }\n onChange(!checked, id);\n };\n\n return (\n <div className={['nui-checkbox', props.className, disabledClass].join(' ')}>\n <input id={id} name={name} type=\"checkbox\" defaultChecked={false} onClick={onClick} disabled={isDisabled} />\n <label htmlFor={id}>\n <div className=\"nui-checkbox-check-container\">\n <Icon icon={checked ? checkboxMarked : checkboxBlankOutline} width=\"30px\" height=\"30px\" \n color={isDisabled ? Theme.disabledForm : Theme.blue} />\n </div>\n <div className=\"nui-checkbox-inner-container\">\n <span className=\"label\">{label}<ProOnly className=\"inline\" show={showUpProOnly} /></span>\n {description ? <small className=\"description\">{description}</small> : null}\n </div>\n </label>\n </div>\n );\n})`\n font-family: ${Theme.fontFamily};\n\n &.disabled {\n color: ${Theme.disabledForm};\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`;\n\nconst NekoCheckbox = (props) => {\n return (<StyledNekoCheckbox {...props} />);\n};\n\nNekoCheckbox.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n label: PropTypes.string,\n description: PropTypes.string,\n isPro: PropTypes.bool,\n requirePro: PropTypes.bool\n};\n\nNekoCheckbox.defaultProps = {\n id: undefined,\n name: undefined,\n checked: false,\n label: undefined,\n description: undefined,\n isPro: false,\n requirePro: false\n};\n\nexport { NekoCheckbox };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\n/**\n * @param {string} name\n * @param {int} max=-1 Max number of checkboxes to be checked. Negative number means unlimited\n */\nconst StyledNekoCheckboxGroup = Styled(props => {\n const { name, max = -1, isPro = false } = props;\n\n // React.Children.toArray(props.children)\n\n // Modify child components (Checkboxes)\n const children = React.Children.map(props.children, child => {\n if (child.props.name) return child; // Do not modify if the child has its own name\n return React.cloneElement(child, {\n name: name, // Apply the group's name\n isPro\n });\n });\n\n return children;\n})`\n`;\n\nconst NekoCheckboxGroup = (props) => {\n return (<StyledNekoCheckboxGroup {...props} />);\n}\n\nNekoCheckboxGroup.propTypes = {\n name: PropTypes.string,\n mas: PropTypes.number,\n isPro: PropTypes.bool\n};\n\nNekoCheckboxGroup.defaultProps = {\n name: undefined,\n mas: -1,\n isPro: false\n}\n\nexport { NekoCheckboxGroup };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoInput = Styled(props => {\n const { id, name, value = '', description, placeholder = '', onEnter = null,\n readOnly = false, type = 'text', step = 1, min = 1, max = 999, maxLength : defaultMaxLength = undefined,\n className, style, natural = false, inputStyle, onChange: onCustomChange, onBlur: onCustomBlur, ...rest } = props;\n\n const [ newValue, setNewValue ] = useState(value);\n const isControlled = !!onCustomChange;\n const maxLength = defaultMaxLength ? defaultMaxLength : (type === 'number' ? 3 : undefined);\n\n useEffect(() => {\n if (!isControlled) {\n setNewValue(value);\n }\n }, [ value ]);\n\n const onChange = (e) => {\n if (isControlled) { \n onCustomChange(e.target.value, id);\n }\n else {\n setNewValue(e.target.value, id);\n }\n };\n\n const onKeyPress = (e) => {\n if (onEnter && event.key === 'Enter') {\n e.preventDefault();\n onEnter(e.target.value, id);\n }\n };\n\n const onBlur = (e) => {\n if (onCustomBlur && value !== e.target.value) {\n onCustomBlur(e.target.value, id);\n }\n };\n\n const classNames = `neko-input ${natural ? ' natural' : ''}`;\n\n return (\n <div className={[className].join(' ')} style={style}>\n {type === 'number'\n ? <input className={[classNames].join(' ')} id={id} name={name} value={isControlled ? value : newValue} type={type} \n step={step} min={min} max={max} maxLength={maxLength}\n autoComplete=\"off\"\n placeholder={placeholder} style={inputStyle}\n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} {...rest} />\n : <input className={[classNames].join(' ')} {...rest} id={id} name={name} value={isControlled ? value : newValue} type={type} \n spellCheck=\"false\"\n autoComplete=\"off\"\n placeholder={placeholder} style={inputStyle} maxLength={maxLength}\n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} {...rest} />\n }\n {description && <p className=\"neko-input-description\">{description}</p>}\n </div>\n );\n})`\n .neko-input {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border: 2px solid ${Theme.blue};\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: ${Theme.gray};\n }\n }\n\n .neko-input-description {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeSmall};\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n`;\n\nconst NekoInput = (props) => {\n return (<StyledNekoInput {...props} />);\n};\n\nNekoInput.propTypes = {\n id: PropTypes.string,\n type: PropTypes.oneOf(['number', 'text']),\n name: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool,\n step: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n maxLength: PropTypes.number,\n natural: PropTypes.bool\n};\n\nNekoInput.defaultProps = {\n id: undefined,\n type: 'text',\n name: undefined,\n value: '',\n description: undefined,\n placeholder: '',\n onChange: undefined,\n onEnter: undefined,\n onBlur: undefined,\n readOnly: false,\n step: 1,\n min: 1,\n max: 999,\n maxLength: undefined,\n natural: false\n};\n\nexport { NekoInput };\n","import React, { useState, useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoTextArea = Styled(props => {\n const { id, name, value = '', description, placeholder = '', avoidOnEnterWithShift = false, onEnter = null, readOnly = false, \n maxLength = null, className, style, textAreaStyle = {}, countable = false, ...rest } = props;\n\n const [ newValue, setNewValue ] = useState(value);\n const [ count, setCount ] = useState(0);\n const [ pressShift, setPressShift ] = useState(false);\n const isControlled = !!props.onChange;\n\n const keydownFunction = useCallback((e) => {\n setPressShift(e.shiftKey);\n }, []);\n const keyupFunction = useCallback(() => {\n setPressShift(false);\n }, []);\n\n useEffect(() => {\n document.addEventListener(\"keydown\", keydownFunction, false);\n document.addEventListener(\"keyup\", keyupFunction, false);\n\n return () => {\n document.removeEventListener(\"keydown\", keydownFunction, false);\n document.removeEventListener(\"keyup\", keyupFunction, false);\n }\n }, []);\n\n useEffect(() => {\n if (!isControlled) {\n setNewValue(value);\n }\n if (countable) {\n setCount(value.length);\n }\n }, [ value, countable ]);\n\n const onChange = useCallback((e) => {\n const newValue = maxLength ? e.target.value.substr(0, maxLength): e.target.value;\n if (isControlled) { \n props.onChange(newValue, id);\n }\n else {\n setNewValue(newValue, id);\n }\n }, [maxLength]);\n\n const onKeyPress = (e) => {\n if (onEnter && !e.shiftKey && e.key === 'Enter') {\n if (avoidOnEnterWithShift && pressShift) return;\n\n e.preventDefault();\n props.onEnter(e.target.value, id);\n }\n };\n\n const onBlur = (e) => {\n if (props.onBlur && value !== e.target.value) {\n props.onBlur(e.target.value, id);\n }\n };\n\n return (\n <div className={[className].join(' ')} style={style}>\n <div className=\"neko-textarea-container\">\n <textarea className=\"neko-textarea\" rows={6} {...rest} id={id} name={name} spellCheck=\"false\" placeholder={placeholder} \n onChange={onChange} onKeyPress={onKeyPress} onBlur={onBlur} readOnly={readOnly} style={textAreaStyle}\n value={isControlled ? value : newValue} />\n {countable && <p className=\"neko-textarea-count\">{count} / {maxLength} characters</p>}\n </div>\n {description && <p className=\"neko-input-description\">{description}</p>}\n </div>\n );\n})`\n .neko-textarea-container {\n position: relative;\n }\n .neko-textarea {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border: 2px solid ${Theme.blue};\n box-sizing: border-box;\n background: rgb(0 124 186 / 10%);\n padding: 5px 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: ${Theme.gray};\n }\n }\n .neko-textarea-count {\n color: rgba(${Theme.blackRGB}, 0.4);\n font-size: 11px;\n margin: 0;\n position: absolute;\n right: 13px;\n bottom: 10px;\n }\n\n .neko-input-description {\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeSmall};\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n`;\n\nconst NekoTextArea = (props) => {\n return (<StyledNekoTextArea {...props} />);\n};\n\nNekoTextArea.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.string,\n description: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n onEnter: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool,\n avoidOnEnterWithShift: PropTypes.bool\n};\n\nNekoTextArea.defaultProps = {\n id: undefined,\n name: undefined,\n value: '',\n description: undefined,\n placeholder: '',\n onChange: undefined,\n onEnter: undefined,\n onBlur: undefined,\n readOnly: false,\n avoidOnEnterWithShift: false\n};\n\nexport { NekoTextArea };\n","import React, { useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nimport { useComponentSize } from '../hooks';\nimport Theme from '../common/NekoTheme';\n\nconst TooltipContainer = Styled.div`\n\tdisplay: flex;\n`;\n\nconst Tooltip = Styled.div`\n\tbackground-color: rgba(${Theme.blackRGB}, 0.8);\n\tborder-radius: 4px;\n\tcolor: ${Theme.white};\n\tfont-family: ${Theme.fontFamily};\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ${Theme.fontSizeText};\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tword-break: break-word;\n\tdisplay: ${prop => prop.visible ? 'inline-block' : 'none'};\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(${Theme.blackRGB}, 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(${Theme.blackRGB}, 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(${Theme.blackRGB}, 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(${Theme.blackRGB}, 0.8);\n\t\t}\n\t}\n\n\t${prop => prop.style}\n`;\n\n/**\n * @param {string} (variant) Tag Name\n */\nconst StyledNekoTooltip = props => {\n\tconst { text = 'Hello world!', position = 'top' } = props;\n\tconst [ show, setShow ] = useState(false);\n\tconst { ref: tooltipRef, width: tooltipWidth, height: tooltipHeight } = useComponentSize();\n\tconst { ref: childRef, width: childWidth, height: childHeight } = useComponentSize();\n\n\tconst transformStyle = useMemo(() => {\n\t\tconst pointerSize = 5;\n\t\tlet transY = 0;\n\t\tlet transX = 0;\n\n\t\tif (position === 'top') {\n\t\t\ttransY = -1 * tooltipHeight - pointerSize;\n\t\t\ttransX = -1 * (tooltipWidth / 2) + (childWidth / 2);\n\t\t}\n\t\telse if (position === 'bottom') {\n\t\t\ttransY = childHeight + pointerSize;\n\t\t\ttransX = -1 * (tooltipWidth / 2) + (childWidth / 2);\n\t\t}\n\t\telse if (position === 'left') {\n\t\t\tconst diff = tooltipHeight - childHeight;\n\t\t\ttransY = -1 * (diff / 2);\n\t\t\ttransX = -1 * tooltipWidth - pointerSize;\n\t\t}\n\t\telse if (position === 'right') {\n\t\t\tconst diff = tooltipHeight - childHeight;\n\t\t\ttransY = -1 * (diff / 2);\n\t\t\ttransX = childWidth + pointerSize;\n\t\t}\n\t\t\n\t\treturn { \n\t\t\ttransform: `translateX(${transX}px) translateY(${transY}px)`\n\t\t};\n\n\t}, [position, tooltipWidth, tooltipHeight, childWidth, childHeight])\n\n\treturn (\n\t\t<TooltipContainer>\n\t\t\t<Tooltip ref={tooltipRef} visible={show} className={position} style={transformStyle}>\n\t\t\t\t{text}\n\t\t\t</Tooltip>\n\t\t\t<div ref={childRef} onMouseEnter={() => text && setShow(true)} onMouseLeave={() => setShow(false)}>\n\t\t\t\t{props.children}\n\t\t\t</div>\n\t\t</TooltipContainer>\n\t);\n};\n\nconst NekoTooltip = (props) => {\n return (<StyledNekoTooltip {...props} />);\n}\n\nNekoTooltip.propTypes = {\n\ttext: PropTypes.string,\n\tposition: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])\n};\n\nNekoTooltip.defaultProps = {\n\ttext: 'Hello world!',\n\tposition: 'top'\n};\n\nexport { NekoTooltip };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport { Icon, IconifyIcon } from '@iconify/react';\n\nimport PresetIcons from '../common/PresetIcons';\nimport { NekoTooltip } from './Tooltip';\n\nconst StyledIconContainer = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst hoverColor = (color, hoverColor) => {\n if (hoverColor) {\n return `\n &:hover {\n path {\n fill: ${hoverColor};\n }\n }\n `;\n }\n if (color) {\n return `\n &:hover {\n path {\n fill: ${lighten(0.1, color)};\n }\n }\n `;\n }\n};\n\nconst StyledIcon = Styled(Icon)`\n\n path {\n fill: ${props => props.color};\n }\n\n ${props => hoverColor(props.color, props.hoverColor)}\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\n &.disabled {\n pointer-events: none;\n opacity: 0.35;\n cursor: default;\n }\n`;\n\nconst StyledNekoIcon = props => {\n\n let { icon, spinning = false, className = '', title, tooltip, containerStyle, color, hoverColor, disabled = false, raw, ...rest } = props;\n\n if (!rest.width && !rest.height) {\n rest.width = rest.height = 30;\n }\n\n const getIcon = () => {\n if (typeof icon === 'string') {\n return PresetIcons[icon] || null;\n }\n return icon;\n };\n\n const iconClassName = `nui-icon ${className}${rest.onClick ? ' nui-clickable' : ''}${spinning ? ' spin' : ''}${disabled ? ' disabled' : ''}`;\n\n if (tooltip) {\n return (\n <NekoTooltip text={tooltip.text} position={tooltip.position || 'top'}>\n <StyledIconContainer style={containerStyle}>\n <StyledIcon icon={getIcon()} className={iconClassName} color={color} hoverColor={hoverColor} {...rest}/>\n </StyledIconContainer>\n </NekoTooltip>\n );\n }\n\n if (raw) {\n return <StyledIcon icon={getIcon()} className={iconClassName} color={color} hoverColor={hoverColor} {...rest} />\n }\n\n return (\n <StyledIconContainer style={containerStyle} title={title}>\n <StyledIcon icon={getIcon()} className={iconClassName} color={color} hoverColor={hoverColor} {...rest} />\n {!tooltip ? null : <NekoTooltip>{tooltip}</NekoTooltip>}\n </StyledIconContainer>\n );\n};\n\nconst NekoIcon = (props) => {\n return (<StyledNekoIcon {...props} />);\n};\n\nNekoIcon.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.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'])]),\n color: PropTypes.string,\n spinning: PropTypes.bool,\n className: PropTypes.string,\n tooltip: PropTypes.string,\n raw: PropTypes.bool,\n};\n\nNekoIcon.defaultProps = {\n icon: undefined,\n color: undefined,\n spinning: false,\n className: '',\n tooltip: undefined,\n raw: undefined,\n};\n\nexport { NekoIcon };\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { useOutsideClick } from '../hooks';\n\nimport { Icon } from '@iconify/react';\nimport checkboxBlankCircleOutline from '@iconify/icons-mdi/checkbox-blank-circle-outline';\nimport recordCircle from '@iconify/icons-mdi/record-circle';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport { NekoIcon } from '../misc/Icon';\n\nconst Select = Styled.div`\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ${Theme.blue};\n border-radius: 8px 8px 0 0;\n }\n\n &[data-is-disabled=true] {\n cursor: none;\n pointer-events: none;\n }\n`;\n\nconst SelectedOption = Styled.div`\n align-items: center;\n background-color: ${Theme.white};\n border: 2px solid ${Theme.blue};\n border-radius: 8px;\n display: flex;\n font-family: ${Theme.fontFamily};\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`;\n\nconst Description = Styled.div`\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`;\n\nconst Options = Styled.div`\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`;\n\nconst OptionsContainer = Styled.div`\n background-color: ${Theme.white};\n`;\n\n/**\n * @param {string} name\n */\nconst StyledNekoSelect = props => {\n const { id, name, value, scrolldown = false, isPro = false, onChange, className, disabled, ...rest } = props;\n\n const currentOption = React.Children.toArray(props.children)\n .find(child => child.props.value === value || child.props.checked)?.props;\n\n const label = currentOption?.label || 'Select';\n const description = currentOption?.description || props.description;\n const requirePro = currentOption?.requirePro || false;\n const icon = currentOption?.icon;\n //const id = scrolldown ? props.id : currentOption?.id;\n\n const [ showOptions, toggleOptions ] = useState(false);\n const componentRef = scrolldown ? useOutsideClick(() => { toggleOptions(false) }) : null;\n const showUpProOnly = requirePro && !isPro;\n\n const onOptionClick = (newValue) => {\n if (newValue !== value) {\n if (!onChange) {\n console.log(`The onChange handler it not set for this checkbox.`, props);\n return;\n }\n onChange(newValue, id);\n }\n if (scrolldown) {\n toggleOptions(false);\n }\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n name: child.props.name || name,\n checked: child.props.value === value || child.props.checked,\n onClick: onOptionClick,\n scrolldown,\n isPro,\n disabled\n });\n });\n\n return scrolldown\n ? <Select id={id} ref={componentRef} {...rest}\n onClick={() => toggleOptions(!showOptions)}\n className={[ 'nui-select', className, showOptions ? 'show-options' : '']}\n childrenLength={children.length} data-is-disabled={disabled}\n >\n <SelectedOption>\n {icon && <NekoIcon icon={icon} width={20} height={20} style={{ marginRight: '9px' }} />}\n {label}\n <div className=\"rightContent\">\n {showUpProOnly && <ProOnly />}\n {!disabled && <Icon icon={showOptions ? chevronUp : chevronDown} width=\"24\" />}\n </div>\n </SelectedOption>\n {description && <Description>{description}</Description>}\n \n {showOptions &&\n <Options className={`nui-option ${showOptions ? '' : 'hidden'}`}>\n <OptionsContainer>{[children]}</OptionsContainer>\n </Options>\n }\n </Select>\n : children;\n};\n\nconst RadioOption = Styled.div`\n font-family: ${Theme.fontFamily};\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: ${Theme.disabledForm};\n\n label {\n cursor: default;\n }\n }\n`;\n\nconst SelectOption = Styled.div`\n background-color: ${Theme.blue};\n cursor: pointer;\n font-family: ${Theme.fontFamily};\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ${Theme.white};\n display: flex;\n justify-content: space-between;\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n padding: 8px 12px;\n\n .option-group {\n align-items: center;\n display: flex;\n }\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`;\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n * @param {function} onClick\n */\nconst StyledNekoOption = props => {\n const { id, name, value, checked, icon, label, description, onClick, scrolldown, isPro = false, requirePro = false, disabled } = props;\n\n const showUpProOnly = requirePro && !isPro;\n const disabledClass = showUpProOnly || disabled ? 'disabled' : '';\n\n const radioOption = (\n <RadioOption className={`nui-select ${props.className || ''} ${disabledClass}`}>\n <input id={id} name={name} type=\"radio\" value={value} defaultChecked={checked} onClick={(e) => onClick(e.target.value)} disabled={showUpProOnly || disabled} />\n <label htmlFor={id}>\n <Icon icon={checked ? recordCircle : checkboxBlankCircleOutline} width=\"24px\" color={showUpProOnly ? Theme.disabledForm : Theme.blue}/>\n <div className=\"inner-container\">\n <span className=\"label\">{label}<ProOnly className=\"inline\" style={{ top: -1 }} show={showUpProOnly} /></span>\n {description ? <small className=\"description\">{description}</small> : null}\n </div>\n </label>\n </RadioOption>\n );\n\n const selectOption = (\n <SelectOption className={`nui-select ${props.className || ''} ${disabledClass}`}>\n <input id={id} name={name} type=\"radio\" value={value} defaultChecked={checked} disabled={showUpProOnly || disabled} />\n <div className=\"option\" onClick={() => onClick(value)}>\n <div className=\"option-group\">\n {icon && <NekoIcon icon={icon} width={20} height={20} style={{ marginRight: '9px' }} />}\n {label}\n </div>\n <ProOnly show={showUpProOnly} />\n </div>\n </SelectOption>\n );\n\n return scrolldown ? selectOption : radioOption;\n};\n\n/**\n * The NekoSelect has 2 types, radio (default) or select.\n */\nconst NekoSelect = (props) => {\n return (<StyledNekoSelect {...props} />);\n}\n\nNekoSelect.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n description: PropTypes.string,\n scrolldown: PropTypes.bool,\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoSelect.propTypes = {\n id: undefined,\n name: undefined,\n description: undefined,\n scrolldown: false,\n isPro: false,\n onChange: undefined\n};\n\nconst NekoOption = (props) => {\n return (<StyledNekoOption {...props} />);\n}\n\nNekoOption.propTypes = {\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.string,\n checked: PropTypes.bool,\n label: PropTypes.string,\n description: PropTypes.string,\n onClick: PropTypes.func,\n scrolldown: PropTypes.bool,\n isPro: PropTypes.bool,\n requirePro: PropTypes.bool,\n icon: PropTypes.string\n};\n\nNekoOption.defaultProps = {\n id: undefined,\n name: undefined,\n value: undefined,\n checked: false,\n label: undefined,\n description: undefined,\n onClick: undefined,\n scrolldown: false,\n isPro: false,\n requirePro: false,\n icon: undefined\n};\n\nexport { NekoSelect, NekoOption };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\nconst Form = Styled.div`\n label {\n display: block;\n margin-bottom: 3px;\n }\n\n .neko-input, .neko-textarea {\n margin-bottom: 5px;\n }\n`;\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {string} value\n * @param {string} description\n * @param {string} placeholder\n */\nconst StyledNekoForm = (props) => {\n return (\n <Form>\n {props.children || null}\n </Form>\n );\n};\n\nconst NekoForm = (props) => {\n return (<StyledNekoForm {...props} />);\n};\n\nNekoForm.propTypes = {\n};\n\nNekoForm.defaultProps = {\n};\n\nexport { NekoForm };\n","import React, { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {string} id\n * @param {string} name\n * @param {bool} checked\n * @param {string} label\n * @param {string} description\n */\nconst StyledNekoSwitch = Styled(props => {\n const { width = '100%', height = '20px', fontSize = '12px', onValue, offValue, checked = false,\n onBackgroundColor, offBackgroundColor, onLabel, offLabel, onChange, disabled, ...rest } = props;\n\n const onToggle = useCallback((v) => {\n onChange(v.target.checked ? onValue : offValue);\n }, [onChange, onValue, offValue]);\n\n return (\n <label {...rest} data-is-disabled={disabled ? 'disabled' : ''}>\n <input type=\"checkbox\" onChange={onToggle} checked={checked} disabled={disabled} />\n <span className=\"nui-switch-slider\"></span>\n </label>\n );\n})`\n color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-size: ${props => props.fontSize};\n position: relative;\n display: inline-block;\n width: ${props => props.width};\n height: ${props => props.height};\n\n &[data-is-disabled=disabled] {\n opacity: 0.4;\n\n .nui-switch-slider {\n cursor: auto;\n }\n }\n\n input {\n opacity: 0;\n width: 0;\n height: 0;\n border: 0;\n }\n\n .nui-switch-slider {\n background-color: ${props => props.offBackgroundColor};\n border-radius: ${props => props.height};\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n transition: .4s;\n }\n\n .nui-switch-slider:before {\n border-radius: 50%;\n position: absolute;\n content: \"\";\n height: ${props => `calc(${props.height} - 8px)`};\n width: ${props => `calc(${props.height} - 8px)`};\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: .3s;\n }\n\n .nui-switch-slider:after {\n content: \"${props => props.offLabel}\";\n margin-left: auto;\n margin-right: ${props => `calc(${props.height} / 2)`};\n }\n\n input:checked + .nui-switch-slider {\n background-color: ${props => props.onBackgroundColor};\n }\n\n input:checked + .nui-switch-slider:before {\n transform: translateX(${props => `calc(${props.width} - ${props.height})` });\n }\n\n input:checked + .nui-switch-slider:after {\n content: \"${props => props.onLabel}\";\n margin-left: ${props => `calc(${props.height} / 2)`};\n margin-right: auto;\n }\n`;\n\nconst NekoSwitch = (props) => {\n return (<StyledNekoSwitch {...props} />);\n};\n\nNekoSwitch.propTypes = {\n width: PropTypes.string,\n height: PropTypes.string,\n fontSize : PropTypes.string,\n onValue: PropTypes.string,\n offValue: PropTypes.string,\n checked: PropTypes.bool,\n onBackgroundColor: PropTypes.string,\n offBackgroundColor: PropTypes.string,\n onLabel: PropTypes.string,\n offLabel: PropTypes.string\n};\n\nNekoSwitch.defaultProps = {\n width: '100%',\n height: '20px',\n fontSize: '12px',\n checked: false\n};\n\nexport { NekoSwitch };\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\nimport { Icon, InlineIcon, IconifyIcon } from '@iconify/react';\nimport folderIcon from '@iconify/icons-mdi/folder';\nimport folderOpen from '@iconify/icons-mdi/folder-open';\nimport imageMultipleOutline from '@iconify/icons-mdi/image-multiple-outline';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport tagIcon from '@iconify/icons-mdi/tag';\n\nconst StyledNekoFinder = props => {\n\n const { chevron = true } = props;\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n chevron\n });\n });\n\n return (\n children\n );\n};\n\nconst FinderTitleContainer = Styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin-bottom: 5px;\n font-family: Lato;\n`;\n\nconst FinderTitle = Styled.div`\n align-items: center;\n display: flex;\n\n &.can-expand {\n cursor: pointer;\n }\n\n &.selected {\n color: #956DBE;\n }\n\n span {\n font-weight: normal;\n font-size: 13px;\n margin: 0 0 0 8px;\n }\n`;\n\nconst ChevronSpace = Styled.div`\n height: 24px;\n width: 24px;\n`;\n\nconst FinderTitleIconDropZone = Styled.div`\n position: relative;\n width: 24px;\n height: 24px;\n`;\n\nconst FinderTitleIconDroppableArea = Styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n`;\n\nconst ItemContainer = Styled.div`\n border-left: 1px solid ${Colors.finderBorder};\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`;\n\nconst StyledNekoFinderItem = props => {\n\n const defaultIcons = {\n gallery: imageMultipleOutline,\n tag: tagIcon\n }\n\n const { title, chevron, rightElement = null, rightElementStyle = { marginLeft: '5px' }, showRightElement = false, selected = false,\n draggable = false, onDragStart, onDragOver, onDragEnd, onDrop, isExpanded = false, dragging = false, rightAction = null,\n rightActionOnHover = null, onDragLeave, preventClose = false } = props;\n const isCustomizedIcon = !!props.icon;\n const hasChild = !!props.children;\n const [ expanded, setExpanded ] = useState(isExpanded);\n const [ icon, setIcon ] = useState(() => {\n if (typeof props.icon === 'string' && Object.keys(defaultIcons).includes(props.icon)) {\n return defaultIcons[props.icon];\n } else if (props.icon) {\n return props.icon;\n }\n return folderIcon\n });\n const isFolder = Boolean(icon);\n const [ showRightAction, setShowRightAction ] = useState(false);\n\n useEffect(() => {\n setExpanded(isExpanded);\n if (!isCustomizedIcon) {\n setIcon(isExpanded ? folderIcon : folderOpen);\n }\n }, [isExpanded]);\n\n const onClick = () => {\n if (props.onClick) {\n props.onClick();\n }\n }\n\n const onChevronClick = (e) => {\n e.stopPropagation();\n setExpanded(!expanded);\n }\n\n const children = React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n chevron\n });\n });\n\n const iconColor = dragging || selected ? Colors.purple : (selected ? Colors.black : Colors.blue);\n\n return (\n <div>\n <FinderTitleContainer onMouseEnter={() => setShowRightAction(true)} onMouseLeave={() => setShowRightAction(false)}>\n <FinderTitle onClick={onClick} onMouseEnter={props.onMouseEnter} onMouseLeave={props.onMouseLeave} draggable={draggable} onDragStart={onDragStart} onDragOver={onDragOver} onDrop={onDrop} className={`${isFolder || children || props.onClick ? 'can-expand' : ''} ${selected ? 'selected' : ''}`} onDragLeave={onDragLeave} onDragEnd={onDragEnd}>\n {chevron\n ? (isFolder && hasChild)\n ? <Icon icon={expanded ? chevronDown : chevronRight} width=\"24\" height=\"24\" onClick={onChevronClick} />\n : <ChevronSpace></ChevronSpace>\n : null\n }\n <FinderTitleIconDropZone>\n <FinderTitleIconDroppableArea />\n <Icon icon={icon} color={iconColor} width=\"24\" height=\"24\" />\n </FinderTitleIconDropZone>\n <span>{title}</span>\n {showRightElement &&\n <div style={rightElementStyle}>{rightElement}</div>\n }\n </FinderTitle>\n {showRightAction ? (rightActionOnHover || rightAction) : rightAction}\n </FinderTitleContainer>\n {expanded && <ItemContainer className={`${isFolder ? '' : 'no-line'} ${chevron ? '' : 'no-chevron'}`}>{children}</ItemContainer>}\n </div>\n )\n}\n\nconst NekoFinder = (props) => {\n return (<StyledNekoFinder {...props} />);\n}\n\nNekoFinder.propTypes = {\n chevron: PropTypes.bool\n};\n\nNekoFinder.defaultProps = {\n chevron: true\n};\n\nconst NekoFinderItem = (props) => {\n return (<StyledNekoFinderItem {...props} />);\n}\n\nNekoFinderItem.propTypes = {\n icon: PropTypes.oneOfType([PropTypes.instanceOf(IconifyIcon), PropTypes.oneOf(['gallery'])]),\n title: PropTypes.string,\n isExpanded: PropTypes.bool\n};\n\nNekoFinderItem.defaultProps = {\n icon: folderIcon,\n title: undefined,\n isExpanded: false\n};\n\nexport { NekoFinder, NekoFinderItem };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst Logo = Styled.div`\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`;\n\nconst StyledNekoLogo = () => {\n return (\n <Logo>\n <svg width=\"54\" height=\"38\" viewBox=\"0 0 54 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n <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\"/>\n </svg>\n </Logo>\n );\n}\n\nconst NekoLogo = (props) => {\n return (<StyledNekoLogo {...props} />);\n}\n\nNekoLogo.propTypes = {\n};\n\nNekoLogo.defaultProps = {\n};\n\nexport { NekoLogo };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { lighten } from 'polished';\nimport { Icon, InlineIcon } from '@iconify/react';\nimport pauseIcon from '@iconify/icons-mdi/pause';\nimport stopIcon from '@iconify/icons-mdi/stop';\nimport playIcon from '@iconify/icons-mdi/play';\n\nimport Theme from '../common/NekoTheme';\n\n/**\n * @param {number} value Current progress\n * @param {number} max Max progress\n */\nconst StyledNekoProgress = Styled(props => {\n let { value = 0, max = 100, busy = false, status } = props;\n value = Math.min(value, max);\n let ratio = parseFloat(value) / parseFloat(max);\n\n return (\n <div className={props.className}>\n <ProgressCurrent ratio={ratio} busy={props.busy} status={status} />\n <div className=\"nui-progress-buttons\">\n {busy && props.onPauseClick && \n <div className='nui-progress-button pause' onClick={props.onPauseClick}>\n {props.paused ? <InlineIcon icon={playIcon} /> : <InlineIcon icon={pauseIcon} />}\n </div>\n }\n {busy && props.onStopClick && \n <div className='nui-progress-button stop' onClick={props.onStopClick}>\n <InlineIcon icon={stopIcon} />\n </div>\n }\n </div>\n </div>\n );\n})`\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: ${Theme.blue};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.blue)};\n }\n\n &.stop {\n background: ${Theme.red};\n\n &:hover {\n background-color: ${lighten(0.1, Theme.red)};\n }\n }\n }\n }\n`;\n\n/**\n * @param {float} ratio Progress ratio (0.0 to 1.0)\n */\nconst ProgressCurrent = Styled(props => {\n const percent = !isNaN(props.ratio) ? parseInt(Math.round(props.ratio * 100)) : 0;\n const typeOfStatus = typeof props.status;\n let status = typeOfStatus !== 'undefined'\n ? (typeOfStatus === 'string') ? props.status : props.status(percent)\n : `${percent}%`;\n\n return (\n <div className={props.className} style={{ minWidth: 28, minWidth: percent + '%' }}>\n <div>{status}</div>\n </div>\n );\n})`\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ${Theme.progress};\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ${Theme.fontFamily};\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: ${props => props.busy ? 'animate-stripes 1.6s linear infinite' : 'none'};\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n`;\n\nconst NekoProgress = (props) => {\n return (<StyledNekoProgress {...props} />);\n}\n\nNekoProgress.propTypes = {\n value: PropTypes.number,\n max: PropTypes.number,\n busy: PropTypes.bool,\n paused: PropTypes.bool,\n onPauseClick: PropTypes.func,\n onStopClick: PropTypes.func,\n status: PropTypes.oneOf([PropTypes.string, PropTypes.func])\n};\n\nNekoProgress.defaultProps = {\n value: 0,\n max: 100,\n busy: false,\n paused: false,\n onPauseClick: undefined,\n onStopClick: undefined,\n status: undefined\n};\n\nexport { NekoProgress };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoLogo } from './Logo';\nimport { NekoIcon } from './Icon';\nimport Theme from '../common/NekoTheme';\nimport contentSave from '@iconify/icons-mdi/content-save';\n\nconst HeaderBase = Styled.div`\n position: relative;\n color: white;\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n display: flex;\n height: 61px;\n overflow: hidden;\n align-items: center;\n padding: 15px 20px;\n background-color: ${Theme.header};\n display: flex;\n\n .nui-header-logo-container {\n width: 102px;\n height: 102px;\n padding: 20px;\n margin-right: 25px;\n background: rgba(${Theme.blackRGB}, 0.1);\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(-29.83deg);\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: ${Theme.fontFamily};\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ${Theme.fontFamily};\n line-height: normal;\n font-size: ${Theme.fontSizeText};\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n`;\n\nconst StyledNekoHeader = props => {\n\n const { title = 'NekoUI', subtitle = 'By Jordy Meow', children, saving = false } = props;\n\n return (\n <HeaderBase>\n <div className='nui-header-logo-container'>\n <NekoLogo />\n </div>\n <div className=\"nui-header-title-container\">\n <h1 className=\"nui-header-title\">{title}</h1>\n <small className=\"nui-header-subtitle\"><a target='_blank' href='https://meowapps.com' \n style={{ color: 'white', textDecoration: 'none' }}>{subtitle}</a></small>\n </div>\n <div className=\"nui-header-extra-content\">{children}</div>\n {saving && <NekoIcon icon={contentSave} width=\"36\" height=\"36\" />}\n </HeaderBase>\n );\n};\n\nconst NekoHeader = (props) => {\n return (<StyledNekoHeader {...props} />);\n}\n\nNekoHeader.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n saving: PropTypes.bool\n};\n\nNekoHeader.defaultProps = {\n title: 'NekoUI',\n subtitle: 'By Jordy Meow',\n saving: false\n};\n\nexport { NekoHeader };\n","import React, { useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { Icon } from '@iconify/react';\nimport chevronDoubleLeft from '@iconify/icons-mdi/chevron-double-left';\nimport chevronLeft from '@iconify/icons-mdi/chevron-left';\nimport chevronDoubleRight from '@iconify/icons-mdi/chevron-double-right';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\nimport Theme from '../common/NekoTheme';\n\nconst PagingContainer = Styled.div`\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ${Theme.fontFamily};\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(${Theme.blueRGB}, 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: ${Theme.white};\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: ${Theme.darkGray};\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: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n\n span.neko-paging-current-page {\n cursor: pointer;\n text-decoration: underline;\n }\n input.neko-paging-current-page {\n width: 1.5rem;\n }\n }\n\n &.neko-paging-full {\n flex-grow: 1;\n\n .neko-paging-controller {\n flex-grow: 1;\n }\n .nako-paging-controller-text {\n margin: 0 auto;\n }\n }\n`;\n\n/**\n * @param {number} currentPage Current page\n * @param {number} limit Items per page\n */\nconst StyledNekoPaging = props => {\n const { currentPage, limit, onClick, total, onCurrentPageChanged, full } = props;\n const isEditable = !!onCurrentPageChanged;\n const maxPage = Math.ceil(total === 0 ? 1 : (limit > 0 ? (total / limit) : 1));\n const prevIconClassName = `nako-paging-controller-icon ${currentPage === 1 ? 'disabled' : ''}`;\n const nextIconClassName = `nako-paging-controller-icon ${currentPage === maxPage ? 'disabled' : ''}`;\n const [ showCurrentPageInput, setShowCurrentPageInput ] = useState(false);\n const fullClassName = full ? 'neko-paging-full' : '';\n\n const onClickHandle = (page) => {\n setShowCurrentPageInput(false);\n onClick(page);\n };\n\n const getValidPage = (page) => {\n const numberPage = Number(page);\n return numberPage > maxPage ? maxPage : (numberPage < 1 ? 1 : numberPage);\n }\n\n const onBlur = (e) => {\n const page = e.target.value;\n\n if (!isNaN(page)) {\n onCurrentPageChanged(getValidPage(page));\n }\n setShowCurrentPageInput(false);\n }\n\n const onKeyPress = (e) => {\n if (event.key === 'Enter') {\n e.preventDefault();\n const page = e.target.value;\n if (!isNaN(page)) {\n onCurrentPageChanged(getValidPage(page));\n }\n setShowCurrentPageInput(false);\n }\n };\n\n const currentPageJsx = useMemo(() => {\n if (!showCurrentPageInput) {\n const onClick = () => {\n if (!isEditable) {\n return;\n }\n setShowCurrentPageInput(true);\n }\n return <span className={isEditable ? 'neko-paging-current-page' : ''} onClick={onClick}>{currentPage}</span>;\n }\n return <input autoFocus type=\"text\" className={isEditable ? 'neko-paging-current-page' : ''} \n defaultValue={currentPage} onBlur={onBlur} onKeyPress={onKeyPress} />;\n }, [currentPage, showCurrentPageInput, onCurrentPageChanged]);\n\n const onControllerClick = (e) => {\n if (!showCurrentPageInput || e.target !== e.currentTarget) return;\n\n setShowCurrentPageInput(false);\n }\n\n return (\n <PagingContainer className={fullClassName}>\n\n <span className=\"neko-paging-text\">{total} result{total > 0 ? 's' : ''}</span>\n\n <div className=\"neko-paging-controller\" onClick={onControllerClick}>\n <Icon icon={chevronDoubleLeft}\n className={prevIconClassName}\n onClick={() => onClickHandle(1)}\n />\n <Icon icon={chevronLeft}\n className={prevIconClassName}\n onClick={() => onClickHandle(currentPage - 1)}\n />\n <p className=\"nako-paging-controller-text\" onClick={onControllerClick}>\n Page {currentPageJsx} of {maxPage}\n </p>\n <Icon icon={chevronRight}\n className={nextIconClassName}\n onClick={() => onClickHandle(currentPage + 1)}\n />\n <Icon icon={chevronDoubleRight}\n className={nextIconClassName}\n onClick={() => onClickHandle(maxPage)}\n />\n </div>\n </PagingContainer>\n );\n};\n\nconst NekoPaging = (props) => {\n return (<StyledNekoPaging {...props} />);\n};\n\nNekoPaging.propTypes = {\n currentPage: PropTypes.number,\n limit: PropTypes.number,\n total: PropTypes.number,\n onClick: PropTypes.func\n};\n\nNekoPaging.defaultProps = {\n currentPage: undefined,\n limit: undefined,\n total: undefined,\n onClick: undefined\n};\n\nexport { NekoPaging };\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoIcon } from '../misc/Icon';\n\nconst LinkContainer = Styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Link = Styled.span`\n color: ${props => props.variant || Theme.blue};\n cursor: pointer;\n font-family: ${Theme.fontFamily};\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: ${Theme.black};\n font-weight: bold;\n }\n\n &::after {\n content: \"|\";\n color: ${Theme.darkGray};\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ${Theme.darkGray};\n font-weight: normal;\n margin-left: 4px;\n }\n`;\n\nconst StyledNekoQuickLinks = props => {\n const { id, value, onChange, busy = false, className } = props;\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n busy: busy,\n isActive: child.props.value === value,\n onClick: (newValue) => {\n if (newValue !== value) {\n onChange(newValue, id);\n }\n }\n });\n });\n\n return (\n <LinkContainer className={className}>{children}</LinkContainer>\n );\n};\n\nconst StyledNekoLink = props => {\n\n const { title, value = 0, count, onClick, busy, isActive, className, variant } = props;\n\n const variantValue = useMemo(() => {\n if (!variant) return undefined\n return Object.keys(Theme).includes(variant) ? Theme[variant] : variant\n }, [variant])\n\n return (\n <Link onClick={() => onClick(value)} className={`${isActive ? 'is-active' : ''} ${className}`} variant={variantValue}>\n {title}\n {count === null ? null :\n <span>(\n {busy ? \n <NekoIcon icon=\"replay\" spinning={true} width={12} containerStyle={{ display: 'inline' }} /> : \n count\n })\n </span>\n }\n </Link>\n );\n};\n\nconst NekoQuickLinks = (props) => {\n return (<StyledNekoQuickLinks {...props} />);\n};\n\nNekoQuickLinks.propTypes = {\n id: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func\n};\n\nNekoQuickLinks.defaultProps = {\n id: undefined,\n value: undefined,\n onChange: undefined\n};\n\nconst NekoLink = (props) => {\n return (<StyledNekoLink {...props} />);\n};\n\nNekoLink.propTypes = {\n title: PropTypes.string,\n value: PropTypes.string,\n count: PropTypes.number,\n onClick: PropTypes.func,\n isActive: PropTypes.bool,\n variant: PropTypes.string,\n};\n\nNekoLink.defaultProps = {\n title: undefined,\n value: 'default',\n count: 0,\n onClick: undefined,\n isActive: false,\n variant: undefined,\n};\n\nexport { NekoQuickLinks, NekoLink };\n","import React, { useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\n\nconst StyledSection = Styled.section`\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ${props => props.width}px;\n height: ${props => props.width / 2}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: ${props => props.backgroundColor};\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: ${props => props.width}px;\n height: ${props => props.width}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: ${props => props.width + 2}px;\n height: ${props => props.width / 2 + 2}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: ${props => props.width}px;\n height: ${props => props.width / 2}px;\n \n .semi-circle--mask {\n transform: rotate(${props => props.degrees}deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ${props => props.width + 2}px;\n height: ${props => props.width / 2}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`;\n\nconst NekoGauge = ({ value = 1000, min = 0, max = 2500, width = 200, background = '#007cba', children }) => {\n const degrees = 180 * (value <= max ? value : max) / max;\n return (\n <StyledSection backgroundColor={background} degrees={degrees} width={width}>\n <div class=\"gauge\">\n <div class=\"mask\">\n <div class=\"semi-circle\"></div>\n <div class=\"semi-circle--mask\"></div>\n </div>\n <div class=\"child-container\">\n <div class=\"child\">\n <div class=\"spacing\" />\n {children}\n </div>\n </div>\n </div>\n </StyledSection>\n )\n};\n\nNekoGauge.propTypes = {\n value : PropTypes.number,\n min : PropTypes.number,\n max : PropTypes.number,\n width : PropTypes.number,\n background : PropTypes.string,\n};\n\nNekoGauge.defaultProps = {\n value : 1000,\n min : 0,\n max : 2500,\n width : 200,\n background : '#007cba',\n};\n\nexport { NekoGauge };\n","import Styled from 'styled-components';\n\nconst NekoMessageDanger = Styled.p`\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`;\n\nconst NekoMessageSuccess = Styled.p`\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`;\n\nexport { NekoMessageDanger, NekoMessageSuccess };","import React, { useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoIcon, postFetch } from '../../index';\n\nconst StyledUpload = Styled.div`\n box-sizing: border-box;\n background: #C4C4C4;\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 &[data-is-disabled=true] {\n svg {\n opacity: 0.7;\n }\n }\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n max-width: 100%;\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n`;\n\nconst NekoUpload = (props) => {\n\n const { multiple, width = '100%', height = '100%', iconSize = 48, iconColor = '#A9A9A9', onSuccess = () => {}, \n onFailure = () => {}, style = {}, apiUrl, apiConfig, onClick, disabled, ...rest } = props;\n const [ inDropZone, setInDropZone ] = useState(false);\n const [ inputId, setInputId ] = useState(Math.floor(Math.random() * 100000000));\n const inputEl = useRef(null);\n const divEl = useRef(null);\n const [ busy, setBusy ] = useState(false);\n\n useEffect(() => {\n if (!divEl) return;\n\n divEl.current.style.pointerEvents = busy ? 'none' : 'auto';\n }, [divEl, busy])\n\n const uploadFile = async (files) => {\n setBusy(true);\n const upload = async (file) => {\n apiConfig.file = file;\n return await postFetch(apiUrl, apiConfig);\n }\n const response = await Promise.all(files.map(async (file) => {\n return await upload(file);\n }))\n const successResponses = response.filter(v => v.success);\n const failerResponses = response.filter(v => !v.success);\n if (successResponses.length) {\n onSuccess(multiple ? successResponses : successResponses[0]);\n }\n if (failerResponses.length) {\n onFailure(multiple ? failerResponses : failerResponses[0]);\n }\n setBusy(false);\n }\n\n const onDragOver = (e) => {\n e.preventDefault();\n e.stopPropagation();\n }\n\n const onDragEnter = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(true);\n }\n\n const onDragLeave = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n }\n\n const onDrop = (e) => {\n const files = [...e.dataTransfer.files];\n uploadFiles(files, e);\n }\n\n const onUploaderClick = () => {\n if (onClick) {\n onClick();\n return;\n }\n inputEl.current.click();\n }\n\n const onInputUpload = (e) => {\n const files = [...e.target.files];\n uploadFiles(files, e);\n }\n\n const uploadFiles = (files, e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n console.log(files);\n uploadFile(files);\n }\n\n return (\n <div ref={divEl}>\n <input type=\"file\" id={inputId} accept=\"image/*\" ref={inputEl} onChange={onInputUpload} style={{ display: 'none' }} disabled={disabled} multiple={multiple} />\n <StyledUpload onClick={onUploaderClick} style={{ ...style, width, height }} className={inDropZone ? 'dropping' : ''} \n onDragOver={onDragOver} onDragEnter={onDragEnter} onDragLeave={onDragLeave} onDrop={onDrop} data-is-disabled={disabled} {...rest}>\n <NekoIcon width={iconSize} height={iconSize} icon='upload' spinning={busy} color={iconColor}\n onDragOver={onDragOver} onDragEnter={onDragEnter} />\n </StyledUpload>\n </div>\n );\n}\n\nNekoUpload.propTypes = {\n width : PropTypes.string,\n height : PropTypes.string,\n onSuccess : PropTypes.func,\n onFailure : PropTypes.func,\n style : PropTypes.object,\n apiUrl : PropTypes.string,\n apiConfig : PropTypes.object\n};\n\nNekoUpload.defaultProps = {\n width : '100%',\n height : '100%',\n onSuccess : () => {},\n onFailure : () => {},\n style : {}\n};\n\nexport { NekoUpload };\n","import React, { useState, forwardRef, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { NekoBusyOverlay, postFetch } from '../../index';\n\nconst StyledUploadDropArea = Styled.div`\n &.dropping {\n background: #a4d5ff;\n }\n`;\n\nconst NekoUploadDropArea = forwardRef((props, ref) => {\n\n const { onSuccess = () => {}, onFailure = () => {}, apiUrl, apiConfig, className, disabled = false, children, multiple, ...rest } = props;\n const [ inDropZone, setInDropZone ] = useState(false);\n const [ busy, setBusy ] = useState(false);\n\n const uploadFile = async (files) => {\n setBusy(true);\n const upload = async (file) => {\n apiConfig.file = file;\n return await postFetch(apiUrl, apiConfig);\n }\n const response = await Promise.all(files.map(async (file) => {\n return await upload(file);\n }))\n const successResponses = response.filter(v => v.success);\n const failerResponses = response.filter(v => !v.success);\n if (successResponses.length) {\n onSuccess(multiple ? successResponses : successResponses[0]);\n }\n if (failerResponses.length) {\n onFailure(multiple ? failerResponses : failerResponses[0]);\n }\n setBusy(false);\n }\n\n const onDragOver = useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n }, [disabled]);\n\n const onDragEnter = useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled) return;\n setInDropZone(true);\n }, [disabled]);\n\n const onDragLeave = useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled) return;\n setInDropZone(false);\n }, [disabled]);\n\n const onDrop = useCallback((e) => {\n if (disabled) return;\n const files = [...e.dataTransfer.files];\n uploadFiles(files, e);\n }, [disabled]);\n\n const onInputUpload = (e) => {\n const files = [...e.target.files];\n uploadFiles(files, e);\n }\n\n const uploadFiles = (files, e) => {\n e.preventDefault();\n e.stopPropagation();\n setInDropZone(false);\n // console.log(files);\n uploadFile(files);\n }\n\n return (\n <NekoBusyOverlay busy={busy}>\n <input type=\"file\" accept=\"image/*\" ref={ref} onChange={onInputUpload} style={{ display: 'none' }} multiple={multiple} />\n <StyledUploadDropArea className={`${className ? className : ''} ${inDropZone ? 'dropping' : ''}`}\n onDragOver={onDragOver} onDragEnter={onDragEnter} onDragLeave={onDragLeave} onDrop={onDrop} {...rest}>\n {children}\n </StyledUploadDropArea>\n </NekoBusyOverlay>\n );\n});\n\nNekoUploadDropArea.propTypes = {\n ref: PropTypes.ref,\n onSuccess : PropTypes.func,\n onFailure : PropTypes.func,\n apiUrl : PropTypes.string,\n apiConfig : PropTypes.object,\n disabled: PropTypes.bool\n};\n\nNekoUploadDropArea.defaultProps = {\n onSuccess : () => {},\n onFailure : () => {},\n disabled : false\n};\n\nexport { NekoUploadDropArea };\n","import React, { useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-modal';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { NekoButton } from '../button/Button';\n\nconst NekoModalParent = Styled.div`\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: ${Theme.overlay} !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: ${Theme.white};\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`;\n\nconst NekoModalContent = Styled.div`\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content-container {\n display: flex;\n margin-top: 15px;\n\n .thumbnail {\n margin-right: 15px;\n width: 240px;\n overflow: hidden;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n .content {\n flex: auto;\n font-family: ${Theme.fontFamily};\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n width: 100%;\n }\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n`;\n\nconst StyledNekoModal = (props) => {\n\n const {\n id = 'neko-modal-parent',\n isOpen,\n children,\n className,\n style,\n ok = 'OK',\n cancel = 'Cancel',\n customButtons = null,\n customButtonsPosition = 'right',\n title = '',\n content = '',\n onOkClick,\n onCancelClick,\n okOnEnter = false,\n thumbnail,\n ...rest\n } = props;\n const customClassName = style ? 'custom-modal' : '';\n const showCustomButtons = customButtons !== null;\n\n const keyUpHandler = useCallback(({ key }) => {\n if (key === 'Enter') {\n onOkClick();\n }\n }, [onOkClick]);\n\n useEffect(() => {\n if (!okOnEnter || !isOpen) return;\n\n window.addEventListener(\"keyup\", keyUpHandler);\n return () => {\n window.removeEventListener(\"keyup\", keyUpHandler);\n };\n }, [isOpen, keyUpHandler]);\n\n const modalContent = children\n ? children\n : <NekoModalContent>\n {title && <p className=\"title\">{title}</p>}\n <div className=\"content-container\">\n {thumbnail && <div className=\"thumbnail\">{thumbnail}</div>}\n {content && <p className=\"content\">{content}</p>}\n </div>\n <div className=\"button-group\">\n {showCustomButtons && customButtonsPosition === 'left' && customButtons}\n {onCancelClick && <NekoButton className=\"danger\" onClick={onCancelClick}>{cancel}</NekoButton>}\n {onOkClick && <NekoButton onClick={onOkClick}>{ok}</NekoButton>}\n {showCustomButtons && customButtonsPosition === 'right' && customButtons}\n </div>\n </NekoModalContent>;\n\n return (\n <React.Fragment>\n <NekoModalParent id={id} />\n <Modal ariaHideApp={false}\n parentSelector={() => document.getElementById(id)}\n closeTimeoutMS={200}\n className={`neko-modal ${className || ''} ${customClassName}`}\n isOpen={isOpen}\n {...rest}\n >\n {modalContent}\n </Modal>\n </React.Fragment>\n );\n};\n\nconst NekoModal = (props) => {\n return (<StyledNekoModal {...props} />);\n};\n\nNekoModal.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n title: PropTypes.string,\n content: PropTypes.string,\n onOkClick: PropTypes.func,\n onCancelClick: PropTypes.func,\n customButtons: PropTypes.object,\n okOnEnter: PropTypes.bool,\n thumbnail: PropTypes.element\n};\n\nNekoModal.defaultProps = {\n className: undefined,\n style: undefined,\n ok: 'OK',\n cancel: 'Cancel',\n title: '',\n content: '',\n onOkClick: undefined,\n onCancelClick: undefined,\n customButtons: null,\n okOnEnter: false,\n thumbnail: undefined\n};\n\nexport { NekoModal };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport { Icon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronUp from '@iconify/icons-mdi/chevron-up';\nimport checkboxBlankOutline from '@iconify/icons-mdi/checkbox-blank-outline';\nimport checkboxMarked from '@iconify/icons-mdi/checkbox-marked';\nimport checkboxMultipleMarked from '@iconify/icons-mdi/checkbox-multiple-marked';\n\nimport Theme from '../common/NekoTheme';\nimport NekoBusyOverlay from '../common/NekoBusyOverlay';\n\nconst Table = Styled.table`\n font-family: ${Theme.fontFamily};\n border-spacing: 0;\n width: 100%;\n word-break: break-all;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(${Theme.blackRGB}, 0.1);\n border-right: 1px solid rgba(${Theme.blackRGB}, 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n &.nekotable-raw {\n th, td {\n border: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ${Theme.blue};\n color: ${Theme.white};\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 thead tr th:first-child {\n border-top-left-radius: 10px;\n }\n\n thead tr th:last-child {\n border-top-right-radius: 10px;\n }\n\n tfoot tr th:first-child {\n border-bottom-left-radius: 10px;\n }\n\n tfoot tr th:last-child {\n border-bottom-right-radius: 10px;\n }\n\n &.nekotable-raw {\n th {\n font-weight: bold;\n }\n th, tfoot td {\n background-color: ${Theme.white};\n color: ${Theme.black};\n }\n }\n\n tbody {\n background-color: ${Theme.white};\n \n tr {\n :nth-child(even) {\n background-color: ${Theme.tableGray};\n }\n &.selected {\n background-color: rgba(${Theme.blueRGB}, 0.8);\n color: ${Theme.white};\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n &.nekotable-raw {\n tbody {\n tr {\n :nth-child(even) {\n background-color: ${Theme.white};\n }\n &.selected {\n background-color: ${Theme.white};\n color: ${Theme.black};\n }\n }\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`;\n\nconst TableCheckBox = (props) => {\n const { checked, intermediate = false, onSelect = () => {}, onUnselect = () => {}, ...rest } = props;\n\n const onClick = (e) => { \n checked ? onUnselect(e) : onSelect(e);\n };\n\n return (\n <Icon icon={intermediate ? checkboxMultipleMarked : (checked ? checkboxMarked : checkboxBlankOutline)}\n width=\"24px\" height=\"24px\" onClick={onClick} />\n );\n};\n\nconst alignToJustifyContent = {\n left: 'start',\n center: 'center',\n right: 'end',\n};\n\n/**\n * @param {string} className\n * @param {string|object} icon\n * @param {bool} disabled\n * @param {function} onClick\n */\nconst StyledNekoTable = (props) => {\n const { columns, data, busy = false, onSelect, onUnselect, selectedItems, sort, onSortChange, variant = 'default' } = props;\n const columnsCount = columns.length + (onSelect ? 1 : 0);\n\n const getColumnStyle = (column) => {\n let style = {};\n if (column.align) {\n style = { textAlign: column.align, justifyContent: alignToJustifyContent[column.align] };\n }\n if (column.width) {\n style = { ...style, width: column.width };\n }\n if (column.style) {\n style = { ...style, ...column.style };\n }\n return style;\n }\n\n const rows = data.map(v => {\n const cells = columns.map(c => {\n return { value: v[c.accessor], style: getColumnStyle(c) }\n });\n return { id: v.id, cells };\n });\n\n const currentRowsIds = rows.map(x => x.id);\n const currentSelectedRows = currentRowsIds.filter(x => selectedItems.includes(x));\n const areAllRowsSelected = currentSelectedRows.length === currentRowsIds.length;\n const isIntermediate = !areAllRowsSelected && selectedItems.length > 0;\n\n const hiddenColumnIndexes = columns.reduce(function(a, e, i) {\n if (e.visible === false)\n a.push(i);\n return a;\n }, []);\n\n const headersFooters = <tr>\n {onSelect && \n <th className='table-checkbox-cell'>\n <TableCheckBox checked={areAllRowsSelected} intermediate={isIntermediate}\n onSelect={(e) => onSelect(currentRowsIds, e) } \n onUnselect={(e) => { \n // The unselect on selectedItems never happens, but I keep it here in case\n // we find an elegant UI solution to unselect all the invisible selected rows as well.\n isIntermediate ? onUnselect(selectedItems, e) : onUnselect(currentRowsIds, e);\n }}\n />\n </th>\n }\n {columns.filter((x, i) => !hiddenColumnIndexes.includes(i)).map(column => {\n let beingSorted = sort && sort.accessor === column.accessor;\n let beingSortedAsc = sort && sort.by === 'asc';\n const columnStyle = getColumnStyle(column);\n return (<th style={columnStyle} key={column.accessor}>\n <div className={column.sortable ? 'sortable' : ''} style={columnStyle}\n onClick={column.sortable ? (e) => { \n onSortChange(column.accessor, beingSorted && beingSortedAsc ? 'desc' : 'asc', e)\n } : undefined}>\n <div>{column.title}</div>\n <div>{column.sortable && \n <Icon icon={!beingSorted ? chevronDown : (beingSortedAsc ? chevronDown : chevronUp)} \n color={beingSorted ? Theme.white : `rgba(${Theme.blackRGB}, 0.1)`} \n width=\"26px\" height=\"26px\" />}\n </div>\n </div>\n </th>)\n })}\n </tr>;\n\n return (\n <NekoBusyOverlay busy={busy} overlayStyle={{ top: '36px', height: 'calc(100% - 76px)' }}>\n <Table className={`nekotable-${variant}`}>\n <thead>{headersFooters}</thead>\n <tbody>\n {!rows.length && \n <tr><td colspan={columnsCount} style={{ textAlign: 'center', height: 40, color: 'gray' }}>\n Empty.\n </td></tr>\n }\n {rows.map(row => {\n return (\n <tr className={selectedItems.includes(row.id) ? 'selected' : ''}>\n {onSelect && \n <td className='table-checkbox-cell'>\n <TableCheckBox \n checked={selectedItems.includes(row.id)}\n onSelect={(e) => onSelect([ row.id ], e)}\n onUnselect={(e) => onUnselect([ row.id ], e)} \n />\n </td>\n }\n {row.cells.filter((x, i) => !hiddenColumnIndexes.includes(i)).map(cell => {\n return <td style={cell.style}>{cell.value}</td>;\n })}\n </tr>\n );\n })}\n </tbody>\n {variant === 'default' && <tfoot>{headersFooters}</tfoot>}\n </Table>\n </NekoBusyOverlay>\n );\n};\n\nconst NekoTable = (props) => {\n return (<StyledNekoTable {...props} />);\n};\n\nNekoTable.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any),\n data: PropTypes.arrayOf(PropTypes.any),\n busy: PropTypes.arrayOf(PropTypes.bool),\n onSelect: PropTypes.func,\n onUnselect: PropTypes.func,\n selectedItems: PropTypes.arrayOf(PropTypes.object),\n onSortChange: PropTypes.func,\n variant: PropTypes.string,\n};\n\nNekoTable.defaultProps = {\n columns: undefined,\n data: undefined,\n busy: false,\n onSelect: undefined,\n onUnselect: undefined,\n selectedItems: undefined,\n onSortChange: undefined,\n variant: 'default',\n};\n\nexport { NekoTable };\n","import React, { useMemo, useState, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Styled from \"styled-components\";\nimport Theme from '../common/NekoTheme';\nimport { NekoModal } from \"./Modal\";\nimport { NekoTypo } from \"./../misc/Typography\";\nimport { NekoInput } from \"./../form/Input\";\nimport { NekoButton } from \"../button/Button\";\nimport { NekoPaging } from \"../misc/Paging\";\nimport NekoBusyOverlay from \"../common/NekoBusyOverlay\";\nimport { NekoIcon } from \"../misc/Icon\";\nimport { NekoUploadDropArea } from \"../misc/UploadDropArea\";\nimport { NekoTable } from \"../table/Table\";\n\nconst StyledNekoModal = Styled(NekoModal)`\n width: 633px;\n\n &.custom-modal {\n padding: 0;\n }\n\n .neko-modal-wrapper {\n padding: 15px;\n }\n\n .neko-media-library-modal-content-header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n\n h1 {\n font-size: 21px;\n font-weight: bold;\n margin: 0;\n }\n\n input {\n background-color: ${Theme.white};\n border: 1px solid ${Theme.black};\n border-radius: 3px;\n }\n }\n .neko-media-library-modal-content-body {\n margin-top: 33px;\n margin-bottom: 36px;\n\n .neko-media-library-modal-content-body-list {\n max-height: 406px;\n overflow-y: scroll;\n margin-bottom: 10px;\n width: 100%;\n }\n .neko-media-library-modal-content-body-gallery {\n display: grid;\n gap: 10px;\n grid-template-columns: repeat(6, 1fr);\n margin-bottom: 10px;\n\n .neko-media-library-modal-content-media-container {\n cursor: pointer;\n position: relative;\n\n img {\n box-sizing: border-box;\n }\n\n &.selected {\n img {\n border: 5px solid ${Theme.blue};\n }\n }\n\n &:hover {\n .zoom-button {\n display: block;\n }\n }\n\n .zoom-button {\n background-color: rgba(${Theme.blackRGB}, 0.4);\n border: 0;\n border-radius: 30px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 2px;\n left: 2px;\n width: 30px;\n height: 30px;\n }\n }\n }\n\n .neko-media-library-modal-content-body-selected-gallery {\n display: flex;\n\n .neko-media-library-modal-content-selected-media-container {\n overflow: hidden;\n position: relative;\n height: 50px;\n width: 50px;\n padding-right: 5px;\n\n &.dummy {\n width: 50px;\n\n &.drag-over {\n width: 50px;\n }\n }\n\n &.drag-over {\n width: 105px;\n\n .zoom-button {\n left: 56px;\n }\n }\n\n &.drag-over::before {\n content: '';\n display: inline-block;\n width: 50px;\n height: 50px;\n background-color: ${Theme.blue};\n }\n\n img {\n box-sizing: border-box;\n width: 100%;\n max-width: 50px;\n }\n\n &.drag-over {\n img {\n margin-left: 5px;\n }\n }\n\n &:hover {\n .remove-button,\n .zoom-button {\n display: block;\n }\n }\n\n .remove-button {\n background-color: rgba(${Theme.blackRGB}, 0.4);\n border: 0;\n border-radius: 20px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 1px;\n right: 1px;\n width: 20px;\n height: 20px;\n }\n\n .zoom-button {\n background-color: rgba(${Theme.blackRGB}, 0.4);\n border: 0;\n border-radius: 20px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 1px;\n left: 1px;\n width: 20px;\n height: 20px;\n }\n }\n }\n }\n .neko-media-library-modal-content-footer {\n display: flex;\n justify-content: space-between;\n }\n .neko-media-library-modal-search {\n position: relative;\n }\n`;\n\nconst selectedImageBaseWidth = 55;\nconst nextItemRange = 25;\nconst selectedImageIdPrefix = 'nmlm-selected-';\nconst dragOverClassName = 'drag-over';\nconst removeClass = (className) => {\n Array.prototype.forEach.call(document.getElementsByClassName(className), (ele) => {\n ele.classList.remove(className);\n });\n}\nconst displayModes = {\n grid: 'grid',\n list: 'list'\n};\nconst columns = [\n { accessor: 'thumbnail_url', title: 'Thumb', style: { width: '42px' } },\n { accessor: 'title', title: 'Title' },\n { accessor: 'size', title: 'Size', style: { width: '70px' } },\n { accessor: 'filename', title: 'Filename' },\n];\n\nconst StyledNekoMediaLibraryModal = (props) => {\n const { images, onNextPage, onPreviousPage, onRefresh, onClick, onRemoveClick, onZoomClick, onSearch, searchValue, busy,\n currentPage, limit, total, onPageChange, selected, multiSelect = false, showUploader = false, uploader, onSelectedOrderChanged,\n onUploadSuccess = () => {}, onUploadFailure = () => {}, uploadApiUrl, uploadApiConfig, uploadMultiple, onClose, onCancel, onSave, ...rest } = props;\n const [ search, setSerch ] = useState(searchValue);\n const [ dragImageIndex, setDragImageIndex ] = useState(null);\n const [ displayMode, setDisplayMode ] = useState(displayModes.grid);\n const ref = useRef(null);\n\n const onDragOver = (e, i) => {\n e.preventDefault();\n if (dragImageIndex === null) return;\n const { width, left, right } = e.currentTarget.getBoundingClientRect();\n let target = i;\n // Only tweak the index if the element dragged over is the right on the image dragged.\n if (dragImageIndex < i) {\n if (i > 0 && i < selected.length) {\n if (target + 1 === dragImageIndex && e.clientX >= right - nextItemRange) {\n target -= 1\n } else if (target - 1 === dragImageIndex && e.clientX >= left - nextItemRange) {\n target += 1;\n } else if (width !== selectedImageBaseWidth && e.clientX >= right - nextItemRange) {\n target += 1;\n }\n } else if (width !== selectedImageBaseWidth && e.clientX >= right - nextItemRange) {\n target += 1;\n }\n }\n removeClass(dragOverClassName);\n if (dragImageIndex === target || (dragImageIndex + 1) === target) return;\n document.getElementById(`${selectedImageIdPrefix}${target}`).classList.add(dragOverClassName);\n }\n\n const onDragEnd = (e) => {\n e.preventDefault();\n setDragImageIndex(null);\n removeClass(dragOverClassName);\n }\n\n const onDrop = (e, i) => {\n e.preventDefault();\n if (dragImageIndex === null || dragImageIndex === i || (dragImageIndex + 1) === i) return;\n onSelectedOrderChanged({ currentIndex: dragImageIndex, afterIndex: dragImageIndex > i ? i : i - 1});\n }\n\n const selectedMediaJsx = useMemo( () => {\n if ( !multiSelect ) return [];\n const dummyElementForDrop = <div id={`nmlm-selected-${selected.length}`} className=\"neko-media-library-modal-content-selected-media-container dummy\" draggable={false} onDragEnd={(e) => onDragEnd(e)} onDragOver={(e) => onDragOver(e, selected.length)} onDrop={(e) => onDrop(e, selected.length)} onDragLeave={() => removeClass(dragOverClassName)}></div>\n const selectedElement = selected.map( (image, i) => {\n return (\n <div id={`nmlm-selected-${i}`} key={image.id} className=\"neko-media-library-modal-content-selected-media-container\" draggable={true} onDragStart={() => setDragImageIndex(i)} onDragEnd={onDragEnd} onDragOver={(e) => onDragOver(e, i)} onDrop={(e) => onDrop(e, i)}>\n <img src={image.src} className=\"neko-media-library-modal-content-media\" />\n <button className=\"remove-button\" onClick={() => onRemoveClick({ id: image.id, src: image.src })}>\n <NekoIcon icon=\"close\" color={Theme.white} width={19} height={19} />\n </button>\n <button className=\"zoom-button\" onClick={() => onZoomClick({ id: image.id, src: image.zoom_src })}>\n <NekoIcon icon=\"zoom-in\" color={Theme.white} width={19} height={19} />\n </button>\n </div>\n );\n } );\n\n return [...selectedElement, dummyElementForDrop];\n\n }, [ selected, dragImageIndex ] );\n\n const mediaGridJsx = useMemo(() => {\n return images.map((image) => {\n return (\n <div key={image.id} className={`neko-media-library-modal-content-media-container ${selected.some(v => v.id === image.id) ? 'selected' : ''}`}\n onClick={() => {\n onClick({ id: image.id, src: image.src, zoom_src: image.zoom_src })\n }}>\n <img src={image.src} className=\"neko-media-library-modal-content-media\" width=\"90\" height=\"90\" />\n <button className=\"zoom-button\" onClick={(e) => { e.stopPropagation(); onZoomClick({ id: image.id, src: image.zoom_src }); }}>\n <NekoIcon icon=\"zoom-in\" color={Theme.white} width={29} height={29} />\n </button>\n </div>\n );\n });\n }, [images, selected]);\n\n const mediaRows = useMemo(() => {\n return images.map(x => ({\n id: x.id,\n thumbnail_url: <img src={x.src} style={{ width: 40, height: 40, objectFit: 'cover' }} />,\n title: x.title,\n size: x.size,\n filename: x.filename\n }));\n }, [images]);\n\n const onReset = () => {\n setSerch(\"\");\n onRefresh();\n }\n\n const mediaListJsx = useMemo(() => {\n const onSelect = (ids, e) => {\n const image = images.find(v => ids.includes(v.id));\n onClick({ id: image.id, src: image.src, zoom_src: image.zoom_src });\n }\n return <NekoTable\n data={mediaRows}\n columns={columns}\n onSelect={onSelect}\n onUnselect={onSelect}\n selectedItems={selected.map(v => v.id)}\n />\n }, [images, mediaRows, selected, onClick]);\n\n return (\n <StyledNekoModal style={true} {...rest}>\n <div className=\"neko-modal-wrapper\" draggable={true} onDragOver={() => removeClass(dragOverClassName)}>\n <NekoUploadDropArea ref={ref} onSuccess={onUploadSuccess} onFailure={onUploadFailure} apiUrl={uploadApiUrl} apiConfig={uploadApiConfig} disabled={!showUploader || dragImageIndex !== null} multiple={uploadMultiple}>\n <div className=\"neko-media-library-modal-content\">\n <div className=\"neko-media-library-modal-content-header\">\n <NekoTypo h1>Media Library</NekoTypo>\n <div style={{ display: 'flex' }}>\n <div className=\"neko-media-library-modal-search\">\n <NekoInput value={search} disabled={busy} onEnter={onSearch} onChange={(v) => setSerch(v)} placeholder=\"Search...\" />\n {search !== \"\" && <NekoIcon icon=\"close\" containerStyle={{ width: '20px', position: 'absolute', right: '5px', top: '5px', cursor: 'pointer' }} width={20} height={20} color={Theme.darkGray} onClick={onReset} />}\n </div>\n <NekoButton onClick={() => onSearch(search)} style={{ marginLeft: '4px', marginRight: '4px' }}>Search</NekoButton>\n <NekoIcon color={displayMode === displayModes.grid ? Theme.black : Theme.blue} icon='view-grid' onClick={() => setDisplayMode(displayModes.grid)} width=\"20\" height=\"20\" />\n <NekoIcon color={displayMode === displayModes.list ? Theme.black : Theme.blue} icon='format-list-bulleted' onClick={() => setDisplayMode(displayModes.list)} width=\"20\" height=\"20\" />\n </div>\n </div>\n <div>\n <div className=\"neko-media-library-modal-content-body\">\n <NekoBusyOverlay busy={busy}>\n <div className={`${displayMode === displayModes.grid ? 'neko-media-library-modal-content-body-gallery' : 'neko-media-library-modal-content-body-list'}`}>\n {displayMode === displayModes.grid && showUploader && uploader}\n {displayMode === displayModes.grid ? mediaGridJsx : mediaListJsx}\n </div>\n </NekoBusyOverlay>\n <div className=\"neko-media-library-modal-content-body-selected-gallery\">\n {selectedMediaJsx}\n </div>\n </div>\n </div>\n <div className=\"neko-media-library-modal-content-footer\">\n <NekoPaging limit={limit} currentPage={currentPage} total={total} onClick={onPageChange} />\n <div style={{ display: 'flex' }}>\n {!!onClose && <NekoButton onClick={() => onClose()}>\n Close\n </NekoButton>}\n {!!onCancel && <NekoButton className=\"danger\" onClick={() => onCancel()}>\n Cansel\n </NekoButton>}\n {!!onSave && <NekoButton onClick={() => onSave()}>\n Save\n </NekoButton>}\n </div>\n </div>\n </div>\n </NekoUploadDropArea>\n </div>\n </StyledNekoModal>\n );\n};\n\nconst NekoMediaLibraryModal = (props) => {\n return <StyledNekoMediaLibraryModal {...props} />;\n};\n\nNekoMediaLibraryModal.propTypes = {\n images: PropTypes.array,\n onNextPage: PropTypes.func,\n onPreviousPage: PropTypes.func,\n onRefresh: PropTypes.func,\n onClick: PropTypes.func,\n onSearch: PropTypes.func,\n searchValue: PropTypes.string,\n busy: PropTypes.bool,\n currentPage: PropTypes.number,\n limit: PropTypes.number,\n total: PropTypes.number,\n onPageChange: PropTypes.func,\n multiSelect: PropTypes.bool,\n selected: PropTypes.array,\n onClose: PropTypes.func,\n onCancel: PropTypes.func,\n onSave: PropTypes.func,\n};\n\nNekoMediaLibraryModal.defaultProps = {\n multiSelect: false\n};\n\nexport { NekoMediaLibraryModal };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { NekoIcon } from '../misc/Icon';\n\nconst TabContainer = Styled.div`\n`;\n\nconst TabGroup = Styled.div`\n display: flex;\n`;\n\nconst Tab = Styled.button`\n font-family: ${Theme.fontFamily};\n font-size: ${Theme.fontSizeText};\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 65%);\n display: flex;\n align-items: center;\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: ${Theme.blue};\n color: ${Theme.white};\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n\n &.hidden {\n display: none;\n }\n`;\n\nconst TabContent = Styled.div`\n background-color: ${Theme.blue};\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n`;\n\n/**\n * Need to use with NecoTab\n */\nconst StyledNekoTabs = props => {\n const [isActiveTabIndex, setIsActiveTabIndex] = React.useState(0);\n const childrenProp = props.children\n ? (\n props.children.length\n ? props.children.filter(x => !!x)\n : [props.children]\n )\n : [];\n\n React.useEffect(() => {\n if (props.keepTabOnReload) {\n const url = new URL(window.location.href);\n const title = url.searchParams.get('nekoTab');\n if (!title) {\n setIsActiveTabIndex(0);\n return;\n }\n const searchTitle = decodeURIComponent(title);\n const index = React.Children.toArray(childrenProp).map(c => c.props.title.replaceAll(' ', '')).indexOf(searchTitle);\n if (index === -1) {\n setIsActiveTabIndex(0);\n return;\n }\n setIsActiveTabIndex(index);\n return;\n }\n setIsActiveTabIndex(0);\n }, [])\n\n const tabAttributes = React.Children.map(childrenProp, (child, i) => {\n const title = child.props.title || (\"Untitled Tab \" + (i + 1));\n const key = child.props.key || 'neko-tab-' + title.toLowerCase();\n const onClick = child.props.onClick ? child.props.onClick : null;\n const requirePro = !props.isPro && (child.props.requirePro || false);\n const hidden = child.props.hidden || false;\n const icon = child.props.icon || false;\n return { key, title, onClick, requirePro, hidden, icon };\n });\n\n const children = React.Children.map(childrenProp, (child, i) => {\n return React.cloneElement(child, {\n isActive: i === isActiveTabIndex\n });\n });\n\n const keepTab = (title) => {\n if (history.pushState && title) {\n let searchParams = new URLSearchParams(window.location.search);\n const value = encodeURIComponent(title.replaceAll(' ', ''));\n searchParams.set('nekoTab', value);\n let newUrl = window.location.protocol + \"//\" + window.location.host + window.location.pathname + '?' + searchParams.toString();\n window.history.replaceState({ path: newUrl }, '', newUrl);\n }\n }\n\n const onTabClick = (tabIndex, tabAttr, ev) => {\n if (tabAttr.requirePro) return;\n setIsActiveTabIndex(tabIndex);\n if (props.onChange) {\n props.onChange(tabIndex, tabAttr, ev);\n }\n if (props.keepTabOnReload) {\n keepTab(tabAttr.title);\n }\n };\n\n return (\n <TabContainer>\n <TabGroup>\n {tabAttributes.map((attr, i) =>\n <Tab \n key={attr.key} \n className={`neko-tab-title ${i === isActiveTabIndex ? 'active' : ''} ${attr.requirePro ? 'disabled' : ''} ${attr.hidden ? `hidden` : ''}`} \n onClick={(ev) => { onTabClick(i, attr, ev) }}\n >\n {attr.icon && <NekoIcon icon={attr.icon} width={15} height={15} style={{ marginRight: '2px' }} raw />}\n {attr.title}<ProOnly className=\"inline\" style={{ marginLeft: 10, marginRight: -5, top: -1 }} show={attr.requirePro} />\n </Tab>\n )}\n </TabGroup>\n {children}\n </TabContainer>\n );\n};\n\n\n/**\n * @oaram {string} title\n * @param {bool} isActive\n */\nconst StyledNekoTab = props => {\n\n const { children, isActive } = props;\n\n return (\n <TabContent className={`${isActive ? 'active' : ''}`}>\n {!!isActive && children}\n </TabContent>\n );\n};\n\nconst NekoTabs = (props) => {\n return (<StyledNekoTabs {...props} />);\n};\n\nNekoTabs.propTypes = {\n isPro: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nNekoTabs.defaultProps = {\n isPro: false,\n onChange: undefined\n};\n\nconst NekoTab = (props) => {\n return (<StyledNekoTab {...props} />);\n};\n\nNekoTab.propTypes = {\n isActive: PropTypes.bool,\n requirePro: PropTypes.bool,\n title: PropTypes.string,\n icon: PropTypes.string,\n};\n\nNekoTab.defaultProps = {\n isActive: false,\n requirePro: false,\n title: undefined,\n icon: undefined,\n};\n\nexport { NekoTab, NekoTabs };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Theme from '../common/NekoTheme';\nimport { ProOnly } from '../label/ProOnly';\nimport { Icon, InlineIcon } from '@iconify/react';\nimport chevronDown from '@iconify/icons-mdi/chevron-down';\nimport chevronRight from '@iconify/icons-mdi/chevron-right';\n\nconst TabContainer = Styled.div`\n`;\n\nconst Tab = Styled.div`\n align-items: center;\n background-color: ${Theme.blue};\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(${Theme.yellowRGB}, 0.25);\n cursor: default;\n }\n\n p {\n color: ${Theme.white};\n font-family: ${Theme.fontFamily};\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ${Theme.white};\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n`;\n\nconst TabContent = Styled.div`\n background-color: ${Theme.white};\n display: none;\n\n &.active {\n display: block;\n }\n`;\n\n/**\n * Need to use with NecoTab\n */\nconst StyledNekoSideTabs = props => {\n\n const [activeTabIndex, setIsActiveTabIndex] = React.useState(props.activeTabIndex);\n\n const tabAttributes = React.Children.map(props.children, (child, i) => {\n const title = child.props.title || (\"Untitled Tab \" + (i + 1));\n const key = child.props.key || 'neko-tab-' + title.toLowerCase();\n const onClick = child.props.onClick ? child.props.onClick : null;\n const requirePro = !props.isPro && (child.props.requirePro || false);\n const onDragOver = child.props.onDragOver;\n const onDrop = child.props.onDrop;\n const rightActions = child.props.rightActions || null;\n return { key, title, onClick, requirePro, onDragOver, onDrop, rightActions };\n });\n\n const children = React.Children.map(props.children, (child, i) => {\n return React.cloneElement(child, {\n isActive: i === activeTabIndex\n });\n });\n\n const onTabClick = (tabIndex, tabAttr, ev) => {\n if (tabAttr.requirePro) return;\n const newTabIndex = tabIndex === activeTabIndex ? null : tabIndex;\n setIsActiveTabIndex(newTabIndex);\n if (props.onChange) {\n props.onChange(newTabIndex, tabAttr, ev);\n }\n };\n\n return (\n <TabContainer>\n {tabAttributes.map((attr, i) =>\n <React.Fragment>\n <Tab\n key={attr.key}\n className={`${i === activeTabIndex ? 'active' : ''} ${attr.requirePro ? 'disabled' : ''}`}\n onClick={(ev) => { onTabClick(i, attr, ev); }}\n onDragOver={attr.onDragOver}\n onDrop={attr.onDrop}\n >\n <p>\n <span style={{ fontSize: 15 }}>{attr.title}</span>\n <ProOnly className=\"inline\" show={attr.requirePro} />\n </p>\n {attr.rightActions === null\n ? <Icon icon={i === activeTabIndex ? chevronDown : chevronRight } className=\"neko-side-tab-icon\" />\n : (\n i === activeTabIndex\n ? <div style={{ marginLeft: 'auto' }}>{attr.rightActions}</div>\n : <Icon icon={chevronRight} className=\"neko-side-tab-icon\" />\n )\n }\n </Tab>\n { children[i] }\n </React.Fragment>\n )}\n </TabContainer>\n );\n};\n\n\n/**\n * @oaram {string} title\n * @param {bool} isActive\n */\nconst StyledNekoSideTab = props => {\n\n const { children, isActive } = props;\n\n return (\n <TabContent className={`${isActive ? 'active' : ''}`}>\n { children }\n </TabContent>\n );\n};\n\nconst NekoSideTabs = (props) => {\n return (<StyledNekoSideTabs {...props} />);\n};\n\nNekoSideTabs.propTypes = {\n isPro: PropTypes.bool,\n onChange: PropTypes.func,\n activeTabIndex: PropTypes.number\n};\n\nNekoSideTabs.defaultProps = {\n isPro: false,\n onChange: undefined,\n activeTabIndex: null\n};\n\nconst NekoSideTab = (props) => {\n return (<StyledNekoSideTab {...props} />);\n};\n\nNekoSideTab.propTypes = {\n isActive: PropTypes.bool,\n requirePro: PropTypes.bool,\n title: PropTypes.string,\n onDragOver: PropTypes.func,\n onDrop: PropTypes.func,\n rightActions: PropTypes.element\n};\n\nNekoSideTab.defaultProps = {\n isActive: false,\n requirePro: false,\n title: undefined,\n onDragOver: undefined,\n onDrop: undefined,\n rightActions: undefined\n};\n\nexport { NekoSideTab, NekoSideTabs };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'styled-components';\nimport Colors from '../common/NekoTheme';\n\nconst ToolbarBase = Styled.div`\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ${Colors.white};\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(${Colors.blackRGB}, 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`;\n\nconst StyledNekoToolbar = ({ align = 'left', ...props }) => {\n return (\n <ToolbarBase className={`neko-align-${align}`} {...props}>\n {props.children}\n </ToolbarBase>\n );\n};\n\nconst NekoToolbar = (props) => {\n return (<StyledNekoToolbar {...props} />);\n};\n\nNekoToolbar.propTypes = {\n align: PropTypes.oneOf(['left', 'right'])\n};\n\nNekoToolbar.defaultProps = {\n align: 'left'\n};\n\nexport { NekoToolbar };","class NekoError {\n\n constructor(message, code = '', url = null, body = null, debug = {}, ) {\n this.url = url;\n this.message = message;\n this.code = code;\n this.body = body;\n this.debug = debug;\n }\n}\n\nexport { NekoError };","import { cache, mutate } from 'swr';\nimport { NekoError } from './errors';\n\n// This function allows to invalidate a SWR key which might\n// have been use for paging, for example: swrInvalidateMany('/api/items')\n// will reset everything which happens around this key.\n\nfunction swrInvalidateMany(select) {\n const keys = cache.keys();\n const mutations = [];\n let regexp = new RegExp(`(.*)${select}(.*)`);\n for (let key of keys) {\n if (regexp.test(key)) {\n mutations.push(mutate(key, null, true));\n }\n }\n return Promise.all(mutations);\n}\n\nfunction chunkArrayInGroups(arr, size) {\n let result = [];\n for (let i = 0; i < arr.length; i += size)\n result.push(arr.slice(i, i + size));\n return result;\n}\n\nconst consolidateJsonResult = (json) => {\n if (!json.data) {\n return json;\n }\n if (json.data.length > 0 && json.data[0].meta) {\n for (let x of json.data) {\n try { x.meta = JSON.parse(x.meta); }\n catch (err) { console.error('[JsonFetcher]', 'Could not decode meta.', x.meta); }\n }\n }\n else if (json.data.meta) {\n try { json.data.meta = JSON.parse(json.data.meta); }\n catch (err) { console.error('[JsonFetcher]', 'Could not decode meta.', x.meta); }\n }\n return json;\n}\n\nconst jsonFetcher = async (url, options = {}) => {\n let body = null;\n let json = {};\n let nekoError = null;\n let rawBody = null;\n\n try {\n options = options ? options : {};\n options.headers = options.headers ? options.headers : {};\n options.headers['Pragma'] = 'no-cache';\n options.headers['Cache-Control'] = 'no-cache';\n rawBody = await fetch(`${url}`, options);\n body = await rawBody.text();\n json = JSON.parse(body);\n if (!json.success) {\n let code = json.success === false ? 'NOT-SUCCESS' : 'N/A';\n let message = json.message ? json.message : 'Unknown error. Check your Console Logs.';\n if (json.code === 'rest_no_route') {\n message = \"The API can't be accessed. Is Rest API enabled?\";\n code = 'NO-ROUTE';\n }\n else if (json.code === 'internal_server_error') {\n message = \"Server error. Please check your PHP Error Logs.\";\n code = 'SERVER-ERROR';\n }\n nekoError = new NekoError(message, code, url, body ? body : rawBody);\n }\n }\n catch (error) {\n let code = 'BROKEN-REPLY';\n let message = \"The reply sent by the server is broken.\";\n if (rawBody && rawBody.status) {\n if (rawBody.status === 408) {\n code = \"REQUEST-TIMEOUT\";\n message = \"The request generated a timeout.\";\n }\n }\n nekoError = new NekoError(message, code, url, body ? body : rawBody, error);\n }\n\n // Rewrite the Json if there is an error\n if (nekoError) {\n console.error('[NekoError] JsonFetcher', nekoError.url, { code: nekoError.code, \n error: nekoError.error, body: nekoError.body });\n json.success = false;\n json.error = nekoError;\n }\n return consolidateJsonResult(json);\n}\n\nconst getFetch = async (url, json, signal, nonce) => {\n const nonceHeader = nonce ? { 'X-WP-Nonce': nonce } : {};\n return jsonFetcher(url, { \n method: 'GET', \n headers: { 'Content-Type': 'application/json', ...nonceHeader },\n signal: signal\n });\n}\n\nconst postFetch = async (url, config = {}) => {\n const { json = {}, signal, file, nonce } = config;\n let formData = file ? new FormData() : null;\n if (file) {\n formData.append('file', file);\n for (const [key, value] of Object.entries(json)) {\n formData.append(key, value);\n }\n }\n\n const headers = nonce ? { 'X-WP-Nonce': nonce } : {};\n if (!formData) {\n headers['Content-Type'] = 'application/json';\n }\n\n return jsonFetcher(url, { \n method: 'POST',\n headers: headers,\n body: formData ? formData :JSON.stringify(json) ,\n signal: signal\n });\n}\n\nconst buildUrlWithParams = (apiUrl, params) => {\n const isPlainPermalink = apiUrl.includes('index.php?rest_route');\n const urlParams = new URLSearchParams(params);\n const finalUrl = apiUrl + (isPlainPermalink ? '&' : '?') + urlParams.toString();\n return finalUrl;\n}\n\nconst formatBytes = (bytes, decimals = 2) => {\n //if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n let i = bytes > 0 ? Math.floor(Math.log(bytes) / Math.log(k)) : 0;\n if ( sizes[i] === 'Bytes' ) {\n bytes *= 100;\n i = 1;\n }\n bytes = parseFloat((bytes / Math.pow(k, i)).toFixed(dm));\n var str = bytes.toFixed(Math.max(dm, (bytes.toString().split('.')[1] || []).length));\n return str + ' ' + sizes[i];\n \n}\n\nexport { getFetch, postFetch, jsonFetcher, swrInvalidateMany, chunkArrayInGroups, buildUrlWithParams, formatBytes };","const prefix = mgcl_gallery_custom_links.prefix;\nconst domain = mgcl_gallery_custom_links.domain;\nconst restUrl = mgcl_gallery_custom_links.rest_url.replace(/\\/+$/, \"\");\nconst apiUrl = mgcl_gallery_custom_links.api_url.replace(/\\/+$/, \"\");\nconst pluginUrl = mgcl_gallery_custom_links.plugin_url.replace(/\\/+$/, \"\");\nconst isPro = mgcl_gallery_custom_links.is_pro === '1';\nconst isRegistered = isPro && mgcl_gallery_custom_links.is_registered === '1';\nconst restNonce = mgcl_gallery_custom_links.rest_nonce;\n\nexport { prefix, domain, apiUrl, restUrl, pluginUrl, isPro, isRegistered, restNonce };\n","// React & Vendor Libs\nconst { useState, useMemo } = wp.element;\nimport useSWR from 'swr';\n\n// NekoUI\nimport { NekoInput, NekoTypo, NekoPage, NekoBlock, NekoHeader, NekoContainer, NekoSettings,\n NekoTabs, NekoTab, NekoCheckboxGroup, NekoCheckbox, NekoWrapper, NekoSelect, NekoOption,\n NekoColumn } from '@neko-ui';\nimport { jsonFetcher, postFetch, useHandleSWR } from '@neko-ui';\n\nimport { apiUrl, restNonce } from '@app/settings';\n\nconst Settings = () => {\n\n const swrAllSettingsKey = useMemo(() => {\n return [`${apiUrl}/all_settings/`, { headers: { 'X-WP-Nonce': restNonce } }];\n }, [apiUrl, restNonce]);\n const { data: swrSettings, mutate: mutateSwrSettings } = useSWR(swrAllSettingsKey, jsonFetcher);\n const { busy: busySettings, data: settings, error: swrError } = useHandleSWR(swrSettings, {}, true);\n const [ busyAction, setBusyAction ] = useState(false);\n const busy = busySettings || busyAction;\n\n const obmode = settings?.mgcl_obmode;\n const parsingEngine = settings?.mgcl_parsing_engine;\n const log = settings?.mgcl_log;\n const buttonEnabled = settings?.mgcl_button_enabled;\n const buttonLabel = settings?.mgcl_button_label;\n\n const parsingEngineOptions = [\n { id: \"none\", value: \"None\", label: \"None (Not Supported Yet)\"},\n { id: \"htmldomparser\", value: \"HtmlDomParser\", label: \"HtmlDomParser\" },\n { id: \"didom\", value: \"DiDom\", label: \"DiDom\" }\n ]\n\n const updateOption = async (value, id) => {\n let newSettingsData = { ...swrSettings.data };\n newSettingsData[id] = value;\n mutateSwrSettings({ ...swrSettings, data: newSettingsData }, false);\n setBusyAction(true);\n try {\n await postFetch(`${apiUrl}/update_option`, { json: { name: id, value }, nonce: restNonce });\n }\n catch (err) {\n alert(err.message);\n }\n finally {\n setBusyAction(false);\n mutateSwrSettings();\n }\n }\n\n /**\n * Settings\n */\n\n const jsxOBMode =\n <NekoSettings title=\"OB Mode\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_obmode\" label=\"Enabled\" value=\"1\" checked={obmode} onChange={updateOption} description=\"If the linked images are outside of the main content (header, sidebar, etc), OB Mode is needed. This slows down the processing (cache recommended).\" />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n const jsxParsingEngine =\n <NekoSettings title=\"Parsing Engine\" description=\"Hello\">\n <NekoSelect id=\"mgcl_parsing_engine\" onChange={updateOption}>\n {parsingEngineOptions.map(option => <NekoOption id={`mgcl_parsing_engine_${option.id}`} value={option.value} label={option.label} checked={parsingEngine === option.value} /> )}\n </NekoSelect>\n </NekoSettings>;\n\n const jsxLog =\n <NekoSettings title=\"Logs\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_log\" label=\"Logs\" value=\"1\" checked={log} onChange={updateOption} description=\"Simple logging, written directly in the PHP Error Logs.\" />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n /**\n * CTA Buttons\n */\n const jsxUseButtons =\n <NekoSettings title=\"Use Buttons\">\n <NekoCheckboxGroup max=\"1\">\n <NekoCheckbox id=\"mgcl_button_enabled\" label=\"Enabled\" value=\"1\" description=\"A call-to-action button will be used of a clickable image.\" checked={buttonEnabled} onChange={updateOption} />\n </NekoCheckboxGroup>\n </NekoSettings>;\n\n const jsxButtonLabel =\n <NekoSettings title=\"Label\">\n <NekoInput id=\"mgcl_button_label\" name=\"mgcl_button_label\" value={buttonLabel} description=\"A call-to-action button will be used of a clickable image.\" onBlur={updateOption} />\n </NekoSettings>;\n\n return (\n <NekoPage nekoErrors={[ swrError ]}>\n\n <NekoHeader title='Gallery Custom Links | Settings' subtitle='By Jordy Meow' />\n\n <NekoWrapper>\n\n <NekoColumn full>\n <NekoContainer>\n <NekoTypo p>This plugin works out of the box, the default settings are the best for most installs. Don't hesitate to take a look at the <a href=\"https://meowapps.com/plugin/gallery-custom-links/\">official page</a>.</NekoTypo>\n </NekoContainer>\n\n <NekoTabs>\n\n <NekoTab title='Settings'>\n <NekoWrapper>\n\n <NekoColumn minimal>\n <NekoBlock busy={busy} title=\"Settings\" className=\"primary\">\n {jsxParsingEngine}\n {jsxOBMode}\n {jsxLog}\n </NekoBlock>\n </NekoColumn>\n\n <NekoColumn minimal>\n <NekoBlock busy={busy} title=\"CTA Buttons\" className=\"primary\">\n <NekoTypo p><b>Currently works with the <a href=\"https://wordpress.org/plugins/meow-gallery/\">Meow Gallery</a> and Gutenberg Galleries.</b> In a future Pro version, support for additional galleries might be added (please contact <a href=\"https://meowapps.com/contact/\">Meow Apps</a> for this).</NekoTypo>\n {jsxUseButtons}\n {!buttonEnabled ? null : jsxButtonLabel}\n </NekoBlock>\n </NekoColumn>\n\n </NekoWrapper>\n </NekoTab>\n\n </NekoTabs>\n\n </NekoColumn>\n\n </NekoWrapper>\n\n </NekoPage>\n );\n};\n\nexport default Settings;","const { __ } = wp.i18n;\n\nconst i18n = {};\n\ni18n.PENDING = __( 'Pending', 'gallery-custom-links' );\ni18n.RENAME = __( 'Rename', 'gallery-custom-links' );\ni18n.TITLE = __( 'Title', 'gallery-custom-links' );\ni18n.SAME_PAGE = __( 'Same page', 'gallery-custom-links' );\ni18n.NEW_PAGE = __( 'New page', 'gallery-custom-links' );\ni18n.LINK_URL = __( 'Link URL', 'gallery-custom-links' );\ni18n.LINK_TARGET = __( 'Link Target', 'gallery-custom-links' );\ni18n.LINK_REL = __( 'Link Rel', 'gallery-custom-links' );\ni18n.ARIAL_LABEL = __( 'Arial Label', 'gallery-custom-links' );\n\nexport default i18n;\n\n","// React & Vendor Libs\nconst { useState, useCallback } = wp.element;\nimport Styled from \"styled-components\";\n\n// Libs\nimport i18n from '@app/i18n';\nimport { apiUrl, restNonce } from '@app/settings';\n\n// NekoUI\nimport { NekoTypo, NekoIcon, NekoModal, NekoInput, NekoSelect, NekoOption } from '@neko-ui';\nimport { postFetch } from '@neko-ui';\n\nconst targets = [\n\t{ label: i18n.SAME_PAGE, value: '_self' },\n\t{ label: i18n.NEW_PAGE, value: '_blank' }\n];\n\nconst GroupContainer = Styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\tmargin-bottom: 10px;\n\n\tp {\n\t\tmargin: 0 !important;\n\t\twidth: 20%;\n\t}\n\n\t> div {\n\t\tflex-grow: 1;\n\t}\n`;\n\nconst EditLinkField = ( props ) => {\n\n\tconst [ busyAction, setBusyAction ] = useState(false);\n\tconst busy = busyAction;\n\n\tconst { postId } = props;\n\tconst [ url, setUrl ] = useState( props.url );\n\tconst [ target, setTarget ] = useState( props.target ? props.target : '_self' );\n\tconst [ rel, setRel ] = useState( props.rel );\n\tconst [ aria, setAria ] = useState( props.aria );\n\tconst [ openModal, setOpenModal ] = useState( false );\n\n\tconst updateOption = async (postId, url, target, rel, aria) => {\n\t\tsetBusyAction( true );\n\t\tlet result = true;\n\t\ttry {\n\t\t\tconst res = await postFetch( `${apiUrl}/update_meta`, { json: {\n\t\t\t\tpost_id: postId,\n\t\t\t\t_gallery_link_url: url,\n\t\t\t\t_gallery_link_target: target,\n\t\t\t\t_gallery_link_rel: rel,\n\t\t\t\t_gallery_link_aria: aria,\n\t\t\t}, nonce: restNonce } );\n\t\t\tif ( !res.success ) {\n\t\t\t\tresult = false;\n\t\t\t\talert(res.message);\n\t\t\t}\n\t\t} catch ( err ) {\n\t\t\tresult = false;\n\t\t\talert( err.message );\n\t\t} finally {\n\t\t\tif ( result ) onCloseModal();\n\t\t\tsetBusyAction( false );\n\t\t}\n\t};\n\n\tconst onCloseModal = () => setOpenModal( false )\n\n\tconst onOkClick = useCallback(() => {\n\t\tupdateOption( postId, url, target, rel, aria );\n\t}, [postId, url, target, rel, aria, updateOption, onCloseModal]);\n\n const onKeyDown = useCallback((e) => {\n if (e.key === 'Enter' || e.keyCode === 13) {\n e.preventDefault();\n onOkClick();\n }\n }, [onOkClick]);\n\n\treturn (\n\t\t<>\n\t\t\t<span onClick={() => setOpenModal( true )} style={{ cursor: 'pointer' }}>\n\t\t\t\t<NekoIcon icon=\"link\" disabled={!url} />\n\t\t\t</span>\n\t\t\t<NekoModal\n\t\t\t\tisOpen={openModal}\n\t\t\t\tonRequestClose={onCloseModal}\n\t\t\t\ttitle=\"Edit the custom link\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.LINK_URL}</NekoTypo>\n\t\t\t\t\t\t\t<NekoInput disabled={busy} onInput={(e) => setUrl(e.target.value)}\n onKeyDown={onKeyDown} value={url} autoFocus />\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.LINK_TARGET}</NekoTypo>\n\t\t\t\t\t\t\t<NekoSelect scrolldown={true} value={target} onChange={(v) => setTarget(v)} disabled={busy}>\n\t\t\t\t\t\t\t\t{targets.map(target => <NekoOption value={target.value} label={target.label} />)}\n\t\t\t\t\t\t\t</NekoSelect>\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.LINK_REL}</NekoTypo>\n\t\t\t\t\t\t\t<NekoInput disabled={busy} onInput={(e) => setRel(e.target.value)} value={rel} />\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t\t<GroupContainer>\n\t\t\t\t\t\t\t<NekoTypo p>{i18n.ARIAL_LABEL}</NekoTypo>\n\t\t\t\t\t\t\t<NekoInput disabled={busy} onInput={(e) => setAria(e.target.value)} value={aria} />\n\t\t\t\t\t\t</GroupContainer>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tonOkClick={onOkClick}\n\t\t\t\tonCancelClick={onCloseModal}\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default EditLinkField;","// React & Vendor Libs\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// Gallery Custom Links\nimport Settings from '@app/components/Settings';\nimport EditLinkField from '@app/components/EditLinkField';\n\nlet isMediaLibrary = null;\n\nfunction init() {\n\tisMediaLibrary = document.getElementsByClassName('upload-php')[0];\n}\n\n// Gallery Custom Links Settings\nfunction addSettings() {\n\tconst container = document.getElementById('mgcl-admin-settings');\n\tif (container) {\n\t\tReactDOM.render((<Settings />), container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\ndocument.addEventListener('DOMContentLoaded', function(event) {\n\n\tinit();\n\n\tif (addSettings() || !isMediaLibrary) {\n\t\treturn;\n\t}\n\n\t// Edit Link Fields need to be added in the Media Library\n\tconst fields = Array.from(document.getElementsByClassName('mgcl-edit-link-field'));\n\tfields.forEach(field => {\n\t\tconst postId = field.getAttribute('data-post-id');\n\t\tconst url = field.getAttribute('data-url');\n\t\tconst target = field.getAttribute('data-target');\n\t\tconst rel = field.getAttribute('data-rel');\n\t\tconst aria = field.getAttribute('data-aria');\n\t\tReactDOM.render((<EditLinkField postId={postId} url={url} target={target} rel={rel} aria={aria} />), field);\n\t});\n\n});\n"],"sourceRoot":""}
|
common/admin.php
CHANGED
@@ -70,7 +70,7 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
|
|
70 |
'license' =>
|
71 |
$this->is_registered() ?
|
72 |
('<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>') :
|
73 |
-
( $isIssue ? (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') : (sprintf( '<span>' . __( '<a target="_blank" href="https://
|
74 |
);
|
75 |
$links = array_merge( $new_links, $links );
|
76 |
}
|
@@ -101,7 +101,7 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
|
|
101 |
}
|
102 |
$html = '<div class="notice notice-error">';
|
103 |
$html .= sprintf(
|
104 |
-
__( '<p>It looks like you are using the free version of the plugin (<b>%s</b>) but a license for the Pro version was also found. The Pro version might have been replaced by the Free version during an update (might be caused by a temporarily issue). If it is the case, <b>please download it again</b> from the <a target="_blank" href="https://
|
105 |
$this->nice_name_from_file( $this->mainfile ) );
|
106 |
$html .= '<p>
|
107 |
<form method="post" action="">
|
@@ -141,7 +141,8 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
|
|
141 |
}
|
142 |
|
143 |
function is_registered() {
|
144 |
-
|
|
|
145 |
}
|
146 |
|
147 |
function get_phpinfo() {
|
70 |
'license' =>
|
71 |
$this->is_registered() ?
|
72 |
('<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>') :
|
73 |
+
( $isIssue ? (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') : (sprintf( '<span>' . __( '<a target="_blank" href="https://meowapps.com">Get the <u>Pro Version</u></a>', $this->domain ), $this->prefix ) . '</span>') ),
|
74 |
);
|
75 |
$links = array_merge( $new_links, $links );
|
76 |
}
|
101 |
}
|
102 |
$html = '<div class="notice notice-error">';
|
103 |
$html .= sprintf(
|
104 |
+
__( '<p>It looks like you are using the free version of the plugin (<b>%s</b>) but a license for the Pro version was also found. The Pro version might have been replaced by the Free version during an update (might be caused by a temporarily issue). If it is the case, <b>please download it again</b> from the <a target="_blank" href="https://meowapps.com">Meow Store</a>. If you wish to continue using the free version and clear this message, click on this button.', $this->domain ),
|
105 |
$this->nice_name_from_file( $this->mainfile ) );
|
106 |
$html .= '<p>
|
107 |
<form method="post" action="">
|
141 |
}
|
142 |
|
143 |
function is_registered() {
|
144 |
+
$is_registered = apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
|
145 |
+
return $is_registered;
|
146 |
}
|
147 |
|
148 |
function get_phpinfo() {
|
common/js/components/LicenseBlock.js
CHANGED
@@ -87,10 +87,10 @@ const LicenseBlock = () => {
|
|
87 |
message = 'Unknown error :(';
|
88 |
}
|
89 |
else if (license.issue === 'no_activations_left') {
|
90 |
-
message = <span>There are no activations left for this license. You can visit your account at the <a target='_blank' rel="noreferrer" href='https://
|
91 |
}
|
92 |
else if (license.issue === 'expired') {
|
93 |
-
message = <span>Your license has expired. You can get another license or renew the current one by visiting your account at the <a target='_blank' rel="noreferrer" href='https://
|
94 |
}
|
95 |
else if (license.issue === 'missing') {
|
96 |
message = 'This license does not exist.';
|
@@ -102,7 +102,7 @@ const LicenseBlock = () => {
|
|
102 |
message = 'This license seems to be for a different plugin... isn\'t it? :)';
|
103 |
}
|
104 |
else if (license.issue === 'forced') {
|
105 |
-
message = '
|
106 |
}
|
107 |
else {
|
108 |
message = <span>There is an unknown error related to the system or this serial key. Really sorry about this! Make sure your security plugins and systems are off temporarily. If you are still experiencing an issue, please <a target='_blank' rel="noreferrer" href='https://meowapps.com/contact/'>contact us</a>.</span>
|
@@ -112,7 +112,7 @@ const LicenseBlock = () => {
|
|
112 |
|
113 |
const jsxNonPro =
|
114 |
<NekoBlock title="Pro Version (Not Installed)" className="primary">
|
115 |
-
You will find more information about the Pro Version <a target='_blank' rel="noreferrer" href={`https://
|
116 |
</NekoBlock>;
|
117 |
|
118 |
const jsxProVersion =
|
@@ -126,7 +126,7 @@ const LicenseBlock = () => {
|
|
126 |
{license && success && <NekoMessageSuccess>{message}</NekoMessageSuccess>}
|
127 |
|
128 |
{!license && <NekoTypo p>
|
129 |
-
Insert your serial key above. If you don't have one yet, you can get one <a href="https://
|
130 |
</NekoTypo>
|
131 |
}
|
132 |
|
87 |
message = 'Unknown error :(';
|
88 |
}
|
89 |
else if (license.issue === 'no_activations_left') {
|
90 |
+
message = <span>There are no activations left for this license. You can visit your account at the <a target='_blank' rel="noreferrer" href='https://meowapps.com'>Meow Apps Store</a>, unregister a site, and click on <i>Retry to validate</i>.</span>;
|
91 |
}
|
92 |
else if (license.issue === 'expired') {
|
93 |
+
message = <span>Your license has expired. You can get another license or renew the current one by visiting your account at the <a target='_blank' rel="noreferrer" href='https://meowapps.com'>Meow Apps Store</a>.</span>;
|
94 |
}
|
95 |
else if (license.issue === 'missing') {
|
96 |
message = 'This license does not exist.';
|
102 |
message = 'This license seems to be for a different plugin... isn\'t it? :)';
|
103 |
}
|
104 |
else if (license.issue === 'forced') {
|
105 |
+
message = 'ABC';
|
106 |
}
|
107 |
else {
|
108 |
message = <span>There is an unknown error related to the system or this serial key. Really sorry about this! Make sure your security plugins and systems are off temporarily. If you are still experiencing an issue, please <a target='_blank' rel="noreferrer" href='https://meowapps.com/contact/'>contact us</a>.</span>
|
112 |
|
113 |
const jsxNonPro =
|
114 |
<NekoBlock title="Pro Version (Not Installed)" className="primary">
|
115 |
+
You will find more information about the Pro Version <a target='_blank' rel="noreferrer" href={`https://meowapps.com`}>here</a>. If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the <a target='_blank' rel="noreferrer" href='https://meowapps.com/'>Meow Apps Store</a>.
|
116 |
</NekoBlock>;
|
117 |
|
118 |
const jsxProVersion =
|
126 |
{license && success && <NekoMessageSuccess>{message}</NekoMessageSuccess>}
|
127 |
|
128 |
{!license && <NekoTypo p>
|
129 |
+
Insert your serial key above. If you don't have one yet, you can get one <a href="https://meowapps.com">here</a>. If there was an error during the validation, try the <i>Retry</i> to <i>validate</i> button.
|
130 |
</NekoTypo>
|
131 |
}
|
132 |
|
common/premium/licenser.php
CHANGED
@@ -51,17 +51,22 @@ if ( !class_exists( 'MeowCommonPro_Licenser' ) ) {
|
|
51 |
}
|
52 |
|
53 |
function is_registered( $force = false ) {
|
54 |
-
if ( !$force && !empty( $this->license ) )
|
55 |
-
|
|
|
|
|
56 |
$this->license = get_option( $this->prefix . '_license', "" );
|
57 |
-
if ( empty( $this->license ) || !empty( $this->license['issue'] ) )
|
58 |
return false;
|
59 |
-
|
|
|
60 |
return true;
|
|
|
61 |
$datediff = strtotime( $this->license['expires'] ) - time();
|
62 |
$days = floor( $datediff / ( 60 * 60 * 24 * 7 * 3 ) );
|
63 |
-
if ( $days < 0 )
|
64 |
$this->validate_pro( $this->license['key'] );
|
|
|
65 |
return true;
|
66 |
}
|
67 |
|
51 |
}
|
52 |
|
53 |
function is_registered( $force = false ) {
|
54 |
+
if ( !$force && !empty( $this->license ) ) {
|
55 |
+
$has_no_issues = empty( $this->license['issue'] );
|
56 |
+
return $has_no_issues;
|
57 |
+
}
|
58 |
$this->license = get_option( $this->prefix . '_license', "" );
|
59 |
+
if ( empty( $this->license ) || !empty( $this->license['issue'] ) ) {
|
60 |
return false;
|
61 |
+
}
|
62 |
+
if ( $this->license['expires'] == "lifetime" ) {
|
63 |
return true;
|
64 |
+
}
|
65 |
$datediff = strtotime( $this->license['expires'] ) - time();
|
66 |
$days = floor( $datediff / ( 60 * 60 * 24 * 7 * 3 ) );
|
67 |
+
if ( $days < 0 ) {
|
68 |
$this->validate_pro( $this->license['key'] );
|
69 |
+
}
|
70 |
return true;
|
71 |
}
|
72 |
|
gallery-custom-links.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Gallery Custom Links
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Gallery Custom Links allows you to link images from galleries to a specified URL. Tested with WordPress Gallery, Gutenberg, the Meow Gallery and others.
|
6 |
-
Version: 2.0.
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: gallery-custom-links
|
@@ -15,7 +15,7 @@ http://www.gnu.org/licenses/gpl.html
|
|
15 |
*/
|
16 |
|
17 |
if ( !defined( 'MGCL_VERSION' ) ) {
|
18 |
-
define( 'MGCL_VERSION', '2.0.
|
19 |
define( 'MGCL_PREFIX', 'mgcl' );
|
20 |
define( 'MGCL_DOMAIN', 'gallery-custom-links' );
|
21 |
define( 'MGCL_ENTRY', __FILE__ );
|
3 |
Plugin Name: Gallery Custom Links
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Gallery Custom Links allows you to link images from galleries to a specified URL. Tested with WordPress Gallery, Gutenberg, the Meow Gallery and others.
|
6 |
+
Version: 2.0.9
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: gallery-custom-links
|
15 |
*/
|
16 |
|
17 |
if ( !defined( 'MGCL_VERSION' ) ) {
|
18 |
+
define( 'MGCL_VERSION', '2.0.9' );
|
19 |
define( 'MGCL_PREFIX', 'mgcl' );
|
20 |
define( 'MGCL_DOMAIN', 'gallery-custom-links' );
|
21 |
define( 'MGCL_ENTRY', __FILE__ );
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: TigrouMeow
|
|
3 |
Tags: custom, links, gallery, gutenberg
|
4 |
Donate link: https://meowapps.com/donation/
|
5 |
Requires at least: 5.0
|
6 |
-
Tested up to: 5.9.
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 2.0.
|
9 |
|
10 |
Gallery Custom Links allows you to link images from galleries to a specified URL. Tested with WordPress Gallery, Gutenberg, the Meow Gallery and others.
|
11 |
|
@@ -42,14 +42,16 @@ Replace all the files. Nothing else to do.
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
-
= 2.0.
|
46 |
* Fix: Compatibility with the latest version of Gutenberg Gallery.
|
|
|
|
|
|
|
47 |
* Update: Latest versions of DiDom and HTML Dom Parser (might be better and faster).
|
48 |
* Update: Latest version of Neko UI.
|
49 |
|
50 |
= 2.0.6 (2021/09/30) =
|
51 |
* Update: Fix for PHP 7.4+.
|
52 |
-
* Info: If you like the plugin, your reviews are welcome [here](https://wordpress.org/support/plugin/gallery-custom-links/reviews/?rate=5#new-post). Thank you :)
|
53 |
|
54 |
= 2.0.5 (2021/08/31) =
|
55 |
* Update: Enhanced security and updated common librairies.
|
3 |
Tags: custom, links, gallery, gutenberg
|
4 |
Donate link: https://meowapps.com/donation/
|
5 |
Requires at least: 5.0
|
6 |
+
Tested up to: 5.9.2
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 2.0.9
|
9 |
|
10 |
Gallery Custom Links allows you to link images from galleries to a specified URL. Tested with WordPress Gallery, Gutenberg, the Meow Gallery and others.
|
11 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 2.0.9 (2022/03/18) =
|
46 |
* Fix: Compatibility with the latest version of Gutenberg Gallery.
|
47 |
+
* Info: If you like the plugin, your reviews are welcome [here](https://wordpress.org/support/plugin/gallery-custom-links/reviews/?rate=5#new-post). Thank you :)
|
48 |
+
|
49 |
+
= 2.0.8 (2022/03/18) =
|
50 |
* Update: Latest versions of DiDom and HTML Dom Parser (might be better and faster).
|
51 |
* Update: Latest version of Neko UI.
|
52 |
|
53 |
= 2.0.6 (2021/09/30) =
|
54 |
* Update: Fix for PHP 7.4+.
|
|
|
55 |
|
56 |
= 2.0.5 (2021/08/31) =
|
57 |
* Update: Enhanced security and updated common librairies.
|