{% set newTitle = text_title|replace({'{title}': title, '{siteName}': siteName}) %}
{% set minify = productionMode ? '.min' : '' %}
<!DOCTYPE html>
<html lang="{{ lang }}">

	<head>
		<meta charset="utf-8">
		<base href="{{ baseURL }}">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		{% if isSSL %}
			<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
		{% endif %}
		{% if isDirectHost %}
			<meta name="referrer" content="same-origin">
		{% endif %}
		<meta name="robots" content="noindex">
		<meta name="googlebot" content="noindex">
		<meta name="description" content="{{ newTitle }}">
		<meta name="og:sitename" content="{{ siteName }}">
		<meta name="og:title" content='{{ title }}'>
		<meta name="og:description" content="{{ newTitle }}">
		<meta name="og:type" content="video.movie">
		<meta name="og:image" content="{{ poster }}">
		<meta name="twitter:card" content="summary_large_image">
		<meta name="twitter:title" content='{{ title }}'>
		<meta name="twitter:description" content="{{ newTitle }}">
		<meta name="twitter:image" content="{{ poster }}">
		<meta name="msapplication-TileColor" content="{{ themeColor }}">
		<meta name="theme-color" content="{{ themeColor }}">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<link rel="manifest" href="manifest.webmanifest">
		<link rel="mask-icon" href="assets/img/maskable_icon.png" color="#ffffff">
		<link rel="shortcut icon" href="favicon.ico" type="image/ico">
		<title>{{ newTitle }}</title>
		<link rel="preconnect" href="//t.dtscdn.com">
		<link rel="preconnect" href="//e.dtscout.com">
		<link rel="preconnect" href="//s4.histats.com">
		<link rel="preconnect" href="//s10.histats.com">
		<link rel="preconnect" href="//tags.bluekai.com">
		<link rel="preconnect" href="//www.gstatic.com">
		<link rel="preconnect" href="//fonts.gstatic.com">
		<link rel="preconnect" href="//www.googleapis.com">
		<link rel="preconnect" href="//www.googletagmanager.com">
		<link rel="preconnect" href="//www.google.com">
		<link rel="preconnect" href="//www.google-analytics.com">
		<link rel="preconnect" href="//static.cloudflareinsights.com">
		<link rel="preconnect" href="//googleusercontent.com">
		<link rel="preconnect" href="//lh3.googleusercontent.com">
		<link rel="preconnect" href="//drive-thirdparty.googleusercontent.com">
		<link rel="preconnect" href="//static.addtoany.com">
		<link rel="preconnect" href="//i0.wp.com">
		<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
		<link rel="stylesheet" href="assets/css/style-v3.2.min.css">
		{{ GA }}
		{{ GTM_Head }}
		<script src="//cdn.jsdelivr.net/npm/promise-polyfill@latest/dist/polyfill.min.js"></script>
		<script src="//cdn.jsdelivr.net/npm/url-polyfill@latest/url-polyfill.min.js"></script>
		<script src="assets/js/app-v3.js"></script>
		<script>
			var canRunAds = true, playerConfig = {{ playerConfig }};
			window.canRunAds = canRunAds;
		</script>
		<script src="//cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script>
	</head>

    <body class="bg-light h-100">
        {{ GTM_Body }}
        <div class="container bg-white rounded shadow py-5 my-5">
            <div class="row">
                <div class="col-12 text-center">
                    <h1 class="h3 mb-2" style="word-break: break-all;">Download {{ title }}</h1>
                </div>
                <div class="col-12 mb-2">{{ topBanner }}</div>
                <div class="col-12 col-md-9 mx-auto">
                    <div class="alert alert-success">To increase download speed in Chrome (Chromium based) browser, you just need to enable <strong>Parallel downloading</strong> feature in your <strong>chrome://flags</strong> setting page.</div>
                    <a href="{{ embedLink }}" class="btn btn-danger btn-block btn-watch" target="_blank">Watch {{ title }}</a>
                    <div id="dlWrapper" class="my-2"></div>
                </div>
                <div class="col-12 mt-2">{{ bottomBanner }}</div>
            </div>
        </div>
        {% if isError == false %}
            {% if servers|length > 1 %}
                <div id="server-list" style="display:none">
                    <button type="button" id="btnServer" onclick="$('#servers').toggle()">
                        <img src="assets/img/menu.png" alt="Servers">
                    </button>
                    <ul id="servers" style="display:none">
                        {% for i, val in servers %}
                            <li>
                                <a href="{{ val.url }}" class="{{ val.active ? 'active' : '' }}">
                                    <img src="assets/img/logo/{{ val.host }}.png" alt="{{ val.name }}" width="16" height="16"/>&nbsp;{{ val.name }}
                                </a>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            {% endif %}
            <script src="assets/js/download-v3{{ minify }}.js"></script>
        {% endif %}
		<script>
			if ("serviceWorker" in navigator) {
				navigator.serviceWorker
					.register('sw.js')
					.then(function(res) {
						console.debug("service worker registered")
					})
					.catch(function(err) {
						console.debug("service worker not registered", err)
					})
			}
		</script>
        {{ enableShare ? sharer : '' }}
		{{ Histats }}
		{{ PopupAds }}
    </body>
</html>
