with open('/app/working/workspaces/default/build_merged.js', 'r') as f:
    content = f.read()

# The issue: lines 380-381 have `makeTableFull(` but the headers + opening [ are missing
# We need to insert them between `makeTableFull(` and the first row `["Harga Transparan"`

# At line 381, we have: `                makeTableFull(`
# Followed immediately by: `                        ["Harga Transparan"...`

# Insert the missing headers and rows
old = """                makeTableFull(
                        ["Harga Transparan", "\\"No hidden fees\\" / \\"IDR 2.150.000 all-in\\" / \\"Pay after approval\\"", "Flado, Bali Visa Agency, Bahalap Uras"],
                        ["Simplicity", "\\"Easy online application\\" / \\"3 simple steps\\" / \\"Just send your passport\\"", "Rumaka, eVisa Bali, Flado"],
                        ["Multi-Language", "\\"We speak your language\\" / Russian-French-English team", "Bahalap Uras, Peak Solutions, Flado"],
                        ["Human Touch", "\\"Real people, not robots\\" / "Talk to our friendly team"", "Bali Visa Agency, Bahalap Uras"],
                        ["Community", "Telegram groups, customer WhatsApp communities", "Flado"],"""

new = """                makeTableFull(
                    ["Theme", "Contoh Copy", "Digunakan Oleh"],
                    [
                        ["Trust / Legitimasi", "\\"Licensed agency since 2006\\" / \\"12+ years experience\\" / \\"Trusted by 30.000+ clients\\"", "eVisa Bali, VISALF, Bali Visa Agency"],
                        ["Kecepatan", "\\"Visa approved in 5 days\\" / \\"Fast processing\\" / \\"Express service\\"", "Flado, Bali Visa Agency, Rumaka"],
                        ["Harga Transparan", "\\"No hidden fees\\" / \\"IDR 2.150.000 all-in\\" / \\"Pay after approval\\"", "Flado, Bali Visa Agency, Bahalap Uras"],
                        ["Simplicity", "\\"Easy online application\\" / \\"3 simple steps\\" / \\"Just send your passport\\"", "Rumaka, eVisa Bali, Flado"],
                        ["Multi-Language", "\\"We speak your language\\" / Russian-French-English team", "Bahalap Uras, Peak Solutions, Flado"],
                        ["Human Touch", "\\"Real people, not robots\\" / \\"Talk to our friendly team\\"", "Bali Visa Agency, Bahalap Uras"],
                        ["Community", "Telegram groups, customer WhatsApp communities", "Flado"],"""

if old in content:
    content = content.replace(old, new)
    print("Replaced successfully")
else:
    print("Pattern NOT FOUND in file")
    # Print what's there for debugging
    idx = content.find('makeTableFull(')
    if idx >= 0:
        print("makeTableFull found at position", idx)
        snippet = content[idx:idx+500]
        print("Context:", repr(snippet[:300]))

with open('/app/working/workspaces/default/build_merged.js', 'w') as f:
    f.write(content)
