__vite_ssr_exportName__("parseHashtags", () => { try { return parseHashtags } catch {} });
__vite_ssr_exportName__("formatHashtags", () => { try { return formatHashtags } catch {} });
/** Hashtags as typed in one text field: separated by spaces or commas, '#' optional. */
function parseHashtags(text) {
	const seen = new Set();
	const tags = [];
	for (const raw of text.split(/[\s,]+/)) {
		const body = raw.replace(/^#+/, "");
		if (body && !seen.has(body.toLowerCase())) {
			seen.add(body.toLowerCase());
			tags.push(`#${body}`);
		}
	};
	return tags;
};
function formatHashtags(tags) {
	return tags.map((tag) => tag.startsWith("#") ? tag : `#${tag}`).join(" ");
}

//# vitestCache=W3siZmlsZSI6IjEiLCJpZCI6IjEiLCJpbXBvcnRzIjoiMiIsIm1hcHBpbmdzIjpmYWxzZSwiZGVwcyI6IjMiLCJkeW5hbWljRGVwcyI6IjQiLCJzdGF0aWNNb2NrcyI6bnVsbCwiaGFzQ292ZXJhZ2VEYXRhIjpmYWxzZX0sIkQ6L0dpdEh1Yi9WaWNlQ3V0L3dlYi9zcmMvZmVhdHVyZXMvZWRpdC1jbGlwLWNvcHkvaGFzaHRhZ3MudHMiLHsidXJscyI6IjUiLCJpZHMiOiI2In0sW10sW10sW10se31d
//# vitestSourceMap={"version":3,"mappings":"AAAA,CAAA;;;AACO,SAAS,cAAc,MAAwB;CACpD,MAAM,OAAO,IAAI,IAAY;CAC7B,MAAM,OAAiB,CAAC;CACxB,KAAK,MAAM,OAAO,KAAK,MAAM,QAAQ,GAAG;EACtC,MAAM,OAAO,IAAI,QAAQ,OAAO,EAAE;EAClC,IAAI,QAAQ,CAAC,KAAK,IAAI,KAAK,YAAY,CAAC,GAAG;GACzC,KAAK,IAAI,KAAK,YAAY,CAAC;GAC3B,KAAK,KAAK,IAAI,MAAM;EACtB;CACF;CACA,OAAO;AACT;AAEO,SAAS,eAAe,MAAiC;CAC9D,OAAO,KAAK,KAAK,QAAS,IAAI,WAAW,GAAG,IAAI,MAAM,IAAI,KAAM,CAAC,CAAC,KAAK,GAAG;AAC5E","names":[],"ignoreList":[],"sources":["hashtags.ts"],"sourcesContent":["/** Hashtags as typed in one text field: separated by spaces or commas, '#' optional. */\nexport function parseHashtags(text: string): string[] {\n  const seen = new Set<string>();\n  const tags: string[] = [];\n  for (const raw of text.split(/[\\s,]+/)) {\n    const body = raw.replace(/^#+/, \"\");\n    if (body && !seen.has(body.toLowerCase())) {\n      seen.add(body.toLowerCase());\n      tags.push(`#${body}`);\n    }\n  }\n  return tags;\n}\n\nexport function formatHashtags(tags: readonly string[]): string {\n  return tags.map((tag) => (tag.startsWith(\"#\") ? tag : `#${tag}`)).join(\" \");\n}\n"],"file":"/web/src/features/edit-clip-copy/hashtags.ts"}