1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4615],{3659:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/edit/[...slug]",function(){return s(2293)}])},44667:function(e,t,s){"use strict";var r=s(85893),a=s(9008),n=s.n(a);let l=(0,s(67294).memo)(e=>{let{title:t,description:s,keywords:a,canonicalUrl:l}=e;return(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("meta",{name:"description",content:s}),(0,r.jsx)("meta",{name:"keywords",content:a.join(", ")}),(0,r.jsx)("link",{rel:"canonical",href:l}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{property:"og:description",content:s}),(0,r.jsx)("meta",{property:"og:url",content:l}),(0,r.jsx)("meta",{property:"og:site_name",content:t}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{property:"og:description",content:s}),(0,r.jsx)("meta",{property:"og:url",content:l}),(0,r.jsx)("meta",{property:"og:type",content:"saas"}),(0,r.jsx)("meta",{property:"og:image",content:"https://cypherscribe-tenant-images.s3.ap-south-1.amazonaws.com/Screenshot+2024-11-15+at+00.55.06.png"}),(0,r.jsx)("meta",{property:"og:image:alt",content:"CypherScribe documentation"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:site",content:"@cypherscribe"}),(0,r.jsx)("meta",{name:"twitter:creator",content:"@govind755"}),(0,r.jsx)("meta",{name:"twitter:title",content:t}),(0,r.jsx)("meta",{name:"twitter:description",content:s}),(0,r.jsx)("link",{rel:"icon",href:"https://cypherscribe-tenant-images.s3.ap-south-1.amazonaws.com/cs-large2.png",type:"image/png"}),(0,r.jsx)("meta",{property:"og:image",content:"https://cypherscribe-tenant-images.s3.ap-south-1.amazonaws.com/Screenshot+2024-11-15+at+00.55.06.png"}),(0,r.jsx)("meta",{property:"og:image:alt",content:"Cypher Scribe Logo"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://cypherscribe-tenant-images.s3.ap-south-1.amazonaws.com/Screenshot+2024-11-15+at+00.55.06.png"}),(0,r.jsx)("meta",{name:"twitter:image:alt",content:"Cypher Scribe Logo"})]})});l.displayName="seo",t.Z=l},96782:function(e,t,s){"use strict";s.d(t,{Df:function(){return i},LM:function(){return o},Vq:function(){return m},Ws:function(){return h},X2:function(){return n},ZC:function(){return u},_S:function(){return r},dY:function(){return p},j0:function(){return l},tj:function(){return x},xF:function(){return d},y6:function(){return a},yW:function(){return c}});let r={title:"Affordable Pricing Plans for CypherScribe Docs Platform",description:"Unlock the full potential of CypherScribeâs no-code documentation platform at flexible and budget-friendly pricing. Choose the perfect plan for your team and streamline your documentation workflow.",keywords:["CypherScribe pricing plans","affordable documentation pricing","best no-code docs platform","developer documentation pricing","interactive docs pricing"],canonicalUrl:"https://cypherscribe.com/pricing"},a={title:"Get in Touch with CypherScribe - Weâre Here to Help",description:"Need assistance or have questions? Contact CypherScribeâs support team for expert guidance on using our interactive documentation platform.",keywords:["contact CypherScribe support","CypherScribe help desk","documentation support","no-code docs assistance","CypherScribe customer service"],canonicalUrl:"https://cypherscribe.com/contact"},n={title:"CypherScribe Terms of Service - Understand Our Policies",description:"Review CypherScribeâs Terms of Service for clear guidance on using our no-code documentation solution. Know your rights and responsibilities.",keywords:["CypherScribe Terms of Service","documentation platform policies","no-code documentation terms","user agreement for docs platform"],canonicalUrl:"https://cypherscribe.com/tos"},l={title:"CypherScribe Privacy Policy - Your Data, Our Commitment",description:"Learn how CypherScribe prioritizes your privacy and protects your data. Review our comprehensive privacy policy to stay informed.",keywords:["CypherScribe privacy policy","data protection policy","documentation data security","user privacy assurance","no-code platform privacy"],canonicalUrl:"https://cypherscribe.com/privacy-policy"},o={title:"CypherScribe Account Settings - Personalize Your Experience",description:"Access and customize your CypherScribe account settings for a seamless and tailored documentation experience. Manage preferences and updates easily.",keywords:["CypherScribe account settings","customize documentation settings","user preferences for docs","personalized no-code platform","manage CypherScribe account"],canonicalUrl:"https://cypherscribe.com/settings"}
1,i={title:"Your CypherScribe Workspace - Centralized Documentation Hub",description:"Explore your CypherScribe workspace where you can build, manage, and customize your documentation projects efficiently with our no-code tools.",keywords:["CypherScribe workspace","documentation project dashboard","manage docs projects","no-code workspace for docs","interactive docs management"],canonicalUrl:"https://cypherscribe.com/workspace"},c={title:"Live Docs Preview - CypherScribeâs Real-Time Review Tool",description:"Preview your documentation in real-time before going live. Ensure accuracy and seamless functionality with CypherScribeâs advanced preview features.",keywords:["real-time docs preview","CypherScribe documentation review","live document preview","check documentation before publishing","interactive preview for docs"],canonicalUrl:"https://cypherscribe.com/preview"},d={title:"Effortless Editing for Your Docs - CypherScribeâs No-Code Tools",description:"Make changes and updates to your documentation seamlessly with CypherScribeâs user-friendly editing tools. Keep content relevant and precise.",keywords:["edit documentation","no-code document editing","CypherScribe editor","update docs easily","edit docs platform"],canonicalUrl:"https://cypherscribe.com/edit"},u={title:"Seamless Notion Integration - Convert and Import Effortlessly",description:"Transform your Notion pages into comprehensive, interactive documentation with CypherScribeâs seamless integration tools.",keywords:["Notion to documentation","CypherScribe Notion import","convert Notion pages to docs","Notion integration for docs","Notion to interactive documentation"],canonicalUrl:"https://cypherscribe.com/notion-integration"},p={title:"Get Started with CypherScribe - Smooth Onboarding Experience",description:"Join CypherScribe and experience a hassle-free onboarding process. Set up your interactive documentation in minutes.",keywords:["CypherScribe onboarding","start with documentation platform","onboarding for docs creation","quick start guide for CypherScribe","setup interactive docs"],canonicalUrl:"https://cypherscribe.com/onboarding"},h={title:"Payment Confirmation - CypherScribe Docs Platform",description:"Check your payment status and enjoy uninterrupted access to CypherScribeâs powerful documentation tools.",keywords:["CypherScribe payment status","confirm payment for docs platform","billing status for CypherScribe","subscription payment confirmation","verify docs platform payment"],canonicalUrl:"https://cypherscribe.com/payment-status"},m={title:"Your Documentation Index - Explore and Navigate",description:"Access and manage your documentation index with CypherScribe. Organize and view your interactive documents effortlessly.",keywords:["CypherScribe docs index","documentation management","view interactive documents","navigate docs platform","index page for documentation"]},x={title:"CypherScribe - Transform Data into Developer Docs Instantly",description:"Create, customize, and launch interactive, SEO-optimized Developer documentation in 18 seconds with CypherScribe. Experience the ultimate no-code documentation solution for teams and businesses.",keywords:["no-code documentation platform","developer-friendly docs","interactive docs builder","CypherScribe platform","fast documentation creation","customizable documentation","SEO-friendly docs","best docs tool","developer documentation solution","instant documentation builder"],canonicalUrl:"https://cypherscribe.com"}},45152:function(e,t,s){"use strict";s.d(t,{Qd:function(){return i},UQ:function(){return o},o4:function(){return c},vF:function(){return d}});var r=s(85893),a=s(67294),n=s(47398),l=s(59923);let o=n.fC,i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.ck,{ref:t,className:(0,l.cn)("border-b",s),...a})});i.displayName="AccordionItem";let c=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,r.jsx)(n.h4,{className:"flex",children:(0,r.jsxs)(n.xz,{ref:t,className:(0,l.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all ".concat("docs"===o.accessedFrom?"[&[data-state=open]>svg]:rotate-[90deg]":"[&[data-state=open]>svg]:rotate-180"),s),...o,children:[a,!o.showCehvronIcon_LeftPanelProp&&("docs"===o.accessedFrom?(0,r.jsx)(p,{props:o}):(0,r.jsx)(u,{props:o}))]})})});c.displayName=n.xz.displayName;let d=a.forwardRef((e,t)=>
1{let{className:s,children:a,...o}=e;return(0,r.jsx)(n.VY,{ref:t,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:(0,r.jsx)("div",{className:(0,l.cn)("pb-4 pt-0",s),children:a})})}),u=e=>{let{props:t}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"".concat("4"===t.size?"lg:h-5":"lg:h-7"," w-4 ").concat("4"===t.size?"lg:w-5":"lg:w-7"," h-4 shrink-0 transition-transform duration-200"),children:(0,r.jsx)("path",{d:"m6 9 6 6 6-6"})})},p=e=>{let{props:t}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"".concat("4"===t.size?"lg:h-5":"lg:h-7"," w-4 ").concat("4"===t.size?"lg:w-5":"lg:w-7"," h-4 shrink-0 transition-transform duration-200"),children:(0,r.jsx)("path",{d:"m9 18 6-6-6-6"})})};d.displayName=n.VY.displayName},74098:function(e,t,s){"use strict";s.d(t,{Ol:function(){return o},SZ:function(){return c},Zb:function(){return l},aY:function(){return d},eW:function(){return u},ll:function(){return i}});var r=s(85893),a=s(67294),n=s(59923);let l=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,n.cn)("rounded-lg border border-slate-200 bg-white text-slate-950 shadow-sm dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",s),...a})});l.displayName="Card";let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",s),...a})});o.displayName="CardHeader";let i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("h3",{ref:t,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",s),...a})});i.displayName="CardTitle";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("p",{ref:t,className:(0,n.cn)("text-sm text-slate-500 dark:text-slate-400",s),...a})});c.displayName="CardDescription";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,n.cn)("p-6 pt-0",s),...a})});d.displayName="CardContent";let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,n.cn)("flex items-center p-6 pt-0",s),...a})});u.displayName="CardFooter"},71112:function(e,t,s){"use strict";s.d(t,{$N:function(){return m},Be:function(){return x},Vq:function(){return o},cN:function(){return h},cZ:function(){return u},fK:function(){return p},hg:function(){return i}});var r=s(85893),a=s(67294),n=s(89056),l=s(59923);let o=n.fC,i=n.xz,c=n.h_;n.x8;let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.aV,{ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a})});d.displayName=n.aV.displayName;let u=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,r.jsxs)(c,{children:[(0,r.jsx)(d,{}),(0,r.jsxs)(n.VY,{ref:t,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-slate-800 dark:bg-slate-950",s),...o,children:[a,!1!==o.showCross&&(0,r.jsxs)(n.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 data-[state=open]:text-slate-500 dark:ring-offset-slate-950 dark:focus:ring-slate-300 dark:data-[state=open]:bg-slate-800 dark:data-[state=open]:text-slate-400",children:[(0,r.jsx)(g,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=n.VY.displayName;let p=e=>{let{className:t,...s}=e;return(0,r.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};p.displayName="DialogHeader";let h=e=>{let{className:t,...s}=e;return(0,r.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};h.displayName="DialogFooter";let m=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",s),...a})});m.displayName=n.Dx.displayName;let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.dk,{ref:t,className:(0,l.cn)("text-sm text-slate-500 dark:text-slate-400",s),...a})});x.displayName=n.dk.displayName;let g=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"h-4 w-4",children:[(0,r.jsx)("path",{d:"M18 6 6 18"}),(0,r.jsx)("path",{d:"m6 6 12 12"})]})},69999:function(e,t,s){"use strict";s.d(t,{I:function(){return l}});var r=s(85893),a=s(67294),n=s(59923);let l=a.forwardRef((e,t)=>{let{className:s,type:a,...l}=e;return(0,r.jsx)("input",{type:a,autoComplete:"off",className:(0,n.cn)("flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm r
1ing-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-slate-500 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-600 dark:bg-slate-950 dark:ring-offset-slate-950 dark:placeholder:text-slate-400 dark:focus-visible:ring-slate-300",s),ref:t,...l})});l.displayName="Input"},1614:function(e,t,s){"use strict";s.d(t,{J2:function(){return o},xo:function(){return i},yk:function(){return c}});var r=s(85893),a=s(67294),n=s(64510),l=s(59923);let o=n.fC,i=n.xz,c=a.forwardRef((e,t)=>{let{className:s,align:a="center",sideOffset:o=4,...i}=e;return(0,r.jsx)(n.h_,{children:(0,r.jsx)(n.VY,{ref:t,align:a,sideOffset:o,className:(0,l.cn)("z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",s),...i})})});c.displayName=n.VY.displayName},77412:function(e,t,s){"use strict";s.d(t,{E:function(){return o},m:function(){return i}});var r=s(85893),a=s(67294),n=s(94801),l=s(59923);let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.fC,{className:(0,l.cn)("grid gap-2",s),...a,ref:t})});o.displayName=n.fC.displayName;let i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.ck,{ref:t,className:(0,l.cn)("aspect-square h-4 w-4 rounded-full border border-slate-200 border-slate-900 text-slate-900 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:border-slate-50 dark:text-slate-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",s),...a,children:(0,r.jsx)(n.z$,{className:"flex items-center justify-center",children:(0,r.jsx)(c,{})})})});i.displayName=n.ck.displayName;let c=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"h-[0.5rem] w-2 fill-current text-current",children:(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"})})},24576:function(e,t,s){"use strict";s.d(t,{r:function(){return o}});var r=s(85893),a=s(67294),n=s(22512),l=s(59923);let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.fC,{className:(0,l.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-300 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",s),...a,ref:t,children:(0,r.jsx)(n.bU,{className:(0,l.cn)("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})})});o.displayName=n.fC.displayName},96398:function(e,t,s){"use strict";var r=s(85893),a=s(67294),n=s(82968),l=s(59923);n.fC,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.aV,{ref:t,className:(0,l.cn)("inline-flex h-10 items-center justify-center rounded-md bg-slate-100 p-1 text-slate-500 dark:bg-slate-800 dark:text-slate-400",s),...a})}).displayName=n.aV.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.xz,{ref:t,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-slate-950 data-[state=active]:shadow-sm dark:ring-offset-slate-950 dar
1k:focus-visible:ring-slate-300 dark:data-[state=active]:bg-slate-950 dark:data-[state=active]:text-slate-50",s),...a})}).displayName=n.xz.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(n.VY,{ref:t,className:(0,l.cn)("mt-2 ring-offset focus-visible:outline-none focus-visible:ring-slate-950 focus-visible:ring-offset-2 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",s),...a})}).displayName=n.VY.displayName},1486:function(e,t,s){"use strict";s.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return o},u:function(){return i}});var r=s(85893),a=s(67294),n=s(66908),l=s(59923);let o=n.zt,i=n.fC,c=n.xz,d=a.forwardRef((e,t)=>{let{className:s,sideOffset:a=4,...o}=e;return(0,r.jsx)(n.VY,{ref:t,sideOffset:a,className:(0,l.cn)("z-50 overflow-hidden rounded-md border border-slate-200 bg-white px-3 py-1.5 text-sm text-slate-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",s),...o})});d.displayName=n.VY.displayName},82328:function(e,t,s){"use strict";s.d(t,{T:function(){return r}});let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,r=new CustomEvent(e,{detail:t});s&&localStorage.setItem(e,JSON.stringify(t)),window.dispatchEvent(r)}},49364:function(e,t,s){"use strict";var r=s(69483),a=s.n(r);a().config({name:"cypher-scribe",storeName:"pages_data"}),t.Z=a()},84304:function(e,t,s){"use strict";function r(e){return e?e.replace(/[\s\/!@#$%^&*()=+{}[\]|\\:;'"<>,.?~%]+/g,"-").replace(/\.+/g,"-").replace(/--+/g,"-").replace(/^-+|-+$/g,"").toLowerCase():""}s.d(t,{q:function(){return r}})},34798:function(e,t,s){"use strict";s.d(t,{D:function(){return r}});let r=()=>"https://api.cypherscribe.com"},2293:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ti}});var r=s(85893),a=s(16431),n=s(2759),l=s(67294),o=s(86551),i=s(37914),c=s(1486),d=s(57632),u=s(11163),p=s(82328),h=s(74304),m=s(77412),x=s(45152),g=s(84304),f=s(49364),v=s(69999);let j=(0,l.memo)(()=>{let[e,t]=(0,l.useState)(),a=(0,u.useRouter)(),o=(0,l.useRef)(null),[i,m]=(0,l.useState)(!1),[v,j]=(0,l.useState)(""),[B,z]=(0,l.useState)(!1),[E,D]=(0,l.useState)(!1),[O,A]=(0,l.useState)(null),[M,R]=(0,l.useState)("0"),[T,P]=(0,l.useState)(),[F,W]=(0,l.useState)(null),[Z,V]=(0,l.useState)(""),[U,q]=(0,l.useState)(!0),[_,K]=(0,l.useState)(null),[H,Y]=(0,l.useState)(""),[J,$]=(0,l.useState)(!1);(0,l.useEffect)(()=>((async()=>{let e=await f.Z.getItem("pageIDsWithNames");if(e){var s;P(e.pages_content),t(e.pages_hierarchy),localStorage.getItem("numberOfPages")||localStorage.setItem("numberOfPages",(null==e?void 0:null===(s=e.pages_hierarchy)||void 0===s?void 0:s.length)||0)}})(),o.current=new Worker(s.tu(new URL(s.p+s.u(2689),s.b))),()=>{o.current.terminate()}),[]),(0,l.useEffect)(()=>{"0"===localStorage.getItem("numberOfPages")&&$(!0)},[]),(0,l.useEffect)(()=>{localStorage.setItem("numberOfPages",(null==e?void 0:e.length)||0),(null==e?void 0:e.length)===0&&(localStorage.setItem("numberOfPages",0),$(!0))},[e]),(0,l.useEffect)(()=>{var e;(null==a?void 0:null===(e=a.query)||void 0===e?void 0:e.q)&&R(a.query.q)},[a.query]);let G=async()=>{let e=await f.Z.getItem("pageIDsWithNames");return P(e.pages_content),e.pages_content};(0,l.useEffect)(()=>(window.addEventListener("lsUpdatedFromEditor",G),()=>{window.removeEventListener("lsUpdatedFromEditor",G)}),[]);let X=function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;return new Promise((n,l)=>{if(""===r.trim()){(0,h.Am)({title:"Please enter a valid name"}),l(!1);return}let i={title:r,children:[],id:(0,d.Z)(),href:U?(0,g.q)(r):null},c={content:[{children:[],content:[{styles:{},text:"New page: ".concat(r),type:"text"}],id:(0,d.Z)(),props:{backgroundColor:"default",textAlignment:"left",textColor:"default"},type:"paragraph"}],id:i.id,title:r,children:[],href:U?(0,g.q)(r):null},u=[...e],p=[...T];o.current.postMessage({type:"add",newFile:i,newContentPage:c,files:u,pagesContent:p,parentIndex:s}),o.current.onmessage=async function(e){if(e.data.error)(0,h.Am)({title:"A page named ".concat(r," already exists")}),l(!1);else{let{updatedFiles:s,updatedPagesContent:r,finalPath:l,finalQueryString:o}=e.data;t(s),P(r),await Q(s,r,"add",!0),V(""),W(null),q(!0),U&&l&&o&&a.push("".concat(l.replace(/ /g,"-"),"?q=").concat(o),void 0,{shallow:!0}),n(!0)}}})},Q=async function(e,t,s){arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{await f.Z.setItem("pageIDsWithNames",{pages_hierarchy:e,pages_content:t}),(0,p.T)("LSUpdated")}catch(e){console.log("etf",e)}},ee=(s,r)=>{let n=[...e],l=[...T];o.current.postMessage({type:"deleteNested",files:n,pagesContent:l,parentIndex:s,index:r}),o.current.onmessage=async function(e){let{updatedFiles:s,updatedPagesContent:r}=e.data;await Q(s,r,"delete",!0),t(s),P(r),(()=>{if(s.length>0){let e=s[0];a.push("/edit/".concat((0,g.q)(e.href),"?q=0"),void 0,{shallow:!0})}})()}},et=s=>{let r=[...e],n=[...T];o.current.postMessage({type:"delete",files:r,pagesContent:n,index:s}),o.current.onmessage=async function(e){let{updatedFiles:s,updatedPagesContent:r}=e.data;await Q(s,r,"delete",!0),t(s),P(r),(()=>{if(s.length>0){let e=s[0];a.push("/edit/".concat((0,g.q)(e.href),"?q=0"),void 0,{shallow:!0})}})()}},es=t=>{t!==M&&(o.current.postMessage({type:"findFile",path:t,files:e}),o.current.onmessage=function(e){let{file:t,sanitizedFullHref:s,queryString:r}=e.data;console.log(e.data),t&&(s?a.push("/edit/".concat(s,"?q=").concat(r),void 0,{shallow:!0}):console.log("Clicked on an item without a valid href; not pushing route"))})},er=(e,t)=>{t.stopPropagation(),D(e=>!e),A(e)},ea=(0,l.useRef)(null),en=t=>{if(e.length<6)return;let s=document.querySelector('[data-index="'.concat(t,'"]'));if(s&&ea.current){let e=ea.current,t=e.getBoundingClientRect(),r=s.getBoundingClientRect().top-t.top+e.scrollTop-50;e.scrollTo({top:r,behavior:"smooth"})}},el=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null==e?void 0:e.map((e,s)=>{var a;let n=null===t?s.toString():"".concat(t,"-").concat(s),l=(null==e?void 0:null===(a=e.children)||void 0===a?void 0:a.length)>0,o=n==M;return(0,r.jsxs)("div",{"data-index":n,className:"flex ".concat(F&&"ga
1p-4"," ").concat(l?"items-start":"items-center"),style:{marginLeft:null!==t?10:0,borderLeft:null!==t?"1px solid #555":"none"},children:[l?(0,r.jsx)(x.UQ,{type:"single",collapsible:!0,className:"w-full",children:(0,r.jsxs)(x.Qd,{className:"!border-none",value:"item-".concat(n),children:[(0,r.jsxs)(x.o4,{onClick:()=>{en(n),es(n)},showCehvronIcon_LeftPanelProp:!0,className:"my-2 items-center gap-1 flex w-full group rounded-md font-normal py-1 px-2 ml-[2px] cursor-pointer transition-colors duration-200 ".concat(o?"text-white font-bold":"text-gray-400"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 group w-full",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 grid-rows-1",children:[(0,r.jsx)(S,{}),(0,r.jsx)(C,{isActive:o})]}),(0,r.jsx)("span",{className:"w-[88%] overflow-hidden whitespace-nowrap font-normal text-ellipsis ml-1 text-left",children:e.title})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 transition-all duration-300 ease-in-out opacity-0 group-hover:opacity-100",children:[(0,r.jsx)(c.pn,{delayDuration:0,children:(0,r.jsxs)(c.u,{children:[(0,r.jsx)(c.aJ,{children:(0,r.jsx)("div",{className:"rounded-md w-7 h-7 text-xl flex justify-center items-center hover:text-slate-400 transition-all ease-in duration-100",onClick:e=>{m(!0),j(n),e.preventDefault(),e.stopPropagation()},children:(0,r.jsx)(I,{})})}),(0,r.jsx)(c._v,{children:(0,r.jsx)("p",{children:"create sub page"})})]})}),(0,r.jsx)(c.pn,{delayDuration:0,children:(0,r.jsxs)(c.u,{children:[(0,r.jsx)(c.aJ,{children:(0,r.jsx)("div",{className:"rounded-md w-7 h-7 text-xl flex justify-center items-center hover:text-slate-400 transition-all ease-in duration-100",onClick:e=>{er(n,e),e.preventDefault(),e.stopPropagation()},children:(0,r.jsx)(L,{})})}),(0,r.jsx)(c._v,{children:(0,r.jsx)("p",{children:"Edit & delete"})})]})})]})]}),(0,r.jsx)(x.vF,{className:"bg-black",children:el(e.children,n)})]})}):(0,r.jsxs)("div",{onClick:()=>es(n),className:"my-2 items-center gap-2 flex w-full rounded-md px-2 py-1 group cursor-pointer transition-colors duration-200 ".concat(o?"text-white font-bold":"text-gray-400"),children:[(0,r.jsx)(N,{}),(0,r.jsxs)("span",{className:"w-[95%] overflow-hidden whitespace-nowrap text-ellipsis ml-1",children:[" ",e.title]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 transition-all duration-300 ease-in-out opacity-0 group-hover:opacity-100",children:[(0,r.jsx)(c.pn,{delayDuration:0,children:(0,r.jsxs)(c.u,{children:[(0,r.jsx)(c.aJ,{children:(0,r.jsx)("div",{className:"rounded-md w-7 h-7 text-xl flex justify-center items-center hover:text-slate-400 transition-all ease-in duration-100",onClick:()=>{m(!0),j(n)},children:(0,r.jsx)(I,{})})}),(0,r.jsx)(c._v,{children:(0,r.jsx)("p",{children:"create page"})})]})}),(0,r.jsx)(c.pn,{delayDuration:0,children:(0,r.jsxs)(c.u,{children:[(0,r.jsx)(c.aJ,{children:(0,r.jsx)("div",{className:"rounded-md w-7 h-7 text-xl flex justify-center items-center hover:text-slate-400 transition-all ease-in duration-100",onClick:()=>{m(!0),j(n)},children:(0,r.jsx)("div",{onClick:e=>er(n,e),children:(0,r.jsx)(L,{})})})}),(0,r.jsx)(c._v,{children:(0,r.jsx)("p",{children:"Edit & delete"})})]})})]})]}),(0,r.jsx)(b,{isOpen:E&&O===n,setIsOpen:D,setAccessedFrom:j,parentIndex:t,handleDeleteNestedFile:ee,handleDeleteFile:et,setActivelyEditingComponent:K,setEditedFileName:Y,setIsEditingModalOpen:z,currentIndex:n})]},n)})};return(0,r.jsxs)("div",{className:"sticky left-0 top-24 z-10 h-[calc(100vh-95px)] noScrollbar overflow-y-auto w-full",children:[(0,r.jsx)("div",{className:"flex flex-col gap-4 w-[90%] mx-auto",children:(0,r.jsx)(n.z,{onClick:e=>{m(!0),j(null),e.preventDefault(),e.stopPropagation()},children:"Add New Page"})}),(0,r.jsx)("div",{className:"h-[calc(100vh-180px)] overflow-auto noScrollbar w-[90%] mx-auto select-none",ref:ea,style:{marginTop:20},children:el(e)}),(0,r.jsx)(w,{setNewFileName:V,isPageLink:U,setIsPageLink:q,newFileName:Z,isOpen:i,setIsOpen:m,accessedFrom:v,handleAddFile:X}),(0,r.jsx)(y,{handleSaveEdit:s=>new Promise((r,n)=>{if(""===H.trim()){(0,h.Am)({title:"Please enter a valid name"}),n(!1);return}let l=[...e],i=[...T];o.current.postMessage({type:"edit",files:l,pagesContent:i,path:s,newFile:{title:H,href:null}}),o.current.onmessage=async function(e){if(e.data.error)console.log("duplicate main thread"),(0,h.Am)({title:"A page named ".concat(H," already exists")}),n(!1);else{let{updatedFiles:n,updatedPagesContent:l,fullPath:o,hasHref:i,childWithHref:c}=e.data;t(n),P(l),K(null),j(null),Y(""),z(!1),await Q(n,l,"edit",!0),i&&o&&a.push("".concat(o,"?q=").concat(s),void 0,{shallow:!0}),r(!0)}}}),editedFileName:H,setEditedFileName:Y,setActivelyEditingComponent:K,isEditingModalOpen:B,setIsEditingModalOpen:z,accessedFrom:v}),(0,r.jsx)(k,{zeroFilesModalOpen:J,setZeroFilesModalOpen:$,handleAddFile:X}
1)]})});j.displayName="FileTree";let w=(0,l.memo)(e=>{let{isOpen:t,setIsOpen:s,accessedFrom:a,handleAddFile:n,newFileName:i,setIsPageLink:c}=e,[d,u]=(0,l.useState)(i),p=(0,l.useCallback)(e=>{u(e.target.value)},[]),x=(0,l.useCallback)(async()=>{if(""===d.trim())return(0,h.Am)({title:"Please enter a valid name"});try{await n(a,d)&&(u(""),s(!1))}catch(e){console.error("Error adding file:",e)}},[n,a,d,s]),g=(0,l.useCallback)(e=>{"Enter"===e.key&&x()},[x]);return(0,r.jsxs)(o.aR,{modal:!1,open:t,children:[(0,r.jsx)(o.vW,{}),(0,r.jsxs)(o._T,{onEscapeKeyDown:()=>s(!1),children:[(0,r.jsxs)(o.fY,{children:[(0,r.jsx)("p",{className:"text-lg mb-4",children:"Add Sub Page "}),(0,r.jsxs)(m.E,{onValueChange:e=>{"isLink"===e?c(!0):c(!1)},defaultValue:"isLink",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3 mb-4",children:[(0,r.jsx)(m.m,{value:"isLink",id:"isLink"}),(0,r.jsx)("label",{htmlFor:"isLink",className:"",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-1",children:"This parent page has its own content and is a link"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Users can click this page to view its content."})]})})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)(m.m,{value:"isDropdown",id:"isDropdown"}),(0,r.jsx)("label",{htmlFor:"isDropdown",className:"",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-1",children:"This parent page acts as a dropdown (accordion)"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"This page groups subpages together and is not clickable."})]})})]})]}),(0,r.jsx)(o.yT,{className:"!mt-8",children:(0,r.jsx)("input",{defaultValue:d,className:"pl-3 pr-2 rounded-md h-11 !border-gray-500 border w-full !focus:border-gray-500",onChange:p,placeholder:"Enter page name",ref:e=>e&&e.focus(),onKeyDown:g})})]}),(0,r.jsxs)(o.xo,{children:[(0,r.jsx)(o.OL,{onClick:x,children:"Continue"}),(0,r.jsx)(o.le,{onClick:()=>s(!1),children:"Cancel"})]})]})]})});w.displayName="AddFileNameModal";let y=(0,l.memo)(e=>{let{isEditingModalOpen:t,setIsEditingModalOpen:s,setEditedFileName:a,editedFileName:n,handleSaveEdit:i,accessedFrom:c}=e,d=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(t){console.log(c);let e=setTimeout(()=>{d.current&&d.current.focus()},100);return()=>clearTimeout(e)}},[t]),(0,r.jsxs)(o.aR,{open:t,children:[(0,r.jsx)(o.vW,{}),(0,r.jsxs)(o._T,{onEscapeKeyDown:()=>s(!1),children:[(0,r.jsxs)(o.fY,{children:[(0,r.jsx)("p",{className:"text-lg",children:"Rename Page"}),(0,r.jsx)(o.yT,{children:(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)("input",{ref:d,value:n,className:"pl-3 pr-2 rounded-md h-9 !border-gray-500 border !focus:border-gray-500 w-full",onChange:e=>a(e.target.value),placeholder:"Edit file name",onKeyDown:e=>{"Enter"===e.key&&i(c)}})})})]}),(0,r.jsxs)(o.xo,{children:[(0,r.jsx)(o.OL,{onClick:()=>i(c),children:"Continue"}),(0,r.jsx)(o.le,{onClick:()=>s(!1),children:"Cancel"})]})]})]})});y.displayName="EditFileNameModal";let b=(0,l.memo)(e=>{let{isOpen:t,setIsOpen:s,setAccessedFrom:a,parentIndex:n,handleDeleteNestedFile:l,handleDeleteFile:o,setIsEditingModalOpen:c,currentIndex:d}=e;return(0,r.jsxs)(i.h_,{open:t,onOpenChange:s,children:[(0,r.jsx)(i.$F,{}),(0,r.jsxs)(i.AW,{children:[(0,r.jsxs)(i.Xi,{className:"h-[2.2rem]",onClick:()=>{a(d),c(!0),s(!1)},children:[(0,r.jsx)(B,{})," Rename"]}),(0,r.jsx)(i.VD,{}),(0,r.jsxs)(i.Xi,{className:"h-[2.2rem]",onClick:()=>{null===n?o(parseInt(d)):l(n,parseInt(d.split("-").pop())),s(!1)},children:[(0,r.jsx)(z,{})," Delete"]})]})]})});b.displayName="ThreeDotsModal";let k=(0,l.memo)(e=>{let{zeroFilesModalOpen:t,setZeroFilesModalOpen:s,handleAddFile:a}=e,[i,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{u(!0)},[]),d)?(0,r.jsx)(o.aR,{open:t,className:"!bg-black/10",children:(0,r.jsx)(o._T,{children:(0,r.jsx)(o.fY,{children:(0,r.jsxs)(o.yT,{children:[(0,r.jsx)("p",{className:"text-xl text-white",children:"Let's create your first page"}),(0,r.jsxs)("div",{className:"mt-7 space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-1",children:"Enter page name"}),(0,r.jsx)(v.I,{placeholder:"Enter page name",value:i,onChange:e=>c(e.target.value),onKeyDown:e=>{""!==i.trim()&&"Enter"===e.key&&a(null,i).then(e=>{s(!1),c("")})}})]}),(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{""!==i.trim()&&a(null,i).then(e=>{s(!1),c("")})},children:"Save Page"})]})]})})})}):null});k.displayName="ModalWhenFilesAreZero";let C=e=>{let{isActive:t}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"col-start-1 row-start-1 transition-all duration-300 ease-in-out opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100 hover:bg-gray-800 rounded-md p-[1.3px] ".concat(t?"text-white font-bold":"text-gray-400"),children:(0,r.jsx)("path",{d:"m9 18 6-6-6-6"})})},N=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"w-7 h-7 text-blue-500",children:[(0,r.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,r.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})]}),S=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"col-start-1 row-start-1 transition-all duration-300 ease-in-out group-hover:opacity-0 group-hover:scale-100 text-yellow-500",children:(0,r.jsx)("path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"})}),L=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,r.jsx)("circle",{cx:"19",cy:"12",r:"1"}),(0,r.jsx)("circle",{cx:"5",cy:"12",r:"1"})]}),B=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"cursor-pointer mr-2",children:[(0,r.jsx)("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}),(0,r.jsx)("path",{d:"m15 5 4 4"})]}),I=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",children:[(0,r.jsx)("path",{d:"M5 12h14"}),(0,r.jsx)("path",{d:"M12 5v14"})]}),z=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"mr-2",children:[(0,r.jsx)("path",{d:"M3 6h18"}),(0,r.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}
1),(0,r.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]});var E=s(11401);s(99622);var D=s(59486),O=s(82146);s(35156);var A=s(5152),M=s.n(A),R=s(65649);let T=(0,l.memo)(e=>{let{items:t,selectedItem:s,setSelectedItem:a}=e,[n,o]=(0,l.useState)(!1),[i,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(t),[p,h]=(0,l.useState)(-1),m=(0,l.useRef)(null),x=(0,l.useRef)([]);(0,l.useEffect)(()=>{let e=e=>{m.current&&!m.current.contains(e.target)&&o(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,l.useEffect)(()=>{let e=e=>{if(n)switch(e.key){case"ArrowDown":e.preventDefault(),h(e=>e<d.length-1?e+1:e);break;case"ArrowUp":e.preventDefault(),h(e=>e>0?e-1:e);break;case"Enter":e.preventDefault(),p>=0&&p<d.length&&(a(d[p].value),o(!1),c(""));break;case"Escape":o(!1),e.stopPropagation()}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n,d,p,a]),(0,l.useEffect)(()=>{if(p>=0&&p<x.current.length){var e;null===(e=x.current[p])||void 0===e||e.scrollIntoView({block:"nearest"})}},[p]),(0,l.useEffect)(()=>{u(t.filter(e=>e.value.toLowerCase().includes(i.toLowerCase()))),h(-1)},[i,t]);let g=e=>{a(e),o(!1),c("")};return(0,r.jsxs)("div",{className:"relative w-full",ref:m,children:[(0,r.jsx)("button",{onClick:()=>o(!n),className:"w-full px-4 py-2 text-left border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:border-gray-300",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{children:s||"Select Language"}),(0,r.jsx)(F,{isOpen:n})]})}),n&&(0,r.jsxs)("div",{className:"absolute z-10 w-full mt-1 border border-gray-300 rounded-md shadow-lg bg-black",children:[(0,r.jsx)("div",{className:"p-2",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:i,onChange:e=>c(e.target.value),className:"w-full px-3 py-2 pl-10 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-black"}),(0,r.jsx)(W,{})]})}),(0,r.jsx)("div",{className:"overflow-auto max-h-60",children:d.map((e,t)=>(0,r.jsxs)("div",{ref:e=>x.current[t]=e,className:"flex pl-6 mb-3 items-center gap-4 transition-all ease-linear duration-100 hover:bg-gray-800 cursor-pointer ".concat(t===p?"bg-gray-800":""),onClick:()=>g(e.value),children:[e.icon?(0,r.jsx)("p",{className:"text-xl text-white",children:e.icon}):(0,r.jsx)("p",{className:"".concat(s===e.value?"opacity-100":"opacity-0"),children:(0,r.jsx)(P,{})}),(0,r.jsx)("p",{className:"px-4 py-2 text-sm text-white cursor-pointer",children:e.value}),s===e.value&&e.icon&&(0,r.jsx)(P,{})]},t))})]})]})});T.displayName="SearchableDropdown";let P=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"h-5 w-5",children:(0,r.jsx)("path",{d:"M20 6 9 17l-5-5"})}),F=e=>{let{isOpen:t}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"w-5 h-5 transition-transform duration-200 ".concat(t?"transform rotate-180":""),children:(0,r.jsx)("path",{d:"m6 9 6 6 6-6"})})},W=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"absolute w-5 h-5 text-gray-400 transform -translate-y-1/2 left-3 top-1/2",children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("path",{d:"m21 21-4.3-4.3"})]}),Z=(0,l.memo)(e=>{let{code:t,language:s="javascript",setCode:a}=e;return(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"code-block theme-dark",children:(0,r.jsx)("textarea",{className:" w-[29rem] mt-2 h-[27rem] resize-none p-3 overflow-y-auto border border-gray-400 rounded-md",value:t,onChange:e=>a(e.target.value)})})})});Z.displayName="TextAreaForCodeInEditor";let V=()=>
1(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 256 256",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"})}),U=[{value:"JavaScript",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"})}),{})},{value:"Python",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"})}),{})},{value:"Rust",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M508.52,249.75,486.7,236.24c-.17-2-.34-3.93-.55-5.88l18.72-17.5a7.35,7.35,0,0,0-2.44-12.25l-24-9c-.54-1.88-1.08-3.78-1.67-5.64l15-20.83a7.35,7.35,0,0,0-4.79-11.54l-25.42-4.15c-.9-1.73-1.79-3.45-2.73-5.15l10.68-23.42a7.35,7.35,0,0,0-6.95-10.39l-25.82.91q-1.79-2.22-3.61-4.4L439,81.84A7.36,7.36,0,0,0,430.16,73L405,78.93q-2.17-1.83-4.4-3.61l.91-25.82a7.35,7.35,0,0,0-10.39-7L367.7,53.23c-1.7-.94-3.43-1.84-5.15-2.73L358.4,25.08a7.35,7.35,0,0,0-11.54-4.79L326,35.26c-1.86-.59-3.75-1.13-5.64-1.67l-9-24a7.35,7.35,0,0,0-12.25-2.44l-17.5,18.72c-1.95-.21-3.91-.38-5.88-.55L262.25,3.48a7.35,7.35,0,0,0-12.5,0L236.24,25.3c-2,.17-3.93.34-5.88.55L212.86,7.13a7.35,7.35,0,0,0-12.25,2.44l-9,24c-1.89.55-3.79,1.08-5.66,1.68l-20.82-15a7.35,7.35,0,0,0-11.54,4.79l-4.15,25.41c-1.73.9-3.45,1.79-5.16,2.73L120.88,42.55a7.35,7.35,0,0,0-10.39,7l.92,25.81c-1.49,1.19-3,2.39-4.42,3.61L81.84,73A7.36,7.36,0,0,0,73,81.84L78.93,107c-1.23,1.45-2.43,2.93-3.62,4.41l-25.81-.91a7.42,7.42,0,0,0-6.37,3.26,7.35,7.35,0,0,0-.57,7.13l10.66,23.41c-.94,1.7-1.83,3.43-2.73,5.16L25.08,153.6a7.35,7.35,0,0,0-4.79,11.54l15,20.82c-.59,1.87-1.13,3.77-1.68,5.66l-24,9a7.35,7.35,0,0,0-2.44,12.25l18.72,17.5c-.21,1.95-.38,3.91-.55,5.88L3.48,249.75a7.35,7.35,0,0,0,0,12.5L25.3,275.76c.17,2,.34,3.92.55,5.87L7.13,299.13a7.35,7.35,0,0,0,2.44,12.25l24,9c.55,1.89,1.08,3.78,1.68,5.65l-15,20.83a7.35,7.35,0,0,0,4.79,11.54l25.42,4.15c.9,1.72,1.79,3.45,2.73,5.14L42.56,391.12a7.35,7.35,0,0,0,.57,7.13,7.13,7.13,0,0,0,6.37,3.26l25.83-.91q1.77,2.22,3.6,4.4L73,430.16A7.36,7.36,0,0,0,81.84,439L107,433.07q2.18,1.83,4.41,3.61l-.92,25.82a7.35,7.35,0,0,0,10.39,6.95l23.43-10.68c1.69.94,3.42,1.83,5.14,2.73l4.15,25.42a7.34,7.34,0,0,0,11.54,4.78l20.83-15c1.86.6,3.76,1.13,5.65,1.68l9,24a7.36,7.36,0,0,0,12.25,2.44l17.5-18.72c1.95.21,3.92.38,5.88.55l13.51,21.82a7.35,7.35,0,0,0,12.5,0l13.51-21.82c2-.17,3.93-.34,5.88-.56l17.5,18.73a7.36,7.36,0,0,0,12.25-2.44l9-24c1.89-.55,3.78-1.
108,5.65-1.68l20.82,15a7.34,7.34,0,0,0,11.54-4.78l4.15-25.42c1.72-.9,3.45-1.79,5.15-2.73l23.42,10.68a7.35,7.35,0,0,0,10.39-6.95l-.91-25.82q2.22-1.79,4.4-3.61L430.16,439a7.36,7.36,0,0,0,8.84-8.84L433.07,405q1.83-2.17,3.61-4.4l25.82.91a7.23,7.23,0,0,0,6.37-3.26,7.35,7.35,0,0,0,.58-7.13L458.77,367.7c.94-1.7,1.83-3.43,2.73-5.15l25.42-4.15a7.35,7.35,0,0,0,4.79-11.54l-15-20.83c.59-1.87,1.13-3.76,1.67-5.65l24-9a7.35,7.35,0,0,0,2.44-12.25l-18.72-17.5c.21-1.95.38-3.91.55-5.87l21.82-13.51a7.35,7.35,0,0,0,0-12.5Zm-151,129.08A13.91,13.91,0,0,0,341,389.51l-7.64,35.67A187.51,187.51,0,0,1,177,424.44l-7.64-35.66a13.87,13.87,0,0,0-16.46-10.68l-31.51,6.76a187.38,187.38,0,0,1-16.26-19.21H258.3c1.72,0,2.89-.29,2.89-1.91V309.55c0-1.57-1.17-1.91-2.89-1.91H213.47l.05-34.35H262c4.41,0,23.66,1.28,29.79,25.87,1.91,7.55,6.17,32.14,9.06,40,2.89,8.82,14.6,26.46,27.1,26.46H407a187.3,187.3,0,0,1-17.34,20.09Zm25.77,34.49A15.24,15.24,0,1,1,368,398.08h.44A15.23,15.23,0,0,1,383.24,413.32Zm-225.62-.68a15.24,15.24,0,1,1-15.25-15.25h.45A15.25,15.25,0,0,1,157.62,412.64ZM69.57,234.15l32.83-14.6a13.88,13.88,0,0,0,7.06-18.33L102.69,186h26.56V305.73H75.65A187.65,187.65,0,0,1,69.57,234.15ZM58.31,198.09a15.24,15.24,0,0,1,15.23-15.25H74a15.24,15.24,0,1,1-15.67,15.24Zm155.16,24.49.05-35.32h63.26c3.28,0,23.07,3.77,23.07,18.62,0,12.29-15.19,16.7-27.68,16.7ZM399,306.71c-9.8,1.13-20.63-4.12-22-10.09-5.78-32.49-15.39-39.4-30.57-51.4,18.86-11.95,38.46-29.64,38.46-53.26,0-25.52-17.49-41.59-29.4-49.48-16.76-11-35.28-13.23-40.27-13.23H116.32A187.49,187.49,0,0,1,221.21,70.06l23.47,24.6a13.82,13.82,0,0,0,19.6.44l26.26-25a187.51,187.51,0,0,1,128.37,91.43l-18,40.57A14,14,0,0,0,408,220.43l34.59,15.33a187.12,187.12,0,0,1,.4,32.54H423.71c-1.91,0-2.69,1.27-2.69,3.13v8.82C421,301,409.31,305.58,399,306.71ZM240,60.21A15.24,15.24,0,0,1,255.21,45h.45A15.24,15.24,0,1,1,240,60.21ZM436.84,214a15.24,15.24,0,1,1,0-30.48h.44a15.24,15.24,0,0,1-.44,30.48Z"})}),{})},{value:"Go",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 640 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M400.1 194.8C389.2 197.6 380.2 199.1 371 202.4C363.7 204.3 356.3 206.3 347.8 208.5L347.2 208.6C343 209.8 342.6 209.9 338.7 205.4C334 200.1 330.6 196.7 324.1 193.5C304.4 183.9 285.4 186.7 267.7 198.2C246.5 211.9 235.6 232.2 235.9 257.4C236.2 282.4 253.3 302.9 277.1 306.3C299.1 309.1 316.9 301.7 330.9 285.8C333 283.2 334.9 280.5 337 277.5V277.5L337 277.5C337.8 276.5 338.5 275.4 339.3 274.2H279.2C272.7 274.2 271.1 270.2 273.3 264.9C277.3 255.2 284.8 239 289.2 230.9C290.1 229.1 292.3 225.1 296.1 225.1H397.2C401.7 211.7 409 198.2 418.8 185.4C441.5 155.5 468.1 139.9 506 133.4C537.8 127.8 567.7 130.9 594.9 149.3C619.5 166.1 634.7 188.9 638.8 218.8C644.1 260.9 631.9 295.1 602.1 324.4C582.4 345.3 557.2 358.4 528.2 364.3C522.6 365.3 517.1 365.8 511.7 366.3C508.8 366.5 506 366.8 503.2 367.1C474.9 366.5 449 358.4 427.2 339.7C411.9 326.4 401.3 310.1 396.1 291.2C392.4 298.5 388.1 305.6 382.1 312.3C360.5 341.9 331.2 360.3 294.2 365.2C263.6 369.3 235.3 363.4 210.3 344.7C187.3 327.2 174.2 304.2 170.8 275.5C166.7 241.5 176.7 210.1 197.2 184.2C219.4 155.2 248.7 136.8 284.5 130.3C313.8 124.1 341.8 128.4 367.1 145.6C383.6 156.5 395.4 171.4 403.2 189.5C405.1 192.3 403.8 193.9 400.1 194.8zM48.3 200.4C47.05 200.4 46.74 199.8 47.36 198.8L53.91 190.4C54.53 189.5 56.09 188.9 57.34 188.9H168.6C169.8 188.9 170.1 189.8 169.5 190.7L164.2 198.8C163.6 199.8 162 200.7 161.1 200.7L48.3 200.4zM1.246 229.1C0 229.1-.3116 228.4 .3116 227.5L6.855 219.1C7.479 218.2 9.037 217.5 10.28 217.5H152.4C153.6 217.5 154.2 218.5 153.9 219.4L151.4 226.9C151.1 228.1 149.9 228.8 148.6 228.8L1.246 229.1zM75.72 255.9C75.1 256.8 75.41 257.7 76.65 257.7L144.6 258C145.5 258 146.8 257.1 146.8 255.9L147.4 248.4C147.4 247.1 146.8 246.2 145.5 246.2H83.2C81.95 246.2 80.71 247.1 80.08 248.1L75.72 255.9zM577.2 237.9C577 235.3 576.9 233.1 576.5 230.9C570.9 200.1 542.5 182.6 512.9 189.5C483.9 196 465.2 214.4 458.4 243.7C452.8 268 464.6 292.6 487 302.6C504.2 310.1 521.3 309.2 537.8 300.7C562.4 287.1 575.8 268 577.4 241.2C577.3 240 577.3 238.9 577.2 237.9z"})}),{})},{value:"cURL",icon:(0,r.jsx)(V,{})},{value:"Java",icon:(0,r.jsx)(()=>
1(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 384 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M277.74 312.9c9.8-6.7 23.4-12.5 23.4-12.5s-38.7 7-77.2 10.2c-47.1 3.9-97.7 4.7-123.1 1.3-60.1-8 33-30.1 33-30.1s-36.1-2.4-80.6 19c-52.5 25.4 130 37 224.5 12.1zm-85.4-32.1c-19-42.7-83.1-80.2 0-145.8C296 53.2 242.84 0 242.84 0c21.5 84.5-75.6 110.1-110.7 162.6-23.9 35.9 11.7 74.4 60.2 118.2zm114.6-176.2c.1 0-175.2 43.8-91.5 140.2 24.7 28.4-6.5 54-6.5 54s62.7-32.4 33.9-72.9c-26.9-37.8-47.5-56.6 64.1-121.3zm-6.1 270.5a12.19 12.19 0 0 1-2 2.6c128.3-33.7 81.1-118.9 19.8-97.3a17.33 17.33 0 0 0-8.2 6.3 70.45 70.45 0 0 1 11-3c31-6.5 75.5 41.5-20.6 91.4zM348 437.4s14.5 11.9-15.9 21.2c-57.9 17.5-240.8 22.8-291.6.7-18.3-7.9 16-19 26.8-21.3 11.2-2.4 17.7-2 17.7-2-20.3-14.3-131.3 28.1-56.4 40.2C232.84 509.4 401 461.3 348 437.4zM124.44 396c-78.7 22 47.9 67.4 148.1 24.5a185.89 185.89 0 0 1-28.2-13.8c-44.7 8.5-65.4 9.1-106 4.5-33.5-3.8-13.9-15.2-13.9-15.2zm179.8 97.2c-78.7 14.8-175.8 13.1-233.3 3.6 0-.1 11.8 9.7 72.4 13.6 92.2 5.9 233.8-3.3 237.1-46.9 0 0-6.4 16.5-76.2 29.7zM260.64 353c-59.2 11.4-93.5 11.1-136.8 6.6-33.5-3.5-11.6-19.7-11.6-19.7-86.8 28.8 48.2 61.4 169.5 25.9a60.37 60.37 0 0 1-21.1-12.8z"})}),{})},{value:"C++",icon:(0,r.jsx)(()=>(0,r.jsxs)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round","stroke-linejoin":"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M18 12h4"}),(0,r.jsx)("path",{d:"M20 10v4"}),(0,r.jsx)("path",{d:"M11 12h4"}),(0,r.jsx)("path",{d:"M13 10v4"}),(0,r.jsx)("path",{d:"M9 9a3 3 0 0 0 -3 -3h-.5a3.5 3.5 0 0 0 -3.5 3.5v5a3.5 3.5 0 0 0 3.5 3.5h.5a3 3 0 0 0 3 -3"})]}),{})},{value:"SQL",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.43
102-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"})}),{})},{value:"Bash",icon:(0,r.jsx)(()=>
1(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M432 32H80a64.07 64.07 0 0 0-64 64v320a64.07 64.07 0 0 0 64 64h352a64.07 64.07 0 0 0 64-64V96a64.07 64.07 0 0 0-64-64zM96 256a16 16 0 0 1-10-28.49L150.39 176 86 124.49a16 16 0 1 1 20-25l80 64a16 16 0 0 1 0 25l-80 64A16 16 0 0 1 96 256zm160 0h-64a16 16 0 0 1 0-32h64a16 16 0 0 1 0 32z"})}),{})},{value:"JSON",icon:(0,r.jsx)(V,{})},{value:"Yaml",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"m0 .97 4.111 6.453v4.09h2.638v-4.09L11.053.969H8.214L5.58 5.125 2.965.969Zm12.093.024-4.47 10.544h2.114l.97-2.345h4.775l.804 2.345h2.26L14.255.994Zm1.133 2.225 1.463 3.87h-3.096zm3.06 9.475v10.29H24v-2.199h-5.454v-8.091zm-12.175.002v10.335h2.217v-7.129l2.32 4.792h1.746l2.4-4.96v7.295h2.127V12.696h-2.904L9.44 17.37l-2.455-4.674Z"})}),{})},{value:"Csharp",icon:(0,r.jsx)(()=>(0,r.jsxs)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round","stroke-linejoin":"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M10 9a3 3 0 0 0 -3 -3h-.5a3.5 3.5 0 0 0 -3.5 3.5v5a3.5 3.5 0 0 0 3.5 3.5h.5a3 3 0 0 0 3 -3"}),(0,r.jsx)("path",{d:"M16 7l-1 10"}),(0,r.jsx)("path",{d:"M20 7l-1 10"}),(0,r.jsx)("path",{d:"M14 10h7.5"}),(0,r.jsx)("path",{d:"M21 14h-7.5"})]}),{})},{value:"Kotlin",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M24 24H0V0h24L12 12Z"})}),{})},{value:"Dart",icon:(0,r.jsx)(V,{})},{value:"Swift",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{"fill-rule":"evenodd",d:"M18.1029473,21.0182797 C15.2758951,22.6513915 11.388774,22.8191853 7.4780286,21.143065 C4.31157263,19.7958689 1.6842374,17.43767 -1.77635684e-15,14.7432778 C0.808438798,15.4168759 1.7515972,15.9559966 2.76211541,16.4272729 C6.80079604,18.320253 10.8386286,18.1906218 13.6802189,16.432119 C13.6784016,16.4303017 13.6771901,16.4290902 13.6759786,16.4272729 C9.63378462,13.3282374 6.19795002,9.28604337 3.63803517,5.98529182 C3.09885386,5.44629224 2.69463446,4.77257305 2.29041506,4.16627424 C5.38939007,6.99574946 10.3075644,10.5660614 12.0587981,11.5770642 C8.35400892,7.6693475 5.05265163,2.81907816 5.18712893,2.95355547 C11.0484011,8.88206627 16.5056356,12.2506622 16.5056356,12.2506622 C16.6861501,12.3524288 16.8254735,12.4372343 16.9375379,12.5129535 C17.0556599,12.2124997 17.1592437,11.9005366 17.2464723,11.5770642 C18.1896307,8.14122958 17.1119949,4.23351289 14.7537961,1 C20.2104248,4.30105442 23.4445434,10.4988227 22.0967416,15.6864968 C22.0616079,15.8264259 22.0234454,15.9645377 21.9822542,16.1002266 C21.9980037,16.1190049 22.0137533,16.138389 22.0295029,16.1583789 C24.7238951,19.5269749 23.9830584,23.0972868 23.6462594,22.4236887 C22.1845759,19.5633201 19.4786744,20.4380283 18.1030079,21.0183403 L18.1029473,21.0182797 Z"})}),{})},{value:"Ruby",icon:(0,r.jsx)(()=>(0,r.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M20.156.083c3.033.525 3.893 2.598 3.829 4.77L24 4.822 22.635 22.71 4.89 23.926h.016C3.433 23.864.15 23.729 0 19.139l1.645-3 2.819 6.586.503 1.172 2.805-9.144-.03.007.016-.03 9.255 2.956-1.396-5.431-.99-3.9 8.82-.569-.615-.51L16.5 2.114 20.159.073l-.003.01zM0 19.089zM5.13 5.073c3.561-3.533 8.157-5.621 9.922-3.84 1.762 1.777-.105 6.105-3.673 9.636-3.563 3.532-8.103 5.734-9.864 3.957-1.766-1.777.045-6.217 3.612-9.75l.003-.003z"})}),{})}];var q=s(71112),_=s(54312);let K=(0,l.memo)(e=>{var t;let{block:s,editor:a}=e,[o,i]=(0,l.useState)(s.props.code),[c,d]=(0,l.useState)((null==s?void 0:null===(t=s.props)||void 0===t?void 0:t.language)||"javascript"),[u,p]=(0,l.useState)(s.props.isInitiallyOpen);return(0,r.jsxs)("div",{className:"code-block-wrapper relative w-full",children:[(0,r.jsxs)(q.Vq,{open:u,onOpenChange:p,children:[(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{showCross:!1,className:"h-[40rem]",onInteractOutside:()=>p(!1),onEscapeKeyDown:()=>p(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Paste your co
1de below"}),(0,r.jsxs)(q.Be,{children:[(0,r.jsx)(T,{selectedItem:c,setSelectedItem:d,items:U}),(0,r.jsx)(Z,{code:o,language:c,setCode:i})]})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{onClick:()=>{a.updateBlock(s,{type:"codeBlock",props:{...s.props,code:o,language:c,isInitiallyOpen:!1}}),p(!1)},className:"w-full",children:"Save"})})]})]}),!u&&(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4 group",children:[(0,r.jsx)(R.Z,{code:o,language:c,accessedFromEditor:!0}),(0,r.jsx)("div",{className:"pt-6 transition-all duration-300 ease-in-out opacity-0 transform translate-y-0 group-hover:opacity-100 group-hover:transform group-hover:-translate-y-2 ",onClick:()=>{p(!0)},children:(0,r.jsx)(_.Z,{})})]})]})});K.displayName="CodeBlockComponent";let H=(0,D.k2)({type:"codeBlock",propSchema:{language:{default:"javascript",values:["javascript","python","html","css","java","cpp"]},code:{default:"// You may choose a language from the dropdown above\n// and paste your code below in the input box\n// Happy coding!"},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(K,{block:t,editor:s})}});var Y=s(76568),J=s(96486),$=s.n(J);s(96398);let G=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)("youtube"),[i,c]=(0,l.useState)(t.props.youtubeUrl||""),[d,u]=(0,l.useState)(null),[p,m]=(0,l.useState)(t.props.isInitiallyOpen),x=e=>{try{let t=null;for(let s of[/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]+)/,/https:\/\/www\.youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/,/https:\/\/www\.youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)&.+/]){let r=e.match(s);if(r&&r[1]){t=r[1];break}}if(!t)return(0,h.Am)({title:"Please enter a valid YouTube URL",status:"error"});{let s=e.match(/[?&]t=(\d+)s?/),r=s?"?start=".concat(s[1]):"";c("".concat("https://www.youtube.com/embed/").concat(t).concat(r))}}catch(e){return console.error("Invalid URL",e),(0,h.Am)({title:"An error occurred while processing the URL",status:"error"})}};return(0,r.jsxs)("div",{className:"iframe-block-wrapper relative w-full",children:[(0,r.jsx)(q.Vq,{open:p,onOpenChange:m,children:(0,r.jsxs)(q.cZ,{className:"sm:max-w-[500px] bg-gray-900 text-white",children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{children:"Add Video"}),(0,r.jsxs)(q.Be,{children:[(0,r.jsx)("p",{className:"mt-6",children:"Add your youtube URL"}),(0,r.jsx)(v.I,{value:i,onChange:e=>x(e.target.value),placeholder:"Enter YouTube URL...",className:"w-full mt-2 bg-gray-800 text-white",ref:e=>e&&e.focus()})]})]}),(0,r.jsx)(q.cN,{className:"mt-5",children:(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{s.updateBlock(t,{type:"iframeBlock",props:{youtubeUrl:i,isInitiallyOpen:!1,videoFile:d?{type:d.type,name:d.name,tempUrl:URL.createObjectURL(d.blob)}:null}}),m(!1)},children:"Save"})})]})}),(0,r.jsxs)("div",{className:"flex group items-start justify-between gap-4",children:[(()=>{switch(a){case"youtube":return i?(0,r.jsx)("iframe",{src:i,className:"w-full h-[400px] rounded-md",style:{border:"none"},title:"YouTube video player"}):(0,r.jsx)("div",{className:"w-full h-[400px] bg-gray-900 text-white flex items-center justify-center",children:(0,r.jsx)("p",{children:"You have not added any video"})});case"video":return d&&d.blob?(0,r.jsx)("video",{src:URL.createObjectURL(d.blob),controls:!0,className:"w-full h-[400px] rounded-md"}):(0,r.jsx)("div",{className:"flex items-center justify-center h-[400px] bg-gray-800 rounded-md",children:(0,r.jsx)("p",{className:"text-gray-400",children:"No video uploaded"})});default:return null}})(),(0,r.jsx)("div",{className:"pt-6 cursor-pointer transition-all duration-300 ease-in-out opacity-0 transform translate-y-0 group-hover:opacity-100 group-hover:transform group-hover:-translate-y-2",onClick:()=>{m(!0)},children:(0,r.jsx)(_.Z,{})})]})]})}),X=(0,D.k2)({type:"iframeBlock",propSchema:{youtubeUrl:{default:""},isInitiallyOpen:{default:!0},videoFile:{default:null}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(G,{block:t,editor:s})}});var Q=s(78966);let ee=(0,l.memo)(e=>{let{isOpen:t}=e;return(0,l.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="auto",()=>{document.body.style.overflow="auto"}),[t]),(0,r.jsx)("div",{onClick:e=>{e.stopPropagation()},style:{pointerEvents:"none"},className:"fixed inset-0 bg-black opacity-60 z-10"})});ee.displayName="BG_Overaly";let et=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(t.props.codeBlocks),[i,c]=(0,l.useState)(t.props.isInitiallyOpen),[d,u]=(0,l.useState)("Javascript"),[p,m]=(0,l.useState)([]),x=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=[...new Set(a.map(e=>e.language))];m((null==e?void 0:e.length)>0?e:["Javascript"])},[i]),(0,l.useEffect)(()=>{x.current&&(x.current.scrollIntoView({behavior:"smooth"}),x.current.focus())},[a.length]);let g=(e,t,s)=>{let r=[...a];r[e][t]=s,o(r)},f=e=>{o(a.filter((t,s)=>s!==e))},v=()=>{let e=[...new Set(a.map(e=>e.language))];m(e),e.includes(d)||u(e[0]||"javascript")};return(0,r.jsxs)("div",{className:"multi-language-code-block-wrapper relative w-full",children:[(0,r.jsxs)(q.Vq,{modal:!1,open:i,onOpenChange:c,children:[i&&(0,r.jsx)(ee,{isOpen:i}),(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{className:"h-[91vh] max-w-[80vw]",children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{}),(0,r.jsx)(q.Be,{className:"h-[65vh] overflow-y-auto px-5",children:a.map((e,t)=>(0,r.jsxs)("div",{className:"mb-4 flex items-start gap-8 ",children:[(0,r.jsx)("div",{className:"w-1/3 pt-1",children:(0,r.jsx)(T,{selectedItem:e.language,items:U,setSelectedItem:e=>g(t,"language",e)})}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("textarea",{ref:t===a.length-1?x:null,value:e.code,onChange:e=>g(t,"code",e.target.value),className:"w-full h-28 p-3 border rounded-xl font-mono resize-none noScrollbar"}),(0,r.jsx)("div",{className:"flex justify-end w-full",children:(0,r.jsx)(n.z,{onClick:()=>f(t),variant:"secondary",className:"mt-2",children:"Delete"})})]})]},t))})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4 h-fit",children:[(0,r.jsx)(n.z,{onClick:()=>{let e=a.length%2==0?"python":"json";o([...a,{language:e,code:"python"===e?"# Add your python code here":'{\n "id": 1,\n "name": "John Doe",\n "status": "active",\n "subscription": {\n "type": "premium",\n "expires": "2021-12-31"\n },\n "address": {\n "street": "123 Main St",\n "city": "Springfield",\n "state": "IL",\n "zip": "62701"\n }\n}'}])},className:"",children:"Add New language"}),(0,r.jsx)(n.z,{onClick:()=>
1{if(a.length<2){(0,h.Am)({title:"Please add atleast 2 languages to save"});return}if(new Set(a.map(e=>e.language.toLowerCase())).size!==a.length){let e=a.find((e,t)=>a.findIndex(t=>t.language.toLowerCase()===e.language.toLowerCase())!==t);(0,h.Am)({title:"".concat(e.language," is being repeated. Please make sure each language is unique")});return}s.updateBlock(t,{type:"multiLanguageCode",props:{codeBlocks:a,isInitiallyOpen:!1}}),v(),m(s.document.find(e=>"multiLanguageCode"===e.type).props.codeBlocks.map(e=>e.language)),c(!1)},className:"w-28",variant:"secondary",children:"Save"})]})]})]}),!i&&(0,r.jsx)(Q.j,{codeBlocks:a,setIsDialogOpen:c,activeLanguageForFilter:d,arrayOfDifferntLanguages:p,setActiveLanguageForFilter:u,isDialogOpen:i,canEdit:!0},a.length)]})});et.displayName="MultiLanguageCodeBlockComponent";let es=(0,D.k2)({type:"multiLanguageCode",propSchema:{codeBlocks:{default:[{language:"",code:""}]},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(et,{block:t,editor:s})}});var er=s(24576),ea=s(46010),en=s(59923);let el=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsxs)(ea.fC,{ref:t,className:(0,en.cn)("relative flex w-full touch-none select-none items-center",s),...a,children:[(0,r.jsx)(ea.fQ,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-slate-100 dark:bg-slate-800",children:(0,r.jsx)(ea.e6,{className:"absolute h-full bg-slate-900 dark:bg-slate-50"})}),(0,r.jsx)(ea.bU,{className:"block h-5 w-5 rounded-full border-2 border-slate-900 bg-white ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:border-slate-50 dark:bg-slate-950 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300"})]})});el.displayName=ea.fC.displayName;let eo=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(!1),[i,c]=(0,l.useState)(t.props.text),[d,u]=(0,l.useState)(t.props.backgroundColor),[p,h]=(0,l.useState)(t.props.color),[m,x]=(0,l.useState)(t.props.isLink),[g,f]=(0,l.useState)(t.props.href),[j,w]=(0,l.useState)(t.props.borderRadius),[y,b]=(0,l.useState)(t.props.width),[k,C]=(0,l.useState)(t.props.height),N=()=>(0,r.jsx)(n.z,{style:{backgroundColor:d,color:p,borderRadius:j,paddingTop:"0.61rem",width:y,height:k},onClick:()=>m&&window.open(g,"_blank"),children:i}),S={text:"Click me",backgroundColor:"#ffffff",isLink:!1,href:"",color:"#000000",borderRadius:"6px",width:"89px",height:"40px"};return(0,r.jsxs)("div",{className:"button-block-wrapper w-full",children:[(0,r.jsx)(q.Vq,{open:a,children:(0,r.jsxs)(q.cZ,{showCross:!1,className:"h-[65vh]",onInteractOutside:()=>o(!1),onEscapeKeyDown:()=>o(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Edit Button"}),(0,r.jsx)(q.Be,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(v.I,{value:i,onChange:e=>c(e.target.value),placeholder:"Button text"}),(0,r.jsxs)("div",{className:"flex items-center gap-10",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"color",id:"backgroundColorPicker",value:d,onChange:e=>u(e.target.value)}),(0,r.jsx)("label",{htmlFor:"backgroundColorPicker text-sm",children:"Backgroun
1d Color:"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"color",id:"textColorPicker",value:p,onChange:e=>h(e.target.value)}),(0,r.jsx)("label",{htmlFor:"textColorPicker text-sm",children:"Text Color:"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-7",children:[(0,r.jsx)(er.r,{checked:m,onCheckedChange:e=>{if(x(e),e){let e=window.prompt("Enter the link URL:");e?f(e):x(!1)}}}),(0,r.jsx)("p",{className:"text-sm",children:"Make it a link"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-4 mt-7",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 w-[18.2rem]",children:[(0,r.jsx)(el,{onValueChange:e=>{w("".concat(String(e[0]),"px"))},defaultValue:[parseInt(j)],max:45,step:1}),(0,r.jsxs)("p",{className:"text-sm whitespace-nowrap",children:["Border radius - ",j]})]})}),(0,r.jsxs)("div",{className:"flex items-start flex-col gap-7 mt-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 w-[18.2rem]",children:[(0,r.jsx)(el,{onValueChange:e=>{b("".concat(String(e[0]),"px"))},defaultValue:[parseInt(y)],max:300,step:1}),(0,r.jsxs)("p",{className:"text-sm whitespace-nowrap",children:["Width - ",y]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 w-[18.2rem]",children:[(0,r.jsx)(el,{onValueChange:e=>{C("".concat(String(e[0]),"px"))},defaultValue:[parseInt(k)],max:120,step:1}),(0,r.jsxs)("p",{className:"text-sm whitespace-nowrap",children:["Height - ",k]})]})]})]})})]}),(0,r.jsxs)(q.cN,{children:[(0,r.jsx)(n.z,{onClick:()=>{s.updateBlock(t,{type:"button",props:{text:i,backgroundColor:d,isLink:m,href:g,color:p,borderRadius:j,width:y,height:k}}),o(!1)},children:"Save"}),(0,r.jsx)(n.z,{variant:"secondary",onClick:()=>{c(S.text),u(S.backgroundColor),x(S.isLink),f(S.href),h(S.color),w(S.borderRadius),b(S.width),C(S.height),o(!1)},children:"Reset"})]})]})}),(0,r.jsxs)("div",{className:"button-preview my-1 flex items-center gap-2",children:[m?(0,r.jsx)("a",{href:g,target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)(N,{})}):(0,r.jsx)(N,{}),(0,r.jsx)("div",{onClick:()=>o(!0),className:"cursor-pointer bg-gray-800 rounded-md p-[5px]",children:(0,r.jsx)(_.Z,{})})]})]})});eo.displayName="ButtonComponent";let ei=(0,D.k2)({type:"button",propSchema:{text:{default:"Click me"},backgroundColor:{default:"#ffffff"},isLink:{default:!1},href:{default:""},color:{default:"#000000"},borderRadius:{default:"6px"},width:{default:"89px"},height:{default:"40px"}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(eo,{block:t,editor:s})}});var ec=s(85798);let ed=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(t.props.content),[i,c]=(0,l.useState)(t.props.isInitiallyOpen);return(0,r.jsxs)("div",{className:"error-block-wrapper w-full",children:[(0,r.jsxs)(q.Vq,{open:i,onOpenChange:c,children:[(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{className:"h-[382px]",onInteractOutside:()=>c(!1),onEscapeKeyDown:()=>c(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Enter your error message below"}),(0,r.jsx)(q.Be,{children:(0,r.jsx)("textarea",{className:"w-full h-[14rem] border p-2 rounded-lg resize-none",value:a,onChange:e=>o(e.target.value),placeholder:"Enter your error message here..."})})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{s.updateBlock(t,{type:"error",props:{...t.props,content:a,isInitiallyOpen:!1}}),c(!1)},children:"Save"})})]})]}),!i&&(0,r.jsx)(ec.Z,{template:"dark",message:a,type:"error",setIsDialogOpen:c})]})});ed.displayName="ErrorBlockContent";let eu=(0,D.k2)({type:"error",propSchema:{content:{default:"Error! Something went wrong.",type:"string"},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(ed,{block:t,editor:s})}}),ep=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(t.props.content),[i,c]=(0,l.useState)(t.props.isInitiallyOpen);return(0,r.jsxs)("div",{className:"warning-block-wrapper w-full",children:[(0,r.jsxs)(q.Vq,{open:i,children:[(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{className:"h-[382px]",onInteractOutside:()=>c(!1),onEscapeKeyDown:()=>c(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Enter your warning message below"}),(0,r.jsx)(q.Be,{children:(0,r.jsx)("textarea",{className:"w-full h-[14rem] border p-2 rounded-lg resize-none",value:a,onChange:e=>o(e.target.value),placeholder:"Enter your warning message here..."})})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{s.updateBlock(t,{type:"warning",props:{...t.props,content:a,isInitiallyOpen:!1}}),c(!1)},children:"Save"})})]})]}),!i&&(0,r.jsx)(ec.Z,{template:"dark",message:a,type:"warning",setIsDialogOpen:c})]})});ep.displayName="WarningBlockComponent";let eh=(0,D.k2)({type:"warning",propSchema:{content:{default:"Warning! Please check the following details.",type:"string"},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(ep,{block:t,editor:s})}}),em=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(t.props.content),[i,c]=(0,l.useState)(t.props.isInitiallyOpen);return(0,r.jsxs)("div",{className:"success-block-wrapper w-full",children:[(0,r.jsxs)(q.Vq,{open:i,onOpenChange:c,children:[(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{className:"h-[382px]",onInteractOutside:()=>c(!1),onEscapeKeyDown:()=>c(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Enter your success message below"}),(0,r.jsx)(q.Be,{children:(0,r.jsx)("textarea",{className:"w-full h-[14rem] border p-2 rounded-lg resize-none",value:a,onChange:e=>o(e.target.value),placeholder:"Enter your success message here..."})})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{s.updateBlock(t,{type:"success",props:{...t.props,content:a,isInitiallyOpen:!1}}),c(!1)},children:"Save"})})]})]}),!i&&(0,r.jsx)(ec.Z,{template:"dark",message:a,type:"success",setIsDialogOpen:c})]})});em.displayName="SuccessBlockContent";let ex=(0,D.k2)({type:"success",propSchema:{content:{default:"Success! Operation completed successfully.",type:"string"},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(em,{block:t,editor:s})}});var eg=s(55651);let ef=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(!1),[i,c]=(0,l.useState)(!0),[d,u]=(0,l.useState)("#1f2937"),[p,h]=(0,l.useState)(!1);return(0,r.jsxs)("div",{className:"line-break-block-wrapper w-full",children:[(0,r.jsxs)(q.Vq,{open:a,children:[(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{showCross:!1,className:"h-[20vh]",onInteractOutside:()=>o(!1),onEscapeKeyDown:()=>o(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Edit Line Break"}),(0,r.jsxs)(q.Be,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(er.r,{checked:i,onCheckedChange:e=>c(e)}),(0,r.jsx)("p",{children:"Show background"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 mt-4",children:[(0,r.jsx)("label",{children:"Backgroun
1d Color:"}),(0,r.jsx)(eg.gW,{color:d,onChange:u,className:"!w-1/2"})]})]})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{s.updateBlock(t,{type:"lineBreak",props:{backgroundColor:d}}),o(!1)},children:"Save"})})]})]}),(0,r.jsxs)("div",{className:"line-break-preview my-1 group flex items-center",children:[(0,r.jsx)("div",{className:"".concat(i?"border-white border-t":""," w-[95%]"),style:{borderColor:d}}),(0,r.jsx)("div",{className:"ml-2 transition-all duration-300 ease-in-out opacity-0 transform translate-y-0 group-hover:opacity-100 group-hover:transform group-hover:-translate-y-2",onClick:()=>{o(!0)},children:(0,r.jsx)(_.Z,{})})]})]})});ef.displayName="LineBreakComponent";let ev=(0,D.k2)({type:"lineBreak",propSchema:{backgroundColor:"#1f2937"},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(ef,{block:t,editor:s})}}),ej="// You may choose a language from the dropdown above\n// and paste your code below in the input box\n// Happy coding!",ew=e=>({title:"Table ",onItemClick:()=>{(0,E.vz)(e,{type:"tableBlock",props:{tableData:[["","","",""],[" ","","",""],["","","",""],["","","",""]]}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["table","grid","spreadsheet"],icon:"â®â°"}),ey=e=>({title:"Code Block",onItemClick:()=>{(0,E.vz)(e,{type:"codeBlock",props:{language:"javascript",code:ej,isInitiallyOpen:!0}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["code","snippet","programming","development","javascript","python","snippet","codeblock"],icon:"</>"}),eb=e=>({title:"Line Break",onItemClick:()=>{(0,E.vz)(e,{type:"lineBreak",props:{backgroundColor:"#1f2937"}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["line","break","separator"],group:"Other",icon:"â¯â¯"}),ek=e=>({title:"Multi-Language Code Block",onItemClick:()=>{(0,E.vz)(e,{type:"multiLanguageCode",props:{codeBlocks:[{language:"javascript",code:ej}]}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["code","multi","language","development","javascript","python","snippet","codeblock"],icon:"</>"}),eC=e=>({title:"FAQ",onItemClick:()=>{(0,E.vz)(e,{type:"accordion",props:{pairs:[{question:"",answer:""}]}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["faq","q&a","dropdown","accordion"],group:"Other",icon:"â¼"}),eN=e=>({title:"Video/Youtube",onItemClick:()=>{(0,E.vz)(e,{type:"iframeBlock",props:{src:"",width:"100%",height:"400px",videoFile:null}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["embed","iframe","youtube","video"],group:"Media",icon:(0,r.jsx)(eE,{})}),eS=e=>({title:"Success Message",onItemClick:()=>{(0,E.vz)(e,{type:"success",props:{content:"Success! Operation completed successfully."}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["success","notification","alert"],group:"Other",icon:"â"}),eL=e=>({title:"Warning Message",onItemClick:()=>{(0,E.vz)(e,{type:"warning",props:{content:"Add your warning message here!"}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["warning","notification","banner"],group:"Other",icon:"â ï¸"}),eB=e=>({title:"Error Message",onItemClick:()=>{(0,E.vz)(e,{type:"error",props:{content:"Add your error message here!"}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["error","notification","banner"],group:"Other",icon:"â"}),eI=e=>({title:"Button",onItemClick:()=>{(0,E.vz)(e,{type:"button",props:{text:"Click me",backgroundColor:"#ffffff",isLink:!1,href:"",color:"#000000",borderRadius:"6px",width:"89px",height:"40px"}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["button","link","cta"],group:"Other",icon:"\uD83D\uDD18"}),ez=e=>({title:"Info Message",onItemClick:()=>{(0,E.vz)(e,{type:"info",props:{content:"Add your error message here!"}}),e.setTextCursorPosition(e.getTextCursorPosition().block,"after")},aliases:["info","notification","banner"],group:"Other",icon:(0,r.jsx)(eD,{size:19})}),eE=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"text-white fill-white",x:"0px",y:"0px",width:"24",height:"24",viewBox:"0 0 50 50",children:(0,r.jsx)("path",{d:"M 44.898438 14.5 C 44.5 12.300781 42.601563 10.699219 40.398438 10.199219 C 37.101563 9.5 31 9 24.398438 9 C 17.800781 9 11.601563 9.5 8.300781 10.199219 C 6.101563 10.699219 4.199219 12.199219 3.800781 14.5 C 3.398438 17 3 20.5 3 25 C 3 29.5 3.398438 33 3.898438 35.5 C 4.300781 37.699219 6.199219 39.300781 8.398438 39.800781 C 11.898438 40.5 17.898438 41 24.5 41 C 31.101563 41 37.
1101563 40.5 40.601563 39.800781 C 42.800781 39.300781 44.699219 37.800781 45.101563 35.5 C 45.5 33 46 29.398438 46.101563 25 C 45.898438 20.5 45.398438 17 44.898438 14.5 Z M 19 32 L 19 18 L 31.199219 25 Z"})}),eD=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",class:"lucide lucide-info",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M12 16v-4"}),(0,r.jsx)("path",{d:"M12 8h.01"})]});var eO=s(3285),eA=s(23493),eM=s.n(eA);function eR(e,t){let{past:s,present:r,future:a}=e;switch(t.type){case"UNDO":if(0===s.length)return e;let n=s[s.length-1];return{past:s.slice(0,s.length-1),present:n,future:[r,...a]};case"REDO":if(0===a.length)return e;return{past:[...s,r],present:a[0],future:a.slice(1)};case"SET":if(t.newPresent===r)return e;return{past:[...s,r],present:t.newPresent,future:[]};default:return e}}let eT=(0,l.memo)(e=>{let{initialData:t,onDataChange:a}=e,[n,o]=(0,l.useReducer)(eR,{present:t,past:[],future:[]}),{present:c}=n,d=(0,l.useRef)(null);(0,l.useRef)(null);let u=(0,l.useRef)([]);(0,l.useEffect)(()=>{a(n.present)},[n.present]),(0,l.useEffect)(()=>(d.current=new Worker(s.tu(new URL(s.p+s.u(6152),s.b))),d.current.onmessage=e=>{let{action:t,newData:s}=e.data;s&&o({type:"SET",newPresent:s})},()=>{d.current.terminate()}),[]);let p=(0,l.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&("z"===e.key?(e.preventDefault(),o({type:"UNDO"})):"y"===e.key&&(e.preventDefault(),o({type:"REDO"})))},[]);(0,l.useEffect)(()=>(document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}),[]);let h=eM()((e,t,s)=>{o({type:"SET",newPresent:c.map((r,a)=>a===e?r.map((e,r)=>r===t?s:e):r)})},200),m=eM()(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"after";d.current.postMessage({action:"ADD_ROW",data:c,rowIndex:e,position:t})},300),x=eM()(e=>{d.current.postMessage({action:"DELETE_ROW",data:c,rowIndex:e})},300),g=eM()(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"after";d.current.postMessage({action:"ADD_COLUMN",data:c,colIndex:e,position:t})},300),f=eM()(e=>{d.current.postMessage({action:"DELETE_COLUMN",data:c,colIndex:e})},300),v=(0,l.useCallback)(eM()((e,t,s)=>{let r=e.target,a=r.selectionStart;if("ArrowRight"===e.key&&a===r.value.length){e.preventDefault();let r=s+1,a=t;r>=c[t].length&&(r=0,a=(t+1)%c.length);let n=u.current["".concat(a,"-").concat(r)];n&&(n.focus(),n.setSelectionRange(0,0))}else if("ArrowLeft"===e.key&&0===a){e.preventDefault();let r=s-1,a=t;r<0&&(a=(t-1+c.length)%c.length,r=c[a].length-1);let n=u.current["".concat(a,"-").concat(r)];n&&(n.focus(),n.setSelectionRange(n.value.length,n.value.length))}else if("ArrowDown"===e.key){e.preventDefault();let r=(t+1)%c.length,n=u.current["".concat(r,"-").concat(s)];n&&(n.focus(),n.setSelectionRange(a,a))}else if("ArrowUp"===e.key){e.preventDefault();let r=(t-1+c.length)%c.length,n=u.current["".concat(r,"-").concat(s)];n&&(n.focus(),n.setSelectionRange(Math.min(a,n.value.length),Math.min(a,n.value.length)))}},380),[c]),j=(0,l.memo)(e=>{let{rowIndex:t}=e;return(0,r.jsxs)(i.h_,{modal:!1,children:[(0,r.jsx)(i.$F,{children:(0,r.jsxs)("div",{onClick:()=>console.log("aa"),className:"flex items-center",children:[(0,r.jsx)("div",{className:"relative -left-1 -top-2",children:(0,r.jsx)(eP,{size:16,className:"rotate-90 absolute"})}),(0,r.jsx)(eP,{size:16,className:"rotate-90"})]})}),(0,r.jsxs)(i.AW,{className:"h-32 w-32",children:[(0,r.jsx)(i.Xi,{className:"mb-2 cursor-pointer",onClick:()=>m(t,"after"),children:"Add row below"}),(0,r.jsx)(i.Xi,{className:"mb-2 cursor-pointer",onClick:()=>m(t,"before"),children:"Add row above"}),(0,r.jsx)(i.Xi,{className:"text-red-600 cursor-pointer mb-2",onClick:()=>x(t),children:"Delete row"})]})]})});j.displayName="RowMenu";let w=(0,l.memo)(e=>{let{colIndex:t}=e;return(0,r.jsxs)(i.h_,{modal:!1,children:[(0,r.jsx)(i.$F,{children:(0,r.jsxs)("div",{className:"flex items-center flex-col",children:[(0,r.jsx)("div",{className:"relative -left-2 -top-1",children:(0,r.jsx)(eP,{size:16,className:" absolute"})}),(0,r.jsx)(eP,{size:16,className:""})]})}),(0,r.jsxs)(i.AW,{className:"h-32 w-44 cursor-pointer",children:[(0,r.jsx)(i.Xi,{className:"mb-2 cursor-pointer",onClick:()=>g(t,"after"),children:"Add column right"}),(0,r.jsx)(i.Xi,{className:"mb-2 cursor-pointer",onClick:()=>g(t,"before"),children:"Add column left"}),(0,r.jsx)(i.Xi,{className:"text-red-600 cursor-pointer mb-2",onClick:()=>f(t),children:"Delete column"})]})]})});return w.displayName="ColMenu",(0,r.jsxs)("div",{className:" mx-auto p-4",children:[(0,r.jsx)("div",{className:"overflow-x-auto overflow-y-auto max-h-[51vh]",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("div",{className:"flex relative top-3 flex-col h-fit gap-[3rem]",children:c.map((e,t)=>(0,r.jsx)("div",{className:"flex items-center relative ".concat(c.length-1===t&&"-top-4"," "),children:(0,r.jsx)(j,{rowIndex:t})},"row-menu-".concat(t)))}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"flex justify-between",children:c[0].map((e,t)=>(0,r.jsx)("div",{className:"flex items-center relative ".concat(c[0].length-1===t&&"-left-4"," "),children:(0,r.jsx)(w,{colIndex:t})},"col-menu-".concat(t)))}),(0,r.jsx)(eO.iA,{className:"w-full border-collapse table-fixed",children:(0,r.jsx)(eO.RM,{children:c.map((e,t)=>(0,r.jsx)(eO.SC,{className:"group h-14",children:e.map((e,s)=>(0,r.jsxs)(eO.pj,{className:"relative border !py-0 border-gray-700 px-2 transition-all w-[100px] min-w-[100px] max-w-[300px] overflow-hidden",style:{width:"100px",minWidth:"100px",maxWidth:"300px"},children:[(0,r.jsx)("input",{ref:e=>u.current["".concat(t,"-").concat(s)]=e,type:"text",value:e,onCh
1ange:e=>h(t,s,e.target.value),onKeyDown:e=>v(e,t,s),className:"w-full bg-transparent text-gray-100 focus:outline-none",style:{width:"100%",minWidth:"0",maxWidth:"100%"}}),(0,r.jsx)("div",{className:"absolute -right-6 top-1/2 transform -translate-y-1/2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"relative -left-1 -top-2",children:(0,r.jsx)(eP,{size:16,className:"rotate-90 absolute"})}),(0,r.jsx)(eP,{size:16,className:"rotate-90"})]})})]},s))},t))})})]})]})}),(0,r.jsxs)("div",{className:"mt-14 flex space-x-2",children:[(0,r.jsxs)("button",{onClick:()=>m(c.length-1),className:"flex items-center bg-gray-800 border border-gray-600 text-gray-100 px-4 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-200",children:[(0,r.jsx)(eF,{}),"Add Row"]}),(0,r.jsxs)("button",{onClick:()=>g(c[0].length-1),className:"flex items-center bg-gray-800 border border-gray-600 text-gray-100 px-4 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-200",children:[(0,r.jsx)(eF,{}),"Add Column"]})]})]})});eT.displayName="EditableTable";let eP=e=>{let{size:t,className:s}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:s,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,r.jsx)("circle",{cx:"19",cy:"12",r:"1"}),(0,r.jsx)("circle",{cx:"5",cy:"12",r:"1"})]})},eF=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"w-4 h-4 mr-2",children:[(0,r.jsx)("path",{d:"M5 12h14"}),(0,r.jsx)("path",{d:"M12 5v14"})]}),eW=(0,l.memo)(e=>{var t;let{block:s,editor:a}=e,[o,i]=(0,l.useState)(s.props.tableData),[c,d]=(0,l.useState)(s.props.isInitiallyOpen),[u,p]=(0,l.useState)(null);return(0,r.jsxs)("div",{className:"table-block-wrapper relative w-full",children:[c&&(0,r.jsx)(ee,{isOpen:c}),(0,r.jsx)(q.Vq,{open:c,modal:!1,onOpenChange:d,children:(0,r.jsxs)(q.cZ,{className:"max-w-[90vw] max-h-[90vh] min-h-[60vh] !flex !justify-between !flex-col",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-2xl font-medium",children:"Edit Table"}),(0,r.jsx)(eT,{initialData:o,onDataChange:p})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{onClick:()=>{u&&(i(u),a.updateBlock(s,{type:"tableBlock",props:{...s.props,tableData:u,isInitiallyOpen:!1}})),d(!1)},children:"Save Changes"})})]})}),(0,r.jsxs)("div",{className:"flex group my-9 items-start justify-between gap-4",children:[(0,r.jsxs)(eO.iA,{className:"w-full table-auto border border-[#2a2424]",children:[(0,r.jsx)(eO.xD,{className:"bg-slate-800/50 border-t border-[#2a2424]",children:(0,r.jsx)(eO.SC,{children:Array.isArray(o[0])&&(null===(t=o[0])||void 0===t?void 0:t.map((e,t)=>(0,r.jsx)(eO.ss,{className:"!text-white ".concat(0===t?"w-[100px]":""),children:e},t)))})}),(0,r.jsx)(eO.RM,{children:Array.isArray(o)&&o.slice(1).map((e,t)=>(0,r.jsx)(eO.SC,{children:e.map((e,t)=>(0,r.jsx)(eO.pj,{className:"whitespace-nowrap ".concat(0===t?"font-medium":""),children:e},t))},t))})]}),(0,r.jsx)("div",{className:"pt-4 transition-all duration-300 ease-in-out opacity-0 transform translate-y-0 group-hover:opacity-100 group-hover:transform group-hover:-translate-y-2",onClick:()=>{d(!0)},children:(0,r.jsx)(_.Z,{})})]})]})});eW.displayName="TableComponent";let eZ=(0,D.k2)({type:"tableBlock",propSchema:{tableData:{default:[["","","",""],[" ","","",""],["","","",""],["","","",""]]},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(eW,{block:t,editor:s})}});var eV=s(34798),eU=s(87066),eq=s(33299);let e_=E.Xy.create({blockSpecs:{...E.SJ,table:void 0,codeBlock:H,iframeBlock:X,multiLanguageCode:es,lineBreak:ev,success:ex,warning:eh,error:eu,button:ei,checkListItem:void 0,tableBlock:eZ}}),eK=e=>e.map(e=>({...e,description:"",shortcut:"",subtext:"",group:"",badge:""})),eH=(0,l.memo)(e=>{let{content:t,setContent:s,editable:a,index:n}=e,o=(0,l.useRef)(["codeBlock","iframeBlock","multiLanguageCode","lineBreak","success","warning","error","button"]),{data:i}=(0,eq.useSession)(),c=(0,D.$c)({schema:e_,uploadFile:async e=>{var t,s,r;if((null==e?void 0:null===(t=e.type)||void 0===t?void 0:t.toLowerCase().includes("svg"))||(null==e?void 0:null===(s=e.name)||void 0===s?void 0:s.toLowerCase().includes("svg")))return(0,h.Am)({title:"Only PNG, JPG, or JPEG images are supported. You have uploaded an svg"});try{let t=new FormData;t.append("file",e),t.append("userId",null==i?void 0:null===(r=i.user)||void 0===r?void 0:r.id);let s=await eU.Z.post("".concat((0,eV.D)(),"/upload-tenant-docs-image"),t,{headers:{"Content-Type":"multipart/form-data"}});if(s.data.success)return s.data.url;throw Error("Upload failed")}catch(t){return console.error("Error uploading image:",t),URL.createObjectURL(e)}},initialContent:t}),d=(0,l.useCallback)($().debounce(()=>{a&&s(c.document)},350),[]),u=(0,l.useCallback)((0,J.throttle)((e,t)=>{if("Backspace"===e.key){var s;let r=t.getTextCursorPosition();return!("paragraph"===r.block.type&&0===r.block.content.length&&o.current.includes(null==r?void 0:null===(s=r.prevBlock)||void 0===s?void 0:s.type))||(t.setTextCursorPosition(r.prevBlock,"end"),e.preventDefault(),e.stopPropagation(),!1)}},150),[]);return(0,r.jsx)("div",{children:(0,r.jsxs)(O.L6,{onChange:d,formattingToolbar:!1,className:"min-h-12 pt-2 pb-4 editorInsideAccordion",editor:c,slashMenu:!1,editable:a,onKeyDownCapture:e=>u(e,c),children:[(0,r.jsx)(D.V5,{formattingToolbar:()=>(0,r.jsxs)(D.DR,{children:[(0,r.jsx)(D.lI,{basicTextStyle:"bold"},"boldStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"italic"},"italicStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"underline"},"underlineStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"strike"},"strikeStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"code"},"codeStyleButton"),(0,r.jsx)(D.fe,{},"createLinkButton")]})}),(0,r.jsx)(D.mu,{triggerCharacter:"/",getItems:async e=>{let t=[...(0,D.B)(c).filter(e=>"Video"!==e.title&&"File"!==e.title&&"Audio"!==e.title&&"Check List"!==e.title),ey(c),ek(c),eb(c),eS(c),eL(c),eB(c),eN(c),eI(c),ew(c)];return(0,E.yD)(eK(t),e)}})]})})});eH.displayName="edito-in-accordion-answers";var eY=M()(()=>Promise.resolve(eH),{ssr:!1}),eJ=s(41664),e$=s.n(eJ);let eG=(0,l.memo)(e=>{let{blocks:t}=e,[s,a]=(0,l.useState)(!0),[o,i]=(0,l.useState)("javascript"),c=e=>{if(null==e?void 0:e.type)switch(e.type){case"heading":let t="h".concat(e.props.level);return(0,r.jsx)(t,{className:"!mt-6 ".concat(1==e.props.level?"!text-[2.1rem] !mb-8 !font-semibold":2==e.props.level?"!text-[1.7rem] !mb-4 !font-medium":"!text-[1.2rem] !mb-4 !font-medium"),children:d(e.content)},e.id);case"paragraph":return e.content.length>0?(0,r.jsx)("p",{children:d(e.content)},e.id):(0,r.jsx)("p",{className:"h-4"});case"codeBlock":return(0,r.jsx)(R.Z,{code:e.props.code,language:e.props.language,accessedFromEditor:!0},e.id);case"image":return(0,r.jsxs)("figure",{children:[(0,r.jsx)("img",{src:e.props.url,alt:e.props.caption||"",className:"my-3",style:{maxWidth:"100%",width:e.props.previewWidth}}),e.props.caption&&(0,r.jsx)("figcaption",{children:e.props.caption})]},e.id);case"bulletListItem":return(0,r.jsx)("ul",{className:"my-3",children:(0,r.jsx)("li",{className:"!mb-3",children:d(e.content)})},e.id);case"numberedListItem":return null;case"iframeBlock":return(0,r.jsx)("iframe",{src:e.props.youtubeUrl,width:e.props.width||"100%",height:e.props.height||"400px",allowFullScreen:!0,className:"my-3"},e.id);case"button":let s=e.props;return(0,r.jsx)(n.z,{style:{backgroundColor:s.backgroundColor,color:s.color,borderRadius:s.borderRadius,paddingTop:"0.61rem",width:s.width,height:s.height},children:e.props.text},e.id);case"success":case"warning":case"error":return(0,r.jsx)("div",{className:"w-full my-3",children:(0,r.jsx)(ec.Z,{type:e.type,template:"dark",message:e.props.content,accessedFromAccordion:!0})},e.id);case"multiLanguageCode":let l=e.props.codeBlocks;return(0,r.jsx)(Q.j,{arrayOfDifferntLanguages:l.map(e=>e.language),codeBlocks:l,setIsDialogOpen:a,activeLanguageForFilter:o,setActiveLanguageForFilter:i,canEdit:!1});case"tableBlock":return(0,r.jsx)("div",{className:"my-12 xl:w-[90%] lg:w-[92%] w-full",children:(0,r.jsxs)(eO.iA,{className:"table-auto",children:[(0,r.jsx)(eO.xD,{className:"bg-slate-800/50 border-t border-[#2a2424]",children:(0,r.jsx)(eO.SC,{className:"!border-b ".concat("border-[#2a2424] !hover:bg-slate-800/50"),children:e.props.tableData[0].map((e,t)=>(0,r.jsx)(eO.ss,{className:"".concat("!text-white"," ").concat(0===t?"w-[100px]":""),children:e},t))})}),(0,r.jsx)(eO.RM,{children:e.props.tableData.slice(1).map((e,t)=>(0,r.jsx)(eO.SC,{className:"!border-b ".concat("border-[#2a2424] !hover:bg-slate-800/50"),children:e.map((e,t)=>(0,r.jsx)(eO.pj,{className:"whitespace-nowrap ".concat(0===t?"font-medium":""),children:e},t))},t))})]})});default:return console.warn("Unsupported block type: ".concat(e.type)),null}},d=e=>e.map((e,t)=>{if("text"===e.type){let s=e.text;return e.styles&&(e.styles.bold&&(s=(0,r.jsx)("strong",{children:s},t)),e.styles.italic&&(s=(0,r.jsx)("em",{children:s},t)),e.styles.underline&&(s=(0,r.jsx)("u",{children:s},t)),e.styles.strike&&(s=(0,r.jsx)("s",{children:s},t)),e.styles.code&&(s=(0,r.jsx)("code",{className:"inlineCode",children:s},t))),s}return"link"===e.type?(0,r.jsx)(e$(),{href:e.href,className:"underline",children:d(e.content)},t):null});return(0,r.jsx)("div",{children:Array.isArray(t)?(e=>{let t=null,s=[];return e.forEach((e,a)=>{"numberedListItem"===e.type?(t||(t={type:"ol",items:[]}),t.items.push((0,r.jsx)("li",{className:"!mb-3",children:d(e.content)},e.id))):(t&&(s.push((0,r.jsx)("ol",{className:"my-3",children:t.items},"list-".concat(a))),t=null),s.push(c(e)))}),t&&s.push((0,r.jsx)("ol",{className:"my-3",children:t.items},"list-".concat(e.length))),s})(t):c(t)})});
1eG.displayName="contentRenderer";let eX=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(t.props.isInitiallyOpen),[i,c]=(0,l.useState)(t.props.pairs||[{question:"",answer:[]}]),u=(0,l.useRef)(null);(0,l.useEffect)(()=>{u.current&&(u.current.scrollIntoView({behavior:"smooth"}),u.current.focus())},[null==i?void 0:i.length]);let p=(e,t,s)=>{let r=[...i];r[e][t]=s,c(r)};return(0,r.jsxs)("div",{className:"w-full thisOne",children:[a&&(0,r.jsx)(ee,{isOpen:a}),(0,r.jsxs)(q.Vq,{modal:!1,open:a,children:[(0,r.jsx)(q.hg,{}),(0,r.jsx)(q.cZ,{className:"!w-[41rem] !max-w-[50rem]",showCross:!1,onInteractOutside:()=>o(!1),onEscapeKeyDown:()=>o(!1),children:(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{children:(0,r.jsx)("p",{className:"text-lg",children:"Type your question and answer"})}),(0,r.jsxs)(q.Be,{children:[(0,r.jsx)("div",{className:"max-h-[73vh] rounded-md overflow-y-auto p-4 mb-8 max-w-[36rem] 3xl:max-w-[50rem]",children:Array.isArray(i)&&(null==i?void 0:i.map((e,t)=>(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3 z-[1] relative bg-black mt-5",children:[(0,r.jsxs)("p",{children:["Set - ",t+1]}),(0,r.jsx)("div",{onClick:()=>c(i.filter((e,s)=>s!==t)),children:(0,r.jsx)(e0,{className:""})})]}),(0,r.jsx)(v.I,{ref:t===i.length-1?u:null,placeholder:"Add Question",value:e.question,onChange:e=>p(t,"question",e.target.value),className:"mb-2"}),(0,r.jsx)(eY,{content:e.answer,setContent:e=>p(t,"answer",e),editable:!0,index:t})]},t)))}),(0,r.jsxs)("div",{className:"mt-[2px] pl-4",children:[(0,r.jsx)(n.z,{onClick:()=>{c([...i,{question:"",answer:[{id:(0,d.Z)(),type:"paragraph",props:{textColor:"default",backgroundColor:"default",textAlignment:"left"},content:[],children:[]}]}])},children:"Add New"}),(0,r.jsx)(n.z,{onClick:()=>{console.log(i),s.updateBlock(t,{type:"accordion",props:{pairs:i,isInitiallyOpen:!1}}),o(!1)},variant:"secondary",className:"ml-2",children:"Save"})]})]})]})})]}),(0,r.jsxs)("div",{className:"w-full flex items-start gap-4 group",children:[(0,r.jsx)(Y.UQ,{type:"single",collapsible:!0,className:"w-full",children:Array.isArray(i)&&(null==i?void 0:i.map((e,t)=>(0,r.jsxs)(Y.Qd,{value:"item-".concat(t),children:[(0,r.jsx)(Y.o4,{className:" transition-all ease-in duration-150 hover:bg-gray-900 px-3 rounded-md min-h-[45px] h-auto",children:e.question}),(0,r.jsx)(Y.vF,{className:"min-h-[45px] h-auto md:mt-[10px] pr-3 pb-1",children:(0,r.jsx)(eG,{blocks:e.answer})})]},t)))}),(0,r.jsx)("div",{className:"pt-4 transition-all duration-300 ease-in-out opacity-0 transform translate-y-0 group-hover:opacity-100 group-hover:transform group-hover:-translate-y-2",children:(0,r.jsx)("div",{onClick:()=>{o(!0)},children:(0,r.jsx)(_.Z,{})})})]})]})}),eQ=(0,D.k2)({type:"accordion",propSchema:{pairs:{default:[],type:"array"},isInitiallyOpen:{default:!0}},content:"none"},{render:eX});eX.displayName="AccordionComponent";let e0=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"text-red-500 cursor-pointer",children:[(0,r.jsx)("path",{d:"M3 6h18"}),(0,r.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),(0,r.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]}),e1=(0,l.memo)(e=>{let{block:t,editor:s}=e,[a,o]=(0,l.useState)(t.props.content),[i,c]=(0,l.useState)(t.props.isInitiallyOpen);return(0,r.jsxs)("div",{className:"info-block-wrapper w-full",children:[(0,r.jsxs)(q.Vq,{open:i,onOpenChange:c,children:[(0,r.jsx)(q.hg,{}),(0,r.jsxs)(q.cZ,{className:"h-[382px]",onInteractOutside:()=>c(!1),onEscapeKeyDown:()=>c(!1),children:[(0,r.jsxs)(q.fK,{children:[(0,r.jsx)(q.$N,{className:"!mb-3",children:"Enter your info message below"}),(0,r.jsx)(q.Be,{children:(0,r.jsx)("textarea",{className:"w-full h-[14rem] border p-2 rounded-lg resize-none",value:a,onChange:e=>o(e.target.value),placeholder:"Enter your info message here..."})})]}),(0,r.jsx)(q.cN,{children:(0,r.jsx)(n.z,{className:"w-full",onClick:()=>{s.updateBlock(t,{type:"info",props:{...t.props,content:a,isInitiallyOpen:!1}}),c(!1)},children:"Save"})})]})]}),!i&&(0,r.jsx)(ec.Z,{template:"dark",message:a,type:"info",setIsDialogOpen:c})]})});e1.displayName="InfoBlockContent";let e2=(0,D.k2)({type:"info",propSchema:{content:{default:"Type your message here!",type:"string"},isInitiallyOpen:{default:!0}},content:"none"},{render:e=>{let{block:t,editor:s}=e;return(0,r.jsx)(e1,{block:t,editor:s})}});var e3=s(23279),e4=s.n(e3);let e5=(0,l.memo)(e=>{let{content:t}=e,[a,n]=(0,l.useState)([]),o=(0,u.useRouter)();(0,l.useEffect)(()=>
1{let e=new Worker(s.tu(new URL(s.p+s.u(1813),s.b)));return e.postMessage({content:t}),e.onmessage=function(e){n(e.data)},()=>{e.terminate()}},[t]);let i=(e,t)=>{let s=(0,g.q)(t);o.push("#".concat(s));let r=document.querySelector('div[data-id="'.concat(e,'"]'));r&&window.scrollTo({top:r.getBoundingClientRect().top+window.scrollY-180,behavior:"smooth"})};return(0,r.jsxs)("div",{className:"text-[#eaeaea] p-6 rounded-xl shadow-lg max-h-[62vh] noScrollbar w-[270px] overflow-y-auto fixed top-20 right-6 1000px:hidden xl:block ".concat(0===a.length&&"hidden"),children:[(0,r.jsx)("div",{className:"flex items-center mb-4",children:(0,r.jsx)("h2",{className:"font-medium",children:"On This Page"})}),(0,r.jsx)("nav",{children:(0,r.jsx)("div",{className:"mt-4",children:a.map(e=>(0,r.jsx)("div",{className:"cursor-pointer secText hover:text-white mb-[6px] transition-colors duration-200 ".concat(2===e.level?"ml]":""),children:(0,r.jsx)("a",{onClick:()=>i(e.id,e.text),className:"text-sm",children:e.text})},e.id))})})]})});e5.displayName="TableOfContents";let e6=(0,D.m7)({type:"textColor",propSchema:"string"},{render:e=>(0,r.jsx)("span",{style:{color:e.value},ref:e.contentRef})});var e8=s(1614),e7=()=>{var e;let t;let s=(0,D.Q1)(),a=(0,D.eb)(),[o,i]=(0,l.useState)(!1),[c,d]=(0,l.useState)(""),[u,p]=(0,l.useState)("#000000"),h=(0,l.useRef)(null),m=(0,l.useCallback)(()=>{d(s.getActiveStyles().textColor||"")},[s]);(0,l.useEffect)(()=>{m()},[m]),(0,D.Jw)(m,s);let x=(0,l.useCallback)((e=e=>{s.toggleStyles({textColor:e}),m(),i(!1)},function(){for(var s=arguments.length,r=Array(s),a=0;a<s;a++)r[a]=arguments[a];clearTimeout(t),t=setTimeout(()=>e(...r),300)}),[s,m]);return(0,r.jsxs)(e8.J2,{open:o,onOpenChange:i,children:[(0,r.jsx)(e8.xo,{asChild:!0,children:(0,r.jsx)(a.FormattingToolbar.Button,{mainTooltip:"Text Color",isSelected:""!==c,children:(0,r.jsx)(te,{size:16})})}),(0,r.jsx)(e8.yk,{className:"w-auto",children:(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[[{name:"Blue",value:"#1DA1F2"},{name:"Dark Blue",value:"#0061FF"},{name:"Red",value:"#E50914"},{name:"Dark Red",value:"#BD081C"},{name:"Yellow",value:"#FFFC00"},{name:"Orange",value:"#FF9900"},{name:"Purple",value:"#7738e8"},{name:"Green",value:"#1DB954"},{name:"Dark Green",value:"#00AB6C"},{name:"Black",value:"#000000"},{name:"Gray",value:"#a1a1a1"}].map(e=>{let{name:t,value:s}=e;return(0,r.jsxs)(n.z,{variant:"ghost",className:"justify-between",onClick:()=>x(s),children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"w-4 h-4 rounded-full mr-2",style:{backgroundColor:s,border:"#FFFFFF"===s?"1px solid #000":"none"}}),(0,r.jsx)("span",{children:t})]}),c===s&&(0,r.jsx)(e9,{size:20})]},s)}),(0,r.jsx)("br",{}),(0,r.jsx)(n.z,{variant:"borderWhite",className:"justify-between",onClick:()=>{h.current&&h.current.click()},children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)("span",{children:"Custom Color"})})}),(0,r.jsx)(n.z,{variant:"borderWhite",className:"justify-between",onClick:()=>{x("#cfcfcf")},children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)("span",{children:"Reset to default"})})}),(0,r.jsx)("input",{ref:h,type:"color",value:u,onChange:e=>{let t=e.target.value;p(t),x(t)},style:{position:"absolute",visibility:"hidden"}})]})})]})};let e9=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"h-5 w-5",children:(0,r.jsx)("path",{d:"M20 6 9 17l-5-5"})}),te=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"w-4 h-4",children:[(0,r.jsx)("circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor"}),(0,r.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"})]});var tt=()=>{let[e,t]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let e=setInterval(()=>{t(e=>e>=100?0:Math.min(e+6,100))},150);return()=>clearInterval(e)},[]),(0,r.jsx)("div",{className:"w-full max-w-md mx-auto mt-10",children:(0,r.jsx)("div",{className:"relative h-4 border border-gray-600 bg-black rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"absolute top-0 left-0 h-full bg-white transition-all duration-500 ease-out",style:{width:"".concat(e,"%")}})})})};let ts=E.Xy.create({blockSpecs:{...E.SJ,codeBlock:H,iframeBlock:X,accordion:eQ,multiLanguageCode:es,lineBreak:ev,success:ex,warning:eh,error:eu,tableBlock:eZ,button:ei,info:e2,checkListItem:void 0},styleSpecs:{...E.cE,textColor:e6}}),tr=e=>e.map(e=>({...e,description:"",shortcut:"",subtext:"",group:"",badge:""})),ta=(0,l.memo)(e=>{let{setSavedChanges:t}=e,s=(0,l.useRef)(),{data:a}=(0,eq.useSession)(),n=(0,u.useRouter)(),[o,i]=(0,l.useState)(),[c,m]=(0,l.useState)(!1),[x,v]=(0,l.useState)(null);(0,l.useEffect)(()=>{(async()=>{let e=await f.Z.getItem("pageIDsWithNames");e&&(s.current=e,m(!0))})()},[]);let j=(0,l.useRef)(["codeBlock","iframeBlock","accordion","multiLanguageCode","lineBreak","success","warning","error","button","tableBlock","markdown","info","collapsible","image"]),w=(0,l.useCallback)((e,t)=>{if(!e||!Array.isArray(e)||0===e.length||!t||0===t.length)return null;let s=(e,r)=>{for(let a of e)if((0,g.q)(a.title)===(0,g.q)(t[r])){if(r===t.length-1)return a;
1if(a.children&&a.children.length>0){let e=s(a.children,r+1);if(e)return e}}return null};return s(e,0)},[]);(0,l.useEffect)(()=>{let e=async()=>{if(c&&n.isReady){let e=await f.Z.getItem("pageIDsWithNames");s.current=e;let t=w(e.pages_content,n.query.slug);i((null==t?void 0:t.content)||void 0)}};return e(),window.addEventListener("LSUpdated",e),()=>{window.removeEventListener("LSUpdated",e)}},[n.isReady,n.query,w,c]),(0,l.useEffect)(()=>{v(o)},[o]);let y=(0,l.useMemo)(()=>c?E.lw.create({schema:ts,uploadFile:async e=>{var t,s,r;if((null==e?void 0:null===(t=e.type)||void 0===t?void 0:t.toLowerCase().includes("svg"))||(null==e?void 0:null===(s=e.name)||void 0===s?void 0:s.toLowerCase().includes("svg")))return(0,h.Am)({title:"Only PNG, JPG, or JPEG images are supported. You have uploaded an svg"});try{let t=new FormData;t.append("file",e),t.append("userId",null==a?void 0:null===(r=a.user)||void 0===r?void 0:r.id);let s=await eU.Z.post("".concat((0,eV.D)(),"/upload-tenant-docs-image"),t,{headers:{"Content-Type":"multipart/form-data"}});if(s.data.success)return s.data.url;throw Error("Upload failed")}catch(t){return console.error("Error uploading image:",t),URL.createObjectURL(e)}},initialContent:o}):null,[c,o]),b=(0,l.useCallback)(e4()(async e=>{try{var r;let a=null==n?void 0:null===(r=n.query)||void 0===r?void 0:r.slug,l={...s.current},o=w(l.pages_content,a);if(!o)return;o.content=e,await f.Z.setItem("pageIDsWithNames",l),s.current=l,(0,p.T)("lsUpdatedFromEditor"),t(!0)}catch(e){console.log("error while pdating editor content in LS",e)}},400),[n,w]),k=(0,l.useCallback)(e4()(()=>{t(!1)},300),[]),C=(0,l.useCallback)(e4()(()=>{y&&(b(y.document),v(y.document))},2e3),[y,b]);if((0,l.useEffect)(()=>{if(y){let e=()=>{let t=document.getElementsByClassName("ProseMirror")[0];t?t.spellcheck=!1:setTimeout(e,100)};e()}},[y]),!c||!y)return(0,r.jsx)("div",{className:"flex justify-center items-center w-full h-[80%]",children:(0,r.jsx)(tt,{})});let N=eM()((e,t)=>{if("Backspace"===e.key){var s;let r=t.getTextCursorPosition();return!("paragraph"===r.block.type&&0===r.block.content.length&&j.current.includes(null==r?void 0:null===(s=r.prevBlock)||void 0===s?void 0:s.type))||(t.removeBlocks([r.block]),t.setTextCursorPosition(r.prevBlock,"end"),e.preventDefault(),e.stopPropagation(),!1)}},150),S=(e,t,s)=>{let r=!1,a=[];if(e.replace(/```(\w+)?\s*([\s\S]*?)\s*```/g,(e,t,s,n)=>(r=!0,a.push({type:"codeBlock",props:{language:t||"javascript",code:"// Please paste your code block here",isInitiallyOpen:!1},id:(0,d.Z)(),children:[]}),e)),e.replace(/^\|(.+)\|\r?\n\|(?:[-:\s|]+)\|\r?\n((?:\|(?:.+)\|\r?\n)+)/gm,(e,t,s,n)=>{r=!0;let l=[t.split("|").map(e=>e.trim()).filter(Boolean),...s.trim().split("\n").map(e=>e.split("|").map(e=>e.trim()).filter(Boolean))];return a.push({type:"tableBlock",props:{tableData:l,isInitiallyOpen:!1}}),e}),a.length>0&&r){let e=t.document;s.preventDefault(),e.forEach(e=>{var s,r,a;if("table"===e.type){let s=(a=e.content.rows.map(e=>e.cells.map(e=>e.length>0?e[0].text:"")),{id:(0,d.Z)(),type:"tableBlock",props:{tableData:a,isInitiallyOpen:!1},children:[]});t.replaceBlocks([e],[s])}else"paragraph"===e.type&&1===e.content.length&&(null===(r=e.content[0])||void 0===r?void 0:null===(s=r.styles)||void 0===s?void 0:s.code)&&t.replaceBlocks([e],[{id:(0,d.Z)(),type:"codeBlock",props:{language:"javascript",code:"// Please paste your code block here",isInitiallyOpen:!1},children:[]}])})}},L=eM()((e,t)=>{N(e,t),"Tab"===e.key&&(e.preventDefault(),e.stopPropagation())},200);return(0,r.jsxs)("div",{className:"flex gap-12 w-full",children:[(0,r.jsxs)(O.L6,{onChange:()=>{try{C(),k()}catch(e){console.log(e)}},formattingToolbar:!1,className:"!min-h-[calc(100vh-100px)] pt-1 mainEditorGlobalComponent 1000px:w-[76%] 1700:w-[880px]",editor:y,slashMenu:!1,onKeyDown:e=>{(e.ctrlKey||e.metaKey)&&"v"===e.key&&navigator.clipboard.readText().then(t=>{S(t,y,e)})},onKeyDownCapture:e=>L(e,y),children:[(0,r.jsx)(D.V5,{formattingToolbar:()=>(0,r.jsxs)(D.DR,{children:[(0,r.jsx)(D.Ir,{},"blockTypeSelect"),(0,r.jsx)(D.lI,{basicTextStyle:"bold"},"boldStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"italic"},"italicStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"underline"},"underlineStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"strike"},"strikeStyleButton"),(0,r.jsx)(D.lI,{basicTextStyle:"code"},"codeStyleButton"),(0,r.jsx)(D.Df,{textAlignment:"left"},"textAlignLeftButton"),(0,r.jsx)(D.Df,{textAlignment:"center"},"textAlignCenterButton"),(0,r.jsx)(D.Df,{textAlignment:"right"},"textAlignRightButton"),(0,r.jsx)(D.fe,{},"createLinkButton"),(0,r.jsx)(e7,{},"ToggleColorButton_Toolbar")]})}),(0,r.jsx)(D.mu,{triggerCharacter:"/",getItems:async e=>{let t=[...(0,D.B)(y).filter(e=>"Video"!==e.title&&"File"!==e.title&&"Audio"!==e.title&&"Check List"!==e.title&&"Table"!==e.title),ey(y),eC(y),ek(y),eb(y),eS(y),eL(y),eB(y),ez(y),eN(y),ew(y),eI(y)];return(0,E.yD)(tr(t),e)}})]}),(0,r.jsx)(e5,{content:x})]})});ta.displayName="Editor-component";var tn=M()(()=>Promise.resolve(ta),{ssr:!1}),tl=s(44667),to=s(96782),ti=()=>{let[e,t]=(0,l.useState)(!0),s=(0,u.useRouter)(),[n,o]=(0,l.useState)(" "),[i,d]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{s.isReady&&o(s.query.slug[0]||"")},[s.isReady]),(0,r.jsxs)("div",{children:[(0,r.jsx)(a.Z,{}
1),(0,r.jsx)(tl.Z,{title:to.xF.title,description:to.xF.description,keywords:to.xF.keywords,canonicalUrl:"https://cypherscribe.com/setings"}),(0,r.jsxs)("div",{className:"flex pt-20 bg-[#070505]",children:[(0,r.jsx)("div",{className:"border-r-2 border-gray-800 1000px:editorSidePanelFluid 2xl:w-[350px]",children:(0,r.jsx)(j,{})}),(0,r.jsx)("div",{className:"flex-1 pr-2 pl-4",children:(0,r.jsx)(tn,{setSavedChanges:t})}),(0,r.jsx)("div",{className:"px-4 pb-4 pt-3 rounded-md border-gray-700 border fixed z-[1] bg-black right-0 bottom-2",children:(0,r.jsxs)("div",{className:"w-[280px] h-[7rem] flex flex-col items-start justify-center gap-5 p-2",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2 rounded-md px-4 py-2 w-full justify-center border ".concat(e?"border-green-700":"border-yellow-700"),children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"w-3 h-3 ".concat(e?"bg-green-600":"bg-yellow-600"," rounded-full")}),(0,r.jsx)("div",{className:"absolute inset-0 ".concat(e?"bg-green-500":"bg-yellow-500"," rounded-full animate-ping opacity-75"),style:{animationDuration:"3s"}})]}),(0,r.jsx)("span",{className:"".concat(e?"text-green-500":"text-yellow-500"," font-medium"),children:e?"Changes Saved":"Saving Changes..."})]}),(0,r.jsx)(c.pn,{delayDuration:0,children:(0,r.jsxs)(c.u,{children:[(0,r.jsx)(c.aJ,{className:"w-full",children:(0,r.jsx)(e$(),{onClick:()=>d(!0),href:"/preview/".concat((null==n?void 0:n.toLowerCase().replace(/[\s\/!@#$%^&*()=+{}[\]|\\:;'"<>,.?~%]+/g,"-"))||""),className:"w-full",children:(0,r.jsx)("div",{className:"w-full",suppressHydrationWarning:!0,children:(0,r.jsxs)("div",{disabled:i,className:"w-full justify-center flex items-center h-10 text-[14px] gap-2 bg-slate-900 text-slate-50 hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90 whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",children:["Preview Changes",i?(0,r.jsx)(td,{}):(0,r.jsx)(tc,{className:"ml-[3px]",size:22})]})})})}),(0,r.jsx)(c._v,{side:"left",children:(0,r.jsx)("p",{className:"text-sm",children:"Preview your changes in the template before deploying"})})]})})]})})]})]})};let tc=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","stroke-linejoin":"round",className:"ml-[3px]",children:[(0,r.jsx)("path",{d:"M7 7h10v10"}),(0,r.jsx)("path",{d:"M7 17 17 7"})]}),td=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","stroke-linecap":"round","stroke-linejoin":"round",className:"animate-spin ml-1",children:(0,r.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}},function(e){e.O(0,[2440,6911,1509,5654,3945,3662,9483,1664,1446,7699,7222,7066,1930,4605,3541,6908,4816,970,4510,9892,3896,6431,4231,2888,9774,179],function(){return e(e.s=3659)}),_N_E=e.O()}]);
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.