PageSourceSearch

https://vantage.lu/_next/static/chunks/pages/admin/[org_id]-24c59d5a8d0ca2d2.js

js vantage.lu collected 2026-10-08 14:31:05 UTC 262,248 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6381],{15764:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[org_id]",function(){return n(68002)}])},68002:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return i},default:function(){return o}});var r=n(85893),a=n(65972),i=!0;function o(e){return(0,r.jsx)(a.Z,{eventDetails:e.eventDetails,mongoData:e.mongoData,permission:"dba"})}},76086:function(e,t,n){"use strict";n.d(t,{Z:function(){return ke}});var r=n(85893),a=n(67294),i=n(35666),o=n.n(i),s=n(96486),l=n.n(s),c=(n(11163),n(12461)),u=n(17054),d=n(68863),m=n(56266),f=n(94594),h=n(71577),p=n(45605),g=n(50888),v=(0,n(5152).default)((function(){return Promise.all([n.e(5714),n.e(1876),n.e(3829)]).then(n.t.bind(n,21288,23))}),{loadableGenerated:{webpack:function(){return[21288]},modules:["../site-components/editors/AbtEditor.js -> suneditor-react"]},ssr:!1}),y=function(e){return(0,r.jsx)(v,{defaultValue:e.editor,onChange:e.change,placeholder:"Description...",setDefaultStyle:"height: 180px; font-size: 15px;",setOptions:{buttonList:[["bold","italic","underline","strike","blockquote"],["link"]],tagsBlacklist:"style|h1|h2|h3|h4|h5|h6|hr|pre|ol|ul|li|div|var|ins|strike|del|code|svg|path|details|summary|figure|figcaption|img|iframe|audio|video|table|thead|tbody|tr|th|td|script",attributesBlacklist:{all:"style|class|id|contenteditable|colspan|rowspan|target|href|download|rel|src|alt|type|controls|data-format|data-size|data-file-size|data-file-name|data-origin|data-align|data-image-link|data-rotate|data-proportion|data-percentage|origin-size|data-exp|data-font-size"},defaultTag:"p",pasteTagsBlacklist:"a|abbr|address|area|article|aside|audio|b|base|bdi|bdo|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|h1,|head|header|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|main|map|mark|meta|meter|nav|noscript|object|ol|optgroup|option|output|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|u|ul|var|video|wbr",resizeEnable:!1,showPathLabel:!1,linkTargetNewWindow:!0,popupDisplay:"local",stickyToolbar:-1,maxCharCount:5e3,charCounterLabel:"count:"}})},x=n(52732),b=n(11569),E=n.n(b);function j(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function D(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){j(i,r,a,o,s,"next",e)}function s(e){j(i,r,a,o,s,"throw",e)}o(void 0)}))}}function P(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function A(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){A(i,r,a,o,s,"next",e)}function s(e){A(i,r,a,o,s,"throw",e)}o(void 0)}))}}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function k(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var B=n(8193),L=n(27049),Z=n(89583);function R(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){R(i,r,a,o,s,"next",e)}function s(e){R(i,r,a,o,s,"throw",e)}o(void 0)}))}}function U(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){U(e,t,n[t])}))}return e}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function z(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var F=n(40280),V=n(32808),G=n(48761),q=n(37306),H=n(89505),Y=(n(25675),[{image_url:"https://cdn2.allevents.in/transup/5c/7d2b8d96ce433fa453ea7192f97b62/img1.jpg",categories:[]},{image_url:"https://cdn2.allevents.in/transup/99/bcd9678c33434f8440f9fcaac23ebc/img2.jpg",categories:[]},{image_url:"https://cdn2.allevents.in/transup/8e/842f48a6aa4c00b6dc2ecee51d622b/img3.jpg",categories:[]},{image_url:"https://cdn2.allevents.in/transup/b6/8922d04bf7413baa2ea1fd7364fbbc/img4.jpg",categories:[]},{image_url:"https://cdn2.allevents.in/transup/9c/8aa446262f4d2ca4955aa29642d035/img5.jpg",categories:[]},{image_url:"https://cdn2.allevents.in/transup/37/195a010e404cd1ac6dd540ec82bab9/img6.jpg",categories:[]},{image_url:"https://cdn2.allevents.in/transup/70/e50735f0c54235b7c0aae92094caba/rob-laughter-WW1jsInXgwM-unsplash.jpg",meta:{width:1400,height:603,date_file_modified:"2022/06/11 11:37:05 GMT",aspect_ratio:2.322,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#5d040b"},categories:["performances","theatre","open-mic"]},{image_url:"https://cdn2.allevents.in/transup/c3/e1e1fa80a24a53b99443c1a309f0d5/elena-mozhvilo-E00p5ySEHmM-unsplash.jpg",meta:{width:1400,height:687,date_file_modified:"2022/06/11 11:37:05 GMT",aspect_ratio:2.038,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#7e5e3f"},categories:["art","crafts","drawing-painting"]},{image_url:"https://cdn2.allevents.in/transup/13/63d4e9af334f6883347a4a81e7dc92/pexels-pixabay-45258.jpg",meta:{width:1400,height:710,date_file_modified:"2022/06/11 11:37:05 GMT",aspect_ratio:1.972,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#1e1630"},categories:["dance","performances","theatre"]},{image_url:"https://cdn2.allevents.in/transup/ec/b53e48889c46feaf87beb98e4984c9/pexels-donald-tong-109669.jpg",meta:{width:1400,height:731,date_file_modified:"2022/06/11 11:37:05 GMT",aspect_ratio:1.915,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#482622"},categories:["performances","theatre","workshops","business","conferences"]},{image_url:"https://cdn2.allevents.in/transup/e3/e8734d91bb400f9495150d9ce3a5f1/greg-rakozy-oMpAz-DN-9I-unsplash.jpg",meta:{width:1400,height:743,date_file_modified:"2022/06/11 11:37:46 GMT",aspect_ratio:1.884,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#513f33"},categories:["photography","art"]},{image_url:"https://cdn2.allevents.in/transup/14/566229cc74490fbe46573ef848
10ad5/group-young-people-sitting-sukhasana.jpg",meta:{width:1397,height:700,date_file_modified:"2022/06/11 11:37:49 GMT",aspect_ratio:1.996,orientation:"Horizontal (normal)",has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#7f756d"},categories:["health-wellness","yoga","international-yoga-day","meditation","workshops"]},{image_url:"https://cdn2.allevents.in/transup/1d/7660bf3342427cb495b033aebd2c3b/bowl-fresh-green-salad-hold-female-hands.jpg",meta:{width:1400,height:933,date_file_modified:"2022/06/11 11:37:49 GMT",aspect_ratio:1.501,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#97917f"},categories:["food-truck-festivals","health-wellness","food-drinks"]},{image_url:"https://cdn2.allevents.in/transup/49/15b86d4267463f93c1c15424a2aa33/simon-berger-twukN12EN7c-unsplash.jpg",meta:{width:1400,height:900,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:1.556,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#b49884"},categories:["photography","trekking","trips-adventures"]},{image_url:"https://cdn2.allevents.in/transup/2f/a537f379ec41fc8fce7ef36cea1ca1/beautiful-young-sporty-couple-workout-gym-together-caucasian-man-training-with-female-trainer.jpg",meta:{width:1394,height:674,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:2.068,orientation:"Horizontal (normal)",has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#363a43"},categories:["health-wellness"]},{image_url:"https://cdn2.allevents.in/transup/31/0df06f86c642429be711ce92aadbbb/conscious-design-VsI_74zRzAo-unsplash.jpg",meta:{width:1400,height:739,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:1.894,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#8e7865"},categories:["spiritual","health-wellness","workshops"]},{image_url:"https://cdn2.allevents.in/transup/fd/08dc99d70a4789a6a2cd8acef5ec56/kaylee-garrett-GaprWyIw66o-unsplash.jpg",meta:{width:1400,height:697,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:2.009,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#9c9fa1"},categories:["health-wellness","yoga","international-yoga-day","workshops"]},{image_url:"https://cdn2.allevents.in/transup/f8/37723737054adb9b289b1bd71dd7cc/alejandro-pinero-amerio-KBn4-lyqRgQ-unsplash.jpg",meta:{width:1400,height:741,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:1.889,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#8aa1a5"},categories:[]},{image_url:"https://cdn2.allevents.in/transup/97/ef2ffdc8f444da9934caf98bd27056/mikita-karasiou-mMzVTy2V1Do-unsplash.jpg",meta:{width:1400,height:730,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:1.918,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#6c8080"},categories:["health-wellness","yoga","international-yoga-day"]},{image_url:"https://cdn2.allevents.in/transup/03/602e25777f47529166c621bb740287/marek-piwnicki-i2zXNfNgi4U-unsplash.jpg",meta:{width:1400,height:654,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:2.141,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#3f3639"},categories:["photography","yoga","health-wellness"]},{image_url:"https://cdn2.allevents.in/transup/cb/a040a06a724ff79f53966c5dd5ce79/elia-pellegrini-VokN6qsZyOk-unsplash.jpg",meta:{width:1400,height:611,date_file_modified:"2022/06/11 11:37:50 GMT",aspect_ratio:2.291,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#bd7c56"},categories:["photography"]},{image_url:"https://cdn2.allevents.in/transup/a5/333c282ed14ebbbba6ad79ed4b4ae8/rhondak-native-florida-folk-artist-_Yc7OtfFn-0-unsplash.jpg",meta:{width:1400,height:918,date_file_modified:"2022/06/11 11:37:51 GMT",aspect_ratio:1.525,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#676063"},categories:["art","crafts","drawing-painting"]},{image_url:"https://cdn2.allevents.in/transup/1d/be764f78724f8ebe33576aa7821c20/close-up-microphone-concert-stage-with-beautiful-lighting.jpg",meta:{width:1400,height:817,date_file_modified:"2022/06/11 11:38:28 GMT",aspect_ratio:1.714,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#3c3c58"},categories:["performances","theatre","open-mic","music","entertainment","live-music"]},{image_url:"https://cdn2.allevents.in/transup/30/21acd3b8314c09a995b2676b4f196d/priscilla-du-preez-Q7wGvnbuwj0-unsplash-.jpg",meta:{width:1400,height:933,date_file_modified:"2022/06/11 11:38:28 GMT",aspect_ratio:1.501,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#897c70"},categories:["performances","open-mic"]},{image_url:"https://cdn2.allevents.in/transup/51/ae5c7753754f9293f0ffe288bb912a/matty-adame-nLUb9GThIcg-unsplash.jpg",meta:{width:1400,height:671,date_file_modified:"2022/06/11 11:38:54 GMT",aspect_ratio:2.086,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#6f6
1d8e"},categories:["music","entertainment","parties"]},{image_url:"https://cdn2.allevents.in/transup/ac/9c7f5ba810408da44e6cc3b111d8c3/al-elmes-ULHxWq8reao-unsplash.jpg",meta:{width:1400,height:764,date_file_modified:"2022/06/11 11:38:55 GMT",aspect_ratio:1.832,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#6c5c49"},categories:["parties"]},{image_url:"https://cdn2.allevents.in/transup/41/39627f0cea41cda09c7fcfa8dd7407/camera-g487cd6374_1920.jpg",meta:{width:1400,height:1050,date_file_modified:"2022/06/11 11:38:55 GMT",aspect_ratio:1.333,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#6d5c4f"},categories:["photography"]},{image_url:"https://cdn2.allevents.in/transup/5f/66ee5df1ed4502867889354ec89d5a/audience-gcbc5f6668_1920.jpg",meta:{width:1400,height:731,date_file_modified:"2022/06/11 11:38:55 GMT",aspect_ratio:1.915,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#724d44"},categories:["music","entertainment","parties"]},{image_url:"https://cdn2.allevents.in/transup/95/67a53be0ed4a17bdcd8c7926c8f6e8/aditya-chinchure-ZhQCZjr9fHo-unsplash.jpg",meta:{width:1400,height:776,date_file_modified:"2022/06/11 11:38:55 GMT",aspect_ratio:1.804,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#30577b"},categories:["music","entertainment","parties"]},{image_url:"https://cdn2.allevents.in/transup/95/9b4795fcc2437dacc1cfeddf869fb0/colin-lloyd-5TGwSC4dHOU-unsplash.jpg",meta:{width:1400,height:933,date_file_modified:"2022/06/11 11:38:55 GMT",aspect_ratio:1.501,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#65544e"},categories:["music","entertainment","parties"]},{image_url:"https://cdn2.allevents.in/transup/70/9019f89a274a2b88c25ccc0b71f69e/maarten-van-den-heuvel-EzH46XCDQRY-unsplash.jpg",meta:{width:1400,height:860,date_file_modified:"2022/06/11 11:41:08 GMT",aspect_ratio:1.628,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#957e63"},categories:["food-truck-festivals","food-drinks"]},{image_url:"https://cdn2.allevents.in/transup/a5/4039a7d4fe471a9a763dd9408f28d6/jason-goodman-Oalh2MojUuk-unsplash.jpg",meta:{width:1400,height:933,date_file_modified:"2022/06/11 11:41:11 GMT",aspect_ratio:1.501,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#aca29a"},categories:["business"]},{image_url:"https://cdn2.allevents.in/transup/72/297753fc7f4f0d8928c3be168e4bfe/charles-forerunner-3fPXt37X6UQ-unsplash.jpg",meta:{width:1400,height:732,date_file_modified:"2022/06/11 11:41:11 GMT",aspect_ratio:1.913,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#5f6062"},categories:["business"]},{image_url:"https://cdn2.allevents.in/transup/62/ad9ddf452f40d19c133b8f5776cec1/md-duran-rE9vgD_TXgM-unsplash.jpg",meta:{width:1400,height:699,date_file_modified:"2022/06/11 11:41:11 GMT",aspect_ratio:2.003,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#6a6260"},categories:["business","music"]},{image_url:"https://cdn2.allevents.in/transup/e2/6006dedd6c4056b579a4a90fab1936/pexels-david-egon-2240361.jpg",meta:{width:1400,height:726,date_file_modified:"2022/06/11 11:41:11 GMT",aspect_ratio:1.928,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#2c2122"},categories:["food-truck-festivals","food-drinks"]},{image_url:"https://cdn2.allevents.in/transup/be/8777a123c84c52b79b11c3575ba0e9/amelie-mourichon-wusOJ-2uY6w-unsplash.jpg",meta:{width:1400,height:766,date_file_modified:"2022/06/11 11:41:11 GMT",aspect_ratio:1.828,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#bdb3a6"},categories:["business"]},{image_url:"https://cdn2.allevents.in/transup/32/de61f2586440c3abbff3ee852cc99a/alexandre-pellaes-6vAjp0pscX0-unsplash.jpg",meta:{width:1400,height:757,date_file_modified:"2022/06/11 11:41:11 GMT",aspect_ratio:1.849,has_clipping_path:!1,frame_count:1,colorspace:"sRGB",has_transparency:!1,average_color:"#312925"},categories:["workshops","business","webinar"]}]);function J(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){J(i,r,a,o,s,"next",e)}function s(e){J(i,r,a,o,s,"throw",e)}o(void 0)}))}}function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Q(e,t,n[t])}))}return e}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function te(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ne=n(68157),re=n(40655),ae=n(71669),ie=n(10808),oe=n(63750),se=n(25934),le=n(53990);function ce(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function _e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){ce(i,r,a,o,s,"next",e)}function s(e){ce(i,r,a,o,s,"throw",e)}o(void 0)}))}}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ue(e,t,n[t])}))}return e}function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function fe(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function he(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function pe(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){he(i,r,a,o,s,"next",e)}function s(e){he(i,r,a,o,s,"throw",e)}o(void 0)}))}}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ge(e,t,n[t])}))}return e}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function xe(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n(19942),n(57894),n(34911);function be(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function Ee(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){be(i,r,a,o,s,"next",e)}function s(e){be(i,r,a,o,s,"throw",e)}o(void 0)}))}}function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){je(e,t,n[t])}))}return e}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Me(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Oe(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function we(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Oe(i,r,a,o,s,"next",e)}function s(e){Oe(i,r,a,o,s,"throw",e)}o(void 0)}))}}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ae(e,t,n[t])}))}return e}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ie(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Se={about:function(e){var t=function(e){b((function(e){return w(e).concat([n._id])}));var t=M({},n);l().merge(t,e),T(t);var r=M({},i);s(r)},n=e.items,i=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,_=e.saveModule,v=e.changeArr,b=e.setChangeArr,j=e.globalSave,P=e.checkNew,A=(0,a.useState)(n),C=A[0],T=A[1],I=(0,a.useState)(C.active),S=I[0],k=I[1],B=(0,a.useState)(!1),L=B[0],Z=B[1],R=function(e){Z(!1);(0,x.WX)(e).length;11===e?c.ZP.error({content:"Description is required",duration:2.5,style:{fontSize:16}}):e>5e3&&c.ZP.error({content:"Description is too long. Can't exceed 5000 characters. Remove some characters.",duration:2.5,style:{fontSize:16}})};function W(){return U.apply(this,arguments)}function U(){return(U=D(o().mark((function e(){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Z(!0),t=["data","_id","active"],r=null,a={module_id:C._id,new_data:C,allowedKeys:t},11!==C.description.data.length){e.next=8;break}R(C.description.data),e.next=14;break;case 8:if(!(C.description.data.length>5e4)){e.next=12;break}R(C.description.data),e.next=14;break;case 12:return e.next=14,_(a).then((function(e){r=e.error,0===e.error&&(T(e.data),b((function(e){return e.filter((function(e){return e!==n._id}))}))),0===r?(c.ZP.success("About section changes successfully saved."),Z(!1)):(c.ZP.error("About section changes couldn't be saved. Please check the entered values"),Z(!1))}));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){P&&v.includes(n._id)&&W()}),[j]);var K=O(u.Z.useForm(),1)[0];return(0,r.jsx)("div",{style:{padding:24},children:(0,r.jsxs)(u.Z,{form:K,layout:"vertical",initialValues:{remember:!0},onFinish:W,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:C.title.data,tooltip:{title:"Title/Heading of about, e.g. About pH Design. This cannot be empty and should be at least 3 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:3,max:100}],children:(0,r.jsx)(d.Z,{value:C.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub title",initialValue:C.sub_title.data,tooltip:{title:"A little more about your page/organization. And should be at least 5 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:C.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Sub title"})}),(0,r.jsx)(u.Z.Item,{label:"Description",name:"description",initialValue:C.description.data,tooltip:{title:"Describe your organization. And should be at least 10 characters long",icon:(0,r.jsx)(p.Z,{})},required:!0,children:(0,r.jsx)(y,{editor:C.description.data,change:function(e){return t({description:{data:e}})}})}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:S,onChange:function(){k(!S),b((function(e){return w(e).concat([n._id])})),l().merge(C,{active:!S}),T(C);var e=M({},i);e.modules_order.find((function(e){return e._id==C._id})).active=!S,s(e)},style:{marginLeft:12,backgroundColor:S?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:L&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!L&&"Save"})})]})]})})},header:function(e){var t=function(e){y((function(e){return te(e).concat([n._id])}));var t=$({},P);l().merge(t,e),M(t);var r=$({},i);l().merge(r.modules_order.find((function(e){return e._id==P._id})),t),s(r)},n=e.items,i=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,_=e.saveModule,v=e.changeArr,y=e.setChangeArr,b=e.globalSave,j=e.checkNew,D=(0,a.useState)(n),P=D[0],M=D[1],O=(0,a.useState)(P.active),w=O[0],A=O[1],C=ee(u.Z.useForm(),1)[0],T=(0,a.useState)(P.background_image.data),I=T[0],S=T[1],k=(0,a.useState)(P.background_image.image_meta),B=k[0],L=k[1],Z=(0,a.useState)(!1),R=(Z[0],Z[1],(0,a.useState)(!1)),W=R[
10],U=R[1],K=i._id,N=F.Z.Option,z=(0,a.useState)(Y),J=z[0],Q=z[1];function ne(){return re.apply(this,arguments)}function re(){return(re=X(o().mark((function e(){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U(!0),t=["data","_id","active","background_opacity","enabled","layout","custom_html","aspect_ratio","average_color","colorspace","date_file_modified","frame_count","has_clipping_path","has_transparency","height","orientation","width"],r=null,a={module_id:P._id,new_data:P,allowedKeys:t},e.next=6,_(a).then((function(e){r=e.error,0===e.error&&(M(e.data),y((function(e){return e.filter((function(e){return e!==n._id}))})))}));case 6:0===r?(c.ZP.success("Introduction section changes successfully saved."),U(!1)):(c.ZP.error("Introduction section changes couldn't be saved. Please check the entered values"),U(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){J.some((function(e){return JSON.stringify({image_url:I})===JSON.stringify(e)}))||J.unshift({image_url:I})}),[]),(0,a.useEffect)(X(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/getimages",{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){e.images.photos.map((function(e,t){Q((function(t){return te(t).concat([{thumb_url:e.src.medium,image_url:e.src.large,title:e.alt}])}))}))})).catch((function(e){console.log(e)}));case 2:case"end":return e.stop()}}),e)}))),[]),(0,a.useEffect)((function(){j&&v.includes(n._id)&&ne()}),[b]),(0,a.useEffect)((function(){if(I){var e=$({},P);l().merge(e,{background_image:{data:I,image_meta:B}}),M(e);var t=$({},i);l().merge(t.modules_order.find((function(e){return e._id==P._id})),e),s(t)}}),[I]);var ae=[E().headerDefImgDiv,E().removeHeaderDivHigh];return(0,r.jsx)("div",{style:{padding:24},className:E().headerAdminDiv,children:(0,r.jsxs)(u.Z,{form:C,initialValues:{remember:!0},layout:"vertical",onFinish:ne,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Organization Name/Title",name:"organizationName",initialValue:P.title.data,tooltip:{title:"Here goes the Organizer name. e.g. pH Design and title should be at least 3 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:P.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Header Title"})}),(0,r.jsx)(V.Z,{style:{marginBottom:"36px"},checked:!P.title.enabled,onChange:function(e){return t({title:{enabled:!e.target.checked}})},children:"Hide Title"}),(0,r.jsx)(u.Z.Item,{label:"Tagline",name:"tagline",initialValue:P.sub_title.data,tooltip:{title:"Here goes the tag line of your event page. e.g. Inspire. Learn. Build. and it should be at least 3 characters long",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:P.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Tagline"})}),(0,r.jsx)(V.Z,{style:{marginBottom:"36px"},checked:!P.sub_title.enabled,onChange:function(e){return t({sub_title:{enabled:!e.target.checked}})},children:"Hide Tagline"}),(0,r.jsx)(u.Z.Item,{label:"Background Overlay Opacity",name:"opacity",initialValue:P.background_opacity,children:(0,r.jsx)(G.Z,{defaultValue:P.background_opacity,step:10,onChange:function(e){return t({background_opacity:e})}})}),(0,r.jsxs)(u.Z.Item,{label:"Cover Image",name:"coverImage",initialValue:I,tooltip:{title:"A cover Image which defines your website. Landscape images looks best!",icon:(0,r.jsx)(p.Z,{})},children:[(0,r.jsx)("div",{style:{marginTop:"10px"},children:(0,r.jsx)(q.Z.Text,{style:{fontWeight:500},children:"Default Images"})}),(0,r.jsx)("div",{className:E().headerDefDiv,children:J.map((function(e,t){return(0,r.jsx)("div",{className:I===e.image_url?ae.join(" "):ae[0],onClick:function(){return t=e.image_url,y((function(e){return te(e).concat([n._id])})),void S(t||"https://cdn2.allevents.in/transup/12/e12fc6ed2643b28003ad46ca8dd7b7/def.jpg");var t},children:(0,r.jsx)("img",{style:{objectFit:"cover",height:"100%",width:"100%"},src:e.image_url,alt:"Default Image"})},t)}))}),(0,r.jsx)(h.Z,{htmlType:"button",style:{width:"100%",marginTop:20,textAlign:"center"},onClick:function(){(0,H.Z)((function(e,t){L(t),S(e),J.unshift({image_url:e}),y((function(e){return te(e).concat([n._id])}))}),K,1100)},children:"Upload Cover Image"})]}
1),(0,r.jsx)(u.Z.Item,{label:"Background Style",name:"layout",children:(0,r.jsxs)(F.Z,{defaultValue:P.layout?P.layout:"max",style:{width:"100%",marginBottom:16},onChange:function(e){console.log(e),t({layout:e})},children:[(0,r.jsxs)(N,{value:"max",children:["Cover ",(0,r.jsx)("small",{children:"(Scales image to fill the container)"})]}),(0,r.jsxs)(N,{value:"full",children:["Contain ",(0,r.jsx)("small",{children:"(Scales image without cropping or stretching)"})]})]})}),(0,r.jsx)(u.Z.Item,{label:"Custom HTML",name:"custom_html",initialValue:P.custom_html?(0,x.kD)(P.custom_html):"",tooltip:{title:"Optional HTML content rendered below the tagline. You can use style or class attributes for styling. Tailwind CSS is also supported.",icon:(0,r.jsx)(p.Z,{})},rules:[{max:2e5}],children:(0,r.jsx)(d.Z.TextArea,{style:{height:160},value:P.custom_html?(0,x.kD)(P.custom_html):"",onChange:function(e){t({custom_html:(0,x.kD)(e.target.value)})},placeholder:"<div class='mt-4'><a href='/events' class='px-6 py-3 bg-blue-500 text-white-100 rounded'>View Events</a></div>"})}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:w,onChange:function(){A(!w),y((function(e){return te(e).concat([n._id])})),l().merge(P,{active:!w}),M(P);var e=$({},i);e.modules_order.find((function(e){return e._id==P._id})).active=!w,s(e)},style:{marginLeft:12,backgroundColor:w?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:W&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!W&&"Save"})})]})]})})},testimonials:function(e){var t=function(e){b((function(e){return fe(e).concat([s._id])}));var t=de({},M);_.merge(t,e),t.no_of_testimonials=e.no_of_testimonials,O(t);var n=de({},l);_.merge(n.modules_order.find((function(e){return e._id==M._id})),t),_.merge(n.modules_order.find((function(e){return e._id==M._id})),{no_of_testimonials:e.no_of_testimonials}),v(n)},n=function(e,t){b((function(e){return fe(e).concat([s._id])}));var n=fe(A);_.merge(n.find((function(e){return e._id?e._id==t:e.tempId==t})),e);var r=n.find((function(e){return e._id?e._id==t:e.tempId==t}));r.display_picture.data.includes("ui-avatars.com")&&(r.display_picture.data="https://ui-avatars.com/api/?size=200&background=random&font-size=0.35&color=4e4e4e&name=".concat(r.name.data)),_.merge(n.find((function(e){return e._id?e._id==t:e.tempId==t})),r),C(n);var a=de({},l);v(a)},i=function(e){b((function(e){return fe(e).concat([s._id])}));var t=fe(A).filter((function(t){return t._id?t._id!=e:t.tempId!=e}));C(t)},s=e.items,l=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),v=e.setMongoData,y=e.saveModule,x=e.changeArr,b=e.setChangeArr,j=e.globalSave,D=e.checkNew,P=(0,a.useState)(s),M=P[0],O=P[1],w=(0,a.useState)(s.items),A=w[0],C=w[1],T=(0,a.useState)(s.no_of_testimonials),I=(T[0],T[1],(0,a.useState)(M.active)),S=I[0],k=I[1],B=(0,a.useState)(!1),L=B[0],R=B[1],W=(0,a.useState)(!1),U=W[0],K=W[1],N=(0,a.useState)(null),z=N[0],V=N[1],G=(0,a.useState)(!1),Y=G[0],J=G[1],X=(0,a.useState)(null),Q=(X[0],X[1],l._id),$=F.Z.Option;function ee(){return te.apply(this,arguments)}function te(){return(te=_e(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),t=["data","_id","no_of_testimonials","active","layout","aspect_ratio","average_color","colorspace","date_file_modified","frame_count","has_clipping_path","has_transparency","height","orientation","width"],n=null,r={module_id:M._id,new_data:M,allowedKeys:t},e.next=6,y(r).then((function(e){n=e.error,0===e.error&&(O(e.data),C(e.data.items),b((function(e){return e.filter((function(e){return e!==s._id}))})))}));case 6:0===n?(c.ZP.success("Testimonial section changes successfully saved."),R(!1)):(c.ZP.error("Testimonial section changes couldn't be saved. Please check the entered values"),R(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){D&&x.includes(s._id)&&ee()}),[j]);var ce=me(u.Z.useForm(),1)[0],ue=ne.Z.SubMenu,he=d.Z.TextArea,pe=(0,a.useState)(""),ge=pe[0],ve=pe[1],ye=(0,a.useState)(null),xe=ye[0],be=ye[1],Ee=(0,a.useState)(null),je=Ee[0],De=Ee[1];(0,a.useEffect)((function(){if(ge){var e=fe(A);
1ge.includes("ui-avatars.com")?_.merge(e.find((function(e){return e._id?e._id==je:e.tempId==je})),{display_picture:{data:ge}}):_.merge(e.find((function(e){return e._id?e._id==je:e.tempId==je})),{display_picture:{data:ge,display_picture_meta:xe}}),C(e);var t=de({},l);v(t)}}),[ge]),(0,a.useEffect)((function(){var e=de({},M);e.items=A,O(e);var t=de({},l);t.modules_order.find((function(e){return e._id==M._id})).items=A,v(t)}),[A]);var Pe=(0,a.useState)([]),Me=(Pe[0],Pe[1]);function Oe(){return(Oe=_e(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J(!0),e.next=3,fetch("/api/organizer-details",{method:"POST",body:JSON.stringify({organizer_id:l.organizer_id}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){var t;V(e),Me(new Array(null===e||void 0===e||null===(t=e.top_reviews)||void 0===t?void 0:t.length).fill(!1))})).catch((function(e){console.log(e)})).finally((function(){return J(!1)}));case 3:e.sent;case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,r.jsxs)("div",{style:{padding:24},className:E().testiAdminDiv,children:[(0,r.jsxs)(u.Z,{form:ce,layout:"vertical",initialValues:{remember:!0},onFinish:ee,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:M.title.data,tooltip:{title:"Title of this section can be Testimonial/Reviews. And do not leave this field empty and should be at least 4 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:3,max:100}],children:(0,r.jsx)(d.Z,{value:M.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Heading/Title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub title",initialValue:M.sub_title.data,tooltip:{title:"A little more about title e.g. What our customer say about us. And should be at least 5 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:M.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Sub-heading/Sub-title"})}),(0,r.jsx)(u.Z.Item,{label:"Layout",name:"layout",children:(0,r.jsxs)(F.Z,{defaultValue:M.layout?M.layout:"grid",style:{width:"100%"},onChange:function(e){t({layout:e})},children:[(0,r.jsx)($,{value:"grid",children:"Grid"}),(0,r.jsx)($,{value:"carousel",children:"Carousel"})]})}),"grid"===M.layout&&(0,r.jsx)(u.Z.Item,{label:"No. of testimonials to display",name:"testimonials to display",initialValue:M.no_of_testimonials,tooltip:{title:"No. of testimonials you want to display in your website",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0},{type:"number",min:1,max:12}],children:(0,r.jsx)(ae.Z,{style:{width:"100%"},value:M.no_of_testimonials,onChange:function(e){t({no_of_testimonials:e})},placeholder:"No. of testimonials to display",min:1,max:12})}),(0,r.jsx)("div",{style:{marginBottom:2},children:(0,r.jsx)(q.Z.Text,{children:"Testimonials"})}),(0,r.jsx)(ne.Z,{mode:"inline",style:{borderRightWidth:0},children:A.map((function(e,t){return(0,r.jsx)(ue,{title:e.name.data,children:(0,r.jsxs)(ne.Z.Item,{style:{height:"100%",paddingLeft:16},children:[(0,r.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"end"},children:(0,r.jsx)(ie.Z,{overlayClassName:"fixed",placement:"bottom",trigger:"click",content:(0,r.jsxs)("div",{className:E().popDiv,children:[(0,r.jsxs)("button",{className:"".concat(E().popCommon," ").concat(E().popList),type:"button",onClick:function(){return function(e){if(b((function(e){return fe(e).concat([s._id])})),e>0){if(e-1>=A.length)for(var t=e-1-A.length+1;t--;)A.push(void 0);A.splice(e-1,0,A.splice(e,1)[0]),C(A);var n=fe(A),r=fe(A);_.merge(M.items,n),C(r),_.merge(M,A);var a=de({},l);a.modules_order.find((function(e){return e._id===M._id})).items=n,v(a)}}(t)},children:[(0,r.jsx)(Z.ZTc,{}),(0,r.jsx)("span",{style:{marginLeft:8},children:"List up"})]}),(0,r.jsxs)("button",{className:"".concat(E().popCommon," ").concat(E().popList),type:"button",onClick:function(){return function(e){if(b((function(e){return fe(e).concat([s._id])})),e<A.length){if(e+1>=A.length)for(var t=e+1-A.length+1;t--;)A.push(void 0);A.splice(e+1,0,A.splice(e,1)[0]),C(A);var n=fe(A),r=fe(A);_.merge(M.items,n),C(r),_.merge(M,A);var a=de({},l);a.modules_order.find((function(e){return e._id===M._id})).items=n,v(a)}}(t)},children:[(0,r.jsx)(Z.NWQ,{}),(0,r.jsx)("span",{style:{marginLeft:8},children:"List down"})]}),(0,r.jsxs)("button",{className:"".concat(E().popCommon," ").concat(E().popDel),type:"button",onClick:function(){return e._id?i(e._id):i(e.tempId)},children:[(0,r.jsx)(Z.Xm5,{}),(0,r.jsx)("span",{style:{marginLeft:8},children:"Delete"})]})]}),children:(0,r.jsx)("button",{type:"button",className:E().popButton,children:(0,r.jsx)(oe.evw,{})})})}),(0,r.jsx)(u.Z.Item,{label:"Person",name:e._id?"person-".concat(e._id):"person-".concat(e.tempId),initialValue:e.name.data,tooltip:{title:"Name of the person e.g. John Dow. Don't leave this field empty and it should be at least 3 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:3,max:50,message:"Must be between 3 and 50 characters."}],children:(0,r.jsx)(d.Z,{value:e.name.data,onChange:function(t){return n({name:{data:t.target.value}},e._id?e._id:e.tempId)},placeholder:"Person"})}),(0,r.jsx)(u.Z.Item,{label:"Place/Designation",name:e._id?"place-".concat(e._id):"place-".concat(e.tempId),initialValue:e.title.data,tooltip:{title:"Place/Designation",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:50}],children:(0,r.jsx)(d.Z,{value:e.title.data,onChange:function(t){return n({title:{data:t.target.value}},e._id?e._id:e.tempId)},placeholder:"Place/Designation"})}),(0,r.jsx)(u.Z.Item,{label:"Review",name:e._id?"review-".concat(e._id):"review-".concat(e.tempId),initialValue:e.description.data,tooltip:{title:"Review of person goes here. Don't leave this field empty too and it should be at least 10 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:10,max:1500,message:"Must be between 10 and 1500 characters."}],children:(0,r.jsx)(he,{rows:3,value:e.description.data,onChange:function(t){return n({description:{data:t.target.value}},e._id?e._id:e.tempId)},placeholder:"Review"})}),(0,r.jsx)(u.Z.Item,{label:"Avatar",name:e._id?"avatar-".concat(e._id):"avatar-".concat(e.tempId),tooltip:{title:"Image of person",icon:(0,r.jsx)(p.Z,{})},rules:[{pattern:/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png|jpeg|tiff|webp)/,message:"Must be a valid image url."}],children:(0,r.jsxs)("div",{className:E().testiAvatardiv,children:[(0,r.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",width:e.display_picture.data.includes("ui-avatars.c
1om")?64:144,overflow:"hidden",aspectRatio:"1/1"},children:e.display_picture.data&&(0,r.jsx)("img",{className:E().testiAvatar,src:e.display_picture.data,alt:e.name.data})}),(0,r.jsx)(h.Z,{style:{width:"100%"},htmlType:"button",onClick:function(){e._id?De(e._id):De(e.tempId),(0,H.Z)((function(e,t){be(t),ve(e),b((function(e){return fe(e).concat([s._id])}))}),Q,300)},placeholder:"Avatar",children:"Upload Avatar"}),!e.display_picture.data.includes("ui-avatars.com")&&(0,r.jsx)(h.Z,{style:{width:"100%"},htmlType:"button",onClick:function(){var t;e._id?De(e._id):De(e.tempId),t=e.name.data,b((function(e){return fe(e).concat([s._id])})),ve("https://ui-avatars.com/api/?size=200&background=random&font-size=0.35&color=4e4e4e&name=".concat(t))},placeholder:"Avatar",children:"Remove Avatar"})]})})]})},e._id?"Sub-".concat(e._id):"Sub-".concat(e.tempId))}))}),(0,r.jsx)(h.Z,{htmlType:"button",style:{width:"100%",textAlign:"center"},onClick:function(){b((function(e){return fe(e).concat([s._id])}));var e=fe(A);e.push({description:{data:"The event is superb and very well organised. Glad to be a part of this wonderful event. I'm looking forward for more such events from your side and I will try to pull my friends in for your next event."},name:{data:"Christopher Campbell"},title:{data:""},display_picture:{data:"https://cdn2.allevents.in/transup/70/583fb294b34512b39f198698897336/christopher-campbell-rDEOVtE7vOs-unsplash.jpg"},rating:{data:"5"},tempId:(0,se.Z)()});var t=de({},M);_.merge(t.items,e),O(t);var n=de({},l);v(n)},children:"+ Add New Testimonial"}),(0,r.jsx)(h.Z,{htmlType:"button",style:{width:"100%",textAlign:"center",marginTop:12},onClick:function(){K(!0),function(){Oe.apply(this,arguments)}()},children:"Import from your AllEvents Organizer Page"}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:S,onChange:function(){k(!S),b((function(e){return fe(e).concat([s._id])})),_.merge(M,{active:!S}),O(M);var e=de({},l);e.modules_order.find((function(e){return e._id==M._id})).active=!S,v(e)},style:{marginLeft:12,backgroundColor:S?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:L&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!L&&"Save"})})]})]}),function(){var e,t,n;return(0,r.jsx)(re.Z,{width:1200,title:"Reviews on Your Organizer Page",visible:U,onCancel:function(){return K(!1)},footer:null,children:(0,r.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-16",
1style:{height:"60vh",overflow:"auto",padding:"30px 0px"},children:!Y&&(null===z||void 0===z||null===(e=z.top_reviews)||void 0===e?void 0:e.length)?null===z||void 0===z||null===(t=z.top_reviews)||void 0===t?void 0:t.map((function(e,t){return(0,r.jsxs)("div",{className:"w-[18rem] lg:mt-0 mt-8 bg-blue-100 p-4 rounded-md",children:[(0,r.jsxs)("div",{className:"h-full flex flex-col justify-between text-center",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("img",{alt:"testimonial",width:"80",height:"80",className:"inline-block object-cover object-center w-20 h-20 mb-8 bg-gray-100 rounded-full",src:e.avatar}),(0,r.jsx)("p",{className:"line-clamp-4 leading-6 text-center dark:text-gray-400 h-fit overflow-hidden",children:e.feedback})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h6",{style:{fontSize:14},className:"mt-8 tracking-wider text-gray-900 uppercase title-font dark:text-rose-600",children:e.first_name}),(0,r.jsx)("div",{className:"mx-auto w-10 mt-2 mb-1 h-1 bg-blue-300 rounded-full"}),e.title&&(0,r.jsx)("h6",{style:{fontSize:13},className:"mt-2",children:e.title})]})]}),(0,r.jsx)("div",{children:(0,r.jsx)(h.Z,{onClick:function(){return function(e){b((function(e){return fe(e).concat([s._id])}));var t=fe(A);t.push({description:{data:e.feedback?e.feedback:"Great Event"},name:{data:"".concat(e.first_name," ").concat(e.last_name)},title:{data:e.title?e.title:""},display_picture:{data:e.avatar?e.avatar:"https://ui-avatars.com/api/?size=200&background=random&font-size=0.35&color=4e4e4e&name=".concat(e.first_name?e.first_name:"")},rating:{data:e.rating?e.rating:"5"},tempId:(0,se.Z)()});var n=de({},M);_.merge(n.items,t),O(n);var r=de({},l);v(r),K(!1)}(e)},style:{width:"100%"},children:"Add to Testimonials"})})]},t)})):!Y&&(null===z||void 0===z||null===(n=z.top_reviews)||void 0===n?void 0:n.length)<1?(0,r.jsx)("div",{children:"No reviews found"}):(0,r.jsx)("div",{style:{height:"100%"},children:(0,r.jsxs)("p",{className:E().loaderStyleP,style:{fontSize:18},children:[(0,r.jsx)(le.j8h,{style:{marginRight:10},className:"animate-spin"}),"Getting testimonials from Allevents"]})})})})}()]})},events:function(e){var t=function(e){y((function(e){return z(e).concat([n._id])}));var t=K({},n);l().merge(t,e),P(t);var r=K({},i);s(r)},n=e.items,i=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,_=e.saveModule,v=e.changeArr,y=e.setChangeArr,x=e.globalSave,b=e.checkNew,j=(0,a.useState)(n),D=j[0],P=j[1],M=(0,a.useState)(D.active),O=M[0],w=M[1],A=(0,a.useState)(!1),C=A[0],T=A[1],I=(0,a.useState)(D.show_time_on_eventcard),S=I[0],k=I[1];function R(){return U.apply(this,arguments)}function U(){return(U=W(o().mark((function e(){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),t=["data","_id","active","show_time_on_eventcard"],r=null,a={module_id:D._id,new_data:D,allowedKeys:t},e.next=6,_(a).then((function(e){r=e.error,0===e.error&&(P(e.data),y((function(e){return e.filter((function(e){return e!==n._id}))})))}));case 6:0===r?(c.ZP.success("Events section changes successfully saved."),T(!1)):(c.ZP.error("Events section changes couldn't be saved. Please check the entered values"),T(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){b&&v.includes(n._id)&&R()}),[x]);var F=N(u.Z.useForm(),1)[0];return(0,r.jsxs)("div",{style:{padding:24},className:E().eventAdminDiv,children:[(0,r.jsxs)(u.Z,{form:F,layout:"vertical",initialValues:{remember:!0},onFinish:R,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:D.title.data,tooltip:{title:"A title which goes for your Events to showcase e.g. Upcoming Events. This field cannot be empty and it should have at least 3 characters",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:3,max:100}],children:(0,r.jsx)(d.Z,{value:D.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Event title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub-title",initialValue:D.sub_title.data,tooltip:{title:"A little more about title e.g. Know more about events. It should have at least 5 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:D.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Event sub title"})}),(0,r.jsx)(u.Z.Item,{label:"Button CTA",name:"button_cta",initialValue:D.button_cta.data,tooltip:{title:"Title you want to show in book button",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:30}],children:(0,r.jsx)(d.Z,{value:D.button_cta.data,onChange:function(e){return t({button_cta:{data:e.target.value}})},placeholder:"Book button CTA"})}),(0,r.jsx)("div",{className:E().switchMaindiv,children:(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Display event time in listing",(0,r.jsx)(m.Z,{title:"Control, whether you want to show time on the event listing card",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{size:"small",defaultChecked:S,onChange:function(){k(!S),y((function(e){return z(e).concat([n._id])})),l().merge(D,{show_time_on_eventcard:!S}),P(D);var e=K({},i);e.modules_order.find((function(e){return e._id==D._id})).show_time_on_eventcard=!S,s(e)},style:{marginLeft:12,backgroundColor:S?"#3b82f6":"#d1d5db"}})]})}),(0,r.jsxs)("div",{style:{marginTop:36},className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:O,onChange:function(){w(!O),y((function(e){return z(e).concat([n._id])})),l().merge(D,{active:!O}),P(D);var e=K({},i);e.modules_order.find((function(e){return e._id==D._id})).active=!O,s(e)},style:{marginLeft:12,backgroundColor:O?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:C&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!C&&"Save"})})]})]}),(0,r.jsx)(L.Z,{style:{margin:"30px 0",borderTop:"1px solid rgba(0, 0, 0, 0.1)"}}),(0,r.jsxs)("div",{className:E().eventDiv2,children:[(0,r.jsxs)("a",{className:"".concat(E().eventAnchor," ").concat(E().eventEvents),target:"_blank",rel:"noopener noreferrer",href:i&&"https://allevents.in/manage/manage-events.php?org_id=".concat(i.organizer_id,"&ref=wootick-dash&utm_source=wootick&utm_medium=manage-events&utm_campaign=create-event"),children:[(0,r.jsx)(Z.IiJ,{})," ",(0,r.jsx)("span",{style:{marginLeft:8},children:"Manage Events"})]}),(0,r.jsxs)("a",{className:"".concat(E().eventAnchor," ").concat(E().eventCreate),target:"_blank",rel:"noopener noreferrer",href:"https://allevents.in/manage/create.php?ref=wootick-dash&org_id=".concat(i.organizer_id,"&utm_source=wootick&utm_medium=sidebar-create-event&utm_campaign=create-event"),children:[(0,r.jsx)(B.Lfi,{})," ",(0,r.jsx)("span",{style:{marginLeft:8},children:"Create Event"})]})]})]})},contactus:function(e){var t=function(e){y((function(e){return k(e).concat([n._id])}));var t=I({},n);l().merge(t,e),P(t);var r=I({},i);s(r)},n=e.items,i=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,_=e.saveModule,v=e.changeArr,y=e.setChangeArr,x=e.globalSave,b=e.checkNew,j=(0,a.useState)(n),D=j[0],P=j[1],M=(0,a.useState)(D.active),O=M[0],w=M[1],A=(0,a.useState)(!1),T=A[0],B=A[1];function L(){return Z.apply(this,arguments)}function Z(){return(Z=C(o().mark((function e(){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),t=["data","_id","active"],r=null,a={module_id:D._id,new_data:D,allowedKeys:t},e.next=6,_(a).then((function(e){r=e.error,0===e.error&&(P(e.data),y((function(e){return e.filter((function(e){return e!==n._id}))})))}));case 6:0===r?(c.ZP.success("Contact section changes successfully saved."),B(!1)):(c.ZP.error("Contact section changes couldn't be saved. Please check the entered values"),B(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){b&&v.includes(n._id)&&L()}),[x]);var R=S(u.Z.useForm(),1)[0];return(0,r.jsx)("div",{style:{padding:24},children:(0,r.jsxs)(u.Z,{form:R,layout:"vertical",initialValues:{remember:!0},onFinish:L,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:D.title.data,tooltip:{title:"Set a title e.g. Contact Us/Reach Us. This field should not be empty and it should have at least 3 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:3,max:100}],children:(0,r.jsx)(d.Z,{value:D.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub-title",initialValue:D.sub_title.data,tooltip:{title:"A little more about title e.g. Reach out to us. It should have at least 5 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:D.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Sub title"})}),(0,r.jsx)(u.Z.Item,{label:"Address",name:"address",initialValue:D.address.data,tooltip:{title:"Enter your address. It should have at least 5 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:5,max:500}],children:(0,r.jsx)(d.Z,{value:D.address.data,onChange:function(e){return t({address:{data:e.target.value}})},placeholder:"Address"})}),(0,r.jsx)(u.Z.Item,{label:"Map Address",name:"mapAddress",initialValue:D.map_query.data,tooltip:{title:"Enter your location/address 
1which map can read. You can type in your Pin Code, city/state, area/city etc.",icon:(0,r.jsx)(p.Z,{})},children:(0,r.jsx)(d.Z,{value:D.map_query.data,onChange:function(e){return t({map_query:{data:e.target.value}})},placeholder:"Map"})}),(0,r.jsx)(u.Z.Item,{label:"Phone",name:"phone",initialValue:D.phone.data,tooltip:{title:"Enter your phone/mobile number e.g. +91 1231231231. It should have at least 8 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:5,max:20,message:"Must be a valid phone/mobile number"}],children:(0,r.jsx)(d.Z,{value:D.phone.data,onChange:function(e){return t({phone:{data:e.target.value}})},placeholder:"Phone/Mobile number"})}),(0,r.jsx)(u.Z.Item,{label:"Email Id",name:"email",initialValue:D.email.data,tooltip:{title:"Enter your E-mail e.g. [email protected]",icon:(0,r.jsx)(p.Z,{})},rules:[{type:"email"}],children:(0,r.jsx)(d.Z,{value:D.email.data,onChange:function(e){return t({email:{data:e.target.value}})},placeholder:"Email"})}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:O,onChange:function(){w(!O),y((function(e){return k(e).concat([n._id])})),l().merge(D,{active:!O}),P(D);var e=I({},i);e.modules.find((function(e){return e._id==D._id})).active=!O,s(e)},style:{marginLeft:12,backgroundColor:O?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:T&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!T&&"Save"})})]})]})})},gallery:function(e){var t=function(e){R();var t=ve({},D);l().merge(t,e),P(t);var n=ve({},i);l().merge(n.modules_order.find((function(e){return e._id==D._id})),t),s(n)},n=e.items,i=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,_=e.saveModule,v=e.changeArr,y=e.setChangeArr,x=e.globalSave,b=e.checkNew,j=(0,a.useState)(n),D=j[0],P=j[1],M=(0,a.useState)(n.items),O=M[0],w=M[1],A=(0,a.useState)(D.active),C=A[0],T=A[1],I=(0,a.useState)(!1),S=I[0],k=I[1],B=i._id,L=F.Z.Option,R=function(){y((function(e){return xe(e).concat([n._id])}))};function W(){return U.apply(this,arguments)}function U(){return(U=pe(o().mark((function e(){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),t=["data","_id","thumb_url","image_url","title","active","layout","aspect_ratio","average_color","colorspace","date_file_modified","frame_count","has_clipping_path","has_transparency","height","orientation","width"],r=null,a={module_id:D._id,new_data:D,allowedKeys:t},e.next=6,_(a).then((function(e){r=e.error,0===e.error&&(P(e.data),y((function(e){return e.filter((function(e){return e!==n._id}))})))}));case 6:0===r?(c.ZP.success("Gallery section changes successfully saved."),k(!1)):(c.ZP.error("Gallery section changes couldn't be saved. Please check the entered values"),k(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){b&&v.includes(n._id)&&W()}),[x]);var K=ye(u.Z.useForm(),1)[0],N=(0,a.useState)(""),z=N[0],V=(N[1],(0,a.useState)(null)),G=V[0];V[1],(0,a.useEffect)((function(){if(z){var e=xe(O);l().merge(e.find((function(e){return e._id==G})),{thumb_url:z,image_url:z}),w(e);var t=ve({},i);s(t)}}),[z]),(0,a.useEffect)((function(){var e=ve({},D);e.items=O,P(e);var t=ve({},i);t.modules_order.find((function(e){return e._id==D._id})).items=O,s(t)}),[O]);var q=(0,a.useState)(null),Y=q[0],J=q[1];return(0,a.useEffect)((function(){if(Y){var e=xe(O);Y.map((function(t){e.push({thumb_url:t.image_url,image_url:t.image_url,image_meta:t.meta,title:"",tempId:(0,se.Z)()})})),w(e);var t=ve({},i);s(t)}}),[Y]),(0,r.jsx)("div",{style:{padding:24},className:E().galleryAdminDiv,children:(0,r.jsxs)(u.Z,{form:K,layout:"vertical",initialValues:{remember:!0},onFinish:W,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:D.title.data,tooltip:{title:"Set title e.g. Gallery. Don't leave this field empty and it should have at least 3 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{required:!0,min:3,max:100}],children:(0,r.jsx)(d.Z,{value:D.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Gallery title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub-title",initialValue:D.sub_title.data,tooltip:{title:"A little more light on title e.g. Check our gallery. It should have at least 3 characters.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:D.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Gallery Sub title"})}),(0,r.jsx)(u.Z.Item,{label:"Layout",name:"layout",children:(0,r.jsxs)(F.Z,{defaultValue:D.layout?D.layout:"grid",style:{width:"100%"},onChange:function(e){t({layout:e})},children:[(0,r.jsx)(L,{value:"grid",children:"Grid"}),(0,r.jsx)(L,{value:"carousel",children:"Carousel"})]})}),(0,r.jsx)("div",{className:E().imagesArrDiv,children:D.items.map((function(e,t){return(0,r.jsxs)(u.Z.Item,{className:E().imagesFormItem,label:"Image-".concat(t+1),name:"image-".concat(t),tooltip:{title:"Image will be displayed in gallery section. You can also change their order as you can move your images up and down in order.",icon:(0,r.jsx)(p.Z,{})},rules:[{pattern:/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png|jpeg|tiff|webp)/,message:"Must be a valid image url."}],children:[(0,r.jsxs)("div",{className:E().imagesDiv1,children:[(0,r.jsx)("img",{className:E().imagesDiv1Img,alt:"image",src:e.thumb_url}),(0,r.jsx)("div",{className:E().imagesDiv1Div,children:(0,r.jsx)(ie.Z,{placement:"bottom",trigger:"click",overlayClassName:"fixed",content:(0,r.jsx)("div",{className:"",children:(0,r.jsxs)("div",{className:E().popDiv,children:[(0,r.jsxs)("button",{type:"button",onClick:function(){!function(e){if(y((function(e){return xe(e).concat([n._id])})),e>0){if(e-1>=O.length)for(var t=e-1-O.length+1;t--;)O.push(void 0);O.splice(e-1,0,O.splice(e,1)[0]),w(O);var r=xe(O),a=xe(O);l().merge(D.items,r),w(a),l().merge(D,O);var o=ve({},i);o.modules_order.find((function(e){return e._id===D._id})).items=r,s(o)}}(t)},className:"".concat(E().popCommon," ").concat(E().popList),children:[(0,r.jsx)(Z.ZTc,{})," ",(0,r.jsx)("span",{style:{marginLeft:8},children:"List image up"})]}),(0,r.jsxs)("button",{type:"button",onClick:function(){!function(e){if(y((function(e){return xe(e).concat([n._id])})),e<O.length){if(e+1>=O.length)for(var t=e+1-O.length+1;t--;)O.push(void 0);O.splice(e+1,0,O.splice(e,1)[0]),w(O);var r=xe(O),a=xe(O);l().merge(D.items,r),w(a),l().merge(D,O);var o=ve({},i);o.modules_order.find((function(e){return e._id===D._id})).items=r,s(o)}}(t)},className:"".concat(E().popCommon," ").concat(E().popList),children:[(0,r.jsx)(Z.NWQ,{})," ",(0,r.jsx)("span",{style:{marginLeft:8},children:"List image down"})]}),(0,r.jsxs)("button",{type:"button",className:"".concat(E().popCommon," ").concat(E().popDel),onClick:function(){!function(e){R();var t=xe(O).filter((function(t){return t._id?t._id!=e:t.tempId!=e}));w(t)}(e._id||e.tempId)},children:[(0,r.jsx)(Z.Xm5,{})," ",(0,r.jsx)("span",{style:{marginLeft:8},children:"Delete image"})]})]})}),children:(0,r.jsx)("button",{type:"button",className:"flex items-center justify-center w-full h-full bg-blue-400 border border-blue-400 rounded-sm text-white-50 hover:bg-white-50 hover:text-blue-400 ",children:(0,r.jsx)(oe.evw,{})})})})]}),(0,r.jsx)("div",{className:E().imagesDiv2,children:(0,r.jsx)(d.Z,{style:{marginBottom:"8px"},value:e.title,onChange:function(e){return function(e,t){y((function(e){return xe(e).concat([n._id])}));var r=xe(O);l().merge(r.find((function(e,n){return n===t})),e),w(r),l().merge(D,O);var a=ve({},i);l().merge(a.modules.find((function(e){return e._id==D._id})),D),s(a)}({title:e.target.value},t)},placeholder:"Image Title"})})]},t)}))}),(0,r.jsx)(h.Z,{htmlType:"button",style:{width:"100%",textAlign:"center"},onClick:function(){(0,H.Z)((function(e){J(e),y((function(e){return xe(e).concat([n._id])}))}),B,1080,5)},children:"Add Image"}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:C,onChange:function(){T(!C),y((function(e){return xe(e).concat([n._id])})),l().merge(D,{active:!C}),P(D);var e=ve({},i);e.modules_order.find((function(e){return e._id==D._id})).active=!C,s(e)},style:{marginLeft:12,backgroundColor:C?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:S&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!S&&"Save"})})]})]})})},blogs:function(e){var t,n=e.handleBlogBtn,a=e.blgArr,i=(e.setBlgArr,e.index,e.items),o=e.mongoData,s=e.setBid,l=o.modules_order.find((function(e){return e._id===i._id}));return t=l._id,(0,r.jsx)("div",{className:"flex flex-col justify-center py-6 capitalize",children:a&&a.map((function(e,a){return e&&(0,r.jsxs)("div",{className:"px-6 py-3 flex items-center cursor-pointer hover:text-blue-500 hover:bg-blue-50",onClick:function(){n(a,t),s(t)},children:[e.icon," ",(0,r.jsx)("span",{className:"ml-3",children:e.name})]},a)}))})},video:function(e){var t=function(e){b((function(e){return Me(e).concat([s._id])}));var t=De({},M);l().merge(t,e),t.no_of_videos=e.no_of_videos,t.layout=e.layout,O(t);var n=De({},_);l().merge(n.modules_order.find((function(e){return e._id==M._id})),t),l().merge(n.modules_order.find((function(e){return e._id==M._id})),{no_of_videos:e.no_of_videos,layout:e.layout}),v(n)},n=function(e,t){b((function(e){return Me(e).concat([s._id])}));var n=Me(B);l().merge(n.find((function(e){return e._id?e._id==t:e.tempId==t})),e);var r=n.find((function(e){return e._id?e._id==t:e.tempId==t}));l().merge(n.find((function(e){return e._id?e._id==t:e.tempId==t})),r),L(n);var a=De({},_);v(a)},i=function(e){b((function(e){return Me(e).concat([s._id])}));var t=Me(B).filter((function(t){return t._id?t._id!=e:t.tempId!=e}));L(t)},s=e.items,_=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),v=e.setMongoData,y=e.saveModule,x=e.changeArr,b=e.setChangeArr,j=e.globalSave,D=e.checkNew,P=(0,a.useState)(s),M=P[0],O=P[1],w=(0,a.useState)(M.active),A=w[0],C=w[1],T=(0,a.useState)(!1),I=T[0],S=T[1],k=(0,a.useState)(M.items),B=k[0],L=k[1],R=F.Z.Option;function W(){return U.apply(this,arguments)}function U(){return(U=Ee(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),t=["data","video_url","video_title","_id","active","no_of_videos","layout"],n=null,r={module_id:M._id,new_data:M,allowedKeys:t},e.next=6,y(r).then((function(e){n=e.error,0===e.error&&(S(!1),O(e.data),L(e.data.items),b((function(e){return e.filter((function(e){return e!==s._id}))})))}));case 6:0===n?c.ZP.success("Changes Successfully saved"):(c.ZP.error("Couldn't save the changes. Please, try again."),S(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var K=Pe(u.Z.useForm(),1)[0];return(0,a.useEffect)((function(){var e=De({},M);e.items=B,O(e);var t=De({},_);t.modules_order.find((function(e){return e._id==M._id})).items=B,v(t)}),[B]),(0,a.useEffect)((function(){D&&x.includes(s._id)&&W()}),[j]),(0,r.jsx)("div",{style:{padding:24},children:(0,r.jsxs)(u.Z,{form:K,layout:"vertical",initialValues:{remember:!0},onFinish:W,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:M.title.data,rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:M.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Event title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub-title",initialValue:M.sub_title.data,rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:M.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Event sub title"})}),(0,r.jsx)(u.Z.Item,{label:"Layout",name:"layout",children:(0,r.jsxs)(F.Z,{defaultValue:M.layout,style:{width:"100%"},onChange:function(e){console.log(e),t({layout:e})},children:[(0,r.jsx)(R,{value:"Column",children:"Column"}),(0,r.jsx)(R,{value:"Grid22",children:"2*2 Grid"}),(0,r.jsx)(R,{value:"Grid33",children:"3*3 Grid"}),(0,r.jsx)(R,{value:"Grid44",children:"4*4 Grid"})]})}),(0,r.jsx)("div",{style:{marginBottom:8},children:(0,r.jsx)(q.Z.Text,{children:"Videos"})}),B.map((function(e,t){return(0,r.jsxs)("div",{style:{backgroundColor:"#edecec",padding:6,paddingLeft:12,paddingRight:12,marginBottom:14},children:[(0,r.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"end"},children:(0,r.jsx)(ie.Z,{overlayClassName:"fixed",placement:"bottom",trigger:"click",content:(0,r.jsx)("div",{className:E().popDiv,children:(0,r.jsxs)("button",{className:"".concat(E().popCommon," ").concat(E().popDel),type:"button",onClick:function(){return e._id?i(e._id):i(e.tempId)},children:[(0,r.jsx)(Z.Xm5,{})," ",(0,r.jsx)("span",{style:{marginLeft:8},children:"Delete Video"})]})}),children:(0,r.jsx)("button",{type:"button",className:E().popButton,children:(0,r.jsx)(oe.evw,{})})})}),(0,r.jsx)(u.Z.Item,{label:"Video Url",name:"video-url-".concat(e._id?e._id:e.tempId),initialValue:e.video_url,tooltip:{title:"Currently we are accepting YouTube URL only.",icon:(0,r.jsx)(p.Z,{})},rules:[{pattern:/(?:https?:)?\/\/(?:(?:www\.))?((youtube\.com\/)|(youtu\.be)|(youtube)).+/,message:"Not valid youtube url."}],children:(0,r.jsx)(d.Z,{value:e.video_url,onChange:function(t){return n({video_url:t.target.value},e._id?e._id:e.tempId)},placeholder:"Video Url"})},t),(0,r.jsx)(u.Z.Item,{label:"Video Title",name:"video-title-".concat(e._id?e._id:e.tempId),initialValue:e.video_title,rules:[{min:5,max:50}],children:(0,r.jsx)(d.Z,{value:e.video_title,onChange:function(t){return n({video_title:t.target.value},e._id?e._id:e.tempId)},placeholder:"Video Title"})},t)]},t)})),(0,r.jsx)(h.Z,{htmlType:"button",style:{width:"100%",textAlign:"center"},onClick:function(){b((function(e){return Me(e).concat([s._id])}));var e=Me(B);e.push({video_title:"",video_url:"",tempId:(0,se.Z)()});var t=De({},M);l().merge(t.items,e),O(t);var n=De({},_);v(n)},children:"Add Video"}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:A,onChange:function(){C(!A),l().merge(M,{active:!A}),O(M);var e=De({},_);e.modules_order.find((function(e){return e._id==M._id}))||e.modules_order.push(M),e.modules_order.find((function(e){return e._id==M._id})).active=!A,v(e)},style:{marginLeft:12,backgroundColor:A?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:I&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!I&&"Save"})})]})]})})},html:function(e){var t=function(e){y((function(e){return Ie(e).concat([n._id])}));var t=Ce({},P);
1l().merge(t,e),t.html_string=e.html_string,M(t);var r=Ce({},i);l().merge(r.modules_order.find((function(e){return e._id==P._id})),t),l().merge(r.modules_order.find((function(e){return e._id==P._id})),{html_string:e.html_string}),s(r)},n=e.items,i=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,_=e.saveModule,v=e.changeArr,y=e.setChangeArr,b=e.globalSave,j=e.checkNew,D=(0,a.useState)(n),P=D[0],M=D[1],O=(0,a.useState)(P.active),w=O[0],A=O[1],C=(0,a.useState)(!1),T=C[0],I=C[1];function S(){return k.apply(this,arguments)}function k(){return(k=we(o().mark((function e(){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),t=["data","_id","active","html_string","padding","full_width"],r=null,a={module_id:P._id,new_data:P,allowedKeys:t},e.next=6,_(a).then((function(e){r=e.error,0===e.error&&(M(e.data),y((function(e){return e.filter((function(e){return e!==n._id}))})))}));case 6:0===r?(c.ZP.success("Html section changes successfully saved."),I(!1)):(c.ZP.error("Html section changes couldn't be saved. Please check the entered values"),I(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,a.useEffect)((function(){j&&v.includes(n._id)&&S()}),[b]);var B=Te(u.Z.useForm(),1)[0];return(0,r.jsx)("div",{style:{padding:24},children:(0,r.jsxs)(u.Z,{form:B,layout:"vertical",initialValues:{remember:!0},onFinish:S,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,r.jsx)(u.Z.Item,{label:"Title",name:"title",initialValue:P.title.data,tooltip:{title:"Title/Heading of about, e.g. About pH Design. This cannot be empty and should be at least 3 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:P.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Title"})}),(0,r.jsx)(u.Z.Item,{label:"Sub Title",name:"sub title",initialValue:P.sub_title.data,tooltip:{title:"A little more about your page/organization. And should be at least 5 characters long.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:100}],children:(0,r.jsx)(d.Z,{value:P.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Sub title"})}),(0,r.jsx)(u.Z.Item,{label:"HTML Code",name:"html string",initialValue:(0,x.kD)(P.html_string),tooltip:{title:"You can paste HTML code. Use style or class attribute for styling. Tailwind css is also supported in class attribute.",icon:(0,r.jsx)(p.Z,{})},rules:[{min:3,max:2e5}],children:(0,r.jsx)(d.Z.TextArea,{style:{height:280},value:(0,x.kD)(P.html_string),onChange:function(e){t({html_string:(0,x.kD)(e.target.value)})},placeholder:"Html String"})}),(0,r.jsxs)(u.Z.Item,{label:"Layout Configuration",name:"layout",tooltip:{title:"Configure the visual appearance of this section",icon:(0,r.jsx)(p.Z,{})},children:[(0,r.jsx)(V.Z,{checked:P.layout.full_width,onChange:function(e){return t({layout:{full_width:e.target.checked}})},children:"Full Width"}),(0,r.jsx)(V.Z,{checked:P.layout.padding,onChange:function(e){return t({layout:{padding:e.target.checked}})},children:"Padding"})]}),(0,r.jsxs)("div",{className:E().switchMaindiv,children:[(0,r.jsxs)("div",{className:E().divFlex,children:[(0,r.jsxs)("div",{className:E().divFlex,children:["Active",(0,r.jsx)(m.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,r.jsx)(p.Z,{style:{margin:"0 4px"}})})]}),(0,r.jsx)(f.Z,{defaultChecked:w,onChange:function(){A(!w),y((function(e){return Ie(e).concat([n._id])})),l().merge(P,{active:!w}),M(P);var e=Ce({},i);e.modules_order.find((function(e){return e._id==P._id})).active=!w,s(e)},style:{marginLeft:12,backgroundColor:w?"#3b82f6":"#d1d5db"}})]}),(0,r.jsx)(m.Z,{title:"",placement:"right",children:(0,r.jsx)(h.Z,{style:{width:80},icon:T&&(0,r.jsx)(g.Z,{}),type:"primary",htmlType:"submit",children:!T&&"Save"})})]})]})})}};function ke(e,t,n,i,o,s,l,c,_,u,d,m,f,h,p){return"undefined"!==typeof Se[e.module_type]?a.createElement(Se[e.module_type],{items:e,index:t,changeOrderDown:n,changeOrderUp:i,mongoData:o,setMongoData:s,saveModule:l,blgArr:c,setBlgArr:_,handleBlogBtn:u,changeArr:d,setChangeArr:m,globalSave:f,setBid:h,checkNew:p}):a.createElement((function(){return(0,r.jsx)("div",{className:"text-center"})}))}},23547:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(35666),a=n.n(r),i=n(85893),o=n(17054),s=n(71577),l=n(30031),c=n(24093),_=n(62986),u=(n(96486),n(67294)),d=n(57894),m=n(8193),f=n(53990),h=n(11569),p=n.n(h);function g(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function x(e){var t=e.id,n=e.mongoData,r=(0,u.useState)(null),h=r[0],g=r[1],x=(0,u.useState)({visible:!1,data:{}}),b=x[0],E=x[1];(0,u.useEffect)((function(){!function(){var e=v(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/blogs/add-author").then((function(e){return e.json()})).then((function(e){g(e.data)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[]);y(o.Z.useForm(),1)[0];return(0,i.jsxs)("div",{style:{padding:20},children:[(0,i.jsx)(d.Z,{title:"Add Author",label:"Enter Author Name",placeholder:"Enter Author Name",values:b,setAuthors:g,id:t,mongoData:n,setAuthorValues:E,cancel:function(){return E({visible:!1,data:{items:null}})},siteId:n._id,type:"author"}),h&&h.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{padding:24,width:"100%"},children:(0,i.jsx)(s.Z,{onClick:function(){return E({visible:!0,data:{items:null}})},icon:(0,i.jsx)(m.Lfi,{}),style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"Author"})})}),(0,i.jsx)(l.ZP,{style:{marginTop:16},itemLayout:"horizontal",dataSource:h,renderItem:function(e){return(0,i.jsx)(l.ZP.Item,{style:{padding:"16px 0"},actions:[(0,i.jsx)("a",{style:{color:"#60a5fa"},onClick:function(){return E({visible:!0,data:{items:e}})},children:"Edit"},"list-loadmore-edit")],children:(0,i.jsx)(l.ZP.Item.Meta,{style:{display:"flex",flexDirection:"row",alignItems:"center"},avatar:(0,i.jsx)(c.C,{src:e.avatar}),title:e.name})})}})]}):h&&0===h.length?(0,i.jsx)(_.Z,{style:{padding:24,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},description:(0,i.jsx)("p",{style:{fontSize:17},children:"Add some authors.."}),children:(0,i.jsx)(s.Z,{onClick:function(){return E({visible:!0,data:{items:null}})},icon:(0,i.jsx)(m.Lfi,{}),style:{marginTop:5,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"Author"})})}):(0,i.jsx)("div",{className:p().loaderStyleDiv,children:(0,i.jsxs)("p",{className:p().loaderStyleP,style:{fontSize:18},children:[(0,i.jsx)(f.j8h,{style:{marginRight:10},className:"animate-spin"}),"Loading Authors..."]})})]})}},91613:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(35666),a=n.n(r),i=n(85893),o=n(71577),s=n(30031),l=n(62986),c=(n(96486),n(67294)),_=n(57894),u=n(8193),d=n(53990),m=n(11569),f=n.n(m);function h(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){h(i,r,a,o,s,"next",e)}function s(e){h(i,r,a,o,s,"throw",e)}o(void 0)}))}}function g(e){var t=e.id,n=e.mongoData,r=(0,c.useState)(null),m=r[0],h=r[1],g=(0,c.useState)({visible:!1,data:{}}),v=g[0],y=g[1];return(0,c.useEffect)((function(){!function(){var e=p(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/blogs/add-category").then((function(e){return e.json()})).then((function(e){h(e.data)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[]),(0,i.jsxs)("div",{style:{padding:20},children:[(0,i.jsx)(_.Z,{title:"Add Category",label:"Enter Category Name",placeholder:"Enter Category Name",values:v,id:t,mongoData:n,setCategories:h,setCategoryValues:y,cancel:function(){return y({visible:!1,data:{items:null}})},siteId:n._id,type:"category"}),m&&m.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{padding:24,width:"100%"},children:(0,i.jsx)(o.Z,{onClick:function(){return y({visible:!0,data:{items:null}})},icon:(0,i.jsx)(u.Lfi,{}),style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"New Category"})})}),(0,i.jsx)(s.ZP,{style:{marginTop:16},itemLayout:"horizontal",dataSource:m,renderItem:function(e){return(0,i.jsx)(s.ZP.Item,{style:{padding:"16px 0"},actions:[(0,i.jsx)("a",{style:{color:"#60a5fa"},onClick:function(){return y({visible:!0,data:{items:e}})},children:"Edit"},"list-loadmore-edit")],children:(0,i.jsx)(s.ZP.Item.Meta,{title:e.name})})}})]}):m&&0===m.length?(0,i.jsx)(l.Z,{style:{padding:24,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},description:(0,i.jsx)("p",{style:{fontSize:17},children:"Add some categories.."}),children:(0,i.jsx)(o.Z,{onClick:function(){return y({visible:!0,data:{items:null}})},icon:(0,i.jsx)(u.Lfi,{}),style:{marginTop:5,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"Category"})})}):(0,i.jsx)("div",{className:f().loaderStyleDiv,children:(0,i.jsxs)("p",{className:f().loaderStyleP,style:{fontSize:18},children:[(0,i.jsx)(d.j8h,{style:{marginRight:10},className:"animate-spin"}),"Loading Categories..."]})})]})}},21599:function(e,t,n){"use strict";var r=n(35666),a=n.n(r),i=n(85893),o=n(12461),s=n(17054),l=n(68863),c=n(56266),_=n(94594),u=n(71577),d=n(45605),m=n(50888),f=n(96486),h=n.n(f),p=n(67294),g=n(11569),v=n.n(g);function y(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){y(i,r,a,o,s,"next",e)}function s(e){y(i,r,a,o,s,"throw",e)}o(void 0)}))}}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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){b(e,t,n[t])}))}return e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function D(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}t.Z=function(e){var t=function(e){P(!0),y((function(e){return D(e).concat([M._id])}));var t=E({},w);h().merge(t,e),A(t);var n=E({},r);h().merge(n.modules_order.find((function(e){return e._id==w._id})),t),f(n)},n=e.id,r=e.mongoData,f=e.setMongoData,g=e.saveModule,y=(e.changeArr,e.setChangeArr),b=(e.globalSave,e.blogChange),P=e.setBlogChange,M=r.modules_order.find((function(e){return e._id===n})),O=(0,p.useState)(M),w=O[0],A=O[1],C=(0,p.useState)(!1),T=C[0],I=C[1];(0,p.useEffect)((function(){A(M)}),[M]);var S=(0,p.useState)(M.active),k=S[0],B=S[1];function L(){return Z.apply(this,arguments)}function Z(){return(Z=x(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),t=["data","active"],n=null,r={module_id:w._id,new_data:w,allowedKeys:t},e.next=6,g(r).then((function(e){n=e.error,0===e.error&&(A(e.data),y((function(e){return e.filter((function(e){return e!=M._id}))})),P(!1))}));case 6:0===n?(o.ZP.success("Blog section changes successfully saved."),I(!1)):(o.ZP.error("Blog section changes couldn't be saved. Please check the entered values"),I(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,p.useEffect)((function(){b&&L()}),[b]);var R=j(s.Z.useForm(),1)[0];return(0,i.jsx)("div",{style:{padding:24},children:w&&(0,i.jsxs)(s.Z,{form:R,layout:"vertical",initialValues:{title:w.title.data,"sub-title":w.sub_title.data},onFinish:L,onFinishFailed:function(e){e.errorFields.map((function(e){return o.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)(s.Z.Item,{label:"Title",initialValue:w.title.data,name:"title",tooltip:{title:"A title which goes for your Events to showcase e.g. Upcoming Events. This field cannot be empty and it should have at least 3 characters",icon:(0,i.jsx)(d.Z,{})},rules:[{required:!0,min:3,max:100}],children:(0,i.jsx)(l.Z,{value:w.title.data,onChange:function(e){return t({title:{data:e.target.value}})},placeholder:"Event title"})}),(0,i.jsx)(s.Z.Item,{label:"Sub Title",name:"sub-title",initialValue:w.sub_title.data,tooltip:{title:"A little more about title e.g. Know more about events. It should have at least 5 characters.",icon:(0,i.jsx)(d.Z,{})},rules:[{min:3,max:100}],children:(0,i.jsx)(l.Z,{value:w.sub_title.data,onChange:function(e){return t({sub_title:{data:e.target.value}})},placeholder:"Event sub title"})}),(0,i.jsxs)("div",{className:v().switchMaindiv,children:[(0,i.jsxs)("div",{className:v().divFlex,children:[(0,i.jsxs)("div",{className:v().divFlex,children:["Active",(0,i.jsx)(c.Z,{title:"Control, whether you want to show the section or not on website.",children:(0,i.jsx)(d.Z,{style:{margin:"0 4px"}})})]}),(0,i.jsx)(_.Z,{defaultChecked:k,onChange:function(){B(!k),P(!0),y((function(e){return D(e).concat([M._id])})),h().merge(w,{active:!k}),A(w);var e=E({},r);e.modules_order.find((function(e){return e._id==w._id})).active=!k,f(e)},style:{marginLeft:12,backgroundColor:k?"#3b82f6":"#d1d5db"}})]}),(0,i.jsx)(c.Z,{title:"",placement:"right",children:(0,i.jsx)(u.Z,{style:{width:80},icon:T&&(0,i.jsx)(m.Z,{}),type:"primary",htmlType:"submit",children:!T&&"Save"})})]})]})})}},48115:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(12461),l=n(71230),c=n(68157),_=n(13013),u=n(71577),d=n(61834),m=n(20550),f=n(27049),h=n(62986),p=n(37446),g=n(52732),v=n(57894),y=n(34911),x=n(8193);n(96486);function b(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){b(i,r,a,o,s,"next",e)}function s(e){b(i,r,a,o,s,"throw",e)}o(void 0)}))}}function j(e){var t=e.id,n=e.mongoData,r=e.setMongoData,b=n.modules_order.find((function(e){return e._id===t})),j=(0,o.useState)(null),D=j[0],P=j[1],M=(0,o.useState)(b.items),O=M[0],w=M[1];(0,o.useEffect)((function(){P(b)}),[b]),(0,o.useEffect)((function(){D&&w(D.items)}),[D]),b.items.sort((function(e,t){var n=new Date(e.published_date),r=new Date(t.published_date);return n>r?-1:n<r?1:0}));var A=(0,o.useState)(null),C=A[0],T=A[1],I=(0,o.useState)(!1),S=I[0],k=I[1],B=(0,o.useState)({visible:!1,data:{}}),L=B[0],Z=B[1],R=(0,o.useState)({visible:!1,data:{}}),W=R[0],U=R[1],K=(0,o.useState)(null),N=(K[0],K[1],(0,o.useState)({visible:!1,
1content:null,header:""})),z=N[0],F=N[1];function V(e,t,n){return G.apply(this,arguments)}function G(){return(G=E(a().mark((function e(i,o,l){var c,_,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c={},i&&i.status&&(c.status=i.status),C&&C.status&&(c.status=C.status),o&&(c.status=o),C&&C.content&&(_=(0,g.WX)(C.content),c.content=C.content),C&&C.slug&&(c.slug=C.slug),C&&C.title&&(c.title=C.title),C&&C.featured_image&&(c.featured_image=C.featured_image,c.image_meta=C.image_meta),z.content&&(c._id=z.content),C&&C.excerpt?c.excerpt=C.excerpt:_&&(c.excerpt=_.slice(0,240)),l&&(c={},i&&i.status&&(c.status=i.status),c._id=l),u={org_id:n.organizer_id,module_id:b._id,site_id:n._id,newData:c,author:C&&C.authors?C.authors:[],category:C&&C.category?C.category:[]},e.next=15,fetch("/api/blogs/add-blog",{method:"POST",body:JSON.stringify(u),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){0===e.error?(F({visible:!1,content:null,header:""}),e.data.sort((function(e,t){var n=new Date(e.published_date),r=new Date(t.published_date);return n>r?-1:n<r?1:0})),n.modules_order.find((function(e){return e._id==t})).items=e.data,r(n),w(e.data),T(null)):s.ZP.error("Couldn't save data! Please Try Again")}));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var q=function(e){var t=e.children,n=e.extraContent;return(0,i.jsxs)(l.Z,{children:[(0,i.jsx)("div",{className:"flex-1 line-clamp-2",dangerouslySetInnerHTML:(0,g.KU)(t)}),(0,i.jsx)("div",{className:"image",children:n})]})},H=function(e){var t=e.item;return(0,i.jsx)(_.Z,{overlayClassName:"fixed",overlay:function(){return function(e){return(0,i.jsxs)(c.Z,{mode:"inline",children:[(0,i.jsx)(c.Z.Item,{children:(0,i.jsx)("a",{href:"".concat(n.sitebase,"/blog/").concat(e.slug).concat("published"!==e.status?"?preview=1":""),target:"_blank",rel:"noreferrer",children:"Preview"})},"1"),(0,i.jsx)(c.Z.Item,{onClick:function(){"published"===e.status?V({status:"draft"},null,e._id):V({status:"published"},null,e._id)},children:"draft"===e.status?"Publish":"Unpublish"},"2")]})}(t)},placement:"bottomRight",children:(0,i.jsx)(u.Z,{type:"text",icon:(0,i.jsx)(p.Z,{style:{fontSize:16}})})},"more")};return(0,i.jsxs)("div",{children:[(0,i.jsx)(y.Z,{cancel:function(){F({visible:!1,content:z.content,header:""})},ok:V,edit:z,siteId:n._id,setSaveData:T,setLoading:k,loading:S,setCategoryValues:Z,setAuthorValues:U,authorValues:W,categoryValues:L,type:"blog"}),(0,i.jsx)(v.Z,{title:"Add Category",label:"Enter Category Name",placeholder:"Enter Category Name",values:L,id:t,mongoData:n,setCategoryValues:Z,cancel:function(){return Z({visible:!1,data:{items:null}})},siteId:n._id,type:"category"}),(0,i.jsx)(v.Z,{title:"Add Author",label:"Enter Author Name",placeholder:"Enter Author Name",values:W,id:t,mongoData:n,setAuthorValues:U,cancel:function(){return U({visible:!1,data:{items:null}})},siteId:n._id,type:"author"}),O&&0!==O.length?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{padding:24,width:"100%"},children:(0,i.jsx)(u.Z,{onClick:function(){return F({visible:!0,content:null,header:"New Post"})},icon:(0,i.jsx)(x.Lfi,{}),style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"New Post"})})}),O.map((function(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Z,{title:(0,i.jsx)("h5",{className:"truncate max-w-[280px]",children:e.title}),avatar:{src:e.featured_image?e.featured_image:"https://gw.alipayobjects.com/zos/antfincdn/K%24NnlsB%26hz/pageHeader.svg",shape:"square",size:"large"},extra:[(0,i.jsx)(m.Z,{color:"published"===e.status?"green":"gold",children:e.status},"tag1"),(0,i.jsx)(u.Z,{type:"link",onClick:function(){var t;t=e._id,k(!0),F({visible:!0,content:t,header:"Edit Post"})},children:"Edit"},"btn-1"),(0,i.jsx)(H,{item:e},"more")],children:(0,i.jsx)(q,{children:e.excerpt})},e.title),(0,i.jsx)(f.Z,{style:{borderTop:"2px solid rgba(0, 0, 0, 0.08)",margin:"16px 0"}})]})}))]}):(0,i.jsx)(h.Z,{style:{padding:24,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},description:(0,i.jsx)("p",{style:{fontSize:17},children:"Write your first blog..."}),children:(0,i.jsx)(u.Z,{onClick:function(){return F({visible:!0,content:null,header:"New Post"})},icon:(0,i.jsx)(x.Lfi,{}),style:{marginTop:5,display:"flex",flexDirection:"row",alignItems:"center",width:"100%",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"New Post"})})})]})}},57894:function(e,t,n){"use strict";var r=n(35666),a=n.n(r),i=n(85893),o=n(12461),s=n(40280),l=n(17054),c=n(40655),_=n(71577),u=n(68863),d=n(24093),m=n(15394),f=n(67294),h=n(52732),p=n(89505),g=(n(96486),n(11569)),v=n.n(g);function y(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){y(i,r,a,o,s,"next",e)}function s(e){y(i,r,a,o,s,"throw",e)}o(void 0)}))}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t.Z=function(e){var t=e.values,n=(e.list,e.siteId),r=e.type,g=e.id,y=e.mongoData,E=e.setAuthors,j=e.setAuthorValues,D=e.setCategoryValues,P=e.setCategories,M=(0,f.useState)(""),O=M[0],w=M[1],A=(0,f.useState)(null),C=A[0],T=A[1],I=(0,f.useState)(null),S=I[0],k=I[1],B=(0,f.useState)(!1),L=(B[0],B[1],(0,f.useState)(!0)),Z=(L[0],L[1],(0,f.useState)(null)),R=Z[0],W=Z[1],U=(0,f.useState)(null),K=U[0],N=U[1],z=(0,f.useState)(null),F=z[0],V=z[1],G=(0,f.useState)(null),q=G[0],H=G[1],Y=(0,f.useState)({facebook:"",instagram:"",twitter:"",linkedin:""}),J=Y[0],X=Y[1],Q=(0,f.useState)(null),$=Q[0],ee=Q[1];(0,f.useEffect)((function(){t.data.items?(t.data.items.social&&X({facebook:t.data.items.social.facebook,instagram:t.data.items.social.instagram,twitter:t.data.items.social.twitter,linkedin:t.data.items.social.linkedin}),t.data.items.designation&&H(t.data.items.designation),w(t.data.items.name),T(t.data.items.slug),ee(t.data.items.slug),t.data.items.avatar?N(t.data.items.avatar):N(null),t.data.items.about?k(t.data.items.about):k("")):(w(""),T(""),k(""),H(""),X({facebook:"",instagram:"",twitter:"",linkedin:""}))}),[t.data.items]),(0,f.useEffect)((function(){$===C&&W("Slug Available")}));function te(){return(te=x(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={org_id:y.organizer_id,module_id:g,site_id:y._id,authorDetail:t},e.next=3,fetch("/api/blogs/add-author",{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){E&&E(e.data),j&&0===e.error&&j({visible:!1,data:{}})}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=x(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={org_id:y.organizer_id,module_id:g,site_id:y._id,categoryDetail:t},e.next=3,fetch("/api/blogs/add-category",{method:"POST",body:JSON.stringify({newData:n}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){P&&P(e.data),D&&0===e.error&&D({visible:!1,data:{}})}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}s.Z.Option;(0,f.useEffect)((function(){C&&T((0,h.lV)(C)),function(){var e=x(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={slug:C,id:n,type:r},e.next=3,fetch("/api/blogs/slug-check",{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){return W(e.message)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[C]),(0,f.useEffect)((function(){O?(T((0,h.lV)(O)),K&&!K.includes("ui-avatars.com")||N("https://ui-avatars.com/api/?size=200&background=random&font-size=0.35&color=4e4e4e&name=".concat(O))):(T(""),N(null))}),[O]);var re=b(l.Z.useForm(),1)[0];return(0,i.jsx)(c.Z,{centered:!0,closable:!1,title:e.title,visible:t.visible,footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_.Z,{className:v().cancelButton,onClick:e.cancel,children:"Cancel"}),(0,i.jsx)(_.Z,{className:v().publishButton,onClick:function(){if("Slug Not Available"===R)o.ZP.error("Slug Not Available");else{var e={};O&&(e.name=O),S&&(e.about=S),C&&(e.slug=C),t.data.items&&t.data.items._id&&(e.id=t.data.items._id),K&&(e.avatar=K),F&&(e.image_meta=F),q&&(e.designation=q),J&&(e.social=J),"category"===r?function(e){ne.apply(this,arguments)}(e):function(e){te.apply(this,arguments)}(e)}},children:"Save"})]}),children:(0,i.jsxs)(l.Z,{initialValues:{remember:!0},form:re,layout:"vertical",children:[(0,i.jsx)(l.Z.Item,{label:"Name",initialValue:O,children:(0,i.jsx)(u.Z,{value:O,onChange:function(e){return w(e.target.value)},placeholder:e.placeholder})}),O&&(0,i.jsx)(l.Z.Item,{label:"Slug",initialValue:C,help:R&&C&&(0,i.jsx)(m.Z,{type:"Slug Available"!==R&&"warning",children:"Slug Available"!==R&&R}),children:(0,i.jsx)(u.Z,{value:C,onChange:function(e){return T(e.target.value)},placeholder:"Enter Slug"})}),"author"===r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z.Item,{label:"About",initialValue:S,children:(0,i.jsx)(u.Z.TextArea,{value:S,onChange:function(e){return k(e.target.value)},placeholder:"Enter About"})}),(0,i.jsx)(l.Z.Item,{label:"Designation",initialValue:q,children:(0,i.jsx)(u.Z,{value:q,onChange:function(e){return H(e.target.value)},placeholder:"Enter Designation"})}),(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:16},children:[(0,i.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:(0,i.jsx)(d.C,{style:{width:"60px",height:"60px"},src:K})}),(0,i.jsx)(_.Z,{htmlType:"button",style:{width:"100%",marginTop:8,textAlign:"center"},onClick:function(){(0,p.Z)((function(e,t){V(t),N(e)}),n,300)},children:"Change Avatar"}
1),K&&!K.includes("ui-avatars.com")&&(0,i.jsx)(_.Z,{htmlType:"button",style:{width:"100%",marginTop:8,textAlign:"center"},onClick:function(){N("https://ui-avatars.com/api/?size=200&background=random&font-size=0.35&color=4e4e4e&name=".concat(O))},children:"Remove Avatar"})]})]})]})})}},34911:function(e,t,n){"use strict";var r=n(35666),a=n.n(r),i=n(85893),o=n(40280),s=n(12461),l=n(40655),c=n(71577),_=n(17054),u=n(68863),d=n(37306),m=n(56266),f=n(27049),h=n(26713),p=n(67294),g=n(19942),v=n(50888),y=n(45605),x=n(24969),b=n(15394),E=n(52732),j=n(89505),D=n(53990),P=n(11569),M=n.n(P);function O(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){O(i,r,a,o,s,"next",e)}function s(e){O(i,r,a,o,s,"throw",e)}o(void 0)}))}}function A(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var C=function(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Z.Title,{level:5,children:e.typoTitle}),(0,i.jsx)(o.Z,{dropdownRender:function(t){return(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsx)(f.Z,{style:{margin:"8px 0"}}),(0,i.jsx)(c.Z,{icon:(0,i.jsx)(x.Z,{}),onClick:e.onClick,style:{width:"100%",height:"100%",border:"none",display:"flex",flexDirection:"row",alignItems:"center"},children:(0,i.jsx)("span",{children:e.addBtn})})]})},mode:"multiple",maxTagCount:"responsive",value:e.value,placeholder:e.placeholder,className:"w-full bg-green-400",onChange:e.selChange,children:e.selContent})]})};t.Z=function(e){var t=e.edit,n=(e.blogId,e.siteId),r=(e.title,e.type),x=e.setSaveData,P=e.setAuthorValues,O=e.setCategoryValues,T=e.authorValues,I=e.categoryValues,S=e.loading,k=e.setLoading,B=(0,p.useState)(null),L=B[0],Z=B[1],R=(0,p.useState)(null),W=R[0],U=R[1],K=(0,p.useState)(null),N=K[0],z=K[1],F=(0,p.useState)(null),V=F[0],G=F[1],q=(0,p.useState)(""),H=q[0],Y=q[1],J=(0,p.useState)(""),X=J[0],Q=J[1],$=(0,p.useState)(""),ee=$[0],te=$[1],ne=(0,p.useState)(""),re=ne[0],ae=ne[1],ie=(0,p.useState)(""),oe=ie[0],se=ie[1],le=(0,p.useState)(null),ce=le[0],_e=le[1],ue=(0,p.useState)(null),de=ue[0],me=ue[1],fe=(0,p.useState)([]),he=fe[0],pe=fe[1],ge=(0,p.useState)([]),ve=ge[0],ye=ge[1],xe=(0,p.useState)(null),be=xe[0],Ee=xe[1],je=(0,p.useState)({draft:!1,publish:!1}),De=je[0],Pe=je[1];(0,p.useEffect)((function(){W&&W._id==t.content?k(!1):(pe([]),ye([]))}),[S,t.content]),(0,p.useEffect)((function(){t.content?function(){var e=w(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/blogs/".concat(t.content)).then((function(e){return e.json()})).then((function(e){Pe({draft:!1,publish:!1}),U(e.data),z(e.authors),G(e.categories),W&&W._id!=t.content?(Y(e.data.title),te(e.data.content),ae(e.data.slug),se(e.data.status),e.data.featured_image?_e(e.data.featured_image):_e(null),e.data.excerpt?Q(e.data.excerpt):Q("")):W||(Y(e.data.title),te(e.data.content),ae(e.data.slug),se(e.data.status),e.data.featured_image?_e(e.data.featured_image):_e(null),e.data.excerpt?Q(e.data.excerpt):Q("")),Ee(e.data.slug),k(!1)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()():(k(!1),function(){var e=w(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/blogs/add-author").then((function(e){return e.json()})).then((function(e){z(e.data)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),function(){var e=w(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/blogs/add-category").then((function(e){return e.json()})).then((function(e){G(e.data)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()())}),[t.content,T,I]),(0,p.useEffect)((function(){"New Post"===t.header&&(pe([]),ye([]),Y(""),Q(""),te(""),ae(""),se(""),_e(null),me(null),Pe({draft:!1,publish:!1}))}),[t.header]);var Me=[];N&&N.map((function(e){Me.push((0,i.jsx)(o.Z.Option,{value:e._id,children:e.name},e._id))})),(0,p.useEffect)((function(){he.length<1&&N&&"Edit Post"===t.header&&N.map((function(e){W&&W.authors.map((function(t){e._id===t._id&&pe((function(t){return A(t).concat([e._id])}))}))}))}),[N,t.header]);var Oe=[];V&&V.map((function(e){Oe.push((0,i.jsx)(o.Z.Option,{value:e._id,children:e.name},e._id))})),(0,p.useEffect)((function(){ve.length<1&&V&&"Edit Post"===t.header&&V.map((function(e){W&&W.categories.map((function(t){e._id===t._id&&ye((function(t){return A(t).concat([e._id])}))}))}))}),[V,t.header]),(0,p.useEffect)((function(){be===re&&Z("Slug Available")})),(0,p.useEffect)((function(){re&&ae((0,E.lV)(re)),function(){var e=w(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={slug:re,id:n,type:r},e.next=3,fetch("/api/blogs/slug-check",{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){return Z(e.message)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[re]),(0,p.useEffect)((function(){ae(H?(0,E.lV)(H):"")}),[H]),(0,p.useEffect)((function(){x({status:oe,excerpt:X,content:ee,slug:re,title:H,authors:he,featured_image:ce,image_meta:de,category:ve})}),[oe,ee,re,H,he,ve,ce,X]);var we=function(t){if("Slug Not Available"===L)s.ZP.error("Slug Not Available");else{if(!H)return void s.ZP.error("Blog Title is Required");if(H.length<3||H.length>249)return void s.ZP.error("Blog Title length should be between 3 and 250 characters");if(!re)return void s.ZP.error("Slug is Required");
1if(!he||he.length<1)return void s.ZP.error("Author is Required");Pe("draft"===t?{draft:!0,publish:!1}:{draft:!1,publish:!0}),e.ok(W,t)}};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(l.Z,{width:1200,style:{position:"relative"},centered:!0,bodyStyle:{padding:6},closable:!1,title:t.header,visible:t.visible,footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.Z,{className:M().cancelButton,onClick:e.cancel,children:"Cancel"}),!S&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.Z,{className:M().draftButton,style:{width:120},onClick:function(){we("draft")},icon:De.draft&&(0,i.jsx)(v.Z,{}),children:!De.draft&&"Save as Draft"}),(0,i.jsx)(c.Z,{className:M().publishButton,style:{width:80},onClick:function(){we("published")},icon:De.publish&&(0,i.jsx)(v.Z,{}),children:!De.publish&&("draft"===oe||""===oe?"Publish":"Save")})]})]}),children:S?(0,i.jsx)("div",{style:{height:"100%"},children:(0,i.jsxs)("p",{className:M().loaderStyleP,style:{fontSize:18},children:[(0,i.jsx)(D.j8h,{style:{marginRight:10},className:"animate-spin"}),"Loading Post"]})}):(0,i.jsxs)("div",{className:"flex flex-col lg:flex-row",children:[(0,i.jsx)("div",{className:"py-2 px-5 lg:w-[65%]",children:(0,i.jsxs)(_.Z,{children:[(0,i.jsx)(_.Z.Item,{initialValue:H,children:(0,i.jsx)(u.Z,{className:"px-0 text-2xl hover:bg-gray-100",bordered:!1,size:"large",value:H,onChange:function(e){return Y(e.target.value)},placeholder:"Add Title..."})}),H&&(0,i.jsx)(_.Z.Item,{label:"Slug",help:L&&re&&(0,i.jsx)(b.Z,{type:"Slug Available"!==L&&"warning",children:"Slug Available"!==L&&L}),initialValue:re,children:(0,i.jsx)(u.Z,{placeholder:"Post Slug",bordered:!1,value:re,onChange:function(e){return ae(e.target.value)},className:"hover:bg-gray-100"})}),(0,i.jsx)(g.Z,{editor:ee,change:function(e){te(e)}}),(0,i.jsxs)(d.Z.Title,{className:"flex items-center gap-1 mt-2 w-fit ",level:5,children:["Excerpt",(0,i.jsx)(m.Z,{placement:"right",title:"Excerpt is an optional text associated to a Post. Most of the time, it is used as the Post summary",children:(0,i.jsx)(y.Z,{className:"text-sm text-gray-600"})})]}),(0,i.jsx)(_.Z.Item,{initialValue:X,children:(0,i.jsx)(u.Z.TextArea,{className:"px-0 pt-1 pl-4 -mt-1 text-md",size:"small",value:X,onChange:function(e){return Q(e.target.value)},placeholder:"Add Excerpt"})})]})}),(0,i.jsxs)("div",{className:"lg:w-[35%] px-5 pb-3 lg:py-3 lg:border-l border-gray-200",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(d.Z.Title,{level:5,children:"Featured Image"}),ce&&(0,i.jsx)("div",{style:{width:"320px",height:"160px",backgroundImage:"url(".concat(ce,")"),backgroundColor:"#e5e7eb",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"center"}}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(c.Z,{onClick:function(){(0,j.Z)((function(e,t){me(t),_e(e)}),n,1100)},htmlType:"button",className:"text-center ".concat(ce&&"mt-5"),children:ce?"Change Image":"Upload Image"}),ce&&(0,i.jsx)(c.Z,{onClick:function(){_e(null)},htmlType:"button",className:"text-center ".concat(ce&&"mt-5"),children:"Remove Image"})]})]}),(0,i.jsx)(f.Z,{}),(0,i.jsxs)(h.Z,{direction:"vertical",size:"middle",style:{display:"flex"},children:[(0,i.jsx)("div",{children:(0,i.jsx)(C,{typoTitle:"Authors",addBtn:"Add New Author",onClick:function(){P({visible:!0,data:{items:null}})},value:he,placeholder:"Select Author",selChange:function(e){pe(e)},selContent:Me})}),(0,i.jsx)("div",{children:(0,i.jsx)(C,{typoTitle:"Categories",addBtn:"Add New Category",onClick:function(){O({visible:!0,data:{items:null}})},value:ve,placeholder:"Select Category",selChange:function(e){return ye(e)},selContent:Oe})})]})]})]})})})}},13767:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(96486),l=n.n(s),c=(n(11163),n(12461)),_=n(17054),u=n(68863),d=n(71577),m=n(45605),f=n(50888),h=n(89505),p=n(89583),g=n(11569),v=n.n(g);function y(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){y(i,r,a,o,s,"next",e)}function s(e){y(i,r,a,o,s,"throw",e)}o(void 0)}))}}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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){b(e,t,n[t])}))}return e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function D(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function P(e){var t=function(e){P((function(e){return D(e).concat(["Logo"])}));var t=E({},C);l().merge(t,e),T(t);var n=E({},g);l().merge(n.business,t),y(n)},n=function(e){(0,h.Z)((function(t,n){"cover"===e&&(F(n),K(t)),"favicon"===e&&(J(n),q(t)),P((function(e){return D(e).concat(["Logo"])}))}),B,"cover"===e?150:48,1,"favicon"===e&&{height:48,resize_strategy:"crop"})},r=function(e,t){if(P((function(e){return D(e).concat(["Logo"])})),e){var n=E({},C);"cover"===t&&(l().merge(n,{business_logo:null}),K(null)),"favicon"===t&&(l().merge(n,{favicon:null}),q("https://allevents.in/favicon.png")),T(n);var r=E({},g);l().merge(r.business,n),y(r)}},s=e.items,g=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),y=e.setMongoData,b=e.saveModule,P=e.setCustomizeArr,M=e.customizeArr,O=e.globalSave,w=e.checkNew,A=(0,o.useState)(s),C=A[0],T=A[1],I=(0,o.useState)(!1),S=I[0],k=I[1],B=g._id;function L(){return Z.apply(this,arguments)}function Z(){return(Z=x(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),t=null,n=["business_name","business_logo","_id","favicon","aspect_ratio","average_color","colorspace","date_file_modified","frame_count","has_clipping_path","has_transparency","height","orientation","width"],r={new_data:{business:E({},C)},allowedKeys:n},e.next=6,b(r).then((function(e){T(e.data.business),t=e.error}));case 6:0===t?(c.ZP.success("Logo changes successfully saved"),k(!1),P((function(e){return e.filter((function(e){return"Logo"!==e}))}))):(c.ZP.error("Logo changes couldn't be saved. Please check the entered values"),k(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){w&&M.includes("Logo")&&L()}),[O]);var R=j(_.Z.useForm(),1)[0],W=(0,o.useState)(C.business_logo),U=W[0],K=W[1],N=(0,o.useState)(C.business_logo_meta),z=N[0],F=N[1],V=(0,o.useState)(C.favicon),G=V[0],q=V[1],H=(0,o.useState)(C.favicon_meta),Y=H[0],J=H[1];(0,o.useEffect)((function(){if(U){var e=E({},C);l().merge(e,{business_logo:U,business_logo_meta:z}),T(e);var t=E({},g);l().merge(t.business,e),y(t)}}),[U]),(0,o.useEffect)((function(){if(G){var e=E({},C);l().merge(e,{favicon:G,favicon_meta:Y}),T(e);var t=E({},g);l().merge(t.business,e),y(t)}}),[G]);return(0,i.jsx)("div",{style:{padding:24},children:(0,i.jsxs)(_.Z,{form:R,layout:"vertical",initialValues:{remember:!0},onFinish:L,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)(_.Z.Item,{label:"Business Name",name:"business name",initialValue:C.business_name,tooltip:{title:"Business Name if you are not using logo image.",icon:(0,i.jsx)(m.Z,{})},rules:[{required:!0}],children:(0,i.jsx)(u.Z,{value:C.business_name,onChange:function(e){return t({business_name:e.target.value})},placeholder:"Business Name"})}),(0,i.jsx)(_.Z.Item,{label:"Logo Text",name:"logoText",initialValue:C.logo_text,tooltip:{title:"Logo text if you are not using logo image.",icon:(0,i.jsx)(m.Z,{})},rules:[{required:!U}],children:(0,i.jsx)(u.Z,{value:C.logo_text,onChange:function(e){return t({logo_text:e.target.value})},placeholder:"Logo text"})}),(0,i.jsxs)(_.Z.Item,{label:"Logo",name:"logo",initialValue:U,tooltip:{title:"Landscape logo images looks best. If you are using landscape Logo, you may remove 'Logo Text'.",icon:(0,i.jsx)(m.Z,{})},rules:[{pattern:/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png|jpeg|tiff|webp|svg)/,message:"Must be a valid image url."}],children:[U&&(0,i.jsxs)("div",{children:[(0,i.jsx)("img",{style:{position:"relative",marginBottom:8,minHeight:24,maxHeight:55},src:U,alt:"Banner Image"}),(0,i.jsxs)("button",{type:"button",className:v().businessLogoButton,onClick:function(){return r(U,"cover")},children:[(0,i.jsx)(p.Xm5,{})," ",(0,i.jsx)("span",{style:{marginLeft:8},children:"Delete Logo"})]})]}),(0,i.jsx)(d.Z,{htmlType:"button",style:{width:"100%",textAlign:"center"},onClick:function(){return n("cover")},children:"Update Logo"})]}
1),(0,i.jsxs)(_.Z.Item,{label:"Favicon",name:"favicon",initialValue:G,tooltip:{title:"Favicon is a small icon placed in top of a browser tab.",icon:(0,i.jsx)(m.Z,{})},rules:[{pattern:/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png|jpeg|tiff|webp)/,message:"Must be a valid image url."}],children:[G&&(0,i.jsxs)("div",{children:[(0,i.jsx)("img",{style:{position:"relative",marginBottom:8,minHeight:24,maxHeight:55},src:G,alt:"Favicon Image"}),"https://allevents.in/favicon.png"!==G&&(0,i.jsxs)("button",{type:"button",className:v().businessLogoButton,onClick:function(){return r(G,"favicon")},children:[(0,i.jsx)(p.Xm5,{})," ",(0,i.jsx)("span",{style:{marginLeft:8},children:"Default Favicon"})]})]}),(0,i.jsx)(d.Z,{htmlType:"button",style:{width:"100%",textAlign:"center",marginTop:10},onClick:function(){return n("favicon")},children:"Update Favicon"})]}),(0,i.jsx)("div",{className:v().saveButtonDiv,children:(0,i.jsx)(d.Z,{style:{width:80},icon:S&&(0,i.jsx)(f.Z,{}),type:"primary",htmlType:"submit",children:!S&&"Save"})})]})})}},75300:function(e,t,n){"use strict";n.d(t,{H:function(){return l},W:function(){return c}});var r=n(85893),a=n(18453),i=n(26713),o=(n(67294),n(97937)),s=n(47516),l=function(e){return(0,r.jsx)(a.Z,{push:0,width:e.width,title:e.name,headerStyle:{textTransform:"capitalize",backgroundColor:"#fff",color:"rgba(0,0,0,0.85)"},placement:"left",visible:e.visible,onClose:e.close,closable:!1,maskStyle:{opacity:0,background:"transparent"},extra:(0,r.jsx)(i.Z,{children:(0,r.jsx)(o.Z,{style:{color:"rgba(0,0,0,0.45)"},onClick:e.extraClose})}),getContainer:!1,style:{position:"fixed",left:e.collapsed?80:200,overflow:"hidden"},bodyStyle:{padding:0,backgroundColor:"#fff",color:"rgba(0,0,0,0.85)"},children:e.desc})},c=function(e){return(0,r.jsx)(a.Z,{push:0,width:e.width,title:e.name,headerStyle:{textTransform:"capitalize",backgroundColor:"#fff",color:"rgba(0,0,0,0.85)"},extra:e.extra,placement:"left",visible:e.visible,onClose:e.close,closeIcon:(0,r.jsx)(s.YiX,{style:{color:"black"}}),maskStyle:{opacity:0,background:"transparent"},getContainer:!1,style:{position:"fixed",left:e.collapsed?80:200,overflow:"hidden"},bodyStyle:{padding:0,backgroundColor:"#fff",color:"rgba(0,0,0,0.85)"},children:e.desc})}},963:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(96486),l=n.n(s),c=(n(11163),n(37306)),_=n(54907),u=n(12461),d=n(17054),m=n(68863),f=n(71577),h=n(45605),p=n(50888),g=n(5434),v=n(74463),y=n(52732);function x(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){x(i,r,a,o,s,"next",e)}function s(e){x(i,r,a,o,s,"throw",e)}o(void 0)}))}}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function P(e){var t=e.items,n=e.mongoData,r=e.setMongoData,s=e.saveModule,x=(0,o.useState)(t),E=x[0],P=x[1],M=(0,o.useState)(!1),O=M[0],w=M[1],A=(0,o.useState)(!1),C=A[0],T=A[1],I=c.Z.Paragraph,S=c.Z.Text,k=_.Z.Panel,B=(0,o.useState)(null),L=(B[0],B[1]),Z=(0,o.useState)(!1);Z[0],Z[1];function R(){return(R=b(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w(!0),t=0,r=(0,y.FD)(n.organizer_id,"domain"),0!==t){e.next=8;break}return e.next=6,fetch("/api/dnscheck",{method:"POST",body:JSON.stringify({url:"https://".concat(E.domaintolink)}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then(b(a().mark((function e(i){var o,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.pointed){e.next=8;break}return(o=E).dnsStatus="Pointed",e.next=5,fetch("/api/activate_custom_domain",{method:"POST",body:JSON.stringify({organizer_id:n.organizer_id,domain:E.domaintolink}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then(b(a().mark((function e(n){var r,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.error,0!==n.error){e.next=9;break}return o.activated="success",r=["domaintolink"],i={new_data:{custom_domain:j({},E,{is_active:!0})},allowedKeys:r},e.next=7,s(i).then((function(e){t=e.error,0===e.error&&(P(e.data),L(e.data.custom_domain.domaintolink),u.ZP.success("Your website will be soon accessible with https://".concat(E.domaintolink)))}));case 7:e.next=10;break;case 9:o.activated="failed",u.ZP.error("Unable to activate the domain");case 10:case"end":return e.stop()}}),e)})))).catch((function(e){o.activated="failed",u.ZP.error("Unable to activate the domain")}));case 5:P(o),e.next=9;break;case 8:(l=E).dnsStatus="Not Pointed",P(l),u.ZP.warning("Please point dns to 157.230.203.175");case 9:r.push_with_attachment("Custom Domain Submitted",E,"#wootick-custom-domain","wootick-bot","",!0);case 10:case"end":return e.stop()}}),e)})))).catch((function(e){return console.log(e),!1})).finally((function(){return w(!1)}));case 6:e.next=9;break;case 8:u.ZP.error("Couldn't save the changes. Please, try again."),w(!1);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){E.domaintolink&&L(E.domaintolink)}),[]);var W=D(d.Z.useForm(),1)[0];return(0,i.jsxs)("div",{style:{padding:24},children:[(0,i.jsx)(I,{children:"Please follow these steps to link your domain with this website so your customer can access this website by visiting your domain. "}),(0,i.jsx)(S,{strong:!0,children:"Step 1"}),(0,i.jsx)("div",{style:{marginTop:10,marginBottom:15},children:(0,i.jsxs)(_.Z,{defaultActiveKey:["1"],accordion:!0,children:[(0,i.jsxs)(k,{header:(0,i.jsx)("span",{style:{fontWeight:500}
1,children:"Standard Instructions"}),expandIcon:function(e){var t=e.isActive;return(0,i.jsx)(g.Nhx,{rotate:t?90:0})},children:[(0,i.jsx)(I,{style:{color:"black",fontSize:16},children:"Please follow these steps to update DNS settings of your domain:"}),(0,i.jsxs)("ol",{style:{marginTop:16,listStyleType:"decimal",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Sign in to your domain provider and go to your Domain Settings or name server settings (DNS settings). "}),(0,i.jsx)("li",{children:'Remove any existing "A Record"'}),(0,i.jsxs)("li",{children:['Add a new "A Record" with the following parameters:',(0,i.jsxs)("ol",{style:{marginLeft:16,listStyleType:"disc",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Type: A"}),(0,i.jsx)("li",{children:"Host: @"}),(0,i.jsx)("li",{children:"Value: 157.230.203.175"}),(0,i.jsx)("li",{children:"TTL: 600 seconds"})]})]})]})]},"1"),(0,i.jsxs)(k,{header:(0,i.jsx)("span",{style:{fontWeight:500},children:"Wix"}),children:[(0,i.jsx)(I,{style:{color:"black",fontSize:16},children:"Please follow these steps to update DNS settings of your domain:"}),(0,i.jsxs)("ol",{style:{marginTop:16,listStyleType:"decimal",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Sign in to your Wix account and go to your Domain Settings."}),(0,i.jsx)("li",{children:"Delete all the existing settings from the list of A Records."}),(0,i.jsx)("li",{children:"Delete all the existing settings from the list of CNAME Records."}),(0,i.jsx)("li",{children:"Delete all the existing settings from the list of A Records."}),(0,i.jsxs)("li",{children:["Add a new A Record with the following parameters:",(0,i.jsxs)("ol",{style:{marginLeft:16,listStyleType:"disc",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Host: Blank (Leave empty)"}),(0,i.jsx)("li",{children:"Value: 157.230.203.175"}),(0,i.jsx)("li",{children:"TTL: 600 seconds"})]})]}),(0,i.jsxs)("li",{children:["Add another A Record with the following parameters:",(0,i.jsxs)("ol",{style:{marginLeft:16,listStyleType:"disc",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Host: www"}),(0,i.jsx)("li",{children:"Value: 157.230.203.175"}),(0,i.jsx)("li",{children:"TTL: 600 seconds"})]})]})]})]},"2"),(0,i.jsxs)(k,{header:(0,i.jsx)("span",{style:{fontWeight:500},children:"GoDaddy"}),children:[(0,i.jsx)(I,{style:{color:"black",fontSize:16},children:"Please follow these steps to update DNS settings of your domain:"}),(0,i.jsxs)("ol",{style:{marginTop:16,listStyleType:"decimal",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Sign in to your GoDaddy Domain Control Center."}),(0,i.jsx)("li",{children:"Select your domain to access the Domain Settings page."}),(0,i.jsx)("li",{children:"Select Manage DNS to access your zone file."}),(0,i.jsx)("li",{children:"Select Edit next to the A record you want to edit."}),(0,i.jsxs)("li",{children:["Edit the details for your A record:",(0,i.jsxs)("ol",{style:{marginLeft:16,listStyleType:"disc",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Name: The host name for the A record. Type @ to put the A record on your root domain, or enter a subdomain prefix such as www."}),(0,i.jsx)("li",{children:"Value: 157.230.203.175"}),(0,i.jsx)("li",{children:"TTL: 600 seconds"})]})]}),(0,i.jsx)("li",{children:"Select Save to complete your changes."})]})]},"3"),(0,i.jsxs)(k,{header:(0,i.jsx)("span",{style:{fontWeight:500},children:"Video Instruction (GoDaddy)"}),children:[(0,i.jsx)(I,{style:{color:"black",fontSize:16},children:"Please follow these steps to update DNS settings of your domain:"}),(0,i.jsx)("iframe",{id:"god_video",src:"https://player.vimeo.com/video/787865132?h=2a0230cb35&title=0&byline=0&portrait=0&speed=0&badge=0&autopause=0&player_id=0&app_id=58479",width:"100%",height:"100%",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,title:"Connect Domain to Wootick website"})]},"4"),(0,i.jsxs)(k,{header:(0,i.jsx)("span",{style:{fontWeight:500},children:"WordPress"}),children:[(0,i.jsx)(I,{style:{color:"black",fontSize:16},children:"Please follow these steps to update DNS settings of your domain:"}),(0,i.jsxs)("ol",{style:{marginTop:16,listStyleType:"decimal",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"From your dashboard, click on Upgrades \u2192 Domains."}),(0,i.jsx)("li",{children:"Click on the domain name you wish to connect to a new host.:"}
1),(0,i.jsx)("li",{children:"Next, click on DNS records:"}),(0,i.jsx)("li",{children:"Click Manage, and the next page will show you a list of existing DNS records for that domain."}),(0,i.jsx)("li",{children:"To add a new A record, click the Add a record button at the top right."}),(0,i.jsx)("li",{children:"Select A in the Type dropdown box:"}),(0,i.jsxs)("li",{children:["Edit the details for your A record:",(0,i.jsxs)("ol",{style:{marginLeft:16,listStyleType:"disc",listStylePosition:"inside"},children:[(0,i.jsx)("li",{children:"Name: The host name for the A record. Type @ to put the A record on your root domain, or enter a subdomain prefix such as www."}),(0,i.jsx)("li",{children:"Value: 157.230.203.175"}),(0,i.jsx)("li",{children:"TTL: 600 seconds"})]})]})]})]},"5")]})}),(0,i.jsx)("div",{style:{marginTop:32},children:(0,i.jsx)(S,{strong:!0,children:"Step 2"})}),(0,i.jsx)("ul",{style:{marginTop:16},children:(0,i.jsx)("li",{children:"Once you have updated the settings, please add your domain here and click on Save."})}),E.is_active?(0,i.jsx)("div",{children:(0,i.jsxs)(I,{children:["Domain already active -",(0,i.jsx)(S,{type:"success",children:E.domaintolink})]})}):(0,i.jsxs)(d.Z,{form:W,layout:"vertical",initialValues:{remember:!0},onFinish:function(){return R.apply(this,arguments)},onFinishFailed:function(e){e.errorFields.map((function(e){return u.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)("div",{children:(0,i.jsx)(d.Z.Item,{label:"Your Domain Name",name:"custom domain",initialValue:E.domaintolink,tooltip:{title:"Custom Domain",icon:(0,i.jsx)(h.Z,{})},rules:[{pattern:/^(([a-z]{1})|([a-z]{1}[a-z]{1})|([a-z]{1}[0-9]{1})|([0-9]{1}[a-z]{1})|([a-z0-9][a-z0-9-_]{1,61}[a-z0-9]))\.([a-z]{2,6}|[a-z0-9-]{2,30}\.[a-z]{2,3})$/,message:"Must be a valid domain."}],children:(0,i.jsx)(m.Z,{addonBefore:"https://",style:{padding:"6px"},value:E.domaintolink,onChange:function(e){return function(e){e.domaintolink.match(/^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\.[a-zA-Z]{2,3})$/)?T(!0):T(!1);var t=j({},E);l().merge(t,e),P(t);var a=j({},n);l().merge(a.custom_domain,t),r(a)}({domaintolink:e.target.value})},placeholder:"yourwebsitename.com"})})}),(0,i.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"end"},children:(0,i.jsx)(f.Z,{style:{width:64},disabled:!1===C,icon:O&&(0,i.jsx)(p.Z,{}),htmlType:"submit",type:"primary",children:!O&&"Save"})})]}),(0,i.jsxs)("div",{style:{padding:"0 8px",marginTop:24,overflow:"hidden",borderLeftWidth:4,borderLeftColor:"#16a34a"},children:[(0,i.jsx)(I,{children:"Please note that it may take up to 48 hours for your domain's new DNS records to propagate and your site to appear worldwide."}),(0,i.jsx)(I,{children:"In case you need help, please write to us at [email protected]."})]}),(0,i.jsx)("div",{style:{marginTop:24},children:(0,i.jsxs)(I,{children:[(0,i.jsx)("h5",{children:"What if I don't have a domain?"}),"You can purchase a new domain name from \xa0",(0,i.jsx)(v.A,{link:"https://www.godaddy.com/",description:"GoDaddy",theme:n.theme}),",\xa0",(0,i.jsx)(v.A,{link:"https://www.bigrock.in/",description:"BigRock",theme:n.theme})," or any provider of your choice."]})}),(0,i.jsxs)(I,{children:["However, you can always access this website using our subdomain :\xa0",(0,i.jsx)(v.A,{link:n.sitebase,description:n.sub_domain?"".concat(n.sub_domain,".wootick.com"):"ae-test.wootick.com",theme:n.theme})]})]})}},88085:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=(n(96486),n(37306)),l=n(12461),c=n(17054),_=n(68863),u=n(71577),d=n(45605),m=n(50888),f=n(52732);function h(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){h(i,r,a,o,s,"next",e)}function s(e){h(i,r,a,o,s,"throw",e)}o(void 0)}))}}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 v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(e){var t=function(e){e.match(/^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z0-9]$/)?S(!0):S(!1),D(e);var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e}({},n);t.sub_domain=e,r(t)},n=e.mongoData,r=e.setMongoData,h=e.saveModule,y=(0,o.useState)(e.items),x=y[0],b=y[1],E=(0,o.useState)(x),j=E[0],D=E[1],P=(0,o.useState)(null),M=P[0],O=P[1],w=(0,o.useState)(!1),A=w[0],C=w[1],T=(0,o.useState)(!1),I=T[0],S=T[1],k=(0,o.useState)(!1),B=k[0],L=k[1],Z=(n._id,s.Z.Paragraph),R=s.Z.Text;function W(){return(W=p(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C(!0),t=null,r={new_data:{sub_domain:j},allowedKeys:["sub_domain"]},(0,f.FD)(n.organizer_id,"domain").push_with_attachment("Subdomain Submitted",j,"#wootick","wootick-bot","",!0),e.t0=j.length>0,!e.t0){e.next=10;break}return e.next=10,h(r).then((function(e){t=e.error,0===e.error&&(D(e.data.sub_domain),b(e.data.sub_domain)),0===t?(l.ZP.success("Changes Successfully saved"),C(!1),L(!0)):(l.ZP.error("Couldn't save the changes. Please, try again."),C(!1))}));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){j&&function(){var e=p(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/get-uniqueSite",{method:"POST",body:JSON.stringify({subDomain:(0,f.lV)(j)}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){return O(e.message)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[j]);var U=v(c.Z.useForm(),1)[0];return(0,i.jsx)("div",{style:{padding:24},children:B?(0,i.jsxs)("div",{style:{marginTop:16},children:[(0,i.jsx)(Z,{style:{fontSize:"18px"},children:(0,i.jsx)("p",{children:"Your website is accessible from -"})}),(0,i.jsx)("a",{href:"https://".concat(n.sub_domain,".wootick.com"),children:(0,i.jsxs)("h4",{children:["https://",n.sub_domain,".wootick.com"]})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{padding:"0 8px",overflow:"hidden",borderLeftWidth:4,borderLeftColor:"#16a34a"},children:(0,i.jsx)(Z,{children:"Get-started with Wootick by reserving free subdomain name for your Wootick website URL."})}),(0,i.jsx)("div",{style:{marginTop:16},children:(0,i.jsxs)(Z,{style:{fontSize:"18px"},children:[(0,i.jsx)(R,{children:j||"yoursite"}),".wootick.com"]})}),(0,i.jsx)(c.Z,{autoComplete:"off",style:{marginTop:24},form:U,layout:"vertical",initialValues:{remember:!0},onFinish:function(){return W.apply(this,arguments)},onFinishFailed:function(e){e.errorFields.map((function(e){return l.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:(0,i.jsxs)("div",{children:[(0,i.jsx)(c.Z.Item,{label:"Your Subdomain",name:"Sub domain",initialValue:j,tooltip:{title:"Write your name or organization name(if org name is too big don't write full org name, short version of org name will go perfectly). And your sub domain already contain '.wootick.com' so don't add anything else other than your name or org name(don't add '. or - or any special character' in starting or ending of your name or org name). ",icon:(0,i.jsx)(d.Z,{}),placement:"right"},rules:[{pattern:/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,message:"Subdomain must only contain small alphabets, can only have '-' in the between the word, and must not contain any other special characters"}],children:(0,i.jsx)(_.Z,{addonBefore:"https://",addonAfter:".wootick.com",style:{padding:"6px"},value:j,onChange:function(e){t(e.target.value)},placeholder:"Subdomain"})}),(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(Z,{style:{marginTop:-15},children:j&&j===(0,f.lV)(j)&&j!==x&&I&&M&&(0,i.jsx)(R,{type:"Subdomain Available"===M?"success":"warning",children:M})}),(0,i.jsx)(u.Z,{style:{width:64},disabled:!1===I||j!==(0,f.lV)(j)||"Subdomain Not Available"===M,icon:A&&(0,i.jsx)(m.Z,{}),htmlType:"submit",type:"primary",children:!A&&"Save"})]})]})})]})})}},19942:function(e,t,n){"use strict";var r=n(85893),a=(n(67294),n(5152)),i=(n(52732),(0,a.default)((function(){return Promise.all([n.e(5714),n.e(1876),n.e(3078)]).then(n.bind(n,25195))}),{loadableGenerated:{webpack:function(){return[25195]},modules:["../site-components/editors/BgEditor.js -> ./myEditor"]},ssr:!1}));t.Z=function(e){return(0,r.jsx)(i,{setContents:e.editor,onChange:e.change,onPaste:function(e){return e.clipboardData.getData("text")},placeholder:"Blog content...",setDefaultStyle:"height: 250px; width: 100%;"})}},81635:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=(n(96486),n(17054)),l=n(40655),c=n(71577),_=n(68863),u=n(37306),d=n(50888),m=n(52732),f=n(11569),h=n.n(f),p=n(10708);function g(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function x(e){var t=e.mongoData,n=(t._id,(0,o.useState)(!1)),r=n[0],f=n[1],g=(0,o.useState)(null),x=g[0],b=g[1],E=y((0,p.Z)([]),2),j=(E[0],E[1],(0,o.useState)(!1)),D=j[0],P=j[1];function M(){return(M=v(a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return f(!0),n.next=3,fetch("/api/feedback",{method:"POST",body:JSON.stringify({feedback:x}),headers:{"Content-Type":"application/json"}}).then((function(){f(!1),e.cancel(),b(null),(0,m.FD)(t.organizer_id).push_with_attachment("Feedback Recieved",{feedback:x},"#wootick","wootick-bot","",!0),P(!0)}));case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}var O=y(s.Z.useForm(),1)[0];return(0,i.jsxs)("div",{children:[(0,i.jsx)(l.Z,{closable:!1,footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.Z,{className:h().cancelButton,style:{width:80},onClick:function(){b(null),e.cancel()},children:"Cancel"}),(0,i.jsx)(c.Z,{className:h().publishButton,style:{width:80},icon:r&&(0,i.jsx)(d.Z,{}),onClick:function(){return M.apply(this,arguments)},children:!r&&"Submit"})]}),centered:!0,title:"Share Feedback",visible:e.visible,children:(0,i.jsx)(s.Z,{autoComplete:"off",form:O,layout:"vertical",children:(0,i.jsx)(s.Z.Item,{label:(0,i.jsxs)("p",{style:{color:"black"},children:["We are on the mission of building the best website builder tool for event organizers. Please",(0,i.jsx)("span",{style:{fontWeight:600},children:" help us improve"})," with your valuable feedback."]}),name:"Feedback",children:(0,i.jsx)(_.Z.TextArea,{value:x,onChange:function(e){return b(e.target.value)},style:{padding:"6px"}})})})}),(0,i.jsx)(l.Z,{closable:!1,footer:(0,i.jsx)(c.Z,{onClick:function(){P(!1)},style:{width:60},children:"Ok"}),centered:!0,title:null,visible:D,children:(0,i.jsx)(u.Z.Text,{children:"Thank you for sharing your valuable feedback!!"})})]})}},85971:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(96486),l=n.n(s),c=(n(11163),n(12461)),_=n(17054),u=n(68863),d=n(71577),m=n(45605),f=n(50888),h=n(11569),p=n.n(h);function g(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function E(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function j(e){var t=function(e){g((function(e){return E(e).concat(["Integrations"])}));var t=x({},M);l().merge(t,e),O(t);var n=x({},r);l().merge(n.integrations,t),s(n)},n=e.items,r=(e.index,e.changeOrderDown,e.changeOrderUp,e.mongoData),s=e.setMongoData,h=e.saveModule,g=e.setCustomizeArr,y=e.customizeArr,j=e.globalSave,D=e.checkNew,P=(0,o.useState)(n),M=P[0],O=P[1],w=(0,o.useState)(!1),A=w[0],C=w[1];r._id;function T(){return I.apply(this,arguments)}function I(){return(I=v(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),t=null,n=["google","facebook"],r={new_data:{integrations:x({},M)},allowedKeys:n},e.next=6,h(r).then((function(e){t=e.error,0===e.error&&O(e.data.integrations)}));case 6:0===t?(c.ZP.success("Integrations changes successfully saved"),C(!1),g((function(e){return e.filter((function(e){return"Integrations"!==e}))}))):(c.ZP.error("Integrations changes couldn't be saved. Please check the entered values"),C(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){D&&y.includes("Integrations")&&T()}),[j]);var S=b(_.Z.useForm(),1)[0];return(0,i.jsx)("div",{style:{padding:24},children:(0,i.jsxs)(_.Z,{form:S,layout:"vertical",initialValues:{remember:!0},onFinish:T,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)(_.Z.Item,{label:"Google Analytics Id",name:"google analytics id",initialValue:M.google,tooltip:{title:"Google Analytics Id",icon:(0,i.jsx)(m.Z,{})},children:(0,i.jsx)(u.Z,{value:M.google,onChange:function(e){return t({google:e.target.value})},placeholder:"Google Analytics Id"})}),(0,i.jsx)(_.Z.Item,{label:"Facebook Analytics Id",name:"facebook analytics id",initialValue:M.facebook,tooltip:{title:"Facebook Analytics Id",icon:(0,i.jsx)(m.Z,{})},children:(0,i.jsx)(u.Z,{value:M.facebook,onChange:function(e){return t({facebook:e.target.value})},placeholder:"Facebook Analytics Id"})}),(0,i.jsx)("div",{className:p().saveButtonDiv,children:(0,i.jsx)(d.Z,{style:{width:80},icon:A&&(0,i.jsx)(f.Z,{}),type:"primary",htmlType:"submit",children:!A&&"Save"})})]})})}},84852:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(11163),l=n(68863),c=n(12461),u=n(17054),d=n(71577),m=n(45605),f=n(50888),h=n(11569),p=n.n(h);function g(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function E(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function j(e){var t=function(e){j((function(e){return E(e).concat(["SEO Metadata"])}));var t=x({},w);_.merge(t,e),A(t);var n=x({},h);_.merge(n.metadata,t),g(n)},n=l.Z.TextArea,r=e.items,h=e.mongoData,g=e.setMongoData,y=e.saveModule,j=e.setCustomizeArr,D=e.customizeArr,P=e.globalSave,M=e.checkNew,O=(0,o.useState)(r),w=O[0],A=O[1],C=(0,o.useState)(!1),T=C[0],I=C[1];(0,s.useRouter)();function S(){return k.apply(this,arguments)}function k(){return(k=v(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),t=["title","description"],n=null,r={new_data:{metadata:x({},w)},allowedKeys:t},e.next=6,y(r).then((function(e){n=e.error,0===e.error&&A(e.data.metadata)}));case 6:0===n?(c.ZP.success("SEO Metadata changes successfully saved."),I(!1),j((function(e){return e.filter((function(e){return"SEO Metadata"!==e}))}))):(c.ZP.error("SEO Metadata changes couldn't be saved. Please check the entered values"),I(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){M&&D.includes("SEO Metadata")&&S()}),[P]);var B=b(u.Z.useForm(),1)[0];return(0,i.jsx)("div",{style:{padding:24},children:(0,i.jsxs)(u.Z,{form:B,layout:"vertical",initialValues:{remember:!0},onFinish:S,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)(u.Z.Item,{label:"Meta Title",name:"meta title",initialValue:w.title,tooltip:{title:"Tab/Meta title of your website. e.g. pH Design and this should not be empty.",icon:(0,i.jsx)(m.Z,{})},rules:[{required:!0}],children:(0,i.jsx)(l.Z,{value:w.title,onChange:function(e){return t({title:e.target.value})},placeholder:"Meta Title"})}),(0,i.jsx)(u.Z.Item,{label:"Meta Description",name:"meta description",initialValue:w.description,tooltip:{title:"Tab/Meta description of your website. What does your website represent?. And this should not be empty.",icon:(0,i.jsx)(m.Z,{})},rules:[{required:!0}],children:(0,i.jsx)(n,{rows:3,value:w.description,onChange:function(e){return t({description:e.target.value})},placeholder:"Meta Description"})}),(0,i.jsx)("div",{className:p().saveButtonDiv,children:(0,i.jsx)(d.Z,{style:{width:80},icon:T&&(0,i.jsx)(f.Z,{}),type:"primary",htmlType:"submit",children:!T&&"Save"})})]})})}},44311:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(96486),l=n.n(s),c=n(17054),_=n(12461),u=n(40280),d=n(29924),m=n(37306),f=n(10808),h=n(68863),p=n(32808),g=n(71577),v=n(56266),y=n(45605),x=n(50888),b=n(11569),E=n.n(b),j=n(25934),D=n(89583),P=n(63750);function M(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){M(i,r,a,o,s,"next",e)}function s(e){M(i,r,a,o,s,"throw",e)}o(void 0)}))}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function T(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function I(e){var t=function(e,t){w((function(e){return T(e).concat(["Menu"])}));var n=T(L);l().merge(n.find((function(e){return e._id?e._id==t:e.tempId==t})),e);var r=n.find((function(e){return e._id?e._id==t:e.tempId==t}));if("internal"===n.find((function(e){return e._id?e._id==t:e.tempId==t})).linktype){var a,i,o,c,_,u=n.find((function(e){return e._id?e._id==t:e.tempId==t}));if(null!==u.page){var d=s.pages.find((function(e){return e._id==u.page}));d?(i=d.slug,c=d._id):(i="/",c=null)}else i="/",c=null;if(null!==u.module)if(Y&&Y.length>0){var m=Y[0].modules.concat(Q.modules).find((function(e){return e._id==u.module}));o=m.module_type,_=m._id}else{var f=Q.modules.find((function(e){return e._id==u.module}));o=f.module_type,_=f._id}else _=null;a=null!==_?null===c?"#".concat(o,"-").concat(_):"".concat(i,"#").concat(o,"-").concat(_):"".concat(i),r.link=a,r.page=c,r.module=_}else r.page=null,r.module=null;l().merge(n.find((function(e){return e._id?e._id==t:e.tempId==t})),r),Z(n);var h=A({},s);l().merge(h.navbar,{items:L}),b(h)},n=function(e){var t=T(L).filter((function(t){return t._id?t._id!=e:t.tempId!=e}));Z(t);var n=A({},s);n.navbar.items=t,b(n)},r=e.navbar,s=(e.setNavbar,e.mongoData),b=e.setMongoData,M=e.saveModule,w=e.setCustomizeArr,I=e.customizeArr,S=e.checkNew,k=e.globalSave,B=(0,o.useState)(r.items),L=B[0],Z=B[1],R=(0,o.useState)(r.items),W=R[0],U=R[1],K=(0,o.useState)(!1),N=K[0],z=K[1],F=(0,o.useState)(null),V=(F[0],F[1],(0,o.useState)(r.type)),G=V[0],q=V[1],H=(0,o.useState)([]),Y=H[0],J=H[1],X=(0,o.useState)(null),Q=X[0],$=X[1],ee=C(c.Z.useForm(),1)[0];function te(){return ne.apply(this,arguments)}function ne(){return(ne=O(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(!0),t=["name","link","type"],n=null,r={new_data:{navbar:{items:T(L),type:G}},allowedKeys:t},e.next=6,M(r).then((function(e){n=e.error,0===e.error&&(z(!1),Z(e.data.navbar.items),U(e.data.navbar.items))}));case 6:0===n?(_.ZP.success("Menu changes successfully saved"),w((function(e){return e.filter((function(e){return"Menu"!==e}))}))):(_.ZP.error("Menu changes couldn't be saved. Please check the entered values"),z(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){S&&I.includes("Menu")&&te()}),[k]);(0,o.useEffect)((function(){!function(){var e=O(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/page/get_pageData",{method:"POST",body:JSON.stringify({getAllModules:!0}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){J(e.pages),$(e.homeModules)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[s]);var re=u.Z.Option,ae=(0,o.useState)(s.navbar.items),ie=(ae[0],ae[1],{about:{name:"About"},testimonials:{name:"Testimonials"},events:{name:"Events"},blogs:{name:"Blog"},contactus:{name:"Contact"}});return(0,o.useEffect)((function(){if("custom"===G&&s.navbar.items.length<1){var e=[];e.push({name:"Home",link:"/",linktype:"internal",page:null,module:null,target:"_self",tempId:(0,j.Z)()}),s.modules.map((function(t){t.active&&t.order&&ie[t.module_type]&&(e.find((function(e){return e.name===t.module_type}))||e.push({name:ie[t.module_type].name,link:"#".concat(t.module_type,"-").concat(t._id),linktype:"internal",page:null,module:t._id,target:"_self",tempId:(0,j.Z)()}))})),s.modules.map((function(t){t.active&&!t.order&&ie[t.module_type]&&(e.find((function(e){return e.name===t.module_type}))||e.push({name:ie[t.module_type].name,link:"#".concat(t.module_type,"-").concat(t._id),linktype:"internal",page:null,module:t._id,target:"_self",tempId:(0,j.Z)()}))})),Z(e);var t=A({},s);l().merge(t.navbar,{items:e}),b(t)}}),[G]),(0,i.jsx)("div",{style:{padding:24},children:(0,i.jsxs)(c.Z,{form:ee,layout:"vertical",initialValues:{remember:!0},onFinish:te,onFinishFailed:function(e){e.errorFields.map((function(e){return _.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsxs)(d.ZP.Group,{style:{marginBottom:"10px"},onChange:function(e){q(e.target.value);var t=A({},s);l().merge(t.navbar,{type:e.target.value}),b(t)},value:G,children:[(0,i.jsx)(d.ZP,{value:"default",children:"Default Menu"}),(0,i.jsx)(d.ZP,{value:"custom",children:"Custom Menu"})]}),"custom"===G&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{marginBottom:8},children:(0,i.jsx)(m.Z.Text,{children:"Menu Items"})}),L.map((function(e,r){return(0,i.jsxs)("div",{style:{backgroundColor:"#edecec",padding:6,paddingLeft:12,paddingRight:12,marginBottom:14},children:[(0,i.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"end"},children:(0,i.jsx)(f.Z,{overlayClassName:"fixed",placement:"bottom",trigger:"click",content:(0,i.jsx)("div",{className:E().popDiv,children:(0,i.jsxs)("button",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},className:"".concat(E().popCommon," ").concat(E().popDel),type:"button",onClick:function(){return e._id?n(e._id):n(e.tempId)},children:[(0,i.jsx)(D.Xm5,{})," ",(0,i.jsx)("span",{style:{marginLeft:8},children:"Delete Item"})]})}),children:(0,i.jsx)("button",{type:"button",className:E().popButton,children:(0,i.jsx)(P.evw,{})})})}),(0,i.jsxs)(d.ZP.Group,{style:{marginBottom:"10px"},onChange:function(n){t({linktype:n.target.value,link:"internal"===n.target.value?"/":"",page:"/"},e._id?e._id:e.tempId)},value:e.linktype?e.linktype:"internal",children:[(0,i.jsx)(d.ZP,{value:"internal",children:"Link Page"}),(0,i.jsx)(d.ZP,{value:"external",children:"Link External Link"})]}),(0,i.jsx)(c.Z.Item,{label:"Name",name:"name-".concat(e._id?e._id:e.tempId),initialValue:e.name,tooltip:{title:"Name in the topbar",icon:(0,i.jsx)(y.Z,{})},rules:[{required:!0,min:3,max:18,message:"Characters must be between 3 and 18."}],children:(0,i.jsx)(h.Z,{value:e.name,onChange:function(n){return t({name:n.target.value},e._id?e._id:e.tempId)},placeholder:"Name"})}),"internal"===e.linktype?(0,i.jsx)(c.Z.Item,{label:"Link",name:"link-".concat(e._id?e._id:e.tempId),initialValue:e.link,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(u.Z,{defaultValue:s.pages.find((function(t){return t._id==e.page}))?s.pages.find((function(t){return t._id==e.page})).slug:null,style:{width:"100%",marginBottom:16},onChange:function(n){t({page:n,module:null},e._id?e._id:e.tempId)},children:[(0,i.jsx)(re,{value:null,selected:!0,children:"/homepage"}),s.pages.map((function(e,t){return(0,i.jsxs)(re,{value:e._id,children:["/",e.slug]},e._id)}))]}),Q&&(0,i.jsx)(u.Z,{value:e.module,style:{width:"100%"},onChange:function(n){t({module:n},e._id?e._id:e.tempId)},children:null===e.page?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(re,{value:null,children:"Jump to section (Optional)"}),Q.modules.map((function(e,t){return(0,i.jsx)(re,{value:e._id,children:e.module_type},e._id)}))]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(re,{value:null,children:"Jump to section (Optional)"}),Y.find((function(t){return t._id==e.page}))&&Y.find((function(t){return t._id==e.page})).modules.map((function(e,t){return(0,i.jsx)(re,{value:e._id,children:e.module_type},e._id)}))]})})]})}):(0,i.jsx)(c.Z.Item,{label:"Link",name:"extlink-".concat(e._id?e._id:e.tempId),initialValue:e.link,rules:[{required:!0,pattern:/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi,message:"Must be a valid url."}],children:(0,i.jsx)(h.Z,{value:W.find((function(t){return t._id==e._id}
1))?W.find((function(t){return t._id==e._id})).link:"",onChange:function(n){return t({link:n.target.value},e._id?e._id:e.tempId)},placeholder:"External Link"})}),(0,i.jsx)(p.Z,{style:{marginBottom:"10px"},checked:"_blank"===e.target,onChange:function(n){t({target:n.target.checked?"_blank":"_self"},e._id?e._id:e.tempId)},children:"Open in new tab"})]},r)})),(0,i.jsx)(g.Z,{htmlType:"button",style:{width:"100%",textAlign:"center"},onClick:function(){var e=T(L);e.push({name:"Home",link:"/",linktype:"internal",page:null,module:null,target:"_self",tempId:(0,j.Z)()});var t=T(L);l().merge(t,e),Z(t);var n=A({},s);b(n)},children:"Add Item"})]}),(0,i.jsx)("div",{className:E().switchMaindiv,children:(0,i.jsx)(v.Z,{title:"",placement:"right",children:(0,i.jsx)(g.Z,{style:{width:80},icon:N&&(0,i.jsx)(x.Z,{}),type:"primary",htmlType:"submit",children:!N&&"Save"})})})]})})}},38319:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(35666),a=n.n(r),i=n(85893),o=n(40655),s=n(71577),l=n(30031),c=n(62986),_=n(8193),u=n(41664),d=n(67294);n(52732);function m(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){m(i,r,a,o,s,"next",e)}function s(e){m(i,r,a,o,s,"throw",e)}o(void 0)}))}}function h(e){var t=e.mongoData,n=(e.editPageModal,e.setEditPageModal),r=e.setAddNewPage,m=e.add_updatePage,h=(e.newPageRoute,e.setNewPageRoute),p=(e.pageDeleteModalVisible,e.setPageDeleteModalVisible,(0,d.useState)(!1)),g=p[0],v=p[1],y=(0,d.useState)(!1),x=y[0],b=y[1],E=(0,d.useState)("This action can't be undone. Are you sure you want to delete this page?"),j=E[0],D=(E[1],(0,d.useState)(null)),P=D[0],M=D[1];function O(){return w.apply(this,arguments)}function w(){return(w=f(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,m("DELETE",P).then((function(){return b(!1)})).then((function(){return v(!1)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var A=function(){v(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex flex-col justify-center capitalize",children:t.pages&&t.pages.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{padding:"24px 24px 0px 24px",width:"100%"},children:(0,i.jsx)(s.Z,{onClick:function(){n({data:void 0,visible:!1}),h(""),r(!0)},icon:(0,i.jsx)(_.Lfi,{}),style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"New page"})})}),(0,i.jsx)(l.ZP,{header:(0,i.jsx)(l.ZP.Item,{description:(0,i.jsx)("p",{style:{fontSize:14},children:t.sitebase}),children:(0,i.jsx)(u.default,{href:"/dashboard",children:(0,i.jsx)("div",{className:"w-full h-fit flex items-center justify-center cursor-pointer",children:(0,i.jsx)(l.ZP.Item.Meta,{style:{display:"flex",flexDirection:"row",alignItems:"center",textTransform:"lowercase"},title:(0,i.jsx)("span",{style:{fontWeight:500,textTransform:"capitalize"},children:"Home Page"}),description:(0,i.jsx)("p",{style:{fontSize:14},children:t.sitebase})})})})}),style:{padding:"0 24px"},itemLayout:"horizontal",dataSource:t.pages,renderItem:function(e){return(0,i.jsx)(l.ZP.Item,{actions:[(0,i.jsx)("a",{onClick:function(){n({data:e,visible:!0})},style:{color:"#60a5fa"},children:"Edit"},"list-loadmore-edit"),(0,i.jsx)("a",{onClick:function(){return t=e._id,M(t),void v(!0);var t},style:{color:"#60a5fa"},children:"Delete"},"list-loadmore-delete")],children:(0,i.jsx)(u.default,{href:"/dashboard/".concat(e.slug),children:(0,i.jsx)("div",{className:"w-full h-fit flex items-center justify-center cursor-pointer",children:(0,i.jsx)(l.ZP.Item.Meta,{style:{display:"flex",flexDirection:"row",alignItems:"center",textTransform:"lowercase"},title:(0,i.jsxs)("span",{style:{fontWeight:500},children:["/",e.slug]}),description:(0,i.jsxs)("p",{style:{fontSize:14},children:[t.sitebase,"/",e.slug]})})})})})}})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(c.Z,{style:{padding:24,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},description:(0,i.jsx)("p",{style:{fontSize:17},children:"Add New Pages"}),children:(0,i.jsx)(s.Z,{onClick:function(){n({data:null,visible:!1}),r(!0)},icon:(0,i.jsx)(_.Lfi,{}),style:{marginTop:5,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)("span",{style:{marginLeft:4},children:"Page"})})})})}),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(o.Z,{title:"Delete Page",visible:g,footer
1:[(0,i.jsx)(s.Z,{onClick:A,children:"Cancel"},"back"),(0,i.jsx)(s.Z,{type:"primary",loading:x,onClick:O,danger:!0,children:"Delete Page"},"submit")],confirmLoading:x,onCancel:A,children:(0,i.jsx)("p",{style:{textAlign:"center",fontWeight:500},children:j})})})]})}},70574:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(96486),l=n.n(s),c=n(37306),_=n(12461),u=n(17054),d=n(14670),m=n(68863),f=n(71577),h=n(45605),p=n(50888),g=n(52732),v=n(11569),y=n.n(v);function x(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){x(i,r,a,o,s,"next",e)}function s(e){x(i,r,a,o,s,"throw",e)}o(void 0)}))}}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function P(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function M(e){var t=function(e){x((function(e){return P(e).concat(["Script"])}));var t=j({},A);l().merge(t,e),C(t);var n=j({},r);l().merge(n.script,t),s(n)},n=e.items,r=e.mongoData,s=e.setMongoData,v=e.saveModule,x=e.setCustomizeArr,E=e.customizeArr,M=e.checkNew,O=e.globalSave,w=(0,o.useState)(n),A=w[0],C=w[1],T=(0,o.useState)(!1),I=T[0],S=T[1];r._id,c.Z.Paragraph,c.Z.Text;function k(){return B.apply(this,arguments)}function B(){return(B=b(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),t=null,n=["head","body"],r={new_data:{script:j({},A)},allowedKeys:n},e.next=6,v(r).then((function(e){t=e.error,0===e.error&&C(e.data.script)}));case 6:0===t?(_.ZP.success("Script changes successfully saved"),S(!1),x((function(e){return e.filter((function(e){return"Script"!==e}))}))):(_.ZP.error("Script changes couldn't be saved. Please check the entered values"),S(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var L=D(u.Z.useForm(),1)[0];return(0,o.useEffect)((function(){M&&E.includes("Script")&&k()}),[O]),(0,i.jsx)("div",{style:{padding:24},children:(0,i.jsxs)(u.Z,{autoComplete:"off",style:{marginTop:2},form:L,layout:"vertical",initialValues:{remember:!0},onFinish:k,onFinishFailed:function(e){e.errorFields.map((function(e){return _.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)(c.Z.Text,{style:{fontWeight:700},children:"Allows you to add any custom scripts, meta, link, and style tags to your website. Example: Google Domain Verification process or adding third-party widgets."}),(0,i.jsx)(d.Z,{style:{marginTop:8,border:"none"},message:"Custom Scripts are not used in live preview in Dashboard for security reasons. You can see them in effect on the live website only.",type:"info"}),(0,i.jsx)(u.Z.Item,{style:{marginTop:24},label:"Head Script",name:"Head Script",tooltip:{title:"Add custom script to your code. Your code must be surrounded by script. Example use cases: Google Domain Verification process,Google Analytics. It will be applied to every page of the site.",icon:(0,i.jsx)(h.Z,{}),placement:"right"},initialValue:A.head,children:(0,i.jsx)(m.Z.TextArea,{value:A.head,onChange:function(e){return t({head:(0,g.ff)(e.target.value)})},placeholder:"<script>alert('Hello')<\/script>"})}),(0,i.jsx)(u.Z.Item,{label:"Body Script",name:"Body Script",tooltip:{title:"Add custom script to your code. Your code must be surrounded by script. Example use cases: Google Domain Verification process,Google Analytics. It will be applied to every page of the site.",icon:(0,i.jsx)(h.Z,{}),placement:"right"},initialValue:A.body,children:(0,i.jsx)(m.Z.TextArea,{value:A.body,onChange:function(e){return t({body:(0,g.ff)(e.target.value)})},placeholder:"<script>alert('Hello')<\/script>"})}),(0,i.jsx)("div",{className:y().saveButtonDiv,children:(0,i.jsx)(f.Z,{style:{width:80},icon:I&&(0,i.jsx)(p.Z,{}),type:"primary",htmlType:"submit",children:!I&&"Save"})})]})})}},34179:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(11163),l=n(68863),c=n(12461),u=n(17054),d=n(71577),m=n(45605),f=n(50888),h=n(11569),p=n.n(h);function g(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function E(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function j(e){var t=function(e){y((function(e){return E(e).concat(["Social"])}));var t=x({},O);_.merge(t,e),w(t);var n=x({},r);_.merge(n.social,t),h(n)},n=(l.Z.TextArea,e.items),r=e.mongoData,h=e.setMongoData,g=e.saveModule,y=e.setCustomizeArr,j=e.customizeArr,D=e.globalSave,P=e.checkNew,M=(0,o.useState)(n),O=M[0],w=M[1],A=(0,o.useState)(!1),C=A[0],T=A[1];(0,s.useRouter)();function I(){return S.apply(this,arguments)}function S(){return(S=v(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),t=["title","description"],n=null,r={new_data:{social:x({},O)},allowedKeys:t},e.next=6,g(r).then((function(e){n=e.error,0===e.error&&(w(e.data.social),y((function(e){return e.filter((function(e){return"Social"!==e}))})))}));case 6:0===n?(c.ZP.success("Social changes successfully saved."),T(!1)):(c.ZP.error("Social changes couldn't be saved. Please check the entered values."),T(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){P&&j.includes("Social")&&I()}),[D]);var k=b(u.Z.useForm(),1)[0];return(0,i.jsx)("div",{style:{padding:24},children:(0,i.jsxs)(u.Z,{form:k,layout:"vertical",initialValues:{remember:!0},onFinish:I,onFinishFailed:function(e){e.errorFields.map((function(e){return c.ZP.error({content:e.errors,duration:2.5,style:{fontSize:16}})}))},children:[(0,i.jsx)(u.Z.Item,{label:"Facebook",name:"facebook",initialValue:O.facebook,tooltip:{title:"Your facebook id/page url.",icon:(0,i.jsx)(m.Z,{})},rules:[{type:"url",message:"Must be a valid url"},{pattern:/(?:https?:\/\/)?(?:www\.)?(mbasic.facebook|m\.facebook|facebook|fb)\.(com|me)\/(?:(?:\w\.)*#!\/)?(?:pages\/)?(?:[\w\-\.]*\/)*([\w\-\.]*)/,message:"Not valid facebook url"}],children:(0,i.jsx)(l.Z,{value:O.facebook,onChange:function(e){return t({facebook:e.target.value})},placeholder:"Facebook id/page url"})}),(0,i.jsx)(u.Z.Item,{label:"Instagram",name:"instagram",initialValue:O.instagram,tooltip:{title:"Your Instagram id url.",icon:(0,i.jsx)(m.Z,{})},rules:[{type:"url",message:"Must be a valid url"},{pattern:/(?:https?:\/\/)?(?:www.)?(?:instagram.com|instagr.am|instagr.com)\/([A-Za-z0-9-_\.]+)/,message:"Not valid Instagram url"}],children:(0,i.jsx)(l.Z,{value:O.instagram,onChange:function(e){return t({instagram:e.target.value})},placeholder:"Instagram handle"})}),(0,i.jsx)(u.Z.Item,{label:"Twitter",name:"twitter",initialValue:O.twitter,tooltip:{title:"Your twitter handle url.",icon:(0,i.jsx)(m.Z,{})},rules:[{type:"url",message:"Must be a valid url."},{pattern:/(?:https?:\/\/)?(?:www.)?(twitter.com)\/(?![a-zA-Z0-9_]+\/)([a-zA-Z0-9_]+)/,message:"Not valid twitter handle."}],children:(0,i.jsx)(l.Z,{value:O.twitter,onChange:function(e){return t({twitter:e.target.value})},placeholder:"Twitter handle"})}),(0,i.jsx)(u.Z.Item,{label:"Linkedin",name:"linkedin",initialValue:O.linkedin,tooltip:{title:"Your linkedin profile url.",icon:(0,i.jsx)(m.Z,{})},rules:[{type:"url",message:"Must be a valid url"},{pattern:/^(http(s)?:\/\/)?([\w]+\.)?(linkedin\.com)\/(pub|in|profile|company|school|feed)/,message:"Not valid linkedin profile"}],children:(0,i.jsx)(l.Z,{value:O.linkedin,onChange:function(e){return t({linkedin:e.target.value})},placeholder:"Linkedin profile"})}),(0,i.jsx)(u.Z.Item,{label:"Whatsapp (with country code)",name:"whatsapp",initialValue:O.whatsapp,tooltip:{title:"Your whatsapp number with country code e.g. +1 0002223330. Include country code while entering the number.",icon:(0,i.jsx)(m.Z,{})},rules:[{pattern:/^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/,message:"Must be a valid number"}],children:(0,i.jsx)(l.Z,{value:O.whatsapp,onChange:function(e){return t({whatsapp:e.target.value})},placeholder:"Whatsapp profile"})}),(0,i.jsx)("div",{className:p().saveButtonDiv,children:(0,i.jsx)(d.Z,{style:{width:80},icon:C&&(0,i.jsx)(f.Z,{}),type:"primary",htmlType:"submit",children:!C&&"Save"})})]})})}},41214:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(11163),l=n(37306),c=n(12461),u=n(17054),d=n(40280),m=n(27049),f=n(71577),h=n(50888),p=n(11569),g=n.n(p),v=n(51649);function y(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){y(i,r,a,o,s,"next",e)}function s(e){y(i,r,a,o,s,"throw",e)}o(void 0)}))}}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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){b(e,t,n[t])}))}return e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function D(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function P(e){var t=function(e){b((function(e){return D(e).concat(["Colors"])}));var t=E({},r);_.merge(t,e),T(t);var n=E({},p);_.merge(n.theme,t),v(n)},n=l.Z.Title,r=e.items,p=e.mongoData,v=e.setMongoData,y=e.saveModule,b=e.setCustomizeArr,P=e.customizeArr,O=e.globalSave,w=e.checkNew,A=(0,o.useState)(r),C=A[0],T=A[1],I=(0,o.useState)(!1),S=I[0],k=I[1];(0,s.useRouter)();function B(){return L.apply(this,arguments)}function L(){return(L=x(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),t=["color","shade"],n=null,r={new_data:{theme:E({},C)},allowedKeys:t},e.next=6,y(r).then((function(e){n=e.error,0===e.error&&(T(e.data.theme),b((function(e){return e.filter((function(e){return"Colors"!==e}))})))}));case 6:0===n?(c.ZP.success("Colors changes successfully saved."),k(!1)):(c.ZP.error("Colors couldn't be saved. Please check the entered values"),k(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){w&&P.includes("Colors")&&B()}),[O]);var Z=function(e){var n=e.split("-"),r=+n[1];t({section_subtitle:{color:n[0],shade:r}})},R=function(e){var n=e.split("-");t({primary_color:{color:n[0],shade:n[1]},section_title:{color:n[0],shade:n[1]},anchor_tag:{color:n[0],shade:n[1]}})},W=(j(u.Z.useForm(),1)[0],d.Z.Option);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{style:{padding:24},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(l.Z.Text,{children:"Overall Theme"}),(0,i.jsxs)(d.Z,{style:{width:"100%",marginTop:6},defaultValue:C.overall_theme.style,onChange:function(e){return"dark"===(n=e)?R("amber-400"):"light"===n&&R("zinc-800"),Z("zinc-400"),void t({overall_theme:{style:n}});var n},children:[(0,i.jsx)(W,{value:"light",children:"Light theme"}),(0,i.jsx)(W,{value:"dark",children:"Dark theme"})]})]}),(0,i.jsx)(m.Z,{style:{marginTop:40,borderTopColor:"#d1d5db"}}),(0,i.jsx)("div",{children:(0,i.jsx)(M,{title:"Primary Color",color:C.primary_color.color,shade:C.primary_color.shade,onChange:R})}),(0,i.jsx)(m.Z,{style:{marginTop:40,borderTopColor:"#d1d5db"}}),(0,i.jsxs)("div",{style:{marginTop:28},children:[(0,i.jsx)(n,{level:4,children:"More Customization"}),(0,i.jsx)("div",{style:{marginTop:24},children:(0,i.jsx)(M,{title:"Title Color",pColor:C.primary_color.color,pShade:C.primary_color.shade,color:C.section_title.color,shade:C.section_title.shade,onChange:function(e){var n=e.split("-");t({section_title:{color:n[0],shade:n[1]}})}})}),(0,i.jsx)("div",{style:{marginTop:20},children:(0,i.jsx)(M,{title:"Subtitle Color",pColor:C.primary_color.color,pShade:C.primary_color.shade,color:C.section_subtitle.color,shade:C.section_subtitle.shade,onChange:Z})}),(0,i.jsx)("div",{style:{marginTop:20},children:(0,i.jsx)(M,{title:"Link Color",pColor:C.primary_color.color,pShade:C.primary_color.shade,color:C.anchor_tag.color,shade:C.anchor_tag.shade,onChange:function(e){var n=e.split("-");t({anchor_tag:{color:n[0],shade:n[1]}})}})})]}),(0,i.jsx)("div",{className:g().colorSaveBtnDiv,children:(0,i.jsx)(f.Z,{style:{width:80},onClick:B,icon:S&&(0,i.jsx)(h.Z,{}),type:"primary",htmlType:"button",children:!S&&"Save"})})]})})}function M(e){var t,n=e.title,r=e.color,a=e.shade,s=e.onChange,c=e.pColor,_=e.pShade,u=["300","400","500","600","700","800","900"],d=(0,o.useState)(!1),m=d[0],f=d[1],h=(0,o.useRef)(null);return t=h,(0,o.useEffect)((function(){function e(e){t.current&&!t.current.contains(e.target)&&f(!1)}return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[t]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z.Text,{children:n}),(0,i.jsxs)("div",{ref:h,className:"relative w-full mt-2",children:[(0,i.jsxs)("div",{className:"cursor-pointer w-full h-8 bg-white-100 border border-gray-300 p-1 pr-2 flex items-center justify-between",onClick:function(){return f(!m)},children:[(0,i.jsxs)("div",{className:"h-full flex items-center gap-2",children:[(0,i.jsx)("div",{className:"h-full aspect-square border border-gray-400 bg-".concat(r||c,"-").concat(r?a:_)}),(0,i.jsxs)(l.Z.Text,{className:"capitalize",children:[r||c," - ",r?a:_]})]}),(0,i.jsx)("div",{children:(0,i.jsx)(v.OId,{className:"".concat(m&&"rotate-180"," transition-all duration-300 text-gray-300 ")})})]}),(0,i.jsxs)("div",{className:"w-full ".concat(m?"h-48 border py-2":"h-0"," transition-all duration-300 bg-white-100 absolute z-50 top-0 transform translate-y-9 overflow-auto flex flex-col items-center gap-2"),children:[["orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","red","slate","gray","zinc","neutral","stone"].map((function(e,t){return(0,i.jsx)("div",{className:"flex items-center gap-2",children:u.map((function(t,n){return(0,i.jsx)("div",{onClick:function(){s("".concat(e,"-").concat(t))},className:"".concat("".concat(e,"-").concat(t)==="".concat(r||c,"-").concat(a||_)?"outline":""," bg-").concat(e,"-").concat(t," hover:outline outline-offset-1 outline-2 outline-orange-400 w-6 h-6 cursor-pointer")},n)}))},t)})),(0,i.jsx)("div",{className:"flex items-center gap-2",children:(0,i.jsx)("div",{onClick:function(){s("white-100")},className:"outline ".concat("white-100"==="".concat(r||c,"-").concat(a||_)?"outline-orange-400":"outline-black-100"," bg-white-100 hover:outline outline-offset-1 outline-2 w-6 h-6 cursor-pointer")})})]})]})]})}},79637:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(35666),a=n.n(r),i=n(85893),o=n(67294),s=n(11163),l=n(12461),c=n(71577),_=n(50888),u=n(11569),d=n.n(u),m=n(52248),f=n(96486),h=n.n(f),p=n(9008);function g(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function E(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function j(e){var t=e.items,n=e.mongoData,r=e.setMongoData,u=e.saveModule,f=e.setCustomizeArr,g=e.customizeArr,y=e.globalSave,j=e.checkNew,D=(0,o.useState)(t),P=D[0],M=D[1],O=(0,o.useState)(!1),w=O[0],A=O[1];(0,s.useRouter)();function C(){return T.apply(this,arguments)}function T(){return(T=v(a().mark((function e(){var t,n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),t=["font"],n=null,r={new_data:{theme:x({},P)},allowedKeys:t},e.next=6,u(r).then((function(e){n=e.error,0===e.error&&(M(e.data.theme),f((function(e){return e.filter((function(e){return"Font"!==e}))})))}));case 6:0===n?(l.ZP.success("Font changes successfully saved."),A(!1)):(l.ZP.error("Font couldn't be saved. Please check the entered values"),A(!1));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,o.useEffect)((function(){j&&g.includes("Font")&&C()}),[y]);var I=[d().font_card,d().font_card_selected];return(0,i.jsxs)("div",{style:{padding:24},children:[(0,i.jsxs)(p.default,{children:[(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Quicksand:wght@600;700&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Yeseva+One&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Judson&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Montserrat&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Lora&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Prata&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Lato&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Oswald&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Noto+Serif&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,600&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Chivo&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Pacifico&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Satisfy&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Farro&display=swap",rel:"stylesheet"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Karla&display=swap",rel:"stylesheet"})]}),(0,i.jsx)("section",{className:d().font_card_div,children:Object.entries(m.Z).map((function(e,a){var o=b(e,2),s=o[0],l=o[1];return(0,i.jsx)("div",{className:s===P.font?I.join(" "):I[0],onClick:function(){return function(e){f((function(e){return E(e).concat(["Font"])}));var a=x({},t);h().merge(a,e),console.log("font",a),M(a);var i=x({},n);h().merge(i.theme,a),r(i)}({font:s})},children:(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{style:{fontSize:30,fontFamily:l.title.family},children:"Title"}),(0,i.jsx)("p",{children:(0,i.jsxs)("span",{style:{fontFamily:l.text.family},children:["This is a combination of ",(0,i.jsx)("span",{style:{fontFamily:l.title.family,fontWeight:600},children:l.title.name})," fonts in titles and"," ",(0,i.jsx)("span",{style:{fontWeight:600},children:l.text.name})," for other texts on the site."]})})]})},a)}))}),(0,i.jsx)("div",{className:d().colorSaveBtnDiv,children:(0,i.jsx)(c.Z,{style:{width:80},onClick:C,icon:w&&(0,i.jsx)(_.Z,{}),type:"primary",htmlType:"button",children:!w&&"Save"})})]})}},89505:function(e,t,n){"use strict";function r(e,t,n,r,a){r||(r=1),a||(a={}),console.log("trans",e,a);var i={use:":original",robot:"/image/optimize",background:"none",width:n};i=Object.assign(i,a);window.Robodog.pick({debug:!0,providers:["instagram","url","webcam","dropbox","google-drive"],waitForEncoding:!0,restrictions:{maxFileSize:1e7,maxNumberOfFiles:r,minNumberOfFiles:1,allowedFileTypes:["image/*"]},params:{auth:{key:"14eb763b584749269ee806348ec2e80e"},steps:{resize_to_75:i,compress_image:{use:"resize_to_75",robot:"/image/optimize",progressive:!0},exported:{use:"compress_image",robot:"/s3/store",credentials:"ae_s3_eventthumb",url_prefix:"https://cdn2.allevents.in/",path:"transup/wootick/sites/"+t+"/${unique_prefix}/${file.url_name}"}}}}).then((function(t){if(1===r)e(t.results[0].ssl_url,t.results[0].meta);else{var n=[];
1t.results.forEach((function(e,t){n.push({image_url:e.ssl_url,meta:e.meta})})),e(n)}})).catch(console.error)}n.d(t,{Z:function(){return r}})},65972:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Z:function(){return DashPage}});var _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(35666),_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(85893),_ant_design_icons__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__(45605),_ant_design_icons__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__(73403),antd__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(40655),antd__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(68863),antd__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(71577),antd__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(12461),antd__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(97183),antd__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(68157),antd__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(37306),antd__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__(56266),antd__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__(13013),antd__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__(26713),antd__WEBPACK_IMPORTED_MODULE_58__=__webpack_require__(24093),antd__WEBPACK_IMPORTED_MODULE_59__=__webpack_require__(22589),next_auth_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(33299),next_auth_react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(next_auth_react__WEBPACK_IMPORTED_MODULE_2__),next_router__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(11163),react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(67294),react_icons_im__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__(53990),_pages_index__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(72940),_site_components_admin_components__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(76086),_site_components_business_business_admin__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(13767),_site_components_domain_domain_admin__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(963),_site_components_domain_subdomain_admin__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(88085),_site_components_integrations_integration_admin__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(85971),_site_components_metadata_metadata_admin__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(84852),_site_components_pages_pages_admin__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(38319),_site_components_social_social_admin__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(34179),_site_components_theme_color_admin__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(41214),_site_components_theme_font_admin__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(79637),next_script__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(4298),react_icons_ai__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(8193),react_icons_bs__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(63750),react_icons_fa__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(89583),react_icons_gr__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__(45155),react_icons_hi__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(53854),react_icons_bi__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__(47516),react_icons_io__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(51649),react_icons_io5__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__(60155),react_icons_md__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__(5434),react_icons_ri__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(79352),react_icons_vsc__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__(14578),antd_dist_antd_css__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(55062),antd_dist_antd_css__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(antd_dist_antd_css__WEBPACK_IMPORTED_MODULE_17__),lodash__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(96486),lodash__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_18__),next_head__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(9008),next_link__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(41664),_site_components_blogs_admin_panels_authors_admin__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(23547),_site_components_blogs_admin_panels_categories_admin__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(91613),_site_components_blogs_admin_panels_details_admin__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(21599),_site_components_blogs_admin_panels_posts_admin__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(48115),_site_components_custom_drawer_cust_drawer__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(75300),_site_components_feedback_feedback_admin__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(81635),_site_components_navbar_navbar_admin__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(44311),_site_components_script_script_admin__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(70574),_site_functions_fe_function__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(52732),_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__(11569),_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default=__webpack_require__.n(_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54__),_routesNotAllowed__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(90641),_share__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(64341),_user_welcome__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(18213);function _arrayWithHoles(e){if(Array.isArray(e))return e}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function asyncGeneratorStep(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){asyncGeneratorStep(i,r,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,r,a,o,s,"throw",e)}o(void 0)}))}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _iterableToArrayLimit(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}function _nonIterableRest(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance")}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_defineProperty(e,t,n[t])}))}return e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function DashPage(props){var globalSaveFunction=function(){setGlobalSave(!globalSave)},newModuleDetails=function(e){setNewModModal(!0),setNewModuleIndex(e)},permission=props.permission,ref43=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)((0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)()),router=ref43[0],setRouter=ref43[1],ref1=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.eventDetails),events=ref1[0],setEvents=ref1[1],ref2=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData),mongoData=ref2[0],setMongoData=ref2[1],ref3=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.modules_order),modules_order=ref3[0],setModules_order=ref3[1],ref4=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.modules),modules=ref4[0],setModules=ref4[1],ref5=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),gLoading=ref5[0],setGLoading=ref5[1],ref6=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.theme),theme=ref6[0],setTheme=ref6[1],ref7=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.business),business=ref7[0],setBusiness=ref7[1],ref8=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.metadata),metadata=ref8[0],setMetadata=ref8[1],ref9=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.social),social=ref9[0],setSocial=ref9[1],ref10=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.integrations),integration=ref10[0],setIntegration=ref10[1],ref11=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.custom_domain),domain=ref11[0],setDomain=ref11[1],ref12=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.script),script=ref12[0],setScript=ref12[1],ref13=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.navbar),navbar=ref13[0],setNavbar=ref13[1],ref14=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.mongoData.sub_domain),subDomain=ref14[0],setSubDomain=ref14[1],ref15=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),showFeed=ref15[0],setShowFeed=ref15[1],ref16=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)([]),changeArr=ref16[0],setChangeArr=ref16[1],ref17=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)([]),customizeArr=ref17[0],setCustomizeArr=ref17[1],ref18=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),globalSave=ref18[0],setGlobalSave=ref18[1],ref19=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),blogChange=ref19[0],setBlogChange=ref19[1],ref20=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),bid=ref20[0],setBid=ref20[1],ref21=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),newModModal=ref21[0],setNewModModal=ref21[1],ref22=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!0),checkNew=ref22[0],setCheckNew=ref22[1],ref23=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),addingNewMod=ref23[0],setAddingNewMod=ref23[1],ref24=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),addNewPage=ref24[0],setAddNewPage=ref24[1],ref25=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),newPageRoute=ref25[0],setNewPageRoute=ref25[1],ref26=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(props.pageData),pageData=ref26[0],setPageData=ref26[1],ref27=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)({data:null,visible:!1}),editPageModal=ref27[0],setEditPageModal=ref27[1],ref28=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),pageDeleteModalVisible=ref28[0],setPageDeleteModalVisible=ref28[1],ref29=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),newModuleIndex=ref29[0],setNewModuleIndex=ref29[1],ref30=(0,next_auth_react__WEBPACK_IMPORTED_MODULE_2__.useSession)(),session=ref30.data,ref31=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),avatar=ref31[0],setAvatar=ref31[1];(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){if(customizeArr.length>0||changeArr.length>0)return window.addEventListener("beforeunload",alertUser),function(){window.removeEventListener("beforeunload",alertUser)}}),[changeArr,customizeArr]);var alertUser=function(e){e.preventDefault(),e.returnValue=""},getImageOrFallback=function(e,t){return new Promise((function(n){var r=new Image;r.src=e,r.onload=function(){return n(e)},r.onerror=function(){return n(t)}}))};(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){session&&session.avatar&&getImageOrFallback(session.avatar).then((function(e){return setAvatar(e)}))}),[session]);var ref32=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(""),pgSlugAv=ref32[0],setPgSlugAv=ref32[1];(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){newPageRoute&&""!==newPageRoute&&setNewPageRoute((0,_site_functions_fe_function__WEBPACK_IMPORTED_MODULE_29__.lV)(newPageRoute)),_routesNotAllowed__WEBPACK_IMPORTED_MODULE_32__.Z.includes(newPageRoute)?setPgSlugAv("This slug is restricted! You cannot create a page with '".concat(newPageRoute,"' route")):function(){var e=_asyncToGenerator(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark((function e(){return _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/page/slug-check",{method:"POST",body:JSON.stringify({siteId:mongoData._id,slug:editPageModal.data?editPageModal.data.slug:newPageRoute,pageId:editPageModal.data?editPageModal.data._id:null}),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){return setPgSlugAv(e.message)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[newPageRoute,editPageModal.data]);var newPageSection=function(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_33__.Z,{title:"Create new page",centered:!0,footer:null,width:700,visible:addNewPage,onCancel:function(){return setAddNewPage(!1)},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{style:{fontSize:16,marginBottom:6},children:"Enter the page URL."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__.Z,{value:newPageRoute,style:{margin:"0px 16px 0px 0px"},size:"large",onChange:function(e){return setNewPageRoute(e.target.value)},addonBefore:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{style:{color:"#9ca3af"},children:[mongoData.sitebase,"/"]}),placeholder:"page route"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_35__.Z,{disabled:!pgSlugAv||"Slug Available"!==pgSlugAv,size:"large",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ai__WEBPACK_IMPORTED_MODULE_36__.Lfi,{}),type:"primary",loading:gLoading,onClick:function(){return add_updatePage("POST")},style:{display:"flex",flexDirection:"row",alignItems:"center",width:"20%",justifyContent:"center",gap:6},children:"Create"},"add")]}),pgSlugAv&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Text,{type:"Slug Available"!==pgSlugAv&&"w
1arning",children:pgSlugAv&&"Slug Available"!==pgSlugAv&&pgSlugAv})]})},saveModuleOrder=function(){var e=[],t=[];return modules_order.map((function(n){t.push(n._id),e.push(n._id)})),modules.map((function(t){t.order||e.push(t._id)})),{new_data:{modules:e,modules_order:t},allowedKeys:["modules","modules_order","_id"]}};function changeOrderDown(e){return _changeOrderDown.apply(this,arguments)}function _changeOrderDown(){return(_changeOrderDown=_asyncToGenerator(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark((function e(t){var n,r,a;return _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t<modules_order.length-1)){e.next=12;break}return n=modules_order[t],modules_order.splice(t,1),modules_order.splice(t+1,0,n),setModules_order(modules_order),r=_toConsumableArray(modules_order),(a=_objectSpread({},mongoData)).modules_order=r,a.theme=theme,setMongoData(a),e.next=12,saveModule(saveModuleOrder()).then((function(e){0===e.error?antd__WEBPACK_IMPORTED_MODULE_37__.ZP.success("Order Successfully Saved"):antd__WEBPACK_IMPORTED_MODULE_37__.ZP.error("Order Couldn't be Saved!!")}));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function changeOrderUp(e){return _changeOrderUp.apply(this,arguments)}function _changeOrderUp(){return(_changeOrderUp=_asyncToGenerator(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark((function e(t){var n,r,a;return _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>0)){e.next=12;break}return n=modules_order[t],modules_order.splice(t,1),modules_order.splice(t-1,0,n),setModules_order(modules_order),r=_toConsumableArray(modules_order),(a=_objectSpread({},mongoData)).modules_order=r,a.theme=theme,setMongoData(a),e.next=12,saveModule(saveModuleOrder()).then((function(e){0===e.error?antd__WEBPACK_IMPORTED_MODULE_37__.ZP.success("Order Successfully Saved"):antd__WEBPACK_IMPORTED_MODULE_37__.ZP.error("Order Couldn't be Saved!!")}));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function deleteModule(e){return _deleteModule.apply(this,arguments)}function _deleteModule(){return(_deleteModule=_asyncToGenerator(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark((function e(t){return _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,saveModule("delete",{id:t}).then((function(e){0===e.error?antd__WEBPACK_IMPORTED_MODULE_37__.ZP.success("Section deleted Successfully"):antd__WEBPACK_IMPORTED_MODULE_37__.ZP.error("Couldn't delete section!!")}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Content=antd__WEBPACK_IMPORTED_MODULE_38__.Z.Content,Sider=antd__WEBPACK_IMPORTED_MODULE_38__.Z.Sider,SubMenu=antd__WEBPACK_IMPORTED_MODULE_39__.Z.SubMenu,Title=antd__WEBPACK_IMPORTED_MODULE_40__.Z.Title,Paragraph=antd__WEBPACK_IMPORTED_MODULE_40__.Z.Paragraph,Text=antd__WEBPACK_IMPORTED_MODULE_40__.Z.Text,arrBlog=[{name:"Configure",desc:null,isActive:!1,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io__WEBPACK_IMPORTED_MODULE_41__.rzH,{})},{name:"Blog Posts",desc:null,isActive:!1,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_bs__WEBPACK_IMPORTED_MODULE_42__.IYI,{})},{name:"Authors",desc:null,isActive:!1,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_hi__WEBPACK_IMPORTED_MODULE_43__.IKj,{})},{name:"Categories",desc:null,isActive:!1,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ai__WEBPACK_IMPORTED_MODULE_36__.pom,{})}],ref33=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(),cutArr=ref33[0],setCutArr=ref33[1],ref34=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(arrBlog),blgArr=ref34[0],setBlgArr=ref34[1],ref35=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),col=ref35[0],setCol=ref35[1],ref36=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),collapsed=ref36[0],setCollapsed=ref36[1],ref37=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)([]),show=ref37[0],setShow=ref37[1],Info={header:{name:"Introduction",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_hi__WEBPACK_IMPORTED_MODULE_43__.HuB,{})},about:{name:"About",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_fa__WEBPACK_IMPORTED_MODULE_44__.wN,{})},testimonials:{name:"Testimonials",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ri__WEBPACK_IMPORTED_MODULE_45__.OXV,{})},events:{name:"Events",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_fa__WEBPACK_IMPORTED_MODULE_44__.IiJ,{})},gallery:{name:"Gallery",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io__WEBPACK_IMPORTED_MODULE_41__.DH7,{})},video:{name:"Videos",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io5__WEBPACK_IMPORTED_MODULE_46__.giN,{})},blogs:{name:"Blog",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_fa__WEBPACK_IMPORTED_MODULE_44__.b0,{})},contactus:{name:"Contact",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_47__.YGi,{})},html:{name:"Custom HTML",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ai__WEBPACK_IMPORTED_MODULE_36__.GXm,{})}},openFeedback=function(){setShowFeed(!0)},closeFeedback=function(){setShowFeed(!1)},handleBtn=function(e){col||setCollapsed(!0);var t=show.map((function(t,n){return n===e?_objectSpread({},t,{isActive:!t.isActive}):t.isActive?_objectSpread({},t,{isActive:!1}):t})),n=cutArr.map((function(e){return e.isActive?_objectSpread({},e,{isActive:!1}):e})),r=blgArr.map((function(e,t){return e.isActive?_objectSpread({},e,{desc:0===t?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_details_admin__WEBPACK_IMPORTED_MODULE_23__.Z,{id:bid,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,blogChange:blogChange,setBlogChange:setBlogChange,setChangeArr:setChangeArr}):1===t?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_posts_admin__WEBPACK_IMPORTED_MODULE_24__.Z,{id:bid,mongoData:mongoData,setMongoData:setMongoData}):2===t?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_authors_admin__WEBPACK_IMPORTED_MODULE_21__.Z,{id:bid,mongoData:mongoData}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_categories_admin__WEBPACK_IMPORTED_MODULE_22__.Z,{id:bid,mongoData:mongoData}),isActive:!1}):e}));setShow(t),setCutArr(n),setBlgArr(r)},handleCustBtn=function(e){col||setCollapsed(!0);var t=cutArr.map((function(t,n){return t.name===e?_objectSpread({},t,{isActive:!0}):_objectSpread({},t,{isActive:!1})}
1));setCutArr(t)},handleBlogBtn=function(e,t){col&&setCollapsed(!0);var n=blgArr.map((function(n,r){return r===e?_objectSpread({},n,{desc:0===e?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_details_admin__WEBPACK_IMPORTED_MODULE_23__.Z,{id:t,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,changeArr:changeArr,setChangeArr:setChangeArr,globalSave:globalSave,blogChange:blogChange,setBlogChange:setBlogChange}):1===e?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_posts_admin__WEBPACK_IMPORTED_MODULE_24__.Z,{id:t,mongoData:mongoData,setMongoData:setMongoData}):2===e?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_authors_admin__WEBPACK_IMPORTED_MODULE_21__.Z,{id:t,mongoData:mongoData}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_categories_admin__WEBPACK_IMPORTED_MODULE_22__.Z,{id:t,mongoData:mongoData}),isActive:!n.isActive}):n}));setBlgArr(n)},handleClose=function(e){var t=show.map((function(t){return t.name===e?_objectSpread({},t,{isActive:!1}):t}));setShow(t)},handleCustClose=function(e){var t=cutArr.map((function(t){return t.name===e?_objectSpread({},t,{isActive:!1}):t}));setCutArr(t)},handleBlogClose=function(e,t){var n=blgArr.map((function(n){return n.name===e?_objectSpread({},n,{desc:0===t?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_details_admin__WEBPACK_IMPORTED_MODULE_23__.Z,{id:bid,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,blogChange:blogChange,setBlogChange:setBlogChange,setChangeArr:setChangeArr}):1===t?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_posts_admin__WEBPACK_IMPORTED_MODULE_24__.Z,{id:bid,mongoData:mongoData,setMongoData:setMongoData}):2===t?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_authors_admin__WEBPACK_IMPORTED_MODULE_21__.Z,{id:bid,mongoData:mongoData}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_blogs_admin_panels_categories_admin__WEBPACK_IMPORTED_MODULE_22__.Z,{id:bid,mongoData:mongoData}),isActive:!1}):n}));setBlgArr(n)},changeRouter=function(){setRouter(_objectSpread({},router,{query:{}}))};(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){var e=[!subDomain&&{name:"Subdomain",desc:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_domain_subdomain_admin__WEBPACK_IMPORTED_MODULE_9__.Z,{items:props.mongoData.sub_domain,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:"subdomain"===router.query.open||!!(cutArr&&cutArr[0]&&cutArr[0].isActive)&&cutArr[0].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_gr__WEBPACK_IMPORTED_MODULE_48__.za3,{})},{name:"SEO Metadata",desc:metadata&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_metadata_metadata_admin__WEBPACK_IMPORTED_MODULE_11__.Z,{items:metadata,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),id:metadata&&metadata._id,isActive:!!(cutArr&&cutArr[1]&&cutArr[1].isActive)&&cutArr[1].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_47__.$Eg,{})},{name:"Colors",desc:theme&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_theme_color_admin__WEBPACK_IMPORTED_MODULE_14__.Z,{items:theme,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[2]&&cutArr[2].isActive)&&cutArr[2].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io5__WEBPACK_IMPORTED_MODULE_46__.dNS,{})},{name:"Fonts",desc:theme&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_theme_font_admin__WEBPACK_IMPORTED_MODULE_15__.Z,{items:theme,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[3]&&cutArr[3].isActive)&&cutArr[3].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_im__WEBPACK_IMPORTED_MODULE_49__.M31,{})},{name:"Logo",desc:business&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_business_business_admin__WEBPACK_IMPORTED_MODULE_7__.Z,{items:business,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[4]&&cutArr[4].isActive)&&cutArr[4].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io5__WEBPACK_IMPORTED_MODULE_46__.UQs,{})},{name:"Social",desc:social&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_social_social_admin__WEBPACK_IMPORTED_MODULE_13__.Z,{items:social,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[5]&&cutArr[5].isActive)&&cutArr[5].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_fa__WEBPACK_IMPORTED_MODULE_44__.PPi,{})},{name:"Connect Your Domain",desc:domain&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_domain_domain_admin__WEBPACK_IMPORTED_MODULE_8__.Z,{items:props.mongoData.custom_domain,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:"customdomain"===router.query.open||!!(cutArr&&cutArr[6]&&cutArr[6].isActive)&&cutArr[6].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io5__WEBPACK_IMPORTED_MODULE_46__.IjT,{})},{name:"Custom Scripts",desc:script&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_script_script_admin__WEBPACK_IMPORTED_MODULE_28__.Z,{items:props.mongoData.script,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[7]&&cutArr[7].isActive)&&cutArr[7].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io__WEBPACK_IMPORTED_MODULE_41__.ESE,{})},{name:"Integrations",desc:integration&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_integrations_integration_admin__WEBPACK_IMPORTED_MODULE_10__.Z,{items:integration,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[8]&&cutArr[8].isActive)&&cutArr[8].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_47__.XFz,{})},{name:"Pages",desc:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_pages_pages_admin__WEBPACK_IMPORTED_MODULE_12__.Z,{mongoData:mongoData,editPageModal:editPageModal,setEditPageModal:setEditPageModal,setAddNewPage:setAddNewPage,add_updatePage:add_updatePage,newPageRoute:newPageRoute,setNewPageRoute:setNewPageRoute,pageDeleteModalVisible:pageDeleteModalVisible,setPageDeleteModalVisible:setPageDeleteModalVisible}),isActive:!!(cutArr&&cutArr[9]&&cutArr[9].isActive)&&cutArr[9].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ri__WEBPACK_IMPORTED_MODULE_45__.mqU,{})},{name:"Menu",desc:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_navbar_navbar_admin__WEBPACK_IMPORTED_MODULE_27__.Z,{navbar:navbar,setNavbar:setNavbar,mongoData:mongoData,setMongoData:setMongoData,saveModule:saveModule,customizeArr:customizeArr,setCustomizeArr:setCustomizeArr,globalSave:globalSave,checkNew:checkNew}),isActive:!!(cutArr&&cutArr[10]&&cutArr[10].isActive)&&cutArr[10].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_47__.QE7,{})}];router.query.open&&(window.history.replaceState("","","/dashboard"),
1changeRouter()),setCutArr(e)}),[globalSave,customizeArr,mongoData]),(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){var e=show;e[0]={name:"Customize",desc:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"flex flex-col justify-center py-6 capitalize",children:cutArr&&cutArr.map((function(e,t){return e&&e.name&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"px-6 py-3 flex items-center cursor-pointer text-gray-700 hover:text-blue-500 hover:bg-blue-50",onClick:function(){return handleCustBtn(e.name)},children:[e.icon,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{className:"flex items-center ml-3",children:[e.name," ",customizeArr.includes(e.name)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_50__.Z,{style:{marginLeft:"6px",color:"#fbbf24"}})]})]},t)}))}),isActive:!!(show&&show[0]&&show[0].isActive)&&show[0].isActive,icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_47__.dHZ,{})},setShow(e)}),[customizeArr,cutArr,mongoData]),(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){var e=[];e[0]=show[0],modules_order&&mongoData.modules_order.map((function(t,n){e.push({name:Info[t.module_type]?Info[t.module_type].name:"Module",desc:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:(0,_site_components_admin_components__WEBPACK_IMPORTED_MODULE_6__.Z)(t,n,changeOrderDown,changeOrderUp,mongoData,setMongoData,saveModule,blgArr,setBlgArr,handleBlogBtn,changeArr,setChangeArr,globalSave,setBid,checkNew)},n),isActive:!1,module_id:t._id,module_type:t.module_type,icon:Info[t.module_type]?Info[t.module_type].icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_51__.Z,{}),extra:Info[t.module_type]&&Info[t.module_type].extra?Info[t.module_type].extra:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span",{})})})),modules&&mongoData.modules.map((function(t,n){t.order||e.push({name:Info[t.module_type]?Info[t.module_type].name:"Module",desc:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:(0,_site_components_admin_components__WEBPACK_IMPORTED_MODULE_6__.Z)(t,n,changeOrderDown,changeOrderUp,mongoData,setMongoData,saveModule,blgArr,setBlgArr,handleBlogBtn,changeArr,setChangeArr,globalSave,setBid,checkNew)},n),isActive:!1,module_id:t._id,module_type:t.module_type,icon:Info[t.module_type]?Info[t.module_type].icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_51__.Z,{})})})),setShow(e)}),[modules_order,modules,globalSave]);var menuu=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_39__.Z,{mode:"inline",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ri__WEBPACK_IMPORTED_MODULE_45__.IIZ,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:mongoData&&"https://allevents.in/org/".concat(mongoData.organizer_id,"?ref=wootick-dash&utm_source=wootick&utm_medium=organizer-page&utm_campaign=create-event"),children:"My Organizer Page"})},"0"),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_fa__WEBPACK_IMPORTED_MODULE_44__.IiJ,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:mongoData&&"https://allevents.in/manage/manage-events.php?org_id=".concat(mongoData.organizer_id,"&ref=wootick-dash&utm_source=wootick&utm_medium=my-event&utm_campaign=create-event"),children:"My Events"})},"1"),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_gr__WEBPACK_IMPORTED_MODULE_48__.vcu,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://allevents.in/manage/create.php?ref=wootick-dash&org_id=".concat(mongoData.organizer_id,"&utm_source=wootick&utm_medium=dashboard&utm_campaign=create-event"),children:"Create Event"})},"2"),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_vsc__WEBPACK_IMPORTED_MODULE_52__.xJq,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{title:"Share",type:"link",onClick:openFeedback,children:!collapsed&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span",{children:"Share Feedback"})})},"3"),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_bi__WEBPACK_IMPORTED_MODULE_53__.LVi,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{href:"#",onClick:function(){return eval("Beacon('open');")},children:"Get Support"})},"4"),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Divider,{style:{backgroundColor:"#d1d5db"}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ri__WEBPACK_IMPORTED_MODULE_45__.Vac,{}),onClick:function(){return(0,next_auth_react__WEBPACK_IMPORTED_MODULE_2__.signOut)({callbackUrl:"/"})},className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().signOutButton,children:"Sign Out"},"3")]}),ref38=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),newModule1=ref38[0],setNewModule=ref38[1],NewSection=function(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_33__.Z,{centered:!0,footer:null,width:1e3,visible:newModModal,className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().SecModalCss,onCancel:function(){return setNewModModal(!1)},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h1",{style:{textAlign:"center",fontSize:24,marginBottom:24},children:"Select a component to add"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().modalCardDiv,children:addingNewMod?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"flex flex-col items-center w-full gap-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_im__WEBPACK_IMPORTED_MODULE_49__.j8h,{className:"text-4xl animate-spin"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{className:"text-lg font-medium",children:"Adding new section..."})]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"header",index:newModuleIndex})},title:"Introduction",src:"https://cdn2.allevents.in/transup/64/da8ebaf3cc44d7962707f35c1c7da0/Screenshot-2022-06-08-at-1.45.27-PM.png",alt:"header image"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"about",index:newModuleIndex})},title:"About",src:"https://cdn2.allevents.in/transup/18/e66928464a407c97f06a88def53473/Screenshot-2022-06-08-at-2.26.15-PM.png",alt:"about image"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"testimonials",index:newModuleIndex})},title:"Testimonials",src:"https://cdn2.allevents.in/transup/e0/e7fede90db45968e7feea7290e543e/Screenshot-2022-06-08-at-1.50.27-PM.png",alt:"testimonials image"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"gallery",index:newModuleIndex})},title:"Photo Gallery",src:"https://cdn2.allevents.in/transup/17/5b0d98e0a14679815d52
1699cff7afb/Screenshot-2022-06-08-at-1.57.02-PM.png",alt:"gallery image"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"contactus",index:newModuleIndex})},title:"Contact",src:"https://cdn2.allevents.in/transup/d1/a5a8bb02c7460aa125bc2510917cdf/Screenshot-2022-06-08-at-2.27.42-PM.png",alt:"contact image"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"video",index:newModuleIndex})},title:"Videos",src:"https://cdn2.allevents.in/transup/cf/05d1fd370044d9b1c72d135524e378/Screenshot-2022-06-08-at-2.00.55-PM.png",alt:"video image"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CustCard,{click:function(){return saveModule("new",{type:"html",index:newModuleIndex})},title:"Custom HTML",src:"https://cdn2.allevents.in/transup/23/2f0d806ab74ffbabb644640f45aa87/article_01227_.jpg",alt:"Custom HTML"})]})})]})})},ref39=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),visible=ref39[0],setVisible=ref39[1],handleMenuClick=function(e){"3"===e.key&&setVisible(!1)},handleVisibleChange=function(e){setVisible(e)},ref40=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(null),pageDD=ref40[0],setPageDD=ref40[1];function saveModule(e,t){return _saveModule.apply(this,arguments)}function _saveModule(){return(_saveModule=_asyncToGenerator(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark((function e(t,n){var r,a,i,o,s,l,c,_,u,d,m,f,h,p,g,v,y,x,b,E,j,D,P,M,O,w;return _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(i={organizer_id:mongoData.organizer_id}).wootick_url=mongoData.sitebase_domain,i.organizer_name=null===(r=mongoData.business)||void 0===r?void 0:r.business_name,i.module_saved=(null===t||void 0===t||null===(a=t.new_data)||void 0===a?void 0:a.module_type)?null===t||void 0===t?void 0:t.new_data.module_type:"root document",sendinblue.track("wootick-site-updated",{user_id:session.user_id,FIRSTNAME:session.first_name,LASTNAME:session.last_name},{data:i})}catch(A){console.log("error",A)}if(setGLoading(!0),!n){e.next=17;break}return router.query.page&&(n.pageRoute=router.query.page),setAddingNewMod(!0),e.next=7,fetch("/api/update/update-module",{method:"".concat("delete"===t?"DELETE":"POST"),body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 7:if(!(o=e.sent)){e.next=15;break}return"new"===t?(setCheckNew(!1),s=_toConsumableArray(modules_order),l=_toConsumableArray(modules),o.data.siteDoc.modules_order.map((function(e,t){s[t]?e._id!==s[t]._id&&(s.splice(t,0,e),e.active=!0,setChangeArr((function(t){return _toConsumableArray(t).concat([e._id])}))):(s.push(e),e.active=!0,setChangeArr((function(t){return _toConsumableArray(t).concat([e._id])})))})),o.data.siteDoc.modules.map((function(e,t){l[t]?e._id!==l[t]._id&&(l.splice(t,0,e),e.active=!0,setChangeArr((function(t){return _toConsumableArray(t).concat([e._id])}))):(l.push(e),e.active=!0,setChangeArr((function(t){return _toConsumableArray(t).concat([e._id])})))})),(c=_objectSpread({},mongoData)).modules_order=s,c.modules=l,setMongoData(c),setModules_order(s),setModules(l)):(_=o.data.siteDoc.modules_order,u=o.data.siteDoc.modules,(d=_objectSpread({},mongoData)).modules_order=_,d.modules=u,setMongoData(d),setModules_order(_),setModules(u)),setNewModModal(!1),setCheckNew(!0),setAddingNewMod(!1),setGLoading(!1),e.abrupt("return",o);case 15:e.next=55;break;case 17:if(!t.module_id){e.next=48;break}for(f=(m=function(e,t){var n=void 0===t?"":t;return Object.keys(e).reduce((function(t,r){return"object"===typeof e[r]?Object.assign(t,m(e[r],"".concat(n).concat(r,"."))):t["".concat(n).concat(r)]=e[r],t}),{})})(t.new_data),h={module_id:t.module_id,new_data:{}},router.query.page&&(h.pageRoute=router.query.page),p=!0,g=!1,v=void 0,e.prev=23,y=Object.entries(f)[Symbol.iterator]();!(p=(x=y.next()).done);p=!0)b=_slicedToArray(x.value,2),E=b[0],j=b[1],D=!1,t.allowedKeys.indexOf(E)>-1&&(D=!0),P=E.split("."),void 0!==(M=P.pop())&&t.allowedKeys.indexOf(M)>-1&&(D=!0),D&&lodash__WEBPACK_IMPORTED_MODULE_18___default().set(h.new_data,E,j);e.next=31;break;case 27:e.prev=27,e.t0=e.catch(23),g=!0,v=e.t0;case 31:e.prev=31,e.prev=32,p||null==y.return||y.return();case 34:if(e.prev=34,!g){e.next=37;break}throw v;case 37:return e.finish(34);case 38:return e.finish(31);case 39:return t.new_data.items&&!h.new_data.items&&0===t.new_data.items.length&&lodash__WEBPACK_IMPORTED_MODULE_18___default().set(h.new_data,"items",[]),e.next=42,fetch("/api/update/update-module",{method:"PATCH",body:JSON.stringify(h),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 42:if(!(O=e.sent)){e.next=46;break}return setGLoading(!1),e.abrupt("return",O);case 46:e.next=55;break;case 48:return router.query.page&&(t.pageRoute=router.query.page),e.next=51,fetch("/api/update/update-site",{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 51:if(!(w=e.sent)){e.next=55;break}return setGLoading(!1),e.abrupt("return",w);case 55:setGLoading(!1);case 56:case"end":return e.stop()}}),e,null,[[23,27,31,39],[32,,34,38]])}
1)))).apply(this,arguments)}function add_updatePage(e,t){return _add_updatePage.apply(this,arguments)}function _add_updatePage(){return(_add_updatePage=_asyncToGenerator(_app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark((function e(t,n){var r;return _app_node_modules_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(setGLoading(!0),r={pageRoute:newPageRoute,new_data:editPageModal.data,pageId:n},"POST"!==t){e.next=11;break}if(newPageRoute){e.next=8;break}return antd__WEBPACK_IMPORTED_MODULE_37__.ZP.error("Page route is required."),e.abrupt("return");case 8:if(!(newPageRoute.length<3||newPageRoute.length>50)){e.next=11;break}return antd__WEBPACK_IMPORTED_MODULE_37__.ZP.error("Characters must be between 3 and 50"),e.abrupt("return");case 11:return e.next=13,fetch("/api/page/add_updatePage",{method:t,body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){if(0==e.error){var a=_objectSpread({},mongoData);if("PATCH"===t)pageData&&editPageModal.data._id===pageData._id&&editPageModal.data.slug!==router.query.page&&router.replace("/dashboard/".concat(editPageModal.data.slug)),lodash__WEBPACK_IMPORTED_MODULE_18___default().merge(a.pages.find((function(e){return e._id==editPageModal.data._id})),e.data),setMongoData(a),setEditPageModal({data:null,visible:!1});else if("POST"===t)setAddNewPage(!1),antd__WEBPACK_IMPORTED_MODULE_37__.ZP.success("Redirecting to new page"),router.push("/dashboard/".concat(r.pageRoute));else if("DELETE"===t){pageData&&n===pageData._id&&(antd__WEBPACK_IMPORTED_MODULE_37__.ZP.success("Redirecting to home page"),router.replace("/dashboard"));var i=mongoData.pages;i.splice(i.indexOf(n),1),i.length<1?a.pages=[]:a.pages=i,setMongoData(a)}}else setEditPageModal({data:null,visible:!1}),setAddNewPage(!1),setNewPageRoute(""),antd__WEBPACK_IMPORTED_MODULE_37__.ZP.error("Something went wrong!")}));case 13:setGLoading(!1);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)((function(){setPageDD((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_39__.Z,{mode:"inline",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ai__WEBPACK_IMPORTED_MODULE_36__.V9Z,{style:{fontSize:15}}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(next_link__WEBPACK_IMPORTED_MODULE_20__.default,{href:"/dashboard",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{children:"/ home"})})},0),mongoData.pages.map((function(e,t){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ri__WEBPACK_IMPORTED_MODULE_45__.mqU,{style:{fontSize:15}}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(next_link__WEBPACK_IMPORTED_MODULE_20__.default,{href:"/dashboard/".concat(e.slug),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("a",{children:["/ ",e.slug," "]})})},t+1)})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Divider,{style:{backgroundColor:"#d1d5db"}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ai__WEBPACK_IMPORTED_MODULE_36__.Lfi,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{onClick:function(){setEditPageModal({data:void 0,visible:!1}),setNewPageRoute(""),setAddNewPage(!0)},style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",justifyContent:"center"},children:"New page"})},"999999")]}))}),[mongoData,router]);var ref41=(0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(!1),share=ref41[0],setShare=ref41[1],shareModal=function(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_33__.Z,{title:"Share With Friends",footer
1:null,width:500,visible:share,className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().SecModalCss,onCancel:function(){return setShare(!1)},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h6",{style:{textAlign:"center",marginBottom:24},children:mongoData.sitebase}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_share__WEBPACK_IMPORTED_MODULE_30__.Z,{url:mongoData.sitebase,source:"dashboard"})]})})};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["admin"===permission&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_user_welcome__WEBPACK_IMPORTED_MODULE_31__.Z,{mongoData:mongoData,setMongoData:setMongoData}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"flex ".concat(_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().mainLayout),id:"dashcontent",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_38__.Z,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(Sider,{breakpoint:"md",collapsible:!0,onBreakpoint:function(e){setCol(!e)},collapsed:collapsed,onCollapse:function(){return setCollapsed(!collapsed)},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().dashboardSider,style:{width:collapsed?80:200},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().maindivChild1,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Title,{level:5,style:{color:"white"},className:"line-clamp-1 ".concat(_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().child1Title),children:mongoData.business.business_name}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"flex justify-center gap-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_55__.Z,{title:col?collapsed&&"Visit Website":"Visit Website",placement:"right",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{href:pageData?"".concat(mongoData.sitebase,"/").concat(pageData.slug):"".concat(mongoData.sitebase),rel:"noreferrer",target:"_blank",className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().child1Anchor,children:col?collapsed?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io5__WEBPACK_IMPORTED_MODULE_46__.IjT,{}):"Visit Website":(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io5__WEBPACK_IMPORTED_MODULE_46__.IjT,{})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_55__.Z,{title:col?collapsed&&"Visit Website":"Visit Website",placement:"right",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{onClick:function(){return setShare(!0)},className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().child1Anchor,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_fa__WEBPACK_IMPORTED_MODULE_44__.Lrt,{})})})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_39__.Z,{mode:"inline",theme:"dark",style:{textTransform:"capitalize",backgroundColor:"#000c17"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{style:{backgroundColor:"#001628",textAlign:"left",margin:0,padding:collapsed?"0px":"24px 16px"},children:pageDD&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_56__.Z,{overlayClassName:"fixed",overlay:pageDD,onVisibleChange:handleVisibleChange,visible:visible,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",{onClick:function(e){return e.preventDefault()},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_57__.Z,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{style:{textTransform:"lowercase",fontSize:16,display:"flex",alignItems:"center",justifyContent:"center",gap:8,color:"#0ea5e9"},children:[router.query.page?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ri__WEBPACK_IMPORTED_MODULE_45__.mqU,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_ai__WEBPACK_IMPORTED_MODULE_36__.V9Z,{}),!collapsed&&(router.query.page?router.query.page:"home")]}),!collapsed&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Text,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io__WEBPACK_IMPORTED_MODULE_41__.Vmf,{className:"transform rotate-180 text-sky-500 ".concat(_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().maindiv2Text)})})]})})})}),show.map((function(e,t){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{style:{paddingLeft:collapsed?"":"40px",backgroundColor:e.isActive?"#1890ff":"#000c17"},icon:e.icon,onClick:function(){return handleBtn(t)},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_55__.Z,{title:changeArr.includes(e.module_id)&&"Unsaved Changes",placement:"right",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("a",{onClick:function(e){"/dashboard"!==router.route&&e.preventDefault()},style:{fontSize:"15px",display:"flex",alignItems:"center"},href:"Customize"!==e.name&&"Pages"!==e.name&&"Menu"!==e.name&&"/dashboard"===router.route&&"/dashboard#".concat(e.module_type,"-").concat(e.module_id),children:[e.name," ",e.extra&&e.extra,changeArr.includes(e.module_id)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_50__.Z,{style:{marginLeft:"6px",color:"#fbbf24"}}),"Customize"===e.name&&customizeArr.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_50__.Z,{style:{marginLeft:"6px",color:"#fbbf24"}})]})})},t)})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_39__.Z.Item,{style:{paddingLeft:collapsed?"":"40px",backgroundColor:"#000c17"},icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_bs__WEBPACK_IMPORTED_MODULE_42__.Nmn,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_55__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{onClick:function(){return newModuleDetails(-1)},children:"Add Section"})})})]})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().siderMaindiv2,style:{left:collapsed?23:18},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_feedback_feedback_admin__WEBPACK_IMPORTED_MODULE_26__.Z,{mongoData:mongoData,show:function(){return setShowFeed(!0)},visible:showFeed,cancel:function(){return closeFeedback()}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_56__.Z,{overlayClassName:"fixed",overlay:menuu,placement:"topRight",trigger:"click",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(Paragraph,{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().maindiv2Para,children:[avatar?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_58__.C,{src:avatar}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_58__.C,{src:"https://ui-avatars.c
1om/api/?size=200&background=1890ff&font-size=0.35&color=4e4e4e&name=".concat(session&&session.first_name+" "+session.last_name)}),!collapsed&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Text,{style:{color:"rgba(255,255,255,0.6)",width:"110px"},className:"line-clamp-1 ".concat(_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().maindiv2Text),children:session?session.first_name+" "+session.last_name:"User"}),!collapsed&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Text,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_icons_io__WEBPACK_IMPORTED_MODULE_41__.OId,{className:"transform rotate-180 ".concat(_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().maindiv2Text)})})]})})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_38__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(Content,{style:{fontSize:16,maxWidth:2600,width:"100%",height:"100%",backgroundColor:"white",position:"relative",zIndex:10,overflow:"initial"},className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().contentWhole,children:[show.map((function(e){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_custom_drawer_cust_drawer__WEBPACK_IMPORTED_MODULE_25__.H,{width:col?"Customize"===e.name||"Blog"===e.name?350:600:300,name:e.name,visible:e.isActive,close:function(){return handleClose(e.name)},extraClose:function(){return handleClose(e.name)},collapsed:collapsed,desc:e.desc},e.module_id)})),cutArr&&cutArr.map((function(e){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_custom_drawer_cust_drawer__WEBPACK_IMPORTED_MODULE_25__.W,{width:col?"Fonts"===e.name||"Colors"===e.name?350:600:300,name:e.name,visible:e.isActive,close:function(){return handleCustClose(e.name)},collapsed:collapsed,desc:e.desc},e.id)})),blgArr.map((function(e,t){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_site_components_custom_drawer_cust_drawer__WEBPACK_IMPORTED_MODULE_25__.W,{width:col?"Authors"===e.name||"Categories"===e.name?400:600:300,name:e.name,visible:e.isActive,close:function(){return handleBlogClose(e.name,t)},collapsed:collapsed,desc:e.desc},e.id)})),modules_order&&mongoData&&events&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_pages_index__WEBPACK_IMPORTED_MODULE_5__.default,{modOrd:modules_order,mongoData:mongoData,events:events,show:show,handleBtn:handleBtn,changeOrderDown:changeOrderDown,changeOrderUp:changeOrderUp,newModuleDetails:newModuleDetails,deleteModule:deleteModule,handleCustBtn:handleCustBtn}),(customizeArr.length>0||changeArr.length>0)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{zIndex:150},className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().container,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().pulseButton,disabled:!customizeArr.length&&!changeArr.length,onClick:globalSaveFunction,children:"Save Changes"})}),NewSection(),newPageSection(),shareModal(),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_33__.Z,{centered:!0,onOk:function(){return add_updatePage("PATCH")},okText:"Update",width:400,visible:editPageModal.visible,confirmLoading:gLoading,onCancel:function(){setEditPageModal({data:null,visible:!1})},children:editPageModal.data&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h1",{style:{textAlign:"center",fontSize:24,marginBottom:24},children:"Edit Page Details"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{style:{fontSize:14,fontWeight:500},children:"Page Route"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__.Z,{addonBefore:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span",{style:{color:"#9ca3af"},children:"/"}),min:1,style:{marginTop:-12},autoComplete:"off",value:editPageModal.data.slug,onChange:function(e){setEditPageModal({data:_objectSpread({},editPageModal.data,{slug:(0,_site_functions_fe_function__WEBPACK_IMPORTED_MODULE_29__.lV)(e.target.value)}),visible:!0})},placeholder:"Page Slug"}),pgSlugAv&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Text,{type:"Slug Available"!==pgSlugAv&&"w
1arning",children:"Slug Available"!==pgSlugAv&&pgSlugAv}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{style:{fontSize:14,marginTop:18,fontWeight:500},children:"Meta Title"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__.Z,{style:{marginTop:-12},value:editPageModal.data.metadata?editPageModal.data.metadata.title:"",onChange:function(e){setEditPageModal({data:_objectSpread({},editPageModal.data,{metadata:_objectSpread({},editPageModal.data.metadata,{title:e.target.value})}),visible:!0})},placeholder:"Metadata title"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{style:{fontSize:14,marginTop:18,fontWeight:500},children:"Meta Description"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__.Z.TextArea,{style:{marginTop:-6},value:editPageModal.data.metadata?editPageModal.data.metadata.description:"",onChange:function(e){setEditPageModal({data:_objectSpread({},editPageModal.data,{metadata:_objectSpread({},editPageModal.data.metadata,{description:e.target.value})}),visible:!0})},placeholder:"Metadata Description"})]})})]})})]})})]}),session&&session.first_name&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(next_script__WEBPACK_IMPORTED_MODULE_16__.default,{id:"smart-look",strategy:"lazyOnload",children:"window.smartlook||(function(d) {\n                  var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];\n                  var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';\n                  c.charset='utf-8';
1c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);\n                  })(document);\n                  smartlook('init', 'bbee02f5ebbde9de5b75a9637ed2151229c80a0e', { region: 'eu' });\n                  smartlook('identify', \"".concat(session.user_id,'", {\n                      "organizer_id": "').concat(mongoData.organizer_id,'",  \n                      "name": "').concat(session.first_name," ").concat(session.last_name,'"});')})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(next_head__WEBPACK_IMPORTED_MODULE_19__.default,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("title",{children:["Dashboard | ",mongoData.metadata.title]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("script",{dangerouslySetInnerHTML:{__html:'!function(e,t,n){function a(){var e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],"complete"===t.readyState)return a();e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}(window,document,window.Beacon||function(){});'}}),session&&session.comm_email&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("script",{dangerouslySetInnerHTML:{__html:'(function() {\n              window.sib = { equeue: [], client_key: "0qbq50t37us9v599jb6iazg4" };\n              window.sib.email_id = \''.concat(session.comm_email,"';\n              window.sendinblue = {}; for (var j = ['track', 'identify', 'trackLink', 'page'], i = 0; i < j.length; i++) { (function(k) { window.sendinblue[k] = function() { var arg = Array.prototype.slice.call(arguments); (window.sib[k] || function() { var t = {}; t[k] = arg; window.sib.equeue.push(t);})(arg[0], arg[1], arg[2]);};})(j[i]);}var n = document.createElement(\"script\"),i = document.getElementsByTagName(\"script\")[0]; n.type = \"text/javascript\", n.id = \"sendinblue-js\", n.async = !0, n.src = \"https://sibautomation.com/sa.js?key=\" + window.sib.client_key, i.parentNode.insertBefore(n, i), window.sendinblue.page();\n          })(); sendinblue.identify('").concat(session.comm_email,"',{\n            \"user_id\": '").concat(session.user_id,"',\n            \"FIRSTNAME\": '").concat(session.first_name,"',\n            \"LASTNAME\": '").concat(session.last_name,"',\n          })")}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("script",{dangerouslySetInnerHTML:{__html:"window.Beacon('init', 'd461bcbe-f67a-447d-8f46-f8ebc8d16850')"}})]})]})}var CustCard=function(e){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_59__.Z,{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().cardCss,bodyStyle:{padding:0},onClick:e.click,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{borderBottom:"1px solid #d1d5db",padding:10,fontSize:16,fontWeight:500},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span",{children:e.title})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{style:{width:"100%",padding:10},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img",{className:_styles_test_module_css__WEBPACK_IMPORTED_MODULE_54___default().cardImg,src:e.src,alt:e.alt})})]})}},90641:function(e,t){"use strict";t.Z=["events","blog","dashboard","dashboard-auth","_app","dev","developer","madhur","_document","events","index","init","404","login","logout","logoff","loggedout","signup","signin","signout","signoff","authenticate","auth","sitemap.xml","admin","public","allevents","ae","system","wootick","wt","api","developer","department","test","page","pages","site","account","user","middleware","_middleware"]},64341:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(85893),a=n(89583),i=n(52533);function o(e){if(e){var t=null!=window.screenLeft?window.screenLeft:window.screenX||0,n=null!=window.screenTop?window.screenTop:window.screenY||0,r=window.innerWidth||document.documentElement.clientWidth||screen.width,a=window.innerHeight||document.documentElement.clientHeight||screen.height,i=Math.max(0,Math.round(t+(r-600)/2)),o=Math.max(0,Math.round(n+(a-650)/2)),s=window.open(e,"_blank","width=".concat(600,",height=").concat(650,",left=").concat(i,",top=").concat(o));s&&(s.opener=null)}}function s(e){var t=function(e,t){var n=encodeURIComponent(e||""),r=encodeURIComponent(t||""),a=encodeURIComponent(t?"".concat(t," ").concat(e||""):e||"");return{facebook:"https://www.facebook.com/sharer/sharer.php?u=".concat(n),x:"https://twitter.com/intent/tweet?url=".concat(n).concat(t?"&text=".concat(r):""),linkedin:"https://www.linkedin.com/feed/?shareActive=true&shareUrl=".concat(n),whatsapp:"https://api.whatsapp.com/se
1nd?text=".concat(a)}}(e.url,e.title);return"dashboard"===e.source?(0,r.jsxs)("div",{className:"flex items-center justify-center gap-6",children:[(0,r.jsx)("button",{type:"button","aria-label":"Share on Facebook",onClick:function(){return o(t.facebook)},style:{padding:"8px",width:"70px",backgroundColor:"#1877f2"},className:"flex items-center justify-center",children:(0,r.jsx)(a.tBk,{className:"text-[1.3rem] text-white-50"})}),(0,r.jsx)("button",{type:"button","aria-label":"Share on X",onClick:function(){return o(t.x)},style:{padding:"8px",width:"70px",backgroundColor:"#000000"},className:"flex items-center justify-center",children:(0,r.jsx)(i.Z,{className:"text-[1.3rem] text-white-50"})}),(0,r.jsx)("button",{type:"button","aria-label":"Share on LinkedIn",onClick:function(){return o(t.linkedin)},style:{padding:"8px",width:"70px",backgroundColor:"#0077b5"},className:"flex items-center justify-center",children:(0,r.jsx)(a.BUd,{className:"text-[1.3rem] text-white-50"})}),(0,r.jsx)("button",{type:"button","aria-label":"Share on WhatsApp",onClick:function(){return o(t.whatsapp)},style:{padding:"8px",width:"70px",backgroundColor:"#25d366"},className:"flex items-center justify-center",children:(0,r.jsx)(a.xpo,{className:"text-[1.3rem] text-white-50"})})]}):(0,r.jsxs)("div",{className:e.className,children:[(0,r.jsx)("button",{type:"button","aria-label":"Share on Facebook",onClick:function(){return o(t.facebook)},style:{padding:"6px"},className:"bg-gray-400 flex items-center rounded-full",children:(0,r.jsx)(a.tBk,{className:"text-[1.1rem] text-white-50"})}),(0,r.jsx)("button",{type:"button","aria-label":"Share on X",onClick:function(){return o(t.x)},style:{padding:"6px"},className:"bg-gray-400 flex items-center rounded-full",children:(0,r.jsx)(i.Z,{className:"text-[1.1rem] text-white-50"})}),(0,r.jsx)("button",{type:"button","aria-label":"Share on LinkedIn",onClick:function(){return o(t.linkedin)},style:{padding:"6px"},className:"bg-gray-400 flex items-center rounded-full",children:(0,r.jsx)(a.BUd,{className:"text-[1.1rem] text-white-50"})}),(0,r.jsx)("button",{type:"button","aria-label":"Share on WhatsApp",onClick:function(){return o(t.whatsapp)},style:{padding:"6px"},className:"bg-gray-400 flex items-center rounded-full",children:(0,r.jsx)(a.xpo,{className:"text-[1.1rem] text-white-50"})})]})}},18213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(85893),a=n(67055),i=n.n(a),o=n(67294),s=n(53990),l=n(40725),c=n.n(l),_=n(96486),u=n.n(_),d=n(52732);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){m(e,t,n[t])}))}return e}function h(e){var t=e.mongoData,n=e.setMongoData,a=(0,o.useState)("<p>Welcome to Wootick!</p>"),l=a[0],_=a[1],m=(0,o.useState)((0,d.$E)(t.createdAt)),h=m[0],p=m[1],g=(0,o.useState)(!1),v=g[0],y=g[1],x=(0,o.useState)(null),b=x[0],E=x[1],j=(0,o.useState)(null),D=j[0],P=j[1],M=(0,o.useState)(!1),O=M[0],w=M[1];(0,o.useEffect)((function(){E(window.innerHeight),P(window.innerWidth)}),[]);var A=[{message:"<p>Welcome to Wootick!</p>",module:"none"},{message:"<p>Bob the builder reporting for duty, let's build your website\ud83d\udee0</p>",module:"header"},{message:"<p>Sculpting your story.&#128512; Let's tell the world about you</p>",module:"about"},{message:"<p>Importing your events. Sell tickets easily under your brand name\u2705</p>",module:"events"},{message:"<p>Polishing your awards\ud83c\udfc6. Nothing more valuable than happy attendee testimonials</p>",module:"testimonials"},{message:"<p>Printing your photos\ud83d\udcf8. A picture is worth a thousand words</p>",module:"gallery"},{message:"<p>Hooray! We are done\u2728. Its your time now, go be awesome!</p>",module:"none"}],C=function(){window.scrollTo({top:0,behavior:"smooth"})};return(0,o.useEffect)((function(){if((0,d.$E)(t.createdAt)){var e=t.modules_order;e.map((function(e,t){e.active=!1}));var r=f({},t);u().merge(r.modules_order,e),n(r),y(!0)}localStorage.setItem("welcome",!1)}),[]),(0,o.useEffect)((function(){if(v)var e=0,r=setInterval((function(){if(++e===A.length-1&&w(!0),e>=A.length)setTimeout((function(){w(!1),p(!1),C()}),4e3),clearInterval(r);else{_(A[e].message);var a=t.modules_order;a.map((function(t,n){t.module_type===A[e].module&&(t.active=!0,function(){var e=document.getElementById("dashcontent"),t=document.getElementById("sitefooter"),n=document.getElementById("contact");window.scrollTo({top:(null===e||void 0===e?void 0:e.scrollHeight)-((null===t||void 0===t?void 0:t.scrollHeight)+(null===n||void 0===n?void 0:n.scrollHeight)),behavior:"smooth"})}(t._id))}));var i=f({},t);u().merge(i.modules_order,a),n(i)}}),3e3)}),[v]),(0,r.jsx)(r.Fragment,{children:h&&(0,r.jsx)("div",{className:"confettie-wrap",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:i().backgroundDiv,children:O&&(0,r.jsx)(c(),{numberOfPieces:300,width:D,height:b})}),(0,r.jsxs)("div",{className:i().contentDiv,children:[(0,r.jsx)("div",{dangerouslySetInnerHTML:(0,d.KU)(l),className:i().welcomeMessage}),l!==A[A.length-1].message?(0,r.jsx)("div",{children:(0,r.jsx)(s.j8h,{className:"text-xl animate-spin"})}):(0,r.jsx)("div",{children:(0,r.jsx)("button",{onClick:function(){p(!1),C()},className:i().explore_button,children:"Explore"})})]})]})})})}},11569:function(e){e.exports={signOutButton:"test_signOutButton__Cgr_2",overShadow:"test_overShadow__tBlGV",contentDiv:"test_contentDiv__zIcFi",contentDiv1:"test_contentDiv1__6P_2G",next:"test_next__RMuA3",nextBtn:"test_nextBtn__JhRIH",modalCardDiv:"test_modalCardDiv__OnpUx",cardCss:"test_cardCss__aLIj1",cardImg:"test_cardImg__8kYAT",SecModalCss:"test_SecModalCss__WzB_H",mainLayout:"test_mainLayout__Y0GFD",dashboardSider:"test_dashboardSider__FhAsu",maindivChild1:"test_maindivChild1__sxHQb",child1Title:"test_child1Title__N3pZf",child1Anchor:"test_child1Anchor__9q_K2",siderMaindiv2:"test_siderMaindiv2__4ZeoI",maindiv2Para:"test_maindiv2Para__G8Cj9",maindiv2Text:"test_maindiv2Text__N3kGO",headerAdminDiv:"test_headerAdminDiv__aGslq",headerImage:"test_headerImage__BUXDz",removeHeaderDiv:"test_removeHeaderDiv___86ji",removeHeaderDivHigh:"test_removeHeaderDivHigh__s_GWM",removeHeaderButton:"test_removeHeaderButton__ybbGd",headerDefDiv:"test_headerDefDiv__rHoWj",headerDefImgDiv:"test_headerDefImgDiv__3y8eG",popDiv:"test_popDiv__lEhim",popCommon:"test_popCommon__3E2kK",popList:"test_popList__mfOYy",popDel:"test_popDel__Yqm92",popButton:"test_popButton__6HMpR",testiAvatardiv:"test_testiAvatardiv__mMphI",testiAvatar:"test_testiAvatar__cjON6",eventAdminDiv:"test_eventAdminDiv__CRro3",eventDiv2:"test_eventDiv2__mNNvQ",eventAnchor:"test_eventAnchor__8_DE_",eventEvents:"test_eventEvents__7rM6z",eventCreate:"test_eventCreate__rd3Wy",galleryAdminDiv:"test_galleryAdminDiv__KPZVr",imagesFormItem:"test_imagesFormItem__T7KJf",imagesDiv1:"test_imagesDiv1__n0pYg",imagesDiv1Img:"test_imagesDiv1Img__RAY6u",imagesDiv1Div:"test_imagesDiv1Div__ayJA3",imagesDiv2:"test_imagesDiv2__FcJ86",
1imagesArrDiv:"test_imagesArrDiv__a3d9A",switchMaindiv:"test_switchMaindiv__Fc2UR",divFlex:"test_divFlex__QjlYb",businessLogoButton:"test_businessLogoButton__qdmFg",colorSaveBtnDiv:"test_colorSaveBtnDiv__hV3kk",saveButtonDiv:"test_saveButtonDiv__TIoKV",loaderStyleDiv:"test_loaderStyleDiv__bBl_c",loaderStyleP:"test_loaderStyleP__B8n_9",cancelButton:"test_cancelButton__yo10i",draftButton:"test_draftButton__j2TNN",publishButton:"test_publishButton__2Bq2Y",contentWhole:"test_contentWhole__gEJ_8",container:"test_container__hVzoi",pulseButton:"test_pulseButton__qMzbQ",pulse:"test_pulse__0aRcd",font_card_div:"test_font_card_div__rfBge",font_card:"test_font_card__lcO9R",font_card_selected:"test_font_card_selected__rx4lJ"}},67055:function(e){e.exports={backgroundDiv:"user-welcome_backgroundDiv___E4oB",contentDiv:"user-welcome_contentDiv__JAK4T",welcomeMessage:"user-welcome_welcomeMessage___aq8L",explore_button:"user-welcome_explore_button__nvE2j"}}},function(e){e.O(0,[9774,3609,4617,1228,5445,2013,3874,4885,6556,9866,5937,1520,260,6158,2876,1595,5675,1462,8592,737,9241,31,9471,2940,2888,179],(function(){return t=15764,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.