identity-admin-ui 1.12.38 → 1.12.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -132,4 +132,4 @@ function Xt(e,t){const n=a(e,t);return"production"!==process.env.NODE_ENV?(...t)
132
132
  Copyright (c) 2017 Jed Watson.
133
133
  Licensed under the MIT License (MIT), see
134
134
  http://jedwatson.github.io/classnames
135
- */!function(){var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"==i||"number"==i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"==i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,s;e.exports=(o=n(3),i=n(5),s={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),o=n(1);function i(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),o=t.getEndKey(),i=n.getBlockMap();return i.toSeq().skipUntil((function(e,t){return t===r})).takeUntil((function(e,t){return t===o})).concat([[o,i.get(o)]])}function a(e){return i(e).toList()}function s(e){if(e)return a(e).get(0)}function l(e){if(e){var t=s(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach((function(e,n){e.get("key")===t.get("key")&&(r=n-1)})),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new o.List}function u(e){var t=a(e);if(!t.some((function(e){return e.type!==t.get(0).type})))return t.get(0).type}function d(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function p(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=a(e);if(0<i.size){if(n.getIsBackward()){var s=r;r=o,o=s}for(var l=0;l<i.size;l+=1){var c=0===l?r:0,u=l===i.size-1?o:i.get(l).getText().length;t+=i.get(l).getText().slice(c,u)}}return t}function f(e){var t=e.getCurrentContent(),n=e.getSelection(),o=r.Modifier.removeRange(t,n,"forward"),i=o.getSelectionAfter(),a=o.getBlockForKey(i.getStartKey());return o=r.Modifier.insertText(o,i,"\n",a.getInlineStyleAt(i.getStartOffset()),null),r.EditorState.push(e,o,"insert-fragment")}function m(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return d(r.EditorState.push(e,t,"split-block"))}function h(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),o=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,o,"remove-range")}function g(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function v(e){var t=new o.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach((function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))})),0===t.size)return t=t.clear(),"break"},i=0;i<n.size&&"break"!==r(i);i+=1);return t}var A=Object(o.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(A);function b(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function x(e,t,n){var o,a=e.getSelection();o=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var s=e.getCurrentContent(),l=s.getBlockForKey(o),c=l.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var u=s.getBlockBefore(o);if(!u)return e;if(u.getType()!==c)return e;var d=l.getDepth();if(1===t&&d===n)return e;var p,f,m,h,g,v,A,y=Math.min(u.getDepth()+1,n),b=(f=t,m=y,h=(p=e).getSelection(),v=(g=p.getCurrentContent()).getBlockMap(),A=i(p).map((function(e){var t=e.getDepth()+f;return t=Math.max(0,Math.min(t,m)),e.set("depth",t)})),v=v.merge(A),g.merge({blockMap:v,selectionBefore:h,selectionAfter:h}));return r.EditorState.push(e,b,"adjust-depth")}function w(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):f(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r);if(!b(o)&&"unstyled"!==o.getType()&&o.getLength()===t.getStartOffset())return m(e);if(b(o)&&0===o.getLength()){var i=o.getDepth();if(0===i)return d(e);if(0<i)return x(e,-1,i)}}}(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach((function(e){n[e]=0<=r.indexOf(e)})),n}var o=t.getStartOffset(),i=t.getEndOffset(),s=a(e);if(0<s.size){var l=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<s.size;t+=1){var n=0===t?o:0,r=t===s.size-1?i:s.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=s.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach((function(t){e[t]=e[t]&&r.get(t)===t}))},l=n;l<r;l+=1)a(l)}return{v:e}}();if("object"===M(l))return l.v}return{}}function z(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=s(e),a=r;a<o;a+=1){var l=i.getEntityAt(a);if(!l){t=void 0;break}if(a===r)t=l;else if(t!==l){t=void 0;break}}return t}function T(e,t){var n,r=s(e);return r.findEntityRanges((function(e){return e.get("entity")===t}),(function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}})),n}function D(e,t,n){N[e]["".concat(e.toLowerCase(),"-").concat(n)]=C({},"".concat(t),n)}function P(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},N.color,{},N.bgcolor,{},N.fontSize,{},N.fontFamily,{CODE:N.CODE,SUPERSCRIPT:N.SUPERSCRIPT,SUBSCRIPT:N.SUBSCRIPT})}var N={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function E(e,t,n){var o=e.getSelection(),i=Object.keys(N[t]).reduce((function(e,t){return r.Modifier.removeInlineStyle(e,o,t)}),e.getCurrentContent()),a=r.EditorState.push(e,i,"changeinline-style"),s=e.getCurrentInlineStyle();if(o.isCollapsed()&&(a=s.reduce((function(e,t){return r.RichUtils.toggleInlineStyle(e,t)}),a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)s.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var l="bgcolor"===t?"backgroundColor":t;s.has("".concat(l,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),D(t,l,n))}return a}function B(e){e&&e.getCurrentContent().getBlockMap().map((function(e){return e.get("characterList")})).toList().flatten().forEach((function(e){e&&0===e.indexOf("color-")?D("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?D("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?D("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&D("fontFamily","fontFamily",e.substr(11))}))}function k(e,t,n){var r=e.getInlineStyleAt(n).toList().filter((function(e){return e.startsWith(t.toLowerCase())}));if(r&&0<r.size)return r.get(0)}function L(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach((function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter((function(e){return e.startsWith(t.toLowerCase())}));if(n&&0<n.size)return n.get(0)}(e,t)})),{v:r};var o=n.getStartOffset(),i=n.getEndOffset(),s=a(e);if(0<s.size){for(var l=function(e){var n=0===e?o:0,a=e===s.size-1?i:s.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var l=function(o){o===n?t.forEach((function(t){r[t]=k(s.get(e),t,o)})):t.forEach((function(t){r[t]&&r[t]!==k(s.get(e),t,o)&&(r[t]=void 0)}))},c=n;c<a;c+=1)l(c)},c=0;c<s.size;c+=1)l(c);return{v:r}}}();if("object"===M(n))return n.v}return{}}function I(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach((function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)})),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",(function(){return b})),n.d(t,"changeDepth",(function(){return x})),n.d(t,"handleNewLine",(function(){return w})),n.d(t,"getEntityRange",(function(){return T})),n.d(t,"getCustomStyleMap",(function(){return P})),n.d(t,"toggleCustomInlineStyle",(function(){return E})),n.d(t,"getSelectionEntity",(function(){return z})),n.d(t,"extractInlineStyle",(function(){return B})),n.d(t,"removeAllInlineStyles",(function(){return I})),n.d(t,"getSelectionInlineStyle",(function(){return O})),n.d(t,"getSelectionCustomInlineStyle",(function(){return L})),n.d(t,"getSelectedBlocksMap",(function(){return i})),n.d(t,"getSelectedBlocksList",(function(){return a})),n.d(t,"getSelectedBlock",(function(){return s})),n.d(t,"getBlockBeforeSelectedBlock",(function(){return l})),n.d(t,"getAllBlocks",(function(){return c})),n.d(t,"getSelectedBlocksType",(function(){return u})),n.d(t,"removeSelectedBlocksStyle",(function(){return d})),n.d(t,"getSelectionText",(function(){return p})),n.d(t,"addLineBreakRemovingSelection",(function(){return f})),n.d(t,"insertNewUnstyledBlock",(function(){return m})),n.d(t,"clearEditorContent",(function(){return h})),n.d(t,"setBlockData",(function(){return g})),n.d(t,"getSelectedBlocksMetadata",(function(){return v})),n.d(t,"blockRenderMap",(function(){return y}))}],r.c=s,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,s;e.exports=(o=n(5),i=n(3),s={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),o=n(0),i=function(e,t,n){var r,i=e.textContent;return""===i.trim()?{chunk:(r=n,{text:" ",inlines:[new o.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:i,inlines:Array(i.length).fill(t),entities:Array(i.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new o.OrderedSet],entities:new Array(1),blocks:[]}},s=function(){return{text:"",inlines:[],entities:[],blocks:[]}},l=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new o.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new o.Map({})}]}},u=function(e){return{text:"\r ",inlines:[new o.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new o.Map({})}]}},d=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},p=new o.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),f={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function m(e){return e.style.textAlign?new o.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new o.Map({"margin-left":e.style.marginLeft}):void 0}var h=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",(function(){return y}));var g=" ",v=new RegExp("&nbsp;","g"),A=!0;function y(e,t){var n,y,b=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(v,g)))?(A=!0,{chunk:function e(t,n,o,g,v,y){var b=t.nodeName.toLowerCase();if(y){var x=y(b,t);if(x){var w=r.Entity.__create(x.type,x.mutability,x.data||{});return{chunk:u(w)}}}if("#text"===b&&"\n"!==t.textContent)return i(t,n,v);if("br"===b)return{chunk:a()};if("img"===b&&t instanceof HTMLImageElement){var j={};j.src=t.getAttribute&&t.getAttribute("src")||t.src,j.alt=t.alt,j.height=t.style.height,j.width=t.style.width,t.style.float&&(j.alignment=t.style.float);var C=r.Entity.__create("IMAGE","MUTABLE",j);return{chunk:u(C)}}if("video"===b&&t instanceof HTMLVideoElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var O=r.Entity.__create("VIDEO","MUTABLE",M);return{chunk:u(O)}}if("iframe"===b&&t instanceof HTMLIFrameElement){var z={};z.src=t.getAttribute&&t.getAttribute("src")||t.src,z.height=t.height,z.width=t.width;var T=r.Entity.__create("EMBEDDED_LINK","MUTABLE",z);return{chunk:u(T)}}var D,P=function(e,t){var n=p.filter((function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)})).keySeq().toSet().toArray();if(1===n.length)return n[0]}(b,g);P&&("ul"===b||"ol"===b?(g=b,o+=1):("unordered-list-item"!==P&&"ordered-list-item"!==P&&(g="",o=-1),A?(D=l(P,m(t)),A=!1):D=c(P,o,m(t)))),D=D||s(),n=function(e,t,n){var r,o=f[e];if(o)r=n.add(o).toOrderedSet();else if(t instanceof HTMLElement){var i=t;r=(r=n).withMutations((function(e){var t=i.style.color,n=i.style.backgroundColor,r=i.style.fontSize,o=i.style.fontFamily.replace(/^"|"$/g,""),a=i.style.fontWeight,s=i.style.textDecoration,l=i.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),o&&e.add("fontfamily-".concat(o)),"bold"===a&&e.add(f.strong),"underline"===s&&e.add(f.ins),"italic"===l&&e.add(f.em)})).toOrderedSet()}return r}(b,t,n);for(var N=t.firstChild;N;){var E=e(N,n,o,g,h(N)||v,y).chunk;D=d(D,E),N=N.nextSibling}return{chunk:D}}(y,new o.OrderedSet,-1,"",void 0,n).chunk}):null);if(b){var x=b.chunk,w=new o.OrderedMap({});x.entities&&x.entities.forEach((function(e){e&&(w=w.set(e,r.Entity.__get(e)))}));var j=0;return{contentBlocks:x.text.split("\r").map((function(e,t){var n=j+e.length,i=x&&x.inlines.slice(j,n),a=x&&x.entities.slice(j,n),s=new o.List(i.map((function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)})));return j=n,new r.ContentBlock({key:Object(r.genKey)(),type:x&&x.blocks[t]&&x.blocks[t].type||"unstyled",depth:x&&x.blocks[t]&&x.blocks[t].depth,data:x&&x.blocks[t]&&x.blocks[t].data||new o.Map({}),text:e,characterList:s})})),entityMap:w}}return null}}],r.c=s,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===o(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d(){return function(e,t){t.normalize(e)}}function p(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===o(n))return"[object RegExp]"===o(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):i(n.validate)?a.validate=n.validate:u(t,n),void(i(n.normalize)?a.normalize=n.normalize:n.normalize?u(t,n):a.normalize=d());"[object String]"!==o(n)?u(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:d()};var p,f=Object.keys(e.__compiled__).filter((function(t){return 0<t.length&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+f+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+f+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(p=e).__index__=-1,p.__text_cache__=""}function f(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function m(e,t){var n=new f(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function h(e,t){if(!(this instanceof h))return new h(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},p(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,p(this),this},h.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(l=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),0<=this.__index__},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(m(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(m(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),p(this),this},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",(function(){return ao}));var r=n(1),o=n.n(r),i=n(0),a=n.n(i),s=n(3),l=n(4),c=n(2),u=n.n(c);function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=p((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach((function(t){t(e)}))},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",(function(){t.editorFlag=!0})),document&&(document.addEventListener("click",(function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())})),document.addEventListener("keydown",(function(e){"Escape"===e.key&&t.closeAllModals()})))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter((function(t){return t!==e}))},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}}));function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var g,v=h((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}})),A=[],y={onKeyDown:function(e){A.forEach((function(t){t(e)}))},registerCallBack:function(e){A.push(e)},deregisterCallBack:function(e){A=A.filter((function(t){return t!==e}))}},b=function(){g=!0},x=function(){g=!1},w=function(){return g};function j(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function C(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function O(e){e.stopPropagation()}function z(e){return e[e.options[0]].icon}function T(e,t){if(e&&void 0===t)return e;var n={};return C(e,(function(e,r){var o;o=r,"[object Object]"===Object.prototype.toString.call(o)?n[e]=T(r,t[e]):n[e]=void 0!==t[e]?t[e]:r})),n}var D=n(6),P=n.n(D),N=n(5);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var H=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(i,r.Component);var e,t,n=I(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,o=t.value;n||r(o)},e}return e=i,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,i=t.activeClassName,a=t.active,s=t.disabled,l=t.title;return o.a.createElement("div",{className:u()("rdw-option-wrapper",r,(B(e={},"rdw-option-active ".concat(i),a),B(e,"rdw-option-disabled",s),e)),onClick:this.onClick,"aria-selected":a,title:l},n)}}])&&k(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t){return(F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}H.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},H.defaultProps={activeClassName:""},n(12);var X=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(i,r.Component);var e,t,n=V(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,i=t.className,a=t.optionWrapperClassName,s=t.ariaLabel,l=t.onExpandEvent,c=t.title,d=this.state.highlighted,p=r.slice(1,r.length);return o.a.createElement("div",{className:u()("rdw-dropdown-wrapper",i),"aria-expanded":n,"aria-label":s||"rdw-dropdown"},o.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:l,title:c},r[0],o.a.createElement("div",{className:u()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?o.a.createElement("ul",{className:u()("rdw-dropdown-optionwrapper",a),onClick:O},o.a.Children.map(p,(function(t,n){return t&&o.a.cloneElement(t,{onSelect:e.onChange,highlighted:d===n,setHighlighted:e.setHighlighted,index:n})}))):void 0)}}])&&W(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t){return(U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}X.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var J=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(i,r.Component);var e,t,n=q(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,o=n.onClick,i=n.value;n.disabled||(r&&r(i),o&&(t.stopPropagation(),o(i)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=i,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,i=t.disabled,a=t.highlighted,s=t.className,l=t.activeClassName,c=t.disabledClassName,d=t.highlightedClassName,p=t.title;return o.a.createElement("li",{className:u()("rdw-dropdownoption-default",s,(G(e={},"rdw-dropdownoption-active ".concat(l),r),G(e,"rdw-dropdownoption-highlighted ".concat(d),a),G(e,"rdw-dropdownoption-disabled ".concat(c),i),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:p},n)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ee(e,t){return(ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ne(e);if(t){var o=ne(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}J.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},J.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var re=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(i,r.Component);var e,t,n=te(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),n.apply(this,arguments)}return e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,i=e.translations;return o.a.createElement("div",{className:u()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map((function(e,a){return o.a.createElement(H,{key:a,value:e,onClick:r,className:u()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||i["components.controls.inline.".concat(e)]},o.a.createElement("img",{alt:"",src:t[e].icon}))})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,i=e.onExpandEvent,a=e.doCollapse,s=e.currentState,l=e.onChange,c=e.translations,d=t.className,p=t.dropdownClassName,f=t.title;return o.a.createElement(X,{className:u()("rdw-inline-dropdown",d),optionWrapperClassName:u()(p),onChange:l,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:i,"aria-label":"rdw-inline-control",title:f},o.a.createElement("img",{src:z(t),alt:""}),t.options.map((function(e,n){return o.a.createElement(J,{key:n,value:e,className:u()("rdw-inline-dropdownoption",t[e].className),active:!0===s[e]||"MONOSPACE"===e&&s.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},o.a.createElement("img",{src:t[e].icon,alt:""}))})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ae(e,t){return(ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=le(e);if(t){var o=le(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}re.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ce=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(i,r.Component);var e,t,n=se(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,o=r.editorState,i=r.onChange,a=s.RichUtils.toggleInlineStyle(o,n);if("subscript"===e||"superscript"===e){var l="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=s.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),l);a=s.EditorState.push(a,c,"change-inline-style")}a&&i(a)},t.changeKeys=function(e){if(e){var t={};return C(e,(function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n})),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,o=r.editorState,a=r.modalHandler;return t.state={currentStyles:o?t.changeKeys(Object(l.getSelectionInlineStyle)(o)):{}},a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(l.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentStyles,s=t.component||re;return o.a.createElement(s,{config:t,translations:n,currentState:a,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return(pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=me(e);if(t){var o=me(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ce.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pe(e,t)}(i,r.Component);var e,t,n=fe(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,i=t.currentState.blockType;return o.a.createElement("div",{className:u()("rdw-inline-wrapper",n)},e.map((function(e,t){return o.a.createElement(H,{key:t,value:e.label,active:i===e.label,onClick:r},e.displayName)})))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,i=n.dropdownClassName,a=n.title,s=t.currentState.blockType,l=t.expanded,c=t.doExpand,d=t.onExpandEvent,p=t.doCollapse,f=t.onChange,m=t.translations,h=this.state.blockTypes.filter((function(e){return e.label===s})),g=h&&h[0]&&h[0].displayName;return o.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},o.a.createElement(X,{className:u()("rdw-block-dropdown",r),optionWrapperClassName:u()(i),onChange:f,expanded:l,doExpand:c,doCollapse:p,onExpandEvent:d,title:a||m["components.controls.blocktype.blocktype"]},o.a.createElement("span",null,g||m["components.controls.blocktype.blocktype"]),e.map((function(e,t){return o.a.createElement(J,{active:s===e.label,value:e.label,key:t},e.displayName)}))))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter((function(t){var n=t.label;return-1<e.options.indexOf(n)}));return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&de(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ge=he;function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ye(e,t){return(ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xe(e);if(t){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(i,r.Component);var e,t,n=be(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find((function(t){return t.label===e})).style,r=t.props,o=r.editorState,i=r.onChange,a=s.RichUtils.toggleBlockType(o,n);a&&i(a)};var r=e.editorState,o=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(l.getSelectedBlocksType)(r):"unstyled"},o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(l.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentBlockType,s=t.component||ge,l=this.blocksTypes.find((function(e){return e.style===a}));return o.a.createElement(s,{config:t,translations:n,currentState:{blockType:l&&l.label},onChange:this.toggleBlockType,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var je=we;function Ce(e){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t){return(Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Te(e);if(t){var o=Te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var De=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oe(e,t)}(i,r.Component);var e,t,n=ze(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.dropdownClassName,a=t.options,s=t.title,l=e.onChange,c=e.expanded,d=e.doCollapse,p=e.onExpandEvent,f=e.doExpand,m=e.translations,h=this.props.currentState.fontSize,g=this.state.defaultFontSize;return g=Number(g),h=h||a&&0<=a.indexOf(g)&&g,o.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},o.a.createElement(X,{className:u()("rdw-fontsize-dropdown",r),optionWrapperClassName:u()(i),onChange:l,expanded:c,doExpand:f,doCollapse:d,onExpandEvent:p,title:s||m["components.controls.fontsize.fontsize"]},h?o.a.createElement("span",null,h):o.a.createElement("img",{src:n,alt:""}),a.map((function(e,t){return o.a.createElement(J,{className:"rdw-fontsize-option",active:h===e,value:e,key:t},e)}))))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ee(e,t){return(Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ke(e);if(t){var o=ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ee(e,t)}(i,r.Component);var e,t,n=Be(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,o=n.onChange,i=Object(l.toggleCustomInlineStyle)(r,"fontSize",e);i&&o(i)};var r=e.editorState,o=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(l.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentFontSize,s=t.component||De,l=a&&Number(a.substring(9));return o.a.createElement(s,{config:t,translations:n,currentState:{fontSize:l},onChange:this.toggleFontSize,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Ne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function He(e,t){return(He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=We(e);if(t){var o=We(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var Fe=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(i,r.Component);var e,t,n=Re(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,i=n.dropdownClassName,a=n.options,s=n.title,l=t.translations,c=t.onChange,d=t.expanded,p=t.doCollapse,f=t.onExpandEvent,m=t.doExpand,h=this.props.currentState.fontFamily;return h=h||a&&e&&a.some((function(t){return t.toLowerCase()===e.toLowerCase()}))&&e,o.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},o.a.createElement(X,{className:u()("rdw-fontfamily-dropdown",r),optionWrapperClassName:u()("rdw-fontfamily-optionwrapper",i),onChange:c,expanded:d,doExpand:m,doCollapse:p,onExpandEvent:f,title:s||l["components.controls.fontfamily.fontfamily"]},o.a.createElement("span",{className:"rdw-fontfamily-placeholder"},h||l["components.controls.fontfamily.fontfamily"]),a.map((function(e,t){return o.a.createElement(J,{active:h===e,value:e,key:t},e)}))))}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Fe.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Ve=Fe;function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var o=Ze(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ue=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(i,r.Component);var e,t,n=Ge(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,o=n.onChange,i=Object(l.toggleCustomInlineStyle)(r,"fontFamily",e);i&&o(i)};var r=e.editorState,o=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(l.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentFontFamily,s=t.component||Ve,l=a&&a.substring(11);return o.a.createElement(s,{translations:n,config:t,currentState:{fontFamily:l},onChange:this.toggleFontFamily,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function qe(e){return(qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Je(e,t){return(Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$e(e);if(t){var o=$e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ue.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(i,r.Component);var e,t,n=_e(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,i=e.indentDisabled,a=e.outdentDisabled,s=t.options,l=t.unordered,c=t.ordered,d=t.indent,p=t.outdent,f=t.className;return o.a.createElement("div",{className:u()("rdw-list-wrapper",f),"aria-label":"rdw-list-control"},0<=s.indexOf("unordered")&&o.a.createElement(H,{value:"unordered",onClick:this.toggleBlockType,className:u()(l.className),active:"unordered"===n,title:l.title||r["components.controls.list.unordered"]},o.a.createElement("img",{src:l.icon,alt:""})),0<=s.indexOf("ordered")&&o.a.createElement(H,{value:"ordered",onClick:this.toggleBlockType,className:u()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},o.a.createElement("img",{src:c.icon,alt:""})),0<=s.indexOf("indent")&&o.a.createElement(H,{onClick:this.indent,disabled:i,className:u()(d.className),title:d.title||r["components.controls.list.indent"]},o.a.createElement("img",{src:d.icon,alt:""})),0<=s.indexOf("outdent")&&o.a.createElement(H,{onClick:this.outdent,disabled:a,className:u()(p.className),title:p.title||r["components.controls.list.outdent"]},o.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,i=t.doCollapse,a=t.doExpand,s=t.onExpandEvent,l=t.onChange,c=t.currentState.listType,d=t.translations,p=n.options,f=n.className,m=n.dropdownClassName,h=n.title;return o.a.createElement(X,{className:u()("rdw-list-dropdown",f),optionWrapperClassName:u()(m),onChange:l,expanded:r,doExpand:a,doCollapse:i,onExpandEvent:s,"aria-label":"rdw-list-control",title:h||d["components.controls.list.list"]},o.a.createElement("img",{src:z(n),alt:""}),this.options.filter((function(e){return 0<=p.indexOf(e)})).map((function(t,r){return o.a.createElement(J,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:u()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||d["components.controls.list.".concat(t)]},o.a.createElement("img",{src:n[t].icon,alt:""}))})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function tt(e){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rt(e,t){return(rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ot(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=it(e);if(t){var o=it(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}et.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var at=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rt(e,t)}(i,r.Component);var e,t,n=ot(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,o=n.editorState,i=s.RichUtils.toggleBlockType(o,e);i&&r(i)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,o=n.editorState,i=Object(l.changeDepth)(o,e,4);i&&r(i)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(l.getBlockBeforeSelectedBlock)(e);return!r||!Object(l.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(l.isListBlock)(e)||e.get("depth")<=0};var r=t.props,o=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:o?Object(l.getSelectedBlock)(o):void 0},a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(l.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,i=this.state,a=i.expanded,s=i.currentBlock,l=n.component||et;"unordered-list-item"===s.get("type")?e="unordered":"ordered-list-item"===s.get("type")&&(e="ordered");var c=this.isIndentDisabled(),u=this.isOutdentDisabled();return o.a.createElement(l,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:u})}}])&&nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ct(e,t){return(ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dt(e);if(t){var o=dt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===st(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}at.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var pt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ct(e,t)}(i,r.Component);var e,t,n=ut(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),n.apply(this,arguments)}return e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,i=t.center,a=t.right,s=t.justify,l=t.className,c=e.onChange,d=e.currentState.textAlignment,p=e.translations;return o.a.createElement("div",{className:u()("rdw-text-align-wrapper",l),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&o.a.createElement(H,{value:"left",className:u()(r.className),active:"left"===d,onClick:c,title:r.title||p["components.controls.textalign.left"]},o.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&o.a.createElement(H,{value:"center",className:u()(i.className),active:"center"===d,onClick:c,title:i.title||p["components.controls.textalign.center"]},o.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("right")&&o.a.createElement(H,{value:"right",className:u()(a.className),active:"right"===d,onClick:c,title:a.title||p["components.controls.textalign.right"]},o.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&o.a.createElement(H,{value:"justify",className:u()(s.className),active:"justify"===d,onClick:c,title:s.title||p["components.controls.textalign.justify"]},o.a.createElement("img",{src:s.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,i=e.onExpandEvent,a=e.doCollapse,s=e.currentState.textAlignment,l=e.onChange,c=e.translations,d=t.options,p=t.left,f=t.center,m=t.right,h=t.justify,g=t.className,v=t.dropdownClassName,A=t.title;return o.a.createElement(X,{className:u()("rdw-text-align-dropdown",g),optionWrapperClassName:u()(v),onChange:l,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:i,"aria-label":"rdw-textalign-control",title:A||c["components.controls.textalign.textalign"]},o.a.createElement("img",{src:s&&t[s]&&t[s].icon||z(t),alt:""}),0<=d.indexOf("left")&&o.a.createElement(J,{value:"left",active:"left"===s,className:u()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.left"]},o.a.createElement("img",{src:p.icon,alt:""})),0<=d.indexOf("center")&&o.a.createElement(J,{value:"center",active:"center"===s,className:u()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.center"]},o.a.createElement("img",{src:f.icon,alt:""})),0<=d.indexOf("right")&&o.a.createElement(J,{value:"right",active:"right"===s,className:u()("rdw-text-align-dropdownOption",m.className),title:m.title||c["components.controls.textalign.right"]},o.a.createElement("img",{src:m.icon,alt:""})),0<=d.indexOf("justify")&&o.a.createElement(J,{value:"justify",active:"justify"===s,className:u()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.justify"]},o.a.createElement("img",{src:h.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&lt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function ft(e){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vt(e);if(t){var o=vt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function vt(e){return(vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var At=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(i,r.Component);var e,t,n=gt(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(l.setBlockData)(r,{"text-align":e}):Object(l.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(l.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentTextAlignment,s=t.component||pt;return o.a.createElement(s,{config:t,translations:n,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&mt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function yt(e){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jt(e);if(t){var o=jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===yt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}At.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Ct=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xt(e,t)}(i,r.Component);var e,t,n=wt(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,i=n.colors,a=t.currentState,s=a.color,l=a.bgColor,c=t.translations,d=e.state.currentStyle,p="color"===d?s:l;return o.a.createElement("div",{className:u()("rdw-colorpicker-modal",r),onClick:O},o.a.createElement("span",{className:"rdw-colorpicker-modal-header"},o.a.createElement("span",{className:u()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===d}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),o.a.createElement("span",{className:u()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===d}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),o.a.createElement("span",{className:"rdw-colorpicker-modal-options"},i.map((function(t,n){return o.a.createElement(H,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:p===t,onClick:e.onChange},o.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))}))))},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:i||l["components.controls.colorpicker.colorpicker"]},o.a.createElement(H,{onClick:s,className:u()(r)},o.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Ct.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Ct;function Ot(e){return(Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pt(e);if(t){var o=Pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(i,r.Component);var e,t,n=Dt(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,o=r.editorState,i=r.onChange,a=Object(l.toggleCustomInlineStyle)(o,e,n);a&&i(a),t.doCollapse()};var r=e.editorState,o=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(l.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(l.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(l.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(l.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.currentColor,a=r.currentBgColor,s=r.expanded,l=t.component||Mt,c=i&&i.substring(6),u=a&&a.substring(8);return o.a.createElement(l,{config:t,translations:n,onChange:this.toggleColor,expanded:s,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:u}})}}])&&zt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Nt.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Et=Nt,Bt=n(7),kt=n.n(Bt);function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function St(e,t){return(St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rt(e);if(t){var o=Rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Wt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&St(e,t)}(i,r.Component);var e,t,n=Ht(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,o;e.setState((n={},r="".concat(t.target.name),o=t.target.value,r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,o=r.link,i=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:o&&o.target||"",linkTargetOption:o&&o.targetOption||a,linkTitle:o&&o.title||i})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,o=r.link,i=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:o&&o.target,linkTargetOption:o&&o.targetOption||a,linkTitle:o&&o.title||i})},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,i=this.state,a=i.linkTitle,s=i.linkTarget,l=i.linkTargetOption;return o.a.createElement("div",{className:u()("rdw-link-modal",t),onClick:O},o.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),o.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),o.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),o.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:s}),o.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},o.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===l,value:"_blank",onChange:this.updateTargetOption}),o.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),o.a.createElement("span",{className:"rdw-link-modal-buttonsection"},o.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!s||!a},r["generic.add"]),o.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,i=t.unlink,a=t.className,s=e.currentState,l=e.expanded,c=e.translations,d=this.state.showModal;return o.a.createElement("div",{className:u()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&o.a.createElement(H,{value:"unordered-list-item",className:u()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":d,title:r.title||c["components.controls.link.link"]},o.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&o.a.createElement(H,{disabled:!s.link,value:"ordered-list-item",className:u()(i.className),onClick:this.removeLink,title:i.title||c["components.controls.link.unlink"]},o.a.createElement("img",{src:i.icon,alt:""})),l&&d?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,i=e.doExpand,a=e.onChange,s=e.config,l=e.currentState,c=e.translations,d=s.options,p=s.link,f=s.unlink,m=s.className,h=s.dropdownClassName,g=s.title,v=this.state.showModal;return o.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:g},o.a.createElement(X,{className:u()("rdw-link-dropdown",m),optionWrapperClassName:u()(h),onChange:a,expanded:t&&!v,doExpand:i,doCollapse:r,onExpandEvent:n},o.a.createElement("img",{src:z(s),alt:""}),0<=d.indexOf("link")&&o.a.createElement(J,{onClick:this.forceExpandAndShowModal,className:u()("rdw-link-dropdownoption",p.className),title:p.title||c["components.controls.link.link"]},o.a.createElement("img",{src:p.icon,alt:""})),0<=d.indexOf("unlink")&&o.a.createElement(J,{onClick:this.removeLink,disabled:!l.link,className:u()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.unlink"]},o.a.createElement("img",{src:f.icon,alt:""}))),t&&v?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&It(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Wt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var Ft=Wt;function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xt(e,t){return(Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gt(e);if(t){var o=Gt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Vt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach((function(t){qt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kt(e){var t=Jt.match(e.target);return Ut(Ut({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Jt=kt()(),_t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(i,r.Component);var e,t,n=Yt(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,o){var i=t.props.config.linkCallback;if("link"===e){var a=(i||Kt)({title:n,target:r,targetOption:o});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),o={};if(n&&"LINK"===r.getEntity(n).get("type")){o.link={};var i=n&&Object(l.getEntityRange)(e,n);o.link.target=n&&r.getEntity(n).get("data").url,o.link.targetOption=n&&r.getEntity(n).get("data").targetOption,o.link.title=i&&i.text}return o.selectionText=Object(l.getSelectionText)(e),o},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,o=t.state.currentEntity,i=n.getSelection();if(o){var a=Object(l.getEntityRange)(n,o);i=i.getIsBackward()?i.merge({anchorOffset:a.end,focusOffset:a.start}):i.merge({anchorOffset:a.start,focusOffset:a.end}),r(s.RichUtils.toggleLink(n,i,null))}},t.addLink=function(e,n,r){var o=t.props,i=o.editorState,a=o.onChange,c=t.state.currentEntity,u=i.getSelection();if(c){var d=Object(l.getEntityRange)(i,c);u=u.getIsBackward()?u.merge({anchorOffset:d.end,focusOffset:d.start}):u.merge({anchorOffset:d.start,focusOffset:d.end})}var p=i.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),f=s.Modifier.replaceText(i.getCurrentContent(),u,"".concat(e),i.getCurrentInlineStyle(),p),m=s.EditorState.push(i,f,"insert-characters");u=m.getSelection().merge({anchorOffset:u.get("anchorOffset")+e.length,focusOffset:u.get("anchorOffset")+e.length}),m=s.EditorState.acceptSelection(m,u),f=s.Modifier.insertText(m.getCurrentContent(),u," ",m.getCurrentInlineStyle(),void 0),a(s.EditorState.push(m,f,"insert-characters")),t.doCollapse()};var r=t.props,o=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:o?Object(l.getSelectionEntity)(o):void 0},a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=this.getCurrentValues(),a=i.link,s=i.selectionText,l=t.component||Ft;return o.a.createElement(l,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:s},onChange:this.onChange})}}])&&Qt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();_t.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var $t=_t;function en(e){return(en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nn(e,t){return(nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=on(e);if(t){var o=on(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===en(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function on(e){return(on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var an=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nn(e,t)}(i,r.Component);var e,t,n=rn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,o;e.setState((n={},r="".concat(t.target.name),o=t.target.value,r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var o=r.defaultSize,i=o.height,a=o.width;this.setState({embeddedLink:"",height:i,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,i=this.props,a=i.config.popupClassName,s=i.doCollapse,l=i.translations;return o.a.createElement("div",{className:u()("rdw-embedded-modal",a),onClick:O},o.a.createElement("div",{className:"rdw-embedded-modal-header"},o.a.createElement("span",{className:"rdw-embedded-modal-header-option"},l["components.controls.embedded.embeddedlink"],o.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),o.a.createElement("div",{className:"rdw-embedded-modal-link-section"},o.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},o.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:l["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),o.a.createElement("div",{className:"rdw-embedded-modal-size"},o.a.createElement("span",null,o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),o.a.createElement("span",null,o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),o.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},o.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},l["generic.add"]),o.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:s},l["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},o.a.createElement(H,{className:u()(r),value:"unordered-list-item",onClick:s,title:i||l["components.controls.embedded.embedded"]},o.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();an.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var sn=an;function ln(e){return(ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function un(e,t){return(un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pn(e);if(t){var o=pn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ln(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function pn(e){return(pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&un(e,t)}(i,r.Component);var e,t,n=dn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var o=e.props,i=o.editorState,a=o.onChange,l=o.config.embedCallback,c=l?l(t):t,u=i.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(s.AtomicBlockUtils.insertAtomicBlock(i,u," ")),e.doCollapse()},e}return e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||sn;return o.a.createElement(i,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();fn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var mn=fn;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t){return(vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function An(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yn(e);if(t){var o=yn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var bn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vn(e,t)}(i,r.Component);var e,t,n=An(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=i,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return o.a.createElement("div",{className:u()("rdw-emoji-modal",n),onClick:O},r.map((function(t,n){return o.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)})))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:i||l["components.controls.emoji.emoji"]},o.a.createElement(H,{className:u()(r),value:"unordered-list-item",onClick:s},o.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&gn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();bn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var xn=bn;function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=On(e);if(t){var o=On(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function On(e){return(On=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(i,r.Component);var e,t,n=Mn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,o=n.onChange,i=s.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());o(s.EditorState.push(r,i,"insert-characters")),e.doCollapse()},e}return e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||xn;return o.a.createElement(i,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&jn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Tn(){return o.a.createElement("div",{className:"rdw-spinner"},o.a.createElement("div",{className:"rdw-bounce1"}),o.a.createElement("div",{className:"rdw-bounce2"}),o.a.createElement("div",{className:"rdw-bounce3"}))}function Dn(e){return(Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nn(e,t){return(Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function En(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bn(e);if(t){var o=Bn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}zn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var kn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nn(e,t)}(i,r.Component);var e,t,n=En(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var o=0;o<n.length;o+=1)if((!r||"file"===n[o].kind)&&n[o].type.match("^image/")){var i=r?n[o].getAsFile():n[o];e.uploadImage(i)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,o=e.state,i=o.height,a=o.width,s=e.props.onChange;isNaN(i)||(i+="px"),isNaN(a)||(a+="px"),s(n,i,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,o;e.setState((n={},r="".concat(t.target.name),o=t.target.value,r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then((function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1})).catch((function(){e.setState({showImageLoading:!1,dragEnter:!1})}))},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,i=e.dragEnter,a=e.height,s=e.width,l=e.alt,c=this.props,d=c.config,p=d.popupClassName,f=d.uploadCallback,m=d.uploadEnabled,h=d.urlEnabled,g=d.previewImage,v=d.inputAccept,A=d.alt,y=c.doCollapse,b=c.translations;return o.a.createElement("div",{className:u()("rdw-image-modal",p),onClick:this.stopPropagation},o.a.createElement("div",{className:"rdw-image-modal-header"},m&&f&&o.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},b["components.controls.image.fileUpload"],o.a.createElement("span",{className:u()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),h&&o.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},b["components.controls.image.byURL"],o.a.createElement("span",{className:u()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?o.a.createElement("div",{onClick:this.fileUploadClick},o.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:u()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":i})},o.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},g&&t?o.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||b["components.controls.image.dropFileText"])),o.a.createElement("input",{type:"file",id:"file",accept:v,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):o.a.createElement("div",{className:"rdw-image-modal-url-section"},o.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:b["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),A.present&&o.a.createElement("div",{className:"rdw-image-modal-size"},o.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},A.mandatory&&"*")),o.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),o.a.createElement("span",{className:"rdw-image-modal-btn-section"},o.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!s||A.mandatory&&!l},b["generic.add"]),o.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},b["generic.cancel"])),r?o.a.createElement("div",{className:"rdw-image-modal-spinner"},o.a.createElement(Tn,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},o.a.createElement(H,{className:u()(r),value:"unordered-list-item",onClick:s,title:i||l["components.controls.image.image"]},o.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();kn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var Ln=kn;function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hn(e,t){return(Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wn(e);if(t){var o=Wn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===In(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Wn(e){return(Wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hn(e,t)}(i,r.Component);var e,t,n=Rn(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,o){var i=t.props,a=i.editorState,l=i.onChange,c={src:e,height:n,width:r};i.config.alt.present&&(c.alt=o);var u=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();l(s.AtomicBlockUtils.insertAtomicBlock(a,u," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||Ln;return o.a.createElement(i,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Sn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Vn(e){var t=e.config,n=e.onChange,r=e.translations,i=t.icon,a=t.className,s=t.title;return o.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},o.a.createElement(H,{className:u()(a),onClick:n,title:s||r["components.controls.remove.remove"]},o.a.createElement("img",{src:i,alt:""})))}Fn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Qn=Fn;n(31),Vn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Xn=Vn;function Yn(e){return(Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zn(e,t){return(Zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Un(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qn(e);if(t){var o=qn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Yn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qn(e){return(qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zn(e,t)}(i,r.Component);var e,t,n=Un(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach((function(n){t=s.Modifier.removeInlineStyle(t,e.getSelection(),n)})),C(Object(l.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),(function(n,r){r&&(t=s.Modifier.removeInlineStyle(t,e.getSelection(),r))})),s.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||Xn;return o.a.createElement(i,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Gn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Jn(e){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $n(e,t){return($n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tr(e);if(t){var o=tr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function tr(e){return(tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Kn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var nr=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$n(e,t)}(i,r.Component);var e,t,n=er(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=i,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,i=e.onExpandEvent,a=e.doCollapse,s=e.currentState,l=s.undoDisabled,c=s.redoDisabled,d=e.translations,p=t.options,f=t.undo,m=t.redo,h=t.className,g=t.dropdownClassName,v=t.title;return o.a.createElement(X,{className:u()("rdw-history-dropdown",h),optionWrapperClassName:u()(g),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:i,"aria-label":"rdw-history-control",title:v||d["components.controls.history.history"]},o.a.createElement("img",{src:z(t),alt:""}),0<=p.indexOf("undo")&&o.a.createElement(J,{value:"undo",onClick:this.onChange,disabled:l,className:u()("rdw-history-dropdownoption",f.className),title:f.title||d["components.controls.history.undo"]},o.a.createElement("img",{src:f.icon,alt:""})),0<=p.indexOf("redo")&&o.a.createElement(J,{value:"redo",onClick:this.onChange,disabled:c,className:u()("rdw-history-dropdownoption",m.className),title:m.title||d["components.controls.history.redo"]},o.a.createElement("img",{src:m.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,i=t.redo,a=t.className,s=e.currentState,l=s.undoDisabled,c=s.redoDisabled,d=e.translations;return o.a.createElement("div",{className:u()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&o.a.createElement(H,{value:"undo",onClick:this.onChange,className:u()(r.className),disabled:l,title:r.title||d["components.controls.history.undo"]},o.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&o.a.createElement(H,{value:"redo",onClick:this.onChange,className:u()(i.className),disabled:c,title:i.title||d["components.controls.history.redo"]},o.a.createElement("img",{src:i.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&_n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function rr(e){return(rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ir(e,t){return(ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sr(e);if(t){var o=sr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function sr(e){return(sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}nr.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var lr=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ir(e,t)}(i,r.Component);var e,t,n=ar(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,o=n.onChange,i=s.EditorState[e](r);i&&o(i)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},o=e.editorState,a=e.modalHandler;return o&&(r.undoDisabled=0===o.getUndoStack().size,r.redoDisabled=0===o.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.undoDisabled,a=r.redoDisabled,s=r.expanded,l=t.component||nr;return o.a.createElement(l,{config:t,translations:n,currentState:{undoDisabled:i,redoDisabled:a},expanded:s,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&or(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();lr.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var cr={inline:ce,blockType:je,fontSize:Le,fontFamily:Ue,list:at,textAlign:At,colorPicker:Et,link:$t,embedded:mn,emoji:zn,image:Qn,remove:Kn,history:lr},ur=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,dr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function pr(e){return String(e).replace(ur,"").match(dr)?e:"#"}function fr(e){return(fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vr(e);if(t){var o=vr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===fr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ar(e,t,n){e.findEntityRanges((function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()}),t)}function yr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,i=gr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,o=window.open(pr(r),"blank");o&&o.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,i=e.contentState.getEntity(r).getData(),a=i.url,s=i.targetOption,l=this.state.showPopOver;return o.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},o.a.createElement("a",{href:pr(a),target:s},t),l&&n?o.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&mr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xr(e,t,n){return t&&br(e.prototype,t),n&&br(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var wr=xr((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,i=e.contentState.getEntity(n).getData(),a=i.url,s=i.value;return o.a.createElement("a",{href:a||s,className:u()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t}));wr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges((function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()}),t)};var jr=wr;function Cr(e){return(Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mr(e,t){return(Mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zr(e);if(t){var o=zr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Cr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function zr(e){return(zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dr(e,t,n){return t&&Tr(e.prototype,t),n&&Tr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Nr=Dr((function e(t){var n=this;Pr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,o=r.separator,i=r.trigger,a=r.getSuggestions,s=(0,r.getEditorState)().getSelection();if(s.get("anchorKey")===e.get("key")&&s.get("anchorKey")===s.get("focusKey")){var l=e.getText(),c=(l=l.substr(0,s.get("focusOffset")===l.length-1?l.length:s.get("focusOffset")+1)).lastIndexOf(o+i),u=o+i;if((void 0===c||c<0)&&l[0]===i&&(c=0,u=i),0<=c){var d=l.substr(c+u.length,l.length);a().some((function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(d):0<=e.value.toLowerCase().indexOf(d&&d.toLowerCase()))}))&&t(0===c?0:c+1,l.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mr(e,t)}(n,r.Component);var e=Or(n);function n(){var r;Pr(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=e.call.apply(e,[this].concat(i))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,x()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),o=t.getSuggestions();r.filteredSuggestions=o&&o.filter((function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))}))},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),o=t.onChange,i=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,o){var i=o.value,a=o.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(i),value:i,url:a}).getLastCreatedEntityKey(),u=Object(l.getSelectedBlock)(e).getText(),d=e.getSelection().focusOffset,p=(u.lastIndexOf(n+r,d)||0)+1,f=!1;u.length===p+1&&(d=u.length)," "===u[d]&&(f=!0);var m=e.getSelection().merge({anchorOffset:p,focusOffset:d}),h=s.EditorState.acceptSelection(e,m),g=s.Modifier.replaceText(h.getCurrentContent(),m,"".concat(r).concat(i),h.getCurrentInlineStyle(),c);h=s.EditorState.push(h,g,"insert-characters"),f||(m=h.getSelection().merge({anchorOffset:p+i.length+r.length,focusOffset:p+i.length+r.length}),h=s.EditorState.acceptSelection(h,m),g=s.Modifier.insertText(h.getCurrentContent(),m," ",h.getCurrentInlineStyle(),void 0)),t(s.EditorState.push(h,g,"insert-characters"))}(n,o,i,a,c)},r}return Dr(n,[{key:"componentDidMount",value:function(){var e,n,r,o=t.getWrapperRef().getBoundingClientRect(),i=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();o.width<i.left-o.left+a.width?n=15:e=15,o.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),y.registerCallBack(this.onEditorKeyDown),b(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){y.deregisterCallBack(this.onEditorKeyDown),x(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,i=r.activeOption,a=r.showSuggestions,s=t.dropdownClassName,l=t.optionClassName;return o.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},o.a.createElement("span",null,n),a&&o.a.createElement("span",{className:u()("rdw-suggestion-dropdown",s),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map((function(t,n){return o.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:u()("rdw-suggestion-option",l,{"rdw-suggestion-option-active":n===i})},t.text)}))))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var i=t.separator,c=t.trigger,d=t.getSuggestions,p=t.onChange,f=t.getEditorState,m=t.getWrapperRef,h=t.caseSensitive,g=t.dropdownClassName,v=t.optionClassName,A=t.modalHandler;this.config={separator:i,trigger:c,getSuggestions:d,onChange:p,getEditorState:f,getWrapperRef:m,caseSensitive:h,dropdownClassName:g,optionClassName:v,modalHandler:A}})),Er=function(e){return[new jr(e.mentionClassName).getMentionDecorator(),new Nr(e).getSuggestionDecorator()]};function Br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kr(e,t,n){return t&&Br(e.prototype,t),n&&Br(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,i=n.height,a=n.width;return o.a.createElement("iframe",{height:i,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Ir=kr((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return o.a.createElement("a",{href:r,className:u()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),o=0,i=0;0<r.length&&0<=o;)if(r[0]===n.hashCharacter?(i=o=0,r=r.substr(n.hashCharacter.length)):0<=(o=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(o+(n.separator+n.hashCharacter).length),i+=o+n.separator.length),0<=o){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,s=r.substr(0,a);s&&0<s.length&&(t(i,i+s.length+n.hashCharacter.length),i+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "})),Sr=function(e){return new Ir(e).getHashtagDecorator()};Lr.propTypes={block:a.a.object,contentState:a.a.object};var Hr=Lr;function Rr(e){return(Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fr(e,t){return(Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qr(e);if(t){var o=Qr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qr(e){return(Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Xr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fr(e,t)}(a,r.Component);var t,n,i=Vr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=i.call.apply(i,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,o=r.block,i=r.contentState,a=o.getEntityAt(0);i.mergeEntityData(a,{alignment:n}),e.onChange(s.EditorState.push(e.getEditorState(),i,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return o.a.createElement("div",{className:u()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},o.a.createElement(H,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),o.a.createElement(H,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),o.a.createElement(H,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,i=this.state.hovered,a=e.isReadOnly,s=e.isImageAlignmentEnabled,l=r.getEntity(n.getEntityAt(0)).getData(),c=l.src,d=l.alignment,p=l.height,f=l.width,m=l.alt;return o.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:u()("rdw-image-alignment",{"rdw-image-left":"left"===d,"rdw-image-right":"right"===d,"rdw-image-center":!d||"none"===d})},o.a.createElement("span",{className:"rdw-image-imagewrapper"},o.a.createElement("img",{src:c,alt:m,style:{height:p,width:f}}),!a()&&i&&s()?this.renderAlignmentOptions(d):void 0))}}])&&Wr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Yr=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var o=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(o&&"IMAGE"===o.type)return{component:Xr(e),editable:!1};if(o&&"EMBEDDED_LINK"===o.type)return{component:Hr,editable:!1}}}},Gr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;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wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTc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YtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgM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UwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQ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guMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZ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+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Zr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kr(Object(n),!0).forEach((function(t){_r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $r(e){return function(e){if(Array.isArray(e))return eo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function to(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ro(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oo(e);if(t){var o=oo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function oo(e){return(oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var io=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&no(e,t)}(i,r.Component);var e,t,n=ro(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(s.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(l.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,o=n.onEditorStateChange;r||"atomic"===Object(l.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(o&&o(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat($r(t.props.customDecorators),[{strategy:Ar,component:yr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,$r(Er(Jr(Jr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(Sr(t.props.hashtag)),new s.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout((function(){var n=t.props,r=n.onChange,o=n.onContentStateChange;r&&r(Object(s.convertToRaw)(e.getCurrentContent())),o&&o(Object(s.convertToRaw)(e.getCurrentContent()))}))},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=s.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=s.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(s.convertFromRaw)(t.props.contentState);n=s.EditorState.createWithContent(r,e),n=s.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var o=t.props.defaultContentState||t.props.initialContentState;o&&(o=Object(s.convertFromRaw)(o),n=s.EditorState.createWithContent(o,e),n=s.EditorState.moveSelectionToEnd(n))}return n||s.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter((function(e){return n.indexOf(e)<0})),o={},r&&0<r.length&&r.forEach((function(e){o[e]=t[e]})),o;var t,n,r,o},t.getStyleMap=function(e){return Jr(Jr({},Object(l.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(s.convertFromRaw)(e),r=t.state.editorState;return r=s.EditorState.push(r,n,"insert-characters"),s.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout((function(){t.editor.focus()}))},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,o=n.toolbar.inline;if(o&&0<=o.options.indexOf(e)){var i=s.RichUtils.handleKeyCommand(r,e);if(i)return t.onChange(i),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(l.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,o=t.props,i=o.handlePastedText,a=o.stripPastedStyles;return i?i(e,n,r,t.onChange):!a&&function(e,t,n,r){var o=Object(l.getSelectedBlock)(n);if(o&&"code"===o.type){var i=s.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(s.EditorState.push(n,i,"insert-characters")),!0}if(t){var a=P()(t),c=n.getCurrentContent();return a.entityMap.forEach((function(e,t){c=c.mergeEntityData(t,e)})),c=s.Modifier.replaceWithFragment(c,n.getSelection(),new N.List(a.contentBlocks)),r(s.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=T(Gr,e.toolbar),o=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(o),t.modalHandler=new f,t.focusHandler=new v,t.blockRendererFn=Yr({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(l.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=i,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,o=n.contentState;if(!this.state.toolbar){var i=T(Gr,i);t.toolbar=i}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?s.EditorState.set(r,{decorator:this.compositeDecorator}):s.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&o!==e.contentState)if(o){var a=this.changeEditorState(o);a&&(t.editorState=a)}else t.editorState=s.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===o||Object(l.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,i=this.props,a=i.locale,c=i.localization,d=c.locale,p=c.translations,f=i.toolbarCustomButtons,m=i.toolbarOnFocus,h=i.toolbarClassName,g=i.toolbarHidden,v=i.editorClassName,A=i.wrapperClassName,b=i.toolbarStyle,x=i.editorStyle,w=i.wrapperStyle,C=i.uploadCallback,M=i.ariaLabel,O={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Jr(Jr({},Zr[a||d]),p)},z=n||this.focusHandler.isInputFocused()||!m;return o.a.createElement("div",{id:this.wrapperId,className:u()(A,"rdw-editor-wrapper"),style:w,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!g&&o.a.createElement("div",{className:u()("rdw-editor-toolbar",h),style:Jr({visibility:z?"visible":"hidden"},b),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&m).toString(),onFocus:this.onToolbarFocus},r.options.map((function(e,t){var n=cr[e],i=r[e];return"image"===e&&C&&(i.uploadCallback=C),o.a.createElement(n,qr({key:t},O,{config:i}))})),f&&f.map((function(e,t){return o.a.cloneElement(e,Jr({key:t},O))}))),o.a.createElement("div",{ref:this.setWrapperReference,className:u()(v,"rdw-editor-main"),style:x,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:y.onKeyDown,onMouseDown:this.onEditorMouseDown},o.a.createElement(s.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:j,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:M||"rdw-editor",blockRenderMap:l.blockRenderMap},this.editorProps))))}}])&&to(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();io.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},io.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ao=io}],r.c=i,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i}(e,D,vM());var bM=yM.exports;function xM(e){var t=e.html,n=void 0;"undefined"!=typeof document&&(n=AM(t));var r=n?D.EditorState.createWithContent(D.ContentState.createFromBlockArray(n.contentBlocks,n.entityMap)):D.EditorState.createEmpty();return U.jsx(bM.Editor,{editorState:r,readOnly:!0,toolbarHidden:!0})}function wM(e){var t=e.stringifiedJson,n=void 0;"undefined"!=typeof document&&(n=JSON.parse(t));var r=n?D.EditorState.createWithContent(D.convertFromRaw(n)):D.EditorState.createEmpty();return U.jsx(bM.Editor,{editorState:r,readOnly:!0,toolbarHidden:!0})}function jM(e){var t=e.value,r=e.type;return U.jsx(n.Card,{sx:{py:1,px:3},children:r&&r===exports.FieldTypes.RICH_TEXT_I?U.jsx(fM,{htmlString:t}):r&&r===exports.FieldTypes.JSON_RICH_TEXT?U.jsx(wM,{stringifiedJson:t}):U.jsx(xM,{html:t})})}function CM(e){var t=e.link,r=function(){var e="http"!==t.slice(0,4)?"https://"+t:t;window.open(e,"_blank")};return U.jsx(n.Chip,{label:t,size:"medium",color:"primary",clickable:!0,onClick:r,deleteIcon:U.jsx(To,{icon:"gridicons:external"}),onDelete:r})}function MM(e){var t=e.value;return U.jsx(n.Grid,{container:!0,justifyContent:"start",rowGap:"10px",columnGap:"10px",alignItems:"center",width:"100%",children:t.map((function(e){return U.jsx(n.Chip,{label:e,size:"small"})}))})}var OM="---";function zM(e){var t=e.value,r=e.fieldschema,o=e.type,i=e.enumvalues,a=e.children;if(null==t)return U.jsx(n.Typography,q({},e,{children:OM}));switch(o){case exports.FieldTypes.STRING:case exports.FieldTypes.NUMBER:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.PASSWORD:return U.jsx(n.Typography,q({},e,{sx:{wordWrap:"break-word",whiteSpace:"pre-line"},children:t}));case exports.FieldTypes.NESTEDSCHEMA:return U.jsx(WC,q({},e,{value:t,fieldschema:r}));case exports.FieldTypes.LOCALIZEDString:return U.jsx(FC,{value:t});case exports.FieldTypes.BOOLEAN:return U.jsx(n.Chip,{label:t?t.toString():"false",variant:"outlined",size:"small"});case exports.FieldTypes.COLOR:return U.jsx(n.Typography,q({},e,{color:t,children:t}));case exports.FieldTypes.DATE:return U.jsx(nM,q({},e));case exports.FieldTypes.ENUM:return U.jsx(rM,q({enumvalues:i},e));case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.JSON_RICH_TEXT:return U.jsx(jM,q({},e));case exports.FieldTypes.LOCATION:return U.jsx(oM,q({},e));case exports.FieldTypes.IMAGE:return U.jsx(lM,q({},e));case exports.FieldTypes.MULTIPLE_TEXT:return U.jsx(MM,q({},e));case exports.FieldTypes.ARRAY:return t&&t.length>0?U.jsx(iM,q({},e,{value:t,children:a})):U.jsx(n.Typography,q({},e,{children:OM}));case exports.FieldTypes.REFERENCE:return U.jsx(pM,q({},e));case exports.FieldTypes.EXTERNAL_LINK:return U.jsx(CM,{link:e.value});default:return U.jsx(U.Fragment,{})}}var TM=function(){function e(){}return e.enhance=function(e){var t=this;return e?e.includes("_")?e.split("_").map((function(e){return t.enhanceEnum(e)})).join(" "):this.enhanceEnum(e):OM},e.enhanceEnum=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e}();function DM(e){var t,r=e.values,o=e.name,i=e.label,a=e.size,s=e.disabled;return U.jsx(Gu,{name:o,size:a,label:i,disabled:s,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:null===(t=Object.keys(r))||void 0===t?void 0:t.map((function(e){var t,o,i,a=(null===(t=r[e])||void 0===t?void 0:t.label)?e:r[e],s=null!==(i=null===(o=r[e])||void 0===o?void 0:o.label)&&void 0!==i?i:r[e];return U.jsx(n.MenuItem,{value:a,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:TM.enhance(s)},a)}))})}function PM(e){var t=e.label,r=e.name,o=e.handleDrop;return U.jsx(Iu,{name:r,label:t,accept:{"image/*":[".jpeg",".png","jpg",".webp"]},maxSize:3145728,onDrop:function(e){return o(e,r)},helperText:U.jsxs(n.Typography,{variant:"caption",sx:{mt:2,mx:"auto",display:"block",textAlign:"center",color:"text.secondary"},children:["Add your ",t,U.jsx("br",{}),U.jsx("br",{})," max size of ",Qa(3145728)]})})}function NM(e){var t=e.key,r=e.label,o=e.name,i=e.handleDrop;return U.jsx(n.Grid,{item:!0,xs:12,md:3,children:U.jsx(n.Box,{sx:{mb:5,mt:5},children:U.jsx(PM,{label:r,name:o,handleDrop:i})})},t)}function EM(e){var t=e.name,n=e.minDate,r=e.maxDate,o=K(e,["name","minDate","maxDate"]),i=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:i,render:function(e){var t=e.field,i=e.fieldState.error;return U.jsx(v.DateTimePicker,{label:o.label,value:new Date(t.value),minDate:null==n?void 0:n.getDate(),maxDate:null==r?void 0:r.getDate(),onChange:function(e){t.onChange(e)},slotProps:{textField:{fullWidth:!0,margin:"normal",helperText:null==i?void 0:i.message,error:!!i}}})}})}var BM={exports:{}};BM.exports=function(){function e(e,t){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&t(n,e[n])}function t(e){return null==e||0===e.length||0===e.trim().length}var n={unstyled:"p","header-one":"h1","header-two":"h2","header-three":"h3","header-four":"h4","header-five":"h5","header-six":"h6","unordered-list-item":"ul","ordered-list-item":"ol",blockquote:"blockquote",code:"pre"};function r(e){return e&&n[e]}function o(t){var n="";return e(t,(function(e,t){t&&(n+="".concat(e,":").concat(t,";"))})),n}function i(e,t){var n=[];if(t)for(var r=0,o=0,i=e,a=t.trigger||"#",s=t.separator||" ";i.length>0&&o>=0;)if(i[0]===a?(o=0,r=0,i=i.substr(a.length)):(o=i.indexOf(s+a))>=0&&(i=i.substr(o+(s+a).length),r+=o+s.length),o>=0){var l=i.indexOf(s)>=0?i.indexOf(s):i.length,c=i.substr(0,l);c&&c.length>0&&n.push({offset:r,length:c.length+a.length,type:"HASHTAG"}),r+=a.length}return n}function a(e,t){var n=[],r=0,o=e.entityRanges.map((function(e){return{offset:e.offset,length:e.length,key:e.key,type:"ENTITY"}}));return(o=(o=o.concat(i(e.text,t))).sort((function(e,t){return e.offset-t.offset}))).forEach((function(e){e.offset>r&&n.push({start:r,end:e.offset}),n.push({start:e.offset,end:e.offset+e.length,entityKey:e.key,type:e.type}),r=e.offset+e.length})),r<e.text.length&&n.push({start:r,end:e.text.length}),n}function s(e){return!(!(e.entityRanges.length>0)||!t(e.text)&&"atomic"!==e.type)}function l(e){var t=e.text,n=e.inlineStyleRanges,r={BOLD:new Array(t.length),ITALIC:new Array(t.length),UNDERLINE:new Array(t.length),STRIKETHROUGH:new Array(t.length),CODE:new Array(t.length),SUPERSCRIPT:new Array(t.length),SUBSCRIPT:new Array(t.length),COLOR:new Array(t.length),BGCOLOR:new Array(t.length),FONTSIZE:new Array(t.length),FONTFAMILY:new Array(t.length),length:t.length};return n&&n.length>0&&n.forEach((function(e){for(var t=e.offset,n=t+e.length,o=t;o<n;o+=1)0===e.style.indexOf("color-")?r.COLOR[o]=e.style.substring(6):0===e.style.indexOf("bgcolor-")?r.BGCOLOR[o]=e.style.substring(8):0===e.style.indexOf("fontsize-")?r.FONTSIZE[o]=e.style.substring(9):0===e.style.indexOf("fontfamily-")?r.FONTFAMILY[o]=e.style.substring(11):r[e.style]&&(r[e.style][o]=!0)})),r}function c(e,t){var n={};return e.COLOR[t]&&(n.COLOR=e.COLOR[t]),e.BGCOLOR[t]&&(n.BGCOLOR=e.BGCOLOR[t]),e.FONTSIZE[t]&&(n.FONTSIZE=e.FONTSIZE[t]),e.FONTFAMILY[t]&&(n.FONTFAMILY=e.FONTFAMILY[t]),e.UNDERLINE[t]&&(n.UNDERLINE=!0),e.ITALIC[t]&&(n.ITALIC=!0),e.BOLD[t]&&(n.BOLD=!0),e.STRIKETHROUGH[t]&&(n.STRIKETHROUGH=!0),e.CODE[t]&&(n.CODE=!0),e.SUBSCRIPT[t]&&(n.SUBSCRIPT=!0),e.SUPERSCRIPT[t]&&(n.SUPERSCRIPT=!0),n}function u(e,t,n){var r=!0;return n>0&&n<e.length?t.forEach((function(t){r=r&&e[t][n]===e[t][n-1]})):r=!1,r}function d(e,t){return"BOLD"===e?"<strong>".concat(t,"</strong>"):"ITALIC"===e?"<em>".concat(t,"</em>"):"UNDERLINE"===e?"<ins>".concat(t,"</ins>"):"STRIKETHROUGH"===e?"<del>".concat(t,"</del>"):"CODE"===e?"<code>".concat(t,"</code>"):"SUPERSCRIPT"===e?"<sup>".concat(t,"</sup>"):"SUBSCRIPT"===e?"<sub>".concat(t,"</sub>"):t}function p(e){return e&&e.length>0?e.map((function(e){switch(e){case"\n":return"<br>";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";default:return e}})).join(""):""}function f(e,t){if(e&&(e.COLOR||e.BGCOLOR||e.FONTSIZE||e.FONTFAMILY)){var n='style="';return e.COLOR&&(n+="color: ".concat(e.COLOR,";")),e.BGCOLOR&&(n+="background-color: ".concat(e.BGCOLOR,";")),e.FONTSIZE&&(n+="font-size: ".concat(e.FONTSIZE).concat(/^\d+$/.test(e.FONTSIZE)?"px":"",";")),e.FONTFAMILY&&(n+="font-family: ".concat(e.FONTFAMILY,";")),"<span ".concat(n+='"',">").concat(t,"</span>")}return t}function m(e,t,n,r){var o=e[t];if("function"==typeof r){var i=r(o,n);if(i)return i}if("MENTION"===o.type)return'<a href="'.concat(o.data.url,'" class="wysiwyg-mention" data-mention data-value="').concat(o.data.value,'">').concat(n,"</a>");if("LINK"===o.type){var a=o.data.targetOption||"_self";return'<a href="'.concat(o.data.url,'" target="').concat(a,'">').concat(n,"</a>")}if("IMAGE"===o.type){var s=o.data.alignment;return s&&s.length?'<div style="text-align:'.concat(s,';"><img src="').concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/></div>'):'<img src="'.concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/>')}return"EMBEDDED_LINK"===o.type?'<iframe width="'.concat(o.data.width,'" height="').concat(o.data.height,'" src="').concat(o.data.src,'" frameBorder="0"></iframe>'):n}function h(e,t,n,r){var o=[],i=Array.from(e.text);if(i.length>0)for(var a,s=l(e),d=n;d<r;d+=1)d!==n&&u(s,t,d)?(a.text.push(i[d]),a.end=d+1):(a={styles:c(s,d),text:[i[d]],start:d,end:d+1},o.push(a));return o}function g(e){if(e){for(var t=e,n=0;n<t.length&&" "===e[n];n+=1)t=t.replace(" ","&nbsp;");return t}return e}function v(e){if(e){for(var t=e,n=t.length-1;n>=0&&" "===t[n];n-=1)t="".concat(t.substring(0,n),"&nbsp;").concat(t.substring(n+1));return t}return e}function A(t){var n=t.styles,r=p(t.text);return e(n,(function(e,t){r=d(e,r)})),r}function y(e,t){var n=h(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end),r="";return n.forEach((function(e){r+=A(e)})),r=f(t.styles,r)}function b(e,t,n,r){var o=[];h(e,["COLOR","BGCOLOR","FONTSIZE","FONTFAMILY"],n.start,n.end).forEach((function(t){o.push(y(e,t))}));var i=o.join("");return"ENTITY"===n.type?void 0!==n.entityKey&&null!==n.entityKey&&(i=m(t,n.entityKey,i,r)):"HASHTAG"===n.type&&(i='<a href="'.concat(i,'" class="wysiwyg-hashtag">').concat(i,"</a>")),i}function x(e,t,n,r){var o=[],i=a(e,n);return i.forEach((function(n,a){var s=b(e,t,n,r);0===a&&(s=g(s)),a===i.length-1&&(s=v(s)),o.push(s)})),o.join("")}function w(e,t,n,i,a){var l=[];if(s(e))l.push(m(t,e.entityRanges[0].key,void 0,a));else{var c=r(e.type);if(c){l.push("<".concat(c));var u=o(e.data);u&&l.push(' style="'.concat(u,'"')),i&&l.push(' dir = "auto"'),l.push(">"),l.push(x(e,t,n,a)),l.push("</".concat(c,">"))}}return l.push("\n"),l.join("")}function j(e){return"unordered-list-item"===e||"ordered-list-item"===e}function C(e,t,n,i,a){var s,l=[],c=[];return e.forEach((function(e){var u=!1;if(s?s.type!==e.type?(l.push("</".concat(r(s.type),">\n")),l.push("<".concat(r(e.type),">\n"))):s.depth===e.depth?c&&c.length>0&&(l.push(C(c,t,n,i,a)),c=[]):(u=!0,c.push(e)):l.push("<".concat(r(e.type),">\n")),!u){l.push("<li");var d=o(e.data);d&&l.push(' style="'.concat(d,'"')),i&&l.push(' dir = "auto"'),l.push(">"),l.push(x(e,t,n,a)),l.push("</li>\n"),s=e}})),c&&c.length>0&&l.push(C(c,t,n,i,a)),l.push("</".concat(r(s.type),">\n")),l.join("")}function M(e,t,n,r){var o=[];if(e){var i=e.blocks,a=e.entityMap;if(i&&i.length>0){var s=[];if(i.forEach((function(e){if(j(e.type))s.push(e);else{if(s.length>0){var i=C(s,a,t,r);o.push(i),s=[]}var l=w(e,a,t,n,r);o.push(l)}})),s.length>0){var l=C(s,a,t,n,r);o.push(l),s=[]}}}return o.join("")}return M}();var kM,LM,IM=F(BM.exports);function SM(t){var n=t.name,r=t.disabled,o=c.useFormContext(),i=o.control,a=o.setValue,s=o.getValues,l=e.useState({editorState:s(n)&&""!==s(n)?D.EditorState.createWithContent(D.ContentState.createFromBlockArray(AM(s(n)).contentBlocks,AM(s(n)).entityMap)):D.EditorState.createEmpty()}),u=l[0],d=l[1],p=function(e){d({editorState:e}),a(n,IM(D.convertToRaw(e.getCurrentContent())))},f=function(e,t,n){var r=D.convertFromHTML(t),o=D.ContentState.createFromBlockArray(r.contentBlocks,r.entityMap),i=n.getCurrentContent(),a=D.Modifier.replaceWithFragment(i,i.getSelectionAfter(),o.getBlockMap()),s=D.EditorState.push(n,a,"insert-fragment");return p(s),!0};return U.jsx(c.Controller,{name:n,control:i,render:function(e){return e.field,e.fieldState.error,U.jsxs("div",{children:[U.jsx("style",{children:"\n .rdw-editor-toolbar {\n background-color: #E5E4E2;\n border-radius: 10px;\n }\n "}),U.jsx(bM.Editor,{editorState:u.editorState,wrapperClassName:"wrapper",editorClassName:"editor",placeholder:"Write your text here",onEditorStateChange:p,readOnly:r,handlePastedText:f})]})}})}function HM(t){var r=t.name,o=t.disabled,i=c.useFormContext(),a=i.control,s=i.setValue,l=i.getValues,u=hv.isEnglish(),d=l(r)?JSON.parse(l(r)):null,p=e.useState((function(){return(e=d)&&"object"==typeof e&&Array.isArray(e.blocks)&&"object"==typeof e.entityMap?D.EditorState.createWithContent(D.convertFromRaw(d)):D.EditorState.createEmpty();var e})),f=p[0],m=p[1],h=function(e){m(e);var t=JSON.stringify(D.convertToRaw(e.getCurrentContent())),n=!e.getCurrentContent().hasText();s(r,n?"":t)},g=function(e,t,n){if(!t)return!1;var r=D.convertFromHTML(t),o=D.ContentState.createFromBlockArray(r.contentBlocks,r.entityMap),i=n.getCurrentContent(),a=D.Modifier.replaceWithFragment(i,n.getSelection(),o.getBlockMap()),s=D.EditorState.push(n,a,"insert-fragment");return h(s),!0};return U.jsx(c.Controller,{name:r,control:a,render:function(e){var t=e.fieldState.error;return U.jsxs("div",{children:[U.jsx("style",{children:"\n .rdw-editor-toolbar {\n background-color: #E5E4E2;\n border-radius: 10px;\n }\n "}),U.jsx(bM.Editor,{editorState:f,wrapperClassName:"wrapper",editorClassName:"editor",placeholder:u?"Start typing here...":"ابدأ الكتابة هنا...",onEditorStateChange:h,readOnly:o,handlePastedText:g,toolbar:{options:["inline","blockType","list","textAlign","history"],inline:{options:["bold","italic","underline"]},blockType:{options:["Normal","H1","H2"]},list:{options:["unordered","ordered"]},textAlign:{options:["left","center","right"]},history:{options:["undo","redo"]}}}),t&&U.jsx(n.FormHelperText,{error:!0,children:t.message})]})}})}function RM(e){var t=e.label,r=e.type;return U.jsxs(n.Stack,{spacing:1,children:[U.jsx(n.Typography,{variant:"subtitle2",sx:{color:"text.secondary"},children:t}),r===kM.TYPE_ONE?U.jsx(Xu,q({simple:!0},e)):r===kM.JSON_TYPE?U.jsx(HM,q({},e)):U.jsx(SM,q({},e))]})}function WM(e){var t=e.referencedValues,n=e.value,r=e.loading,o=e.extraKey,i=e.fullKey,a=e.key,s=e.apiRoute,l=e.resources,c=e.pathRoute,u=e.schema,d=e.setLoading,p=e.setReferencedValues,f=e.page,m=e.filter,h=e.filters;return J(this,void 0,void 0,(function(){var e,g,v,A,y,b,x,w,j,C,M,O,z,T,D,P,N;return _(this,(function(E){switch(E.label){case 0:return n?(e=t[a],g=null==e?void 0:e.page,!e||e.hasNext||m||e.filter!==m?g===f&&e.filter===m?[2]:((v=q({},r))[i]=!0,d(v),A=m?"&filter=".concat(m):"",h&&(A+="&filters=".concat(h)),y=s||u[a].apiRoute,[4,Bh.get(y+"?page=".concat(f).concat(A))]):[2]):[2];case 1:for(b=E.sent(),x=b.data.data,w=x.records,j=x.pageInfo,C=[],M=0;M<w.length;M++)O=w[M],z=l[c||u[a].path],T=ey.getReferenceImage(z,O),D=q(q({},O),{image:T}),o&&(D[o]=O[o]),C.push(D);return(P=q({},t))[a]={data:g===f?C:P[a]&&P[a].data?P[a].data.concat(C):C,page:w.length>0?f:g,filter:m,hasNext:j.nextPage>0},p(P),(N=q({},r))[i]=!1,d(N),[2]}}))}))}!function(e){e[e.TYPE_ONE=0]="TYPE_ONE",e[e.TYPE_TWO=1]="TYPE_TWO",e[e.JSON_TYPE=2]="JSON_TYPE"}(kM||(kM={})),function(e){e.FORM_LIST="formList",e.FILTER_LIST="filterList"}(LM||(LM={}));var FM,VM,QM,XM=function(e,t,n,r){var o,i,a;if(!e[t])return"";var s=null===(o=e[t].filter)||void 0===o?void 0:o[n];if(!s||!r)return"";var l=null!==(a=null===(i=null==r?void 0:r.properties)||void 0===i?void 0:i.model)&&void 0!==a?a:{},c=Object.entries(s).filter((function(e){var t,n=e[0];return null===(t=l[n])||void 0===t?void 0:t.type})).map((function(e){var t,n=e[0],r=e[1];return"".concat(n,"=").concat(r,";;").concat(null===(t=l[n])||void 0===t?void 0:t.type,"^^")})).join("");return encodeURIComponent(c)};function YM(t){var r=t.name,o=t.label,i=t.placeholder;K(t,["name","label","placeholder"]);var a=c.useFormContext().control,s=Vg().translate;return U.jsx(c.Controller,{control:a,name:r,render:function(t){var r=t.field,a=r.onChange,l=r.value,c=t.fieldState.error;return U.jsx(n.Autocomplete,{value:l||[],multiple:!0,id:"tags-filled",options:[],filterOptions:function(e,t){var n=$([],e,!0),r=t.inputValue;return""!==r&&n.push("".concat(s("Add"),' "').concat(r,'"')),n},onChange:function(e,t){var n=t.map((function(e){if("string"==typeof e&&e.startsWith("".concat(s("Add")))){var t=e.match(/"([^"]+)"/);return t?t[1]:e}return e}));a(n)},freeSolo:!0,renderTags:function(t,r){return t.map((function(t,o){return e.createElement(n.Chip,q({variant:"outlined",label:t},r({index:o}),{key:"".concat(o)}))}))},renderInput:function(e){var t,r,a;return U.jsx(n.TextField,q({},e,{label:o,size:"small",placeholder:i,error:!!c,helperText:null!==(t=null==c?void 0:c.message)&&void 0!==t?t:null===(a=null===(r=Object(c))||void 0===r?void 0:r._id)||void 0===a?void 0:a.message}))}})}})}function GM(e){var t=e.name,r=e.label,o=e.placeholder,i=e.options;K(e,["name","label","placeholder","options"]);var a=c.useFormContext(),s=a.control,l=a.getValues;return U.jsx(c.Controller,{control:s,name:t,render:function(e){var a=e.field.onChange,s=e.fieldState.error;return U.jsx(n.Autocomplete,{defaultValue:l(t)?l(t):[],multiple:!0,id:"tags-filled",options:i,getOptionLabel:function(e){return e.label},filterSelectedOptions:!0,onChange:function(e,t){a(t.map((function(e){return e.value})))},isOptionEqualToValue:function(e,t){return e.value===t.value},renderInput:function(e){var t,i,a;return U.jsx(n.TextField,q({},e,{label:r,size:"small",placeholder:o,error:!!s,helperText:null!==(t=null==s?void 0:s.message)&&void 0!==t?t:null===(a=null===(i=Object(s))||void 0===i?void 0:i._id)||void 0===a?void 0:a.message}))}})}})}function ZM(e,t){var n=t[e].type;if(t[e].textArea)return FM.LARGE;switch(n){case exports.FieldTypes.PASSWORD:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.NUMBER:case exports.FieldTypes.STRING:case exports.FieldTypes.BOOLEAN:case exports.FieldTypes.COLOR:case exports.FieldTypes.ENUM:case exports.FieldTypes.EXTERNAL_LINK:case exports.FieldTypes.LOCATION:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.DATE:case exports.FieldTypes.MULTIPLE_TEXT:case exports.FieldTypes.TIMEPICKER:return FM.SMALL;case exports.FieldTypes.LOCALIZEDString:return FM.MEDIUM;case exports.FieldTypes.FILE:case exports.FieldTypes.IMAGE:return FM.LARGE;case exports.FieldTypes.REFERENCE:return t[e].mediaUploader?FM.LARGE:FM.SMALL;case exports.FieldTypes.ARRAY:return t[e].arrayType===exports.FieldTypes.ENUM?FM.SMALL:FM.CHANGEABLE;default:return FM.CHANGEABLE}}function UM(t){var o=this,i=t.isEdit,a=t.isDuplicate,s=t.id,u=t.record,d=t.path,p=t.mediaUploaderFields,f=t.onSubmitForm,m=t.referencedMap,h=t.modelRoute,g=t.redirectPath,v=t.afterCreateSnackText,A=t.afterEditSnackText,y=t.enableCreateNewButtonOnReference,b=t.keepFullWidthElements,x=t.fieldsMap,w=r.useNavigate(),j=e.useState({}),M=j[0],O=j[1],z=e.useState({}),T=z[0],D=z[1],P=e.useState(!1),N=P[0],E=P[1],B=r.useLocation(),k=Vg(),L=k.currentLang,I=k.translate,S=e.useState(L.index),R=S[0],W=S[1],F=e.useState({}),V=F[0],Q=F[1],X=e.useState({}),Y=X[0],G=X[1],Z=e.useState({}),ee=Z[0],te=Z[1],ne=e.useState(!1),re=ne[0],oe=ne[1],ie=e.useState(!1),ae=ie[0],se=ie[1],le=e.useState({}),ce=le[0],ue=le[1],de=e.useContext(dg).bucketUrl,pe=e.useContext(Kh).resources,fe=e.useContext(ug).textFieldSize,me=e.useContext(Ih).dashbaordUrlPrefix,he=e.useContext(Jh).paths,ge=i||a,ve=pe[d].properties.model,Ae=pe[d].formProperties,ye=hv.isEnglish(),be=ye?"Create new":" اضافة ",xe=ye?"Save changes":"تعديل ",we=Ig(),je=we.setSuccessAlert,Ce=we.setErrorAlert,Me={},Oe={};Ae.map((function(e,t){"_id"!==e&&"__v"!==e&&(Me[e]=Ge(ve[e],e))}));var ze=H.object().shape(Me),Te=e.useMemo((function(){return Oe}),[]),De=c.useForm({resolver:Pa(ze),defaultValues:Te}),Pe=De.reset,Ne=De.control,Ee=De.setValue,Be=De.getValues,ke=De.handleSubmit,Le=De.watch,Ie={},Se={};var He=function(e){var t=q({},Y);t[e]=!0,G(t)},Re=function(e,t){W(t)};function We(e,t,n){var r=q({},t);r[e]=!1,n(r)}function Fe(e,t,n,r){var o=q({},t);o[e]=r,n(o)}var Ve=function(e){var t=q({},ee);t[e]=void 0,te(t),Ee(e,void 0)};function Qe(e){var t,n,r,o,i,a,s,l,c,u=e.split("."),d=u[u.length-1],p=u.reduce((function(e,t,n){var r;return 0===n?null==e?void 0:e[t]:null===(r=null==e?void 0:e.schema)||void 0===r?void 0:r[t]}),ve);Se[d]={},Se[d][d]={type:null!==(t=null==p?void 0:p.arrayType)&&void 0!==t?t:"",enumValues:null!==(n=null==p?void 0:p.enumValues)&&void 0!==n?n:[],path:null!==(r=null==p?void 0:p.path)&&void 0!==r?r:"",includeFrench:null!==(o=null==p?void 0:p.includeFrench)&&void 0!==o&&o,includeGerman:null!==(i=null==p?void 0:p.includeGerman)&&void 0!==i&&i,includeSpanish:null!==(a=null==p?void 0:p.includeSpanish)&&void 0!==a&&a,includeDanish:null!==(s=null==p?void 0:p.includeDanish)&&void 0!==s&&s,includeNorwegian:null!==(l=null==p?void 0:p.includeNorwegian)&&void 0!==l&&l,includeSwedish:null!==(c=null==p?void 0:p.includeSwedish)&&void 0!==c&&c}}var Xe=function(e){W("1"),Ie[e].append()},Ye=function(e,t){t.destination&&Ie[e].move(t.source.index,t.destination.index)};function Ge(e,t){var n,r,o,a,s;switch(Oe[t]=void 0,e.type){case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.JSON_RICH_TEXT:case exports.FieldTypes.EXTERNAL_LINK:case exports.FieldTypes.STRING:Oe[t]=u?u[t]:"",s=H.string();break;case exports.FieldTypes.MULTIPLE_TEXT:Oe[t]=u?u[t]:void 0,s=H.array().typeError("".concat(e.value," ").concat(I("is required")));break;case exports.FieldTypes.OBJECTID:case exports.FieldTypes.PHONENUMBER:Oe[t]=u?u[t]:"",s=H.string();break;case exports.FieldTypes.LOCALIZEDString:var l=!!(u&&u[t]&&u[t].length>0);Oe[t]={en:l?u[t][0].value:"",ar:l?u[t].length>1?u[t][1].value:u[t][0].value:"",fr:e.includeFrench?l?u[t].length>2?u[t][2].value:u[t][0].value:"":void 0,de:e.includeGerman?l?u[t].length>3?u[t][3].value:u[t][0].value:"":void 0,es:e.includeSpanish?l?u[t].length>4?u[t][4].value:u[t][0].value:"":void 0,da:e.includeDanish?l?u[t].length>5?u[t][5].value:u[t][0].value:"":void 0,nb:e.includeNorwegian?l?u[t].length>6?u[t][6].value:u[t][0].value:"":void 0,sv:e.includeSwedish?l?u[t].length>7?u[t][7].value:u[t][0].value:"":void 0},s=H.mixed();break;case exports.FieldTypes.PASSWORD:Oe[t]=u?u[t]:void 0,s=ve[t]&&ve[t].yupValidationSchema?ve[t].yupValidationSchema:H.string().min(6,"Password must be at least 6 characters");break;case exports.FieldTypes.BOOLEAN:Oe[t]=!!u&&u[t],s=H.boolean();break;case exports.FieldTypes.IMAGE:Oe[t]=u?u[t]:"",s=H.string().nullable();break;case exports.FieldTypes.REFERENCE:pe[e.path],Oe[t]=u&&u[t]?u[t]:void 0,s=H.object().nullable();break;case exports.FieldTypes.LOCATION:var c=u&&u[t]?{description:null!==(r=null===(n=u[t])||void 0===n?void 0:n.address)&&void 0!==r?r:"",location:{type:"Point",coordinates:[null===(o=u[t])||void 0===o?void 0:o.longitude,null===(a=u[t])||void 0===a?void 0:a.latitude]}}:void 0;Oe[t]=c;break;case exports.FieldTypes.DATE:Oe[t]=u?u[t]:new Date,s=H.date().nullable();break;case exports.FieldTypes.NUMBER:Oe[t]=u?u[t]:void 0,s=H.number();break;case exports.FieldTypes.TIMEPICKER:Oe[t]=u?u[t]:"",s=H.string();break;case exports.FieldTypes.ENUM:Oe[t]=u?u[t]:ve[t]&&ve[t].defaultValue?ve[t].defaultValue:void 0,s=H.string();break;case exports.FieldTypes.ARRAY:switch(Oe[t]=u?u[t]:void 0,s=H.array(),e.arrayType){case exports.FieldTypes.NESTEDSCHEMA:var d=ve[t]?ve[t].keys:[],p=ve[t]?ve[t].schema:{},f={};Oe[t]=u?u[t]:[],null==d||d.map((function(e){"_id"!==e&&(f[e]=Ge(p[e],e))})),s=s.of(H.object().shape(f));break;case exports.FieldTypes.IMAGE:var m=u&&u[t]&&u[t]?u[t]:[];Oe[t]=m,s=s.of(H.mixed());break;case exports.FieldTypes.LOCALIZEDString:var h=[];if(u&&u[t]&&u[t].length)for(var g=0;g<u[t].length;g++){var v=u[t][g],A=$($($($($($([{key:"en",value:v&&v[0]&&v[0].value?v[0].value:""},{key:"ar",value:v&&v[1]&&v[1].value?v[1].value:""}],e.includeFrench?[{key:"fr",value:v&&v[2]&&v[2].value?v[2].value:""}]:[],!0),e.includeGerman?[{key:"de",value:v&&v[3]&&v[3].value?v[3].value:""}]:[],!0),e.includeSpanish?[{key:"es",value:v&&v[4]&&v[4].value?v[4].value:""}]:[],!0),e.includeDanish?[{key:"da",value:v&&v[5]&&v[5].value?v[5].value:""}]:[],!0),e.includeNorwegian?[{key:"nb",value:v&&v[6]&&v[6].value?v[6].value:""}]:[],!0),e.includeSwedish?[{key:"sv",value:v&&v[7]&&v[7].value?v[7].value:""}]:[],!0);h.push(A)}Oe[t]=h,s=s.of(H.mixed());break;case exports.FieldTypes.REFERENCE:!pe||pe[e.path],Oe[t]=u&&u[t]?u[t]:[],s=s.of(H.object());break;case exports.FieldTypes.ENUM:Oe[t]=u&&u[t]&&u[t].length>0?u[t].map((function(e){var n,r;return{label:TM.enhance(Array.isArray(ve[t].enumValues)?e:null!==(r=null===(n=ve[t].enumValues[e])||void 0===n?void 0:n.label)&&void 0!==r?r:e),value:e}})):[],s=H.array();break;default:Oe[t]=u&&u[t]?u[t]:void 0}break;case exports.FieldTypes.NESTEDSCHEMA:d=ve[t]?ve[t].keys:[];var y=ve[t]?ve[t].schema:{},b={};Oe[t]=u&&u[t]?u[t]:{},null==d||d.map((function(e){"_id"!==e&&(b[e]=Ge(y[e],e)),Oe[t][e]=u&&u[t]&&u[t][e]?u[t][e]:void 0})),s=H.object().shape(b)}return s=e.required?e.type===exports.FieldTypes.PASSWORD&&i?null==s?void 0:s.optional():e.type===exports.FieldTypes.LOCALIZEDString?H.mixed().test("localized-required",e.value+" "+I("is required"),(function(e){return!!e&&(Array.isArray(e)?e.some((function(e){return e&&"string"==typeof e.value&&e.value.trim().length>0})):Object.values(e).some((function(e){return"string"==typeof e&&e.trim().length>0})))})):null==s?void 0:s.required(e.value+" "+I("is required")):null==s?void 0:s.optional()}var Ze=function(e){Ee(e.target.name,e.target.checked);var t=q({},M);t[e.target.name]=e.target.checked,O(t)},Ue=function(e,t,n,r,i,a,s,l){return J(o,void 0,void 0,(function(){return _(this,(function(o){switch(o.label){case 0:return[4,WM({apiRoute:e,referencedValues:V,value:n,loading:T,fullKey:i,key:r,pathRoute:t,resources:pe,schema:ve,setLoading:D,setReferencedValues:Q,page:a,filter:s,filters:l})];case 1:return o.sent(),[2]}}))}))},qe=e.useCallback((function(e,t,n){var r=e[0];r&&(Ee(t,Object.assign(r,{preview:URL.createObjectURL(r)})),oe(!0),Rh(r,!0,null!=n?n:exports.ImageOptimizingCategories.NORMAL,(function(e){Ee(t,de+e),oe(!1)})))}),[oe]),Ke=function(e,t){Ie[e].remove(t)};function Je(e){e._id,e.id,e.__v,e.createdAt,e.updatedAt;var t=K(e,["_id","id","__v","createdAt","updatedAt"]);return t.isDuplicateRecord=!0,t}e.useEffect((function(){J(o,void 0,void 0,(function(){var e,t,n,r;return _(this,(function(o){if(ge){if(Pe(u),e=q({},ee),p&&p.map((function(t){e[t]=u[t]?u[t]:void 0})),Te)for(t in Te)(n=ve[t])&&n.type===exports.FieldTypes.ARRAY&&n.arrayType===exports.FieldTypes.IMAGE&&((r=q({},ce))[t]=Te[t],ue(r));te(e)}else Pe(Te);return[2]}))}))}),[]);function _e(t,r,o){var s,l,u,p,f,m={key:t,name:o,size:fe,label:r[t].value,disabled:i&&!1===r[t].isEditable};if(r[t]){var h=r[t].textArea;switch(r[t].type){case exports.FieldTypes.PASSWORD:return U.jsx(bC,q({},m,{showPassword:N,setShowPassword:E}));case exports.FieldTypes.OBJECTID:case exports.FieldTypes.NUMBER:case exports.FieldTypes.STRING:case exports.FieldTypes.EXTERNAL_LINK:return U.jsx(Yu,q({},m,{rows:h?5:void 0,multiline:h}));case exports.FieldTypes.MULTIPLE_TEXT:return U.jsx(YM,q({},m));case exports.FieldTypes.RICH_TEXT_I:return U.jsx(RM,q({},m,{type:kM.TYPE_ONE}));case exports.FieldTypes.RICH_TEXT_II:return U.jsx(RM,q({},m,{type:kM.TYPE_TWO}));case exports.FieldTypes.JSON_RICH_TEXT:return U.jsx(RM,q({},m,{type:kM.JSON_TYPE}));case exports.FieldTypes.LOCATION:return U.jsx(Yg,q({},m,{variant:"outlined",selectLocation:Ee}));case exports.FieldTypes.TIMEPICKER:return U.jsx(yC,q({},m,{fieldName:o,setValue:Ee,getValues:Be}));case exports.FieldTypes.PHONENUMBER:var g=r[t].defaultCountryCode?r[t].defaultCountryCode:r[t].countryCodes?r[t].countryCodes[0]:"sa";return U.jsx(C,q({},m,{defaultCountry:g.toLowerCase(),style:{border:2},onChange:function(e){return function(e,t){Ee(t,e)}(e,o)},onlyCountries:r[t].countryCodes?r[t].countryCodes:[],fullWidth:!0,value:Be(o)?Be(o):"",variant:"outlined",inputProps:{"aria-autocomplete":"none",autoCorrect:"none"},InputProps:{autoComplete:"new-password"},autoComplete:"new-password"}));case exports.FieldTypes.LOCALIZEDString:return U.jsx(oy,{fieldName:o,title:null===(s=r[t])||void 0===s?void 0:s.value,size:fe,isEdit:i||a,value:R,setValue:Ee,getValues:Be,handleChange:Re,numberOfRows:h?5:void 0,includeFrench:r[t].includeFrench,includeGerman:r[t].includeGerman,includeSpanish:r[t].includeSpanish,includeDanish:r[t].includeDanish,includeNorwegian:r[t].includeNorwegian,includeSwedish:r[t].includeSwedish});case exports.FieldTypes.DATE:return r[t].withTime?U.jsx(EM,q({},m,{fullWidth:!0,minDate:new Date})):U.jsx(ad,q({},m,{fullWidth:!0,minDate:new Date}));case exports.FieldTypes.ENUM:return U.jsx(DM,q({},m,{values:r[t].enumValues}));case exports.FieldTypes.IMAGE:return e.createElement(NM,q({},m,{name:o,key:t,handleDrop:function(e,n){return qe(e,n,r[t].imageOptimizingCategory)}}));case exports.FieldTypes.BOOLEAN:return U.jsx(xC,q({},m,{handleChange:Ze,getValues:Be}));case exports.FieldTypes.NESTEDSCHEMA:return U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsx(n.Card,{sx:{py:3,px:3},children:U.jsx(n.Grid,{container:!0,spacing:2,children:r[t].keys.map((function(e,o){return U.jsx(n.Grid,{item:!0,xs:12,children:_e(e,r[t].schema,t+"."+e)},o)}))})})]},t);case exports.FieldTypes.ARRAY:!function(e){var t=c.useFieldArray({control:Ne,name:e}),n=t.fields,r=t.append,o=t.remove,i=t.move;Ie[e]={fields:n,append:r,remove:o,move:i}}(o),Qe(o);var v=r[t],A=v.isDraggable,b=v.imageOptimizingCategory,x=et(pe[d].properties.model,t),w=Le(x),j=null==w?void 0:w.some((function(e){return!e||!e._id}));switch(r[t].arrayType){case exports.FieldTypes.NESTEDSCHEMA:return U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled",mt:{xs:"10px",md:"15px"},mb:"10px"},children:r[t].value},t),U.jsx(KA,{handleRemove:function(e){return Ke(t,e)},draggable:A,handleDrop:function(e){return Ye(t,e)},list:Ie[o].fields,itemComponent:function(e){return U.jsx(n.Stack,{spacing:3,children:r[t].keys.map((function(o){return U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,sx:{width:1},children:[U.jsx(n.Grid,{item:!0,xs:12,children:_e(o,r[t].schema,"".concat(t,"[").concat(e,"].").concat(o))},o),U.jsx(n.Divider,{})]},o)}))})},handleAdd:function(){return Xe(t)},addButtonText:ye?"Add item":"إضافة"})]},t);case exports.FieldTypes.IMAGE:return r[t].mediaUploader?U.jsx($A,{image:ce,keyValue:t,imageOptimizingCategory:null!==(l=r[t].imageOptimizingCategory)&&void 0!==l?l:exports.ImageOptimizingCategories.NORMAL,multiple:!0,dismissDialogState:We,setImages:Fe,isEnglish:ye,fileType:r[t].fileType?r[t].fileType:exports.FileTypes.IMAGE,label:r[t].value,imageDialogState:Y,handleEditImage:He,handleRemoveImage:Ve,setImageDialogState:G,setImage:ue,setValue:Ee,disableImageOptimization:r[t].disableImageOptimization,isDraggable:A}):U.jsx(KA,{handleRemove:function(e){return Ke(t,e)},draggable:A,handleDrop:function(e){return Ye(t,e)},list:Ie[o].fields,itemComponent:function(e){return U.jsx(PM,{name:"".concat(t,"[").concat(e,"]"),handleDrop:function(e,t){return qe(e,t,b)},label:""},"".concat(t,"[").concat(e,"]"))},handleAdd:function(){return Xe(t)},addButtonText:ye?"Add item":"إضافة"});case exports.FieldTypes.ENUM:return U.jsx(GM,q({},m,{options:Array.isArray(r[t].enumValues)?r[t].enumValues.map((function(e){return{label:TM.enhance(e),value:e}})):Object.keys(r[t].enumValues).map((function(e){var n,o,i=e,a=null!==(o=null===(n=r[t].enumValues[e])||void 0===n?void 0:n.label)&&void 0!==o?o:i;return{label:TM.enhance(a),value:i}}))}));default:return j&&x.length>0?U.jsx(U.Fragment,{}):U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled",mt:{xs:"10px",md:"15px"},mb:"10px"},children:r[t].value},t),U.jsx(KA,{handleRemove:function(e){return Ke(o,e)},draggable:A,handleDrop:function(e){return Ye(o,e)},list:Ie[o].fields,itemComponent:function(e){return U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,sx:{width:1},children:[U.jsx(n.Grid,{item:!0,xs:12,children:_e(t,Se[t],"".concat(o,"[").concat(e,"]"))}),U.jsx(n.Divider,{})]})},handleAdd:function(){return Xe(o)},addButtonText:ye?"Add item":"إضافة"})]},t)}case exports.FieldTypes.REFERENCE:var M=pe?pe[r[t].path]:void 0,O=XM(r,t,LM.FORM_LIST,M);return r[t].mediaUploader?U.jsx($A,{image:ee,keyValue:t,dismissDialogState:We,imageOptimizingCategory:null!==(u=r[t].imageOptimizingCategory)&&void 0!==u?u:exports.ImageOptimizingCategories.NORMAL,setImages:Fe,isEnglish:ye,fileType:r[t].fileType?r[t].fileType:exports.FileTypes.IMAGE,label:r[t].value,imageDialogState:Y,handleEditImage:He,handleRemoveImage:Ve,setImageDialogState:G,setImage:te,setValue:Ee,disableImageOptimization:r[t].disableImageOptimization,isDraggable:r[t].isDraggable}):U.jsx(xz,q({},m,{multiple:!1,onOptionChange:function(e){},options:V[t]&&V[t].data?V[t].data:[],loading:T[o],hasNext:V[t]&&V[t].hasNext,onOpenChanged:function(e,n,i){return Ue(r[t].apiRoute,r[t].path,e,t,o,n,i,O)},dependOn:et(pe[d].properties.model,t),relatedFields:null!==(f=null===(p=pe[d].properties.model[t])||void 0===p?void 0:p.relatedFields)&&void 0!==f?f:[],fieldKey:t,resource:M,resourcePath:r[t].path,enableCreateNewButtonOnReference:y&&r[t].enableCreateNewButtonOnReference}))}}}var $e=!0;return U.jsx(U.Fragment,{children:U.jsx(Su,{methods:De,onSubmit:ke((function(e){return J(o,void 0,void 0,(function(){var t,n,r,o,l,c,p,y,b,x;return _(this,(function(j){switch(j.label){case 0:se(!0),t=q({},e),Object.keys(e).map((function(t){return Object.keys(m).includes(t)?e[t]=e[t]?e[t]._id:null:ve[t]&&ve[t].type===exports.FieldTypes.LOCATION?e[t]=e[t]?{address:e[t].description,longitude:e[t].location&&e[t].location.coordinates&&e[t].location.coordinates.length>0?e[t].location.coordinates[0]:u&&u[t]&&u[t].longitude?u[t].longitude:void 0,latitude:e[t].location&&e[t].location.coordinates&&e[t].location.coordinates.length>1?e[t].location.coordinates[1]:u&&u[t]&&u[t].latitude?u[t].latitude:void 0,city:e[t].city,neighborhood:e[t].neighborhood}:null:""})),j.label=1;case 1:return j.trys.push([1,6,,7]),i?[4,Bh.patch("".concat(me,"/").concat(h)+"/"+s,e)]:[3,3];case 2:return r=j.sent(),[3,5];case 3:return[4,Bh.post("".concat(me,"/").concat(h),a?Je(e):e)];case 4:r=j.sent(),j.label=5;case 5:return n=r,se(!1),201!==n.status&&200!==n.status||!n.data.data.record.document||(Pe(),f?f():(o=(pe?pe[d].properties:"").title,l=n.data.data.record.document[o],c=ty.getRecordName(l,o,pe[d]),p=i?A?A(c):"".concat(c," was updated successfully"):v?v(c):"".concat(c," was created successfully"),je("".concat(p)),y=he[d].list,b=g?g(n.data.data.record.document._id):"".concat(y).concat(B.search),w(b,{replace:!0}))),[3,7];case 6:return x=j.sent(),se(!1),Pe(t),Ce("".concat(JSON.parse(x).meta.message)),[3,7];case 7:return[2]}}))}))})),children:U.jsx(n.Card,{sx:{p:3},children:U.jsxs(n.Stack,{spacing:"10px",children:[U.jsx(n.Grid,{container:!0,justifyContent:"space-between",rowGap:"10px",children:Ae&&Ae.map((function(e,t){var r=function(e,t,n,r,o){var i=VM.FULL,a=VM.HALF,s=n.length-1,l=r===s,c=0===r;function u(e){return c?l?i:ZM(n[r+1],t)===e?a:i:l?ZM(n[r-1],t)===e?a:i:o&&ZM(n[r+1],t)===e?a:o||ZM(n[r-1],t)!==e?i:a}if(t[e])switch(ZM(e,t)){case FM.SMALL:return u(FM.SMALL);case FM.CHANGEABLE:return i;case FM.MEDIUM:return u(FM.MEDIUM);case FM.LARGE:return u(FM.LARGE)}return i}(e,ve,Ae,t,$e);return $e=r===VM.FULL||!$e,U.jsx(n.Grid,{item:!0,xs:12,md:ve[e].widthOfElement?ve[e].widthOfElement:b?12:r,style:{paddingLeft:0},children:x&&x[e]?x[e]({name:e,record:u,setUploading:oe}):_e(e,ve,e)},e+t)}))},"grid1"),U.jsx(l.LoadingButton,{type:"submit",variant:"contained",loading:ae||re,sx:{fontSize:{xs:"14px",md:"16px"},fontWeight:500,py:"12px",px:"20px",alignSelf:"end"},children:i?xe:be})]})})},"form")});function et(e,t){var n=[];return Object.entries(e).forEach((function(e){var r=e[0],o=e[1];(null==o?void 0:o.relatedFields)&&Array.isArray(null==o?void 0:o.relatedFields)&&o.relatedFields.includes(t)&&n.push(r)})),n}}function qM(e){var t=e.title,r=e.loading,o=e.disabled,i=e.icon,a=e.onClick;return U.jsx(n.IconButton,{size:"small",title:t,onClick:a,disabled:o,children:U.jsx(To,{icon:r?"eos-icons:loading":i})})}function KM(t){var o=this,i=t.modelPath,a=t.onNoNextText,s=t.onNoPreviousText,l=t.recordId,c=t.nextButtonTitle,u=t.previousButtonTitle,d=t.recordIndex,p=t.numberOfRecords,f=t.params,m=t.navigateTo,h=t.onClickNext,g=t.onClickPrevious,v=hv.isEnglish();r.useNavigate();var A=Ig().setAlert,y=e.useState({next:!1,previous:!1}),b=y[0],x=y[1],w=e.useContext(Ih).dashbaordUrlPrefix,j="mdi:keyboard-arrow-left",C="mdi:keyboard-arrow-right",M=v?j:C,O=v?C:j,z=function(e){return J(o,void 0,void 0,(function(){var t,n,r,o,c;return _(this,(function(u){switch(u.label){case 0:return e===QM.NEXT?(t=null!=a?a:"No next records",x({next:!0,previous:!1})):(t=null!=s?s:"No previous records",x({next:!1,previous:!0})),[4,Bh.get("".concat(w,"/").concat(i,"/neighbors/").concat(l,"?type=").concat(e),{params:f})];case 1:return n=u.sent(),x({next:!1,previous:!1}),r=n.data.data,o=r.hasNeighbor,c=r.neighborRecordId,o&&c?(m(c),[2]):(A(t,"warning"),[2])}}))}))};return U.jsxs(n.Stack,{direction:"row",spacing:"5px",alignSelf:"end",alignItems:"center",children:[p&&d&&U.jsx(n.Typography,{color:"#5e5e5e",fontSize:"0.8rem",fontFamily:'"Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif',children:"".concat(d," of ").concat(p.toLocaleString())}),U.jsx(qM,{title:null!=u?u:"Previous",icon:M,onClick:g?function(){return g(l)}:function(){return z(QM.PREVIOUS)},loading:b.previous,disabled:!(!p||!d||1!==d)}),U.jsx(qM,{title:null!=c?c:"Next",icon:O,onClick:h?function(){return h(l)}:function(){return z(QM.NEXT)},loading:b.next,disabled:!(!p||!d||d!==p)})]})}!function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e.CHANGEABLE="changeable"}(FM||(FM={})),function(e){e[e.FULL=12]="FULL",e[e.HALF=5.8]="HALF"}(VM||(VM={})),function(e){e.NEXT="NEXT",e.PREVIOUS="PREVIOUS"}(QM||(QM={}));var JM=xo("div")((function(e){return{maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.theme.spacing(12,0)}}));function _M(){return U.jsx(ee,{title:"403 Forbidden",children:U.jsx(n.Container,{component:is,children:U.jsxs(JM,{sx:{textAlign:"center",alignItems:"center"},children:[U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{variant:"h3",paragraph:!0,children:"Sorry, request forbidden!"})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{sx:{color:"text.secondary"},children:"Sorry, Not allowed to access this resource."})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(Wa,{sx:{height:260,my:{xs:5,sm:10}}})}),U.jsx(n.Button,{to:"/",size:"large",variant:"contained",component:r.Link,children:"Go to Home"})]})})})}var $M=xo("span")((function(e){var t=e.arrow,n=e.theme,r=-6.5,o={top:r,transform:"rotate(135deg)"},i={bottom:r,transform:"rotate(-45deg)"},a={left:r,transform:"rotate(45deg)"},s={right:r,transform:"rotate(-135deg)"};return q(q(q(q(q(q(q(q(q(q(q(q(q({width:14,height:14,position:"absolute",borderBottomLeftRadius:3.5,clipPath:"polygon(0% 0%, 100% 100%, 0% 100%)",border:"solid 1px ".concat(Cr("light"===n.palette.mode?n.palette.grey[500]:n.palette.common.black,.12))},su({color:n.palette.background.paper})),"top-left"===t&&q(q({},o),{left:20})),"top-center"===t&&q(q({},o),{left:0,right:0,margin:"auto"})),"top-right"===t&&q(q({},o),{right:20})),"bottom-left"===t&&q(q({},i),{left:20})),"bottom-center"===t&&q(q({},i),{left:0,right:0,margin:"auto"})),"bottom-right"===t&&q(q({},i),{right:20})),"left-top"===t&&q(q({},a),{top:20})),"left-center"===t&&q(q({},a),{top:0,bottom:0,margin:"auto"})),"left-bottom"===t&&q(q({},a),{bottom:20})),"right-top"===t&&q(q({},s),{top:20})),"right-center"===t&&q(q({},s),{top:0,bottom:0,margin:"auto"})),"right-bottom"===t&&q(q({},s),{bottom:20}))}));function eO(e){var t,n=e.open,r=e.children,o=e.arrow,i=void 0===o?"top-right":o,a=e.hiddenArrow,s=e.sx,l=K(e,["open","children","arrow","hiddenArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(i),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return U.jsxs(_p,q({open:Boolean(n),anchorEl:n,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:q(q(q({width:"auto",overflow:"inherit"},u),(t={},t["& .".concat(Cj.root)]={"& svg":{mr:2,flexShrink:0}},t)),s)}},l,{children:[!a&&U.jsx($M,{arrow:i}),r]}))}function tO(e){var t=e.actions,r=e.open,o=e.onClose,i=e.onOpen;return U.jsxs(U.Fragment,{children:[U.jsx(n.IconButton,{onClick:i,children:U.jsx(To,{icon:"eva:more-vertical-fill",width:20,height:20})}),U.jsx(eO,{open:r,anchorEl:r,onClose:o,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},arrow:"right-top",sx:{mt:-1,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,display:"flex",alignItems:"center",gap:1,"& svg":{width:24,height:24,flexShrink:0}}},children:t})]})}var nO={},rO={};Object.defineProperty(rO,"__esModule",{value:!0}),rO.on=function(e,t,n,r){r=r||!1,e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on"+t,(function(t){n.call(e,t||window.event)}))},rO.off=function(e,t,n,r){r=r||!1,e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent&&e.detachEvent("on"+t,n)};var oO={};Object.defineProperty(oO,"__esModule",{value:!0}),oO.default=function(e){if(!(e instanceof HTMLElement))return document.documentElement;for(var t="absolute"===e.style.position,n=/(scroll|auto)/,r=e;r;){if(!r.parentNode)return e.ownerDocument||document.documentElement;var o=window.getComputedStyle(r),i=o.position,a=o.overflow,s=o["overflow-x"],l=o["overflow-y"];if("static"===i&&t)r=r.parentNode;else{if(n.test(a)&&n.test(s)&&n.test(l))return r;r=r.parentNode}}return e.ownerDocument||e.documentElement||document.documentElement};var iO={};Object.defineProperty(iO,"__esModule",{value:!0}),iO.default=function(e,t,n){var r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,l=function l(){var c=+new Date-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(i,o),r||(i=null,o=null)))};return function(){i=this,o=arguments,a=+new Date;var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(i,o),i=null,o=null),s}};var aO={};Object.defineProperty(aO,"__esModule",{value:!0}),aO.default=function(e,t,n){var r,o;return t||(t=250),function(){var i=n||this,a=+new Date,s=arguments;r&&a<r+t?(clearTimeout(o),o=setTimeout((function(){r=a,e.apply(i,s)}),t)):(r=a,e.apply(i,s))}},Object.defineProperty(nO,"__esModule",{value:!0}),nO.forceVisible=nO.forceCheck=nO.lazyload=void 0;var sO=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),lO=e,cO=hO(lO),uO=hO(ke),dO=rO,pO=hO(oO),fO=hO(iO),mO=hO(aO);function hO(e){return e&&e.__esModule?e:{default:e}}function gO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vO(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function AO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var yO=0,bO=0,xO=0,wO=0,jO="data-lazyload-listened",CO=[],MO=[],OO=!1;try{var zO=Object.defineProperty({},"passive",{get:function(){OO=!0}});window.addEventListener("test",null,zO)}catch(Qm){}var TO=!!OO&&{capture:!1,passive:!0},DO=function(e){var t=e.ref;if(t instanceof HTMLElement){var n=(0,pO.default)(t),r=e.props.overflow&&n!==t.ownerDocument&&n!==document&&n!==document.documentElement?function(e,t){var n=e.ref,r=void 0,o=void 0,i=void 0,a=void 0;try{var s=t.getBoundingClientRect();r=s.top,o=s.left,i=s.height,a=s.width}catch(e){r=yO,o=bO,i=wO,a=xO}var l=window.innerHeight||document.documentElement.clientHeight,c=window.innerWidth||document.documentElement.clientWidth,u=Math.max(r,0),d=Math.max(o,0),p=Math.min(l,r+i)-u,f=Math.min(c,o+a)-d,m=void 0,h=void 0,g=void 0,v=void 0;try{var A=n.getBoundingClientRect();m=A.top,h=A.left,g=A.height,v=A.width}catch(e){m=yO,h=bO,g=wO,v=xO}var y=m-u,b=h-d,x=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return y-x[0]<=p&&y+g+x[1]>=0&&b-x[0]<=f&&b+v+x[1]>=0}(e,n):function(e){var t=e.ref;if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var n=void 0,r=void 0;try{var o=t.getBoundingClientRect();n=o.top,r=o.height}catch(e){n=yO,r=wO}var i=window.innerHeight||document.documentElement.clientHeight,a=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return n-a[0]<=i&&n+r+a[1]>=0}(e);r?e.visible||(e.props.once&&MO.push(e),e.visible=!0,e.forceUpdate()):e.props.once&&e.visible||(e.visible=!1,e.props.unmountIfInvisible&&e.forceUpdate())}},PO=function(){MO.forEach((function(e){var t=CO.indexOf(e);-1!==t&&CO.splice(t,1)})),MO=[]},NO=function(){for(var e=0;e<CO.length;++e){var t=CO[e];DO(t)}PO()},EO=void 0,BO=null,kO=function(e){function t(e){gO(this,t);var n=vO(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.visible=!1,n.setRef=n.setRef.bind(n),n}return AO(t,lO.Component),sO(t,[{key:"componentDidMount",value:function(){var e=window,t=this.props.scrollContainer;t&&"string"==typeof t&&(e=e.document.querySelector(t));var n=void 0!==this.props.debounce&&"throttle"===EO||"debounce"===EO&&void 0===this.props.debounce;if(n&&((0,dO.off)(e,"scroll",BO,TO),(0,dO.off)(window,"resize",BO,TO),BO=null),BO||(void 0!==this.props.debounce?(BO=(0,fO.default)(NO,"number"==typeof this.props.debounce?this.props.debounce:300),EO="debounce"):void 0!==this.props.throttle?(BO=(0,mO.default)(NO,"number"==typeof this.props.throttle?this.props.throttle:300),EO="throttle"):BO=NO),this.props.overflow){var r=(0,pO.default)(this.ref);if(r&&"function"==typeof r.getAttribute){var o=+r.getAttribute(jO)+1;1===o&&r.addEventListener("scroll",BO,TO),r.setAttribute(jO,o)}}else if(0===CO.length||n){var i=this.props,a=i.scroll,s=i.resize;a&&(0,dO.on)(e,"scroll",BO,TO),s&&(0,dO.on)(window,"resize",BO,TO)}CO.push(this),DO(this)}},{key:"shouldComponentUpdate",value:function(){return this.visible}},{key:"componentWillUnmount",value:function(){if(this.props.overflow){var e=(0,pO.default)(this.ref);if(e&&"function"==typeof e.getAttribute){var t=+e.getAttribute(jO)-1;0===t?(e.removeEventListener("scroll",BO,TO),e.removeAttribute(jO)):e.setAttribute(jO,t)}}var n=CO.indexOf(this);-1!==n&&CO.splice(n,1),0===CO.length&&"undefined"!=typeof window&&((0,dO.off)(window,"resize",BO,TO),(0,dO.off)(window,"scroll",BO,TO))}},{key:"setRef",value:function(e){e&&(this.ref=e)}},{key:"render",value:function(){var e=this.props,t=e.height,n=e.children,r=e.placeholder,o=e.className,i=e.classNamePrefix,a=e.style;return cO.default.createElement("div",{className:i+"-wrapper "+o,ref:this.setRef,style:a},this.visible?n:r||cO.default.createElement("div",{style:{height:t},className:i+"-placeholder"}))}}]),t}();kO.propTypes={className:uO.default.string,classNamePrefix:uO.default.string,once:uO.default.bool,height:uO.default.oneOfType([uO.default.number,uO.default.string]),offset:uO.default.oneOfType([uO.default.number,uO.default.arrayOf(uO.default.number)]),overflow:uO.default.bool,resize:uO.default.bool,scroll:uO.default.bool,children:uO.default.node,throttle:uO.default.oneOfType([uO.default.number,uO.default.bool]),debounce:uO.default.oneOfType([uO.default.number,uO.default.bool]),placeholder:uO.default.node,scrollContainer:uO.default.oneOfType([uO.default.string,uO.default.object]),unmountIfInvisible:uO.default.bool,style:uO.default.object},kO.defaultProps={className:"",classNamePrefix:"lazyload",once:!1,offset:0,overflow:!1,resize:!1,scroll:!0,unmountIfInvisible:!1};nO.lazyload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n){function r(){gO(this,r);var e=vO(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return e.displayName="LazyLoad"+function(e){return e.displayName||e.name||"Component"}(t),e}return AO(r,lO.Component),sO(r,[{key:"render",value:function(){return cO.default.createElement(kO,e,cO.default.createElement(t,this.props))}}]),r}()}};var LO=nO.default=kO;nO.forceCheck=NO,nO.forceVisible=function(){for(var e=0;e<CO.length;++e){var t=CO[e];t.visible=!0,t.forceUpdate()}PO()};var IO="data:image/webp;base64,UklGRqxWAABXRUJQVlA4WAoAAAASAAAAVwIAOgEAQU5JTQYAAADNmZz/AABBTk1GmAMAAAAAAAAAAFcCADoBAB4AAAJWUDgggAMAALA3AJ0BKlgCOwE+kUihTKWkIyKgdVgQsBIJaW7hdrEd60OP3pnPgaarvPqOPmuYM+NiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUdCRCfuIvEFR/ljYi8QVH+WMMEyqaUAmjJ67+PWWkEuhsq8urdTe4i8QVH+WNiLw0hZc/FkWY7Oyy5BPgBwJD/tSmbelUqw/EFR/ljYi8QVH+WNheBpleRDronNegYg1oPRkpehtarOUIE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CIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIP53/gHGmTq/TG2J8QAAAABJRU5ErkJggg==";function HO(e){var t=e.value,n=xs(t),r="image"===n;return U.jsx(LO,{style:{width:"100%",height:"100%"},once:!0,debounce:!0,placeholder:U.jsx(RO,{src:IO,alt:t,isLoading:!0}),children:U.jsx(RO,{src:t?r?t:ws(n):SO,alt:t,notFoundImage:!t})})}function RO(e){var t=e.src,r=e.alt,o=e.notFoundImage,i=e.isLoading,a=o||i;return U.jsx(n.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:U.jsx("img",{src:t,alt:r,height:"94%",width:"50%",style:{borderRadius:"5px",objectFit:"cover",cursor:a?void 0:"pointer"},onClick:a?void 0:function(){return window.open(t,"_blank")}})})}var WO=function(e){if(!e||"string"!=typeof e)return!1;var t=e.length>30,n=!/\s/.test(e),r=/^[0-9a-fA-F]+$/.test(e)||/^[0-9]+$/.test(e)||/^[a-zA-Z0-9_\-]+$/.test(e);return t&&(n||r)};function FO(e){var t=e.value,r=S.useState(!1),o=r[0],i=r[1];return U.jsxs("div",{children:[o?t:t.slice(0,200)," ",t.length>200&&U.jsx(n.Link,{type:"button",component:"button",sx:{textDecoration:"underline",fontSize:"inherit",letterSpacing:"inherit"},onClick:function(){return i(!o)},children:o?"view less":"view more"})]})}function VO(e){var t=e.data,r=e.arrayItemComponent,o=S.useState(!1),i=o[0],a=o[1],s=hv.isEnglish(),l=s?"View less":"عرض أقل",c=s?"View more":"عرض المزيد",u=i?t:t.slice(0,Math.min(5,t.length));return U.jsxs("div",{children:[u.map((function(e,t){return r(e,t)})),t.length>5&&U.jsx(n.Link,{type:"button",component:"button",sx:{textDecoration:"underline",fontSize:"inherit",letterSpacing:"inherit"},onClick:function(){return a(!i)},children:i?l:c})]})}function QO(e){var t=function(e){var t,n={isEmpty:!0,blocks:0,chars:0,preview:""};try{var r=JSON.parse(e);if(!(null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t.length))return n;var o=r.blocks,i=o.map((function(e){var t;return null!==(t=null==e?void 0:e.text)&&void 0!==t?t:""})).join("\n").trim(),a=i.length>60?"".concat(i.slice(0,60),"…"):i;return{isEmpty:0===i.length,blocks:o.length,chars:i.length,preview:a}}catch(e){return n}}(e.raw),r=hv.isEnglish(),o=r?"Empty":"فارغ",i=r?"blocks":"مقاطع",a=r?"chars":"حروف";if(t.isEmpty)return U.jsx(n.Chip,{size:"small",variant:"outlined",label:o});return U.jsx(n.Tooltip,{title:"".concat(t.blocks," ").concat(i," · ").concat(t.chars," ").concat(a),children:U.jsx(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:U.jsxs(n.Typography,q({},{color:"black",variant:"body2",sx:{fontWeight:50,wordWrap:"break-all",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",width:"auto",display:"inline"}},{children:[t.preview,":"]}))})})}var XO=require("lodash");function YO(e,t){var n,r,o,i,a,s,l,c,u,d,p=e.action,f=e.path,m=e.recordId;switch(p){case exports.ActionNames.LIST:return null!==(r=null===(n=t[f])||void 0===n?void 0:n.list)&&void 0!==r?r:f;case exports.ActionNames.NEW:return null!==(i=null===(o=t[f])||void 0===o?void 0:o.new)&&void 0!==i?i:f;case exports.ActionNames.SHOW:return null!==(s=null===(a=t[f])||void 0===a?void 0:a.show(m))&&void 0!==s?s:f;case exports.ActionNames.EDIT:return null!==(c=null===(l=t[f])||void 0===l?void 0:l.edit(m))&&void 0!==c?c:f;default:return null!==(d=null===(u=t[f])||void 0===u?void 0:u.list)&&void 0!==d?d:f}}function GO(t){var o,i,a,s,l,c=t.resourceName,u=t.params,d=t.resources,p=t.dialogState,f=t.paramsState,m=t.extras;f[0];var h=f[1],g=e.useContext(Ih).dashbaordUrlPrefix,v=e.useContext(Jh).paths,A=Ig(),y=A.setSuccessAlert,b=A.setErrorAlert,x=A.setAlert,w=e.useState(null),j=w[0],C=w[1],M=function(e){C(e.currentTarget)},O=function(){C(null)},z=u.row,T=d[c],D=T.properties,P=D.actions,N=D.modelName,E=p[1],B=[],k=r.useNavigate(),L=r.useLocation(),I=os("up","md");return P.show.isAccessible&&!(null===(o=z.hiddenActions)||void 0===o?void 0:o.includes("show"))&&B.push({href:"".concat(v[c].show(z._id)).concat(L.search),title:P.show.value,icon:U.jsx(To,{icon:"mdi:show-outline"}),key:"show",color:"primary.main",isMainAction:P.show.isMainAction}),P.edit.isAccessible&&sM(T,JC.EDIT)&&!(null===(i=z.hiddenActionKeys)||void 0===i?void 0:i.includes("edit"))&&B.push({onClick:function(e){var t=v[c].edit(e._id);k("".concat(t).concat(L.search))},title:P.edit.value,icon:U.jsx(To,{icon:"eva:edit-fill"}),key:"edit",color:"primary.main",isMainAction:P.edit.isMainAction}),P.new.isAccessible&&sM(T,JC.CREATE)&&!(null===(a=z.hiddenActionKeys)||void 0===a?void 0:a.includes("new"))&&P.duplicate&&!(null===(s=null==d?void 0:d.appConfigurations)||void 0===s?void 0:s.disableDuplicateAction)&&P.duplicate.isAccessible&&B.push({onClick:function(e){var t=v[c].duplicate(e._id);k("".concat(t).concat(L.search))},title:P.duplicate.value,icon:U.jsx(To,{icon:"eva:copy-fill"}),key:"duplicate",color:"primary.main",isMainAction:P.duplicate.isMainAction}),P.delete.isAccessible&&sM(T,JC.DELETE)&&!(null===(l=z.hiddenActionKeys)||void 0===l?void 0:l.includes("delete"))&&B.push({onClick:function(e){E({title:P?P.delete.confirmationMessageTitle:"",message:P?P.delete.confirmationMessageBody:"",onClose:function(){E({open:!1})},onConfirm:function(){var e;E({open:!1}),y(null!==(e=null==m?void 0:m.afterDeleteSnackBarText)&&void 0!==e?e:"Deleted successfully"),h((function(e){return q(q({},e),{filters:void 0,filter:void 0})}))},action:function(){return Bh.delete("".concat(g,"/").concat(d[c].properties.path,"/").concat(e._id))},open:!0})},title:P.delete.value,icon:U.jsx(To,{icon:"eva:trash-2-outline"}),key:"delete",color:"error.main",isMainAction:P.delete.isMainAction}),z.extraActionKeys&&P.extras&&0!==z.extraActionKeys.length&&z.extraActionKeys.forEach((function(e){var t;P.extras.record[e]&&B.push({onClick:function(t){var n,r,o;P.extras.record[e].guard||Bh.post("".concat(g,"/actions/execute/").concat(e),{record:t,modelName:N}).then((function(t){var n,r,o=t.data.data.response;if(P.extras.record[e].handlerStrategy===exports.HandlerStrategy.FILE_DOWNLOAD){var i=o.filePath;setTimeout((function(){window.open(i,"_blank")}))}else k(YO(o,v)),!1!==P.extras.record[e].showAlertMessage&&x(null!==(n=P.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=P.extras.record[e].severity)&&void 0!==r?r:"success")})).catch((function(){b("Error happened")})),E({title:null!==(r=null!==(n=P.extras.record[e].guardTitle)&&void 0!==n?n:P.extras.record[e].name)&&void 0!==r?r:"",message:null!==(o=P.extras.record[e].guard)&&void 0!==o?o:"Do you want to execute this action?",onClose:function(){E({open:!1})},onConfirm:function(t){var n,r,o,i;switch(E({open:!1}),P.extras.record[e].handlerStrategy){case exports.HandlerStrategy.NORMAL:t.action===exports.ActionNames.LIST?(h((function(e){return q(q({},e),{page:sz.page})})),x(null!==(n=P.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=P.extras.record[e].severity)&&void 0!==r?r:"success")):k(YO(t,v));break;case exports.HandlerStrategy.FILE_DOWNLOAD:var a=t.filePath;setTimeout((function(){window.open(a,"_blank")}));break;default:x(null!==(o=P.extras.record[e].message)&&void 0!==o?o:"Action executed Successfully",null!==(i=P.extras.record[e].severity)&&void 0!==i?i:"success")}},action:function(){return Bh.post("".concat(g,"/actions/execute/").concat(e),{record:t,modelName:N})},open:P.extras.record[e].guard})},title:P.extras.record[e].name,icon:ez(P.extras.record[e].icon),key:P.extras.record[e].name,color:null!==(t=P.extras.record[e].color)&&void 0!==t?t:"black",isMainAction:P.extras.record[e].isMainAction})})),I?U.jsxs(n.Stack,{direction:"row",alignItems:"center",children:$($([],KO(B.filter((function(e){var t;return(null===(t=null==d?void 0:d.appConfigurations)||void 0===t?void 0:t.showMainActions)&&e.isMainAction})),O,z),!0),[B.filter((function(e){var t;return!e.isMainAction||!(null===(t=null==d?void 0:d.appConfigurations)||void 0===t?void 0:t.showMainActions)})).length>0==!0&&U.jsx(tO,{open:j,onOpen:M,onClose:O,actions:qO(B.filter((function(e){var t;return!e.isMainAction||!(null===(t=null==d?void 0:d.appConfigurations)||void 0===t?void 0:t.showMainActions)})),O,z)})],!1)}):U.jsx(tO,{open:j,onOpen:M,onClose:O,actions:qO(B,O,z)})}function ZO(t,o,i,a,s,l,c,u,d,p,f,m){var h,g,v,A,y,b,x=hv.isEnglish();if(!(l&&l.hasOwnProperty(i.key)&&null!==l[i.key]||o.valuePath))return o.type===exports.FieldTypes.IMAGE?U.jsx(HO,{value:void 0}):U.jsx(n.Typography,q({},s,{children:"--- "}));switch(o.type){case exports.FieldTypes.STRING:if(/^#[0-9A-F]{6}$/i.test(a)){s.color=a,s.variant="body2";break}if(!l||!l.hasOwnProperty(i.key)||null===l[i.key]){t="---",s.variant="subtitle2";break}if(i.key===u&&c&&c.show.isAccessible){var w=m[d].show(l._id);t=U.jsx(n.Link,{align:"justify",component:r.Link,to:"".concat(w).concat(location.search),children:a})}break;case exports.FieldTypes.OBJECTID:if(i.key===u&&c&&c.show.isAccessible){t=U.jsx(n.Link,{align:"justify",component:r.Link,to:m[d].show(l._id),children:a});break}s.variant="subtitle2";break;case exports.FieldTypes.NUMBER:case exports.FieldTypes.PHONENUMBER:s.variant="subtitle2";break;case exports.FieldTypes.DATE:var j=!(!f[i.key]||!f[i.key].withTime);s.variant="subtitle2";var C=$C(l[i.key],void 0,!x);t=j?U.jsxs(n.Stack,{alignItems:"center",children:[U.jsx(n.Typography,{variant:"subtitle2",children:C}),U.jsx(n.Typography,{variant:"subtitle2",color:"rgb(99, 115, 129)",children:eM(new Date(l[i.key]),x?jg.ENGLISH:jg.ARABIC)})]}):C;break;case exports.FieldTypes.LOCALIZEDString:var M=l[i.key]&&l[i.key][0]?hv.getLocalizedString(l[i.key]):"----";t=i.key===u&&c&&c.show.isAccessible?U.jsx(n.Link,{align:"justify",component:r.Link,to:m[d].show(l._id),children:M}):M,s.variant="subtitle2";break;case exports.FieldTypes.ENUM:var O=f[i.key];if(!(O&&O.enumValues&&O.enumValues[a]))return U.jsx(n.Chip,{label:TM.enhance(a),size:"small"});var z=null===(g=null===(h=f[i.key])||void 0===h?void 0:h.enumValues[a])||void 0===g?void 0:g.label,T=null===(A=null===(v=f[i.key])||void 0===v?void 0:v.enumValues[a])||void 0===A?void 0:A.color,D=null===(b=null===(y=f[i.key])||void 0===y?void 0:y.enumValues[a])||void 0===b?void 0:b.labelColor;return U.jsx(n.Chip,{label:TM.enhance(null!=z?z:a),size:"small",sx:{background:T,color:D}});case exports.FieldTypes.IMAGE:return U.jsx(HO,{value:a});case exports.FieldTypes.BOOLEAN:return U.jsx(n.Chip,{label:"".concat(a),variant:"outlined",size:"small",component:"div"});case exports.FieldTypes.EXTERNAL_LINK:return U.jsx(CM,{link:a});case exports.FieldTypes.LOCATION:case exports.FieldTypes.NESTEDSCHEMA:s.variant="caption",s.color="GrayText",t="Object {...}";break;case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:s.variant="caption",s.color="GrayText",t="<HTML... />";break;case exports.FieldTypes.JSON_RICH_TEXT:return U.jsx(QO,{raw:a});case exports.FieldTypes.ARRAY:var P=o.arrayType,N=function(){s.variant="caption",s.color="GrayText",t="Length ["+l[i.key].length+"]"};if(!P||tz(P))N();else{var E=x?"Empty":"فارغ";if(!l[i.key].length)return U.jsx(n.Chip,{size:"small",variant:"outlined",label:E});try{t=U.jsx(VO,{data:l[i.key],arrayItemComponent:function(t,n){var r;return U.jsxs(e.Fragment,{children:[ZO(t,q(q({},o),{type:P}),q(q({},i),{key:"".concat(i.key,".").concat(n),path:o.path}),t,s,q(q({},l),(r={},r["".concat(i.key,".").concat(n)]=t,r)),c,u,d,p,f,m),n<l[i.key].length-1&&", "]},n)}})}catch(e){N()}}break;case exports.FieldTypes.MULTIPLE_TEXT:s.variant="subtitle2",t=(l[i.key]||[]).join(", ");break;case exports.FieldTypes.REFERENCE:if(!l[i.key])break;var B=l[i.key].pathOfTable?l[i.key].pathOfTable:i.path,k=p[B];if(!(k&&k.properties&&l[i.key]&&B)){s.variant="subtitle2",t=a._id;break}var L=k.properties.title,I=ty.checkLocalizedString(p,B,L)?hv.getLocalizedString(l[i.key][L]):l[i.key][L]?l[i.key][L]:l[i.key]._id;if(!k.properties.actions.show.isAccessible||!sM(k,JC.VIEW)){t=a?I:l[i.key]?l[i.key]._id:"---";break}t=U.jsx(n.Link,{align:"justify",href:m[B||i.key.toLowerCase()].show(a||l[i.key]&&l[i.key]._id?l[i.key]._id:""),children:a||l[i.key]._id?I:"---- "})}var S="string"==typeof t&&t.length>200?U.jsx(FO,{value:t}):t;return U.jsx(n.Typography,q({},s,{children:S}))}function UO(e,t,o,i,a){var s=i[e].properties?i[e].properties.model:void 0;s[t.key];var l=i[e].properties,c=l.title,u=l.actions,d=o.value,p=o.row,f=WO(d),m={color:"black",variant:"body2",sx:{fontWeight:50,wordWrap:f?"break-all":"break-word",overflow:f?"hidden":"visible",textOverflow:f?"ellipsis":"clip",whiteSpace:f?"nowrap":"normal",width:f?"100%":"auto",display:f?"block":"inline"}},h=d;if(t.key.includes(".")){var g=t.key.split("."),v={key:g[g.length-1],value:t.value,path:t.path},A=$O(t.key,p),y=_O(t.key,s),b=A?A[v.key]:null;return ZO(b,y,v,b,m,A,u,c,e,i,s,a)}return p.hasOwnProperty(t.key)&&null!==p[t.key]?t.key===c?U.jsx(n.Typography,{variant:"body2",color:"black",sx:{textAlign:"center"},children:u.show.isAccessible?U.jsx(n.Link,{align:"justify",component:r.Link,to:a[e].show(p._id)+location.search,style:{cursor:"pointer"},children:s[t.key].type===exports.FieldTypes.LOCALIZEDString?p[t.key][0]?hv.getLocalizedString(p[t.key]):"---":"object"==typeof p[t.key]?hv.getLocalizedString(p[t.key]):p[t.key]}):U.jsx(n.Typography,q({},m,{children:s[t.key].type===exports.FieldTypes.LOCALIZEDString?hv.getLocalizedString(p[t.key]):p[t.key]}))}):ZO(h,s[t.key],t,d,m,p,u,c,e,i,s,a):s[t.key].valuePath?ZO(h,s[t.key],t,XO.get(p,s[t.key].valuePath),m,p,u,c,e,i,s,a):s[t.key].type===exports.FieldTypes.IMAGE?U.jsx(HO,{value:void 0}):U.jsx(n.Typography,q({},m,{children:"--- "}))}function qO(e,t,r){return e.map((function(e){return e.href?U.jsxs(n.MenuItem,{component:"a",href:e.href,rel:"noopener noreferrer",sx:{color:e.color},onClick:t,children:[e.icon,e.title]},e.key):U.jsxs(n.MenuItem,{onClick:function(){var n;null===(n=e.onClick)||void 0===n||n.call(e,r,e.key),t()},sx:{color:e.color},children:[e.icon,e.title]},e.key)}))}function KO(e,t,o){return e.map((function(e){return e.href?U.jsx(n.Link,{component:r.Link,to:e.href,style:{textDecoration:"none",color:e.color},children:U.jsx(n.Tooltip,{title:e.title,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:U.jsx(n.IconButton,{sx:{color:e.color},children:e.icon})})},e.key):U.jsx(n.Tooltip,{title:e.title,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:U.jsx(n.IconButton,{onClick:function(){var n;null===(n=e.onClick)||void 0===n||n.call(e,o,e.key),t()},sx:{color:e.color},children:e.icon})},e.key)}))}function JO(t){var o=t.resources,i=t.resourceName,a=t.selected,s=t.bulkActionsDialogState,l=t.setBulkActionsDialogState,c=t.setSelected,u=e.useContext(Ih).dashbaordUrlPrefix,d=e.useContext(Jh).paths,p=o[i].properties,f=p.actions,m=p.modelName,h=t.dialogState[1],g=t.gridState[1],v=Ig(),A=v.setErrorAlert,y=v.setAlert,b=r.useNavigate();return o[i].properties.actions.extras&&o[i].properties.actions.extras.resource?U.jsx(U.Fragment,{children:Object.keys(o[i].properties.actions.extras.resource).map((function(e){var t,r,o,i,p;if(!f.extras.resource[e])return U.jsx(U.Fragment,{});var v=null!==(t=f.extras.resource[e].message)&&void 0!==t?t:"Action executed Successfully",x=null!==(r=f.extras.resource[e].severity)&&void 0!==r?r:"success";return U.jsx(n.Button,{size:null!==(o=f.extras.resource[e].size)&&void 0!==o?o:"small",color:null!==(i=f.extras.resource[e].color)&&void 0!==i?i:"inherit",variant:null!==(p=f.extras.resource[e].variant)&&void 0!==p?p:"contained",startIcon:ez(f.extras.resource[e].icon),onClick:function(t){var n,r,o,i;if(!f.extras.resource[e].guard)switch(f.extras.resource[e].handlerStrategy){case exports.HandlerStrategy.NORMAL:Bh.post("".concat(u,"/actions/execute/").concat(e),{record:a,modelName:m}).then((function(e){var t=e.data.data.response;t.action===exports.ActionNames.LIST?(g((function(e){return q(q({},e),{page:sz.page})})),y(v,x)):b(YO(t,d))})).catch((function(){A("Error happened")}));break;case exports.HandlerStrategy.FILE_DOWNLOAD:Bh.post("".concat(u,"/actions/execute/").concat(e),{record:a,modelName:m}).then((function(e){var t=e.data.data.response;setTimeout((function(){window.open(t.filePath,"_blank")}))})).catch((function(){}));break;case exports.HandlerStrategy.CUSTOM_COMPONENT:var p=null!==(n=f.extras.resource[e].fullScreen)&&void 0!==n&&n;!function(e,t,n,r,o,i,a,c,u){var d=q({},s);d[e]={state:t,modelName:n,saveLoadingState:r,fullScreen:i,setSelected:o,documentIds:null!=u?u:[],afterExecuteMessage:a,severity:c},l(d)}(e,!0,m,!1,c,p,v,x,a);break;default:y(v,x)}h({title:null!==(o=null!==(r=f.extras.resource[e].guardTitle)&&void 0!==r?r:f.extras.resource[e].name)&&void 0!==o?o:"",message:null!==(i=f.extras.resource[e].guard)&&void 0!==i?i:"Do you want to execute this action?",onClose:function(){h({open:!1})},onConfirm:function(t){switch(h({open:!1}),c((function(e){return[]})),f.extras.resource[e].handlerStrategy){case exports.HandlerStrategy.NORMAL:t.action===exports.ActionNames.LIST?(g((function(e){return q(q({},e),{page:sz.page})})),y(v,x)):b(YO(t,d));break;case exports.HandlerStrategy.FILE_DOWNLOAD:t.filePath,setTimeout((function(){window.open(t.filePath,"_blank")}));break;default:y(v,x)}},action:function(){return Bh.post("".concat(u,"/actions/execute/").concat(e),{record:a,modelName:m})},open:f.extras.resource[e].guard})},sx:{mr:1},children:f.extras.resource[e].name},e)}))}):U.jsx(U.Fragment,{})}function _O(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t[r];for(var o="",i=1;i<n.length;i++)o+=n[i],i!==n.length-1&&(o+=".");return _O(o,t[r].schema)}function $O(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t;for(var o="",i=1;i<n.length;i++)o+=n[i],i!==n.length-1&&(o+=".");return $O(o,t[r])}var ez=function(e){return U.jsx(Lu,{src:e,sx:{width:1,height:1}})},tz=function(e){switch(e){case exports.FieldTypes.ARRAY:case exports.FieldTypes.FILE:case exports.FieldTypes.IMAGE:case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.NESTEDSCHEMA:case exports.FieldTypes.LOCATION:return!0;default:return!1}};function nz(e,t,n,r,o,i){if(!r||!t||!r.hasOwnProperty(t.key)||null===r[t.key])return"---";switch(e.type){case exports.FieldTypes.STRING:if(!r.hasOwnProperty(t.key)||null===r[t.key])return"---";break;case exports.FieldTypes.DATE:return function(e,t){var n=(e=new Date(e)).getMonth()+1,r=e.getDate(),o=tM(n),i=tM(r),a=e.getFullYear()+"-"+o+"-"+i;return t&&(a=a+" "+eM(e,jg.ENGLISH)),a}(n,!(!i[t.key]||!i[t.key].withTime));case exports.FieldTypes.LOCALIZEDString:var a=r[t.key]&&r[t.key][0]?hv.getLocalizedString(r[t.key]):"----";return a||"---";case exports.FieldTypes.NESTEDSCHEMA:return"Object {...}";case exports.FieldTypes.ARRAY:return"Length ["+n.length+"]";case exports.FieldTypes.REFERENCE:if(!r[t.key])break;var s=o[t.path];if(!s||!s.properties||!r[t.key])return n._id;var l=o[t.path].properties.title,c=ty.checkLocalizedString(o,t.path,l)?hv.getLocalizedString(r[t.key][l]):r[t.key][l];return s.properties.actions.show.isAccessible?n?c:"---- ":n?c:"---"}return n}function rz(e){var t,r=e.params,o=e.props,i=e.resourceName,a=e.extras,s=Sg().paths,l=kg().resources;if(!l)return U.jsx(U.Fragment,{});var c=null===(t=l[i].properties.model[o.key])||void 0===t?void 0:t.isClickable,u=null==a?void 0:a.onClickProperty;return c?U.jsx(n.Button,{sx:{padding:0},onClick:function(){return u&&u[o.key]?u[o.key](o,i,r):void 0},children:UO(i,o,r,l,s)}):UO(i,o,r,l,s)}var oz=1,iz=[5,10,25,50,100],az={currentPage:1,perPage:5,recordsCount:0},sz={page:oz,perPage:5};function lz(e,t,n,r,o,i,a){var s=null==t?void 0:t[n],l=e.filter((function(e){return"actions"!==e.key})).map((function(e){var r,o,l=null===(o=null===(r=null==s?void 0:s.properties)||void 0===r?void 0:r.model)||void 0===o?void 0:o[e.key],c=i?null==l?void 0:l.minWidth:150;return{field:e.key,headerName:e.value,align:"center",headerAlign:"center",flex:e.flex?e.flex:i?1:void 0,minWidth:c,cellClassName:function(e){return WO(e.value)?"truncate-cell":"normal-cell"},valueGetter:function(r){return function(e,t,n,r){var o=r[e].properties?r[e].properties.model:void 0,i=r[e].properties,a=i.title;i.actions;var s=n.value,l=n.row;if(t.key.includes(".")){var c=t.key.split("."),u={key:c[c.length-1],value:t.value,path:t.path},d=$O(t.key,l);return nz(_O(t.key,o),u,d?d[u.key]:null,d,r,o)}return l.hasOwnProperty(t.key)&&null!==l[t.key]?t.key===a?o[t.key].type===exports.FieldTypes.LOCALIZEDString?hv.getLocalizedString(l[t.key]):l[t.key]:nz(o[t.key],t,s,l,r,o):"---"}(n,e,r,t)},renderCell:function(t){return e.renderCell?e.renderCell(t):U.jsx(rz,{resourceName:n,params:t,props:e,extras:a})}}})),c=e.find((function(e){return"actions"===e.key})),u={field:"actions",headerName:"",type:"number",editable:!1,align:"center",headerAlign:"left",disableColumnMenu:!0,flex:i?1:void 0,minWidth:i?void 0:150,hideable:!1,sortable:!1,disableExport:!0,renderCell:function(e){return(null==c?void 0:c.renderCell)?null==c?void 0:c.renderCell(e):U.jsx(GO,{resources:t,params:e,resourceName:n,dialogState:r,paramsState:o,extras:a})}};return!(null==a?void 0:a.hideActions)&&l.push(u),l}var cz=function(){function e(e,t){this.defaultrowsPerPage=t,this.searchParams=e}return e.prototype.get=function(){return{page:this.getPageNumber(),pageSize:this.getPageSize()}},e.prototype.getPageSize=function(){var e=this.searchParams.get("perPage");return e?isNaN(+e)||+e<=0?this.getDefaultPageSize():iz.reduce((function(t,n){return Math.abs(n-+e)<Math.abs(t-+e)?n:t})):this.defaultrowsPerPage},e.prototype.getPageNumber=function(){var e=this.searchParams.get("page"),t=sz.page;return e?isNaN(+e)||+e<=0?this.getDefaultPageNumber():+e:t},e.prototype.getDefaultPageSize=function(){return this.defaultrowsPerPage},e.prototype.getDefaultPageNumber=function(){return sz.page},e}();function uz(e){var t,n,r=e.defaultFilters,o=e.resource,i=e.searchParams,a=o.properties.filters,s=a&&a.scopes&&a.scopes.auto?a.scopes.auto.key:void 0,l=o.properties.model,c=a.scopes.options,u=void 0===(null===(t=a.scopes)||void 0===t?void 0:t.showAll)||(null===(n=a.scopes)||void 0===n?void 0:n.showAll),d=o.properties.defaultOrderBy,p=o.properties.defaultOrder,f=o.properties.defaultrowsPerPage,m={},h=void 0;new FA(o).getUniqueFields().forEach((function(e){"__v"!==e&&""!==e&&QA(l[e],e,m,i,l)})),h=VA(m,l,s);var g=new cz(i,f).get();return{page:g.page,order:p,orderBy:d,perPage:g.pageSize,filters:r?h.concat(r):h,scope:s&&i.get(s)?i.get(s):!u&&c?c[0].key:void 0}}var dz={},pz=xa;Object.defineProperty(dz,"__esModule",{value:!0});var fz=dz.default=void 0,mz=pz(Ca()),hz=U,gz=(0,mz.default)((0,hz.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function vz(t){var o=t.schema,i=t.onClickClearFilter,a=t.onRemoveFilterValue,s=e.useState([]),l=s[0],c=s[1],u=r.useSearchParams(),d=u[0];return u[1],e.useEffect((function(){d&&c(function(e,t){var n=[];if(!e)return n;var r,o=function(o){var i=t[o],a=i.type;r=e.get(o);var s=Bu.checkRefId(o)?Bu.convertCamelCaseToWord(o.slice(0,-2)):Bu.convertCamelCaseToWord(o);switch(a){case exports.FieldTypes.STRING:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.ENUM:r&&n.push({fieldKey:o,fieldTitle:s,filterValues:[{filterValueKey:o,filterValueTitle:r}]});break;case exports.FieldTypes.BOOLEAN:!1!==r&&!0!==r||n.push({fieldTitle:s,fieldKey:o,filterValues:[{filterValueKey:o,filterValueTitle:r}]});break;case exports.FieldTypes.NUMBER:case exports.FieldTypes.DATE:var l=o+"-from",c=o+"-to",u=e.get(o+"-from")?e.get(o+"-from"):void 0,d=e.get(o+"-to")?e.get(o+"-to"):void 0;if(u||d){var p=[];u&&p.push({filterValueKey:l,filterValueTitle:"From: ".concat(u)}),d&&p.push({filterValueKey:c,filterValueTitle:"To: ".concat(d)}),n.push({fieldTitle:s,fieldKey:o,filterValues:p})}break;case exports.FieldTypes.REFERENCE:if(i.multipleInFilter){var f=e.getAll(o+"-name");if(f&&f.length>0){var m=e.getAll(o+"-id");m&&m.length>0&&m.length===f.length&&n.push({fieldKey:o,fieldTitle:s,filterValues:f.map((function(e,t){return{filterValueKey:m[t],filterValueTitle:f[t]}}))})}}else{var h=e.get(o+"-name"),g=e.get(o+"-id");h&&g&&n.push({fieldKey:o,fieldTitle:s,filterValues:[{filterValueKey:g,filterValueTitle:h}]})}}};for(var i in t)o(i);return n}(d,o))}),[d]),U.jsx(U.Fragment,{children:0===l.length?U.jsx(U.Fragment,{children:" "}):U.jsxs(n.Grid,{container:!0,justifyContent:"start",rowGap:{xs:"10px"},columnGap:{xs:"10px"},alignItems:"center",children:[l.map((function(e){return U.jsxs(n.Stack,{direction:"row",alignItems:"center",padding:.6,borderRadius:"8px",sx:{border:"1px dashed rgba(145, 158, 171, 0.2)"},spacing:1,children:[U.jsx(n.Typography,{fontSize:{xs:"13px",md:"14px"},fontWeight:600,children:"".concat(e.fieldTitle)}),U.jsx(n.Stack,{direction:"row",alignItems:"center",spacing:1,children:e.filterValues.map((function(t){return U.jsx(n.Chip,{size:"small",sx:{fontSize:{xs:"12px",md:"13px"},borderRadius:"8px",overflow:"hidden",textOverflow:"ellipsis",fontWeight:500},label:t.filterValueTitle,variant:"outlined",onDelete:a?function(){return a(e.fieldKey,t.filterValueKey)}:void 0},t.filterValueKey)}))})]},e.fieldKey)})),i&&U.jsx(n.Button,{onClick:i,variant:"text",color:"error",startIcon:U.jsx(fz,{}),children:"Clear"})]})})}function Az(t){var o,i=this,a=r.useParams().id,s=void 0===a?"":a,l=e.useState(),c=l[0],u=l[1],d=e.useState(void 0),p=d[0],f=d[1],m=e.useState([]),h=m[0],g=m[1],v=e.useState({}),A=v[0],y=v[1],b=(o=r.useLocation().pathname,e.useMemo((function(){return o}),[o])),x=t.isEdit,w=t.isDuplicate,j=t.path,C=t.modelRoute,M=t.removeHeaderBreadcrumbs,O=t.afterCreateSnackText,z=t.afterEditSnackText,T=t.onSubmitForm,D=t.Component,P=t.redirectPath,N=t.Actions,E=t.HeadingView,B=t.BreadcrumbsChildren,k=t.BreadCrumbLinks,L=t.disableCreateNewButtonOnReference,I=t.keepFullWidthElements,S=t.defaultFilters,H=t.showFilterChips,R=t.hideHeaderBreadcrumbs,W=void 0!==R&&R,F=t.fieldsMap,V=x||w,Q=e.useState(!!V),X=Q[0],Y=Q[1],G={},Z=r.useLocation(),K=e.useContext(Kh).resources,$=e.useContext(ug);$.textFieldSize;var te=$.themeStretch,ne=e.useContext(Ih).dashbaordUrlPrefix,oe=e.useContext(Jh),ie=oe.paths,ae=oe.root,se=r.useNavigate(),le=r.useSearchParams(),ce=le[0];le[1];var ue=hv.isEnglish(),de=K[j],pe=de.properties,fe=pe.model,me=pe.name,he=pe.title,ge=new jv(me,ue,he,c,fe,x),ve=uz({defaultFilters:S,searchParams:ce,resource:de});return e.useEffect((function(){J(i,void 0,void 0,(function(){var e,t;return _(this,(function(n){switch(n.label){case 0:return V?(Y(!0),[4,Bh.get("".concat(ne,"/").concat(C)+"/"+s,{params:ve})]):[3,2];case 1:e=n.sent(),u(e.data.data.record),e.data.data.numberOfRecords&&e.data.data.recordIndex&&f({recordIndex:e.data.data.recordIndex,numberOfRecords:e.data.data.numberOfRecords}),Y(!1),n.label=2;case 2:return(t=de.formProperties)&&t.map((function(e){"ref"===fe[e].type&&(G[e]=fe[e].apiRoute,fe[e].mediaUploader&&g((function(t){return t.concat(e)})))})),0!==Object.keys(G).length&&y(G),[2]}}))}))}),[b]),sM(de,x?JC.EDIT:JC.CREATE)?U.jsx(ee,{title:ge.getTitle(),children:U.jsxs(n.Container,{maxWidth:!te&&"lg",children:[!W&&U.jsx(re,{headingView:E&&!X&&U.jsx(E,{record:c}),heading:ge.getTitle(),links:M?[]:k&&!X?k(c):ge.getBreadCrumbLinks(ie,j,ae),action:U.jsxs(n.Stack,{spacing:2,children:[!de.properties.disableNextPreviousButtonsInEditPage&&x&&U.jsx(KM,q({},t,{params:ve,recordId:s,modelPath:C,navigateTo:function(e){var t=ie[j].edit(e);se("".concat(t).concat(Z.search))},numberOfRecords:null==p?void 0:p.numberOfRecords,recordIndex:null==p?void 0:p.recordIndex})),U.jsx(n.Stack,{direction:"row",spacing:2,children:c&&!X&&N&&U.jsx(N,{record:c,setRecord:u})})]}),children:B&&!X&&U.jsx(B,{record:c})}),U.jsxs(n.Stack,{spacing:1,children:[H&&U.jsx(vz,{schema:fe}),X?U.jsx(n.Grid,{container:!0,alignItems:"center",children:U.jsx(wv,{loadingVertical:!0,sx:{height:50}},5)}):D?U.jsx(D,{record:c,isEdit:x,isDuplicate:w,refRoutes:A,id:s,path:j,modelRoute:C,resources:K,mediaUploaderFields:h,onSubmitForm:T,afterCreateSnackText:O,afterEditSnackText:z}):U.jsx(UM,{isEdit:x,referencedMap:A,isDuplicate:w,id:s,record:c,path:j,mediaUploaderFields:h,onSubmitForm:T,modelRoute:C,redirectPath:P,afterCreateSnackText:O,afterEditSnackText:z,enableCreateNewButtonOnReference:!L,keepFullWidthElements:I,fieldsMap:F})]})]})}):U.jsx(_M,{})}function yz(e){var t=e.open,r=e.data,o=e.onDismiss,i=r.resource,a=r.resourcePath,s=r.enableCreateNewButtonOnReference,l=Ig().setSuccessAlert,c=hv.isEnglish(),u=i.properties,d=u.model,p=u.name,f=u.title,m=new jv(p,c,f,void 0,d,!1);return U.jsx(n.Drawer,{anchor:"right",open:t,onClose:o,sx:q(q({},s&&{"& .MuiDrawer-paper":{maxWidth:"50vw"}}),{overflowY:"auto",maxHeight:"calc(100vh - 100px)","&::-webkit-scrollbar":{width:"4px",height:"4px"},"&::-webkit-scrollbar-track":{borderRadius:"10px",background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}}),children:U.jsx("div",{style:{paddingTop:"24px",paddingBottom:"24px"},children:U.jsx(Az,{isEdit:!1,modelRoute:i.properties.path,path:a,removeHeaderBreadcrumbs:!0,onSubmitForm:function(){o(),l("Created successfully")},disableCreateNewButtonOnReference:!0,keepFullWidthElements:!0,HeadingView:function(){return U.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[U.jsx(n.Typography,{variant:"h4",gutterBottom:!0,children:m.getTitle()}),U.jsx(n.IconButton,{onClick:o,children:U.jsx(Oa,{})})]})}},"CreateNewDialog-".concat(a))})})}fz=dz.default=gz;var bz="AddMoreOption";function xz(t){var r=t.name,o=t.options,i=t.loading,a=t.multiple,s=t.onOptionChange,l=t.onOpenChanged,u=t.hasNext,d=t.loadMoreText,p=t.resource,f=t.resourcePath,m=t.enableCreateNewButtonOnReference,h=t.dependOn,g=t.relatedFields,v=t.fieldKey,A=K(t,["name","options","loading","multiple","onOptionChange","onOpenChanged","hasNext","loadMoreText","resource","resourcePath","enableCreateNewButtonOnReference","dependOn","relatedFields","fieldKey"]),y=c.useFormContext(),b=y.control,x=y.getValues,w=y.watch,j=y.reset;y.setValue;var C=e.useState(!1),M=C[0],O=C[1],z=e.useState({page:1,filter:void 0}),T=z[0],D=z[1],P=Bg().textFieldSize,N=Hg().openDialog,E=function(e){var t,n,r;t=e.target.value,n=B(),r="".concat(null!=t?t:"").concat(n?"&".concat(n):""),D({page:1,filter:r})},B=function(){if(null==h?void 0:h.length){var e=[];return h.forEach((function(t){var n=x(t);n&&n._id&&e.push("".concat(t,"=").concat(n._id,";;ref"))})),e.length?"filters=".concat(e.join("^^")):void 0}},k=w(null!=h?h:[]),L=function(e){var t,n=(null===(t=T.filter)||void 0===t?void 0:t.split("filters=")[0])||T.filter,r=B(),o="".concat(null!=n?n:"").concat(r?"&".concat(r):"");D((function(e){return q(q({},e),{filter:o})})),l(e,T.page,o),O(e)},I=e.useMemo((function(){return bv.debounce(E,500)}),[]);e.useEffect((function(){return function(){I.cancel()}}),[]),e.useEffect((function(){l(M,T.page,T.filter)}),[T]);var S=U.jsx(qu,{fontSize:"small"}),H=U.jsx(td,{fontSize:"small"}),R=!!(null==h?void 0:h.length)&&k.some((function(e){return!e||!e._id}));return U.jsxs(n.Stack,{spacing:0,children:[U.jsx(c.Controller,{name:r,control:b,render:function(e){var t=e.field,l=e.fieldState.error;return R?U.jsx(U.Fragment,{}):U.jsx(n.Autocomplete,q({multiple:a,fullWidth:A.fullWidth,sx:A.sx},t,{filterOptions:function(e){var t=$([],e,!0);return u&&0!==e.length&&t.push({_id:bz,title:null!=d?d:"+ Load More"}),t},disableCloseOnSelect:a,id:r,size:"medium",open:M,disabled:A.disabled||(null==h?void 0:h.some((function(e,t){var n=k[t];return!n||!n._id}))),onOpen:function(){return L(!0)},onClose:function(){L(!1)},isOptionEqualToValue:function(e,t){return e._id===t._id},renderOption:function(e,t,r){var o,i,s=r.selected;return U.jsx(U.Fragment,{children:t._id===bz?U.jsx(n.Stack,{justifyContent:"center",children:U.jsx(n.Button,{sx:{margin:1},onClick:function(){return D({page:T.page+1,filter:T.filter})},children:t.title})}):U.jsx("li",q({},e,{style:{justifyContent:t._id===bz?"center":void 0},children:U.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[a&&U.jsx(n.Checkbox,{icon:S,checkedIcon:H,style:{marginRight:1},checked:s}),t.image&&U.jsx(n.Avatar,{alt:"-",src:t.image}),U.jsx(n.Typography,{children:p?gv.get(p,t):null!==(i=null!==(o=t.title)&&void 0!==o?o:t.name)&&void 0!==i?i:t._id})]})}))})},getOptionLabel:function(e){var t,n,r,o=p?gv.get(p,e):null!==(r=null!==(n=null!==(t=null==e?void 0:e.title)&&void 0!==t?t:null==e?void 0:e.name)&&void 0!==n?n:null==e?void 0:e._id)&&void 0!==r?r:"";return e.image&&!a&&o&&""!==o?o+";;"+e.image:o},options:null!=o?o:[],loading:i,onChange:function(e,n,r){var o=x();if(s&&s(n),t.onChange(a?n:q({},n)),g&&g.length>0){var i=x();g.forEach((function(e){i[e]=bv.isArray(i[e])?[]:null})),"clear"===r&&v?i[v]=null:"selectOption"===r&&v&&(i[v]=n),j(i)}else if("clear"===r&&v){if(bv.isArray(o[v])){var l=t.name.match(/\[(\d+)\]/),c=l?parseInt(l[1],10):null;o[v]=o[v].filter((function(e,t){return t!==c}))}else o[v]=null;j(o)}},renderInput:function(e){var t,r,o,s=e.inputProps.value,c=void 0;if(!a&&"string"==typeof s&&s.includes(";;")){var u=s.split(";;");c=u[1],e.inputProps=q(q({},e.inputProps),{value:u[0]}),e.InputProps=q(q({},e.InputProps),{startAdornment:U.jsx(n.Avatar,{src:c,alt:""})})}return U.jsx(n.TextField,q({},e,A,{size:P,error:!!l,onChange:I,helperText:null!==(t=null==l?void 0:l.message)&&void 0!==t?t:null===(o=null===(r=Object(l))||void 0===r?void 0:r._id)||void 0===o?void 0:o.message,InputProps:q(q({},e.InputProps),{endAdornment:U.jsxs(U.Fragment,{children:[i?U.jsx(n.CircularProgress,{color:"inherit",size:20}):null,e.InputProps.endAdornment]})})}))}}))}}),m&&U.jsx(n.Button,{size:"small",onClick:function(){N(yz,{resource:p,resourcePath:f,enableCreateNewButtonOnReference:m})},sx:{flexShrink:0,alignSelf:"end",padding:0,marginTop:0,fontSize:"13px",fontWeight:400,textDecoration:"underline"},style:{marginBottom:"5px"},children:"Create New"})]})}var wz=["true","false"];function jz(e,t,r,o,i,a,s,l,c,u,d,p){var f;if(r[t])switch(r[t].type){case exports.FieldTypes.STRING:return U.jsx(Yu,{name:a,size:e,label:r[t].value},t);case exports.FieldTypes.PHONENUMBER:return U.jsx(C,{defaultCountry:r[t].defaultCountryCode?r[t].defaultCountryCode:r[t].countryCodes?r[t].countryCodes[0]:"sa",onChange:function(e){return u(a,e)},onlyCountries:r[t].countryCodes?r[t].countryCodes:[],name:a,size:e,label:r[t].value,value:d(a)?d(a):"",variant:"outlined",fullWidth:!0},t);case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.OBJECTID:return U.jsx(Yu,{name:a,size:e,label:r[t].value},t);case exports.FieldTypes.NUMBER:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsxs(n.Stack,{direction:"row",spacing:2,children:[U.jsx(Yu,{name:t+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),U.jsx(Yu,{name:t+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case exports.FieldTypes.DATE:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsxs(n.Grid,{container:!0,spacing:2,children:[U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:t+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:t+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case exports.FieldTypes.ENUM:return U.jsx(Gu,{name:a,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:Object.keys(r[t].enumValues).map((function(e){var o,i,a,s=r[t].enumValues,l=(null===(o=s[e])||void 0===o?void 0:o.label)?e:s[e],c=null!==(a=null===(i=s[e])||void 0===i?void 0:i.label)&&void 0!==a?a:s[e];return U.jsx(n.MenuItem,{value:l,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:TM.enhance(c)},l)}))},t);case exports.FieldTypes.BOOLEAN:return U.jsx(Gu,{name:a,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:wz.map((function(e){return U.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case exports.FieldTypes.ARRAY:case exports.FieldTypes.REFERENCE:var m=p?p[null===(f=r[t])||void 0===f?void 0:f.path]:void 0,h=XM(r,t,LM.FILTER_LIST,m);return U.jsx(xz,{name:a,size:e,label:r[t].value,multiple:!1,onOptionChange:function(e){return c(e,t)},options:o[t]&&o[t].data?o[t].data:[],loading:i[a],hasNext:o[t]&&o[t].hasNext,onOpenChanged:function(e,n,o){return l(r[t].apiRoute,r[t].path,e,t,a,n,o,h)},resource:m},t);default:return}}var Cz={},Mz=xa;Object.defineProperty(Cz,"__esModule",{value:!0});var Oz=Cz.default=void 0,zz=Mz(Ca()),Tz=U,Dz=(0,zz.default)((0,Tz.jsx)("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"}),"RestartAlt");Oz=Cz.default=Dz;var Pz={},Nz=xa;Object.defineProperty(Pz,"__esModule",{value:!0});var Ez=Pz.default=void 0,Bz=Nz(Ca()),kz=U,Lz=(0,Bz.default)((0,kz.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt");function Iz(t){var r=this,o=t.schema,i=t.resources,a=t.filterProperties,s=t.searchParams,u=t.scopeKey,d=t.scopeValue,p=t.setParams,f=t.size;t.initialQueryParams;var m=t.isQuickFilter,h=t.quickFilterValues,g=t.onRefrenceChanged,v=t.setSearchParams,A=t.handleFilterDrawerClose,y=t.filterString,b=e.useState({}),x=b[0],w=b[1],j=e.useState({}),C=j[0],M=j[1],O=function(e,t,n,a,s,l,c,u){return J(r,void 0,void 0,(function(){return _(this,(function(r){switch(r.label){case 0:return[4,WM({apiRoute:e,referencedValues:C,value:n,loading:x,fullKey:s,key:a,pathRoute:t,resources:i,schema:o,setLoading:w,setReferencedValues:M,page:l,filter:c,filters:u})];case 1:return r.sent(),[2]}}))}))},z={},T={};a.map((function(e,t){"__v"!==e&&o[e]&&(z[e]=uv(o[e],e,T,s))}));var D=H.object().shape(z),P=hv.isEnglish(),N=e.useMemo((function(){return T}),[]),E=c.useForm({resolver:Pa(D),defaultValues:N}),B=E.handleSubmit,k=E.reset,L=E.setValue,I=E.getValues,R=function(e){return J(r,void 0,void 0,(function(){var t,n;return _(this,(function(r){return t=q(q({},e),h),n=Av(t,A,o,s,v,u,d,i),y&&y(n,e),[2]}))}))};return m?U.jsx(Su,{methods:E,onSubmit:B(R),children:U.jsxs(n.Stack,{direction:"row",spacing:2,justifyContent:"end",children:[a&&a.map((function(e,t){return U.jsx(n.Grid,{minWidth:170,children:jz(f,e,o,C,x,e,P,O,g,L,I,i)},e+t)})),U.jsx(l.LoadingButton,{size:"small",type:"submit",variant:"outlined",children:P?"Filter":"التصفية"})]},"grid1")}):U.jsx("div",{children:U.jsx(S.Fragment,{children:U.jsxs(Su,{methods:E,onSubmit:B(R),children:[U.jsx(mv,{children:U.jsx(n.Grid,{container:!0,spacing:2,justifyContent:"end",style:{padding:"2rem"},children:a&&a.map((function(e,t){return U.jsx(n.Grid,{item:!0,xs:12,children:jz(f,e,o,C,x,e,P,O,g,L,I,i)},e+t)}))},"grid1")}),U.jsx(zo,{sx:{marginTop:"2rem",paddingBottom:"2rem"},children:U.jsx(n.Stack,{mt:2,ml:3,children:U.jsxs(n.Grid,{flexDirection:"column",children:[U.jsx(l.LoadingButton,{style:{flex:1,margin:8,width:150},type:"submit",variant:"contained",startIcon:U.jsx(Ez,{}),children:P?"Filter":"التصفية"}),U.jsx(l.LoadingButton,{style:{flex:1},type:"reset",variant:"outlined",color:"inherit",startIcon:U.jsx(Oz,{}),onClick:function(){v({}),p((function(e){return q(q({},e),{filters:void 0})})),k(q({},N)),A()},children:P?"Reset":"إلغاء"})]})})})]})})})}function Sz(e){var t=e.schema,r=e.resources,o=e.size,i=e.open,a=e.scopeKey,s=e.scopeValue,l=e.filterProperties,c=e.searchParams,u=e.setSearchParams,d=e.setParams,p=e.initialQueryParams,f=e.quickFilterValues,m=e.onRefrenceChanged,h=e.handleFilterDrawerClose,g=e.filterString,v=hv.isEnglish();return U.jsx("div",{children:U.jsx(S.Fragment,{children:U.jsxs(ca,{anchor:"right",open:i,onClose:h,children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",style:{minWidth:"340px",padding:"1rem",width:"20vw"},justifyContent:"space-between",sx:{px:1,py:1},children:[U.jsx(n.Typography,{variant:"h6",children:v?"Filters":"التصفية"}),U.jsx(n.IconButton,{onClick:h,children:U.jsx(Oa,{})})]}),U.jsx(va,{}),U.jsx(mv,{children:U.jsx(Iz,{schema:t,size:o,resources:r,initialQueryParams:p,filterProperties:l,onRefrenceChanged:m,handleFilterDrawerClose:h,filterString:g,scopeKey:a,scopeValue:s,setParams:d,searchParams:c,setSearchParams:u,quickFilterValues:f})})]})})})}Ez=Pz.default=Lz;var Hz=e.forwardRef((function(e,t){return U.jsx(n.Slide,q({direction:"up",ref:t},e))}));function Rz(t){var r,o,i=t.open,a=t.onClose,s=t.title,c=t.onConfirm,u=t.message,d=t.action,p=t.extras,f=e.useState(!1),m=f[0],h=f[1];return U.jsxs(n.Dialog,{open:i,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&a&&a()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,TransitionComponent:Hz,children:[U.jsx(n.DialogTitle,{children:s}),U.jsx(n.DialogContent,{children:U.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:u})}),U.jsxs(n.DialogActions,{children:[U.jsx(n.Button,{color:"inherit",onClick:a,disabled:m,children:null!==(r=null==p?void 0:p.cancelText)&&void 0!==r?r:"Cancel"}),U.jsx(l.LoadingButton,{variant:"contained",onClick:function(){d&&(h(!0),d().then((function(e){var t=e.data.data?e.data.data.response:e.data.meta;h(!1),c&&c(t)})).catch((function(e){a&&a(),console.log(e)})))},loading:m,children:null!==(o=null==p?void 0:p.confirmText)&&void 0!==o?o:"Confirm"})]})]})}var Wz=n.styled("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function Fz(e){var t=e.checkBox,r=e.numberOfColumns,o=K(e,["checkBox","numberOfColumns"]),i=Array.apply(null,Array(r)).map((function(e,t){return t}));return U.jsx(n.TableRow,q({},o,{children:U.jsx(n.TableCell,{children:U.jsxs(n.Stack,{spacing:2,gridRow:"auto",direction:"row",justifyContent:"space-around",width:920,children:[t&&U.jsx(n.Skeleton,{variant:"rectangular",width:20,height:20,sx:{borderRadius:1,flexShrink:0}}),i.map((function(e){return U.jsx(n.Skeleton,{variant:"text",width:150,height:20},e)}))]})})}))}var Vz=n.styled("div")((function(e){var t=e.theme;return{right:24,zIndex:9,bottom:40,display:"flex",position:"fixed",alignItems:"center",boxShadow:t.customShadows.z20,padding:t.spacing(1.5,1,1.5,2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.text.primary}}));function Qz(e){var t,r=e.action,o=e.selected;e.rowCount,e.numSelected;var i=e.extras;e.onSelectAllItems;var a=e.sx,s=K(e,["action","selected","rowCount","numSelected","extras","onSelectAllItems","sx"]);return U.jsx(n.Portal,{children:U.jsxs(Vz,q({sx:a},s,{children:[U.jsxs(n.Typography,{variant:"subtitle2",sx:{mr:2,color:function(e){return"light"===e.palette.mode?"common.white":"grey.800"}},children:[o&&o.length,U.jsx(n.Box,{component:"span",sx:{ml:.5},children:null!==(t=null==i?void 0:i.itemsSelectedText)&&void 0!==t?t:"items selected"})]}),r&&r]}))})}var Xz={},Yz=xa;Object.defineProperty(Xz,"__esModule",{value:!0});var Gz,Zz=Xz.default=void 0,Uz=Yz(Ca()),qz=U,Kz=(0,Uz.default)((0,qz.jsx)("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}),"FileDownloadOutlined");function Jz(e){if(!e)return[];for(var t=e.listProperties,n=e.properties.model,r=[],o=0,i=t;o<i.length;o++){var a=i[o],s=n[a.key];_z(null==s?void 0:s.type)&&r.push(q(q({},a),{name:a.value,_id:a.key,type:null==s?void 0:s.type}))}return r}function _z(e){switch(e){case exports.FieldTypes.BOOLEAN:case exports.FieldTypes.STRING:case exports.FieldTypes.ENUM:case exports.FieldTypes.DATE:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.REFERENCE:case exports.FieldTypes.COLOR:case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.LOCATION:case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.JSON_RICH_TEXT:case exports.FieldTypes.EXTERNAL_LINK:case exports.FieldTypes.NUMBER:return!0;default:return!1}}function $z(e,t,n){var r;if(e.type===Gz.REFERENCE){var o=e.path,i=n[o];if(!i||!i.properties||!o)return"".concat(t,"._id");var a=null!==(r=i.properties.title)&&void 0!==r?r:"_id";return"".concat(t,".").concat(a)}}function eT(e,t,n){var r;if(e.type===Gz.REFERENCE){var o=e.path,i=n[o];if(i&&i.properties&&o){var a=null!==(r=i.properties.title)&&void 0!==r?r:"_id",s=i.properties.model;if(s&&a&&s[a])return s[a].type}}}Zz=Xz.default=Kz,function(e){e.STRING="String",e.NUMBER="Number",e.ENUM="enum",e.REFERENCE="ref",e.DATE="Date",e.PASSWORD="password",e.BOOLEAN="Boolean",e.OBJECTID="ObjectID",e.NESTEDSCHEMA="nestedSchema",e.ARRAY="Array",e.IMAGE="image"}(Gz||(Gz={}));var tT=[{label:"PDF",value:"pdf"},{label:"Excel sheet",value:"xlsx"}],nT=o.object().shape({fileType:o.string().default("xlsx").required("Please select a valid file type"),columns:o.array().of(o.object({_id:o.string(),label:o.string()})).required("Please select at least one day").min(1)});function rT(e){var t=e.open,r=e.setOpen,o=e.resource,i=e.resources,a=e.params,s=[];Object.keys(null==o?void 0:o.properties.model).forEach((function(e){var t,n,r=o.properties.model[e];_z(r.type)&&"__v"!==e&&"salt"!==e&&"hash"!==e&&s.push(q(q({},r),{label:null!==(t=r.value)&&void 0!==t?t:e,value:r.type===exports.FieldTypes.REFERENCE?e:null!==(n=r.valuePath)&&void 0!==n?n:e,type:r.type}))}));var u=Gh(),d=u.requestState,p=u.get,f=c.useForm({resolver:Pa(nT),defaultValues:{fileType:"xlsx",columns:Jz(o)}}),m=f.handleSubmit,h=f.watch,g=f.setValue;return U.jsx(n.Dialog,{open:t,maxWidth:"sm",fullWidth:!0,children:U.jsxs(Su,{methods:f,onSubmit:m((function(e){var t=e.fileType,n=e.columns.map((function(e){return{value:e._id,label:e.name,type:e.type,titlePath:$z(e,e._id,i),titleType:eT(e,e._id,i)}}));p({url:"".concat(o.properties.path,"/report"),query:q({fields:n,fileType:e.fileType},a),axiosRequestConfig:{responseType:"blob"},rowResponse:!0,onSuccess:function(e){var n=window.URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download="".concat(o.properties.path,".").concat(t),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}})})),children:[U.jsx(n.DialogTitle,{sx:{mb:2},children:"Export Schedule"}),U.jsx(n.Divider,{}),U.jsx(n.DialogContent,{children:U.jsxs(n.Stack,{spacing:2,divider:U.jsx(n.Divider,{}),children:[U.jsxs(n.Stack,{children:[U.jsx(n.Typography,{sx:{color:"#637381",fontSize:"16px",fontStyle:"normal",fontWeight:700,lineHeight:"25px"},children:"Select the file type"}),U.jsx(Ug,{name:"fileType",options:tT,row:!1})]}),U.jsxs(n.Stack,{children:[U.jsx(n.Typography,{sx:{color:"#637381",fontSize:"16px",fontStyle:"normal",fontWeight:700,lineHeight:"25px",mb:2},children:"Select Columns:"}),U.jsx(id,{name:"columns",loading:!1,onOpenChanged:function(){},multiple:!0,options:s.map((function(e){return{name:e.label,_id:e.value,type:e.type,path:e.path}})),label:"Select Columns"}),U.jsx(n.Button,{size:"small",onClick:function(){g("columns",[])},sx:{flexShrink:0,alignSelf:"end",padding:0,marginTop:0,fontSize:"13px",fontWeight:400,textDecoration:"underline"},style:{marginBottom:"5px"},children:"Clear"})]})]})}),U.jsx(n.DialogActions,{children:U.jsxs(n.Stack,{direction:"row",spacing:1,children:[U.jsx(n.Button,{variant:"outlined",color:"inherit",onClick:function(){return r(!1)},children:"Cancel"}),U.jsx(l.LoadingButton,{variant:"contained",type:"submit",loading:d.state===exports.RequestState.LOADING,disabled:0===h("columns").length,children:"Export"})]})})]})})}function oT(e){var t=e.open,r=e.title,o=e.message,i=e.secondaryTitle,a=e.secondaryMessage,s=e.isSecondaryAction,c=void 0!==s&&s,u=e.onClose,d=e.onAction,p=e.onSecondaryAction,f=e.secondaryButtonText,m=void 0===f?"Confirm":f,h=e.buttonText,g=void 0===h?"Confirm":h,v=e.loading,A=function(){c?p?p():u():d&&d()};return U.jsxs(n.Dialog,{open:t,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&u()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,children:[U.jsx(n.DialogTitle,{children:c?i:r}),U.jsx(n.DialogContent,{children:U.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:c?a:o})}),U.jsxs(n.DialogActions,{children:[U.jsx(n.Button,{color:"inherit",onClick:u,disabled:v,children:"Cancel"}),c?U.jsx(l.LoadingButton,{variant:"contained",onClick:A,loading:v,children:m}):U.jsx(l.LoadingButton,{variant:"contained",onClick:A,loading:v,children:g})]})]})}function iT(t){var r=t.resource,o=t.resources,i=t.params,a=e.useState(!1),s=a[0],l=a[1];return U.jsxs(P.GridToolbarContainer,{sx:{mt:2},children:[U.jsx(P.GridToolbarColumnsButton,{}),U.jsx(P.GridToolbarFilterButton,{}),U.jsx(P.GridToolbarDensitySelector,{}),U.jsx(n.Button,{startIcon:U.jsx(Zz,{}),onClick:function(){return l(!0)},children:"Export"}),U.jsx(rT,{open:s,setOpen:l,resource:r,resources:o,params:i})]})}function aT(e,t,n){return U.jsx(U.Fragment,{children:[1,2].map((function(e){return function(e,t,n){return U.jsx(Fz,{sx:{height:72},checkBox:t,numberOfColumns:n},e)}(e,t,n)}))})}function sT(t){var o,i,a=this,s=t.resources,c=t.resourceName,u=t.paramsState,d=t.bulkActionsDialogState,p=t.extras,f=t.setBulkActionsDialogState,m=t.setPaginatedParameters,h=t.hidePagination,g=e.useContext(Ih).dashbaordUrlPrefix,v=e.useState([]),A=(v[0],v[1]),y=e.useState([]),b=y[0],x=y[1],w=e.useState(!0),j=w[0],C=w[1],M=e.useState(az),O=M[0],z=M[1],T=u[0],D=u[1],N=e.useState(!1),E=N[0],B=N[1],k=e.useState(!1),L=k[0],I=k[1],S=s[c];if(p&&p.overridenResource){var H=p.overridenResource(S);S=q(q({},S),H)}var R,W=S.properties.actions,F=e.useState([]),V=F[0],Q=F[1],X=os("up","lg"),Y=r.useSearchParams(),G=Y[0],Z=Y[1],K=Ig(),ee=K.setSuccessAlert,te=K.setErrorAlert,ne=e.useState({open:!1,title:"",onClose:function(){},onConfirm:function(){}}),re=lz(S.listProperties,s,c,ne,u,X,p);return e.useEffect((function(){!function(e){J(a,void 0,void 0,(function(){return _(this,(function(t){return C(!0),m&&m({totalRecords:void 0}),Bh.get("".concat(g,"/").concat(S.properties.path),{params:e}).then((function(e){var t=e.data.data,n=t.pageInfo,r=t.records;A((function(e){return 1===n.currentPage?$([],r,!0):$($([],e,!0),r,!0)})),x(r),z(n),C(!1),m&&m({totalRecords:n.recordsCount})})),[2]}))}))}(T)}),[T,c,g]),U.jsxs(U.Fragment,{children:[U.jsx(P.DataGrid,q({rows:j?[]:b,columns:re,getRowHeight:function(){return"auto"},sx:{"&.MuiDataGrid-root--densityCompact .MuiDataGrid-cell":{py:"8px"},"&.MuiDataGrid-root--densityStandard .MuiDataGrid-cell":{py:"15px"},"&.MuiDataGrid-root--densityComfortable .MuiDataGrid-cell":{py:"22px"},"& .MuiDataGrid-cell":{alignItems:"center",overflow:"hidden"},"& .truncate-cell .MuiDataGrid-cellContent":{overflow:"hidden !important",whiteSpace:"nowrap !important",textOverflow:"ellipsis !important",display:"block !important",width:"100% !important"},"& .normal-cell .MuiDataGrid-cellContent":{whiteSpace:"normal",wordWrap:"break-word",overflow:"visible"}},initialState:{sorting:{sortModel:[{sort:T.order,field:null!==(o=T.orderBy)&&void 0!==o?o:"_id"}]}},pageSizeOptions:iz,rowCount:null==O?void 0:O.recordsCount,checkboxSelection:!(null==p?void 0:p.hideBulkActions)&&(W.bulkDelete.isAccessible||W.extras&&W.extras.resource&&Object.keys(W.extras.resource).length>0),disableRowSelectionOnClick:!0,loading:j,slots:{loadingOverlay:function(){return aT(0,W.bulkDelete.isAccessible,S.listProperties.length)},noRowsOverlay:function(){return e=null==p?void 0:p.noRowsText,U.jsxs(Wz,{children:[U.jsx("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:U.jsxs("g",{fill:"none",fillRule:"evenodd",children:[U.jsxs("g",{transform:"translate(24 31.67)",children:[U.jsx("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),U.jsx("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),U.jsx("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),U.jsx("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),U.jsx("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),U.jsxs("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[U.jsx("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),U.jsx("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),U.jsx(n.Box,{sx:{mt:1},children:null!=e?e:"No Rows"})]});var e},toolbar:(null==p?void 0:p.hideToolbar)?null:iT},slotProps:{toolbar:{resource:S,resources:s,params:T}},density:(null==p?void 0:p.density)?p.density:"comfortable",editMode:"row"},(R="server",{paginationMode:R,sortingMode:R,filterMode:R}),{pagination:!0,hideFooter:h,hideFooterPagination:h,onPaginationModelChange:function(e,t){e.page!==O.currentPage-1&&(!function(e,t,n,r,o){var i=o[0];o[1];var a=t[1],s=e+1;i.perPage,i.perPage,i.perPage,a((function(e){return q(q({},e),{page:s})}))}(e.page,u,0,0,[O,z]),G.set("page",(e.page+1).toString()),Z(G)),O.perPage!==e.pageSize&&(!function(e,t,n,r){if(e!==r.perPage){var o=t[1];n([]),o((function(t){return q(q({},t),{page:oz,perPage:e})}))}}(e.pageSize,u,A,O),G.set("perPage",e.pageSize.toString()),G.set("page","1"),Z(G))},paginationModel:{page:O.currentPage-1,pageSize:O.perPage},keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){Q(e)},onSortModelChange:function(e){!function(e,t,n){var r=n[0],o=n[1],i=e.map((function(e){return{order:e.sort,orderBy:e.field}}))[0];t([]),r&&i&&(r.order!==i.order||r.orderBy!==i.orderBy)&&o((function(e){return q(q(q({},e),i),{page:oz})}))}(e,A,u)},autoHeight:!0,getRowId:function(e){return e._id},disableColumnFilter:!0,rowSelectionModel:V})),U.jsx(Rz,q({},ne[0],{extras:p})),V.length>0&&!(null==p?void 0:p.hideBulkActions)&&U.jsx(Qz,{numSelected:V.length,rowCount:b.length,selected:V.map((function(e){return e.toString()})),extras:p,action:U.jsxs(U.Fragment,{children:[W.bulkDelete.isAccessible&&sM(S,JC.DELETE)&&U.jsx(l.LoadingButton,{size:"small",loading:E,color:"error",variant:"contained",startIcon:U.jsx(To,{icon:"eva:trash-2-outline"}),onClick:function(){return I(!0)},sx:{mr:1},children:null!==(i=null==p?void 0:p.bulkDeleteText)&&void 0!==i?i:"Delete"}),U.jsx(JO,{resources:s,resourceName:c,dialogState:ne,gridState:u,selected:V,setSelected:Q,bulkActionsDialogState:d,setBulkActionsDialogState:f})]})}),U.jsx(oT,{open:L,title:"Are you sure you want to delete the selected items?",message:"This action cannot be undone. All selected records will be permanently deleted.",loading:E,onClose:function(){return I(!1)},onAction:function(){B(!0),Bh.delete("".concat(g,"/").concat(S.properties.path,"/all"),{data:V}).then((function(){ee(p&&p.afterBulkDeleteSnackBarText?p.afterBulkDeleteSnackBarText(V.length):"".concat(V.length," records are deleted successfully")),D((function(e){return q(q({},e),{page:sz.page,filters:void 0})})),W.bulkDelete.reloadAfterAction&&window.location.reload(),Q((function(e){return[]})),I(!1)})).catch((function(e){te("Something went wrong while deleting the records")})).finally((function(){B(!1)}))}})]})}function lT(t){var n=this,o=t.bulkActionsDialogState,i=t.bulkActionsComponents,a=t.setParams,s=t.setBulkActionsDialogState,l=r.useNavigate(),c=e.useContext(Ih).dashbaordUrlPrefix,u=Sg().paths,d=Ig().setSuccessAlert,p=function(e){var t=q({},o);t[e]={state:!1,modelName:o?o[e].modelName:"",saveLoadingState:!1,fullScreen:!!o&&o[e].fullScreen,setSelected:o?o[e].setSelected:function(e){return""},documentIds:[],afterExecuteMessage:o[e].afterExecuteMessage,severity:o[e].severity},s(t)};return U.jsx(U.Fragment,{children:i&&i(o,p,(function(e,t){return J(n,void 0,void 0,(function(){var n,r,i;return _(this,(function(f){switch(f.label){case 0:return m=t,(h=q({},o))[m]={state:o[m].state,modelName:o[m].modelName,fullScreen:o[m].fullScreen,saveLoadingState:!0,setSelected:o[m].setSelected,documentIds:o[m].documentIds,afterExecuteMessage:o[m].afterExecuteMessage,severity:o[m].severity},s(h),[4,Bh.post("".concat(c,"/actions/execute/").concat(t),{record:e,modelName:o?o[t].modelName:""})];case 1:return n=f.sent(),p(t),o&&o[t].setSelected([]),r=n.data.data.response,i=r.action,d(o?o[t].afterExecuteMessage:""),i===exports.ActionNames.LIST?a((function(e){return q(q({},e),{page:sz.page})})):l(YO(r,u)),[2]}var m,h}))}))}))})}var cT=["true","false"];function uT(e,t,r,o,i,a,s,l,c,u,d,p,f){var m,h;if(r[a])switch(r[a].type){case exports.FieldTypes.STRING:return U.jsx(Yu,{name:a,size:e,label:r[a].value,value:l[a],onChange:function(e){return u(a,e.target.value,[a])}},t);case exports.FieldTypes.PHONENUMBER:return U.jsx(C,{defaultCountry:r[a].countryCodes?r[a].countryCodes[0]:"sa",onChange:function(e){return d(a,e)},onlyCountries:r[a].countryCodes?r[a].countryCodes:["eg","sa"],name:a,size:e,label:r[t].value,value:p(a)?p(a):"",variant:"outlined",fullWidth:!0},t);case exports.FieldTypes.TIMEPICKER:return U.jsx(Yu,{name:a,value:l[a],size:e,label:r[t].value},t);case exports.FieldTypes.LOCALIZEDString:return U.jsx(Yu,{name:a,size:e,label:r[a].value,value:l[a],onChange:function(e){return u(a,e.target.value,[a])}},t);case exports.FieldTypes.OBJECTID:return U.jsx(Yu,{name:a,size:e,label:r[a].value,value:l[a]},t);case exports.FieldTypes.NUMBER:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[a].value},t),U.jsxs(n.Stack,{direction:"row",spacing:2,children:[U.jsx(Yu,{name:a+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),U.jsx(Yu,{name:a+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case exports.FieldTypes.DATE:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[a].value},t),U.jsxs(n.Grid,{container:!0,spacing:2,children:[U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:a+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:a+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case exports.FieldTypes.ENUM:return U.jsx(Gu,{name:a,size:e,label:r[a].value,value:null!==(m=l[a])&&void 0!==m?m:"",SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(a,e.target.value,[a])},children:Object.keys(r[a].enumValues).map((function(e){var t,o,i,s=r[a].enumValues,l=(null===(t=s[e])||void 0===t?void 0:t.label)?e:s[e],c=null!==(i=null===(o=s[e])||void 0===o?void 0:o.label)&&void 0!==i?i:s[e];return U.jsx(n.MenuItem,{value:l,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:TM.enhance(c)},e)}))},t);case exports.FieldTypes.BOOLEAN:return U.jsx(Gu,{name:a,size:e,label:r[a].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(a,e.target.value,[a])},children:cT.map((function(e){return U.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case exports.FieldTypes.ARRAY:case exports.FieldTypes.REFERENCE:var g=f?f[null===(h=r[a])||void 0===h?void 0:h.path]:void 0,v=XM(r,a,LM.FILTER_LIST,g);return U.jsx(xz,{name:a,size:e,value:l[a]?l[a]:"",label:r[a].value,multiple:r[a].multipleInFilter,onOptionChange:function(e){return u(a,e,["".concat(a,"-name"),"".concat(a,"-id")])},options:o[a]&&o[a].data?o[a].data:[],loading:i[a],hasNext:o[a]&&o[a].hasNext,onOpenChanged:function(e,t,n){return c(r[a].apiRoute,r[a].path,e,a,a,t,n,v)},resource:g},t);default:return}}var dT=function(){function e(){}return e.modify=function(e,t){var n;if(void 0===t&&(t=[]),"_id"===e)return e.replace("_","");var r=t.find((function(t){return(null==t?void 0:t.key)===e}));return null!==(n=null==r?void 0:r.value)&&void 0!==n?n:e},e}();var pT=e.memo((function(){var e=vo().palette.primary.main;return U.jsxs(U.Fragment,{children:[U.jsx("defs",{children:U.jsxs("linearGradient",{id:"BG",x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[U.jsx("stop",{offset:"0%",stopColor:e}),U.jsx("stop",{offset:"100%",stopColor:e,stopOpacity:"0"})]})}),U.jsx("path",{fill:"url(#BG)",fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}));var fT=e.memo((function(e){var t=K(e,[]),r=vo(),o=r.palette.primary.main,i=r.palette.primary.dark,a=r.palette.primary.darker;return U.jsx(n.Box,q({},t,{children:U.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",children:[U.jsx(pT,{}),U.jsx("defs",{children:U.jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[U.jsx("stop",{offset:"0%",stopOpacity:"0"}),U.jsx("stop",{offset:"100%"})]})}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),U.jsx("path",{fill:a,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),U.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),U.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),U.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),U.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),U.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),U.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),U.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),U.jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),U.jsx("ellipse",{cx:"380.363",cy:"298.487",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),U.jsx("ellipse",{cx:"390.052",cy:"264.383",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),U.jsx("ellipse",{cx:"346.97",cy:"270.022",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),U.jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),U.jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:o,fillRule:"nonzero",opacity:"0.2"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),U.jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),U.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),U.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),U.jsx("path",{fill:i,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),U.jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),U.jsx("ellipse",{cx:"119.593",cy:"258.664",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),U.jsx("ellipse",{cx:"101.03",cy:"260.545",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),U.jsx("ellipse",{cx:"108.459",cy:"265.905",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),U.jsx("ellipse",{cx:"89.193",cy:"265.433",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),U.jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("path",{fill:i,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),U.jsx("path",{fill:i,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}))}));function mT(e){var t=e.file;if(!t)return null;var n="string"==typeof t?t:t.preview;return U.jsx(Ua,{alt:"file preview",src:n,sx:{top:8,left:8,zIndex:8,borderRadius:1,position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})}function hT(e){var t=e.thumbnail,r=e.files,o=e.onRemove,i=e.sx;return(null==r?void 0:r.length)?U.jsx(p.AnimatePresence,{initial:!1,children:r.map((function(e){var r=Cs(e),a=r.key,s=r.name,l=void 0===s?"":s,c=r.size,u=void 0===c?0:c,d="string"==typeof e;return t?U.jsxs(n.Stack,q({component:p.m.div},Ja().inUp,{alignItems:"center",display:"inline-flex",justifyContent:"center",sx:q({m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:function(e){return"solid 1px ".concat(e.palette.divider)}},i),children:[U.jsx(uu,{tooltip:!0,imageView:!0,file:e,sx:{position:"absolute"},imgSx:{position:"absolute"}}),o&&U.jsx(n.IconButton,{size:"small",onClick:function(){return o(e)},sx:{top:4,right:4,p:"1px",position:"absolute",color:function(e){return Cr(e.palette.common.white,.72)},bgcolor:function(e){return Cr(e.palette.grey[900],.48)},"&:hover":{bgcolor:function(e){return Cr(e.palette.grey[900],.72)}}},children:U.jsx(To,{icon:"eva:close-fill",width:16})})]}),a):U.jsxs(n.Stack,q({component:p.m.div},Ja().inUp,{spacing:2,direction:"row",alignItems:"center",sx:q({my:1,px:1,py:.75,borderRadius:.75,border:function(e){return"solid 1px ".concat(e.palette.divider)}},i),children:[U.jsx(uu,{file:e}),U.jsxs(n.Stack,{flexGrow:1,sx:{minWidth:0},children:[U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:d?e:l}),U.jsx(n.Typography,{variant:"caption",sx:{color:"text.secondary"},children:d?"":Qa(u)})]}),o&&U.jsx(n.IconButton,{edge:"end",size:"small",onClick:function(){return o(e)},children:U.jsx(To,{icon:"eva:close-fill"})})]}),a)}))}):null}var gT=xo("div")((function(e){var t=e.theme;return{outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:"1px dashed ".concat(Cr(t.palette.grey[500],.32)),"&:hover":{opacity:.72}}}));function vT(e){var t=e.disabled,r=e.multiple,o=void 0!==r&&r,i=e.error,a=e.helperText,s=e.file,l=e.onDelete,c=e.files,u=e.thumbnail,d=e.onUpload,p=e.onRemove,f=e.onRemoveAll,h=e.sx,g=K(e,["disabled","multiple","error","helperText","file","onDelete","files","thumbnail","onUpload","onRemove","onRemoveAll","sx"]),v=m.useDropzone(q({multiple:o,disabled:t},g)),A=v.getRootProps,y=v.getInputProps,b=v.isDragActive,x=v.isDragReject;v.fileRejections;var w=!!s&&!o,j=c&&o&&c.length>0,C=x||!!i;return U.jsxs(n.Box,{sx:q({width:1,position:"relative"},h),children:[U.jsxs(gT,q({},A(),{sx:q(q(q(q({},b&&{opacity:.72}),C&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"}),t&&{opacity:.48,pointerEvents:"none"}),w&&{padding:"12% 0"}),children:[U.jsx("input",q({},y())),U.jsx(AT,{sx:q({},w&&{opacity:0})}),w&&U.jsx(mT,{file:s})]})),a&&a,w&&l&&U.jsx(n.IconButton,{size:"small",onClick:l,sx:{top:16,right:16,zIndex:9,position:"absolute",color:function(e){return Cr(e.palette.common.white,.8)},bgcolor:function(e){return Cr(e.palette.grey[900],.72)},"&:hover":{bgcolor:function(e){return Cr(e.palette.grey[900],.48)}}},children:U.jsx(To,{icon:"eva:close-fill",width:18})}),j&&U.jsxs(U.Fragment,{children:[U.jsx(n.Box,{sx:{my:3},children:U.jsx(hT,{files:c,thumbnail:u,onRemove:p})}),U.jsxs(n.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[f&&U.jsx(n.Button,{color:"inherit",variant:"outlined",size:"small",onClick:f,children:"Remove all"}),d&&U.jsx(n.Button,{size:"small",variant:"contained",onClick:d,children:"Upload files"})]})]})]})}function AT(e){var t=e.sx,r=K(e,["sx"]);return U.jsxs(n.Stack,q({spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:q({width:1,textAlign:{xs:"center",md:"left"}},t)},r,{children:[U.jsx(fT,{sx:{width:220}}),U.jsxs("div",{children:[U.jsx(n.Typography,{gutterBottom:!0,variant:"h5",children:"Drop or Select file"}),U.jsxs(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:["Drop xlsx file here or click",U.jsx(n.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"browse"}),"thorough your machine"]})]})]}))}function yT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L12,10.59 L13.29,9.29 C13.6821222,8.89787783 14.3178778,8.89787783 14.71,9.29 C15.1021222,9.68212217 15.1021222,10.3178778 14.71,10.71 L13.41,12 L14.71,13.29 Z"})}))}function bT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17.56,21 C17.4000767,21.0006435 17.2423316,20.9629218 17.1,20.89 L12,18.22 L6.9,20.89 C6.56213339,21.067663 6.15259539,21.0374771 5.8444287,20.8121966 C5.53626201,20.5869161 5.38323252,20.2058459 5.45,19.83 L6.45,14.2 L2.33,10.2 C2.06805623,9.93860108 1.9718844,9.55391377 2.08,9.2 C2.19824414,8.83742187 2.51242293,8.57366684 2.89,8.52 L8.59,7.69 L11.1,2.56 C11.2670864,2.21500967 11.6166774,1.99588989 12,1.99588989 C12.3833226,1.99588989 12.7329136,2.21500967 12.9,2.56 L15.44,7.68 L21.14,8.51 C21.5175771,8.56366684 21.8317559,8.82742187 21.95,9.19 C22.0581156,9.54391377 21.9619438,9.92860108 21.7,10.19 L17.58,14.19 L18.58,19.82 C18.652893,20.2027971 18.4967826,20.5930731 18.18,20.82 C17.9989179,20.9468967 17.7808835,21.010197 17.56,21 L17.56,21 Z"})}))}function xT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M13,16 C13,16.5522847 12.5522847,17 12,17 C11.4477153,17 11,16.5522847 11,16 L11,11 C11,10.4477153 11.4477153,10 12,10 C12.5522847,10 13,10.4477153 13,11 L13,16 Z M12,9 C11.4477153,9 11,8.55228475 11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 C13,8.55228475 12.5522847,9 12,9 Z"})}))}function wT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M22.56,16.3 L14.89,3.58 C14.2597186,2.59400001 13.1702353,1.99737652 12,1.99737652 C10.8297647,1.99737652 9.74028139,2.59400001 9.11,3.58 L1.44,16.3 C0.888546003,17.2192471 0.869485343,18.3628867 1.39,19.3 C1.99197363,20.3551378 3.11522982,21.0046397 4.33,21 L19.67,21 C20.8765042,21.0128744 21.9978314,20.3797441 22.61,19.34 C23.146086,18.3926382 23.1269508,17.2292197 22.56,16.3 L22.56,16.3 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,9 C11,8.44771525 11.4477153,8 12,8 C12.5522847,8 13,8.44771525 13,9 L13,13 Z"})}))}function jT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M16.3,9.61 L11.73,15.61 C11.5412074,15.855247 11.2494966,15.9992561 10.94,16.0000145 C10.6322197,16.001658 10.3408221,15.861492 10.15,15.62 L7.71,12.51 C7.49028166,12.2277602 7.43782669,11.8497415 7.57239438,11.5183399 C7.70696206,11.1869384 8.00810836,10.9525017 8.36239438,10.9033399 C8.7166804,10.8541782 9.07028166,10.9977602 9.29,11.28 L10.92,13.36 L14.7,8.36 C14.917932,8.07418751 15.2717886,7.92635122 15.6282755,7.97217964 C15.9847624,8.01800806 16.2897207,8.25053875 16.4282755,8.58217966 C16.5668304,8.91382056 16.517932,9.29418753 16.3,9.58 L16.3,9.61 Z"})}))}function CT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 L13,13 Z"})}))}function MT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm0 2H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2z"})}))}function OT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.372 4.972a1.006 1.006 0 00-.928.388l-3.78 5-1.63-2.08a1.001 1.001 0 00-1.58 1.23l2.44 3.11a1 1 0 001.58-.01l4.57-6v-.03a1.006 1.006 0 00-.672-1.608z"})}))}function zT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.75 8h-6.5a.75.75 0 00-.75.75v.5c0 .414.336.75.75.75h6.5a.75.75 0 00.75-.75v-.5a.75.75 0 00-.75-.75z"})}))}function TT(e){return U.jsx(n.SvgIcon,q({},e,{sx:{right:12,fontSize:16,position:"absolute",pointerEvents:"none"},children:U.jsx("path",{d:"M12,16 C11.7663478,16.0004565 11.5399121,15.9190812 11.36,15.77 L5.36,10.77 C4.93474074,10.4165378 4.87653776,9.78525926 5.23,9.36 C5.58346224,8.93474074 6.21474074,8.87653776 6.64,9.23 L12,13.71 L17.36,9.39 C17.5665934,9.2222295 17.8315409,9.14373108 18.0961825,9.17188444 C18.3608241,9.2000378 18.6033268,9.33252029 18.77,9.54 C18.9551341,9.74785947 19.0452548,10.0234772 19.0186853,10.3005589 C18.9921158,10.5776405 18.8512608,10.8311099 18.63,11 L12.63,15.83 C12.444916,15.955516 12.2231011,16.0153708 12,16 Z"})}))}function DT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M12,8 C12.5522847,8 13,8.44771525 13,9 L13,9 L13,11 L15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L13,13 L13,15 C13,15.5522847 12.5522847,16 12,16 C11.4477153,16 11,15.5522847 11,15 L11,15 L11,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 L11,11 L11,9 C11,8.44771525 11.4477153,8 12,8 Z"})}))}function PT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 Z"})}))}function NT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M14,8.99420168 C14.2666375,8.99420168 14.5222334,9.10068735 14.71,9.29 C14.8993127,9.4777666 15.0057983,9.73336246 15.0057983,10 C15.0057983,10.2666375 14.8993127,10.5222334 14.71,10.71 L14.71,10.71 L13.41,12 L14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L10.71,9.29 L12,10.59 L13.29,9.29 C13.4777666,9.10068735 13.7333625,8.99420168 14,8.99420168 Z"})}))}function ET(t){var r=this,o=t.title,i=t.uploadMessage,a=t.removeMessage,s=t.open,c=t.path,u=t.setParams,d=t.onClose,p=t.onCreate,f=t.onUpdate,m=t.folderName,h=t.onChangeFolderName,g=K(t,["title","uploadMessage","removeMessage","open","path","setParams","onClose","onCreate","onUpdate","folderName","onChangeFolderName"]),v=e.useState([]),A=v[0],y=v[1],b=e.useState(!1),x=b[0],w=b[1],j=e.useContext(Ih).dashbaordUrlPrefix,C=e.useCallback((function(e){var t=e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})}));y($($([],A,!0),t,!0))}),[A]);return U.jsxs(n.Dialog,q({fullWidth:!0,maxWidth:"sm",open:s,onClose:d},g,{children:[U.jsx(n.DialogTitle,{sx:{p:function(e){return e.spacing(3,3,2,3)}},children:U.jsxs(n.Box,{display:"flex",alignItems:"center",children:[U.jsx(n.Typography,{flexGrow:1,style:{color:"black"},fontWeight:600,fontSize:25,children:o||"Upload files"}),U.jsx(n.Box,{children:U.jsx(n.IconButton,{onClick:d,color:"primary",children:U.jsx(yT,{})})})]})}),U.jsxs(n.DialogContent,{dividers:!0,sx:{pt:1,pb:0,border:"none"},children:[(p||f)&&U.jsx(n.TextField,{fullWidth:!0,label:"Folder name",value:m,onChange:h,sx:{mb:3}}),U.jsx(vT,{multiple:!0,files:A,onDrop:C,onRemove:function(e){var t=A.filter((function(t){return t!==e}));y(t)}})]}),U.jsxs(n.DialogActions,{children:[U.jsx(l.LoadingButton,{loading:x,variant:"contained",startIcon:U.jsx(To,{icon:"eva:cloud-upload-fill"}),onClick:function(){return J(r,void 0,void 0,(function(){var e,t;return _(this,(function(n){switch(n.label){case 0:return A.length>0?(w(!0),e=A[0],(t=new FormData).append("file",e),[4,Bh.post("".concat(j,"/").concat(c,"/import"),t,{transformRequest:[]})]):[3,2];case 1:n.sent(),w(!1),u&&u((function(e){return q({},e)})),n.label=2;case 2:return d(),[2]}}))}))},children:i||"Upload"}),!!A.length&&U.jsx(n.Button,{variant:"outlined",color:"inherit",onClick:function(){y([])},children:a||" Remove all"}),(p||f)&&U.jsx(n.Stack,{direction:"row",justifyContent:"flex-end",flexGrow:1,children:U.jsx(n.Button,{variant:"outlined",onClick:p||f,children:f?"Save":"Create"})})]})]}))}function BT(t){var r=t.setParams,o=t.path,i=t.buttonValue,a=e.useState(!1),s=a[0],l=a[1];return U.jsxs(U.Fragment,{children:[U.jsx(ET,{title:"Import xlsx file",uploadMessage:"Import",removeMessage:"Cancel",open:s,onClose:function(){l(!1)},setParams:r,path:o}),U.jsx(n.Button,{variant:"outlined",startIcon:U.jsx(To,{icon:"eva:cloud-upload-fill"}),onClick:function(){l(!0)},children:null!=i?i:"Import"})]})}var kT=n.styled("span")((function(e){return{width:6,height:6,borderRadius:"50%",position:"absolute",backgroundColor:e.theme.palette.error.main}})),LT=[];function IT(t){var o,i,a=this,s=e.useState(!1),l=s[0],u=s[1],d=e.useState(!1),p=d[0],f=d[1],m=hv.isEnglish(),h=e.useContext(ug),g=h.textFieldSize,v=h.themeStretch,A=e.useState(),y=A[0],b=A[1],x=e.useState({}),w=x[0],j=x[1],C=e.useState({});C[0],C[1];var M=e.useState({}),O=M[0],z=M[1],T=e.useState({}),D=T[0],P=T[1],N=e.useState({}),E=N[0],B=N[1],k=e.useState({}),L=k[0],I=k[1],S=function(e,t,n,r,o,i,s,l){return J(a,void 0,void 0,(function(){return _(this,(function(a){switch(a.label){case 0:return[4,WM({apiRoute:e,referencedValues:D,value:n,loading:w,fullKey:o,key:r,pathRoute:t,resources:he,schema:je,setLoading:j,setReferencedValues:P,page:i,filter:s,filters:l})];case 1:return a.sent(),[2]}}))}))},R=e.useState({state:!1,message:"",severity:"error"}),W=R[0],F=R[1],V=r.useLocation(),Q=r.useSearchParams(),X=Q[0],Y=Q[1],G=e.useState(V.state?V.state.actionState:null),Z=G[0],K=G[1],$=e.useContext(Jh),te=$.paths,ne=$.root,oe=e.useState(void 0),ie=oe[0],ae=oe[1],se=t.path,le=t.extras,ce=t.Actions,ue=t.bulkActionsComponents,de=t.HeadingView,pe=t.disableFilterButton,fe=t.dataListComponent,me=t.defaultFilters,he=e.useContext(Kh).resources,ge=he[se],ve=ge.properties.defaultOrderBy,Ae=ge.properties.defaultOrder,ye=ge.properties.defaultrowsPerPage,be=ge.quickFilterProperties,xe=ge.properties.filters,we=xe&&xe.scopes&&xe.scopes.auto?xe.scopes.auto.key:void 0,je=ge.properties.model,Ce=xe.scopes.options,Me=void 0===(null===(o=xe.scopes)||void 0===o?void 0:o.showAll)||(null===(i=xe.scopes)||void 0===i?void 0:i.showAll),Oe={},ze=void 0;new FA(ge).getUniqueFields().forEach((function(e){"__v"!==e&&""!==e&&QA(je[e],e,Oe,X,je)})),ze=VA(Oe,je,we);var Te=new cz(X,ye).get(),De=Te.page,Pe=Te.pageSize,Ne=e.useState(q(q({},sz),{page:De,order:Ae,orderBy:ve,perPage:Pe,filters:me?ze.concat(me):ze,scope:we&&X.get(we)?X.get(we):!Me&&Ce?Ce[0].key:void 0})),Ee=Ne[0],Be=Ne[1],ke=function(t){var n=e.useState(t||""),r=n[0],o=n[1];return{currentTab:r,onChangeTab:function(e,t){o(t)},setCurrentTab:o}}(we&&X.get(we)?X.get(we):!Me&&Ce?Ce[0].key:"all"),Le=ke.currentTab,Ie=ke.onChangeTab,Se=ke.setCurrentTab,He={resources:he,resourceName:se,paramsState:[Ee,Be],bulkActionsDialogState:y,setBulkActionsDialogState:b,extras:le,setCustomActions:ae,setPaginatedParameters:z};LT=[],e.useEffect((function(){if(ge.filterProperties){var e={};ge.filterProperties.forEach((function(t){Oe[t]&&""!==Oe[t]&&(e[t]=Oe[t])})),I(e)}if(ge.quickFilterProperties){var t={};ge.quickFilterProperties.forEach((function(e){Oe[e]&&""!==Oe[e]&&(t[e]=Oe[e])})),B(t)}}),[]),e.useEffect((function(){Z&&setTimeout((function(){K(null),window.history.replaceState({},document.title)}),4e3)}),[Z]);var Re=ge.properties.actions;ge.listProperties&&ge.listProperties.forEach((function(e){"__v"!==e.key&&""!==e&&LT.push({id:e.key,label:e.value,align:"left"})})),LT.push({id:"__v",label:""});var We={},Fe={};be.map((function(e,t){"__v"!==e&&je[e]&&(We[e]=uv(je[e],e,Fe,X))}));var Ve=H.object().shape(We),Qe=c.useForm({resolver:Pa(Ve),defaultValues:Oe}),Xe=Qe.handleSubmit,Ye=Qe.reset,Ge=Qe.setValue,Ze=Qe.getValues,Ue=Qe.resetField,qe=function(e){return J(a,void 0,void 0,(function(){var t;return _(this,(function(n){return t=Av(e,_e,je,X,Y,we,Le,he),Be((function(e){return q(q({},e),{filters:me?t.concat(me):t})})),[2]}))}))},Ke=function(e,t,n){return J(a,void 0,void 0,(function(){var r,o;return _(this,(function(i){switch(i.label){case 0:return t&&0!==t.length||n.forEach((function(e){X.delete(e)})),(r=q({},E))[e]=t,B(r),o=q(q({},L),r),[4,qe(o)];case 1:return i.sent(),[2]}}))}))},Je=ge.properties.name,_e=function(){f(!1)},$e=function(){et(),Y({}),Se("all"),Ye({}),B({}),I({}),Be((function(e){return q(q({},e),{page:1,filters:null!=me?me:void 0,scope:!Me&&Ce?Ce[0].key:void 0})}))},et=function(){u(!l)};return sM(ge,JC.VIEW)?U.jsx(ee,{title:m?Je+": List":"قائمة "+Je,children:U.jsxs(n.Container,{maxWidth:!v&&"lg",children:[U.jsx(Sz,{open:p,size:g,handleFilterDrawerClose:_e,schema:je,searchParams:X,setSearchParams:Y,resources:he,scopeKey:we,scopeValue:Le,initialQueryParams:sz,quickFilterValues:E,setParams:Be,onRefrenceChanged:function(e,t){},filterProperties:ge.filterProperties,filterString:function(e,t){Be((function(t){return q(q({},t),{filters:me?e.concat(me):e})})),I(t),we&&X.get(we)&&Se(X.get(we))}}),U.jsx(lT,{bulkActionsDialogState:y,setBulkActionsDialogState:b,setParams:Be,bulkActionsComponents:ue}),Z&&U.jsx(n.Snackbar,{open:!!Z,anchorOrigin:{horizontal:"center",vertical:"top"},children:U.jsx(n.Alert,{onClose:function(){K(null)},severity:Z.severity,children:Z.message})}),W.state&&U.jsx(n.Snackbar,{open:!!W.state,anchorOrigin:{horizontal:"center",vertical:"top"},children:U.jsx(n.Alert,{onClose:function(){F({state:!1})},severity:W.severity,children:W.message})}),ge.properties?U.jsx(re,{heading:Je,headingView:de,paginationTitle:void 0===O.totalRecords?void 0:"(".concat(O.totalRecords.toLocaleString(),")"),links:[{name:m?"Dashboard":"الرئيسية",href:ne},{name:Je}],action:U.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},spacing:1,children:[ce&&U.jsx(ce,{setParams:Be,initialQueryParams:sz}),ie,Re.import&&Re.import.isAccessible&&U.jsx(BT,{setParams:Be,path:ge.properties.path,buttonValue:Re.import.value}),Re.new.isAccessible&&sM(ge,JC.CREATE)&&U.jsx(n.Button,{variant:"contained",component:r.Link,to:te[se].new,startIcon:U.jsx(To,{icon:"eva:plus-fill"}),children:Re.new.value})]})}):U.jsx(Do,{tuples:[]}),U.jsxs(n.Card,{children:[ge.properties&&ge.properties.filters.scopes.isAccessible&&U.jsx(n.Tabs,{allowScrollButtonsMobile:!0,variant:"scrollable",scrollButtons:"auto",value:Le,onChange:function(e,t){Ie(e,t),Be((function(e){return q(q({},e),{scope:"all"===t?void 0:t})})),we&&("all"===t?X.delete(we):X.has(we)?X.set(we,t):X.append(we,t),Y(X))},sx:{px:2,bgcolor:"background.neutral"},children:ge.properties.filters.scopes.options.map((function(e){return U.jsx(n.Tab,{disableRipple:!0,label:e.value,value:e.key},e.key)}))}),U.jsx(n.Divider,{}),U.jsxs(n.Stack,{spacing:{xs:"8px",md:"16px"},sx:{pt:3,px:3},children:[U.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",spacing:2,children:[U.jsxs(U.Fragment,{children:[ge.properties&&ge.properties.filters.searchBar.isAccessible&&U.jsx(PA,{size:g,placeholder:m?"Search by "+dT.modify(ge.properties.title,ge.listProperties)+"...":"ابحث هنا …",onInputChange:function(e){Be((function(t){return q(q({},t),{filter:e})}))}}),be.length>0&&U.jsx(Su,{methods:Qe,onSubmit:Xe(qe),children:U.jsx(n.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:be&&be.map((function(e,t){return U.jsx(n.Grid,{minWidth:200,children:uT(g,e+l.toString(),je,D,w,e,m,E,S,Ke,Ge,Ze,he)},e+t)}))},"grid1")})]}),!pe&&U.jsxs(n.Stack,{direction:"row",spacing:1,children:[U.jsx(n.Tooltip,{title:"Filter list",onClick:function(){f(!0)},children:U.jsx(n.IconButton,{children:U.jsx(To,{icon:"ic:round-filter-list"})})}),Ee.filters&&!p&&Ee.filters!==me&&U.jsx(kT,{}),Ee.filters&&!p&&Ee.filters!==me&&U.jsx(n.Tooltip,{title:"Reset Filter",onClick:$e,children:U.jsx(n.IconButton,{children:U.jsx(Oz,{})})})]})]}),U.jsx(vz,{schema:je,onClickClearFilter:$e,onRemoveFilterValue:function(e,t){!function(e,t,n,r,o,i,a,s,l,c,u,d,p,f){var m,h,g=n.quickFilterProperties,v=n.properties.filters,A=v&&v.scopes&&v.scopes.auto?v.scopes.auto.key:void 0,y=n.properties.model,b=v.scopes.options,x=void 0===(null===(m=v.scopes)||void 0===m?void 0:m.showAll)||(null===(h=v.scopes)||void 0===h?void 0:h.showAll),w=q({},s),j=q({},c);A&&e.get(A)&&r===A&&i("all");var C=y[r],M=C.type,O=e.get(r),z=function(e){var t=r+"-to";return{from:o===r+"-from"?"":e[r].from,to:o===t?"":e[r].to}},T=function(t,n){var r=e.getAll(t);e.delete(t),r.forEach((function(r){r!==n&&e.append(t,r)}))};switch(M){case exports.FieldTypes.STRING:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.ENUM:case exports.FieldTypes.BOOLEAN:case exports.FieldTypes.COLOR:case exports.FieldTypes.EXTERNAL_LINK:O&&e.delete(r),s&&s[r]&&(w[r]=void 0),g&&g.includes(r)&&c[r]&&delete j[r];break;case exports.FieldTypes.NUMBER:case exports.FieldTypes.DATE:(O=e.get(o))&&e.delete(o),s&&s[r]&&(w[r]=z(w)),g&&g.includes(r)&&c[r]&&(j[r]=z(j));break;case exports.FieldTypes.REFERENCE:var D=r+"-id",P=r+"-name";if(C.multipleInFilter){var N=e.getAll(r+"-name");N&&N.length>0&&(e.getAll(r+"-id").forEach((function(e,t){e===o&&T(P,N[t])})),T(D,o)),g&&g.includes(r)&&c[r]&&(j[r]=j[r].filter((function(e){return e._id!==o})))}else e.delete(D),e.delete(P),s&&s[r]&&(w[r]=void 0),g&&g.includes(r)&&c[r]&&(d(r),f(),delete j[r])}var E={},B=void 0;new FA(n).getUniqueFields().forEach((function(t){"__v"!==t&&""!==t&&QA(y[t],t,E,e,y)})),B=VA(E,y,A),l(w),u(j),t(e),a((function(t){return q(q({},t),{page:1,filters:p?B.concat(p):B,scope:A&&e.get(A)?e.get(A):!x&&b?b[0].key:void 0})}))}(X,Y,ge,e,t,Se,Be,L,I,E,B,Ue,me,et)}})]}),fe?fe(He):U.jsx(sT,q({},He))]})]})}):U.jsx(_M,{})}function ST(e){var t=e.text,o=e.to,i=e.icon;return U.jsx(n.Button,{variant:"contained",component:r.Link,to:o,startIcon:U.jsx(To,{icon:i}),children:t})}function HT(e){return U.jsx(ST,q({},e,{icon:"eva:edit-fill"}))}var RT,WT=function(){function e(e,t,n,r,o){this.modelLocalizedName=t,this.modelName=e,this.isEnglish=n,this.title=r,this.record=o}return e.prototype.getTitle=function(){return this.isEnglish?this.modelLocalizedName+": Show":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbHeading=function(){return this.isEnglish?this.modelName+" Data":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbLinks=function(e,t,r,o){return[{name:this.isEnglish?"Dashboard":"الرئيسية",href:o},{name:this.modelLocalizedName,href:e[t].list},{name:this.record?r[this.title].type===exports.FieldTypes.LOCALIZEDString?this.getValue():"object"!=typeof this.record[this.title]?this.record[this.title]:this.getValue():U.jsx(n.Skeleton,{variant:"text",width:100,height:20})}]},e.prototype.getValue=function(){return this.record[this.title]&&this.record[this.title][0]?hv.getLocalizedString(this.record[this.title]):"---"},e}();function FT(t){var r=t.record,o=t.path,i=t.userPath,a=t.fieldsMap,s=e.useContext(Kh).resources,l=s[o].showProperties,c=s[o].properties.model;return U.jsx(n.Card,{sx:{pt:5,px:5},children:U.jsx(n.Grid,{container:!0,columnSpacing:2,children:l&&l.map((function(e){return r.hasOwnProperty(e.key)&&null!==r[e.key]?a&&a[e.key]?U.jsx(wC,{children:a[e.key]({record:r}),title:e.value,type:c[e.key].type}):U.jsx(RC,{property:e,schema:c,record:r,resources:s,userpath:i},e.key):U.jsx(BC,{title:e.value,value:OM,fieldkey:e.key,resources:s,userpath:i},e.key)}))})})}function VT(t){var o,i,a,s,l,c=r.useParams().id,u=void 0===c?"":c,d=t.path,p=t.modelRoute,f=t.disableDefaultActions,m=t.Component,h=t.HeadingView,g=t.Actions,v=t.BreadcrumbsChildren,A=t.BreadCrumbLinks,y=t.defaultFilters,b=t.showFilterChips,x=t.hideHeaderBreadcrumbs,w=void 0!==x&&x,j=t.hideSkeleton,C=void 0!==j&&j,M=t.disableFetchRecord,O=void 0!==M&&M,z=r.useLocation(),T=hv.isEnglish(),D=r.useSearchParams(),P=D[0];D[1];var N=e.useContext(Kh),E=N.resources,B=N.loadingLogo,k=N.logoSxProps,L=e.useContext(ug).themeStretch,I=e.useContext(Jh),S=I.paths,H=I.root,R=r.useNavigate(),W=E[d],F=E[d],V=F.properties,Q=V.model,X=V.name,Y=V.actions,G=V.title,Z=ty.convertCamelCaseToWord(d),K=Gh(),J=K.requestState,_=K.get,$=null===(o=J.data)||void 0===o?void 0:o.record,te=new WT(Z,X,T,G,$),ne=uz({defaultFilters:y,searchParams:P,resource:W});e.useEffect((function(){!O&&_({url:"".concat(p,"/").concat(u),query:ne})}),[u]);var oe=J.state===exports.RequestState.SUCCEEDED||O;return sM(W,JC.VIEW)?U.jsx(ee,{title:te.getTitle(),children:U.jsxs(n.Container,{maxWidth:!L&&"lg",children:[!w&&U.jsx(re,{headingView:h&&oe&&U.jsx(h,{record:J.data}),heading:te.getBreadCrumbHeading(),links:A&&oe?A(J.data):te.getBreadCrumbLinks(S,d,Q,H),action:U.jsxs(n.Stack,{spacing:2,children:[!F.properties.disableNextPreviousButtonsInShowPage&&U.jsx(KM,q({},t,{recordId:u,params:ne,modelPath:p,navigateTo:function(e){var t=S[d].show(e);R("".concat(t).concat(z.search))},recordIndex:null===(i=J.data)||void 0===i?void 0:i.recordIndex,numberOfRecords:null===(a=J.data)||void 0===a?void 0:a.numberOfRecords})),U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,children:[g&&oe&&U.jsx(g,{record:J.data}),!f&&V&&Y.edit.isAccessible&&sM(F,JC.EDIT)&&$&&!(null===(s=$.hiddenActionKeys)||void 0===s?void 0:s.includes("edit"))&&U.jsx(HT,{text:Y.edit.value,to:"".concat(S[d].edit(u)).concat(z.search)})]})]}),children:v&&oe&&U.jsx(v,{record:J.data})}),U.jsxs(n.Stack,{spacing:1,children:[b&&U.jsx(vz,{schema:Q}),oe?m?U.jsx(m,{record:J.data,path:d,userPath:S}):U.jsx(FT,{record:null===(l=J.data)||void 0===l?void 0:l.record,path:d,userPath:S,fieldsMap:t.fieldsMap},u):U.jsx(n.Grid,{container:!0,alignItems:"center",children:C?U.jsx(qh,{loadingLogo:B,logoSxProps:k}):U.jsx(wv,{sx:{height:50}})})]})]})}):U.jsx(_M,{})}function QT(e){var t=e.name,r=e.checked,o=e.disabled,i=e.fieldKey,a=e.label,s=e.handleChange;return U.jsx(n.FormControlLabel,{control:U.jsx(n.Switch,{checked:r,onChange:function(e){s(e,i)},name:t,disabled:o}),label:a})}function XT(e){var t=e.getValues,r=e.checked,o=e.size,i=e.handleChange;function a(e,n,a){return U.jsx(QT,{handleChange:i,getValues:t,name:e,size:o,label:n,disabled:!1,checked:r[a],fieldKey:a})}return U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled",mb:0},children:"Actions"}),a("actions.show","Show","show"),a("actions.edit","Edit","edit"),a("actions.new","Create","new"),a("actions.delete","Delete","delete"),a("actions.bulkDelete","Bulk delete","bulkDelete"),a("actions.import","Import","import"),a("actions.duplicate","Duplicate","duplicate")]})}function YT(t){var o,i,a=this,s=t.isEdit,u=t.record,d=t.path,p=t.apiRoute,f=t.resources,m=t.afterEditSnackText,h=r.useNavigate(),g=Ig(),v=g.setSuccessAlert,A=g.setErrorAlert,y=kg().getResources,b=Sg().paths,x=e.useState(!1),w=x[0],j=x[1],C=r.useParams().id,M=void 0===C?"":C,O=e.useState(u?q(q({},u.actions),{duplicate:null===(i=null===(o=u.actions)||void 0===o?void 0:o.duplicate)||void 0===i||i}):{}),z=O[0],T=O[1],D=Bg().textFieldSize,P=f[d].properties.model,N=f[d].formProperties,E=f[Bu.lowerCaseFirstLetter(u.modelName)],B=E.properties.model,k=[];function L(e){k.push(e)}!function e(t,n){for(var r in t){var o=t[r];o.type!==exports.FieldTypes.NESTEDSCHEMA?L(n?"".concat(n,".").concat(r):r):e(o.schema,n?"".concat(n,".").concat(r):r)}}(B);var I=hv.isEnglish(),S=I?"Create ":" اضافة ",R=I?"Save changes":"تعديل ",W={},F={};N.map((function(e){"_id"!==e&&"__v"!==e&&(W[e]=function(e,t){var n;switch(F[t]=void 0,e.type){case exports.FieldTypes.STRING:F[t]=u?u[t]:"",n=H.string();break;case exports.FieldTypes.NUMBER:F[t]=u?u[t]:void 0,n=H.number();break;case exports.FieldTypes.ENUM:F[t]=u?u[t]:P[t]&&P[t].defaultValue?P[t].defaultValue:void 0,n=H.string();break;case exports.FieldTypes.ARRAY:n=H.array(),F[t]=u&&u[t]?u[t]:void 0;break;case exports.FieldTypes.NESTEDSCHEMA:F[t]=u&&u[t]?u[t]:void 0,n=H.mixed()}return n}(P[e],e))}));var V=H.object().shape(W),Q=e.useMemo((function(){return F}),[]),X=c.useForm({resolver:Pa(V),defaultValues:Q}),Y=X.reset,G=X.control,Z=X.handleSubmit,K=X.getValues,$=X.setValue,ee={},te={},ne=function(e,t){$(e.target.name,e.target.checked);var n=q({},z);n[t]=e.target.checked,T(n)};function re(e){te[e]={},te[e][e]={type:P[e]?P[e].arrayType:"",enumValues:P[e]?P[e].enumValues:[]}}function oe(t,r,o){var i={name:o,key:o,size:D,label:r[t].value,disabled:s&&!1===r[t].isEditable};if("title"===t||"defaultOrderBy"===t)return U.jsx(DM,q({},i,{values:k}));if("actions"===t)return U.jsx(XT,{handleChange:ne,getValues:K,size:D,checked:z});if(r[t])switch(r[t].type){case exports.FieldTypes.OBJECTID:case exports.FieldTypes.NUMBER:case exports.FieldTypes.STRING:if("listProperties"===t||"showProperties"===t||"filterProperties"===t||"quickFilterProperties"===t){var a=[];return a=u[t]&&0!==u[t].length?k.filter((function(e){return!K(t).includes(e)||e===K(o)})):k,e.createElement(DM,q({},i,{key:o,values:a}))}return U.jsx(Yu,q({},i));case exports.FieldTypes.ENUM:return U.jsx(DM,q({},i,{values:r[t].enumValues}));case exports.FieldTypes.ARRAY:return function(e){var t=c.useFieldArray({control:G,name:e}),n=t.fields,r=t.append,o=t.remove,i=t.move;ee[e]={fields:n,append:r,remove:o,move:i}}(t),re(t),U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsx(KA,{handleRemove:function(e){return function(e,t){ee[e].remove(t)}(t,e)},draggable:!0,handleDrop:function(e){return function(e,t){t.destination&&ee[e].move(t.source.index,t.destination.index)}(t,e)},list:ee[t].fields,itemComponent:function(e){return U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,sx:{width:1},children:[U.jsx(n.Grid,{item:!0,xs:12,children:oe(t,te[t],"".concat(t,"[").concat(e,"]"))}),U.jsx(n.Divider,{})]})},handleAdd:function(){return function(e){ee[e].append()}(t)},addButtonText:I?"Add item":"إضافة"})]},t)}}return U.jsx(U.Fragment,{children:U.jsx(Su,{methods:X,onSubmit:Z((function(e){return J(a,void 0,void 0,(function(){var t,n,r,o,i,a;return _(this,(function(s){switch(s.label){case 0:j(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Bh.patch(p+"/"+M,e)];case 2:return t=s.sent(),j(!1),201!==t.status&&200!==t.status||!t.data.data.record.document||(Y(),n=f[d].properties.title,r=t.data.data.record.document[n],o=ty.getRecordName(r,n,E),y(),i=m?m(o):"".concat(o," was updated successfully"),v(i),h(b[d].list,{replace:!0})),[3,4];case 3:return a=s.sent(),j(!1),Y(e),A("".concat(JSON.parse(a).meta.message)),[3,4];case 4:return[2]}}))}))})),children:U.jsx(n.Card,{sx:{p:3},children:U.jsxs(n.Grid,{container:!0,spacing:2,justifyContent:"end",children:[N&&N.map((function(e,t){return U.jsx(n.Grid,{item:!0,xs:12,children:oe(e,P,e)},e+t)})),U.jsx(n.Grid,{item:!0,alignSelf:"end",sx:{mt:3},children:U.jsx(l.LoadingButton,{type:"submit",variant:"contained",loading:w,children:s?R:S})})]},"grid1")})},"form")})}function GT(e){var t=e.direction,n=e.sxProps,r=e.onClick,o=e.color,i=function(e){switch(e){case RT.LEFT:return"material-symbols:arrow-back-ios-new";case RT.RIGHT:return"eva:arrow-ios-forward-fill";case RT.DOWN:return"eva:arrow-ios-downward-fill";case RT.UP:return"eva:arrow-ios-upward-fill"}}(t);return U.jsx(To,{icon:i,onClick:r,sx:q({width:16,height:16,color:null!=o?o:"white"},n)})}function ZT(e){var t=e.onClickOpen,r=e.modelName,o=e.checked,i=RT.RIGHT;return U.jsx(n.IconButton,{onClick:function(){return t(r)},children:U.jsx(GT,{direction:o&&o[r].opened?RT.DOWN:i,color:"black"})})}function UT(t){var r=t.label,o=t.checked,i=t.onChange,a=e.memo((function(e){var t=e.checked,r=e.onChange;return U.jsx(n.Checkbox,{checked:t,onChange:function(e,t){return r(e,t)}})}));return U.jsx(n.FormControlLabel,{label:r,control:U.jsx(a,{checked:o,onChange:i})})}function qT(){return U.jsx(n.FormControlLabel,{label:U.jsx(n.Skeleton,{variant:"text",width:160,height:20}),control:U.jsx(n.Checkbox,{disabled:!0})})}function KT(){return U.jsx(n.IconButton,{children:U.jsx(GT,{direction:RT.DOWN,color:"black"})})}function JT(){return U.jsx(U.Fragment,{children:Array.from(Array(2).keys()).map((function(e){return U.jsxs("div",{children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:"1px",children:[U.jsx(KT,{}),U.jsx(qT,{})]}),U.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",ml:8},children:Array.from(Array(4).keys()).map((function(e){return U.jsx(qT,{},e)}))})]},e)}))})}function _T(e){var t=e.modelPermissions,r=e.checked,o=e.fetchLoading,i=e.onCheckAll,a=e.handleChange,s=e.onClickOpen;return U.jsxs(n.Stack,{children:[U.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",children:[U.jsx(n.Typography,{sx:{py:1},fontWeight:700,fontSize:{xs:"14px",md:"18px"},children:"Permissions"}),U.jsx(n.Button,{onClick:i,children:"Check all"})]}),o?U.jsx(JT,{}):t.map((function(e){var t=e.modelName;return U.jsxs("div",{children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:"1px",children:[U.jsx(ZT,{modelName:t,checked:r,onClickOpen:s}),U.jsx(UT,{label:e.label,checked:r&&r[t].all,onChange:function(e,n){return a(t,"all",n)}})]}),r&&r[t].opened&&U.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",ml:8},children:e.permissions.map((function(e){var n=e.id;return U.jsx(UT,{label:e.label,checked:r&&r[t][n],onChange:function(e,r){return a(t,n,r)}},n)}))})]},t)}))]})}function $T(e){var t=Bg().textFieldSize;return U.jsxs(n.Stack,{spacing:3,children:[U.jsx(Yu,{name:"name",label:"Name",size:t}),U.jsx(_T,q({},e))]})}function eD(t){var i=this,a=t.modelPermissions,s=t.fetchLoading,u=t.isEdit,d=t.permissionGroup,p=e.useState(void 0),f=p[0],m=p[1],h=r.useParams().id,g=void 0===h?"":h,v=e.useContext(Ih).dashbaordUrlPrefix,A=Sg().paths,y=H.object().shape({name:o.string().required("Please add permission group name").typeError("Please add permission group name")}),b=e.useState(!1),x=b[0],w=b[1],j=r.useNavigate(),C=e.useMemo((function(){return{name:null==d?void 0:d.name}}),[]),M=c.useForm({resolver:Pa(y),defaultValues:C}),O=M.getValues,z=M.handleSubmit;e.useEffect((function(){a.length>0&&m(function(e){var t={};return e.forEach((function(e,n){t[e.modelName]={all:!1,opened:0===n};var r=!0;e.permissions.forEach((function(n){t[e.modelName][n.id]=n.checked,n.checked?t[e.modelName].opened=!0:r=!1})),r&&(t[e.modelName].all=!0)})),t}(a))}),[a]);return U.jsxs(Su,{methods:M,onSubmit:z((function(e){return J(i,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return w(!0),u?[4,Bh.patch("".concat(v,"/permissionGroups/").concat(g),q(q({},e),{checked:f}))]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,Bh.post("".concat(v,"/permissionGroups"),q(q({},e),{checked:f}))];case 3:t.sent(),t.label=4;case 4:return w(!1),j(A.permissionGroup.list),[2]}}))}))})),children:[U.jsx($T,{checked:f,handleChange:function(e,t,n){var r,o,i,s=q({},f);if(s[e][t]=n,"all"===t)(i=null===(r=a.find((function(t){return t.modelName===e})))||void 0===r?void 0:r.permissions)&&i.forEach((function(t){s[e][t.id]=n}));else if(i=null===(o=a.find((function(t){return t.modelName===e})))||void 0===o?void 0:o.permissions){var l=i.every((function(t){return s[e][t.id]}));s[e].all=l}m(s)},onClickOpen:function(e){var t=q({},f);t[e].opened=!t[e].opened,m(t)},modelPermissions:a,getValues:O,fetchLoading:s,onCheckAll:function(){var e=q({},f);for(var t in e)for(var n in e[t])e[t][n]=!0;m(e)}}),U.jsx(n.Stack,{direction:"row",flexDirection:"row-reverse",children:U.jsx(l.LoadingButton,{type:"submit",variant:"contained",size:"large",loading:x,children:"Save"})})]})}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN"}(RT||(RT={}));var tD=xo("div")((function(e){return{maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.theme.spacing(12,0)}}));function nD(){return U.jsx(ee,{title:"404 Page Not Found",children:U.jsx(n.Container,{component:is,children:U.jsxs(tD,{sx:{textAlign:"center",alignItems:"center"},children:[U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{variant:"h3",paragraph:!0,children:"Sorry, page not found!"})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{sx:{color:"text.secondary"},children:"Sorry, we couldn’t find the page you’re looking for. Perhaps you’ve mistyped the URL? Be sure to check your spelling."})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(Fa,{sx:{height:260,my:{xs:5,sm:10}}})}),U.jsx(n.Button,{to:"/dashboard",size:"large",variant:"contained",component:r.Link,children:"Go to Home"})]})})})}function rD(e){return"".concat(e/16,"rem")}function oD(e){var t=e.sm,n=e.md,r=e.lg;return{"@media (min-width:600px)":{fontSize:rD(t)},"@media (min-width:900px)":{fontSize:rD(n)},"@media (min-width:1200px)":{fontSize:rD(r)}}}var iD={fontFamily:"Almarai",fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:q({fontWeight:700,lineHeight:1.25,fontSize:rD(40),letterSpacing:2},oD({sm:52,md:58,lg:64})),h2:q({fontWeight:700,lineHeight:64/48,fontSize:rD(32)},oD({sm:40,md:44,lg:48})),h3:q({fontWeight:700,lineHeight:1.5,fontSize:rD(24)},oD({sm:26,md:30,lg:32})),h4:q({fontWeight:700,lineHeight:1.5,fontSize:rD(20)},oD({sm:20,md:24,lg:24})),h5:q({fontWeight:700,lineHeight:1.5,fontSize:rD(18)},oD({sm:19,md:20,lg:20})),h6:q({fontWeight:700,lineHeight:28/18,fontSize:rD(17)},oD({sm:18,md:18,lg:18})),subtitle1:{fontWeight:600,lineHeight:1.5,fontSize:rD(16)},subtitle2:{fontWeight:600,lineHeight:22/14,fontSize:rD(14)},body1:{lineHeight:1.5,fontSize:rD(16)},body2:{lineHeight:22/14,fontSize:rD(14)},caption:{lineHeight:1.5,fontSize:rD(12)},overline:{fontWeight:700,lineHeight:1.5,fontSize:rD(12),textTransform:"uppercase"},button:{fontWeight:700,lineHeight:24/14,fontSize:rD(14),textTransform:"capitalize"}},aD={values:{xs:0,sm:600,md:900,lg:1200,xl:1536}};var sD={width:20,height:20},lD={width:28,height:28};function cD(e){return Object.assign(function(e){return{MuiFab:{defaultProps:{color:"primary"},styleOverrides:{root:{boxShadow:e.customShadows.z8,"&:hover":{boxShadow:"none",backgroundColor:e.palette.grey[400]}},primary:{boxShadow:e.customShadows.primary,"&:hover":{backgroundColor:e.palette.primary.dark}},secondary:{boxShadow:e.customShadows.secondary,"&:hover":{backgroundColor:e.palette.secondary.dark}},extended:{"& svg":{marginRight:e.spacing(1)}}}}}}(e),function(e){return{MuiTab:{styleOverrides:{root:{padding:0,fontWeight:e.typography.fontWeightMedium,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,"&.Mui-selected":{color:e.palette.text.primary},"&:not(:last-of-type)":{marginRight:e.spacing(5)},"@media (min-width: 600px)":{minWidth:48}},labelIcon:{minHeight:48,flexDirection:"row","& > *:first-of-type":{marginBottom:0,marginRight:e.spacing(1)}},wrapper:{flexDirection:"row",whiteSpace:"nowrap"},textColorInherit:{opacity:1,color:e.palette.text.secondary}}},MuiTabPanel:{styleOverrides:{root:{padding:0}}},MuiTabScrollButton:{styleOverrides:{root:{width:48,borderRadius:"50%"}}}}}(e),function(e){return{MuiChip:{defaultProps:{deleteIcon:U.jsx(yT,{})},styleOverrides:{colorDefault:{"& .MuiChip-avatarMedium, .MuiChip-avatarSmall":{color:e.palette.text.secondary}},outlined:{borderColor:e.palette.grey[50032],"&.MuiChip-colorPrimary":{borderColor:e.palette.primary.main},"&.MuiChip-colorSecondary":{borderColor:e.palette.secondary.main}},avatarColorInfo:{color:e.palette.info.contrastText,backgroundColor:e.palette.info.dark},avatarColorSuccess:{color:e.palette.success.contrastText,backgroundColor:e.palette.success.dark},avatarColorWarning:{color:e.palette.warning.contrastText,backgroundColor:e.palette.warning.dark},avatarColorError:{color:e.palette.error.contrastText,backgroundColor:e.palette.error.dark}}}}}(e),function(e){return{MuiCard:{styleOverrides:{root:{position:"relative",boxShadow:e.customShadows.card,borderRadius:2*Number(e.shape.borderRadius),zIndex:0}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h6"},subheaderTypographyProps:{variant:"body2",marginTop:e.spacing(.5)}},styleOverrides:{root:{padding:e.spacing(3,3,0)}}},MuiCardContent:{styleOverrides:{root:{padding:e.spacing(3)}}}}}(e),function(e){return{MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}}}}}}}(e),{MuiLink:{defaultProps:{underline:"hover"}}},function(e){return{MuiInputBase:{styleOverrides:{root:{"&.Mui-disabled":{"& svg":{color:e.palette.text.disabled}}},input:{"&::placeholder":{opacity:1,color:e.palette.text.disabled}}}},MuiInput:{styleOverrides:{underline:{"&:before":{borderBottomColor:e.palette.grey[50056]}}}},MuiFilledInput:{styleOverrides:{root:{backgroundColor:e.palette.grey[50012],"&:hover":{backgroundColor:e.palette.grey[50016]},"&.Mui-focused":{backgroundColor:e.palette.action.focus},"&.Mui-disabled":{backgroundColor:e.palette.action.disabledBackground}},underline:{"&:before":{borderBottomColor:e.palette.grey[50056]}}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey[50032]},"&.Mui-disabled":{"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.action.disabledBackground}}}}}}}(e),function(e){return{MuiRadio:{styleOverrides:{root:{padding:e.spacing(1),svg:{fontSize:24,"&[font-size=small]":{fontSize:20}}}}}}}(e),{MuiBadge:{styleOverrides:{dot:{width:10,height:10,borderRadius:"50%"}}}},function(e){return{MuiListItemIcon:{styleOverrides:{root:{color:"inherit",minWidth:"auto",marginRight:e.spacing(2)}}},MuiListItemAvatar:{styleOverrides:{root:{minWidth:"auto",marginRight:e.spacing(2)}}},MuiListItemText:{styleOverrides:{root:{marginTop:0,marginBottom:0},multiline:{marginTop:0,marginBottom:0}}}}}(e),function(e){return{MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}}}}},MuiTableCell:{styleOverrides:{root:{borderBottom:"none"},head:{color:e.palette.text.secondary,backgroundColor:e.palette.background.neutral,"&:first-of-type":{paddingLeft:e.spacing(3),borderTopLeftRadius:e.shape.borderRadius,borderBottomLeftRadius:e.shape.borderRadius,boxShadow:"inset 8px 0 0 ".concat(e.palette.background.paper)},"&:last-of-type":{paddingRight:e.spacing(3),borderTopRightRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,boxShadow:"inset -8px 0 0 ".concat(e.palette.background.paper)}},stickyHeader:{backgroundColor:e.palette.background.paper,backgroundImage:"linear-gradient(to bottom, ".concat(e.palette.background.neutral," 0%, ").concat(e.palette.background.neutral," 100%)")},body:{"&:first-of-type":{paddingLeft:e.spacing(3)},"&:last-of-type":{paddingRight:e.spacing(3)}}}},MuiTablePagination:{styleOverrides:{root:{borderTop:"solid 1px ".concat(e.palette.divider)},toolbar:{height:64},select:{"&:focus":{borderRadius:e.shape.borderRadius}},selectIcon:{width:20,height:20,marginTop:-4}}}}}(e),function(e){return{MuiPaper:{defaultProps:{elevation:0},variants:[{props:{variant:"outlined"},style:{borderColor:e.palette.grey[50012]}}],styleOverrides:{root:{backgroundImage:"none"}}}}}(e),function(e){var t="light"===e.palette.mode,n=function(n){return{color:e.palette[n][t?"darker":"lighter"],backgroundColor:e.palette[n][t?"lighter":"darker"],"& .MuiAlert-icon":{color:e.palette[n][t?"main":"light"]}}},r=function(t){return{color:e.palette[t].contrastText}},o=function(n){return{color:e.palette[n][t?"darker":"lighter"],border:"solid 1px ".concat(e.palette[n][t?"light":"dark"]),backgroundColor:e.palette[n][t?"lighter":"darker"],"& .MuiAlert-icon":{color:e.palette[n][t?"main":"light"]}}};return{MuiAlert:{defaultProps:{iconMapping:{info:U.jsx(xT,{}),success:U.jsx(jT,{}),warning:U.jsx(wT,{}),error:U.jsx(CT,{})}},styleOverrides:{message:{"& .MuiAlertTitle-root":{marginBottom:e.spacing(.5)}},action:{"& button:not(:first-of-type)":{marginLeft:e.spacing(1)}},standardInfo:n("info"),standardSuccess:n("success"),standardWarning:n("warning"),standardError:n("error"),filledInfo:r("info"),filledSuccess:r("success"),filledWarning:r("warning"),filledError:r("error"),outlinedInfo:o("info"),outlinedSuccess:o("success"),outlinedWarning:o("warning"),outlinedError:o("error")}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiSwitch:{styleOverrides:{thumb:{boxShadow:e.customShadows.z1},track:{opacity:1,backgroundColor:e.palette.grey[500]},switchBase:{left:0,right:"auto","&:not(:.Mui-checked)":{color:e.palette.grey[t?100:300]},"&.Mui-checked.Mui-disabled, &.Mui-disabled":{color:e.palette.grey[t?400:600]},"&.Mui-disabled+.MuiSwitch-track":{opacity:1,backgroundColor:"".concat(e.palette.action.disabledBackground," !important")}}}}}}(e),{MuiSelect:{defaultProps:{IconComponent:TT}}},function(e){return{MuiButton:{styleOverrides:{root:{"&:hover":{boxShadow:"none"}},sizeLarge:{height:48},containedInherit:{color:e.palette.grey[800],boxShadow:e.customShadows.z8,"&:hover":{backgroundColor:e.palette.grey[400]}},containedPrimary:{boxShadow:e.customShadows.primary},containedSecondary:{boxShadow:e.customShadows.secondary},containedInfo:{boxShadow:e.customShadows.info},containedSuccess:{boxShadow:e.customShadows.success},containedWarning:{boxShadow:e.customShadows.warning},containedError:{boxShadow:e.customShadows.error},outlinedInherit:{border:"1px solid ".concat(e.palette.grey[50032]),"&:hover":{backgroundColor:e.palette.action.hover}},textInherit:{"&:hover":{backgroundColor:e.palette.action.hover}}}}}}(e),function(e){return{MuiRating:{defaultProps:{emptyIcon:U.jsx(bT,{}),icon:U.jsx(bT,{})},styleOverrides:{root:{"&.Mui-disabled":{opacity:.48}},iconEmpty:{color:e.palette.grey[50048]},sizeSmall:{"& svg":q({},sD)},sizeLarge:{"& svg":q({},lD)}}}}}(e),function(e){return{MuiDialog:{styleOverrides:{paper:{boxShadow:e.customShadows.dialog,"&.MuiPaper-rounded":{borderRadius:2*Number(e.shape.borderRadius)},"&.MuiDialog-paperFullScreen":{borderRadius:0},"&.MuiDialog-paper .MuiDialogActions-root":{padding:e.spacing(3)},"@media (max-width: 600px)":{margin:e.spacing(2)},"@media (max-width: 663.95px)":{"&.MuiDialog-paperWidthSm.MuiDialog-paperScrollBody":{maxWidth:"100%"}}},paperFullWidth:{width:"100%"}}},MuiDialogTitle:{styleOverrides:{root:{padding:e.spacing(3,3,0)}}},MuiDialogContent:{styleOverrides:{root:{borderTop:0,borderBottom:0,padding:e.spacing(3)}}},MuiDialogActions:{styleOverrides:{root:{"& > :not(:first-of-type)":{marginLeft:e.spacing(1.5)}}}}}}(e),function(e){return{MuiAvatar:{styleOverrides:{colorDefault:{color:e.palette.text.secondary,backgroundColor:e.palette.grey[400]}}},MuiAvatarGroup:{styleOverrides:{avatar:{fontSize:16,fontWeight:e.typography.fontWeightMedium,"&:first-of-type":{fontSize:14,color:e.palette.primary.main,backgroundColor:e.palette.primary.lighter}}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiSlider:{defaultProps:{size:"small"},styleOverrides:{root:{"&.Mui-disabled":{color:e.palette.action.disabled}},markLabel:{fontSize:13,color:e.palette.text.disabled},valueLabel:{borderRadius:8,backgroundColor:e.palette.grey[t?800:700]}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiDrawer:{styleOverrides:{modal:{'&[role="presentation"]':{"& .MuiDrawer-paperAnchorLeft":{boxShadow:"8px 24px 24px 12px ".concat(n.alpha(e.palette.grey[900],t?.16:.48))},"& .MuiDrawer-paperAnchorRight":{boxShadow:"-8px 24px 24px 12px ".concat(n.alpha(e.palette.grey[900],t?.16:.48))}}}}}}}(e),function(e){return{MuiStepConnector:{styleOverrides:{line:{borderColor:e.palette.divider}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:e.palette.grey[t?800:700]},arrow:{color:e.palette.grey[t?800:700]}}}}}(e),function(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.dropdown,borderRadius:1.5*Number(e.shape.borderRadius)}}}}}(e),{MuiSvgIcon:{styleOverrides:{fontSizeSmall:{width:20,height:20,fontSize:"inherit"},fontSizeLarge:{width:32,height:32,fontSize:"inherit"}}}},function(e){return{MuiCheckbox:{defaultProps:{icon:U.jsx(MT,{}),checkedIcon:U.jsx(OT,{}),indeterminateIcon:U.jsx(zT,{})},styleOverrides:{root:{padding:e.spacing(1),"&.Mui-checked.Mui-disabled, &.Mui-disabled":{color:e.palette.action.disabled},"& .MuiSvgIcon-fontSizeMedium":{width:24,height:24},"& .MuiSvgIcon-fontSizeSmall":{width:20,height:20},svg:{fontSize:24,"&[font-size=small]":{fontSize:20}}}}}}}(e),function(e){return{MuiDataGrid:{styleOverrides:{root:{borderRadius:0,border:"1px solid transparent","& .MuiTablePagination-root":{borderTop:0},"& .MuiDataGrid-toolbarContainer":{padding:e.spacing(2),backgroundColor:e.palette.background.neutral,"& .MuiButton-root":{marginRight:e.spacing(1.5),color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}}},"& .MuiDataGrid-cell, .MuiDataGrid-columnsContainer":{borderBottom:"1px solid ".concat(e.palette.divider)},"& .MuiDataGrid-columnSeparator":{color:e.palette.divider},'& .MuiDataGrid-columnHeader[data-field="__check__"]':{padding:0}}}},MuiGridMenu:{styleOverrides:{root:{"& .MuiDataGrid-gridMenuList":{boxShadow:e.customShadows.z20,borderRadius:e.shape.borderRadius},"& .MuiMenuItem-root":q({},e.typography.body2)}}},MuiGridFilterForm:{styleOverrides:{root:{padding:e.spacing(1.5,0),"& .MuiFormControl-root":{margin:e.spacing(0,.5)},"& .MuiInput-root":{marginTop:e.spacing(3),"&::before, &::after":{display:"none"},"& .MuiNativeSelect-select, .MuiInput-input":q(q({},e.typography.body2),{padding:e.spacing(.75,1),borderRadius:e.shape.borderRadius,backgroundColor:e.palette.background.neutral}),"& .MuiSvgIcon-root":{right:4}}}}},MuiGridPanelFooter:{styleOverrides:{root:{padding:e.spacing(2),justifyContent:"flex-end","& .MuiButton-root":{"&:first-of-type":{marginRight:e.spacing(1.5),color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}},"&:last-of-type":{color:e.palette.common.white,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark}}}}}}}}(e),function(e){return{MuiSkeleton:{defaultProps:{animation:"wave"},styleOverrides:{root:{backgroundColor:e.palette.background.neutral}}}}}(e),function(e){return{MuiTimelineDot:{styleOverrides:{root:{boxShadow:"none"}}},MuiTimelineConnector:{styleOverrides:{root:{backgroundColor:e.palette.divider}}}}}(e),function(e){return{MuiTreeView:{defaultProps:{defaultCollapseIcon:U.jsx(DT,{sx:{width:20,height:20}}),defaultExpandIcon:U.jsx(PT,{sx:{width:20,height:20}}),defaultEndIcon:U.jsx(NT,{sx:{color:"text.secondary",width:20,height:20}})}},MuiTreeItem:{styleOverrides:{label:q({},e.typography.body2),iconContainer:{width:"auto"}}}}}(e),function(e){var t=Cr(e.palette.grey[900],.48),n=Cr(e.palette.grey[900],1);return{MuiBackdrop:{styleOverrides:{root:{background:["rgb(22,28,36)","-moz-linear-gradient(75deg, ".concat(t," 0%, ").concat(n," 100%)"),"-webkit-linear-gradient(75deg, ".concat(t," 0%, ").concat(n," 100%)"),"linear-gradient(75deg, ".concat(t," 0%, ").concat(n," 100%)")],"&.MuiBackdrop-invisible":{background:"transparent"}}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiLinearProgress:{styleOverrides:{root:{borderRadius:4,overflow:"hidden"},bar:{borderRadius:4},colorPrimary:{backgroundColor:e.palette.primary[t?"lighter":"darker"]},buffer:{backgroundColor:"transparent"}}}}}(e),function(e){return{MuiAccordion:{styleOverrides:{root:{"&.Mui-expanded":{boxShadow:e.customShadows.z8,borderRadius:e.shape.borderRadius},"&.Mui-disabled":{backgroundColor:"transparent"}}}},MuiAccordionSummary:{styleOverrides:{root:{paddingLeft:e.spacing(2),paddingRight:e.spacing(1),"&.Mui-disabled":{opacity:1,color:e.palette.action.disabled,"& .MuiTypography-root":{color:"inherit"}}},expandIconWrapper:{color:"inherit"}}}}}(e),function(e){return{MuiTypography:{styleOverrides:{paragraph:{marginBottom:e.spacing(2)},gutterBottom:{marginBottom:e.spacing(1)}}}}}(e),function(e){return{MuiPaginationItem:{styleOverrides:{root:{"&.Mui-selected":{fontWeight:e.typography.fontWeightBold}},textPrimary:{"&.Mui-selected":{color:e.palette.primary.main,backgroundColor:Cr(e.palette.primary.main,.08),"&:hover, &.Mui-focusVisible":{backgroundColor:"".concat(Cr(e.palette.primary.main,.24)," !important")}}},outlined:{border:"1px solid ".concat(e.palette.grey[50032])},outlinedPrimary:{"&.Mui-selected":{backgroundColor:Cr(e.palette.primary.main,.08),border:"1px solid ".concat(Cr(e.palette.primary.main,.24))}}}}}}(e),function(e){var t=function(t){return{props:{variant:"contained",color:t},style:{boxShadow:e.customShadows[t]}}};return{MuiButtonGroup:{variants:[{props:{variant:"contained",color:"inherit"},style:{boxShadow:e.customShadows.z8}},t("primary"),t("secondary"),t("info"),t("success"),t("warning"),t("error"),{props:{disabled:!0},style:{boxShadow:"none","& .MuiButtonGroup-grouped.Mui-disabled":{color:e.palette.action.disabled,borderColor:"".concat(e.palette.action.disabledBackground," !important"),"&.MuiButton-contained":{backgroundColor:e.palette.action.disabledBackground}}}}],styleOverrides:{root:{"&:hover":{boxShadow:"none"}}}}}}(e),function(e){return{MuiBreadcrumbs:{styleOverrides:{separator:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}}}}}(e),{MuiCssBaseline:{styleOverrides:{"*":{margin:0,padding:0,boxSizing:"border-box"},html:{width:"100%",height:"100%",WebkitOverflowScrolling:"touch"},body:{width:"100%",height:"100%"},"#root":{width:"100%",height:"100%"},input:{"&[type=number]":{MozAppearance:"textfield","&::-webkit-outer-spin-button":{margin:0,WebkitAppearance:"none"},"&::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"}}},img:{display:"block",maxWidth:"100%"}}}},function(e){return{MuiAutocomplete:{styleOverrides:{paper:{boxShadow:e.customShadows.dropdown},listbox:{padding:e.spacing(0,1),"& .MuiAutocomplete-option":{padding:e.spacing(1),margin:e.spacing(1,0),borderRadius:e.shape.borderRadius}}}}}}(e),function(e){return{MuiFormControlLabel:{styleOverrides:{label:q({},e.typography.body2)}},MuiFormHelperText:{styleOverrides:{root:{marginTop:e.spacing(1)}}},MuiFormLabel:{styleOverrides:{root:{color:e.palette.text.disabled}}}}}(e),function(e){var t=function(t){return{props:{color:t},style:{"&:hover":{borderColor:Cr(e.palette[t].main,.48),backgroundColor:Cr(e.palette[t].main,e.palette.action.hoverOpacity)},"&.Mui-selected":{borderColor:Cr(e.palette[t].main,.48)}}}};return{MuiToggleButton:{variants:[{props:{color:"standard"},style:{"&.Mui-selected":{backgroundColor:e.palette.action.selected}}},t("primary"),t("secondary"),t("info"),t("success"),t("warning"),t("error")]},MuiToggleButtonGroup:{styleOverrides:{root:{borderRadius:e.shape.borderRadius,backgroundColor:e.palette.background.paper,border:"solid 1px ".concat(e.palette.grey[50012]),"& .MuiToggleButton-root":{margin:4,borderColor:"transparent !important",borderRadius:"".concat(e.shape.borderRadius,"px !important")}}}}}}(e),{MuiLoadingButton:{styleOverrides:{root:{"&.MuiButton-text":{"& .MuiLoadingButton-startIconPendingStart":{marginLeft:0},"& .MuiLoadingButton-endIconPendingEnd":{marginRight:0}}}}}})}var uD=cg.light.grey[500],dD="#000000",pD=function(e){var t=Cr(e,.2),n=Cr(e,.14),r=Cr(e,.12);return["none","0px 2px 1px -1px ".concat(t,",0px 1px 1px 0px ").concat(n,",0px 1px 3px 0px ").concat(r),"0px 3px 1px -2px ".concat(t,",0px 2px 2px 0px ").concat(n,",0px 1px 5px 0px ").concat(r),"0px 3px 3px -2px ".concat(t,",0px 3px 4px 0px ").concat(n,",0px 1px 8px 0px ").concat(r),"0px 2px 4px -1px ".concat(t,",0px 4px 5px 0px ").concat(n,",0px 1px 10px 0px ").concat(r),"0px 3px 5px -1px ".concat(t,",0px 5px 8px 0px ").concat(n,",0px 1px 14px 0px ").concat(r),"0px 3px 5px -1px ".concat(t,",0px 6px 10px 0px ").concat(n,",0px 1px 18px 0px ").concat(r),"0px 4px 5px -2px ".concat(t,",0px 7px 10px 1px ").concat(n,",0px 2px 16px 1px ").concat(r),"0px 5px 5px -3px ".concat(t,",0px 8px 10px 1px ").concat(n,",0px 3px 14px 2px ").concat(r),"0px 5px 6px -3px ".concat(t,",0px 9px 12px 1px ").concat(n,",0px 3px 16px 2px ").concat(r),"0px 6px 6px -3px ".concat(t,",0px 10px 14px 1px ").concat(n,",0px 4px 18px 3px ").concat(r),"0px 6px 7px -4px ".concat(t,",0px 11px 15px 1px ").concat(n,",0px 4px 20px 3px ").concat(r),"0px 7px 8px -4px ".concat(t,",0px 12px 17px 2px ").concat(n,",0px 5px 22px 4px ").concat(r),"0px 7px 8px -4px ".concat(t,",0px 13px 19px 2px ").concat(n,",0px 5px 24px 4px ").concat(r),"0px 7px 9px -4px ".concat(t,",0px 14px 21px 2px ").concat(n,",0px 5px 26px 4px ").concat(r),"0px 8px 9px -5px ".concat(t,",0px 15px 22px 2px ").concat(n,",0px 6px 28px 5px ").concat(r),"0px 8px 10px -5px ".concat(t,",0px 16px 24px 2px ").concat(n,",0px 6px 30px 5px ").concat(r),"0px 8px 11px -5px ".concat(t,",0px 17px 26px 2px ").concat(n,",0px 6px 32px 5px ").concat(r),"0px 9px 11px -5px ".concat(t,",0px 18px 28px 2px ").concat(n,",0px 7px 34px 6px ").concat(r),"0px 9px 12px -6px ".concat(t,",0px 19px 29px 2px ").concat(n,",0px 7px 36px 6px ").concat(r),"0px 10px 13px -6px ".concat(t,",0px 20px 31px 3px ").concat(n,",0px 8px 38px 7px ").concat(r),"0px 10px 13px -6px ".concat(t,",0px 21px 33px 3px ").concat(n,",0px 8px 40px 7px ").concat(r),"0px 10px 14px -6px ".concat(t,",0px 22px 35px 3px ").concat(n,",0px 8px 42px 7px ").concat(r),"0px 11px 14px -7px ".concat(t,",0px 23px 36px 3px ").concat(n,",0px 9px 44px 8px ").concat(r),"0px 11px 15px -7px ".concat(t,",0px 24px 38px 3px ").concat(n,",0px 9px 46px 8px ").concat(r)]},fD=function(e){var t=Cr(e,.16);return{z1:"0 1px 2px 0 ".concat(t),z8:"0 8px 16px 0 ".concat(t),z12:"0 12px 24px -4px ".concat(t),z16:"0 16px 32px -4px ".concat(t),z20:"0 20px 40px -4px ".concat(t),z24:"0 24px 48px 0 ".concat(t),primary:"0 8px 16px 0 ".concat(Cr(cg.light.primary.main,.24)),info:"0 8px 16px 0 ".concat(Cr(cg.light.info.main,.24)),secondary:"0 8px 16px 0 ".concat(Cr(cg.light.secondary.main,.24)),success:"0 8px 16px 0 ".concat(Cr(cg.light.success.main,.24)),warning:"0 8px 16px 0 ".concat(Cr(cg.light.warning.main,.24)),error:"0 8px 16px 0 ".concat(Cr(cg.light.error.main,.24)),card:"0 0 2px 0 ".concat(Cr(e,.2),", 0 12px 24px -4px ").concat(Cr(e,.12)),dialog:"-40px 40px 80px -8px ".concat(Cr(cg.light.common.black,.24)),dropdown:"0 0 2px 0 ".concat(Cr(e,.24),", -20px 20px 40px -4px ").concat(Cr(e,.24))}},mD={light:fD(uD),dark:fD(dD)},hD={light:pD(uD),dark:pD(dD)};var gD=function(e){var t,n=(navigator.vendor+e).split("").map((function(e){return e.charCodeAt(0)})).join("");return t=(t=n).replace("-",""),"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g,(function(e,n){return t[n%t.length]}))};function vD(t){var r,o,i,a,s,u,d;t.userType;yD.VENDOR_USER;var p=e.useState(!1),f=p[0],m=p[1],h=hv.isEnglish(),g=Gh(),v=g.requestState,A=g.post,y=Yh().login,b=Sg().root,x=H.object().shape({email:H.string().email("Email must be a valid email address").required("Email is required"),password:H.string().required("Password is required")}),w=c.useForm({resolver:Pa(x),defaultValues:{email:"",password:"",remember:!0}}),j=w.handleSubmit,C=w.formState.isSubmitted;return e.useEffect((function(){v.state===exports.RequestState.SUCCEEDED&&v.data&&v.data.user&&y(v.data.user)}),[v]),U.jsxs(Su,{methods:w,onSubmit:j((function(e){A({url:"auth/login",axiosRequestConfig:{_auth:!1},body:{user:{email:e.email,password:e.password,remember:e.remember,slug:b.split("/")[2]},device:{deviceId:gD(e.email),os:"WEB"}}})})),children:[U.jsxs(n.Stack,{spacing:3,children:[C&&v.state===exports.RequestState.FAILED&&U.jsx(n.Alert,{severity:"error",children:null!==(s=null!==(r=v.error.message)&&void 0!==r?r:null===(a=(null!==(i=null===(o=v.error)||void 0===o?void 0:o.errors)&&void 0!==i?i:[])[0])||void 0===a?void 0:a.message)&&void 0!==s?s:null===(d=null===(u=v.error)||void 0===u?void 0:u.meta)||void 0===d?void 0:d.message}),U.jsx(Yu,{name:"email",label:h?"Email address":"البريد الإلكتروني"}),U.jsx(Yu,{name:"password",label:h?"Password":"كلمة المرور",type:f?"text":"password",InputProps:{endAdornment:U.jsx(n.InputAdornment,{position:"end",children:U.jsx(n.IconButton,{onClick:function(){return m(!f)},edge:"end",children:U.jsx(To,{icon:f?"eva:eye-fill":"eva:eye-off-fill"})})})}})]}),U.jsx(n.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{my:2},children:U.jsx(Na,{name:"remember",label:h?"Remember me":"تذكرني"})}),U.jsx(l.LoadingButton,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:status===exports.RequestState.LOADING,sx:{my:1},children:h?"Login":"تسجيل الدخول"})]})}var AD=xo("div")((function(e){var t;return(t={})[e.theme.breakpoints.up("md")]={display:"flex"},t}));xo("header")((function(e){var t,n=e.theme;return(t={top:0,zIndex:9,lineHeight:0,width:"100%",display:"flex",alignItems:"center",position:"absolute",padding:n.spacing(3),justifyContent:"space-between"})[n.breakpoints.up("md")]={alignItems:"flex-start",padding:n.spacing(7,5,0,7)},t})),xo(n.Card)((function(e){return{width:"100%",maxWidth:464,display:"flex",flexDirection:"column",justifyContent:"center",margin:e.theme.spacing(2,0,2,2)}}));var yD,bD=xo("div")((function(e){return{maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.theme.spacing(12,0)}}));function xD(e){var t=e.userType,r=Bg(),o=r.loginLoginMessage,i=r.loginWeclomeImage,a=r.loginLogo,s=r.loginWelcomeImageSxProps,l=r.loginLogoSxProps,c=r.loginMessageSxProps;os("up","sm");var u=hv.isEnglish(),d=os("up","md");return U.jsx(ee,{title:"Login",children:U.jsxs(AD,{children:[U.jsx(n.Container,{maxWidth:"sm",children:U.jsxs(bD,{children:[U.jsx(n.Stack,{direction:"row",alignItems:"center",sx:{mb:5},children:U.jsxs(n.Box,{sx:{flexGrow:1},children:[U.jsx(yu,{src:a,alt:"logo",sx:q({width:"57px",mb:3,objectFit:"contain"},l)}),U.jsx(n.Typography,{variant:"h4",gutterBottom:!0,sx:q({},c),children:o}),U.jsx(n.Typography,{sx:{color:"text.secondary"},children:u?" Welcome back, Please enter your details below":"الرجاء إدخال البيانات الخاصة بك"})]})}),U.jsx(vD,{userType:t})]})}),d&&U.jsx(yu,{visibleByDefault:!0,disabledEffect:!0,src:i,alt:"login",sx:q({width:"700px",objectFit:"contain"},s)})]})})}!function(e){e[e.ADMIN=0]="ADMIN",e[e.VENDOR_USER=1]="VENDOR_USER",e[e.EVENT_CREATOR=2]="EVENT_CREATOR"}(yD||(yD={}));var wD=e.forwardRef((function(e,t){var r=e.children,o=e.size,i=void 0===o?"medium":o,a=K(e,["children","size"]);return U.jsx(OD,{size:i,children:U.jsx(n.IconButton,q({size:i,ref:t},a,{children:r}))})})),jD={hover:{scale:1.1},tap:{scale:.95}},CD={hover:{scale:1.09},tap:{scale:.97}},MD={hover:{scale:1.08},tap:{scale:.99}};function OD(e){var t=e.size,r=e.children,o="small"===t,i="large"===t;return U.jsx(n.Box,{component:p.m.div,whileTap:"tap",whileHover:"hover",variants:o&&jD||i&&MD||CD,sx:{display:"inline-flex"},children:r})}function zD(e){var t=e.disabledLink,o=void 0!==t&&t,i=e.sx,a=vo(),s=Sg().root,l=Bg(),c=l.navBarLogo,u=l.navBarLogoSxProps;a.palette.primary.light,a.palette.primary.main,a.palette.primary.dark;var d=U.jsx(n.Box,{sx:q(q({width:40,height:40},i),u),children:U.jsx(yu,{visibleByDefault:!0,disabledEffect:!0,src:c,alt:"logo"})});return o?U.jsx(U.Fragment,{children:d}):U.jsx(r.Link,{to:"".concat(s),children:d})}var TD,DD,PD=xo("span")((function(e){var t,n=e.arrow,r=e.theme,o="solid 1px ".concat(Cr(r.palette.grey[500],.12)),i={borderRadius:"0 0 3px 0",top:-6,borderBottom:o,borderRight:o},a={borderRadius:"3px 0 0 0",bottom:-6,borderTop:o,borderLeft:o},s={borderRadius:"0 3px 0 0",left:-6,borderTop:o,borderRight:o},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:o,borderLeft:o};return q(q(q(q(q(q(q(q(q(q(q(q(((t={display:"none"})[r.breakpoints.up("sm")]={zIndex:1,width:12,height:12,content:"''",display:"block",position:"absolute",transform:"rotate(-135deg)",background:r.palette.background.paper},t),"top-left"===n&&q(q({},i),{left:20})),"top-center"===n&&q(q({},i),{left:0,right:0,margin:"auto"})),"top-right"===n&&q(q({},i),{right:20})),"bottom-left"===n&&q(q({},a),{left:20})),"bottom-center"===n&&q(q({},a),{left:0,right:0,margin:"auto"})),"bottom-right"===n&&q(q({},a),{right:20})),"left-top"===n&&q(q({},s),{top:20})),"left-center"===n&&q(q({},s),{top:0,bottom:0,margin:"auto"})),"left-bottom"===n&&q(q({},s),{bottom:20})),"right-top"===n&&q(q({},l),{top:20})),"right-center"===n&&q(q({},l),{top:0,bottom:0,margin:"auto"})),"right-bottom"===n&&q(q({},l),{bottom:20}))}));function ND(e){var t=e.open,r=e.children,o=e.arrow,i=void 0===o?"top-right":o,a=e.disabledArrow,s=e.sx,l=K(e,["open","children","arrow","disabledArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(i),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return U.jsxs(n.Popover,q({open:Boolean(t),anchorEl:t,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:q(q(q({p:1,width:"auto",overflow:"inherit"},u),{"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}}}),s)}},l,{children:[!a&&U.jsx(PD,{arrow:i}),r]}))}function ED(){var t,o,i,a=Yh(),s=a.user,l=a.logout;r.useNavigate(),Sg().root;var c=Gh().remove,u=e.useState(null),d=u[0],p=u[1];return U.jsxs(U.Fragment,{children:[U.jsx(wD,{onClick:function(e){p(e.currentTarget)},sx:q({p:0},d&&{"&:before":{zIndex:1,content:"''",width:"100%",height:"100%",borderRadius:"50%",position:"absolute",bgcolor:function(e){return Cr(e.palette.grey[900],.8)}}}),children:U.jsx(n.Avatar,{src:null==s?void 0:s.photo,alt:(null!==(t=null==s?void 0:s.name)&&void 0!==t?t:null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"})}),U.jsxs(ND,{open:d,anchorEl:d,onClose:function(){p(null)},sx:{p:0,mt:1.5,ml:.75,"& .MuiMenuItem-root":{typography:"body2",borderRadius:.75}},children:[U.jsxs(n.Box,{sx:{my:1.5,px:2.5},children:[U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:null!==(o=null==s?void 0:s.name)&&void 0!==o?o:(null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"}),U.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},noWrap:!0,children:null!==(i=null==s?void 0:s.username)&&void 0!==i?i:null==s?void 0:s.email})]}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),U.jsx(n.MenuItem,{sx:{m:1},onClick:function(){c({url:"auth/logout",onSuccess:function(e){l()}})},children:"Logout"})]})]})}!function(e){e.notifications="إشعارات",e.youHave="لديك",e.unreadMessages="رسائل غير مقروءة",e.showMore="عرض المزيد",e.showLess="عرض أقل",e.viewAll="عرض الكل",e.markAllAsRead="تعيين الكل كمقروء"}(TD||(TD={})),function(e){e.notifications="Notifications",e.youHave="You have",e.unreadMessages="unread messages",e.showMore="Show more",e.showLess="Show less",e.viewAll="View all",e.markAllAsRead="Mark all as read"}(DD||(DD={}));var BD={},kD=xa;Object.defineProperty(BD,"__esModule",{value:!0});var LD,ID,SD=BD.default=void 0,HD=kD(Ca()),RD=U,WD=(0,HD.default)((0,RD.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function FD(e){var t,r=e.notification,o=e.onClickNotification;return U.jsxs(n.ListItemButton,{sx:q({py:1.5,px:2,mt:"1px",display:"flex",alignItems:"center",gap:2},!r.isRead&&{bgcolor:"action.selected"}),onClick:function(){return o(r)},disabled:!r.clickable,children:[r.actorIcon&&U.jsx(n.Avatar,{src:"default"!==r.actorIcon?r.actorIcon:void 0,sx:{width:40,height:40,flexShrink:0,bgcolor:"#e0e0e0"},children:"default"===r.actorIcon&&U.jsx(SD,{sx:{color:"#9e9e9e"}})}),U.jsx(n.ListItemText,{disableTypography:!0,primary:U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:r.text}),secondary:U.jsxs(U.Fragment,{children:[U.jsx(n.Typography,{variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r.message}),U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:0,sx:{mt:.5},children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:.5,sx:{typography:"caption",color:"text.disabled"},children:[U.jsx(To,{icon:"eva:clock-fill",width:14}),U.jsx(n.Typography,{variant:"caption",children:(t=r.createdAt,T.formatDistanceToNow(new Date(t),{addSuffix:!0}))})]}),U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[r.targetIcon&&U.jsx(n.Avatar,{src:r.targetIcon,alt:"Branch Logo",sx:{width:24,height:24},variant:"rounded"}),r.targetName&&U.jsx(n.Typography,{variant:"caption",color:"text.secondary",noWrap:!0,sx:{maxWidth:120,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:r.targetName}),r.type&&r.clickable&&!r.hideCheckNow&&U.jsx(n.Chip,{size:"small",sx:{fontSize:"12px"},label:"Check Now"})]})]})]})})]})}function VD(){var t,o=e.useState(null),i=o[0],a=o[1],s=hv.isEnglish()?DD:TD;e.useContext(Ih).dashbaordUrlPrefix;var l=Rg(),c=l.notifications,u=l.markAllAsRead,d=l.markOneRead,p=e.useState(c),f=p[0],m=p[1],h=e.useState(!1),g=h[0],v=h[1],A=null==f?void 0:f.filter((function(e){return!1===e.isRead})).length,y=r.useNavigate(),b=function(){a(null)};e.useEffect((function(){m(c)}),[c]);var x=function(e){a(null),m(null==f?void 0:f.map((function(t){return t.id===e.id?q(q({},t),{isRead:!0}):q({},t)}))),d(e.id),e.redirectUrlType===LD.INTERNAL&&y(String(e.redirectUrl))},w=g?f:null==f?void 0:f.slice(0,4);return U.jsxs(U.Fragment,{children:[U.jsx(wD,{color:i?"primary":"default",onClick:function(e){a(e.currentTarget)},sx:{width:40,height:40},children:U.jsx(n.Badge,{badgeContent:A,color:"error",children:U.jsx(To,{icon:"eva:bell-fill"})})}),U.jsxs(ND,{open:i,onClose:b,sx:{width:360,p:0},children:[U.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",py:2,px:2.5},children:[U.jsxs(n.Box,{sx:{flexGrow:1},children:[U.jsx(n.Typography,{variant:"subtitle1",children:s.notifications}),U.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:"".concat(s.youHave," ").concat(null!=A?A:0," ").concat(s.unreadMessages)}),U.jsx(n.Button,{variant:"text",size:"small",color:"success",onClick:function(){b(),y("adminNotifications")},endIcon:U.jsx(To,{icon:"eva:arrow-ios-forward-fill"}),sx:{px:0,mt:.5},children:s.viewAll})]}),A&&A>0&&U.jsx(n.Tooltip,{title:" Mark all as read",children:U.jsx(n.IconButton,{color:"primary",onClick:function(){u(),m(null==f?void 0:f.map((function(e){return q(q({},e),{isRead:!0})})))},children:U.jsx(To,{icon:"eva:done-all-fill"})})})]}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),U.jsx(n.Paper,{style:{minHeight:200,maxHeight:400,overflow:"auto"},children:U.jsx(n.List,{disablePadding:!0,children:null==w?void 0:w.map((function(e){return U.jsx(FD,{notification:e,onClickNotification:x},e.id)}))})}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),(null!==(t=null==f?void 0:f.length)&&void 0!==t?t:0)>4&&U.jsx(n.Box,{sx:{p:1},children:U.jsx(n.Button,{fullWidth:!0,disableRipple:!0,onClick:function(){return v(!g)},children:g?s.showLess:s.showMore})})]})]})}SD=BD.default=WD,function(e){e.NONE="NONE",e.INTERNAL="INTERNAL",e.EXTERNAL="EXTERNAL"}(LD||(LD={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(ID||(ID={}));var QD={exports:{}};QD.exports=(()=>{return e={772:(e,t,n)=>{const r=n(826).remove,o=/[.*+?^${}()|[\]\\]/g,i=/[a-z0-9_]/i,a=/\s+/;e.exports=function(e,t,n){var s,l;l={insideWords:!1,findAllOccurrences:!1,requireMatchAll:!1},s=(s=n)||{},Object.keys(s).forEach((e=>{l[e]=!!s[e]})),n=l;const c=Array.from(e).map((e=>r(e)));let u=c.join("");return(t=r(t)).trim().split(a).filter((e=>e.length>0)).reduce(((e,t)=>{const r=t.length,a=!n.insideWords&&i.test(t[0])?"\\b":"",s=new RegExp(a+t.replace(o,"\\$&"),"i");let l,d;if(l=s.exec(u),n.requireMatchAll&&null===l)return u="",[];for(;l;){d=l.index;const t=r-c.slice(d,d+r).join("").length,o=d-c.slice(0,d).join("").length,i=[d+o,d+r+o+t];if(i[0]!==i[1]&&e.push(i),u=u.slice(0,d)+new Array(r+1).join(" ")+u.slice(d+r),!n.findAllOccurrences)break;l=s.exec(u)}return e}),[]).sort(((e,t)=>e[0]-t[0]))}},826:e=>{var t={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},n=Object.keys(t).join("|"),r=new RegExp(n,"g"),o=new RegExp(n,""),i=function(e){return e.replace(r,(function(e){return t[e]}))};e.exports=i,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=i}},t={},function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(772);var e,t})();var XD=F(QD.exports),YD=xo("div")((function(e){var t=e.theme;return{display:"flex",alignItems:"center",padding:t.spacing(2,2.5),borderRadius:1.5*Number(t.shape.borderRadius),backgroundColor:t.palette.grey[500],transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}}));function GD(e){var t,r,o,i,a=e.isCollapse,s=Yh().user;return U.jsx(n.Link,{underline:"none",color:"inherit",children:U.jsxs(YD,{sx:q({bgcolor:"#919eab1f"},a&&{bgcolor:"transparent"}),children:[U.jsx(n.Avatar,{src:null==s?void 0:s.photo,alt:(null!==(r=null!==(t=null==s?void 0:s.name)&&void 0!==t?t:null==s?void 0:s.email)&&void 0!==r?r:null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"}),U.jsxs(n.Box,{sx:q({ml:2,transition:function(e){return e.transitions.create("width",{duration:e.transitions.duration.shorter})}},a&&{ml:0,width:0}),children:[U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:null!==(o=null==s?void 0:s.name)&&void 0!==o?o:(null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"}),U.jsx(n.Typography,{variant:"body2",noWrap:!0,sx:{color:"text.secondary"},children:null!==(i=null==s?void 0:s.email)&&void 0!==i?i:null==s?void 0:s.username})]})]})})}function ZD(e){var t=e.onToggleCollapse,r=e.collapseClick;return U.jsx(wD,{onClick:t,children:U.jsx(n.Box,{sx:q({lineHeight:0,transition:function(e){return e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},r&&{transform:"rotate(180deg)"}),children:UD})})}var UD=U.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:U.jsxs("g",{fill:"none",fillRule:"evenodd",children:[U.jsx("path",{d:"M0 0h24v24H0z"}),U.jsxs("g",{fill:"currentColor",fillRule:"nonzero",children:[U.jsx("path",{d:"M14.3283 11.4343 18.5126 7.25c.4142-.4142.4142-1.0858 0-1.5-.4142-.4142-1.0858-.4142-1.5 0l-5.543 5.5429c-.3904.3905-.3904 1.0237 0 1.4142l5.543 5.5429c.4142.4142 1.0858.4142 1.5 0 .4142-.4142.4142-1.0858 0-1.5l-4.1843-4.1843a.8.8 0 0 1 0-1.1314Z",opacity:".48"}),U.jsx("path",{d:"M8.3283 11.4343 12.5126 7.25c.4142-.4142.4142-1.0858 0-1.5-.4142-.4142-1.0858-.4142-1.5 0l-5.543 5.5429c-.3904.3905-.3904 1.0237 0 1.4142l5.543 5.5429c.4142.4142 1.0858.4142 1.5 0 .4142-.4142.4142-1.0858 0-1.5l-4.1843-4.1843a.8.8 0 0 1 0-1.1314Z"})]})]})}),qD=xo(n.ListItemButton,{shouldForwardProp:function(e){return"activeRoot"!==e&&"activeSub"!==e&&"subItem"!==e}})((function(e){var t=e.activeRoot,n=e.activeSub,r=e.subItem,o=e.theme;return q(q(q(q(q({},o.typography.body2),{position:"relative",height:Og.DASHBOARD_ITEM_ROOT_HEIGHT,textTransform:"capitalize",paddingLeft:o.spacing(2),paddingRight:o.spacing(1.5),marginBottom:o.spacing(.5),color:o.palette.text.secondary,borderRadius:o.shape.borderRadius}),t&&q(q({},o.typography.subtitle2),{color:o.palette.primary.main,backgroundColor:Cr(o.palette.primary.main,o.palette.action.selectedOpacity)})),n&&q(q({},o.typography.subtitle2),{color:o.palette.text.primary})),r&&{height:Og.DASHBOARD_ITEM_SUB_HEIGHT})})),KD=xo(n.ListItemText,{shouldForwardProp:function(e){return"isCollapse"!==e}})((function(e){var t=e.isCollapse,n=e.theme;return q({whiteSpace:"nowrap",transition:n.transitions.create(["width","opacity"],{duration:n.transitions.duration.shorter})},t&&{width:0,opacity:0})})),JD=xo(n.ListItemIcon)({width:zg,height:zg,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%"}}),_D=xo(n.Button,{shouldForwardProp:function(e){return"activeRoot"!==e&&"activeSub"!==e&&"subItem"!==e&&"open"!==e}})((function(e){var t=e.activeRoot,n=e.activeSub,r=e.subItem,o=e.open,i=e.theme,a="light"===i.palette.mode,s={color:i.palette.grey[800],backgroundColor:i.palette.common.white,boxShadow:"-2px 4px 6px 0 ".concat(Cr(a?i.palette.grey[500]:i.palette.common.black,.16))};return q(q(q(q(q(q({},i.typography.body2),{margin:i.spacing(0,.5),padding:i.spacing(0,1),color:i.palette.text.secondary,height:Og.DASHBOARD_ITEM_HORIZONTAL_HEIGHT,"&:hover":{color:i.palette.text.primary,backgroundColor:i.palette.background.paper}}),t&&q(q(q({},i.typography.subtitle2),s),{"&:hover":q({},s)})),n&&q(q({},i.typography.subtitle2),{color:i.palette.text.primary})),r&&{width:"100%",margin:0,paddingRight:0,paddingLeft:i.spacing(1),justifyContent:"space-between"}),o&&!t&&{color:i.palette.text.primary,backgroundColor:i.palette.action.hover})})),$D=xo(n.Popover)((function(e){var t=e.theme;return{pointerEvents:"none","& .MuiPopover-paper":{width:160,pointerEvents:"auto",padding:t.spacing(1),borderRadius:1.5*Number(t.shape.borderRadius),boxShadow:t.customShadows.dropdown}}})),eP=e.forwardRef((function(e,t){var o=e.item,i=e.active,a=e.open,s=e.onMouseEnter,l=e.onMouseLeave,c=o.title,u=o.path,d=o.icon,p=o.children,f=o.disabled,m=o.roles;return p?U.jsx(_D,{ref:t,open:a,activeRoot:i,onMouseEnter:s,onMouseLeave:l,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p})}):aP(u)?U.jsx(_D,{component:n.Link,href:u,target:"_blank",rel:"noopener",disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p})}):U.jsx(_D,{component:r.NavLink,to:u,activeRoot:i,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p})})})),tP=e.forwardRef((function(e,t){var o=e.item,i=e.active,a=e.open,s=e.onMouseEnter,l=e.onMouseLeave,c=o.title,u=o.path,d=o.icon,p=o.children,f=o.disabled,m=o.roles;return p?U.jsx(_D,{ref:t,subItem:!0,disableRipple:!0,open:a,activeSub:i,onMouseEnter:s,onMouseLeave:l,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p,subItem:!0})}):aP(u)?U.jsx(_D,{subItem:!0,href:u,disableRipple:!0,rel:"noopener",target:"_blank",component:n.Link,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p,subItem:!0})}):U.jsx(_D,{disableRipple:!0,component:r.NavLink,to:u,activeSub:i,subItem:!0,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p,subItem:!0})})}));function nP(e){var t=e.icon,r=e.title,o=e.children,i=e.subItem;return U.jsxs(U.Fragment,{children:[t&&U.jsx(n.Box,{component:"span",sx:{mr:1,width:Tg,height:Tg,"& svg":{width:"100%",height:"100%"}},children:t}),r,o&&U.jsx(To,{icon:i?"eva:chevron-right-fill":"eva:chevron-down-fill",sx:{ml:.5,width:Tg,height:Tg}})]})}function rP(t){var n=t.list,o=e.useRef(null),i=r.useLocation().pathname,a=sP(n,i),s=e.useState(!1),l=s[0],c=s[1],u=n.children;e.useEffect((function(){l&&p()}),[i]);var d=function(){c(!0)},p=function(){c(!1)};return u?U.jsxs(U.Fragment,{children:[U.jsx(eP,{open:l,item:n,active:a,ref:o,onMouseEnter:d,onMouseLeave:p}),U.jsx($D,{open:l,anchorEl:o.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{onMouseEnter:d,onMouseLeave:p},children:(n.children||[]).map((function(e){return U.jsx(oP,{list:e},e.title+e.path)}))})]}):U.jsx(eP,{item:n,active:a})}function oP(t){var n=t.list,o=e.useRef(null),i=sP(n,r.useLocation().pathname),a=e.useState(!1),s=a[0],l=a[1],c=function(){l(!0)},u=function(){l(!1)};return n.children?U.jsxs(U.Fragment,{children:[U.jsx(tP,{ref:o,open:s,item:n,active:i,onMouseEnter:c,onMouseLeave:u}),U.jsx($D,{open:s,anchorEl:o.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{onMouseEnter:c,onMouseLeave:u},children:(n.children||[]).map((function(e){return U.jsx(oP,{list:e},e.title+e.path)}))})]}):U.jsx(tP,{item:n,active:i})}var iP={msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}};function aP(e){return e.includes("http")}function sP(e,t){var n;return e.path?!!r.matchPath({path:e.path,end:!1},t):!!e.children&&(null===(n=e.children)||void 0===n?void 0:n.some((function(e){return!!r.matchPath({path:e.path,end:!1},t)})))}function lP(e){var t=e.item,o=e.isCollapse,i=e.open,a=void 0!==i&&i,s=e.active,l=e.onOpen,c=t.title,u=t.path,d=t.icon,p=t.info,f=t.children,m=t.disabled,h=t.caption,g=t.roles,v=U.jsxs(U.Fragment,{children:[d&&U.jsx(JD,{children:d}),U.jsx(KD,{disableTypography:!0,primary:c,secondary:U.jsx(n.Tooltip,{title:h||"",arrow:!0,children:U.jsx(n.Typography,{noWrap:!0,variant:"caption",component:"div",sx:{textTransform:"initial",color:"text.secondary"},children:h})}),isCollapse:o}),!o&&U.jsxs(U.Fragment,{children:[p&&p,f&&U.jsx(dP,{open:a})]})]});return f?U.jsx(qD,{onClick:l,activeRoot:s,disabled:m,roles:g,children:v}):aP(u)?U.jsx(qD,{component:n.Link,href:u,target:"_blank",rel:"noopener",disabled:m,roles:g,children:v}):U.jsx(qD,{component:r.NavLink,to:u,activeRoot:s,disabled:m,roles:g,children:v})}function cP(e){var t=e.item,o=e.open,i=void 0!==o&&o,a=e.active,s=void 0!==a&&a,l=e.onOpen,c=t.title,u=t.path,d=t.info,p=t.children,f=t.disabled,m=t.caption,h=t.roles,g=U.jsxs(U.Fragment,{children:[U.jsx(uP,{active:s}),U.jsx(n.ListItemText,{disableTypography:!0,primary:c,secondary:U.jsx(n.Tooltip,{title:m||"",arrow:!0,children:U.jsx(n.Typography,{noWrap:!0,variant:"caption",component:"div",sx:{textTransform:"initial",color:"text.secondary"},children:m})})}),d&&d,p&&U.jsx(dP,{open:i})]});return p?U.jsx(qD,{onClick:l,activeSub:s,subItem:!0,disabled:f,roles:h,children:g}):aP(u)?U.jsx(qD,{component:n.Link,href:u,target:"_blank",rel:"noopener",subItem:!0,disabled:f,roles:h,children:g}):U.jsx(qD,{component:r.NavLink,to:u,activeSub:s,subItem:!0,disabled:f,roles:h,children:g})}function uP(e){var t=e.active;return U.jsx(JD,{children:U.jsx(n.Box,{component:"span",sx:q({width:4,height:4,borderRadius:"50%",bgcolor:"text.disabled",transition:function(e){return e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},t&&{transform:"scale(2)",bgcolor:"primary.main"})})})}function dP(e){var t=e.open;return U.jsx(To,{icon:t?"eva:arrow-ios-downward-fill":"eva:arrow-ios-forward-fill",sx:{width:16,height:16,ml:1}})}function pP(t){var o=t.list,i=t.isCollapse,a=sP(o,r.useLocation().pathname),s=e.useState(a),l=s[0],c=s[1];return o.children?U.jsxs(U.Fragment,{children:[U.jsx(lP,{item:o,isCollapse:i,active:a,open:l,onOpen:function(){return c(!l)}}),!i&&U.jsx(n.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:U.jsx(n.List,{component:"div",disablePadding:!0,children:(o.children||[]).map((function(e){return U.jsx(fP,{list:e},e.title+e.path)}))})})]}):U.jsx(lP,{item:o,active:a,isCollapse:i})}function fP(t){var o=t.list,i=r.useLocation().pathname,a=sP(o,i),s=e.useState(a),l=s[0],c=s[1];return o.children?U.jsxs(U.Fragment,{children:[U.jsx(cP,{item:o,onOpen:function(){return c(!l)},open:l,active:a}),U.jsx(n.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:U.jsx(n.List,{component:"div",disablePadding:!0,sx:{pl:3},children:(o.children||[]).map((function(e){return U.jsx(cP,{item:e,active:sP(e,i)},e.title+e.path)}))})})]}):U.jsx(cP,{item:o,active:a})}e.memo((function(e){var t=e.navConfig;return U.jsx(n.Stack,{direction:"row",justifyContent:"center",sx:{bgcolor:"background.neutral",borderRadius:1,px:.5},children:U.jsx(n.Stack,{direction:"row",sx:q(q({},iP),{py:1}),children:t.map((function(e){return U.jsx(n.Stack,{direction:"row",flexShrink:0,children:e.items.map((function(e){return U.jsx(rP,{list:e},e.title+e.path)}))},e.subheader)}))})})}));var mP=xo((function(e){return U.jsx(n.ListSubheader,q({disableSticky:!0,disableGutters:!0},e))}))((function(e){var t=e.theme;return q(q({},t.typography.overline),{paddingTop:t.spacing(3),paddingLeft:t.spacing(2),paddingBottom:t.spacing(1),color:t.palette.text.primary,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})})}));function hP(e){var t=e.navConfig,r=e.isCollapse,o=void 0!==r&&r,i=K(e,["navConfig","isCollapse"]);return U.jsx(n.Box,q({},i,{children:t.map((function(e){return U.jsxs(n.List,{disablePadding:!0,sx:{px:2},children:[U.jsx(mP,{sx:q({},o&&{opacity:0}),children:e.subheader}),e.items.map((function(e){return U.jsx(pP,{list:e,isCollapse:o},e.title+e.path)}))]},e.subheader)}))}))}var gP,vP=xo("div")((function(e){var t,n=e.theme;return(t={})[n.breakpoints.up("lg")]={flexShrink:0,transition:n.transitions.create("width",{duration:n.transitions.duration.shorter})},t}));function AP(t){var o=t.isOpenSidebar,i=t.onCloseSidebar,a=vo(),s=r.useLocation().pathname,l=os("up","lg"),c=Wg(),u=c.isCollapse,d=c.collapseClick,p=c.collapseHover,f=c.onToggleCollapse,m=c.onHoverEnter,h=c.onHoverLeave;e.useEffect((function(){o&&i()}),[s]),gP=$h();var g=U.jsxs(mv,{sx:{height:1,"& .simplebar-content":{height:1,display:"flex",flexDirection:"column"}},children:[U.jsxs(n.Stack,{spacing:3,sx:q({pt:3,pb:2,px:2.5,flexShrink:0},u&&{alignItems:"center"}),children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[U.jsx(zD,{}),l&&!u&&U.jsx(ZD,{onToggleCollapse:f,collapseClick:d})]}),U.jsx(GD,{isCollapse:u})]}),U.jsx(hP,{navConfig:gP,isCollapse:u}),U.jsx(n.Box,{sx:{flexGrow:1}})]});return U.jsxs(vP,{sx:q({width:{lg:u?Og.DASHBOARD_COLLAPSE_WIDTH:Og.DASHBOARD_WIDTH}},d&&{position:"absolute"}),children:[!l&&U.jsx(n.Drawer,{open:o,onClose:i,PaperProps:{sx:{width:Og.DASHBOARD_WIDTH}},children:g}),l&&U.jsx(n.Drawer,{open:!0,variant:"persistent",onMouseEnter:m,onMouseLeave:h,PaperProps:{sx:q(q({width:Og.DASHBOARD_WIDTH,borderRightStyle:"dashed",bgcolor:"background.default",transition:function(e){return e.transitions.create("width",{duration:e.transitions.duration.standard})}},u&&{width:Og.DASHBOARD_COLLAPSE_WIDTH}),p&&q(q({},lu(a).bgBlur()),{boxShadow:function(e){return e.customShadows.z24}}))},children:g})]})}function yP(e,t){void 0===t&&(t="children");var n=[],r=null==e?void 0:e.map((function(e){return e[t]&&e[t].length&&(n=$($([],n,!0),e[t],!0)),e}));return null==r?void 0:r.concat(n.length?yP(n,t):n)}function bP(e){var t=e.searchQuery,r=void 0===t?"":t,o=K(e,["searchQuery"]),i=Vg().translate;return r?U.jsxs(n.Paper,q({},o,{children:[U.jsx(n.Typography,{gutterBottom:!0,align:"center",variant:"subtitle1",children:i("general.noResults")}),U.jsxs(n.Typography,{variant:"body2",align:"center",children:[i("general.noResultsFound"),"  ",U.jsxs("strong",{children:['"',r,'"']}),". ",i("general.tryCheckingTypos")]})]})):U.jsx(n.Typography,{variant:"body2",children:" Please enter keywords"})}var xP=xo("div")((function(e){var t,n=e.theme;return q(q({},lu(n).bgBlur()),((t={top:0,left:0,zIndex:99,width:"100%",display:"flex",position:"absolute",alignItems:"center",height:64,padding:n.spacing(0,3),boxShadow:n.customShadows.z8})[n.breakpoints.up("md")]={height:92,padding:n.spacing(0,5)},t))})),wP={width:1,height:1,"& .MuiFormControl-root, .MuiOutlinedInput-root, .MuiAutocomplete-input":{height:1,p:"0 !important",fontWeight:"fontWeightBold","& fieldset":{display:"none"}}},jP=xo((function(e){return U.jsx(n.Popper,q({},e))}))((function(e){var t,n=e.theme;return(t={left:"8px !important",top:"".concat(72,"px !important"),width:"calc(100% - 16px) !important",transform:"none !important"})[n.breakpoints.up("md")]={top:"".concat(100,"px !important")},t["& .MuiAutocomplete-paper"]={padding:n.spacing(1,0)},t["& .MuiListSubheader-root"]={"&.MuiAutocomplete-groupLabel":q(q(q({},lu(n).bgBlur({color:n.palette.background.neutral})),n.typography.overline),{top:0,margin:0,lineHeight:"48px",borderRadius:n.shape.borderRadius})},t["& .MuiAutocomplete-listbox"]={"& .MuiAutocomplete-option":{padding:n.spacing(.5,2),margin:0,display:"block",border:"dashed 1px transparent",borderBottom:"dashed 1px ".concat(n.palette.divider),"&:hover":{border:"dashed 1px ".concat(n.palette.primary.main),backgroundColor:Cr(n.palette.primary.main,n.palette.action.hoverOpacity)}}},t}));var CP=e.memo((function(){var t=r.useNavigate(),o=r.useLocation().pathname,i=e.useState(!1),a=i[0],s=i[1],l=e.useState(""),c=l[0],u=l[1],d=gP&&0!==gP.length?gP.map((function(e){return MP(e.items,e.subheader)})).flat():[],p=yP(d).map((function(e){if(e.path){var t=function(e,t){var n,r=e.map((function(e){return{path:[e.title],currItem:e}})),o=function(){var e=r.pop(),o=e.path,i=e.currItem;if(i.path===t)return{value:o};(null===(n=i.children)||void 0===n?void 0:n.length)&&(r=r.concat(i.children.map((function(e){return{path:o.concat(e.title),currItem:e}}))))};for(;r.length;){var i=o();if("object"==typeof i)return i.value}return null}(d,e.path);return{group:t&&t.length>1?t[0]:e.subheader,title:e.title,path:e.path}}return{group:"",title:"",path:""}}));e.useEffect((function(){a&&s(!1)}),[o]);var f=function(e){e.includes("http")?window.open(e):t(e),s(!1)},m=function(e){"Enter"===e.key&&f(c)};return U.jsx(n.ClickAwayListener,{onClickAway:function(){return s(!1)},children:U.jsxs("div",{children:[!a&&U.jsx(wD,{onClick:function(){return s((function(e){return!e}))},children:U.jsx(To,{icon:"eva:search-fill",width:20,height:20})}),U.jsx(n.Slide,{direction:"down",in:a,mountOnEnter:!0,unmountOnExit:!0,children:U.jsx(xP,{children:U.jsx(jm,{sx:wP,autoHighlight:!0,disablePortal:!0,disableClearable:!0,popupIcon:null,PopperComponent:jP,onInputChange:function(e,t){return u(t)},noOptionsText:U.jsx(bP,{searchQuery:c}),options:p.sort((function(e,t){return-t.group.localeCompare(e.group)})),groupBy:function(e){return e.group},getOptionLabel:function(e){return e.path},isOptionEqualToValue:function(e,t){return e.path===t.path},filterOptions:sc({matchFrom:"start",stringify:function(e){return e.title||e.path}}),renderOption:function(e,t,r){var o=r.inputValue,i=t.title,a=t.path,s=Gm(i,XD(i,o)),l=Gm(a,XD(a,o));return U.jsxs(n.Box,q({component:"li"},e,{onClick:function(){return f(a)},children:[U.jsx("div",{children:s.map((function(e,t){return U.jsx(n.Box,{component:"span",sx:{typography:"subtitle2",textTransform:"capitalize",color:e.highlight?"primary.main":"text,primary"},children:e.text},t)}))}),U.jsx("div",{children:l.map((function(e,t){return U.jsx(n.Box,{component:"span",sx:{typography:"caption",color:e.highlight?"primary.main":"text.secondary"},children:e.text},t)}))})]}))},renderInput:function(e){return U.jsx(n.TextField,q({},e,{InputLabelProps:void 0,autoFocus:!0,placeholder:"Search...",onKeyUp:m,InputProps:q(q({},e.InputProps),{startAdornment:U.jsx(n.InputAdornment,{position:"start",children:U.jsx(To,{icon:"eva:search-fill",sx:{color:"text.disabled",width:20,height:20}})})})}))}})})})]})})}));function MP(e,t){return null==e?void 0:e.map((function(e){return q(q({subheader:t},e),e.children&&{children:MP(e.children,t)})}))}function OP(){var t=Vg(),r=t.allLangs,o=t.currentLang,i=t.onChangeLang,a=e.useContext(Kh).getResources,s=Rg().getNotifications,l=e.useState(null),c=l[0],u=l[1],d=function(){u(null)};return U.jsxs(U.Fragment,{children:[U.jsx(wD,{onClick:function(e){u(e.currentTarget)},sx:q({width:50,height:50},c&&{bgcolor:"action.selected"}),children:U.jsx(yu,{disabledEffect:!0,src:o.icon,alt:o.label,sx:{width:28}})}),U.jsx(ND,{open:c,anchorEl:c,onClose:d,sx:{mt:1.5,ml:.75,width:180,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75}},children:U.jsx(n.Stack,{spacing:.75,children:r.map((function(e){return U.jsxs(n.MenuItem,{selected:e.value===o.value,onClick:function(){var t;t=e.value,i(t),d(),a(),s()},children:[U.jsx(yu,{disabledEffect:!0,alt:e.label,src:e.icon,sx:{width:28,mr:2}}),e.label]},e.value)}))})})]})}var zP=xo(n.AppBar,{shouldForwardProp:function(e){return"isCollapse"!==e&&"isOffset"!==e&&"verticalLayout"!==e}})((function(e){var t,n=e.isCollapse,r=e.isOffset,o=e.verticalLayout,i=e.theme;return q(q({},lu(i).bgBlur()),((t={boxShadow:"none",height:Mg.MOBILE_HEIGHT,zIndex:i.zIndex.appBar+1,transition:i.transitions.create(["width","height"],{duration:i.transitions.duration.shorter})})[i.breakpoints.up("lg")]=q(q(q({height:Mg.DASHBOARD_DESKTOP_HEIGHT,width:"calc(100% - ".concat(Og.DASHBOARD_WIDTH+1,"px)")},n&&{width:"calc(100% - ".concat(Og.DASHBOARD_COLLAPSE_WIDTH,"px)")}),r&&{height:Mg.DASHBOARD_DESKTOP_OFFSET_HEIGHT}),o&&{width:"100%",height:Mg.DASHBOARD_DESKTOP_OFFSET_HEIGHT,backgroundColor:"#E2ADAD"}),t))}));function TP(t){var r,o,i=t.onOpenSidebar,a=t.isCollapse,s=void 0!==a&&a,l=t.verticalLayout,c=void 0!==l&&l,u=function(t,n){void 0===t&&(t=0);var r=p.useScroll(n).scrollY,o=e.useState(!1),i=o[0],a=o[1],s=e.useCallback((function(){r.on("change",(function(e){a(e>t)}))}),[r,t]);return e.useEffect((function(){s()}),[s]),e.useMemo((function(){return i}),[i])}(Mg.DASHBOARD_DESKTOP_HEIGHT)&&!c,d=kg().resources,f=os("up","lg"),m=null===(r=null==d?void 0:d.appConfigurations)||void 0===r?void 0:r.adminNotifications,h=null===(o=null==d?void 0:d.appConfigurations)||void 0===o?void 0:o.enableLocalization;return U.jsx(zP,{isCollapse:s,isOffset:u,verticalLayout:c,children:U.jsxs(n.Toolbar,{sx:{minHeight:"100% !important",px:{lg:5}},children:[f&&c&&U.jsx(zD,{sx:{mr:2.5}}),!f&&U.jsx(wD,{onClick:i,sx:{mr:1,color:"text.primary"},children:U.jsx(To,{icon:"eva:menu-2-fill"})}),d&&U.jsx(CP,{}),U.jsx(n.Box,{sx:{flexGrow:1}}),U.jsxs(n.Stack,{flexGrow:1,direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:{xs:.5,sm:1.5},children:[h&&U.jsx(OP,{}),m&&U.jsx(VD,{}),U.jsx(ED,{})]})]})})}var DP=xo("main",{shouldForwardProp:function(e){return"collapseClick"!==e}})((function(e){var t,n=e.collapseClick,r=e.theme;return(t={flexGrow:1,paddingTop:Mg.MOBILE_HEIGHT+24,paddingBottom:Mg.MOBILE_HEIGHT+24})[r.breakpoints.up("lg")]=q({paddingLeft:16,paddingRight:16,paddingTop:Mg.DASHBOARD_DESKTOP_HEIGHT+24,paddingBottom:Mg.DASHBOARD_DESKTOP_HEIGHT+24,width:"calc(100% - ".concat(Og.DASHBOARD_WIDTH,"px)"),transition:r.transitions.create("margin-left",{duration:r.transitions.duration.shorter})},n&&{marginLeft:Og.DASHBOARD_COLLAPSE_WIDTH}),t}));function PP(){var t=Wg(),o=t.collapseClick,i=t.isCollapse,a=kg().resources,s=e.useState(!1),l=s[0],c=s[1];return a?U.jsxs(n.Box,{sx:{display:{lg:"flex"},minHeight:{lg:1}},children:[U.jsx(TP,{isCollapse:i,onOpenSidebar:function(){return c(!0)}}),U.jsx(AP,{isOpenSidebar:l,onCloseSidebar:function(){return c(!1)}}),U.jsx(DP,{collapseClick:o,children:U.jsx(r.Outlet,{})})]}):U.jsx(qh,{})}function NP(t){var n=t.children,r=vo();e.useEffect((function(){document.dir=r.direction}),[r.direction]);var o=N({key:"rtl"===r.direction?"rtl":"css",stylisPlugins:"rtl"===r.direction?[E]:[]});return U.jsx(s.CacheProvider,{value:o,children:n})}function EP(e){var t=e.children,n=ho(vo(),Vg().currentLang.systemValue);return U.jsx(jo,{theme:n,children:t})}function BP(e){return Rt("MuiCard",e)}Wt("MuiCard",["root"]);const kP=["className","raised"],LP=xo($i,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),IP=S.forwardRef((function(e,t){const n=Ao({props:e,name:"MuiCard"}),{className:r,raised:o=!1}=n,i=Yt(n,kP),a=ae({},n,{raised:o}),s=(e=>{const{classes:t}=e;return Lt({root:["root"]},BP,t)})(a);return U.jsx(LP,ae({className:or(s.root,r),elevation:o?8:void 0,ref:t,ownerState:a},i))}));"production"!==process.env.NODE_ENV&&(IP.propTypes={children:Le.node,classes:Le.object,className:Le.string,raised:ie(Le.bool,(e=>e.raised&&"outlined"===e.variant?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null)),sx:Le.oneOfType([Le.arrayOf(Le.oneOfType([Le.func,Le.object,Le.bool])),Le.func,Le.object])});var SP=IP;function HP(e){return Rt("MuiCardHeader",e)}var RP=Wt("MuiCardHeader",["root","avatar","action","content","title","subheader"]);const WP=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],FP=xo("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>ae({[`& .${RP.title}`]:t.title,[`& .${RP.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),VP=xo("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),QP=xo("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),XP=xo("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),YP=S.forwardRef((function(e,t){const n=Ao({props:e,name:"MuiCardHeader"}),{action:r,avatar:o,className:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:d}=n,p=Yt(n,WP),f=ae({},n,{component:a,disableTypography:s}),m=(e=>{const{classes:t}=e;return Lt({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},HP,t)})(f);let h=u;null==h||h.type===Xm||s||(h=U.jsx(Xm,ae({variant:o?"body2":"h5",className:m.title,component:"span",display:"block"},d,{children:h})));let g=l;return null==g||g.type===Xm||s||(g=U.jsx(Xm,ae({variant:o?"body2":"body1",className:m.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),U.jsxs(FP,ae({className:or(m.root,i),as:a,ref:t,ownerState:f},p,{children:[o&&U.jsx(VP,{className:m.avatar,ownerState:f,children:o}),U.jsxs(XP,{className:m.content,ownerState:f,children:[h,g]}),r&&U.jsx(QP,{className:m.action,ownerState:f,children:r})]}))}));"production"!==process.env.NODE_ENV&&(YP.propTypes={action:Le.node,avatar:Le.node,children:Le.node,classes:Le.object,className:Le.string,component:Le.elementType,disableTypography:Le.bool,subheader:Le.node,subheaderTypographyProps:Le.object,sx:Le.oneOfType([Le.arrayOf(Le.oneOfType([Le.func,Le.object,Le.bool])),Le.func,Le.object]),title:Le.node,titleTypographyProps:Le.object});var GP=YP;function ZP(e){return Rt("PrivateSwitchBase",e)}Wt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const UP=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],qP=xo(eu)((({ownerState:e})=>ae({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),KP=xo("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),JP=S.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:m,onBlur:h,onChange:g,onFocus:v,readOnly:A,required:y=!1,tabIndex:b,type:x,value:w}=e,j=Yt(e,UP),[C,M]=pt({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),O=ud();let z=s;O&&void 0===z&&(z=O.disabled);const T="checkbox"===x||"radio"===x,D=ae({},e,{checked:C,disabled:z,disableFocusRipple:l,edge:c}),P=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Lt({root:["root",n&&"checked",r&&"disabled",o&&`edge${$e(o)}`],input:["input"]},ZP,t)})(D);return U.jsxs(qP,ae({component:"span",className:or(P.root,i),centerRipple:!0,focusRipple:!l,disabled:z,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),O&&O.onFocus&&O.onFocus(e)},onBlur:e=>{h&&h(e),O&&O.onBlur&&O.onBlur(e)},ownerState:D,ref:t},j,{children:[U.jsx(KP,ae({autoFocus:n,checked:r,defaultChecked:a,className:P.input,disabled:z,id:T?d:void 0,name:m,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;M(t),g&&g(e,t)},readOnly:A,ref:f,required:y,ownerState:D,tabIndex:b,type:x},"checkbox"===x&&void 0===w?{}:{value:w},p)),C?o:u]}))}));"production"!==process.env.NODE_ENV&&(JP.propTypes={autoFocus:Le.bool,checked:Le.bool,checkedIcon:Le.node.isRequired,classes:Le.object,className:Le.string,defaultChecked:Le.bool,disabled:Le.bool,disableFocusRipple:Le.bool,edge:Le.oneOf(["end","start",!1]),icon:Le.node.isRequired,id:Le.string,inputProps:Le.object,inputRef:_e,name:Le.string,onBlur:Le.func,onChange:Le.func,onFocus:Le.func,readOnly:Le.bool,required:Le.bool,sx:Le.object,tabIndex:Le.oneOfType([Le.number,Le.string]),type:Le.string.isRequired,value:Le.any});var _P=JP,$P=Fi(U.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),eN=Fi(U.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),tN=Fi(U.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function nN(e){return Rt("MuiCheckbox",e)}var rN=Wt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);const oN=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],iN=xo(_P,{shouldForwardProp:e=>yo(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${$e(n.color)}`]]}})((({theme:e,ownerState:t})=>ae({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Cr("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${rN.checked}, &.${rN.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${rN.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),aN=U.jsx(eN,{}),sN=U.jsx($P,{}),lN=U.jsx(tN,{}),cN=S.forwardRef((function(e,t){var n,r;const o=Ao({props:e,name:"MuiCheckbox"}),{checkedIcon:i=aN,color:a="primary",icon:s=sN,indeterminate:l=!1,indeterminateIcon:c=lN,inputProps:u,size:d="medium",className:p}=o,f=Yt(o,oN),m=l?c:s,h=l?c:i,g=ae({},o,{color:a,indeterminate:l,size:d}),v=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e;return ae({},t,Lt({root:["root",n&&"indeterminate",`color${$e(r)}`,`size${$e(o)}`]},nN,t))})(g);return U.jsx(iN,ae({type:"checkbox",inputProps:ae({"data-indeterminate":l},u),icon:S.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:d}),checkedIcon:S.cloneElement(h,{fontSize:null!=(r=h.props.fontSize)?r:d}),ownerState:g,ref:t,className:or(v.root,p)},f,{classes:v}))}));"production"!==process.env.NODE_ENV&&(cN.propTypes={checked:Le.bool,checkedIcon:Le.node,classes:Le.object,className:Le.string,color:Le.oneOfType([Le.oneOf(["default","primary","secondary","error","info","success","warning"]),Le.string]),defaultChecked:Le.bool,disabled:Le.bool,disableRipple:Le.bool,icon:Le.node,id:Le.string,indeterminate:Le.bool,indeterminateIcon:Le.node,inputProps:Le.object,inputRef:_e,onChange:Le.func,required:Le.bool,size:Le.oneOfType([Le.oneOf(["medium","small"]),Le.string]),sx:Le.oneOfType([Le.arrayOf(Le.oneOfType([Le.func,Le.object,Le.bool])),Le.func,Le.object]),value:Le.any});var uN=cN,dN={},pN=xa;Object.defineProperty(dN,"__esModule",{value:!0});var fN=dN.default=void 0,mN=pN(Ca()),hN=U,gN=(0,mN.default)((0,hN.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"StorageOutlined");fN=dN.default=gN,exports.PermissionDefaultKeys=void 0,function(e){e.VIEW="view",e.CREATE="create",e.EDIT="edit",e.DELETE="delete"}(exports.PermissionDefaultKeys||(exports.PermissionDefaultKeys={})),B.use(k).use(L).use(w.initReactI18next).init({fallbackLng:"en",debug:!0}),exports.i18ninit=B,exports.ActionDialog=oT,exports.ApiContext=Ih,exports.ApiContextProvider=function(t){var n=e.useState({statusCode:null,dashbaordUrlPrefix:t.dashbaordUrlPrefix}),r=n[0],o=n[1],i=t.language,a=t.onLogout,s=t.baseUrl,l=t.sleepTime,c=t.dashbaordUrlPrefix;Bh.defaults.baseURL=s;var u=Ig().setErrorAlert;return Bh.interceptors.request.use((function(e){return e.headers=q(q({},e.headers),{Accept:"application/json","Content-Type":"application/json","accept-language":i,language:i}),e.withCredentials=!0,e._auth=!1!==e._auth,e}),(function(e){Promise.reject(e.request.response)})),Bh.interceptors.response.use((function(e){return J(void 0,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return l?[4,(n=l,new Promise((function(e){return setTimeout(e,n)})))]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,e]}var n}))}))}),(function(e){var t,n,r,i,s;return J(this,void 0,void 0,(function(){var l;return _(this,(function(d){return l=e.config,A.isAxiosError(e)&&401===(null===(t=e.response)||void 0===t?void 0:t.status)&&l._auth?(o({statusCode:401,dashbaordUrlPrefix:c}),a()):o({statusCode:401,dashbaordUrlPrefix:c}),403===(null===(r=null===(n=function(e){try{return JSON.parse(e)}catch(e){return null}}(e))||void 0===n?void 0:n.meta)||void 0===r?void 0:r.status)&&u(JSON.parse(e).meta.message),[2,Promise.reject(null!==(s=null===(i=e.request)||void 0===i?void 0:i.response)&&void 0!==s?s:e)]}))}))})),U.jsx(Ih.Provider,{value:r,children:t.children})},exports.AppConfigurationsContext=ug,exports.AppConfigurationsContextProvider=function(t){var n,r,o,i,a,s,l,c,u,d,p,f,m,h,g,v,A,y,b,x,w,j,C,M,O,z,T,D,P,N,E,B,k,L=e.useContext(Kh).resources,I=null==L?void 0:L.appConfigurations,S=e.useState(null!==(n=null==I?void 0:I.themeLayout)&&void 0!==n?n:"vertical"),H=S[0],R=S[1],W={loadingLoago:null!==(o=null!==(r=t.loadingLoago)&&void 0!==r?r:t.loadingLoago)&&void 0!==o?o:"",navBarLogo:null!==(a=null!==(i=t.navBarLogo)&&void 0!==i?i:t.navBarLogo)&&void 0!==a?a:"",miniNavBarLogo:null!==(l=null!==(s=t.miniNavBarLogo)&&void 0!==s?s:t.miniNavBarLogo)&&void 0!==l?l:"",loginWeclomeImage:null!==(u=null!==(c=t.loginWeclomeImage)&&void 0!==c?c:t.loginWeclomeImage)&&void 0!==u?u:"",loginLogo:null!==(p=null!==(d=t.loginLogo)&&void 0!==d?d:t.loginLogo)&&void 0!==p?p:"",loginLoginMessage:null!==(m=null!==(f=t.loginLoginMessage)&&void 0!==f?f:t.loginLoginMessage)&&void 0!==m?m:"Login to your dashboard Dashboard",textFieldSize:null!==(g=null!==(h=null==I?void 0:I.textFieldSize)&&void 0!==h?h:t.textFieldSize)&&void 0!==g?g:"small",defaultRowsPerPage:null!==(A=null!==(v=null==I?void 0:I.defaultRowsPerPage)&&void 0!==v?v:t.defaultRowsPerPage)&&void 0!==A?A:50,themeStretch:null===(b=null!==(y=null==I?void 0:I.themeStretch)&&void 0!==y?y:t.themeStretch)||void 0===b||b,palette:null!==(w=null!==(x=null==I?void 0:I.palette)&&void 0!==x?x:t.palette)&&void 0!==w?w:cg.dark,loadingLogoSxProps:null!==(C=null!==(j=null==I?void 0:I.loadingLogoSxProps)&&void 0!==j?j:t.loadingLogoSxProps)&&void 0!==C?C:{},loginWelcomeImageSxProps:null!==(O=null!==(M=null==I?void 0:I.loginWelcomeImageSxProps)&&void 0!==M?M:t.loginWelcomeImageSxProps)&&void 0!==O?O:{},navBarLogoSxProps:null!==(T=null!==(z=null==I?void 0:I.navBarLogoSxProps)&&void 0!==z?z:t.navBarLogoSxProps)&&void 0!==T?T:{},miniNavBarLogoSxProps:null!==(P=null!==(D=null==I?void 0:I.miniNavBarLogoSxProps)&&void 0!==D?D:t.miniNavBarLogoSxProps)&&void 0!==P?P:{},loginLogoSxProps:null!==(E=null!==(N=null==I?void 0:I.loginLogoSxProps)&&void 0!==N?N:t.loginLogoSxProps)&&void 0!==E?E:{},loginMessageSxProps:null!==(k=null!==(B=null==I?void 0:I.loginMessageSxProps)&&void 0!==B?B:t.loginMessageSxProps)&&void 0!==k?k:{}};return U.jsx(ug.Provider,{value:q({themeLayout:H,setThemeLayout:R},W),children:t.children})},exports.AuthContextProvider=function(t){var n=t.children,r=t.storageKey,o=e.useReducer(Vh,{user:Qh(r),isAuthenticated:!!Qh(r)}),i=o[0],a=o[1];return U.jsx(Xh.Provider,{value:q(q({},i),{login:function(e){!function(e,t){var n=JSON.stringify(e);localStorage.setItem(t,n)}(e,r),a({type:Sh.LOGIN,payload:e})},logout:function(){var e;e=r,localStorage.removeItem(e),a({type:Sh.LOGOUT})}}),children:n})},exports.AuthReducer=Vh,exports.CollapseDrawerContext=hg,exports.CollapseDrawerProvider=function(t){var n=t.children,r=os("up","lg"),o=e.useState({click:!1,hover:!1}),i=o[0],a=o[1];return e.useEffect((function(){r||a({click:!1,hover:!1})}),[r]),U.jsx(hg.Provider,{value:{isCollapse:i.click&&!i.hover,collapseClick:i.click,collapseHover:i.hover,onToggleCollapse:function(){a(q(q({},i),{click:!i.click}))},onHoverEnter:function(){i.click&&a(q(q({},i),{hover:!0}))},onHoverLeave:function(){a(q(q({},i),{hover:!1}))}},children:n})},exports.CredentialsContext=dg,exports.CredentialsContextProvider=function(e){var t=e.identityPoolId,n=e.region,r=e.userPoolId,o=e.userPoolWebClientId,i=e.bucket,a=e.googleApiKey,s=e.bucketUrl;return y.Auth.configure({Auth:{identityPoolId:t,region:n,userPoolId:r,userPoolWebClientId:o}}),y.Storage.configure({region:n,bucket:i}),U.jsx(dg.Provider,{value:{identityPoolId:t,region:n,userPoolId:r,userPoolWebClientId:o,bucket:i,googleApiKey:a,bucketUrl:s},children:e.children})},exports.DashboardLayout=PP,exports.DialogContext=fg,exports.DialogContextProvider=function(t){var n=t.children,r=e.useState(!1),o=r[0],i=r[1],a=e.useState(void 0),s=a[0],l=a[1],c=function(){i(!1)};return U.jsxs(fg.Provider,{value:{openDialog:function(e,t){i(!0),l(U.jsx(e,{open:!0,onDismiss:c,data:t}))}},children:[o&&s,n]})},exports.FormProvider=Su,exports.IdenityModelConfiguration=function(t){var n=t.path,r=t.modelRoute,o=e.useContext(Ih).dashbaordUrlPrefix;return U.jsx(Az,{path:n,isEdit:!0,Component:function(e){return U.jsx(YT,q({},e,{baseApiRoute:o,apiRoute:"".concat(o,"/").concat(r),path:n}))},modelRoute:r})},exports.Identity404=nD,exports.IdentityClient=Bh,exports.IdentityDumpServiceAction=function(t){var r,o=t.baseUrl,i=t.buttonText,a=void 0===i?"Restore Database":i,s=e.useState(!1),c=s[0],u=s[1],d=e.useState([]),p=d[0],f=d[1],m=e.useState([]),h=m[0],g=m[1],v=e.useState([]),A=v[0],y=v[1],b=Ig(),x=b.setSuccessAlert,w=b.setErrorAlert,j=e.useState(!1),C=j[0],M=j[1],O=n.useTheme(),z=function(e){return function(){var t=p.indexOf(e),n=$([],p,!0);-1===t?n.push(e):n.splice(t,1),f(n)}},T=function(e){return(t=p,n=e,t.filter((function(e){return n.includes(e)}))).length;var t,n};return U.jsxs(n.Box,{sx:{position:"relative"},children:[U.jsx(l.LoadingButton,{onClick:function(){M(!0),fetch("".concat(o,"/identity/services/models"),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}}).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(e){var t=e.data.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}));M(!1),f(t),g(t),y(t),u(!0)})).catch((function(e){console.error("There was a problem with the fetch operation:",e)}))},startIcon:U.jsx(fN,{}),loading:C,variant:"outlined",children:a}),U.jsx(n.Dialog,{open:c,onClose:function(){return u(!1)},maxWidth:"md",fullWidth:!0,children:U.jsx(Lm,{container:!0,sx:{justifyContent:"center",alignItems:"center",width:"100%",position:"relative"},children:U.jsx(Lm,{item:!0,xs:12,children:U.jsxs(SP,{sx:{width:"100%",position:"relative",overflow:"visible",display:"flex",flexDirection:"column"},children:[U.jsx(GP,{sx:{px:2,py:1,position:"sticky",top:"0px",zIndex:1e3,background:"white",borderColor:"rgba(145, 158, 171, 0.24)",borderBottomWidth:"thin",borderStyle:"solid"},title:U.jsxs(n.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,children:[U.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",version:"1.1",width:"21",height:"24",viewBox:"0 0 21 24",children:[U.jsx("defs",{children:U.jsx("clipPath",{id:"master_svg0_2_166",children:U.jsx("rect",{x:"0",y:"0",width:"21",height:"24",rx:"0"})})}),U.jsx("g",{"clip-path":"url(#master_svg0_2_166)",children:U.jsx("g",{transform:"matrix(1,0,0,-1,0,49.03125)",children:U.jsx("g",{children:U.jsx("path",{d:"M21,44.765625L21,42.515625L21,44.765625L21,42.515625Q20.9062,40.921825,17.9062,39.843725Q14.9531,38.812525,10.5,38.765625Q6.04688,38.812525,3.09375,39.843725Q0.09375,40.921825,0,42.515625L0,44.765625Q0.09375,46.359425,3.09375,47.437525Q6.04688,48.468725,10.5,48.515625Q14.9531,48.468725,17.9062,47.437525Q20.9062,46.359425,21,44.765625ZM18.4219,38.437525Q19.9219,38.953125,21,39.796825L21,35.015625Q20.9062,33.421875,17.9062,32.343745Q14.9531,31.312505,10.5,31.265625Q6.04688,31.312505,3.09375,32.343745Q0.09375,33.421875,0,35.015625L0,39.796825Q1.07812,38.953125,2.57812,38.437525Q5.85938,37.312525,10.5,37.265625Q15.1406,37.312525,18.4219,38.437525ZM0,32.296875Q1.07812,31.453125,2.57812,30.937505Q5.85938,29.812505,10.5,29.765625Q15.1406,29.812505,18.4219,30.937505Q19.9219,31.453125,21,32.296875L21,28.265625Q20.9062,26.671875,17.9062,25.593745Q14.9531,24.5625,10.5,24.515625Q6.04688,24.5625,3.09375,25.593745Q0.09375,26.671875,0,28.265625L0,32.296875Z",fill:O.palette.primary.main,"fill-opacity":"1"})})})})]}),U.jsx(n.Typography,{variant:"h4",children:"Restore Database Models"})]}),subheader:U.jsxs(n.Stack,{children:[U.jsxs(n.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[U.jsx(uN,{onClick:(r=h,function(){var e,t;T(r)===r.length?f(Lh(p,r)):f((t=r,$($([],e=p,!0),Lh(t,e),!0)))}),checked:T(p)===A.length&&0!==A.length,indeterminate:T(p)!==A.length&&0!==T(p),disabled:0===A.length,inputProps:{"aria-label":"all items selected"}}),U.jsxs(n.Typography,{variant:"subtitle2",children:[U.jsx("strong",{children:"Selected Models:"}),T(p),"/",A.length," selected"]})]}),U.jsx(PA,{placeholder:"Search models by name...",onInputChange:function(e){if(e){var t=e.toLowerCase();g(A.filter((function(e){return e.toLowerCase().includes(t)})))}else g(A)},size:"small"})]})}),U.jsx(Bp,{sx:{width:"100%",minHeight:230,bgcolor:"background.paper",overflow:"auto"},dense:!0,component:"div",role:"list",children:h.map((function(e){var t="transfer-list-all-item-".concat(e,"-label");return U.jsxs(ew,{role:"listitem",onClick:z(e),children:[U.jsx(gj,{children:U.jsx(uN,{checked:p.includes(e),tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":t}})}),U.jsx(wj,{id:t,primary:e})]},e)}))}),U.jsxs(n.Alert,{severity:"warning",sx:{mx:2},children:[U.jsx(n.AlertTitle,{children:"Warning"}),"After restoration, you will need to refresh the page for changes to take effect."]}),U.jsx(l.LoadingButton,{onClick:function(){M(!0),fetch("".concat(o,"/identity/services/dump"),{method:"POST",body:JSON.stringify({models:Lh(A,p)}),credentials:"include",headers:{"Content-Type":"application/json"}}).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(e){M(!1),u(!1),x&&x("Database restoration successful! Page will refresh in 3 sec"),setTimeout((function(){window.location.reload()}),3e3)})).catch((function(e){w&&w("'There was a problem with the database restoration operation: ".concat(e)),console.error("There was a problem with the fetch operation:",e)}))},loading:C,variant:"contained",sx:{m:2,alignSelf:"end"},disabled:C,children:"Start Restore"})]})})})})]})},exports.IdentityEdit=Az,exports.IdentityGrid=sT,exports.IdentityList=IT,exports.IdentityLoadingScreen=qh,exports.IdentityPage=function(e){var t=e.Component,r=e.LoadingSkelton,o=e.Actions,i=e.HeadingView,a=e.BreadcrumbsChildren,s=e.DefaultActions,l=e.BreadCrumbLinks;e.variant;var c=e.loading,u=e.data,d=e.taptitle,p=e.headingTitle,f=e.themeStretch,m=void 0!==f&&f;return U.jsx(ee,{title:d,children:U.jsxs(n.Container,{maxWidth:!m&&"lg",children:[!c&&U.jsx(re,{heading:p,headingView:i&&U.jsx(i,{record:u}),links:l?l(u):[],action:U.jsxs(n.Stack,{direction:"row",spacing:2,children:[o&&U.jsx(o,{record:u}),s&&U.jsx(s,{})]}),children:u&&a&&U.jsx(a,{data:u})}),c?U.jsx(n.Grid,{container:!0,alignItems:"center",children:U.jsx(r,{})},"skeleton"):t&&U.jsx(t,{data:u})]})})},exports.IdentityPalette=cg,exports.IdentityPermissionPage=function(t){var n=this,o=t.isEdit,i=r.useParams().id,a=void 0===i?"":i,s=e.useContext(Ih).dashbaordUrlPrefix,l=e.useState([]),c=l[0],u=l[1],d=e.useState(void 0),p=d[0],f=d[1],m=e.useState(!0),h=m[0],g=m[1];return e.useEffect((function(){J(n,void 0,void 0,(function(){var e,t,n,r;return _(this,(function(i){switch(i.label){case 0:return e=o?"?id=".concat(a):"",[4,Bh.get("".concat(s,"/permissions/all")+e)];case 1:return t=i.sent(),n=t.data.data.permissions,r=t.data.data.permissionGroup,u(n),f(r),g(!1),[2]}}))}))}),[]),U.jsx(U.Fragment,{children:o&&(h||0===c.length)||o&&!p?U.jsx(U.Fragment,{children:"... loading"}):U.jsx(eD,{modelPermissions:c,fetchLoading:h,isEdit:o,permissionGroup:p})})},exports.IdentityRouter=function(t){var n=t.pathsObject,o=t.HomePage,i=t.customs,a=e.useContext(Kh),s=a.resources,l=a.getResources,c=a.clearResources,u=a.state,d=e.useContext(Jh),p=d.paths,f=d.root,m=d.home,h=e.useContext(Ih),g=h.statusCode,v=h.dashbaordUrlPrefix,A=e.useState([]),y=A[0],b=A[1],x=Yh(),w=x.user,j=x.isAuthenticated,C=r.useNavigate();return e.useEffect((function(){!s&&j&&w&&l()}),[g,s,w,j,l,C,f]),e.useEffect((function(){if(s&&p&&j&&w){var e=[];if(Object.keys(p).forEach((function(e){n[e]=p[e]})),o){var t=U.jsx(r.Route,{path:"",element:U.jsx(o,{})});e.push(t)}for(var a in e.push.apply(e,i),s)if("modelParents"!==a&&"appConfigurations"!==a){var l=s[a],u=l.properties.path,d=l.properties.modelName;e.push.apply(e,[U.jsx(r.Route,{path:"".concat(u),element:U.jsx(IT,{apiRoute:"".concat(v,"/").concat(u),path:a,modelName:d},"".concat(u,".list"))}),U.jsx(r.Route,{path:"".concat(u,"/list"),element:U.jsx(IT,{apiRoute:"".concat(v,"/").concat(u),path:a,modelName:d},"".concat(u,".list"))}),U.jsx(r.Route,{path:"".concat(u,"/new"),element:U.jsx(Az,{modelRoute:"".concat(u),path:a,isEdit:!1})}),U.jsx(r.Route,{path:"".concat(u,"/:id/edit"),element:U.jsx(Az,{modelRoute:"".concat(u),path:a,isEdit:!0})}),U.jsx(r.Route,{path:"".concat(u,"/:id/show"),element:U.jsx(VT,{path:a,modelRoute:u},"".concat(u,".show"))}),U.jsx(r.Route,{path:"".concat(u,"/:id/duplicate"),element:U.jsx(Az,{modelRoute:"".concat(u),path:a,isEdit:!1,isDuplicate:!0})})])}b((function(t){return e}))}!s||j||w||c()}),[s,p,f,w,j,c]),U.jsxs(r.Routes,{children:[U.jsx(r.Route,{path:"".concat(f,"/login"),element:j?U.jsx(r.Navigate,{to:"".concat(f,"/").concat(m)}):U.jsx(xD,{})}),U.jsxs(r.Route,{element:j?U.jsx(PP,{}):U.jsx(r.Navigate,{to:"".concat(f,"/login")}),path:"".concat(f),children:$([],y,!0)}),U.jsx(r.Route,{path:"*",element:j?y.length>0&&u===exports.RequestState.SUCCEEDED?U.jsx(nD,{}):U.jsx(qh,{logoSxProps:{width:40,height:40}}):U.jsx(xD,{})})]})},exports.IdentityShow=VT,exports.IdentityShowMailLog=function(t){var r=t.record.record,o=Gh(),i=o.requestState,a=o.post,s=Ig().setSuccessAlert,c=e.useState(""),u=c[0],d=c[1],p=e.useRef(null),f=function(e){a({url:"actions/execute/send_draft_email",body:{record:q(q({},r),{to:e}),modelName:"MailLog"},onSuccess:function(e){s("Mail sent successfully")}})};return U.jsxs(n.Card,{sx:{width:"50%",margin:"auto",alignSelf:"center"},children:[U.jsx(n.CardHeader,{title:"subject: ".concat(r.subject),subheader:"To: ".concat(r.to)}),U.jsx(n.Divider,{}),U.jsx(n.CardContent,{children:U.jsx("iframe",{srcDoc:r.html,title:null==r?void 0:r._id,width:"100%",height:"620",style:{border:"none"}})}),U.jsx(n.CardActions,{sx:{justifyContent:"center",alignItems:"center",pb:2},children:U.jsxs(n.Stack,{spacing:1,width:"50%",children:[U.jsx(n.TextField,{label:"Send to",inputProps:{ref:p},size:"small",type:"email",error:!!u,helperText:u}),U.jsx(l.LoadingButton,{variant:"contained",onClick:function(){var e;(null==p?void 0:p.current.value)?(d(null),f(null===(e=null==p?void 0:p.current)||void 0===e?void 0:e.value)):d("Please type in a draft email address")},loading:i.state===exports.RequestState.LOADING,children:"Send To Selected email"}),U.jsx(n.Divider,{children:"OR"}),U.jsx(l.LoadingButton,{variant:"contained",onClick:function(){return f()},loading:i.state===exports.RequestState.LOADING,fullWidth:!0,children:"Send To Draft Email"})]})})]})},exports.JSONRichText=HM,exports.JSONRichTextShow=wM,exports.LocalizationStringForm=oy,exports.MotionLazyContainer=function(e){var t=e.children;return U.jsx(p.LazyMotion,{strict:!0,features:p.domMax,children:t})},exports.NextPreviousButtons=KM,exports.NotificationContext=mg,exports.NotificationPopover=function(){var t,o=e.useState(null),i=o[0],a=o[1],s=Rg().notifications,l=hv.isEnglish(),c=e.useContext(Ih).dashbaordUrlPrefix,u=l?DD:TD,d=e.useState(s),p=d[0],f=d[1],m=e.useState(!1),h=m[0],g=m[1],v=null==p?void 0:p.filter((function(e){return!1===e.isRead})).length,A=r.useNavigate();e.useEffect((function(){f(s)}),[s]);var y=function(e){var t,n;a(null),Bh.post("".concat(c,"/notifications/markAsRead/").concat(e.id)),f(null==p?void 0:p.map((function(t){return t.id===e.id?q(q({},t),{isRead:!0}):q({},t)}))),e.redirectUrlType===LD.INTERNAL?A(null!==(t=e.redirectUrl)&&void 0!==t?t:"/"):e.redirectUrlType===LD.EXTERNAL&&window.open(null!==(n=e.redirectUrl)&&void 0!==n?n:"/")},b=h?p:null==p?void 0:p.slice(0,4);return U.jsxs(U.Fragment,{children:[U.jsx(wD,{color:i?"primary":"default",onClick:function(e){a(e.currentTarget)},sx:{width:40,height:40},children:U.jsx(n.Badge,{badgeContent:v,color:"error",children:U.jsx(To,{icon:"eva:bell-fill"})})}),U.jsxs(ND,{open:i,onClose:function(){a(null)},sx:{width:360,p:0},children:[U.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",py:2,px:2.5},children:[U.jsxs(n.Box,{sx:{flexGrow:1},children:[U.jsx(n.Typography,{variant:"subtitle1",children:u.notifications}),U.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:"".concat(u.youHave," ").concat(null!=v?v:0," ").concat(u.unreadMessages)})]}),v&&v>0&&U.jsx(n.Tooltip,{title:" Mark all as read",children:U.jsx(n.IconButton,{color:"primary",onClick:function(){Bh.post("".concat(c,"/notifications/markAllAsRead")),f(null==p?void 0:p.map((function(e){return q(q({},e),{isRead:!0})})))},children:U.jsx(To,{icon:"eva:done-all-fill"})})})]}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),U.jsx(n.Paper,{style:{minHeight:200,maxHeight:400,overflow:"auto"},children:U.jsx(n.List,{disablePadding:!0,children:null==b?void 0:b.map((function(e){return U.jsx(FD,{notification:e,onClickNotification:y},e.id)}))})}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),(null!==(t=null==p?void 0:p.length)&&void 0!==t?t:0)>4&&U.jsx(n.Box,{sx:{p:1},children:U.jsx(n.Button,{fullWidth:!0,disableRipple:!0,onClick:function(){return g(!h)},children:h?u.showLess:u.showMore})})]})]})},exports.NotificationsContextProvider=function(t){var n=t.notificationsUrl,r=Gh(),o=r.requestState,i=r.get,a=r.revertToIdle,s=Gh().post,l=Gh().post;e.useEffect((function(){c()}),[]);var c=e.useCallback((function(){i({url:n})}),[]),u=e.useCallback((function(e){s({url:"".concat(n,"/markAsRead/").concat(e)})}),[]),d=e.useCallback((function(){l({url:"".concat(n,"/markAllAsRead")})}),[]);return U.jsx(mg.Provider,{value:{notifications:o.data,getNotifications:c,state:o.state,clearNotifications:function(){a()},markOneRead:u,markAllAsRead:d},children:t.children})},exports.PathsContext=Jh,exports.PathsContextProvider=function(t){var n=t.root,r=t.children,o=t.home,i=e.useContext(Kh).resources,a={},s=function(e){if("modelParents"===e||"appConfigurations"===e)return"continue";var t=i[e].properties.path;a[e]={root:_h(n,"/"+t),list:_h(n,"/"+t+"/list"),edit:function(e){return _h(n,"/"+t+"/".concat(e,"/edit"))},show:function(e){return _h(n,"/"+t+"/".concat(e,"/show"))},duplicate:function(e){return _h(n,"/"+t+"/".concat(e,"/duplicate"))},new:_h(n,"/"+t+"/new")}};for(var l in i)s(l);return U.jsx(Jh.Provider,{value:{paths:a,root:n,home:o},children:r})},exports.RHFCheckbox=Na,exports.RHFCreatableSelect=function(){var e=S.useState(null);e[0],e[1];var t=S.useState(null);t[0];var n=t[1];return U.jsx(jm,{multiple:!0,onChange:function(e,t){"string"==typeof t?n((function(e){return $($([],null!=e?e:[],!0),[{title:t}],!1)})):t&&t.length>0&&t[t.length-1].inputValue?n((function(e){var n;return $($([],null!=e?e:[],!0),[{title:null!==(n=t[t.length-1].inputValue)&&void 0!==n?n:""}],!1)})):n((function(e){return $($([],null!=e?e:[],!0),[{title:"".concat(t)}],!1)}))},filterOptions:function(e,t){var n=Gg(e,t),r=t.inputValue,o=e.some((function(e){return r===e.title}));return""===r||o||n.push({inputValue:r,title:'Add "'.concat(r,'"')}),n},selectOnFocus:!0,clearOnBlur:!0,handleHomeEndKeys:!0,id:"free-solo-with-text-demo",options:Zg,getOptionLabel:function(e){return"string"==typeof e?e:e.inputValue?e.inputValue:e.title},renderOption:function(e,t){return U.jsx("li",q({},e,{children:t.title}))},sx:{width:300},freeSolo:!0,renderInput:function(e){return U.jsx(Qf,q({},e,{label:"Free solo with text demo"}))}})},exports.RHFDatePicker=ad,exports.RHFEditor=Xu,exports.RHFGooglePlaces=Yg,exports.RHFGroupedTextFields=function(t){var r=t.title,o=t.applyAllMessage,i=t.fields,a=t.errorMessage;K(t,["title","applyAllMessage","fields","errorMessage"]);var s=c.useFormContext(),l=s.watch,u=s.setValue,d=s.getValues,p=e.useState(!1),f=p[0],m=p[1],h=l(i[0].name);return e.useEffect((function(){f&&i.forEach((function(e,t){0!=t&&u(e.name,d(i[0].name))}))}),[f,h]),U.jsxs(n.Card,{sx:{backgroundColor:"#FBFBFB",px:2,pb:2},children:[U.jsx(n.Typography,{variant:"body2",color:"error",sx:{mt:2},children:null!=a?a:""}),U.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",mt:1,children:[U.jsx(n.Typography,{variant:"subtitle1",children:null!=r?r:""}),U.jsxs(n.Stack,{direction:"row",alignItems:"center",children:[U.jsx(n.Checkbox,{sx:{"&.Mui-checked":{color:"#0094FF"}},onChange:function(e,t){return m(t)},inputProps:{"aria-label":"controlled"}}),U.jsx(n.Typography,{variant:"body2",children:o})]})]}),U.jsx(n.Stack,{spacing:3,mt:2,children:i.map((function(e,t){return U.jsx(Yu,{name:e.name,label:e.label,type:"number",InputProps:{startAdornment:U.jsx(n.InputAdornment,{position:"start",children:"$"})},disabled:f&&0!==t},e._id)}))})]})},exports.RHFLazySelect=id,exports.RHFMultiCheckbox=function(e){var t=e.name,r=e.options,o=K(e,["name","options"]),i=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:i,render:function(e){var t=e.field;return U.jsx(n.FormGroup,{children:r.map((function(e){return U.jsx(n.FormControlLabel,q({control:U.jsx(n.Checkbox,{checked:t.value.includes(e.value),onChange:function(){return t.onChange(function(e){return t.value.includes(e)?t.value.filter((function(t){return t!==e})):$($([],t.value,!0),[e],!1)}(e.value))}}),label:e.label},o),e.value)}))})}})},exports.RHFRadioGroup=Ug,exports.RHFSelect=Gu,exports.RHFTagsField=function(t){var r=t.name,o=t.multiple,i=t.size,a=t.isList,s=void 0!==a&&a,l=K(t,["name","multiple","size","isList"]),u=c.useFormContext().control,d=e.useState(!1)[0];return U.jsx(c.Controller,{name:r,control:u,render:function(e){var t=e.field,a=e.fieldState.error;return U.jsx(n.Autocomplete,q({disableClearable:!0,freeSolo:!0,fullWidth:l.fullWidth,sx:q(q({},l.sx),{"& .MuiAutocomplete-inputRoot":{alignItems:"flex-end",whiteSpace:"pre-line"},"& .MuiAutocomplete-input":{minWidth:"100%"}})},t,{disableCloseOnSelect:o,id:r,size:i,open:d,disabled:l.disabled,clearIcon:!1,options:[],multiple:!0,onChange:function(e,n){t.onChange(n.map((function(e){return e})))},renderTags:function(e,r){return s?U.jsx(n.List,{disablePadding:!0,dense:!0,children:null==e?void 0:e.map((function(r){return U.jsxs(n.ListItem,{disablePadding:!0,disableGutters:!0,children:[U.jsx(n.ListItemIcon,{children:U.jsx(Jg,{color:"primary",sx:{width:10}})}),U.jsx(n.ListItemText,{primary:U.jsx(n.Typography,{variant:"body2",children:r})}),U.jsx(n.ListItemIcon,{sx:{width:24},children:U.jsx(n.IconButton,{onClick:function(){return t.onChange(e.filter((function(e){return e!==r})))},children:U.jsx(av,{color:"error",sx:{width:24}})})})]},r)}))}):e.map((function(e,t){return U.jsx(n.Chip,q({size:"small",label:e},r({index:t})))}))},renderInput:function(e){var t,r,o,i,s;return U.jsx(n.TextField,q({label:"Add Tags"},e,l,{error:!!a,helperText:null!==(i=null!==(t=null==a?void 0:a.message)&&void 0!==t?t:null===(o=null===(r=Object(a))||void 0===r?void 0:r._id)||void 0===o?void 0:o.message)&&void 0!==i?i:l.helperText,inputProps:q(q(q({},e.inputProps),l.inputProps),{style:q(q(q({},e.inputProps.style),null===(s=l.inputProps)||void 0===s?void 0:s.style),{width:"100%"})})}))}}))}})},exports.RHFTextField=Yu,exports.RHFUploadAvatar=Iu,exports.RHFUploadFileButton=function(t){var r=t.name,o=t.buttonSx,i=t.loading,a=K(t,["name","buttonSx","loading"]),s=c.useFormContext().control,u=e.useRef(null),d=function(){if(u.current){var e=u.current.querySelector('input[type="file"]');e&&e.click()}};return U.jsx(c.Controller,{name:r,control:s,render:function(e){var t=e.field.value,r=e.fieldState.error,s=!!r&&!t;return U.jsxs("div",{children:[U.jsx("div",{ref:u,children:U.jsx(Tu,q({file:t,error:s,helperText:s&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:r.message}),sx:{display:"none"}},a))}),U.jsx(l.LoadingButton,{loading:i,onClick:d,sx:o,children:"Upload File"})]})}})},exports.RHFUploadFileButton2=function(t){var r=t.name,o=t.helperText,i=t.loading,a=K(t,["name","helperText","loading"]),s=c.useFormContext().control,u=e.useRef(null),d=function(){if(u.current){var e=u.current.querySelector('input[type="file"]');e&&e.click()}};return U.jsx(c.Controller,{name:r,control:s,render:function(e){var t=e.field.value,r=e.fieldState.error,s=!!r&&!t;return U.jsxs("div",{children:[U.jsx("div",{ref:u,children:U.jsx(Tu,q({file:t,error:s,helperText:s&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:r.message}),sx:{display:"none"}},a))}),U.jsx(l.LoadingButton,{startIcon:U.jsx(Lu,{src:"/assets/icons/UploadFile.svg"}),variant:"outlined",onClick:d,loading:i,sx:{height:"40px",border:0,":hover":{border:0},width:"160px"},children:U.jsx(n.Typography,{fontWeight:600,fontSize:"16px",sx:{color:"#000",textDecoration:"underline",textUnderlineOffset:"4px"},children:"Upload File"})}),s?U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:r.message}):o&&o]})}})},exports.RHFUploadImage=function(e){var t=e.name,r=K(e,["name"]),o=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:o,render:function(e){var t=e.field,o=e.fieldState.error,i=!!o&&!t.value;return U.jsx(Eu,q({accept:{"image/*":[".jpeg",".png"]},file:t.value,error:i,helperText:i&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:o.message})},r))}})},exports.RHFUploadMultiFile=function(e){var t=e.name,r=K(e,["name"]),o=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:o,render:function(e){var t,o=e.field,i=e.fieldState.error,a=!!i&&0===(null===(t=o.value)||void 0===t?void 0:t.length);return U.jsx(Au,q({accept:{"image/*":[".jpeg",".png"]},files:o.value,error:a,helperText:a&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:null==i?void 0:i.message})},r))}})},exports.RHFUploadSingleFile=function(e){var t=e.name,r=e.contentText,o=K(e,["name","contentText"]),i=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:i,render:function(e){var t=e.field,i=e.fieldState.error,a=!!i&&!t.value;return U.jsx(Tu,q({accept:{"image/*":[".jpeg",".png"]},file:t.value,error:a,helperText:a&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:i.message}),Content:U.jsxs(n.Stack,{direction:"column",justifyContent:"center",alignItems:"center",width:"100%",spacing:1,children:[U.jsx(ka,{sx:{color:"#6D6D6D"}}),U.jsx(n.Typography,{color:"#6D6D6D",fontSize:"14px",children:null!=r?r:"Upload File"})]})},o))}})},exports.ResourcesContext=Kh,exports.ResourcesContextProvider=function(t){var n,r=t.resourcesUrl,o=t.laodingLogo,i=t.logoSxProps,a=Gh(),s=a.requestState,l=a.get,c=a.revertToIdle,u=Yh().isAuthenticated;e.useEffect((function(){u&&d()}),[u]);var d=e.useCallback((function(){l({url:r})}),[]);return U.jsx(Kh.Provider,{value:{resources:null===(n=s.data)||void 0===n?void 0:n.resources,getResources:d,state:s.state,clearResources:function(){c()},loadingLogo:o,logoSxProps:i},children:!u||s.state!==exports.RequestState.LOADING&&s.state!==exports.RequestState.IDLE?t.children:U.jsx(qh,{loadingLogo:o,logoSxProps:i})})},exports.SettingsContext=Eg,exports.SettingsProvider=function(t){var n=t.children,r=function(t,n){var r=e.useState((function(){var e=localStorage.getItem(t);return null===e?n:JSON.parse(e)})),o=r[0],i=r[1];return e.useEffect((function(){var e=function(e){e.storageArea===localStorage&&e.key===t&&i(e.newValue?JSON.parse(e.newValue):e.newValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}}),[t,n]),[o,function(e){i((function(n){var r="function"==typeof e?e(n):e;return localStorage.setItem(t,JSON.stringify(r)),r}))}]}("settings",{themeMode:Ng.themeMode,themeLayout:Ng.themeLayout,themeStretch:Ng.themeStretch,themeContrast:Ng.themeContrast,themeDirection:Ng.themeDirection,themeColorPresets:Ng.themeColorPresets}),o=r[0],i=r[1],a="ar"===localStorage.getItem("i18nextLng");e.useEffect((function(){a&&l("ar")}),[a]);var s,l=function(e){i(q(q({},o),{themeDirection:"ar"===e?"rtl":"ltr"}))};return U.jsx(Eg.Provider,{value:q(q({},o),{onToggleMode:function(){i(q(q({},o),{themeMode:"light"===o.themeMode?"dark":"light"}))},onChangeMode:function(e){i(q(q({},o),{themeMode:e.target.value}))},onToggleDirection:function(){i(q(q({},o),{themeDirection:"rtl"===o.themeDirection?"ltr":"rtl"}))},onChangeDirection:function(e){i(q(q({},o),{themeDirection:e.target.value}))},onChangeDirectionByLang:l,onToggleLayout:function(){i(q(q({},o),{themeLayout:"vertical"===o.themeLayout?"horizontal":"vertical"}))},onChangeLayout:function(e){i(q(q({},o),{themeLayout:e.target.value}))},onChangeContrast:function(e){i(q(q({},o),{themeContrast:e.target.value}))},onToggleContrast:function(){i(q(q({},o),{themeContrast:"default"===o.themeContrast?"bold":"default"}))},onToggleStretch:function(){i(q(q({},o),{themeStretch:!o.themeStretch}))},onChangeColor:function(e){i(q(q({},o),{themeColorPresets:e.target.value}))},setColor:(s=o.themeColorPresets,{purple:Ag,cyan:yg,blue:bg,orange:xg,red:wg,default:vg}[s]),colorOption:gg.map((function(e){return{name:e.name,value:e.main}})),onResetSetting:function(){i({themeMode:Ng.themeMode,themeLayout:Ng.themeLayout,themeStretch:Ng.themeStretch,themeContrast:Ng.themeContrast,themeDirection:Ng.themeDirection,themeColorPresets:Ng.themeColorPresets})}}),children:n})},exports.ShowRecord=FT,exports.SnackAlertContext=pg,exports.SnackAlertProvider=function(t){var r,o=t.children,i=e.useState({state:!1}),a=i[0],s=i[1],l=function(e,t,n,r){setTimeout((function(){s({state:!1})}),r||4e3),s({state:!0,message:e,severity:t,position:n})};return U.jsxs(pg.Provider,{value:{setAlert:l,setErrorAlert:function(e,t,n){l(e,"error",t,n)},setSuccessAlert:function(e,t,n){l(e,"success",t,n)}},children:[a.state&&U.jsx(n.Snackbar,{open:a.state,anchorOrigin:null!==(r=a.position)&&void 0!==r?r:{horizontal:"center",vertical:"top"},children:U.jsx(n.Alert,{onClose:function(){s({state:!1})},severity:a.severity,children:a.message})}),o]})},exports.State=kh,exports.SvgIconStyle=Lu,exports.ThemeProvider=function(t){var r=t.children,o=Fg(),i=o.themeMode,a=o.themeDirection,s=Bg().palette,l="light"===i,c=ho(e.useMemo((function(){return{palette:s,typography:iD,breakpoints:aD,shape:{borderRadius:8},direction:a,shadows:l?hD.light:hD.dark,customShadows:l?mD.light:mD.dark}}),[l,a,s]));return c.components=cD(c),U.jsx(Vt,{injectFirst:!0,children:U.jsxs(jo,{theme:c,children:[U.jsx(n.CssBaseline,{}),r]})})},exports.ThemeSettings=function(t){var n=t.children;return U.jsx(e.Suspense,{fallback:U.jsx(U.Fragment,{}),children:U.jsx(EP,{children:U.jsx(NP,{children:n})})})},exports.UniqueFieldHelper=FA,exports.checkPermission=function(e,t){var n=e.properties,r=e.permissions,o=n.modelName,i=Bu.lowerCaseFirstLetter(o),a="".concat(i,"_").concat(t);return!r||r[a]},exports.fCurrency=function(e){return Xa(e?d(e).format("$0,0.00"):"",".00")},exports.fData=Qa,exports.fNumber=function(e){return d(e).format()},exports.fPercent=function(e){return Xa(e?d(Number(e)/100).format("0.0%"):"",".0")},exports.fShortenNumber=function(e){return Xa(e?d(e).format("0.00a"):"",".00")},exports.getFilterValues=QA,exports.getUrlFilters=VA,exports.path=_h,exports.useApi=Gh,exports.useAppConfigurations=Bg,exports.useAuth=Yh,exports.useCredentials=Lg,exports.useDialogs=Hg,exports.useLocales=Vg,exports.useNavData=$h,exports.useNotifications=Rg,exports.usePaths=Sg,exports.useResources=kg,exports.useSettings=Fg,exports.useSnackAlert=Ig;
135
+ */!function(){var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"==i||"number"==i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"==i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,s;e.exports=(o=n(3),i=n(5),s={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),o=n(1);function i(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),o=t.getEndKey(),i=n.getBlockMap();return i.toSeq().skipUntil((function(e,t){return t===r})).takeUntil((function(e,t){return t===o})).concat([[o,i.get(o)]])}function a(e){return i(e).toList()}function s(e){if(e)return a(e).get(0)}function l(e){if(e){var t=s(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach((function(e,n){e.get("key")===t.get("key")&&(r=n-1)})),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new o.List}function u(e){var t=a(e);if(!t.some((function(e){return e.type!==t.get(0).type})))return t.get(0).type}function d(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function p(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),o=n.getFocusOffset(),i=a(e);if(0<i.size){if(n.getIsBackward()){var s=r;r=o,o=s}for(var l=0;l<i.size;l+=1){var c=0===l?r:0,u=l===i.size-1?o:i.get(l).getText().length;t+=i.get(l).getText().slice(c,u)}}return t}function f(e){var t=e.getCurrentContent(),n=e.getSelection(),o=r.Modifier.removeRange(t,n,"forward"),i=o.getSelectionAfter(),a=o.getBlockForKey(i.getStartKey());return o=r.Modifier.insertText(o,i,"\n",a.getInlineStyleAt(i.getStartOffset()),null),r.EditorState.push(e,o,"insert-fragment")}function m(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return d(r.EditorState.push(e,t,"split-block"))}function h(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),o=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,o,"remove-range")}function g(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function v(e){var t=new o.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach((function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))})),0===t.size)return t=t.clear(),"break"},i=0;i<n.size&&"break"!==r(i);i+=1);return t}var A=Object(o.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(A);function b(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function x(e,t,n){var o,a=e.getSelection();o=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var s=e.getCurrentContent(),l=s.getBlockForKey(o),c=l.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var u=s.getBlockBefore(o);if(!u)return e;if(u.getType()!==c)return e;var d=l.getDepth();if(1===t&&d===n)return e;var p,f,m,h,g,v,A,y=Math.min(u.getDepth()+1,n),b=(f=t,m=y,h=(p=e).getSelection(),v=(g=p.getCurrentContent()).getBlockMap(),A=i(p).map((function(e){var t=e.getDepth()+f;return t=Math.max(0,Math.min(t,m)),e.set("depth",t)})),v=v.merge(A),g.merge({blockMap:v,selectionBefore:h,selectionAfter:h}));return r.EditorState.push(e,b,"adjust-depth")}function w(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):f(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockForKey(r);if(!b(o)&&"unstyled"!==o.getType()&&o.getLength()===t.getStartOffset())return m(e);if(b(o)&&0===o.getLength()){var i=o.getDepth();if(0===i)return d(e);if(0<i)return x(e,-1,i)}}}(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach((function(e){n[e]=0<=r.indexOf(e)})),n}var o=t.getStartOffset(),i=t.getEndOffset(),s=a(e);if(0<s.size){var l=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<s.size;t+=1){var n=0===t?o:0,r=t===s.size-1?i:s.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=s.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach((function(t){e[t]=e[t]&&r.get(t)===t}))},l=n;l<r;l+=1)a(l)}return{v:e}}();if("object"===M(l))return l.v}return{}}function z(e){var t,n=e.getSelection(),r=n.getStartOffset(),o=n.getEndOffset();r===o&&0===r?o=1:r===o&&--r;for(var i=s(e),a=r;a<o;a+=1){var l=i.getEntityAt(a);if(!l){t=void 0;break}if(a===r)t=l;else if(t!==l){t=void 0;break}}return t}function T(e,t){var n,r=s(e);return r.findEntityRanges((function(e){return e.get("entity")===t}),(function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}})),n}function D(e,t,n){N[e]["".concat(e.toLowerCase(),"-").concat(n)]=C({},"".concat(t),n)}function P(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},N.color,{},N.bgcolor,{},N.fontSize,{},N.fontFamily,{CODE:N.CODE,SUPERSCRIPT:N.SUPERSCRIPT,SUBSCRIPT:N.SUBSCRIPT})}var N={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function E(e,t,n){var o=e.getSelection(),i=Object.keys(N[t]).reduce((function(e,t){return r.Modifier.removeInlineStyle(e,o,t)}),e.getCurrentContent()),a=r.EditorState.push(e,i,"changeinline-style"),s=e.getCurrentInlineStyle();if(o.isCollapsed()&&(a=s.reduce((function(e,t){return r.RichUtils.toggleInlineStyle(e,t)}),a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)s.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var l="bgcolor"===t?"backgroundColor":t;s.has("".concat(l,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),D(t,l,n))}return a}function B(e){e&&e.getCurrentContent().getBlockMap().map((function(e){return e.get("characterList")})).toList().flatten().forEach((function(e){e&&0===e.indexOf("color-")?D("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?D("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?D("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&D("fontFamily","fontFamily",e.substr(11))}))}function k(e,t,n){var r=e.getInlineStyleAt(n).toList().filter((function(e){return e.startsWith(t.toLowerCase())}));if(r&&0<r.size)return r.get(0)}function L(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach((function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter((function(e){return e.startsWith(t.toLowerCase())}));if(n&&0<n.size)return n.get(0)}(e,t)})),{v:r};var o=n.getStartOffset(),i=n.getEndOffset(),s=a(e);if(0<s.size){for(var l=function(e){var n=0===e?o:0,a=e===s.size-1?i:s.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var l=function(o){o===n?t.forEach((function(t){r[t]=k(s.get(e),t,o)})):t.forEach((function(t){r[t]&&r[t]!==k(s.get(e),t,o)&&(r[t]=void 0)}))},c=n;c<a;c+=1)l(c)},c=0;c<s.size;c+=1)l(c);return{v:r}}}();if("object"===M(n))return n.v}return{}}function I(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach((function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)})),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",(function(){return b})),n.d(t,"changeDepth",(function(){return x})),n.d(t,"handleNewLine",(function(){return w})),n.d(t,"getEntityRange",(function(){return T})),n.d(t,"getCustomStyleMap",(function(){return P})),n.d(t,"toggleCustomInlineStyle",(function(){return E})),n.d(t,"getSelectionEntity",(function(){return z})),n.d(t,"extractInlineStyle",(function(){return B})),n.d(t,"removeAllInlineStyles",(function(){return I})),n.d(t,"getSelectionInlineStyle",(function(){return O})),n.d(t,"getSelectionCustomInlineStyle",(function(){return L})),n.d(t,"getSelectedBlocksMap",(function(){return i})),n.d(t,"getSelectedBlocksList",(function(){return a})),n.d(t,"getSelectedBlock",(function(){return s})),n.d(t,"getBlockBeforeSelectedBlock",(function(){return l})),n.d(t,"getAllBlocks",(function(){return c})),n.d(t,"getSelectedBlocksType",(function(){return u})),n.d(t,"removeSelectedBlocksStyle",(function(){return d})),n.d(t,"getSelectionText",(function(){return p})),n.d(t,"addLineBreakRemovingSelection",(function(){return f})),n.d(t,"insertNewUnstyledBlock",(function(){return m})),n.d(t,"clearEditorContent",(function(){return h})),n.d(t,"setBlockData",(function(){return g})),n.d(t,"getSelectedBlocksMetadata",(function(){return v})),n.d(t,"blockRenderMap",(function(){return y}))}],r.c=s,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i,a,s;e.exports=(o=n(5),i=n(3),s={},r.m=a=[function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),o=n(0),i=function(e,t,n){var r,i=e.textContent;return""===i.trim()?{chunk:(r=n,{text:" ",inlines:[new o.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:i,inlines:Array(i.length).fill(t),entities:Array(i.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new o.OrderedSet],entities:new Array(1),blocks:[]}},s=function(){return{text:"",inlines:[],entities:[],blocks:[]}},l=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new o.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new o.Map({})}]}},u=function(e){return{text:"\r ",inlines:[new o.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new o.Map({})}]}},d=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},p=new o.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),f={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function m(e){return e.style.textAlign?new o.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new o.Map({"margin-left":e.style.marginLeft}):void 0}var h=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",(function(){return y}));var g=" ",v=new RegExp("&nbsp;","g"),A=!0;function y(e,t){var n,y,b=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(v,g)))?(A=!0,{chunk:function e(t,n,o,g,v,y){var b=t.nodeName.toLowerCase();if(y){var x=y(b,t);if(x){var w=r.Entity.__create(x.type,x.mutability,x.data||{});return{chunk:u(w)}}}if("#text"===b&&"\n"!==t.textContent)return i(t,n,v);if("br"===b)return{chunk:a()};if("img"===b&&t instanceof HTMLImageElement){var j={};j.src=t.getAttribute&&t.getAttribute("src")||t.src,j.alt=t.alt,j.height=t.style.height,j.width=t.style.width,t.style.float&&(j.alignment=t.style.float);var C=r.Entity.__create("IMAGE","MUTABLE",j);return{chunk:u(C)}}if("video"===b&&t instanceof HTMLVideoElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var O=r.Entity.__create("VIDEO","MUTABLE",M);return{chunk:u(O)}}if("iframe"===b&&t instanceof HTMLIFrameElement){var z={};z.src=t.getAttribute&&t.getAttribute("src")||t.src,z.height=t.height,z.width=t.width;var T=r.Entity.__create("EMBEDDED_LINK","MUTABLE",z);return{chunk:u(T)}}var D,P=function(e,t){var n=p.filter((function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)})).keySeq().toSet().toArray();if(1===n.length)return n[0]}(b,g);P&&("ul"===b||"ol"===b?(g=b,o+=1):("unordered-list-item"!==P&&"ordered-list-item"!==P&&(g="",o=-1),A?(D=l(P,m(t)),A=!1):D=c(P,o,m(t)))),D=D||s(),n=function(e,t,n){var r,o=f[e];if(o)r=n.add(o).toOrderedSet();else if(t instanceof HTMLElement){var i=t;r=(r=n).withMutations((function(e){var t=i.style.color,n=i.style.backgroundColor,r=i.style.fontSize,o=i.style.fontFamily.replace(/^"|"$/g,""),a=i.style.fontWeight,s=i.style.textDecoration,l=i.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),o&&e.add("fontfamily-".concat(o)),"bold"===a&&e.add(f.strong),"underline"===s&&e.add(f.ins),"italic"===l&&e.add(f.em)})).toOrderedSet()}return r}(b,t,n);for(var N=t.firstChild;N;){var E=e(N,n,o,g,h(N)||v,y).chunk;D=d(D,E),N=N.nextSibling}return{chunk:D}}(y,new o.OrderedSet,-1,"",void 0,n).chunk}):null);if(b){var x=b.chunk,w=new o.OrderedMap({});x.entities&&x.entities.forEach((function(e){e&&(w=w.set(e,r.Entity.__get(e)))}));var j=0;return{contentBlocks:x.text.split("\r").map((function(e,t){var n=j+e.length,i=x&&x.inlines.slice(j,n),a=x&&x.entities.slice(j,n),s=new o.List(i.map((function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)})));return j=n,new r.ContentBlock({key:Object(r.genKey)(),type:x&&x.blocks[t]&&x.blocks[t].type||"unstyled",depth:x&&x.blocks[t]&&x.blocks[t].depth,data:x&&x.blocks[t]&&x.blocks[t].data||new o.Map({}),text:e,characterList:s})})),entityMap:w}}return null}}],r.c=s,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===o(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d(){return function(e,t){t.normalize(e)}}function p(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===o(n))return"[object RegExp]"===o(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):i(n.validate)?a.validate=n.validate:u(t,n),void(i(n.normalize)?a.normalize=n.normalize:n.normalize?u(t,n):a.normalize=d());"[object String]"!==o(n)?u(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:d()};var p,f=Object.keys(e.__compiled__).filter((function(t){return 0<t.length&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+f+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+f+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(p=e).__index__=-1,p.__text_cache__=""}function f(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function m(e,t){var n=new f(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function h(e,t){if(!(this instanceof h))return new h(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},p(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,p(this),this},h.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(l=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),0<=this.__index__},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(m(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(m(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),p(this),this},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",(function(){return ao}));var r=n(1),o=n.n(r),i=n(0),a=n.n(i),s=n(3),l=n(4),c=n(2),u=n.n(c);function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=p((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach((function(t){t(e)}))},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",(function(){t.editorFlag=!0})),document&&(document.addEventListener("click",(function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())})),document.addEventListener("keydown",(function(e){"Escape"===e.key&&t.closeAllModals()})))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter((function(t){return t!==e}))},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}}));function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var g,v=h((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}})),A=[],y={onKeyDown:function(e){A.forEach((function(t){t(e)}))},registerCallBack:function(e){A.push(e)},deregisterCallBack:function(e){A=A.filter((function(t){return t!==e}))}},b=function(){g=!0},x=function(){g=!1},w=function(){return g};function j(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function C(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function O(e){e.stopPropagation()}function z(e){return e[e.options[0]].icon}function T(e,t){if(e&&void 0===t)return e;var n={};return C(e,(function(e,r){var o;o=r,"[object Object]"===Object.prototype.toString.call(o)?n[e]=T(r,t[e]):n[e]=void 0!==t[e]?t[e]:r})),n}var D=n(6),P=n.n(D),N=n(5);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var H=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(i,r.Component);var e,t,n=I(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,o=t.value;n||r(o)},e}return e=i,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,i=t.activeClassName,a=t.active,s=t.disabled,l=t.title;return o.a.createElement("div",{className:u()("rdw-option-wrapper",r,(B(e={},"rdw-option-active ".concat(i),a),B(e,"rdw-option-disabled",s),e)),onClick:this.onClick,"aria-selected":a,title:l},n)}}])&&k(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t){return(F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}H.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},H.defaultProps={activeClassName:""},n(12);var X=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(i,r.Component);var e,t,n=V(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,i=t.className,a=t.optionWrapperClassName,s=t.ariaLabel,l=t.onExpandEvent,c=t.title,d=this.state.highlighted,p=r.slice(1,r.length);return o.a.createElement("div",{className:u()("rdw-dropdown-wrapper",i),"aria-expanded":n,"aria-label":s||"rdw-dropdown"},o.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:l,title:c},r[0],o.a.createElement("div",{className:u()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?o.a.createElement("ul",{className:u()("rdw-dropdown-optionwrapper",a),onClick:O},o.a.Children.map(p,(function(t,n){return t&&o.a.cloneElement(t,{onSelect:e.onChange,highlighted:d===n,setHighlighted:e.setHighlighted,index:n})}))):void 0)}}])&&W(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t){return(U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}X.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var J=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(i,r.Component);var e,t,n=q(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,o=n.onClick,i=n.value;n.disabled||(r&&r(i),o&&(t.stopPropagation(),o(i)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=i,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,i=t.disabled,a=t.highlighted,s=t.className,l=t.activeClassName,c=t.disabledClassName,d=t.highlightedClassName,p=t.title;return o.a.createElement("li",{className:u()("rdw-dropdownoption-default",s,(G(e={},"rdw-dropdownoption-active ".concat(l),r),G(e,"rdw-dropdownoption-highlighted ".concat(d),a),G(e,"rdw-dropdownoption-disabled ".concat(c),i),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:p},n)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ee(e,t){return(ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ne(e);if(t){var o=ne(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}J.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},J.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var re=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(i,r.Component);var e,t,n=te(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),n.apply(this,arguments)}return e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,i=e.translations;return o.a.createElement("div",{className:u()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map((function(e,a){return o.a.createElement(H,{key:a,value:e,onClick:r,className:u()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||i["components.controls.inline.".concat(e)]},o.a.createElement("img",{alt:"",src:t[e].icon}))})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,i=e.onExpandEvent,a=e.doCollapse,s=e.currentState,l=e.onChange,c=e.translations,d=t.className,p=t.dropdownClassName,f=t.title;return o.a.createElement(X,{className:u()("rdw-inline-dropdown",d),optionWrapperClassName:u()(p),onChange:l,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:i,"aria-label":"rdw-inline-control",title:f},o.a.createElement("img",{src:z(t),alt:""}),t.options.map((function(e,n){return o.a.createElement(J,{key:n,value:e,className:u()("rdw-inline-dropdownoption",t[e].className),active:!0===s[e]||"MONOSPACE"===e&&s.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},o.a.createElement("img",{src:t[e].icon,alt:""}))})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ae(e,t){return(ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=le(e);if(t){var o=le(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function le(e){return(le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}re.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ce=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(i,r.Component);var e,t,n=se(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,o=r.editorState,i=r.onChange,a=s.RichUtils.toggleInlineStyle(o,n);if("subscript"===e||"superscript"===e){var l="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=s.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),l);a=s.EditorState.push(a,c,"change-inline-style")}a&&i(a)},t.changeKeys=function(e){if(e){var t={};return C(e,(function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n})),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,o=r.editorState,a=r.modalHandler;return t.state={currentStyles:o?t.changeKeys(Object(l.getSelectionInlineStyle)(o)):{}},a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(l.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentStyles,s=t.component||re;return o.a.createElement(s,{config:t,translations:n,currentState:a,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return(pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=me(e);if(t){var o=me(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ce.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pe(e,t)}(i,r.Component);var e,t,n=fe(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,i=t.currentState.blockType;return o.a.createElement("div",{className:u()("rdw-inline-wrapper",n)},e.map((function(e,t){return o.a.createElement(H,{key:t,value:e.label,active:i===e.label,onClick:r},e.displayName)})))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,i=n.dropdownClassName,a=n.title,s=t.currentState.blockType,l=t.expanded,c=t.doExpand,d=t.onExpandEvent,p=t.doCollapse,f=t.onChange,m=t.translations,h=this.state.blockTypes.filter((function(e){return e.label===s})),g=h&&h[0]&&h[0].displayName;return o.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},o.a.createElement(X,{className:u()("rdw-block-dropdown",r),optionWrapperClassName:u()(i),onChange:f,expanded:l,doExpand:c,doCollapse:p,onExpandEvent:d,title:a||m["components.controls.blocktype.blocktype"]},o.a.createElement("span",null,g||m["components.controls.blocktype.blocktype"]),e.map((function(e,t){return o.a.createElement(J,{active:s===e.label,value:e.label,key:t},e.displayName)}))))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter((function(t){var n=t.label;return-1<e.options.indexOf(n)}));return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&de(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ge=he;function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ye(e,t){return(ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xe(e);if(t){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(i,r.Component);var e,t,n=be(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find((function(t){return t.label===e})).style,r=t.props,o=r.editorState,i=r.onChange,a=s.RichUtils.toggleBlockType(o,n);a&&i(a)};var r=e.editorState,o=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(l.getSelectedBlocksType)(r):"unstyled"},o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(l.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentBlockType,s=t.component||ge,l=this.blocksTypes.find((function(e){return e.style===a}));return o.a.createElement(s,{config:t,translations:n,currentState:{blockType:l&&l.label},onChange:this.toggleBlockType,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var je=we;function Ce(e){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t){return(Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Te(e);if(t){var o=Te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var De=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oe(e,t)}(i,r.Component);var e,t,n=ze(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.dropdownClassName,a=t.options,s=t.title,l=e.onChange,c=e.expanded,d=e.doCollapse,p=e.onExpandEvent,f=e.doExpand,m=e.translations,h=this.props.currentState.fontSize,g=this.state.defaultFontSize;return g=Number(g),h=h||a&&0<=a.indexOf(g)&&g,o.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},o.a.createElement(X,{className:u()("rdw-fontsize-dropdown",r),optionWrapperClassName:u()(i),onChange:l,expanded:c,doExpand:f,doCollapse:d,onExpandEvent:p,title:s||m["components.controls.fontsize.fontsize"]},h?o.a.createElement("span",null,h):o.a.createElement("img",{src:n,alt:""}),a.map((function(e,t){return o.a.createElement(J,{className:"rdw-fontsize-option",active:h===e,value:e,key:t},e)}))))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ee(e,t){return(Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ke(e);if(t){var o=ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}De.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ee(e,t)}(i,r.Component);var e,t,n=Be(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,o=n.onChange,i=Object(l.toggleCustomInlineStyle)(r,"fontSize",e);i&&o(i)};var r=e.editorState,o=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(l.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(l.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentFontSize,s=t.component||De,l=a&&Number(a.substring(9));return o.a.createElement(s,{config:t,translations:n,currentState:{fontSize:l},onChange:this.toggleFontSize,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Ne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function He(e,t){return(He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=We(e);if(t){var o=We(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var Fe=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(i,r.Component);var e,t,n=Re(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=i,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,i=n.dropdownClassName,a=n.options,s=n.title,l=t.translations,c=t.onChange,d=t.expanded,p=t.doCollapse,f=t.onExpandEvent,m=t.doExpand,h=this.props.currentState.fontFamily;return h=h||a&&e&&a.some((function(t){return t.toLowerCase()===e.toLowerCase()}))&&e,o.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},o.a.createElement(X,{className:u()("rdw-fontfamily-dropdown",r),optionWrapperClassName:u()("rdw-fontfamily-optionwrapper",i),onChange:c,expanded:d,doExpand:m,doCollapse:p,onExpandEvent:f,title:s||l["components.controls.fontfamily.fontfamily"]},o.a.createElement("span",{className:"rdw-fontfamily-placeholder"},h||l["components.controls.fontfamily.fontfamily"]),a.map((function(e,t){return o.a.createElement(J,{active:h===e,value:e,key:t},e)}))))}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Fe.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Ve=Fe;function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var o=Ze(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ue=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(i,r.Component);var e,t,n=Ge(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,o=n.onChange,i=Object(l.toggleCustomInlineStyle)(r,"fontFamily",e);i&&o(i)};var r=e.editorState,o=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(l.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(l.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentFontFamily,s=t.component||Ve,l=a&&a.substring(11);return o.a.createElement(s,{translations:n,config:t,currentState:{fontFamily:l},onChange:this.toggleFontFamily,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function qe(e){return(qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Je(e,t){return(Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$e(e);if(t){var o=$e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ue.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(i,r.Component);var e,t,n=_e(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,i=e.indentDisabled,a=e.outdentDisabled,s=t.options,l=t.unordered,c=t.ordered,d=t.indent,p=t.outdent,f=t.className;return o.a.createElement("div",{className:u()("rdw-list-wrapper",f),"aria-label":"rdw-list-control"},0<=s.indexOf("unordered")&&o.a.createElement(H,{value:"unordered",onClick:this.toggleBlockType,className:u()(l.className),active:"unordered"===n,title:l.title||r["components.controls.list.unordered"]},o.a.createElement("img",{src:l.icon,alt:""})),0<=s.indexOf("ordered")&&o.a.createElement(H,{value:"ordered",onClick:this.toggleBlockType,className:u()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},o.a.createElement("img",{src:c.icon,alt:""})),0<=s.indexOf("indent")&&o.a.createElement(H,{onClick:this.indent,disabled:i,className:u()(d.className),title:d.title||r["components.controls.list.indent"]},o.a.createElement("img",{src:d.icon,alt:""})),0<=s.indexOf("outdent")&&o.a.createElement(H,{onClick:this.outdent,disabled:a,className:u()(p.className),title:p.title||r["components.controls.list.outdent"]},o.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,i=t.doCollapse,a=t.doExpand,s=t.onExpandEvent,l=t.onChange,c=t.currentState.listType,d=t.translations,p=n.options,f=n.className,m=n.dropdownClassName,h=n.title;return o.a.createElement(X,{className:u()("rdw-list-dropdown",f),optionWrapperClassName:u()(m),onChange:l,expanded:r,doExpand:a,doCollapse:i,onExpandEvent:s,"aria-label":"rdw-list-control",title:h||d["components.controls.list.list"]},o.a.createElement("img",{src:z(n),alt:""}),this.options.filter((function(e){return 0<=p.indexOf(e)})).map((function(t,r){return o.a.createElement(J,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:u()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||d["components.controls.list.".concat(t)]},o.a.createElement("img",{src:n[t].icon,alt:""}))})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function tt(e){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rt(e,t){return(rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ot(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=it(e);if(t){var o=it(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}et.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var at=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rt(e,t)}(i,r.Component);var e,t,n=ot(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,o=n.editorState,i=s.RichUtils.toggleBlockType(o,e);i&&r(i)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,o=n.editorState,i=Object(l.changeDepth)(o,e,4);i&&r(i)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(l.getBlockBeforeSelectedBlock)(e);return!r||!Object(l.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(l.isListBlock)(e)||e.get("depth")<=0};var r=t.props,o=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:o?Object(l.getSelectedBlock)(o):void 0},a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(l.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,i=this.state,a=i.expanded,s=i.currentBlock,l=n.component||et;"unordered-list-item"===s.get("type")?e="unordered":"ordered-list-item"===s.get("type")&&(e="ordered");var c=this.isIndentDisabled(),u=this.isOutdentDisabled();return o.a.createElement(l,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:u})}}])&&nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ct(e,t){return(ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dt(e);if(t){var o=dt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===st(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}at.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var pt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ct(e,t)}(i,r.Component);var e,t,n=ut(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),n.apply(this,arguments)}return e=i,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,i=t.center,a=t.right,s=t.justify,l=t.className,c=e.onChange,d=e.currentState.textAlignment,p=e.translations;return o.a.createElement("div",{className:u()("rdw-text-align-wrapper",l),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&o.a.createElement(H,{value:"left",className:u()(r.className),active:"left"===d,onClick:c,title:r.title||p["components.controls.textalign.left"]},o.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&o.a.createElement(H,{value:"center",className:u()(i.className),active:"center"===d,onClick:c,title:i.title||p["components.controls.textalign.center"]},o.a.createElement("img",{src:i.icon,alt:""})),0<=n.indexOf("right")&&o.a.createElement(H,{value:"right",className:u()(a.className),active:"right"===d,onClick:c,title:a.title||p["components.controls.textalign.right"]},o.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&o.a.createElement(H,{value:"justify",className:u()(s.className),active:"justify"===d,onClick:c,title:s.title||p["components.controls.textalign.justify"]},o.a.createElement("img",{src:s.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,i=e.onExpandEvent,a=e.doCollapse,s=e.currentState.textAlignment,l=e.onChange,c=e.translations,d=t.options,p=t.left,f=t.center,m=t.right,h=t.justify,g=t.className,v=t.dropdownClassName,A=t.title;return o.a.createElement(X,{className:u()("rdw-text-align-dropdown",g),optionWrapperClassName:u()(v),onChange:l,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:i,"aria-label":"rdw-textalign-control",title:A||c["components.controls.textalign.textalign"]},o.a.createElement("img",{src:s&&t[s]&&t[s].icon||z(t),alt:""}),0<=d.indexOf("left")&&o.a.createElement(J,{value:"left",active:"left"===s,className:u()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.left"]},o.a.createElement("img",{src:p.icon,alt:""})),0<=d.indexOf("center")&&o.a.createElement(J,{value:"center",active:"center"===s,className:u()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.center"]},o.a.createElement("img",{src:f.icon,alt:""})),0<=d.indexOf("right")&&o.a.createElement(J,{value:"right",active:"right"===s,className:u()("rdw-text-align-dropdownOption",m.className),title:m.title||c["components.controls.textalign.right"]},o.a.createElement("img",{src:m.icon,alt:""})),0<=d.indexOf("justify")&&o.a.createElement(J,{value:"justify",active:"justify"===s,className:u()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.justify"]},o.a.createElement("img",{src:h.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&lt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function ft(e){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vt(e);if(t){var o=vt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function vt(e){return(vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}pt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var At=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(i,r.Component);var e,t,n=gt(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(l.setBlockData)(r,{"text-align":e}):Object(l.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(l.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.expanded,a=r.currentTextAlignment,s=t.component||pt;return o.a.createElement(s,{config:t,translations:n,expanded:i,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&mt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function yt(e){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jt(e);if(t){var o=jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===yt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}At.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Ct=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xt(e,t)}(i,r.Component);var e,t,n=wt(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,i=n.colors,a=t.currentState,s=a.color,l=a.bgColor,c=t.translations,d=e.state.currentStyle,p="color"===d?s:l;return o.a.createElement("div",{className:u()("rdw-colorpicker-modal",r),onClick:O},o.a.createElement("span",{className:"rdw-colorpicker-modal-header"},o.a.createElement("span",{className:u()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===d}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),o.a.createElement("span",{className:u()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===d}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),o.a.createElement("span",{className:"rdw-colorpicker-modal-options"},i.map((function(t,n){return o.a.createElement(H,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:p===t,onClick:e.onChange},o.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))}))))},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:i||l["components.controls.colorpicker.colorpicker"]},o.a.createElement(H,{onClick:s,className:u()(r)},o.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Ct.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Ct;function Ot(e){return(Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pt(e);if(t){var o=Pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(i,r.Component);var e,t,n=Dt(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,o=r.editorState,i=r.onChange,a=Object(l.toggleCustomInlineStyle)(o,e,n);a&&i(a),t.doCollapse()};var r=e.editorState,o=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(l.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(l.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,o.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(l.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(l.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.currentColor,a=r.currentBgColor,s=r.expanded,l=t.component||Mt,c=i&&i.substring(6),u=a&&a.substring(8);return o.a.createElement(l,{config:t,translations:n,onChange:this.toggleColor,expanded:s,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:u}})}}])&&zt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Nt.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Et=Nt,Bt=n(7),kt=n.n(Bt);function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function St(e,t){return(St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rt(e);if(t){var o=Rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Wt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&St(e,t)}(i,r.Component);var e,t,n=Ht(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,o;e.setState((n={},r="".concat(t.target.name),o=t.target.value,r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,o=r.link,i=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:o&&o.target||"",linkTargetOption:o&&o.targetOption||a,linkTitle:o&&o.title||i})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,o=r.link,i=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:o&&o.target,linkTargetOption:o&&o.targetOption||a,linkTitle:o&&o.title||i})},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,i=this.state,a=i.linkTitle,s=i.linkTarget,l=i.linkTargetOption;return o.a.createElement("div",{className:u()("rdw-link-modal",t),onClick:O},o.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),o.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),o.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),o.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:s}),o.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},o.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===l,value:"_blank",onChange:this.updateTargetOption}),o.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),o.a.createElement("span",{className:"rdw-link-modal-buttonsection"},o.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!s||!a},r["generic.add"]),o.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,i=t.unlink,a=t.className,s=e.currentState,l=e.expanded,c=e.translations,d=this.state.showModal;return o.a.createElement("div",{className:u()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&o.a.createElement(H,{value:"unordered-list-item",className:u()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":d,title:r.title||c["components.controls.link.link"]},o.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&o.a.createElement(H,{disabled:!s.link,value:"ordered-list-item",className:u()(i.className),onClick:this.removeLink,title:i.title||c["components.controls.link.unlink"]},o.a.createElement("img",{src:i.icon,alt:""})),l&&d?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,i=e.doExpand,a=e.onChange,s=e.config,l=e.currentState,c=e.translations,d=s.options,p=s.link,f=s.unlink,m=s.className,h=s.dropdownClassName,g=s.title,v=this.state.showModal;return o.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:g},o.a.createElement(X,{className:u()("rdw-link-dropdown",m),optionWrapperClassName:u()(h),onChange:a,expanded:t&&!v,doExpand:i,doCollapse:r,onExpandEvent:n},o.a.createElement("img",{src:z(s),alt:""}),0<=d.indexOf("link")&&o.a.createElement(J,{onClick:this.forceExpandAndShowModal,className:u()("rdw-link-dropdownoption",p.className),title:p.title||c["components.controls.link.link"]},o.a.createElement("img",{src:p.icon,alt:""})),0<=d.indexOf("unlink")&&o.a.createElement(J,{onClick:this.removeLink,disabled:!l.link,className:u()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.unlink"]},o.a.createElement("img",{src:f.icon,alt:""}))),t&&v?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&It(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();Wt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var Ft=Wt;function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xt(e,t){return(Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gt(e);if(t){var o=Gt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Vt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach((function(t){qt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kt(e){var t=Jt.match(e.target);return Ut(Ut({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Jt=kt()(),_t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(i,r.Component);var e,t,n=Yt(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,o){var i=t.props.config.linkCallback;if("link"===e){var a=(i||Kt)({title:n,target:r,targetOption:o});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),o={};if(n&&"LINK"===r.getEntity(n).get("type")){o.link={};var i=n&&Object(l.getEntityRange)(e,n);o.link.target=n&&r.getEntity(n).get("data").url,o.link.targetOption=n&&r.getEntity(n).get("data").targetOption,o.link.title=i&&i.text}return o.selectionText=Object(l.getSelectionText)(e),o},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,o=t.state.currentEntity,i=n.getSelection();if(o){var a=Object(l.getEntityRange)(n,o);i=i.getIsBackward()?i.merge({anchorOffset:a.end,focusOffset:a.start}):i.merge({anchorOffset:a.start,focusOffset:a.end}),r(s.RichUtils.toggleLink(n,i,null))}},t.addLink=function(e,n,r){var o=t.props,i=o.editorState,a=o.onChange,c=t.state.currentEntity,u=i.getSelection();if(c){var d=Object(l.getEntityRange)(i,c);u=u.getIsBackward()?u.merge({anchorOffset:d.end,focusOffset:d.start}):u.merge({anchorOffset:d.start,focusOffset:d.end})}var p=i.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),f=s.Modifier.replaceText(i.getCurrentContent(),u,"".concat(e),i.getCurrentInlineStyle(),p),m=s.EditorState.push(i,f,"insert-characters");u=m.getSelection().merge({anchorOffset:u.get("anchorOffset")+e.length,focusOffset:u.get("anchorOffset")+e.length}),m=s.EditorState.acceptSelection(m,u),f=s.Modifier.insertText(m.getCurrentContent(),u," ",m.getCurrentInlineStyle(),void 0),a(s.EditorState.push(m,f,"insert-characters")),t.doCollapse()};var r=t.props,o=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:o?Object(l.getSelectionEntity)(o):void 0},a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(l.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=this.getCurrentValues(),a=i.link,s=i.selectionText,l=t.component||Ft;return o.a.createElement(l,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:s},onChange:this.onChange})}}])&&Qt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();_t.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var $t=_t;function en(e){return(en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nn(e,t){return(nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=on(e);if(t){var o=on(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===en(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function on(e){return(on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var an=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nn(e,t)}(i,r.Component);var e,t,n=rn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,o;e.setState((n={},r="".concat(t.target.name),o=t.target.value,r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var o=r.defaultSize,i=o.height,a=o.width;this.setState({embeddedLink:"",height:i,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,i=this.props,a=i.config.popupClassName,s=i.doCollapse,l=i.translations;return o.a.createElement("div",{className:u()("rdw-embedded-modal",a),onClick:O},o.a.createElement("div",{className:"rdw-embedded-modal-header"},o.a.createElement("span",{className:"rdw-embedded-modal-header-option"},l["components.controls.embedded.embeddedlink"],o.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),o.a.createElement("div",{className:"rdw-embedded-modal-link-section"},o.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},o.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:l["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),o.a.createElement("div",{className:"rdw-embedded-modal-size"},o.a.createElement("span",null,o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),o.a.createElement("span",null,o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),o.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},o.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},l["generic.add"]),o.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:s},l["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},o.a.createElement(H,{className:u()(r),value:"unordered-list-item",onClick:s,title:i||l["components.controls.embedded.embedded"]},o.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();an.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var sn=an;function ln(e){return(ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function un(e,t){return(un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pn(e);if(t){var o=pn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ln(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function pn(e){return(pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&un(e,t)}(i,r.Component);var e,t,n=dn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var o=e.props,i=o.editorState,a=o.onChange,l=o.config.embedCallback,c=l?l(t):t,u=i.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(s.AtomicBlockUtils.insertAtomicBlock(i,u," ")),e.doCollapse()},e}return e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||sn;return o.a.createElement(i,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();fn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var mn=fn;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t){return(vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function An(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yn(e);if(t){var o=yn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var bn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vn(e,t)}(i,r.Component);var e,t,n=An(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=i,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return o.a.createElement("div",{className:u()("rdw-emoji-modal",n),onClick:O},r.map((function(t,n){return o.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)})))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:i||l["components.controls.emoji.emoji"]},o.a.createElement(H,{className:u()(r),value:"unordered-list-item",onClick:s},o.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&gn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();bn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var xn=bn;function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=On(e);if(t){var o=On(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function On(e){return(On=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(i,r.Component);var e,t,n=Mn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,o=n.onChange,i=s.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());o(s.EditorState.push(r,i,"insert-characters")),e.doCollapse()},e}return e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||xn;return o.a.createElement(i,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&jn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Tn(){return o.a.createElement("div",{className:"rdw-spinner"},o.a.createElement("div",{className:"rdw-bounce1"}),o.a.createElement("div",{className:"rdw-bounce2"}),o.a.createElement("div",{className:"rdw-bounce3"}))}function Dn(e){return(Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nn(e,t){return(Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function En(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bn(e);if(t){var o=Bn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}zn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var kn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nn(e,t)}(i,r.Component);var e,t,n=En(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var o=0;o<n.length;o+=1)if((!r||"file"===n[o].kind)&&n[o].type.match("^image/")){var i=r?n[o].getAsFile():n[o];e.uploadImage(i)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,o=e.state,i=o.height,a=o.width,s=e.props.onChange;isNaN(i)||(i+="px"),isNaN(a)||(a+="px"),s(n,i,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,o;e.setState((n={},r="".concat(t.target.name),o=t.target.value,r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then((function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1})).catch((function(){e.setState({showImageLoading:!1,dragEnter:!1})}))},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,i=e.dragEnter,a=e.height,s=e.width,l=e.alt,c=this.props,d=c.config,p=d.popupClassName,f=d.uploadCallback,m=d.uploadEnabled,h=d.urlEnabled,g=d.previewImage,v=d.inputAccept,A=d.alt,y=c.doCollapse,b=c.translations;return o.a.createElement("div",{className:u()("rdw-image-modal",p),onClick:this.stopPropagation},o.a.createElement("div",{className:"rdw-image-modal-header"},m&&f&&o.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},b["components.controls.image.fileUpload"],o.a.createElement("span",{className:u()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),h&&o.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},b["components.controls.image.byURL"],o.a.createElement("span",{className:u()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?o.a.createElement("div",{onClick:this.fileUploadClick},o.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:u()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":i})},o.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},g&&t?o.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||b["components.controls.image.dropFileText"])),o.a.createElement("input",{type:"file",id:"file",accept:v,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):o.a.createElement("div",{className:"rdw-image-modal-url-section"},o.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:b["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),A.present&&o.a.createElement("div",{className:"rdw-image-modal-size"},o.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},A.mandatory&&"*")),o.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",o.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),o.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),o.a.createElement("span",{className:"rdw-image-modal-btn-section"},o.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!s||A.mandatory&&!l},b["generic.add"]),o.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},b["generic.cancel"])),r?o.a.createElement("div",{className:"rdw-image-modal-spinner"},o.a.createElement(Tn,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,i=t.title,a=e.expanded,s=e.onExpandEvent,l=e.translations;return o.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},o.a.createElement(H,{className:u()(r),value:"unordered-list-item",onClick:s,title:i||l["components.controls.image.image"]},o.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();kn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var Ln=kn;function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hn(e,t){return(Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wn(e);if(t){var o=Wn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===In(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Wn(e){return(Wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hn(e,t)}(i,r.Component);var e,t,n=Rn(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,o){var i=t.props,a=i.editorState,l=i.onChange,c={src:e,height:n,width:r};i.config.alt.present&&(c.alt=o);var u=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();l(s.AtomicBlockUtils.insertAtomicBlock(a,u," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||Ln;return o.a.createElement(i,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Sn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Vn(e){var t=e.config,n=e.onChange,r=e.translations,i=t.icon,a=t.className,s=t.title;return o.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},o.a.createElement(H,{className:u()(a),onClick:n,title:s||r["components.controls.remove.remove"]},o.a.createElement("img",{src:i,alt:""})))}Fn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Qn=Fn;n(31),Vn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Xn=Vn;function Yn(e){return(Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zn(e,t){return(Zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Un(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qn(e);if(t){var o=qn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Yn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qn(e){return(qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zn(e,t)}(i,r.Component);var e,t,n=Un(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach((function(n){t=s.Modifier.removeInlineStyle(t,e.getSelection(),n)})),C(Object(l.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),(function(n,r){r&&(t=s.Modifier.removeInlineStyle(t,e.getSelection(),r))})),s.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=i,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,i=t.component||Xn;return o.a.createElement(i,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Gn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Jn(e){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $n(e,t){return($n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tr(e);if(t){var o=tr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function tr(e){return(tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Kn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var nr=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$n(e,t)}(i,r.Component);var e,t,n=er(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=i,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,i=e.onExpandEvent,a=e.doCollapse,s=e.currentState,l=s.undoDisabled,c=s.redoDisabled,d=e.translations,p=t.options,f=t.undo,m=t.redo,h=t.className,g=t.dropdownClassName,v=t.title;return o.a.createElement(X,{className:u()("rdw-history-dropdown",h),optionWrapperClassName:u()(g),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:i,"aria-label":"rdw-history-control",title:v||d["components.controls.history.history"]},o.a.createElement("img",{src:z(t),alt:""}),0<=p.indexOf("undo")&&o.a.createElement(J,{value:"undo",onClick:this.onChange,disabled:l,className:u()("rdw-history-dropdownoption",f.className),title:f.title||d["components.controls.history.undo"]},o.a.createElement("img",{src:f.icon,alt:""})),0<=p.indexOf("redo")&&o.a.createElement(J,{value:"redo",onClick:this.onChange,disabled:c,className:u()("rdw-history-dropdownoption",m.className),title:m.title||d["components.controls.history.redo"]},o.a.createElement("img",{src:m.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,i=t.redo,a=t.className,s=e.currentState,l=s.undoDisabled,c=s.redoDisabled,d=e.translations;return o.a.createElement("div",{className:u()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&o.a.createElement(H,{value:"undo",onClick:this.onChange,className:u()(r.className),disabled:l,title:r.title||d["components.controls.history.undo"]},o.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&o.a.createElement(H,{value:"redo",onClick:this.onChange,className:u()(i.className),disabled:c,title:i.title||d["components.controls.history.redo"]},o.a.createElement("img",{src:i.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&_n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function rr(e){return(rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ir(e,t){return(ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sr(e);if(t){var o=sr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function sr(e){return(sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}nr.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var lr=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ir(e,t)}(i,r.Component);var e,t,n=ar(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,o=n.onChange,i=s.EditorState[e](r);i&&o(i)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},o=e.editorState,a=e.modalHandler;return o&&(r.undoDisabled=0===o.getUndoStack().size,r.redoDisabled=0===o.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=i,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,i=r.undoDisabled,a=r.redoDisabled,s=r.expanded,l=t.component||nr;return o.a.createElement(l,{config:t,translations:n,currentState:{undoDisabled:i,redoDisabled:a},expanded:s,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&or(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();lr.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var cr={inline:ce,blockType:je,fontSize:Le,fontFamily:Ue,list:at,textAlign:At,colorPicker:Et,link:$t,embedded:mn,emoji:zn,image:Qn,remove:Kn,history:lr},ur=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,dr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function pr(e){return String(e).replace(ur,"").match(dr)?e:"#"}function fr(e){return(fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vr(e);if(t){var o=vr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===fr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ar(e,t,n){e.findEntityRanges((function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()}),t)}function yr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,i=gr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,o=window.open(pr(r),"blank");o&&o.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,i=e.contentState.getEntity(r).getData(),a=i.url,s=i.targetOption,l=this.state.showPopOver;return o.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},o.a.createElement("a",{href:pr(a),target:s},t),l&&n?o.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&mr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xr(e,t,n){return t&&br(e.prototype,t),n&&br(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var wr=xr((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,i=e.contentState.getEntity(n).getData(),a=i.url,s=i.value;return o.a.createElement("a",{href:a||s,className:u()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t}));wr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges((function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()}),t)};var jr=wr;function Cr(e){return(Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mr(e,t){return(Mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zr(e);if(t){var o=zr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Cr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function zr(e){return(zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dr(e,t,n){return t&&Tr(e.prototype,t),n&&Tr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Nr=Dr((function e(t){var n=this;Pr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,o=r.separator,i=r.trigger,a=r.getSuggestions,s=(0,r.getEditorState)().getSelection();if(s.get("anchorKey")===e.get("key")&&s.get("anchorKey")===s.get("focusKey")){var l=e.getText(),c=(l=l.substr(0,s.get("focusOffset")===l.length-1?l.length:s.get("focusOffset")+1)).lastIndexOf(o+i),u=o+i;if((void 0===c||c<0)&&l[0]===i&&(c=0,u=i),0<=c){var d=l.substr(c+u.length,l.length);a().some((function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(d):0<=e.value.toLowerCase().indexOf(d&&d.toLowerCase()))}))&&t(0===c?0:c+1,l.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mr(e,t)}(n,r.Component);var e=Or(n);function n(){var r;Pr(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=e.call.apply(e,[this].concat(i))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,x()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),o=t.getSuggestions();r.filteredSuggestions=o&&o.filter((function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))}))},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),o=t.onChange,i=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,o){var i=o.value,a=o.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(i),value:i,url:a}).getLastCreatedEntityKey(),u=Object(l.getSelectedBlock)(e).getText(),d=e.getSelection().focusOffset,p=(u.lastIndexOf(n+r,d)||0)+1,f=!1;u.length===p+1&&(d=u.length)," "===u[d]&&(f=!0);var m=e.getSelection().merge({anchorOffset:p,focusOffset:d}),h=s.EditorState.acceptSelection(e,m),g=s.Modifier.replaceText(h.getCurrentContent(),m,"".concat(r).concat(i),h.getCurrentInlineStyle(),c);h=s.EditorState.push(h,g,"insert-characters"),f||(m=h.getSelection().merge({anchorOffset:p+i.length+r.length,focusOffset:p+i.length+r.length}),h=s.EditorState.acceptSelection(h,m),g=s.Modifier.insertText(h.getCurrentContent(),m," ",h.getCurrentInlineStyle(),void 0)),t(s.EditorState.push(h,g,"insert-characters"))}(n,o,i,a,c)},r}return Dr(n,[{key:"componentDidMount",value:function(){var e,n,r,o=t.getWrapperRef().getBoundingClientRect(),i=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();o.width<i.left-o.left+a.width?n=15:e=15,o.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),y.registerCallBack(this.onEditorKeyDown),b(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){y.deregisterCallBack(this.onEditorKeyDown),x(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,i=r.activeOption,a=r.showSuggestions,s=t.dropdownClassName,l=t.optionClassName;return o.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},o.a.createElement("span",null,n),a&&o.a.createElement("span",{className:u()("rdw-suggestion-dropdown",s),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map((function(t,n){return o.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:u()("rdw-suggestion-option",l,{"rdw-suggestion-option-active":n===i})},t.text)}))))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var i=t.separator,c=t.trigger,d=t.getSuggestions,p=t.onChange,f=t.getEditorState,m=t.getWrapperRef,h=t.caseSensitive,g=t.dropdownClassName,v=t.optionClassName,A=t.modalHandler;this.config={separator:i,trigger:c,getSuggestions:d,onChange:p,getEditorState:f,getWrapperRef:m,caseSensitive:h,dropdownClassName:g,optionClassName:v,modalHandler:A}})),Er=function(e){return[new jr(e.mentionClassName).getMentionDecorator(),new Nr(e).getSuggestionDecorator()]};function Br(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kr(e,t,n){return t&&Br(e.prototype,t),n&&Br(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,i=n.height,a=n.width;return o.a.createElement("iframe",{height:i,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Ir=kr((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return o.a.createElement("a",{href:r,className:u()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),o=0,i=0;0<r.length&&0<=o;)if(r[0]===n.hashCharacter?(i=o=0,r=r.substr(n.hashCharacter.length)):0<=(o=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(o+(n.separator+n.hashCharacter).length),i+=o+n.separator.length),0<=o){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,s=r.substr(0,a);s&&0<s.length&&(t(i,i+s.length+n.hashCharacter.length),i+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "})),Sr=function(e){return new Ir(e).getHashtagDecorator()};Lr.propTypes={block:a.a.object,contentState:a.a.object};var Hr=Lr;function Rr(e){return(Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fr(e,t){return(Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qr(e);if(t){var o=Qr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qr(e){return(Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Xr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fr(e,t)}(a,r.Component);var t,n,i=Vr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=i.call.apply(i,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,o=r.block,i=r.contentState,a=o.getEntityAt(0);i.mergeEntityData(a,{alignment:n}),e.onChange(s.EditorState.push(e.getEditorState(),i,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return o.a.createElement("div",{className:u()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},o.a.createElement(H,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),o.a.createElement(H,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),o.a.createElement(H,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,i=this.state.hovered,a=e.isReadOnly,s=e.isImageAlignmentEnabled,l=r.getEntity(n.getEntityAt(0)).getData(),c=l.src,d=l.alignment,p=l.height,f=l.width,m=l.alt;return o.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:u()("rdw-image-alignment",{"rdw-image-left":"left"===d,"rdw-image-right":"right"===d,"rdw-image-center":!d||"none"===d})},o.a.createElement("span",{className:"rdw-image-imagewrapper"},o.a.createElement("img",{src:c,alt:m,style:{height:p,width:f}}),!a()&&i&&s()?this.renderAlignmentOptions(d):void 0))}}])&&Wr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Yr=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var o=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(o&&"IMAGE"===o.type)return{component:Xr(e),editable:!1};if(o&&"EMBEDDED_LINK"===o.type)return{component:Hr,editable:!1}}}},Gr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44ND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S44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42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kuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMy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Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzL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ItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Zr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kr(Object(n),!0).forEach((function(t){_r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $r(e){return function(e){if(Array.isArray(e))return eo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function to(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ro(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oo(e);if(t){var o=oo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function oo(e){return(oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var io=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&no(e,t)}(i,r.Component);var e,t,n=ro(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(s.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(l.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,o=n.onEditorStateChange;r||"atomic"===Object(l.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(o&&o(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat($r(t.props.customDecorators),[{strategy:Ar,component:yr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,$r(Er(Jr(Jr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(Sr(t.props.hashtag)),new s.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout((function(){var n=t.props,r=n.onChange,o=n.onContentStateChange;r&&r(Object(s.convertToRaw)(e.getCurrentContent())),o&&o(Object(s.convertToRaw)(e.getCurrentContent()))}))},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=s.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=s.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(s.convertFromRaw)(t.props.contentState);n=s.EditorState.createWithContent(r,e),n=s.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var o=t.props.defaultContentState||t.props.initialContentState;o&&(o=Object(s.convertFromRaw)(o),n=s.EditorState.createWithContent(o,e),n=s.EditorState.moveSelectionToEnd(n))}return n||s.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter((function(e){return n.indexOf(e)<0})),o={},r&&0<r.length&&r.forEach((function(e){o[e]=t[e]})),o;var t,n,r,o},t.getStyleMap=function(e){return Jr(Jr({},Object(l.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(s.convertFromRaw)(e),r=t.state.editorState;return r=s.EditorState.push(r,n,"insert-characters"),s.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout((function(){t.editor.focus()}))},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,o=n.toolbar.inline;if(o&&0<=o.options.indexOf(e)){var i=s.RichUtils.handleKeyCommand(r,e);if(i)return t.onChange(i),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(l.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,o=t.props,i=o.handlePastedText,a=o.stripPastedStyles;return i?i(e,n,r,t.onChange):!a&&function(e,t,n,r){var o=Object(l.getSelectedBlock)(n);if(o&&"code"===o.type){var i=s.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(s.EditorState.push(n,i,"insert-characters")),!0}if(t){var a=P()(t),c=n.getCurrentContent();return a.entityMap.forEach((function(e,t){c=c.mergeEntityData(t,e)})),c=s.Modifier.replaceWithFragment(c,n.getSelection(),new N.List(a.contentBlocks)),r(s.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=T(Gr,e.toolbar),o=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(o),t.modalHandler=new f,t.focusHandler=new v,t.blockRendererFn=Yr({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(l.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=i,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,o=n.contentState;if(!this.state.toolbar){var i=T(Gr,i);t.toolbar=i}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?s.EditorState.set(r,{decorator:this.compositeDecorator}):s.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&o!==e.contentState)if(o){var a=this.changeEditorState(o);a&&(t.editorState=a)}else t.editorState=s.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===o||Object(l.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,i=this.props,a=i.locale,c=i.localization,d=c.locale,p=c.translations,f=i.toolbarCustomButtons,m=i.toolbarOnFocus,h=i.toolbarClassName,g=i.toolbarHidden,v=i.editorClassName,A=i.wrapperClassName,b=i.toolbarStyle,x=i.editorStyle,w=i.wrapperStyle,C=i.uploadCallback,M=i.ariaLabel,O={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Jr(Jr({},Zr[a||d]),p)},z=n||this.focusHandler.isInputFocused()||!m;return o.a.createElement("div",{id:this.wrapperId,className:u()(A,"rdw-editor-wrapper"),style:w,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!g&&o.a.createElement("div",{className:u()("rdw-editor-toolbar",h),style:Jr({visibility:z?"visible":"hidden"},b),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&m).toString(),onFocus:this.onToolbarFocus},r.options.map((function(e,t){var n=cr[e],i=r[e];return"image"===e&&C&&(i.uploadCallback=C),o.a.createElement(n,qr({key:t},O,{config:i}))})),f&&f.map((function(e,t){return o.a.cloneElement(e,Jr({key:t},O))}))),o.a.createElement("div",{ref:this.setWrapperReference,className:u()(v,"rdw-editor-main"),style:x,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:y.onKeyDown,onMouseDown:this.onEditorMouseDown},o.a.createElement(s.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:j,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:M||"rdw-editor",blockRenderMap:l.blockRenderMap},this.editorProps))))}}])&&to(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();io.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},io.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ao=io}],r.c=i,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o,i}(e,D,vM());var bM=yM.exports;function xM(e){var t=e.html,n=void 0;"undefined"!=typeof document&&(n=AM(t));var r=n?D.EditorState.createWithContent(D.ContentState.createFromBlockArray(n.contentBlocks,n.entityMap)):D.EditorState.createEmpty();return U.jsx(bM.Editor,{editorState:r,readOnly:!0,toolbarHidden:!0})}function wM(e){var t=e.stringifiedJson,n=void 0;"undefined"!=typeof document&&(n=JSON.parse(t));var r=n?D.EditorState.createWithContent(D.convertFromRaw(n)):D.EditorState.createEmpty();return U.jsx(bM.Editor,{editorState:r,readOnly:!0,toolbarHidden:!0})}function jM(e){var t=e.value,r=e.type;return U.jsx(n.Card,{sx:{py:1,px:3},children:r&&r===exports.FieldTypes.RICH_TEXT_I?U.jsx(fM,{htmlString:t}):r&&r===exports.FieldTypes.JSON_RICH_TEXT?U.jsx(wM,{stringifiedJson:t}):U.jsx(xM,{html:t})})}function CM(e){var t=e.link,r=function(){var e="http"!==t.slice(0,4)?"https://"+t:t;window.open(e,"_blank")};return U.jsx(n.Chip,{label:t,size:"medium",color:"primary",clickable:!0,onClick:r,deleteIcon:U.jsx(To,{icon:"gridicons:external"}),onDelete:r})}function MM(e){var t=e.value;return U.jsx(n.Grid,{container:!0,justifyContent:"start",rowGap:"10px",columnGap:"10px",alignItems:"center",width:"100%",children:t.map((function(e){return U.jsx(n.Chip,{label:e,size:"small"})}))})}var OM="---";function zM(e){var t=e.value,r=e.fieldschema,o=e.type,i=e.enumvalues,a=e.children;if(null==t)return U.jsx(n.Typography,q({},e,{children:OM}));switch(o){case exports.FieldTypes.STRING:case exports.FieldTypes.NUMBER:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.PASSWORD:return U.jsx(n.Typography,q({},e,{sx:{wordWrap:"break-word",whiteSpace:"pre-line"},children:t}));case exports.FieldTypes.NESTEDSCHEMA:return U.jsx(WC,q({},e,{value:t,fieldschema:r}));case exports.FieldTypes.LOCALIZEDString:return U.jsx(FC,{value:t});case exports.FieldTypes.BOOLEAN:return U.jsx(n.Chip,{label:t?t.toString():"false",variant:"outlined",size:"small"});case exports.FieldTypes.COLOR:return U.jsx(n.Typography,q({},e,{color:t,children:t}));case exports.FieldTypes.DATE:return U.jsx(nM,q({},e));case exports.FieldTypes.ENUM:return U.jsx(rM,q({enumvalues:i},e));case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.JSON_RICH_TEXT:return U.jsx(jM,q({},e));case exports.FieldTypes.LOCATION:return U.jsx(oM,q({},e));case exports.FieldTypes.IMAGE:return U.jsx(lM,q({},e));case exports.FieldTypes.MULTIPLE_TEXT:return U.jsx(MM,q({},e));case exports.FieldTypes.ARRAY:return t&&t.length>0?U.jsx(iM,q({},e,{value:t,children:a})):U.jsx(n.Typography,q({},e,{children:OM}));case exports.FieldTypes.REFERENCE:return U.jsx(pM,q({},e));case exports.FieldTypes.EXTERNAL_LINK:return U.jsx(CM,{link:e.value});default:return U.jsx(U.Fragment,{})}}var TM=function(){function e(){}return e.enhance=function(e){var t=this;return e?e.includes("_")?e.split("_").map((function(e){return t.enhanceEnum(e)})).join(" "):this.enhanceEnum(e):OM},e.enhanceEnum=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e}();function DM(e){var t,r=e.values,o=e.name,i=e.label,a=e.size,s=e.disabled;return U.jsx(Gu,{name:o,size:a,label:i,disabled:s,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:null===(t=Object.keys(r))||void 0===t?void 0:t.map((function(e){var t,o,i,a=(null===(t=r[e])||void 0===t?void 0:t.label)?e:r[e],s=null!==(i=null===(o=r[e])||void 0===o?void 0:o.label)&&void 0!==i?i:r[e];return U.jsx(n.MenuItem,{value:a,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:TM.enhance(s)},a)}))})}function PM(e){var t=e.label,r=e.name,o=e.handleDrop;return U.jsx(Iu,{name:r,label:t,accept:{"image/*":[".jpeg",".png","jpg",".webp"]},maxSize:3145728,onDrop:function(e){return o(e,r)},helperText:U.jsxs(n.Typography,{variant:"caption",sx:{mt:2,mx:"auto",display:"block",textAlign:"center",color:"text.secondary"},children:["Add your ",t,U.jsx("br",{}),U.jsx("br",{})," max size of ",Qa(3145728)]})})}function NM(e){var t=e.key,r=e.label,o=e.name,i=e.handleDrop;return U.jsx(n.Grid,{item:!0,xs:12,md:3,children:U.jsx(n.Box,{sx:{mb:5,mt:5},children:U.jsx(PM,{label:r,name:o,handleDrop:i})})},t)}function EM(e){var t=e.name,n=e.minDate,r=e.maxDate,o=K(e,["name","minDate","maxDate"]),i=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:i,render:function(e){var t=e.field,i=e.fieldState.error;return U.jsx(v.DateTimePicker,{label:o.label,value:new Date(t.value),minDate:null==n?void 0:n.getDate(),maxDate:null==r?void 0:r.getDate(),onChange:function(e){t.onChange(e)},slotProps:{textField:{fullWidth:!0,margin:"normal",helperText:null==i?void 0:i.message,error:!!i}}})}})}var BM={exports:{}};BM.exports=function(){function e(e,t){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&t(n,e[n])}function t(e){return null==e||0===e.length||0===e.trim().length}var n={unstyled:"p","header-one":"h1","header-two":"h2","header-three":"h3","header-four":"h4","header-five":"h5","header-six":"h6","unordered-list-item":"ul","ordered-list-item":"ol",blockquote:"blockquote",code:"pre"};function r(e){return e&&n[e]}function o(t){var n="";return e(t,(function(e,t){t&&(n+="".concat(e,":").concat(t,";"))})),n}function i(e,t){var n=[];if(t)for(var r=0,o=0,i=e,a=t.trigger||"#",s=t.separator||" ";i.length>0&&o>=0;)if(i[0]===a?(o=0,r=0,i=i.substr(a.length)):(o=i.indexOf(s+a))>=0&&(i=i.substr(o+(s+a).length),r+=o+s.length),o>=0){var l=i.indexOf(s)>=0?i.indexOf(s):i.length,c=i.substr(0,l);c&&c.length>0&&n.push({offset:r,length:c.length+a.length,type:"HASHTAG"}),r+=a.length}return n}function a(e,t){var n=[],r=0,o=e.entityRanges.map((function(e){return{offset:e.offset,length:e.length,key:e.key,type:"ENTITY"}}));return(o=(o=o.concat(i(e.text,t))).sort((function(e,t){return e.offset-t.offset}))).forEach((function(e){e.offset>r&&n.push({start:r,end:e.offset}),n.push({start:e.offset,end:e.offset+e.length,entityKey:e.key,type:e.type}),r=e.offset+e.length})),r<e.text.length&&n.push({start:r,end:e.text.length}),n}function s(e){return!(!(e.entityRanges.length>0)||!t(e.text)&&"atomic"!==e.type)}function l(e){var t=e.text,n=e.inlineStyleRanges,r={BOLD:new Array(t.length),ITALIC:new Array(t.length),UNDERLINE:new Array(t.length),STRIKETHROUGH:new Array(t.length),CODE:new Array(t.length),SUPERSCRIPT:new Array(t.length),SUBSCRIPT:new Array(t.length),COLOR:new Array(t.length),BGCOLOR:new Array(t.length),FONTSIZE:new Array(t.length),FONTFAMILY:new Array(t.length),length:t.length};return n&&n.length>0&&n.forEach((function(e){for(var t=e.offset,n=t+e.length,o=t;o<n;o+=1)0===e.style.indexOf("color-")?r.COLOR[o]=e.style.substring(6):0===e.style.indexOf("bgcolor-")?r.BGCOLOR[o]=e.style.substring(8):0===e.style.indexOf("fontsize-")?r.FONTSIZE[o]=e.style.substring(9):0===e.style.indexOf("fontfamily-")?r.FONTFAMILY[o]=e.style.substring(11):r[e.style]&&(r[e.style][o]=!0)})),r}function c(e,t){var n={};return e.COLOR[t]&&(n.COLOR=e.COLOR[t]),e.BGCOLOR[t]&&(n.BGCOLOR=e.BGCOLOR[t]),e.FONTSIZE[t]&&(n.FONTSIZE=e.FONTSIZE[t]),e.FONTFAMILY[t]&&(n.FONTFAMILY=e.FONTFAMILY[t]),e.UNDERLINE[t]&&(n.UNDERLINE=!0),e.ITALIC[t]&&(n.ITALIC=!0),e.BOLD[t]&&(n.BOLD=!0),e.STRIKETHROUGH[t]&&(n.STRIKETHROUGH=!0),e.CODE[t]&&(n.CODE=!0),e.SUBSCRIPT[t]&&(n.SUBSCRIPT=!0),e.SUPERSCRIPT[t]&&(n.SUPERSCRIPT=!0),n}function u(e,t,n){var r=!0;return n>0&&n<e.length?t.forEach((function(t){r=r&&e[t][n]===e[t][n-1]})):r=!1,r}function d(e,t){return"BOLD"===e?"<strong>".concat(t,"</strong>"):"ITALIC"===e?"<em>".concat(t,"</em>"):"UNDERLINE"===e?"<ins>".concat(t,"</ins>"):"STRIKETHROUGH"===e?"<del>".concat(t,"</del>"):"CODE"===e?"<code>".concat(t,"</code>"):"SUPERSCRIPT"===e?"<sup>".concat(t,"</sup>"):"SUBSCRIPT"===e?"<sub>".concat(t,"</sub>"):t}function p(e){return e&&e.length>0?e.map((function(e){switch(e){case"\n":return"<br>";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";default:return e}})).join(""):""}function f(e,t){if(e&&(e.COLOR||e.BGCOLOR||e.FONTSIZE||e.FONTFAMILY)){var n='style="';return e.COLOR&&(n+="color: ".concat(e.COLOR,";")),e.BGCOLOR&&(n+="background-color: ".concat(e.BGCOLOR,";")),e.FONTSIZE&&(n+="font-size: ".concat(e.FONTSIZE).concat(/^\d+$/.test(e.FONTSIZE)?"px":"",";")),e.FONTFAMILY&&(n+="font-family: ".concat(e.FONTFAMILY,";")),"<span ".concat(n+='"',">").concat(t,"</span>")}return t}function m(e,t,n,r){var o=e[t];if("function"==typeof r){var i=r(o,n);if(i)return i}if("MENTION"===o.type)return'<a href="'.concat(o.data.url,'" class="wysiwyg-mention" data-mention data-value="').concat(o.data.value,'">').concat(n,"</a>");if("LINK"===o.type){var a=o.data.targetOption||"_self";return'<a href="'.concat(o.data.url,'" target="').concat(a,'">').concat(n,"</a>")}if("IMAGE"===o.type){var s=o.data.alignment;return s&&s.length?'<div style="text-align:'.concat(s,';"><img src="').concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/></div>'):'<img src="'.concat(o.data.src,'" alt="').concat(o.data.alt,'" style="height: ').concat(o.data.height,";width: ").concat(o.data.width,'"/>')}return"EMBEDDED_LINK"===o.type?'<iframe width="'.concat(o.data.width,'" height="').concat(o.data.height,'" src="').concat(o.data.src,'" frameBorder="0"></iframe>'):n}function h(e,t,n,r){var o=[],i=Array.from(e.text);if(i.length>0)for(var a,s=l(e),d=n;d<r;d+=1)d!==n&&u(s,t,d)?(a.text.push(i[d]),a.end=d+1):(a={styles:c(s,d),text:[i[d]],start:d,end:d+1},o.push(a));return o}function g(e){if(e){for(var t=e,n=0;n<t.length&&" "===e[n];n+=1)t=t.replace(" ","&nbsp;");return t}return e}function v(e){if(e){for(var t=e,n=t.length-1;n>=0&&" "===t[n];n-=1)t="".concat(t.substring(0,n),"&nbsp;").concat(t.substring(n+1));return t}return e}function A(t){var n=t.styles,r=p(t.text);return e(n,(function(e,t){r=d(e,r)})),r}function y(e,t){var n=h(e,["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"],t.start,t.end),r="";return n.forEach((function(e){r+=A(e)})),r=f(t.styles,r)}function b(e,t,n,r){var o=[];h(e,["COLOR","BGCOLOR","FONTSIZE","FONTFAMILY"],n.start,n.end).forEach((function(t){o.push(y(e,t))}));var i=o.join("");return"ENTITY"===n.type?void 0!==n.entityKey&&null!==n.entityKey&&(i=m(t,n.entityKey,i,r)):"HASHTAG"===n.type&&(i='<a href="'.concat(i,'" class="wysiwyg-hashtag">').concat(i,"</a>")),i}function x(e,t,n,r){var o=[],i=a(e,n);return i.forEach((function(n,a){var s=b(e,t,n,r);0===a&&(s=g(s)),a===i.length-1&&(s=v(s)),o.push(s)})),o.join("")}function w(e,t,n,i,a){var l=[];if(s(e))l.push(m(t,e.entityRanges[0].key,void 0,a));else{var c=r(e.type);if(c){l.push("<".concat(c));var u=o(e.data);u&&l.push(' style="'.concat(u,'"')),i&&l.push(' dir = "auto"'),l.push(">"),l.push(x(e,t,n,a)),l.push("</".concat(c,">"))}}return l.push("\n"),l.join("")}function j(e){return"unordered-list-item"===e||"ordered-list-item"===e}function C(e,t,n,i,a){var s,l=[],c=[];return e.forEach((function(e){var u=!1;if(s?s.type!==e.type?(l.push("</".concat(r(s.type),">\n")),l.push("<".concat(r(e.type),">\n"))):s.depth===e.depth?c&&c.length>0&&(l.push(C(c,t,n,i,a)),c=[]):(u=!0,c.push(e)):l.push("<".concat(r(e.type),">\n")),!u){l.push("<li");var d=o(e.data);d&&l.push(' style="'.concat(d,'"')),i&&l.push(' dir = "auto"'),l.push(">"),l.push(x(e,t,n,a)),l.push("</li>\n"),s=e}})),c&&c.length>0&&l.push(C(c,t,n,i,a)),l.push("</".concat(r(s.type),">\n")),l.join("")}function M(e,t,n,r){var o=[];if(e){var i=e.blocks,a=e.entityMap;if(i&&i.length>0){var s=[];if(i.forEach((function(e){if(j(e.type))s.push(e);else{if(s.length>0){var i=C(s,a,t,r);o.push(i),s=[]}var l=w(e,a,t,n,r);o.push(l)}})),s.length>0){var l=C(s,a,t,n,r);o.push(l),s=[]}}}return o.join("")}return M}();var kM,LM,IM=F(BM.exports);function SM(t){var n=t.name,r=t.disabled,o=c.useFormContext(),i=o.control,a=o.setValue,s=o.getValues,l=e.useState({editorState:s(n)&&""!==s(n)?D.EditorState.createWithContent(D.ContentState.createFromBlockArray(AM(s(n)).contentBlocks,AM(s(n)).entityMap)):D.EditorState.createEmpty()}),u=l[0],d=l[1],p=function(e){d({editorState:e}),a(n,IM(D.convertToRaw(e.getCurrentContent())))},f=function(e,t,n){var r=D.convertFromHTML(t),o=D.ContentState.createFromBlockArray(r.contentBlocks,r.entityMap),i=n.getCurrentContent(),a=D.Modifier.replaceWithFragment(i,i.getSelectionAfter(),o.getBlockMap()),s=D.EditorState.push(n,a,"insert-fragment");return p(s),!0};return U.jsx(c.Controller,{name:n,control:i,render:function(e){return e.field,e.fieldState.error,U.jsxs("div",{children:[U.jsx("style",{children:"\n .rdw-editor-toolbar {\n background-color: #E5E4E2;\n border-radius: 10px;\n }\n "}),U.jsx(bM.Editor,{editorState:u.editorState,wrapperClassName:"wrapper",editorClassName:"editor",placeholder:"Write your text here",onEditorStateChange:p,readOnly:r,handlePastedText:f})]})}})}function HM(t){var r=t.name,o=t.disabled,i=c.useFormContext(),a=i.control,s=i.setValue,l=i.getValues,u=hv.isEnglish(),d=l(r)?JSON.parse(l(r)):null,p=e.useState((function(){return(e=d)&&"object"==typeof e&&Array.isArray(e.blocks)&&"object"==typeof e.entityMap?D.EditorState.createWithContent(D.convertFromRaw(d)):D.EditorState.createEmpty();var e})),f=p[0],m=p[1],h=function(e){m(e);var t=JSON.stringify(D.convertToRaw(e.getCurrentContent())),n=!e.getCurrentContent().hasText();s(r,n?"":t)},g=function(e,t,n){if(!t)return!1;var r=D.convertFromHTML(t),o=D.ContentState.createFromBlockArray(r.contentBlocks,r.entityMap),i=n.getCurrentContent(),a=D.Modifier.replaceWithFragment(i,n.getSelection(),o.getBlockMap()),s=D.EditorState.push(n,a,"insert-fragment");return h(s),!0};return U.jsx(c.Controller,{name:r,control:a,render:function(e){var t=e.fieldState.error;return U.jsxs("div",{children:[U.jsx("style",{children:"\n .rdw-editor-toolbar {\n background-color: #E5E4E2;\n border-radius: 10px;\n }\n "}),U.jsx(bM.Editor,{editorState:f,wrapperClassName:"wrapper",editorClassName:"editor",placeholder:u?"Start typing here...":"ابدأ الكتابة هنا...",onEditorStateChange:h,readOnly:o,handlePastedText:g,toolbar:{options:["inline","blockType","list","textAlign","history"],inline:{options:["bold","italic","underline"]},blockType:{options:["Normal","H1","H2"]},list:{options:["unordered","ordered"]},textAlign:{options:["left","center","right"]},history:{options:["undo","redo"]}}}),t&&U.jsx(n.FormHelperText,{error:!0,children:t.message})]})}})}function RM(e){var t=e.label,r=e.type;return U.jsxs(n.Stack,{spacing:1,children:[U.jsx(n.Typography,{variant:"subtitle2",sx:{color:"text.secondary"},children:t}),r===kM.TYPE_ONE?U.jsx(Xu,q({simple:!0},e)):r===kM.JSON_TYPE?U.jsx(HM,q({},e)):U.jsx(SM,q({},e))]})}function WM(e){var t=e.referencedValues,n=e.value,r=e.loading,o=e.extraKey,i=e.fullKey,a=e.key,s=e.apiRoute,l=e.resources,c=e.pathRoute,u=e.schema,d=e.setLoading,p=e.setReferencedValues,f=e.page,m=e.filter,h=e.filters;return J(this,void 0,void 0,(function(){var e,g,v,A,y,b,x,w,j,C,M,O,z,T,D,P,N;return _(this,(function(E){switch(E.label){case 0:return n?(e=t[a],g=null==e?void 0:e.page,!e||e.hasNext||m||e.filter!==m?g===f&&e.filter===m?[2]:((v=q({},r))[i]=!0,d(v),A=m?"&filter=".concat(m):"",h&&(A+="&filters=".concat(h)),y=s||u[a].apiRoute,[4,Bh.get(y+"?page=".concat(f).concat(A))]):[2]):[2];case 1:for(b=E.sent(),x=b.data.data,w=x.records,j=x.pageInfo,C=[],M=0;M<w.length;M++)O=w[M],z=l[c||u[a].path],T=ey.getReferenceImage(z,O),D=q(q({},O),{image:T}),o&&(D[o]=O[o]),C.push(D);return(P=q({},t))[a]={data:g===f?C:P[a]&&P[a].data?P[a].data.concat(C):C,page:w.length>0?f:g,filter:m,hasNext:j.nextPage>0},p(P),(N=q({},r))[i]=!1,d(N),[2]}}))}))}!function(e){e[e.TYPE_ONE=0]="TYPE_ONE",e[e.TYPE_TWO=1]="TYPE_TWO",e[e.JSON_TYPE=2]="JSON_TYPE"}(kM||(kM={})),function(e){e.FORM_LIST="formList",e.FILTER_LIST="filterList"}(LM||(LM={}));var FM,VM,QM,XM=function(e,t,n,r){var o,i,a;if(!e[t])return"";var s=null===(o=e[t].filter)||void 0===o?void 0:o[n];if(!s||!r)return"";var l=null!==(a=null===(i=null==r?void 0:r.properties)||void 0===i?void 0:i.model)&&void 0!==a?a:{},c=Object.entries(s).filter((function(e){var t,n=e[0];return null===(t=l[n])||void 0===t?void 0:t.type})).map((function(e){var t,n=e[0],r=e[1];return"".concat(n,"=").concat(r,";;").concat(null===(t=l[n])||void 0===t?void 0:t.type,"^^")})).join("");return encodeURIComponent(c)};function YM(t){var r=t.name,o=t.label,i=t.placeholder;K(t,["name","label","placeholder"]);var a=c.useFormContext().control,s=Vg().translate;return U.jsx(c.Controller,{control:a,name:r,render:function(t){var r=t.field,a=r.onChange,l=r.value,c=t.fieldState.error;return U.jsx(n.Autocomplete,{value:l||[],multiple:!0,id:"tags-filled",options:[],filterOptions:function(e,t){var n=$([],e,!0),r=t.inputValue;return""!==r&&n.push("".concat(s("Add"),' "').concat(r,'"')),n},onChange:function(e,t){var n=t.map((function(e){if("string"==typeof e&&e.startsWith("".concat(s("Add")))){var t=e.match(/"([^"]+)"/);return t?t[1]:e}return e}));a(n)},freeSolo:!0,renderTags:function(t,r){return t.map((function(t,o){return e.createElement(n.Chip,q({variant:"outlined",label:t},r({index:o}),{key:"".concat(o)}))}))},renderInput:function(e){var t,r,a;return U.jsx(n.TextField,q({},e,{label:o,size:"small",placeholder:i,error:!!c,helperText:null!==(t=null==c?void 0:c.message)&&void 0!==t?t:null===(a=null===(r=Object(c))||void 0===r?void 0:r._id)||void 0===a?void 0:a.message}))}})}})}function GM(e){var t=e.name,r=e.label,o=e.placeholder,i=e.options;K(e,["name","label","placeholder","options"]);var a=c.useFormContext(),s=a.control,l=a.getValues;return U.jsx(c.Controller,{control:s,name:t,render:function(e){var a=e.field.onChange,s=e.fieldState.error;return U.jsx(n.Autocomplete,{defaultValue:l(t)?l(t):[],multiple:!0,id:"tags-filled",options:i,getOptionLabel:function(e){return e.label},filterSelectedOptions:!0,onChange:function(e,t){a(t.map((function(e){return e.value})))},isOptionEqualToValue:function(e,t){return e.value===t.value},renderInput:function(e){var t,i,a;return U.jsx(n.TextField,q({},e,{label:r,size:"small",placeholder:o,error:!!s,helperText:null!==(t=null==s?void 0:s.message)&&void 0!==t?t:null===(a=null===(i=Object(s))||void 0===i?void 0:i._id)||void 0===a?void 0:a.message}))}})}})}function ZM(e,t){var n=t[e].type;if(t[e].textArea)return FM.LARGE;switch(n){case exports.FieldTypes.PASSWORD:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.NUMBER:case exports.FieldTypes.STRING:case exports.FieldTypes.BOOLEAN:case exports.FieldTypes.COLOR:case exports.FieldTypes.ENUM:case exports.FieldTypes.EXTERNAL_LINK:case exports.FieldTypes.LOCATION:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.DATE:case exports.FieldTypes.MULTIPLE_TEXT:case exports.FieldTypes.TIMEPICKER:return FM.SMALL;case exports.FieldTypes.LOCALIZEDString:return FM.MEDIUM;case exports.FieldTypes.FILE:case exports.FieldTypes.IMAGE:return FM.LARGE;case exports.FieldTypes.REFERENCE:return t[e].mediaUploader?FM.LARGE:FM.SMALL;case exports.FieldTypes.ARRAY:return t[e].arrayType===exports.FieldTypes.ENUM?FM.SMALL:FM.CHANGEABLE;default:return FM.CHANGEABLE}}function UM(t){var o=this,i=t.isEdit,a=t.isDuplicate,s=t.id,u=t.record,d=t.path,p=t.mediaUploaderFields,f=t.onSubmitForm,m=t.referencedMap,h=t.modelRoute,g=t.redirectPath,v=t.afterCreateSnackText,A=t.afterEditSnackText,y=t.enableCreateNewButtonOnReference,b=t.keepFullWidthElements,x=t.fieldsMap,w=r.useNavigate(),j=e.useState({}),M=j[0],O=j[1],z=e.useState({}),T=z[0],D=z[1],P=e.useState(!1),N=P[0],E=P[1],B=r.useLocation(),k=Vg(),L=k.currentLang,I=k.translate,S=e.useState(L.index),R=S[0],W=S[1],F=e.useState({}),V=F[0],Q=F[1],X=e.useState({}),Y=X[0],G=X[1],Z=e.useState({}),ee=Z[0],te=Z[1],ne=e.useState(!1),re=ne[0],oe=ne[1],ie=e.useState(!1),ae=ie[0],se=ie[1],le=e.useState({}),ce=le[0],ue=le[1],de=e.useContext(dg).bucketUrl,pe=e.useContext(Kh).resources,fe=e.useContext(ug).textFieldSize,me=e.useContext(Ih).dashbaordUrlPrefix,he=e.useContext(Jh).paths,ge=i||a,ve=pe[d].properties.model,Ae=pe[d].formProperties,ye=hv.isEnglish(),be=ye?"Create new":" اضافة ",xe=ye?"Save changes":"تعديل ",we=Ig(),je=we.setSuccessAlert,Ce=we.setErrorAlert,Me={},Oe={};Ae.map((function(e,t){"_id"!==e&&"__v"!==e&&(Me[e]=Ge(ve[e],e))}));var ze=H.object().shape(Me),Te=e.useMemo((function(){return Oe}),[]),De=c.useForm({resolver:Pa(ze),defaultValues:Te}),Pe=De.reset,Ne=De.control,Ee=De.setValue,Be=De.getValues,ke=De.handleSubmit,Le=De.watch,Ie={},Se={};var He=function(e){var t=q({},Y);t[e]=!0,G(t)},Re=function(e,t){W(t)};function We(e,t,n){var r=q({},t);r[e]=!1,n(r)}function Fe(e,t,n,r){var o=q({},t);o[e]=r,n(o)}var Ve=function(e){var t=q({},ee);t[e]=void 0,te(t),Ee(e,void 0)};function Qe(e){var t,n,r,o,i,a,s,l,c,u=e.split("."),d=u[u.length-1],p=u.reduce((function(e,t,n){var r;return 0===n?null==e?void 0:e[t]:null===(r=null==e?void 0:e.schema)||void 0===r?void 0:r[t]}),ve);Se[d]={},Se[d][d]={type:null!==(t=null==p?void 0:p.arrayType)&&void 0!==t?t:"",enumValues:null!==(n=null==p?void 0:p.enumValues)&&void 0!==n?n:[],path:null!==(r=null==p?void 0:p.path)&&void 0!==r?r:"",includeFrench:null!==(o=null==p?void 0:p.includeFrench)&&void 0!==o&&o,includeGerman:null!==(i=null==p?void 0:p.includeGerman)&&void 0!==i&&i,includeSpanish:null!==(a=null==p?void 0:p.includeSpanish)&&void 0!==a&&a,includeDanish:null!==(s=null==p?void 0:p.includeDanish)&&void 0!==s&&s,includeNorwegian:null!==(l=null==p?void 0:p.includeNorwegian)&&void 0!==l&&l,includeSwedish:null!==(c=null==p?void 0:p.includeSwedish)&&void 0!==c&&c}}var Xe=function(e){W("1"),Ie[e].append()},Ye=function(e,t){t.destination&&Ie[e].move(t.source.index,t.destination.index)};function Ge(e,t){var n,r,o,a,s;switch(Oe[t]=void 0,e.type){case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.JSON_RICH_TEXT:case exports.FieldTypes.EXTERNAL_LINK:case exports.FieldTypes.STRING:Oe[t]=u?u[t]:"",s=H.string().nullable();break;case exports.FieldTypes.MULTIPLE_TEXT:Oe[t]=u?u[t]:void 0,s=H.array().typeError("".concat(e.value," ").concat(I("is required")));break;case exports.FieldTypes.OBJECTID:case exports.FieldTypes.PHONENUMBER:Oe[t]=u?u[t]:"",s=H.string();break;case exports.FieldTypes.LOCALIZEDString:var l=!!(u&&u[t]&&u[t].length>0);Oe[t]={en:l?u[t][0].value:"",ar:l?u[t].length>1?u[t][1].value:u[t][0].value:"",fr:e.includeFrench?l?u[t].length>2?u[t][2].value:u[t][0].value:"":void 0,de:e.includeGerman?l?u[t].length>3?u[t][3].value:u[t][0].value:"":void 0,es:e.includeSpanish?l?u[t].length>4?u[t][4].value:u[t][0].value:"":void 0,da:e.includeDanish?l?u[t].length>5?u[t][5].value:u[t][0].value:"":void 0,nb:e.includeNorwegian?l?u[t].length>6?u[t][6].value:u[t][0].value:"":void 0,sv:e.includeSwedish?l?u[t].length>7?u[t][7].value:u[t][0].value:"":void 0},s=H.mixed();break;case exports.FieldTypes.PASSWORD:Oe[t]=u?u[t]:void 0,s=ve[t]&&ve[t].yupValidationSchema?ve[t].yupValidationSchema:H.string().min(6,"Password must be at least 6 characters");break;case exports.FieldTypes.BOOLEAN:Oe[t]=!!u&&u[t],s=H.boolean();break;case exports.FieldTypes.IMAGE:Oe[t]=u?u[t]:"",s=H.string().nullable();break;case exports.FieldTypes.REFERENCE:pe[e.path],Oe[t]=u&&u[t]?u[t]:void 0,s=H.object().nullable();break;case exports.FieldTypes.LOCATION:var c=u&&u[t]?{description:null!==(r=null===(n=u[t])||void 0===n?void 0:n.address)&&void 0!==r?r:"",location:{type:"Point",coordinates:[null===(o=u[t])||void 0===o?void 0:o.longitude,null===(a=u[t])||void 0===a?void 0:a.latitude]}}:void 0;Oe[t]=c;break;case exports.FieldTypes.DATE:Oe[t]=u?u[t]:new Date,s=H.date().nullable();break;case exports.FieldTypes.NUMBER:Oe[t]=u?u[t]:void 0,s=H.number().nullable();break;case exports.FieldTypes.TIMEPICKER:Oe[t]=u?u[t]:"",s=H.string();break;case exports.FieldTypes.ENUM:Oe[t]=u?u[t]:ve[t]&&ve[t].defaultValue?ve[t].defaultValue:void 0,s=H.string();break;case exports.FieldTypes.ARRAY:switch(Oe[t]=u?u[t]:void 0,s=H.array(),e.arrayType){case exports.FieldTypes.NESTEDSCHEMA:var d=ve[t]?ve[t].keys:[],p=ve[t]?ve[t].schema:{},f={};Oe[t]=u?u[t]:[],null==d||d.map((function(e){"_id"!==e&&(f[e]=Ge(p[e],e))})),s=s.of(H.object().shape(f));break;case exports.FieldTypes.IMAGE:var m=u&&u[t]&&u[t]?u[t]:[];Oe[t]=m,s=s.of(H.mixed());break;case exports.FieldTypes.LOCALIZEDString:var h=[];if(u&&u[t]&&u[t].length)for(var g=0;g<u[t].length;g++){var v=u[t][g],A=$($($($($($([{key:"en",value:v&&v[0]&&v[0].value?v[0].value:""},{key:"ar",value:v&&v[1]&&v[1].value?v[1].value:""}],e.includeFrench?[{key:"fr",value:v&&v[2]&&v[2].value?v[2].value:""}]:[],!0),e.includeGerman?[{key:"de",value:v&&v[3]&&v[3].value?v[3].value:""}]:[],!0),e.includeSpanish?[{key:"es",value:v&&v[4]&&v[4].value?v[4].value:""}]:[],!0),e.includeDanish?[{key:"da",value:v&&v[5]&&v[5].value?v[5].value:""}]:[],!0),e.includeNorwegian?[{key:"nb",value:v&&v[6]&&v[6].value?v[6].value:""}]:[],!0),e.includeSwedish?[{key:"sv",value:v&&v[7]&&v[7].value?v[7].value:""}]:[],!0);h.push(A)}Oe[t]=h,s=s.of(H.mixed());break;case exports.FieldTypes.REFERENCE:!pe||pe[e.path],Oe[t]=u&&u[t]?u[t]:[],s=s.of(H.object());break;case exports.FieldTypes.ENUM:Oe[t]=u&&u[t]&&u[t].length>0?u[t].map((function(e){var n,r;return{label:TM.enhance(Array.isArray(ve[t].enumValues)?e:null!==(r=null===(n=ve[t].enumValues[e])||void 0===n?void 0:n.label)&&void 0!==r?r:e),value:e}})):[],s=H.array();break;default:Oe[t]=u&&u[t]?u[t]:void 0}break;case exports.FieldTypes.NESTEDSCHEMA:d=ve[t]?ve[t].keys:[];var y=ve[t]?ve[t].schema:{},b={};Oe[t]=u&&u[t]?u[t]:{},null==d||d.map((function(e){"_id"!==e&&(b[e]=Ge(y[e],e)),Oe[t][e]=u&&u[t]&&u[t][e]?u[t][e]:void 0})),s=H.object().shape(b)}return s=e.required?e.type===exports.FieldTypes.PASSWORD&&i?null==s?void 0:s.optional():e.type===exports.FieldTypes.LOCALIZEDString?H.mixed().test("localized-required",e.value+" "+I("is required"),(function(e){return!!e&&(Array.isArray(e)?e.some((function(e){return e&&"string"==typeof e.value&&e.value.trim().length>0})):Object.values(e).some((function(e){return"string"==typeof e&&e.trim().length>0})))})):null==s?void 0:s.required(e.value+" "+I("is required")):null==s?void 0:s.optional()}var Ze=function(e){Ee(e.target.name,e.target.checked);var t=q({},M);t[e.target.name]=e.target.checked,O(t)},Ue=function(e,t,n,r,i,a,s,l){return J(o,void 0,void 0,(function(){return _(this,(function(o){switch(o.label){case 0:return[4,WM({apiRoute:e,referencedValues:V,value:n,loading:T,fullKey:i,key:r,pathRoute:t,resources:pe,schema:ve,setLoading:D,setReferencedValues:Q,page:a,filter:s,filters:l})];case 1:return o.sent(),[2]}}))}))},qe=e.useCallback((function(e,t,n){var r=e[0];r&&(Ee(t,Object.assign(r,{preview:URL.createObjectURL(r)})),oe(!0),Rh(r,!0,null!=n?n:exports.ImageOptimizingCategories.NORMAL,(function(e){Ee(t,de+e),oe(!1)})))}),[oe]),Ke=function(e,t){Ie[e].remove(t)};function Je(e){e._id,e.id,e.__v,e.createdAt,e.updatedAt;var t=K(e,["_id","id","__v","createdAt","updatedAt"]);return t.isDuplicateRecord=!0,t}e.useEffect((function(){J(o,void 0,void 0,(function(){var e,t,n,r;return _(this,(function(o){if(ge){if(Pe(u),e=q({},ee),p&&p.map((function(t){e[t]=u[t]?u[t]:void 0})),Te)for(t in Te)(n=ve[t])&&n.type===exports.FieldTypes.ARRAY&&n.arrayType===exports.FieldTypes.IMAGE&&((r=q({},ce))[t]=Te[t],ue(r));te(e)}else Pe(Te);return[2]}))}))}),[]);function _e(t,r,o){var s,l,u,p,f,m={key:t,name:o,size:fe,label:r[t].value,disabled:i&&!1===r[t].isEditable};if(r[t]){var h=r[t].textArea;switch(r[t].type){case exports.FieldTypes.PASSWORD:return U.jsx(bC,q({},m,{showPassword:N,setShowPassword:E}));case exports.FieldTypes.OBJECTID:case exports.FieldTypes.NUMBER:case exports.FieldTypes.STRING:case exports.FieldTypes.EXTERNAL_LINK:return U.jsx(Yu,q({},m,{rows:h?5:void 0,multiline:h}));case exports.FieldTypes.MULTIPLE_TEXT:return U.jsx(YM,q({},m));case exports.FieldTypes.RICH_TEXT_I:return U.jsx(RM,q({},m,{type:kM.TYPE_ONE}));case exports.FieldTypes.RICH_TEXT_II:return U.jsx(RM,q({},m,{type:kM.TYPE_TWO}));case exports.FieldTypes.JSON_RICH_TEXT:return U.jsx(RM,q({},m,{type:kM.JSON_TYPE}));case exports.FieldTypes.LOCATION:return U.jsx(Yg,q({},m,{variant:"outlined",selectLocation:Ee}));case exports.FieldTypes.TIMEPICKER:return U.jsx(yC,q({},m,{fieldName:o,setValue:Ee,getValues:Be}));case exports.FieldTypes.PHONENUMBER:var g=r[t].defaultCountryCode?r[t].defaultCountryCode:r[t].countryCodes?r[t].countryCodes[0]:"sa";return U.jsx(C,q({},m,{defaultCountry:g.toLowerCase(),style:{border:2},onChange:function(e){return function(e,t){Ee(t,e)}(e,o)},onlyCountries:r[t].countryCodes?r[t].countryCodes:[],fullWidth:!0,value:Be(o)?Be(o):"",variant:"outlined",inputProps:{"aria-autocomplete":"none",autoCorrect:"none"},InputProps:{autoComplete:"new-password"},autoComplete:"new-password"}));case exports.FieldTypes.LOCALIZEDString:return U.jsx(oy,{fieldName:o,title:null===(s=r[t])||void 0===s?void 0:s.value,size:fe,isEdit:i||a,value:R,setValue:Ee,getValues:Be,handleChange:Re,numberOfRows:h?5:void 0,includeFrench:r[t].includeFrench,includeGerman:r[t].includeGerman,includeSpanish:r[t].includeSpanish,includeDanish:r[t].includeDanish,includeNorwegian:r[t].includeNorwegian,includeSwedish:r[t].includeSwedish});case exports.FieldTypes.DATE:return r[t].withTime?U.jsx(EM,q({},m,{fullWidth:!0,minDate:new Date})):U.jsx(ad,q({},m,{fullWidth:!0,minDate:new Date}));case exports.FieldTypes.ENUM:return U.jsx(DM,q({},m,{values:r[t].enumValues}));case exports.FieldTypes.IMAGE:return e.createElement(NM,q({},m,{name:o,key:t,handleDrop:function(e,n){return qe(e,n,r[t].imageOptimizingCategory)}}));case exports.FieldTypes.BOOLEAN:return U.jsx(xC,q({},m,{handleChange:Ze,getValues:Be}));case exports.FieldTypes.NESTEDSCHEMA:return U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsx(n.Card,{sx:{py:3,px:3},children:U.jsx(n.Grid,{container:!0,spacing:2,children:r[t].keys.map((function(e,o){return U.jsx(n.Grid,{item:!0,xs:12,children:_e(e,r[t].schema,t+"."+e)},o)}))})})]},t);case exports.FieldTypes.ARRAY:!function(e){var t=c.useFieldArray({control:Ne,name:e}),n=t.fields,r=t.append,o=t.remove,i=t.move;Ie[e]={fields:n,append:r,remove:o,move:i}}(o),Qe(o);var v=r[t],A=v.isDraggable,b=v.imageOptimizingCategory,x=et(pe[d].properties.model,t),w=Le(x),j=null==w?void 0:w.some((function(e){return!e||!e._id}));switch(r[t].arrayType){case exports.FieldTypes.NESTEDSCHEMA:return U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled",mt:{xs:"10px",md:"15px"},mb:"10px"},children:r[t].value},t),U.jsx(KA,{handleRemove:function(e){return Ke(t,e)},draggable:A,handleDrop:function(e){return Ye(t,e)},list:Ie[o].fields,itemComponent:function(e){return U.jsx(n.Stack,{spacing:3,children:r[t].keys.map((function(o){return U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,sx:{width:1},children:[U.jsx(n.Grid,{item:!0,xs:12,children:_e(o,r[t].schema,"".concat(t,"[").concat(e,"].").concat(o))},o),U.jsx(n.Divider,{})]},o)}))})},handleAdd:function(){return Xe(t)},addButtonText:ye?"Add item":"إضافة"})]},t);case exports.FieldTypes.IMAGE:return r[t].mediaUploader?U.jsx($A,{image:ce,keyValue:t,imageOptimizingCategory:null!==(l=r[t].imageOptimizingCategory)&&void 0!==l?l:exports.ImageOptimizingCategories.NORMAL,multiple:!0,dismissDialogState:We,setImages:Fe,isEnglish:ye,fileType:r[t].fileType?r[t].fileType:exports.FileTypes.IMAGE,label:r[t].value,imageDialogState:Y,handleEditImage:He,handleRemoveImage:Ve,setImageDialogState:G,setImage:ue,setValue:Ee,disableImageOptimization:r[t].disableImageOptimization,isDraggable:A}):U.jsx(KA,{handleRemove:function(e){return Ke(t,e)},draggable:A,handleDrop:function(e){return Ye(t,e)},list:Ie[o].fields,itemComponent:function(e){return U.jsx(PM,{name:"".concat(t,"[").concat(e,"]"),handleDrop:function(e,t){return qe(e,t,b)},label:""},"".concat(t,"[").concat(e,"]"))},handleAdd:function(){return Xe(t)},addButtonText:ye?"Add item":"إضافة"});case exports.FieldTypes.ENUM:return U.jsx(GM,q({},m,{options:Array.isArray(r[t].enumValues)?r[t].enumValues.map((function(e){return{label:TM.enhance(e),value:e}})):Object.keys(r[t].enumValues).map((function(e){var n,o,i=e,a=null!==(o=null===(n=r[t].enumValues[e])||void 0===n?void 0:n.label)&&void 0!==o?o:i;return{label:TM.enhance(a),value:i}}))}));default:return j&&x.length>0?U.jsx(U.Fragment,{}):U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled",mt:{xs:"10px",md:"15px"},mb:"10px"},children:r[t].value},t),U.jsx(KA,{handleRemove:function(e){return Ke(o,e)},draggable:A,handleDrop:function(e){return Ye(o,e)},list:Ie[o].fields,itemComponent:function(e){return U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,sx:{width:1},children:[U.jsx(n.Grid,{item:!0,xs:12,children:_e(t,Se[t],"".concat(o,"[").concat(e,"]"))}),U.jsx(n.Divider,{})]})},handleAdd:function(){return Xe(o)},addButtonText:ye?"Add item":"إضافة"})]},t)}case exports.FieldTypes.REFERENCE:var M=pe?pe[r[t].path]:void 0,O=XM(r,t,LM.FORM_LIST,M);return r[t].mediaUploader?U.jsx($A,{image:ee,keyValue:t,dismissDialogState:We,imageOptimizingCategory:null!==(u=r[t].imageOptimizingCategory)&&void 0!==u?u:exports.ImageOptimizingCategories.NORMAL,setImages:Fe,isEnglish:ye,fileType:r[t].fileType?r[t].fileType:exports.FileTypes.IMAGE,label:r[t].value,imageDialogState:Y,handleEditImage:He,handleRemoveImage:Ve,setImageDialogState:G,setImage:te,setValue:Ee,disableImageOptimization:r[t].disableImageOptimization,isDraggable:r[t].isDraggable}):U.jsx(xz,q({},m,{multiple:!1,onOptionChange:function(e){},options:V[t]&&V[t].data?V[t].data:[],loading:T[o],hasNext:V[t]&&V[t].hasNext,onOpenChanged:function(e,n,i){return Ue(r[t].apiRoute,r[t].path,e,t,o,n,i,O)},dependOn:et(pe[d].properties.model,t),relatedFields:null!==(f=null===(p=pe[d].properties.model[t])||void 0===p?void 0:p.relatedFields)&&void 0!==f?f:[],fieldKey:t,resource:M,resourcePath:r[t].path,enableCreateNewButtonOnReference:y&&r[t].enableCreateNewButtonOnReference}))}}}var $e=!0;return U.jsx(U.Fragment,{children:U.jsx(Su,{methods:De,onSubmit:ke((function(e){return J(o,void 0,void 0,(function(){var t,n,r,o,l,c,p,y,b,x;return _(this,(function(j){switch(j.label){case 0:se(!0),t=q({},e),Object.keys(e).map((function(t){return Object.keys(m).includes(t)?e[t]=e[t]?e[t]._id:null:ve[t]&&ve[t].type===exports.FieldTypes.LOCATION?e[t]=e[t]?{address:e[t].description,longitude:e[t].location&&e[t].location.coordinates&&e[t].location.coordinates.length>0?e[t].location.coordinates[0]:u&&u[t]&&u[t].longitude?u[t].longitude:void 0,latitude:e[t].location&&e[t].location.coordinates&&e[t].location.coordinates.length>1?e[t].location.coordinates[1]:u&&u[t]&&u[t].latitude?u[t].latitude:void 0,city:e[t].city,neighborhood:e[t].neighborhood}:null:""})),j.label=1;case 1:return j.trys.push([1,6,,7]),i?[4,Bh.patch("".concat(me,"/").concat(h)+"/"+s,e)]:[3,3];case 2:return r=j.sent(),[3,5];case 3:return[4,Bh.post("".concat(me,"/").concat(h),a?Je(e):e)];case 4:r=j.sent(),j.label=5;case 5:return n=r,se(!1),201!==n.status&&200!==n.status||!n.data.data.record.document||(Pe(),f?f():(o=(pe?pe[d].properties:"").title,l=n.data.data.record.document[o],c=ty.getRecordName(l,o,pe[d]),p=i?A?A(c):"".concat(c," was updated successfully"):v?v(c):"".concat(c," was created successfully"),je("".concat(p)),y=he[d].list,b=g?g(n.data.data.record.document._id):"".concat(y).concat(B.search),w(b,{replace:!0}))),[3,7];case 6:return x=j.sent(),se(!1),Pe(t),Ce("".concat(JSON.parse(x).meta.message)),[3,7];case 7:return[2]}}))}))})),children:U.jsx(n.Card,{sx:{p:3},children:U.jsxs(n.Stack,{spacing:"10px",children:[U.jsx(n.Grid,{container:!0,justifyContent:"space-between",rowGap:"10px",children:Ae&&Ae.map((function(e,t){var r=function(e,t,n,r,o){var i=VM.FULL,a=VM.HALF,s=n.length-1,l=r===s,c=0===r;function u(e){return c?l?i:ZM(n[r+1],t)===e?a:i:l?ZM(n[r-1],t)===e?a:i:o&&ZM(n[r+1],t)===e?a:o||ZM(n[r-1],t)!==e?i:a}if(t[e])switch(ZM(e,t)){case FM.SMALL:return u(FM.SMALL);case FM.CHANGEABLE:return i;case FM.MEDIUM:return u(FM.MEDIUM);case FM.LARGE:return u(FM.LARGE)}return i}(e,ve,Ae,t,$e);return $e=r===VM.FULL||!$e,U.jsx(n.Grid,{item:!0,xs:12,md:ve[e].widthOfElement?ve[e].widthOfElement:b?12:r,style:{paddingLeft:0},children:x&&x[e]?x[e]({name:e,record:u,setUploading:oe}):_e(e,ve,e)},e+t)}))},"grid1"),U.jsx(l.LoadingButton,{type:"submit",variant:"contained",loading:ae||re,sx:{fontSize:{xs:"14px",md:"16px"},fontWeight:500,py:"12px",px:"20px",alignSelf:"end"},children:i?xe:be})]})})},"form")});function et(e,t){var n=[];return Object.entries(e).forEach((function(e){var r=e[0],o=e[1];(null==o?void 0:o.relatedFields)&&Array.isArray(null==o?void 0:o.relatedFields)&&o.relatedFields.includes(t)&&n.push(r)})),n}}function qM(e){var t=e.title,r=e.loading,o=e.disabled,i=e.icon,a=e.onClick;return U.jsx(n.IconButton,{size:"small",title:t,onClick:a,disabled:o,children:U.jsx(To,{icon:r?"eos-icons:loading":i})})}function KM(t){var o=this,i=t.modelPath,a=t.onNoNextText,s=t.onNoPreviousText,l=t.recordId,c=t.nextButtonTitle,u=t.previousButtonTitle,d=t.recordIndex,p=t.numberOfRecords,f=t.params,m=t.navigateTo,h=t.onClickNext,g=t.onClickPrevious,v=hv.isEnglish();r.useNavigate();var A=Ig().setAlert,y=e.useState({next:!1,previous:!1}),b=y[0],x=y[1],w=e.useContext(Ih).dashbaordUrlPrefix,j="mdi:keyboard-arrow-left",C="mdi:keyboard-arrow-right",M=v?j:C,O=v?C:j,z=function(e){return J(o,void 0,void 0,(function(){var t,n,r,o,c;return _(this,(function(u){switch(u.label){case 0:return e===QM.NEXT?(t=null!=a?a:"No next records",x({next:!0,previous:!1})):(t=null!=s?s:"No previous records",x({next:!1,previous:!0})),[4,Bh.get("".concat(w,"/").concat(i,"/neighbors/").concat(l,"?type=").concat(e),{params:f})];case 1:return n=u.sent(),x({next:!1,previous:!1}),r=n.data.data,o=r.hasNeighbor,c=r.neighborRecordId,o&&c?(m(c),[2]):(A(t,"warning"),[2])}}))}))};return U.jsxs(n.Stack,{direction:"row",spacing:"5px",alignSelf:"end",alignItems:"center",children:[p&&d&&U.jsx(n.Typography,{color:"#5e5e5e",fontSize:"0.8rem",fontFamily:'"Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif',children:"".concat(d," of ").concat(p.toLocaleString())}),U.jsx(qM,{title:null!=u?u:"Previous",icon:M,onClick:g?function(){return g(l)}:function(){return z(QM.PREVIOUS)},loading:b.previous,disabled:!(!p||!d||1!==d)}),U.jsx(qM,{title:null!=c?c:"Next",icon:O,onClick:h?function(){return h(l)}:function(){return z(QM.NEXT)},loading:b.next,disabled:!(!p||!d||d!==p)})]})}!function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e.CHANGEABLE="changeable"}(FM||(FM={})),function(e){e[e.FULL=12]="FULL",e[e.HALF=5.8]="HALF"}(VM||(VM={})),function(e){e.NEXT="NEXT",e.PREVIOUS="PREVIOUS"}(QM||(QM={}));var JM=xo("div")((function(e){return{maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.theme.spacing(12,0)}}));function _M(){return U.jsx(ee,{title:"403 Forbidden",children:U.jsx(n.Container,{component:is,children:U.jsxs(JM,{sx:{textAlign:"center",alignItems:"center"},children:[U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{variant:"h3",paragraph:!0,children:"Sorry, request forbidden!"})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{sx:{color:"text.secondary"},children:"Sorry, Not allowed to access this resource."})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(Wa,{sx:{height:260,my:{xs:5,sm:10}}})}),U.jsx(n.Button,{to:"/",size:"large",variant:"contained",component:r.Link,children:"Go to Home"})]})})})}var $M=xo("span")((function(e){var t=e.arrow,n=e.theme,r=-6.5,o={top:r,transform:"rotate(135deg)"},i={bottom:r,transform:"rotate(-45deg)"},a={left:r,transform:"rotate(45deg)"},s={right:r,transform:"rotate(-135deg)"};return q(q(q(q(q(q(q(q(q(q(q(q(q({width:14,height:14,position:"absolute",borderBottomLeftRadius:3.5,clipPath:"polygon(0% 0%, 100% 100%, 0% 100%)",border:"solid 1px ".concat(Cr("light"===n.palette.mode?n.palette.grey[500]:n.palette.common.black,.12))},su({color:n.palette.background.paper})),"top-left"===t&&q(q({},o),{left:20})),"top-center"===t&&q(q({},o),{left:0,right:0,margin:"auto"})),"top-right"===t&&q(q({},o),{right:20})),"bottom-left"===t&&q(q({},i),{left:20})),"bottom-center"===t&&q(q({},i),{left:0,right:0,margin:"auto"})),"bottom-right"===t&&q(q({},i),{right:20})),"left-top"===t&&q(q({},a),{top:20})),"left-center"===t&&q(q({},a),{top:0,bottom:0,margin:"auto"})),"left-bottom"===t&&q(q({},a),{bottom:20})),"right-top"===t&&q(q({},s),{top:20})),"right-center"===t&&q(q({},s),{top:0,bottom:0,margin:"auto"})),"right-bottom"===t&&q(q({},s),{bottom:20}))}));function eO(e){var t,n=e.open,r=e.children,o=e.arrow,i=void 0===o?"top-right":o,a=e.hiddenArrow,s=e.sx,l=K(e,["open","children","arrow","hiddenArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(i),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return U.jsxs(_p,q({open:Boolean(n),anchorEl:n,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:q(q(q({width:"auto",overflow:"inherit"},u),(t={},t["& .".concat(Cj.root)]={"& svg":{mr:2,flexShrink:0}},t)),s)}},l,{children:[!a&&U.jsx($M,{arrow:i}),r]}))}function tO(e){var t=e.actions,r=e.open,o=e.onClose,i=e.onOpen;return U.jsxs(U.Fragment,{children:[U.jsx(n.IconButton,{onClick:i,children:U.jsx(To,{icon:"eva:more-vertical-fill",width:20,height:20})}),U.jsx(eO,{open:r,anchorEl:r,onClose:o,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},arrow:"right-top",sx:{mt:-1,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,display:"flex",alignItems:"center",gap:1,"& svg":{width:24,height:24,flexShrink:0}}},children:t})]})}var nO={},rO={};Object.defineProperty(rO,"__esModule",{value:!0}),rO.on=function(e,t,n,r){r=r||!1,e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on"+t,(function(t){n.call(e,t||window.event)}))},rO.off=function(e,t,n,r){r=r||!1,e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent&&e.detachEvent("on"+t,n)};var oO={};Object.defineProperty(oO,"__esModule",{value:!0}),oO.default=function(e){if(!(e instanceof HTMLElement))return document.documentElement;for(var t="absolute"===e.style.position,n=/(scroll|auto)/,r=e;r;){if(!r.parentNode)return e.ownerDocument||document.documentElement;var o=window.getComputedStyle(r),i=o.position,a=o.overflow,s=o["overflow-x"],l=o["overflow-y"];if("static"===i&&t)r=r.parentNode;else{if(n.test(a)&&n.test(s)&&n.test(l))return r;r=r.parentNode}}return e.ownerDocument||e.documentElement||document.documentElement};var iO={};Object.defineProperty(iO,"__esModule",{value:!0}),iO.default=function(e,t,n){var r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,l=function l(){var c=+new Date-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(i,o),r||(i=null,o=null)))};return function(){i=this,o=arguments,a=+new Date;var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(i,o),i=null,o=null),s}};var aO={};Object.defineProperty(aO,"__esModule",{value:!0}),aO.default=function(e,t,n){var r,o;return t||(t=250),function(){var i=n||this,a=+new Date,s=arguments;r&&a<r+t?(clearTimeout(o),o=setTimeout((function(){r=a,e.apply(i,s)}),t)):(r=a,e.apply(i,s))}},Object.defineProperty(nO,"__esModule",{value:!0}),nO.forceVisible=nO.forceCheck=nO.lazyload=void 0;var sO=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),lO=e,cO=hO(lO),uO=hO(ke),dO=rO,pO=hO(oO),fO=hO(iO),mO=hO(aO);function hO(e){return e&&e.__esModule?e:{default:e}}function gO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vO(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function AO(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var yO=0,bO=0,xO=0,wO=0,jO="data-lazyload-listened",CO=[],MO=[],OO=!1;try{var zO=Object.defineProperty({},"passive",{get:function(){OO=!0}});window.addEventListener("test",null,zO)}catch(Qm){}var TO=!!OO&&{capture:!1,passive:!0},DO=function(e){var t=e.ref;if(t instanceof HTMLElement){var n=(0,pO.default)(t),r=e.props.overflow&&n!==t.ownerDocument&&n!==document&&n!==document.documentElement?function(e,t){var n=e.ref,r=void 0,o=void 0,i=void 0,a=void 0;try{var s=t.getBoundingClientRect();r=s.top,o=s.left,i=s.height,a=s.width}catch(e){r=yO,o=bO,i=wO,a=xO}var l=window.innerHeight||document.documentElement.clientHeight,c=window.innerWidth||document.documentElement.clientWidth,u=Math.max(r,0),d=Math.max(o,0),p=Math.min(l,r+i)-u,f=Math.min(c,o+a)-d,m=void 0,h=void 0,g=void 0,v=void 0;try{var A=n.getBoundingClientRect();m=A.top,h=A.left,g=A.height,v=A.width}catch(e){m=yO,h=bO,g=wO,v=xO}var y=m-u,b=h-d,x=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return y-x[0]<=p&&y+g+x[1]>=0&&b-x[0]<=f&&b+v+x[1]>=0}(e,n):function(e){var t=e.ref;if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var n=void 0,r=void 0;try{var o=t.getBoundingClientRect();n=o.top,r=o.height}catch(e){n=yO,r=wO}var i=window.innerHeight||document.documentElement.clientHeight,a=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return n-a[0]<=i&&n+r+a[1]>=0}(e);r?e.visible||(e.props.once&&MO.push(e),e.visible=!0,e.forceUpdate()):e.props.once&&e.visible||(e.visible=!1,e.props.unmountIfInvisible&&e.forceUpdate())}},PO=function(){MO.forEach((function(e){var t=CO.indexOf(e);-1!==t&&CO.splice(t,1)})),MO=[]},NO=function(){for(var e=0;e<CO.length;++e){var t=CO[e];DO(t)}PO()},EO=void 0,BO=null,kO=function(e){function t(e){gO(this,t);var n=vO(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.visible=!1,n.setRef=n.setRef.bind(n),n}return AO(t,lO.Component),sO(t,[{key:"componentDidMount",value:function(){var e=window,t=this.props.scrollContainer;t&&"string"==typeof t&&(e=e.document.querySelector(t));var n=void 0!==this.props.debounce&&"throttle"===EO||"debounce"===EO&&void 0===this.props.debounce;if(n&&((0,dO.off)(e,"scroll",BO,TO),(0,dO.off)(window,"resize",BO,TO),BO=null),BO||(void 0!==this.props.debounce?(BO=(0,fO.default)(NO,"number"==typeof this.props.debounce?this.props.debounce:300),EO="debounce"):void 0!==this.props.throttle?(BO=(0,mO.default)(NO,"number"==typeof this.props.throttle?this.props.throttle:300),EO="throttle"):BO=NO),this.props.overflow){var r=(0,pO.default)(this.ref);if(r&&"function"==typeof r.getAttribute){var o=+r.getAttribute(jO)+1;1===o&&r.addEventListener("scroll",BO,TO),r.setAttribute(jO,o)}}else if(0===CO.length||n){var i=this.props,a=i.scroll,s=i.resize;a&&(0,dO.on)(e,"scroll",BO,TO),s&&(0,dO.on)(window,"resize",BO,TO)}CO.push(this),DO(this)}},{key:"shouldComponentUpdate",value:function(){return this.visible}},{key:"componentWillUnmount",value:function(){if(this.props.overflow){var e=(0,pO.default)(this.ref);if(e&&"function"==typeof e.getAttribute){var t=+e.getAttribute(jO)-1;0===t?(e.removeEventListener("scroll",BO,TO),e.removeAttribute(jO)):e.setAttribute(jO,t)}}var n=CO.indexOf(this);-1!==n&&CO.splice(n,1),0===CO.length&&"undefined"!=typeof window&&((0,dO.off)(window,"resize",BO,TO),(0,dO.off)(window,"scroll",BO,TO))}},{key:"setRef",value:function(e){e&&(this.ref=e)}},{key:"render",value:function(){var e=this.props,t=e.height,n=e.children,r=e.placeholder,o=e.className,i=e.classNamePrefix,a=e.style;return cO.default.createElement("div",{className:i+"-wrapper "+o,ref:this.setRef,style:a},this.visible?n:r||cO.default.createElement("div",{style:{height:t},className:i+"-placeholder"}))}}]),t}();kO.propTypes={className:uO.default.string,classNamePrefix:uO.default.string,once:uO.default.bool,height:uO.default.oneOfType([uO.default.number,uO.default.string]),offset:uO.default.oneOfType([uO.default.number,uO.default.arrayOf(uO.default.number)]),overflow:uO.default.bool,resize:uO.default.bool,scroll:uO.default.bool,children:uO.default.node,throttle:uO.default.oneOfType([uO.default.number,uO.default.bool]),debounce:uO.default.oneOfType([uO.default.number,uO.default.bool]),placeholder:uO.default.node,scrollContainer:uO.default.oneOfType([uO.default.string,uO.default.object]),unmountIfInvisible:uO.default.bool,style:uO.default.object},kO.defaultProps={className:"",classNamePrefix:"lazyload",once:!1,offset:0,overflow:!1,resize:!1,scroll:!0,unmountIfInvisible:!1};nO.lazyload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n){function r(){gO(this,r);var e=vO(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return e.displayName="LazyLoad"+function(e){return e.displayName||e.name||"Component"}(t),e}return AO(r,lO.Component),sO(r,[{key:"render",value:function(){return cO.default.createElement(kO,e,cO.default.createElement(t,this.props))}}]),r}()}};var LO=nO.default=kO;nO.forceCheck=NO,nO.forceVisible=function(){for(var e=0;e<CO.length;++e){var t=CO[e];t.visible=!0,t.forceUpdate()}PO()};var IO="data:image/webp;base64,UklGRqxWAABXRUJQVlA4WAoAAAASAAAAVwIAOgEAQU5JTQYAAADNmZz/AABBTk1GmAMAAAAAAAAAAFcCADoBAB4AAAJWUDgggAMAALA3AJ0BKlgCOwE+kUihTKWkIyKgdVgQsBIJaW7hdrEd60OP3pnPgaarvPqOPmuYM+NiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUdCRCfuIvEFR/ljYi8QVH+WMMEyqaUAmjJ67+PWWkEuhsq8urdTe4i8QVH+WNiLw0hZc/FkWY7Oyy5BPgBwJD/tSmbelUqw/EFR/ljYi8QVH+WNheBpleRDronNegYg1oPRkpehtarOUIEAoU3uIvEFR/ljYi8QVH+Ti1+jaB/19CexyBTUVTOmmjpV7T3NafRl5f/LGxF4gqP8sbEXo86vljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QVH+WNiLxBUf5Y2IvEFR/ljYi8QTYAA/v/BBAAAAAAAA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Qzy6LlR2iBbRRZRJuRBs9PNYEzFTa/je5PrN2LKqLxlD4vlzcjINA7MiR19TJmyRPd2S4YHk88xTb9KOQ6mDM/9TGxHZt5Ohq6mXtwcQJUpO0xqSyZU9ZapbSxbj/SnD0DqZjwNi2GyKxnOqhIFkuFScVmYF9zBOQ5XZhpyRbOWGbvjcllSCGfpHOfY4TiuTBo0sDpcdzPX7arPW2zlRok+lIBQZRgTabc59DJdYMoczZaCTsdPf2wjrgx3abqaepkyM3Q2E0TjcZYZj2Z/mgiQZdKggWa1MnMV3NkMztfXgbQYf7BBlsmZUYR0UWx56IZK6V3tqZp8noGQxwzLIZmayFi5FZjNWIlx/yINuoyV6V/auVpGHT7UjJfOnkxr2DJjapSoIwOBOX7aCcEJu10Nu5upakTnh/LxsEmJjtzradgytpqEy0PdL0/O4375ds5Bl5mWlqeHQmB+faau9bQ5crBllnPnOTJ9IXNMx4WbV5oJu7QoPrSscX6P8evg4MuIRySSzPSaC+BWpTS6TFVTJhn5sow2/qZjwAXVyZy5UdMtsPFl+GOQnJfRzYnGHTKP5p+WSUVrFZwbZEItw14fMzPLpU18mXKENlzRzRLLHe0bZB5pskzNZ210XmHfJOMrGaa8OI+sr7Hgysz7faVqVucp3/gGmXnHZRA2LRvjBbST98z4jTJl0JiLf2ac57vcuN2MlWUATEP29O2/mnLBEFWGV5vk5sILp+VbIcuopXLeu2P+GjfIMHY+Uz4BWebEIuYIyJHZ2lu+Co39Q6g8ePk20P8jirQv8zaQZbZO8QmCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIP53/gHGmTq/TG2J8QAAAABJRU5ErkJggg==";function HO(e){var t=e.value,n=xs(t),r="image"===n;return U.jsx(LO,{style:{width:"100%",height:"100%"},once:!0,debounce:!0,placeholder:U.jsx(RO,{src:IO,alt:t,isLoading:!0}),children:U.jsx(RO,{src:t?r?t:ws(n):SO,alt:t,notFoundImage:!t})})}function RO(e){var t=e.src,r=e.alt,o=e.notFoundImage,i=e.isLoading,a=o||i;return U.jsx(n.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:U.jsx("img",{src:t,alt:r,height:"94%",width:"50%",style:{borderRadius:"5px",objectFit:"cover",cursor:a?void 0:"pointer"},onClick:a?void 0:function(){return window.open(t,"_blank")}})})}var WO=function(e){if(!e||"string"!=typeof e)return!1;var t=e.length>30,n=!/\s/.test(e),r=/^[0-9a-fA-F]+$/.test(e)||/^[0-9]+$/.test(e)||/^[a-zA-Z0-9_\-]+$/.test(e);return t&&(n||r)};function FO(e){var t=e.value,r=S.useState(!1),o=r[0],i=r[1];return U.jsxs("div",{children:[o?t:t.slice(0,200)," ",t.length>200&&U.jsx(n.Link,{type:"button",component:"button",sx:{textDecoration:"underline",fontSize:"inherit",letterSpacing:"inherit"},onClick:function(){return i(!o)},children:o?"view less":"view more"})]})}function VO(e){var t=e.data,r=e.arrayItemComponent,o=S.useState(!1),i=o[0],a=o[1],s=hv.isEnglish(),l=s?"View less":"عرض أقل",c=s?"View more":"عرض المزيد",u=i?t:t.slice(0,Math.min(5,t.length));return U.jsxs("div",{children:[u.map((function(e,t){return r(e,t)})),t.length>5&&U.jsx(n.Link,{type:"button",component:"button",sx:{textDecoration:"underline",fontSize:"inherit",letterSpacing:"inherit"},onClick:function(){return a(!i)},children:i?l:c})]})}function QO(e){var t=function(e){var t,n={isEmpty:!0,blocks:0,chars:0,preview:""};try{var r=JSON.parse(e);if(!(null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t.length))return n;var o=r.blocks,i=o.map((function(e){var t;return null!==(t=null==e?void 0:e.text)&&void 0!==t?t:""})).join("\n").trim(),a=i.length>60?"".concat(i.slice(0,60),"…"):i;return{isEmpty:0===i.length,blocks:o.length,chars:i.length,preview:a}}catch(e){return n}}(e.raw),r=hv.isEnglish(),o=r?"Empty":"فارغ",i=r?"blocks":"مقاطع",a=r?"chars":"حروف";if(t.isEmpty)return U.jsx(n.Chip,{size:"small",variant:"outlined",label:o});return U.jsx(n.Tooltip,{title:"".concat(t.blocks," ").concat(i," · ").concat(t.chars," ").concat(a),children:U.jsx(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:U.jsxs(n.Typography,q({},{color:"black",variant:"body2",sx:{fontWeight:50,wordWrap:"break-all",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",width:"auto",display:"inline"}},{children:[t.preview,":"]}))})})}var XO=require("lodash");function YO(e,t){var n,r,o,i,a,s,l,c,u,d,p=e.action,f=e.path,m=e.recordId;switch(p){case exports.ActionNames.LIST:return null!==(r=null===(n=t[f])||void 0===n?void 0:n.list)&&void 0!==r?r:f;case exports.ActionNames.NEW:return null!==(i=null===(o=t[f])||void 0===o?void 0:o.new)&&void 0!==i?i:f;case exports.ActionNames.SHOW:return null!==(s=null===(a=t[f])||void 0===a?void 0:a.show(m))&&void 0!==s?s:f;case exports.ActionNames.EDIT:return null!==(c=null===(l=t[f])||void 0===l?void 0:l.edit(m))&&void 0!==c?c:f;default:return null!==(d=null===(u=t[f])||void 0===u?void 0:u.list)&&void 0!==d?d:f}}function GO(t){var o,i,a,s,l,c=t.resourceName,u=t.params,d=t.resources,p=t.dialogState,f=t.paramsState,m=t.extras;f[0];var h=f[1],g=e.useContext(Ih).dashbaordUrlPrefix,v=e.useContext(Jh).paths,A=Ig(),y=A.setSuccessAlert,b=A.setErrorAlert,x=A.setAlert,w=e.useState(null),j=w[0],C=w[1],M=function(e){C(e.currentTarget)},O=function(){C(null)},z=u.row,T=d[c],D=T.properties,P=D.actions,N=D.modelName,E=p[1],B=[],k=r.useNavigate(),L=r.useLocation(),I=os("up","md");return P.show.isAccessible&&!(null===(o=z.hiddenActions)||void 0===o?void 0:o.includes("show"))&&B.push({href:"".concat(v[c].show(z._id)).concat(L.search),title:P.show.value,icon:U.jsx(To,{icon:"mdi:show-outline"}),key:"show",color:"primary.main",isMainAction:P.show.isMainAction}),P.edit.isAccessible&&sM(T,JC.EDIT)&&!(null===(i=z.hiddenActionKeys)||void 0===i?void 0:i.includes("edit"))&&B.push({onClick:function(e){var t=v[c].edit(e._id);k("".concat(t).concat(L.search))},title:P.edit.value,icon:U.jsx(To,{icon:"eva:edit-fill"}),key:"edit",color:"primary.main",isMainAction:P.edit.isMainAction}),P.new.isAccessible&&sM(T,JC.CREATE)&&!(null===(a=z.hiddenActionKeys)||void 0===a?void 0:a.includes("new"))&&P.duplicate&&!(null===(s=null==d?void 0:d.appConfigurations)||void 0===s?void 0:s.disableDuplicateAction)&&P.duplicate.isAccessible&&B.push({onClick:function(e){var t=v[c].duplicate(e._id);k("".concat(t).concat(L.search))},title:P.duplicate.value,icon:U.jsx(To,{icon:"eva:copy-fill"}),key:"duplicate",color:"primary.main",isMainAction:P.duplicate.isMainAction}),P.delete.isAccessible&&sM(T,JC.DELETE)&&!(null===(l=z.hiddenActionKeys)||void 0===l?void 0:l.includes("delete"))&&B.push({onClick:function(e){E({title:P?P.delete.confirmationMessageTitle:"",message:P?P.delete.confirmationMessageBody:"",onClose:function(){E({open:!1})},onConfirm:function(){var e;E({open:!1}),y(null!==(e=null==m?void 0:m.afterDeleteSnackBarText)&&void 0!==e?e:"Deleted successfully"),h((function(e){return q(q({},e),{filters:void 0,filter:void 0})}))},action:function(){return Bh.delete("".concat(g,"/").concat(d[c].properties.path,"/").concat(e._id))},open:!0})},title:P.delete.value,icon:U.jsx(To,{icon:"eva:trash-2-outline"}),key:"delete",color:"error.main",isMainAction:P.delete.isMainAction}),z.extraActionKeys&&P.extras&&0!==z.extraActionKeys.length&&z.extraActionKeys.forEach((function(e){var t;P.extras.record[e]&&B.push({onClick:function(t){var n,r,o;P.extras.record[e].guard||Bh.post("".concat(g,"/actions/execute/").concat(e),{record:t,modelName:N}).then((function(t){var n,r,o=t.data.data.response;if(P.extras.record[e].handlerStrategy===exports.HandlerStrategy.FILE_DOWNLOAD){var i=o.filePath;setTimeout((function(){window.open(i,"_blank")}))}else k(YO(o,v)),!1!==P.extras.record[e].showAlertMessage&&x(null!==(n=P.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=P.extras.record[e].severity)&&void 0!==r?r:"success")})).catch((function(){b("Error happened")})),E({title:null!==(r=null!==(n=P.extras.record[e].guardTitle)&&void 0!==n?n:P.extras.record[e].name)&&void 0!==r?r:"",message:null!==(o=P.extras.record[e].guard)&&void 0!==o?o:"Do you want to execute this action?",onClose:function(){E({open:!1})},onConfirm:function(t){var n,r,o,i;switch(E({open:!1}),P.extras.record[e].handlerStrategy){case exports.HandlerStrategy.NORMAL:t.action===exports.ActionNames.LIST?(h((function(e){return q(q({},e),{page:sz.page})})),x(null!==(n=P.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=P.extras.record[e].severity)&&void 0!==r?r:"success")):k(YO(t,v));break;case exports.HandlerStrategy.FILE_DOWNLOAD:var a=t.filePath;setTimeout((function(){window.open(a,"_blank")}));break;default:x(null!==(o=P.extras.record[e].message)&&void 0!==o?o:"Action executed Successfully",null!==(i=P.extras.record[e].severity)&&void 0!==i?i:"success")}},action:function(){return Bh.post("".concat(g,"/actions/execute/").concat(e),{record:t,modelName:N})},open:P.extras.record[e].guard})},title:P.extras.record[e].name,icon:ez(P.extras.record[e].icon),key:P.extras.record[e].name,color:null!==(t=P.extras.record[e].color)&&void 0!==t?t:"black",isMainAction:P.extras.record[e].isMainAction})})),I?U.jsxs(n.Stack,{direction:"row",alignItems:"center",children:$($([],KO(B.filter((function(e){var t;return(null===(t=null==d?void 0:d.appConfigurations)||void 0===t?void 0:t.showMainActions)&&e.isMainAction})),O,z),!0),[B.filter((function(e){var t;return!e.isMainAction||!(null===(t=null==d?void 0:d.appConfigurations)||void 0===t?void 0:t.showMainActions)})).length>0==!0&&U.jsx(tO,{open:j,onOpen:M,onClose:O,actions:qO(B.filter((function(e){var t;return!e.isMainAction||!(null===(t=null==d?void 0:d.appConfigurations)||void 0===t?void 0:t.showMainActions)})),O,z)})],!1)}):U.jsx(tO,{open:j,onOpen:M,onClose:O,actions:qO(B,O,z)})}function ZO(t,o,i,a,s,l,c,u,d,p,f,m){var h,g,v,A,y,b,x=hv.isEnglish();if(!(l&&l.hasOwnProperty(i.key)&&null!==l[i.key]||o.valuePath))return o.type===exports.FieldTypes.IMAGE?U.jsx(HO,{value:void 0}):U.jsx(n.Typography,q({},s,{children:"--- "}));switch(o.type){case exports.FieldTypes.STRING:if(/^#[0-9A-F]{6}$/i.test(a)){s.color=a,s.variant="body2";break}if(!l||!l.hasOwnProperty(i.key)||null===l[i.key]){t="---",s.variant="subtitle2";break}if(i.key===u&&c&&c.show.isAccessible){var w=m[d].show(l._id);t=U.jsx(n.Link,{align:"justify",component:r.Link,to:"".concat(w).concat(location.search),children:a})}break;case exports.FieldTypes.OBJECTID:if(i.key===u&&c&&c.show.isAccessible){t=U.jsx(n.Link,{align:"justify",component:r.Link,to:m[d].show(l._id),children:a});break}s.variant="subtitle2";break;case exports.FieldTypes.NUMBER:case exports.FieldTypes.PHONENUMBER:s.variant="subtitle2";break;case exports.FieldTypes.DATE:var j=!(!f[i.key]||!f[i.key].withTime);s.variant="subtitle2";var C=$C(l[i.key],void 0,!x);t=j?U.jsxs(n.Stack,{alignItems:"center",children:[U.jsx(n.Typography,{variant:"subtitle2",children:C}),U.jsx(n.Typography,{variant:"subtitle2",color:"rgb(99, 115, 129)",children:eM(new Date(l[i.key]),x?jg.ENGLISH:jg.ARABIC)})]}):C;break;case exports.FieldTypes.LOCALIZEDString:var M=l[i.key]&&l[i.key][0]?hv.getLocalizedString(l[i.key]):"----";t=i.key===u&&c&&c.show.isAccessible?U.jsx(n.Link,{align:"justify",component:r.Link,to:m[d].show(l._id),children:M}):M,s.variant="subtitle2";break;case exports.FieldTypes.ENUM:var O=f[i.key];if(!(O&&O.enumValues&&O.enumValues[a]))return U.jsx(n.Chip,{label:TM.enhance(a),size:"small"});var z=null===(g=null===(h=f[i.key])||void 0===h?void 0:h.enumValues[a])||void 0===g?void 0:g.label,T=null===(A=null===(v=f[i.key])||void 0===v?void 0:v.enumValues[a])||void 0===A?void 0:A.color,D=null===(b=null===(y=f[i.key])||void 0===y?void 0:y.enumValues[a])||void 0===b?void 0:b.labelColor;return U.jsx(n.Chip,{label:TM.enhance(null!=z?z:a),size:"small",sx:{background:T,color:D}});case exports.FieldTypes.IMAGE:return U.jsx(HO,{value:a});case exports.FieldTypes.BOOLEAN:return U.jsx(n.Chip,{label:"".concat(a),variant:"outlined",size:"small",component:"div"});case exports.FieldTypes.EXTERNAL_LINK:return U.jsx(CM,{link:a});case exports.FieldTypes.LOCATION:case exports.FieldTypes.NESTEDSCHEMA:s.variant="caption",s.color="GrayText",t="Object {...}";break;case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:s.variant="caption",s.color="GrayText",t="<HTML... />";break;case exports.FieldTypes.JSON_RICH_TEXT:return U.jsx(QO,{raw:a});case exports.FieldTypes.ARRAY:var P=o.arrayType,N=function(){s.variant="caption",s.color="GrayText",t="Length ["+l[i.key].length+"]"};if(!P||tz(P))N();else{var E=x?"Empty":"فارغ";if(!l[i.key].length)return U.jsx(n.Chip,{size:"small",variant:"outlined",label:E});try{t=U.jsx(VO,{data:l[i.key],arrayItemComponent:function(t,n){var r;return U.jsxs(e.Fragment,{children:[ZO(t,q(q({},o),{type:P}),q(q({},i),{key:"".concat(i.key,".").concat(n),path:o.path}),t,s,q(q({},l),(r={},r["".concat(i.key,".").concat(n)]=t,r)),c,u,d,p,f,m),n<l[i.key].length-1&&", "]},n)}})}catch(e){N()}}break;case exports.FieldTypes.MULTIPLE_TEXT:s.variant="subtitle2",t=(l[i.key]||[]).join(", ");break;case exports.FieldTypes.REFERENCE:if(!l[i.key])break;var B=l[i.key].pathOfTable?l[i.key].pathOfTable:i.path,k=p[B];if(!(k&&k.properties&&l[i.key]&&B)){s.variant="subtitle2",t=a._id;break}var L=k.properties.title,I=ty.checkLocalizedString(p,B,L)?hv.getLocalizedString(l[i.key][L]):l[i.key][L]?l[i.key][L]:l[i.key]._id;if(!k.properties.actions.show.isAccessible||!sM(k,JC.VIEW)){t=a?I:l[i.key]?l[i.key]._id:"---";break}t=U.jsx(n.Link,{align:"justify",href:m[B||i.key.toLowerCase()].show(a||l[i.key]&&l[i.key]._id?l[i.key]._id:""),children:a||l[i.key]._id?I:"---- "})}var S="string"==typeof t&&t.length>200?U.jsx(FO,{value:t}):t;return U.jsx(n.Typography,q({},s,{children:S}))}function UO(e,t,o,i,a){var s=i[e].properties?i[e].properties.model:void 0;s[t.key];var l=i[e].properties,c=l.title,u=l.actions,d=o.value,p=o.row,f=WO(d),m={color:"black",variant:"body2",sx:{fontWeight:50,wordWrap:f?"break-all":"break-word",overflow:f?"hidden":"visible",textOverflow:f?"ellipsis":"clip",whiteSpace:f?"nowrap":"normal",width:f?"100%":"auto",display:f?"block":"inline"}},h=d;if(t.key.includes(".")){var g=t.key.split("."),v={key:g[g.length-1],value:t.value,path:t.path},A=$O(t.key,p),y=_O(t.key,s),b=A?A[v.key]:null;return ZO(b,y,v,b,m,A,u,c,e,i,s,a)}return p.hasOwnProperty(t.key)&&null!==p[t.key]?t.key===c?U.jsx(n.Typography,{variant:"body2",color:"black",sx:{textAlign:"center"},children:u.show.isAccessible?U.jsx(n.Link,{align:"justify",component:r.Link,to:a[e].show(p._id)+location.search,style:{cursor:"pointer"},children:s[t.key].type===exports.FieldTypes.LOCALIZEDString?p[t.key][0]?hv.getLocalizedString(p[t.key]):"---":"object"==typeof p[t.key]?hv.getLocalizedString(p[t.key]):p[t.key]}):U.jsx(n.Typography,q({},m,{children:s[t.key].type===exports.FieldTypes.LOCALIZEDString?hv.getLocalizedString(p[t.key]):p[t.key]}))}):ZO(h,s[t.key],t,d,m,p,u,c,e,i,s,a):s[t.key].valuePath?ZO(h,s[t.key],t,XO.get(p,s[t.key].valuePath),m,p,u,c,e,i,s,a):s[t.key].type===exports.FieldTypes.IMAGE?U.jsx(HO,{value:void 0}):U.jsx(n.Typography,q({},m,{children:"--- "}))}function qO(e,t,r){return e.map((function(e){return e.href?U.jsxs(n.MenuItem,{component:"a",href:e.href,rel:"noopener noreferrer",sx:{color:e.color},onClick:t,children:[e.icon,e.title]},e.key):U.jsxs(n.MenuItem,{onClick:function(){var n;null===(n=e.onClick)||void 0===n||n.call(e,r,e.key),t()},sx:{color:e.color},children:[e.icon,e.title]},e.key)}))}function KO(e,t,o){return e.map((function(e){return e.href?U.jsx(n.Link,{component:r.Link,to:e.href,style:{textDecoration:"none",color:e.color},children:U.jsx(n.Tooltip,{title:e.title,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:U.jsx(n.IconButton,{sx:{color:e.color},children:e.icon})})},e.key):U.jsx(n.Tooltip,{title:e.title,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:U.jsx(n.IconButton,{onClick:function(){var n;null===(n=e.onClick)||void 0===n||n.call(e,o,e.key),t()},sx:{color:e.color},children:e.icon})},e.key)}))}function JO(t){var o=t.resources,i=t.resourceName,a=t.selected,s=t.bulkActionsDialogState,l=t.setBulkActionsDialogState,c=t.setSelected,u=e.useContext(Ih).dashbaordUrlPrefix,d=e.useContext(Jh).paths,p=o[i].properties,f=p.actions,m=p.modelName,h=t.dialogState[1],g=t.gridState[1],v=Ig(),A=v.setErrorAlert,y=v.setAlert,b=r.useNavigate();return o[i].properties.actions.extras&&o[i].properties.actions.extras.resource?U.jsx(U.Fragment,{children:Object.keys(o[i].properties.actions.extras.resource).map((function(e){var t,r,o,i,p;if(!f.extras.resource[e])return U.jsx(U.Fragment,{});var v=null!==(t=f.extras.resource[e].message)&&void 0!==t?t:"Action executed Successfully",x=null!==(r=f.extras.resource[e].severity)&&void 0!==r?r:"success";return U.jsx(n.Button,{size:null!==(o=f.extras.resource[e].size)&&void 0!==o?o:"small",color:null!==(i=f.extras.resource[e].color)&&void 0!==i?i:"inherit",variant:null!==(p=f.extras.resource[e].variant)&&void 0!==p?p:"contained",startIcon:ez(f.extras.resource[e].icon),onClick:function(t){var n,r,o,i;if(!f.extras.resource[e].guard)switch(f.extras.resource[e].handlerStrategy){case exports.HandlerStrategy.NORMAL:Bh.post("".concat(u,"/actions/execute/").concat(e),{record:a,modelName:m}).then((function(e){var t=e.data.data.response;t.action===exports.ActionNames.LIST?(g((function(e){return q(q({},e),{page:sz.page})})),y(v,x)):b(YO(t,d))})).catch((function(){A("Error happened")}));break;case exports.HandlerStrategy.FILE_DOWNLOAD:Bh.post("".concat(u,"/actions/execute/").concat(e),{record:a,modelName:m}).then((function(e){var t=e.data.data.response;setTimeout((function(){window.open(t.filePath,"_blank")}))})).catch((function(){}));break;case exports.HandlerStrategy.CUSTOM_COMPONENT:var p=null!==(n=f.extras.resource[e].fullScreen)&&void 0!==n&&n;!function(e,t,n,r,o,i,a,c,u){var d=q({},s);d[e]={state:t,modelName:n,saveLoadingState:r,fullScreen:i,setSelected:o,documentIds:null!=u?u:[],afterExecuteMessage:a,severity:c},l(d)}(e,!0,m,!1,c,p,v,x,a);break;default:y(v,x)}h({title:null!==(o=null!==(r=f.extras.resource[e].guardTitle)&&void 0!==r?r:f.extras.resource[e].name)&&void 0!==o?o:"",message:null!==(i=f.extras.resource[e].guard)&&void 0!==i?i:"Do you want to execute this action?",onClose:function(){h({open:!1})},onConfirm:function(t){switch(h({open:!1}),c((function(e){return[]})),f.extras.resource[e].handlerStrategy){case exports.HandlerStrategy.NORMAL:t.action===exports.ActionNames.LIST?(g((function(e){return q(q({},e),{page:sz.page})})),y(v,x)):b(YO(t,d));break;case exports.HandlerStrategy.FILE_DOWNLOAD:t.filePath,setTimeout((function(){window.open(t.filePath,"_blank")}));break;default:y(v,x)}},action:function(){return Bh.post("".concat(u,"/actions/execute/").concat(e),{record:a,modelName:m})},open:f.extras.resource[e].guard})},sx:{mr:1},children:f.extras.resource[e].name},e)}))}):U.jsx(U.Fragment,{})}function _O(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t[r];for(var o="",i=1;i<n.length;i++)o+=n[i],i!==n.length-1&&(o+=".");return _O(o,t[r].schema)}function $O(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t;for(var o="",i=1;i<n.length;i++)o+=n[i],i!==n.length-1&&(o+=".");return $O(o,t[r])}var ez=function(e){return U.jsx(Lu,{src:e,sx:{width:1,height:1}})},tz=function(e){switch(e){case exports.FieldTypes.ARRAY:case exports.FieldTypes.FILE:case exports.FieldTypes.IMAGE:case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.NESTEDSCHEMA:case exports.FieldTypes.LOCATION:return!0;default:return!1}};function nz(e,t,n,r,o,i){if(!r||!t||!r.hasOwnProperty(t.key)||null===r[t.key])return"---";switch(e.type){case exports.FieldTypes.STRING:if(!r.hasOwnProperty(t.key)||null===r[t.key])return"---";break;case exports.FieldTypes.DATE:return function(e,t){var n=(e=new Date(e)).getMonth()+1,r=e.getDate(),o=tM(n),i=tM(r),a=e.getFullYear()+"-"+o+"-"+i;return t&&(a=a+" "+eM(e,jg.ENGLISH)),a}(n,!(!i[t.key]||!i[t.key].withTime));case exports.FieldTypes.LOCALIZEDString:var a=r[t.key]&&r[t.key][0]?hv.getLocalizedString(r[t.key]):"----";return a||"---";case exports.FieldTypes.NESTEDSCHEMA:return"Object {...}";case exports.FieldTypes.ARRAY:return"Length ["+n.length+"]";case exports.FieldTypes.REFERENCE:if(!r[t.key])break;var s=o[t.path];if(!s||!s.properties||!r[t.key])return n._id;var l=o[t.path].properties.title,c=ty.checkLocalizedString(o,t.path,l)?hv.getLocalizedString(r[t.key][l]):r[t.key][l];return s.properties.actions.show.isAccessible?n?c:"---- ":n?c:"---"}return n}function rz(e){var t,r=e.params,o=e.props,i=e.resourceName,a=e.extras,s=Sg().paths,l=kg().resources;if(!l)return U.jsx(U.Fragment,{});var c=null===(t=l[i].properties.model[o.key])||void 0===t?void 0:t.isClickable,u=null==a?void 0:a.onClickProperty;return c?U.jsx(n.Button,{sx:{padding:0},onClick:function(){return u&&u[o.key]?u[o.key](o,i,r):void 0},children:UO(i,o,r,l,s)}):UO(i,o,r,l,s)}var oz=1,iz=[5,10,25,50,100],az={currentPage:1,perPage:5,recordsCount:0},sz={page:oz,perPage:5};function lz(e,t,n,r,o,i,a){var s=null==t?void 0:t[n],l=e.filter((function(e){return"actions"!==e.key})).map((function(e){var r,o,l=null===(o=null===(r=null==s?void 0:s.properties)||void 0===r?void 0:r.model)||void 0===o?void 0:o[e.key],c=i?null==l?void 0:l.minWidth:150;return{field:e.key,headerName:e.value,align:"center",headerAlign:"center",flex:e.flex?e.flex:i?1:void 0,minWidth:c,cellClassName:function(e){return WO(e.value)?"truncate-cell":"normal-cell"},valueGetter:function(r){return function(e,t,n,r){var o=r[e].properties?r[e].properties.model:void 0,i=r[e].properties,a=i.title;i.actions;var s=n.value,l=n.row;if(t.key.includes(".")){var c=t.key.split("."),u={key:c[c.length-1],value:t.value,path:t.path},d=$O(t.key,l);return nz(_O(t.key,o),u,d?d[u.key]:null,d,r,o)}return l.hasOwnProperty(t.key)&&null!==l[t.key]?t.key===a?o[t.key].type===exports.FieldTypes.LOCALIZEDString?hv.getLocalizedString(l[t.key]):l[t.key]:nz(o[t.key],t,s,l,r,o):"---"}(n,e,r,t)},renderCell:function(t){return e.renderCell?e.renderCell(t):U.jsx(rz,{resourceName:n,params:t,props:e,extras:a})}}})),c=e.find((function(e){return"actions"===e.key})),u={field:"actions",headerName:"",type:"number",editable:!1,align:"center",headerAlign:"left",disableColumnMenu:!0,flex:i?1:void 0,minWidth:i?void 0:150,hideable:!1,sortable:!1,disableExport:!0,renderCell:function(e){return(null==c?void 0:c.renderCell)?null==c?void 0:c.renderCell(e):U.jsx(GO,{resources:t,params:e,resourceName:n,dialogState:r,paramsState:o,extras:a})}};return!(null==a?void 0:a.hideActions)&&l.push(u),l}var cz=function(){function e(e,t){this.defaultrowsPerPage=t,this.searchParams=e}return e.prototype.get=function(){return{page:this.getPageNumber(),pageSize:this.getPageSize()}},e.prototype.getPageSize=function(){var e=this.searchParams.get("perPage");return e?isNaN(+e)||+e<=0?this.getDefaultPageSize():iz.reduce((function(t,n){return Math.abs(n-+e)<Math.abs(t-+e)?n:t})):this.defaultrowsPerPage},e.prototype.getPageNumber=function(){var e=this.searchParams.get("page"),t=sz.page;return e?isNaN(+e)||+e<=0?this.getDefaultPageNumber():+e:t},e.prototype.getDefaultPageSize=function(){return this.defaultrowsPerPage},e.prototype.getDefaultPageNumber=function(){return sz.page},e}();function uz(e){var t,n,r=e.defaultFilters,o=e.resource,i=e.searchParams,a=o.properties.filters,s=a&&a.scopes&&a.scopes.auto?a.scopes.auto.key:void 0,l=o.properties.model,c=a.scopes.options,u=void 0===(null===(t=a.scopes)||void 0===t?void 0:t.showAll)||(null===(n=a.scopes)||void 0===n?void 0:n.showAll),d=o.properties.defaultOrderBy,p=o.properties.defaultOrder,f=o.properties.defaultrowsPerPage,m={},h=void 0;new FA(o).getUniqueFields().forEach((function(e){"__v"!==e&&""!==e&&QA(l[e],e,m,i,l)})),h=VA(m,l,s);var g=new cz(i,f).get();return{page:g.page,order:p,orderBy:d,perPage:g.pageSize,filters:r?h.concat(r):h,scope:s&&i.get(s)?i.get(s):!u&&c?c[0].key:void 0}}var dz={},pz=xa;Object.defineProperty(dz,"__esModule",{value:!0});var fz=dz.default=void 0,mz=pz(Ca()),hz=U,gz=(0,mz.default)((0,hz.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function vz(t){var o=t.schema,i=t.onClickClearFilter,a=t.onRemoveFilterValue,s=e.useState([]),l=s[0],c=s[1],u=r.useSearchParams(),d=u[0];return u[1],e.useEffect((function(){d&&c(function(e,t){var n=[];if(!e)return n;var r,o=function(o){var i=t[o],a=i.type;r=e.get(o);var s=Bu.checkRefId(o)?Bu.convertCamelCaseToWord(o.slice(0,-2)):Bu.convertCamelCaseToWord(o);switch(a){case exports.FieldTypes.STRING:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.ENUM:r&&n.push({fieldKey:o,fieldTitle:s,filterValues:[{filterValueKey:o,filterValueTitle:r}]});break;case exports.FieldTypes.BOOLEAN:!1!==r&&!0!==r||n.push({fieldTitle:s,fieldKey:o,filterValues:[{filterValueKey:o,filterValueTitle:r}]});break;case exports.FieldTypes.NUMBER:case exports.FieldTypes.DATE:var l=o+"-from",c=o+"-to",u=e.get(o+"-from")?e.get(o+"-from"):void 0,d=e.get(o+"-to")?e.get(o+"-to"):void 0;if(u||d){var p=[];u&&p.push({filterValueKey:l,filterValueTitle:"From: ".concat(u)}),d&&p.push({filterValueKey:c,filterValueTitle:"To: ".concat(d)}),n.push({fieldTitle:s,fieldKey:o,filterValues:p})}break;case exports.FieldTypes.REFERENCE:if(i.multipleInFilter){var f=e.getAll(o+"-name");if(f&&f.length>0){var m=e.getAll(o+"-id");m&&m.length>0&&m.length===f.length&&n.push({fieldKey:o,fieldTitle:s,filterValues:f.map((function(e,t){return{filterValueKey:m[t],filterValueTitle:f[t]}}))})}}else{var h=e.get(o+"-name"),g=e.get(o+"-id");h&&g&&n.push({fieldKey:o,fieldTitle:s,filterValues:[{filterValueKey:g,filterValueTitle:h}]})}}};for(var i in t)o(i);return n}(d,o))}),[d]),U.jsx(U.Fragment,{children:0===l.length?U.jsx(U.Fragment,{children:" "}):U.jsxs(n.Grid,{container:!0,justifyContent:"start",rowGap:{xs:"10px"},columnGap:{xs:"10px"},alignItems:"center",children:[l.map((function(e){return U.jsxs(n.Stack,{direction:"row",alignItems:"center",padding:.6,borderRadius:"8px",sx:{border:"1px dashed rgba(145, 158, 171, 0.2)"},spacing:1,children:[U.jsx(n.Typography,{fontSize:{xs:"13px",md:"14px"},fontWeight:600,children:"".concat(e.fieldTitle)}),U.jsx(n.Stack,{direction:"row",alignItems:"center",spacing:1,children:e.filterValues.map((function(t){return U.jsx(n.Chip,{size:"small",sx:{fontSize:{xs:"12px",md:"13px"},borderRadius:"8px",overflow:"hidden",textOverflow:"ellipsis",fontWeight:500},label:t.filterValueTitle,variant:"outlined",onDelete:a?function(){return a(e.fieldKey,t.filterValueKey)}:void 0},t.filterValueKey)}))})]},e.fieldKey)})),i&&U.jsx(n.Button,{onClick:i,variant:"text",color:"error",startIcon:U.jsx(fz,{}),children:"Clear"})]})})}function Az(t){var o,i=this,a=r.useParams().id,s=void 0===a?"":a,l=e.useState(),c=l[0],u=l[1],d=e.useState(void 0),p=d[0],f=d[1],m=e.useState([]),h=m[0],g=m[1],v=e.useState({}),A=v[0],y=v[1],b=(o=r.useLocation().pathname,e.useMemo((function(){return o}),[o])),x=t.isEdit,w=t.isDuplicate,j=t.path,C=t.modelRoute,M=t.removeHeaderBreadcrumbs,O=t.afterCreateSnackText,z=t.afterEditSnackText,T=t.onSubmitForm,D=t.Component,P=t.redirectPath,N=t.Actions,E=t.HeadingView,B=t.BreadcrumbsChildren,k=t.BreadCrumbLinks,L=t.disableCreateNewButtonOnReference,I=t.keepFullWidthElements,S=t.defaultFilters,H=t.showFilterChips,R=t.hideHeaderBreadcrumbs,W=void 0!==R&&R,F=t.fieldsMap,V=x||w,Q=e.useState(!!V),X=Q[0],Y=Q[1],G={},Z=r.useLocation(),K=e.useContext(Kh).resources,$=e.useContext(ug);$.textFieldSize;var te=$.themeStretch,ne=e.useContext(Ih).dashbaordUrlPrefix,oe=e.useContext(Jh),ie=oe.paths,ae=oe.root,se=r.useNavigate(),le=r.useSearchParams(),ce=le[0];le[1];var ue=hv.isEnglish(),de=K[j],pe=de.properties,fe=pe.model,me=pe.name,he=pe.title,ge=new jv(me,ue,he,c,fe,x),ve=uz({defaultFilters:S,searchParams:ce,resource:de});return e.useEffect((function(){J(i,void 0,void 0,(function(){var e,t;return _(this,(function(n){switch(n.label){case 0:return V?(Y(!0),[4,Bh.get("".concat(ne,"/").concat(C)+"/"+s,{params:ve})]):[3,2];case 1:e=n.sent(),u(e.data.data.record),e.data.data.numberOfRecords&&e.data.data.recordIndex&&f({recordIndex:e.data.data.recordIndex,numberOfRecords:e.data.data.numberOfRecords}),Y(!1),n.label=2;case 2:return(t=de.formProperties)&&t.map((function(e){"ref"===fe[e].type&&(G[e]=fe[e].apiRoute,fe[e].mediaUploader&&g((function(t){return t.concat(e)})))})),0!==Object.keys(G).length&&y(G),[2]}}))}))}),[b]),sM(de,x?JC.EDIT:JC.CREATE)?U.jsx(ee,{title:ge.getTitle(),children:U.jsxs(n.Container,{maxWidth:!te&&"lg",children:[!W&&U.jsx(re,{headingView:E&&!X&&U.jsx(E,{record:c}),heading:ge.getTitle(),links:M?[]:k&&!X?k(c):ge.getBreadCrumbLinks(ie,j,ae),action:U.jsxs(n.Stack,{spacing:2,children:[!de.properties.disableNextPreviousButtonsInEditPage&&x&&U.jsx(KM,q({},t,{params:ve,recordId:s,modelPath:C,navigateTo:function(e){var t=ie[j].edit(e);se("".concat(t).concat(Z.search))},numberOfRecords:null==p?void 0:p.numberOfRecords,recordIndex:null==p?void 0:p.recordIndex})),U.jsx(n.Stack,{direction:"row",spacing:2,children:c&&!X&&N&&U.jsx(N,{record:c,setRecord:u})})]}),children:B&&!X&&U.jsx(B,{record:c})}),U.jsxs(n.Stack,{spacing:1,children:[H&&U.jsx(vz,{schema:fe}),X?U.jsx(n.Grid,{container:!0,alignItems:"center",children:U.jsx(wv,{loadingVertical:!0,sx:{height:50}},5)}):D?U.jsx(D,{record:c,isEdit:x,isDuplicate:w,refRoutes:A,id:s,path:j,modelRoute:C,resources:K,mediaUploaderFields:h,onSubmitForm:T,afterCreateSnackText:O,afterEditSnackText:z}):U.jsx(UM,{isEdit:x,referencedMap:A,isDuplicate:w,id:s,record:c,path:j,mediaUploaderFields:h,onSubmitForm:T,modelRoute:C,redirectPath:P,afterCreateSnackText:O,afterEditSnackText:z,enableCreateNewButtonOnReference:!L,keepFullWidthElements:I,fieldsMap:F})]})]})}):U.jsx(_M,{})}function yz(e){var t=e.open,r=e.data,o=e.onDismiss,i=r.resource,a=r.resourcePath,s=r.enableCreateNewButtonOnReference,l=Ig().setSuccessAlert,c=hv.isEnglish(),u=i.properties,d=u.model,p=u.name,f=u.title,m=new jv(p,c,f,void 0,d,!1);return U.jsx(n.Drawer,{anchor:"right",open:t,onClose:o,sx:q(q({},s&&{"& .MuiDrawer-paper":{maxWidth:"50vw"}}),{overflowY:"auto",maxHeight:"calc(100vh - 100px)","&::-webkit-scrollbar":{width:"4px",height:"4px"},"&::-webkit-scrollbar-track":{borderRadius:"10px",background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}}),children:U.jsx("div",{style:{paddingTop:"24px",paddingBottom:"24px"},children:U.jsx(Az,{isEdit:!1,modelRoute:i.properties.path,path:a,removeHeaderBreadcrumbs:!0,onSubmitForm:function(){o(),l("Created successfully")},disableCreateNewButtonOnReference:!0,keepFullWidthElements:!0,HeadingView:function(){return U.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[U.jsx(n.Typography,{variant:"h4",gutterBottom:!0,children:m.getTitle()}),U.jsx(n.IconButton,{onClick:o,children:U.jsx(Oa,{})})]})}},"CreateNewDialog-".concat(a))})})}fz=dz.default=gz;var bz="AddMoreOption";function xz(t){var r=t.name,o=t.options,i=t.loading,a=t.multiple,s=t.onOptionChange,l=t.onOpenChanged,u=t.hasNext,d=t.loadMoreText,p=t.resource,f=t.resourcePath,m=t.enableCreateNewButtonOnReference,h=t.dependOn,g=t.relatedFields,v=t.fieldKey,A=K(t,["name","options","loading","multiple","onOptionChange","onOpenChanged","hasNext","loadMoreText","resource","resourcePath","enableCreateNewButtonOnReference","dependOn","relatedFields","fieldKey"]),y=c.useFormContext(),b=y.control,x=y.getValues,w=y.watch,j=y.reset;y.setValue;var C=e.useState(!1),M=C[0],O=C[1],z=e.useState({page:1,filter:void 0}),T=z[0],D=z[1],P=Bg().textFieldSize,N=Hg().openDialog,E=function(e){var t,n,r;t=e.target.value,n=B(),r="".concat(null!=t?t:"").concat(n?"&".concat(n):""),D({page:1,filter:r})},B=function(){if(null==h?void 0:h.length){var e=[];return h.forEach((function(t){var n=x(t);n&&n._id&&e.push("".concat(t,"=").concat(n._id,";;ref"))})),e.length?"filters=".concat(e.join("^^")):void 0}},k=w(null!=h?h:[]),L=function(e){var t,n=(null===(t=T.filter)||void 0===t?void 0:t.split("filters=")[0])||T.filter,r=B(),o="".concat(null!=n?n:"").concat(r?"&".concat(r):"");D((function(e){return q(q({},e),{filter:o})})),l(e,T.page,o),O(e)},I=e.useMemo((function(){return bv.debounce(E,500)}),[]);e.useEffect((function(){return function(){I.cancel()}}),[]),e.useEffect((function(){l(M,T.page,T.filter)}),[T]);var S=U.jsx(qu,{fontSize:"small"}),H=U.jsx(td,{fontSize:"small"}),R=!!(null==h?void 0:h.length)&&k.some((function(e){return!e||!e._id}));return U.jsxs(n.Stack,{spacing:0,children:[U.jsx(c.Controller,{name:r,control:b,render:function(e){var t=e.field,l=e.fieldState.error;return R?U.jsx(U.Fragment,{}):U.jsx(n.Autocomplete,q({multiple:a,fullWidth:A.fullWidth,sx:A.sx},t,{filterOptions:function(e){var t=$([],e,!0);return u&&0!==e.length&&t.push({_id:bz,title:null!=d?d:"+ Load More"}),t},disableCloseOnSelect:a,id:r,size:"medium",open:M,disabled:A.disabled||(null==h?void 0:h.some((function(e,t){var n=k[t];return!n||!n._id}))),onOpen:function(){return L(!0)},onClose:function(){L(!1)},isOptionEqualToValue:function(e,t){return e._id===t._id},renderOption:function(e,t,r){var o,i,s=r.selected;return U.jsx(U.Fragment,{children:t._id===bz?U.jsx(n.Stack,{justifyContent:"center",children:U.jsx(n.Button,{sx:{margin:1},onClick:function(){return D({page:T.page+1,filter:T.filter})},children:t.title})}):U.jsx("li",q({},e,{style:{justifyContent:t._id===bz?"center":void 0},children:U.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[a&&U.jsx(n.Checkbox,{icon:S,checkedIcon:H,style:{marginRight:1},checked:s}),t.image&&U.jsx(n.Avatar,{alt:"-",src:t.image}),U.jsx(n.Typography,{children:p?gv.get(p,t):null!==(i=null!==(o=t.title)&&void 0!==o?o:t.name)&&void 0!==i?i:t._id})]})}))})},getOptionLabel:function(e){var t,n,r,o=p?gv.get(p,e):null!==(r=null!==(n=null!==(t=null==e?void 0:e.title)&&void 0!==t?t:null==e?void 0:e.name)&&void 0!==n?n:null==e?void 0:e._id)&&void 0!==r?r:"";return e.image&&!a&&o&&""!==o?o+";;"+e.image:o},options:null!=o?o:[],loading:i,onChange:function(e,n,r){var o=x();if(s&&s(n),t.onChange(a?n:q({},n)),g&&g.length>0){var i=x();g.forEach((function(e){i[e]=bv.isArray(i[e])?[]:null})),"clear"===r&&v?i[v]=null:"selectOption"===r&&v&&(i[v]=n),j(i)}else if("clear"===r&&v){if(bv.isArray(o[v])){var l=t.name.match(/\[(\d+)\]/),c=l?parseInt(l[1],10):null;o[v]=o[v].filter((function(e,t){return t!==c}))}else o[v]=null;j(o)}},renderInput:function(e){var t,r,o,s=e.inputProps.value,c=void 0;if(!a&&"string"==typeof s&&s.includes(";;")){var u=s.split(";;");c=u[1],e.inputProps=q(q({},e.inputProps),{value:u[0]}),e.InputProps=q(q({},e.InputProps),{startAdornment:U.jsx(n.Avatar,{src:c,alt:""})})}return U.jsx(n.TextField,q({},e,A,{size:P,error:!!l,onChange:I,helperText:null!==(t=null==l?void 0:l.message)&&void 0!==t?t:null===(o=null===(r=Object(l))||void 0===r?void 0:r._id)||void 0===o?void 0:o.message,InputProps:q(q({},e.InputProps),{endAdornment:U.jsxs(U.Fragment,{children:[i?U.jsx(n.CircularProgress,{color:"inherit",size:20}):null,e.InputProps.endAdornment]})})}))}}))}}),m&&U.jsx(n.Button,{size:"small",onClick:function(){N(yz,{resource:p,resourcePath:f,enableCreateNewButtonOnReference:m})},sx:{flexShrink:0,alignSelf:"end",padding:0,marginTop:0,fontSize:"13px",fontWeight:400,textDecoration:"underline"},style:{marginBottom:"5px"},children:"Create New"})]})}var wz=["true","false"];function jz(e,t,r,o,i,a,s,l,c,u,d,p){var f;if(r[t])switch(r[t].type){case exports.FieldTypes.STRING:return U.jsx(Yu,{name:a,size:e,label:r[t].value},t);case exports.FieldTypes.PHONENUMBER:return U.jsx(C,{defaultCountry:r[t].defaultCountryCode?r[t].defaultCountryCode:r[t].countryCodes?r[t].countryCodes[0]:"sa",onChange:function(e){return u(a,e)},onlyCountries:r[t].countryCodes?r[t].countryCodes:[],name:a,size:e,label:r[t].value,value:d(a)?d(a):"",variant:"outlined",fullWidth:!0},t);case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.OBJECTID:return U.jsx(Yu,{name:a,size:e,label:r[t].value},t);case exports.FieldTypes.NUMBER:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsxs(n.Stack,{direction:"row",spacing:2,children:[U.jsx(Yu,{name:t+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),U.jsx(Yu,{name:t+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case exports.FieldTypes.DATE:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsxs(n.Grid,{container:!0,spacing:2,children:[U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:t+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:t+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case exports.FieldTypes.ENUM:return U.jsx(Gu,{name:a,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:Object.keys(r[t].enumValues).map((function(e){var o,i,a,s=r[t].enumValues,l=(null===(o=s[e])||void 0===o?void 0:o.label)?e:s[e],c=null!==(a=null===(i=s[e])||void 0===i?void 0:i.label)&&void 0!==a?a:s[e];return U.jsx(n.MenuItem,{value:l,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:TM.enhance(c)},l)}))},t);case exports.FieldTypes.BOOLEAN:return U.jsx(Gu,{name:a,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:wz.map((function(e){return U.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case exports.FieldTypes.ARRAY:case exports.FieldTypes.REFERENCE:var m=p?p[null===(f=r[t])||void 0===f?void 0:f.path]:void 0,h=XM(r,t,LM.FILTER_LIST,m);return U.jsx(xz,{name:a,size:e,label:r[t].value,multiple:!1,onOptionChange:function(e){return c(e,t)},options:o[t]&&o[t].data?o[t].data:[],loading:i[a],hasNext:o[t]&&o[t].hasNext,onOpenChanged:function(e,n,o){return l(r[t].apiRoute,r[t].path,e,t,a,n,o,h)},resource:m},t);default:return}}var Cz={},Mz=xa;Object.defineProperty(Cz,"__esModule",{value:!0});var Oz=Cz.default=void 0,zz=Mz(Ca()),Tz=U,Dz=(0,zz.default)((0,Tz.jsx)("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"}),"RestartAlt");Oz=Cz.default=Dz;var Pz={},Nz=xa;Object.defineProperty(Pz,"__esModule",{value:!0});var Ez=Pz.default=void 0,Bz=Nz(Ca()),kz=U,Lz=(0,Bz.default)((0,kz.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt");function Iz(t){var r=this,o=t.schema,i=t.resources,a=t.filterProperties,s=t.searchParams,u=t.scopeKey,d=t.scopeValue,p=t.setParams,f=t.size;t.initialQueryParams;var m=t.isQuickFilter,h=t.quickFilterValues,g=t.onRefrenceChanged,v=t.setSearchParams,A=t.handleFilterDrawerClose,y=t.filterString,b=e.useState({}),x=b[0],w=b[1],j=e.useState({}),C=j[0],M=j[1],O=function(e,t,n,a,s,l,c,u){return J(r,void 0,void 0,(function(){return _(this,(function(r){switch(r.label){case 0:return[4,WM({apiRoute:e,referencedValues:C,value:n,loading:x,fullKey:s,key:a,pathRoute:t,resources:i,schema:o,setLoading:w,setReferencedValues:M,page:l,filter:c,filters:u})];case 1:return r.sent(),[2]}}))}))},z={},T={};a.map((function(e,t){"__v"!==e&&o[e]&&(z[e]=uv(o[e],e,T,s))}));var D=H.object().shape(z),P=hv.isEnglish(),N=e.useMemo((function(){return T}),[]),E=c.useForm({resolver:Pa(D),defaultValues:N}),B=E.handleSubmit,k=E.reset,L=E.setValue,I=E.getValues,R=function(e){return J(r,void 0,void 0,(function(){var t,n;return _(this,(function(r){return t=q(q({},e),h),n=Av(t,A,o,s,v,u,d,i),y&&y(n,e),[2]}))}))};return m?U.jsx(Su,{methods:E,onSubmit:B(R),children:U.jsxs(n.Stack,{direction:"row",spacing:2,justifyContent:"end",children:[a&&a.map((function(e,t){return U.jsx(n.Grid,{minWidth:170,children:jz(f,e,o,C,x,e,P,O,g,L,I,i)},e+t)})),U.jsx(l.LoadingButton,{size:"small",type:"submit",variant:"outlined",children:P?"Filter":"التصفية"})]},"grid1")}):U.jsx("div",{children:U.jsx(S.Fragment,{children:U.jsxs(Su,{methods:E,onSubmit:B(R),children:[U.jsx(mv,{children:U.jsx(n.Grid,{container:!0,spacing:2,justifyContent:"end",style:{padding:"2rem"},children:a&&a.map((function(e,t){return U.jsx(n.Grid,{item:!0,xs:12,children:jz(f,e,o,C,x,e,P,O,g,L,I,i)},e+t)}))},"grid1")}),U.jsx(zo,{sx:{marginTop:"2rem",paddingBottom:"2rem"},children:U.jsx(n.Stack,{mt:2,ml:3,children:U.jsxs(n.Grid,{flexDirection:"column",children:[U.jsx(l.LoadingButton,{style:{flex:1,margin:8,width:150},type:"submit",variant:"contained",startIcon:U.jsx(Ez,{}),children:P?"Filter":"التصفية"}),U.jsx(l.LoadingButton,{style:{flex:1},type:"reset",variant:"outlined",color:"inherit",startIcon:U.jsx(Oz,{}),onClick:function(){v({}),p((function(e){return q(q({},e),{filters:void 0})})),k(q({},N)),A()},children:P?"Reset":"إلغاء"})]})})})]})})})}function Sz(e){var t=e.schema,r=e.resources,o=e.size,i=e.open,a=e.scopeKey,s=e.scopeValue,l=e.filterProperties,c=e.searchParams,u=e.setSearchParams,d=e.setParams,p=e.initialQueryParams,f=e.quickFilterValues,m=e.onRefrenceChanged,h=e.handleFilterDrawerClose,g=e.filterString,v=hv.isEnglish();return U.jsx("div",{children:U.jsx(S.Fragment,{children:U.jsxs(ca,{anchor:"right",open:i,onClose:h,children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",style:{minWidth:"340px",padding:"1rem",width:"20vw"},justifyContent:"space-between",sx:{px:1,py:1},children:[U.jsx(n.Typography,{variant:"h6",children:v?"Filters":"التصفية"}),U.jsx(n.IconButton,{onClick:h,children:U.jsx(Oa,{})})]}),U.jsx(va,{}),U.jsx(mv,{children:U.jsx(Iz,{schema:t,size:o,resources:r,initialQueryParams:p,filterProperties:l,onRefrenceChanged:m,handleFilterDrawerClose:h,filterString:g,scopeKey:a,scopeValue:s,setParams:d,searchParams:c,setSearchParams:u,quickFilterValues:f})})]})})})}Ez=Pz.default=Lz;var Hz=e.forwardRef((function(e,t){return U.jsx(n.Slide,q({direction:"up",ref:t},e))}));function Rz(t){var r,o,i=t.open,a=t.onClose,s=t.title,c=t.onConfirm,u=t.message,d=t.action,p=t.extras,f=e.useState(!1),m=f[0],h=f[1];return U.jsxs(n.Dialog,{open:i,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&a&&a()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,TransitionComponent:Hz,children:[U.jsx(n.DialogTitle,{children:s}),U.jsx(n.DialogContent,{children:U.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:u})}),U.jsxs(n.DialogActions,{children:[U.jsx(n.Button,{color:"inherit",onClick:a,disabled:m,children:null!==(r=null==p?void 0:p.cancelText)&&void 0!==r?r:"Cancel"}),U.jsx(l.LoadingButton,{variant:"contained",onClick:function(){d&&(h(!0),d().then((function(e){var t=e.data.data?e.data.data.response:e.data.meta;h(!1),c&&c(t)})).catch((function(e){a&&a(),console.log(e)})))},loading:m,children:null!==(o=null==p?void 0:p.confirmText)&&void 0!==o?o:"Confirm"})]})]})}var Wz=n.styled("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function Fz(e){var t=e.checkBox,r=e.numberOfColumns,o=K(e,["checkBox","numberOfColumns"]),i=Array.apply(null,Array(r)).map((function(e,t){return t}));return U.jsx(n.TableRow,q({},o,{children:U.jsx(n.TableCell,{children:U.jsxs(n.Stack,{spacing:2,gridRow:"auto",direction:"row",justifyContent:"space-around",width:920,children:[t&&U.jsx(n.Skeleton,{variant:"rectangular",width:20,height:20,sx:{borderRadius:1,flexShrink:0}}),i.map((function(e){return U.jsx(n.Skeleton,{variant:"text",width:150,height:20},e)}))]})})}))}var Vz=n.styled("div")((function(e){var t=e.theme;return{right:24,zIndex:9,bottom:40,display:"flex",position:"fixed",alignItems:"center",boxShadow:t.customShadows.z20,padding:t.spacing(1.5,1,1.5,2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.text.primary}}));function Qz(e){var t,r=e.action,o=e.selected;e.rowCount,e.numSelected;var i=e.extras;e.onSelectAllItems;var a=e.sx,s=K(e,["action","selected","rowCount","numSelected","extras","onSelectAllItems","sx"]);return U.jsx(n.Portal,{children:U.jsxs(Vz,q({sx:a},s,{children:[U.jsxs(n.Typography,{variant:"subtitle2",sx:{mr:2,color:function(e){return"light"===e.palette.mode?"common.white":"grey.800"}},children:[o&&o.length,U.jsx(n.Box,{component:"span",sx:{ml:.5},children:null!==(t=null==i?void 0:i.itemsSelectedText)&&void 0!==t?t:"items selected"})]}),r&&r]}))})}var Xz={},Yz=xa;Object.defineProperty(Xz,"__esModule",{value:!0});var Gz,Zz=Xz.default=void 0,Uz=Yz(Ca()),qz=U,Kz=(0,Uz.default)((0,qz.jsx)("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}),"FileDownloadOutlined");function Jz(e){if(!e)return[];for(var t=e.listProperties,n=e.properties.model,r=[],o=0,i=t;o<i.length;o++){var a=i[o],s=n[a.key];_z(null==s?void 0:s.type)&&r.push(q(q({},a),{name:a.value,_id:a.key,type:null==s?void 0:s.type}))}return r}function _z(e){switch(e){case exports.FieldTypes.BOOLEAN:case exports.FieldTypes.STRING:case exports.FieldTypes.ENUM:case exports.FieldTypes.DATE:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.REFERENCE:case exports.FieldTypes.COLOR:case exports.FieldTypes.TIMEPICKER:case exports.FieldTypes.LOCATION:case exports.FieldTypes.RICH_TEXT_I:case exports.FieldTypes.RICH_TEXT_II:case exports.FieldTypes.JSON_RICH_TEXT:case exports.FieldTypes.EXTERNAL_LINK:case exports.FieldTypes.NUMBER:return!0;default:return!1}}function $z(e,t,n){var r;if(e.type===Gz.REFERENCE){var o=e.path,i=n[o];if(!i||!i.properties||!o)return"".concat(t,"._id");var a=null!==(r=i.properties.title)&&void 0!==r?r:"_id";return"".concat(t,".").concat(a)}}function eT(e,t,n){var r;if(e.type===Gz.REFERENCE){var o=e.path,i=n[o];if(i&&i.properties&&o){var a=null!==(r=i.properties.title)&&void 0!==r?r:"_id",s=i.properties.model;if(s&&a&&s[a])return s[a].type}}}Zz=Xz.default=Kz,function(e){e.STRING="String",e.NUMBER="Number",e.ENUM="enum",e.REFERENCE="ref",e.DATE="Date",e.PASSWORD="password",e.BOOLEAN="Boolean",e.OBJECTID="ObjectID",e.NESTEDSCHEMA="nestedSchema",e.ARRAY="Array",e.IMAGE="image"}(Gz||(Gz={}));var tT=[{label:"PDF",value:"pdf"},{label:"Excel sheet",value:"xlsx"}],nT=o.object().shape({fileType:o.string().default("xlsx").required("Please select a valid file type"),columns:o.array().of(o.object({_id:o.string(),label:o.string()})).required("Please select at least one day").min(1)});function rT(e){var t=e.open,r=e.setOpen,o=e.resource,i=e.resources,a=e.params,s=[];Object.keys(null==o?void 0:o.properties.model).forEach((function(e){var t,n,r=o.properties.model[e];_z(r.type)&&"__v"!==e&&"salt"!==e&&"hash"!==e&&s.push(q(q({},r),{label:null!==(t=r.value)&&void 0!==t?t:e,value:r.type===exports.FieldTypes.REFERENCE?e:null!==(n=r.valuePath)&&void 0!==n?n:e,type:r.type}))}));var u=Gh(),d=u.requestState,p=u.get,f=c.useForm({resolver:Pa(nT),defaultValues:{fileType:"xlsx",columns:Jz(o)}}),m=f.handleSubmit,h=f.watch,g=f.setValue;return U.jsx(n.Dialog,{open:t,maxWidth:"sm",fullWidth:!0,children:U.jsxs(Su,{methods:f,onSubmit:m((function(e){var t=e.fileType,n=e.columns.map((function(e){return{value:e._id,label:e.name,type:e.type,titlePath:$z(e,e._id,i),titleType:eT(e,e._id,i)}}));p({url:"".concat(o.properties.path,"/report"),query:q({fields:n,fileType:e.fileType},a),axiosRequestConfig:{responseType:"blob"},rowResponse:!0,onSuccess:function(e){var n=window.URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download="".concat(o.properties.path,".").concat(t),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}})})),children:[U.jsx(n.DialogTitle,{sx:{mb:2},children:"Export Schedule"}),U.jsx(n.Divider,{}),U.jsx(n.DialogContent,{children:U.jsxs(n.Stack,{spacing:2,divider:U.jsx(n.Divider,{}),children:[U.jsxs(n.Stack,{children:[U.jsx(n.Typography,{sx:{color:"#637381",fontSize:"16px",fontStyle:"normal",fontWeight:700,lineHeight:"25px"},children:"Select the file type"}),U.jsx(Ug,{name:"fileType",options:tT,row:!1})]}),U.jsxs(n.Stack,{children:[U.jsx(n.Typography,{sx:{color:"#637381",fontSize:"16px",fontStyle:"normal",fontWeight:700,lineHeight:"25px",mb:2},children:"Select Columns:"}),U.jsx(id,{name:"columns",loading:!1,onOpenChanged:function(){},multiple:!0,options:s.map((function(e){return{name:e.label,_id:e.value,type:e.type,path:e.path}})),label:"Select Columns"}),U.jsx(n.Button,{size:"small",onClick:function(){g("columns",[])},sx:{flexShrink:0,alignSelf:"end",padding:0,marginTop:0,fontSize:"13px",fontWeight:400,textDecoration:"underline"},style:{marginBottom:"5px"},children:"Clear"})]})]})}),U.jsx(n.DialogActions,{children:U.jsxs(n.Stack,{direction:"row",spacing:1,children:[U.jsx(n.Button,{variant:"outlined",color:"inherit",onClick:function(){return r(!1)},children:"Cancel"}),U.jsx(l.LoadingButton,{variant:"contained",type:"submit",loading:d.state===exports.RequestState.LOADING,disabled:0===h("columns").length,children:"Export"})]})})]})})}function oT(e){var t=e.open,r=e.title,o=e.message,i=e.secondaryTitle,a=e.secondaryMessage,s=e.isSecondaryAction,c=void 0!==s&&s,u=e.onClose,d=e.onAction,p=e.onSecondaryAction,f=e.secondaryButtonText,m=void 0===f?"Confirm":f,h=e.buttonText,g=void 0===h?"Confirm":h,v=e.loading,A=function(){c?p?p():u():d&&d()};return U.jsxs(n.Dialog,{open:t,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&u()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,children:[U.jsx(n.DialogTitle,{children:c?i:r}),U.jsx(n.DialogContent,{children:U.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:c?a:o})}),U.jsxs(n.DialogActions,{children:[U.jsx(n.Button,{color:"inherit",onClick:u,disabled:v,children:"Cancel"}),c?U.jsx(l.LoadingButton,{variant:"contained",onClick:A,loading:v,children:m}):U.jsx(l.LoadingButton,{variant:"contained",onClick:A,loading:v,children:g})]})]})}function iT(t){var r=t.resource,o=t.resources,i=t.params,a=e.useState(!1),s=a[0],l=a[1];return U.jsxs(P.GridToolbarContainer,{sx:{mt:2},children:[U.jsx(P.GridToolbarColumnsButton,{}),U.jsx(P.GridToolbarFilterButton,{}),U.jsx(P.GridToolbarDensitySelector,{}),U.jsx(n.Button,{startIcon:U.jsx(Zz,{}),onClick:function(){return l(!0)},children:"Export"}),U.jsx(rT,{open:s,setOpen:l,resource:r,resources:o,params:i})]})}function aT(e,t,n){return U.jsx(U.Fragment,{children:[1,2].map((function(e){return function(e,t,n){return U.jsx(Fz,{sx:{height:72},checkBox:t,numberOfColumns:n},e)}(e,t,n)}))})}function sT(t){var o,i,a=this,s=t.resources,c=t.resourceName,u=t.paramsState,d=t.bulkActionsDialogState,p=t.extras,f=t.setBulkActionsDialogState,m=t.setPaginatedParameters,h=t.hidePagination,g=e.useContext(Ih).dashbaordUrlPrefix,v=e.useState([]),A=(v[0],v[1]),y=e.useState([]),b=y[0],x=y[1],w=e.useState(!0),j=w[0],C=w[1],M=e.useState(az),O=M[0],z=M[1],T=u[0],D=u[1],N=e.useState(!1),E=N[0],B=N[1],k=e.useState(!1),L=k[0],I=k[1],S=s[c];if(p&&p.overridenResource){var H=p.overridenResource(S);S=q(q({},S),H)}var R,W=S.properties.actions,F=e.useState([]),V=F[0],Q=F[1],X=os("up","lg"),Y=r.useSearchParams(),G=Y[0],Z=Y[1],K=Ig(),ee=K.setSuccessAlert,te=K.setErrorAlert,ne=e.useState({open:!1,title:"",onClose:function(){},onConfirm:function(){}}),re=lz(S.listProperties,s,c,ne,u,X,p);return e.useEffect((function(){!function(e){J(a,void 0,void 0,(function(){return _(this,(function(t){return C(!0),m&&m({totalRecords:void 0}),Bh.get("".concat(g,"/").concat(S.properties.path),{params:e}).then((function(e){var t=e.data.data,n=t.pageInfo,r=t.records;A((function(e){return 1===n.currentPage?$([],r,!0):$($([],e,!0),r,!0)})),x(r),z(n),C(!1),m&&m({totalRecords:n.recordsCount})})),[2]}))}))}(T)}),[T,c,g]),U.jsxs(U.Fragment,{children:[U.jsx(P.DataGrid,q({rows:j?[]:b,columns:re,getRowHeight:function(){return"auto"},sx:{"&.MuiDataGrid-root--densityCompact .MuiDataGrid-cell":{py:"8px"},"&.MuiDataGrid-root--densityStandard .MuiDataGrid-cell":{py:"15px"},"&.MuiDataGrid-root--densityComfortable .MuiDataGrid-cell":{py:"22px"},"& .MuiDataGrid-cell":{alignItems:"center",overflow:"hidden"},"& .truncate-cell .MuiDataGrid-cellContent":{overflow:"hidden !important",whiteSpace:"nowrap !important",textOverflow:"ellipsis !important",display:"block !important",width:"100% !important"},"& .normal-cell .MuiDataGrid-cellContent":{whiteSpace:"normal",wordWrap:"break-word",overflow:"visible"}},initialState:{sorting:{sortModel:[{sort:T.order,field:null!==(o=T.orderBy)&&void 0!==o?o:"_id"}]}},pageSizeOptions:iz,rowCount:null==O?void 0:O.recordsCount,checkboxSelection:!(null==p?void 0:p.hideBulkActions)&&(W.bulkDelete.isAccessible||W.extras&&W.extras.resource&&Object.keys(W.extras.resource).length>0),disableRowSelectionOnClick:!0,loading:j,slots:{loadingOverlay:function(){return aT(0,W.bulkDelete.isAccessible,S.listProperties.length)},noRowsOverlay:function(){return e=null==p?void 0:p.noRowsText,U.jsxs(Wz,{children:[U.jsx("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:U.jsxs("g",{fill:"none",fillRule:"evenodd",children:[U.jsxs("g",{transform:"translate(24 31.67)",children:[U.jsx("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),U.jsx("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),U.jsx("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),U.jsx("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),U.jsx("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),U.jsxs("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[U.jsx("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),U.jsx("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),U.jsx(n.Box,{sx:{mt:1},children:null!=e?e:"No Rows"})]});var e},toolbar:(null==p?void 0:p.hideToolbar)?null:iT},slotProps:{toolbar:{resource:S,resources:s,params:T}},density:(null==p?void 0:p.density)?p.density:"comfortable",editMode:"row"},(R="server",{paginationMode:R,sortingMode:R,filterMode:R}),{pagination:!0,hideFooter:h,hideFooterPagination:h,onPaginationModelChange:function(e,t){e.page!==O.currentPage-1&&(!function(e,t,n,r,o){var i=o[0];o[1];var a=t[1],s=e+1;i.perPage,i.perPage,i.perPage,a((function(e){return q(q({},e),{page:s})}))}(e.page,u,0,0,[O,z]),G.set("page",(e.page+1).toString()),Z(G)),O.perPage!==e.pageSize&&(!function(e,t,n,r){if(e!==r.perPage){var o=t[1];n([]),o((function(t){return q(q({},t),{page:oz,perPage:e})}))}}(e.pageSize,u,A,O),G.set("perPage",e.pageSize.toString()),G.set("page","1"),Z(G))},paginationModel:{page:O.currentPage-1,pageSize:O.perPage},keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){Q(e)},onSortModelChange:function(e){!function(e,t,n){var r=n[0],o=n[1],i=e.map((function(e){return{order:e.sort,orderBy:e.field}}))[0];t([]),r&&i&&(r.order!==i.order||r.orderBy!==i.orderBy)&&o((function(e){return q(q(q({},e),i),{page:oz})}))}(e,A,u)},autoHeight:!0,getRowId:function(e){return e._id},disableColumnFilter:!0,rowSelectionModel:V})),U.jsx(Rz,q({},ne[0],{extras:p})),V.length>0&&!(null==p?void 0:p.hideBulkActions)&&U.jsx(Qz,{numSelected:V.length,rowCount:b.length,selected:V.map((function(e){return e.toString()})),extras:p,action:U.jsxs(U.Fragment,{children:[W.bulkDelete.isAccessible&&sM(S,JC.DELETE)&&U.jsx(l.LoadingButton,{size:"small",loading:E,color:"error",variant:"contained",startIcon:U.jsx(To,{icon:"eva:trash-2-outline"}),onClick:function(){return I(!0)},sx:{mr:1},children:null!==(i=null==p?void 0:p.bulkDeleteText)&&void 0!==i?i:"Delete"}),U.jsx(JO,{resources:s,resourceName:c,dialogState:ne,gridState:u,selected:V,setSelected:Q,bulkActionsDialogState:d,setBulkActionsDialogState:f})]})}),U.jsx(oT,{open:L,title:"Are you sure you want to delete the selected items?",message:"This action cannot be undone. All selected records will be permanently deleted.",loading:E,onClose:function(){return I(!1)},onAction:function(){B(!0),Bh.delete("".concat(g,"/").concat(S.properties.path,"/all"),{data:V}).then((function(){ee(p&&p.afterBulkDeleteSnackBarText?p.afterBulkDeleteSnackBarText(V.length):"".concat(V.length," records are deleted successfully")),D((function(e){return q(q({},e),{page:sz.page,filters:void 0})})),W.bulkDelete.reloadAfterAction&&window.location.reload(),Q((function(e){return[]})),I(!1)})).catch((function(e){te("Something went wrong while deleting the records")})).finally((function(){B(!1)}))}})]})}function lT(t){var n=this,o=t.bulkActionsDialogState,i=t.bulkActionsComponents,a=t.setParams,s=t.setBulkActionsDialogState,l=r.useNavigate(),c=e.useContext(Ih).dashbaordUrlPrefix,u=Sg().paths,d=Ig().setSuccessAlert,p=function(e){var t=q({},o);t[e]={state:!1,modelName:o?o[e].modelName:"",saveLoadingState:!1,fullScreen:!!o&&o[e].fullScreen,setSelected:o?o[e].setSelected:function(e){return""},documentIds:[],afterExecuteMessage:o[e].afterExecuteMessage,severity:o[e].severity},s(t)};return U.jsx(U.Fragment,{children:i&&i(o,p,(function(e,t){return J(n,void 0,void 0,(function(){var n,r,i;return _(this,(function(f){switch(f.label){case 0:return m=t,(h=q({},o))[m]={state:o[m].state,modelName:o[m].modelName,fullScreen:o[m].fullScreen,saveLoadingState:!0,setSelected:o[m].setSelected,documentIds:o[m].documentIds,afterExecuteMessage:o[m].afterExecuteMessage,severity:o[m].severity},s(h),[4,Bh.post("".concat(c,"/actions/execute/").concat(t),{record:e,modelName:o?o[t].modelName:""})];case 1:return n=f.sent(),p(t),o&&o[t].setSelected([]),r=n.data.data.response,i=r.action,d(o?o[t].afterExecuteMessage:""),i===exports.ActionNames.LIST?a((function(e){return q(q({},e),{page:sz.page})})):l(YO(r,u)),[2]}var m,h}))}))}))})}var cT=["true","false"];function uT(e,t,r,o,i,a,s,l,c,u,d,p,f){var m,h;if(r[a])switch(r[a].type){case exports.FieldTypes.STRING:return U.jsx(Yu,{name:a,size:e,label:r[a].value,value:l[a],onChange:function(e){return u(a,e.target.value,[a])}},t);case exports.FieldTypes.PHONENUMBER:return U.jsx(C,{defaultCountry:r[a].countryCodes?r[a].countryCodes[0]:"sa",onChange:function(e){return d(a,e)},onlyCountries:r[a].countryCodes?r[a].countryCodes:["eg","sa"],name:a,size:e,label:r[t].value,value:p(a)?p(a):"",variant:"outlined",fullWidth:!0},t);case exports.FieldTypes.TIMEPICKER:return U.jsx(Yu,{name:a,value:l[a],size:e,label:r[t].value},t);case exports.FieldTypes.LOCALIZEDString:return U.jsx(Yu,{name:a,size:e,label:r[a].value,value:l[a],onChange:function(e){return u(a,e.target.value,[a])}},t);case exports.FieldTypes.OBJECTID:return U.jsx(Yu,{name:a,size:e,label:r[a].value,value:l[a]},t);case exports.FieldTypes.NUMBER:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[a].value},t),U.jsxs(n.Stack,{direction:"row",spacing:2,children:[U.jsx(Yu,{name:a+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),U.jsx(Yu,{name:a+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case exports.FieldTypes.DATE:return U.jsxs(n.Card,{sx:{py:3,px:3},children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[a].value},t),U.jsxs(n.Grid,{container:!0,spacing:2,children:[U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:a+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),U.jsx(n.Grid,{item:!0,xs:12,children:U.jsx(ad,{name:a+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case exports.FieldTypes.ENUM:return U.jsx(Gu,{name:a,size:e,label:r[a].value,value:null!==(m=l[a])&&void 0!==m?m:"",SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(a,e.target.value,[a])},children:Object.keys(r[a].enumValues).map((function(e){var t,o,i,s=r[a].enumValues,l=(null===(t=s[e])||void 0===t?void 0:t.label)?e:s[e],c=null!==(i=null===(o=s[e])||void 0===o?void 0:o.label)&&void 0!==i?i:s[e];return U.jsx(n.MenuItem,{value:l,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:TM.enhance(c)},e)}))},t);case exports.FieldTypes.BOOLEAN:return U.jsx(Gu,{name:a,size:e,label:r[a].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(a,e.target.value,[a])},children:cT.map((function(e){return U.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case exports.FieldTypes.ARRAY:case exports.FieldTypes.REFERENCE:var g=f?f[null===(h=r[a])||void 0===h?void 0:h.path]:void 0,v=XM(r,a,LM.FILTER_LIST,g);return U.jsx(xz,{name:a,size:e,value:l[a]?l[a]:"",label:r[a].value,multiple:r[a].multipleInFilter,onOptionChange:function(e){return u(a,e,["".concat(a,"-name"),"".concat(a,"-id")])},options:o[a]&&o[a].data?o[a].data:[],loading:i[a],hasNext:o[a]&&o[a].hasNext,onOpenChanged:function(e,t,n){return c(r[a].apiRoute,r[a].path,e,a,a,t,n,v)},resource:g},t);default:return}}var dT=function(){function e(){}return e.modify=function(e,t){var n;if(void 0===t&&(t=[]),"_id"===e)return e.replace("_","");var r=t.find((function(t){return(null==t?void 0:t.key)===e}));return null!==(n=null==r?void 0:r.value)&&void 0!==n?n:e},e}();var pT=e.memo((function(){var e=vo().palette.primary.main;return U.jsxs(U.Fragment,{children:[U.jsx("defs",{children:U.jsxs("linearGradient",{id:"BG",x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[U.jsx("stop",{offset:"0%",stopColor:e}),U.jsx("stop",{offset:"100%",stopColor:e,stopOpacity:"0"})]})}),U.jsx("path",{fill:"url(#BG)",fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}));var fT=e.memo((function(e){var t=K(e,[]),r=vo(),o=r.palette.primary.main,i=r.palette.primary.dark,a=r.palette.primary.darker;return U.jsx(n.Box,q({},t,{children:U.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",children:[U.jsx(pT,{}),U.jsx("defs",{children:U.jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[U.jsx("stop",{offset:"0%",stopOpacity:"0"}),U.jsx("stop",{offset:"100%"})]})}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),U.jsx("path",{fill:a,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),U.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),U.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),U.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),U.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),U.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),U.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),U.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),U.jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),U.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),U.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),U.jsx("ellipse",{cx:"380.363",cy:"298.487",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),U.jsx("ellipse",{cx:"390.052",cy:"264.383",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),U.jsx("ellipse",{cx:"346.97",cy:"270.022",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),U.jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),U.jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:o,fillRule:"nonzero",opacity:"0.2"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),U.jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),U.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),U.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),U.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),U.jsx("path",{fill:i,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),U.jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),U.jsx("ellipse",{cx:"119.593",cy:"258.664",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),U.jsx("ellipse",{cx:"101.03",cy:"260.545",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),U.jsx("ellipse",{cx:"108.459",cy:"265.905",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),U.jsx("ellipse",{cx:"89.193",cy:"265.433",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),U.jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),U.jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:o,fillRule:"nonzero",opacity:"0.1"}),U.jsx("path",{fill:i,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),U.jsx("path",{fill:o,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),U.jsx("path",{fill:i,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}))}));function mT(e){var t=e.file;if(!t)return null;var n="string"==typeof t?t:t.preview;return U.jsx(Ua,{alt:"file preview",src:n,sx:{top:8,left:8,zIndex:8,borderRadius:1,position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})}function hT(e){var t=e.thumbnail,r=e.files,o=e.onRemove,i=e.sx;return(null==r?void 0:r.length)?U.jsx(p.AnimatePresence,{initial:!1,children:r.map((function(e){var r=Cs(e),a=r.key,s=r.name,l=void 0===s?"":s,c=r.size,u=void 0===c?0:c,d="string"==typeof e;return t?U.jsxs(n.Stack,q({component:p.m.div},Ja().inUp,{alignItems:"center",display:"inline-flex",justifyContent:"center",sx:q({m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:function(e){return"solid 1px ".concat(e.palette.divider)}},i),children:[U.jsx(uu,{tooltip:!0,imageView:!0,file:e,sx:{position:"absolute"},imgSx:{position:"absolute"}}),o&&U.jsx(n.IconButton,{size:"small",onClick:function(){return o(e)},sx:{top:4,right:4,p:"1px",position:"absolute",color:function(e){return Cr(e.palette.common.white,.72)},bgcolor:function(e){return Cr(e.palette.grey[900],.48)},"&:hover":{bgcolor:function(e){return Cr(e.palette.grey[900],.72)}}},children:U.jsx(To,{icon:"eva:close-fill",width:16})})]}),a):U.jsxs(n.Stack,q({component:p.m.div},Ja().inUp,{spacing:2,direction:"row",alignItems:"center",sx:q({my:1,px:1,py:.75,borderRadius:.75,border:function(e){return"solid 1px ".concat(e.palette.divider)}},i),children:[U.jsx(uu,{file:e}),U.jsxs(n.Stack,{flexGrow:1,sx:{minWidth:0},children:[U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:d?e:l}),U.jsx(n.Typography,{variant:"caption",sx:{color:"text.secondary"},children:d?"":Qa(u)})]}),o&&U.jsx(n.IconButton,{edge:"end",size:"small",onClick:function(){return o(e)},children:U.jsx(To,{icon:"eva:close-fill"})})]}),a)}))}):null}var gT=xo("div")((function(e){var t=e.theme;return{outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:"1px dashed ".concat(Cr(t.palette.grey[500],.32)),"&:hover":{opacity:.72}}}));function vT(e){var t=e.disabled,r=e.multiple,o=void 0!==r&&r,i=e.error,a=e.helperText,s=e.file,l=e.onDelete,c=e.files,u=e.thumbnail,d=e.onUpload,p=e.onRemove,f=e.onRemoveAll,h=e.sx,g=K(e,["disabled","multiple","error","helperText","file","onDelete","files","thumbnail","onUpload","onRemove","onRemoveAll","sx"]),v=m.useDropzone(q({multiple:o,disabled:t},g)),A=v.getRootProps,y=v.getInputProps,b=v.isDragActive,x=v.isDragReject;v.fileRejections;var w=!!s&&!o,j=c&&o&&c.length>0,C=x||!!i;return U.jsxs(n.Box,{sx:q({width:1,position:"relative"},h),children:[U.jsxs(gT,q({},A(),{sx:q(q(q(q({},b&&{opacity:.72}),C&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"}),t&&{opacity:.48,pointerEvents:"none"}),w&&{padding:"12% 0"}),children:[U.jsx("input",q({},y())),U.jsx(AT,{sx:q({},w&&{opacity:0})}),w&&U.jsx(mT,{file:s})]})),a&&a,w&&l&&U.jsx(n.IconButton,{size:"small",onClick:l,sx:{top:16,right:16,zIndex:9,position:"absolute",color:function(e){return Cr(e.palette.common.white,.8)},bgcolor:function(e){return Cr(e.palette.grey[900],.72)},"&:hover":{bgcolor:function(e){return Cr(e.palette.grey[900],.48)}}},children:U.jsx(To,{icon:"eva:close-fill",width:18})}),j&&U.jsxs(U.Fragment,{children:[U.jsx(n.Box,{sx:{my:3},children:U.jsx(hT,{files:c,thumbnail:u,onRemove:p})}),U.jsxs(n.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[f&&U.jsx(n.Button,{color:"inherit",variant:"outlined",size:"small",onClick:f,children:"Remove all"}),d&&U.jsx(n.Button,{size:"small",variant:"contained",onClick:d,children:"Upload files"})]})]})]})}function AT(e){var t=e.sx,r=K(e,["sx"]);return U.jsxs(n.Stack,q({spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:q({width:1,textAlign:{xs:"center",md:"left"}},t)},r,{children:[U.jsx(fT,{sx:{width:220}}),U.jsxs("div",{children:[U.jsx(n.Typography,{gutterBottom:!0,variant:"h5",children:"Drop or Select file"}),U.jsxs(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:["Drop xlsx file here or click",U.jsx(n.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"browse"}),"thorough your machine"]})]})]}))}function yT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L12,10.59 L13.29,9.29 C13.6821222,8.89787783 14.3178778,8.89787783 14.71,9.29 C15.1021222,9.68212217 15.1021222,10.3178778 14.71,10.71 L13.41,12 L14.71,13.29 Z"})}))}function bT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17.56,21 C17.4000767,21.0006435 17.2423316,20.9629218 17.1,20.89 L12,18.22 L6.9,20.89 C6.56213339,21.067663 6.15259539,21.0374771 5.8444287,20.8121966 C5.53626201,20.5869161 5.38323252,20.2058459 5.45,19.83 L6.45,14.2 L2.33,10.2 C2.06805623,9.93860108 1.9718844,9.55391377 2.08,9.2 C2.19824414,8.83742187 2.51242293,8.57366684 2.89,8.52 L8.59,7.69 L11.1,2.56 C11.2670864,2.21500967 11.6166774,1.99588989 12,1.99588989 C12.3833226,1.99588989 12.7329136,2.21500967 12.9,2.56 L15.44,7.68 L21.14,8.51 C21.5175771,8.56366684 21.8317559,8.82742187 21.95,9.19 C22.0581156,9.54391377 21.9619438,9.92860108 21.7,10.19 L17.58,14.19 L18.58,19.82 C18.652893,20.2027971 18.4967826,20.5930731 18.18,20.82 C17.9989179,20.9468967 17.7808835,21.010197 17.56,21 L17.56,21 Z"})}))}function xT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M13,16 C13,16.5522847 12.5522847,17 12,17 C11.4477153,17 11,16.5522847 11,16 L11,11 C11,10.4477153 11.4477153,10 12,10 C12.5522847,10 13,10.4477153 13,11 L13,16 Z M12,9 C11.4477153,9 11,8.55228475 11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 C13,8.55228475 12.5522847,9 12,9 Z"})}))}function wT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M22.56,16.3 L14.89,3.58 C14.2597186,2.59400001 13.1702353,1.99737652 12,1.99737652 C10.8297647,1.99737652 9.74028139,2.59400001 9.11,3.58 L1.44,16.3 C0.888546003,17.2192471 0.869485343,18.3628867 1.39,19.3 C1.99197363,20.3551378 3.11522982,21.0046397 4.33,21 L19.67,21 C20.8765042,21.0128744 21.9978314,20.3797441 22.61,19.34 C23.146086,18.3926382 23.1269508,17.2292197 22.56,16.3 L22.56,16.3 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,9 C11,8.44771525 11.4477153,8 12,8 C12.5522847,8 13,8.44771525 13,9 L13,13 Z"})}))}function jT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M16.3,9.61 L11.73,15.61 C11.5412074,15.855247 11.2494966,15.9992561 10.94,16.0000145 C10.6322197,16.001658 10.3408221,15.861492 10.15,15.62 L7.71,12.51 C7.49028166,12.2277602 7.43782669,11.8497415 7.57239438,11.5183399 C7.70696206,11.1869384 8.00810836,10.9525017 8.36239438,10.9033399 C8.7166804,10.8541782 9.07028166,10.9977602 9.29,11.28 L10.92,13.36 L14.7,8.36 C14.917932,8.07418751 15.2717886,7.92635122 15.6282755,7.97217964 C15.9847624,8.01800806 16.2897207,8.25053875 16.4282755,8.58217966 C16.5668304,8.91382056 16.517932,9.29418753 16.3,9.58 L16.3,9.61 Z"})}))}function CT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 L13,13 Z"})}))}function MT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm0 2H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2z"})}))}function OT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.372 4.972a1.006 1.006 0 00-.928.388l-3.78 5-1.63-2.08a1.001 1.001 0 00-1.58 1.23l2.44 3.11a1 1 0 001.58-.01l4.57-6v-.03a1.006 1.006 0 00-.672-1.608z"})}))}function zT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.75 8h-6.5a.75.75 0 00-.75.75v.5c0 .414.336.75.75.75h6.5a.75.75 0 00.75-.75v-.5a.75.75 0 00-.75-.75z"})}))}function TT(e){return U.jsx(n.SvgIcon,q({},e,{sx:{right:12,fontSize:16,position:"absolute",pointerEvents:"none"},children:U.jsx("path",{d:"M12,16 C11.7663478,16.0004565 11.5399121,15.9190812 11.36,15.77 L5.36,10.77 C4.93474074,10.4165378 4.87653776,9.78525926 5.23,9.36 C5.58346224,8.93474074 6.21474074,8.87653776 6.64,9.23 L12,13.71 L17.36,9.39 C17.5665934,9.2222295 17.8315409,9.14373108 18.0961825,9.17188444 C18.3608241,9.2000378 18.6033268,9.33252029 18.77,9.54 C18.9551341,9.74785947 19.0452548,10.0234772 19.0186853,10.3005589 C18.9921158,10.5776405 18.8512608,10.8311099 18.63,11 L12.63,15.83 C12.444916,15.955516 12.2231011,16.0153708 12,16 Z"})}))}function DT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M12,8 C12.5522847,8 13,8.44771525 13,9 L13,9 L13,11 L15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L13,13 L13,15 C13,15.5522847 12.5522847,16 12,16 C11.4477153,16 11,15.5522847 11,15 L11,15 L11,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 L11,11 L11,9 C11,8.44771525 11.4477153,8 12,8 Z"})}))}function PT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 Z"})}))}function NT(e){return U.jsx(n.SvgIcon,q({},e,{children:U.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M14,8.99420168 C14.2666375,8.99420168 14.5222334,9.10068735 14.71,9.29 C14.8993127,9.4777666 15.0057983,9.73336246 15.0057983,10 C15.0057983,10.2666375 14.8993127,10.5222334 14.71,10.71 L14.71,10.71 L13.41,12 L14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L10.71,9.29 L12,10.59 L13.29,9.29 C13.4777666,9.10068735 13.7333625,8.99420168 14,8.99420168 Z"})}))}function ET(t){var r=this,o=t.title,i=t.uploadMessage,a=t.removeMessage,s=t.open,c=t.path,u=t.setParams,d=t.onClose,p=t.onCreate,f=t.onUpdate,m=t.folderName,h=t.onChangeFolderName,g=K(t,["title","uploadMessage","removeMessage","open","path","setParams","onClose","onCreate","onUpdate","folderName","onChangeFolderName"]),v=e.useState([]),A=v[0],y=v[1],b=e.useState(!1),x=b[0],w=b[1],j=e.useContext(Ih).dashbaordUrlPrefix,C=e.useCallback((function(e){var t=e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})}));y($($([],A,!0),t,!0))}),[A]);return U.jsxs(n.Dialog,q({fullWidth:!0,maxWidth:"sm",open:s,onClose:d},g,{children:[U.jsx(n.DialogTitle,{sx:{p:function(e){return e.spacing(3,3,2,3)}},children:U.jsxs(n.Box,{display:"flex",alignItems:"center",children:[U.jsx(n.Typography,{flexGrow:1,style:{color:"black"},fontWeight:600,fontSize:25,children:o||"Upload files"}),U.jsx(n.Box,{children:U.jsx(n.IconButton,{onClick:d,color:"primary",children:U.jsx(yT,{})})})]})}),U.jsxs(n.DialogContent,{dividers:!0,sx:{pt:1,pb:0,border:"none"},children:[(p||f)&&U.jsx(n.TextField,{fullWidth:!0,label:"Folder name",value:m,onChange:h,sx:{mb:3}}),U.jsx(vT,{multiple:!0,files:A,onDrop:C,onRemove:function(e){var t=A.filter((function(t){return t!==e}));y(t)}})]}),U.jsxs(n.DialogActions,{children:[U.jsx(l.LoadingButton,{loading:x,variant:"contained",startIcon:U.jsx(To,{icon:"eva:cloud-upload-fill"}),onClick:function(){return J(r,void 0,void 0,(function(){var e,t;return _(this,(function(n){switch(n.label){case 0:return A.length>0?(w(!0),e=A[0],(t=new FormData).append("file",e),[4,Bh.post("".concat(j,"/").concat(c,"/import"),t,{transformRequest:[]})]):[3,2];case 1:n.sent(),w(!1),u&&u((function(e){return q({},e)})),n.label=2;case 2:return d(),[2]}}))}))},children:i||"Upload"}),!!A.length&&U.jsx(n.Button,{variant:"outlined",color:"inherit",onClick:function(){y([])},children:a||" Remove all"}),(p||f)&&U.jsx(n.Stack,{direction:"row",justifyContent:"flex-end",flexGrow:1,children:U.jsx(n.Button,{variant:"outlined",onClick:p||f,children:f?"Save":"Create"})})]})]}))}function BT(t){var r=t.setParams,o=t.path,i=t.buttonValue,a=e.useState(!1),s=a[0],l=a[1];return U.jsxs(U.Fragment,{children:[U.jsx(ET,{title:"Import xlsx file",uploadMessage:"Import",removeMessage:"Cancel",open:s,onClose:function(){l(!1)},setParams:r,path:o}),U.jsx(n.Button,{variant:"outlined",startIcon:U.jsx(To,{icon:"eva:cloud-upload-fill"}),onClick:function(){l(!0)},children:null!=i?i:"Import"})]})}var kT=n.styled("span")((function(e){return{width:6,height:6,borderRadius:"50%",position:"absolute",backgroundColor:e.theme.palette.error.main}})),LT=[];function IT(t){var o,i,a=this,s=e.useState(!1),l=s[0],u=s[1],d=e.useState(!1),p=d[0],f=d[1],m=hv.isEnglish(),h=e.useContext(ug),g=h.textFieldSize,v=h.themeStretch,A=e.useState(),y=A[0],b=A[1],x=e.useState({}),w=x[0],j=x[1],C=e.useState({});C[0],C[1];var M=e.useState({}),O=M[0],z=M[1],T=e.useState({}),D=T[0],P=T[1],N=e.useState({}),E=N[0],B=N[1],k=e.useState({}),L=k[0],I=k[1],S=function(e,t,n,r,o,i,s,l){return J(a,void 0,void 0,(function(){return _(this,(function(a){switch(a.label){case 0:return[4,WM({apiRoute:e,referencedValues:D,value:n,loading:w,fullKey:o,key:r,pathRoute:t,resources:he,schema:je,setLoading:j,setReferencedValues:P,page:i,filter:s,filters:l})];case 1:return a.sent(),[2]}}))}))},R=e.useState({state:!1,message:"",severity:"error"}),W=R[0],F=R[1],V=r.useLocation(),Q=r.useSearchParams(),X=Q[0],Y=Q[1],G=e.useState(V.state?V.state.actionState:null),Z=G[0],K=G[1],$=e.useContext(Jh),te=$.paths,ne=$.root,oe=e.useState(void 0),ie=oe[0],ae=oe[1],se=t.path,le=t.extras,ce=t.Actions,ue=t.bulkActionsComponents,de=t.HeadingView,pe=t.disableFilterButton,fe=t.dataListComponent,me=t.defaultFilters,he=e.useContext(Kh).resources,ge=he[se],ve=ge.properties.defaultOrderBy,Ae=ge.properties.defaultOrder,ye=ge.properties.defaultrowsPerPage,be=ge.quickFilterProperties,xe=ge.properties.filters,we=xe&&xe.scopes&&xe.scopes.auto?xe.scopes.auto.key:void 0,je=ge.properties.model,Ce=xe.scopes.options,Me=void 0===(null===(o=xe.scopes)||void 0===o?void 0:o.showAll)||(null===(i=xe.scopes)||void 0===i?void 0:i.showAll),Oe={},ze=void 0;new FA(ge).getUniqueFields().forEach((function(e){"__v"!==e&&""!==e&&QA(je[e],e,Oe,X,je)})),ze=VA(Oe,je,we);var Te=new cz(X,ye).get(),De=Te.page,Pe=Te.pageSize,Ne=e.useState(q(q({},sz),{page:De,order:Ae,orderBy:ve,perPage:Pe,filters:me?ze.concat(me):ze,scope:we&&X.get(we)?X.get(we):!Me&&Ce?Ce[0].key:void 0})),Ee=Ne[0],Be=Ne[1],ke=function(t){var n=e.useState(t||""),r=n[0],o=n[1];return{currentTab:r,onChangeTab:function(e,t){o(t)},setCurrentTab:o}}(we&&X.get(we)?X.get(we):!Me&&Ce?Ce[0].key:"all"),Le=ke.currentTab,Ie=ke.onChangeTab,Se=ke.setCurrentTab,He={resources:he,resourceName:se,paramsState:[Ee,Be],bulkActionsDialogState:y,setBulkActionsDialogState:b,extras:le,setCustomActions:ae,setPaginatedParameters:z};LT=[],e.useEffect((function(){if(ge.filterProperties){var e={};ge.filterProperties.forEach((function(t){Oe[t]&&""!==Oe[t]&&(e[t]=Oe[t])})),I(e)}if(ge.quickFilterProperties){var t={};ge.quickFilterProperties.forEach((function(e){Oe[e]&&""!==Oe[e]&&(t[e]=Oe[e])})),B(t)}}),[]),e.useEffect((function(){Z&&setTimeout((function(){K(null),window.history.replaceState({},document.title)}),4e3)}),[Z]);var Re=ge.properties.actions;ge.listProperties&&ge.listProperties.forEach((function(e){"__v"!==e.key&&""!==e&&LT.push({id:e.key,label:e.value,align:"left"})})),LT.push({id:"__v",label:""});var We={},Fe={};be.map((function(e,t){"__v"!==e&&je[e]&&(We[e]=uv(je[e],e,Fe,X))}));var Ve=H.object().shape(We),Qe=c.useForm({resolver:Pa(Ve),defaultValues:Oe}),Xe=Qe.handleSubmit,Ye=Qe.reset,Ge=Qe.setValue,Ze=Qe.getValues,Ue=Qe.resetField,qe=function(e){return J(a,void 0,void 0,(function(){var t;return _(this,(function(n){return t=Av(e,_e,je,X,Y,we,Le,he),Be((function(e){return q(q({},e),{filters:me?t.concat(me):t})})),[2]}))}))},Ke=function(e,t,n){return J(a,void 0,void 0,(function(){var r,o;return _(this,(function(i){switch(i.label){case 0:return t&&0!==t.length||n.forEach((function(e){X.delete(e)})),(r=q({},E))[e]=t,B(r),o=q(q({},L),r),[4,qe(o)];case 1:return i.sent(),[2]}}))}))},Je=ge.properties.name,_e=function(){f(!1)},$e=function(){et(),Y({}),Se("all"),Ye({}),B({}),I({}),Be((function(e){return q(q({},e),{page:1,filters:null!=me?me:void 0,scope:!Me&&Ce?Ce[0].key:void 0})}))},et=function(){u(!l)};return sM(ge,JC.VIEW)?U.jsx(ee,{title:m?Je+": List":"قائمة "+Je,children:U.jsxs(n.Container,{maxWidth:!v&&"lg",children:[U.jsx(Sz,{open:p,size:g,handleFilterDrawerClose:_e,schema:je,searchParams:X,setSearchParams:Y,resources:he,scopeKey:we,scopeValue:Le,initialQueryParams:sz,quickFilterValues:E,setParams:Be,onRefrenceChanged:function(e,t){},filterProperties:ge.filterProperties,filterString:function(e,t){Be((function(t){return q(q({},t),{filters:me?e.concat(me):e})})),I(t),we&&X.get(we)&&Se(X.get(we))}}),U.jsx(lT,{bulkActionsDialogState:y,setBulkActionsDialogState:b,setParams:Be,bulkActionsComponents:ue}),Z&&U.jsx(n.Snackbar,{open:!!Z,anchorOrigin:{horizontal:"center",vertical:"top"},children:U.jsx(n.Alert,{onClose:function(){K(null)},severity:Z.severity,children:Z.message})}),W.state&&U.jsx(n.Snackbar,{open:!!W.state,anchorOrigin:{horizontal:"center",vertical:"top"},children:U.jsx(n.Alert,{onClose:function(){F({state:!1})},severity:W.severity,children:W.message})}),ge.properties?U.jsx(re,{heading:Je,headingView:de,paginationTitle:void 0===O.totalRecords?void 0:"(".concat(O.totalRecords.toLocaleString(),")"),links:[{name:m?"Dashboard":"الرئيسية",href:ne},{name:Je}],action:U.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},spacing:1,children:[ce&&U.jsx(ce,{setParams:Be,initialQueryParams:sz}),ie,Re.import&&Re.import.isAccessible&&U.jsx(BT,{setParams:Be,path:ge.properties.path,buttonValue:Re.import.value}),Re.new.isAccessible&&sM(ge,JC.CREATE)&&U.jsx(n.Button,{variant:"contained",component:r.Link,to:te[se].new,startIcon:U.jsx(To,{icon:"eva:plus-fill"}),children:Re.new.value})]})}):U.jsx(Do,{tuples:[]}),U.jsxs(n.Card,{children:[ge.properties&&ge.properties.filters.scopes.isAccessible&&U.jsx(n.Tabs,{allowScrollButtonsMobile:!0,variant:"scrollable",scrollButtons:"auto",value:Le,onChange:function(e,t){Ie(e,t),Be((function(e){return q(q({},e),{scope:"all"===t?void 0:t})})),we&&("all"===t?X.delete(we):X.has(we)?X.set(we,t):X.append(we,t),Y(X))},sx:{px:2,bgcolor:"background.neutral"},children:ge.properties.filters.scopes.options.map((function(e){return U.jsx(n.Tab,{disableRipple:!0,label:e.value,value:e.key},e.key)}))}),U.jsx(n.Divider,{}),U.jsxs(n.Stack,{spacing:{xs:"8px",md:"16px"},sx:{pt:3,px:3},children:[U.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",spacing:2,children:[U.jsxs(U.Fragment,{children:[ge.properties&&ge.properties.filters.searchBar.isAccessible&&U.jsx(PA,{size:g,placeholder:m?"Search by "+dT.modify(ge.properties.title,ge.listProperties)+"...":"ابحث هنا …",onInputChange:function(e){Be((function(t){return q(q({},t),{filter:e})}))}}),be.length>0&&U.jsx(Su,{methods:Qe,onSubmit:Xe(qe),children:U.jsx(n.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:be&&be.map((function(e,t){return U.jsx(n.Grid,{minWidth:200,children:uT(g,e+l.toString(),je,D,w,e,m,E,S,Ke,Ge,Ze,he)},e+t)}))},"grid1")})]}),!pe&&U.jsxs(n.Stack,{direction:"row",spacing:1,children:[U.jsx(n.Tooltip,{title:"Filter list",onClick:function(){f(!0)},children:U.jsx(n.IconButton,{children:U.jsx(To,{icon:"ic:round-filter-list"})})}),Ee.filters&&!p&&Ee.filters!==me&&U.jsx(kT,{}),Ee.filters&&!p&&Ee.filters!==me&&U.jsx(n.Tooltip,{title:"Reset Filter",onClick:$e,children:U.jsx(n.IconButton,{children:U.jsx(Oz,{})})})]})]}),U.jsx(vz,{schema:je,onClickClearFilter:$e,onRemoveFilterValue:function(e,t){!function(e,t,n,r,o,i,a,s,l,c,u,d,p,f){var m,h,g=n.quickFilterProperties,v=n.properties.filters,A=v&&v.scopes&&v.scopes.auto?v.scopes.auto.key:void 0,y=n.properties.model,b=v.scopes.options,x=void 0===(null===(m=v.scopes)||void 0===m?void 0:m.showAll)||(null===(h=v.scopes)||void 0===h?void 0:h.showAll),w=q({},s),j=q({},c);A&&e.get(A)&&r===A&&i("all");var C=y[r],M=C.type,O=e.get(r),z=function(e){var t=r+"-to";return{from:o===r+"-from"?"":e[r].from,to:o===t?"":e[r].to}},T=function(t,n){var r=e.getAll(t);e.delete(t),r.forEach((function(r){r!==n&&e.append(t,r)}))};switch(M){case exports.FieldTypes.STRING:case exports.FieldTypes.PHONENUMBER:case exports.FieldTypes.LOCALIZEDString:case exports.FieldTypes.OBJECTID:case exports.FieldTypes.ENUM:case exports.FieldTypes.BOOLEAN:case exports.FieldTypes.COLOR:case exports.FieldTypes.EXTERNAL_LINK:O&&e.delete(r),s&&s[r]&&(w[r]=void 0),g&&g.includes(r)&&c[r]&&delete j[r];break;case exports.FieldTypes.NUMBER:case exports.FieldTypes.DATE:(O=e.get(o))&&e.delete(o),s&&s[r]&&(w[r]=z(w)),g&&g.includes(r)&&c[r]&&(j[r]=z(j));break;case exports.FieldTypes.REFERENCE:var D=r+"-id",P=r+"-name";if(C.multipleInFilter){var N=e.getAll(r+"-name");N&&N.length>0&&(e.getAll(r+"-id").forEach((function(e,t){e===o&&T(P,N[t])})),T(D,o)),g&&g.includes(r)&&c[r]&&(j[r]=j[r].filter((function(e){return e._id!==o})))}else e.delete(D),e.delete(P),s&&s[r]&&(w[r]=void 0),g&&g.includes(r)&&c[r]&&(d(r),f(),delete j[r])}var E={},B=void 0;new FA(n).getUniqueFields().forEach((function(t){"__v"!==t&&""!==t&&QA(y[t],t,E,e,y)})),B=VA(E,y,A),l(w),u(j),t(e),a((function(t){return q(q({},t),{page:1,filters:p?B.concat(p):B,scope:A&&e.get(A)?e.get(A):!x&&b?b[0].key:void 0})}))}(X,Y,ge,e,t,Se,Be,L,I,E,B,Ue,me,et)}})]}),fe?fe(He):U.jsx(sT,q({},He))]})]})}):U.jsx(_M,{})}function ST(e){var t=e.text,o=e.to,i=e.icon;return U.jsx(n.Button,{variant:"contained",component:r.Link,to:o,startIcon:U.jsx(To,{icon:i}),children:t})}function HT(e){return U.jsx(ST,q({},e,{icon:"eva:edit-fill"}))}var RT,WT=function(){function e(e,t,n,r,o){this.modelLocalizedName=t,this.modelName=e,this.isEnglish=n,this.title=r,this.record=o}return e.prototype.getTitle=function(){return this.isEnglish?this.modelLocalizedName+": Show":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbHeading=function(){return this.isEnglish?this.modelName+" Data":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbLinks=function(e,t,r,o){return[{name:this.isEnglish?"Dashboard":"الرئيسية",href:o},{name:this.modelLocalizedName,href:e[t].list},{name:this.record?r[this.title].type===exports.FieldTypes.LOCALIZEDString?this.getValue():"object"!=typeof this.record[this.title]?this.record[this.title]:this.getValue():U.jsx(n.Skeleton,{variant:"text",width:100,height:20})}]},e.prototype.getValue=function(){return this.record[this.title]&&this.record[this.title][0]?hv.getLocalizedString(this.record[this.title]):"---"},e}();function FT(t){var r=t.record,o=t.path,i=t.userPath,a=t.fieldsMap,s=e.useContext(Kh).resources,l=s[o].showProperties,c=s[o].properties.model;return U.jsx(n.Card,{sx:{pt:5,px:5},children:U.jsx(n.Grid,{container:!0,columnSpacing:2,children:l&&l.map((function(e){return r.hasOwnProperty(e.key)&&null!==r[e.key]?a&&a[e.key]?U.jsx(wC,{children:a[e.key]({record:r}),title:e.value,type:c[e.key].type}):U.jsx(RC,{property:e,schema:c,record:r,resources:s,userpath:i},e.key):U.jsx(BC,{title:e.value,value:OM,fieldkey:e.key,resources:s,userpath:i},e.key)}))})})}function VT(t){var o,i,a,s,l,c=r.useParams().id,u=void 0===c?"":c,d=t.path,p=t.modelRoute,f=t.disableDefaultActions,m=t.Component,h=t.HeadingView,g=t.Actions,v=t.BreadcrumbsChildren,A=t.BreadCrumbLinks,y=t.defaultFilters,b=t.showFilterChips,x=t.hideHeaderBreadcrumbs,w=void 0!==x&&x,j=t.hideSkeleton,C=void 0!==j&&j,M=t.disableFetchRecord,O=void 0!==M&&M,z=r.useLocation(),T=hv.isEnglish(),D=r.useSearchParams(),P=D[0];D[1];var N=e.useContext(Kh),E=N.resources,B=N.loadingLogo,k=N.logoSxProps,L=e.useContext(ug).themeStretch,I=e.useContext(Jh),S=I.paths,H=I.root,R=r.useNavigate(),W=E[d],F=E[d],V=F.properties,Q=V.model,X=V.name,Y=V.actions,G=V.title,Z=ty.convertCamelCaseToWord(d),K=Gh(),J=K.requestState,_=K.get,$=null===(o=J.data)||void 0===o?void 0:o.record,te=new WT(Z,X,T,G,$),ne=uz({defaultFilters:y,searchParams:P,resource:W});e.useEffect((function(){!O&&_({url:"".concat(p,"/").concat(u),query:ne})}),[u]);var oe=J.state===exports.RequestState.SUCCEEDED||O;return sM(W,JC.VIEW)?U.jsx(ee,{title:te.getTitle(),children:U.jsxs(n.Container,{maxWidth:!L&&"lg",children:[!w&&U.jsx(re,{headingView:h&&oe&&U.jsx(h,{record:J.data}),heading:te.getBreadCrumbHeading(),links:A&&oe?A(J.data):te.getBreadCrumbLinks(S,d,Q,H),action:U.jsxs(n.Stack,{spacing:2,children:[!F.properties.disableNextPreviousButtonsInShowPage&&U.jsx(KM,q({},t,{recordId:u,params:ne,modelPath:p,navigateTo:function(e){var t=S[d].show(e);R("".concat(t).concat(z.search))},recordIndex:null===(i=J.data)||void 0===i?void 0:i.recordIndex,numberOfRecords:null===(a=J.data)||void 0===a?void 0:a.numberOfRecords})),U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,children:[g&&oe&&U.jsx(g,{record:J.data}),!f&&V&&Y.edit.isAccessible&&sM(F,JC.EDIT)&&$&&!(null===(s=$.hiddenActionKeys)||void 0===s?void 0:s.includes("edit"))&&U.jsx(HT,{text:Y.edit.value,to:"".concat(S[d].edit(u)).concat(z.search)})]})]}),children:v&&oe&&U.jsx(v,{record:J.data})}),U.jsxs(n.Stack,{spacing:1,children:[b&&U.jsx(vz,{schema:Q}),oe?m?U.jsx(m,{record:J.data,path:d,userPath:S}):U.jsx(FT,{record:null===(l=J.data)||void 0===l?void 0:l.record,path:d,userPath:S,fieldsMap:t.fieldsMap},u):U.jsx(n.Grid,{container:!0,alignItems:"center",children:C?U.jsx(qh,{loadingLogo:B,logoSxProps:k}):U.jsx(wv,{sx:{height:50}})})]})]})}):U.jsx(_M,{})}function QT(e){var t=e.name,r=e.checked,o=e.disabled,i=e.fieldKey,a=e.label,s=e.handleChange;return U.jsx(n.FormControlLabel,{control:U.jsx(n.Switch,{checked:r,onChange:function(e){s(e,i)},name:t,disabled:o}),label:a})}function XT(e){var t=e.getValues,r=e.checked,o=e.size,i=e.handleChange;function a(e,n,a){return U.jsx(QT,{handleChange:i,getValues:t,name:e,size:o,label:n,disabled:!1,checked:r[a],fieldKey:a})}return U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled",mb:0},children:"Actions"}),a("actions.show","Show","show"),a("actions.edit","Edit","edit"),a("actions.new","Create","new"),a("actions.delete","Delete","delete"),a("actions.bulkDelete","Bulk delete","bulkDelete"),a("actions.import","Import","import"),a("actions.duplicate","Duplicate","duplicate")]})}function YT(t){var o,i,a=this,s=t.isEdit,u=t.record,d=t.path,p=t.apiRoute,f=t.resources,m=t.afterEditSnackText,h=r.useNavigate(),g=Ig(),v=g.setSuccessAlert,A=g.setErrorAlert,y=kg().getResources,b=Sg().paths,x=e.useState(!1),w=x[0],j=x[1],C=r.useParams().id,M=void 0===C?"":C,O=e.useState(u?q(q({},u.actions),{duplicate:null===(i=null===(o=u.actions)||void 0===o?void 0:o.duplicate)||void 0===i||i}):{}),z=O[0],T=O[1],D=Bg().textFieldSize,P=f[d].properties.model,N=f[d].formProperties,E=f[Bu.lowerCaseFirstLetter(u.modelName)],B=E.properties.model,k=[];function L(e){k.push(e)}!function e(t,n){for(var r in t){var o=t[r];o.type!==exports.FieldTypes.NESTEDSCHEMA?L(n?"".concat(n,".").concat(r):r):e(o.schema,n?"".concat(n,".").concat(r):r)}}(B);var I=hv.isEnglish(),S=I?"Create ":" اضافة ",R=I?"Save changes":"تعديل ",W={},F={};N.map((function(e){"_id"!==e&&"__v"!==e&&(W[e]=function(e,t){var n;switch(F[t]=void 0,e.type){case exports.FieldTypes.STRING:F[t]=u?u[t]:"",n=H.string();break;case exports.FieldTypes.NUMBER:F[t]=u?u[t]:void 0,n=H.number();break;case exports.FieldTypes.ENUM:F[t]=u?u[t]:P[t]&&P[t].defaultValue?P[t].defaultValue:void 0,n=H.string();break;case exports.FieldTypes.ARRAY:n=H.array(),F[t]=u&&u[t]?u[t]:void 0;break;case exports.FieldTypes.NESTEDSCHEMA:F[t]=u&&u[t]?u[t]:void 0,n=H.mixed()}return n}(P[e],e))}));var V=H.object().shape(W),Q=e.useMemo((function(){return F}),[]),X=c.useForm({resolver:Pa(V),defaultValues:Q}),Y=X.reset,G=X.control,Z=X.handleSubmit,K=X.getValues,$=X.setValue,ee={},te={},ne=function(e,t){$(e.target.name,e.target.checked);var n=q({},z);n[t]=e.target.checked,T(n)};function re(e){te[e]={},te[e][e]={type:P[e]?P[e].arrayType:"",enumValues:P[e]?P[e].enumValues:[]}}function oe(t,r,o){var i={name:o,key:o,size:D,label:r[t].value,disabled:s&&!1===r[t].isEditable};if("title"===t||"defaultOrderBy"===t)return U.jsx(DM,q({},i,{values:k}));if("actions"===t)return U.jsx(XT,{handleChange:ne,getValues:K,size:D,checked:z});if(r[t])switch(r[t].type){case exports.FieldTypes.OBJECTID:case exports.FieldTypes.NUMBER:case exports.FieldTypes.STRING:if("listProperties"===t||"showProperties"===t||"filterProperties"===t||"quickFilterProperties"===t){var a=[];return a=u[t]&&0!==u[t].length?k.filter((function(e){return!K(t).includes(e)||e===K(o)})):k,e.createElement(DM,q({},i,{key:o,values:a}))}return U.jsx(Yu,q({},i));case exports.FieldTypes.ENUM:return U.jsx(DM,q({},i,{values:r[t].enumValues}));case exports.FieldTypes.ARRAY:return function(e){var t=c.useFieldArray({control:G,name:e}),n=t.fields,r=t.append,o=t.remove,i=t.move;ee[e]={fields:n,append:r,remove:o,move:i}}(t),re(t),U.jsxs(n.Grid,{item:!0,xs:12,children:[U.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),U.jsx(KA,{handleRemove:function(e){return function(e,t){ee[e].remove(t)}(t,e)},draggable:!0,handleDrop:function(e){return function(e,t){t.destination&&ee[e].move(t.source.index,t.destination.index)}(t,e)},list:ee[t].fields,itemComponent:function(e){return U.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,sx:{width:1},children:[U.jsx(n.Grid,{item:!0,xs:12,children:oe(t,te[t],"".concat(t,"[").concat(e,"]"))}),U.jsx(n.Divider,{})]})},handleAdd:function(){return function(e){ee[e].append()}(t)},addButtonText:I?"Add item":"إضافة"})]},t)}}return U.jsx(U.Fragment,{children:U.jsx(Su,{methods:X,onSubmit:Z((function(e){return J(a,void 0,void 0,(function(){var t,n,r,o,i,a;return _(this,(function(s){switch(s.label){case 0:j(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Bh.patch(p+"/"+M,e)];case 2:return t=s.sent(),j(!1),201!==t.status&&200!==t.status||!t.data.data.record.document||(Y(),n=f[d].properties.title,r=t.data.data.record.document[n],o=ty.getRecordName(r,n,E),y(),i=m?m(o):"".concat(o," was updated successfully"),v(i),h(b[d].list,{replace:!0})),[3,4];case 3:return a=s.sent(),j(!1),Y(e),A("".concat(JSON.parse(a).meta.message)),[3,4];case 4:return[2]}}))}))})),children:U.jsx(n.Card,{sx:{p:3},children:U.jsxs(n.Grid,{container:!0,spacing:2,justifyContent:"end",children:[N&&N.map((function(e,t){return U.jsx(n.Grid,{item:!0,xs:12,children:oe(e,P,e)},e+t)})),U.jsx(n.Grid,{item:!0,alignSelf:"end",sx:{mt:3},children:U.jsx(l.LoadingButton,{type:"submit",variant:"contained",loading:w,children:s?R:S})})]},"grid1")})},"form")})}function GT(e){var t=e.direction,n=e.sxProps,r=e.onClick,o=e.color,i=function(e){switch(e){case RT.LEFT:return"material-symbols:arrow-back-ios-new";case RT.RIGHT:return"eva:arrow-ios-forward-fill";case RT.DOWN:return"eva:arrow-ios-downward-fill";case RT.UP:return"eva:arrow-ios-upward-fill"}}(t);return U.jsx(To,{icon:i,onClick:r,sx:q({width:16,height:16,color:null!=o?o:"white"},n)})}function ZT(e){var t=e.onClickOpen,r=e.modelName,o=e.checked,i=RT.RIGHT;return U.jsx(n.IconButton,{onClick:function(){return t(r)},children:U.jsx(GT,{direction:o&&o[r].opened?RT.DOWN:i,color:"black"})})}function UT(t){var r=t.label,o=t.checked,i=t.onChange,a=e.memo((function(e){var t=e.checked,r=e.onChange;return U.jsx(n.Checkbox,{checked:t,onChange:function(e,t){return r(e,t)}})}));return U.jsx(n.FormControlLabel,{label:r,control:U.jsx(a,{checked:o,onChange:i})})}function qT(){return U.jsx(n.FormControlLabel,{label:U.jsx(n.Skeleton,{variant:"text",width:160,height:20}),control:U.jsx(n.Checkbox,{disabled:!0})})}function KT(){return U.jsx(n.IconButton,{children:U.jsx(GT,{direction:RT.DOWN,color:"black"})})}function JT(){return U.jsx(U.Fragment,{children:Array.from(Array(2).keys()).map((function(e){return U.jsxs("div",{children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:"1px",children:[U.jsx(KT,{}),U.jsx(qT,{})]}),U.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",ml:8},children:Array.from(Array(4).keys()).map((function(e){return U.jsx(qT,{},e)}))})]},e)}))})}function _T(e){var t=e.modelPermissions,r=e.checked,o=e.fetchLoading,i=e.onCheckAll,a=e.handleChange,s=e.onClickOpen;return U.jsxs(n.Stack,{children:[U.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",children:[U.jsx(n.Typography,{sx:{py:1},fontWeight:700,fontSize:{xs:"14px",md:"18px"},children:"Permissions"}),U.jsx(n.Button,{onClick:i,children:"Check all"})]}),o?U.jsx(JT,{}):t.map((function(e){var t=e.modelName;return U.jsxs("div",{children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:"1px",children:[U.jsx(ZT,{modelName:t,checked:r,onClickOpen:s}),U.jsx(UT,{label:e.label,checked:r&&r[t].all,onChange:function(e,n){return a(t,"all",n)}})]}),r&&r[t].opened&&U.jsx(n.Box,{sx:{display:"flex",flexDirection:"column",ml:8},children:e.permissions.map((function(e){var n=e.id;return U.jsx(UT,{label:e.label,checked:r&&r[t][n],onChange:function(e,r){return a(t,n,r)}},n)}))})]},t)}))]})}function $T(e){var t=Bg().textFieldSize;return U.jsxs(n.Stack,{spacing:3,children:[U.jsx(Yu,{name:"name",label:"Name",size:t}),U.jsx(_T,q({},e))]})}function eD(t){var i=this,a=t.modelPermissions,s=t.fetchLoading,u=t.isEdit,d=t.permissionGroup,p=e.useState(void 0),f=p[0],m=p[1],h=r.useParams().id,g=void 0===h?"":h,v=e.useContext(Ih).dashbaordUrlPrefix,A=Sg().paths,y=H.object().shape({name:o.string().required("Please add permission group name").typeError("Please add permission group name")}),b=e.useState(!1),x=b[0],w=b[1],j=r.useNavigate(),C=e.useMemo((function(){return{name:null==d?void 0:d.name}}),[]),M=c.useForm({resolver:Pa(y),defaultValues:C}),O=M.getValues,z=M.handleSubmit;e.useEffect((function(){a.length>0&&m(function(e){var t={};return e.forEach((function(e,n){t[e.modelName]={all:!1,opened:0===n};var r=!0;e.permissions.forEach((function(n){t[e.modelName][n.id]=n.checked,n.checked?t[e.modelName].opened=!0:r=!1})),r&&(t[e.modelName].all=!0)})),t}(a))}),[a]);return U.jsxs(Su,{methods:M,onSubmit:z((function(e){return J(i,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return w(!0),u?[4,Bh.patch("".concat(v,"/permissionGroups/").concat(g),q(q({},e),{checked:f}))]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,Bh.post("".concat(v,"/permissionGroups"),q(q({},e),{checked:f}))];case 3:t.sent(),t.label=4;case 4:return w(!1),j(A.permissionGroup.list),[2]}}))}))})),children:[U.jsx($T,{checked:f,handleChange:function(e,t,n){var r,o,i,s=q({},f);if(s[e][t]=n,"all"===t)(i=null===(r=a.find((function(t){return t.modelName===e})))||void 0===r?void 0:r.permissions)&&i.forEach((function(t){s[e][t.id]=n}));else if(i=null===(o=a.find((function(t){return t.modelName===e})))||void 0===o?void 0:o.permissions){var l=i.every((function(t){return s[e][t.id]}));s[e].all=l}m(s)},onClickOpen:function(e){var t=q({},f);t[e].opened=!t[e].opened,m(t)},modelPermissions:a,getValues:O,fetchLoading:s,onCheckAll:function(){var e=q({},f);for(var t in e)for(var n in e[t])e[t][n]=!0;m(e)}}),U.jsx(n.Stack,{direction:"row",flexDirection:"row-reverse",children:U.jsx(l.LoadingButton,{type:"submit",variant:"contained",size:"large",loading:x,children:"Save"})})]})}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN"}(RT||(RT={}));var tD=xo("div")((function(e){return{maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.theme.spacing(12,0)}}));function nD(){return U.jsx(ee,{title:"404 Page Not Found",children:U.jsx(n.Container,{component:is,children:U.jsxs(tD,{sx:{textAlign:"center",alignItems:"center"},children:[U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{variant:"h3",paragraph:!0,children:"Sorry, page not found!"})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(n.Typography,{sx:{color:"text.secondary"},children:"Sorry, we couldn’t find the page you’re looking for. Perhaps you’ve mistyped the URL? Be sure to check your spelling."})}),U.jsx(p.m.div,{variants:_a().in,children:U.jsx(Fa,{sx:{height:260,my:{xs:5,sm:10}}})}),U.jsx(n.Button,{to:"/dashboard",size:"large",variant:"contained",component:r.Link,children:"Go to Home"})]})})})}function rD(e){return"".concat(e/16,"rem")}function oD(e){var t=e.sm,n=e.md,r=e.lg;return{"@media (min-width:600px)":{fontSize:rD(t)},"@media (min-width:900px)":{fontSize:rD(n)},"@media (min-width:1200px)":{fontSize:rD(r)}}}var iD={fontFamily:"Almarai",fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:q({fontWeight:700,lineHeight:1.25,fontSize:rD(40),letterSpacing:2},oD({sm:52,md:58,lg:64})),h2:q({fontWeight:700,lineHeight:64/48,fontSize:rD(32)},oD({sm:40,md:44,lg:48})),h3:q({fontWeight:700,lineHeight:1.5,fontSize:rD(24)},oD({sm:26,md:30,lg:32})),h4:q({fontWeight:700,lineHeight:1.5,fontSize:rD(20)},oD({sm:20,md:24,lg:24})),h5:q({fontWeight:700,lineHeight:1.5,fontSize:rD(18)},oD({sm:19,md:20,lg:20})),h6:q({fontWeight:700,lineHeight:28/18,fontSize:rD(17)},oD({sm:18,md:18,lg:18})),subtitle1:{fontWeight:600,lineHeight:1.5,fontSize:rD(16)},subtitle2:{fontWeight:600,lineHeight:22/14,fontSize:rD(14)},body1:{lineHeight:1.5,fontSize:rD(16)},body2:{lineHeight:22/14,fontSize:rD(14)},caption:{lineHeight:1.5,fontSize:rD(12)},overline:{fontWeight:700,lineHeight:1.5,fontSize:rD(12),textTransform:"uppercase"},button:{fontWeight:700,lineHeight:24/14,fontSize:rD(14),textTransform:"capitalize"}},aD={values:{xs:0,sm:600,md:900,lg:1200,xl:1536}};var sD={width:20,height:20},lD={width:28,height:28};function cD(e){return Object.assign(function(e){return{MuiFab:{defaultProps:{color:"primary"},styleOverrides:{root:{boxShadow:e.customShadows.z8,"&:hover":{boxShadow:"none",backgroundColor:e.palette.grey[400]}},primary:{boxShadow:e.customShadows.primary,"&:hover":{backgroundColor:e.palette.primary.dark}},secondary:{boxShadow:e.customShadows.secondary,"&:hover":{backgroundColor:e.palette.secondary.dark}},extended:{"& svg":{marginRight:e.spacing(1)}}}}}}(e),function(e){return{MuiTab:{styleOverrides:{root:{padding:0,fontWeight:e.typography.fontWeightMedium,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,"&.Mui-selected":{color:e.palette.text.primary},"&:not(:last-of-type)":{marginRight:e.spacing(5)},"@media (min-width: 600px)":{minWidth:48}},labelIcon:{minHeight:48,flexDirection:"row","& > *:first-of-type":{marginBottom:0,marginRight:e.spacing(1)}},wrapper:{flexDirection:"row",whiteSpace:"nowrap"},textColorInherit:{opacity:1,color:e.palette.text.secondary}}},MuiTabPanel:{styleOverrides:{root:{padding:0}}},MuiTabScrollButton:{styleOverrides:{root:{width:48,borderRadius:"50%"}}}}}(e),function(e){return{MuiChip:{defaultProps:{deleteIcon:U.jsx(yT,{})},styleOverrides:{colorDefault:{"& .MuiChip-avatarMedium, .MuiChip-avatarSmall":{color:e.palette.text.secondary}},outlined:{borderColor:e.palette.grey[50032],"&.MuiChip-colorPrimary":{borderColor:e.palette.primary.main},"&.MuiChip-colorSecondary":{borderColor:e.palette.secondary.main}},avatarColorInfo:{color:e.palette.info.contrastText,backgroundColor:e.palette.info.dark},avatarColorSuccess:{color:e.palette.success.contrastText,backgroundColor:e.palette.success.dark},avatarColorWarning:{color:e.palette.warning.contrastText,backgroundColor:e.palette.warning.dark},avatarColorError:{color:e.palette.error.contrastText,backgroundColor:e.palette.error.dark}}}}}(e),function(e){return{MuiCard:{styleOverrides:{root:{position:"relative",boxShadow:e.customShadows.card,borderRadius:2*Number(e.shape.borderRadius),zIndex:0}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h6"},subheaderTypographyProps:{variant:"body2",marginTop:e.spacing(.5)}},styleOverrides:{root:{padding:e.spacing(3,3,0)}}},MuiCardContent:{styleOverrides:{root:{padding:e.spacing(3)}}}}}(e),function(e){return{MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}}}}}}}(e),{MuiLink:{defaultProps:{underline:"hover"}}},function(e){return{MuiInputBase:{styleOverrides:{root:{"&.Mui-disabled":{"& svg":{color:e.palette.text.disabled}}},input:{"&::placeholder":{opacity:1,color:e.palette.text.disabled}}}},MuiInput:{styleOverrides:{underline:{"&:before":{borderBottomColor:e.palette.grey[50056]}}}},MuiFilledInput:{styleOverrides:{root:{backgroundColor:e.palette.grey[50012],"&:hover":{backgroundColor:e.palette.grey[50016]},"&.Mui-focused":{backgroundColor:e.palette.action.focus},"&.Mui-disabled":{backgroundColor:e.palette.action.disabledBackground}},underline:{"&:before":{borderBottomColor:e.palette.grey[50056]}}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey[50032]},"&.Mui-disabled":{"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.action.disabledBackground}}}}}}}(e),function(e){return{MuiRadio:{styleOverrides:{root:{padding:e.spacing(1),svg:{fontSize:24,"&[font-size=small]":{fontSize:20}}}}}}}(e),{MuiBadge:{styleOverrides:{dot:{width:10,height:10,borderRadius:"50%"}}}},function(e){return{MuiListItemIcon:{styleOverrides:{root:{color:"inherit",minWidth:"auto",marginRight:e.spacing(2)}}},MuiListItemAvatar:{styleOverrides:{root:{minWidth:"auto",marginRight:e.spacing(2)}}},MuiListItemText:{styleOverrides:{root:{marginTop:0,marginBottom:0},multiline:{marginTop:0,marginBottom:0}}}}}(e),function(e){return{MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}}}}},MuiTableCell:{styleOverrides:{root:{borderBottom:"none"},head:{color:e.palette.text.secondary,backgroundColor:e.palette.background.neutral,"&:first-of-type":{paddingLeft:e.spacing(3),borderTopLeftRadius:e.shape.borderRadius,borderBottomLeftRadius:e.shape.borderRadius,boxShadow:"inset 8px 0 0 ".concat(e.palette.background.paper)},"&:last-of-type":{paddingRight:e.spacing(3),borderTopRightRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,boxShadow:"inset -8px 0 0 ".concat(e.palette.background.paper)}},stickyHeader:{backgroundColor:e.palette.background.paper,backgroundImage:"linear-gradient(to bottom, ".concat(e.palette.background.neutral," 0%, ").concat(e.palette.background.neutral," 100%)")},body:{"&:first-of-type":{paddingLeft:e.spacing(3)},"&:last-of-type":{paddingRight:e.spacing(3)}}}},MuiTablePagination:{styleOverrides:{root:{borderTop:"solid 1px ".concat(e.palette.divider)},toolbar:{height:64},select:{"&:focus":{borderRadius:e.shape.borderRadius}},selectIcon:{width:20,height:20,marginTop:-4}}}}}(e),function(e){return{MuiPaper:{defaultProps:{elevation:0},variants:[{props:{variant:"outlined"},style:{borderColor:e.palette.grey[50012]}}],styleOverrides:{root:{backgroundImage:"none"}}}}}(e),function(e){var t="light"===e.palette.mode,n=function(n){return{color:e.palette[n][t?"darker":"lighter"],backgroundColor:e.palette[n][t?"lighter":"darker"],"& .MuiAlert-icon":{color:e.palette[n][t?"main":"light"]}}},r=function(t){return{color:e.palette[t].contrastText}},o=function(n){return{color:e.palette[n][t?"darker":"lighter"],border:"solid 1px ".concat(e.palette[n][t?"light":"dark"]),backgroundColor:e.palette[n][t?"lighter":"darker"],"& .MuiAlert-icon":{color:e.palette[n][t?"main":"light"]}}};return{MuiAlert:{defaultProps:{iconMapping:{info:U.jsx(xT,{}),success:U.jsx(jT,{}),warning:U.jsx(wT,{}),error:U.jsx(CT,{})}},styleOverrides:{message:{"& .MuiAlertTitle-root":{marginBottom:e.spacing(.5)}},action:{"& button:not(:first-of-type)":{marginLeft:e.spacing(1)}},standardInfo:n("info"),standardSuccess:n("success"),standardWarning:n("warning"),standardError:n("error"),filledInfo:r("info"),filledSuccess:r("success"),filledWarning:r("warning"),filledError:r("error"),outlinedInfo:o("info"),outlinedSuccess:o("success"),outlinedWarning:o("warning"),outlinedError:o("error")}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiSwitch:{styleOverrides:{thumb:{boxShadow:e.customShadows.z1},track:{opacity:1,backgroundColor:e.palette.grey[500]},switchBase:{left:0,right:"auto","&:not(:.Mui-checked)":{color:e.palette.grey[t?100:300]},"&.Mui-checked.Mui-disabled, &.Mui-disabled":{color:e.palette.grey[t?400:600]},"&.Mui-disabled+.MuiSwitch-track":{opacity:1,backgroundColor:"".concat(e.palette.action.disabledBackground," !important")}}}}}}(e),{MuiSelect:{defaultProps:{IconComponent:TT}}},function(e){return{MuiButton:{styleOverrides:{root:{"&:hover":{boxShadow:"none"}},sizeLarge:{height:48},containedInherit:{color:e.palette.grey[800],boxShadow:e.customShadows.z8,"&:hover":{backgroundColor:e.palette.grey[400]}},containedPrimary:{boxShadow:e.customShadows.primary},containedSecondary:{boxShadow:e.customShadows.secondary},containedInfo:{boxShadow:e.customShadows.info},containedSuccess:{boxShadow:e.customShadows.success},containedWarning:{boxShadow:e.customShadows.warning},containedError:{boxShadow:e.customShadows.error},outlinedInherit:{border:"1px solid ".concat(e.palette.grey[50032]),"&:hover":{backgroundColor:e.palette.action.hover}},textInherit:{"&:hover":{backgroundColor:e.palette.action.hover}}}}}}(e),function(e){return{MuiRating:{defaultProps:{emptyIcon:U.jsx(bT,{}),icon:U.jsx(bT,{})},styleOverrides:{root:{"&.Mui-disabled":{opacity:.48}},iconEmpty:{color:e.palette.grey[50048]},sizeSmall:{"& svg":q({},sD)},sizeLarge:{"& svg":q({},lD)}}}}}(e),function(e){return{MuiDialog:{styleOverrides:{paper:{boxShadow:e.customShadows.dialog,"&.MuiPaper-rounded":{borderRadius:2*Number(e.shape.borderRadius)},"&.MuiDialog-paperFullScreen":{borderRadius:0},"&.MuiDialog-paper .MuiDialogActions-root":{padding:e.spacing(3)},"@media (max-width: 600px)":{margin:e.spacing(2)},"@media (max-width: 663.95px)":{"&.MuiDialog-paperWidthSm.MuiDialog-paperScrollBody":{maxWidth:"100%"}}},paperFullWidth:{width:"100%"}}},MuiDialogTitle:{styleOverrides:{root:{padding:e.spacing(3,3,0)}}},MuiDialogContent:{styleOverrides:{root:{borderTop:0,borderBottom:0,padding:e.spacing(3)}}},MuiDialogActions:{styleOverrides:{root:{"& > :not(:first-of-type)":{marginLeft:e.spacing(1.5)}}}}}}(e),function(e){return{MuiAvatar:{styleOverrides:{colorDefault:{color:e.palette.text.secondary,backgroundColor:e.palette.grey[400]}}},MuiAvatarGroup:{styleOverrides:{avatar:{fontSize:16,fontWeight:e.typography.fontWeightMedium,"&:first-of-type":{fontSize:14,color:e.palette.primary.main,backgroundColor:e.palette.primary.lighter}}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiSlider:{defaultProps:{size:"small"},styleOverrides:{root:{"&.Mui-disabled":{color:e.palette.action.disabled}},markLabel:{fontSize:13,color:e.palette.text.disabled},valueLabel:{borderRadius:8,backgroundColor:e.palette.grey[t?800:700]}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiDrawer:{styleOverrides:{modal:{'&[role="presentation"]':{"& .MuiDrawer-paperAnchorLeft":{boxShadow:"8px 24px 24px 12px ".concat(n.alpha(e.palette.grey[900],t?.16:.48))},"& .MuiDrawer-paperAnchorRight":{boxShadow:"-8px 24px 24px 12px ".concat(n.alpha(e.palette.grey[900],t?.16:.48))}}}}}}}(e),function(e){return{MuiStepConnector:{styleOverrides:{line:{borderColor:e.palette.divider}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:e.palette.grey[t?800:700]},arrow:{color:e.palette.grey[t?800:700]}}}}}(e),function(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.dropdown,borderRadius:1.5*Number(e.shape.borderRadius)}}}}}(e),{MuiSvgIcon:{styleOverrides:{fontSizeSmall:{width:20,height:20,fontSize:"inherit"},fontSizeLarge:{width:32,height:32,fontSize:"inherit"}}}},function(e){return{MuiCheckbox:{defaultProps:{icon:U.jsx(MT,{}),checkedIcon:U.jsx(OT,{}),indeterminateIcon:U.jsx(zT,{})},styleOverrides:{root:{padding:e.spacing(1),"&.Mui-checked.Mui-disabled, &.Mui-disabled":{color:e.palette.action.disabled},"& .MuiSvgIcon-fontSizeMedium":{width:24,height:24},"& .MuiSvgIcon-fontSizeSmall":{width:20,height:20},svg:{fontSize:24,"&[font-size=small]":{fontSize:20}}}}}}}(e),function(e){return{MuiDataGrid:{styleOverrides:{root:{borderRadius:0,border:"1px solid transparent","& .MuiTablePagination-root":{borderTop:0},"& .MuiDataGrid-toolbarContainer":{padding:e.spacing(2),backgroundColor:e.palette.background.neutral,"& .MuiButton-root":{marginRight:e.spacing(1.5),color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}}},"& .MuiDataGrid-cell, .MuiDataGrid-columnsContainer":{borderBottom:"1px solid ".concat(e.palette.divider)},"& .MuiDataGrid-columnSeparator":{color:e.palette.divider},'& .MuiDataGrid-columnHeader[data-field="__check__"]':{padding:0}}}},MuiGridMenu:{styleOverrides:{root:{"& .MuiDataGrid-gridMenuList":{boxShadow:e.customShadows.z20,borderRadius:e.shape.borderRadius},"& .MuiMenuItem-root":q({},e.typography.body2)}}},MuiGridFilterForm:{styleOverrides:{root:{padding:e.spacing(1.5,0),"& .MuiFormControl-root":{margin:e.spacing(0,.5)},"& .MuiInput-root":{marginTop:e.spacing(3),"&::before, &::after":{display:"none"},"& .MuiNativeSelect-select, .MuiInput-input":q(q({},e.typography.body2),{padding:e.spacing(.75,1),borderRadius:e.shape.borderRadius,backgroundColor:e.palette.background.neutral}),"& .MuiSvgIcon-root":{right:4}}}}},MuiGridPanelFooter:{styleOverrides:{root:{padding:e.spacing(2),justifyContent:"flex-end","& .MuiButton-root":{"&:first-of-type":{marginRight:e.spacing(1.5),color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}},"&:last-of-type":{color:e.palette.common.white,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark}}}}}}}}(e),function(e){return{MuiSkeleton:{defaultProps:{animation:"wave"},styleOverrides:{root:{backgroundColor:e.palette.background.neutral}}}}}(e),function(e){return{MuiTimelineDot:{styleOverrides:{root:{boxShadow:"none"}}},MuiTimelineConnector:{styleOverrides:{root:{backgroundColor:e.palette.divider}}}}}(e),function(e){return{MuiTreeView:{defaultProps:{defaultCollapseIcon:U.jsx(DT,{sx:{width:20,height:20}}),defaultExpandIcon:U.jsx(PT,{sx:{width:20,height:20}}),defaultEndIcon:U.jsx(NT,{sx:{color:"text.secondary",width:20,height:20}})}},MuiTreeItem:{styleOverrides:{label:q({},e.typography.body2),iconContainer:{width:"auto"}}}}}(e),function(e){var t=Cr(e.palette.grey[900],.48),n=Cr(e.palette.grey[900],1);return{MuiBackdrop:{styleOverrides:{root:{background:["rgb(22,28,36)","-moz-linear-gradient(75deg, ".concat(t," 0%, ").concat(n," 100%)"),"-webkit-linear-gradient(75deg, ".concat(t," 0%, ").concat(n," 100%)"),"linear-gradient(75deg, ".concat(t," 0%, ").concat(n," 100%)")],"&.MuiBackdrop-invisible":{background:"transparent"}}}}}}(e),function(e){var t="light"===e.palette.mode;return{MuiLinearProgress:{styleOverrides:{root:{borderRadius:4,overflow:"hidden"},bar:{borderRadius:4},colorPrimary:{backgroundColor:e.palette.primary[t?"lighter":"darker"]},buffer:{backgroundColor:"transparent"}}}}}(e),function(e){return{MuiAccordion:{styleOverrides:{root:{"&.Mui-expanded":{boxShadow:e.customShadows.z8,borderRadius:e.shape.borderRadius},"&.Mui-disabled":{backgroundColor:"transparent"}}}},MuiAccordionSummary:{styleOverrides:{root:{paddingLeft:e.spacing(2),paddingRight:e.spacing(1),"&.Mui-disabled":{opacity:1,color:e.palette.action.disabled,"& .MuiTypography-root":{color:"inherit"}}},expandIconWrapper:{color:"inherit"}}}}}(e),function(e){return{MuiTypography:{styleOverrides:{paragraph:{marginBottom:e.spacing(2)},gutterBottom:{marginBottom:e.spacing(1)}}}}}(e),function(e){return{MuiPaginationItem:{styleOverrides:{root:{"&.Mui-selected":{fontWeight:e.typography.fontWeightBold}},textPrimary:{"&.Mui-selected":{color:e.palette.primary.main,backgroundColor:Cr(e.palette.primary.main,.08),"&:hover, &.Mui-focusVisible":{backgroundColor:"".concat(Cr(e.palette.primary.main,.24)," !important")}}},outlined:{border:"1px solid ".concat(e.palette.grey[50032])},outlinedPrimary:{"&.Mui-selected":{backgroundColor:Cr(e.palette.primary.main,.08),border:"1px solid ".concat(Cr(e.palette.primary.main,.24))}}}}}}(e),function(e){var t=function(t){return{props:{variant:"contained",color:t},style:{boxShadow:e.customShadows[t]}}};return{MuiButtonGroup:{variants:[{props:{variant:"contained",color:"inherit"},style:{boxShadow:e.customShadows.z8}},t("primary"),t("secondary"),t("info"),t("success"),t("warning"),t("error"),{props:{disabled:!0},style:{boxShadow:"none","& .MuiButtonGroup-grouped.Mui-disabled":{color:e.palette.action.disabled,borderColor:"".concat(e.palette.action.disabledBackground," !important"),"&.MuiButton-contained":{backgroundColor:e.palette.action.disabledBackground}}}}],styleOverrides:{root:{"&:hover":{boxShadow:"none"}}}}}}(e),function(e){return{MuiBreadcrumbs:{styleOverrides:{separator:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}}}}}(e),{MuiCssBaseline:{styleOverrides:{"*":{margin:0,padding:0,boxSizing:"border-box"},html:{width:"100%",height:"100%",WebkitOverflowScrolling:"touch"},body:{width:"100%",height:"100%"},"#root":{width:"100%",height:"100%"},input:{"&[type=number]":{MozAppearance:"textfield","&::-webkit-outer-spin-button":{margin:0,WebkitAppearance:"none"},"&::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"}}},img:{display:"block",maxWidth:"100%"}}}},function(e){return{MuiAutocomplete:{styleOverrides:{paper:{boxShadow:e.customShadows.dropdown},listbox:{padding:e.spacing(0,1),"& .MuiAutocomplete-option":{padding:e.spacing(1),margin:e.spacing(1,0),borderRadius:e.shape.borderRadius}}}}}}(e),function(e){return{MuiFormControlLabel:{styleOverrides:{label:q({},e.typography.body2)}},MuiFormHelperText:{styleOverrides:{root:{marginTop:e.spacing(1)}}},MuiFormLabel:{styleOverrides:{root:{color:e.palette.text.disabled}}}}}(e),function(e){var t=function(t){return{props:{color:t},style:{"&:hover":{borderColor:Cr(e.palette[t].main,.48),backgroundColor:Cr(e.palette[t].main,e.palette.action.hoverOpacity)},"&.Mui-selected":{borderColor:Cr(e.palette[t].main,.48)}}}};return{MuiToggleButton:{variants:[{props:{color:"standard"},style:{"&.Mui-selected":{backgroundColor:e.palette.action.selected}}},t("primary"),t("secondary"),t("info"),t("success"),t("warning"),t("error")]},MuiToggleButtonGroup:{styleOverrides:{root:{borderRadius:e.shape.borderRadius,backgroundColor:e.palette.background.paper,border:"solid 1px ".concat(e.palette.grey[50012]),"& .MuiToggleButton-root":{margin:4,borderColor:"transparent !important",borderRadius:"".concat(e.shape.borderRadius,"px !important")}}}}}}(e),{MuiLoadingButton:{styleOverrides:{root:{"&.MuiButton-text":{"& .MuiLoadingButton-startIconPendingStart":{marginLeft:0},"& .MuiLoadingButton-endIconPendingEnd":{marginRight:0}}}}}})}var uD=cg.light.grey[500],dD="#000000",pD=function(e){var t=Cr(e,.2),n=Cr(e,.14),r=Cr(e,.12);return["none","0px 2px 1px -1px ".concat(t,",0px 1px 1px 0px ").concat(n,",0px 1px 3px 0px ").concat(r),"0px 3px 1px -2px ".concat(t,",0px 2px 2px 0px ").concat(n,",0px 1px 5px 0px ").concat(r),"0px 3px 3px -2px ".concat(t,",0px 3px 4px 0px ").concat(n,",0px 1px 8px 0px ").concat(r),"0px 2px 4px -1px ".concat(t,",0px 4px 5px 0px ").concat(n,",0px 1px 10px 0px ").concat(r),"0px 3px 5px -1px ".concat(t,",0px 5px 8px 0px ").concat(n,",0px 1px 14px 0px ").concat(r),"0px 3px 5px -1px ".concat(t,",0px 6px 10px 0px ").concat(n,",0px 1px 18px 0px ").concat(r),"0px 4px 5px -2px ".concat(t,",0px 7px 10px 1px ").concat(n,",0px 2px 16px 1px ").concat(r),"0px 5px 5px -3px ".concat(t,",0px 8px 10px 1px ").concat(n,",0px 3px 14px 2px ").concat(r),"0px 5px 6px -3px ".concat(t,",0px 9px 12px 1px ").concat(n,",0px 3px 16px 2px ").concat(r),"0px 6px 6px -3px ".concat(t,",0px 10px 14px 1px ").concat(n,",0px 4px 18px 3px ").concat(r),"0px 6px 7px -4px ".concat(t,",0px 11px 15px 1px ").concat(n,",0px 4px 20px 3px ").concat(r),"0px 7px 8px -4px ".concat(t,",0px 12px 17px 2px ").concat(n,",0px 5px 22px 4px ").concat(r),"0px 7px 8px -4px ".concat(t,",0px 13px 19px 2px ").concat(n,",0px 5px 24px 4px ").concat(r),"0px 7px 9px -4px ".concat(t,",0px 14px 21px 2px ").concat(n,",0px 5px 26px 4px ").concat(r),"0px 8px 9px -5px ".concat(t,",0px 15px 22px 2px ").concat(n,",0px 6px 28px 5px ").concat(r),"0px 8px 10px -5px ".concat(t,",0px 16px 24px 2px ").concat(n,",0px 6px 30px 5px ").concat(r),"0px 8px 11px -5px ".concat(t,",0px 17px 26px 2px ").concat(n,",0px 6px 32px 5px ").concat(r),"0px 9px 11px -5px ".concat(t,",0px 18px 28px 2px ").concat(n,",0px 7px 34px 6px ").concat(r),"0px 9px 12px -6px ".concat(t,",0px 19px 29px 2px ").concat(n,",0px 7px 36px 6px ").concat(r),"0px 10px 13px -6px ".concat(t,",0px 20px 31px 3px ").concat(n,",0px 8px 38px 7px ").concat(r),"0px 10px 13px -6px ".concat(t,",0px 21px 33px 3px ").concat(n,",0px 8px 40px 7px ").concat(r),"0px 10px 14px -6px ".concat(t,",0px 22px 35px 3px ").concat(n,",0px 8px 42px 7px ").concat(r),"0px 11px 14px -7px ".concat(t,",0px 23px 36px 3px ").concat(n,",0px 9px 44px 8px ").concat(r),"0px 11px 15px -7px ".concat(t,",0px 24px 38px 3px ").concat(n,",0px 9px 46px 8px ").concat(r)]},fD=function(e){var t=Cr(e,.16);return{z1:"0 1px 2px 0 ".concat(t),z8:"0 8px 16px 0 ".concat(t),z12:"0 12px 24px -4px ".concat(t),z16:"0 16px 32px -4px ".concat(t),z20:"0 20px 40px -4px ".concat(t),z24:"0 24px 48px 0 ".concat(t),primary:"0 8px 16px 0 ".concat(Cr(cg.light.primary.main,.24)),info:"0 8px 16px 0 ".concat(Cr(cg.light.info.main,.24)),secondary:"0 8px 16px 0 ".concat(Cr(cg.light.secondary.main,.24)),success:"0 8px 16px 0 ".concat(Cr(cg.light.success.main,.24)),warning:"0 8px 16px 0 ".concat(Cr(cg.light.warning.main,.24)),error:"0 8px 16px 0 ".concat(Cr(cg.light.error.main,.24)),card:"0 0 2px 0 ".concat(Cr(e,.2),", 0 12px 24px -4px ").concat(Cr(e,.12)),dialog:"-40px 40px 80px -8px ".concat(Cr(cg.light.common.black,.24)),dropdown:"0 0 2px 0 ".concat(Cr(e,.24),", -20px 20px 40px -4px ").concat(Cr(e,.24))}},mD={light:fD(uD),dark:fD(dD)},hD={light:pD(uD),dark:pD(dD)};var gD=function(e){var t,n=(navigator.vendor+e).split("").map((function(e){return e.charCodeAt(0)})).join("");return t=(t=n).replace("-",""),"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g,(function(e,n){return t[n%t.length]}))};function vD(t){var r,o,i,a,s,u,d;t.userType;yD.VENDOR_USER;var p=e.useState(!1),f=p[0],m=p[1],h=hv.isEnglish(),g=Gh(),v=g.requestState,A=g.post,y=Yh().login,b=Sg().root,x=H.object().shape({email:H.string().email("Email must be a valid email address").required("Email is required"),password:H.string().required("Password is required")}),w=c.useForm({resolver:Pa(x),defaultValues:{email:"",password:"",remember:!0}}),j=w.handleSubmit,C=w.formState.isSubmitted;return e.useEffect((function(){v.state===exports.RequestState.SUCCEEDED&&v.data&&v.data.user&&y(v.data.user)}),[v]),U.jsxs(Su,{methods:w,onSubmit:j((function(e){A({url:"auth/login",axiosRequestConfig:{_auth:!1},body:{user:{email:e.email,password:e.password,remember:e.remember,slug:b.split("/")[2]},device:{deviceId:gD(e.email),os:"WEB"}}})})),children:[U.jsxs(n.Stack,{spacing:3,children:[C&&v.state===exports.RequestState.FAILED&&U.jsx(n.Alert,{severity:"error",children:null!==(s=null!==(r=v.error.message)&&void 0!==r?r:null===(a=(null!==(i=null===(o=v.error)||void 0===o?void 0:o.errors)&&void 0!==i?i:[])[0])||void 0===a?void 0:a.message)&&void 0!==s?s:null===(d=null===(u=v.error)||void 0===u?void 0:u.meta)||void 0===d?void 0:d.message}),U.jsx(Yu,{name:"email",label:h?"Email address":"البريد الإلكتروني"}),U.jsx(Yu,{name:"password",label:h?"Password":"كلمة المرور",type:f?"text":"password",InputProps:{endAdornment:U.jsx(n.InputAdornment,{position:"end",children:U.jsx(n.IconButton,{onClick:function(){return m(!f)},edge:"end",children:U.jsx(To,{icon:f?"eva:eye-fill":"eva:eye-off-fill"})})})}})]}),U.jsx(n.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{my:2},children:U.jsx(Na,{name:"remember",label:h?"Remember me":"تذكرني"})}),U.jsx(l.LoadingButton,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:status===exports.RequestState.LOADING,sx:{my:1},children:h?"Login":"تسجيل الدخول"})]})}var AD=xo("div")((function(e){var t;return(t={})[e.theme.breakpoints.up("md")]={display:"flex"},t}));xo("header")((function(e){var t,n=e.theme;return(t={top:0,zIndex:9,lineHeight:0,width:"100%",display:"flex",alignItems:"center",position:"absolute",padding:n.spacing(3),justifyContent:"space-between"})[n.breakpoints.up("md")]={alignItems:"flex-start",padding:n.spacing(7,5,0,7)},t})),xo(n.Card)((function(e){return{width:"100%",maxWidth:464,display:"flex",flexDirection:"column",justifyContent:"center",margin:e.theme.spacing(2,0,2,2)}}));var yD,bD=xo("div")((function(e){return{maxWidth:480,margin:"auto",minHeight:"100vh",display:"flex",justifyContent:"center",flexDirection:"column",padding:e.theme.spacing(12,0)}}));function xD(e){var t=e.userType,r=Bg(),o=r.loginLoginMessage,i=r.loginWeclomeImage,a=r.loginLogo,s=r.loginWelcomeImageSxProps,l=r.loginLogoSxProps,c=r.loginMessageSxProps;os("up","sm");var u=hv.isEnglish(),d=os("up","md");return U.jsx(ee,{title:"Login",children:U.jsxs(AD,{children:[U.jsx(n.Container,{maxWidth:"sm",children:U.jsxs(bD,{children:[U.jsx(n.Stack,{direction:"row",alignItems:"center",sx:{mb:5},children:U.jsxs(n.Box,{sx:{flexGrow:1},children:[U.jsx(yu,{src:a,alt:"logo",sx:q({width:"57px",mb:3,objectFit:"contain"},l)}),U.jsx(n.Typography,{variant:"h4",gutterBottom:!0,sx:q({},c),children:o}),U.jsx(n.Typography,{sx:{color:"text.secondary"},children:u?" Welcome back, Please enter your details below":"الرجاء إدخال البيانات الخاصة بك"})]})}),U.jsx(vD,{userType:t})]})}),d&&U.jsx(yu,{visibleByDefault:!0,disabledEffect:!0,src:i,alt:"login",sx:q({width:"700px",objectFit:"contain"},s)})]})})}!function(e){e[e.ADMIN=0]="ADMIN",e[e.VENDOR_USER=1]="VENDOR_USER",e[e.EVENT_CREATOR=2]="EVENT_CREATOR"}(yD||(yD={}));var wD=e.forwardRef((function(e,t){var r=e.children,o=e.size,i=void 0===o?"medium":o,a=K(e,["children","size"]);return U.jsx(OD,{size:i,children:U.jsx(n.IconButton,q({size:i,ref:t},a,{children:r}))})})),jD={hover:{scale:1.1},tap:{scale:.95}},CD={hover:{scale:1.09},tap:{scale:.97}},MD={hover:{scale:1.08},tap:{scale:.99}};function OD(e){var t=e.size,r=e.children,o="small"===t,i="large"===t;return U.jsx(n.Box,{component:p.m.div,whileTap:"tap",whileHover:"hover",variants:o&&jD||i&&MD||CD,sx:{display:"inline-flex"},children:r})}function zD(e){var t=e.disabledLink,o=void 0!==t&&t,i=e.sx,a=vo(),s=Sg().root,l=Bg(),c=l.navBarLogo,u=l.navBarLogoSxProps;a.palette.primary.light,a.palette.primary.main,a.palette.primary.dark;var d=U.jsx(n.Box,{sx:q(q({width:40,height:40},i),u),children:U.jsx(yu,{visibleByDefault:!0,disabledEffect:!0,src:c,alt:"logo"})});return o?U.jsx(U.Fragment,{children:d}):U.jsx(r.Link,{to:"".concat(s),children:d})}var TD,DD,PD=xo("span")((function(e){var t,n=e.arrow,r=e.theme,o="solid 1px ".concat(Cr(r.palette.grey[500],.12)),i={borderRadius:"0 0 3px 0",top:-6,borderBottom:o,borderRight:o},a={borderRadius:"3px 0 0 0",bottom:-6,borderTop:o,borderLeft:o},s={borderRadius:"0 3px 0 0",left:-6,borderTop:o,borderRight:o},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:o,borderLeft:o};return q(q(q(q(q(q(q(q(q(q(q(q(((t={display:"none"})[r.breakpoints.up("sm")]={zIndex:1,width:12,height:12,content:"''",display:"block",position:"absolute",transform:"rotate(-135deg)",background:r.palette.background.paper},t),"top-left"===n&&q(q({},i),{left:20})),"top-center"===n&&q(q({},i),{left:0,right:0,margin:"auto"})),"top-right"===n&&q(q({},i),{right:20})),"bottom-left"===n&&q(q({},a),{left:20})),"bottom-center"===n&&q(q({},a),{left:0,right:0,margin:"auto"})),"bottom-right"===n&&q(q({},a),{right:20})),"left-top"===n&&q(q({},s),{top:20})),"left-center"===n&&q(q({},s),{top:0,bottom:0,margin:"auto"})),"left-bottom"===n&&q(q({},s),{bottom:20})),"right-top"===n&&q(q({},l),{top:20})),"right-center"===n&&q(q({},l),{top:0,bottom:0,margin:"auto"})),"right-bottom"===n&&q(q({},l),{bottom:20}))}));function ND(e){var t=e.open,r=e.children,o=e.arrow,i=void 0===o?"top-right":o,a=e.disabledArrow,s=e.sx,l=K(e,["open","children","arrow","disabledArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(i),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return U.jsxs(n.Popover,q({open:Boolean(t),anchorEl:t,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:q(q(q({p:1,width:"auto",overflow:"inherit"},u),{"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}}}),s)}},l,{children:[!a&&U.jsx(PD,{arrow:i}),r]}))}function ED(){var t,o,i,a=Yh(),s=a.user,l=a.logout;r.useNavigate(),Sg().root;var c=Gh().remove,u=e.useState(null),d=u[0],p=u[1];return U.jsxs(U.Fragment,{children:[U.jsx(wD,{onClick:function(e){p(e.currentTarget)},sx:q({p:0},d&&{"&:before":{zIndex:1,content:"''",width:"100%",height:"100%",borderRadius:"50%",position:"absolute",bgcolor:function(e){return Cr(e.palette.grey[900],.8)}}}),children:U.jsx(n.Avatar,{src:null==s?void 0:s.photo,alt:(null!==(t=null==s?void 0:s.name)&&void 0!==t?t:null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"})}),U.jsxs(ND,{open:d,anchorEl:d,onClose:function(){p(null)},sx:{p:0,mt:1.5,ml:.75,"& .MuiMenuItem-root":{typography:"body2",borderRadius:.75}},children:[U.jsxs(n.Box,{sx:{my:1.5,px:2.5},children:[U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:null!==(o=null==s?void 0:s.name)&&void 0!==o?o:(null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"}),U.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},noWrap:!0,children:null!==(i=null==s?void 0:s.username)&&void 0!==i?i:null==s?void 0:s.email})]}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),U.jsx(n.MenuItem,{sx:{m:1},onClick:function(){c({url:"auth/logout",onSuccess:function(e){l()}})},children:"Logout"})]})]})}!function(e){e.notifications="إشعارات",e.youHave="لديك",e.unreadMessages="رسائل غير مقروءة",e.showMore="عرض المزيد",e.showLess="عرض أقل",e.viewAll="عرض الكل",e.markAllAsRead="تعيين الكل كمقروء"}(TD||(TD={})),function(e){e.notifications="Notifications",e.youHave="You have",e.unreadMessages="unread messages",e.showMore="Show more",e.showLess="Show less",e.viewAll="View all",e.markAllAsRead="Mark all as read"}(DD||(DD={}));var BD={},kD=xa;Object.defineProperty(BD,"__esModule",{value:!0});var LD,ID,SD=BD.default=void 0,HD=kD(Ca()),RD=U,WD=(0,HD.default)((0,RD.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function FD(e){var t,r=e.notification,o=e.onClickNotification;return U.jsxs(n.ListItemButton,{sx:q({py:1.5,px:2,mt:"1px",display:"flex",alignItems:"center",gap:2},!r.isRead&&{bgcolor:"action.selected"}),onClick:function(){return o(r)},disabled:!r.clickable,children:[r.actorIcon&&U.jsx(n.Avatar,{src:"default"!==r.actorIcon?r.actorIcon:void 0,sx:{width:40,height:40,flexShrink:0,bgcolor:"#e0e0e0"},children:"default"===r.actorIcon&&U.jsx(SD,{sx:{color:"#9e9e9e"}})}),U.jsx(n.ListItemText,{disableTypography:!0,primary:U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:r.text}),secondary:U.jsxs(U.Fragment,{children:[U.jsx(n.Typography,{variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r.message}),U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:0,sx:{mt:.5},children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:.5,sx:{typography:"caption",color:"text.disabled"},children:[U.jsx(To,{icon:"eva:clock-fill",width:14}),U.jsx(n.Typography,{variant:"caption",children:(t=r.createdAt,T.formatDistanceToNow(new Date(t),{addSuffix:!0}))})]}),U.jsxs(n.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[r.targetIcon&&U.jsx(n.Avatar,{src:r.targetIcon,alt:"Branch Logo",sx:{width:24,height:24},variant:"rounded"}),r.targetName&&U.jsx(n.Typography,{variant:"caption",color:"text.secondary",noWrap:!0,sx:{maxWidth:120,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:r.targetName}),r.type&&r.clickable&&!r.hideCheckNow&&U.jsx(n.Chip,{size:"small",sx:{fontSize:"12px"},label:"Check Now"})]})]})]})})]})}function VD(){var t,o=e.useState(null),i=o[0],a=o[1],s=hv.isEnglish()?DD:TD;e.useContext(Ih).dashbaordUrlPrefix;var l=Rg(),c=l.notifications,u=l.markAllAsRead,d=l.markOneRead,p=e.useState(c),f=p[0],m=p[1],h=e.useState(!1),g=h[0],v=h[1],A=null==f?void 0:f.filter((function(e){return!1===e.isRead})).length,y=r.useNavigate(),b=function(){a(null)};e.useEffect((function(){m(c)}),[c]);var x=function(e){a(null),m(null==f?void 0:f.map((function(t){return t.id===e.id?q(q({},t),{isRead:!0}):q({},t)}))),d(e.id),e.redirectUrlType===LD.INTERNAL&&y(String(e.redirectUrl))},w=g?f:null==f?void 0:f.slice(0,4);return U.jsxs(U.Fragment,{children:[U.jsx(wD,{color:i?"primary":"default",onClick:function(e){a(e.currentTarget)},sx:{width:40,height:40},children:U.jsx(n.Badge,{badgeContent:A,color:"error",children:U.jsx(To,{icon:"eva:bell-fill"})})}),U.jsxs(ND,{open:i,onClose:b,sx:{width:360,p:0},children:[U.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",py:2,px:2.5},children:[U.jsxs(n.Box,{sx:{flexGrow:1},children:[U.jsx(n.Typography,{variant:"subtitle1",children:s.notifications}),U.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:"".concat(s.youHave," ").concat(null!=A?A:0," ").concat(s.unreadMessages)}),U.jsx(n.Button,{variant:"text",size:"small",color:"success",onClick:function(){b(),y("adminNotifications")},endIcon:U.jsx(To,{icon:"eva:arrow-ios-forward-fill"}),sx:{px:0,mt:.5},children:s.viewAll})]}),A&&A>0&&U.jsx(n.Tooltip,{title:" Mark all as read",children:U.jsx(n.IconButton,{color:"primary",onClick:function(){u(),m(null==f?void 0:f.map((function(e){return q(q({},e),{isRead:!0})})))},children:U.jsx(To,{icon:"eva:done-all-fill"})})})]}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),U.jsx(n.Paper,{style:{minHeight:200,maxHeight:400,overflow:"auto"},children:U.jsx(n.List,{disablePadding:!0,children:null==w?void 0:w.map((function(e){return U.jsx(FD,{notification:e,onClickNotification:x},e.id)}))})}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),(null!==(t=null==f?void 0:f.length)&&void 0!==t?t:0)>4&&U.jsx(n.Box,{sx:{p:1},children:U.jsx(n.Button,{fullWidth:!0,disableRipple:!0,onClick:function(){return v(!g)},children:g?s.showLess:s.showMore})})]})]})}SD=BD.default=WD,function(e){e.NONE="NONE",e.INTERNAL="INTERNAL",e.EXTERNAL="EXTERNAL"}(LD||(LD={})),function(e){e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"}(ID||(ID={}));var QD={exports:{}};QD.exports=(()=>{return e={772:(e,t,n)=>{const r=n(826).remove,o=/[.*+?^${}()|[\]\\]/g,i=/[a-z0-9_]/i,a=/\s+/;e.exports=function(e,t,n){var s,l;l={insideWords:!1,findAllOccurrences:!1,requireMatchAll:!1},s=(s=n)||{},Object.keys(s).forEach((e=>{l[e]=!!s[e]})),n=l;const c=Array.from(e).map((e=>r(e)));let u=c.join("");return(t=r(t)).trim().split(a).filter((e=>e.length>0)).reduce(((e,t)=>{const r=t.length,a=!n.insideWords&&i.test(t[0])?"\\b":"",s=new RegExp(a+t.replace(o,"\\$&"),"i");let l,d;if(l=s.exec(u),n.requireMatchAll&&null===l)return u="",[];for(;l;){d=l.index;const t=r-c.slice(d,d+r).join("").length,o=d-c.slice(0,d).join("").length,i=[d+o,d+r+o+t];if(i[0]!==i[1]&&e.push(i),u=u.slice(0,d)+new Array(r+1).join(" ")+u.slice(d+r),!n.findAllOccurrences)break;l=s.exec(u)}return e}),[]).sort(((e,t)=>e[0]-t[0]))}},826:e=>{var t={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},n=Object.keys(t).join("|"),r=new RegExp(n,"g"),o=new RegExp(n,""),i=function(e){return e.replace(r,(function(e){return t[e]}))};e.exports=i,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=i}},t={},function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(772);var e,t})();var XD=F(QD.exports),YD=xo("div")((function(e){var t=e.theme;return{display:"flex",alignItems:"center",padding:t.spacing(2,2.5),borderRadius:1.5*Number(t.shape.borderRadius),backgroundColor:t.palette.grey[500],transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}}));function GD(e){var t,r,o,i,a=e.isCollapse,s=Yh().user;return U.jsx(n.Link,{underline:"none",color:"inherit",children:U.jsxs(YD,{sx:q({bgcolor:"#919eab1f"},a&&{bgcolor:"transparent"}),children:[U.jsx(n.Avatar,{src:null==s?void 0:s.photo,alt:(null!==(r=null!==(t=null==s?void 0:s.name)&&void 0!==t?t:null==s?void 0:s.email)&&void 0!==r?r:null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"}),U.jsxs(n.Box,{sx:q({ml:2,transition:function(e){return e.transitions.create("width",{duration:e.transitions.duration.shorter})}},a&&{ml:0,width:0}),children:[U.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:null!==(o=null==s?void 0:s.name)&&void 0!==o?o:(null==s?void 0:s.firstName)?"".concat(null==s?void 0:s.firstName," ").concat(null==s?void 0:s.lastName):"---"}),U.jsx(n.Typography,{variant:"body2",noWrap:!0,sx:{color:"text.secondary"},children:null!==(i=null==s?void 0:s.email)&&void 0!==i?i:null==s?void 0:s.username})]})]})})}function ZD(e){var t=e.onToggleCollapse,r=e.collapseClick;return U.jsx(wD,{onClick:t,children:U.jsx(n.Box,{sx:q({lineHeight:0,transition:function(e){return e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},r&&{transform:"rotate(180deg)"}),children:UD})})}var UD=U.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:U.jsxs("g",{fill:"none",fillRule:"evenodd",children:[U.jsx("path",{d:"M0 0h24v24H0z"}),U.jsxs("g",{fill:"currentColor",fillRule:"nonzero",children:[U.jsx("path",{d:"M14.3283 11.4343 18.5126 7.25c.4142-.4142.4142-1.0858 0-1.5-.4142-.4142-1.0858-.4142-1.5 0l-5.543 5.5429c-.3904.3905-.3904 1.0237 0 1.4142l5.543 5.5429c.4142.4142 1.0858.4142 1.5 0 .4142-.4142.4142-1.0858 0-1.5l-4.1843-4.1843a.8.8 0 0 1 0-1.1314Z",opacity:".48"}),U.jsx("path",{d:"M8.3283 11.4343 12.5126 7.25c.4142-.4142.4142-1.0858 0-1.5-.4142-.4142-1.0858-.4142-1.5 0l-5.543 5.5429c-.3904.3905-.3904 1.0237 0 1.4142l5.543 5.5429c.4142.4142 1.0858.4142 1.5 0 .4142-.4142.4142-1.0858 0-1.5l-4.1843-4.1843a.8.8 0 0 1 0-1.1314Z"})]})]})}),qD=xo(n.ListItemButton,{shouldForwardProp:function(e){return"activeRoot"!==e&&"activeSub"!==e&&"subItem"!==e}})((function(e){var t=e.activeRoot,n=e.activeSub,r=e.subItem,o=e.theme;return q(q(q(q(q({},o.typography.body2),{position:"relative",height:Og.DASHBOARD_ITEM_ROOT_HEIGHT,textTransform:"capitalize",paddingLeft:o.spacing(2),paddingRight:o.spacing(1.5),marginBottom:o.spacing(.5),color:o.palette.text.secondary,borderRadius:o.shape.borderRadius}),t&&q(q({},o.typography.subtitle2),{color:o.palette.primary.main,backgroundColor:Cr(o.palette.primary.main,o.palette.action.selectedOpacity)})),n&&q(q({},o.typography.subtitle2),{color:o.palette.text.primary})),r&&{height:Og.DASHBOARD_ITEM_SUB_HEIGHT})})),KD=xo(n.ListItemText,{shouldForwardProp:function(e){return"isCollapse"!==e}})((function(e){var t=e.isCollapse,n=e.theme;return q({whiteSpace:"nowrap",transition:n.transitions.create(["width","opacity"],{duration:n.transitions.duration.shorter})},t&&{width:0,opacity:0})})),JD=xo(n.ListItemIcon)({width:zg,height:zg,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%"}}),_D=xo(n.Button,{shouldForwardProp:function(e){return"activeRoot"!==e&&"activeSub"!==e&&"subItem"!==e&&"open"!==e}})((function(e){var t=e.activeRoot,n=e.activeSub,r=e.subItem,o=e.open,i=e.theme,a="light"===i.palette.mode,s={color:i.palette.grey[800],backgroundColor:i.palette.common.white,boxShadow:"-2px 4px 6px 0 ".concat(Cr(a?i.palette.grey[500]:i.palette.common.black,.16))};return q(q(q(q(q(q({},i.typography.body2),{margin:i.spacing(0,.5),padding:i.spacing(0,1),color:i.palette.text.secondary,height:Og.DASHBOARD_ITEM_HORIZONTAL_HEIGHT,"&:hover":{color:i.palette.text.primary,backgroundColor:i.palette.background.paper}}),t&&q(q(q({},i.typography.subtitle2),s),{"&:hover":q({},s)})),n&&q(q({},i.typography.subtitle2),{color:i.palette.text.primary})),r&&{width:"100%",margin:0,paddingRight:0,paddingLeft:i.spacing(1),justifyContent:"space-between"}),o&&!t&&{color:i.palette.text.primary,backgroundColor:i.palette.action.hover})})),$D=xo(n.Popover)((function(e){var t=e.theme;return{pointerEvents:"none","& .MuiPopover-paper":{width:160,pointerEvents:"auto",padding:t.spacing(1),borderRadius:1.5*Number(t.shape.borderRadius),boxShadow:t.customShadows.dropdown}}})),eP=e.forwardRef((function(e,t){var o=e.item,i=e.active,a=e.open,s=e.onMouseEnter,l=e.onMouseLeave,c=o.title,u=o.path,d=o.icon,p=o.children,f=o.disabled,m=o.roles;return p?U.jsx(_D,{ref:t,open:a,activeRoot:i,onMouseEnter:s,onMouseLeave:l,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p})}):aP(u)?U.jsx(_D,{component:n.Link,href:u,target:"_blank",rel:"noopener",disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p})}):U.jsx(_D,{component:r.NavLink,to:u,activeRoot:i,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p})})})),tP=e.forwardRef((function(e,t){var o=e.item,i=e.active,a=e.open,s=e.onMouseEnter,l=e.onMouseLeave,c=o.title,u=o.path,d=o.icon,p=o.children,f=o.disabled,m=o.roles;return p?U.jsx(_D,{ref:t,subItem:!0,disableRipple:!0,open:a,activeSub:i,onMouseEnter:s,onMouseLeave:l,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p,subItem:!0})}):aP(u)?U.jsx(_D,{subItem:!0,href:u,disableRipple:!0,rel:"noopener",target:"_blank",component:n.Link,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p,subItem:!0})}):U.jsx(_D,{disableRipple:!0,component:r.NavLink,to:u,activeSub:i,subItem:!0,disabled:f,roles:m,children:U.jsx(nP,{icon:d,title:c,children:p,subItem:!0})})}));function nP(e){var t=e.icon,r=e.title,o=e.children,i=e.subItem;return U.jsxs(U.Fragment,{children:[t&&U.jsx(n.Box,{component:"span",sx:{mr:1,width:Tg,height:Tg,"& svg":{width:"100%",height:"100%"}},children:t}),r,o&&U.jsx(To,{icon:i?"eva:chevron-right-fill":"eva:chevron-down-fill",sx:{ml:.5,width:Tg,height:Tg}})]})}function rP(t){var n=t.list,o=e.useRef(null),i=r.useLocation().pathname,a=sP(n,i),s=e.useState(!1),l=s[0],c=s[1],u=n.children;e.useEffect((function(){l&&p()}),[i]);var d=function(){c(!0)},p=function(){c(!1)};return u?U.jsxs(U.Fragment,{children:[U.jsx(eP,{open:l,item:n,active:a,ref:o,onMouseEnter:d,onMouseLeave:p}),U.jsx($D,{open:l,anchorEl:o.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{onMouseEnter:d,onMouseLeave:p},children:(n.children||[]).map((function(e){return U.jsx(oP,{list:e},e.title+e.path)}))})]}):U.jsx(eP,{item:n,active:a})}function oP(t){var n=t.list,o=e.useRef(null),i=sP(n,r.useLocation().pathname),a=e.useState(!1),s=a[0],l=a[1],c=function(){l(!0)},u=function(){l(!1)};return n.children?U.jsxs(U.Fragment,{children:[U.jsx(tP,{ref:o,open:s,item:n,active:i,onMouseEnter:c,onMouseLeave:u}),U.jsx($D,{open:s,anchorEl:o.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{onMouseEnter:c,onMouseLeave:u},children:(n.children||[]).map((function(e){return U.jsx(oP,{list:e},e.title+e.path)}))})]}):U.jsx(tP,{item:n,active:i})}var iP={msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}};function aP(e){return e.includes("http")}function sP(e,t){var n;return e.path?!!r.matchPath({path:e.path,end:!1},t):!!e.children&&(null===(n=e.children)||void 0===n?void 0:n.some((function(e){return!!r.matchPath({path:e.path,end:!1},t)})))}function lP(e){var t=e.item,o=e.isCollapse,i=e.open,a=void 0!==i&&i,s=e.active,l=e.onOpen,c=t.title,u=t.path,d=t.icon,p=t.info,f=t.children,m=t.disabled,h=t.caption,g=t.roles,v=U.jsxs(U.Fragment,{children:[d&&U.jsx(JD,{children:d}),U.jsx(KD,{disableTypography:!0,primary:c,secondary:U.jsx(n.Tooltip,{title:h||"",arrow:!0,children:U.jsx(n.Typography,{noWrap:!0,variant:"caption",component:"div",sx:{textTransform:"initial",color:"text.secondary"},children:h})}),isCollapse:o}),!o&&U.jsxs(U.Fragment,{children:[p&&p,f&&U.jsx(dP,{open:a})]})]});return f?U.jsx(qD,{onClick:l,activeRoot:s,disabled:m,roles:g,children:v}):aP(u)?U.jsx(qD,{component:n.Link,href:u,target:"_blank",rel:"noopener",disabled:m,roles:g,children:v}):U.jsx(qD,{component:r.NavLink,to:u,activeRoot:s,disabled:m,roles:g,children:v})}function cP(e){var t=e.item,o=e.open,i=void 0!==o&&o,a=e.active,s=void 0!==a&&a,l=e.onOpen,c=t.title,u=t.path,d=t.info,p=t.children,f=t.disabled,m=t.caption,h=t.roles,g=U.jsxs(U.Fragment,{children:[U.jsx(uP,{active:s}),U.jsx(n.ListItemText,{disableTypography:!0,primary:c,secondary:U.jsx(n.Tooltip,{title:m||"",arrow:!0,children:U.jsx(n.Typography,{noWrap:!0,variant:"caption",component:"div",sx:{textTransform:"initial",color:"text.secondary"},children:m})})}),d&&d,p&&U.jsx(dP,{open:i})]});return p?U.jsx(qD,{onClick:l,activeSub:s,subItem:!0,disabled:f,roles:h,children:g}):aP(u)?U.jsx(qD,{component:n.Link,href:u,target:"_blank",rel:"noopener",subItem:!0,disabled:f,roles:h,children:g}):U.jsx(qD,{component:r.NavLink,to:u,activeSub:s,subItem:!0,disabled:f,roles:h,children:g})}function uP(e){var t=e.active;return U.jsx(JD,{children:U.jsx(n.Box,{component:"span",sx:q({width:4,height:4,borderRadius:"50%",bgcolor:"text.disabled",transition:function(e){return e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},t&&{transform:"scale(2)",bgcolor:"primary.main"})})})}function dP(e){var t=e.open;return U.jsx(To,{icon:t?"eva:arrow-ios-downward-fill":"eva:arrow-ios-forward-fill",sx:{width:16,height:16,ml:1}})}function pP(t){var o=t.list,i=t.isCollapse,a=sP(o,r.useLocation().pathname),s=e.useState(a),l=s[0],c=s[1];return o.children?U.jsxs(U.Fragment,{children:[U.jsx(lP,{item:o,isCollapse:i,active:a,open:l,onOpen:function(){return c(!l)}}),!i&&U.jsx(n.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:U.jsx(n.List,{component:"div",disablePadding:!0,children:(o.children||[]).map((function(e){return U.jsx(fP,{list:e},e.title+e.path)}))})})]}):U.jsx(lP,{item:o,active:a,isCollapse:i})}function fP(t){var o=t.list,i=r.useLocation().pathname,a=sP(o,i),s=e.useState(a),l=s[0],c=s[1];return o.children?U.jsxs(U.Fragment,{children:[U.jsx(cP,{item:o,onOpen:function(){return c(!l)},open:l,active:a}),U.jsx(n.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:U.jsx(n.List,{component:"div",disablePadding:!0,sx:{pl:3},children:(o.children||[]).map((function(e){return U.jsx(cP,{item:e,active:sP(e,i)},e.title+e.path)}))})})]}):U.jsx(cP,{item:o,active:a})}e.memo((function(e){var t=e.navConfig;return U.jsx(n.Stack,{direction:"row",justifyContent:"center",sx:{bgcolor:"background.neutral",borderRadius:1,px:.5},children:U.jsx(n.Stack,{direction:"row",sx:q(q({},iP),{py:1}),children:t.map((function(e){return U.jsx(n.Stack,{direction:"row",flexShrink:0,children:e.items.map((function(e){return U.jsx(rP,{list:e},e.title+e.path)}))},e.subheader)}))})})}));var mP=xo((function(e){return U.jsx(n.ListSubheader,q({disableSticky:!0,disableGutters:!0},e))}))((function(e){var t=e.theme;return q(q({},t.typography.overline),{paddingTop:t.spacing(3),paddingLeft:t.spacing(2),paddingBottom:t.spacing(1),color:t.palette.text.primary,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})})}));function hP(e){var t=e.navConfig,r=e.isCollapse,o=void 0!==r&&r,i=K(e,["navConfig","isCollapse"]);return U.jsx(n.Box,q({},i,{children:t.map((function(e){return U.jsxs(n.List,{disablePadding:!0,sx:{px:2},children:[U.jsx(mP,{sx:q({},o&&{opacity:0}),children:e.subheader}),e.items.map((function(e){return U.jsx(pP,{list:e,isCollapse:o},e.title+e.path)}))]},e.subheader)}))}))}var gP,vP=xo("div")((function(e){var t,n=e.theme;return(t={})[n.breakpoints.up("lg")]={flexShrink:0,transition:n.transitions.create("width",{duration:n.transitions.duration.shorter})},t}));function AP(t){var o=t.isOpenSidebar,i=t.onCloseSidebar,a=vo(),s=r.useLocation().pathname,l=os("up","lg"),c=Wg(),u=c.isCollapse,d=c.collapseClick,p=c.collapseHover,f=c.onToggleCollapse,m=c.onHoverEnter,h=c.onHoverLeave;e.useEffect((function(){o&&i()}),[s]),gP=$h();var g=U.jsxs(mv,{sx:{height:1,"& .simplebar-content":{height:1,display:"flex",flexDirection:"column"}},children:[U.jsxs(n.Stack,{spacing:3,sx:q({pt:3,pb:2,px:2.5,flexShrink:0},u&&{alignItems:"center"}),children:[U.jsxs(n.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[U.jsx(zD,{}),l&&!u&&U.jsx(ZD,{onToggleCollapse:f,collapseClick:d})]}),U.jsx(GD,{isCollapse:u})]}),U.jsx(hP,{navConfig:gP,isCollapse:u}),U.jsx(n.Box,{sx:{flexGrow:1}})]});return U.jsxs(vP,{sx:q({width:{lg:u?Og.DASHBOARD_COLLAPSE_WIDTH:Og.DASHBOARD_WIDTH}},d&&{position:"absolute"}),children:[!l&&U.jsx(n.Drawer,{open:o,onClose:i,PaperProps:{sx:{width:Og.DASHBOARD_WIDTH}},children:g}),l&&U.jsx(n.Drawer,{open:!0,variant:"persistent",onMouseEnter:m,onMouseLeave:h,PaperProps:{sx:q(q({width:Og.DASHBOARD_WIDTH,borderRightStyle:"dashed",bgcolor:"background.default",transition:function(e){return e.transitions.create("width",{duration:e.transitions.duration.standard})}},u&&{width:Og.DASHBOARD_COLLAPSE_WIDTH}),p&&q(q({},lu(a).bgBlur()),{boxShadow:function(e){return e.customShadows.z24}}))},children:g})]})}function yP(e,t){void 0===t&&(t="children");var n=[],r=null==e?void 0:e.map((function(e){return e[t]&&e[t].length&&(n=$($([],n,!0),e[t],!0)),e}));return null==r?void 0:r.concat(n.length?yP(n,t):n)}function bP(e){var t=e.searchQuery,r=void 0===t?"":t,o=K(e,["searchQuery"]),i=Vg().translate;return r?U.jsxs(n.Paper,q({},o,{children:[U.jsx(n.Typography,{gutterBottom:!0,align:"center",variant:"subtitle1",children:i("general.noResults")}),U.jsxs(n.Typography,{variant:"body2",align:"center",children:[i("general.noResultsFound"),"  ",U.jsxs("strong",{children:['"',r,'"']}),". ",i("general.tryCheckingTypos")]})]})):U.jsx(n.Typography,{variant:"body2",children:" Please enter keywords"})}var xP=xo("div")((function(e){var t,n=e.theme;return q(q({},lu(n).bgBlur()),((t={top:0,left:0,zIndex:99,width:"100%",display:"flex",position:"absolute",alignItems:"center",height:64,padding:n.spacing(0,3),boxShadow:n.customShadows.z8})[n.breakpoints.up("md")]={height:92,padding:n.spacing(0,5)},t))})),wP={width:1,height:1,"& .MuiFormControl-root, .MuiOutlinedInput-root, .MuiAutocomplete-input":{height:1,p:"0 !important",fontWeight:"fontWeightBold","& fieldset":{display:"none"}}},jP=xo((function(e){return U.jsx(n.Popper,q({},e))}))((function(e){var t,n=e.theme;return(t={left:"8px !important",top:"".concat(72,"px !important"),width:"calc(100% - 16px) !important",transform:"none !important"})[n.breakpoints.up("md")]={top:"".concat(100,"px !important")},t["& .MuiAutocomplete-paper"]={padding:n.spacing(1,0)},t["& .MuiListSubheader-root"]={"&.MuiAutocomplete-groupLabel":q(q(q({},lu(n).bgBlur({color:n.palette.background.neutral})),n.typography.overline),{top:0,margin:0,lineHeight:"48px",borderRadius:n.shape.borderRadius})},t["& .MuiAutocomplete-listbox"]={"& .MuiAutocomplete-option":{padding:n.spacing(.5,2),margin:0,display:"block",border:"dashed 1px transparent",borderBottom:"dashed 1px ".concat(n.palette.divider),"&:hover":{border:"dashed 1px ".concat(n.palette.primary.main),backgroundColor:Cr(n.palette.primary.main,n.palette.action.hoverOpacity)}}},t}));var CP=e.memo((function(){var t=r.useNavigate(),o=r.useLocation().pathname,i=e.useState(!1),a=i[0],s=i[1],l=e.useState(""),c=l[0],u=l[1],d=gP&&0!==gP.length?gP.map((function(e){return MP(e.items,e.subheader)})).flat():[],p=yP(d).map((function(e){if(e.path){var t=function(e,t){var n,r=e.map((function(e){return{path:[e.title],currItem:e}})),o=function(){var e=r.pop(),o=e.path,i=e.currItem;if(i.path===t)return{value:o};(null===(n=i.children)||void 0===n?void 0:n.length)&&(r=r.concat(i.children.map((function(e){return{path:o.concat(e.title),currItem:e}}))))};for(;r.length;){var i=o();if("object"==typeof i)return i.value}return null}(d,e.path);return{group:t&&t.length>1?t[0]:e.subheader,title:e.title,path:e.path}}return{group:"",title:"",path:""}}));e.useEffect((function(){a&&s(!1)}),[o]);var f=function(e){e.includes("http")?window.open(e):t(e),s(!1)},m=function(e){"Enter"===e.key&&f(c)};return U.jsx(n.ClickAwayListener,{onClickAway:function(){return s(!1)},children:U.jsxs("div",{children:[!a&&U.jsx(wD,{onClick:function(){return s((function(e){return!e}))},children:U.jsx(To,{icon:"eva:search-fill",width:20,height:20})}),U.jsx(n.Slide,{direction:"down",in:a,mountOnEnter:!0,unmountOnExit:!0,children:U.jsx(xP,{children:U.jsx(jm,{sx:wP,autoHighlight:!0,disablePortal:!0,disableClearable:!0,popupIcon:null,PopperComponent:jP,onInputChange:function(e,t){return u(t)},noOptionsText:U.jsx(bP,{searchQuery:c}),options:p.sort((function(e,t){return-t.group.localeCompare(e.group)})),groupBy:function(e){return e.group},getOptionLabel:function(e){return e.path},isOptionEqualToValue:function(e,t){return e.path===t.path},filterOptions:sc({matchFrom:"start",stringify:function(e){return e.title||e.path}}),renderOption:function(e,t,r){var o=r.inputValue,i=t.title,a=t.path,s=Gm(i,XD(i,o)),l=Gm(a,XD(a,o));return U.jsxs(n.Box,q({component:"li"},e,{onClick:function(){return f(a)},children:[U.jsx("div",{children:s.map((function(e,t){return U.jsx(n.Box,{component:"span",sx:{typography:"subtitle2",textTransform:"capitalize",color:e.highlight?"primary.main":"text,primary"},children:e.text},t)}))}),U.jsx("div",{children:l.map((function(e,t){return U.jsx(n.Box,{component:"span",sx:{typography:"caption",color:e.highlight?"primary.main":"text.secondary"},children:e.text},t)}))})]}))},renderInput:function(e){return U.jsx(n.TextField,q({},e,{InputLabelProps:void 0,autoFocus:!0,placeholder:"Search...",onKeyUp:m,InputProps:q(q({},e.InputProps),{startAdornment:U.jsx(n.InputAdornment,{position:"start",children:U.jsx(To,{icon:"eva:search-fill",sx:{color:"text.disabled",width:20,height:20}})})})}))}})})})]})})}));function MP(e,t){return null==e?void 0:e.map((function(e){return q(q({subheader:t},e),e.children&&{children:MP(e.children,t)})}))}function OP(){var t=Vg(),r=t.allLangs,o=t.currentLang,i=t.onChangeLang,a=e.useContext(Kh).getResources,s=Rg().getNotifications,l=e.useState(null),c=l[0],u=l[1],d=function(){u(null)};return U.jsxs(U.Fragment,{children:[U.jsx(wD,{onClick:function(e){u(e.currentTarget)},sx:q({width:50,height:50},c&&{bgcolor:"action.selected"}),children:U.jsx(yu,{disabledEffect:!0,src:o.icon,alt:o.label,sx:{width:28}})}),U.jsx(ND,{open:c,anchorEl:c,onClose:d,sx:{mt:1.5,ml:.75,width:180,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75}},children:U.jsx(n.Stack,{spacing:.75,children:r.map((function(e){return U.jsxs(n.MenuItem,{selected:e.value===o.value,onClick:function(){var t;t=e.value,i(t),d(),a(),s()},children:[U.jsx(yu,{disabledEffect:!0,alt:e.label,src:e.icon,sx:{width:28,mr:2}}),e.label]},e.value)}))})})]})}var zP=xo(n.AppBar,{shouldForwardProp:function(e){return"isCollapse"!==e&&"isOffset"!==e&&"verticalLayout"!==e}})((function(e){var t,n=e.isCollapse,r=e.isOffset,o=e.verticalLayout,i=e.theme;return q(q({},lu(i).bgBlur()),((t={boxShadow:"none",height:Mg.MOBILE_HEIGHT,zIndex:i.zIndex.appBar+1,transition:i.transitions.create(["width","height"],{duration:i.transitions.duration.shorter})})[i.breakpoints.up("lg")]=q(q(q({height:Mg.DASHBOARD_DESKTOP_HEIGHT,width:"calc(100% - ".concat(Og.DASHBOARD_WIDTH+1,"px)")},n&&{width:"calc(100% - ".concat(Og.DASHBOARD_COLLAPSE_WIDTH,"px)")}),r&&{height:Mg.DASHBOARD_DESKTOP_OFFSET_HEIGHT}),o&&{width:"100%",height:Mg.DASHBOARD_DESKTOP_OFFSET_HEIGHT,backgroundColor:"#E2ADAD"}),t))}));function TP(t){var r,o,i=t.onOpenSidebar,a=t.isCollapse,s=void 0!==a&&a,l=t.verticalLayout,c=void 0!==l&&l,u=function(t,n){void 0===t&&(t=0);var r=p.useScroll(n).scrollY,o=e.useState(!1),i=o[0],a=o[1],s=e.useCallback((function(){r.on("change",(function(e){a(e>t)}))}),[r,t]);return e.useEffect((function(){s()}),[s]),e.useMemo((function(){return i}),[i])}(Mg.DASHBOARD_DESKTOP_HEIGHT)&&!c,d=kg().resources,f=os("up","lg"),m=null===(r=null==d?void 0:d.appConfigurations)||void 0===r?void 0:r.adminNotifications,h=null===(o=null==d?void 0:d.appConfigurations)||void 0===o?void 0:o.enableLocalization;return U.jsx(zP,{isCollapse:s,isOffset:u,verticalLayout:c,children:U.jsxs(n.Toolbar,{sx:{minHeight:"100% !important",px:{lg:5}},children:[f&&c&&U.jsx(zD,{sx:{mr:2.5}}),!f&&U.jsx(wD,{onClick:i,sx:{mr:1,color:"text.primary"},children:U.jsx(To,{icon:"eva:menu-2-fill"})}),d&&U.jsx(CP,{}),U.jsx(n.Box,{sx:{flexGrow:1}}),U.jsxs(n.Stack,{flexGrow:1,direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:{xs:.5,sm:1.5},children:[h&&U.jsx(OP,{}),m&&U.jsx(VD,{}),U.jsx(ED,{})]})]})})}var DP=xo("main",{shouldForwardProp:function(e){return"collapseClick"!==e}})((function(e){var t,n=e.collapseClick,r=e.theme;return(t={flexGrow:1,paddingTop:Mg.MOBILE_HEIGHT+24,paddingBottom:Mg.MOBILE_HEIGHT+24})[r.breakpoints.up("lg")]=q({paddingLeft:16,paddingRight:16,paddingTop:Mg.DASHBOARD_DESKTOP_HEIGHT+24,paddingBottom:Mg.DASHBOARD_DESKTOP_HEIGHT+24,width:"calc(100% - ".concat(Og.DASHBOARD_WIDTH,"px)"),transition:r.transitions.create("margin-left",{duration:r.transitions.duration.shorter})},n&&{marginLeft:Og.DASHBOARD_COLLAPSE_WIDTH}),t}));function PP(){var t=Wg(),o=t.collapseClick,i=t.isCollapse,a=kg().resources,s=e.useState(!1),l=s[0],c=s[1];return a?U.jsxs(n.Box,{sx:{display:{lg:"flex"},minHeight:{lg:1}},children:[U.jsx(TP,{isCollapse:i,onOpenSidebar:function(){return c(!0)}}),U.jsx(AP,{isOpenSidebar:l,onCloseSidebar:function(){return c(!1)}}),U.jsx(DP,{collapseClick:o,children:U.jsx(r.Outlet,{})})]}):U.jsx(qh,{})}function NP(t){var n=t.children,r=vo();e.useEffect((function(){document.dir=r.direction}),[r.direction]);var o=N({key:"rtl"===r.direction?"rtl":"css",stylisPlugins:"rtl"===r.direction?[E]:[]});return U.jsx(s.CacheProvider,{value:o,children:n})}function EP(e){var t=e.children,n=ho(vo(),Vg().currentLang.systemValue);return U.jsx(jo,{theme:n,children:t})}function BP(e){return Rt("MuiCard",e)}Wt("MuiCard",["root"]);const kP=["className","raised"],LP=xo($i,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),IP=S.forwardRef((function(e,t){const n=Ao({props:e,name:"MuiCard"}),{className:r,raised:o=!1}=n,i=Yt(n,kP),a=ae({},n,{raised:o}),s=(e=>{const{classes:t}=e;return Lt({root:["root"]},BP,t)})(a);return U.jsx(LP,ae({className:or(s.root,r),elevation:o?8:void 0,ref:t,ownerState:a},i))}));"production"!==process.env.NODE_ENV&&(IP.propTypes={children:Le.node,classes:Le.object,className:Le.string,raised:ie(Le.bool,(e=>e.raised&&"outlined"===e.variant?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null)),sx:Le.oneOfType([Le.arrayOf(Le.oneOfType([Le.func,Le.object,Le.bool])),Le.func,Le.object])});var SP=IP;function HP(e){return Rt("MuiCardHeader",e)}var RP=Wt("MuiCardHeader",["root","avatar","action","content","title","subheader"]);const WP=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],FP=xo("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>ae({[`& .${RP.title}`]:t.title,[`& .${RP.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),VP=xo("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),QP=xo("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),XP=xo("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),YP=S.forwardRef((function(e,t){const n=Ao({props:e,name:"MuiCardHeader"}),{action:r,avatar:o,className:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:d}=n,p=Yt(n,WP),f=ae({},n,{component:a,disableTypography:s}),m=(e=>{const{classes:t}=e;return Lt({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},HP,t)})(f);let h=u;null==h||h.type===Xm||s||(h=U.jsx(Xm,ae({variant:o?"body2":"h5",className:m.title,component:"span",display:"block"},d,{children:h})));let g=l;return null==g||g.type===Xm||s||(g=U.jsx(Xm,ae({variant:o?"body2":"body1",className:m.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),U.jsxs(FP,ae({className:or(m.root,i),as:a,ref:t,ownerState:f},p,{children:[o&&U.jsx(VP,{className:m.avatar,ownerState:f,children:o}),U.jsxs(XP,{className:m.content,ownerState:f,children:[h,g]}),r&&U.jsx(QP,{className:m.action,ownerState:f,children:r})]}))}));"production"!==process.env.NODE_ENV&&(YP.propTypes={action:Le.node,avatar:Le.node,children:Le.node,classes:Le.object,className:Le.string,component:Le.elementType,disableTypography:Le.bool,subheader:Le.node,subheaderTypographyProps:Le.object,sx:Le.oneOfType([Le.arrayOf(Le.oneOfType([Le.func,Le.object,Le.bool])),Le.func,Le.object]),title:Le.node,titleTypographyProps:Le.object});var GP=YP;function ZP(e){return Rt("PrivateSwitchBase",e)}Wt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const UP=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],qP=xo(eu)((({ownerState:e})=>ae({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),KP=xo("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),JP=S.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:m,onBlur:h,onChange:g,onFocus:v,readOnly:A,required:y=!1,tabIndex:b,type:x,value:w}=e,j=Yt(e,UP),[C,M]=pt({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),O=ud();let z=s;O&&void 0===z&&(z=O.disabled);const T="checkbox"===x||"radio"===x,D=ae({},e,{checked:C,disabled:z,disableFocusRipple:l,edge:c}),P=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Lt({root:["root",n&&"checked",r&&"disabled",o&&`edge${$e(o)}`],input:["input"]},ZP,t)})(D);return U.jsxs(qP,ae({component:"span",className:or(P.root,i),centerRipple:!0,focusRipple:!l,disabled:z,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),O&&O.onFocus&&O.onFocus(e)},onBlur:e=>{h&&h(e),O&&O.onBlur&&O.onBlur(e)},ownerState:D,ref:t},j,{children:[U.jsx(KP,ae({autoFocus:n,checked:r,defaultChecked:a,className:P.input,disabled:z,id:T?d:void 0,name:m,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;M(t),g&&g(e,t)},readOnly:A,ref:f,required:y,ownerState:D,tabIndex:b,type:x},"checkbox"===x&&void 0===w?{}:{value:w},p)),C?o:u]}))}));"production"!==process.env.NODE_ENV&&(JP.propTypes={autoFocus:Le.bool,checked:Le.bool,checkedIcon:Le.node.isRequired,classes:Le.object,className:Le.string,defaultChecked:Le.bool,disabled:Le.bool,disableFocusRipple:Le.bool,edge:Le.oneOf(["end","start",!1]),icon:Le.node.isRequired,id:Le.string,inputProps:Le.object,inputRef:_e,name:Le.string,onBlur:Le.func,onChange:Le.func,onFocus:Le.func,readOnly:Le.bool,required:Le.bool,sx:Le.object,tabIndex:Le.oneOfType([Le.number,Le.string]),type:Le.string.isRequired,value:Le.any});var _P=JP,$P=Fi(U.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),eN=Fi(U.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),tN=Fi(U.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function nN(e){return Rt("MuiCheckbox",e)}var rN=Wt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);const oN=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],iN=xo(_P,{shouldForwardProp:e=>yo(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${$e(n.color)}`]]}})((({theme:e,ownerState:t})=>ae({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Cr("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${rN.checked}, &.${rN.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${rN.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),aN=U.jsx(eN,{}),sN=U.jsx($P,{}),lN=U.jsx(tN,{}),cN=S.forwardRef((function(e,t){var n,r;const o=Ao({props:e,name:"MuiCheckbox"}),{checkedIcon:i=aN,color:a="primary",icon:s=sN,indeterminate:l=!1,indeterminateIcon:c=lN,inputProps:u,size:d="medium",className:p}=o,f=Yt(o,oN),m=l?c:s,h=l?c:i,g=ae({},o,{color:a,indeterminate:l,size:d}),v=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e;return ae({},t,Lt({root:["root",n&&"indeterminate",`color${$e(r)}`,`size${$e(o)}`]},nN,t))})(g);return U.jsx(iN,ae({type:"checkbox",inputProps:ae({"data-indeterminate":l},u),icon:S.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:d}),checkedIcon:S.cloneElement(h,{fontSize:null!=(r=h.props.fontSize)?r:d}),ownerState:g,ref:t,className:or(v.root,p)},f,{classes:v}))}));"production"!==process.env.NODE_ENV&&(cN.propTypes={checked:Le.bool,checkedIcon:Le.node,classes:Le.object,className:Le.string,color:Le.oneOfType([Le.oneOf(["default","primary","secondary","error","info","success","warning"]),Le.string]),defaultChecked:Le.bool,disabled:Le.bool,disableRipple:Le.bool,icon:Le.node,id:Le.string,indeterminate:Le.bool,indeterminateIcon:Le.node,inputProps:Le.object,inputRef:_e,onChange:Le.func,required:Le.bool,size:Le.oneOfType([Le.oneOf(["medium","small"]),Le.string]),sx:Le.oneOfType([Le.arrayOf(Le.oneOfType([Le.func,Le.object,Le.bool])),Le.func,Le.object]),value:Le.any});var uN=cN,dN={},pN=xa;Object.defineProperty(dN,"__esModule",{value:!0});var fN=dN.default=void 0,mN=pN(Ca()),hN=U,gN=(0,mN.default)((0,hN.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"StorageOutlined");fN=dN.default=gN,exports.PermissionDefaultKeys=void 0,function(e){e.VIEW="view",e.CREATE="create",e.EDIT="edit",e.DELETE="delete"}(exports.PermissionDefaultKeys||(exports.PermissionDefaultKeys={})),B.use(k).use(L).use(w.initReactI18next).init({fallbackLng:"en",debug:!0}),exports.i18ninit=B,exports.ActionDialog=oT,exports.ApiContext=Ih,exports.ApiContextProvider=function(t){var n=e.useState({statusCode:null,dashbaordUrlPrefix:t.dashbaordUrlPrefix}),r=n[0],o=n[1],i=t.language,a=t.onLogout,s=t.baseUrl,l=t.sleepTime,c=t.dashbaordUrlPrefix;Bh.defaults.baseURL=s;var u=Ig().setErrorAlert;return Bh.interceptors.request.use((function(e){return e.headers=q(q({},e.headers),{Accept:"application/json","Content-Type":"application/json","accept-language":i,language:i}),e.withCredentials=!0,e._auth=!1!==e._auth,e}),(function(e){Promise.reject(e.request.response)})),Bh.interceptors.response.use((function(e){return J(void 0,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return l?[4,(n=l,new Promise((function(e){return setTimeout(e,n)})))]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,e]}var n}))}))}),(function(e){var t,n,r,i,s;return J(this,void 0,void 0,(function(){var l;return _(this,(function(d){return l=e.config,A.isAxiosError(e)&&401===(null===(t=e.response)||void 0===t?void 0:t.status)&&l._auth?(o({statusCode:401,dashbaordUrlPrefix:c}),a()):o({statusCode:401,dashbaordUrlPrefix:c}),403===(null===(r=null===(n=function(e){try{return JSON.parse(e)}catch(e){return null}}(e))||void 0===n?void 0:n.meta)||void 0===r?void 0:r.status)&&u(JSON.parse(e).meta.message),[2,Promise.reject(null!==(s=null===(i=e.request)||void 0===i?void 0:i.response)&&void 0!==s?s:e)]}))}))})),U.jsx(Ih.Provider,{value:r,children:t.children})},exports.AppConfigurationsContext=ug,exports.AppConfigurationsContextProvider=function(t){var n,r,o,i,a,s,l,c,u,d,p,f,m,h,g,v,A,y,b,x,w,j,C,M,O,z,T,D,P,N,E,B,k,L=e.useContext(Kh).resources,I=null==L?void 0:L.appConfigurations,S=e.useState(null!==(n=null==I?void 0:I.themeLayout)&&void 0!==n?n:"vertical"),H=S[0],R=S[1],W={loadingLoago:null!==(o=null!==(r=t.loadingLoago)&&void 0!==r?r:t.loadingLoago)&&void 0!==o?o:"",navBarLogo:null!==(a=null!==(i=t.navBarLogo)&&void 0!==i?i:t.navBarLogo)&&void 0!==a?a:"",miniNavBarLogo:null!==(l=null!==(s=t.miniNavBarLogo)&&void 0!==s?s:t.miniNavBarLogo)&&void 0!==l?l:"",loginWeclomeImage:null!==(u=null!==(c=t.loginWeclomeImage)&&void 0!==c?c:t.loginWeclomeImage)&&void 0!==u?u:"",loginLogo:null!==(p=null!==(d=t.loginLogo)&&void 0!==d?d:t.loginLogo)&&void 0!==p?p:"",loginLoginMessage:null!==(m=null!==(f=t.loginLoginMessage)&&void 0!==f?f:t.loginLoginMessage)&&void 0!==m?m:"Login to your dashboard Dashboard",textFieldSize:null!==(g=null!==(h=null==I?void 0:I.textFieldSize)&&void 0!==h?h:t.textFieldSize)&&void 0!==g?g:"small",defaultRowsPerPage:null!==(A=null!==(v=null==I?void 0:I.defaultRowsPerPage)&&void 0!==v?v:t.defaultRowsPerPage)&&void 0!==A?A:50,themeStretch:null===(b=null!==(y=null==I?void 0:I.themeStretch)&&void 0!==y?y:t.themeStretch)||void 0===b||b,palette:null!==(w=null!==(x=null==I?void 0:I.palette)&&void 0!==x?x:t.palette)&&void 0!==w?w:cg.dark,loadingLogoSxProps:null!==(C=null!==(j=null==I?void 0:I.loadingLogoSxProps)&&void 0!==j?j:t.loadingLogoSxProps)&&void 0!==C?C:{},loginWelcomeImageSxProps:null!==(O=null!==(M=null==I?void 0:I.loginWelcomeImageSxProps)&&void 0!==M?M:t.loginWelcomeImageSxProps)&&void 0!==O?O:{},navBarLogoSxProps:null!==(T=null!==(z=null==I?void 0:I.navBarLogoSxProps)&&void 0!==z?z:t.navBarLogoSxProps)&&void 0!==T?T:{},miniNavBarLogoSxProps:null!==(P=null!==(D=null==I?void 0:I.miniNavBarLogoSxProps)&&void 0!==D?D:t.miniNavBarLogoSxProps)&&void 0!==P?P:{},loginLogoSxProps:null!==(E=null!==(N=null==I?void 0:I.loginLogoSxProps)&&void 0!==N?N:t.loginLogoSxProps)&&void 0!==E?E:{},loginMessageSxProps:null!==(k=null!==(B=null==I?void 0:I.loginMessageSxProps)&&void 0!==B?B:t.loginMessageSxProps)&&void 0!==k?k:{}};return U.jsx(ug.Provider,{value:q({themeLayout:H,setThemeLayout:R},W),children:t.children})},exports.AuthContextProvider=function(t){var n=t.children,r=t.storageKey,o=e.useReducer(Vh,{user:Qh(r),isAuthenticated:!!Qh(r)}),i=o[0],a=o[1];return U.jsx(Xh.Provider,{value:q(q({},i),{login:function(e){!function(e,t){var n=JSON.stringify(e);localStorage.setItem(t,n)}(e,r),a({type:Sh.LOGIN,payload:e})},logout:function(){var e;e=r,localStorage.removeItem(e),a({type:Sh.LOGOUT})}}),children:n})},exports.AuthReducer=Vh,exports.CollapseDrawerContext=hg,exports.CollapseDrawerProvider=function(t){var n=t.children,r=os("up","lg"),o=e.useState({click:!1,hover:!1}),i=o[0],a=o[1];return e.useEffect((function(){r||a({click:!1,hover:!1})}),[r]),U.jsx(hg.Provider,{value:{isCollapse:i.click&&!i.hover,collapseClick:i.click,collapseHover:i.hover,onToggleCollapse:function(){a(q(q({},i),{click:!i.click}))},onHoverEnter:function(){i.click&&a(q(q({},i),{hover:!0}))},onHoverLeave:function(){a(q(q({},i),{hover:!1}))}},children:n})},exports.CredentialsContext=dg,exports.CredentialsContextProvider=function(e){var t=e.identityPoolId,n=e.region,r=e.userPoolId,o=e.userPoolWebClientId,i=e.bucket,a=e.googleApiKey,s=e.bucketUrl;return y.Auth.configure({Auth:{identityPoolId:t,region:n,userPoolId:r,userPoolWebClientId:o}}),y.Storage.configure({region:n,bucket:i}),U.jsx(dg.Provider,{value:{identityPoolId:t,region:n,userPoolId:r,userPoolWebClientId:o,bucket:i,googleApiKey:a,bucketUrl:s},children:e.children})},exports.DashboardLayout=PP,exports.DialogContext=fg,exports.DialogContextProvider=function(t){var n=t.children,r=e.useState(!1),o=r[0],i=r[1],a=e.useState(void 0),s=a[0],l=a[1],c=function(){i(!1)};return U.jsxs(fg.Provider,{value:{openDialog:function(e,t){i(!0),l(U.jsx(e,{open:!0,onDismiss:c,data:t}))}},children:[o&&s,n]})},exports.FormProvider=Su,exports.IdenityModelConfiguration=function(t){var n=t.path,r=t.modelRoute,o=e.useContext(Ih).dashbaordUrlPrefix;return U.jsx(Az,{path:n,isEdit:!0,Component:function(e){return U.jsx(YT,q({},e,{baseApiRoute:o,apiRoute:"".concat(o,"/").concat(r),path:n}))},modelRoute:r})},exports.Identity404=nD,exports.IdentityClient=Bh,exports.IdentityDumpServiceAction=function(t){var r,o=t.baseUrl,i=t.buttonText,a=void 0===i?"Restore Database":i,s=e.useState(!1),c=s[0],u=s[1],d=e.useState([]),p=d[0],f=d[1],m=e.useState([]),h=m[0],g=m[1],v=e.useState([]),A=v[0],y=v[1],b=Ig(),x=b.setSuccessAlert,w=b.setErrorAlert,j=e.useState(!1),C=j[0],M=j[1],O=n.useTheme(),z=function(e){return function(){var t=p.indexOf(e),n=$([],p,!0);-1===t?n.push(e):n.splice(t,1),f(n)}},T=function(e){return(t=p,n=e,t.filter((function(e){return n.includes(e)}))).length;var t,n};return U.jsxs(n.Box,{sx:{position:"relative"},children:[U.jsx(l.LoadingButton,{onClick:function(){M(!0),fetch("".concat(o,"/identity/services/models"),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}}).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(e){var t=e.data.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}));M(!1),f(t),g(t),y(t),u(!0)})).catch((function(e){console.error("There was a problem with the fetch operation:",e)}))},startIcon:U.jsx(fN,{}),loading:C,variant:"outlined",children:a}),U.jsx(n.Dialog,{open:c,onClose:function(){return u(!1)},maxWidth:"md",fullWidth:!0,children:U.jsx(Lm,{container:!0,sx:{justifyContent:"center",alignItems:"center",width:"100%",position:"relative"},children:U.jsx(Lm,{item:!0,xs:12,children:U.jsxs(SP,{sx:{width:"100%",position:"relative",overflow:"visible",display:"flex",flexDirection:"column"},children:[U.jsx(GP,{sx:{px:2,py:1,position:"sticky",top:"0px",zIndex:1e3,background:"white",borderColor:"rgba(145, 158, 171, 0.24)",borderBottomWidth:"thin",borderStyle:"solid"},title:U.jsxs(n.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,children:[U.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",version:"1.1",width:"21",height:"24",viewBox:"0 0 21 24",children:[U.jsx("defs",{children:U.jsx("clipPath",{id:"master_svg0_2_166",children:U.jsx("rect",{x:"0",y:"0",width:"21",height:"24",rx:"0"})})}),U.jsx("g",{"clip-path":"url(#master_svg0_2_166)",children:U.jsx("g",{transform:"matrix(1,0,0,-1,0,49.03125)",children:U.jsx("g",{children:U.jsx("path",{d:"M21,44.765625L21,42.515625L21,44.765625L21,42.515625Q20.9062,40.921825,17.9062,39.843725Q14.9531,38.812525,10.5,38.765625Q6.04688,38.812525,3.09375,39.843725Q0.09375,40.921825,0,42.515625L0,44.765625Q0.09375,46.359425,3.09375,47.437525Q6.04688,48.468725,10.5,48.515625Q14.9531,48.468725,17.9062,47.437525Q20.9062,46.359425,21,44.765625ZM18.4219,38.437525Q19.9219,38.953125,21,39.796825L21,35.015625Q20.9062,33.421875,17.9062,32.343745Q14.9531,31.312505,10.5,31.265625Q6.04688,31.312505,3.09375,32.343745Q0.09375,33.421875,0,35.015625L0,39.796825Q1.07812,38.953125,2.57812,38.437525Q5.85938,37.312525,10.5,37.265625Q15.1406,37.312525,18.4219,38.437525ZM0,32.296875Q1.07812,31.453125,2.57812,30.937505Q5.85938,29.812505,10.5,29.765625Q15.1406,29.812505,18.4219,30.937505Q19.9219,31.453125,21,32.296875L21,28.265625Q20.9062,26.671875,17.9062,25.593745Q14.9531,24.5625,10.5,24.515625Q6.04688,24.5625,3.09375,25.593745Q0.09375,26.671875,0,28.265625L0,32.296875Z",fill:O.palette.primary.main,"fill-opacity":"1"})})})})]}),U.jsx(n.Typography,{variant:"h4",children:"Restore Database Models"})]}),subheader:U.jsxs(n.Stack,{children:[U.jsxs(n.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[U.jsx(uN,{onClick:(r=h,function(){var e,t;T(r)===r.length?f(Lh(p,r)):f((t=r,$($([],e=p,!0),Lh(t,e),!0)))}),checked:T(p)===A.length&&0!==A.length,indeterminate:T(p)!==A.length&&0!==T(p),disabled:0===A.length,inputProps:{"aria-label":"all items selected"}}),U.jsxs(n.Typography,{variant:"subtitle2",children:[U.jsx("strong",{children:"Selected Models:"}),T(p),"/",A.length," selected"]})]}),U.jsx(PA,{placeholder:"Search models by name...",onInputChange:function(e){if(e){var t=e.toLowerCase();g(A.filter((function(e){return e.toLowerCase().includes(t)})))}else g(A)},size:"small"})]})}),U.jsx(Bp,{sx:{width:"100%",minHeight:230,bgcolor:"background.paper",overflow:"auto"},dense:!0,component:"div",role:"list",children:h.map((function(e){var t="transfer-list-all-item-".concat(e,"-label");return U.jsxs(ew,{role:"listitem",onClick:z(e),children:[U.jsx(gj,{children:U.jsx(uN,{checked:p.includes(e),tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":t}})}),U.jsx(wj,{id:t,primary:e})]},e)}))}),U.jsxs(n.Alert,{severity:"warning",sx:{mx:2},children:[U.jsx(n.AlertTitle,{children:"Warning"}),"After restoration, you will need to refresh the page for changes to take effect."]}),U.jsx(l.LoadingButton,{onClick:function(){M(!0),fetch("".concat(o,"/identity/services/dump"),{method:"POST",body:JSON.stringify({models:Lh(A,p)}),credentials:"include",headers:{"Content-Type":"application/json"}}).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(e){M(!1),u(!1),x&&x("Database restoration successful! Page will refresh in 3 sec"),setTimeout((function(){window.location.reload()}),3e3)})).catch((function(e){w&&w("'There was a problem with the database restoration operation: ".concat(e)),console.error("There was a problem with the fetch operation:",e)}))},loading:C,variant:"contained",sx:{m:2,alignSelf:"end"},disabled:C,children:"Start Restore"})]})})})})]})},exports.IdentityEdit=Az,exports.IdentityGrid=sT,exports.IdentityList=IT,exports.IdentityLoadingScreen=qh,exports.IdentityPage=function(e){var t=e.Component,r=e.LoadingSkelton,o=e.Actions,i=e.HeadingView,a=e.BreadcrumbsChildren,s=e.DefaultActions,l=e.BreadCrumbLinks;e.variant;var c=e.loading,u=e.data,d=e.taptitle,p=e.headingTitle,f=e.themeStretch,m=void 0!==f&&f;return U.jsx(ee,{title:d,children:U.jsxs(n.Container,{maxWidth:!m&&"lg",children:[!c&&U.jsx(re,{heading:p,headingView:i&&U.jsx(i,{record:u}),links:l?l(u):[],action:U.jsxs(n.Stack,{direction:"row",spacing:2,children:[o&&U.jsx(o,{record:u}),s&&U.jsx(s,{})]}),children:u&&a&&U.jsx(a,{data:u})}),c?U.jsx(n.Grid,{container:!0,alignItems:"center",children:U.jsx(r,{})},"skeleton"):t&&U.jsx(t,{data:u})]})})},exports.IdentityPalette=cg,exports.IdentityPermissionPage=function(t){var n=this,o=t.isEdit,i=r.useParams().id,a=void 0===i?"":i,s=e.useContext(Ih).dashbaordUrlPrefix,l=e.useState([]),c=l[0],u=l[1],d=e.useState(void 0),p=d[0],f=d[1],m=e.useState(!0),h=m[0],g=m[1];return e.useEffect((function(){J(n,void 0,void 0,(function(){var e,t,n,r;return _(this,(function(i){switch(i.label){case 0:return e=o?"?id=".concat(a):"",[4,Bh.get("".concat(s,"/permissions/all")+e)];case 1:return t=i.sent(),n=t.data.data.permissions,r=t.data.data.permissionGroup,u(n),f(r),g(!1),[2]}}))}))}),[]),U.jsx(U.Fragment,{children:o&&(h||0===c.length)||o&&!p?U.jsx(U.Fragment,{children:"... loading"}):U.jsx(eD,{modelPermissions:c,fetchLoading:h,isEdit:o,permissionGroup:p})})},exports.IdentityRouter=function(t){var n=t.pathsObject,o=t.HomePage,i=t.customs,a=e.useContext(Kh),s=a.resources,l=a.getResources,c=a.clearResources,u=a.state,d=e.useContext(Jh),p=d.paths,f=d.root,m=d.home,h=e.useContext(Ih),g=h.statusCode,v=h.dashbaordUrlPrefix,A=e.useState([]),y=A[0],b=A[1],x=Yh(),w=x.user,j=x.isAuthenticated,C=r.useNavigate();return e.useEffect((function(){!s&&j&&w&&l()}),[g,s,w,j,l,C,f]),e.useEffect((function(){if(s&&p&&j&&w){var e=[];if(Object.keys(p).forEach((function(e){n[e]=p[e]})),o){var t=U.jsx(r.Route,{path:"",element:U.jsx(o,{})});e.push(t)}for(var a in e.push.apply(e,i),s)if("modelParents"!==a&&"appConfigurations"!==a){var l=s[a],u=l.properties.path,d=l.properties.modelName;e.push.apply(e,[U.jsx(r.Route,{path:"".concat(u),element:U.jsx(IT,{apiRoute:"".concat(v,"/").concat(u),path:a,modelName:d},"".concat(u,".list"))}),U.jsx(r.Route,{path:"".concat(u,"/list"),element:U.jsx(IT,{apiRoute:"".concat(v,"/").concat(u),path:a,modelName:d},"".concat(u,".list"))}),U.jsx(r.Route,{path:"".concat(u,"/new"),element:U.jsx(Az,{modelRoute:"".concat(u),path:a,isEdit:!1})}),U.jsx(r.Route,{path:"".concat(u,"/:id/edit"),element:U.jsx(Az,{modelRoute:"".concat(u),path:a,isEdit:!0})}),U.jsx(r.Route,{path:"".concat(u,"/:id/show"),element:U.jsx(VT,{path:a,modelRoute:u},"".concat(u,".show"))}),U.jsx(r.Route,{path:"".concat(u,"/:id/duplicate"),element:U.jsx(Az,{modelRoute:"".concat(u),path:a,isEdit:!1,isDuplicate:!0})})])}b((function(t){return e}))}!s||j||w||c()}),[s,p,f,w,j,c]),U.jsxs(r.Routes,{children:[U.jsx(r.Route,{path:"".concat(f,"/login"),element:j?U.jsx(r.Navigate,{to:"".concat(f,"/").concat(m)}):U.jsx(xD,{})}),U.jsxs(r.Route,{element:j?U.jsx(PP,{}):U.jsx(r.Navigate,{to:"".concat(f,"/login")}),path:"".concat(f),children:$([],y,!0)}),U.jsx(r.Route,{path:"*",element:j?y.length>0&&u===exports.RequestState.SUCCEEDED?U.jsx(nD,{}):U.jsx(qh,{logoSxProps:{width:40,height:40}}):U.jsx(xD,{})})]})},exports.IdentityShow=VT,exports.IdentityShowMailLog=function(t){var r=t.record.record,o=Gh(),i=o.requestState,a=o.post,s=Ig().setSuccessAlert,c=e.useState(""),u=c[0],d=c[1],p=e.useRef(null),f=function(e){a({url:"actions/execute/send_draft_email",body:{record:q(q({},r),{to:e}),modelName:"MailLog"},onSuccess:function(e){s("Mail sent successfully")}})};return U.jsxs(n.Card,{sx:{width:"50%",margin:"auto",alignSelf:"center"},children:[U.jsx(n.CardHeader,{title:"subject: ".concat(r.subject),subheader:"To: ".concat(r.to)}),U.jsx(n.Divider,{}),U.jsx(n.CardContent,{children:U.jsx("iframe",{srcDoc:r.html,title:null==r?void 0:r._id,width:"100%",height:"620",style:{border:"none"}})}),U.jsx(n.CardActions,{sx:{justifyContent:"center",alignItems:"center",pb:2},children:U.jsxs(n.Stack,{spacing:1,width:"50%",children:[U.jsx(n.TextField,{label:"Send to",inputProps:{ref:p},size:"small",type:"email",error:!!u,helperText:u}),U.jsx(l.LoadingButton,{variant:"contained",onClick:function(){var e;(null==p?void 0:p.current.value)?(d(null),f(null===(e=null==p?void 0:p.current)||void 0===e?void 0:e.value)):d("Please type in a draft email address")},loading:i.state===exports.RequestState.LOADING,children:"Send To Selected email"}),U.jsx(n.Divider,{children:"OR"}),U.jsx(l.LoadingButton,{variant:"contained",onClick:function(){return f()},loading:i.state===exports.RequestState.LOADING,fullWidth:!0,children:"Send To Draft Email"})]})})]})},exports.JSONRichText=HM,exports.JSONRichTextShow=wM,exports.LocalizationStringForm=oy,exports.MotionLazyContainer=function(e){var t=e.children;return U.jsx(p.LazyMotion,{strict:!0,features:p.domMax,children:t})},exports.NextPreviousButtons=KM,exports.NotificationContext=mg,exports.NotificationPopover=function(){var t,o=e.useState(null),i=o[0],a=o[1],s=Rg().notifications,l=hv.isEnglish(),c=e.useContext(Ih).dashbaordUrlPrefix,u=l?DD:TD,d=e.useState(s),p=d[0],f=d[1],m=e.useState(!1),h=m[0],g=m[1],v=null==p?void 0:p.filter((function(e){return!1===e.isRead})).length,A=r.useNavigate();e.useEffect((function(){f(s)}),[s]);var y=function(e){var t,n;a(null),Bh.post("".concat(c,"/notifications/markAsRead/").concat(e.id)),f(null==p?void 0:p.map((function(t){return t.id===e.id?q(q({},t),{isRead:!0}):q({},t)}))),e.redirectUrlType===LD.INTERNAL?A(null!==(t=e.redirectUrl)&&void 0!==t?t:"/"):e.redirectUrlType===LD.EXTERNAL&&window.open(null!==(n=e.redirectUrl)&&void 0!==n?n:"/")},b=h?p:null==p?void 0:p.slice(0,4);return U.jsxs(U.Fragment,{children:[U.jsx(wD,{color:i?"primary":"default",onClick:function(e){a(e.currentTarget)},sx:{width:40,height:40},children:U.jsx(n.Badge,{badgeContent:v,color:"error",children:U.jsx(To,{icon:"eva:bell-fill"})})}),U.jsxs(ND,{open:i,onClose:function(){a(null)},sx:{width:360,p:0},children:[U.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",py:2,px:2.5},children:[U.jsxs(n.Box,{sx:{flexGrow:1},children:[U.jsx(n.Typography,{variant:"subtitle1",children:u.notifications}),U.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:"".concat(u.youHave," ").concat(null!=v?v:0," ").concat(u.unreadMessages)})]}),v&&v>0&&U.jsx(n.Tooltip,{title:" Mark all as read",children:U.jsx(n.IconButton,{color:"primary",onClick:function(){Bh.post("".concat(c,"/notifications/markAllAsRead")),f(null==p?void 0:p.map((function(e){return q(q({},e),{isRead:!0})})))},children:U.jsx(To,{icon:"eva:done-all-fill"})})})]}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),U.jsx(n.Paper,{style:{minHeight:200,maxHeight:400,overflow:"auto"},children:U.jsx(n.List,{disablePadding:!0,children:null==b?void 0:b.map((function(e){return U.jsx(FD,{notification:e,onClickNotification:y},e.id)}))})}),U.jsx(n.Divider,{sx:{borderStyle:"dashed"}}),(null!==(t=null==p?void 0:p.length)&&void 0!==t?t:0)>4&&U.jsx(n.Box,{sx:{p:1},children:U.jsx(n.Button,{fullWidth:!0,disableRipple:!0,onClick:function(){return g(!h)},children:h?u.showLess:u.showMore})})]})]})},exports.NotificationsContextProvider=function(t){var n=t.notificationsUrl,r=Gh(),o=r.requestState,i=r.get,a=r.revertToIdle,s=Gh().post,l=Gh().post;e.useEffect((function(){c()}),[]);var c=e.useCallback((function(){i({url:n})}),[]),u=e.useCallback((function(e){s({url:"".concat(n,"/markAsRead/").concat(e)})}),[]),d=e.useCallback((function(){l({url:"".concat(n,"/markAllAsRead")})}),[]);return U.jsx(mg.Provider,{value:{notifications:o.data,getNotifications:c,state:o.state,clearNotifications:function(){a()},markOneRead:u,markAllAsRead:d},children:t.children})},exports.PathsContext=Jh,exports.PathsContextProvider=function(t){var n=t.root,r=t.children,o=t.home,i=e.useContext(Kh).resources,a={},s=function(e){if("modelParents"===e||"appConfigurations"===e)return"continue";var t=i[e].properties.path;a[e]={root:_h(n,"/"+t),list:_h(n,"/"+t+"/list"),edit:function(e){return _h(n,"/"+t+"/".concat(e,"/edit"))},show:function(e){return _h(n,"/"+t+"/".concat(e,"/show"))},duplicate:function(e){return _h(n,"/"+t+"/".concat(e,"/duplicate"))},new:_h(n,"/"+t+"/new")}};for(var l in i)s(l);return U.jsx(Jh.Provider,{value:{paths:a,root:n,home:o},children:r})},exports.RHFCheckbox=Na,exports.RHFCreatableSelect=function(){var e=S.useState(null);e[0],e[1];var t=S.useState(null);t[0];var n=t[1];return U.jsx(jm,{multiple:!0,onChange:function(e,t){"string"==typeof t?n((function(e){return $($([],null!=e?e:[],!0),[{title:t}],!1)})):t&&t.length>0&&t[t.length-1].inputValue?n((function(e){var n;return $($([],null!=e?e:[],!0),[{title:null!==(n=t[t.length-1].inputValue)&&void 0!==n?n:""}],!1)})):n((function(e){return $($([],null!=e?e:[],!0),[{title:"".concat(t)}],!1)}))},filterOptions:function(e,t){var n=Gg(e,t),r=t.inputValue,o=e.some((function(e){return r===e.title}));return""===r||o||n.push({inputValue:r,title:'Add "'.concat(r,'"')}),n},selectOnFocus:!0,clearOnBlur:!0,handleHomeEndKeys:!0,id:"free-solo-with-text-demo",options:Zg,getOptionLabel:function(e){return"string"==typeof e?e:e.inputValue?e.inputValue:e.title},renderOption:function(e,t){return U.jsx("li",q({},e,{children:t.title}))},sx:{width:300},freeSolo:!0,renderInput:function(e){return U.jsx(Qf,q({},e,{label:"Free solo with text demo"}))}})},exports.RHFDatePicker=ad,exports.RHFEditor=Xu,exports.RHFGooglePlaces=Yg,exports.RHFGroupedTextFields=function(t){var r=t.title,o=t.applyAllMessage,i=t.fields,a=t.errorMessage;K(t,["title","applyAllMessage","fields","errorMessage"]);var s=c.useFormContext(),l=s.watch,u=s.setValue,d=s.getValues,p=e.useState(!1),f=p[0],m=p[1],h=l(i[0].name);return e.useEffect((function(){f&&i.forEach((function(e,t){0!=t&&u(e.name,d(i[0].name))}))}),[f,h]),U.jsxs(n.Card,{sx:{backgroundColor:"#FBFBFB",px:2,pb:2},children:[U.jsx(n.Typography,{variant:"body2",color:"error",sx:{mt:2},children:null!=a?a:""}),U.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",mt:1,children:[U.jsx(n.Typography,{variant:"subtitle1",children:null!=r?r:""}),U.jsxs(n.Stack,{direction:"row",alignItems:"center",children:[U.jsx(n.Checkbox,{sx:{"&.Mui-checked":{color:"#0094FF"}},onChange:function(e,t){return m(t)},inputProps:{"aria-label":"controlled"}}),U.jsx(n.Typography,{variant:"body2",children:o})]})]}),U.jsx(n.Stack,{spacing:3,mt:2,children:i.map((function(e,t){return U.jsx(Yu,{name:e.name,label:e.label,type:"number",InputProps:{startAdornment:U.jsx(n.InputAdornment,{position:"start",children:"$"})},disabled:f&&0!==t},e._id)}))})]})},exports.RHFLazySelect=id,exports.RHFMultiCheckbox=function(e){var t=e.name,r=e.options,o=K(e,["name","options"]),i=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:i,render:function(e){var t=e.field;return U.jsx(n.FormGroup,{children:r.map((function(e){return U.jsx(n.FormControlLabel,q({control:U.jsx(n.Checkbox,{checked:t.value.includes(e.value),onChange:function(){return t.onChange(function(e){return t.value.includes(e)?t.value.filter((function(t){return t!==e})):$($([],t.value,!0),[e],!1)}(e.value))}}),label:e.label},o),e.value)}))})}})},exports.RHFRadioGroup=Ug,exports.RHFSelect=Gu,exports.RHFTagsField=function(t){var r=t.name,o=t.multiple,i=t.size,a=t.isList,s=void 0!==a&&a,l=K(t,["name","multiple","size","isList"]),u=c.useFormContext().control,d=e.useState(!1)[0];return U.jsx(c.Controller,{name:r,control:u,render:function(e){var t=e.field,a=e.fieldState.error;return U.jsx(n.Autocomplete,q({disableClearable:!0,freeSolo:!0,fullWidth:l.fullWidth,sx:q(q({},l.sx),{"& .MuiAutocomplete-inputRoot":{alignItems:"flex-end",whiteSpace:"pre-line"},"& .MuiAutocomplete-input":{minWidth:"100%"}})},t,{disableCloseOnSelect:o,id:r,size:i,open:d,disabled:l.disabled,clearIcon:!1,options:[],multiple:!0,onChange:function(e,n){t.onChange(n.map((function(e){return e})))},renderTags:function(e,r){return s?U.jsx(n.List,{disablePadding:!0,dense:!0,children:null==e?void 0:e.map((function(r){return U.jsxs(n.ListItem,{disablePadding:!0,disableGutters:!0,children:[U.jsx(n.ListItemIcon,{children:U.jsx(Jg,{color:"primary",sx:{width:10}})}),U.jsx(n.ListItemText,{primary:U.jsx(n.Typography,{variant:"body2",children:r})}),U.jsx(n.ListItemIcon,{sx:{width:24},children:U.jsx(n.IconButton,{onClick:function(){return t.onChange(e.filter((function(e){return e!==r})))},children:U.jsx(av,{color:"error",sx:{width:24}})})})]},r)}))}):e.map((function(e,t){return U.jsx(n.Chip,q({size:"small",label:e},r({index:t})))}))},renderInput:function(e){var t,r,o,i,s;return U.jsx(n.TextField,q({label:"Add Tags"},e,l,{error:!!a,helperText:null!==(i=null!==(t=null==a?void 0:a.message)&&void 0!==t?t:null===(o=null===(r=Object(a))||void 0===r?void 0:r._id)||void 0===o?void 0:o.message)&&void 0!==i?i:l.helperText,inputProps:q(q(q({},e.inputProps),l.inputProps),{style:q(q(q({},e.inputProps.style),null===(s=l.inputProps)||void 0===s?void 0:s.style),{width:"100%"})})}))}}))}})},exports.RHFTextField=Yu,exports.RHFUploadAvatar=Iu,exports.RHFUploadFileButton=function(t){var r=t.name,o=t.buttonSx,i=t.loading,a=K(t,["name","buttonSx","loading"]),s=c.useFormContext().control,u=e.useRef(null),d=function(){if(u.current){var e=u.current.querySelector('input[type="file"]');e&&e.click()}};return U.jsx(c.Controller,{name:r,control:s,render:function(e){var t=e.field.value,r=e.fieldState.error,s=!!r&&!t;return U.jsxs("div",{children:[U.jsx("div",{ref:u,children:U.jsx(Tu,q({file:t,error:s,helperText:s&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:r.message}),sx:{display:"none"}},a))}),U.jsx(l.LoadingButton,{loading:i,onClick:d,sx:o,children:"Upload File"})]})}})},exports.RHFUploadFileButton2=function(t){var r=t.name,o=t.helperText,i=t.loading,a=K(t,["name","helperText","loading"]),s=c.useFormContext().control,u=e.useRef(null),d=function(){if(u.current){var e=u.current.querySelector('input[type="file"]');e&&e.click()}};return U.jsx(c.Controller,{name:r,control:s,render:function(e){var t=e.field.value,r=e.fieldState.error,s=!!r&&!t;return U.jsxs("div",{children:[U.jsx("div",{ref:u,children:U.jsx(Tu,q({file:t,error:s,helperText:s&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:r.message}),sx:{display:"none"}},a))}),U.jsx(l.LoadingButton,{startIcon:U.jsx(Lu,{src:"/assets/icons/UploadFile.svg"}),variant:"outlined",onClick:d,loading:i,sx:{height:"40px",border:0,":hover":{border:0},width:"160px"},children:U.jsx(n.Typography,{fontWeight:600,fontSize:"16px",sx:{color:"#000",textDecoration:"underline",textUnderlineOffset:"4px"},children:"Upload File"})}),s?U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:r.message}):o&&o]})}})},exports.RHFUploadImage=function(e){var t=e.name,r=K(e,["name"]),o=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:o,render:function(e){var t=e.field,o=e.fieldState.error,i=!!o&&!t.value;return U.jsx(Eu,q({accept:{"image/*":[".jpeg",".png"]},file:t.value,error:i,helperText:i&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:o.message})},r))}})},exports.RHFUploadMultiFile=function(e){var t=e.name,r=K(e,["name"]),o=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:o,render:function(e){var t,o=e.field,i=e.fieldState.error,a=!!i&&0===(null===(t=o.value)||void 0===t?void 0:t.length);return U.jsx(Au,q({accept:{"image/*":[".jpeg",".png"]},files:o.value,error:a,helperText:a&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:null==i?void 0:i.message})},r))}})},exports.RHFUploadSingleFile=function(e){var t=e.name,r=e.contentText,o=K(e,["name","contentText"]),i=c.useFormContext().control;return U.jsx(c.Controller,{name:t,control:i,render:function(e){var t=e.field,i=e.fieldState.error,a=!!i&&!t.value;return U.jsx(Tu,q({accept:{"image/*":[".jpeg",".png"]},file:t.value,error:a,helperText:a&&U.jsx(n.FormHelperText,{error:!0,sx:{px:2},children:i.message}),Content:U.jsxs(n.Stack,{direction:"column",justifyContent:"center",alignItems:"center",width:"100%",spacing:1,children:[U.jsx(ka,{sx:{color:"#6D6D6D"}}),U.jsx(n.Typography,{color:"#6D6D6D",fontSize:"14px",children:null!=r?r:"Upload File"})]})},o))}})},exports.ResourcesContext=Kh,exports.ResourcesContextProvider=function(t){var n,r=t.resourcesUrl,o=t.laodingLogo,i=t.logoSxProps,a=Gh(),s=a.requestState,l=a.get,c=a.revertToIdle,u=Yh().isAuthenticated;e.useEffect((function(){u&&d()}),[u]);var d=e.useCallback((function(){l({url:r})}),[]);return U.jsx(Kh.Provider,{value:{resources:null===(n=s.data)||void 0===n?void 0:n.resources,getResources:d,state:s.state,clearResources:function(){c()},loadingLogo:o,logoSxProps:i},children:!u||s.state!==exports.RequestState.LOADING&&s.state!==exports.RequestState.IDLE?t.children:U.jsx(qh,{loadingLogo:o,logoSxProps:i})})},exports.SettingsContext=Eg,exports.SettingsProvider=function(t){var n=t.children,r=function(t,n){var r=e.useState((function(){var e=localStorage.getItem(t);return null===e?n:JSON.parse(e)})),o=r[0],i=r[1];return e.useEffect((function(){var e=function(e){e.storageArea===localStorage&&e.key===t&&i(e.newValue?JSON.parse(e.newValue):e.newValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}}),[t,n]),[o,function(e){i((function(n){var r="function"==typeof e?e(n):e;return localStorage.setItem(t,JSON.stringify(r)),r}))}]}("settings",{themeMode:Ng.themeMode,themeLayout:Ng.themeLayout,themeStretch:Ng.themeStretch,themeContrast:Ng.themeContrast,themeDirection:Ng.themeDirection,themeColorPresets:Ng.themeColorPresets}),o=r[0],i=r[1],a="ar"===localStorage.getItem("i18nextLng");e.useEffect((function(){a&&l("ar")}),[a]);var s,l=function(e){i(q(q({},o),{themeDirection:"ar"===e?"rtl":"ltr"}))};return U.jsx(Eg.Provider,{value:q(q({},o),{onToggleMode:function(){i(q(q({},o),{themeMode:"light"===o.themeMode?"dark":"light"}))},onChangeMode:function(e){i(q(q({},o),{themeMode:e.target.value}))},onToggleDirection:function(){i(q(q({},o),{themeDirection:"rtl"===o.themeDirection?"ltr":"rtl"}))},onChangeDirection:function(e){i(q(q({},o),{themeDirection:e.target.value}))},onChangeDirectionByLang:l,onToggleLayout:function(){i(q(q({},o),{themeLayout:"vertical"===o.themeLayout?"horizontal":"vertical"}))},onChangeLayout:function(e){i(q(q({},o),{themeLayout:e.target.value}))},onChangeContrast:function(e){i(q(q({},o),{themeContrast:e.target.value}))},onToggleContrast:function(){i(q(q({},o),{themeContrast:"default"===o.themeContrast?"bold":"default"}))},onToggleStretch:function(){i(q(q({},o),{themeStretch:!o.themeStretch}))},onChangeColor:function(e){i(q(q({},o),{themeColorPresets:e.target.value}))},setColor:(s=o.themeColorPresets,{purple:Ag,cyan:yg,blue:bg,orange:xg,red:wg,default:vg}[s]),colorOption:gg.map((function(e){return{name:e.name,value:e.main}})),onResetSetting:function(){i({themeMode:Ng.themeMode,themeLayout:Ng.themeLayout,themeStretch:Ng.themeStretch,themeContrast:Ng.themeContrast,themeDirection:Ng.themeDirection,themeColorPresets:Ng.themeColorPresets})}}),children:n})},exports.ShowRecord=FT,exports.SnackAlertContext=pg,exports.SnackAlertProvider=function(t){var r,o=t.children,i=e.useState({state:!1}),a=i[0],s=i[1],l=function(e,t,n,r){setTimeout((function(){s({state:!1})}),r||4e3),s({state:!0,message:e,severity:t,position:n})};return U.jsxs(pg.Provider,{value:{setAlert:l,setErrorAlert:function(e,t,n){l(e,"error",t,n)},setSuccessAlert:function(e,t,n){l(e,"success",t,n)}},children:[a.state&&U.jsx(n.Snackbar,{open:a.state,anchorOrigin:null!==(r=a.position)&&void 0!==r?r:{horizontal:"center",vertical:"top"},children:U.jsx(n.Alert,{onClose:function(){s({state:!1})},severity:a.severity,children:a.message})}),o]})},exports.State=kh,exports.SvgIconStyle=Lu,exports.ThemeProvider=function(t){var r=t.children,o=Fg(),i=o.themeMode,a=o.themeDirection,s=Bg().palette,l="light"===i,c=ho(e.useMemo((function(){return{palette:s,typography:iD,breakpoints:aD,shape:{borderRadius:8},direction:a,shadows:l?hD.light:hD.dark,customShadows:l?mD.light:mD.dark}}),[l,a,s]));return c.components=cD(c),U.jsx(Vt,{injectFirst:!0,children:U.jsxs(jo,{theme:c,children:[U.jsx(n.CssBaseline,{}),r]})})},exports.ThemeSettings=function(t){var n=t.children;return U.jsx(e.Suspense,{fallback:U.jsx(U.Fragment,{}),children:U.jsx(EP,{children:U.jsx(NP,{children:n})})})},exports.UniqueFieldHelper=FA,exports.checkPermission=function(e,t){var n=e.properties,r=e.permissions,o=n.modelName,i=Bu.lowerCaseFirstLetter(o),a="".concat(i,"_").concat(t);return!r||r[a]},exports.fCurrency=function(e){return Xa(e?d(e).format("$0,0.00"):"",".00")},exports.fData=Qa,exports.fNumber=function(e){return d(e).format()},exports.fPercent=function(e){return Xa(e?d(Number(e)/100).format("0.0%"):"",".0")},exports.fShortenNumber=function(e){return Xa(e?d(e).format("0.00a"):"",".00")},exports.getFilterValues=QA,exports.getUrlFilters=VA,exports.path=_h,exports.useApi=Gh,exports.useAppConfigurations=Bg,exports.useAuth=Yh,exports.useCredentials=Lg,exports.useDialogs=Hg,exports.useLocales=Vg,exports.useNavData=$h,exports.useNotifications=Rg,exports.usePaths=Sg,exports.useResources=kg,exports.useSettings=Fg,exports.useSnackAlert=Ig;