0) { streamLink = vids[0].link; enhancedStreamLink = vids[0].link; streamLabel = vids[0].label; prepareFastStart(); }" x-data="{
stream: '0',
isSharpened: false,
streamLink: '',
streamLabel: '',
enhancedStreamLink: '',
smartlinkClicks: 0,
baseRequiredClicks: 2,
bonusRequiredClicks: 0,
smartlinkContentKey: 'content:134314',
isFastfluxPremium: false,
isOmegaPremium: false,
isPeachifyPremium: false,
get requiredClicks() {
if (this.baseRequiredClicks === 0) return 0;
let label = this.streamLabel.toLowerCase();
if ((label.includes('fastflux') || label.includes('noctaflix')) && this.isFastfluxPremium) {
return 0;
}
if (label.includes('omega') && this.isOmegaPremium) {
return 0;
}
if (label.includes('peachify') && this.isPeachifyPremium) {
return 0;
}
return this.baseRequiredClicks + this.bonusRequiredClicks;
},
turnstileRendered: false,
turnstileLoadFailed: false,
fastStartPrepared: false,
fastStartWarmUrl: '',
init() {
this.$watch('$wire.videos', videos => {
if (videos && videos.length > 0 && !this.streamLink) {
this.streamLink = videos[0].link;
this.enhancedStreamLink = videos[0].link;
this.streamLabel = videos[0].label;
this.prepareFastStart();
}
});
// 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();
}
this.setupBonusSmartlink();
if (!false) {
this.renderTurnstile();
} else {
this.turnstileRendered = true;
$wire.watching('premium_or_local_bypass');
}
this.$nextTick(() => this.prepareFastStart());
},
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;
let warm = this.buildWarmUrl(this.streamLink);
if (warm) {
this.fastStartWarmUrl = warm;
fetch(warm, { credentials: 'omit', referrerPolicy: 'no-referrer', cache: 'no-store' }).catch(() => {});
}
},
triggerPlay() {
const iframe = document.getElementById('video-iframe');
if (!iframe || !iframe.contentWindow) return;
let attempts = 0;
let tryPlay = () => {
attempts++;
try {
if (typeof iframe.contentWindow.zenixStartPlayback === 'function') {
iframe.contentWindow.zenixStartPlayback();
return;
}
} catch (e) {}
if (attempts < 15) setTimeout(tryPlay, 300);
};
tryPlay();
},
setupBonusSmartlink() {
if (this.baseRequiredClicks === 0) return;
// Toujours activer le clic bonus pour imposer 3 clics permanents
this.bonusRequiredClicks = 1;
},
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.turnstileRendered) return;
let attempts = 0;
let checkAndRender = () => {
attempts++;
if (typeof turnstile !== 'undefined') {
const container = document.getElementById('turnstile-container-watch');
if (container) {
if (this.turnstileWidgetId !== null) {
try { turnstile.remove(this.turnstileWidgetId); } catch(e) {}
this.turnstileWidgetId = null;
}
container.innerHTML = '';
try {
this.turnstileWidgetId = turnstile.render(container, {
sitekey: '0x4AAAAAADAM-kpqntxYPQx1',
callback: (token) => {
this.turnstileRendered = true;
$wire.watching(token);
},
'error-callback': (code) => {
console.warn('[Cloudflare Turnstile] Code:', code);
this.turnstileLoadFailed = true;
this.turnstileRendered = true;
$wire.watching('premium_or_local_bypass');
},
'expired-callback': () => {
this.turnstileRendered = false;
this.renderTurnstile();
},
theme: 'dark',
size: 'normal',
appearance: 'always'
});
} catch(e) {
console.warn('[Cloudflare Turnstile] Exception:', e);
this.turnstileLoadFailed = true;
this.turnstileRendered = true;
$wire.watching('premium_or_local_bypass');
}
}
} else {
if (attempts > 8) {
// Si Turnstile est bloque par AdBlocker (net::ERR_BLOCKED_BY_CLIENT) ou ne charge pas apres 1.6s
console.warn('[Cloudflare Turnstile] Blocked or timed out, bypassing preloader.');
this.turnstileRendered = true;
$wire.watching('premium_or_local_bypass');
} else {
setTimeout(checkAndRender, 200);
}
}
};
checkAndRender();
},
clickSmartlink() {
const smartlink1 = 'https://maddenwiped.com/yr04e7nqcx?key=c37f662f23916722a61b3e15bfc8d016';
const smartlink2 = 'https://maddenwiped.com/p14ri1s4j?key=3e81dbe9fae343a4ac1f70d4e87c6720';
const fastfluxLink = 'https://northseize.com/ai/29267320/index.php';
let isFastFlux = false;
let currentLabel = (this.streamLabel || '').toLowerCase();
if (currentLabel.includes('fastflux') || currentLabel.includes('noctaflix')) {
isFastFlux = true;
}
let targetUrl = '';
if (this.smartlinkClicks === 0) {
targetUrl = smartlink1;
} else if (this.smartlinkClicks === 1) {
targetUrl = smartlink2;
} else {
targetUrl = isFastFlux ? fastfluxLink : smartlink1;
}
// PROTECTION ANTI ABOUT:BLANK ET SAFARI POPUP BLOCKER
if (!targetUrl || targetUrl.trim() === '' || targetUrl.includes('about:blank')) {
this.smartlinkClicks++;
if (this.smartlinkClicks >= this.requiredClicks) {
this.$nextTick(() => this.triggerPlay());
}
return;
}
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) {}
// Incrémente le compteur
setTimeout(() => {
this.smartlinkClicks++;
if (this.smartlinkClicks >= this.requiredClicks) {
this.$nextTick(() => this.triggerPlay());
}
}, 1100);
},
// Nouvelle fonction pour gérer l'état HD
toggleHD(enabled) {
this.isSharpened = enabled;
if (enabled) {
// Construire l'URL améliorée
const separator = this.enhancedStreamLink.includes('?') ? '&' : '?';
let enhancedSrc = this.enhancedStreamLink;
if (this.enhancedStreamLink.includes('purstream.store') || this.enhancedStreamLink.includes('purstream.mx')) {
enhancedSrc = this.enhancedStreamLink + separator + 'quality=1080p&rel=0&html5=1&modestbranding=1&enablejsapi=1&controls=1&preload=metadata';
} else if (this.enhancedStreamLink.includes('fastflux') || this.enhancedStreamLink.includes('noctaflix')) {
enhancedSrc = this.enhancedStreamLink + separator + 'quality=hd&rel=0&html5=1&modestbranding=1&enablejsapi=1&controls=1&preload=metadata';
} else {
enhancedSrc = this.enhancedStreamLink + separator + 'quality=1080p&rel=0&html5=1&modestbranding=1&enablejsapi=1&controls=1&preload=metadata';
}
this.enhancedStreamLink = enhancedSrc;
} else {
// Retirer les paramètres HD
this.enhancedStreamLink = this.enhancedStreamLink
.replace(/[?&](quality|rel|html5|modestbranding|enablejsapi|controls|preload)=[^&]*/g, '')
.replace(/[?&]+/g, '?')
.replace('?&', '?');
}
console.log('[Zenix HD] Mode HD:', enabled ? 'ACTIVÉ' : 'DÉSACTIVÉ');
}
}">
Fatigué des pubs ?
Débloque l'expérience Premium sur tous les lecteurs , gratuitement.
DÉBLOQUER PREMIUM 3H
Recherche des lecteurs disponibles
Quelques instants, nous interrogeons les serveurs de diffusion.
Chargement des lecteurs