0) { if(vids[0].provider) streamProvider = String(vids[0].provider).toLowerCase(); if(!streamLink) { streamLink = vids[0].link; enhancedStreamLink = vids[0].link; streamLabel = vids[0].label; } if(!iframeSrc && enhancedStreamLink) iframeSrc = enhancedStreamLink; prepareFastStart(); applySmartlinkGate(); syncCfCaptchaForStream(); }" x-data="{
stream: '0',
isSharpened: false,
streamLink: 'https://zenix.best/embed/zenix?tmdb=81211&type=tv&lang=vf&season=1&episode=22&poster=https%3A%2F%2Fimage.tmdb.org%2Ft%2Fp%2Fw1280_and_h720_bestv2%2Fg74tHdgK6YlRu7Uf7AL7xmHdjl.jpg&defer_play=1&parent_gate=1',
streamLabel: 'Lecteur Gratuit 4K',
enhancedStreamLink: 'https://zenix.best/embed/zenix?tmdb=81211&type=tv&lang=vf&season=1&episode=22&poster=https%3A%2F%2Fimage.tmdb.org%2Ft%2Fp%2Fw1280_and_h720_bestv2%2Fg74tHdgK6YlRu7Uf7AL7xmHdjl.jpg&defer_play=1&parent_gate=1',
streamProvider: 'zenix_embed',
smartlinkClicks: 0,
iframeMobilePlayReady: false,
iframeMobilePlaying: false,
baseRequiredClicks: 2,
bonusRequiredClicks: 0,
smartlinkContentKey: 'content:339432',
isFastfluxPremium: false,
isOmegaPremium: false,
isPeachifyPremium: false,
isZenixEmbedStream() {
const p = (this.streamProvider || '').toLowerCase();
if (p) return p === 'zenix_embed';
const link = ((this.enhancedStreamLink || this.streamLink || '') + '').toLowerCase();
return link.includes('/embed/zenix');
},
isFastfluxStream() {
if (this.isZenixEmbedStream()) return false;
const p = (this.streamProvider || '').toLowerCase();
if (p) return p === 'fastflux';
if (this.isZenix4kVoStream() || this.isBetaStream() || this.isOmegaStream()) return false;
const label = (this.streamLabel || '').toLowerCase();
const link = ((this.enhancedStreamLink || this.streamLink || '') + '').toLowerCase();
if (label.includes('youtube')) return false;
const labelHit = ['fastflux','noctaflix','citron','source 1','source1'].some(k => label.includes(k));
const linkHit = ['citron-edge','embedo','blinkflux','swiftflow','falzey','cheksum','fastflux','drinkoflix','streamtrack','r2.dev','noctaflix','deliciouss','edge-n2'].some(k => link.includes(k));
const embedHit = link.includes('/embed/') && !link.includes('/embed-stream/') && !link.includes('/embed/zenix');
return labelHit || linkHit || embedHit;
},
isOmegaStream() {
const p = (this.streamProvider || '').toLowerCase();
if (p) return p === 'omega';
if (this.isBetaStream() || this.isZenix4kVoStream()) return false;
const label = (this.streamLabel || '').toLowerCase();
const link = ((this.enhancedStreamLink || this.streamLink || '') + '').toLowerCase();
return label.includes('omega') || label.includes('purstream') || label.includes('pulse')
|| link.includes('purstream') || link.includes('hls-proxy.php?purstream_relay') || link.includes('finepulfe')
|| link.includes('/embed-stream/');
},
isBetaStream() {
const p = (this.streamProvider || '').toLowerCase();
if (p) return p === 'beta';
if (this.isZenix4kVoStream()) return false;
const label = (this.streamLabel || '').toLowerCase();
const link = ((this.enhancedStreamLink || this.streamLink || '') + '').toLowerCase();
return label.includes('beta') || link.includes('naka_relay=1') || link.includes('nakastream.tv');
},
isZenix4kVoStream() {
const p = (this.streamProvider || '').toLowerCase();
if (p) return p === 'zenix4kvo';
const label = (this.streamLabel || '').toLowerCase();
const link = ((this.enhancedStreamLink || this.streamLink || '') + '').toLowerCase();
return label.includes('zenix 4k vo') || link.includes('zenix4kvo=1') || link.includes('zxcstream.xyz');
},
isGatedStream() {
// Zenix embed : smartlinks sur zenix.best, preload en arrière-plan pendant les pubs.
return this.isZenixEmbedStream() || this.isFastfluxStream() || this.isOmegaStream() || this.isBetaStream() || this.isZenix4kVoStream();
},
currentStreamFamily() {
if (this.isZenixEmbedStream()) return 'zenix_embed';
if (this.isZenix4kVoStream()) return 'zenix4kvo';
if (this.isBetaStream()) return 'beta';
if (this.isOmegaStream()) return 'omega';
if (this.isFastfluxStream()) return 'fastflux';
return '';
},
get currentStreamGateLabel() {
const f = this.currentStreamFamily();
if (f === 'zenix_embed') return 'Lecteur Gratuit 4K';
if (f === 'zenix4kvo') return 'Zenix 4K VO';
if (f === 'beta') return 'Beta';
if (f === 'omega') return 'Omega';
if (f === 'fastflux') return 'FastFlux';
return 'Lecteur';
},
streamUnlockStorageKey(family) {
const f = family || this.currentStreamFamily();
return 'zenix_sl_unlock:' + this.smartlinkContentKey + ':' + f;
},
// FastFlux / Omega / Beta : unlock en mémoire seulement (re-smartlinks après refresh).
unlockedStreamFamilies: {},
isStreamFamilyUnlocked(family) {
const f = family || this.currentStreamFamily();
if (!f) return true;
const gated = ['zenix_embed', 'fastflux', 'omega', 'beta', 'zenix4kvo'];
for (let i = 0; i < gated.length; i++) {
if (this.unlockedStreamFamilies[gated[i]]) return true;
}
return !!this.unlockedStreamFamilies[f];
},
isMobileDevice() {
const ua = navigator.userAgent || '';
if (/iPhone|iPad|iPod|Android|Mobile|webOS|BlackBerry|IEMobile|Opera Mini/i.test(ua)) return true;
if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1) return true;
try {
if (window.matchMedia && window.matchMedia('(pointer: coarse)').matches && navigator.maxTouchPoints > 0) return true;
} catch (e) {}
return false;
},
get smartlinkOverlayLimit() {
return this.requiredClicks;
},
otherSourcesUnlocked: false,
otherSourcesOpen: false,
otherSourcesPanelStyle: '',
toggleOtherSources() {
this.otherSourcesOpen = !this.otherSourcesOpen;
if (this.otherSourcesOpen) {
this.$nextTick(() => this.positionOtherSourcesPanel());
}
},
positionOtherSourcesPanel() {
const btn = this.$refs.otherSourcesBtn;
if (!btn) return;
const r = btn.getBoundingClientRect();
const w = Math.min(352, Math.max(260, window.innerWidth - 16));
let left = Math.min(Math.max(8, r.left), window.innerWidth - w - 8);
const maxH = Math.min(window.innerHeight * 0.72, 448);
const spaceBelow = window.innerHeight - r.bottom - 12;
const spaceAbove = r.top - 12;
if (spaceBelow >= 200 || spaceBelow >= spaceAbove) {
this.otherSourcesPanelStyle = 'position:fixed;z-index:99999;left:' + left + 'px;top:' + (r.bottom + 8) + 'px;width:' + w + 'px;max-height:' + maxH + 'px;';
} else {
this.otherSourcesPanelStyle = 'position:fixed;z-index:99999;left:' + left + 'px;bottom:' + (window.innerHeight - r.top + 8) + 'px;width:' + w + 'px;max-height:' + maxH + 'px;';
}
},
loadOtherSourcesUnlock() {
try {
// Persiste au refresh (même onglet) pour CE contenu uniquement.
this.otherSourcesUnlocked = sessionStorage.getItem('zenix_other_src_unlock:' + this.smartlinkContentKey) === '1';
} catch (e) {
this.otherSourcesUnlocked = false;
}
},
markOtherSourcesUnlock() {
this.otherSourcesUnlocked = true;
try {
sessionStorage.setItem('zenix_other_src_unlock:' + this.smartlinkContentKey, '1');
} catch (e) {}
},
markStreamUnlock() {
const gated = ['zenix_embed', 'fastflux', 'omega', 'beta', 'zenix4kvo'];
gated.forEach((g) => { this.unlockedStreamFamilies[g] = true; });
const f = this.currentStreamFamily();
try {
if (sessionStorage.getItem('zenix_giveaway_reported:' + this.smartlinkContentKey) !== '1') {
sessionStorage.setItem('zenix_giveaway_reported:' + this.smartlinkContentKey, '1');
this.reportWatchToday();
}
} catch (e) {}
},
reportWatchToday() {
try {
const token = (document.querySelector('meta[name=csrf-token]') || {}).content || '';
fetch('/ajax/giveaway/watched', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-CSRF-TOKEN': token
},
credentials: 'same-origin',
body: JSON.stringify({ content_key: this.smartlinkContentKey })
}).catch(function () {});
} catch (e) {}
},
onSmartlinksCompleted() {
this.markStreamUnlock();
try { window.dispatchEvent(new CustomEvent('zenix-smartlinks-done')); } catch (e) {}
if (this.isZenixEmbedStream()) {
this.triggerZenixEmbedPlay();
return;
}
if (this.isOmegaOrBetaStream()) this.prefetchEmbedHls();
if (this.isMobileDevice() && this.isGatedStream()) {
this.triggerPlay();
this.armIframeMobilePlay();
return;
}
this.triggerPlay();
},
needsSmartlinkOverlay() {
if (this.baseRequiredClicks === 0) return false;
if (this.needsCfCaptcha) return false;
if (!this.isGatedStream()) return false;
if (this.isStreamFamilyUnlocked()) return false;
return this.smartlinkClicks < this.smartlinkOverlayLimit;
},
applySmartlinkGate() {
if (this.baseRequiredClicks === 0) return;
this.loadOtherSourcesUnlock();
if (!this.isGatedStream()) {
// Autres sources : pas de smartlink, débloqué pour ce contenu (survit au refresh).
this.markOtherSourcesUnlock();
this.smartlinkClicks = Math.max(this.requiredClicks, 1);
return;
}
// Déjà débloqué pour CE lecteur uniquement → pas de re-pub au re-clic.
if (this.isStreamFamilyUnlocked()) {
this.smartlinkClicks = Math.max(this.requiredClicks, 1);
return;
}
this.smartlinkClicks = 0;
},
get requiredClicks() {
// Premium global → aucun smartlink
if (this.baseRequiredClicks === 0) return 0;
const label = (this.streamLabel || '').toLowerCase();
// Premium par lecteur → pas de smartlink sur ce lecteur
if (this.isFastfluxStream() && this.isFastfluxPremium) return 0;
if ((label.includes('omega') || label.includes('purstream')) && this.isOmegaPremium) return 0;
if (label.includes('peachify') && this.isPeachifyPremium) return 0;
// Non-premium : smartlinks sur TOUS les lecteurs (Omega inclus)
// Captcha CF reste séparé via needsCfCaptcha (FastFlux only)
return this.baseRequiredClicks + this.bonusRequiredClicks;
},
turnstileRendered: false,
turnstileLoadFailed: false,
turnstileWidgetId: null,
iframeLoaded: false,
playbackStarted: false,
iframeSrc: '',
switchingStream: false,
cfVerified: false,
turnstileOk: false,
turnstileToken: '',
get needsCfCaptcha() {
// Turnstile : desktop FastFlux uniquement (jamais sur mobile)
if (this.isMobileDevice()) return false;
if (false) return false;
if (this.isFastfluxPremium) return false;
if (!this.isFastfluxStream()) return false;
return !this.cfVerified;
},
fastStartPrepared: false,
fastStartWarmUrl: '',
init() {
this._lastStreamLink = this.streamLink || '';
this.$watch('streamLink', (val) => {
if (val && val !== this._lastStreamLink) {
this._lastStreamLink = val;
this.iframeLoaded = false;
this.playbackStarted = false;
if (!this.iframeSrc) this.iframeSrc = val;
this.applySmartlinkGate();
this.syncCfCaptchaForStream();
}
});
this.$watch('$wire.videos', videos => {
if (videos && videos.length > 0) {
if (videos[0].provider) this.streamProvider = String(videos[0].provider).toLowerCase();
if (!this.streamLink) {
this.streamLink = videos[0].link;
this.enhancedStreamLink = videos[0].link;
this.streamLabel = videos[0].label;
}
if (!this.iframeSrc && this.enhancedStreamLink) this.iframeSrc = this.enhancedStreamLink;
this.prepareFastStart();
this.applySmartlinkGate();
this.syncCfCaptchaForStream();
}
});
// Ensure warm-up runs on initial load even if $wire.videos is already populated
// ($watch only fires on changes, not initial value)
if (this.$wire.videos && this.$wire.videos.length > 0 && !this.streamLink) {
this.streamLink = this.$wire.videos[0].link;
this.enhancedStreamLink = this.$wire.videos[0].link;
this.streamLabel = this.$wire.videos[0].label;
this.prepareFastStart();
if (!this.iframeSrc && this.enhancedStreamLink) this.iframeSrc = this.enhancedStreamLink;
}
this.setupBonusSmartlink();
this.loadOtherSourcesUnlock();
this.prefetchZenixEmbedUrl();
this.$nextTick(() => {
if (this.isZenixEmbedStream()) {
this.enhancedStreamLink = this.withZenixEmbedMobile(this.enhancedStreamLink || this.streamLink);
this.streamLink = this.enhancedStreamLink;
if (!this.iframeSrc) this.iframeSrc = this.enhancedStreamLink;
}
this.applySmartlinkGate();
this.syncCfCaptchaForStream();
this.prepareFastStart();
// Premium / sans smartlink : compter le visionnage pour le giveaway
// (sinon reportWatchToday n'est jamais appelé car markContentUnlock
// ne part que après les pubs).
if (this.requiredClicks === 0) {
this.reportWatchToday();
}
if (this.requiredClicks === 0 || this.smartlinkClicks >= this.requiredClicks) {
try { window.dispatchEvent(new CustomEvent('zenix-smartlinks-done')); } catch (e) {}
if (this.isZenixEmbedStream()) {
this.$nextTick(() => this.triggerZenixEmbedPlay());
}
}
});
const self = this;
this._onPlaybackStarted = function (e) {
if (e.data !== 'zenix_playback_started') return;
self.playbackStarted = true;
self.iframeMobilePlayReady = false;
self.iframeMobilePlaying = true;
};
window.addEventListener('message', this._onPlaybackStarted);
this._onVisibilityResume = function () {
if (document.visibilityState !== 'visible') return;
if (!self.isMobileDevice() || !self.isGatedStream()) return;
if (self.smartlinkClicks < self.requiredClicks) return;
if (self.iframeMobilePlaying) return;
if (self.isZenixEmbedStream()) {
self.triggerZenixEmbedPlay();
return;
}
if (self.iframeMobilePlayReady) {
self.playIframeMobile();
return;
}
self.triggerPlay();
};
document.addEventListener('visibilitychange', this._onVisibilityResume);
},
syncCfCaptchaForStream() {
if (this.isMobileDevice() || false || this.isFastfluxPremium || !this.isFastfluxStream()) {
this.cfVerified = true;
this.turnstileRendered = true;
if (this.isMobileDevice() && this.isFastfluxStream()) {
try { $wire.watching('mobile_bypass'); } catch (e) {}
} else {
try { $wire.watching('premium_or_local_bypass'); } catch (e) {}
}
return;
}
// FastFlux non-premium desktop : captcha Cloudflare
this.cfVerified = false;
this.turnstileOk = false;
this.turnstileToken = '';
this.turnstileRendered = false;
this.turnstileLoadFailed = false;
this.renderTurnstile();
},
passCfCaptcha(token) {
this.cfVerified = true;
this.turnstileOk = true;
this.turnstileRendered = true;
try { $wire.watching(token || 'manual_verify'); } catch (e) {}
},
buildWarmUrl(link) {
try {
let u = new URL(link, window.location.origin);
let raw = '';
if (u.pathname.indexOf('/embed-stream/') === 0) {
raw = atob(u.pathname.split('/embed-stream/')[1].split('/')[0]);
} else if (u.pathname.indexOf('/api/hls-proxy.php') === 0) {
raw = u.href;
}
if (raw.indexOf('/api/hls-proxy.php') === -1) return '';
let hls = new URL(raw, window.location.origin);
hls.searchParams.set('warm', '1');
return hls.toString();
} catch (e) {
return '';
}
},
prepareFastStart() {
if (this.fastStartPrepared) return;
this.fastStartPrepared = true;
},
prefetchZenixEmbedUrl() {
try {
const videos = this.$wire.videos || [];
const embed = videos.find(function (v) {
return String(v.provider || '').toLowerCase() === 'zenix_embed'
|| String(v.link || '').toLowerCase().includes('/embed/zenix');
});
if (!embed || !embed.link) return;
const url = this.withZenixEmbedMobile(embed.link, 'zenix_embed');
if (!url) return;
const abs = new URL(url, window.location.origin).href;
if (document.querySelector('link[data-zx-embed-prefetch="1"]')) return;
const link = document.createElement('link');
link.rel = 'prefetch';
link.as = 'document';
link.href = abs;
link.setAttribute('data-zx-embed-prefetch', '1');
document.head.appendChild(link);
} catch (e) {}
},
canHotSwapStream(link) {
const l = String(link || '').toLowerCase();
return l.includes('/embed-stream/') || l.includes('hls-proxy') || l.includes('beta=1') || l.includes('purstream');
},
withZenixEmbedMobile(link, provider) {
const p = String(provider || this.streamProvider || '').toLowerCase();
const isEmbed = p === 'zenix_embed' || String(link || '').toLowerCase().includes('/embed/zenix');
if (!link || !isEmbed) return link || '';
try {
const u = new URL(link, window.location.origin);
if (this.isMobileDevice()) {
u.searchParams.set('embed_mobile', '1');
} else {
u.searchParams.delete('embed_mobile');
}
u.searchParams.set('defer_play', '1');
u.searchParams.set('parent_gate', '1');
return u.pathname + u.search;
} catch (e) {
return link;
}
},
selectStream(index, link, label, provider) {
this.otherSourcesOpen = false;
const prevFamily = this.currentStreamFamily();
const prev = this.enhancedStreamLink;
this.stream = String(index);
link = this.withZenixEmbedMobile(link || '', provider);
this.streamLink = link || '';
this.streamLabel = label || '';
this.enhancedStreamLink = link || '';
if (provider) this.streamProvider = String(provider).toLowerCase();
const newFamily = this.currentStreamFamily();
// Changement de lecteur (FF/Omega/Beta/4K) → reset compteur smartlink.
if (newFamily && prevFamily !== newFamily && !this.isStreamFamilyUnlocked(newFamily)) {
this.smartlinkClicks = 0;
}
try { window.__zenixUserPickedStream = true; } catch (ePick) {}
const iframe = document.getElementById('video-iframe');
const hotSwap = this.iframeLoaded && iframe && iframe.contentWindow
&& link && prev && link !== prev && this.canHotSwapStream(link) && this.canHotSwapStream(prev);
if (hotSwap) {
this.switchingStream = true;
this.applySmartlinkGate();
this.syncCfCaptchaForStream();
try {
iframe.contentWindow.postMessage({ type: 'zenix-switch-source', url: link }, '*');
} catch (eSw) {}
setTimeout(() => { this.switchingStream = false; }, 800);
if (this.isStreamFamilyUnlocked() && this.smartlinkClicks >= this.requiredClicks) {
this.$nextTick(() => this.triggerPlay());
}
return;
}
this.iframeSrc = link || '';
this.iframeLoaded = false;
this.playbackStarted = false;
this.fastStartPrepared = false;
this.resetIframeMobilePlay();
try {
var chip = document.getElementById('zenix-resume-chip');
if (chip) { chip.classList.add('zenix-resume-chip-hidden'); chip.hidden = true; }
} catch (e) {}
this.applySmartlinkGate();
this.syncCfCaptchaForStream();
this.prepareFastStart();
if (this.isOmegaOrBetaStream()) this.$nextTick(() => this.prefetchEmbedHls());
if (this.isZenixEmbedStream() && this.smartlinkClicks >= this.requiredClicks) {
this.$nextTick(() => this.triggerZenixEmbedPlay());
}
},
resetIframeMobilePlay() {
this.iframeMobilePlayReady = false;
this.iframeMobilePlaying = false;
const iframe = document.getElementById('video-iframe');
if (iframe) iframe.style.visibility = 'visible';
},
armIframeMobilePlay() {
const iframe = document.getElementById('video-iframe');
if (iframe) iframe.style.visibility = 'visible';
this.iframeMobilePlaying = false;
this.iframeMobilePlayReady = true;
},
playIframeMobile() {
if (this.iframeMobilePlaying || this._iframePlayLock) return;
this._iframePlayLock = true;
this.iframeMobilePlayReady = false;
this.prefetchEmbedHls();
this.triggerPlay();
const self = this;
setTimeout(function () { self._iframePlayLock = false; }, 1200);
},
isOmegaOrBetaStream() {
return this.isOmegaStream() || this.isBetaStream() || this.isZenix4kVoStream();
},
prefetchEmbedHls() {
if (!this.isOmegaOrBetaStream()) return;
const iframe = document.getElementById('video-iframe');
if (!iframe || !iframe.contentWindow) return;
try { iframe.contentWindow.postMessage('zenix-prefetch-hls', '*'); } catch (e) {}
},
triggerZenixEmbedPlay() {
if (this._triggerPlayLock) return;
const iframe = document.getElementById('video-iframe');
if (!iframe) return;
const self = this;
const fire = function () {
try {
iframe.contentWindow.postMessage({ type: 'zenix-parent-play' }, window.location.origin);
} catch (e) {}
};
this._triggerPlayLock = true;
setTimeout(function () { self._triggerPlayLock = false; }, 5000);
if (!iframe.contentWindow || !this.iframeLoaded) {
let waits = 0;
const waitIv = setInterval(function () {
waits++;
if ((self.iframeLoaded && iframe.contentWindow) || waits > 150) {
clearInterval(waitIv);
fire();
self._retryZenixParentPlay(iframe, 50);
}
}, 100);
return;
}
fire();
this._retryZenixParentPlay(iframe, 50);
},
_retryZenixParentPlay(iframe, maxAttempts) {
const self = this;
let attempts = 0;
const retry = function () {
attempts++;
if (self.playbackStarted || attempts > maxAttempts) return;
try {
iframe.contentWindow.postMessage({ type: 'zenix-parent-play' }, window.location.origin);
} catch (e2) {}
setTimeout(retry, 120);
};
setTimeout(retry, 120);
},
triggerPlay() {
if (this.isZenixEmbedStream()) {
this.triggerZenixEmbedPlay();
return;
}
if (this._triggerPlayLock || this.playbackStarted) return;
const iframe = document.getElementById('video-iframe');
if (!iframe || !iframe.contentWindow) return;
try {
const doc = iframe.contentDocument;
const v = doc && doc.getElementById('player');
if (v && !v.paused && (v.currentTime || 0) > 0.25) {
this.playbackStarted = true;
return;
}
} catch (eAlready) {}
this._triggerPlayLock = true;
const self = this;
setTimeout(function () { self._triggerPlayLock = false; }, 2500);
const kick = () => {
try {
if (typeof iframe.contentWindow.zenixStartPlayback === 'function') {
iframe.contentWindow.zenixStartPlayback();
return true;
}
} catch (e) {}
try {
const doc = iframe.contentDocument;
const video = doc && doc.getElementById('player');
if (video && !video.paused && video.currentTime > 0.3) return true;
const playBtn = doc && doc.getElementById('nocta-play-btn');
if (playBtn) {
playBtn.click();
return true;
}
if (video && typeof video.play === 'function') {
const p = video.play();
if (p && typeof p.catch === 'function') p.catch(function () {});
return true;
}
} catch (e) {}
return false;
};
if (kick()) return;
let attempts = 0;
const maxAttempts = 3;
const interval = 500;
const tryPlay = () => {
attempts++;
if (kick()) return;
if (attempts < maxAttempts) setTimeout(tryPlay, interval);
};
tryPlay();
},
setupBonusSmartlink() {
if (this.baseRequiredClicks === 0) return;
// base(2) + bonus(2) = 4 clics
this.bonusRequiredClicks = 2;
},
recordSmartlinkClick() {
try {
let raw = localStorage.getItem('zenix_smartlink_timestamps');
let data = raw ? JSON.parse(raw) : {};
data[this.smartlinkContentKey] = Date.now();
localStorage.setItem('zenix_smartlink_timestamps', JSON.stringify(data));
} catch(e) {}
},
renderTurnstile() {
if (this.isMobileDevice() || this.cfVerified) return;
let attempts = 0;
const self = this;
const tryRender = () => {
attempts++;
if (self.cfVerified || !self.needsCfCaptcha) return;
if (typeof turnstile === 'undefined') {
if (attempts < 40) setTimeout(tryRender, 250);
else console.warn('[Turnstile] script not loaded yet (adblock?)');
return;
}
const container = document.getElementById('zenix-ts-bg');
if (!container) {
if (attempts < 40) setTimeout(tryRender, 250);
return;
}
try {
if (self.turnstileWidgetId !== null) {
try { turnstile.remove(self.turnstileWidgetId); } catch (e) {}
self.turnstileWidgetId = null;
}
container.innerHTML = '';
self.turnstileWidgetId = turnstile.render(container, {
sitekey: '0x4AAAAAADAM-kpqntxYPQx1',
callback: (token) => {
self.turnstileToken = token || 'ok';
self.turnstileOk = true;
self.passCfCaptcha(token);
},
'error-callback': (code) => {
console.warn('[Turnstile] error', code);
// Ne PAS skip auto : on laisse le captcha visible + bouton secours
self.turnstileLoadFailed = true;
},
'expired-callback': () => {
self.cfVerified = false;
self.turnstileRendered = false;
self.renderTurnstile();
},
theme: 'light',
size: 'normal',
appearance: 'always',
execution: 'render'
});
self.turnstileRendered = true;
} catch (e) {
console.warn('[Turnstile] render exception', e);
self.turnstileLoadFailed = true;
}
};
// Attendre que l overlay soit visible avant render
requestAnimationFrame(() => setTimeout(tryRender, 50));
},
clickSmartlink() {
try {
var hint = document.getElementById('zenix-sl-hint');
if (hint) { hint.textContent = 'Pub ouverte — revenez ici apres validation.'; hint.style.display = 'block'; }
} catch (eHint) {}
// Smartlink_5 x2, puis FastFlux ou smartlink_6 selon lecteur.
const smartlinkRedirect = 'https://zenix.best/go/smartlink' + '?source=watch';
const fastfluxLink = 'https://interlinecustomroofingllc.com/4/65f2f91c0da689b260d90a4d85fc3247';
const bonusLink = 'https://maddenwiped.com/nw25h72af?key=843cad28901a3c126577af3c06c4b008';
let isFastFlux = this.isFastfluxStream();
const clickIndex = this.smartlinkClicks;
let targetUrl = smartlinkRedirect;
if (isFastFlux) {
if (clickIndex === 2) targetUrl = fastfluxLink;
else if (clickIndex >= 3) targetUrl = bonusLink;
} else if (clickIndex >= 2) {
targetUrl = bonusLink;
}
const openAdTab = () => {
try {
let win = window.open(targetUrl, '_blank');
if (!win || win.closed || typeof win.closed === 'undefined') {
let a = document.createElement('a');
a.href = targetUrl;
a.target = '_blank';
a.rel = 'noopener noreferrer';
document.body.appendChild(a);
a.click();
a.remove();
}
} catch (e) {}
};
// PROTECTION ANTI ABOUT:BLANK ET SAFARI POPUP BLOCKER
if (!targetUrl || targetUrl.trim() === '' || targetUrl.includes('about:blank')) {
this.smartlinkClicks++;
if (this.isOmegaOrBetaStream()) this.prefetchEmbedHls();
if (this.smartlinkClicks >= this.requiredClicks) {
this.onSmartlinksCompleted();
}
return;
}
const isLastClick = this.smartlinkClicks + 1 >= this.requiredClicks;
const mobileGated = this.isMobileDevice() && this.isGatedStream();
// Safari/iOS : lancer la lecture AVANT d'ouvrir l'onglet pub sur le
// dernier clic, sinon le geste utilisateur est perdu et play() échoue.
if (isLastClick && mobileGated) {
this.smartlinkClicks++;
this.markStreamUnlock();
try { window.dispatchEvent(new CustomEvent('zenix-smartlinks-done')); } catch (e) {}
if (this.isOmegaOrBetaStream()) this.prefetchEmbedHls();
this.triggerPlay();
this.armIframeMobilePlay();
setTimeout(openAdTab, 150);
return;
}
openAdTab();
this.smartlinkClicks++;
if (this.isOmegaOrBetaStream()) this.prefetchEmbedHls();
if (this.smartlinkClicks >= this.requiredClicks) {
this.onSmartlinksCompleted();
}
},
toggleHD(enabled) {
this.isSharpened = !!enabled;
}
}">
Coche le captcha si visible, puis clique ici.
Cliquez × fois sur Lire
Contenu gratuit · ça maintient les serveurs · aucune interruption
▶
Reprise à 0:00
Serveurs de lecture
Ouvrez « Autres sources » pour afficher tous les lecteurs.
-
-
Autres sources
24
Publicités externes — fermez-les puis revenez ici sans cliquer ailleurs.