@chaibuilder/sdk 2.0.0-beta.51 → 2.0.0-beta.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.d.ts CHANGED
@@ -7,7 +7,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
7
7
  import { DialogProps } from '@radix-ui/react-dialog';
8
8
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
9
9
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
10
- import { JSX as JSX_2 } from 'react/jsx-runtime';
10
+ import { JSX } from 'react/jsx-runtime';
11
11
  import * as LabelPrimitive from '@radix-ui/react-label';
12
12
  import * as PopoverPrimitive from '@radix-ui/react-popover';
13
13
  import * as React_2 from 'react';
@@ -69,12 +69,12 @@ export declare const AlertDialogContent: React_2.ForwardRefExoticComponent<Omit<
69
69
  export declare const AlertDialogDescription: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
70
70
 
71
71
  export declare const AlertDialogFooter: {
72
- ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
72
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
73
73
  displayName: string;
74
74
  };
75
75
 
76
76
  export declare const AlertDialogHeader: {
77
- ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
77
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
78
78
  displayName: string;
79
79
  };
80
80
 
@@ -84,7 +84,7 @@ export declare const AlertDialogTrigger: React_2.ForwardRefExoticComponent<Alert
84
84
 
85
85
  export declare const AlertTitle: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLHeadingElement> & React_2.RefAttributes<HTMLParagraphElement>>;
86
86
 
87
- export declare const Badge: ({ className, variant, ...props }: BadgeProps) => JSX_2.Element;
87
+ export declare const Badge: ({ className, variant, ...props }: BadgeProps) => JSX.Element;
88
88
 
89
89
  export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
90
90
  }
@@ -127,7 +127,7 @@ export declare const Command: React_2.ForwardRefExoticComponent<Omit<{
127
127
  loop?: boolean;
128
128
  } & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
129
129
 
130
- export declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => JSX_2.Element;
130
+ export declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => JSX.Element;
131
131
 
132
132
  declare interface CommandDialogProps extends DialogProps {
133
133
  }
@@ -165,7 +165,7 @@ export declare const CommandSeparator: React_2.ForwardRefExoticComponent<Omit<Re
165
165
  } & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
166
166
 
167
167
  export declare const CommandShortcut: {
168
- ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
168
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX.Element;
169
169
  displayName: string;
170
170
  };
171
171
 
@@ -194,7 +194,7 @@ export declare const ContextMenuRadioItem: React_2.ForwardRefExoticComponent<Omi
194
194
  export declare const ContextMenuSeparator: React_2.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
195
195
 
196
196
  export declare const ContextMenuShortcut: {
197
- ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
197
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX.Element;
198
198
  displayName: string;
199
199
  };
200
200
 
@@ -215,12 +215,12 @@ export declare const DialogContent: React_2.ForwardRefExoticComponent<Omit<Dialo
215
215
  export declare const DialogDescription: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
216
216
 
217
217
  export declare const DialogFooter: {
218
- ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
218
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
219
219
  displayName: string;
220
220
  };
221
221
 
222
222
  export declare const DialogHeader: {
223
- ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
223
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
224
224
  displayName: string;
225
225
  };
226
226
 
@@ -253,7 +253,7 @@ export declare const DropdownMenuRadioItem: React_2.ForwardRefExoticComponent<Om
253
253
  export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
254
254
 
255
255
  export declare const DropdownMenuShortcut: {
256
- ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
256
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX.Element;
257
257
  displayName: string;
258
258
  };
259
259
 
@@ -322,12 +322,12 @@ declare interface SheetContentProps extends React_2.ComponentPropsWithoutRef<typ
322
322
  export declare const SheetDescription: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
323
323
 
324
324
  export declare const SheetFooter: {
325
- ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
325
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
326
326
  displayName: string;
327
327
  };
328
328
 
329
329
  export declare const SheetHeader: {
330
- ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
330
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
331
331
  displayName: string;
332
332
  };
333
333
 
@@ -339,7 +339,7 @@ declare const sheetVariants: (props?: {
339
339
  side?: "top" | "right" | "bottom" | "left";
340
340
  } & ClassProp) => string;
341
341
 
342
- export declare const Skeleton: ({ className, ...props }: default_2.HTMLAttributes<HTMLDivElement>) => JSX_2.Element;
342
+ export declare const Skeleton: ({ className, ...props }: default_2.HTMLAttributes<HTMLDivElement>) => JSX.Element;
343
343
 
