1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{31682:(e,t,o)=>{Promise.resolve().then(o.bind(o,92254))},92254:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>L,dynamic:()=>q});var n=o(89659),a=o(37067);let s={"o1-pro":{input:150,output:600},"o1-mini":{input:1.1,output:4.4},"o4-mini-high":{input:1.1,output:4.4},"o4-mini":{input:1.1,output:4.4},"gpt-4":{input:30,output:60},"gpt-4-turbo":{input:10,output:30},"gpt-4o":{input:5,output:15},"gpt-3.5-turbo":{input:.5,output:1.5},"o3-mini":{input:1.1,output:4.4},"o3-mini-high":{input:1.1,output:4.4},"gpt-4o-jawbone":{input:2.5,output:10},"gpt-4-5":{input:75,output:150},"text-davinci-002-render-sha":{input:12,output:12},o1:{input:15,output:60},o3:{input:10,output:40},"o1-preview":{input:15,output:60},"gpt-4o-mini":{input:.15,output:.6},"gpt-4-gizmo":{input:30,output:60},"gpt-4-code-interpreter":{input:30,output:60},auto:{input:5,output:15},research:{input:1.1,output:4.4},"dalle-2":{input:0,output:0},"dalle-3":{input:0,output:0},"gpt-image-1":{input:0,output:0}},l={"dalle-2":.02,"dalle-3":.08,"gpt-image-1":.167},i=null,r=!1,d=0,c=new Map,u=new Map,m=null;async function p(e){if(!e)return 0;let t=(i||(console.log("Creating Tokenizer Worker (js-tiktoken)..."),m=performance.now(),(i=new Worker(o.tu(new
1URL(o.p+o.u(493),o.b)),{type:void 0})).onmessage=e=>{let{id:t,count:o,error:n,fallbackUsed:a,type:s}=e.data;if("WORKER_READY"===s){let e=m?(performance.now()-m).toFixed(2):"N/A";console.log("Tokenizer Worker is ready. Initialization took ".concat(e," ms.")),m=null,r=!0;return}let l=c.get(t),i=u.get(t);l&&i?(n?(console.warn("Worker returned an error for request ".concat(t,": ").concat(n).concat(a?" (fallback used)":"")),a&&"number"==typeof o?l(o):i(Error(n))):"number"==typeof o?l(o):i(Error("Invalid response from worker for request ".concat(t,"."))),c.delete(t),u.delete(t)):console.warn("Received message for unknown request ID: ".concat(t))},i.onerror=e=>{console.error("Tokenizer Worker Error:",e),r=!1,u.forEach(t=>{t(Error("Worker error: ".concat(e.message)))}),c.clear(),u.clear(),i=null}),i),n=d++;return new Promise((o,a)=>{c.set(n,o),u.set(n,a),!function o(){if(r&&t)try{t.postMessage({id:n,text:e})}catch(e){console.error("Failed to post message to tokenizer worker:",e),c.delete(n),u.delete(n),a(e)}else t?setTimeout(o,50):(console.error("Tokenizer Worker unavailable. Cannot process token count."),a(Error("Tokenizer Worker not available.")),c.delete(n),u.delete(n))}()})}async function x(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"high";if("low"===o.toLowerCase())return 85;if(e>2048||t>2048){let o=e/t;o>1?(e=2048,t=Math.floor(2048/o)):(t=2048,e=Math.floor(2048*o))}return 85+Math.ceil(e/512)*Math.ceil(t/512)*170}function f(e){e>1e11&&(e=Math.floor(e/1e3));let t=new Date(1e3*e),o=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return"".concat(o,"-").concat(n,"-").concat(a)}function g(){return{input_tokens:0,output_tokens:0,cost:0,message_count:0,conversation_count:0,hours:Array.from({length:24},()=>({input_tokens:0,output_tokens:0,cost:0,message_count:0,conversation_count:0}))}}function v(){return{total:g(),models:{}}}function h(e,t,o,n,a,i){e.usageByDay[t]||(e.usageByDay[t]=v());let r=e.usageByDay[t];r.models[n]||(r.models[n]=g());let d=r.models[n],c=0;if(n in l)c=i*l[n];else{let e=s[n]||{input:0,output:0};c=a/1e6*e.input+i/1e6*e.output}d.hours[o].input_tokens+=a,d.hours[o].output_tokens+=i,d.hours[o].cost+=c,d.hours[o].message_count+=1,d.input_tokens+=a,d.output_tokens+=i,d.cost+=c,d.message_count+=1,r.total.hours[o].input_tokens+=a,r.total.hours[o].output_tokens+=i,r.total.hours[o].cost+=c,r.total.hours[o].message_count+=1,r.total.input_tokens+=a,r.total.output_tokens+=i,r.total.cost+=c,r.total.message_count+=1}async function y(e,t){var o,n;let a=null!==(o=null==e?void 0:e.create_time)&&void 0!==o?o:Date.now()/1e3,s="unknown-day",l=0;try{s=f(a),(n=a)>1e11&&(n=Math.floor(n/1e3)),l=new Date(1e3*n).getHours()}catch(e){console.warn("Could not parse create_time, defaulting to 'unknown-day' and hour = 0.",e)}"unknown-day"===s||t.usageByDay[s]||(t.usageByDay[s]=v());let i=new Set;if((null==e?void 0:e.mapping)?(await j(e.mapping,s,l,t)).forEach(e=>i.add(e)):console.warn("Conversation skipped: No 'mapping' field found.",null==e?void 0:e.title),"unknown-day"!==s&&i.size>0){let e=t.usageByDay[s];e.total.conversation_count+=1,i.forEach(t=>{e.models[t]||(e.models[t]=g()),e.models[t].conversation_count+=1})}return i}async function w(e,t,o,n){let a=0,s=0,l=new Set;for(let m of e){var i,r,d,c,u;let e=null!==(i=m.role)&&void 0!==i?i:"unknown",p=null!==(r=m.contentTokens)&&void 0!==r?r:0,x=null!==(d=m.searchTokens)&&void 0!==d?d:0,f=null!==(c=m.outputTokens)&&void 0!==c?c:0,g=null!==(u=m.model_slug)&&void 0!==u?u:"unknown_model";!m.isReasoningRecap&&(x>0&&(a+=x),"user"===e||"system"===e||"tool"===e?a+=p:"assistant"===e&&("unknown_model"!==g&&l.add(g),a+=p+f,s+=f,m.isFinalMessage&&(h(n,t,o,g,a,s),s=0)))}return l}async function j(e,t,o,n){let a=[],s=new Set;for(let w of Object.keys(e)){var l,i,r,d,c,u,m,f,g,v,y,j,b,k,_,N,A,F,D,S,E,M,z,B,C,O,T,P,R,W,J;let I=e[w];if(!(null==I?void 0:I.message))continue;let q=I.message,L=null!==(g=null===(l=q.author)||void 0===l?void 0:l.role)&&void 0!==g?g:"unknown",U=null!==(v=null===(i=q.author)||void 0===i?void 0:i.name)&&void 0!==v?v:"",V=0,Y=0,G=0,H=(null===(r=q.metadata)||void 0===r?void 0:r.model_slug)||(null===(d=I.metadata)||void 0===d?void 0:d.model_slug)||"unknown_model",K=(null===(c=q.metadata)||void 0===c?void 0:c.reasoning_status)==="is_reasoning"||(null===(u=q.content)||void 0===u?void 0:u.content_type)==="thoughts";if("user"===L||"system"===L){if(Array.isArray(null===(y=q.content)||void 0===y?void 0:y.parts)){for(let e of q.content.parts)if("string"==typeof e)V+=await p(e);else if(e&&"object"==typeof e){if(e.asset_pointer||"image_asset_pointer"===e.content_type){let t=e.width||1024,o=e.height||1024;V+=await x(t,o,"high")}else V+=20}}else(null===(j=q.content)||void 0===j?void 0:j.text)&&(V+=await p(q.content.text));let e=null===(k=q.metadata)||void 0===k?void 0:null===(b=k.user_context_message_data)||void 0===b?void 0:b.about_model_message;e&&(V+=await p(e))}if("tool"===L){if(null===(_=q.metadata)||void 0===_?void 0:_.search_result_groups)try{let e=JSON.stringify(q.metadata.search_result_groups);Y=await p(e)}catch(e){console.warn("Could not tokenize search_result_groups for node ".concat(w,":"),e)}if(Array.isArray(null===(N=q.content)||void 0===N?void 0:N.parts))for(let e of q.content.parts)"string"==typeof e&&(V+=await p(e));if("dalle.text2im"===U){let e=(null!==(E=null===(S=q.content)||void 0===S?void 0:S.parts)&&void 0!==E?E:[]).filter(e=>(null==e?void 0:e.content_type)==="image_asset_pointer").length;e>0&&(h(n,t,o,"dalle-3",0,e),s.add("dalle-3"))}let e=Array.isArray(null===(A=q.content)||void 0===A?void 0:A.parts)?q.content.parts:[];if((null===(F=q.metadata)||void 0===F?void 0:F.image_gen_async)||e.some(e=>(null==e?void 0:e.content_type)==="image_asset_pointer")||(null===(D=q.metadata)||void 0===D?void 0:D.generation)||e.some(e=>{var t;return null==e?void 0:null===(t=e.metadata)||void 0===t?void 0:t.generation})||e.some(e=>{var t;return null==e?void 0:null===(t=e.metadata)||void 0===t?void 0:t.dalle})){let a=e.filter(e=>(null==e?void 0:e.content_type)==="image_asset_pointer").length;a>0&&(h(n,t,o,"gpt-image-1",0,a),s.add("gpt-image-1"))}}if("assistant"===L||"tool"===L){if((null===(M=q.content)||void 0===M?void 0:M.content_type)==="thoughts"&&Array.isArray(q.content.thoughts))for(let e of q.content.thoughts)e.content&&(G+=await p(e.content)),e.summary&&(G+=await p(e.summary));if((null===(z=q.content)||void 0===z?void 0:z.content_type)==="code"&&q.content.text&&(G+=await p(q.content.text)),(null===(B=q.content)||void 0===B?void 0:B.content_type)==="execution_output"&&q.content.text&&(V+=await p(q.content.text)),(null===(C=q.content)||void 0===C?void 0:C.content_type)==="tether_quote"&&q.content.text?V+=await p(q.content.text):(null===(O=q.content)||void 0===O?void 0:O.content_type)==="tether_browsing_display"&&q.content.result&&(V+=await p(q.content.result)),Array.isArray(null===(T=q.metadata)||void 0===T?void 0:T.citations)&&q.metadata.citations.length>0){try{let e=JSON.stringify(q.metadata.citations);V+=await p(e)}catch(e){console.warn("Could not tokenize citations:",e)}(null===(J=q.metadata)||void 0===J?void 0:null===(W=J.async_task_id)||void 0===W?void 0:W.includes("deepresch"))&&(H="research")}if(Array.isArray(null===(P=q.content)||void 0===P?void 0:P.parts)){for(let e of q.content.parts)if("string"==typeof e)G+=await p(e);else if(e&&"object"==typeof e){if(e.asset_pointer||"image_asset_pointer"===e.content_type){let t=e.width||1024,o=e.height||1024;V+=await x(t,o,"high")}else G+=20}}(null===(R=q.content)||void 0===R?void 0:R.text)&&(G+=await p(q.content.text))}let Z=(null===(m=q.content)||void 0===m?void 0:m.content_type)==="reasoning_recap"||(null===(f=q.metadata)||void 0===f?void 0:f.reasoning_status)==="reasoning_ended";a.push({role:L,contentTokens:V,outputTokens:G,searchTokens:Y,model_slug:H,isReasoningMessage:K,isReasoningRecap:Z,isFinalMessage:(null==q?void 0:q.end_turn)||(null==q?void 0:q.channel)==="final"})}
1return(await w(a,t,o,n)).forEach(e=>s.add(e)),s}async function b(e){if(!Array.isArray(e))throw Error("Expected an array of conversation objects.");let t={usageByDay:{},allModelSlugs:new Set,startDate:void 0,endDate:void 0,totalCostAllModels:0};!function(e,t){let o=new Set,n=(0,e.length);console.log("Scanning ".concat(n," of ").concat(e.length," conversation(s) for model slugs...")),o.add("dalle-2"),o.add("dalle-3"),o.add("gpt-image-1");for(let t=0;t<n;t++){var a,l,i,r,d,c,u,m,p,x;let n=e[t];if(!n||"object"!=typeof n)continue;if(n.mapping&&"object"==typeof n.mapping)for(let e of Object.keys(n.mapping)){let t=n.mapping[e],s=null==t?void 0:null===(l=t.message)||void 0===l?void 0:null===(a=l.metadata)||void 0===a?void 0:a.model_slug,m=null==t?void 0:null===(i=t.metadata)||void 0===i?void 0:i.model_slug;s&&o.add(s),m&&o.add(m),"dalle.text2im"===(null==t?void 0:null===(d=t.message)||void 0===d?void 0:null===(r=d.author)||void 0===r?void 0:r.name)&&o.add("dalle-3"),(null==t?void 0:null===(u=t.message)||void 0===u?void 0:null===(c=u.metadata)||void 0===c?void 0:c.image_gen_async)&&o.add("gpt-image-1")}if(Array.isArray(n.messages))for(let e of n.messages){let t=null==e?void 0:null===(m=e.metadata)||void 0===m?void 0:m.model_slug;t&&o.add(t);let n=null==e?void 0:e.model_slug;n&&o.add(n),"dalle.text2im"===((null==e?void 0:null===(p=e.author)||void 0===p?void 0:p.name)||(null==e?void 0:e.name))&&o.add("dalle-3"),(null==e?void 0:null===(x=e.metadata)||void 0===x?void 0:x.image_gen_async)&&o.add("gpt-image-1")}let s=n.default_model_slug;"string"==typeof s&&o.add(s)}console.log("Discovered model slugs:",Array.from(o));let f=Array.from(o).filter(e=>!(e in s)&&"unknown_model"!==e);if(f.length>0)for(let e of(console.warn("Models in data but missing from MODEL_COSTS:",f),f))s[e]={input:0,output:0},console.log("Added zero-cost placeholder for model: ".concat(e));let g=Object.keys(s).filter(e=>!o.has(e));g.length>0&&console.log("Models in MODEL_COSTS not found in the dataset:",g)}(e);let o=1/0,n=-1/0;for(let t of e)t&&"number"==typeof t.create_time&&(o=Math.min(o,t.create_time),n=Math.max(n,t.create_time));o!==1/0&&(t.startDate=f(o),t.endDate=f(n));for(let o=0;o<e.length;o++){let n=e[o];if(!n||"object"!=typeof n){console.warn("Skipping invalid conversation at index ".concat(o,"."));continue}(await y(n,t)).forEach(e=>{var o;return null===(o=t.allModelSlugs)||void 0===o?void 0:o.add(e)})}let a=0;for(let e in t.usageByDay)a+=t.usageByDay[e].total.cost;return t.totalCostAllModels=a,console.log("Aggregation complete. Final aggregator:",t),t}var k=o(96036),_=o(83189),N=o(83519),A=o(98193),F=o(53278),D=o(7450),S=o(59852),E=o(49976),M=o(10594),z=o(53085),B=o(28715),C=o(49085),O=o(31010);let T=(0,O.A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),P=(0,O.A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),R=(0,O.A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var W=o(76252);function J(e){let{onFileSelect:t,isProcessing:o,status:s,errorMsg:l}=e,[i,r]=(0,a.useState)(!1),d=(0,a.useRef)(null),c=s.match(/\((\d+)%\)/),u=c?parseInt(c[1],10):0,m=s.match(/Reading file: (.*?) \(/);m&&m[1];let p=s.includes("Reading"),x=s.includes("Parsing"),f=s.includes("Tokenizing"),g=s.includes("Done");g&&s.includes("Processed:")&&s.split("Processed:")[1].trim();let v=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),r(!0)},[]),h=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),r(!1)},[]),y=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),r(!1),e.dataTransfer.files&&e.dataTransfer.files.length>0&&t(e.dataTransfer.files)},[t]),w=(0,a.useCallback)(()=>{d.current&&d.current.click()},[]),j=(0,a.useCallback)(e=>{e.target.files&&e.target.files.length>0&&t(e.target.files)},[t]);return(0,n.jsxs)("div",{className:"space-y-4 sm:max-w-7/12 w-full",children:[(0,n.jsxs)("div",{className:"group relative px-6 pt-8 pb-12 transition-colors backdrop-blur-xs ".concat(i?"bg-vi
1olet-700/10 border border-violet-500/40 cursor-pointer":o?"bg-black/30 border border-gray-800/40":"bg-black/30 border border-violet-900/60 hover:bg-black/40 cursor-pointer"),onDragOver:o?void 0:v,onDragLeave:o?void 0:h,onDrop:o?void 0:y,onClick:o?void 0:w,children:[(0,n.jsx)("input",{ref:d,type:"file",accept:"application/json",onChange:j,className:"hidden",disabled:o}),o?(0,n.jsxs)("div",{className:"flex flex-col text-left space-y-5",children:[(0,n.jsxs)("div",{className:"flex sm:items-center items-start space-x-3 w-full",children:[(0,n.jsx)(R,{className:"w-5 h-5 text-violet-800/80 animate-spin"}),(0,n.jsx)("div",{className:"w-full flex flex-row justify-between items-center",children:(0,n.jsxs)("h3",{className:"text-base !font-mono text-violet-100 flex flex-col sm:flex-row sm:items-center items-start space-x-2 w-full justify-between",children:[(0,n.jsx)(_.A,{text:"Processing"}),(0,n.jsxs)("p",{className:"text-2xs bg-amber-900/60 px-2 rounded-xs text-amber-100 flex flex-row items-center space-x-2 font-sans h-5 sm:my-0 my-2",children:[(0,n.jsx)(P,{className:"w-2.5 h-2.5 mr-1 text-amber-300"})," 100% onâdevice processing"]})]})})]}),(0,n.jsxs)("div",{className:"w-full space-y-1 pl-9",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"text-2xs mt-px !font-mono text-[#B08AFF] opacity-70 mr-0.5",children:"reading file"}),(0,n.jsx)("div",{className:"flex-1 h-0.5 bg-violet-800/20 rounded-full overflow-hidden ml-2 max-w-[80px]",children:(0,n.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ".concat(p?"bg-violet-600":x||f||g?"bg-violet-600":"bg-gray-700/50"),style:{width:p?"".concat(u,"%"):x||f||g?"100%":"0%"}})})]}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"text-2xs mt-px !font-mono text-[#B08AFF] opacity-70 mr-0.5",children:"json parsing"}),(0,n.jsx)("div",{className:"flex-1 h-0.5 bg-violet-800/20 rounded-full overflow-hidden ml-2 max-w-[80px]",children:(0,n.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ".concat(x?"bg-violet-600":f||g?"bg-violet-600":"bg-gray-700/50"),style:{width:x?"60%":f||g?"100%":"0%"}})})]}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"text-2xs mt-px !font-mono text-[#B08AFF] opacity-70 mr-0.5",children:"tokenizing\xa0\xa0"}),(0,n.jsx)("div",{className:"flex-1 h-0.5 bg-violet-800/20 rounded-full overflow-hidden ml-2 max-w-[80px]",children:(0,n.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ".concat(f?"bg-violet-600":g?"bg-violet-600":"bg-gray-700/50"),style:{width:f?"70%":g?"100%":"0%"}})})]})]})]}):(0,n.jsx)("div",{className:"flex flex-col text-left space-y-2 w-full",children:(0,n.jsxs)("div",{className:"flex items-start space-x-3 w-full",children:[(0,n.jsx)(T,{className:"w-5 h-5 mt-1 text-violet-300/40"}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsxs)("h3",{className:"text-base !font-mono text-violet-100 flex flex-col sm:flex-row sm:items-center items-start space-x-2 w-full justify-between",children:[(0,n.jsx)(_.A,{text:"select file",className:"whitespace-nowrap inline-block"}),(0,n.jsxs)("p",{className:"text-2xs bg-amber-900/60 px-2 rounded-xs text-amber-100 flex flex-row items-center space-x-2 font-sans h-5 sm:my-0 my-2",children:[(0,n.jsx)(P,{className:"w-2.5 h-2.5 mr-1 text-amber-300"})," 100% onâdevice processing"]})]}),(0,n.jsxs)("p",{className:"text-xs mt-2 font-sans text-[#B08AFF]/70",children:["click to select or drag and drop"," ",(0,n.jsx)("code",{className:"text-[#E6DBFF] text-2xs bg-[#B08AFF]/20 px-1 rounded-xs !font-mono",children:"conversations.json"})," ","file."]})]})]})})]}),l&&(0,n.jsx)("div",{className:"mt-2 bg-red-900/20 border border-red-800/40 text-red-400 p-3 rounded-xs text-sm",children:(0,n.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,n.jsx)(W.A,{className:"h-5 w-5 flex-shrink-0 mt-0.5"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"font-semibold",children:"Error"}),(0,n.jsx)("p",{children:l}),(0,n.jsx)("p",{className:"mt-1 text-xs text-[#B08AFF] opacity-50",children:"Try a different file or check if your JSON export file is valid."})]})]})})]})}var I=o(94711);let q="force-dynamic";function L(){let[e,t]=(0,a.useState)(""),[o,s]=(0,a.useState)(null),[l,i]=(0,a.useState)(""),[r,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(0);async function m(e){if(i(""),s(null),u(0),!e||0===e.length)return;let o=e[0];if(!o.name.endsWith(".json")){i("Please upload a JSON file. Only .json files are supported.");return}if(o.size>0xc800000){i("File is too large. Maximum size is ".concat(200,"MB."));return}
1d(!0),t("Reading file: ".concat(o.name," (0%)"));try{var n;let e=await (n=e=>{u(e),t("Reading file: ".concat(o.name," (").concat(e,"%)"))},new Promise((e,t)=>{if(o.size<5242880){let a=new FileReader;a.onload=()=>{n(100),e(a.result)},a.onerror=()=>{t(Error("Error reading file"))},a.readAsText(o);return}let a=[],s=0,l=0,i=()=>{let l=o.slice(s,s+2097152),r=new FileReader;r.onload=t=>{var l;(null===(l=t.target)||void 0===l?void 0:l.result)&&a.push(t.target.result),s+=2097152,n(Math.min(100,Math.round(s/o.size*100))),s<o.size?i():e(a.join(""))},r.onerror=()=>{t(Error("Error reading file chunk"))},r.readAsText(l)};i()}));try{t("Parsing JSON...");let n=JSON.parse(e),a=n?"object"!=typeof n?"File does not contain valid JSON object":n.mapping||n.messages||Array.isArray(n)?null:"This doesn't appear to be a valid OpenAI conversation export":"No data found in file";if(a)throw Error(a);t("Tokenizing & aggregating usage...");let l=await b(n);s(l),t("Done! Processed: ".concat(o.name))}catch(e){throw Error("Invalid JSON format: ".concat(e.message))}}catch(e){console.error("Error parsing or processing file:",e),i(e.message||"Unknown error occurred while processing file")}finally{d(!1)}}return(0,n.jsxs)("div",{className:"overflow-x-hidden w-full",children:[(0,n.jsx)(k.A,{imageUrls:["/images/bg-1.png","/images/bg-2.png"]}),(0,n.jsxs)("div",{className:"text-white p-4 md:p-8 relative z-10",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,n.jsx)("h1",{className:"sm:text-5xl text-2xl !font-mono font-normal tracking-wide flex-shrink-0 whitespace-nowrap",children:(0,n.jsx)(_.A,{text:"whatâtheât0ken",targetChar:"0",replacementChars:["o","*","#"]})}),(0,n.jsxs)("div",{className:"relative w-20 h-16 sm:w-[120px] sm:h-24 rounded overflow-hidden",children:[(0,n.jsx)("div",{className:"absolute inset-0 z-10 cursor-default"}),(0,n.jsx)(z.b,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0},children:(0,n.jsx)(B.a,{control:"props",cDistance:20,cPolarAngle:150,cameraZoom:1,color1:"#0077ff",color2:"#00f0ff",color3:"#7b68ee",type:"plane",uDensity:1.3,uFrequency:5.5,uSpeed:.8})})]})]}),(0,n.jsxs)("div",{className:"flex space-x-6 mb-6 pl-2 -mt-2",children:[(0,n.jsx)(I.xD,{}),(0,n.jsx)(I.eF,{}),(0,n.jsx)(I._l,{})]}),(0,n.jsxs)("div",{className:"font-sans font-light pl-2 text-xs flex flex-col space-y-1 mb-6 hidden sm:block",children:[(0,n.jsxs)("p",{className:"flex flex-row items-center space-x-2",children:[(0,n.jsx)("span",{className:"text-3xs bg-violet-900/40 px-1 rounded-xs text-violet-400/60 !font-mono mr-1.5",children:"1"})," ","add"," ",(0,n.jsx)("code",{className:"text-[#E6DBFF] text-2xs bg-[#B08AFF]/20 px-1 rounded-xs !font-mono mx-1",children:"conversations.json"})," ","file â find at"," ",(0,n.jsx)("code",{className:"text-[#E6DBFF] text-2xs bg-[#B08AFF]/20 px-1 rounded-xs !font-mono mx-1",children:"chatgpt â settings â data controls â export"})]}),(0,n.jsxs)("p",{className:"flex flex-row items-center space-x-2",children:[(0,n.jsx)("span",{className:"text-3xs bg-violet-900/40 px-1 rounded-xs text-violet-400/60 !font-mono mr-1.5",children:"2"})," ","instant, local data crunching â no data leaves your browser"]}),(0,n.jsxs)("p",{className:"flex flex-row items-center space-x-2",children:[(0,n.jsx)("span",{className:"text-3xs bg-violet-900/40 px-1 rounded-xs text-violet-400/60 !font-mono mr-1.5",children:"3"})," ","explore your dashboard â heatâmaps, stream graphs, cost breakdowns"]})]}),(0,n.jsxs)("div",{className:"font-sans font-light pl-2 text-xs flex flex-col space-y-2 mb-6 block sm:hidden",children:[(0,n.jsxs)("p",{className:"flex flex-row items-center space-x-2",children:[(0,n.jsx)("span",{className:"text-3xs bg-violet-900/40 px-1 rounded-xs text-violet-400/60 !font-mono mr-1.5",children:"1"})," ","add"," ",(0,n.jsx)("code",{className:"text-[#E6DBFF] text-2xs bg-[#B08AFF]/20 px-1 rounded-xs !font-mono mx-1",children:"conversations.json"})," ","file from ChatGPT"]}),(0,n.jsxs)("p",{className:"flex flex-row items-center space-x-2",children:[(0,n.jsx)("span",{className:"text-3xs bg-vi
1olet-900/40 px-1 rounded-xs text-violet-400/60 !font-mono mr-1.5",children:"2"})," ","instant, local browser-only data crunching"]}),(0,n.jsxs)("p",{className:"flex flex-row items-center space-x-2",children:[(0,n.jsx)("span",{className:"text-3xs bg-violet-900/40 px-1 rounded-xs text-violet-400/60 !font-mono mr-1.5",children:"3"})," ","explore your dashboard!"]})]}),!o&&!l&&(0,n.jsx)(J,{onFileSelect:m,isProcessing:r,status:e,errorMsg:l}),l&&!r&&(0,n.jsx)("div",{className:"mt-4 bg-red-900/20 border border-red-800/40 text-red-400 p-3 rounded-xs text-sm max-w-7/12",children:(0,n.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,n.jsx)(W.A,{className:"h-5 w-5 flex-shrink-0 mt-0.5"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"font-semibold",children:"Error processing file:"}),(0,n.jsx)("p",{children:l}),(0,n.jsx)("button",{onClick:()=>{i(""),s(null),t("")},className:"mt-2 text-xs text-blue-400 hover:underline",children:"Try uploading again?"})]})]})}),o&&Object.keys(o.usageByDay).length>0&&(0,n.jsx)("div",{className:"mt-8 space-y-6",children:(0,n.jsxs)("div",{className:"space-y-6 flex flex-col",children:[(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"usage vitals",description:"quick numbers â cost, tokens, models",children:(0,n.jsx)(C.A,{data:o})})}),(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"token ledger",description:"tabular summary â tokens, costs, interactions",children:(0,n.jsx)(M.A,{aggregator:o})})}),(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"calendar glowmap",description:"heatmap â daily usage intensity",children:(0,n.jsx)(N.A,{aggregator:o})})}),(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"timeline stream",description:"stacked timeline â interactions over weeks",children:(0,n.jsx)(A.A,{aggregator:o})})}),(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"model footprint",description:"treemap â cumulative token distribution",children:(0,n.jsx)(E.A,{aggregator:o})})}),(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"usage strata",description:"stacked bar chart â weekly model comparison",children:(0,n.jsx)(F.A,{aggregator:o})})}),(0,n.jsx)("div",{className:"w-full md:w-8/12",children:(0,n.jsx)(S.A,{title:"circadian ridge",description:"hourly ridgeline chart â peak usage times",children:(0,n.jsx)(D.A,{aggregator:o})})})]})})]})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[826,882,863,559,600,247,541,824,320,358],()=>t(31682)),_N_E=e.O()}]);
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.