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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Run Yris</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .pulse {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        .terminal-line {
            font-family: 'Courier New', monospace;
        }
        .blinking-cursor {
            animation: blink 1s step-end infinite;
        }
        @keyframes blink {
            from, to { opacity: 1; }
            50% { opacity: 0; }
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen flex items-center justify-center">
    <div class="container mx-auto px-4 max-w-4xl">
        <!-- Terminal Window -->
        <div class="bg-gray-800 rounded-lg shadow-xl overflow-hidden">
            <!-- Terminal Header -->
            <div class="bg-gray-700 px-4 py-3 flex items-center">
                <div class="flex space-x-2 mr-4">
                    <div class="w-3 h-3 rounded-full bg-red-500"></div>
                    <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
                    <div class="w-3 h-3 rounded-full bg-green-500"></div>
                </div>
                <div class="text-sm text-gray-300">Terminal - Running Yris</div>
            </div>
            
            <!-- Terminal Body -->
            <div class="p-4 font-mono text-sm">
                <div id="terminalContent" class="space-y-2">
                    <div class="terminal-line">$ yris --init</div>
                    <div class="terminal-line text-green-400">Initializing Yris environment...</div>
                    <div class="terminal-line">Checking system requirements:</div>
                    <div class="terminal-line ml-4">✓ RAM: 8GB available</div>
                    <div class="terminal-line ml-4">✓ Storage: 25GB free space</div>
                    <div class="terminal-line ml-4">✓ Network: Connected</div>
                    <div class="terminal-line text-green-400">System check passed</div>
                    <div class="terminal-line">Downloading Yris components (v2.4.1)...</div>
                    <div class="w-full bg-gray-700 rounded-full h-2.5 mt-2 mb-4">
                        <div id="progressBar" class="bg-green-500 h-2.5 rounded-full" style="width: 0%"></div>
                    </div>
                    <div id="dynamicOutput" class="space-y-2"></div>
                    <div class="flex items-center">
                        <span class="text-green-400 mr-2">$</span>
                        <span id="commandInput" class="flex-1 bg-transparent outline-none"></span>
                        <span class="blinking-cursor">|</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Status Panel -->
        <div class="mt-6 bg-gray-800 rounded-lg p-4">
            <div class="flex items-center justify-between mb-4">
                <h3 class="text-lg font-medium">Yris Execution Status</h3>
                <div class="flex items-center space-x-2">
                    <span id="statusIndicator" class="flex w-3 h-3 bg-yellow-500 rounded-full pulse"></span>
                    <span id="statusText" class="text-sm">Initializing</span>
                </div>
            </div>
            
            <div class="grid grid-cols-3 gap-4 text-sm">
                <div class="bg-gray-700 p-3 rounded">
                    <div class="text-gray-400 mb-1">Version</div>
                    <div id="versionInfo" class="font-medium">2.4.1</div>
                </div>
                <div class="bg-gray-700 p-3 rounded">
                    <div class="text-gray-400 mb-1">Process ID</div>
                    <div class="font-medium">#YR-2849</div>
                </div>
                <div class="bg-gray-700 p-3 rounded">
                    <div class="text-gray-400 mb-1">Time Elapsed</div>
                    <div id="timeElapsed" class="font-medium">00:00:00</div>
                </div>
            </div>
            
            <div class="mt-4 flex space-x-3">
                <button id="pauseBtn" class="px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 transition flex items-center">
                    <i class="fas fa-pause mr-2"></i> Pause
                </button>
                <button id="stopBtn" class="px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition flex items-center">
                    <i class="fas fa-stop mr-2"></i> Stop
                </button>
                <button id="logsBtn" class="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 transition flex items-center">
                    <i class="fas fa-scroll mr-2"></i> View Logs
                </button>
            </div>
        </div>
    </div>

    <!-- Logs Modal -->
    <div id="logsModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
        <div class="bg-gray-800 rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] flex flex-col">
            <div class="flex justify-between items-center border-b border-gray-700 px-6 py-4">
                <h3 class="text-lg font-medium">Yris Execution Logs</h3>
                <button id="closeLogsModal" class="text-gray-400 hover:text-gray-200">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div class="p-6 overflow-y-auto flex-1 font-mono text-sm bg-gray-900">
                <div id="logsContent" class="space-y-1">
                    <!-- Logs will be added here -->
                </div>
            </div>
            <div class="bg-gray-700 px-6 py-3 flex justify-between items-center">
                <div class="text-sm text-gray-400">
                    <span id="logCount">0</span> log entries
                </div>
                <div class="flex space-x-3">
                    <button id="exportLogs" class="px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-500 transition">
                        <i class="fas fa-download mr-1"></i> Export
                    </button>
                    <button id="clearLogs" class="px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-500 transition">
                        <i class="fas fa-trash mr-1"></i> Clear
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // DOM Elements
        const dynamicOutput = document.getElementById('dynamicOutput');
        const progressBar = document.getElementById('progressBar');
        const statusIndicator = document.getElementById('statusIndicator');
        const statusText = document.getElementById('statusText');
        const versionInfo = document.getElementById('versionInfo');
        const timeElapsed = document.getElementById('timeElapsed');
        const pauseBtn = document.getElementById('pauseBtn');
        const stopBtn = document.getElementById('stopBtn');
        const logsBtn = document.getElementById('logsBtn');
        const logsModal = document.getElementById('logsModal');
        const logsContent = document.getElementById('logsContent');
        const logCount = document.getElementById('logCount');
        const closeLogsModal = document.getElementById('closeLogsModal');
        const exportLogs = document.getElementById('exportLogs');
        const clearLogs = document.getElementById('clearLogs');

        // State
        let isRunning = true;
        let isPaused = false;
        let startTime = new Date();
        let logs = [];
        let progress = 0;
        let timerInterval;
        let executionInterval;

        // Format time
        function formatTime(seconds) {
            const hrs = Math.floor(seconds / 3600);
            const mins = Math.floor((seconds % 3600) / 60);
            const secs = seconds % 60;
            return `${hrs.toString().padStart(2, '0')}:${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
        }

        // Add log entry
        function addLog(message, type = 'info') {
            const timestamp = new Date().toISOString().split('T')[1].split('.')[0];
            const logEntry = {
                timestamp,
                message,
                type
            };
            
            logs.push(logEntry);
            logCount.textContent = logs.length;
            
            // Add to logs modal if open
            if (!logsModal.classList.contains('hidden')) {
                const logElement = document.createElement('div');
                logElement.className = `flex ${type === 'error' ? 'text-red-400' : type === 'warning' ? 'text-yellow-400' : 'text-gray-400'}`;
                logElement.innerHTML = `
                    <span class="mr-3">[${timestamp}]</span>
                    <span>${message}</span>
                `;
                logsContent.appendChild(logElement);
                logsContent.scrollTop = logsContent.scrollHeight;
            }
            
            return logEntry;
        }

        // Update timer
        function updateTimer() {
            const now = new Date();
            const elapsedSeconds = Math.floor((now - startTime) / 1000);
            timeElapsed.textContent = formatTime(elapsedSeconds);
        }

        // Simulate Yris execution
        function simulateExecution() {
            if (isPaused) return;
            
            progress += Math.random() * 5;
            if (progress > 100) progress = 100;
            progressBar.style.width = `${progress}%`;
            
            if (progress < 30) {
                statusText.textContent = "Initializing";
                statusIndicator.className = "flex w-3 h-3 bg-yellow-500 rounded-full pulse";
                
                if (Math.random() > 0.7) {
                    const messages = [
                        "Loading core modules...",
                        "Validating configuration...",
                        "Establishing secure connection...",
                        "Allocating system resources..."
                    ];
                    const message = messages[Math.floor(Math.random() * messages.length)];
                    addOutput(message);
                    addLog(message);
                }
            } 
            else if (progress < 70) {
                statusText.textContent = "Processing";
                statusIndicator.className = "flex w-3 h-3 bg-blue-500 rounded-full pulse";
                
                if (Math.random() > 0.8) {
                    const messages = [
                        "Processing data batch #" + Math.floor(Math.random() * 100),
                        "Optimizing performance...",
                        "Running analysis algorithms...",
                        "Generating intermediate results..."
                    ];
                    const message = messages[Math.floor(Math.random() * messages.length)];
                    addOutput(message);
                    addLog(message);
                }
            } 
            else {
                statusText.textContent = "Finalizing";
                statusIndicator.className = "flex w-3 h-3 bg-green-500 rounded-full pulse";
                
                if (Math.random() > 0.85) {
                    const messages = [
                        "Compressing output data...",
                        "Generating reports...",
                        "Cleaning up temporary files...",
                        "Finalizing execution sequence..."
                    ];
                    const message = messages[Math.floor(Math.random() * messages.length)];
                    addOutput(message);
                    addLog(message);
                }
            }
            
            if (progress >= 100) {
                completeExecution();
            }
        }

        // Add output to terminal
        function addOutput(message, isError = false) {
            const outputLine = document.createElement('div');
            outputLine.className = `terminal-line ${isError ? 'text-red-400' : 'text-gray-300'}`;
            outputLine.textContent = message;
            dynamicOutput.appendChild(outputLine);
        }

        // Complete execution
        function completeExecution() {
            clearInterval(executionInterval);
            isRunning = false;
            
            statusText.textContent = "Completed";
            statusIndicator.className = "flex w-3 h-3 bg-green-500 rounded-full";
            statusIndicator.classList.remove('pulse');
            
            addOutput("Yris execution completed successfully", false);
            addLog("Yris execution completed successfully");
            
            pauseBtn.disabled = true;
            stopBtn.disabled = true;
            
            // Show completion message
            setTimeout(() => {
                addOutput("Results saved to /var/yris/output/results_20240415.json");
                addOutput("To view full report: yris --report results_20240415");
            }, 1000);
        }

        // Stop execution
        function stopExecution() {
            clearInterval(executionInterval);
            isRunning = false;
            
            statusText.textContent = "Stopped";
            statusIndicator.className = "flex w-3 h-3 bg-red-500 rounded-full";
            statusIndicator.classList.remove('pulse');
            
            addOutput("Yris execution stopped by user", true);
            addLog("Execution stopped by user", "error");
            
            pauseBtn.disabled = true;
            stopBtn.disabled = true;
        }

        // Pause/resume execution
        function togglePause() {
            isPaused = !isPaused;
            
            if (isPaused) {
                statusText.textContent = "Paused";
                statusIndicator.className = "flex w-3 h-3 bg-yellow-500 rounded-full";
                statusIndicator.classList.remove('pulse');
                
                pauseBtn.innerHTML = '<i class="fas fa-play mr-2"></i> Resume';
                addOutput("Yris execution paused", false);
                addLog("Execution paused", "warning");
            } else {
                statusText.textContent = "Running";
                statusIndicator.className = "flex w-3 h-3 bg-blue-500 rounded-full pulse";
                
                pauseBtn.innerHTML = '<i class="fas fa-pause mr-2"></i> Pause';
                addOutput("Yris execution resumed", false);
                addLog("Execution resumed");
            }
        }

        // Initialize
        function init() {
            // Start timer
            timerInterval = setInterval(updateTimer, 1000);
            
            // Start execution simulation
            executionInterval = setInterval(simulateExecution, 800);
            
            // Add initial logs
            addLog("Starting Yris v2.4.1");
            addLog("System check completed");
            addLog("Initialization sequence started");
            
            // Event listeners
            pauseBtn.addEventListener('click', togglePause);
            stopBtn.addEventListener('click', stopExecution);
            
            logsBtn.addEventListener('click', () => {
                // Populate logs modal
                logsContent.innerHTML = '';
                logs.forEach(log => {
                    const logElement = document.createElement('div');
                    logElement.className = `flex ${log.type === 'error' ? 'text-red-400' : log.type === 'warning' ? 'text-yellow-400' : 'text-gray-400'}`;
                    logElement.innerHTML = `
                        <span class="mr-3">[${log.timestamp}]</span>
                        <span>${log.message}</span>
                    `;
                    logsContent.appendChild(logElement);
                });
                
                logsModal.classList.remove('hidden');
                document.body.style.overflow = 'hidden';
            });
            
            closeLogsModal.addEventListener('click', () => {
                logsModal.classList.add('hidden');
                document.body.style.overflow = 'auto';
            });
            
            exportLogs.addEventListener('click', () => {
                const dataStr = JSON.stringify(logs, null, 2);
                const dataUri = 'data:application/json;charset=utf-8,'+ encodeURIComponent(dataStr);
                
                const exportFileDefaultName = `yris-logs-${new Date().toISOString().slice(0,10)}.json`;
                
                const linkElement = document.createElement('a');
                linkElement.setAttribute('href', dataUri);
                linkElement.setAttribute('download', exportFileDefaultName);
                linkElement.click();
                
                addLog("Logs exported to " + exportFileDefaultName);
            });
            
            clearLogs.addEventListener('click', () => {
                if (confirm('Are you sure you want to clear all logs?')) {
                    logs = [];
                    logCount.textContent = '0';
                    logsContent.innerHTML = '';
                    addLog("Logs cleared");
                }
            });
            
            logsModal.addEventListener('click', (e) => {
                if (e.target === logsModal) {
                    logsModal.classList.add('hidden');
                    document.body.style.overflow = 'auto';
                }
            });
            
            // Simulate some initial output
            setTimeout(() => {
                addOutput("Yris v2.4.1 initialized");
                addOutput("Running on Node v16.14.2");
                addOutput("Platform: linux/x64");
            }, 500);
            
            setTimeout(() => {
                addOutput("Connected to database cluster (3 nodes)");
            }, 1500);
        }

        // Initialize when DOM is loaded
        document.addEventListener('DOMContentLoaded', init);
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Edespina/yris" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>