344
344
  declare interface State {
345
345
  toasts: ToasterToast[];
@@ -376,7 +376,7 @@ declare const ToastAction: React_2.ForwardRefExoticComponent<Omit<ToastPrimitive
376
376
 
377
377
  declare type ToastActionElement = React_2.ReactElement<typeof ToastAction>;
378
378
 
379
- export declare function Toaster(): JSX_2.Element;
379
+ export declare function Toaster(): JSX.Element;
380
380
 
381
381
  declare type ToasterToast = ToastProps & {
382
382
  action?: ToastActionElement;
package/dist/ui.js CHANGED
@@ -1,9 +1,9 @@
1
- import { j as t } from "./jsx-runtime-Drh4NO5G.js";
1
+ import { j as t } from "./jsx-runtime-Dx-03ztt.js";
2
2
  import * as r from "react";
3
3
  import * as p from "@radix-ui/react-toggle";
4
4
  import { cva as c } from "class-variance-authority";
5
- import { c as s, D as x, a as h } from "./context-menu-FCyNTUkl.js";
6
- import { A as ne, g as de, e as ie, f as le, j as me, q as ce, r as pe, l as ue, p as ge, n as fe, m as xe, o as he, k as be, h as ye, B as Ne, C as we, F as ve, E as Ce, y as je, x as Se, z as De, aj as Te, an as ke, al as Me, as as Re, am as Ie, ap as _e, at as Ae, ax as Pe, ao as Ve, aq as Ge, ar as Le, au as He, av as ze, aw as Fe, ak as Ee, w as Be, u as Oe, t as qe, v as $e, s as Je, $ as Ke, a3 as Qe, a1 as Ue, a8 as We, a2 as Xe, a5 as Ye, a9 as Ze, ad as ea, a4 as aa, a6 as ta, a7 as oa, aa as sa, ab as ra, ac as na, a0 as da, Y as ia, _ as la, Z as ma, I as ca, L as pa, V as ua, X as ga, W as fa, G as xa, H as ha, ae as ba, S as ya, b as Na, J as wa, N as va, K as Ca, M as ja, T as Sa, ai as Da, O as Ta, Q as ka, U as Ma, R as Ra, P as Ia, i as _a, d as Aa, af as Pa, ah as Va, ag as Ga } from "./context-menu-FCyNTUkl.js";
5
+ import { c as s, D as x, a as h } from "./context-menu-BsI3Hqio.js";
6
+ import { A as ne, g as de, e as ie, f as le, j as me, q as ce, r as pe, l as ue, p as ge, n as fe, m as xe, o as he, k as be, h as ye, B as Ne, C as we, F as ve, E as Ce, y as je, x as Se, z as De, aj as Te, an as ke, al as Me, as as Re, am as Ie, ap as _e, at as Ae, ax as Pe, ao as Ve, aq as Ge, ar as Le, au as He, av as ze, aw as Fe, ak as Ee, w as Be, u as Oe, t as qe, v as $e, s as Je, $ as Ke, a3 as Qe, a1 as Ue, a8 as We, a2 as Xe, a5 as Ye, a9 as Ze, ad as ea, a4 as aa, a6 as ta, a7 as oa, aa as sa, ab as ra, ac as na, a0 as da, Y as ia, _ as la, Z as ma, I as ca, L as pa, V as ua, X as ga, W as fa, G as xa, H as ha, ae as ba, S as ya, b as Na, J as wa, N as va, K as Ca, M as ja, T as Sa, ai as Da, O as Ta, Q as ka, U as Ma, R as Ra, P as Ia, i as _a, d as Aa, af as Pa, ah as Va, ag as Ga } from "./context-menu-BsI3Hqio.js";
7
7
  import { CaretSortIcon as b, CheckIcon as y, Cross2Icon as N, MagnifyingGlassIcon as w } from "@radix-ui/react-icons";
8
8
  import * as n from "@radix-ui/react-select";
9
9
  import * as d from "@radix-ui/react-dialog";
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@chaibuilder/runtime"),n=require("./jsx-runtime-qcKc-DpB.cjs"),E=require("react"),x=require("./iconBase-Cn2BsTrq.cjs"),y=require("@radix-ui/react-icons"),m=require("lodash-es"),w=require("lucide-react");function I(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return s.default=e,Object.freeze(s)}const g=I(E),k=({className:e="",inBuilder:s})=>s?n.jsxRuntimeExports.jsx("div",{className:x.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:n.jsxRuntimeExports.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700"})})}):null,_=e=>{const{blockProps:s,inBuilder:o,backgroundImage:r,children:l,tag:i="div",styles:a}=e;let c=l;l||(c=n.jsxRuntimeExports.jsx(k,{inBuilder:o}));let p={};return r&&(p={backgroundImage:`url(${r})`}),g.createElement(i,{...s,...a,style:p},c)},L={type:"Box",label:"Box",category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),backgroundImage:{type:"string",default:"",title:"Background Image",ui:{"ui:widget":"image"}},tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]}}}),canAcceptBlock:()=>!0},R=e=>{const{blockProps:s,iconSize:o,icon:r,content:l,styles:i,children:a,iconPos:c,link:p,inBuilder:d}=e,h=r,f=a||n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",children:l}),h&&n.jsxRuntimeExports.jsx("div",{style:{width:o+"px"},className:c+" "+(c==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:h}})]}),u=g.createElement("button",{...s,...i,type:"button"},f);return m.isEmpty(m.get(p,"href"))?u:d?n.jsxRuntimeExports.jsx("span",{children:u}):n.jsxRuntimeExports.jsx("a",{href:m.get(p,"href")||"/",target:m.get(p,"target","_self"),children:u})},M={type:"Button",label:"Button",category:"core",icon:y.ButtonIcon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),content:{type:"string",title:"Button label",default:"Button"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon position",default:"order-last",enum:["order-first","order-last"]},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}}}}),i18nProps:["content"],aiProps:["content"]},D=e=>{const{blockProps:s,styles:o,htmlCode:r,inBuilder:l}=e;return l?n.jsxRuntimeExports.jsxs("div",{className:"relative",children:[l?n.jsxRuntimeExports.jsx("div",{...s,...o,className:"absolute z-20 h-full w-full"}):null,g.createElement("div",{...o,dangerouslySetInnerHTML:{__html:r.replace(/<script.*?>.*?<\/script>/g,"")}})]}):g.createElement("div",{...s,...o,dangerouslySetInnerHTML:{__html:r}})},N={type:"CustomHTML",label:"web_blocks.custom_html",category:"core",icon:y.CodeIcon,group:"advanced",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),htmlCode:{type:"string",default:"<div><p>Enter your HTML code here...</p></div>",ui:{"ui:widget":"code"}}}})},T=e=>{const{blockProps:s,styles:o,backgroundImage:r}=e;let l={};return r&&(l={backgroundImage:`url(${r})`}),g.createElement("div",{...s,...o,style:l})},$={type:"EmptyBox",label:"Empty Box",category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image"}}}})},A=e=>{const{blockProps:s,styles:o,content:r,tag:l="h1",children:i=null}=e;return i?g.createElement(l,{...o,...s},i):g.createElement(l,{...o,...s,dangerouslySetInnerHTML:{__html:r}})},z={type:"Heading",label:"web_blocks.heading",category:"core",icon:y.HeadingIcon,group:"typography",...t.registerChaiBlockSchema({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:t.StylesProp("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Text"},H=e=>{const{blockProps:s,styles:o,content:r}=e;return m.isNull(e.children)?g.createElement("p",{...o,...s,dangerouslySetInnerHTML:{__html:r}}):g.createElement("p",{...o,...s},e.children)},q={type:"Paragraph",label:"Paragraph",category:"core",icon:y.TextIcon,group:"typography",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@chaibuilder/runtime"),n=require("./jsx-runtime-DGh1k5sI.cjs"),k=require("react"),x=require("./iconBase-Cn2BsTrq.cjs"),m=require("@radix-ui/react-icons"),g=require("lodash-es"),B=require("lucide-react");function I(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return s.default=e,Object.freeze(s)}const h=I(k),w=({className:e="",inBuilder:s})=>s?n.jsxRuntimeExports.jsx("div",{className:x.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:n.jsxRuntimeExports.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700"})})}):null,_=e=>{const{blockProps:s,inBuilder:o,backgroundImage:r,children:l,tag:i="div",styles:a}=e;let c=l;l||(c=n.jsxRuntimeExports.jsx(w,{inBuilder:o}));let p={};return r&&(p={backgroundImage:`url(${r})`}),h.createElement(i,{...s,...a,style:p},c)},L={type:"Box",label:"Box",category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),backgroundImage:{type:"string",default:"",title:"Background Image",ui:{"ui:widget":"image"}},tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]}}}),canAcceptBlock:()=>!0},R=e=>{const{blockProps:s,iconSize:o,icon:r,content:l,styles:i,children:a,iconPos:c,link:p,inBuilder:d}=e,y=r,f=a||n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",children:l}),y&&n.jsxRuntimeExports.jsx("div",{style:{width:o+"px"},className:c+" "+(c==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:y}})]}),u=k.createElement("button",{...s,...i,type:"button"},f);return g.isEmpty(g.get(p,"href"))?u:d?n.jsxRuntimeExports.jsx("span",{children:u}):n.jsxRuntimeExports.jsx("a",{href:g.get(p,"href")||"/",target:g.get(p,"target","_self"),children:u})},M={type:"Button",label:"Button",category:"core",icon:m.ButtonIcon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),content:{type:"string",title:"Button label",default:"Button"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon position",default:"order-last",enum:["order-first","order-last"]},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}}}}),i18nProps:["content"],aiProps:["content"]},D=e=>{const{blockProps:s,styles:o,htmlCode:r,inBuilder:l}=e;return l?n.jsxRuntimeExports.jsxs("div",{className:"relative",children:[l?n.jsxRuntimeExports.jsx("div",{...s,...o,className:"absolute z-20 h-full w-full"}):null,h.createElement("div",{...o,dangerouslySetInnerHTML:{__html:r.replace(/<script.*?>.*?<\/script>/g,"")}})]}):h.createElement("div",{...s,...o,dangerouslySetInnerHTML:{__html:r}})},N={type:"CustomHTML",label:"web_blocks.custom_html",category:"core",icon:m.CodeIcon,group:"advanced",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),htmlCode:{type:"string",default:"<div><p>Enter your HTML code here...</p></div>",ui:{"ui:widget":"code"}}}})},T=e=>{const{blockProps:s,styles:o,backgroundImage:r}=e;let l={};return r&&(l={backgroundImage:`url(${r})`}),h.createElement("div",{...s,...o,style:l})},$={type:"EmptyBox",label:"Empty Box",category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image"}}}})},A=e=>{const{blockProps:s,styles:o,content:r,tag:l="h1",children:i=null}=e;return i?h.createElement(l,{...o,...s},i):h.createElement(l,{...o,...s,dangerouslySetInnerHTML:{__html:r}})},z={type:"Heading",label:"web_blocks.heading",category:"core",icon:m.HeadingIcon,group:"typography",...t.registerChaiBlockSchema({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:t.StylesProp("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Text"},H=e=>{const{blockProps:s,styles:o,content:r}=e;return g.isNull(e.children)?h.createElement("p",{...o,...s,dangerouslySetInnerHTML:{__html:r}}):h.createElement("p",{...o,...s},e.children)},q={type:"Paragraph",label:"Paragraph",category:"core",icon:m.TextIcon,group:"typography",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
2
2
  Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
3
- nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},U=e=>{const{blockProps:s,styles:o,content:r,children:l=null,tag:i}=e;return l?g.createElement("span",{...o,...s},l):g.createElement(i||"span",{...o,...s,dangerouslySetInnerHTML:{__html:r||""}})},O={type:"Span",label:"Span",category:"core",group:"typography",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},F=e=>{const{blockProps:s,content:o,styles:r}=e;return n.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:n.jsxRuntimeExports.jsx("div",{...s,...r,dangerouslySetInnerHTML:{__html:o}})})},G={type:"RichText",label:"Rich Text",category:"core",icon:y.CursorTextIcon,group:"typography",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>",ui:{"ui:widget":"richtext"}}}}),aiProps:["content"],i18nProps:["content"]},V=e=>{const{blockProps:s,link:o,children:r,styles:l,inBuilder:i,content:a}=e;let c={};return!r&&m.isEmpty(a)&&(c={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),i?r?n.jsxRuntimeExports.jsx("span",{...s,style:c,...l,children:r}):g.createElement("span",{...s,...l,style:c},a):r?n.jsxRuntimeExports.jsx("a",{href:(o==null?void 0:o.href)||"#/",target:o==null?void 0:o.target,...s,...l,children:r}):g.createElement("a",{...s,...l,href:(o==null?void 0:o.href)||"#",target:(o==null?void 0:o.target)||"_self"},a)},W={type:"Link",label:"Link",category:"core",icon:y.Link1Icon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",default:"Link goes here",title:"Content"},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:e=>e!=="Link"},v=(e,...s)=>({...e,className:x.cn(e.className,...s)}),X=e=>{const{blockProps:s,children:o,styles:r,inBuilder:l,content:i,href:a}=e,{hrefType:c,autoplay:p,maxWidth:d,backdropColor:h,galleryName:f}=e,u=v(r,"cb-lightbox");if(!o&&m.isEmpty(r==null?void 0:r.className)&&m.isEmpty(i))return n.jsxRuntimeExports.jsx(k,{inBuilder:l});if(l)return o?n.jsxRuntimeExports.jsx("span",{...s,...u,children:o}):g.createElement("span",{...s,...u,dangerouslySetInnerHTML:{__html:i}});const b={};return c!=="image"&&(b["data-vbtype"]=c),p&&(b["data-autoplay"]="true"),d&&(b["data-maxwidth"]=d+"px"),h&&(b["data-overlay"]=h),f&&(b["data-gall"]=f),o?n.jsxRuntimeExports.jsx("a",{...b,href:a||"#/",...s,...u,children:o}):g.createElement("a",{...s,...u,...b,href:a||"#",dangerouslySetInnerHTML:{__html:i}})},Y={type:"LightBoxLink",label:"Lightbox Link",category:"core",icon:y.ImageIcon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:"Link text or drop blocks inside"},hrefType:{type:"string",title:"Type",default:"image",enum:["image","video","iframe","inline","ajax"],enumNames:["Image","Video","Iframe","Inline","Ajax"]},href:{type:"string",title:"Href",default:""},autoplay:{type:"boolean",title:"Autoplay (Video only)",default:!1},maxWidth:{type:"number",title:"Max Width",default:""},backdropColor:{type:"string",title:"Backdrop Color",default:""},galleryName:{type:"string",title:"Gallery Name",default:""}},dependencies:{autoplay:["hrefType","video"]}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="Link"&&e!=="LightBoxLink"},Z=e=>{const{blockProps:s,children:o,listType:r,styles:l,tag:i,inBuilder:a}=e,c=x.cn(m.get(l,"className",""),r);return!o&&m.isEmpty(l==null?void 0:l.className)?n.jsxRuntimeExports.jsx(k,{inBuilder:a}):g.createElement(i||(r==="list-decimal"?"ol":"ul"),{...s,...l,className:c},o)},J={type:"List",label:"web_blocks.list",icon:y.RowsIcon,category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),listType:{type:"string",title:"List Type",default:"list-none",oneOf:[{enum:["list-none"],title:"List None"},{enum:["list-disc"],title:"Disc"},{enum:["list-decimal"],title:"Decimal"}]}}}),canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]},K=e=>{const{blockProps:s,content:o,styles:r,children:l,tag:i}=e;return l?g.createElement(i||"li",{...r,...s},l):g.createElement(i||"li",{...r,...s,dangerouslySetInnerHTML:{__html:o}})},Q={type:"ListItem",label:"List Item",icon:y.ColumnsIcon,category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",default:"List item",title:"Content",ui:{"ui:widget":"textarea"}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="ListItem",canBeNested:e=>e==="List"},ee=e=>{const{blockProps:s,icon:o,styles:r,width:l,inBuilder:i,height:a}=e,c=v(r,"");if(m.isEmpty(o))return n.jsxRuntimeExports.jsx(k,{inBuilder:i,className:"h-8 w-14"});const p=o.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return g.createElement("span",{...s,...c,style:{width:l?`${l}px`:"auto",height:a?`${a}px`:"auto"},dangerouslySetInnerHTML:{__html:p}})},te={type:"Icon",label:"web_blocks.icon",category:"core",icon:y.SketchLogoIcon,group:"media",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),icon:{type:"string",title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})},oe=e=>{const{blockProps:s,image:o,mobileImage:r,styles:l,alt:i,height:a,width:c,lazyLoading:p}=e;return m.isEmpty(o)?n.jsxRuntimeExports.jsx(k,{className:"h-36"}):n.jsxRuntimeExports.jsxs("picture",{children:[r&&n.jsxRuntimeExports.jsx("source",{srcSet:r,media:"(max-width: 480px)"}),n.jsxRuntimeExports.jsx("img",{...s,...l,src:o,alt:i,loading:p?"lazy":"eager",width:c,height:a})]})},se={type:"Image",label:"Image",category:"core",icon:y.ImageIcon,group:"media",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),image:{type:"string",title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas",ui:{"ui:widget":"image"}},alt:{type:"string",title:"Alt text",default:"",ui:{"ui:placeholder":"Enter alt text"}},lazyLoading:{type:"boolean",title:"Lazy Load",default:!0},width:{type:"number",title:"Width",default:"",ui:{"ui:placeholder":"Enter width"}},height:{type:"number",title:"Height",default:"",ui:{"ui:placeholder":"Enter height"}},mobileImage:{type:"string",title:"Mobile Image",default:"",ui:{"ui:widget":"image"}}}}),aiProps:["alt"],i18nProps:["alt"]},j=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,S=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,P=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,re=e=>{if(j.test(e)){const s=e.match(j);return s?`https://www.youtube.com/embed/${s[4]}`:e}if(S.test(e)){const s=e.match(S);return s?`https://player.vimeo.com/video/${s[3]}`:e}if(P.test(e)){const s=e.match(P);return s?`https://www.dailymotion.com/embed/video/${s[4]}`:e}return null},le=g.memo(e=>{const{blockProps:s,inBuilder:o,styles:r,url:l,controls:i}=e,a=m.get(i,"autoPlay",!1),c=m.get(i,"controls",!1),p=a||m.get(i,"muted",!0),d=m.get(i,"loop",!1);if(m.isEmpty(l))return n.jsxRuntimeExports.jsx(k,{inBuilder:o,className:"h-36"});let h=re(l),f=null;if(h){if(!m.isEmpty(h)){const u=[];u.push(`autoplay=${a?1:0}`),u.push(`controls=${i?1:0}`),u.push(`mute=${p?1:0}&muted=${p?1:0}`),u.push(`loop=${d?1:0}`),h=`${h}?${u.join("&")}`}f=g.createElement("iframe",{...s,className:"absolute inset-0 w-full h-full",src:h,allow:o?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else f=g.createElement("video",{...s,className:"absolute inset-0 w-full h-full",src:l,controls:c,muted:p,autoPlay:o?!1:a,loop:d});return n.jsxRuntimeExports.jsx("div",{...m.pick(r,["className"]),children:n.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[o?n.jsxRuntimeExports.jsx("div",{...s,...m.omit(r,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,f]})})}),ne={type:"Video",label:"Video",category:"core",icon:y.VideoIcon,group:"media",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),url:{type:"string",title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"},controls:{type:"object",title:"Controls",default:{autoplay:!1,controls:!0,loop:!1,muted:!1},properties:{autoplay:{type:"boolean",title:"Autoplay",default:!1},controls:{type:"boolean",title:"Show Controls",default:!0},loop:{type:"boolean",title:"Loop Video",default:!1},muted:{type:"boolean",title:"Muted",default:!1}}}}}),i18nProps:["url"]},ie=e=>{const{blockProps:s,styles:o}=e;return g.createElement("hr",{...o,...s})},ae={type:"Divider",label:"web_blocks.divider",category:"core",icon:y.DividerHorizontalIcon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("bg-gray-900 h-0.5 py-2 my-1")}})};function ce(e){return x.GenIcon({tag:"svg",attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z"},child:[]}]})(e)}const pe=e=>{const{scripts:s,inBuilder:o,blockProps:r}=e;return o?n.jsxRuntimeExports.jsx("div",{...r,children:n.jsxRuntimeExports.jsx("div",{className:x.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:n.jsxRuntimeExports.jsx("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):n.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s}})},ue={type:"CustomScript",label:"web_blocks.custom_script",category:"core",icon:ce,group:"advanced",...t.registerChaiBlockSchema({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');<\/script>"}}})},de=e=>n.jsxRuntimeExports.jsxs("div",{...e.blockProps,...e.styles,children:[e.mode,e.children]}),ge=e=>e.mode==="dark"?null:n.jsxRuntimeExports.jsx("button",{...e.blockProps,...e.styles,children:e.children});t.registerChaiBlock(ge,{type:"DarkModeButton",label:"Dark Mode Button",category:"core",icon:y.MoonIcon,group:"advanced",hidden:!0,...t.registerChaiBlockSchema({properties:{mode:t.closestBlockProp("DarkModeSwitcher","mode"),styles:t.stylesProp("")}})});const me=e=>e.mode==="light"?null:n.jsxRuntimeExports.jsx("button",{...e.blockProps,...e.styles,children:e.children});t.registerChaiBlock(me,{type:"LightModeButton",label:"Light Mode Button",category:"core",icon:y.SunIcon,group:"advanced",hidden:!0,...t.registerChaiBlockSchema({properties:{mode:t.closestBlockProp("DarkModeSwitcher","mode"),styles:t.stylesProp("")}})});const ye={type:"DarkModeSwitcher",label:"web_blocks.dark_mode",category:"core",icon:y.MoonIcon,group:"advanced",wrapper:!0,...t.registerChaiBlockSchema({properties:{mode:{title:"Mode",type:"string",enum:["dark","light"],default:"light"},styles:t.stylesProp("")}}),blocks:()=>[{_id:"ultqCh",_type:"DarkModeSwitcher",mode:"light",styles:"#styles:,",_name:"Dark Mode Theme"},{_id:"vroabi",_parent:"ultqCh",_type:"LightModeButton",styles_attrs:{type:"button","x-on:click":"darkMode = 'dark'","x-show":"darkMode === 'light'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Dark Mode Btn"},{_id:"nltBrv",_parent:"vroabi",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"},{_id:"gesydi",_parent:"ultqCh",_type:"DarkModeButton",styles_attrs:{type:"button","x-on:click":"darkMode = 'light'","x-show":"darkMode === 'dark'"},styles:"#styles:,bg-white hidden dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Light Mode Btn"},{_id:"AdDwBC",_parent:"gesydi",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"}]},he=e=>{const{blockProps:s,inBuilder:o,children:r,globalBlock:l}=e;return o&&!l?n.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-4 bg-gray-100 rounded-lg gap-y-1 dark:bg-gray-800",...s,children:[n.jsxRuntimeExports.jsxs("h1",{children:["Global Block - ",l]}),n.jsxRuntimeExports.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):g.createElement("span",{...s},r)},fe={type:"GlobalBlock",label:"Global Block",icon:w.GlobeIcon,category:"core",group:"advanced",...t.registerChaiBlockSchema({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})},xe=e=>e.inBuilder||e.forceWrapper?n.jsxRuntimeExports.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`,be={type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:y.SpaceBetweenVerticallyIcon,...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("text-black"),content:{type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]},ke=e=>{const{blockProps:s,backgroundImage:o,children:r,styles:l,tag:i}=e;let a={};return o&&(a={backgroundImage:`url(${o})`}),g.createElement(i||"div",{...s,...l,style:a},r)},we={type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("font-body antialiased"),backgroundImage:{type:"string",title:"Image",default:"",ui:{"ui:widget":"image"}},tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]}}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Be=e=>{const{blockProps:s,styles:o}=e;return g.createElement("br",{...s,...o})},Ce={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},je=e=>{const{children:s,blockProps:o,errorMessage:r,successMessage:l,action:i,styles:a,inBuilder:c}=e;let p=s;s||(p=n.jsxRuntimeExports.jsx(k,{inBuilder:c}));const d={"x-data":"{}","x-on:submit.prevent":"post"},h={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return n.jsxRuntimeExports.jsxs("form",{...d,"data-error":r,"data-success":l,method:"post",action:i,...o,...a,children:[n.jsxRuntimeExports.jsx("div",{...h}),p]})},Se={type:"Form",label:"Form",category:"core",icon:w.GroupIcon,group:"form",blocks:()=>[{_type:"Form",_id:"form",styles:"#styles:p-1 space-y-2,"},{_type:"Input",_id:"form_input",_parent:"form",styles:"#styles:,"},{_type:"FormButton",_id:"form_submit_btn",_parent:"form",styles:"#styles:bg-black text-white rounded px-3 py-1,"}],...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),action:{type:"string",title:"Submit URL",default:"/api/form/submit"},errorMessage:{type:"string",title:"Error Message",default:"Something went wrong. Please try again",ui:{"ui:widget":"richtext"}},successMessage:{type:"string",title:"Success Message",default:"Thank you for your submission.",ui:{"ui:widget":"richtext"}}}}),i18nProps:["errorMessage","successMessage"],aiProps:["errorMessage","successMessage"],canAcceptBlock:()=>!0},Pe=e=>{const{blockProps:s,inBuilder:o,label:r,styles:l,inputStyles:i,icon:a,iconSize:c,iconPos:p}=e,d=x.generateUUID(),h={"x-bind:disabled":"formLoading"};return n.jsxRuntimeExports.jsxs("button",{id:d,...h,...i,...l,...s||{},type:o?"button":"submit",children:[r,a&&n.jsxRuntimeExports.jsx("div",{style:{width:c+"px"},className:p+" "+(p==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:a}})]})},ve={type:"FormButton",label:"Submit Button",category:"core",icon:y.ButtonIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"),inputStyles:t.StylesProp(""),label:{type:"string",title:"Label",default:"Submit",ai:!0,i18n:!0},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon Position",default:"order-last",enum:["order-first","order-last"]}}}),i18nProps:["label"],aiProps:["label"]},Ee=e=>{const{blockProps:s,fieldName:o,label:r,placeholder:l,styles:i,inputStyles:a,showLabel:c,required:p,inputType:d}=e,h=x.generateUUID();return c?n.jsxRuntimeExports.jsxs("div",{...i,...s,children:[c&&n.jsxRuntimeExports.jsx("label",{htmlFor:h,children:r}),n.jsxRuntimeExports.jsx("input",{name:o,...a,id:h,type:d,placeholder:l,required:p})]}):n.jsxRuntimeExports.jsx("input",{id:h,name:o,...s,...a,...i,type:d,placeholder:l,required:p})},Ie={type:"Input",label:"web_blocks.input",category:"core",icon:y.InputIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),inputStyles:t.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ai:!0,i18n:!0},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},inputType:{type:"string",title:"Input Type",default:"text",enum:["text","email","password","number","tel","file","hidden","range","submit","color","date","time"]}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},_e=e=>{const{blockProps:s,fieldName:o,label:r,styles:l,inputStyles:i,required:a,checked:c,showLabel:p=!0}=e,d=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...l,...s,children:[n.jsxRuntimeExports.jsx("input",{...i,name:o,id:d,type:"radio",required:a,defaultChecked:c}),r&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:r})]}):n.jsxRuntimeExports.jsx("input",{id:d,...s,...i,...l,type:"radio",required:a,checked:c,name:o})},Le={type:"Radio",label:"web_blocks.radio",category:"core",icon:y.RadiobuttonIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("flex items-center gap-x-2"),inputStyles:t.StylesProp(""),label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},Re=e=>{const{blockProps:s,fieldName:o,label:r,placeholder:l,styles:i,inputStyles:a,required:c,showLabel:p,_multiple:d,options:h}=e,f=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...i,...s,children:[p&&n.jsxRuntimeExports.jsx("label",{htmlFor:f,children:r}),n.jsxRuntimeExports.jsxs("select",{...a,id:f,required:c,multiple:d,name:o,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:l}),m.map(h,u=>n.jsxRuntimeExports.jsx("option",{value:u==null?void 0:u.value,children:u==null?void 0:u.label},u==null?void 0:u.value))]})]}):n.jsxRuntimeExports.jsxs("select",{id:f,...i,...s,required:c,multiple:d,name:o,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:l}),m.map(h,u=>n.jsxRuntimeExports.jsx("option",{value:u==null?void 0:u.value,children:u==null?void 0:u.label},u==null?void 0:u.value))]})},Me={type:"Select",label:"web_blocks.select",category:"core",icon:y.DropdownMenuIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),inputStyles:t.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label"},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},_multiple:{type:"boolean",title:"Multiple",default:!1},options:{title:"Options",type:"array",default:[],items:{type:"object",properties:{label:{type:"string",title:"Label",default:""},value:{type:"string",title:"Value",default:""}}}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},De=e=>{const{blockProps:s,fieldName:o,label:r,placeholder:l,styles:i,inputStyles:a,_rows:c,showLabel:p}=e,d=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...i,...s,children:[p&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:r}),n.jsxRuntimeExports.jsx("textarea",{name:o,...a,id:d,placeholder:l,rows:c})]}):n.jsxRuntimeExports.jsx("textarea",{id:d,name:o,...s,...a,...i,placeholder:l,rows:c})},Ne={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:y.InputIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),inputStyles:t.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},_rows:{type:"number",title:"Rows",default:3}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},Te=e=>{const{blockProps:s,fieldName:o,label:r,styles:l,inputStyles:i,required:a,checked:c,showLabel:p=!0}=e,d=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...l,...s,children:[n.jsxRuntimeExports.jsx("input",{...i,name:o,id:d,type:"checkbox",required:a,defaultChecked:c}),r&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:r})]}):n.jsxRuntimeExports.jsx("input",{id:d,...s,...i,...l,type:"checkbox",required:a,name:o})},$e={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:y.CheckboxIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("flex items-center gap-x-2"),inputStyles:t.StylesProp(""),label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},Ae=e=>{const{blockProps:s,content:o,styles:r,children:l}=e,i={...r,...s};return l?g.createElement("label",i,l):g.createElement("label",{...i,dangerouslySetInnerHTML:{__html:o}})},ze={type:"Label",label:"Label",category:"core",icon:y.LetterCaseToggleIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(),content:{type:"string",title:"Content",default:""}}})},C={wrapper:{"x-data":"{ open: false }"},button:{"x-on:click":"open = !open"},menu:{"x-show":"open","x-on:click.away":"open = false","x-cloak":"","x-transition":""}},He=e=>{const{blockProps:s,content:o,icon:r,iconWidth:l,iconHeight:i,styles:a,show:c}=e;return n.jsxRuntimeExports.jsxs("button",{...s,...a,...C.button,children:[o,n.jsxRuntimeExports.jsx("span",{className:c?"rotate-180":"",dangerouslySetInnerHTML:{__html:r},style:{width:l,height:i}})]})};t.registerChaiBlock(He,{type:"DropdownButton",label:"Dropdown Button",group:"advanced",category:"core",hidden:!0,canMove:()=>!1,canDelete:()=>!1,...t.registerChaiBlockSchema({properties:{show:t.closestBlockProp("Dropdown","showDropdown"),content:{type:"string",title:"Title",default:"Menu Item"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconWidth:{type:"string",title:"Icon Width",default:"16px"},iconHeight:{type:"string",title:"Icon Height",default:"16px"},styles:t.StylesProp("flex items-center gap-2 px-4 py-1")}})});const qe=e=>{const{blockProps:s,children:o,styles:r,show:l,inBuilder:i}=e;return i&&!l?null:n.jsxRuntimeExports.jsx("div",{...s,...C.menu,...r,children:o})};t.registerChaiBlock(qe,{type:"DropdownContent",label:"Dropdown Content",hidden:!0,canMove:()=>!1,canDelete:()=>!1,canAcceptBlock:()=>!0,...t.registerChaiBlockSchema({properties:{show:t.closestBlockProp("Dropdown","showDropdown"),styles:t.StylesProp("absolute left-0 p-2 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")}})});const Ue=e=>{const{blockProps:s,children:o,styles:r}=e;return n.jsxRuntimeExports.jsx("div",{...s,...r,...C.wrapper,children:o})},Oe={type:"Dropdown",label:"Dropdown",group:"basic",icon:y.DropdownMenuIcon,blocks:()=>[{_type:"Dropdown",_id:"dropdown"},{_type:"DropdownButton",_id:"button",_parent:"dropdown",title:"Menu Item",icon:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24"> <path d="M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z"/> </svg>',styles:"#styles:,flex items-center gap-2 px-4 py-1"},{_type:"DropdownContent",_id:"content",_parent:"dropdown",styles:"#styles:,absolute left-0 w-80 mt-0.5 bg-white rounded-lg shadow-lg z-50"},{_type:"Link",_id:"link",_parent:"content",content:"Link",styles:"#styles:,flex items-center gap-2 px-4 py-1",link:{href:"https://www.google.com",type:"url",target:"_self"}}],category:"core",wrapper:!0,...t.registerChaiBlockSchema({properties:{showDropdown:t.runtimeProp({type:"boolean",title:"Show Dropdown",default:!1}),styles:t.StylesProp("relative w-max")}})},B={SMALL:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},MEDIUM:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},LARGE:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},Fe=e=>{const{blockProps:s,children:o,styles:r,colSpan:l,tabletColSpan:i,desktopColSpan:a}=e,p={className:[m.get(r,"className",""),m.get(B,["SMALL",isNaN(l)||!l?6:l],""),i?m.get(B,["MEDIUM",i||l],""):"",a?m.get(B,["LARGE",i||l],""):""].join(" ")};return n.jsxRuntimeExports.jsx("div",{...s,...r,...p,children:o||n.jsxRuntimeExports.jsx("div",{className:"min-h-12 h-full w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},Ge={type:"Column",label:"Column",group:"basic",category:"core",icon:w.Columns,wrapper:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),colSpan:{type:"number",title:"Column Span",default:6,enum:[1,2,3,4,5,6,7,8,9,10,11,12]},tabletColSpan:{type:"number",title:"Column Span (Tablet)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]},desktopColSpan:{type:"number",title:"Column Span (Desktop)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]}}})},Ve=e=>{const{blockProps:s,children:o,styles:r,gutter:l}=e,a={className:[m.get(r,"className","")," grid grid-cols-12"].join()};return typeof(r==null?void 0:r.style)=="object"?r.style.gap=`${l}px`:a.style={gap:`${l}px`},n.jsxRuntimeExports.jsx("div",{...s,...r,...a,children:o})},We={type:"Row",label:"Row",group:"basic",icon:w.Rows,blocks:()=>[{_type:"Row",_id:"row",styles:"#styles:,p-1"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"}],category:"core",wrapper:!0,canAcceptBlock:e=>e==="Column",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})},Xe=()=>{t.registerChaiBlock(_,L),t.registerChaiBlock(T,$),t.registerChaiBlock(R,M),t.registerChaiBlock(A,z),t.registerChaiBlock(H,q),t.registerChaiBlock(U,O),t.registerChaiBlock(F,G),t.registerChaiBlock(V,W),t.registerChaiBlock(X,Y),t.registerChaiBlock(Z,J),t.registerChaiBlock(K,Q),t.registerChaiBlock(ee,te),t.registerChaiBlock(oe,se),t.registerChaiBlock(le,ne),t.registerChaiBlock(D,N),t.registerChaiBlock(pe,ue),t.registerChaiBlock(xe,be),t.registerChaiBlock(je,Se),t.registerChaiBlock(Pe,ve),t.registerChaiBlock(Ee,Ie),t.registerChaiBlock(Te,$e),t.registerChaiBlock(_e,Le),t.registerChaiBlock(Re,Me),t.registerChaiBlock(De,Ne),t.registerChaiBlock(Ae,ze),t.registerChaiBlock(Be,Ce),t.registerChaiBlock(ke,we),t.registerChaiBlock(ie,ae),t.registerChaiBlock(de,ye),t.registerChaiBlock(he,fe),t.registerChaiBlock(Ue,Oe),t.registerChaiBlock(Ve,We),t.registerChaiBlock(Fe,Ge)};exports.loadWebBlocks=Xe;
3
+ nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},U=e=>{const{blockProps:s,content:o,styles:r}=e;return n.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:n.jsxRuntimeExports.jsx("div",{...s,...r,dangerouslySetInnerHTML:{__html:o}})})},O={type:"RichText",label:"Rich Text",category:"core",icon:m.CursorTextIcon,group:"typography",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>",ui:{"ui:widget":"richtext"}}}}),aiProps:["content"],i18nProps:["content"]},F=e=>{const{blockProps:s,styles:o,content:r,children:l=null,tag:i}=e;return l?h.createElement("span",{...o,...s},l):h.createElement(i||"span",{...o,...s,dangerouslySetInnerHTML:{__html:r||""}})},G={type:"Span",label:"Span",category:"core",group:"typography",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0};function V(e){return x.GenIcon({tag:"svg",attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z"},child:[]}]})(e)}const W=e=>{const{scripts:s,inBuilder:o,blockProps:r}=e;return o?n.jsxRuntimeExports.jsx("div",{...r,children:n.jsxRuntimeExports.jsx("div",{className:x.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:n.jsxRuntimeExports.jsx("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):n.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s}})},X={type:"CustomScript",label:"web_blocks.custom_script",category:"core",icon:V,group:"advanced",...t.registerChaiBlockSchema({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');<\/script>"}}})},Y=e=>n.jsxRuntimeExports.jsxs("div",{...e.blockProps,...e.styles,children:[e.mode,e.children]}),Z=e=>e.mode==="dark"?null:n.jsxRuntimeExports.jsx("button",{...e.blockProps,...e.styles,children:e.children});t.registerChaiBlock(Z,{type:"DarkModeButton",label:"Dark Mode Button",category:"core",icon:m.MoonIcon,group:"advanced",hidden:!0,...t.registerChaiBlockSchema({properties:{mode:t.closestBlockProp("DarkModeSwitcher","mode"),styles:t.stylesProp("")}})});const J=e=>e.mode==="light"?null:n.jsxRuntimeExports.jsx("button",{...e.blockProps,...e.styles,children:e.children});t.registerChaiBlock(J,{type:"LightModeButton",label:"Light Mode Button",category:"core",icon:m.SunIcon,group:"advanced",hidden:!0,...t.registerChaiBlockSchema({properties:{mode:t.closestBlockProp("DarkModeSwitcher","mode"),styles:t.stylesProp(""),fake:{type:"string",default:""}}})});const K={type:"DarkModeSwitcher",label:"web_blocks.dark_mode",category:"core",icon:m.MoonIcon,group:"advanced",wrapper:!0,...t.registerChaiBlockSchema({properties:{mode:{title:"Mode",type:"string",enum:["dark","light"],default:"light"},styles:t.stylesProp("")}}),blocks:()=>[{_id:"ultqCh",_type:"DarkModeSwitcher",mode:"light",styles:"#styles:,",_name:"Dark Mode Theme"},{_id:"vroabi",_parent:"ultqCh",_type:"LightModeButton",styles_attrs:{type:"button","x-on:click":"darkMode = 'dark'","x-show":"darkMode === 'light'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Dark Mode Btn"},{_id:"nltBrv",_parent:"vroabi",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"},{_id:"gesydi",_parent:"ultqCh",_type:"DarkModeButton",styles_attrs:{type:"button","x-on:click":"darkMode = 'light'","x-show":"darkMode === 'dark'"},styles:"#styles:,bg-white hidden dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Light Mode Btn"},{_id:"AdDwBC",_parent:"gesydi",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"}]},Q=e=>{const{blockProps:s,styles:o}=e;return k.createElement("hr",{...o,...s})},ee={type:"Divider",label:"web_blocks.divider",category:"core",icon:m.DividerHorizontalIcon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("bg-gray-900 h-0.5 py-2 my-1")}})},te=e=>{const{blockProps:s,inBuilder:o,children:r,globalBlock:l}=e;return o&&!l?n.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-4 bg-gray-100 rounded-lg gap-y-1 dark:bg-gray-800",...s,children:[n.jsxRuntimeExports.jsxs("h1",{children:["Global Block - ",l]}),n.jsxRuntimeExports.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):h.createElement("span",{...s},r)},oe={type:"GlobalBlock",label:"Global Block",icon:B.GlobeIcon,category:"core",group:"advanced",...t.registerChaiBlockSchema({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})},E=(e,...s)=>({...e,className:x.cn(e.className,...s)}),se=e=>{const{blockProps:s,icon:o,styles:r,width:l,inBuilder:i,height:a}=e,c=E(r,"");if(g.isEmpty(o))return n.jsxRuntimeExports.jsx(w,{inBuilder:i,className:"h-8 w-14"});const p=o.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return h.createElement("span",{...s,...c,style:{width:l?`${l}px`:"auto",height:a?`${a}px`:"auto"},dangerouslySetInnerHTML:{__html:p}})},re={type:"Icon",label:"web_blocks.icon",category:"core",icon:m.SketchLogoIcon,group:"media",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),icon:{type:"string",title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})},le=e=>{const{blockProps:s,image:o,mobileImage:r,styles:l,alt:i,height:a,width:c,lazyLoading:p}=e;return g.isEmpty(o)?n.jsxRuntimeExports.jsx(w,{className:"h-36"}):n.jsxRuntimeExports.jsxs("picture",{children:[r&&n.jsxRuntimeExports.jsx("source",{srcSet:r,media:"(max-width: 480px)"}),n.jsxRuntimeExports.jsx("img",{...s,...l,src:o,alt:i,loading:p?"lazy":"eager",width:c,height:a})]})},ne={type:"Image",label:"Image",category:"core",icon:m.ImageIcon,group:"media",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),image:{type:"string",title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas",ui:{"ui:widget":"image"}},alt:{type:"string",title:"Alt text",default:"",ui:{"ui:placeholder":"Enter alt text"}},lazyLoading:{type:"boolean",title:"Lazy Load",default:!0},width:{type:"number",title:"Width",default:"",ui:{"ui:placeholder":"Enter width"}},height:{type:"number",title:"Height",default:"",ui:{"ui:placeholder":"Enter height"}},mobileImage:{type:"string",title:"Mobile Image",default:"",ui:{"ui:widget":"image"}}}}),aiProps:["alt"],i18nProps:["alt"]},ie=e=>{const{blockProps:s,children:o,styles:r,inBuilder:l,content:i,href:a}=e,{hrefType:c,autoplay:p,maxWidth:d,backdropColor:y,galleryName:f}=e,u=E(r,"cb-lightbox");if(!o&&g.isEmpty(r==null?void 0:r.className)&&g.isEmpty(i))return n.jsxRuntimeExports.jsx(w,{inBuilder:l});if(l)return o?n.jsxRuntimeExports.jsx("span",{...s,...u,children:o}):h.createElement("span",{...s,...u,dangerouslySetInnerHTML:{__html:i}});const b={};return c!=="image"&&(b["data-vbtype"]=c),p&&(b["data-autoplay"]="true"),d&&(b["data-maxwidth"]=d+"px"),y&&(b["data-overlay"]=y),f&&(b["data-gall"]=f),o?n.jsxRuntimeExports.jsx("a",{...b,href:a||"#/",...s,...u,children:o}):h.createElement("a",{...s,...u,...b,href:a||"#",dangerouslySetInnerHTML:{__html:i}})},ae={type:"LightBoxLink",label:"Lightbox Link",category:"core",icon:m.ImageIcon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",title:"Content",default:"Link text or drop blocks inside"},hrefType:{type:"string",title:"Type",default:"image",enum:["image","video","iframe","inline","ajax"],enumNames:["Image","Video","Iframe","Inline","Ajax"]},href:{type:"string",title:"Href",default:""},autoplay:{type:"boolean",title:"Autoplay (Video only)",default:!1},maxWidth:{type:"number",title:"Max Width",default:""},backdropColor:{type:"string",title:"Backdrop Color",default:""},galleryName:{type:"string",title:"Gallery Name",default:""}},dependencies:{autoplay:["hrefType","video"]}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="Link"&&e!=="LightBoxLink"},ce=e=>{const{blockProps:s,link:o,children:r,styles:l,inBuilder:i,content:a}=e;let c={};return!r&&g.isEmpty(a)&&(c={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),i?r?n.jsxRuntimeExports.jsx("span",{...s,style:c,...l,children:r}):k.createElement("span",{...s,...l,style:c},a):r?n.jsxRuntimeExports.jsx("a",{href:(o==null?void 0:o.href)||"#/",target:o==null?void 0:o.target,...s,...l,children:r}):k.createElement("a",{...s,...l,href:(o==null?void 0:o.href)||"#",target:(o==null?void 0:o.target)||"_self"},a)},pe={type:"Link",label:"Link",category:"core",icon:m.Link1Icon,group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",default:"Link goes here",title:"Content"},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:e=>e!=="Link"},ue=e=>{const{blockProps:s,children:o,listType:r,styles:l,tag:i,inBuilder:a}=e,c=x.cn(g.get(l,"className",""),r);return!o&&g.isEmpty(l==null?void 0:l.className)?n.jsxRuntimeExports.jsx(w,{inBuilder:a}):h.createElement(i||(r==="list-decimal"?"ol":"ul"),{...s,...l,className:c},o)},de={type:"List",label:"web_blocks.list",icon:m.RowsIcon,category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),listType:{type:"string",title:"List Type",default:"list-none",oneOf:[{enum:["list-none"],title:"List None"},{enum:["list-disc"],title:"Disc"},{enum:["list-decimal"],title:"Decimal"}]}}}),canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]},ge=e=>{const{blockProps:s,content:o,styles:r,children:l,tag:i}=e;return l?h.createElement(i||"li",{...r,...s},l):h.createElement(i||"li",{...r,...s,dangerouslySetInnerHTML:{__html:o}})},me={type:"ListItem",label:"List Item",icon:m.ColumnsIcon,category:"core",group:"basic",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),content:{type:"string",default:"List item",title:"Content",ui:{"ui:widget":"textarea"}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="ListItem",canBeNested:e=>e==="List"},ye=e=>e.inBuilder||e.forceWrapper?n.jsxRuntimeExports.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`,he={type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:m.SpaceBetweenVerticallyIcon,...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("text-black"),content:{type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]},S=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,P=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,v=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,fe=e=>{if(S.test(e)){const s=e.match(S);return s?`https://www.youtube.com/embed/${s[4]}`:e}if(P.test(e)){const s=e.match(P);return s?`https://player.vimeo.com/video/${s[3]}`:e}if(v.test(e)){const s=e.match(v);return s?`https://www.dailymotion.com/embed/video/${s[4]}`:e}return null},xe=h.memo(e=>{const{blockProps:s,inBuilder:o,styles:r,url:l,controls:i}=e,a=g.get(i,"autoPlay",!1),c=g.get(i,"controls",!1),p=a||g.get(i,"muted",!0),d=g.get(i,"loop",!1);if(g.isEmpty(l))return n.jsxRuntimeExports.jsx(w,{inBuilder:o,className:"h-36"});let y=fe(l),f=null;if(y){if(!g.isEmpty(y)){const u=[];u.push(`autoplay=${a?1:0}`),u.push(`controls=${i?1:0}`),u.push(`mute=${p?1:0}&muted=${p?1:0}`),u.push(`loop=${d?1:0}`),y=`${y}?${u.join("&")}`}f=h.createElement("iframe",{...s,className:"absolute inset-0 w-full h-full",src:y,allow:o?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else f=h.createElement("video",{...s,className:"absolute inset-0 w-full h-full",src:l,controls:c,muted:p,autoPlay:o?!1:a,loop:d});return n.jsxRuntimeExports.jsx("div",{...g.pick(r,["className"]),children:n.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[o?n.jsxRuntimeExports.jsx("div",{...s,...g.omit(r,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,f]})})}),be={type:"Video",label:"Video",category:"core",icon:m.VideoIcon,group:"media",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),url:{type:"string",title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"},controls:{type:"object",title:"Controls",default:{autoplay:!1,controls:!0,loop:!1,muted:!1},properties:{autoplay:{type:"boolean",title:"Autoplay",default:!1},controls:{type:"boolean",title:"Show Controls",default:!0},loop:{type:"boolean",title:"Loop Video",default:!1},muted:{type:"boolean",title:"Muted",default:!1}}}}}),i18nProps:["url"]},j={wrapper:{"x-data":"{ open: false }"},button:{"x-on:click":"open = !open"},menu:{"x-show":"open","x-on:click.away":"open = false","x-cloak":"","x-transition":""}},ke=e=>{const{blockProps:s,content:o,icon:r,iconWidth:l,iconHeight:i,styles:a,show:c}=e;return n.jsxRuntimeExports.jsxs("button",{...s,...a,...j.button,children:[o,n.jsxRuntimeExports.jsx("span",{className:c?"rotate-180":"",dangerouslySetInnerHTML:{__html:r},style:{width:l,height:i}})]})};t.registerChaiBlock(ke,{type:"DropdownButton",label:"Dropdown Button",group:"advanced",category:"core",hidden:!0,canMove:()=>!1,canDelete:()=>!1,...t.registerChaiBlockSchema({properties:{show:t.closestBlockProp("Dropdown","showDropdown"),content:{type:"string",title:"Title",default:"Menu Item"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconWidth:{type:"string",title:"Icon Width",default:"16px"},iconHeight:{type:"string",title:"Icon Height",default:"16px"},styles:t.StylesProp("flex items-center gap-2 px-4 py-1")}})});const we=e=>{const{blockProps:s,children:o,styles:r,show:l,inBuilder:i}=e;return i&&!l?null:n.jsxRuntimeExports.jsx("div",{...s,...j.menu,...r,children:o})};t.registerChaiBlock(we,{type:"DropdownContent",label:"Dropdown Content",group:"basic",hidden:!0,canMove:()=>!1,canDelete:()=>!1,canAcceptBlock:()=>!0,...t.registerChaiBlockSchema({properties:{show:t.closestBlockProp("Dropdown","showDropdown"),styles:t.StylesProp("absolute left-0 p-2 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")}})});const Be=e=>{const{blockProps:s,children:o,styles:r}=e;return n.jsxRuntimeExports.jsx("div",{...s,...r,...j.wrapper,children:o})},Ce={type:"Dropdown",label:"Dropdown",group:"basic",icon:m.DropdownMenuIcon,blocks:()=>[{_type:"Dropdown",_id:"dropdown"},{_type:"DropdownButton",_id:"button",_parent:"dropdown",title:"Menu Item",icon:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24"> <path d="M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z"/> </svg>',styles:"#styles:,flex items-center gap-2 px-4 py-1"},{_type:"DropdownContent",_id:"content",_parent:"dropdown",styles:"#styles:,absolute left-0 w-80 mt-0.5 bg-white rounded-lg shadow-lg z-50"},{_type:"Link",_id:"link",_parent:"content",content:"Link",styles:"#styles:,flex items-center gap-2 px-4 py-1",link:{href:"https://www.google.com",type:"url",target:"_self"}}],category:"core",wrapper:!0,...t.registerChaiBlockSchema({properties:{showDropdown:t.runtimeProp({type:"boolean",title:"Show Dropdown",default:!1}),styles:t.StylesProp("relative w-max")}})},je=e=>{const{blockProps:s,fieldName:o,label:r,styles:l,inputStyles:i,required:a,checked:c,showLabel:p=!0}=e,d=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...l,...s,children:[n.jsxRuntimeExports.jsx("input",{...i,name:o,id:d,type:"checkbox",required:a,defaultChecked:c}),r&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:r})]}):n.jsxRuntimeExports.jsx("input",{id:d,...s,...i,...l,type:"checkbox",required:a,name:o})},Se={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:m.CheckboxIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("flex items-center gap-x-2"),inputStyles:t.StylesProp(""),label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},Pe=e=>{const{children:s,blockProps:o,errorMessage:r,successMessage:l,action:i,styles:a,inBuilder:c}=e;let p=s;s||(p=n.jsxRuntimeExports.jsx(w,{inBuilder:c}));const d={"x-data":"{}","x-on:submit.prevent":"post"},y={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return n.jsxRuntimeExports.jsxs("form",{...d,"data-error":r,"data-success":l,method:"post",action:i,...o,...a,children:[n.jsxRuntimeExports.jsx("div",{...y}),p]})},ve={type:"Form",label:"Form",category:"core",icon:B.GroupIcon,group:"form",blocks:()=>[{_type:"Form",_id:"form",styles:"#styles:p-1 space-y-2,"},{_type:"Input",_id:"form_input",_parent:"form",styles:"#styles:,"},{_type:"FormButton",_id:"form_submit_btn",_parent:"form",styles:"#styles:bg-black text-white rounded px-3 py-1,"}],...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),action:{type:"string",title:"Submit URL",default:"/api/form/submit"},errorMessage:{type:"string",title:"Error Message",default:"Something went wrong. Please try again",ui:{"ui:widget":"richtext"}},successMessage:{type:"string",title:"Success Message",default:"Thank you for your submission.",ui:{"ui:widget":"richtext"}}}}),i18nProps:["errorMessage","successMessage"],aiProps:["errorMessage","successMessage"],canAcceptBlock:()=>!0},Ee=e=>{const{blockProps:s,inBuilder:o,label:r,styles:l,inputStyles:i,icon:a,iconSize:c,iconPos:p}=e,d=x.generateUUID(),y={"x-bind:disabled":"formLoading"};return n.jsxRuntimeExports.jsxs("button",{id:d,...y,...i,...l,...s||{},type:o?"button":"submit",children:[r,a&&n.jsxRuntimeExports.jsx("div",{style:{width:c+"px"},className:p+" "+(p==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:a}})]})},Ie={type:"FormButton",label:"Submit Button",category:"core",icon:m.ButtonIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"),inputStyles:t.StylesProp(""),label:{type:"string",title:"Label",default:"Submit",ai:!0,i18n:!0},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon Position",default:"order-last",enum:["order-first","order-last"]}}}),i18nProps:["label"],aiProps:["label"]},_e=e=>{const{blockProps:s,fieldName:o,label:r,placeholder:l,styles:i,inputStyles:a,showLabel:c,required:p,inputType:d}=e,y=x.generateUUID();return c?n.jsxRuntimeExports.jsxs("div",{...i,...s,children:[c&&n.jsxRuntimeExports.jsx("label",{htmlFor:y,children:r}),n.jsxRuntimeExports.jsx("input",{name:o,...a,id:y,type:d,placeholder:l,required:p})]}):n.jsxRuntimeExports.jsx("input",{id:y,name:o,...s,...a,...i,type:d,placeholder:l,required:p})},Le={type:"Input",label:"web_blocks.input",category:"core",icon:m.InputIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),inputStyles:t.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ai:!0,i18n:!0},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},inputType:{type:"string",title:"Input Type",default:"text",enum:["text","email","password","number","tel","file","hidden","range","submit","color","date","time"]}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},Re=e=>{const{blockProps:s,content:o,styles:r,children:l}=e,i={...r,...s};return l?h.createElement("label",i,l):h.createElement("label",{...i,dangerouslySetInnerHTML:{__html:o}})},Me={type:"Label",label:"Label",category:"core",icon:m.LetterCaseToggleIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(),content:{type:"string",title:"Content",default:""}}})},De=e=>{const{blockProps:s,fieldName:o,label:r,styles:l,inputStyles:i,required:a,checked:c,showLabel:p=!0}=e,d=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...l,...s,children:[n.jsxRuntimeExports.jsx("input",{...i,name:o,id:d,type:"radio",required:a,defaultChecked:c}),r&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:r})]}):n.jsxRuntimeExports.jsx("input",{id:d,...s,...i,...l,type:"radio",required:a,checked:c,name:o})},Ne={type:"Radio",label:"web_blocks.radio",category:"core",icon:m.RadiobuttonIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("flex items-center gap-x-2"),inputStyles:t.StylesProp(""),label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},Te=e=>{const{blockProps:s,fieldName:o,label:r,placeholder:l,styles:i,inputStyles:a,required:c,showLabel:p,_multiple:d,options:y}=e,f=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...i,...s,children:[p&&n.jsxRuntimeExports.jsx("label",{htmlFor:f,children:r}),n.jsxRuntimeExports.jsxs("select",{...a,id:f,required:c,multiple:d,name:o,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:l}),g.map(y,u=>n.jsxRuntimeExports.jsx("option",{value:u==null?void 0:u.value,children:u==null?void 0:u.label},u==null?void 0:u.value))]})]}):n.jsxRuntimeExports.jsxs("select",{id:f,...i,...s,required:c,multiple:d,name:o,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:l}),g.map(y,u=>n.jsxRuntimeExports.jsx("option",{value:u==null?void 0:u.value,children:u==null?void 0:u.label},u==null?void 0:u.value))]})},$e={type:"Select",label:"web_blocks.select",category:"core",icon:m.DropdownMenuIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),inputStyles:t.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label"},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},_multiple:{type:"boolean",title:"Multiple",default:!1},options:{title:"Options",type:"array",default:[],items:{type:"object",properties:{label:{type:"string",title:"Label",default:""},value:{type:"string",title:"Value",default:""}}}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},Ae=e=>{const{blockProps:s,fieldName:o,label:r,placeholder:l,styles:i,inputStyles:a,_rows:c,showLabel:p}=e,d=x.generateUUID();return p?n.jsxRuntimeExports.jsxs("div",{...i,...s,children:[p&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:r}),n.jsxRuntimeExports.jsx("textarea",{name:o,...a,id:d,placeholder:l,rows:c})]}):n.jsxRuntimeExports.jsx("textarea",{id:d,name:o,...s,...a,...i,placeholder:l,rows:c})},ze={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:m.InputIcon,group:"form",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),inputStyles:t.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},_rows:{type:"number",title:"Rows",default:3}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},He=e=>{const{blockProps:s,backgroundImage:o,children:r,styles:l,tag:i}=e;let a={};return o&&(a={backgroundImage:`url(${o})`}),k.createElement(i||"div",{...s,...l,style:a},r)},qe={type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("font-body antialiased"),backgroundImage:{type:"string",title:"Image",default:"",ui:{"ui:widget":"image"}},tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]}}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Ue=e=>{const{blockProps:s,styles:o}=e;return k.createElement("br",{...s,...o})},Oe={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,...t.registerChaiBlockSchema({properties:{styles:t.StylesProp("")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},C={SMALL:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},MEDIUM:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},LARGE:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},Fe=e=>{const{blockProps:s,children:o,styles:r,colSpan:l,tabletColSpan:i,desktopColSpan:a}=e,p={className:[g.get(r,"className",""),g.get(C,["SMALL",isNaN(l)||!l?6:l],""),i?g.get(C,["MEDIUM",i||l],""):"",a?g.get(C,["LARGE",i||l],""):""].join(" ")};return n.jsxRuntimeExports.jsx("div",{...s,...r,...p,children:o||n.jsxRuntimeExports.jsx("div",{className:"h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},Ge={type:"Column",label:"Column",group:"basic",category:"core",icon:B.Columns,wrapper:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),colSpan:{type:"number",title:"Column Span",default:6,enum:[1,2,3,4,5,6,7,8,9,10,11,12]},tabletColSpan:{type:"number",title:"Column Span (Tablet)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]},desktopColSpan:{type:"number",title:"Column Span (Desktop)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]}}})},Ve=e=>{const{blockProps:s,children:o,styles:r,gutter:l}=e,a={className:[g.get(r,"className","")," grid grid-cols-12"].join()};return typeof(r==null?void 0:r.style)=="object"?r.style.gap=`${l}px`:a.style={gap:`${l}px`},n.jsxRuntimeExports.jsx("div",{...s,...r,...a,children:o})},We={type:"Row",label:"Row",group:"basic",icon:B.Rows,blocks:()=>[{_type:"Row",_id:"row",styles:"#styles:,p-1"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"}],category:"core",wrapper:!0,canAcceptBlock:e=>e==="Column",...t.registerChaiBlockSchema({properties:{styles:t.StylesProp(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})},Xe=()=>{t.registerChaiBlock(_,L),t.registerChaiBlock(T,$),t.registerChaiBlock(R,M),t.registerChaiBlock(A,z),t.registerChaiBlock(H,q),t.registerChaiBlock(F,G),t.registerChaiBlock(U,O),t.registerChaiBlock(ce,pe),t.registerChaiBlock(ie,ae),t.registerChaiBlock(ue,de),t.registerChaiBlock(ge,me),t.registerChaiBlock(se,re),t.registerChaiBlock(le,ne),t.registerChaiBlock(xe,be),t.registerChaiBlock(D,N),t.registerChaiBlock(W,X),t.registerChaiBlock(ye,he),t.registerChaiBlock(Pe,ve),t.registerChaiBlock(Ee,Ie),t.registerChaiBlock(_e,Le),t.registerChaiBlock(je,Se),t.registerChaiBlock(De,Ne),t.registerChaiBlock(Te,$e),t.registerChaiBlock(Ae,ze),t.registerChaiBlock(Re,Me),t.registerChaiBlock(Ue,Oe),t.registerChaiBlock(He,qe),t.registerChaiBlock(Q,ee),t.registerChaiBlock(Y,K),t.registerChaiBlock(te,oe),t.registerChaiBlock(Be,Ce),t.registerChaiBlock(Ve,We),t.registerChaiBlock(Fe,Ge)};exports.loadWebBlocks=Xe;