PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "migrations" ("id" integer primary key autoincrement not null, "migration" varchar not null, "batch" integer not null);
INSERT INTO migrations VALUES(1,'0001_01_01_000000_create_users_table',1);
INSERT INTO migrations VALUES(2,'0001_01_01_000001_create_cache_table',1);
INSERT INTO migrations VALUES(3,'0001_01_01_000002_create_jobs_table',1);
INSERT INTO migrations VALUES(4,'2026_03_23_000003_create_study_xnote_tables',1);
INSERT INTO migrations VALUES(5,'2026_03_24_152259_create_cart_items_table',2);
INSERT INTO migrations VALUES(6,'2026_03_24_153450_add_profile_picture_to_users_table',3);
INSERT INTO migrations VALUES(7,'2026_03_25_232547_add_is_paid_to_notes_table',4);
INSERT INTO migrations VALUES(8,'2026_03_25_232547_create_note_access_table',4);
INSERT INTO migrations VALUES(9,'2026_06_03_184258_create_advertisements_table',5);
INSERT INTO migrations VALUES(10,'2026_07_08_115513_add_price_to_notes_table',6);
CREATE TABLE IF NOT EXISTS "users" ("id" integer primary key autoincrement not null, "name" varchar not null, "username" varchar not null, "email" varchar not null, "email_verified_at" datetime, "password" varchar not null, "is_admin" tinyint(1) not null default '0', "remember_token" varchar, "created_at" datetime, "updated_at" datetime, "profile_picture" varchar);
INSERT INTO users VALUES(1,'Admin User','admin','kowshiksingha555@gmail.com',NULL,'$2y$12$XgKXtJzMNi0/GZSLFV297u.BdyXc/gbVmmG5Z4aXrziXYwEuV8mla',1,'A6wUa5opuuRk5bu8zoaennHPZ6awHvfMQ8orxkJ5ej3MxdftQyDcmbmKXZUQ','2026-03-24 13:24:03','2026-03-24 14:07:48',NULL);
INSERT INTO users VALUES(2,'sajnusg','idur0021','sajnushhossain.cse@gmail.com',NULL,'$2y$12$5ucns3IscRkIwFKELmenUutq0seIyPXh.MqALTDTcnGBqAlyvKqIS',0,'mulhCZLWvnfMmwPtlVgXXW3dPH63x15ojxHS4SUrB1qb0KSWwGdMiZEG5CES','2026-03-24 14:08:18','2026-04-02 07:57:37','profile-pictures/cYMGl8LVJye6gck0ACAianQ6f2LHbCAueTDI2J7P.jpg');
INSERT INTO users VALUES(3,'taste name','taste0021','ronalddula1223@gmail.com',NULL,'$2y$12$8FgyUkG4dDoT464NKYOM5OIPMWxw6bMCf0nZGHhIDQUpFl.lO5w36',0,NULL,'2026-07-01 11:32:16','2026-07-01 11:32:31','profile-pictures/gJSZb9JPoHkanXuKq7RTsDuj90rYQOGlkQwSV7iW.jpg');
INSERT INTO users VALUES(4,'Sajnush Hossain','sajnushhossain.cse@gmail.com','sajnushhossain2019@gmail.com',NULL,'$2y$12$0AoyNS1sW.2n8VM3//9RkuwQnXHB1paY3MxpNlrOugAh9QzGhfIhG',0,'vYWLcbBIa4bGIChvSpybsjt01317i4ehj0MUblYDLqsYftMTi8Hy0z688vK2','2026-07-02 05:49:55','2026-07-02 11:44:00','profile-pictures/8bHus2nFiANEoFLC33LGSVgq5YxrYZ9nU35MTDts.jpg');
INSERT INTO users VALUES(5,'akash','akash0021','akash0021@gmail.com',NULL,'$2y$12$ygvtKgV.S/iKjNcLGiAW.uk0piCpyNpeUj6Jxpvm2piiF8BRcXCZa',0,NULL,'2026-07-08 11:47:31','2026-07-08 11:47:31',NULL);
CREATE TABLE IF NOT EXISTS "password_reset_tokens" ("email" varchar not null, "token" varchar not null, "created_at" datetime, primary key ("email"));
INSERT INTO password_reset_tokens VALUES('sajnushhossain.cse@gmail.com','$2y$12$tT18zFY1K9M5RapjFcGZNufZqCyxC0F3u8PLmf5n7b7Y2l/jUHHke','2026-03-24 14:09:26');
CREATE TABLE IF NOT EXISTS "sessions" ("id" varchar not null, "user_id" integer, "ip_address" varchar, "user_agent" text, "payload" text not null, "last_activity" integer not null, primary key ("id"));
INSERT INTO sessions VALUES('T4NfmF2i2BUOIuTR0VinePD9AKiDmVpTxzqhHFEx',1,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15','eyJfdG9rZW4iOiI5b0RMNkwzQ0VUM0tzMXVhT25HdXQxZXJiOHExRjhXV016SEhwd3l5IiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHBzOlwvXC9zdHVkeXhub3RlLnRlc3RcL2FkbWluXC91c2VycyIsInJvdXRlIjoiYWRtaW4udXNlcnMuaW5kZXgifSwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119LCJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI6MX0=',1783012373);
INSERT INTO sessions VALUES('dkmUYO5EdeiZlAwMhHwm81awi14rRBAUz4SDUim7',4,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36','eyJfdG9rZW4iOiJsb1NnemlKTkd5TzVESGJxeVV3TUE0UUNxU1o3bFA1TXFGUEFPUnFzIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHBzOlwvXC9zdHVkeXhub3RlLnRlc3RcL25vdGVzXC85Iiwicm91dGUiOiJub3Rlcy5zaG93In0sIl9mbGFzaCI6eyJvbGQiOltdLCJuZXciOltdfSwibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiOjR9',1783012376);
INSERT INTO sessions VALUES('ZktYIFUZFcGK1NyrbSJGAykuXpjRzeTMVgpQwCA4',NULL,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15','eyJfdG9rZW4iOiI4UWRtdmRaRHJrYlZLWmZLRHVzSlVNWGtaZXA3ZEs0ZW1oYUJjNFloIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHBzOlwvXC9zdHVkeXhub3RlLnRlc3QiLCJyb3V0ZSI6Im5vdGVzLmluZGV4In0sIl9mbGFzaCI6eyJvbGQiOltdLCJuZXciOltdfX0=',1783265049);
INSERT INTO sessions VALUES('xAaWgbsG5WaWqZOHfpumarFgBnevkVYuM0okArht',5,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15','eyJfdG9rZW4iOiI4Y1lYcHpRVGp3NDlJTkJTd0E2ODJEWTJNOVcycGhmanJJU2dIcFl0IiwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119LCJfcHJldmlvdXMiOnsidXJsIjoiaHR0cHM6XC9cL3N0dWR5eG5vdGUudGVzdCIsInJvdXRlIjoibm90ZXMuaW5kZXgifSwibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiOjV9',1783511879);
CREATE TABLE IF NOT EXISTS "cache" ("key" varchar not null, "value" text not null, "expiration" integer not null, primary key ("key"));
INSERT INTO cache VALUES('laravel-cache-kowshiksingha555@gmiail.com|127.0.0.1:timer','i:1774360919;',1774360919);
INSERT INTO cache VALUES('laravel-cache-kowshiksingha555@gmiail.com|127.0.0.1','i:1;',1774360919);
CREATE TABLE IF NOT EXISTS "cache_locks" ("key" varchar not null, "owner" varchar not null, "expiration" integer not null, primary key ("key"));
CREATE TABLE IF NOT EXISTS "jobs" ("id" integer primary key autoincrement not null, "queue" varchar not null, "payload" text not null, "attempts" integer not null, "reserved_at" integer, "available_at" integer not null, "created_at" integer not null);
CREATE TABLE IF NOT EXISTS "job_batches" ("id" varchar not null, "name" varchar not null, "total_jobs" integer not null, "pending_jobs" integer not null, "failed_jobs" integer not null, "failed_job_ids" text not null, "options" text, "cancelled_at" integer, "created_at" integer not null, "finished_at" integer, primary key ("id"));
CREATE TABLE IF NOT EXISTS "failed_jobs" ("id" integer primary key autoincrement not null, "uuid" varchar not null, "connection" text not null, "queue" text not null, "payload" text not null, "exception" text not null, "failed_at" datetime not null default CURRENT_TIMESTAMP);
CREATE TABLE IF NOT EXISTS "categories" ("id" integer primary key autoincrement not null, "name" varchar not null, "slug" varchar not null, "type" varchar not null, "created_at" datetime, "updated_at" datetime);
INSERT INTO categories VALUES(1,'Grade 10','grade-10','grade','2026-03-24 13:24:03','2026-03-24 13:24:03');
INSERT INTO categories VALUES(2,'Semester 1','semester-1','semester','2026-03-24 13:24:03','2026-03-24 13:24:03');
INSERT INTO categories VALUES(3,'tste111','tste111','grade','2026-03-24 14:23:08','2026-03-24 14:23:08');
INSERT INTO categories VALUES(4,'mmdf','mmdf','grade','2026-03-25 23:49:39','2026-03-25 23:49:39');
INSERT INTO categories VALUES(5,'image tasting','image-tasting','grade','2026-07-02 17:11:45','2026-07-02 17:11:45');
CREATE TABLE IF NOT EXISTS "notes" ("id" integer primary key autoincrement not null, "category_id" integer not null, "title" varchar not null, "content" text not null, "type" varchar not null, "view_count" integer not null default '0', "created_at" datetime, "updated_at" datetime, "is_paid" tinyint(1) not null default '0', "price" numeric, foreign key("category_id") references "categories"("id") on delete cascade);
INSERT INTO notes VALUES(1,1,'Biology: The Cell Structure','The cell is the basic structural, functional, and biological unit of all known organisms. Cells are the smallest units of life, and hence are often called the "building blocks of life". This note covers mitosis, meiosis, and the various organelles within eukaryotic cells.','text',132,'2026-03-24 13:24:03','2026-07-08 11:46:35',0,NULL);
INSERT INTO notes VALUES(2,2,'World History: Industrial Revolution','The Industrial Revolution was the transition to new manufacturing processes in Great Britain, continental Europe, and the United States, in the period from about 1760 to sometime between 1820 and 1840. This note details the social and economic changes that occurred during this pivotal era.','text',90,'2026-03-24 13:24:03','2026-03-24 14:08:49',0,NULL);
INSERT INTO notes VALUES(3,1,'Biology: The Cell Structure','The cell is the basic structural, functional, and biological unit of all known organisms. Cells are the smallest units of life, and hence are often called the "building blocks of life". This note covers mitosis, meiosis, and the various organelles within eukaryotic cells.','text',137,'2026-03-24 14:07:48','2026-07-02 11:43:11',0,NULL);
INSERT INTO notes VALUES(4,2,'World History: Industrial Revolution','The Industrial Revolution was the transition to new manufacturing processes in Great Britain, continental Europe, and the United States, in the period from about 1760 to sometime between 1820 and 1840. This note details the social and economic changes that occurred during this pivotal era.','text',95,'2026-03-24 14:07:48','2026-06-03 18:14:11',0,NULL);
INSERT INTO notes VALUES(5,3,'test','hello note, this is taste!!!','text',14,'2026-03-24 14:23:08','2026-07-01 17:52:01',0,NULL);
INSERT INTO notes VALUES(7,1,'test China',unistr('<x-app-layout>\u000d\u000a    <x-slot name="header">\u000d\u000a        <div class="flex flex-col md:flex-row md:items-center justify-between gap-4">\u000d\u000a            <div>\u000d\u000a                <h1 class="text-4xl font-black text-slate-900 tracking-tight font-outfit">Management Dashboard</h1>\u000d\u000a                <p class="text-slate-400 font-medium mt-1 italic uppercase tracking-widest text-[10px]">Administrative Overview</p>\u000d\u000a            </div>\u000d\u000a            <div class="flex items-center gap-3">\u000d\u000a                <div class="hidden md:flex flex-col items-end mr-4">\u000d\u000a                    <span class="text-xs font-black text-slate-900">{{ auth()->user()->name }}</span>\u000d\u000a                    <span class="text-[10px] font-bold text-indigo-500 uppercase tracking-tighter">System Administrator</span>\u000d\u000a                </div>\u000d\u000a                <a href="{{ route(''admin.notes.create'') }}" class="btn btn-indigo gap-2 px-6 shadow-indigo-200">\u000d\u000a                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M12 4v16m8-8H4" /></svg>\u000d\u000a                    New Entry\u000d\u000a                </a>\u000d\u000a            </div>\u000d\u000a        </div>\u000d\u000a    </x-slot>\u000d\u000a\u000d\u000a    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">\u000d\u000a        <!-- Stats Cards with hover effects and cleaner icons -->\u000d\u000a        <div class="bg-white p-8 rounded-[2rem] border border-slate-100 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 group">\u000d\u000a            <div class="w-14 h-14 bg-indigo-50 text-indigo-600 rounded-2xl flex items-center justify-center mb-6 group-hover:bg-indigo-600 group-hover:text-white transition-colors duration-300">\u000d\u000a                <svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>\u000d\u000a            </div>\u000d\u000a            <p class="text-[10px] font-black text-slate-400 uppercase tracking-[0.2em] mb-1">Total Repository</p>\u000d\u000a            <p class="text-3xl font-black text-slate-900 tabular-nums">{{ number_format($stats[''total_notes'']) }} <span class="text-xs font-bold text-slate-300 ml-1">Notes</span></p>\u000d\u000a        </div>\u000d\u000a\u000d\u000a        <div class="bg-white p-8 rounded-[2rem] border border-slate-100 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 group">\u000d\u000a            <div class="w-14 h-14 bg-emerald-50 text-emerald-600 rounded-2xl flex items-center justify-center mb-6 group-hover:bg-emerald-600 group-hover:text-white transition-colors duration-300">\u000d\u000a                <svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" /></svg>\u000d\u000a            </div>\u000d\u000a            <p class="text-[10px] font-black text-slate-400 uppercase tracking-[0.2em] mb-1">Global Reach</p>\u000d\u000a            <p class="text-3xl font-black text-slate-900 tabular-nums">{{ number_format($stats[''total_views'']) }} <span class="text-xs font-bold text-slate-300 ml-1">Views</span></p>\u000d\u000a        </div>\u000d\u000a\u000d\u000a        <!-- Student Access Control Card -->\u000d\u000a        <a href="{{ route(''admin.users.index'') }}" class="bg-indigo-600 p-8 rounded-[2rem] shadow-xl hover:shadow-indigo-200 hover:-translate-y-1 transition-all duration-300 group relative overflow-hidden">\u000d\u000a            <div class="absolute top-0 right-0 w-32 h-32 bg-white/10 rounded-full -mr-16 -mt-16 blur-2xl"></div>\u000d\u000a            <div class="w-14 h-14 bg-white/20 text-white rounded-2xl flex items-center justify-center mb-6 group-hover:bg-white group-hover:text-indigo-600 transition-all duration-300">\u000d\u000a                <svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>\u000d\u000a            </div>\u000d\u000a            <p class="text-[10px] font-black text-indigo-200 uppercase tracking-[0.2em] mb-1">Authorization</p>\u000d\u000a            <p class="text-2xl font-black text-white leading-tight">Manage Student <span class="block">Access</span></p>\u000d\u000a            <div class="mt-4 flex items-center gap-2 text-[10px] font-black text-white/60 uppercase tracking-widest">\u000d\u000a                Grant Access \u000d\u000a                <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M14 5l7 7-7 7" /></svg>\u000d\u000a            </div>\u000d\u000a        </a>\u000d\u000a\u000d\u000a        <div class="bg-white p-8 rounded-[2rem] border border-slate-100 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 group">\u000d\u000a            <div class="w-14 h-14 bg-amber-50 text-amber-600 rounded-2xl flex items-center justify-center mb-6 group-hover:bg-amber-600 group-hover:text-white transition-colors duration-300">\u000d\u000a                <svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z" /></svg>\u000d\u000a            </div>\u000d\u000a            <p class="text-[10px] font-black text-slate-400 uppercase tracking-[0.2em] mb-1">Subject Areas</p>\u000d\u000a            <p class="text-3xl font-black text-slate-900 tabular-nums">{{ number_format($stats[''total_categories'']) }} <span class="text-xs font-bold text-slate-300 ml-1">Topics</span></p>\u000d\u000a        </div>\u000d\u000a    </div>\u000d\u000a\u000d\u000a    <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">\u000d\u000a        <!-- Recent Notes Table-like view -->\u000d\u000a        <div class="lg:col-span-2 bg-white rounded-[2.5rem] border border-slate-100 shadow-sm overflow-hidden flex flex-col">\u000d\u000a            <div class="p-8 border-b border-slate-50 flex items-center justify-between bg-slate-50/30">\u000d\u000a                <h3 class="text-xl font-black text-slate-800 font-outfit">Recent Repository Entries</h3>\u000d\u000a                <a href="{{ route(''admin.notes.index'') }}" class="btn btn-secondary !py-2 !px-4 text-[10px] tracking-widest">Master List</a>\u000d\u000a            </div>\u000d\u000a            <div class="overflow-x-auto">\u000d\u000a                <table class="w-full text-left">\u000d\u000a                    <thead>\u000d\u000a                        <tr class="bg-slate-50/50">\u000d\u000a                            <th class="px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest">Entry Title</th>\u000d\u000a                            <th class="px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest">Classification</th>\u000d\u000a                            <th class="px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest">Status</th>\u000d\u000a                            <th class="px-8 py-4 text-[10px] font-black text-slate-400 uppercase tracking-widest">Actions</th>\u000d\u000a                        </tr>\u000d\u000a                    </thead>\u000d\u000a                    <tbody class="divide-y divide-slate-50">\u000d\u000a                        @foreach($recent_notes as $note)\u000d\u000a                            <tr class="hover:bg-slate-50/80 transition-colors group">\u000d\u000a                                <td class="px-8 py-5">\u000d\u000a                                    <div class="flex items-center gap-4 min-w-0">\u000d\u000a                                        <div class="w-10 h-10 bg-indigo-50 text-indigo-600 rounded-xl flex items-center justify-center font-black text-xs shrink-0 group-hover:bg-indigo-600 group-hover:text-white transition-all">\u000d\u000a                                            {{ substr($note->title, 0, 1) }}\u000d\u000a                                        </div>\u000d\u000a                                        <span class="text-sm font-bold text-slate-800 truncate" title="{{ $note->title }}">{{ $note->title }}</span>\u000d\u000a                                    </div>\u000d\u000a                                </td>\u000d\u000a                                <td class="px-8 py-5">\u000d\u000a                                    <span class="text-[10px] font-black text-slate-500 bg-slate-100 px-3 py-1 rounded-full uppercase tracking-wider">\u000d\u000a                                        {{ $note->category->name }}\u000d\u000a                                    </span>\u000d\u000a                                </td>\u000d\u000a                                <td class="px-8 py-5">\u000d\u000a                                    <div class="flex items-center gap-1.5">\u000d\u000a                                        <span class="w-2 h-2 bg-emerald-500 rounded-full shadow-[0_0_8px_rgba(16,185,129,0.5)]"></span>\u000d\u000a                                        <span class="text-[10px] font-bold text-slate-400 uppercase">Live</span>\u000d\u000a                                    </div>\u000d\u000a                                </td>\u000d\u000a                                <td class="px-8 py-5">\u000d\u000a                                    <div class="flex items-center gap-3">\u000d\u000a                                        <a href="{{ route(''admin.notes.edit'', $note) }}" class="p-2 bg-slate-50 text-slate-400 hover:text-indigo-600 hover:bg-white hover:shadow-md rounded-lg transition-all">\u000d\u000a                                            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>\u000d\u000a                                        </a>\u000d\u000a                                        <a href="{{ route(''notes.show'', $note) }}" class="p-2 bg-slate-50 text-slate-400 hover:text-emerald-600 hover:bg-white hover:shadow-md rounded-lg transition-all">\u000d\u000a                                            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" /></svg>\u000d\u000a                                        </a>\u000d\u000a                                    </div>\u000d\u000a                                </td>\u000d\u000a                            </tr>\u000d\u000a                        @endforeach\u000d\u000a                    </tbody>\u000d\u000a                </table>\u000d\u000a            </div>\u000d\u000a        </div>\u000d\u000a\u000d\u000a        <!-- Sidebar Activity/Popular -->\u000d\u000a        <div class="bg-slate-900 rounded-[2.5rem] p-8 shadow-2xl relative overflow-hidden group">\u000d\u000a            <!-- Decorative circle -->\u000d\u000a            <div class="absolute top-0 right-0 w-64 h-64 bg-indigo-600/10 rounded-full -mr-32 -mt-32 blur-3xl"></div>\u000d\u000a            \u000d\u000a            <div class="relative z-10 flex flex-col h-full">\u000d\u000a                <h3 class="text-xl font-black text-white font-outfit mb-8 flex items-center gap-3">\u000d\u000a                    <span class="w-2 h-2 bg-indigo-400 rounded-full"></span>\u000d\u000a                    High Performance\u000d\u000a                </h3>\u000d\u000a                \u000d\u000a                <div class="space-y-6 flex-grow">\u000d\u000a                    @foreach($top_notes as $index => $note)\u000d\u000a                        <div class="flex items-center justify-between group/item gap-4">\u000d\u000a                            <div class="flex items-center gap-4 min-w-0">\u000d\u000a                                <div class="text-xs font-black text-slate-700 tabular-nums shrink-0">0{{ $index + 1 }}</div>\u000d\u000a                                <div class="min-w-0">\u000d\u000a                                    <p class="text-sm font-bold text-slate-300 group-hover/item:text-white transition-colors truncate" title="{{ $note->title }}">{{ $note->title }}</p>\u000d\u000a                                    <p class="text-[10px] font-bold text-slate-500 uppercase">{{ number_format($note->view_count) }} Views</p>\u000d\u000a                                </div>\u000d\u000a                            </div>\u000d\u000a                            <div class="w-16 h-1 bg-slate-800 rounded-full overflow-hidden shrink-0">\u000d\u000a                                <div class="h-full bg-indigo-500 rounded-full group-hover/item:bg-indigo-400 transition-all duration-700" style="width: {{ ($note->view_count / max($top_notes->pluck(''view_count'')->toArray())) * 100 }}%"></div>\u000d\u000a                            </div>\u000d\u000a                        </div>\u000d\u000a                    @endforeach\u000d\u000a                </div>\u000d\u000a\u000d\u000a                <div class="mt-12 pt-8 border-t border-slate-800 text-center">\u000d\u000a                    <p class="text-[10px] font-black text-slate-500 uppercase tracking-widest mb-4">System Integrity</p>\u000d\u000a                    <div class="inline-flex items-center gap-2 px-4 py-2 bg-emerald-500/10 text-emerald-500 rounded-full text-[10px] font-black uppercase tracking-widest border border-emerald-500/20">\u000d\u000a                        <span class="w-1.5 h-1.5 bg-emerald-500 rounded-full animate-pulse"></span>\u000d\u000a                        Operational\u000d\u000a                    </div>\u000d\u000a                </div>\u000d\u000a            </div>\u000d\u000a        </div>\u000d\u000a    </div>\u000d\u000a</x-app-layout>'),'text',7,'2026-06-03 18:20:51','2026-07-01 17:51:52',1,NULL);
INSERT INTO notes VALUES(8,2,'test bd','abcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcd ddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabc dddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddddabcdddd  ','text',8,'2026-07-02 05:48:42','2026-07-02 11:43:25',1,NULL);
INSERT INTO notes VALUES(9,5,'mmm image taste','notes/volslnVSVPDzDm4xQPk6JVcqyOE539wHUhB8Plfu.jpg','image',5,'2026-07-02 17:11:45','2026-07-08 11:57:09',1,NULL);
CREATE TABLE IF NOT EXISTS "note_user" ("id" integer primary key autoincrement not null, "note_id" integer not null, "user_id" integer not null, "viewed_at" datetime not null default CURRENT_TIMESTAMP, "created_at" datetime, "updated_at" datetime, foreign key("note_id") references "notes"("id") on delete cascade, foreign key("user_id") references "users"("id") on delete cascade);
INSERT INTO note_user VALUES(1,2,2,'2026-03-24 14:08:49','2026-03-24 14:08:49','2026-03-24 14:08:49');
INSERT INTO note_user VALUES(2,3,2,'2026-03-24 15:23:49','2026-03-24 14:08:56','2026-03-24 15:23:49');
INSERT INTO note_user VALUES(3,3,1,'2026-07-02 11:43:11','2026-03-24 14:12:30','2026-07-02 11:43:11');
INSERT INTO note_user VALUES(4,5,1,'2026-06-03 18:21:13','2026-03-24 14:24:00','2026-06-03 18:21:13');
INSERT INTO note_user VALUES(5,5,2,'2026-03-25 23:50:11','2026-03-24 14:41:57','2026-03-25 23:50:11');
INSERT INTO note_user VALUES(6,4,2,'2026-03-24 15:27:22','2026-03-24 15:23:53','2026-03-24 15:27:22');
INSERT INTO note_user VALUES(9,1,2,'2026-04-02 07:56:39','2026-04-02 07:56:39','2026-04-02 07:56:39');
INSERT INTO note_user VALUES(10,7,1,'2026-06-03 18:29:28','2026-06-03 18:20:59','2026-06-03 18:29:28');
INSERT INTO note_user VALUES(11,1,3,'2026-07-01 11:32:49','2026-07-01 11:32:49','2026-07-01 11:32:49');
INSERT INTO note_user VALUES(12,8,4,'2026-07-02 05:52:50','2026-07-02 05:50:06','2026-07-02 05:52:50');
INSERT INTO note_user VALUES(13,8,1,'2026-07-02 11:43:25','2026-07-02 05:51:58','2026-07-02 11:43:25');
INSERT INTO note_user VALUES(14,9,4,'2026-07-02 17:12:56','2026-07-02 17:12:45','2026-07-02 17:12:56');
INSERT INTO note_user VALUES(15,1,1,'2026-07-08 11:46:35','2026-07-08 11:46:35','2026-07-08 11:46:35');
INSERT INTO note_user VALUES(16,9,5,'2026-07-08 11:57:09','2026-07-08 11:47:45','2026-07-08 11:57:09');
CREATE TABLE IF NOT EXISTS "cart_items" ("id" integer primary key autoincrement not null, "user_id" integer not null, "note_id" integer not null, "created_at" datetime, "updated_at" datetime, foreign key("user_id") references "users"("id") on delete cascade, foreign key("note_id") references "notes"("id") on delete cascade);
CREATE TABLE IF NOT EXISTS "note_access" ("id" integer primary key autoincrement not null, "user_id" integer not null, "note_id" integer not null, "created_at" datetime, "updated_at" datetime, foreign key("user_id") references "users"("id") on delete cascade, foreign key("note_id") references "notes"("id") on delete cascade);
INSERT INTO note_access VALUES(2,4,8,'2026-07-02 05:50:37','2026-07-02 05:50:37');
CREATE TABLE IF NOT EXISTS "advertisements" ("id" integer primary key autoincrement not null, "title" varchar not null, "image_path" varchar not null, "target_url" varchar, "placement" varchar not null, "size" varchar not null, "is_active" tinyint(1) not null default '0', "created_at" datetime, "updated_at" datetime);
INSERT INTO sqlite_sequence VALUES('migrations',10);
INSERT INTO sqlite_sequence VALUES('users',5);
INSERT INTO sqlite_sequence VALUES('categories',5);
INSERT INTO sqlite_sequence VALUES('notes',9);
INSERT INTO sqlite_sequence VALUES('note_user',16);
INSERT INTO sqlite_sequence VALUES('note_access',3);
INSERT INTO sqlite_sequence VALUES('cart_items',1);
CREATE UNIQUE INDEX "users_username_unique" on "users" ("username");
CREATE UNIQUE INDEX "users_email_unique" on "users" ("email");
CREATE INDEX "sessions_user_id_index" on "sessions" ("user_id");
CREATE INDEX "sessions_last_activity_index" on "sessions" ("last_activity");
CREATE INDEX "cache_expiration_index" on "cache" ("expiration");
CREATE INDEX "cache_locks_expiration_index" on "cache_locks" ("expiration");
CREATE INDEX "jobs_queue_index" on "jobs" ("queue");
CREATE UNIQUE INDEX "failed_jobs_uuid_unique" on "failed_jobs" ("uuid");
CREATE UNIQUE INDEX "categories_slug_unique" on "categories" ("slug");
CREATE UNIQUE INDEX "cart_items_user_id_note_id_unique" on "cart_items" ("user_id", "note_id");
CREATE UNIQUE INDEX "note_access_user_id_note_id_unique" on "note_access" ("user_id", "note_id");
COMMIT;
