import { h as e } from "./chunk.BlbRoQQ3.js";
import { f as t, k as n, u as r, v as i, w as a, y as o, z as s } from "./use-editor.C-_8sOOa.js";
import { A as c, E as l, K as u, M as d, N as f, O as p, R as m, S as h, T as g, e as _, g as v, h as y, p as ee, v as b, z as te } from "./use-page-data.Cb2SuuwJ.js";
import { k as ne, m as re } from "./chunk-LSPN22SI.D75E3zS-.js";
import { b as x, c as S } from "./twind.BiM9xcCd.js";
import { m as ie } from "./system.DbMQd1I1.js";
import { b as ae } from "./jsx-runtime.DF4K5VCp.js";
import "./theme.HtT_2QlC.js";
import "./base-menu.props.BWy5Ub-q.js";
import { A as C, B as w, C as T, D as E, c as oe, e as se, f as ce, g as le, h as D, k as ue, l as de, m as O, n as fe, o as pe, s as k, t as A, u as me, v as j, x as M, z as N } from "./field-factory.Y38Qqp5L.js";
import { b as P } from "./text.CvSXsyI-.js";
import "./height.props.DCx-mV3G.js";
import "./base-button.ClgpqKOM.js";
import { f as he } from "./colors.B0ZQIUWB.js";
import { i as F, j as I } from "./use-editable-text.LuBbyeSP.js";
import "./dropdown-menu.DOURzgMR.js";
import { b as ge } from "./tooltip.D4rQGwev.js";
import { d as L } from "./dist.ccQGo6gv.js";
import { b as _e } from "./chroma-js.Dcir27CH.js";
import { e as ve, f as ye } from "./color-system.Dp99zR0T.js";
import "./react.BZZIbN3T.js";
import "./iconBase.C7m0emOO.js";
import { b as be, c as xe } from "./lu.1OtQ5qAt.js";
import { b as Se } from "./schema-resolver.p7B_pu36.js";
import "./io.Bu1sIxQU.js";
import "./md.Dru5DXQh.js";
import { b as Ce, d as R, j as we } from "./rx.CwXTGsxR.js";
import "./tb.BLWNpC3s.js";
import "./react-is.DZ6rX8e9.js";
import "./UploaderContext.BQZH1D99.js";
import "./iconify.BzZOJCu5.js";
import { b as Te, c as Ee } from "./fi.C2Y09MnC.js";
import "./vsc.B-e9du85.js";
import "./hi2.LBKfascG.js";
import "./menubar-styles.CdETFVyL.js";
import "./use-datarecord.Hg48JvBA.js";
import { b as De, c as Oe } from "./attributes.OPcn2TpI.js";
import { b as z } from "./use-brick-manifest.Iv9SG-7-.js";
import { b as ke, c as B } from "./theme.BZxygK2s.js";
import { b as Ae } from "./sortable.CwZ2HUCK.js";
import { get as je, merge as V, set as H } from "lodash-es";
import { createContext as Me, useCallback as U, useContext as Ne, useEffect as W, useMemo as G, useRef as K, useState as q } from "react";
import { Type as Pe } from "@sinclair/typebox";
var J = /* @__PURE__ */ e(ae());
const Fe = x({
	scrollbarColor: "var(--violet-4) var(--violet-2)",
	"&:hover": { scrollbarColor: "var(--violet-6) var(--violet-3)" }
});
function Y({ children: e, tab: t, className: n }) {
	return /* @__PURE__ */ (0, J.jsx)(me, {
		value: t,
		className: S("h-[calc(100%-32px)]", "@container/tab", Fe, n),
		children: e
	});
}
const Ie = Me(null), Le = () => {
	let e = Ne(Ie);
	if (!e) throw Error("useNavigation must be used within a FormNavigatorContext");
	return e;
}, Re = ({ items: e }) => {
	let { navigateTo: t } = Le();
	return /* @__PURE__ */ (0, J.jsx)("ul", {
		className: "list-none p-0 m-0",
		children: e.map((e) => /* @__PURE__ */ (0, J.jsxs)("li", {
			className: S("select-none px-2.5 py-3 flex items-center text-[0.85rem]\n              justify-between border-b last:border-b-0 border-gray-100\n            dark:border-dark-800 transition-colors duration-200 flex-wrap", "[&:not(:has(*))]:hidden", e.children && "cursor-pointer hover:bg-upstart-50 dark:hover:bg-dark-600"),
			onClick: () => {
				e.children && t(e);
			},
			children: [e.schema ? /* @__PURE__ */ (0, J.jsx)(ze, { item: e }) : e.label, e.children && /* @__PURE__ */ (0, J.jsx)(Ee, { className: "text-gray-400 dark:text-inherit" })]
		}, e.id))
	});
};
function ze({ item: e }) {
	let { onChange: t, formData: n, formSchema: r, brickId: i } = Le();
	return /* @__PURE__ */ (0, J.jsx)(oe, {
		schema: Pe.Object({ [e.id]: e.schema }, e.schema),
		formData: n,
		formSchema: r,
		onChange: t,
		options: {
			brickId: i,
			parents: e.path.split(".").slice(0, -1)
		}
	});
}
const X = ({ title: e, navItems: t, className: n, onChange: r, formData: i, formSchema: a, initialGroup: o, brickId: s }) => {
	let [c, l] = q([{
		content: /* @__PURE__ */ (0, J.jsx)(Re, { items: t }),
		title: e
	}]), u = K(null), d = K(!1), f = t.some((e) => e.children && e.children.length > 0), [p, m] = q(null), h = U((e, t = "forward") => {
		m(t);
		let n = e.children ? /* @__PURE__ */ (0, J.jsx)(Re, { items: e.children }) : /* @__PURE__ */ (0, J.jsxs)("div", { children: ["content: ", e.label] }), r = e.label ?? "Untitled";
		l((e) => [...e, {
			content: n,
			title: r
		}]), setTimeout(() => {
			m(null);
		}, 300);
	}, []), g = U(() => {
		c.length <= 1 || (m("backward"), l((e) => e.slice(0, -1)), setTimeout(() => {
			m(null);
		}, 300));
	}, [c.length]), _ = c[c.length - 1], v = () => p ? p === "forward" ? "animate-slide-in" : "animate-slide-back" : "";
	return W(() => {
		if (o && !d.current) {
			d.current = !0;
			let e = t.find((e) => e.id === o);
			e && h(e, null);
		}
	}, []), /* @__PURE__ */ (0, J.jsx)(Ie.Provider, {
		value: {
			navigateTo: h,
			navigateBack: g,
			onChange: r,
			formData: i,
			brickId: s,
			formSchema: a,
			isRootView: c.length === 1
		},
		children: /* @__PURE__ */ (0, J.jsx)("div", {
			ref: u,
			className: S("navigator-view transition-all relative overflow-x-hidden scrollbar-thin", n),
			style: { width: "100%" },
			children: /* @__PURE__ */ (0, J.jsxs)("div", {
				className: S("absolute inset-0 flex flex-col ", v()),
				children: [f && /* @__PURE__ */ (0, J.jsxs)("div", {
					className: "flex items-center p-2.5 border-b border-gray-200 dark:border-dark-600 bg-gray-50 dark:bg-dark-800 sticky top-0 z-10",
					children: [
						c.length > 1 ? /* @__PURE__ */ (0, J.jsxs)("button", {
							type: "button",
							className: S("flex items-center gap-1 p-0 bg-transparent text-upstart-600 dark:text-upstart-300\n                  border-0 cursor-pointer font-medium text-sm hover:opacity-80 focus:outline-none select-none"),
							onClick: g,
							children: [/* @__PURE__ */ (0, J.jsx)(Te, {}), "Back"]
						}) : /* @__PURE__ */ (0, J.jsx)("div", { className: "w-10" }),
						/* @__PURE__ */ (0, J.jsx)("h3", {
							className: S("flex-1 m-0 text-sm font-semibold text-center select-none first-letter:uppercase"),
							children: _.title
						}),
						/* @__PURE__ */ (0, J.jsx)("div", { className: "w-10" })
					]
				}), _.content]
			})
		})
	});
}, Be = () => !0;
function Z(e, t = Be, n = []) {
	let r = Object.entries(e.properties).map(([e, t]) => [e, Se(t)]).filter(([, e]) => e["ui:field"] !== "hidden").filter(([e, n]) => t(n, e)).map(([e, r]) => {
		let i = [...n, e];
		return {
			id: e,
			label: r.title,
			path: i.join("."),
			...r.metadata && { metadata: r.metadata },
			...r.description ? { description: r.description } : {},
			...r.metadata?.group ? { children: Z(r, t, i) } : { schema: r }
		};
	});
	return r.flat();
}
function Ve({ attributes: e, attributesSchema: t, title: n, group: r, type: a }) {
	let o = i(), s = v(), c = (e) => (e.metadata?.["ui:responsive"] === void 0 || e.metadata?.["ui:responsive"] === !0 || e.metadata?.["ui:responsive"] === o) && (e["ui:responsive"] === void 0 || e["ui:responsive"] === !0 || e["ui:responsive"] === o), l = Z(t, c), u = G(() => {
		let n = ne(t);
		return V({}, n, e ?? {});
	}, [e, t]), d = U((t, n) => {
		console.trace("AttributesSettingsView onChange");
		let r = structuredClone(e);
		H(r, n, t[n]), a === "page" ? s.updatePageAttributes(r) : s.updateSiteAttributes(r);
	}, []);
	return /* @__PURE__ */ (0, J.jsx)(X, {
		brickId: "none",
		title: n,
		initialGroup: r,
		navItems: l,
		formSchema: t,
		className: "h-full",
		formData: u,
		onChange: d
	});
}
function Q({ children: e, className: t }) {
	return /* @__PURE__ */ (0, J.jsx)("h3", {
		className: S("text-[0.9rem] font-medium bg-gradient-to-tr\n         from-upstart-100 to-upstart-50 flex items-center justify-between\n         dark:from-dark-800 dark:to-dark-700\n         px-2 py-1.5 sticky top-0 z-[999] border-b border-upstart-200 dark:border-dark-500 select-none", t),
		children: e
	});
}
function He() {
	let [e, t] = q("page-settings"), n = e === "page-settings" ? Oe : De, r = ee(), i = l(), a = G(() => {
		let e = {
			...n,
			properties: Object.fromEntries(Object.entries(n.properties).filter(([e, t]) => !t["ui:hidden"]))
		};
		return e;
	}, [n]);
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "flex flex-col h-full",
		children: [/* @__PURE__ */ (0, J.jsx)(Q, { children: "Settings" }), /* @__PURE__ */ (0, J.jsxs)(j, {
			defaultValue: e,
			onValueChange: t,
			className: "flex-grow flex flex-col h-dvh",
			children: [
				/* @__PURE__ */ (0, J.jsxs)(k, {
					size: "1",
					className: "sticky top-0 z-50 bg-gray-100",
					children: [/* @__PURE__ */ (0, J.jsx)(A, {
						value: "site-settings",
						className: S("!flex-1"),
						children: "Site"
					}), /* @__PURE__ */ (0, J.jsx)(A, {
						value: "page-settings",
						className: S("!flex-1"),
						children: "Current Page"
					})]
				}),
				/* @__PURE__ */ (0, J.jsx)(Y, {
					tab: "page-settings",
					children: /* @__PURE__ */ (0, J.jsx)(Ve, {
						type: "page",
						attributes: r,
						attributesSchema: a,
						title: "Page settings"
					})
				}),
				/* @__PURE__ */ (0, J.jsx)(Y, {
					tab: "site-settings",
					children: /* @__PURE__ */ (0, J.jsx)(Ve, {
						type: "site",
						attributes: i,
						attributesSchema: a,
						title: "Site settings"
					})
				})
			]
		})]
	});
}
var Ue = /* @__PURE__ */ JSON.parse("[\"42dot Sans\",\"ABeeZee\",\"ADLaM Display\",\"AR One Sans\",\"Abel\",\"Abhaya Libre\",\"Aboreto\",\"Abril Fatface\",\"Abyssinica SIL\",\"Aclonica\",\"Acme\",\"Actor\",\"Adamina\",\"Advent Pro\",\"Afacad\",\"Afacad Flux\",\"Agbalumo\",\"Agdasima\",\"Agu Display\",\"Aguafina Script\",\"Akatab\",\"Akaya Kanadaka\",\"Akaya Telivigala\",\"Akronim\",\"Akshar\",\"Aladin\",\"Alata\",\"Alatsi\",\"Albert Sans\",\"Aldrich\",\"Alef\",\"Alegreya\",\"Alegreya SC\",\"Alegreya Sans\",\"Alegreya Sans SC\",\"Aleo\",\"Alex Brush\",\"Alexandria\",\"Alfa Slab One\",\"Alice\",\"Alike\",\"Alike Angular\",\"Alkalami\",\"Alkatra\",\"Allan\",\"Allerta\",\"Allerta Stencil\",\"Allison\",\"Allura\",\"Almarai\",\"Almendra\",\"Almendra Display\",\"Almendra SC\",\"Alumni Sans\",\"Alumni Sans Collegiate One\",\"Alumni Sans Inline One\",\"Alumni Sans Pinstripe\",\"Amarante\",\"Amaranth\",\"Amatic SC\",\"Amethysta\",\"Amiko\",\"Amiri\",\"Amiri Quran\",\"Amita\",\"Anaheim\",\"Andada Pro\",\"Andika\",\"Anek Bangla\",\"Anek Devanagari\",\"Anek Gujarati\",\"Anek Gurmukhi\",\"Anek Kannada\",\"Anek Latin\",\"Anek Malayalam\",\"Anek Odia\",\"Anek Tamil\",\"Anek Telugu\",\"Angkor\",\"Annapurna SIL\",\"Annie Use Your Telescope\",\"Anonymous Pro\",\"Anta\",\"Antic\",\"Antic Didone\",\"Antic Slab\",\"Anton\",\"Anton SC\",\"Antonio\",\"Anuphan\",\"Anybody\",\"Aoboshi One\",\"Arapey\",\"Arbutus\",\"Arbutus Slab\",\"Architects Daughter\",\"Archivo\",\"Archivo Black\",\"Archivo Narrow\",\"Are You Serious\",\"Aref Ruqaa\",\"Aref Ruqaa Ink\",\"Arima\",\"Arimo\",\"Arizonia\",\"Armata\",\"Arsenal\",\"Arsenal SC\",\"Artifika\",\"Arvo\",\"Arya\",\"Asap\",\"Asap Condensed\",\"Asar\",\"Asset\",\"Assistant\",\"Astloch\",\"Asul\",\"Athiti\",\"Atkinson Hyperlegible\",\"Atma\",\"Atomic Age\",\"Aubrey\",\"Audiowide\",\"Autour One\",\"Average\",\"Average Sans\",\"Averia Gruesa Libre\",\"Averia Libre\",\"Averia Sans Libre\",\"Averia Serif Libre\",\"Azeret Mono\",\"B612\",\"B612 Mono\",\"BIZ UDGothic\",\"BIZ UDMincho\",\"BIZ UDPGothic\",\"BIZ UDPMincho\",\"Babylonica\",\"Bacasime Antique\",\"Bad Script\",\"Badeen Display\",\"Bagel Fat One\",\"Bahiana\",\"Bahianita\",\"Bai Jamjuree\",\"Bakbak One\",\"Ballet\",\"Baloo 2\",\"Baloo Bhai 2\",\"Baloo Bhaijaan 2\",\"Baloo Bhaina 2\",\"Baloo Chettan 2\",\"Baloo Da 2\",\"Baloo Paaji 2\",\"Baloo Tamma 2\",\"Baloo Tammudu 2\",\"Baloo Thambi 2\",\"Balsamiq Sans\",\"Balthazar\",\"Bangers\",\"Barlow\",\"Barlow Condensed\",\"Barlow Semi Condensed\",\"Barriecito\",\"Barrio\",\"Basic\",\"Baskervville\",\"Baskervville SC\",\"Battambang\",\"Baumans\",\"Bayon\",\"Be Vietnam Pro\",\"Beau Rivage\",\"Bebas Neue\",\"Beiruti\",\"Belanosima\",\"Belgrano\",\"Bellefair\",\"Belleza\",\"Bellota\",\"Bellota Text\",\"BenchNine\",\"Benne\",\"Bentham\",\"Berkshire Swash\",\"Besley\",\"Beth Ellen\",\"Bevan\",\"BhuTuka Expanded One\",\"Big Shoulders Display\",\"Big Shoulders Inline Display\",\"Big Shoulders Inline Text\",\"Big Shoulders Stencil Display\",\"Big Shoulders Stencil Text\",\"Big Shoulders Text\",\"Bigelow Rules\",\"Bigshot One\",\"Bilbo\",\"Bilbo Swash Caps\",\"BioRhyme\",\"BioRhyme Expanded\",\"Birthstone\",\"Birthstone Bounce\",\"Biryani\",\"Bitter\",\"Black And White Picture\",\"Black Han Sans\",\"Black Ops One\",\"Blaka\",\"Blaka Hollow\",\"Blaka Ink\",\"Blinker\",\"Bodoni Moda\",\"Bodoni Moda SC\",\"Bokor\",\"Bona Nova\",\"Bona Nova SC\",\"Bonbon\",\"Bonheur Royale\",\"Boogaloo\",\"Borel\",\"Bowlby One\",\"Bowlby One SC\",\"Braah One\",\"Brawler\",\"Bree Serif\",\"Bricolage Grotesque\",\"Bruno Ace\",\"Bruno Ace SC\",\"Brygada 1918\",\"Bubblegum Sans\",\"Bubbler One\",\"Buda\",\"Buenard\",\"Bungee\",\"Bungee Hairline\",\"Bungee Inline\",\"Bungee Outline\",\"Bungee Shade\",\"Bungee Spice\",\"Bungee Tint\",\"Butcherman\",\"Butterfly Kids\",\"Cabin\",\"Cabin Condensed\",\"Cabin Sketch\",\"Cactus Classical Serif\",\"Caesar Dressing\",\"Cagliostro\",\"Cairo\",\"Cairo Play\",\"Caladea\",\"Calistoga\",\"Calligraffitti\",\"Cambay\",\"Cambo\",\"Candal\",\"Cantarell\",\"Cantata One\",\"Cantora One\",\"Caprasimo\",\"Capriola\",\"Caramel\",\"Carattere\",\"Cardo\",\"Carlito\",\"Carme\",\"Carrois Gothic\",\"Carrois Gothic SC\",\"Carter One\",\"Castoro\",\"Castoro Titling\",\"Catamaran\",\"Caudex\",\"Caveat\",\"Caveat Brush\",\"Cedarville Cursive\",\"Ceviche One\",\"Chakra Petch\",\"Changa\",\"Changa One\",\"Chango\",\"Charis SIL\",\"Charm\",\"Charmonman\",\"Chathura\",\"Chau Philomene One\",\"Chela One\",\"Chelsea Market\",\"Chenla\",\"Cherish\",\"Cherry Bomb One\",\"Cherry Cream Soda\",\"Cherry Swash\",\"Chewy\",\"Chicle\",\"Chilanka\",\"Chivo\",\"Chivo Mono\",\"Chocolate Classical Sans\",\"Chokokutai\",\"Chonburi\",\"Cinzel\",\"Cinzel Decorative\",\"Clicker Script\",\"Climate Crisis\",\"Coda\",\"Codystar\",\"Coiny\",\"Combo\",\"Comfortaa\",\"Comforter\",\"Comforter Brush\",\"Comic Neue\",\"Coming Soon\",\"Comme\",\"Commissioner\",\"Concert One\",\"Condiment\",\"Content\",\"Contrail One\",\"Convergence\",\"Cookie\",\"Copse\",\"Corben\",\"Corinthia\",\"Cormorant\",\"Cormorant Garamond\",\"Cormorant Infant\",\"Cormorant SC\",\"Cormorant Unicase\",\"Cormorant Upright\",\"Courgette\",\"Courier Prime\",\"Cousine\",\"Coustard\",\"Covered By Your Grace\",\"Crafty Girls\",\"Creepster\",\"Crete Round\",\"Crimson Pro\",\"Crimson Text\",\"Croissant One\",\"Crushed\",\"Cuprum\",\"Cute Font\",\"Cutive\",\"Cutive Mono\",\"DM Mono\",\"DM Sans\",\"DM Serif Display\",\"DM Serif Text\",\"Dai Banna SIL\",\"Damion\",\"Dancing Script\",\"Danfo\",\"Dangrek\",\"Darker Grotesque\",\"Darumadrop One\",\"David Libre\",\"Dawning of a New Day\",\"Days One\",\"Dekko\",\"Dela Gothic One\",\"Delicious Handrawn\",\"Delius\",\"Delius Swash Caps\",\"Delius Unicase\",\"Della Respira\",\"Denk One\",\"Devonshire\",\"Dhurjati\",\"Didact Gothic\",\"Diphylleia\",\"Diplomata\",\"Diplomata SC\",\"Do Hyeon\",\"Dokdo\",\"Domine\",\"Donegal One\",\"Dongle\",\"Doppio One\",\"Dorsa\",\"Dosis\",\"DotGothic16\",\"Doto\",\"Dr Sugiyama\",\"Duru Sans\",\"DynaPuff\",\"Dynalight\",\"EB Garamond\",\"Eagle Lake\",\"East Sea Dokdo\",\"Eater\",\"Economica\",\"Eczar\",\"Edu AU VIC WA NT Arrows\",\"Edu AU VIC WA NT Dots\",\"Edu AU VIC WA NT Guides\",\"Edu AU VIC WA NT Hand\",\"Edu AU VIC WA NT Pre\",\"Edu NSW ACT Foundation\",\"Edu QLD Beginner\",\"Edu SA Beginner\",\"Edu TAS Beginner\",\"Edu VIC WA NT Beginner\",\"El Messiri\",\"Electrolize\",\"Elsie\",\"Elsie Swash Caps\",\"Emblema One\",\"Emilys Candy\",\"Encode Sans\",\"Encode Sans Condensed\",\"Encode Sans Expanded\",\"Encode Sans SC\",\"Encode Sans Semi Condensed\",\"Encode Sans Semi Expanded\",\"Engagement\",\"Englebert\",\"Enriqueta\",\"Ephesis\",\"Epilogue\",\"Erica One\",\"Esteban\",\"Estonia\",\"Euphoria Script\",\"Ewert\",\"Exo\",\"Exo 2\",\"Expletus Sans\",\"Explora\",\"Faculty Glyphic\",\"Fahkwang\",\"Familjen Grotesk\",\"Fanwood Text\",\"Farro\",\"Farsan\",\"Fascinate\",\"Fascinate Inline\",\"Faster One\",\"Fasthand\",\"Fauna One\",\"Faustina\",\"Federant\",\"Federo\",\"Felipa\",\"Fenix\",\"Festive\",\"Figtree\",\"Finger Paint\",\"Finlandica\",\"Fira Code\",\"Fira Mono\",\"Fira Sans\",\"Fira Sans Condensed\",\"Fira Sans Extra Condensed\",\"Fjalla One\",\"Fjord One\",\"Flamenco\",\"Flavors\",\"Fleur De Leah\",\"Flow Block\",\"Flow Circular\",\"Flow Rounded\",\"Foldit\",\"Fondamento\",\"Fontdiner Swanky\",\"Forum\",\"Fragment Mono\",\"Francois One\",\"Frank Ruhl Libre\",\"Fraunces\",\"Freckle Face\",\"Fredericka the Great\",\"Fredoka\",\"Freehand\",\"Freeman\",\"Fresca\",\"Frijole\",\"Fruktur\",\"Fugaz One\",\"Fuggles\",\"Funnel Display\",\"Funnel Sans\",\"Fustat\",\"Fuzzy Bubbles\",\"GFS Didot\",\"GFS Neohellenic\",\"Ga Maamli\",\"Gabarito\",\"Gabriela\",\"Gaegu\",\"Gafata\",\"Gajraj One\",\"Galada\",\"Galdeano\",\"Galindo\",\"Gamja Flower\",\"Gantari\",\"Gasoek One\",\"Gayathri\",\"Geist\",\"Geist Mono\",\"Gelasio\",\"Gemunu Libre\",\"Genos\",\"Gentium Book Plus\",\"Gentium Plus\",\"Geo\",\"Geologica\",\"Georama\",\"Geostar\",\"Geostar Fill\",\"Germania One\",\"Gideon Roman\",\"Gidugu\",\"Gilda Display\",\"Girassol\",\"Give You Glory\",\"Glass Antiqua\",\"Glegoo\",\"Gloock\",\"Gloria Hallelujah\",\"Glory\",\"Gluten\",\"Goblin One\",\"Gochi Hand\",\"Goldman\",\"Golos Text\",\"Gorditas\",\"Gothic A1\",\"Gotu\",\"Goudy Bookletter 1911\",\"Gowun Batang\",\"Gowun Dodum\",\"Graduate\",\"Grand Hotel\",\"Grandiflora One\",\"Grandstander\",\"Grape Nuts\",\"Gravitas One\",\"Great Vibes\",\"Grechen Fuemen\",\"Grenze\",\"Grenze Gotisch\",\"Grey Qo\",\"Griffy\",\"Gruppo\",\"Gudea\",\"Gugi\",\"Gulzar\",\"Gupter\",\"Gurajada\",\"Gwendolyn\",\"Habibi\",\"Hachi Maru Pop\",\"Hahmlet\",\"Halant\",\"Hammersmith One\",\"Hanalei\",\"Hanalei Fill\",\"Handjet\",\"Handlee\",\"Hanken Grotesk\",\"Hanuman\",\"Happy Monkey\",\"Harmattan\",\"Headland One\",\"Hedvig Letters Sans\",\"Hedvig Letters Serif\",\"Heebo\",\"Henny Penny\",\"Hepta Slab\",\"Herr Von Muellerhoff\",\"Hi Melody\",\"Hina Mincho\",\"Hind\",\"Hind Guntur\",\"Hind Madurai\",\"Hind Mysuru\",\"Hind Siliguri\",\"Hind Vadodara\",\"Holtwood One SC\",\"Homemade Apple\",\"Homenaje\",\"Honk\",\"Host Grotesk\",\"Hubballi\",\"Hubot Sans\",\"Hurricane\",\"IBM Plex Mono\",\"IBM Plex Sans\",\"IBM Plex Sans Arabic\",\"IBM Plex Sans Condensed\",\"IBM Plex Sans Devanagari\",\"IBM Plex Sans Hebrew\",\"IBM Plex Sans JP\",\"IBM Plex Sans KR\",\"IBM Plex Sans Thai\",\"IBM Plex Sans Thai Looped\",\"IBM Plex Serif\",\"IM Fell DW Pica\",\"IM Fell DW Pica SC\",\"IM Fell Double Pica\",\"IM Fell Double Pica SC\",\"IM Fell English\",\"IM Fell English SC\",\"IM Fell French Canon\",\"IM Fell French Canon SC\",\"IM Fell Great Primer\",\"IM Fell Great Primer SC\",\"Ibarra Real Nova\",\"Iceberg\",\"Iceland\",\"Imbue\",\"Imperial Script\",\"Imprima\",\"Inclusive Sans\",\"Inconsolata\",\"Inder\",\"Indie Flower\",\"Ingrid Darling\",\"Inika\",\"Inknut Antiqua\",\"Inria Sans\",\"Inria Serif\",\"Inspiration\",\"Instrument Sans\",\"Instrument Serif\",\"Inter\",\"Inter Tight\",\"Irish Grover\",\"Island Moments\",\"Istok Web\",\"Italiana\",\"Italianno\",\"Itim\",\"Jacquard 12\",\"Jacquard 12 Charted\",\"Jacquard 24\",\"Jacquard 24 Charted\",\"Jacquarda Bastarda 9\",\"Jacquarda Bastarda 9 Charted\",\"Jacques Francois\",\"Jacques Francois Shadow\",\"Jaini\",\"Jaini Purva\",\"Jaldi\",\"Jaro\",\"Jersey 10\",\"Jersey 10 Charted\",\"Jersey 15\",\"Jersey 15 Charted\",\"Jersey 20\",\"Jersey 20 Charted\",\"Jersey 25\",\"Jersey 25 Charted\",\"JetBrains Mono\",\"Jim Nightshade\",\"Joan\",\"Jockey One\",\"Jolly Lodger\",\"Jomhuria\",\"Jomolhari\",\"Josefin Sans\",\"Josefin Slab\",\"Jost\",\"Joti One\",\"Jua\",\"Judson\",\"Julee\",\"Julius Sans One\",\"Junge\",\"Jura\",\"Just Another Hand\",\"Just Me Again Down Here\",\"K2D\",\"Kablammo\",\"Kadwa\",\"Kaisei Decol\",\"Kaisei HarunoUmi\",\"Kaisei Opti\",\"Kaisei Tokumin\",\"Kalam\",\"Kalnia\",\"Kalnia Glaze\",\"Kameron\",\"Kanit\",\"Kantumruy Pro\",\"Karantina\",\"Karla\",\"Karla Tamil Inclined\",\"Karla Tamil Upright\",\"Karma\",\"Katibeh\",\"Kaushan Script\",\"Kavivanar\",\"Kavoon\",\"Kay Pho Du\",\"Kdam Thmor Pro\",\"Keania One\",\"Kelly Slab\",\"Kenia\",\"Khand\",\"Khmer\",\"Khula\",\"Kings\",\"Kirang Haerang\",\"Kite One\",\"Kiwi Maru\",\"Klee One\",\"Knewave\",\"KoHo\",\"Kodchasan\",\"Kode Mono\",\"Koh Santepheap\",\"Kolker Brush\",\"Konkhmer Sleokchher\",\"Kosugi\",\"Kosugi Maru\",\"Kotta One\",\"Koulen\",\"Kranky\",\"Kreon\",\"Kristi\",\"Krona One\",\"Krub\",\"Kufam\",\"Kulim Park\",\"Kumar One\",\"Kumar One Outline\",\"Kumbh Sans\",\"Kurale\",\"LXGW WenKai Mono TC\",\"LXGW WenKai TC\",\"La Belle Aurore\",\"Labrada\",\"Lacquer\",\"Laila\",\"Lakki Reddy\",\"Lalezar\",\"Lancelot\",\"Langar\",\"Lateef\",\"Lato\",\"Lavishly Yours\",\"League Gothic\",\"League Script\",\"League Spartan\",\"Leckerli One\",\"Ledger\",\"Lekton\",\"Lemon\",\"Lemonada\",\"Lexend\",\"Lexend Deca\",\"Lexend Exa\",\"Lexend Giga\",\"Lexend Mega\",\"Lexend Peta\",\"Lexend Tera\",\"Lexend Zetta\",\"Libre Barcode 128\",\"Libre Barcode 128 Text\",\"Libre Barcode 39\",\"Libre Barcode 39 Extended\",\"Libre Barcode 39 Extended Text\",\"Libre Barcode 39 Text\",\"Libre Barcode EAN13 Text\",\"Libre Baskerville\",\"Libre Bodoni\",\"Libre Caslon Display\",\"Libre Caslon Text\",\"Libre Franklin\",\"Licorice\",\"Life Savers\",\"Lilita One\",\"Lily Script One\",\"Limelight\",\"Linden Hill\",\"Linefont\",\"Lisu Bosa\",\"Liter\",\"Literata\",\"Liu Jian Mao Cao\",\"Livvic\",\"Lobster\",\"Lobster Two\",\"Londrina Outline\",\"Londrina Shadow\",\"Londrina Sketch\",\"Londrina Solid\",\"Long Cang\",\"Lora\",\"Love Light\",\"Love Ya Like A Sister\",\"Loved by the King\",\"Lovers Quarrel\",\"Luckiest Guy\",\"Lugrasimo\",\"Lumanosimo\",\"Lunasima\",\"Lusitana\",\"Lustria\",\"Luxurious Roman\",\"Luxurious Script\",\"M PLUS 1\",\"M PLUS 1 Code\",\"M PLUS 1p\",\"M PLUS 2\",\"M PLUS Code Latin\",\"M PLUS Rounded 1c\",\"Ma Shan Zheng\",\"Macondo\",\"Macondo Swash Caps\",\"Mada\",\"Madimi One\",\"Magra\",\"Maiden Orange\",\"Maitree\",\"Major Mono Display\",\"Mako\",\"Mali\",\"Mallanna\",\"Maname\",\"Mandali\",\"Manjari\",\"Manrope\",\"Mansalva\",\"Manuale\",\"Marcellus\",\"Marcellus SC\",\"Marck Script\",\"Margarine\",\"Marhey\",\"Markazi Text\",\"Marko One\",\"Marmelad\",\"Martel\",\"Martel Sans\",\"Martian Mono\",\"Marvel\",\"Mate\",\"Mate SC\",\"Matemasie\",\"Material Icons\",\"Material Icons Outlined\",\"Material Icons Round\",\"Material Icons Sharp\",\"Material Icons Two Tone\",\"Material Symbols Outlined\",\"Material Symbols Rounded\",\"Material Symbols Sharp\",\"Maven Pro\",\"McLaren\",\"Mea Culpa\",\"Meddon\",\"MedievalSharp\",\"Medula One\",\"Meera Inimai\",\"Megrim\",\"Meie Script\",\"Meow Script\",\"Merienda\",\"Merriweather\",\"Merriweather Sans\",\"Metal\",\"Metal Mania\",\"Metamorphous\",\"Metrophobic\",\"Michroma\",\"Micro 5\",\"Micro 5 Charted\",\"Milonga\",\"Miltonian\",\"Miltonian Tattoo\",\"Mina\",\"Mingzat\",\"Miniver\",\"Miriam Libre\",\"Mirza\",\"Miss Fajardose\",\"Mitr\",\"Mochiy Pop One\",\"Mochiy Pop P One\",\"Modak\",\"Modern Antiqua\",\"Moderustic\",\"Mogra\",\"Mohave\",\"Moirai One\",\"Molengo\",\"Molle\",\"Mona Sans\",\"Monda\",\"Monofett\",\"Monomaniac One\",\"Monoton\",\"Monsieur La Doulaise\",\"Montaga\",\"Montagu Slab\",\"MonteCarlo\",\"Montez\",\"Montserrat\",\"Montserrat Alternates\",\"Montserrat Subrayada\",\"Montserrat Underline\",\"Moo Lah Lah\",\"Mooli\",\"Moon Dance\",\"Moul\",\"Moulpali\",\"Mountains of Christmas\",\"Mouse Memoirs\",\"Mr Bedfort\",\"Mr Dafoe\",\"Mr De Haviland\",\"Mrs Saint Delafield\",\"Mrs Sheppards\",\"Ms Madi\",\"Mukta\",\"Mukta Mahee\",\"Mukta Malar\",\"Mukta Vaani\",\"Mulish\",\"Murecho\",\"MuseoModerno\",\"My Soul\",\"Mynerve\",\"Mystery Quest\",\"NTR\",\"Nabla\",\"Namdhinggo\",\"Nanum Brush Script\",\"Nanum Gothic\",\"Nanum Gothic Coding\",\"Nanum Myeongjo\",\"Nanum Pen Script\",\"Narnoor\",\"Neonderthaw\",\"Nerko One\",\"Neucha\",\"Neuton\",\"New Amsterdam\",\"New Rocker\",\"New Tegomin\",\"News Cycle\",\"Newsreader\",\"Niconne\",\"Niramit\",\"Nixie One\",\"Nobile\",\"Nokora\",\"Norican\",\"Nosifer\",\"Notable\",\"Nothing You Could Do\",\"Noticia Text\",\"Noto Color Emoji\",\"Noto Emoji\",\"Noto Kufi Arabic\",\"Noto Music\",\"Noto Naskh Arabic\",\"Noto Nastaliq Urdu\",\"Noto Rashi Hebrew\",\"Noto Sans\",\"Noto Sans Adlam\",\"Noto Sans Adlam Unjoined\",\"Noto Sans Anatolian Hieroglyphs\",\"Noto Sans Arabic\",\"Noto Sans Armenian\",\"Noto Sans Avestan\",\"Noto Sans Balinese\",\"Noto Sans Bamum\",\"Noto Sans Bassa Vah\",\"Noto Sans Batak\",\"Noto Sans Bengali\",\"Noto Sans Bhaiksuki\",\"Noto Sans Brahmi\",\"Noto Sans Buginese\",\"Noto Sans Buhid\",\"Noto Sans Canadian Aboriginal\",\"Noto Sans Carian\",\"Noto Sans Caucasian Albanian\",\"Noto Sans Chakma\",\"Noto Sans Cham\",\"Noto Sans Cherokee\",\"Noto Sans Chorasmian\",\"Noto Sans Coptic\",\"Noto Sans Cuneiform\",\"Noto Sans Cypriot\",\"Noto Sans Cypro Minoan\",\"Noto Sans Deseret\",\"Noto Sans Devanagari\",\"Noto Sans Display\",\"Noto Sans Duployan\",\"Noto Sans Egyptian Hieroglyphs\",\"Noto Sans Elbasan\",\"Noto Sans Elymaic\",\"Noto Sans Ethiopic\",\"Noto Sans Georgian\",\"Noto Sans Glagolitic\",\"Noto Sans Gothic\",\"Noto Sans Grantha\",\"Noto Sans Gujarati\",\"Noto Sans Gunjala Gondi\",\"Noto Sans Gurmukhi\",\"Noto Sans HK\",\"Noto Sans Hanifi Rohingya\",\"Noto Sans Hanunoo\",\"Noto Sans Hatran\",\"Noto Sans Hebrew\",\"Noto Sans Imperial Aramaic\",\"Noto Sans Indic Siyaq Numbers\",\"Noto Sans Inscriptional Pahlavi\",\"Noto Sans Inscriptional Parthian\",\"Noto Sans JP\",\"Noto Sans Javanese\",\"Noto Sans KR\",\"Noto Sans Kaithi\",\"Noto Sans Kannada\",\"Noto Sans Kawi\",\"Noto Sans Kayah Li\",\"Noto Sans Kharoshthi\",\"Noto Sans Khmer\",\"Noto Sans Khojki\",\"Noto Sans Khudawadi\",\"Noto Sans Lao\",\"Noto Sans Lao Looped\",\"Noto Sans Lepcha\",\"Noto Sans Limbu\",\"Noto Sans Linear A\",\"Noto Sans Linear B\",\"Noto Sans Lisu\",\"Noto Sans Lycian\",\"Noto Sans Lydian\",\"Noto Sans Mahajani\",\"Noto Sans Malayalam\",\"Noto Sans Mandaic\",\"Noto Sans Manichaean\",\"Noto Sans Marchen\",\"Noto Sans Masaram Gondi\",\"Noto Sans Math\",\"Noto Sans Mayan Numerals\",\"Noto Sans Medefaidrin\",\"Noto Sans Meetei Mayek\",\"Noto Sans Mende Kikakui\",\"Noto Sans Meroitic\",\"Noto Sans Miao\",\"Noto Sans Modi\",\"Noto Sans Mongolian\",\"Noto Sans Mono\",\"Noto Sans Mro\",\"Noto Sans Multani\",\"Noto Sans Myanmar\",\"Noto Sans NKo\",\"Noto Sans NKo Unjoined\",\"Noto Sans Nabataean\",\"Noto Sans Nag Mundari\",\"Noto Sans Nandinagari\",\"Noto Sans New Tai Lue\",\"Noto Sans Newa\",\"Noto Sans Nushu\",\"Noto Sans Ogham\",\"Noto Sans Ol Chiki\",\"Noto Sans Old Hungarian\",\"Noto Sans Old Italic\",\"Noto Sans Old North Arabian\",\"Noto Sans Old Permic\",\"Noto Sans Old Persian\",\"Noto Sans Old Sogdian\",\"Noto Sans Old South Arabian\",\"Noto Sans Old Turkic\",\"Noto Sans Oriya\",\"Noto Sans Osage\",\"Noto Sans Osmanya\",\"Noto Sans Pahawh Hmong\",\"Noto Sans Palmyrene\",\"Noto Sans Pau Cin Hau\",\"Noto Sans PhagsPa\",\"Noto Sans Phoenician\",\"Noto Sans Psalter Pahlavi\",\"Noto Sans Rejang\",\"Noto Sans Runic\",\"Noto Sans SC\",\"Noto Sans Samaritan\",\"Noto Sans Saurashtra\",\"Noto Sans Sharada\",\"Noto Sans Shavian\",\"Noto Sans Siddham\",\"Noto Sans SignWriting\",\"Noto Sans Sinhala\",\"Noto Sans Sogdian\",\"Noto Sans Sora Sompeng\",\"Noto Sans Soyombo\",\"Noto Sans Sundanese\",\"Noto Sans Syloti Nagri\",\"Noto Sans Symbols\",\"Noto Sans Symbols 2\",\"Noto Sans Syriac\",\"Noto Sans Syriac Eastern\",\"Noto Sans TC\",\"Noto Sans Tagalog\",\"Noto Sans Tagbanwa\",\"Noto Sans Tai Le\",\"Noto Sans Tai Tham\",\"Noto Sans Tai Viet\",\"Noto Sans Takri\",\"Noto Sans Tamil\",\"Noto Sans Tamil Supplement\",\"Noto Sans Tangsa\",\"Noto Sans Telugu\",\"Noto Sans Thaana\",\"Noto Sans Thai\",\"Noto Sans Thai Looped\",\"Noto Sans Tifinagh\",\"Noto Sans Tirhuta\",\"Noto Sans Ugaritic\",\"Noto Sans Vai\",\"Noto Sans Vithkuqi\",\"Noto Sans Wancho\",\"Noto Sans Warang Citi\",\"Noto Sans Yi\",\"Noto Sans Zanabazar Square\",\"Noto Serif\",\"Noto Serif Ahom\",\"Noto Serif Armenian\",\"Noto Serif Balinese\",\"Noto Serif Bengali\",\"Noto Serif Devanagari\",\"Noto Serif Display\",\"Noto Serif Dogra\",\"Noto Serif Ethiopic\",\"Noto Serif Georgian\",\"Noto Serif Grantha\",\"Noto Serif Gujarati\",\"Noto Serif Gurmukhi\",\"Noto Serif HK\",\"Noto Serif Hebrew\",\"Noto Serif Hentaigana\",\"Noto Serif JP\",\"Noto Serif KR\",\"Noto Serif Kannada\",\"Noto Serif Khitan Small Script\",\"Noto Serif Khmer\",\"Noto Serif Khojki\",\"Noto Serif Lao\",\"Noto Serif Makasar\",\"Noto Serif Malayalam\",\"Noto Serif Myanmar\",\"Noto Serif NP Hmong\",\"Noto Serif Old Uyghur\",\"Noto Serif Oriya\",\"Noto Serif Ottoman Siyaq\",\"Noto Serif SC\",\"Noto Serif Sinhala\",\"Noto Serif TC\",\"Noto Serif Tamil\",\"Noto Serif Tangut\",\"Noto Serif Telugu\",\"Noto Serif Thai\",\"Noto Serif Tibetan\",\"Noto Serif Todhri\",\"Noto Serif Toto\",\"Noto Serif Vithkuqi\",\"Noto Serif Yezidi\",\"Noto Traditional Nushu\",\"Noto Znamenny Musical Notation\",\"Nova Cut\",\"Nova Flat\",\"Nova Mono\",\"Nova Oval\",\"Nova Round\",\"Nova Script\",\"Nova Slim\",\"Nova Square\",\"Numans\",\"Nunito\",\"Nunito Sans\",\"Nuosu SIL\",\"Odibee Sans\",\"Odor Mean Chey\",\"Offside\",\"Oi\",\"Ojuju\",\"Old Standard TT\",\"Oldenburg\",\"Ole\",\"Oleo Script\",\"Oleo Script Swash Caps\",\"Onest\",\"Oooh Baby\",\"Open Sans\",\"Oranienbaum\",\"Orbit\",\"Orbitron\",\"Oregano\",\"Orelega One\",\"Orienta\",\"Original Surfer\",\"Oswald\",\"Outfit\",\"Over the Rainbow\",\"Overlock\",\"Overlock SC\",\"Overpass\",\"Overpass Mono\",\"Ovo\",\"Oxanium\",\"Oxygen\",\"Oxygen Mono\",\"PT Mono\",\"PT Sans\",\"PT Sans Caption\",\"PT Sans Narrow\",\"PT Serif\",\"PT Serif Caption\",\"Pacifico\",\"Padauk\",\"Padyakke Expanded One\",\"Palanquin\",\"Palanquin Dark\",\"Palette Mosaic\",\"Pangolin\",\"Paprika\",\"Parisienne\",\"Parkinsans\",\"Passero One\",\"Passion One\",\"Passions Conflict\",\"Pathway Extreme\",\"Pathway Gothic One\",\"Patrick Hand\",\"Patrick Hand SC\",\"Pattaya\",\"Patua One\",\"Pavanam\",\"Paytone One\",\"Peddana\",\"Peralta\",\"Permanent Marker\",\"Petemoss\",\"Petit Formal Script\",\"Petrona\",\"Phetsarath\",\"Philosopher\",\"Phudu\",\"Piazzolla\",\"Piedra\",\"Pinyon Script\",\"Pirata One\",\"Pixelify Sans\",\"Plaster\",\"Platypi\",\"Play\",\"Playball\",\"Playfair\",\"Playfair Display\",\"Playfair Display SC\",\"Playpen Sans\",\"Playwrite AR\",\"Playwrite AR Guides\",\"Playwrite AT\",\"Playwrite AT Guides\",\"Playwrite AU NSW\",\"Playwrite AU NSW Guides\",\"Playwrite AU QLD\",\"Playwrite AU QLD Guides\",\"Playwrite AU SA\",\"Playwrite AU SA Guides\",\"Playwrite AU TAS\",\"Playwrite AU TAS Guides\",\"Playwrite AU VIC\",\"Playwrite AU VIC Guides\",\"Playwrite BE VLG\",\"Playwrite BE VLG Guides\",\"Playwrite BE WAL\",\"Playwrite BE WAL Guides\",\"Playwrite BR\",\"Playwrite BR Guides\",\"Playwrite CA\",\"Playwrite CA Guides\",\"Playwrite CL\",\"Playwrite CL Guides\",\"Playwrite CO\",\"Playwrite CO Guides\",\"Playwrite CU\",\"Playwrite CU Guides\",\"Playwrite CZ\",\"Playwrite CZ Guides\",\"Playwrite DE Grund\",\"Playwrite DE Grund Guides\",\"Playwrite DE LA\",\"Playwrite DE LA Guides\",\"Playwrite DE SAS\",\"Playwrite DE SAS Guides\",\"Playwrite DE VA\",\"Playwrite DE VA Guides\",\"Playwrite DK Loopet\",\"Playwrite DK Loopet Guides\",\"Playwrite DK Uloopet\",\"Playwrite DK Uloopet Guides\",\"Playwrite ES\",\"Playwrite ES Deco\",\"Playwrite ES Deco Guides\",\"Playwrite ES Guides\",\"Playwrite FR Moderne\",\"Playwrite FR Moderne Guides\",\"Playwrite FR Trad\",\"Playwrite FR Trad Guides\",\"Playwrite GB J\",\"Playwrite GB J Guides\",\"Playwrite GB S\",\"Playwrite GB S Guides\",\"Playwrite HR\",\"Playwrite HR Guides\",\"Playwrite HR Lijeva\",\"Playwrite HR Lijeva Guides\",\"Playwrite HU\",\"Playwrite HU Guides\",\"Playwrite ID\",\"Playwrite ID Guides\",\"Playwrite IE\",\"Playwrite IE Guides\",\"Playwrite IN\",\"Playwrite IN Guides\",\"Playwrite IS\",\"Playwrite IS Guides\",\"Playwrite IT Moderna\",\"Playwrite IT Moderna Guides\",\"Playwrite IT Trad\",\"Playwrite IT Trad Guides\",\"Playwrite MX\",\"Playwrite MX Guides\",\"Playwrite NG Modern\",\"Playwrite NG Modern Guides\",\"Playwrite NL\",\"Playwrite NL Guides\",\"Playwrite NO\",\"Playwrite NO Guides\",\"Playwrite NZ\",\"Playwrite NZ Guides\",\"Playwrite PE\",\"Playwrite PE Guides\",\"Playwrite PL\",\"Playwrite PL Guides\",\"Playwrite PT\",\"Playwrite PT Guides\",\"Playwrite RO\",\"Playwrite RO Guides\",\"Playwrite SK\",\"Playwrite SK Guides\",\"Playwrite TZ\",\"Playwrite TZ Guides\",\"Playwrite US Modern\",\"Playwrite US Modern Guides\",\"Playwrite US Trad\",\"Playwrite US Trad Guides\",\"Playwrite VN\",\"Playwrite VN Guides\",\"Playwrite ZA\",\"Playwrite ZA Guides\",\"Plus Jakarta Sans\",\"Pochaevsk\",\"Podkova\",\"Poetsen One\",\"Poiret One\",\"Poller One\",\"Poltawski Nowy\",\"Poly\",\"Pompiere\",\"Ponnala\",\"Pontano Sans\",\"Poor Story\",\"Poppins\",\"Port Lligat Sans\",\"Port Lligat Slab\",\"Potta One\",\"Pragati Narrow\",\"Praise\",\"Prata\",\"Preahvihear\",\"Press Start 2P\",\"Pridi\",\"Princess Sofia\",\"Prociono\",\"Prompt\",\"Prosto One\",\"Protest Guerrilla\",\"Protest Revolution\",\"Protest Riot\",\"Protest Strike\",\"Proza Libre\",\"Public Sans\",\"Puppies Play\",\"Puritan\",\"Purple Purse\",\"Qahiri\",\"Quando\",\"Quantico\",\"Quattrocento\",\"Quattrocento Sans\",\"Questrial\",\"Quicksand\",\"Quintessential\",\"Qwigley\",\"Qwitcher Grypen\",\"REM\",\"Racing Sans One\",\"Radio Canada\",\"Radio Canada Big\",\"Radley\",\"Rajdhani\",\"Rakkas\",\"Raleway\",\"Raleway Dots\",\"Ramabhadra\",\"Ramaraja\",\"Rambla\",\"Rammetto One\",\"Rampart One\",\"Ranchers\",\"Rancho\",\"Ranga\",\"Rasa\",\"Rationale\",\"Ravi Prakash\",\"Readex Pro\",\"Recursive\",\"Red Hat Display\",\"Red Hat Mono\",\"Red Hat Text\",\"Red Rose\",\"Redacted\",\"Redacted Script\",\"Reddit Mono\",\"Reddit Sans\",\"Reddit Sans Condensed\",\"Redressed\",\"Reem Kufi\",\"Reem Kufi Fun\",\"Reem Kufi Ink\",\"Reenie Beanie\",\"Reggae One\",\"Rethink Sans\",\"Revalia\",\"Rhodium Libre\",\"Ribeye\",\"Ribeye Marrow\",\"Righteous\",\"Risque\",\"Road Rage\",\"Roboto\",\"Roboto Condensed\",\"Roboto Flex\",\"Roboto Mono\",\"Roboto Serif\",\"Roboto Slab\",\"Rochester\",\"Rock 3D\",\"Rock Salt\",\"RocknRoll One\",\"Rokkitt\",\"Romanesco\",\"Ropa Sans\",\"Rosario\",\"Rosarivo\",\"Rouge Script\",\"Rowdies\",\"Rozha One\",\"Rubik\",\"Rubik 80s Fade\",\"Rubik Beastly\",\"Rubik Broken Fax\",\"Rubik Bubbles\",\"Rubik Burned\",\"Rubik Dirt\",\"Rubik Distressed\",\"Rubik Doodle Shadow\",\"Rubik Doodle Triangles\",\"Rubik Gemstones\",\"Rubik Glitch\",\"Rubik Glitch Pop\",\"Rubik Iso\",\"Rubik Lines\",\"Rubik Maps\",\"Rubik Marker Hatch\",\"Rubik Maze\",\"Rubik Microbe\",\"Rubik Mono One\",\"Rubik Moonrocks\",\"Rubik Pixels\",\"Rubik Puddles\",\"Rubik Scribble\",\"Rubik Spray Paint\",\"Rubik Storm\",\"Rubik Vinyl\",\"Rubik Wet Paint\",\"Ruda\",\"Rufina\",\"Ruge Boogie\",\"Ruluko\",\"Rum Raisin\",\"Ruslan Display\",\"Russo One\",\"Ruthie\",\"Ruwudu\",\"Rye\",\"STIX Two Text\",\"SUSE\",\"Sacramento\",\"Sahitya\",\"Sail\",\"Saira\",\"Saira Condensed\",\"Saira Extra Condensed\",\"Saira Semi Condensed\",\"Saira Stencil One\",\"Salsa\",\"Sanchez\",\"Sancreek\",\"Sankofa Display\",\"Sansita\",\"Sansita Swashed\",\"Sarabun\",\"Sarala\",\"Sarina\",\"Sarpanch\",\"Sassy Frass\",\"Satisfy\",\"Sawarabi Gothic\",\"Sawarabi Mincho\",\"Scada\",\"Scheherazade New\",\"Schibsted Grotesk\",\"Schoolbell\",\"Scope One\",\"Seaweed Script\",\"Secular One\",\"Sedan\",\"Sedan SC\",\"Sedgwick Ave\",\"Sedgwick Ave Display\",\"Sen\",\"Send Flowers\",\"Sevillana\",\"Seymour One\",\"Shadows Into Light\",\"Shadows Into Light Two\",\"Shalimar\",\"Shantell Sans\",\"Shanti\",\"Share\",\"Share Tech\",\"Share Tech Mono\",\"Shippori Antique\",\"Shippori Antique B1\",\"Shippori Mincho\",\"Shippori Mincho B1\",\"Shizuru\",\"Shojumaru\",\"Short Stack\",\"Shrikhand\",\"Siemreap\",\"Sigmar\",\"Sigmar One\",\"Signika\",\"Signika Negative\",\"Silkscreen\",\"Simonetta\",\"Single Day\",\"Sintony\",\"Sirin Stencil\",\"Six Caps\",\"Sixtyfour\",\"Sixtyfour Convergence\",\"Skranji\",\"Slabo 13px\",\"Slabo 27px\",\"Slackey\",\"Slackside One\",\"Smokum\",\"Smooch\",\"Smooch Sans\",\"Smythe\",\"Sniglet\",\"Snippet\",\"Snowburst One\",\"Sofadi One\",\"Sofia\",\"Sofia Sans\",\"Sofia Sans Condensed\",\"Sofia Sans Extra Condensed\",\"Sofia Sans Semi Condensed\",\"Solitreo\",\"Solway\",\"Sometype Mono\",\"Song Myung\",\"Sono\",\"Sonsie One\",\"Sora\",\"Sorts Mill Goudy\",\"Sour Gummy\",\"Source Code Pro\",\"Source Sans 3\",\"Source Serif 4\",\"Space Grotesk\",\"Space Mono\",\"Special Elite\",\"Spectral\",\"Spectral SC\",\"Spicy Rice\",\"Spinnaker\",\"Spirax\",\"Splash\",\"Spline Sans\",\"Spline Sans Mono\",\"Squada One\",\"Square Peg\",\"Sree Krushnadevaraya\",\"Sriracha\",\"Srisakdi\",\"Staatliches\",\"Stalemate\",\"Stalinist One\",\"Stardos Stencil\",\"Stick\",\"Stick No Bills\",\"Stint Ultra Condensed\",\"Stint Ultra Expanded\",\"Stoke\",\"Strait\",\"Style Script\",\"Stylish\",\"Sue Ellen Francisco\",\"Suez One\",\"Sulphur Point\",\"Sumana\",\"Sunflower\",\"Sunshiney\",\"Supermercado One\",\"Sura\",\"Suranna\",\"Suravaram\",\"Suwannaphum\",\"Swanky and Moo Moo\",\"Syncopate\",\"Syne\",\"Syne Mono\",\"Syne Tactile\",\"Tac One\",\"Tai Heritage Pro\",\"Tajawal\",\"Tangerine\",\"Tapestry\",\"Taprom\",\"Tauri\",\"Taviraj\",\"Teachers\",\"Teko\",\"Tektur\",\"Telex\",\"Tenali Ramakrishna\",\"Tenor Sans\",\"Text Me One\",\"Texturina\",\"Thasadith\",\"The Girl Next Door\",\"The Nautigal\",\"Tienne\",\"Tillana\",\"Tilt Neon\",\"Tilt Prism\",\"Tilt Warp\",\"Timmana\",\"Tinos\",\"Tiny5\",\"Tiro Bangla\",\"Tiro Devanagari Hindi\",\"Tiro Devanagari Marathi\",\"Tiro Devanagari Sanskrit\",\"Tiro Gurmukhi\",\"Tiro Kannada\",\"Tiro Tamil\",\"Tiro Telugu\",\"Titan One\",\"Titillium Web\",\"Tomorrow\",\"Tourney\",\"Trade Winds\",\"Train One\",\"Triodion\",\"Trirong\",\"Trispace\",\"Trocchi\",\"Trochut\",\"Truculenta\",\"Trykker\",\"Tsukimi Rounded\",\"Tulpen One\",\"Turret Road\",\"Twinkle Star\",\"Ubuntu\",\"Ubuntu Condensed\",\"Ubuntu Mono\",\"Ubuntu Sans\",\"Ubuntu Sans Mono\",\"Uchen\",\"Ultra\",\"Unbounded\",\"Uncial Antiqua\",\"Underdog\",\"Unica One\",\"UnifrakturCook\",\"UnifrakturMaguntia\",\"Unkempt\",\"Unlock\",\"Unna\",\"Updock\",\"Urbanist\",\"VT323\",\"Vampiro One\",\"Varela\",\"Varela Round\",\"Varta\",\"Vast Shadow\",\"Vazirmatn\",\"Vesper Libre\",\"Viaoda Libre\",\"Vibes\",\"Vibur\",\"Victor Mono\",\"Vidaloka\",\"Viga\",\"Vina Sans\",\"Voces\",\"Volkhov\",\"Vollkorn\",\"Vollkorn SC\",\"Voltaire\",\"Vujahday Script\",\"Waiting for the Sunrise\",\"Wallpoet\",\"Walter Turncoat\",\"Warnes\",\"Water Brush\",\"Waterfall\",\"Wavefont\",\"Wellfleet\",\"Wendy One\",\"Whisper\",\"WindSong\",\"Wire One\",\"Wittgenstein\",\"Wix Madefor Display\",\"Wix Madefor Text\",\"Work Sans\",\"Workbench\",\"Xanh Mono\",\"Yaldevi\",\"Yanone Kaffeesatz\",\"Yantramanav\",\"Yarndings 12\",\"Yarndings 12 Charted\",\"Yarndings 20\",\"Yarndings 20 Charted\",\"Yatra One\",\"Yellowtail\",\"Yeon Sung\",\"Yeseva One\",\"Yesteryear\",\"Yomogi\",\"Young Serif\",\"Yrsa\",\"Ysabeau\",\"Ysabeau Infant\",\"Ysabeau Office\",\"Ysabeau SC\",\"Yuji Boku\",\"Yuji Hentaigana Akari\",\"Yuji Hentaigana Akebono\",\"Yuji Mai\",\"Yuji Syuku\",\"Yusei Magic\",\"ZCOOL KuaiLe\",\"ZCOOL QingKe HuangYou\",\"ZCOOL XiaoWei\",\"Zain\",\"Zen Antique\",\"Zen Antique Soft\",\"Zen Dots\",\"Zen Kaku Gothic Antique\",\"Zen Kaku Gothic New\",\"Zen Kurenaido\",\"Zen Loop\",\"Zen Maru Gothic\",\"Zen Old Mincho\",\"Zen Tokyo Zoo\",\"Zeyada\",\"Zhi Mang Xing\",\"Zilla Slab\",\"Zilla Slab Highlight\"]");
function We(e) {
	return e.type === "stack" ? ke.find((t) => t.value === e.family)?.label ?? e.family : e.family;
}
function Ge(e) {
	let t = G(() => Ue.map((e) => ({
		value: {
			type: "google",
			family: e
		},
		label: e
	})), []), n = u(), r = ke.map((e) => ({
		value: {
			type: "stack",
			family: e.value
		},
		label: e.label
	})), i = n.typography.alternatives?.map((t) => ({
		label: We(t[e]),
		value: t[e]
	})) ?? [], a = G(() => [
		...i.length ? [{
			group: "Suggested Fonts",
			options: i
		}] : [],
		{
			group: "Generic Fonts",
			options: r
		},
		{
			group: "Google Fonts",
			options: t
		}
	], [
		i,
		r,
		t
	]);
	return a;
}
const Ke = ({ data: e }) => /* @__PURE__ */ (0, J.jsx)("div", {
	className: "px-2 py-1 text-xs bg-gray-200 text-gray-600",
	children: e.group
});
function qe({ initialValue: e, onChange: t, fontType: n }) {
	let [r, i] = q(e), a = Ge(n), o = {
		control: (e) => (e.isFocused, "outline-none bg-white rounded !min-h-full border border-gray-300"),
		valueContainer: () => "bg-white px-2.5",
		placeholder: () => "text-sm bg-white",
		input: () => "text-sm outline-none !focus:outline-none !focus-within:outline-none [&>input]:focus:ring-0 [&>input]:focus-within:ring-0",
		container: () => "text-sm h-8",
		menu: () => "text-sm bg-white shadow-2xl rounded py-1",
		menuList: () => x({
			scrollbarColor: "var(--violet-4) var(--violet-2)",
			scrollBehavior: "smooth",
			scrollbarWidth: "thin",
			"&:hover": { scrollbarColor: "var(--violet-7) var(--violet-3)" }
		}),
		loadingMessage(e) {
			return S("text-sm py-2");
		},
		indicatorsContainer: () => "text-sm pr-1.5 font-normal scale-75",
		option: (e) => e.isSelected ? S("bg-upstart-100 px-2 py-1.5") : S("bg-white px-2 py-1.5 hover:(bg-upstart-600 text-white)")
	};
	return /* @__PURE__ */ (0, J.jsx)(ue, {
		unstyled: !0,
		filterOption: de({
			ignoreAccents: !1,
			matchFrom: "start",
			ignoreCase: !0
		}),
		defaultValue: {
			...r,
			label: We(r)
		},
		onChange: (e) => {
			e !== null && (i(e.value), t(e.value));
		},
		classNames: o,
		components: { GroupHeading: Ke },
		options: a
	});
}
function Je({ theme: e, noPreview: t, className: n, selected: r, onClick: i }) {
	return v(), /* @__PURE__ */ (0, J.jsxs)("button", {
		type: "button",
		className: S("group/theme-button overflow-hidden relative h-[44px] w-full rounded outline shadow-sm  flex flex-grow p-1 gap-1 items-stretch justify-stretch group transition-all", x({ backgroundColor: e.colors.base100 }), r ? "outline-upstart-500" : "outline-gray-200", t ? "cursor-default" : "cursor-pointer hover:(outline-upstart-400)", n),
		onClick: t ? void 0 : i,
		children: [
			/* @__PURE__ */ (0, J.jsx)("div", { className: S("flex-1 rounded-l", x({ backgroundColor: e.colors.primary })) }),
			/* @__PURE__ */ (0, J.jsx)("div", { className: S("flex-1", x({ backgroundColor: e.colors.secondary })) }),
			/* @__PURE__ */ (0, J.jsx)("div", { className: S("flex-1", x({ backgroundColor: e.colors.accent })) }),
			/* @__PURE__ */ (0, J.jsx)("div", { className: S("flex-1 rounded-r", x({ backgroundColor: e.colors.neutral })) }),
			/* @__PURE__ */ (0, J.jsx)("h3", {
				className: S("absolute  left-1/2 -translate-x-1/2 transition-all top-1/2 translate-y-full scale-75\n          -bottom-6 h-6\n          group-hover/theme-button:(-translate-y-1/2 scale-100)\n          py-px text-xs max-w-[86%] inline-flex items-center\n          overflow-hidden text-ellipsis text-nowrap z-20 bg-black/30 px-2 font-normal text-white backdrop-blur-md rounded-full"),
				children: e.name
			})
		]
	});
}
function Ye() {
	let e = v(), [n] = ie(), r = [
		12,
		13,
		14,
		15,
		16,
		17,
		18,
		19,
		20,
		21,
		22
	], i = u(), a = t();
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "flex flex-col h-full",
		children: [/* @__PURE__ */ (0, J.jsx)(Q, { children: "Theme" }), /* @__PURE__ */ (0, J.jsxs)(j, {
			defaultValue: "current",
			className: "flex-1 flex flex-col h-full",
			children: [
				/* @__PURE__ */ (0, J.jsxs)(k, {
					size: "1",
					className: "sticky top-0 z-50 bg-gray-100",
					children: [
						/* @__PURE__ */ (0, J.jsx)(A, {
							value: "current",
							className: "!flex-1",
							children: "Current Theme"
						}),
						/* @__PURE__ */ (0, J.jsx)(A, {
							value: "list",
							className: "!flex-1",
							children: "Themes library"
						}),
						a && /* @__PURE__ */ (0, J.jsx)(A, {
							value: "debug",
							className: "!flex-1",
							children: "Debug"
						})
					]
				}),
				/* @__PURE__ */ (0, J.jsxs)(Y, {
					tab: "current",
					className: "px-2 overflow-auto",
					children: [/* @__PURE__ */ (0, J.jsx)(I, {
						className: "-mx-2 !py-2 !px-3 !rounded-none",
						children: /* @__PURE__ */ (0, J.jsx)(F, {
							size: "1",
							className: S("text-pretty"),
							children: "Customize your theme colors and typography to match your brand. Theme is applied to your entire site, not just the current page."
						})
					}), /* @__PURE__ */ (0, J.jsxs)("div", {
						className: "flex flex-col",
						children: [
							/* @__PURE__ */ (0, J.jsx)(Q, {
								className: "-mx-2 my-2",
								children: "Colors"
							}),
							/* @__PURE__ */ (0, J.jsx)("div", {
								className: "grid grid-cols-2 gap-x-3 text-sm flex-col gap-y-3 pb-2",
								children: Object.entries(e.theme.colors).filter(([e]) => ["base200", "base300"].includes(e) === !1 && e.endsWith("Content") === !1).map(([t, n]) => /* @__PURE__ */ (0, J.jsx)(ce, {
									hideColorLabel: !0,
									labelPlacement: "right",
									name: B.properties.colors.properties[t].title,
									description: B.properties.colors.properties[t].description,
									color: n,
									labelClassName: "font-medium",
									colorType: t,
									onChange: (n) => {
										let r = { [t]: n }, a = i.browserColorScheme;
										if ([
											"primary",
											"secondary",
											"accent",
											"neutral",
											"base100",
											"base200",
											"base300"
										].includes(t)) {
											let e = _e(n), i = ve(n);
											if (!t.startsWith("base")) r[`${t}Content`] = i, t === "primary" && (r.neutral = le(e.css("oklch")));
											else if (t === "base100") {
												let t = e.luminance() < .5;
												a = t ? "dark" : "light", r.baseContent = i;
												let [n] = e.lch(), o = t ? e.set("lch.l", n + 10) : e.set("lch.l", n - 4), s = t ? e.set("lch.l", n + 20) : e.set("lch.l", n - 8);
												r.base200 = o.css("oklch"), r.base300 = s.css("oklch");
											}
										}
										e.setTheme({
											...i,
											browserColorScheme: a,
											colors: {
												...i.colors,
												...r
											}
										});
									}
								}, t))
							}),
							/* @__PURE__ */ (0, J.jsx)(Q, {
								className: "-mx-2 my-2",
								children: "Typography"
							}),
							/* @__PURE__ */ (0, J.jsxs)("div", {
								className: "text-sm flex flex-col gap-y-4 p-2",
								children: [Object.entries(e.theme.typography).filter((e) => e[0] === "body" || e[0] === "heading").map(([t, n]) => /* @__PURE__ */ (0, J.jsxs)("div", { children: [
									/* @__PURE__ */ (0, J.jsx)("label", {
										className: "font-medium",
										children: B.properties.typography.properties[t].title
									}),
									/* @__PURE__ */ (0, J.jsx)(P, {
										color: "gray",
										as: "p",
										size: "1",
										className: "mb-1.5",
										children: B.properties.typography.properties[t].description
									}),
									/* @__PURE__ */ (0, J.jsx)(qe, {
										fontType: t,
										initialValue: n,
										onChange: (n) => {
											e.setTheme({
												...i,
												typography: {
													...i.typography,
													[t]: n
												}
											});
										}
									})
								] }, t)), /* @__PURE__ */ (0, J.jsxs)("div", { children: [
									/* @__PURE__ */ (0, J.jsx)("label", {
										className: "font-medium",
										children: "Base Font size"
									}),
									/* @__PURE__ */ (0, J.jsx)(P, {
										color: "gray",
										as: "p",
										size: "1",
										className: "mb-2",
										children: "Can be changed for fonts that are too small or too big"
									}),
									/* @__PURE__ */ (0, J.jsxs)(M, {
										defaultValue: `${e.theme.typography.base}`,
										size: "2",
										onValueChange: (t) => {
											e.setTheme({
												...i,
												typography: {
													...i.typography,
													base: parseInt(t)
												}
											});
										},
										children: [/* @__PURE__ */ (0, J.jsx)(w, {
											className: "!w-full",
											radius: "large",
											variant: "surface"
										}), /* @__PURE__ */ (0, J.jsx)(N, {
											position: "popper",
											children: r.map((e) => /* @__PURE__ */ (0, J.jsxs)(E, {
												value: `${e}`,
												children: [e, " px"]
											}, `base-${e}`))
										})]
									})
								] })]
							})
						]
					})]
				}),
				/* @__PURE__ */ (0, J.jsxs)(Y, {
					tab: "list",
					className: "px-2 overflow-auto !h-[calc(100dvh-66px)]",
					children: [/* @__PURE__ */ (0, J.jsx)(I, {
						className: "-mx-2 !py-2 !px-3 !rounded-none",
						children: /* @__PURE__ */ (0, J.jsx)(F, {
							size: "1",
							className: S("text-pretty"),
							children: "Here are some pre-made color themes. Click on a theme to preview it. Also feel free to use the Upstart AI chat to ask for a specific theme!"
						})
					}), /* @__PURE__ */ (0, J.jsx)(Ze, {})]
				}),
				a && /* @__PURE__ */ (0, J.jsx)(Y, {
					tab: "debug",
					className: "h-full",
					children: /* @__PURE__ */ (0, J.jsx)(Qe, {})
				})
			]
		})]
	});
}
const Xe = [
	"modern",
	"rustic",
	"playful",
	"vibrant",
	"professional",
	"neutral",
	"pastel",
	"tech",
	"elegant",
	"classic",
	"organic",
	"luxurious",
	"warm",
	"serene",
	"bold",
	"minimalist",
	"fresh",
	"calming",
	"energetic",
	"earthy"
].toSorted();
function Ze() {
	let e = d(), t = v(), [n, r] = q(!1), [i, a] = q("bold"), [o, s] = q("light"), [c, l] = q([]);
	W(() => {
		let e = async () => {
			let e = await fetch(`/editor/themes?colorScheme=${i}&browserColorScheme=${o}`), t = await e.json();
			l(t), r(!0);
		};
		e();
	}, [i, o]);
	let u = [...e, ...c];
	return n ? /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [
		/* @__PURE__ */ (0, J.jsxs)("div", {
			className: "flex gap-2 items-center mt-2 mx-w-full",
			children: [
				/* @__PURE__ */ (0, J.jsx)("span", {
					className: "text-sm font-medium",
					children: "Style"
				}),
				/* @__PURE__ */ (0, J.jsxs)(M, {
					value: i,
					onValueChange: a,
					children: [/* @__PURE__ */ (0, J.jsx)(w, {
						className: "!flex-grow !capitalize",
						radius: "large",
						variant: "surface"
					}), /* @__PURE__ */ (0, J.jsx)(N, {
						position: "popper",
						children: /* @__PURE__ */ (0, J.jsxs)(T, { children: [/* @__PURE__ */ (0, J.jsx)(C, { children: "Category" }), Xe.map((e) => /* @__PURE__ */ (0, J.jsx)(E, {
							value: e,
							className: "capitalize",
							children: e
						}, e))] })
					})]
				}),
				/* @__PURE__ */ (0, J.jsxs)(M, {
					defaultValue: o,
					onValueChange: (e) => s(e),
					children: [/* @__PURE__ */ (0, J.jsx)(w, {
						className: "!flex-grow !capitalize pr-0.5",
						radius: "large",
						variant: "surface"
					}), /* @__PURE__ */ (0, J.jsx)(N, {
						position: "popper",
						children: /* @__PURE__ */ (0, J.jsxs)(T, { children: [/* @__PURE__ */ (0, J.jsx)(C, { children: "Lightness" }), ["light", "dark"].map((e) => /* @__PURE__ */ (0, J.jsx)(E, {
							value: e,
							className: "capitalize",
							children: e
						}, e))] })
					})]
				})
			]
		}),
		/* @__PURE__ */ (0, J.jsx)("div", {
			className: S("grid grid-cols-2 gap-3 pt-3 pb-2 relative pr-1.5"),
			children: u.map((e) => /* @__PURE__ */ (0, J.jsx)(Je, {
				selected: t.previewTheme?.id === e.id,
				theme: e,
				onClick: () => t.setPreviewTheme(e)
			}, e.id))
		}),
		u.length === 0 && /* @__PURE__ */ (0, J.jsx)("div", {
			className: "absolute inset-0 text-center text-gray-500 h-full flex-1 flex items-center justify-center pointer-events-none",
			children: "No themes found for specified filters."
		})
	] }) : /* @__PURE__ */ (0, J.jsx)("div", {
		className: "absolute inset-0 text-center text-gray-500 h-full flex-1 flex items-center justify-center",
		children: "Loading themes..."
	});
}
function Qe() {
	let e = S(x({
		display: "block",
		fontFamily: "monospace",
		fontSize: "0.7rem",
		lineHeight: "1.3",
		wordWrap: "break-word",
		whiteSpace: "pre-wrap"
	})), { previewTheme: t, theme: n } = v();
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "overflow-y-auto scrollbar-thin grow-0 max-h-[92cqh]",
		children: [
			t && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsx)(Q, { children: "Preview theme" }), /* @__PURE__ */ (0, J.jsx)("div", {
				className: "flex-1 ",
				children: /* @__PURE__ */ (0, J.jsx)("pre", {
					className: "p-1",
					children: /* @__PURE__ */ (0, J.jsx)("code", {
						className: e,
						children: JSON.stringify(t, null, 2)
					})
				})
			})] }),
			/* @__PURE__ */ (0, J.jsx)(Q, { children: "Theme" }),
			/* @__PURE__ */ (0, J.jsx)("div", {
				className: "flex-1 ",
				children: /* @__PURE__ */ (0, J.jsx)("pre", {
					className: "p-1",
					children: /* @__PURE__ */ (0, J.jsx)("code", {
						className: e,
						children: JSON.stringify(n, null, 2)
					})
				})
			}),
			/* @__PURE__ */ (0, J.jsx)(Q, { children: "Theme colors vars" }),
			/* @__PURE__ */ (0, J.jsx)("div", {
				className: "flex-1 ",
				children: /* @__PURE__ */ (0, J.jsx)("pre", {
					className: "p-1",
					children: /* @__PURE__ */ (0, J.jsx)("code", {
						className: e,
						children: JSON.stringify(ye(n), null, 2)
					})
				})
			})
		]
	});
}
const $e = (e) => e === "settings" || !e;
function et({ brick: e, label: t, group: n, categoryFilter: r = $e }) {
	let { updateBrickProps: a } = y(), o = z(e.type), s = i(), c = _(e.id), l = U((e) => (e.metadata?.["ui:responsive"] === void 0 || e.metadata?.["ui:responsive"] === !0 || e.metadata?.["ui:responsive"] === s) && (e["ui:responsive"] === void 0 || e["ui:responsive"] === !0 || e["ui:responsive"] === s) && r(e.metadata?.category), [s, r]), u = G(() => Z(o.props, l), [l, o.props]), d = G(() => {
		let t = h[e.type].props;
		return s === "mobile" ? m({}, t, e.props, e.mobileProps ?? {}) : m({}, t, e.props ?? {});
	}, [e, s]), f = U((t, n) => {
		if (!n) {
			console.warn("propertyChangedPath is missing in onChange");
			return;
		}
		let r = je(o.props.properties, n), i = s === "mobile" && r?.metadata?.category !== "content", l = structuredClone(i ? c?.mobileProps ?? {} : c?.props ?? {});
		H(l, n, t[n]), console.debug("Props update for brick %s: %o", e.id, l), a(e.id, l, i);
	}, [
		e.id,
		o,
		s,
		a,
		c
	]);
	return /* @__PURE__ */ (0, J.jsx)(X, {
		title: `${o.name} ${t ?? "settings"}`,
		initialGroup: n,
		navItems: u,
		formSchema: o.props,
		className: S("flex-grow"),
		formData: d,
		onChange: f,
		brickId: e.id
	}, `brick-nav-${e.id}-${s}`);
}
function $({ brick: e, className: t = "h-[calc(50cqh-58px)]" }) {
	let { setSelectedBrickId: r, setSelectedSectionId: i } = n(), o = c(), l = s(), u = a(), d = y(), [f, p] = q(), m = K(null), h = K(null), _ = K(null);
	W(() => {
		let e = l ?? u;
		if (e) {
			let t = document.getElementById(`hierarchy_${e}`);
			t && "scrollIntoViewIfNeeded" in t && typeof t?.scrollIntoViewIfNeeded == "function" ? t.scrollIntoViewIfNeeded({
				behavior: "smooth",
				block: "center"
			}) : t && t.scrollIntoView({
				behavior: "smooth",
				block: "center"
			});
		}
	}, [l, u]), W(() => {
		h.current = document.getElementById("page-container");
	}, []), W(() => {
		m.current && m.current.classList.remove(S("outline-upstart-400")), f && (m.current = document.getElementById(f.id), m.current && (m.current.classList.add(S("outline-upstart-400")), h.current && !tt(m.current, h.current) && m.current.scrollIntoView({
			behavior: "smooth",
			block: "nearest"
		})));
	}, [f]);
	function v({ bricks: t, level: n = 0, isChild: a = !1 }) {
		return t.map((t, o) => {
			let s = "$children" in t.props ? t.props.$children : [], c = s.length > 0, l = g[t.type].isContainer, u = g[t.type].icon, d = g[t.type].name;
			return /* @__PURE__ */ (0, J.jsx)(pe, {
				draggableId: `hierarchy_${t.id}`,
				index: o,
				children: (o, f) => /* @__PURE__ */ (0, J.jsx)("div", {
					ref: o.innerRef,
					...o.draggableProps,
					className: S("min-h-fit flex flex-col gap-2", l && "mt-1 mr-1 ml-1 last:mb-1"),
					children: /* @__PURE__ */ (0, J.jsxs)("div", {
						id: `hierarchy_${t.id}`,
						"data-element-type": "brick",
						"data-brick-type": t.type,
						"data-level": n,
						"data-has-children": c,
						className: S("select-none cursor-pointer flex flex-col ", l && "rounded outline outline-2 min-h-fit", l ? e?.id === t.id ? "outline-orange-300 " : "outline-transparent hover:(outline-orange-200)" : e?.id === t.id ? "outline-upstart-400 " : "outline-transparent hover:(outline-upstart-100)", f.isDragging && "outline outline-2 outline-upstart-400 bg-upstart-100"),
						children: [/* @__PURE__ */ (0, J.jsxs)("div", {
							className: S(`flex items-center justify-between group/${t.id} transition-all py-1 px-1.5`, (a || n === 0) && x({ paddingLeft: `${(n + 1) * 10}px` }), l ? e?.id === t.id ? "bg-orange-300 text-white font-bold" : "hover:bg-orange-50" : e?.id === t.id ? "bg-upstart-500 text-white font-bold" : "hover:bg-upstart-50"),
							onClick: (e) => {
								e.stopPropagation(), e.preventDefault(), r(t.id), i(), document.getElementById(t.id)?.scrollIntoView({
									behavior: "smooth",
									block: "nearest"
								});
							},
							children: [/* @__PURE__ */ (0, J.jsxs)("span", {
								className: "inline-flex items-center gap-1.5 select-none",
								children: [
									/* @__PURE__ */ (0, J.jsx)(u, { className: "w-4 h-4" }),
									" ",
									d
								]
							}), /* @__PURE__ */ (0, J.jsx)("div", {
								...o.dragHandleProps,
								children: /* @__PURE__ */ (0, J.jsx)(R, { className: `w-5 h-5 cursor-row-resize opacity-0 group-hover/${t.id}:opacity-80 transition-opacity` })
							})]
						}), s.length > 0 && /* @__PURE__ */ (0, J.jsx)(O, {
							droppableId: `hierarchy_${t.id}`,
							direction: "vertical",
							children: (e) => /* @__PURE__ */ (0, J.jsxs)("div", {
								ref: e.innerRef,
								...e.droppableProps,
								className: S("hierarchy-container"),
								children: [/* @__PURE__ */ (0, J.jsx)(v, {
									bricks: s,
									level: n + 1,
									isChild: !0
								}), e.placeholder]
							})
						})]
					})
				}, t.id)
			}, `hierarchy_${t.id}`);
		});
	}
	let ee = (e) => {
		let { source: t, destination: n, type: r, draggableId: i } = e;
		if (_.current = null, n) {
			let i = e.draggableId.replace(/^hierarchy_/, ""), { droppableId: a, index: s } = n;
			a = a.replace(/^hierarchy_/, "");
			let { droppableId: c } = t;
			if (c = c.replace(/^hierarchy_/, ""), a === "main-hierarchy") {
				let e = Array.from(o), [r] = e.splice(t.index, 1);
				e.splice(n.index, 0, r), d.reorderSections(e.map((e) => e.id));
			} else if (r === "brick-hierarchy" || r === "DEFAULT") if (c === a) console.log("Reordering brick within the same section/parent", e), d.reorderBrickWithin(i, s);
			else {
				let e = o.some((e) => e.id === a);
				e ? d.moveBrickToSection(i, a, s) : d.moveBrickToContainerBrick(i, a, s);
			}
			else console.warn("Unhandled drag type:", r), console.warn("Result:", e);
		}
		let a = document.getElementById(i);
		if (a?.style.removeProperty("z-index"), a?.dataset.elementType === "section") {
			let e = a.querySelectorAll(".hierarchy-container");
			e.forEach((e) => {
				e.style.removeProperty("display"), e.style.removeProperty("z-index");
			});
		} else if (a?.dataset.hasChildren === "true") {
			let e = a.lastElementChild;
			e && (e.style.removeProperty("display"), e.style.removeProperty("z-index"));
		}
	}, b = (e) => {
		_.current = e.draggableId;
		let t = document.getElementById(e.draggableId);
		if (console.log("BEFORE CAPTURE", {
			cap: e,
			dataset: t?.dataset
		}), t?.style.setProperty("z-index", "9999"), t?.dataset.elementType === "section") {
			let e = t.querySelectorAll(".hierarchy-container");
			e.forEach((e) => {
				e.style.setProperty("display", "none", "important");
			});
		} else if (t?.dataset.hasChildren === "true") {
			let e = t.lastElementChild;
			e?.style.setProperty("display", "none", "important");
		}
	};
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: S("grow shrink-0 bg-red", t),
		onMouseLeave: () => p(void 0),
		children: [/* @__PURE__ */ (0, J.jsxs)(Q, {
			className: "border-t",
			children: [/* @__PURE__ */ (0, J.jsx)("span", { children: "Hierarchy" }), /* @__PURE__ */ (0, J.jsx)(se, { help: "View and manage the hierarchy of sections and bricks on this page. Click on a section or brick to select it.\nDrag and drop sections and bricks to reorder them.\n          " })]
		}), /* @__PURE__ */ (0, J.jsx)(fe, {
			onDragEnd: ee,
			onBeforeCapture: b,
			children: /* @__PURE__ */ (0, J.jsx)(O, {
				droppableId: "main-hierarchy",
				type: "hierarchy-section",
				direction: "vertical",
				children: (e, t) => /* @__PURE__ */ (0, J.jsxs)("div", {
					ref: e.innerRef,
					className: S("flex flex-col gap-1 py-2 pt-1 px-1 text-sm text-[80%] scrollbar-thin max-h-[calc(100%-38px)] overflow-y-auto"),
					...e.droppableProps,
					children: [o.map((e, t) => /* @__PURE__ */ (0, J.jsx)(pe, {
						draggableId: `hierarchy_${e.id}`,
						index: t,
						children: (t, n) => /* @__PURE__ */ (0, J.jsxs)("div", {
							id: `hierarchy_${e.id}`,
							"data-element-type": "section",
							ref: t.innerRef,
							...t.draggableProps,
							className: S("rounded group mt-1 outline outline-2 outline-transparent", n.isDragging && "outline-upstart-400 bg-upstart-100", e.id === l ? "outline-upstart-400" : "hover:(outline-upstart-100)"),
							children: [/* @__PURE__ */ (0, J.jsxs)("div", {
								className: S("py-1 px-1.5 rounded-t select-none flex justify-between items-center group min-h-fit", e.id === l ? "bg-upstart-500 text-white font-bold cursor-default" : "hover:bg-upstart-50 cursor-pointer"),
								onClick: (t) => {
									if (t.defaultPrevented) {
										console.log("Event was already handled, skipping click action on section hierarchy");
										return;
									}
									t.preventDefault(), r(), i(e.id), document.getElementById(e.id)?.scrollIntoView({
										behavior: "smooth",
										block: "nearest"
									});
								},
								children: [/* @__PURE__ */ (0, J.jsxs)("span", { children: ["Section ", e.label ?? "Unnamed"] }), /* @__PURE__ */ (0, J.jsx)("div", {
									...t.dragHandleProps,
									children: /* @__PURE__ */ (0, J.jsx)(R, { className: "w-5 h-5 cursor-row-resize opacity-0 group-hover:opacity-80 transition-opacity" })
								})]
							}), /* @__PURE__ */ (0, J.jsx)(O, {
								droppableId: `hierarchy_${e.id}`,
								type: "brick-hierarchy",
								children: (t) => /* @__PURE__ */ (0, J.jsxs)("div", {
									ref: t.innerRef,
									...t.droppableProps,
									className: S("hierarchy-container"),
									children: [
										/* @__PURE__ */ (0, J.jsx)(v, { bricks: e.bricks }),
										e.bricks.length === 0 && /* @__PURE__ */ (0, J.jsx)("div", {
											className: S("w-full h-full px-2 py-1.5 flex items-center text-gray-500 font-normal"),
											children: "No bricks in this section."
										}),
										t.placeholder
									]
								})
							})]
						}, e.id)
					}, `hierarchy_${e.id}`)), e.placeholder]
				})
			})
		})]
	});
}
function tt(e, t) {
	let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = n.top - r.top + t.scrollTop, a = n.left - r.left + t.scrollLeft, o = i + e.offsetHeight, s = a + e.offsetWidth, c = t.scrollTop, l = t.scrollLeft, u = c + t.clientHeight, d = l + t.clientWidth;
	return o > c && i < u && s > l && a < d;
}
function nt({ manifest: e, className: t }) {
	let n = typeof e.icon == "string" ? /* @__PURE__ */ (0, J.jsx)("span", {
		className: S(t, "w-7 h-7 text-upstart-600 dark:text-upstart-400 [&>svg]:w-auto [&>svg]:h-7 inline-block"),
		dangerouslySetInnerHTML: { __html: e.icon }
	}) : /* @__PURE__ */ (0, J.jsx)(e.icon, { className: S(t, "w-6 h-6 text-upstart-600/90 group-hovertext-upstart-700", e.iconClassName) });
	return n;
}
function rt({ brick: e }) {
	let n = i(), [r, a] = L("inspector_tabs_map", {}), o = te(e.id), s = t(), c = z(e.type), l = b(), u = re(c.props, (e) => {
		let t = Se(e);
		return t.metadata?.category === "content" && t["ui:field"] !== "hidden" && (t["ui:hidden-if"] === void 0 || t["ui:hidden-if"] === "no-page-queries" && l.length > 0) && (t.metadata?.["ui:responsive"] === void 0 || t.metadata?.["ui:responsive"] === !0 || t.metadata?.["ui:responsive"] === n) && (t["ui:responsive"] === void 0 || t["ui:responsive"] === !0 || t["ui:responsive"] === n);
	}), d = Object.keys(u).length > 0, f = d || s, p = r[e.type] ?? (d ? "content" : "settings");
	return W(() => {
		!d && p === "content" && a((t) => ({
			...t,
			[e.type]: "settings"
		}));
	}, [
		a,
		e.type,
		p,
		d
	]), o ? /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "flex flex-col flex-grow h-full",
		children: [/* @__PURE__ */ (0, J.jsx)(Q, { children: /* @__PURE__ */ (0, J.jsxs)("div", {
			className: "flex flex-1 justify-between items-center group",
			children: [/* @__PURE__ */ (0, J.jsxs)("span", {
				className: "flex items-center",
				children: [/* @__PURE__ */ (0, J.jsx)(nt, {
					manifest: c,
					className: "inline-block mr-2 !h-4 !w-4 "
				}), c.name]
			}), /* @__PURE__ */ (0, J.jsx)("span", {
				className: S("text-xs font-mono lowercase opacity-0 group-hover:opacity-70 transition-opacity delay-1000"),
				onClick: () => {
					navigator.clipboard.writeText(e.id);
				},
				children: e.id
			})]
		}) }), /* @__PURE__ */ (0, J.jsxs)(j, {
			value: p,
			onValueChange: (t) => {
				a((n) => ({
					...n,
					[e.type]: t
				}));
			},
			className: "flex-1 flex flex-col",
			children: [
				f && /* @__PURE__ */ (0, J.jsxs)(k, {
					className: "sticky top-0 z-50 bg-gray-100 dark:bg-dark-900",
					size: "1",
					children: [
						d && /* @__PURE__ */ (0, J.jsx)(A, {
							value: "content",
							className: "!flex-1",
							children: "Content"
						}),
						/* @__PURE__ */ (0, J.jsx)(A, {
							value: "settings",
							className: "!flex-1",
							children: n === "mobile" ? "Mobile settings" : "Settings"
						}),
						s && /* @__PURE__ */ (0, J.jsx)(A, {
							value: "debug",
							className: "!flex-1",
							children: "Debug"
						})
					]
				}),
				/* @__PURE__ */ (0, J.jsx)(Y, {
					tab: "settings",
					children: /* @__PURE__ */ (0, J.jsx)(at, {
						brick: e,
						section: o,
						hasTabs: f
					})
				}),
				d && /* @__PURE__ */ (0, J.jsx)(Y, {
					tab: "content",
					children: /* @__PURE__ */ (0, J.jsx)(ot, {
						brick: e,
						section: o,
						hasTabs: f
					})
				}),
				s && /* @__PURE__ */ (0, J.jsx)(Y, {
					tab: "debug",
					children: /* @__PURE__ */ (0, J.jsx)(it, {
						brick: e,
						section: o,
						hasTabs: f
					})
				})
			]
		})]
	}, `brick-inspector-${e.id}`) : (console.warn(`No section found for brick: ${e.id}`), null);
}
function it({ brick: e, section: t, hasTabs: n }) {
	let r = S(x({
		display: "block",
		fontFamily: "monospace",
		fontSize: "0.7rem",
		lineHeight: "1.3",
		wordWrap: "break-word",
		whiteSpace: "pre-wrap"
	})), { getParentBrick: i } = y(), a = i(e.id);
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "flex flex-col h-full",
		children: [/* @__PURE__ */ (0, J.jsxs)("div", {
			className: "h-[50cqh] grow-0 overflow-y-auto scrollbar-thin",
			children: [
				/* @__PURE__ */ (0, J.jsxs)(Q, { children: ["Brick ", /* @__PURE__ */ (0, J.jsx)("code", {
					className: "text-xs cursor-text select-all",
					children: e.id
				})] }),
				/* @__PURE__ */ (0, J.jsx)("div", {
					className: "flex-1 ",
					children: /* @__PURE__ */ (0, J.jsx)("pre", {
						className: "p-1",
						children: /* @__PURE__ */ (0, J.jsx)("code", {
							className: r,
							children: JSON.stringify(e, null, 2)
						})
					})
				}),
				a && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsxs)(Q, { children: ["Parent Brick ", /* @__PURE__ */ (0, J.jsx)("code", {
					className: "text-xs",
					children: a.id
				})] }), /* @__PURE__ */ (0, J.jsx)("div", {
					className: "flex-1 ",
					children: /* @__PURE__ */ (0, J.jsx)("pre", {
						className: "p-1",
						children: /* @__PURE__ */ (0, J.jsx)("code", {
							className: r,
							children: JSON.stringify(a, null, 2)
						})
					})
				})] }),
				/* @__PURE__ */ (0, J.jsxs)(Q, { children: ["Section ", /* @__PURE__ */ (0, J.jsx)("code", {
					className: "text-xs",
					children: t.id
				})] }),
				/* @__PURE__ */ (0, J.jsx)("div", {
					className: "flex-1 ",
					children: /* @__PURE__ */ (0, J.jsx)("pre", {
						className: "p-1",
						children: /* @__PURE__ */ (0, J.jsx)("code", {
							className: r,
							children: JSON.stringify(t, null, 2)
						})
					})
				})
			]
		}), /* @__PURE__ */ (0, J.jsx)($, {
			brick: e,
			section: t,
			className: S(n ? "h-[calc(50cqh-58px)]" : "h-[50cqh]")
		})]
	});
}
function at({ brick: e, section: t, hasTabs: r }) {
	let a = i();
	z(e.type);
	let { deleteBrick: o } = y(), { deselectBrick: s, hidePanel: c } = n();
	return /* @__PURE__ */ (0, J.jsxs)("form", {
		className: S("flex flex-col h-full"),
		onSubmit: (e) => e.preventDefault(),
		children: [
			a === "mobile" && /* @__PURE__ */ (0, J.jsx)(I, {
				size: "1",
				children: /* @__PURE__ */ (0, J.jsxs)(F, {
					size: "1",
					children: [/* @__PURE__ */ (0, J.jsx)("strong", { children: "Note" }), ": You are editing mobile-only styles. Any changes here will only affect how the brick appears on mobile devices."]
				})
			}),
			/* @__PURE__ */ (0, J.jsxs)("div", {
				className: "basis-[50%] shrink-0 grow flex flex-col",
				children: [/* @__PURE__ */ (0, J.jsx)(et, { brick: e }), /* @__PURE__ */ (0, J.jsx)("div", {
					className: "flex flex-col gap-2 p-2 border-t border-gray-200",
					children: /* @__PURE__ */ (0, J.jsx)(he, {
						type: "button",
						size: "1",
						color: "red",
						radius: "medium",
						variant: "soft",
						onClick: () => {
							o(e.id), s(e.id), c("inspector");
						},
						children: "Delete brick"
					})
				})]
			}),
			/* @__PURE__ */ (0, J.jsx)($, {
				brick: e,
				section: t,
				className: S(r ? "h-[calc(50cqh-58px)]" : "h-[50cqh]")
			})
		]
	});
}
function ot({ brick: e, section: t, hasTabs: r }) {
	let { deleteBrick: i } = y(), { deselectBrick: a, hidePanel: o } = n();
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: S("flex flex-col h-full"),
		children: [/* @__PURE__ */ (0, J.jsxs)("div", {
			className: "basis-[50%] shrink-0 grow flex flex-col",
			children: [/* @__PURE__ */ (0, J.jsx)(et, {
				brick: e,
				label: "content",
				categoryFilter: (e) => e === "content"
			}), /* @__PURE__ */ (0, J.jsx)("div", {
				className: "flex flex-col gap-2 p-2",
				children: /* @__PURE__ */ (0, J.jsx)(he, {
					type: "button",
					size: "1",
					color: "red",
					variant: "soft",
					radius: "medium",
					onClick: () => {
						i(e.id), a(e.id), o("inspector");
					},
					children: "Delete brick"
				})
			})]
		}), /* @__PURE__ */ (0, J.jsx)($, {
			brick: e,
			section: t,
			className: S(r ? "h-[calc(50cqh-58px)]" : "h-[50cqh]")
		})]
	});
}
function st({ section: e, group: t }) {
	let { updateSectionProps: n } = y(), r = i(), [a, o] = L("upstart:editor:show-advanced", !1), s = U((e) => (e.metadata?.["ui:responsive"] === void 0 || e.metadata?.["ui:responsive"] === !0 || e.metadata?.["ui:responsive"] === r) && (e["ui:responsive"] === void 0 || e["ui:responsive"] === !0 || e["ui:responsive"] === r) && (!e.metadata?.category || e.metadata?.category === "settings") && (!e["ui:advanced"] || a), [r, a]), c = G(() => Z(p.properties.props, s), [s]), l = G(() => {
		let t = ne(p.properties.props, r);
		return r === "mobile" ? V({}, t, e.props, e.mobileProps) : V({}, t, e.props ?? {});
	}, [
		r,
		e.props,
		e.mobileProps
	]), u = U((t, i) => {
		if (!i) {
			console.warn("propertyChangedPath is missing in style tab");
			return;
		}
		let a = structuredClone(e?.props ?? {});
		H(a, i, t[i]), console.log("SectionSettingsView onChange", { props: a }), n(e.id, a, r === "mobile");
	}, [
		e.id,
		r,
		n,
		e.props
	]);
	return /* @__PURE__ */ (0, J.jsx)(X, {
		title: "Section settings",
		initialGroup: t,
		navItems: c,
		formSchema: p.properties.props,
		className: "flex-grow",
		formData: l,
		onChange: u,
		brickId: e.id
	}, `section-settings-${e.id}-${r}`);
}
function ct({ section: e }) {
	i();
	let [t, n] = L("inspector_tabs_map", {}), r = t[e.id] ?? "settings";
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "flex flex-col flex-grow h-full",
		children: [/* @__PURE__ */ (0, J.jsx)(Q, { children: /* @__PURE__ */ (0, J.jsxs)("div", {
			className: "flex justify-between items-center group",
			children: [/* @__PURE__ */ (0, J.jsxs)("span", {
				className: "flex items-center",
				children: [
					/* @__PURE__ */ (0, J.jsx)(we, { className: "inline-block mr-2 w-5 h-5 text-upstart-600" }),
					"Section ",
					e.label ?? "unnamed"
				]
			}), /* @__PURE__ */ (0, J.jsx)("span", {
				className: S("text-xs font-mono lowercase opacity-0 group-hover:opacity-70 transition-opacity delay-1000"),
				onClick: () => {
					navigator.clipboard.writeText(e.id);
				},
				children: e.id
			})]
		}) }), /* @__PURE__ */ (0, J.jsx)(j, {
			value: r,
			onValueChange: (t) => {
				n((n) => ({
					...n,
					[e.id]: t
				}));
			},
			className: "flex-1 flex flex-col",
			children: /* @__PURE__ */ (0, J.jsx)(Y, {
				tab: "settings",
				children: /* @__PURE__ */ (0, J.jsx)(lt, { section: e })
			})
		})]
	}, `section-inspector-${e.id}`);
}
function lt({ section: e }) {
	let t = i();
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		className: "flex flex-col h-full",
		children: [
			t === "mobile" && /* @__PURE__ */ (0, J.jsx)(I, {
				size: "1",
				children: /* @__PURE__ */ (0, J.jsxs)(F, {
					size: "1",
					children: [/* @__PURE__ */ (0, J.jsx)("strong", { children: "Note" }), ": You are editing mobile-only styles. Any changes here will only affect how the brick appears on mobile devices."]
				})
			}),
			/* @__PURE__ */ (0, J.jsx)("div", {
				className: "basis-[50%] shrink-0 grow flex flex-col",
				children: /* @__PURE__ */ (0, J.jsx)(st, { section: e })
			}),
			/* @__PURE__ */ (0, J.jsx)($, {
				section: e,
				className: "h-[50cqh]"
			})
		]
	});
}
const ut = {
	basic: "Basic elements",
	widgets: "Widgets",
	media: "Media",
	container: "Containers & utilities",
	layout: "Layout"
};
function dt() {
	let { setMouseOverPanel: e } = n(), [t, r] = q(null);
	return /* @__PURE__ */ (0, J.jsxs)("div", {
		onMouseEnter: () => e(!0),
		onMouseLeave: () => e(!1),
		className: "flex flex-col h-full",
		children: [
			/* @__PURE__ */ (0, J.jsx)(Q, { children: "Library" }),
			/* @__PURE__ */ (0, J.jsx)("div", {
				className: "flex flex-col gap-3 flex-1",
				children: Object.entries(ut).map(([e, t]) => /* @__PURE__ */ (0, J.jsxs)("div", {
					className: "flex flex-col gap-2",
					children: [/* @__PURE__ */ (0, J.jsx)("div", {
						className: "text-xs font-bold uppercase text-gray-600 bg-upstart-50 px-3 py-2",
						children: t
					}), /* @__PURE__ */ (0, J.jsx)("div", {
						className: S("grid gap-1.5 mx-2"),
						style: { gridTemplateColumns: "repeat(auto-fill, minmax(66px, 1fr))" },
						children: Object.values(g).filter((t) => t.category === e && !t.hideInLibrary).filter((e) => !e.inlineDragDisabled).map((e, t) => /* @__PURE__ */ (0, J.jsx)(ft, {
							defaults: h[e.type],
							index: t,
							onMouseOver: (t) => {
								r(e);
							},
							onMouseLeave: () => r(null)
						}, e.type))
					})]
				}, e))
			}),
			/* @__PURE__ */ (0, J.jsx)("div", {
				className: S("mt-auto p-2 bg-upstart-50 font-normal text-upstart-700 text-xs rounded transition-opacity", t ? "opacity-100" : "opacity-0"),
				children: t?.description
			})
		]
	});
}
function ft(e) {
	let { defaults: { manifest: t }, index: n,...r } = e, [i, a] = q(D()), o = G(() => f(t.type), [i]), s = Ae({
		id: o.id,
		type: "library",
		data: {
			manifest: t,
			brick: o,
			fromLibrary: !0
		},
		feedback: "clone",
		index: 0
	});
	return W(() => {
		s.isDragging || a(D());
	}, [s.isDragging]), /* @__PURE__ */ (0, J.jsx)("div", {
		"data-brick-template-type": o.type,
		"data-brick-min-w": t.minWidth?.desktop,
		"data-brick-min-h": t.minHeight?.desktop,
		"data-brick-default-w": t.defaultWidth?.desktop,
		"data-brick-default-h": t.defaultHeight?.desktop,
		ref: s.ref,
		...r,
		className: S("rounded border border-upstart-100 hover:border-upstart-600 hover:bg-upstart-50 bg-white dark:bg-dark-700 !cursor-grab\n        active:!cursor-grabbing touch-none select-none pointer-events-auto draggable-brick group aspect-square\n        z-[99999] flex flex-col items-center justify-center", s.isDragging && "shadow-2xl border-upstart-600 scale-110"),
		...e,
		children: /* @__PURE__ */ (0, J.jsxs)("div", {
			className: S("flex-1 flex flex-col justify-center text-upstart-700 dark:text-upstart-400 items-center gap-1 rounded-[inherit]"),
			children: [/* @__PURE__ */ (0, J.jsx)(nt, { manifest: t }), /* @__PURE__ */ (0, J.jsx)("span", {
				className: S("text-center text-xs"),
				children: t.name
			})]
		})
	});
}
function pt({ className: e,...t }) {
	let { panel: s, panelPosition: c } = r(), l = i(), u = a(), d = o(), { togglePanelPosition: f, hidePanel: p } = n(), m = _(u);
	return !s || s === "inspector" && !m && !d ? null : /* @__PURE__ */ (0, J.jsx)("aside", {
		id: "floating-panel",
		className: S("z-[9999] fixed top-0 bottom-0 flex shadow-2xl overscroll-none         min-w-[360px] w-[360px] opacity-100\n        bg-white dark:bg-dark-900 border-upstart-200 dark:border-dark-700 overflow-visible", {
			"transition-all duration-100": !s,
			"left-0 border-r": c === "left",
			"right-0 border-l": c === "right",
			"-translate-x-full opacity-0": !s && c === "left",
			"translate-x-full": !s && c === "right"
		}),
		...t,
		children: /* @__PURE__ */ (0, J.jsxs)("div", {
			className: "flex-grow relative flex-col",
			children: [
				l === "desktop" && s === "library" && /* @__PURE__ */ (0, J.jsx)(dt, {}),
				s === "inspector" && m && /* @__PURE__ */ (0, J.jsx)(rt, { brick: m }),
				s === "inspector" && !m && d && /* @__PURE__ */ (0, J.jsx)(ct, { section: d }),
				s === "theme" && /* @__PURE__ */ (0, J.jsx)(Ye, {}),
				s === "settings" && /* @__PURE__ */ (0, J.jsx)(He, {}),
				s && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsx)(ge, {
					content: "Close panel",
					delayDuration: 500,
					children: /* @__PURE__ */ (0, J.jsx)("button", {
						type: "button",
						className: S("absolute z-[9999] aspect-square h-7 w-7 top-0 flex justify-center items-center bg-gradient-to-tr from-red-800 to-red-700 hover:(opacity-80 text-white) border border-t-0 border-red-900 text-white/90", c === "right" ? "-left-7 rounded-bl" : "-right-7 rounded-br"),
						onClick: () => {
							p();
						},
						children: /* @__PURE__ */ (0, J.jsx)(Ce, { className: "h-4 w-4" })
					})
				}), /* @__PURE__ */ (0, J.jsxs)("button", {
					type: "button",
					className: S("absolute z-[9999] aspect-square h-8 w-8 bottom-0 flex justify-center items-center bg-gray-100 hover:(bg-upstart-100 text-upstart-800) backdrop-blur-md border border-b-0 border-upstart-200 text-black/50", c === "right" ? "-left-8 rounded-tl border-r-0" : "-right-8 rounded-tr border-l-0"),
					onClick: () => {
						f();
					},
					children: [c === "right" && /* @__PURE__ */ (0, J.jsx)(be, { className: "h-5 w-5" }), c === "left" && /* @__PURE__ */ (0, J.jsx)(xe, { className: "h-5 w-5" })]
				})] })
			]
		})
	});
}
export { pt as default };

//# sourceMappingURL=Panel.1Qf6eayN.js.map