PageSourceSearch

https://www.ia-qa.com/assets/StorageInspectorPage-pF25mNc2.js

js ia-qa.com collected 2026-10-02 00:52:58 UTC 32,273 bytes, 26 lines download raw bytes

1import{r as p,j as e,L as ue}from"./index-DmgRjKOl.js";import{H as ye}from"./Helmet-DxPnZmrP.js";/* empty css                 */import{L as Se}from"./LikeButton-OoQcznMZ.js";import{S as be}from"./SuggestionBox-CE7CVxE3.js";import{C as je}from"./Canonical-DUOzHQEv.js";import{T as ke,t as ve}from"./toolExplanations-CpK62V5g.js";import{u as ze}from"./useShareLink-BgtxGr7r.js";import"./ToolActions-kRmVDrSy.js";/* empty css                        */const j=l=>{if(l===0)return"0 B";const x=1024,r=["B","KB","MB"],h=Math.floor(Math.log(l)/Math.log(x));return`${(l/Math.pow(x,h)).toFixed(2)} ${r[h]}`},we=()=>document.cookie.split(";").filter(x=>x.trim()).map(x=>{const[r,...h]=x.split("=");return{name:r.trim(),value:h.join("=").trim(),domain:window.location.hostname,path:"/",size:new Blob([x]).size,session:!0}}),Ce=()=>{const l=[];for(let x=0;x<localStorage.length;x++){const r=localStorage.key(x),h=localStorage.getItem(r);l.push({key:r,value:h,size:new Blob([r+h]).size,type:_(h)})}return l},Ne=()=>{const l=[];for(let x=0;x<sessionStorage.length;x++){const r=sessionStorage.key(x),h=sessionStorage.getItem(r);l.push({key:r,value:h,size:new Blob([r+h]).size,type:_(h)})}return l},_=l=>{try{return JSON.parse(l),"JSON"}catch{return/^\d+$/.test(l)?"Number":l==="true"||l==="false"?"Boolean":"String"}},q=l=>["lighthouseHistory","colorPaletteHistory","wheelPickerLists","llmReadabilityAudits","userPreferences","favorites","recentTools","likedTools","bugReports","decisionRecords","frictionMap"].some(r=>l.includes(r));function Oe(){const[l,x]=p.useState("cookies"),[r,h]=p.useState([]),[m,G]=p.useState([]),[y,K]=p.useState([]),[u,X]=p.useState(""),[k,v]=p.useState([]),[S,N]=p.useState(null),[W,D]=p.useState([]),[Y,R]=p.useState(!1),[g,C]=p.useState({key:"",value:""}),[A,Z]=p.useState(null),[ee,O]=p.useState(!1),{shareUrl:oe,isSharing:M,createShareLink:te}=ze(),f=p.useCallback(()=>{h(we()),G(Ce()),K(Ne())},[]);p.useEffect(()=>{f();const o=setInterval(f,2e3);return()=>clearInterval(o)},[f]),p.useEffect(()=>{const o=localStorage.getItem("storageInspectorScenarios");if(o)try{D(JSON.parse(o))}catch(t){console.error("Failed to load scenarios:",t)}},[]);const a=p.useMemo(()=>{const o=r.reduce((d,b)=>d+b.size,0),t=m.reduce((d,b)=>d+b.size,0),i=y.reduce((d,b)=>d+b.size,0),s=o+t+i,c=m.filter(d=>q(d.key)),n=c.reduce((d,b)=>d+b.size,0);return{cookies:{count:r.length,size:o},localStorage:{count:m.length,size:t},sessionStorage:{count:y.length,size:i},total:{count:r.length+m.length+y.length,size:s},iaQA:{count:c.length,size:n}}},[r,m,y]),B=p.useMemo(()=>r.filter(o=>o.name.toLowerCase().includes(u.toLowerCase())||o.value.toLowerCase().includes(u.toLowerCase())),[r,u]),F=p.useMemo(()=>m.filter(o=>o.key.toLowerCase().includes(u.toLowerCase())||o.value.toLowerCase().includes(u.toLowerCase())),[m,u]),U=p.useMemo(()=>y.filter(o=>o.key.toLowerCase().includes(u.toLowerCase())||o.value.toLowerCase().includes(u.toLowerCase())),[y,u]),T=o=>{document.cookie=`${o}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,f()},J=o=>{localStorage.removeItem(o),f()},P=o=>{sessionStorage.removeItem(o),f()},L=(o,t,i=7)=>{const s=new Date(Date.now()+i*24*60*60*1e3).toUTCString();document.cookie=`${o}=${t}; expires=${s}; path=/`,f()},$=(o,t)=>{localStorage.setItem(o,t),f()},E=(o,t)=>{sessionStorage.setItem(o,t),f()},se=(o,t,i,s)=>{o==="cookies"?(T(t),L(i,s)):o==="localStorage"?(t!==i&&localStorage.removeItem(t),localStorage.setItem(i,s)):o==="sessionStorage"&&(t!==i&&sessionStorage.removeItem(t),sessionStorage.setItem(i,s)),N(null),f()},ie=()=>{k.forEach(({type:o,key:t})=>{o==="cookies"?T(t):o==="localStorage"?J(t):o==="sessionStorage"&&P(t)}),v([]),f()},I=o=>{window.confirm(`Clear all ${o}? This cannot be undone!`)&&(o==="cookies"?r.forEach(t=>T(t.name)):o==="localStorage"?localStorage.clear():o==="sessionStorage"&&sessionStorage.clear(),f())},ae=()=>{const o={cookies:r.map(s=>({name:s.name,value:s.value})),localStorage:m.map(s=>({key:s.key,value:s.value})),sessionStorage:y.map(s=>({key:s.key,value:s.value})),exportedAt:new Date().toISOString(),url:window.location.href},t=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),i=document.createElement("a");i.href=URL.createObjectURL(t),i.download=`storage-export-${Date.now()}.json`,i.click(),URL.revokeObjectURL(i.href)}
1,ne=o=>{const t=o.target.files[0];if(!t)return;const i=new FileReader;i.onload=s=>{var c,n,d,b,H,V;try{const z=JSON.parse(s.target.result);window.confirm(`Import ${((c=z.cookies)==null?void 0:c.length)||0} cookies, ${((n=z.localStorage)==null?void 0:n.length)||0} localStorage items, and ${((d=z.sessionStorage)==null?void 0:d.length)||0} sessionStorage items?`)&&((b=z.cookies)==null||b.forEach(w=>L(w.name,w.value)),(H=z.localStorage)==null||H.forEach(w=>$(w.key,w.value)),(V=z.sessionStorage)==null||V.forEach(w=>E(w.key,w.value)),f())}catch(z){alert("Invalid JSON file: "+z.message)}},i.readAsText(t),o.target.value=""},le=()=>{const o=prompt("Scenario name:");if(!o)return;const t={id:Date.now(),name:o,cookies:r.map(s=>({name:s.name,value:s.value})),localStorage:m.map(s=>({key:s.key,value:s.value})),sessionStorage:y.map(s=>({key:s.key,value:s.value})),savedAt:new Date().toISOString()},i=[...W,t];D(i),localStorage.setItem("storageInspectorScenarios",JSON.stringify(i))},re=o=>{window.confirm(`Load scenario "${o.name}"? Current data will be replaced!`)&&(I("cookies"),I("localStorage"),I("sessionStorage"),setTimeout(()=>{var t,i,s;(t=o.cookies)==null||t.forEach(c=>L(c.name,c.value)),(i=o.localStorage)==null||i.forEach(c=>$(c.key,c.value)),(s=o.sessionStorage)==null||s.forEach(c=>E(c.key,c.value)),f()},100))},ce=o=>{const t=W.filter(i=>i.id!==o);D(t),localStorage.setItem("storageInspectorScenarios",JSON.stringify(t))},de=()=>{Z({cookies:[...r],localStorage:[...m],sessionStorage:[...y],takenAt:new Date().toISOString()}),O(!1)},pe=()=>{O(!0)},xe=async()=>{await te("storage-inspector",{analytics:a,cookies:r.slice(0,20),localStorage:m.slice(0,20),sessionStorage:y.slice(0,20),exportedAt:new Date().toISOString()})},ge=()=>e.jsxs("div",{className:"storage-inspector-table",children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"13px"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{background:"#f8fafc",borderBottom:"2px solid #e2e8f0"},children:[e.jsx("th",{style:{padding:"10px",textAlign:"left",width:"30px"},children:e.jsx("input",{type:"checkbox",onChange:o=>{o.target.checked?v(B.map(t=>({type:"cookies",key:t.name}))):v([])}})}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Name"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Value"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Size"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Domain"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Path"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Expires"}),e.jsx("th",{style:{padding:"10px",textAlign:"center"},children:"Actions"})]})}),e.jsx("tbody",{children:B.map((o,t)=>e.jsxs("tr",{style:{borderBottom:"1px solid #f1f5f9"},children:[e.jsx("td",{style:{padding:"8px"},children:e.jsx("input",{type:"checkbox",checked:k.some(i=>i.type==="cookies"&&i.key===o.name),onChange:i=>{i.target.checked?v([...k,{type:"cookies",key:o.name}]):v(k.filter(s=>!(s.type==="cookies"&&s.key===o.name)))}})}),e.jsx("td",{style:{padding:"8px",fontWeight:600,fontFamily:"monospace",fontSize:"12px"},children:o.name}),e.jsx("td",{style:{padding:"8px",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"monospace",fontSize:"11px"},children:o.value}),e.jsx("td",{style:{padding:"8px",color:"#64748b"},children:j(o.size)}),e.jsx("td",{style:{padding:"8px",color:"#64748b",fontSize:"11px"},children:o.domain}),e.jsx("td",{style:{padding:"8px",color:"#64748b",fontSize:"11px"},children:o.path}),e.jsx("td",{style:{padding:"8px",color:o.session?"#3b82f6":"#10b981",fontWeight:600,fontSize:"11px"},children:o.session?"Session":"Persistent"}),e.jsxs("td",{style:{padding:"8px",textAlign:"center"},children:[e.jsx("button",{onClick:()=>N({type:"cookies",key:o.name,value:o.value}),style:{padding:"4px 8px",fontSize:"11px",marginRight:"4px",cursor:"pointer",border:"1px solid #e2e8f0",borderRadius:"4px",background:"white"},children:"✏️"}),e.jsx("button",{onClick:()=>T(o.name),style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",border:"1px solid #fecaca",borderRadius:"4px",background:"#fef2f2",color:"#dc2626"},children:"🗑️"})]})]},t))})]}),B.length===0&&e.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#94a3b8"},children:u?"No cookies match your search":"No cookies found"})]}),Q=(o,t,i)=>e.jsxs("div",{className:"storage-inspector-table",children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"13px"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{background:"#f8fafc",borderBottom:"2px s
1olid #e2e8f0"},children:[e.jsx("th",{style:{padding:"10px",textAlign:"left",width:"30px"},children:e.jsx("input",{type:"checkbox",onChange:s=>{s.target.checked?v(o.map(c=>({type:t,key:c.key}))):v([])}})}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Key"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Value"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Type"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"Size"}),e.jsx("th",{style:{padding:"10px",textAlign:"left"},children:"IA-QA"}),e.jsx("th",{style:{padding:"10px",textAlign:"center"},children:"Actions"})]})}),e.jsx("tbody",{children:o.map((s,c)=>e.jsxs("tr",{style:{borderBottom:"1px solid #f1f5f9"},children:[e.jsx("td",{style:{padding:"8px"},children:e.jsx("input",{type:"checkbox",checked:k.some(n=>n.type===t&&n.key===s.key),onChange:n=>{n.target.checked?v([...k,{type:t,key:s.key}]):v(k.filter(d=>!(d.type===t&&d.key===s.key)))}})}),e.jsx("td",{style:{padding:"8px",fontWeight:600,fontFamily:"monospace",fontSize:"12px"},children:s.key}),e.jsx("td",{style:{padding:"8px",maxWidth:"400px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"monospace",fontSize:"11px"},children:s.value}),e.jsx("td",{style:{padding:"8px"},children:e.jsx("span",{style:{padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:700,background:s.type==="JSON"?"#dbeafe":s.type==="Number"?"#fef3c7":"#f3f4f6",color:s.type==="JSON"?"#1e40af":s.type==="Number"?"#92400e":"#1f2937"},children:s.type})}),e.jsx("td",{style:{padding:"8px",color:"#64748b"},children:j(s.size)}),e.jsx("td",{style:{padding:"8px"},children:q(s.key)&&e.jsx("span",{style:{fontSize:"16px"},children:"✅"})}),e.jsxs("td",{style:{padding:"8px",textAlign:"center"},children:[e.jsx("button",{onClick:()=>N({type:t,key:s.key,value:s.value}),style:{padding:"4px 8px",fontSize:"11px",marginRight:"4px",cursor:"pointer",border:"1px solid #e2e8f0",borderRadius:"4px",background:"white"},children:"✏️"}),e.jsx("button",{onClick:()=>i(s.key),style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",border:"1px solid #fecaca",borderRadius:"4px",background:"#fef2f2",color:"#dc2626"},children:"🗑️"})]})]},c))})]}),o.length===0&&e.jsx("div",{style:{textAlign:"center",padding:"40px",color:"#94a3b8"},children:u?`No ${t} items match your search`:`No ${t} items found`})]}),he=()=>e.jsxs("div",{style:{display:"grid",gap:"20px"},children:[e.jsx("div",{className:"storage-analytics-grid",children:[{label:"Total Items",count:a.total.count,size:a.total.size,color:"#f97316",icon:"📦"},{label:"Cookies",count:a.cookies.count,size:a.cookies.size,color:"#f59e0b",icon:"🍪"},{label:"localStorage",count:a.localStorage.count,size:a.localStorage.size,color:"#10b981",icon:"💾"},{label:"sessionStorage",count:a.sessionStorage.count,size:a.sessionStorage.size,color:"#3b82f6",icon:"⚡"}].map((o,t)=>e.jsxs("div",{style:{background:`${o.color}10`,border:`2px solid ${o.color}30`,borderRadius:"12px",padding:"20px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"32px",marginBottom:"8px"},children:o.icon}),e.jsx("div",{style:{fontSize:"28px",fontWeight:900,color:o.color},children:o.count}),e.jsx("div",{style:{fontSize:"13px",color:"#64748b",fontWeight:600,marginTop:"4px"},children:o.label}),e.jsx("div",{style:{fontSize:"12px",color:"#94a3b8",marginTop:"4px"},children:j(o.size)})]},t))}),e.jsxs("div",{style:{background:"white",border:"1px solid #e2e8f0",borderRadius:"12px",padding:"24px"},children:[e.jsx("h3",{style:{margin:"0 0 16px",fontSize:"16px",fontWeight:700},children:"📊 Storage Breakdown"}),e.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"16px"},children:[{label:"Cookies",size:a.cookies.size,color:"#f59e0b"},{label:"localStorage",size:a.localStorage.size,color:"#10b981"},{label:"sessionStorage",size:a.sessionStorage.size,color:"#3b82f6"}].map((o,t)=>{const i=a.total.size>0?o.size/a.total.size*100:0;return e.jsx("div",{style:{flex:i,background:o.color,height:"40px",borderRadius:"6px",position:"relative",minWidth:"60px"},children:i>10&&e.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:"11px",fontWeight:700},children:[i.toFixed(0),"%"]})},t)})}),e.jsx("div",{style:{display:"flex",gap:"16px",flexWrap:"wrap"},children:[{label:"Cookies",size:a.cookies.size,color:"#f59e0b"},{label:"localStorage",size:a.localStorage.size,color:"#10b981"},{label:"sessionStorage",size:a.sessionStorage.size,color:"#3b82f6"}].map((o,t)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"13px"},children:[e.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"3px",background:o.color}}),e.jsxs("span",{style:{fontWeight:600},children:[o.label,":"]}
1),e.jsx("span",{style:{color:"#64748b"},children:j(o.size)})]},t))})]}),e.jsxs("div",{style:{background:"#f0f9ff",border:"2px solid #bae6fd",borderRadius:"12px",padding:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:700,color:"#0c4a6e"},children:"🏗️ IA-QA Tools Data"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"24px",fontWeight:900,color:"#0369a1"},children:a.iaQA.count}),e.jsx("div",{style:{fontSize:"13px",color:"#075985"},children:"Storage items"})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"24px",fontWeight:900,color:"#0369a1"},children:j(a.iaQA.size)}),e.jsx("div",{style:{fontSize:"13px",color:"#075985"},children:"Total size"})]})]}),e.jsx("div",{style:{marginTop:"12px",fontSize:"12px",color:"#64748b"},children:"Tools detected: Lighthouse History, Color Palettes, Wheel Picker Lists, LLM Audits, User Preferences, etc."})]}),e.jsx("div",{style:{background:a.localStorage.size>4*1024*1024?"#fef2f2":"#f8fafc",border:`1px solid ${a.localStorage.size>4*1024*1024?"#fecaca":"#e2e8f0"}`,borderRadius:"8px",padding:"16px"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("span",{style:{fontSize:"24px"},children:a.localStorage.size>4*1024*1024?"⚠️":"ℹ️"}),e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:700,fontSize:"14px",color:a.localStorage.size>4*1024*1024?"#991b1b":"#3f3f46"},children:"Storage Limits"}),e.jsxs("div",{style:{fontSize:"13px",color:"#64748b",marginTop:"4px"},children:["localStorage: ",j(a.localStorage.size)," / ~5 MB max",a.localStorage.size>4*1024*1024&&e.jsx("span",{style:{color:"#dc2626",fontWeight:700,marginLeft:"8px"},children:"⚠️ Approaching limit!"})]})]})]})})]}),fe=()=>e.jsxs("div",{children:[e.jsxs("div",{className:"storage-tab-header",style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:0,fontSize:"16px",fontWeight:700},children:"💾 Saved Scenarios"}),e.jsx("button",{onClick:le,className:"tool-button",style:{padding:"8px 16px",margin:0},children:"💾 Save Current State"})]}),W.length===0&&e.jsxs("div",{className:"storage-empty-state",children:[e.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:"📦"}),e.jsx("h4",{style:{margin:"0 0 8px",color:"#3f3f46"},children:"No scenarios saved yet"}),e.jsx("p",{style:{margin:0,color:"#94a3b8",fontSize:"14px"},children:"Save your current storage state to quickly switch between different testing scenarios"})]}),e.jsx("div",{style:{display:"grid",gap:"12px"},children:W.map(o=>{var t,i,s;return e.jsxs("div",{className:"storage-scenario-card",children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:700,fontSize:"14px",color:"#09090b"},children:o.name}),e.jsxs("div",{style:{fontSize:"12px",color:"#64748b",marginTop:"4px"},children:[((t=o.cookies)==null?void 0:t.length)||0," cookies · ",((i=o.localStorage)==null?void 0:i.length)||0," localStorage · ",((s=o.sessionStorage)==null?void 0:s.length)||0," sessionStorage"]}),e.jsxs("div",{style:{fontSize:"11px",color:"#94a3b8",marginTop:"2px"},children:["Saved: ",new Date(o.savedAt).toLocaleString()]})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>re(o),style:{padding:"6px 14px",fontSize:"13px",fontWeight:700,cursor:"pointer",border:"1px solid #10b981",borderRadius:"6px",background:"#f0fdf4",color:"#166534"},children:"📂 Load"}),e.jsx("button",{onClick:()=>ce(o.id),style:{padding:"6px 14px",fontSize:"13px",fontWeight:700,cursor:"pointer",border:"1px solid #fecaca",borderRadius:"6px",background:"#fef2f2",color:"#dc2626"},children:"🗑️"})]})]},o.id)})})]}),me=()=>{if(!A||!ee)return null;const o=new Set([...m.map(n=>`local:${n.key}`),...y.map(n=>`session:${n.key}`),...r.map(n=>`cookie:${n.name}`)]),t=new Set([...A.localStorage.map(n=>`local:${n.key}`),...A.sessionStorage.map(n=>`session:${n.key}`),...A.cookies.map(n=>`cookie:${n.name}`)]),i=[...o].filter(n=>!t.has(n)),s=[...t].filter(n=>!o.has(n)),c=[...o].filter(n=>t.has(n));
1return e.jsxs("div",{style:{background:"white",border:"2px solid #e2e8f0",borderRadius:"12px",padding:"20px",marginTop:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 16px",fontSize:"16px",fontWeight:700},children:"🔍 Comparison with Snapshot"}),e.jsxs("div",{style:{fontSize:"12px",color:"#64748b",marginBottom:"16px"},children:["Snapshot taken: ",new Date(A.takenAt).toLocaleString()]}),e.jsxs("div",{className:"storage-comparison-grid",children:[e.jsxs("div",{style:{background:"#f0fdf4",border:"1px solid #bbf7d0",borderRadius:"8px",padding:"14px"},children:[e.jsx("div",{style:{fontSize:"24px",fontWeight:900,color:"#166534"},children:i.length}),e.jsx("div",{style:{fontSize:"13px",color:"#15803d",fontWeight:600},children:"Added"})]}),e.jsxs("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",borderRadius:"8px",padding:"14px"},children:[e.jsx("div",{style:{fontSize:"24px",fontWeight:900,color:"#991b1b"},children:s.length}),e.jsx("div",{style:{fontSize:"13px",color:"#b91c1c",fontWeight:600},children:"Removed"})]}),e.jsxs("div",{style:{background:"#f8fafc",border:"1px solid #e2e8f0",borderRadius:"8px",padding:"14px"},children:[e.jsx("div",{style:{fontSize:"24px",fontWeight:900,color:"#3f3f46"},children:c.length}),e.jsx("div",{style:{fontSize:"13px",color:"#64748b",fontWeight:600},children:"Unchanged"})]})]}),i.length>0&&e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("div",{style:{fontSize:"13px",fontWeight:700,color:"#166534",marginBottom:"6px"},children:"➕ Added:"}),e.jsx("div",{style:{fontSize:"12px",fontFamily:"monospace",color:"#15803d",lineHeight:1.8},children:i.map((n,d)=>e.jsx("div",{children:n},d))})]}),s.length>0&&e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("div",{style:{fontSize:"13px",fontWeight:700,color:"#991b1b",marginBottom:"6px"},children:"➖ Removed:"}),e.jsx("div",{style:{fontSize:"12px",fontFamily:"monospace",color:"#b91c1c",lineHeight:1.8},children:s.map((n,d)=>e.jsx("div",{children:n},d))})]})]})};return e.jsxs("div",{className:"tool-page storage-inspector-page",children:[e.jsxs(ye,{children:[e.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),e.jsx("title",{children:"Cookie & Storage Inspector - Browser Storage Manager | IA-QA"}),e.jsx("meta",{name:"description",content:"Inspect, edit and manage browser cookies, localStorage, and sessionStorage. Visual editor with CRUD operations, bulk actions, export/import, scenarios, and storage analytics. Debug auth flows and test storage states."}),e.jsx("meta",{name:"keywords",content:"cookie editor, localStorage inspector, sessionStorage manager, browser storage debugger, cookie viewer, storage tester, auth state manager, cookie manager, storage analytics, browser developer tools"}),e.jsx("meta",{property:"og:title",content:"Cookie & Storage Inspector - Visual Browser Storage Manager"}),e.jsx("meta",{property:"og:description",content:"Inspect, edit and manage browser cookies, localStorage, and sessionStorage. CRUD operations, scenarios, export/import, analytics, and comparison tools for testing and debugging."}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:"https://www.ia-qa.com/storage-inspector"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Cookie & Storage Inspector - Browser Storage Manager"}),e.jsx("meta",{name:"twitter:description",content:"Visual editor for cookies, localStorage, and sessionStorage. CRUD operations, scenarios, export/import, analytics. Debug auth flows and test storage states."}),e.jsx("script",{type:"application/ld+json",children:`{
2            "@context": "https://schema.org",
3            "@type": "WebApplication",
4            "name": "Cookie & Storage Inspector",
5            "description": "Visual browser storage management tool for cookies, localStorage, and sessionStorage with CRUD operations, scenarios, and analytics",
6            "url": "https://ia-qa.com/storage-inspector",
7            "applicationCategory": "DeveloperApplication",
8            "offers": {
9              "@type": "Offer",
10              "price": "0",
11              "priceCurrency": "USD"
12            },
13            "operatingSystem": "Any",
14            "featureList": [
15              "Cookie management",
16              "localStorage editor",
17              "sessionStorage editor",
18              "CRUD operations",
19              "Bulk delete",
20              "Export/Import JSON",
21              "Storage scenarios",
22              "Storage analytics",
23              "Snapshot comparison",
24              "Share links"
25            ]
26          }`})]}),e.jsx(je,{url:"https://www.ia-qa.com/storage-inspector"}),e.jsxs("div",{className:"tool-container",children:[e.jsx(ue,{to:"/home",className:"back-button",children:"← Back to Home"}),e.jsxs("div",{className:"tool-header",children:[e.jsx("h1",{className:"tool-title",children:"🍪 Cookie & Storage Inspector"}),e.jsx("p",{className:"tool-description",children:"Visual editor for cookies, localStorage, and sessionStorage. CRUD operations, scenarios, export/import, analytics, and comparison tools for testing and debugging."}
26),e.jsxs("div",{style:{display:"flex",gap:"15px",marginTop:"15px",flexWrap:"wrap"},children:[e.jsx(Se,{toolName:"storage-inspector"}),e.jsx(be,{toolName:"storage-inspector"})]})]}),e.jsx(ke,{...ve["storage-inspector"]}),e.jsx("div",{className:"tool-card",style:{background:"linear-gradient(135deg, #f97316 0%, #ea580c 100%)"},children:e.jsxs("div",{className:"storage-inspector-actions",children:[e.jsx("button",{onClick:ae,className:"tool-button",style:{margin:0,background:"white",color:"#f97316"},children:"📥 Export All"}),e.jsxs("label",{style:{margin:0},children:[e.jsx("input",{type:"file",accept:".json",onChange:ne,style:{display:"none"}}),e.jsx("span",{className:"tool-button",style:{margin:0,background:"white",color:"#f97316",cursor:"pointer",display:"inline-block"},children:"📤 Import JSON"})]}),e.jsx("button",{onClick:de,className:"tool-button",style:{margin:0,background:"white",color:"#f97316"},children:"📸 Take Snapshot"}),A&&e.jsx("button",{onClick:pe,className:"tool-button",style:{margin:0,background:"white",color:"#f97316"},children:"🔍 Compare"}),e.jsx("button",{onClick:xe,disabled:M,className:"tool-button",style:{margin:0,background:"white",color:"#f97316"},children:oe?"✅ Shared!":M?"⏳...":"🔗 Share"}),k.length>0&&e.jsxs("button",{onClick:ie,className:"tool-button",style:{margin:0,background:"#fef2f2",color:"#dc2626",border:"2px solid #fecaca"},children:["🗑️ Delete Selected (",k.length,")"]})]})}),e.jsxs("div",{className:"storage-inspector-stats",children:[e.jsxs("div",{style:{background:"#fff7ed",border:"1px solid #fed7aa",borderRadius:"8px",padding:"12px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"20px",fontWeight:900,color:"#ea580c"},children:a.cookies.count}),e.jsxs("div",{style:{fontSize:"11px",color:"#9a3412",fontWeight:600},children:["Cookies · ",j(a.cookies.size)]})]}),e.jsxs("div",{style:{background:"#f0fdf4",border:"1px solid #bbf7d0",borderRadius:"8px",padding:"12px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"20px",fontWeight:900,color:"#16a34a"},children:a.localStorage.count}),e.jsxs("div",{style:{fontSize:"11px",color:"#166534",fontWeight:600},children:["localStorage · ",j(a.localStorage.size)]})]}),e.jsxs("div",{style:{background:"#eff6ff",border:"1px solid #bfdbfe",borderRadius:"8px",padding:"12px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"20px",fontWeight:900,color:"#2563eb"},children:a.sessionStorage.count}),e.jsxs("div",{style:{fontSize:"11px",color:"#1e40af",fontWeight:600},children:["sessionStorage · ",j(a.sessionStorage.size)]})]}),e.jsxs("div",{style:{background:"#faf5ff",border:"1px solid #e9d5ff",borderRadius:"8px",padding:"12px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"20px",fontWeight:900,color:"#9333ea"},children:a.total.count}),e.jsxs("div",{style:{fontSize:"11px",color:"#6b21a8",fontWeight:600},children:["Total · ",j(a.total.size)]})]})]}),e.jsx("div",{className:"tool-card",children:e.jsx("input",{type:"text",value:u,onChange:o=>X(o.target.value),placeholder:"🔍 Search by name, key, or value...",className:"storage-inspector-search",onFocus:o=>o.target.style.borderColor="#f97316",onBlur:o=>o.target.style.borderColor="#e2e8f0"})}),e.jsx("div",{className:"storage-inspector-tabs",children:[{id:"cookies",label:"🍪 Cookies",count:a.cookies.count},{id:"localStorage",label:"💾 localStorage",count:a.localStorage.count},{id:"sessionStorage",label:"⚡ sessionStorage",count:a.sessionStorage.count},{id:"analytics",label:"📊 Analytics",count:null},{id:"scenarios",label:"💾 Scenarios",count:W.length}].map(o=>e.jsxs("button",{onClick:()=>x(o.id),style:{flex:"1 1 auto",padding:"10px 16px",borderRadius:"6px",border:"none",cursor:"pointer",fontSize:"13px",fontWeight:700,background:l===o.id?"white":"transparent",color:l===o.id?"#09090b":"#64748b",boxShadow:l===o.id?"0 1px 3px rgba(0,0,0,0.1)":"none",transition:"all 0.2s",whiteSpace:"nowrap",minWidth:0},children:[o.label," ",o.count!==null&&`(${o.count})`]},o.id))}),e.jsxs("div",{className:"tool-card",children:[l==="cookies"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"storage-tab-header",children:[e.jsxs("h3",{children:["🍪 Cookies (",B.length,")"]}),e.jsxs("div",{className:"storage-header-actions",children:[e.jsx("button",{onClick:()=>R(!0),className:"tool-button",style:{padding:"8px 16px",margin:0},children:"➕ Add Cookie"}),e.jsx("button",{onClick:()=>I("cookies"),className:"tool-button",style:{padding:"8px 16px",margin:0,background:"#fef2f2",color:"#dc2626"},children:"🗑️ Clear All"})]})]}),ge()]}),l==="localStorage"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"storage-tab-header",children:[e.jsxs("h3",{children:["💾 localStorage (",F.length,")"]}),e.jsxs("div",{className:"storage-header-actions",children:[e.jsx("button",{onClick:()=>{R(!0),C({...g,storageType:"localStorage"})},className:"tool-button",style:{padding:"8px 16px",margin:0},children:"➕ Add Item"}),e.jsx("button",{onClick:()=>I("localStorage"),className:"tool-button",style:{padding:"8px 16px",margin:0,background:"#fef2f2",color:"#dc2626"},children:"🗑️ Clear All"})]})]}),Q(F,"localStorage",J)]}),l==="sessionStorage"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"storage-tab-header",children:[e.jsxs("h3",{children:["⚡ sessionStorage (",U.length,")"]}),e.jsxs("div",{className:"storage-header-actions",children:[e.jsx("button",{onClick:()=>{R(!0),C({...g,storageType:"sessionStorage"})},className:"tool-button",style:{padding:"8px 16px",margin:0},children:"➕ Add Item"}),e.jsx("button",{onClick:()=>I("sessionStorage"),className:"tool-button",style:{padding:"8px 16px",margin:0,background:"#fef2f2",color:"#dc2626"},children:"🗑️ Clear All"})]})]}),Q(U,"sessionStorage",P)]}),l==="analytics"&&he(),l==="scenarios"&&fe()]}),me(),S&&e.jsx("div",{className:"storage-inspector-modal",children:e.jsxs("div",{className:"storage-inspector-modal-content",children:[e.jsx("h3",{style:{margin:"0 0 16px"},children:"✏️ Edit Item"}),e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("label",{style:{display:"block",marginBottom:"6px",fontSize:"13px",fontWeight:600},children:"Key/Name:"}),e.jsx("input",{type:"text",value:S.key,onChange:o=>N({...S,key:o.target.value}),style:{width:"100%",padding:"10px",borderRadius:"6px",border:"1px solid #e2e8f0"}})]}
26),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsx("label",{style:{display:"block",marginBottom:"6px",fontSize:"13px",fontWeight:600},children:"Value:"}),e.jsx("textarea",{value:S.value,onChange:o=>N({...S,value:o.target.value}),rows:6,style:{width:"100%",padding:"10px",borderRadius:"6px",border:"1px solid #e2e8f0",fontFamily:"monospace",fontSize:"12px"}})]}),e.jsxs("div",{style:{display:"flex",gap:"10px",justifyContent:"flex-end"},children:[e.jsx("button",{onClick:()=>N(null),style:{padding:"8px 16px",borderRadius:"6px",border:"1px solid #e2e8f0",background:"white",cursor:"pointer"},children:"Cancel"}),e.jsx("button",{onClick:()=>{var t;const o=S.type==="cookies"?(t=r.find(i=>i.name===S.key))==null?void 0:t.name:S.key;se(S.type,o,S.key,S.value)},className:"tool-button",style:{padding:"8px 16px",margin:0},children:"💾 Save Changes"})]})]})}),Y&&e.jsx("div",{className:"storage-inspector-modal",children:e.jsxs("div",{className:"storage-inspector-modal-content",children:[e.jsx("h3",{style:{margin:"0 0 16px"},children:"➕ Add New Item"}),e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("label",{style:{display:"block",marginBottom:"6px",fontSize:"13px",fontWeight:600},children:"Storage Type:"}),e.jsxs("select",{value:g.storageType||l,onChange:o=>C({...g,storageType:o.target.value}),style:{width:"100%",padding:"10px",borderRadius:"6px",border:"1px solid #e2e8f0"},children:[e.jsx("option",{value:"cookies",children:"🍪 Cookie"}),e.jsx("option",{value:"localStorage",children:"💾 localStorage"}),e.jsx("option",{value:"sessionStorage",children:"⚡ sessionStorage"})]})]}),e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("label",{style:{display:"block",marginBottom:"6px",fontSize:"13px",fontWeight:600},children:"Key/Name:"}),e.jsx("input",{type:"text",value:g.key,onChange:o=>C({...g,key:o.target.value}),placeholder:"myKey",style:{width:"100%",padding:"10px",borderRadius:"6px",border:"1px solid #e2e8f0"}})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsx("label",{style:{display:"block",marginBottom:"6px",fontSize:"13px",fontWeight:600},children:"Value:"}),e.jsx("textarea",{value:g.value,onChange:o=>C({...g,value:o.target.value}),placeholder:'{"example": "value"}',rows:6,style:{width:"100%",padding:"10px",borderRadius:"6px",border:"1px solid #e2e8f0",fontFamily:"monospace",fontSize:"12px"}})]}),e.jsxs("div",{style:{display:"flex",gap:"10px",justifyContent:"flex-end"},children:[e.jsx("button",{onClick:()=>{R(!1),C({key:"",value:""})},style:{padding:"8px 16px",borderRadius:"6px",border:"1px solid #e2e8f0",background:"white",cursor:"pointer"},children:"Cancel"}),e.jsx("button",{onClick:()=>{const o=g.storageType||l;o==="cookies"?L(g.key,g.value):o==="localStorage"?$(g.key,g.value):o==="sessionStorage"&&E(g.key,g.value),R(!1),C({key:"",value:""})},className:"tool-button",style:{padding:"8px 16px",margin:0},disabled:!g.key,children:"➕ Add Item"})]})]})})]})]})}export{Oe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.