def append(name: str, label: str, value: str, sep: str = "|") -> list:
"""
Append a (label=value) entry to the specified cookie, ensuring no duplicates (label-based).
Useful for visited history, shopping cart items, etc.
"""
if not check_consent():
return []
raw = get(name, "")
items = raw.split(sep) if raw else []
label_norm = label.lower()
# Remove existing with same label
items = [v for v in items if not (v.split("=", 1)[0].lower() == label_norm)]
items.append(f"{label}={value}")
cookie_value = sep.join(items)
set(name, cookie_value)
return items