svg-site 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{r,j as s}from"./react-BNEptbwn-8068ec8f.js";import{$ as j,V as h,a0 as v}from"./index-COUSXtyQ-8068ec8f.js";/* empty css *//* empty css */import"./motion-B1hdS1Lc-8068ec8f.js";function m(i){if(!i)return"—";const a=new Date(i);return Number.isNaN(a.getTime())?"—":a.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})}function k({account:i}){var o;const[a,d]=r.useState(""),[x,c]=r.useState(!1);if(r.useEffect(()=>{var l;d(((l=i.user)==null?void 0:l.discordHandle)??""),c(!1)},[(o=i.user)==null?void 0:o.discordHandle]),i.status==="loading")return null;if(i.status!=="signed-in")return s.jsx("div",{className:"account-auth-auth-shell",children:s.jsx("div",{className:"account-auth-panel",children:s.jsx(j,{account:i,loginTagline:"Backs up your bookmarks, settings, and theme across devices.",brand:s.jsxs("div",{className:"account-auth-auth-brand",children:[s.jsx(h,{size:18}),s.jsx("span",{children:"Lucide Account"})]})})})});const{user:e,billing:n,isPlus:t}=i,g=n!=null&&n.cancelAtPeriodEnd?"Cancels on":"Renews on",u=async()=>{c(!1),await i.setDiscord(a.trim()||null)&&c(!0)};return s.jsx("div",{className:"settings-page account-settings",children:s.jsxs("div",{className:"settings-page-inner",children:[s.jsxs("div",{className:"settings-page-head",children:[s.jsx("h1",{children:"Account"}),s.jsx("p",{children:e==null?void 0:e.email})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Profile"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Email"}),s.jsx("div",{className:"settings-row-hint",children:e==null?void 0:e.email})]}),s.jsx("span",{className:`account-pill ${e!=null&&e.emailVerified?"ok":""}`,children:e!=null&&e.emailVerified?"Verified":"Unverified"})]}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Member since"}),s.jsx("div",{className:"settings-row-hint",children:"When you created this Lucide account"})]}),s.jsx("div",{className:"account-value",children:m(e==null?void 0:e.createdAt)})]}),s.jsx("div",{className:"settings-field-grid",children:s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{className:"settings-field-label",children:"Discord username or user ID"}),s.jsxs("div",{className:"settings-row",style:{gap:8},children:[s.jsx("input",{className:"settings-input",style:{flex:1},value:a,placeholder:"username or 17–20 digit ID",onChange:l=>{d(l.target.value),c(!1)}}),s.jsx("button",{type:"button",className:"account-btn ghost",disabled:i.busy,onClick:()=>void u(),children:"Save"})]}),s.jsx("span",{className:"settings-field-label",children:x?"Saved — used for the Plus role in the Lucide Discord.":"Optional. Used for the Plus role in the Lucide Discord. You can also enter this at checkout."})]})})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Lucide Plus"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Status"}),s.jsx("div",{className:"settings-row-hint",children:t?"3M AI tokens/day, exclusive links, and an ad-free experience are unlocked.":"Upgrade for 3M AI tokens/day, exclusive links, and an ad-free experience."})]}),s.jsx("span",{className:`account-pill ${t?"plus":""}`,children:t?"Active":"Free"})]}),t&&(n==null?void 0:n.currentPeriodEnd)&&s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:g}),s.jsx("div",{className:"settings-row-hint",children:"Manage or cancel anytime in the billing portal"})]}),s.jsx("div",{className:"account-value",children:m(n.currentPeriodEnd)})]}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:t?"Billing":"Upgrade"}),s.jsx("div",{className:"settings-row-hint",children:t?"Update payment, invoices, or cancel.":"Subscribe to Lucide Plus."})]}),t?s.jsx("button",{type:"button",className:"account-btn ghost",onClick:()=>void i.manageBilling(),children:"Manage billing"}):s.jsx("button",{type:"button",className:"account-btn primary",onClick:()=>void i.checkout((e==null?void 0:e.email)??void 0),children:"Upgrade to Plus"})]}),!t&&s.jsx(v,{}),i.authError&&s.jsx("div",{className:"account-error",children:i.authError})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Cloud sync"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Backup & device sync"}),s.jsx("div",{className:"settings-row-hint",children:"Bookmarks, settings, theme, and proxied-site logins (cookies) sync to this account automatically."})]}),s.jsx("span",{className:"account-pill ok",children:"On"})]})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Session"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Sign out"}),s.jsx("div",{className:"settings-row-hint",children:"Signs out on this device only."})]}),s.jsx("button",{type:"button",className:"account-btn ghost",onClick:()=>void i.logout(),children:"Sign out"})]})]}),s.jsxs("div",{className:"settings-page-foot",children:[s.jsx(h,{size:14}),s.jsx("span",{children:"Lucide"})]})]})})}export{k as AccountPage};
1
+ import{r,j as s}from"./react-BNEptbwn-8068ec8f.js";import{$ as j,V as h,a0 as v}from"./index-COUSXtyQ-8068ec8f.js";/* empty css *//* empty css */import"./motion-B1hdS1Lc-8068ec8f.js";function m(i){if(!i)return"—";const a=new Date(i);return Number.isNaN(a.getTime())?"—":a.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})}function k({account:i}){var o;const[a,d]=r.useState(""),[x,c]=r.useState(!1);if(r.useEffect(()=>{var l;d(((l=i.user)==null?void 0:l.discordHandle)??""),c(!1)},[(o=i.user)==null?void 0:o.discordHandle]),i.status==="loading")return null;if(i.status!=="signed-in")return s.jsx("div",{className:"account-auth-auth-shell",children:s.jsx("div",{className:"account-auth-panel",children:s.jsx(j,{account:i,loginTagline:"Backs up your bookmarks, settings, and theme across devices.",brand:s.jsxs("div",{className:"account-auth-auth-brand",children:[s.jsx(h,{size:18}),s.jsx("span",{children:"IGNITE OS BROWSER Account"})]})})})});const{user:e,billing:n,isPlus:t}=i,g=n!=null&&n.cancelAtPeriodEnd?"Cancels on":"Renews on",u=async()=>{c(!1),await i.setDiscord(a.trim()||null)&&c(!0)};return s.jsx("div",{className:"settings-page account-settings",children:s.jsxs("div",{className:"settings-page-inner",children:[s.jsxs("div",{className:"settings-page-head",children:[s.jsx("h1",{children:"Account"}),s.jsx("p",{children:e==null?void 0:e.email})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Profile"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Email"}),s.jsx("div",{className:"settings-row-hint",children:e==null?void 0:e.email})]}),s.jsx("span",{className:`account-pill ${e!=null&&e.emailVerified?"ok":""}`,children:e!=null&&e.emailVerified?"Verified":"Unverified"})]}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Member since"}),s.jsx("div",{className:"settings-row-hint",children:"When you created this IGNITE OS BROWSER account"})]}),s.jsx("div",{className:"account-value",children:m(e==null?void 0:e.createdAt)})]}),s.jsx("div",{className:"settings-field-grid",children:s.jsxs("label",{className:"settings-field",children:[s.jsx("span",{className:"settings-field-label",children:"Discord username or user ID"}),s.jsxs("div",{className:"settings-row",style:{gap:8},children:[s.jsx("input",{className:"settings-input",style:{flex:1},value:a,placeholder:"username or 17–20 digit ID",onChange:l=>{d(l.target.value),c(!1)}}),s.jsx("button",{type:"button",className:"account-btn ghost",disabled:i.busy,onClick:()=>void u(),children:"Save"})]}),s.jsx("span",{className:"settings-field-label",children:x?"Saved — used for the Plus role in the IGNITE OS BROWSER Discord.":"Optional. Used for the Plus role in the IGNITE OS BROWSER Discord. You can also enter this at checkout."})]})})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"IGNITE OS BROWSER Plus"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Status"}),s.jsx("div",{className:"settings-row-hint",children:t?"3M AI tokens/day, exclusive links, and an ad-free experience are unlocked.":"Upgrade for 3M AI tokens/day, exclusive links, and an ad-free experience."})]}),s.jsx("span",{className:`account-pill ${t?"plus":""}`,children:t?"Active":"Free"})]}),t&&(n==null?void 0:n.currentPeriodEnd)&&s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:g}),s.jsx("div",{className:"settings-row-hint",children:"Manage or cancel anytime in the billing portal"})]}),s.jsx("div",{className:"account-value",children:m(n.currentPeriodEnd)})]}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:t?"Billing":"Upgrade"}),s.jsx("div",{className:"settings-row-hint",children:t?"Update payment, invoices, or cancel.":"Subscribe to IGNITE OS BROWSER Plus."})]}),t?s.jsx("button",{type:"button",className:"account-btn ghost",onClick:()=>void i.manageBilling(),children:"Manage billing"}):s.jsx("button",{type:"button",className:"account-btn primary",onClick:()=>void i.checkout((e==null?void 0:e.email)??void 0),children:"Upgrade to Plus"})]}),!t&&s.jsx(v,{}),i.authError&&s.jsx("div",{className:"account-error",children:i.authError})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Cloud sync"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Backup & device sync"}),s.jsx("div",{className:"settings-row-hint",children:"Bookmarks, settings, theme, and proxied-site logins (cookies) sync to this account automatically."})]}),s.jsx("span",{className:"account-pill ok",children:"On"})]})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Session"}),s.jsxs("div",{className:"settings-row",children:[s.jsxs("div",{className:"settings-row-text",children:[s.jsx("div",{className:"settings-row-label",children:"Sign out"}),s.jsx("div",{className:"settings-row-hint",children:"Signs out on this device only."})]}),s.jsx("button",{type:"button",className:"account-btn ghost",onClick:()=>void i.logout(),children:"Sign out"})]})]}),s.jsxs("div",{className:"settings-page-foot",children:[s.jsx(h,{size:14}),s.jsx("span",{children:"IGNITE OS BROWSER"})]})]})})}export{k as AccountPage};
@@ -1,4 +1,4 @@
1
- var Je=Object.defineProperty;var Ye=(e,t,s)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var J=(e,t,s)=>Ye(e,typeof t!="symbol"?t+"":t,s);import{r as o,j as n,c as Qe,a as Ze}from"./react-BNEptbwn-8068ec8f.js";import{r as et,a as tt,b as K,C as B,c as Le,G as fe,E as Ae,S as nt,d as st,R as at,e as rt,f as it,g as re,L as ot,I as ct,h as lt,i as ut,j as pe,M as dt,k as me,P as ft,T as pt,l as mt,m as ht,n as gt,o as xt,p as bt,q as be,w as ye,U as yt}from"./index-COUSXtyQ-8068ec8f.js";import{i as vt}from"./fingerprint-Y5nV5FVa-8068ec8f.js";import{M as wt,r as jt,a as kt,b as St}from"./markdown-BtlGIx_H-8068ec8f.js";import{m as Ie,A as Nt}from"./motion-B1hdS1Lc-8068ec8f.js";function ve(e){return Math.max(1,Math.round(e.trim().length/4))}function Et(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function De(e){const t=e;return!!t&&typeof t.id=="string"&&Array.isArray(t.messages)&&typeof t.title=="string"}function ie(){return Math.random().toString(36).slice(2,10)+Date.now().toString(36)}function Ct(e){const t=e.trim().replace(/\s+/g," ");return t?t.length>42?t.slice(0,42).trimEnd()+"…":t:"New chat"}const Tt="lucide-ai",H="threads",Mt=400,_e=100;let Y=null;function he(){return Y||(Y=new Promise((e,t)=>{const s=indexedDB.open(Tt,1);s.onupgradeneeded=()=>{s.result.objectStoreNames.contains(H)||s.result.createObjectStore(H,{keyPath:"id"})},s.onsuccess=()=>e(s.result),s.onerror=()=>t(s.error)})),Y}function ge(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}async function Pe(e){const t=await he();await ge(t.transaction(H,"readwrite").objectStore(H).put(e))}async function Rt(e){try{const t=await he();await ge(t.transaction(H,"readwrite").objectStore(H).delete(e))}catch{}}const Q=new Map;function Lt(e){const t=Q.get(e.id);t&&clearTimeout(t),Q.set(e.id,setTimeout(()=>{Q.delete(e.id),Pe(e).catch(()=>{})},Mt))}async function At(){const e=et("ai.threads",null);if(!(!Array.isArray(e)||e.length===0)){for(const t of e)De(t)&&await Pe(t);tt("ai.threads")}}async function It(){try{const e=await he();return await At(),(await ge(e.transaction(H,"readonly").objectStore(H).getAll())).filter(De).sort((s,r)=>r.updatedAt-s.updatedAt).slice(0,_e)}catch{return[]}}function Dt(e){return{id:ie(),title:"New chat",model:e,messages:[],updatedAt:Date.now()}}function _t(){const[e,t]=o.useState([]),[s,r]=o.useState(!1),[a,l]=o.useState(""),h=o.useRef([]);o.useEffect(()=>{let w=!0;return It().then(y=>{w&&(h.current=y,t(y),r(!0))}),()=>{w=!1}},[]),o.useEffect(()=>{if(!s)return;const w=new Map(h.current.map(b=>[b.id,b])),y=new Map(e.map(b=>[b.id,b]));for(const b of e)w.get(b.id)!==b&&Lt(b);for(const b of h.current)y.has(b.id)||Rt(b.id);h.current=e},[e,s]),o.useEffect(()=>{var w;a&&!e.some(y=>y.id===a)&&l(((w=e[0])==null?void 0:w.id)??"")},[e,a]);const g=e.find(w=>w.id===a),j=o.useCallback(w=>{const y=Dt(w);return t(b=>[y,...b].slice(0,_e)),l(y.id),y.id},[]),N=o.useCallback(w=>l(w),[]),M=o.useCallback(()=>l(""),[]),D=o.useCallback(w=>{t(y=>y.filter(b=>b.id!==w))},[]),f=o.useCallback((w,y)=>{const b=y.trim();b&&t(k=>k.map(T=>T.id===w?{...T,title:b}:T))},[]),x=o.useCallback((w,y)=>{t(b=>b.map(k=>k.id===w?y(k):k))},[]);return{threads:e,loaded:s,activeId:a,activeThread:g,create:j,select:N,startNew:M,remove:D,rename:f,update:x}}let Z=null,W=null;function Pt(){try{const e=[navigator.userAgent,navigator.language,screen.width,screen.height,screen.colorDepth,new Date().getTimezoneOffset(),navigator.hardwareConcurrency,navigator.deviceMemory].join("|");let t=2166136261;for(let s=0;s<e.length;s++)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return`fb_${(t>>>0).toString(36)}`}catch{return""}}function we(e,t){return Promise.race([e,new Promise(s=>setTimeout(()=>s(null),t))])}async function $t(){try{const e=await we(vt.load(),2500);if(e){const t=await we(e.get(),2500);if(t!=null&&t.visitorId)return t.visitorId}}catch{}return Pt()}function $e(){return Z?Promise.resolve(Z):(W||(W=$t().then(e=>(Z=e||null,W=null,e))),W)}function ze(e){return!!e&&typeof e=="object"&&typeof e.p=="string"}function zt(e){let t="";for(let s=0;s<e.length;s+=1)t+=String.fromCharCode(e[s]);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ot(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";const s=atob(t),r=new Uint8Array(s.length);for(let a=0;a<s.length;a+=1)r[a]=s.charCodeAt(a);return r}function Ft(e){return zt(new TextEncoder().encode(e))}function Oe(e){return new TextDecoder().decode(Ot(e))}function Ht(e){return{p:Ft(JSON.stringify(e))}}function qt(e){if(!ze(e))return null;try{return JSON.parse(Oe(e.p))}catch{return null}}function Fe(e){return Ht(e)}function Ut(e){const t=qt(e);if(t===null)throw new Error("packed");return t}function Wt(e){if(!ze(e))throw new Error("packed");return Oe(e.p)}class oe extends Error{constructor(s,r,a=null){super(s);J(this,"code");J(this,"reason");this.code=r,this.reason=a}}async function Vt(e){try{const t=await fetch(K("/api/ai/title"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Fe({message:e})),credentials:B});if(!t.ok)return null;const s=Ut(await t.json());return typeof(s==null?void 0:s.title)=="string"&&s.title?s.title:null}catch{return null}}async function He(e,t,s,r,a,l,h,g,j){var w,y,b,k;const N=await $e(),M=await fetch(K("/api/ai/chat"),{method:"POST",headers:{"content-type":"application/json","x-fingerprint":N,...Le("account")},body:JSON.stringify(Fe(e)),signal:t,credentials:B});if(!M.ok||!M.body){let T=`The AI request failed (${M.status}).`,p=null,c=null,v="";try{v=await M.text();const S=JSON.parse(v);S!=null&&S.error&&(T=S.error),S!=null&&S.code&&(p=S.code),S!=null&&S.reason&&(c=S.reason)}catch{}throw new oe(T,p,c)}const D=M.body.getReader(),f=new TextDecoder;let x="";try{for(;;){const{done:T,value:p}=await D.read();if(T)break;x+=f.decode(p,{stream:!0});const c=x.split(/\r?\n\r?\n/);x=c.pop()??"";for(const v of c)for(const S of v.split(/\r?\n/)){if(!S.startsWith("data:"))continue;const _=S.slice(5).trim();if(!_)continue;let C=_;try{C=Wt(JSON.parse(_))}catch{continue}if(C==="[DONE]")return;let m;try{m=JSON.parse(C)}catch{continue}if(m.error&&typeof m.error=="string"&&!m.choices)throw new oe(m.error,"provider");try{if(m.lucide_tool&&typeof m.lucide_tool=="object"){l==null||l(m.lucide_tool);continue}if(m.lucide_artifact&&typeof m.lucide_artifact=="object"){h==null||h(m.lucide_artifact);continue}if(m.lucide_ask&&typeof m.lucide_ask=="object"){g==null||g(m.lucide_ask);continue}if(m.lucide_fallback&&typeof m.lucide_fallback=="object"){j==null||j(m.lucide_fallback);continue}if(Array.isArray(m.lucide_sources)){const u=m.lucide_sources.map(d=>d).filter(d=>typeof d.title=="string"&&typeof d.url=="string").map(d=>({title:d.title,url:d.url}));u.length>0&&(a==null||a(u));continue}const A=(w=m.choices)==null?void 0:w[0],L=((y=A==null?void 0:A.delta)==null?void 0:y.content)??((b=A==null?void 0:A.message)==null?void 0:b.content);typeof L=="string"&&L&&s(L);const R=(k=m.usage)==null?void 0:k.total_tokens;typeof R=="number"&&R>0&&(r==null||r(R))}catch{}}}}catch(T){throw T}}const Kt=[{id:"none",label:"Off"},{id:"low",label:"Low"},{id:"medium",label:"Med"},{id:"high",label:"High"}],ce="medium",Bt=[{id:"deepseek",label:"DeepSeek"},{id:"qwen",label:"Qwen"},{id:"openai",label:"OpenAI"},{id:"anthropic",label:"Anthropic"}],G=[{id:"deepseek/deepseek-v4-flash-0731",label:"DeepSeek V4 Flash",provider:"deepseek",blurb:"Default chat",thinking:!0,vision:!1},{id:"qwen/qwen3.8-flash",label:"Qwen 3.8 Flash",provider:"qwen",blurb:"Vision and screenshare",thinking:!0,vision:!0},{id:"openai/gpt-6-luna",label:"GPT-6 Luna",provider:"openai",blurb:"Optional OpenAI lane",thinking:!0,vision:!0}],V="deepseek/deepseek-v4-flash-0731",le="qwen/qwen3.8-flash",ee={"openai/gpt-5.6-luna":"openai/gpt-6-luna","gpt-5.6-luna":"openai/gpt-6-luna","gpt-5.6-terra":"openai/gpt-6-luna","gpt-5.6-sol":"openai/gpt-6-luna","gpt-6-luna":"openai/gpt-6-luna","google/gemini-3.8-flash":"qwen/qwen3.8-flash","google/gemini-3.6-flash":"qwen/qwen3.8-flash","gemini-3.8-flash":"qwen/qwen3.8-flash","gemini-3.6-flash":"qwen/qwen3.8-flash","gemini-3.1-pro-preview":V,"google/gemini-3.1-pro-preview":V,"claude-sonnet-5":"openai/gpt-6-luna","claude-opus-5":"openai/gpt-6-luna","deepseek-v4-flash":"deepseek/deepseek-v4-flash-0731","deepseek-v4-pro":"deepseek/deepseek-v4-flash-0731"};function je(e){return G.some(t=>t.id===e)}function qe(e){return e&&je(e)?e:e&&ee[e]&&je(ee[e])?ee[e]:V}function Ue(e){var t;return((t=G.find(s=>s.id===e))==null?void 0:t.thinking)??!1}function ke(e){var t;return((t=G.find(s=>s.id===e))==null?void 0:t.provider)??null}function Gt(e){return e==="openai"||e==="deepseek"||e==="qwen"}function We(e){return e==="none"||e==="low"||e==="medium"||e==="high"}function Ve(e,t){return!Ue(e)||!Gt(ke(e))||!We(t)||t==="none"?null:ke(e)==="deepseek"?t==="low"?"low":"high":t}function Se(){return Bt.map(e=>({provider:e,models:G.filter(t=>t.provider===e.id)})).filter(e=>e.models.length>0)}function Xt(e){var t;return(t=e.files)!=null&&t.length?[e.content,...e.files.map(s=>`--- ${s.name} ---
1
+ var Je=Object.defineProperty;var Ye=(e,t,s)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var J=(e,t,s)=>Ye(e,typeof t!="symbol"?t+"":t,s);import{r as o,j as n,c as Qe,a as Ze}from"./react-BNEptbwn-8068ec8f.js";import{r as et,a as tt,b as K,C as B,c as Le,G as fe,E as Ae,S as nt,d as st,R as at,e as rt,f as it,g as re,L as ot,I as ct,h as lt,i as ut,j as pe,M as dt,k as me,P as ft,T as pt,l as mt,m as ht,n as gt,o as xt,p as bt,q as be,w as ye,U as yt}from"./index-COUSXtyQ-8068ec8f.js";import{i as vt}from"./fingerprint-Y5nV5FVa-8068ec8f.js";import{M as wt,r as jt,a as kt,b as St}from"./markdown-BtlGIx_H-8068ec8f.js";import{m as Ie,A as Nt}from"./motion-B1hdS1Lc-8068ec8f.js";function ve(e){return Math.max(1,Math.round(e.trim().length/4))}function Et(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function De(e){const t=e;return!!t&&typeof t.id=="string"&&Array.isArray(t.messages)&&typeof t.title=="string"}function ie(){return Math.random().toString(36).slice(2,10)+Date.now().toString(36)}function Ct(e){const t=e.trim().replace(/\s+/g," ");return t?t.length>42?t.slice(0,42).trimEnd()+"…":t:"New chat"}const Tt="IGNITE OS BROWSER-ai",H="threads",Mt=400,_e=100;let Y=null;function he(){return Y||(Y=new Promise((e,t)=>{const s=indexedDB.open(Tt,1);s.onupgradeneeded=()=>{s.result.objectStoreNames.contains(H)||s.result.createObjectStore(H,{keyPath:"id"})},s.onsuccess=()=>e(s.result),s.onerror=()=>t(s.error)})),Y}function ge(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}async function Pe(e){const t=await he();await ge(t.transaction(H,"readwrite").objectStore(H).put(e))}async function Rt(e){try{const t=await he();await ge(t.transaction(H,"readwrite").objectStore(H).delete(e))}catch{}}const Q=new Map;function Lt(e){const t=Q.get(e.id);t&&clearTimeout(t),Q.set(e.id,setTimeout(()=>{Q.delete(e.id),Pe(e).catch(()=>{})},Mt))}async function At(){const e=et("ai.threads",null);if(!(!Array.isArray(e)||e.length===0)){for(const t of e)De(t)&&await Pe(t);tt("ai.threads")}}async function It(){try{const e=await he();return await At(),(await ge(e.transaction(H,"readonly").objectStore(H).getAll())).filter(De).sort((s,r)=>r.updatedAt-s.updatedAt).slice(0,_e)}catch{return[]}}function Dt(e){return{id:ie(),title:"New chat",model:e,messages:[],updatedAt:Date.now()}}function _t(){const[e,t]=o.useState([]),[s,r]=o.useState(!1),[a,l]=o.useState(""),h=o.useRef([]);o.useEffect(()=>{let w=!0;return It().then(y=>{w&&(h.current=y,t(y),r(!0))}),()=>{w=!1}},[]),o.useEffect(()=>{if(!s)return;const w=new Map(h.current.map(b=>[b.id,b])),y=new Map(e.map(b=>[b.id,b]));for(const b of e)w.get(b.id)!==b&&Lt(b);for(const b of h.current)y.has(b.id)||Rt(b.id);h.current=e},[e,s]),o.useEffect(()=>{var w;a&&!e.some(y=>y.id===a)&&l(((w=e[0])==null?void 0:w.id)??"")},[e,a]);const g=e.find(w=>w.id===a),j=o.useCallback(w=>{const y=Dt(w);return t(b=>[y,...b].slice(0,_e)),l(y.id),y.id},[]),N=o.useCallback(w=>l(w),[]),M=o.useCallback(()=>l(""),[]),D=o.useCallback(w=>{t(y=>y.filter(b=>b.id!==w))},[]),f=o.useCallback((w,y)=>{const b=y.trim();b&&t(k=>k.map(T=>T.id===w?{...T,title:b}:T))},[]),x=o.useCallback((w,y)=>{t(b=>b.map(k=>k.id===w?y(k):k))},[]);return{threads:e,loaded:s,activeId:a,activeThread:g,create:j,select:N,startNew:M,remove:D,rename:f,update:x}}let Z=null,W=null;function Pt(){try{const e=[navigator.userAgent,navigator.language,screen.width,screen.height,screen.colorDepth,new Date().getTimezoneOffset(),navigator.hardwareConcurrency,navigator.deviceMemory].join("|");let t=2166136261;for(let s=0;s<e.length;s++)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return`fb_${(t>>>0).toString(36)}`}catch{return""}}function we(e,t){return Promise.race([e,new Promise(s=>setTimeout(()=>s(null),t))])}async function $t(){try{const e=await we(vt.load(),2500);if(e){const t=await we(e.get(),2500);if(t!=null&&t.visitorId)return t.visitorId}}catch{}return Pt()}function $e(){return Z?Promise.resolve(Z):(W||(W=$t().then(e=>(Z=e||null,W=null,e))),W)}function ze(e){return!!e&&typeof e=="object"&&typeof e.p=="string"}function zt(e){let t="";for(let s=0;s<e.length;s+=1)t+=String.fromCharCode(e[s]);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ot(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";const s=atob(t),r=new Uint8Array(s.length);for(let a=0;a<s.length;a+=1)r[a]=s.charCodeAt(a);return r}function Ft(e){return zt(new TextEncoder().encode(e))}function Oe(e){return new TextDecoder().decode(Ot(e))}function Ht(e){return{p:Ft(JSON.stringify(e))}}function qt(e){if(!ze(e))return null;try{return JSON.parse(Oe(e.p))}catch{return null}}function Fe(e){return Ht(e)}function Ut(e){const t=qt(e);if(t===null)throw new Error("packed");return t}function Wt(e){if(!ze(e))throw new Error("packed");return Oe(e.p)}class oe extends Error{constructor(s,r,a=null){super(s);J(this,"code");J(this,"reason");this.code=r,this.reason=a}}async function Vt(e){try{const t=await fetch(K("/api/ai/title"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Fe({message:e})),credentials:B});if(!t.ok)return null;const s=Ut(await t.json());return typeof(s==null?void 0:s.title)=="string"&&s.title?s.title:null}catch{return null}}async function He(e,t,s,r,a,l,h,g,j){var w,y,b,k;const N=await $e(),M=await fetch(K("/api/ai/chat"),{method:"POST",headers:{"content-type":"application/json","x-fingerprint":N,...Le("account")},body:JSON.stringify(Fe(e)),signal:t,credentials:B});if(!M.ok||!M.body){let T=`The AI request failed (${M.status}).`,p=null,c=null,v="";try{v=await M.text();const S=JSON.parse(v);S!=null&&S.error&&(T=S.error),S!=null&&S.code&&(p=S.code),S!=null&&S.reason&&(c=S.reason)}catch{}throw new oe(T,p,c)}const D=M.body.getReader(),f=new TextDecoder;let x="";try{for(;;){const{done:T,value:p}=await D.read();if(T)break;x+=f.decode(p,{stream:!0});const c=x.split(/\r?\n\r?\n/);x=c.pop()??"";for(const v of c)for(const S of v.split(/\r?\n/)){if(!S.startsWith("data:"))continue;const _=S.slice(5).trim();if(!_)continue;let C=_;try{C=Wt(JSON.parse(_))}catch{continue}if(C==="[DONE]")return;let m;try{m=JSON.parse(C)}catch{continue}if(m.error&&typeof m.error=="string"&&!m.choices)throw new oe(m.error,"provider");try{if(m.IGNITE OS BROWSER_tool&&typeof m.IGNITE OS BROWSER_tool=="object"){l==null||l(m.IGNITE OS BROWSER_tool);continue}if(m.IGNITE OS BROWSER_artifact&&typeof m.IGNITE OS BROWSER_artifact=="object"){h==null||h(m.IGNITE OS BROWSER_artifact);continue}if(m.IGNITE OS BROWSER_ask&&typeof m.IGNITE OS BROWSER_ask=="object"){g==null||g(m.IGNITE OS BROWSER_ask);continue}if(m.IGNITE OS BROWSER_fallback&&typeof m.IGNITE OS BROWSER_fallback=="object"){j==null||j(m.IGNITE OS BROWSER_fallback);continue}if(Array.isArray(m.IGNITE OS BROWSER_sources)){const u=m.IGNITE OS BROWSER_sources.map(d=>d).filter(d=>typeof d.title=="string"&&typeof d.url=="string").map(d=>({title:d.title,url:d.url}));u.length>0&&(a==null||a(u));continue}const A=(w=m.choices)==null?void 0:w[0],L=((y=A==null?void 0:A.delta)==null?void 0:y.content)??((b=A==null?void 0:A.message)==null?void 0:b.content);typeof L=="string"&&L&&s(L);const R=(k=m.usage)==null?void 0:k.total_tokens;typeof R=="number"&&R>0&&(r==null||r(R))}catch{}}}}catch(T){throw T}}const Kt=[{id:"none",label:"Off"},{id:"low",label:"Low"},{id:"medium",label:"Med"},{id:"high",label:"High"}],ce="medium",Bt=[{id:"deepseek",label:"DeepSeek"},{id:"qwen",label:"Qwen"},{id:"openai",label:"OpenAI"},{id:"anthropic",label:"Anthropic"}],G=[{id:"deepseek/deepseek-v4-flash-0731",label:"DeepSeek V4 Flash",provider:"deepseek",blurb:"Default chat",thinking:!0,vision:!1},{id:"qwen/qwen3.8-flash",label:"Qwen 3.8 Flash",provider:"qwen",blurb:"Vision and screenshare",thinking:!0,vision:!0},{id:"openai/gpt-6-luna",label:"GPT-6 Luna",provider:"openai",blurb:"Optional OpenAI lane",thinking:!0,vision:!0}],V="deepseek/deepseek-v4-flash-0731",le="qwen/qwen3.8-flash",ee={"openai/gpt-5.6-luna":"openai/gpt-6-luna","gpt-5.6-luna":"openai/gpt-6-luna","gpt-5.6-terra":"openai/gpt-6-luna","gpt-5.6-sol":"openai/gpt-6-luna","gpt-6-luna":"openai/gpt-6-luna","google/gemini-3.8-flash":"qwen/qwen3.8-flash","google/gemini-3.6-flash":"qwen/qwen3.8-flash","gemini-3.8-flash":"qwen/qwen3.8-flash","gemini-3.6-flash":"qwen/qwen3.8-flash","gemini-3.1-pro-preview":V,"google/gemini-3.1-pro-preview":V,"claude-sonnet-5":"openai/gpt-6-luna","claude-opus-5":"openai/gpt-6-luna","deepseek-v4-flash":"deepseek/deepseek-v4-flash-0731","deepseek-v4-pro":"deepseek/deepseek-v4-flash-0731"};function je(e){return G.some(t=>t.id===e)}function qe(e){return e&&je(e)?e:e&&ee[e]&&je(ee[e])?ee[e]:V}function Ue(e){var t;return((t=G.find(s=>s.id===e))==null?void 0:t.thinking)??!1}function ke(e){var t;return((t=G.find(s=>s.id===e))==null?void 0:t.provider)??null}function Gt(e){return e==="openai"||e==="deepseek"||e==="qwen"}function We(e){return e==="none"||e==="low"||e==="medium"||e==="high"}function Ve(e,t){return!Ue(e)||!Gt(ke(e))||!We(t)||t==="none"?null:ke(e)==="deepseek"?t==="low"?"low":"high":t}function Se(){return Bt.map(e=>({provider:e,models:G.filter(t=>t.provider===e.id)})).filter(e=>e.models.length>0)}function Xt(e){var t;return(t=e.files)!=null&&t.length?[e.content,...e.files.map(s=>`--- ${s.name} ---
2
2
  ${s.content}`)].filter(Boolean).join(`
3
3
 
4
4
  `):e.content}function Jt(e){const t=[];for(const s of e){if(s.error)continue;const r=Xt(s),a=s.role==="user"?s.images:void 0;if(!r.trim()&&!(a!=null&&a.length))continue;if(s.role==="user"&&(a!=null&&a.length)){const g={role:"user",content:[{type:"text",text:r},...a.map(N=>({type:"image_url",image_url:{url:N}}))]},j=t[t.length-1];(j==null?void 0:j.role)==="user"?t[t.length-1]=g:t.push(g);continue}const l={role:s.role,content:r},h=t[t.length-1];if((h==null?void 0:h.role)===l.role){l.role==="user"&&typeof h.content=="string"?h.content=[h.content,r].filter(Boolean).join(`
@@ -15,4 +15,4 @@ ${s.content}`)].filter(Boolean).join(`
15
15
  .md pre code { background: transparent; padding: 0; }
16
16
  .md a { color: var(--assistant-accent); text-decoration: underline; }
17
17
  .md blockquote { margin: 8px 0; border-left: 2px solid var(--assistant-border); padding-left: 8px; opacity: 0.9; }
18
- `,t.head.append(r)}if(!t.getElementById("_1u0ijh5")){const r=t.createElement("link");r.id="_1u0ijh5",r.rel="stylesheet",r.href=En,t.head.append(r)}const s=t.createElement("div");return s.style.width="100%",s.style.display="block",t.body.append(s),s}function Ln(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}function An({onError:e,onStateChange:t}){const[s,r]=o.useState(!1),a=o.useRef(null),l=o.useRef(null),h=o.useRef(null),g=o.useRef(!1),j=o.useCallback(()=>{if(l.current)return l.current;const f=document.createElement("video");return f.muted=!0,f.autoplay=!0,f.playsInline=!0,l.current=f,f},[]),N=o.useCallback(()=>{const f=a.current;if(f)for(const x of f.getTracks())x.stop();a.current=null,l.current&&(l.current.srcObject=null),h.current=null,g.current=!1,r(!1),t()},[t]),M=o.useCallback(async f=>{if(a.current)return!0;try{const w=await(f??window).navigator.mediaDevices.getDisplayMedia(Cn);w.getVideoTracks()[0].addEventListener("ended",()=>N());const b=j();return b.srcObject=w,await b.play().catch(()=>{}),a.current=w,g.current=!0,r(!0),t(),!0}catch(x){const w=x instanceof Error?x.message:"Could not start screen sharing";return e(w),!1}},[j,e,t,N]),D=o.useCallback(async()=>{if(!a.current)throw new Error("Screen sharing is not active");const f=j();(!f.videoWidth||!f.videoHeight)&&await new Promise((S,_)=>{const C=window.setTimeout(()=>_(new Error("Timed out waiting for screen frame")),1200),m=()=>{window.clearTimeout(C),f.removeEventListener("loadeddata",m),S()};f.addEventListener("loadeddata",m)});const x=Math.max(1,f.videoWidth),w=Math.max(1,f.videoHeight),y=960,b=x>y?y/x:1,k=Math.max(1,Math.round(x*b)),T=Math.max(1,Math.round(w*b)),p=h.current??document.createElement("canvas");h.current=p,p.width=k,p.height=T;const c=p.getContext("2d");if(!c)throw new Error("Canvas context unavailable");c.drawImage(f,0,0,k,T);const v=await new Promise(S=>p.toBlob(S,"image/jpeg",.72));return v?await new Promise((S,_)=>{const C=new FileReader;C.onload=()=>{typeof C.result=="string"?S(C.result):_(new Error("Failed to encode screen capture"))},C.onerror=()=>_(new Error("Failed to encode screen capture")),C.readAsDataURL(v)}):p.toDataURL("image/jpeg",.72)},[j]);return{isSharing:s,isSharingRef:g,streamRef:a,startSharing:M,stopSharing:N,captureFrameDataUrl:D}}const In=380,Dn=240,_n=820,Pn=150;function $n(e){const t=e.document.body.firstElementChild;return t instanceof HTMLElement?Math.ceil(t.getBoundingClientRect().height):0}function de(e){try{if(e.closed)return;const t=$n(e)-e.innerHeight;if(Math.abs(t)<=1)return;const s=Math.min(_n,Math.max(Pn,e.outerHeight+t));s!==e.outerHeight&&e.resizeTo(e.outerWidth,s)}catch{}}function zn(e){try{e.requestAnimationFrame(()=>{de(e),e.setTimeout(()=>e.requestAnimationFrame(()=>de(e)),90)})}catch{}}function On({onAsk:e}){const[t,s]=o.useState("closed"),[r,a]=o.useState(""),[l,h]=o.useState(!1),[g,j]=o.useState(null),[N,M]=o.useState(null),[D,f]=o.useState(le),x=o.useRef(null),w=o.useRef(null),y=o.useRef(!1);y.current=l;const b=o.useCallback(d=>M(d),[]),k=o.useCallback(()=>{},[]),{isSharing:T,isSharingRef:p,streamRef:c,startSharing:v,stopSharing:S,captureFrameDataUrl:_}=An({onError:b,onStateChange:k}),C=o.useCallback(()=>{var i;const d=x.current;if(x.current=null,d){(i=d.resizeObserver)==null||i.disconnect(),window.setTimeout(()=>d.root.unmount(),0);try{d.window.close()}catch{}}},[]),m=o.useCallback(()=>{C(),S(),s("closed"),a(""),j(null)},[C,S]),A=o.useCallback(async d=>{var P,z,$;if(y.current)return;const i=d.trim();if(!i){j("Type a question first.");return}if(!p.current){j("Start screen sharing first.");return}h(!0),j(null),a("Thinking…");const E=x.current,I=(E==null?void 0:E.mountElement)??w.current;try{const q=(($=(z=(P=c.current)==null?void 0:P.getVideoTracks()[0])==null?void 0:z.getSettings())==null?void 0:$.displaySurface)==="monitor"&&I;q&&(I.style.visibility="hidden",await Ln());const Xe=await _();q&&(I.style.visibility="visible",E==null||E.window.focus());let xe=!1,X="";await e(i,Xe,{onDelta:U=>{xe||(X="",xe=!0),X+=U,a(X),j(null)},onError:U=>{a(U),j(U)},onComplete:()=>h(!1)})}catch(O){I&&(I.style.visibility="visible");const q=O instanceof Error?O.message:"Failed to ask about screen";a(q),j(q)}finally{h(!1)}},[_,p,e,c]),L=o.useCallback(()=>{var d;if(p.current){S();return}v(t==="window"?(d=x.current)==null?void 0:d.window:window)},[p,t,v,S]);o.useEffect(()=>{if(t!=="window")return;const d=x.current;if(!d)return;const i=ue(),E=d.window.document;E.documentElement.style.background=i.bg,E.body.style.background=i.bg,E.body.style.margin="0",E.body.style.padding="0",E.documentElement.style.setProperty("--assistant-border",i.border),E.documentElement.style.setProperty("--assistant-code-bg",`color-mix(in srgb, ${i.surface} 78%, black 22%)`),E.documentElement.style.setProperty("--assistant-accent",i.accent),d.root.render(n.jsx(Ge,{tokens:i,isSharing:T,isAsking:l,output:r,error:g,onAsk:I=>void A(I),onClose:m})),zn(d.window)},[t,T,l,r,g,A,m]);const R=o.useCallback(async()=>{const d=Tn(),i=d.documentPictureInPicture;let E=null;if(i!=null&&i.requestWindow)try{E=await i.requestWindow({width:In,height:Dn,disallowReturnToOpener:!0,preferInitialWindowPlacement:!0})}catch{E=null}if(!E)try{E=Mn(d)}catch{E=null}if(!E){s("inpage");return}const I=Rn(E),P=Qe.createRoot(I),z=E.ResizeObserver,$=z?new z(()=>de(E)):null;$==null||$.observe(I),x.current={window:E,root:P,mountElement:I,resizeObserver:$},E.addEventListener("pagehide",()=>{var O;((O=x.current)==null?void 0:O.window)===E&&m()},{once:!0}),s("window")},[m]),u=o.useCallback(async()=>{if(!p.current){if(!await v(window))return;M(null)}await R()},[p,v,R]);return o.useEffect(()=>()=>{C(),S()},[C,S]),{isSharing:T,mode:t,error:N,output:r,isAsking:l,askError:g,selectedModel:D,panelRef:w,start:u,popOut:R,stop:S,close:m,ask:A,toggleSharing:L,setSelectedModel:f,tokens:ue}}const Fn=""+new URL("verity-mini-DjLHPujK.png",import.meta.url).href,Me=16,Re=.14;function Hn(){const e=o.useRef(null);return o.useEffect(()=>{const t=e.current;if(!t)return;let s=0,r=0,a=0,l=0,h=0,g=!1;const j=()=>{l+=(r-l)*Re,h+=(a-h)*Re,t.style.transform=`translate3d(${l}px, ${h}px, 0)`,s=requestAnimationFrame(j)},N=D=>{r=D.clientX+Me,a=D.clientY+Me,g||(l=r,h=a,g=!0,t.dataset.visible="true")},M=()=>{g=!1,t.dataset.visible="false"};return window.addEventListener("mousemove",N,{passive:!0}),document.documentElement.addEventListener("mouseleave",M),s=requestAnimationFrame(j),()=>{window.removeEventListener("mousemove",N),document.documentElement.removeEventListener("mouseleave",M),cancelAnimationFrame(s)}},[]),Ze.createPortal(n.jsx("div",{className:"ai-verity-layer",children:n.jsx("img",{ref:e,className:"ai-verity-cursor",src:Fn,alt:"","aria-hidden":"true"})}),xt())}function qn({artifacts:e,onClose:t}){var h;const[s,r]=o.useState(((h=e[e.length-1])==null?void 0:h.id)??""),a=e.find(g=>g.id===s)??e[e.length-1],l=o.useMemo(()=>URL.createObjectURL(new Blob([(a==null?void 0:a.html)||"<!doctype html><title></title>"],{type:"text/html"})),[a==null?void 0:a.id,a==null?void 0:a.html]);return o.useEffect(()=>()=>URL.revokeObjectURL(l),[l]),a?n.jsxs("aside",{className:"ai-artifact",children:[n.jsxs("header",{className:"ai-artifact-head",children:[n.jsx(bt,{size:14}),n.jsx("nav",{className:"ai-artifact-tabs",children:e.map(g=>n.jsx("button",{type:"button",className:g.id===a.id?"on":"",onClick:()=>r(g.id),children:g.title||"Preview"},g.id))}),n.jsx("a",{className:"ai-act",href:l,target:"_blank",rel:"noreferrer",children:"Open"}),n.jsx("button",{type:"button",className:"ai-act","aria-label":"Close preview",onClick:t,children:n.jsx(re,{size:14})})]}),n.jsx("iframe",{className:"ai-artifact-frame",title:a.title||"Artifact",sandbox:"allow-scripts",src:l})]}):null}const ae=["What is the capital of france","What does a cow say","How do i become exit liquidity?","Plan a 3-day trip to Tokyo","Summarize the plot of Hamlet","Give me a 20-minute HIIT workout","Explain how HTTPS works","Suggest a name for my startup","What's the difference between TCP and UDP?","Recommend three sci-fi books","Turn this idea into a to-do list","Explain Docker like I'm five"];function Xn({account:e,onOpenAccount:t}){const s=_t(),[r,a]=o.useState(null),[l,h]=o.useState(!1),[g,j]=o.useState(()=>qe(be("ai.model")??V)),[N,M]=o.useState(()=>{const u=be("ai.thinking");return We(u)?u:ce}),[D,f]=o.useState(!1),[x,w]=o.useState(!1),[y,b]=o.useState(!0),k=Qt(s,g,N,a),T=o.useRef(null),p=On({onAsk:async(u,d,i)=>{const E=new AbortController,I=[{role:"user",content:[{type:"text",text:u},{type:"image_url",image_url:{url:d}}]}],P=Ve(le,N);try{await He({model:le,web_search:!1,screen:!0,messages:I,...P?{reasoning_effort:P}:{}},E.signal,i.onDelta),i.onComplete()}catch(z){i.onError(z instanceof Error?z.message:"Could not ask about your screen.")}}}),c=()=>{if(p.mode!=="closed"){p.close();return}p.start()};o.useEffect(()=>{ye("ai.model",g)},[g]),o.useEffect(()=>{ye("ai.thinking",N)},[N]),o.useEffect(()=>{const u=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),h(i=>!i))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[]);const v=s.activeThread,S=(v==null?void 0:v.messages)??[],[_]=o.useState(()=>Math.floor(Math.random()*ae.length)),C=Array.from({length:4},(u,d)=>ae[(_+d)%ae.length]);o.useEffect(()=>{const u=T.current;u&&(u.scrollTop=u.scrollHeight)},[S]);const m=D&&e.isPlus,A=(u,d,i)=>{k.send(u,d,i,m)},L=S[S.length-1],R=!k.isStreaming&&(L==null?void 0:L.role)==="assistant"&&!L.error;return n.jsxs("div",{className:"ai",children:[n.jsx(Hn,{}),n.jsx(xn,{threads:s.threads,activeId:s.activeId,streaming:k.isStreaming,isPlus:e.isPlus,screenSharing:p.isSharing,screenError:p.error,onToggleScreen:()=>void c(),onOpenSearch:()=>h(!0),onNew:s.startNew,onSelect:s.select,onRemove:s.remove,onRename:s.rename,onUpgrade:()=>a({code:"manual",reason:null})}),n.jsxs("div",{className:"ai-main",children:[n.jsx("div",{className:"ai-scroll",ref:T,children:S.length===0?n.jsxs("div",{className:"ai-empty",children:[n.jsx("h1",{className:"ai-empty-title",children:"How can Verity help?"}),n.jsx("p",{className:"ai-empty-sub",children:"Use the globe for live web search with Plus."}),n.jsx("div",{className:"ai-suggestions",children:C.map(u=>n.jsx("button",{type:"button",className:"ai-suggestion",onClick:()=>A(u,[],[]),children:u},u))},_)]}):n.jsx("div",{className:"ai-messages",children:S.map((u,d)=>n.jsx(ln,{message:u,canRegenerate:R&&d===S.length-1,onRegenerate:()=>k.regenerate(m,u.id),onEdit:u.role==="user"&&!k.isStreaming?i=>k.editResend(u.id,i,m):void 0,onSetVersion:i=>k.setVersion(u.id,i),onAskPick:i=>A(i,[],[])},u.id))})}),k.error&&n.jsx("div",{className:"ai-banner",children:k.error}),n.jsx(hn,{disabled:!s.loaded,isStreaming:k.isStreaming,webSearch:m,searchLocked:!e.isPlus,onToggleWebSearch:()=>{if(!e.isPlus){w(!0);return}f(u=>!u)},onSend:A,onStop:k.stop,modelSlot:n.jsx(Sn,{value:g,onChange:j,thinking:N,onThinkingChange:M})})]}),l&&n.jsx(vn,{threads:s.threads,onSelect:s.select,onClose:()=>h(!1)}),p.mode==="inpage"&&n.jsx("div",{className:"ai-screen-panel",ref:p.panelRef,children:n.jsx(Ge,{tokens:ue(),isSharing:p.isSharing,isAsking:p.isAsking,output:p.output,error:p.askError??p.error,onAsk:u=>void p.ask(u),onClose:p.close,onPopOut:()=>void p.popOut()})}),y&&S.some(u=>{var d;return(d=u.artifacts)==null?void 0:d.length})&&n.jsx(qn,{artifacts:S.flatMap(u=>u.artifacts??[]),onClose:()=>b(!1)}),n.jsx(yt,{open:!!r||x,onClose:()=>{a(null),w(!1)},account:e,heading:x?"Web search needs Lucide Plus":(r==null?void 0:r.code)==="rate_limit"?r.reason==="minute"?"Slow down a moment":"You've hit your daily AI limit":void 0,blurb:x?"Live web search is a Plus perk. Plus also includes 3M tokens/day and 50 messages a minute.":(r==null?void 0:r.code)==="rate_limit"?r.reason==="minute"?"Free accounts get 5 messages a minute. Lucide Plus raises that to 50/min — plus a 3M token/day budget.":"Free accounts get 60k AI tokens a day. Lucide Plus gives 3M tokens/day and 50/min.":void 0,onSignUp:()=>{a(null),w(!1),t==null||t()}})]})}export{Xn as AiPage};
18
+ `,t.head.append(r)}if(!t.getElementById("_1u0ijh5")){const r=t.createElement("link");r.id="_1u0ijh5",r.rel="stylesheet",r.href=En,t.head.append(r)}const s=t.createElement("div");return s.style.width="100%",s.style.display="block",t.body.append(s),s}function Ln(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}function An({onError:e,onStateChange:t}){const[s,r]=o.useState(!1),a=o.useRef(null),l=o.useRef(null),h=o.useRef(null),g=o.useRef(!1),j=o.useCallback(()=>{if(l.current)return l.current;const f=document.createElement("video");return f.muted=!0,f.autoplay=!0,f.playsInline=!0,l.current=f,f},[]),N=o.useCallback(()=>{const f=a.current;if(f)for(const x of f.getTracks())x.stop();a.current=null,l.current&&(l.current.srcObject=null),h.current=null,g.current=!1,r(!1),t()},[t]),M=o.useCallback(async f=>{if(a.current)return!0;try{const w=await(f??window).navigator.mediaDevices.getDisplayMedia(Cn);w.getVideoTracks()[0].addEventListener("ended",()=>N());const b=j();return b.srcObject=w,await b.play().catch(()=>{}),a.current=w,g.current=!0,r(!0),t(),!0}catch(x){const w=x instanceof Error?x.message:"Could not start screen sharing";return e(w),!1}},[j,e,t,N]),D=o.useCallback(async()=>{if(!a.current)throw new Error("Screen sharing is not active");const f=j();(!f.videoWidth||!f.videoHeight)&&await new Promise((S,_)=>{const C=window.setTimeout(()=>_(new Error("Timed out waiting for screen frame")),1200),m=()=>{window.clearTimeout(C),f.removeEventListener("loadeddata",m),S()};f.addEventListener("loadeddata",m)});const x=Math.max(1,f.videoWidth),w=Math.max(1,f.videoHeight),y=960,b=x>y?y/x:1,k=Math.max(1,Math.round(x*b)),T=Math.max(1,Math.round(w*b)),p=h.current??document.createElement("canvas");h.current=p,p.width=k,p.height=T;const c=p.getContext("2d");if(!c)throw new Error("Canvas context unavailable");c.drawImage(f,0,0,k,T);const v=await new Promise(S=>p.toBlob(S,"image/jpeg",.72));return v?await new Promise((S,_)=>{const C=new FileReader;C.onload=()=>{typeof C.result=="string"?S(C.result):_(new Error("Failed to encode screen capture"))},C.onerror=()=>_(new Error("Failed to encode screen capture")),C.readAsDataURL(v)}):p.toDataURL("image/jpeg",.72)},[j]);return{isSharing:s,isSharingRef:g,streamRef:a,startSharing:M,stopSharing:N,captureFrameDataUrl:D}}const In=380,Dn=240,_n=820,Pn=150;function $n(e){const t=e.document.body.firstElementChild;return t instanceof HTMLElement?Math.ceil(t.getBoundingClientRect().height):0}function de(e){try{if(e.closed)return;const t=$n(e)-e.innerHeight;if(Math.abs(t)<=1)return;const s=Math.min(_n,Math.max(Pn,e.outerHeight+t));s!==e.outerHeight&&e.resizeTo(e.outerWidth,s)}catch{}}function zn(e){try{e.requestAnimationFrame(()=>{de(e),e.setTimeout(()=>e.requestAnimationFrame(()=>de(e)),90)})}catch{}}function On({onAsk:e}){const[t,s]=o.useState("closed"),[r,a]=o.useState(""),[l,h]=o.useState(!1),[g,j]=o.useState(null),[N,M]=o.useState(null),[D,f]=o.useState(le),x=o.useRef(null),w=o.useRef(null),y=o.useRef(!1);y.current=l;const b=o.useCallback(d=>M(d),[]),k=o.useCallback(()=>{},[]),{isSharing:T,isSharingRef:p,streamRef:c,startSharing:v,stopSharing:S,captureFrameDataUrl:_}=An({onError:b,onStateChange:k}),C=o.useCallback(()=>{var i;const d=x.current;if(x.current=null,d){(i=d.resizeObserver)==null||i.disconnect(),window.setTimeout(()=>d.root.unmount(),0);try{d.window.close()}catch{}}},[]),m=o.useCallback(()=>{C(),S(),s("closed"),a(""),j(null)},[C,S]),A=o.useCallback(async d=>{var P,z,$;if(y.current)return;const i=d.trim();if(!i){j("Type a question first.");return}if(!p.current){j("Start screen sharing first.");return}h(!0),j(null),a("Thinking…");const E=x.current,I=(E==null?void 0:E.mountElement)??w.current;try{const q=(($=(z=(P=c.current)==null?void 0:P.getVideoTracks()[0])==null?void 0:z.getSettings())==null?void 0:$.displaySurface)==="monitor"&&I;q&&(I.style.visibility="hidden",await Ln());const Xe=await _();q&&(I.style.visibility="visible",E==null||E.window.focus());let xe=!1,X="";await e(i,Xe,{onDelta:U=>{xe||(X="",xe=!0),X+=U,a(X),j(null)},onError:U=>{a(U),j(U)},onComplete:()=>h(!1)})}catch(O){I&&(I.style.visibility="visible");const q=O instanceof Error?O.message:"Failed to ask about screen";a(q),j(q)}finally{h(!1)}},[_,p,e,c]),L=o.useCallback(()=>{var d;if(p.current){S();return}v(t==="window"?(d=x.current)==null?void 0:d.window:window)},[p,t,v,S]);o.useEffect(()=>{if(t!=="window")return;const d=x.current;if(!d)return;const i=ue(),E=d.window.document;E.documentElement.style.background=i.bg,E.body.style.background=i.bg,E.body.style.margin="0",E.body.style.padding="0",E.documentElement.style.setProperty("--assistant-border",i.border),E.documentElement.style.setProperty("--assistant-code-bg",`color-mix(in srgb, ${i.surface} 78%, black 22%)`),E.documentElement.style.setProperty("--assistant-accent",i.accent),d.root.render(n.jsx(Ge,{tokens:i,isSharing:T,isAsking:l,output:r,error:g,onAsk:I=>void A(I),onClose:m})),zn(d.window)},[t,T,l,r,g,A,m]);const R=o.useCallback(async()=>{const d=Tn(),i=d.documentPictureInPicture;let E=null;if(i!=null&&i.requestWindow)try{E=await i.requestWindow({width:In,height:Dn,disallowReturnToOpener:!0,preferInitialWindowPlacement:!0})}catch{E=null}if(!E)try{E=Mn(d)}catch{E=null}if(!E){s("inpage");return}const I=Rn(E),P=Qe.createRoot(I),z=E.ResizeObserver,$=z?new z(()=>de(E)):null;$==null||$.observe(I),x.current={window:E,root:P,mountElement:I,resizeObserver:$},E.addEventListener("pagehide",()=>{var O;((O=x.current)==null?void 0:O.window)===E&&m()},{once:!0}),s("window")},[m]),u=o.useCallback(async()=>{if(!p.current){if(!await v(window))return;M(null)}await R()},[p,v,R]);return o.useEffect(()=>()=>{C(),S()},[C,S]),{isSharing:T,mode:t,error:N,output:r,isAsking:l,askError:g,selectedModel:D,panelRef:w,start:u,popOut:R,stop:S,close:m,ask:A,toggleSharing:L,setSelectedModel:f,tokens:ue}}const Fn=""+new URL("verity-mini-DjLHPujK.png",import.meta.url).href,Me=16,Re=.14;function Hn(){const e=o.useRef(null);return o.useEffect(()=>{const t=e.current;if(!t)return;let s=0,r=0,a=0,l=0,h=0,g=!1;const j=()=>{l+=(r-l)*Re,h+=(a-h)*Re,t.style.transform=`translate3d(${l}px, ${h}px, 0)`,s=requestAnimationFrame(j)},N=D=>{r=D.clientX+Me,a=D.clientY+Me,g||(l=r,h=a,g=!0,t.dataset.visible="true")},M=()=>{g=!1,t.dataset.visible="false"};return window.addEventListener("mousemove",N,{passive:!0}),document.documentElement.addEventListener("mouseleave",M),s=requestAnimationFrame(j),()=>{window.removeEventListener("mousemove",N),document.documentElement.removeEventListener("mouseleave",M),cancelAnimationFrame(s)}},[]),Ze.createPortal(n.jsx("div",{className:"ai-verity-layer",children:n.jsx("img",{ref:e,className:"ai-verity-cursor",src:Fn,alt:"","aria-hidden":"true"})}),xt())}function qn({artifacts:e,onClose:t}){var h;const[s,r]=o.useState(((h=e[e.length-1])==null?void 0:h.id)??""),a=e.find(g=>g.id===s)??e[e.length-1],l=o.useMemo(()=>URL.createObjectURL(new Blob([(a==null?void 0:a.html)||"<!doctype html><title></title>"],{type:"text/html"})),[a==null?void 0:a.id,a==null?void 0:a.html]);return o.useEffect(()=>()=>URL.revokeObjectURL(l),[l]),a?n.jsxs("aside",{className:"ai-artifact",children:[n.jsxs("header",{className:"ai-artifact-head",children:[n.jsx(bt,{size:14}),n.jsx("nav",{className:"ai-artifact-tabs",children:e.map(g=>n.jsx("button",{type:"button",className:g.id===a.id?"on":"",onClick:()=>r(g.id),children:g.title||"Preview"},g.id))}),n.jsx("a",{className:"ai-act",href:l,target:"_blank",rel:"noreferrer",children:"Open"}),n.jsx("button",{type:"button",className:"ai-act","aria-label":"Close preview",onClick:t,children:n.jsx(re,{size:14})})]}),n.jsx("iframe",{className:"ai-artifact-frame",title:a.title||"Artifact",sandbox:"allow-scripts",src:l})]}):null}const ae=["What is the capital of france","What does a cow say","How do i become exit liquidity?","Plan a 3-day trip to Tokyo","Summarize the plot of Hamlet","Give me a 20-minute HIIT workout","Explain how HTTPS works","Suggest a name for my startup","What's the difference between TCP and UDP?","Recommend three sci-fi books","Turn this idea into a to-do list","Explain Docker like I'm five"];function Xn({account:e,onOpenAccount:t}){const s=_t(),[r,a]=o.useState(null),[l,h]=o.useState(!1),[g,j]=o.useState(()=>qe(be("ai.model")??V)),[N,M]=o.useState(()=>{const u=be("ai.thinking");return We(u)?u:ce}),[D,f]=o.useState(!1),[x,w]=o.useState(!1),[y,b]=o.useState(!0),k=Qt(s,g,N,a),T=o.useRef(null),p=On({onAsk:async(u,d,i)=>{const E=new AbortController,I=[{role:"user",content:[{type:"text",text:u},{type:"image_url",image_url:{url:d}}]}],P=Ve(le,N);try{await He({model:le,web_search:!1,screen:!0,messages:I,...P?{reasoning_effort:P}:{}},E.signal,i.onDelta),i.onComplete()}catch(z){i.onError(z instanceof Error?z.message:"Could not ask about your screen.")}}}),c=()=>{if(p.mode!=="closed"){p.close();return}p.start()};o.useEffect(()=>{ye("ai.model",g)},[g]),o.useEffect(()=>{ye("ai.thinking",N)},[N]),o.useEffect(()=>{const u=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),h(i=>!i))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[]);const v=s.activeThread,S=(v==null?void 0:v.messages)??[],[_]=o.useState(()=>Math.floor(Math.random()*ae.length)),C=Array.from({length:4},(u,d)=>ae[(_+d)%ae.length]);o.useEffect(()=>{const u=T.current;u&&(u.scrollTop=u.scrollHeight)},[S]);const m=D&&e.isPlus,A=(u,d,i)=>{k.send(u,d,i,m)},L=S[S.length-1],R=!k.isStreaming&&(L==null?void 0:L.role)==="assistant"&&!L.error;return n.jsxs("div",{className:"ai",children:[n.jsx(Hn,{}),n.jsx(xn,{threads:s.threads,activeId:s.activeId,streaming:k.isStreaming,isPlus:e.isPlus,screenSharing:p.isSharing,screenError:p.error,onToggleScreen:()=>void c(),onOpenSearch:()=>h(!0),onNew:s.startNew,onSelect:s.select,onRemove:s.remove,onRename:s.rename,onUpgrade:()=>a({code:"manual",reason:null})}),n.jsxs("div",{className:"ai-main",children:[n.jsx("div",{className:"ai-scroll",ref:T,children:S.length===0?n.jsxs("div",{className:"ai-empty",children:[n.jsx("h1",{className:"ai-empty-title",children:"How can Verity help?"}),n.jsx("p",{className:"ai-empty-sub",children:"Use the globe for live web search with Plus."}),n.jsx("div",{className:"ai-suggestions",children:C.map(u=>n.jsx("button",{type:"button",className:"ai-suggestion",onClick:()=>A(u,[],[]),children:u},u))},_)]}):n.jsx("div",{className:"ai-messages",children:S.map((u,d)=>n.jsx(ln,{message:u,canRegenerate:R&&d===S.length-1,onRegenerate:()=>k.regenerate(m,u.id),onEdit:u.role==="user"&&!k.isStreaming?i=>k.editResend(u.id,i,m):void 0,onSetVersion:i=>k.setVersion(u.id,i),onAskPick:i=>A(i,[],[])},u.id))})}),k.error&&n.jsx("div",{className:"ai-banner",children:k.error}),n.jsx(hn,{disabled:!s.loaded,isStreaming:k.isStreaming,webSearch:m,searchLocked:!e.isPlus,onToggleWebSearch:()=>{if(!e.isPlus){w(!0);return}f(u=>!u)},onSend:A,onStop:k.stop,modelSlot:n.jsx(Sn,{value:g,onChange:j,thinking:N,onThinkingChange:M})})]}),l&&n.jsx(vn,{threads:s.threads,onSelect:s.select,onClose:()=>h(!1)}),p.mode==="inpage"&&n.jsx("div",{className:"ai-screen-panel",ref:p.panelRef,children:n.jsx(Ge,{tokens:ue(),isSharing:p.isSharing,isAsking:p.isAsking,output:p.output,error:p.askError??p.error,onAsk:u=>void p.ask(u),onClose:p.close,onPopOut:()=>void p.popOut()})}),y&&S.some(u=>{var d;return(d=u.artifacts)==null?void 0:d.length})&&n.jsx(qn,{artifacts:S.flatMap(u=>u.artifacts??[]),onClose:()=>b(!1)}),n.jsx(yt,{open:!!r||x,onClose:()=>{a(null),w(!1)},account:e,heading:x?"Web search needs IGNITE OS BROWSER Plus":(r==null?void 0:r.code)==="rate_limit"?r.reason==="minute"?"Slow down a moment":"You've hit your daily AI limit":void 0,blurb:x?"Live web search is a Plus perk. Plus also includes 3M tokens/day and 50 messages a minute.":(r==null?void 0:r.code)==="rate_limit"?r.reason==="minute"?"Free accounts get 5 messages a minute. IGNITE OS BROWSER Plus raises that to 50/min — plus a 3M token/day budget.":"Free accounts get 60k AI tokens a day. IGNITE OS BROWSER Plus gives 3M tokens/day and 50/min.":void 0,onSignUp:()=>{a(null),w(!1),t==null||t()}})]})}export{Xn as AiPage};
@@ -1 +1 @@
1
- import{r as d,j as s}from"./react-BNEptbwn-8068ec8f.js";import{a0 as u,V as p}from"./index-COUSXtyQ-8068ec8f.js";/* empty css *//* empty css */import"./motion-B1hdS1Lc-8068ec8f.js";const h=["No ads","3M AI tokens/day","Exclusive Plus links","Discord Plus role"];function y({account:e,onOpenAccount:a}){var r;const[t,n]=d.useState(!1),l=e.status==="signed-in",c=e.isPlus,o=async()=>{var i;if(!l){a();return}n(!0);try{await e.checkout(((i=e.user)==null?void 0:i.email)??void 0)}finally{n(!1)}};return s.jsx("div",{className:"settings-page plus-page",children:s.jsxs("div",{className:"settings-page-inner",children:[s.jsxs("div",{className:"settings-page-head",children:[s.jsxs("h1",{children:["Lucide",s.jsx("span",{className:"plus-page-mark",children:"+"})]}),s.jsx("p",{children:"Remove ads, unlock 3M AI tokens/day, and get Discord perks."})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"What you get"}),s.jsx("ul",{className:"plus-page-perks",children:h.map(i=>s.jsx("li",{children:i},i))}),s.jsx("p",{className:"plus-page-price",children:"$6.99 / month · cancel anytime"})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Get Plus"}),e.status==="loading"?s.jsx("p",{className:"plus-page-hint",children:"Checking your account…"}):c?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"plus-page-hint",children:"You're already on Lucide Plus."}),s.jsx("button",{type:"button",className:"account-btn ghost",onClick:()=>void e.manageBilling(),children:"Manage billing"})]}):l?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"plus-page-hint",children:["Signed in as ",(r=e.user)==null?void 0:r.email,". Continue to Stripe to subscribe."]}),s.jsx(u,{}),e.authError&&s.jsx("div",{className:"account-error",children:e.authError}),s.jsx("button",{type:"button",className:"account-btn primary",disabled:t,onClick:()=>void o(),children:t?"Opening Stripe…":"Upgrade to Plus"})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"plus-page-hint",children:"Create a Lucide account first, then you can buy Plus."}),s.jsx("button",{type:"button",className:"account-btn primary",onClick:a,children:"Create an account"})]})]}),s.jsxs("div",{className:"settings-page-foot",children:[s.jsx(p,{size:14}),s.jsx("span",{children:"Lucide"})]})]})})}export{y as PlusPage};
1
+ import{r as d,j as s}from"./react-BNEptbwn-8068ec8f.js";import{a0 as u,V as p}from"./index-COUSXtyQ-8068ec8f.js";/* empty css *//* empty css */import"./motion-B1hdS1Lc-8068ec8f.js";const h=["No ads","3M AI tokens/day","Exclusive Plus links","Discord Plus role"];function y({account:e,onOpenAccount:a}){var r;const[t,n]=d.useState(!1),l=e.status==="signed-in",c=e.isPlus,o=async()=>{var i;if(!l){a();return}n(!0);try{await e.checkout(((i=e.user)==null?void 0:i.email)??void 0)}finally{n(!1)}};return s.jsx("div",{className:"settings-page plus-page",children:s.jsxs("div",{className:"settings-page-inner",children:[s.jsxs("div",{className:"settings-page-head",children:[s.jsxs("h1",{children:["IGNITE OS BROWSER",s.jsx("span",{className:"plus-page-mark",children:"+"})]}),s.jsx("p",{children:"Remove ads, unlock 3M AI tokens/day, and get Discord perks."})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"What you get"}),s.jsx("ul",{className:"plus-page-perks",children:h.map(i=>s.jsx("li",{children:i},i))}),s.jsx("p",{className:"plus-page-price",children:"$6.99 / month · cancel anytime"})]}),s.jsxs("section",{className:"settings-section",children:[s.jsx("div",{className:"settings-section-title",children:"Get Plus"}),e.status==="loading"?s.jsx("p",{className:"plus-page-hint",children:"Checking your account…"}):c?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"plus-page-hint",children:"You're already on IGNITE OS BROWSER Plus."}),s.jsx("button",{type:"button",className:"account-btn ghost",onClick:()=>void e.manageBilling(),children:"Manage billing"})]}):l?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"plus-page-hint",children:["Signed in as ",(r=e.user)==null?void 0:r.email,". Continue to Stripe to subscribe."]}),s.jsx(u,{}),e.authError&&s.jsx("div",{className:"account-error",children:e.authError}),s.jsx("button",{type:"button",className:"account-btn primary",disabled:t,onClick:()=>void o(),children:t?"Opening Stripe…":"Upgrade to Plus"})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"plus-page-hint",children:"Create a IGNITE OS BROWSER account first, then you can buy Plus."}),s.jsx("button",{type:"button",className:"account-btn primary",onClick:a,children:"Create an account"})]})]}),s.jsxs("div",{className:"settings-page-foot",children:[s.jsx(p,{size:14}),s.jsx("span",{children:"IGNITE OS BROWSER"})]})]})})}export{y as PlusPage};
@@ -1 +1 @@
1
- import{r as l,j as e}from"./react-BNEptbwn-8068ec8f.js";import{A as S,B as A,D as L,F as N,H as P,J as T,K as _,N as R,O as F,Q as B,V as D,W as w,X as O,Y as k,Z as I,_ as C}from"./index-COUSXtyQ-8068ec8f.js";/* empty css */import"./motion-B1hdS1Lc-8068ec8f.js";const p="__auto__",f="__custom__";function U(){const t=l.useMemo(()=>S(),[]),i=l.useMemo(()=>A(),[]),a=R(),r=L(),o=t.includes(a)||i.includes(a),[d,h]=l.useState(()=>r&&!!a&&!o),[x,v]=l.useState(()=>r&&a&&!o?a:""),[g,m]=l.useState(null),j=d?f:r&&a&&o?a:p;return e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Backend"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"API host"}),e.jsxs("div",{className:"settings-row-hint",children:["Using ",a?N(a):"this site",r?" (pinned)":" (auto)","."]})]}),e.jsxs("select",{className:"settings-select",value:j,onChange:n=>{const u=n.target.value;if(m(null),u===p){P(),location.reload();return}if(u===f){h(!0),v(a&&!t.includes(a)?a:"");return}h(!1),T(u)&&location.reload()},children:[e.jsx("option",{value:p,children:"Auto"}),t.map(n=>e.jsx("option",{value:n,children:N(n)},n)),i.map(n=>e.jsx("option",{value:n,children:N(n)},n)),e.jsx("option",{value:f,children:"Custom…"})]})]}),d&&e.jsx("div",{className:"settings-field-grid",children:e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Custom URL"}),e.jsxs("div",{className:"settings-row",style:{gap:8},children:[e.jsx("input",{className:"settings-input",style:{flex:1},value:x,placeholder:"https://example.com",onChange:n=>v(n.target.value)}),e.jsx("button",{type:"button",className:"settings-danger",onClick:()=>{if(!_(x)){m("Enter a valid http(s) URL.");return}location.reload()},children:"Save"})]}),g&&e.jsx("span",{className:"settings-field-label",style:{color:"#f87171"},children:g})]})})]})}const M=["#ffffff","#4c8dff","#a06cff","#3dd68c","#ffd75c","#ff9a3d","#ff6c9a","#ff5c5c"];function H(t){return t===" "?"Space":t==="`"?"` (backtick)":t.length===1?t.toUpperCase():t}function $({settings:t,onUpdate:i,onClearData:a,showPlusCta:r,onUpgradePlus:o}){const[d,h]=l.useState(!1),[x,v]=l.useState(t.exitUrl),[g,m]=l.useState(null),[j,n]=l.useState(null);l.useEffect(()=>v(t.exitUrl),[t.exitUrl]),l.useEffect(()=>{if(!d)return;C(!0);const s=c=>{c.preventDefault(),c.stopPropagation(),i({exitKey:c.key}),h(!1)};return window.addEventListener("keydown",s,!0),()=>{window.removeEventListener("keydown",s,!0),C(!1)}},[d,i]);const u=s=>{if(s==="custom"||s==="none")i({coverPreset:s,coverTitle:s==="none"?"":t.coverTitle,coverFavicon:s==="none"?"":t.coverFavicon});else{const c=O(s);i({coverPreset:s,coverTitle:c.title,coverFavicon:c.favicon})}},y=()=>{const s=k(x);if(!s.valid||!s.value){m(s.error??"Invalid URL");return}m(null),i({exitUrl:s.value})},E=()=>{const s=k(t.exitUrl),c=s.valid&&s.value?s.value:"https://docs.google.com/document/u/0/",b=I(c,t.coverTitle,t.coverFavicon);n(b.ok?"Opened — this tab will redirect.":b.error??"Failed to open.")};return e.jsx("div",{className:"settings-page",children:e.jsxs("div",{className:"settings-page-inner",children:[e.jsxs("div",{className:"settings-page-head",children:[e.jsx("h1",{children:"Settings"}),e.jsx("p",{children:"Search, tab cover, and privacy for your Lucide browser."})]}),e.jsx(U,{}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Browsing"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Block ads on proxied sites"}),e.jsx("div",{className:"settings-row-hint",children:"Uses DNS to filter ads. Turn off if a site will not load."})]}),e.jsxs("label",{className:"settings-switch",children:[e.jsx("input",{type:"checkbox",checked:t.adblock,onChange:s=>i({adblock:s.target.checked})}),e.jsx("span",{})]})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Search"}),e.jsxs("div",{className:"settings-row",children:[e.jsx("div",{className:"settings-row-label",children:"Search engine"}),e.jsx("select",{className:"settings-select",value:t.searchEngineId,onChange:s=>i({searchEngineId:s.target.value}),children:F.map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Appearance"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Background"}),e.jsx("div",{className:"settings-row-hint",children:"Choose the animated veil or a lightweight static background."})]}),e.jsxs("select",{className:"settings-select",value:t.backgroundMode,onChange:s=>i({backgroundMode:s.target.value}),children:[e.jsx("option",{value:"full",children:"DarkVeil"}),e.jsx("option",{value:"reduced",children:"DarkVeil (reduced)"}),e.jsx("option",{value:"mesh",children:"CSS mesh (faster)"}),e.jsx("option",{value:"off",children:"Off (fastest)"})]})]}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Accent color"}),e.jsx("div",{className:"settings-row-hint",children:"Tints the wordmark, borders, and focus rings."})]}),e.jsx("div",{className:"settings-swatches",children:M.map(s=>e.jsx("button",{type:"button",className:`settings-swatch ${t.accent.toLowerCase()===s?"active":""}`,style:{background:s},"aria-label":`Accent ${s}`,onClick:()=>i({accent:s})},s))})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Tab cover"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Tab disguise"}),e.jsx("div",{className:"settings-row-hint",children:"Change the tab's title and icon to blend in."})]}),e.jsx("select",{className:"settings-select",value:t.coverPreset,onChange:s=>u(s.target.value),children:B.map(s=>e.jsx("option",{value:s.id,children:s.label},s.id))})]}),e.jsxs("div",{className:"settings-field-grid",children:[e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Tab title"}),e.jsx("input",{className:"settings-input",value:t.coverTitle,placeholder:"Lucide",onChange:s=>i({coverTitle:s.target.value,coverPreset:"custom"})})]}),e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Favicon URL"}),e.jsx("input",{className:"settings-input",value:t.coverFavicon,placeholder:"https://…/favicon.ico",onChange:s=>i({coverFavicon:s.target.value,coverPreset:"custom"})})]})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Quick exit"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Exit key"}),e.jsxs("div",{className:"settings-row-hint",children:["Press this key anywhere to instantly bail to the exit URL. Current: ",H(t.exitKey)]})]}),e.jsx("button",{type:"button",className:"settings-danger",onClick:()=>h(s=>!s),children:d?"Press any key…":"Set key"})]}),e.jsx("div",{className:"settings-field-grid",children:e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Exit URL"}),e.jsxs("div",{className:"settings-row",style:{gap:8},children:[e.jsx("input",{className:"settings-input",style:{flex:1},value:x,onChange:s=>v(s.target.value),placeholder:"https://classroom.google.com"}),e.jsx("button",{type:"button",className:"settings-danger",onClick:y,children:"Save"})]}),g&&e.jsx("span",{className:"settings-field-label",style:{color:"#f87171"},children:g})]})}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Confirm before leaving"}),e.jsx("div",{className:"settings-row-hint",children:"Prompt when closing or navigating away."})]}),e.jsxs("label",{className:"settings-switch",children:[e.jsx("input",{type:"checkbox",checked:t.confirmLeave,onChange:s=>i({confirmLeave:s.target.checked})}),e.jsx("span",{})]})]}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Auto cover tab"}),e.jsx("div",{className:"settings-row-hint",children:"On your next interaction, move the _9gmixa5 into a decoy tab and redirect this one."})]}),e.jsxs("label",{className:"settings-switch",children:[e.jsx("input",{type:"checkbox",checked:t.autoCoverFrame,onChange:s=>i({autoCoverFrame:s.target.checked})}),e.jsx("span",{})]})]}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Open cover tab now"}),j&&e.jsx("div",{className:"settings-row-hint",children:j})]}),e.jsx("button",{type:"button",className:"settings-danger",onClick:E,children:"Open"})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Data"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Clear data"}),e.jsx("div",{className:"settings-row-hint",children:"Removes saved tabs, bookmarks, and settings."})]}),e.jsx("button",{className:"settings-danger",type:"button",onClick:a,children:"Clear"})]})]}),r&&o&&e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Lucide Plus"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Go ad-free"}),e.jsx("div",{className:"settings-row-hint",children:"Remove ads, unlock 3M AI tokens/day, and get exclusive links."})]}),e.jsx("button",{type:"button",className:"settings-upgrade",onClick:o,children:"Upgrade"})]})]}),e.jsxs("div",{className:"settings-page-foot",children:[e.jsx(D,{size:14}),e.jsx("span",{children:"Lucide"}),e.jsx("span",{children:"·"}),e.jsx("a",{href:w("terms.html"),target:"_blank",rel:"noreferrer",children:"Terms"}),e.jsx("span",{children:"·"}),e.jsx("a",{href:w("privacy.html"),target:"_blank",rel:"noreferrer",children:"Privacy"})]})]})})}export{$ as SettingsPage};
1
+ import{r as l,j as e}from"./react-BNEptbwn-8068ec8f.js";import{A as S,B as A,D as L,F as N,H as P,J as T,K as _,N as R,O as F,Q as B,V as D,W as w,X as O,Y as k,Z as I,_ as C}from"./index-COUSXtyQ-8068ec8f.js";/* empty css */import"./motion-B1hdS1Lc-8068ec8f.js";const p="__auto__",f="__custom__";function U(){const t=l.useMemo(()=>S(),[]),i=l.useMemo(()=>A(),[]),a=R(),r=L(),o=t.includes(a)||i.includes(a),[d,h]=l.useState(()=>r&&!!a&&!o),[x,v]=l.useState(()=>r&&a&&!o?a:""),[g,m]=l.useState(null),j=d?f:r&&a&&o?a:p;return e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Backend"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"API host"}),e.jsxs("div",{className:"settings-row-hint",children:["Using ",a?N(a):"this site",r?" (pinned)":" (auto)","."]})]}),e.jsxs("select",{className:"settings-select",value:j,onChange:n=>{const u=n.target.value;if(m(null),u===p){P(),location.reload();return}if(u===f){h(!0),v(a&&!t.includes(a)?a:"");return}h(!1),T(u)&&location.reload()},children:[e.jsx("option",{value:p,children:"Auto"}),t.map(n=>e.jsx("option",{value:n,children:N(n)},n)),i.map(n=>e.jsx("option",{value:n,children:N(n)},n)),e.jsx("option",{value:f,children:"Custom…"})]})]}),d&&e.jsx("div",{className:"settings-field-grid",children:e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Custom URL"}),e.jsxs("div",{className:"settings-row",style:{gap:8},children:[e.jsx("input",{className:"settings-input",style:{flex:1},value:x,placeholder:"https://example.com",onChange:n=>v(n.target.value)}),e.jsx("button",{type:"button",className:"settings-danger",onClick:()=>{if(!_(x)){m("Enter a valid http(s) URL.");return}location.reload()},children:"Save"})]}),g&&e.jsx("span",{className:"settings-field-label",style:{color:"#f87171"},children:g})]})})]})}const M=["#ffffff","#4c8dff","#a06cff","#3dd68c","#ffd75c","#ff9a3d","#ff6c9a","#ff5c5c"];function H(t){return t===" "?"Space":t==="`"?"` (backtick)":t.length===1?t.toUpperCase():t}function $({settings:t,onUpdate:i,onClearData:a,showPlusCta:r,onUpgradePlus:o}){const[d,h]=l.useState(!1),[x,v]=l.useState(t.exitUrl),[g,m]=l.useState(null),[j,n]=l.useState(null);l.useEffect(()=>v(t.exitUrl),[t.exitUrl]),l.useEffect(()=>{if(!d)return;C(!0);const s=c=>{c.preventDefault(),c.stopPropagation(),i({exitKey:c.key}),h(!1)};return window.addEventListener("keydown",s,!0),()=>{window.removeEventListener("keydown",s,!0),C(!1)}},[d,i]);const u=s=>{if(s==="custom"||s==="none")i({coverPreset:s,coverTitle:s==="none"?"":t.coverTitle,coverFavicon:s==="none"?"":t.coverFavicon});else{const c=O(s);i({coverPreset:s,coverTitle:c.title,coverFavicon:c.favicon})}},y=()=>{const s=k(x);if(!s.valid||!s.value){m(s.error??"Invalid URL");return}m(null),i({exitUrl:s.value})},E=()=>{const s=k(t.exitUrl),c=s.valid&&s.value?s.value:"https://docs.google.com/document/u/0/",b=I(c,t.coverTitle,t.coverFavicon);n(b.ok?"Opened — this tab will redirect.":b.error??"Failed to open.")};return e.jsx("div",{className:"settings-page",children:e.jsxs("div",{className:"settings-page-inner",children:[e.jsxs("div",{className:"settings-page-head",children:[e.jsx("h1",{children:"Settings"}),e.jsx("p",{children:"Search, tab cover, and privacy for your IGNITE OS BROWSER browser."})]}),e.jsx(U,{}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Browsing"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Block ads on proxied sites"}),e.jsx("div",{className:"settings-row-hint",children:"Uses DNS to filter ads. Turn off if a site will not load."})]}),e.jsxs("label",{className:"settings-switch",children:[e.jsx("input",{type:"checkbox",checked:t.adblock,onChange:s=>i({adblock:s.target.checked})}),e.jsx("span",{})]})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Search"}),e.jsxs("div",{className:"settings-row",children:[e.jsx("div",{className:"settings-row-label",children:"Search engine"}),e.jsx("select",{className:"settings-select",value:t.searchEngineId,onChange:s=>i({searchEngineId:s.target.value}),children:F.map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Appearance"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Background"}),e.jsx("div",{className:"settings-row-hint",children:"Choose the animated veil or a lightweight static background."})]}),e.jsxs("select",{className:"settings-select",value:t.backgroundMode,onChange:s=>i({backgroundMode:s.target.value}),children:[e.jsx("option",{value:"full",children:"DarkVeil"}),e.jsx("option",{value:"reduced",children:"DarkVeil (reduced)"}),e.jsx("option",{value:"mesh",children:"CSS mesh (faster)"}),e.jsx("option",{value:"off",children:"Off (fastest)"})]})]}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Accent color"}),e.jsx("div",{className:"settings-row-hint",children:"Tints the wordmark, borders, and focus rings."})]}),e.jsx("div",{className:"settings-swatches",children:M.map(s=>e.jsx("button",{type:"button",className:`settings-swatch ${t.accent.toLowerCase()===s?"active":""}`,style:{background:s},"aria-label":`Accent ${s}`,onClick:()=>i({accent:s})},s))})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Tab cover"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Tab disguise"}),e.jsx("div",{className:"settings-row-hint",children:"Change the tab's title and icon to blend in."})]}),e.jsx("select",{className:"settings-select",value:t.coverPreset,onChange:s=>u(s.target.value),children:B.map(s=>e.jsx("option",{value:s.id,children:s.label},s.id))})]}),e.jsxs("div",{className:"settings-field-grid",children:[e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Tab title"}),e.jsx("input",{className:"settings-input",value:t.coverTitle,placeholder:"IGNITE OS BROWSER",onChange:s=>i({coverTitle:s.target.value,coverPreset:"custom"})})]}),e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Favicon URL"}),e.jsx("input",{className:"settings-input",value:t.coverFavicon,placeholder:"https://…/favicon.ico",onChange:s=>i({coverFavicon:s.target.value,coverPreset:"custom"})})]})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Quick exit"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Exit key"}),e.jsxs("div",{className:"settings-row-hint",children:["Press this key anywhere to instantly bail to the exit URL. Current: ",H(t.exitKey)]})]}),e.jsx("button",{type:"button",className:"settings-danger",onClick:()=>h(s=>!s),children:d?"Press any key…":"Set key"})]}),e.jsx("div",{className:"settings-field-grid",children:e.jsxs("label",{className:"settings-field",children:[e.jsx("span",{className:"settings-field-label",children:"Exit URL"}),e.jsxs("div",{className:"settings-row",style:{gap:8},children:[e.jsx("input",{className:"settings-input",style:{flex:1},value:x,onChange:s=>v(s.target.value),placeholder:"https://classroom.google.com"}),e.jsx("button",{type:"button",className:"settings-danger",onClick:y,children:"Save"})]}),g&&e.jsx("span",{className:"settings-field-label",style:{color:"#f87171"},children:g})]})}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Confirm before leaving"}),e.jsx("div",{className:"settings-row-hint",children:"Prompt when closing or navigating away."})]}),e.jsxs("label",{className:"settings-switch",children:[e.jsx("input",{type:"checkbox",checked:t.confirmLeave,onChange:s=>i({confirmLeave:s.target.checked})}),e.jsx("span",{})]})]}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Auto cover tab"}),e.jsx("div",{className:"settings-row-hint",children:"On your next interaction, move the _9gmixa5 into a decoy tab and redirect this one."})]}),e.jsxs("label",{className:"settings-switch",children:[e.jsx("input",{type:"checkbox",checked:t.autoCoverFrame,onChange:s=>i({autoCoverFrame:s.target.checked})}),e.jsx("span",{})]})]}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Open cover tab now"}),j&&e.jsx("div",{className:"settings-row-hint",children:j})]}),e.jsx("button",{type:"button",className:"settings-danger",onClick:E,children:"Open"})]})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"Data"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Clear data"}),e.jsx("div",{className:"settings-row-hint",children:"Removes saved tabs, bookmarks, and settings."})]}),e.jsx("button",{className:"settings-danger",type:"button",onClick:a,children:"Clear"})]})]}),r&&o&&e.jsxs("section",{className:"settings-section",children:[e.jsx("div",{className:"settings-section-title",children:"IGNITE OS BROWSER Plus"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("div",{className:"settings-row-text",children:[e.jsx("div",{className:"settings-row-label",children:"Go ad-free"}),e.jsx("div",{className:"settings-row-hint",children:"Remove ads, unlock 3M AI tokens/day, and get exclusive links."})]}),e.jsx("button",{type:"button",className:"settings-upgrade",onClick:o,children:"Upgrade"})]})]}),e.jsxs("div",{className:"settings-page-foot",children:[e.jsx(D,{size:14}),e.jsx("span",{children:"IGNITE OS BROWSER"}),e.jsx("span",{children:"·"}),e.jsx("a",{href:w("terms.html"),target:"_blank",rel:"noreferrer",children:"Terms"}),e.jsx("span",{children:"·"}),e.jsx("a",{href:w("privacy.html"),target:"_blank",rel:"noreferrer",children:"Privacy"})]})]})})}export{$ as SettingsPage};