cask "tor-browser" do
  version "11.0.2"

  language "ar" do
    sha256 "963996deca4c4f16d74cc1195411fe5124c87b50a724478a45750f843601f7fe"
    "ar"
  end
  language "ca" do
    sha256 "eec3367865526242a79225aac89f0b1140f781189e0c2e8075ee7422500a33c9"
    "ca"
  end
  language "cs" do
    sha256 "1864f32ac49f303f59899dc66679c32fb7ed3662ba7fb2f05494a84d6471ac1c"
    "cs"
  end
  language "da" do
    sha256 "631c2837ba2b91bd9b16437883934ae96267e8a98822b11ab3f51567f6645188"
    "da"
  end
  language "de" do
    sha256 "061b21ba212f5dd23e6cfd44f7800b5ab690a7fb3ed9f619b890a08c2009102f"
    "de"
  end
  language "el" do
    sha256 "dbdec5bca45f47b895143b738516e715f192dd786071d01ff212770077a90529"
    "el"
  end
  language "en", default: true do
    sha256 "d560b510f747ed53117acd00f9ab18f2f65a7f6484e3e02ccda7bc13ca19521f"
    "en-US"
  end
  language "es-AR" do
    sha256 "2916f8b6692839e964a6e6a22ff73d9593a0986c3729b43579d32915fd2b3cb9"
    "es-AR"
  end
  language "es-ES" do
    sha256 "4b9f94d1ccdd7fd7cf87bf8c756ee3f92d81abbfd33732176863a46152a9bedd"
    "es-ES"
  end
  language "fa" do
    sha256 "be4525d9e4d488ba5e31c60bab9028f2d51e701cb0e41d8c586049d37c4c1eec"
    "fa"
  end
  language "fr" do
    sha256 "73b4db77248120c511cd5ba0f567aca6f04697f70d8f09acfd5d5b441834e577"
    "fr"
  end
  language "ga" do
    sha256 "b810940ab72e31a9a50580bef17c6aa339e2c05f22e1f7ee2a90698397269c57"
    "ga-IE"
  end
  language "he" do
    sha256 "8d6b460757e19e9e0c9a5525592be4e084d483f124382255b7fbbdc09e933b4d"
    "he"
  end
  language "hu" do
    sha256 "7f99b6981fbef13e6b0f90451aab85f6bdcd15fb044ef8ac5e2f9830fbdbd600"
    "hu"
  end
  language "id" do
    sha256 "9f50ec5922298b206086cb040f1dfd513908dfede96bff05651542b46b6e9873"
    "id"
  end
  language "is" do
    sha256 "97313362f0104c849f93066ace85079b4fcbb9a29607f2bcba671024c6994261"
    "is"
  end
  language "it" do
    sha256 "f029fc13e765cf9fc28955164928450ea7f8047e7d4cd0bf3d06a7b11b3046d3"
    "it"
  end
  language "ja" do
    sha256 "7d0869bd652a73f6382d7871447f46b2efb62f5124649082f98ef1cbbc15cc78"
    "ja"
  end
  language "ka" do
    sha256 "0749c758e643a1eaccba998015e114a65b8dd96fb01fe182b1a252b2e16ad92d"
    "ka"
  end
  language "ko" do
    sha256 "ff0b0ea2a8a1115aa75e88345f5c6b3a2f0c680c49b3832dffa1e1dab56765fe"
    "ko"
  end
  language "lt" do
    sha256 "d77493734f09aca5ee04647aca74b7cef7003ad575edd18e5a955297ac2ade63"
    "lt"
  end
  language "mk" do
    sha256 "690960c7732bfea9f96dd3931b2ae32bc5644cbb8b5336eeb3c30477b9ed2033"
    "mk"
  end
  language "ms" do
    sha256 "546713b27895f0c6504cab4103bf52ca2a6dc8fef911a867ef08b1ce5e501c0e"
    "ms"
  end
  language "nb" do
    sha256 "59453aafc805d8507150e413db2e7a418b2d0685fe27bed241604fe239372c6e"
    "nb-NO"
  end
  language "nl" do
    sha256 "975b144f520d7542263bd04920771ecb131f0b153e8d772650c63ac9525e8f8b"
    "nl"
  end
  language "pl" do
    sha256 "f19b7266d94723d12f2330b638a1b5b62e141cd2cb9b16367dc8e1edc49968f9"
    "pl"
  end
  language "pt" do
    sha256 "134945e87ea1bc4d83257df3b1f5fbd3f748f3955afea92bb2325c725e27278f"
    "pt-BR"
  end
  language "ro" do
    sha256 "d509b653cf9d4e3c16ddf5728efe668389b0a0208870c3cee70594125743de83"
    "ro"
  end
  language "ru" do
    sha256 "2c72736615abe34a0e1f36171797d58895bc56ed555a2ecf98b07d99ed4f6421"
    "ru"
  end
  language "sv" do
    sha256 "8d81f8875c067a17e1bc309d02850fc14d5825d70a6ba385b5f4c70bcbb1b05d"
    "sv-SE"
  end
  language "th" do
    sha256 "298a2397d07502631ecb87afe2f13cf4b1253feec29d699d94a75f68339c6bca"
    "th"
  end
  language "tr" do
    sha256 "95c9b22db55129c584f27ccab835e1650fd7489a691464eb0ae0007545ec713c"
    "tr"
  end
  language "vi" do
    sha256 "5457666c2e33168f2328728f6fe74da66bc224ccd939e66d89c75a1d3a6cb769"
    "vi"
  end
  language "zh-CN" do
    sha256 "abdd589129354ce03c84853e22a617a9579cd318aab8db83cb7990af9b4e73b7"
    "zh-CN"
  end
  language "zh-TW" do
    sha256 "2e13e3cd04e53f3062fb6e65d9cf8848ee1c5f8249e69a054c6717ec32036d09"
    "zh-TW"
  end

  url "https://dist.torproject.org/torbrowser/#{version}/TorBrowser-#{version}-osx64_#{language}.dmg"
  name "Tor Browser"
  desc "Web browser focusing on security"
  homepage "https://www.torproject.org/"

  livecheck do
    url "https://www.torproject.org/download/"
    strategy :page_match
    regex(%r{href=.*?/TorBrowser-(\d+(?:\.\d+)+)-osx64_.*\.dmg}i)
  end

  auto_updates true
  conflicts_with cask: "homebrew/cask-versions/tor-browser-alpha"

  app "Tor Browser.app"

  zap trash: [
    "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.mozilla.tor browser.sfl*",
    "~/Library/Application Support/TorBrowser-Data",
    "~/Library/Preferences/org.mozilla.tor browser.plist",
    "~/Library/Preferences/org.torproject.torbrowser.plist",
    "~/Library/SavedApplicationState/org.torproject.torbrowser.savedState",
  ]
end
