@realtimex/realtimex-alchemy 1.0.66 → 1.0.67
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.
package/dist/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.67] - 2026-01-28
|
|
9
|
+
|
|
10
|
+
### Improved
|
|
11
|
+
- **UI**: Standardized the **Context Sidebar** styling to match the rest of the Chat Interface. Updated border opacity and corner radius to align with the new design system, ensuring a cohesive look when reviewing RAG citations.
|
|
12
|
+
|
|
8
13
|
## [1.0.66] - 2026-01-28
|
|
9
14
|
|
|
10
15
|
### Added
|
|
@@ -129,9 +129,9 @@ ${e.content}`:""}`,f=new Blob([u],{type:"text/markdown"}),p=URL.createObjectURL(
|
|
|
129
129
|
`))+1))}const a="#".repeat(s),c=n.enter("headingAtx"),u=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
130
130
|
`,...o.current()});return/^[\t ]/.test(f)&&(f=ga(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),u(),c(),f}Lk.peek=r3;function Lk(e){return e.value||""}function r3(){return"<"}Ik.peek=s3;function Ik(e,t,n,r){const s=Jp(n),o=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const u=n.createTracker(r);let f=u.move("![");return f+=u.move(n.safe(e.alt,{before:f,after:"]",...u.current()})),f+=u.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(c=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,{before:f,after:e.title?" ":")",...u.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,{before:f,after:s,...u.current()})),f+=u.move(s),c()),f+=u.move(")"),a(),f}function s3(){return"!"}Dk.peek=i3;function Dk(e,t,n,r){const s=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("![");const f=n.safe(e.alt,{before:u,after:"]",...c.current()});u+=c.move(f+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const g=n.safe(n.associationId(e),{before:u,after:"]",...c.current()});return a(),n.stack=p,o(),s==="full"||!f||f!==g?u+=c.move(g+"]"):s==="shortcut"?u=u.slice(0,-1):u+=c.move("]"),u}function i3(){return"!"}Mk.peek=o3;function Mk(e,t,n){let r=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],c=n.compilePattern(a);let u;if(a.atBreak)for(;u=c.exec(r);){let f=u.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(u.index+1)}}return s+r+s}function o3(){return"`"}function zk(e,t){const n=Fp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Fk.peek=a3;function Fk(e,t,n,r){const s=Jp(n),o=s==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let c,u;if(zk(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let g=a.move("<");return g+=a.move(n.containerPhrasing(e,{before:g,after:">",...a.current()})),g+=a.move(">"),c(),n.stack=p,g}c=n.enter("link"),u=n.enter("label");let f=a.move("[");return f+=a.move(n.containerPhrasing(e,{before:f,after:"](",...a.current()})),f+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(n.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(u=n.enter("destinationRaw"),f+=a.move(n.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=a.move(" "+s),f+=a.move(n.safe(e.title,{before:f,after:s,...a.current()})),f+=a.move(s),u()),f+=a.move(")"),c(),f}function a3(e,t,n){return zk(e,n)?"<":"["}$k.peek=l3;function $k(e,t,n,r){const s=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("[");const f=n.containerPhrasing(e,{before:u,after:"]",...c.current()});u+=c.move(f+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const g=n.safe(n.associationId(e),{before:u,after:"]",...c.current()});return a(),n.stack=p,o(),s==="full"||!f||f!==g?u+=c.move(g+"]"):s==="shortcut"?u=u.slice(0,-1):u+=c.move("]"),u}function l3(){return"["}function Xp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function c3(e){const t=Xp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function u3(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Uk(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function d3(e,t,n,r){const s=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?u3(n):Xp(n);const c=e.ordered?a==="."?")":".":c3(n);let u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Uk(n)===a&&p){let g=-1;for(;++g<e.children.length;){const y=e.children[g];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=c),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,s(),f}function h3(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function f3(e,t,n,r){const s=h3(n);let o=n.bulletCurrent||Xp(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(r);c.move(o+" ".repeat(a-o.length)),c.shift(a);const u=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return u(),f;function p(g,y,v){return y?(v?"":" ".repeat(a))+g:(v?o:o+" ".repeat(a-o.length))+g}}function p3(e,t,n,r){const s=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),s(),a}const m3=Yc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function g3(e,t,n,r){return(e.children.some(function(a){return m3(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function y3(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bk.peek=x3;function Bk(e,t,n,r){const s=y3(n),o=n.enter("strong"),a=n.createTracker(r),c=a.move(s+s);let u=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const f=u.charCodeAt(0),p=Ec(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(u=ga(f)+u.slice(1));const g=u.charCodeAt(u.length-1),y=Ec(r.after.charCodeAt(0),g,s);y.inside&&(u=u.slice(0,-1)+ga(g));const v=a.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},c+u+v}function x3(e,t,n){return n.options.strong||"*"}function v3(e,t,n,r){return n.safe(e.value,r)}function _3(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function b3(e,t,n){const r=(Uk(n)+(n.options.ruleSpaces?" ":"")).repeat(_3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vk={blockquote:qM,break:t_,code:XM,definition:QM,emphasis:Ok,hardBreak:t_,heading:n3,html:Lk,image:Ik,imageReference:Dk,inlineCode:Mk,link:Fk,linkReference:$k,list:d3,listItem:f3,paragraph:p3,root:g3,strong:Bk,text:v3,thematicBreak:b3};function w3(){return{enter:{table:k3,tableData:n_,tableHeader:n_,tableRow:j3},exit:{codeText:E3,table:S3,tableData:zh,tableHeader:zh,tableRow:zh}}}function k3(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function S3(e){this.exit(e),this.data.inTable=void 0}function j3(e){this.enter({type:"tableRow",children:[]},e)}function zh(e){this.exit(e)}function n_(e){this.enter({type:"tableCell",children:[]},e)}function E3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,C3));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function C3(e,t){return t==="|"?t:e}function T3(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
131
131
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:u,tableRow:c}};function a(v,b,w,k){return f(p(v,w,k),v.align)}function c(v,b,w,k){const j=g(v,w,k),C=f([j]);return C.slice(0,C.indexOf(`
|
|
132
|
-
`))}function u(v,b,w,k){const j=w.enter("tableCell"),C=w.enter("phrasing"),S=w.containerPhrasing(v,{...k,before:o,after:o});return C(),j(),S}function f(v,b){return BM(v,{align:b,alignDelimiters:r,padding:n,stringLength:s})}function p(v,b,w){const k=v.children;let j=-1;const C=[],S=b.enter("table");for(;++j<k.length;)C[j]=g(k[j],b,w);return S(),C}function g(v,b,w){const k=v.children;let j=-1;const C=[],S=b.enter("tableRow");for(;++j<k.length;)C[j]=u(k[j],v,b,w);return S(),C}function y(v,b,w){let k=Vk.inlineCode(v,b,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function N3(){return{exit:{taskListCheckValueChecked:r_,taskListCheckValueUnchecked:r_,paragraph:R3}}}function A3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:P3}}}function r_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function R3(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let o=-1,a;for(;++o<s.length;){const c=s[o];if(c.type==="paragraph"){a=c;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function P3(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(a);let u=Vk.listItem(e,t,n,{...r,...c.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),u;function f(p){return p+a}}function O3(){return[dM(),PM(),DM(),w3(),N3()]}function L3(e){return{extensions:[hM(),OM(e),MM(),T3(e),A3()]}}const I3={tokenize:U3,partial:!0},qk={tokenize:B3,partial:!0},Hk={tokenize:V3,partial:!0},Kk={tokenize:q3,partial:!0},D3={tokenize:H3,partial:!0},Wk={name:"wwwAutolink",tokenize:F3,previous:Jk},Gk={name:"protocolAutolink",tokenize:$3,previous:Xk},Cr={name:"emailAutolink",tokenize:z3,previous:Yk},ur={};function M3(){return{text:ur}}let vs=48;for(;vs<123;)ur[vs]=Cr,vs++,vs===58?vs=65:vs===91&&(vs=97);ur[43]=Cr;ur[45]=Cr;ur[46]=Cr;ur[95]=Cr;ur[72]=[Cr,Gk];ur[104]=[Cr,Gk];ur[87]=[Cr,Wk];ur[119]=[Cr,Wk];function z3(e,t,n){const r=this;let s,o;return a;function a(g){return!If(g)||!Yk.call(r,r.previous)||Yp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return If(g)?(e.consume(g),c):g===64?(e.consume(g),u):n(g)}function u(g){return g===46?e.check(D3,p,f)(g):g===45||g===95||Jt(g)?(o=!0,e.consume(g),u):p(g)}function f(g){return e.consume(g),s=!0,u}function p(g){return o&&s&&tn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function F3(e,t,n){const r=this;return s;function s(a){return a!==87&&a!==119||!Jk.call(r,r.previous)||Yp(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I3,e.attempt(qk,e.attempt(Hk,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function $3(e,t,n){const r=this;let s="",o=!1;return a;function a(g){return(g===72||g===104)&&Xk.call(r,r.previous)&&!Yp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(tn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(g),u}return n(g)}function u(g){return g===47?(e.consume(g),o?f:(o=!0,u)):n(g)}function f(g){return g===null||kc(g)||st(g)||Ds(g)||Gc(g)?n(g):e.attempt(qk,e.attempt(Hk,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function U3(e,t,n){let r=0;return s;function s(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),s):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function B3(e,t,n){let r,s,o;return a;function a(f){return f===46||f===95?e.check(Kk,u,c)(f):f===null||st(f)||Ds(f)||f!==45&&Gc(f)?u(f):(o=!0,e.consume(f),a)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),a}function u(f){return s||r||!o?n(f):t(f)}}function V3(e,t){let n=0,r=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Kk,t,o)(a):a===null||st(a)||Ds(a)?t(a):(e.consume(a),s)}function o(a){return a===41&&r++,e.consume(a),s}}function q3(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),s):c===60||c===null||st(c)||Ds(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||st(c)||Ds(c)?t(c):r(c)}function o(c){return tn(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):tn(c)?(e.consume(c),a):n(c)}}function H3(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return Jt(o)?n(o):t(o)}}function Jk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function Xk(e){return!tn(e)}function Yk(e){return!(e===47||If(e))}function If(e){return e===43||e===45||e===46||e===95||Jt(e)}function Yp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const K3={tokenize:ez,partial:!0};function W3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Y3,continuation:{tokenize:Q3},exit:Z3}},text:{91:{name:"gfmFootnoteCall",tokenize:X3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:G3,resolveTo:J3}}}}function G3(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const u=r.events[s][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return c;function c(u){if(!a||!a._balanced)return n(u);const f=Jn(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function J3(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function X3(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),u}function u(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(g){if(o>999||g===93&&!a||g===null||g===91||st(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(Jn(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return st(g)||(a=!0),o++,e.consume(g),g===92?p:f}function p(g){return g===91||g===92||g===93?(e.consume(g),o++,f):f(g)}}function Y3(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,c;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(b)}function p(b){if(a>999||b===93&&!c||b===null||b===91||st(b))return n(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Jn(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return st(b)||(c=!0),a++,e.consume(b),b===92?g:p}function g(b){return b===91||b===92||b===93?(e.consume(b),a++,p):p(b)}function y(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),s.includes(o)||s.push(o),Ge(e,v,"gfmFootnoteDefinitionWhitespace")):n(b)}function v(b){return t(b)}}function Q3(e,t,n){return e.check(Ca,t,e.attempt(K3,t,n))}function Z3(e){e.exit("gfmFootnoteDefinition")}function ez(e,t,n){const r=this;return Ge(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function tz(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,c){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let f=u;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[u][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[u][1].end)},g={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",p,c],["enter",a[f][1],c],["exit",a[f][1],c],["enter",g,c]],v=c.parser.constructs.insideSpan.null;v&&En(y,y.length,0,Jc(v,a.slice(f+1,u),c)),En(y,y.length,0,[["exit",g,c],["enter",a[u][1],c],["exit",a[u][1],c],["exit",p,c]]),En(a,f-1,u-f+3,y),u=f+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,c,u){const f=this.previous,p=this.events;let g=0;return y;function y(b){return f===126&&p[p.length-1][1].type!=="characterEscape"?u(b):(a.enter("strikethroughSequenceTemporary"),v(b))}function v(b){const w=$i(f);if(b===126)return g>1?u(b):(a.consume(b),g++,v);if(g<2&&!n)return u(b);const k=a.exit("strikethroughSequenceTemporary"),j=$i(b);return k._open=!j||j===2&&!!w,k._close=!w||w===2&&!!j,c(b)}}}class nz{constructor(){this.map=[]}add(t,n,r){rz(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const o of s)t.push(o);s=r.pop()}this.map.length=0}}function rz(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function sz(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function iz(){return{flow:{null:{name:"table",tokenize:oz,resolveAll:az}}}}function oz(e,t,n){const r=this;let s=0,o=0,a;return c;function c(L){let Y=r.events.length-1;for(;Y>-1;){const H=r.events[Y][1].type;if(H==="lineEnding"||H==="linePrefix")Y--;else break}const X=Y>-1?r.events[Y][1].type:null,de=X==="tableHead"||X==="tableRow"?A:u;return de===A&&r.parser.lazy[r.now().line]?n(L):de(L)}function u(L){return e.enter("tableHead"),e.enter("tableRow"),f(L)}function f(L){return L===124||(a=!0,o+=1),p(L)}function p(L){return L===null?n(L):Re(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),v):n(L):We(L)?Ge(e,p,"whitespace")(L):(o+=1,a&&(a=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),a=!0,p):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||st(L)?(e.exit("data"),p(L)):(e.consume(L),L===92?y:g)}function y(L){return L===92||L===124?(e.consume(L),g):g(L)}function v(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),a=!1,We(L)?Ge(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):b(L))}function b(L){return L===45||L===58?k(L):L===124?(a=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):N(L)}function w(L){return We(L)?Ge(e,k,"whitespace")(L):k(L)}function k(L){return L===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),j):L===45?(o+=1,j(L)):L===null||Re(L)?P(L):N(L)}function j(L){return L===45?(e.enter("tableDelimiterFiller"),C(L)):N(L)}function C(L){return L===45?(e.consume(L),C):L===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(L))}function S(L){return We(L)?Ge(e,P,"whitespace")(L):P(L)}function P(L){return L===124?b(L):L===null||Re(L)?!a||s!==o?N(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):N(L)}function N(L){return n(L)}function A(L){return e.enter("tableRow"),$(L)}function $(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),$):L===null||Re(L)?(e.exit("tableRow"),t(L)):We(L)?Ge(e,$,"whitespace")(L):(e.enter("data"),G(L))}function G(L){return L===null||L===124||st(L)?(e.exit("data"),$(L)):(e.consume(L),L===92?B:G)}function B(L){return L===92||L===124?(e.consume(L),G):G(L)}}function az(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],a=[0,0,0,0],c=!1,u=0,f,p,g;const y=new nz;for(;++n<e.length;){const v=e[n],b=v[1];v[0]==="enter"?b.type==="tableHead"?(c=!1,u!==0&&(s_(y,t,u,f,p),p=void 0,u=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},y.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,g=void 0,o=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},y.add(n,0,[["enter",p,t]])),s=b.type==="tableDelimiterRow"?2:p?3:1):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],g=Xl(y,t,o,s,void 0,g),o=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],g=Xl(y,t,o,s,void 0,g)),o=a,a=[o[1],n,0,0])):b.type==="tableHead"?(c=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],g=Xl(y,t,o,s,n,g)):a[1]!==0&&(g=Xl(y,t,a,s,n,g)),s=0):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&s_(y,t,u,f,p),y.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=sz(t.events,n))}return e}function Xl(e,t,n,r,s,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},Si(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Si(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=Si(t.events,n[2]),p=Si(t.events,n[3]),g={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const y=t.events[n[2]],v=t.events[n[3]];if(y[1].end=Object.assign({},v[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,w=n[3]-n[2]-1;e.add(b,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},Si(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function s_(e,t,n,r,s){const o=[],a=Si(t.events,n);s&&(s.end=Object.assign({},a),o.push(["exit",s,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Si(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lz={name:"tasklistCheck",tokenize:uz};function cz(){return{text:{91:lz}}}function uz(e,t,n){const r=this;return s;function s(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return st(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(u)}function c(u){return Re(u)?t(u):We(u)?e.check({tokenize:dz},t,n)(u):n(u)}}function dz(e,t,n){return Ge(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function hz(e){return lk([M3(),W3(),tz(e),iz(),cz()])}const fz={};function pz(e){const t=this,n=e||fz,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(hz(n)),o.push(O3()),a.push(L3(n))}function mz({message:e}){const{t}=Ze(),n=e.role==="user",r={p:({node:s,...o})=>h.jsx("p",{className:"mb-2 last:mb-0",...o}),a:({node:s,...o})=>h.jsx("a",{className:"text-primary hover:underline",...o}),ul:({node:s,...o})=>h.jsx("ul",{className:"list-disc ml-4 mb-2",...o}),ol:({node:s,...o})=>h.jsx("ol",{className:"list-decimal ml-4 mb-2",...o}),blockquote:({node:s,...o})=>h.jsx("blockquote",{className:"border-l-2 border-border/50 pl-3 text-fg/70 italic mb-2",...o}),table:({node:s,...o})=>h.jsx("table",{className:"w-full text-xs border-collapse my-2",...o}),th:({node:s,...o})=>h.jsx("th",{className:"border border-border/20 bg-surface/50 px-2 py-1 text-left font-semibold",...o}),td:({node:s,...o})=>h.jsx("td",{className:"border border-border/20 px-2 py-1 align-top",...o}),code:({node:s,inline:o,className:a,...c})=>h.jsx("code",{className:o?"bg-black/20 rounded px-1 py-0.5 font-mono text-xs":"block bg-black/30 rounded-lg p-3 font-mono text-xs leading-relaxed overflow-x-auto",...c}),pre:({node:s,...o})=>h.jsx("pre",{className:"my-2",...o})};return h.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"}`,children:h.jsxs("div",{className:`flex gap-3 max-w-[85%] ${n?"flex-row-reverse":"flex-row"}`,children:[h.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${n?"bg-primary text-white":"bg-gradient-to-br from-indigo-500 to-purple-600 text-white shadow-lg glow-primary"}`,children:n?h.jsx(Ac,{size:16}):h.jsx(uj,{size:16})}),h.jsxs("div",{className:`flex flex-col ${n?"items-end":"items-start"}`,children:[h.jsx("div",{className:`px-5 py-3.5 rounded-2xl text-sm leading-relaxed shadow-sm ${n?"bg-primary/15 text-fg rounded-tr-none":"bg-surface/70 backdrop-blur-md text-fg rounded-tl-none"}`,children:h.jsx("div",{className:"markdown-body",children:h.jsx(Gp,{remarkPlugins:[pz],components:r,children:e.content})})}),h.jsx("span",{className:"text-[10px] text-fg/30 mt-1 px-1",children:new Date(e.created_at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]})]})})}function gz({sessionId:e,onContextUpdate:t,onNewSession:n,onSessionCreated:r}){const{t:s}=Ze(),[o,a]=R.useState([]),[c,u]=R.useState(""),[f,p]=R.useState(!1),[g,y]=R.useState(!1),v=R.useRef(null),b=R.useRef(null),w=R.useRef(!0),k=R.useRef(null);R.useEffect(()=>{e?C(e):(a([]),t([]))},[e,t]),R.useEffect(()=>{w.current&&v.current&&v.current.scrollIntoView({behavior:"smooth"})},[o,g]);const j=()=>{const N=b.current;if(!N)return;const A=N.scrollHeight-N.scrollTop-N.clientHeight;w.current=A<64},C=async N=>{try{const{data:{session:A}}=await oe.auth.getSession();if(!A)return;const $=await Qe.get(`/api/chat/sessions/${N}/messages`,{headers:{"x-user-id":A.user.id}});if($.data.success){a($.data.messages);const G=$.data.messages[$.data.messages.length-1];G&&G.role==="assistant"&&G.context_sources&&t(G.context_sources)}}catch(A){console.error("Failed to fetch messages",A)}},S=async N=>{if(N?.preventDefault(),!c.trim()||f)return;const A=c.trim();u(""),k.current&&(k.current.style.height="auto");const{data:{session:$}}=await oe.auth.getSession();if(!$)return;const G=$.user.id;p(!0),y(!0);try{let B=e;if(!B){const X=await Qe.post("/api/chat/sessions",{},{headers:{"x-user-id":G}});if(X.data.success)B=X.data.session.id,r(B);else throw new Error("Failed to create session")}const L={id:"temp-"+Date.now(),role:"user",content:A,created_at:new Date().toISOString()};a(X=>[...X,L]);const Y=await Qe.post("/api/chat/message",{sessionId:B,content:A},{headers:{"x-user-id":G}});if(Y.data.success){const X=Y.data.message;a(de=>[...de,X]),X.context_sources&&t(X.context_sources)}}catch(B){console.error("Message failed",B),a(L=>[...L,{id:"err-"+Date.now(),role:"assistant",content:s("chat.error_message"),created_at:new Date().toISOString()}])}finally{p(!1),y(!1)}},P=N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),S())};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:b,onScroll:j,className:"flex-1 overflow-y-auto p-5 space-y-6 scrollbar-on-hover",children:[o.length===0?h.jsxs("div",{className:"h-full flex flex-col items-center justify-center p-8 text-center opacity-70",children:[h.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-2xl flex items-center justify-center mb-4 text-primary animate-pulse",children:h.jsx(zj,{size:32})}),h.jsx("h3",{className:"text-xl font-bold mb-2",children:s("chat.title")}),h.jsx("p",{className:"text-sm max-w-md mx-auto mb-8",children:s("chat.desc")}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 max-w-lg w-full",children:[s("chat.suggestions.react"),s("chat.suggestions.ai"),s("chat.suggestions.finance"),s("chat.suggestions.performance")].map((N,A)=>h.jsx("button",{onClick:()=>u(N),className:"text-left p-3 text-xs bg-surface/30 hover:bg-surface/50 border border-border/30 rounded-xl transition-all hover:scale-[1.02]",children:N},A))})]}):h.jsxs(h.Fragment,{children:[o.map((N,A)=>h.jsx(mz,{message:N},N.id||A)),g&&h.jsx(Fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex justify-start w-full",children:h.jsxs("div",{className:"bg-surface/30 border border-border/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[h.jsxs("div",{className:"flex gap-1",children:[h.jsx("span",{className:"w-1.5 h-1.5 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0s"}}),h.jsx("span",{className:"w-1.5 h-1.5 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),h.jsx("span",{className:"w-1.5 h-1.5 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]}),h.jsx("span",{className:"text-xs text-fg/50 font-mono",children:s("chat.thinking")})]})})]}),h.jsx("div",{ref:v})]}),h.jsx("div",{className:"p-4 bg-surface/20 border-t border-border backdrop-blur-md",children:h.jsx("form",{onSubmit:S,className:"relative max-w-4xl mx-auto",children:h.jsxs("div",{className:"relative flex items-end gap-2 bg-surface/55 border border-border rounded-xl px-2 py-2 shadow-sm focus-within:ring-2 focus-within:ring-primary/30 focus-within:border-primary/30 transition-all",children:[h.jsx("textarea",{ref:k,value:c,onChange:N=>{u(N.target.value),N.target.style.height="auto",N.target.style.height=N.target.scrollHeight+"px"},onKeyDown:P,placeholder:s("chat.placeholder"),rows:1,className:"w-full bg-transparent border-none focus:ring-0 focus:outline-none py-2 pl-2 text-fg resize-none min-h-[24px] max-h-[200px] placeholder:text-fg/40",disabled:f}),h.jsx("button",{type:"submit",disabled:!c.trim()||f,className:"p-2 mb-0.5 bg-primary text-white rounded-xl shadow-lg hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-all shrink-0",children:f?h.jsx(Nc,{size:18,className:"animate-spin"}):h.jsx(Dj,{size:18})})]})})})]})}function yz({sources:e,onClose:t}){const{t:n}=Ze();return!e||e.length===0?null:h.jsxs(Fe.div,{initial:{opacity:0,x:20,width:0},animate:{opacity:1,x:0,width:300},exit:{opacity:0,x:20,width:0},className:"bg-surface/25 backdrop-blur-xl rounded-2xl border border-border/10 overflow-hidden flex flex-col shadow-[0_8px_24px_rgba(0,0,0,0.16)]",children:[h.jsxs("div",{className:"p-4 border-b border-border/10 flex items-center justify-between bg-surface/15",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-fg/80",children:[h.jsx(d_,{size:16,className:"text-secondary"}),h.jsx("span",{children:n("chat.relevant_context")})]}),h.jsx("button",{onClick:t,className:"p-1 hover:bg-surface rounded-md text-fg/40 hover:text-fg transition-colors",children:h.jsx(Cn,{size:14})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-3",children:e.map((r,s)=>h.jsxs("div",{className:"p-3 bg-surface/20 hover:bg-surface/35 border border-border/5 rounded-xl transition-all group",children:[h.jsxs("div",{className:"flex justify-between items-start mb-2",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"flex items-center justify-center w-4 h-4 bg-primary/10 text-primary text-[10px] font-bold rounded",children:s+1}),h.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded border ${r.score>=80?"bg-yellow-500/10 text-yellow-500 border-yellow-500/20":"bg-blue-500/10 text-blue-400 border-blue-500/20"}`,children:n("chat.match_score",{score:r.score})})]}),h.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"opacity-0 group-hover:opacity-100 focus-visible:opacity-100 text-fg/40 hover:text-primary transition-opacity focus-visible:ring-2 focus-visible:ring-primary/40 rounded",children:h.jsx(Ui,{size:12})})]}),h.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-fg/90 block mb-1 hover:text-primary transition-colors line-clamp-2",children:r.title}),h.jsx("p",{className:"text-[10px] text-fg/50 line-clamp-3 leading-relaxed",children:r.summary})]},s))}),h.jsx("div",{className:"p-3 border-t border-border/10 bg-surface/20 text-[10px] text-center text-fg/30",children:n("chat.rag_attribution",{count:e.length})})]})}function xz(){const[e,t]=R.useState(null),[n,r]=R.useState([]),[s,o]=R.useState(!0);return h.jsxs("div",{className:"flex h-full gap-4 overflow-hidden",children:[h.jsx(HL,{activeSessionId:e,onSelectSession:t}),h.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-surface/60 rounded-xl overflow-hidden border border-border relative",children:h.jsx(gz,{sessionId:e,onContextUpdate:a=>{r(a),a.length>0&&o(!0)},onNewSession:()=>t(null),onSessionCreated:a=>t(a)})}),s&&h.jsx(yz,{sources:n,onClose:()=>o(!1)})]})}function vz({isOpen:e,onClose:t}){const{t:n}=Ze(),[r,s]=R.useState(""),[o,a]=R.useState(!0);R.useEffect(()=>{e&&c()},[e]);const c=async()=>{a(!0);try{const f=await(await fetch("/CHANGELOG.md")).text();s(f)}catch(u){console.error("Failed to load changelog:",u),s(`# ${n("common.error")}
|
|
132
|
+
`))}function u(v,b,w,k){const j=w.enter("tableCell"),C=w.enter("phrasing"),S=w.containerPhrasing(v,{...k,before:o,after:o});return C(),j(),S}function f(v,b){return BM(v,{align:b,alignDelimiters:r,padding:n,stringLength:s})}function p(v,b,w){const k=v.children;let j=-1;const C=[],S=b.enter("table");for(;++j<k.length;)C[j]=g(k[j],b,w);return S(),C}function g(v,b,w){const k=v.children;let j=-1;const C=[],S=b.enter("tableRow");for(;++j<k.length;)C[j]=u(k[j],v,b,w);return S(),C}function y(v,b,w){let k=Vk.inlineCode(v,b,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function N3(){return{exit:{taskListCheckValueChecked:r_,taskListCheckValueUnchecked:r_,paragraph:R3}}}function A3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:P3}}}function r_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function R3(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let o=-1,a;for(;++o<s.length;){const c=s[o];if(c.type==="paragraph"){a=c;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function P3(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(a);let u=Vk.listItem(e,t,n,{...r,...c.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),u;function f(p){return p+a}}function O3(){return[dM(),PM(),DM(),w3(),N3()]}function L3(e){return{extensions:[hM(),OM(e),MM(),T3(e),A3()]}}const I3={tokenize:U3,partial:!0},qk={tokenize:B3,partial:!0},Hk={tokenize:V3,partial:!0},Kk={tokenize:q3,partial:!0},D3={tokenize:H3,partial:!0},Wk={name:"wwwAutolink",tokenize:F3,previous:Jk},Gk={name:"protocolAutolink",tokenize:$3,previous:Xk},Cr={name:"emailAutolink",tokenize:z3,previous:Yk},ur={};function M3(){return{text:ur}}let vs=48;for(;vs<123;)ur[vs]=Cr,vs++,vs===58?vs=65:vs===91&&(vs=97);ur[43]=Cr;ur[45]=Cr;ur[46]=Cr;ur[95]=Cr;ur[72]=[Cr,Gk];ur[104]=[Cr,Gk];ur[87]=[Cr,Wk];ur[119]=[Cr,Wk];function z3(e,t,n){const r=this;let s,o;return a;function a(g){return!If(g)||!Yk.call(r,r.previous)||Yp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return If(g)?(e.consume(g),c):g===64?(e.consume(g),u):n(g)}function u(g){return g===46?e.check(D3,p,f)(g):g===45||g===95||Jt(g)?(o=!0,e.consume(g),u):p(g)}function f(g){return e.consume(g),s=!0,u}function p(g){return o&&s&&tn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function F3(e,t,n){const r=this;return s;function s(a){return a!==87&&a!==119||!Jk.call(r,r.previous)||Yp(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I3,e.attempt(qk,e.attempt(Hk,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function $3(e,t,n){const r=this;let s="",o=!1;return a;function a(g){return(g===72||g===104)&&Xk.call(r,r.previous)&&!Yp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(tn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(g),u}return n(g)}function u(g){return g===47?(e.consume(g),o?f:(o=!0,u)):n(g)}function f(g){return g===null||kc(g)||st(g)||Ds(g)||Gc(g)?n(g):e.attempt(qk,e.attempt(Hk,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function U3(e,t,n){let r=0;return s;function s(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),s):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function B3(e,t,n){let r,s,o;return a;function a(f){return f===46||f===95?e.check(Kk,u,c)(f):f===null||st(f)||Ds(f)||f!==45&&Gc(f)?u(f):(o=!0,e.consume(f),a)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),a}function u(f){return s||r||!o?n(f):t(f)}}function V3(e,t){let n=0,r=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Kk,t,o)(a):a===null||st(a)||Ds(a)?t(a):(e.consume(a),s)}function o(a){return a===41&&r++,e.consume(a),s}}function q3(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),s):c===60||c===null||st(c)||Ds(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||st(c)||Ds(c)?t(c):r(c)}function o(c){return tn(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):tn(c)?(e.consume(c),a):n(c)}}function H3(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return Jt(o)?n(o):t(o)}}function Jk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function Xk(e){return!tn(e)}function Yk(e){return!(e===47||If(e))}function If(e){return e===43||e===45||e===46||e===95||Jt(e)}function Yp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const K3={tokenize:ez,partial:!0};function W3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Y3,continuation:{tokenize:Q3},exit:Z3}},text:{91:{name:"gfmFootnoteCall",tokenize:X3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:G3,resolveTo:J3}}}}function G3(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const u=r.events[s][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return c;function c(u){if(!a||!a._balanced)return n(u);const f=Jn(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function J3(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function X3(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),u}function u(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(g){if(o>999||g===93&&!a||g===null||g===91||st(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(Jn(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return st(g)||(a=!0),o++,e.consume(g),g===92?p:f}function p(g){return g===91||g===92||g===93?(e.consume(g),o++,f):f(g)}}function Y3(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,c;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(b)}function p(b){if(a>999||b===93&&!c||b===null||b===91||st(b))return n(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Jn(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return st(b)||(c=!0),a++,e.consume(b),b===92?g:p}function g(b){return b===91||b===92||b===93?(e.consume(b),a++,p):p(b)}function y(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),s.includes(o)||s.push(o),Ge(e,v,"gfmFootnoteDefinitionWhitespace")):n(b)}function v(b){return t(b)}}function Q3(e,t,n){return e.check(Ca,t,e.attempt(K3,t,n))}function Z3(e){e.exit("gfmFootnoteDefinition")}function ez(e,t,n){const r=this;return Ge(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function tz(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,c){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let f=u;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[u][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[u][1].end)},g={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[u][1].start)},y=[["enter",p,c],["enter",a[f][1],c],["exit",a[f][1],c],["enter",g,c]],v=c.parser.constructs.insideSpan.null;v&&En(y,y.length,0,Jc(v,a.slice(f+1,u),c)),En(y,y.length,0,[["exit",g,c],["enter",a[u][1],c],["exit",a[u][1],c],["exit",p,c]]),En(a,f-1,u-f+3,y),u=f+y.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,c,u){const f=this.previous,p=this.events;let g=0;return y;function y(b){return f===126&&p[p.length-1][1].type!=="characterEscape"?u(b):(a.enter("strikethroughSequenceTemporary"),v(b))}function v(b){const w=$i(f);if(b===126)return g>1?u(b):(a.consume(b),g++,v);if(g<2&&!n)return u(b);const k=a.exit("strikethroughSequenceTemporary"),j=$i(b);return k._open=!j||j===2&&!!w,k._close=!w||w===2&&!!j,c(b)}}}class nz{constructor(){this.map=[]}add(t,n,r){rz(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const o of s)t.push(o);s=r.pop()}this.map.length=0}}function rz(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function sz(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function iz(){return{flow:{null:{name:"table",tokenize:oz,resolveAll:az}}}}function oz(e,t,n){const r=this;let s=0,o=0,a;return c;function c(L){let Y=r.events.length-1;for(;Y>-1;){const H=r.events[Y][1].type;if(H==="lineEnding"||H==="linePrefix")Y--;else break}const X=Y>-1?r.events[Y][1].type:null,de=X==="tableHead"||X==="tableRow"?A:u;return de===A&&r.parser.lazy[r.now().line]?n(L):de(L)}function u(L){return e.enter("tableHead"),e.enter("tableRow"),f(L)}function f(L){return L===124||(a=!0,o+=1),p(L)}function p(L){return L===null?n(L):Re(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),v):n(L):We(L)?Ge(e,p,"whitespace")(L):(o+=1,a&&(a=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),a=!0,p):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||st(L)?(e.exit("data"),p(L)):(e.consume(L),L===92?y:g)}function y(L){return L===92||L===124?(e.consume(L),g):g(L)}function v(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),a=!1,We(L)?Ge(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):b(L))}function b(L){return L===45||L===58?k(L):L===124?(a=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):N(L)}function w(L){return We(L)?Ge(e,k,"whitespace")(L):k(L)}function k(L){return L===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),j):L===45?(o+=1,j(L)):L===null||Re(L)?P(L):N(L)}function j(L){return L===45?(e.enter("tableDelimiterFiller"),C(L)):N(L)}function C(L){return L===45?(e.consume(L),C):L===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(L))}function S(L){return We(L)?Ge(e,P,"whitespace")(L):P(L)}function P(L){return L===124?b(L):L===null||Re(L)?!a||s!==o?N(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):N(L)}function N(L){return n(L)}function A(L){return e.enter("tableRow"),$(L)}function $(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),$):L===null||Re(L)?(e.exit("tableRow"),t(L)):We(L)?Ge(e,$,"whitespace")(L):(e.enter("data"),G(L))}function G(L){return L===null||L===124||st(L)?(e.exit("data"),$(L)):(e.consume(L),L===92?B:G)}function B(L){return L===92||L===124?(e.consume(L),G):G(L)}}function az(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],a=[0,0,0,0],c=!1,u=0,f,p,g;const y=new nz;for(;++n<e.length;){const v=e[n],b=v[1];v[0]==="enter"?b.type==="tableHead"?(c=!1,u!==0&&(s_(y,t,u,f,p),p=void 0,u=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},y.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,g=void 0,o=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},y.add(n,0,[["enter",p,t]])),s=b.type==="tableDelimiterRow"?2:p?3:1):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],g=Xl(y,t,o,s,void 0,g),o=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],g=Xl(y,t,o,s,void 0,g)),o=a,a=[o[1],n,0,0])):b.type==="tableHead"?(c=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],g=Xl(y,t,o,s,n,g)):a[1]!==0&&(g=Xl(y,t,a,s,n,g)),s=0):s&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&s_(y,t,u,f,p),y.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=sz(t.events,n))}return e}function Xl(e,t,n,r,s,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},Si(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Si(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=Si(t.events,n[2]),p=Si(t.events,n[3]),g={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const y=t.events[n[2]],v=t.events[n[3]];if(y[1].end=Object.assign({},v[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,w=n[3]-n[2]-1;e.add(b,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},Si(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function s_(e,t,n,r,s){const o=[],a=Si(t.events,n);s&&(s.end=Object.assign({},a),o.push(["exit",s,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Si(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lz={name:"tasklistCheck",tokenize:uz};function cz(){return{text:{91:lz}}}function uz(e,t,n){const r=this;return s;function s(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return st(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(u)}function c(u){return Re(u)?t(u):We(u)?e.check({tokenize:dz},t,n)(u):n(u)}}function dz(e,t,n){return Ge(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function hz(e){return lk([M3(),W3(),tz(e),iz(),cz()])}const fz={};function pz(e){const t=this,n=e||fz,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(hz(n)),o.push(O3()),a.push(L3(n))}function mz({message:e}){const{t}=Ze(),n=e.role==="user",r={p:({node:s,...o})=>h.jsx("p",{className:"mb-2 last:mb-0",...o}),a:({node:s,...o})=>h.jsx("a",{className:"text-primary hover:underline",...o}),ul:({node:s,...o})=>h.jsx("ul",{className:"list-disc ml-4 mb-2",...o}),ol:({node:s,...o})=>h.jsx("ol",{className:"list-decimal ml-4 mb-2",...o}),blockquote:({node:s,...o})=>h.jsx("blockquote",{className:"border-l-2 border-border/50 pl-3 text-fg/70 italic mb-2",...o}),table:({node:s,...o})=>h.jsx("table",{className:"w-full text-xs border-collapse my-2",...o}),th:({node:s,...o})=>h.jsx("th",{className:"border border-border/20 bg-surface/50 px-2 py-1 text-left font-semibold",...o}),td:({node:s,...o})=>h.jsx("td",{className:"border border-border/20 px-2 py-1 align-top",...o}),code:({node:s,inline:o,className:a,...c})=>h.jsx("code",{className:o?"bg-black/20 rounded px-1 py-0.5 font-mono text-xs":"block bg-black/30 rounded-lg p-3 font-mono text-xs leading-relaxed overflow-x-auto",...c}),pre:({node:s,...o})=>h.jsx("pre",{className:"my-2",...o})};return h.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"}`,children:h.jsxs("div",{className:`flex gap-3 max-w-[85%] ${n?"flex-row-reverse":"flex-row"}`,children:[h.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 ${n?"bg-primary text-white":"bg-gradient-to-br from-indigo-500 to-purple-600 text-white shadow-lg glow-primary"}`,children:n?h.jsx(Ac,{size:16}):h.jsx(uj,{size:16})}),h.jsxs("div",{className:`flex flex-col ${n?"items-end":"items-start"}`,children:[h.jsx("div",{className:`px-5 py-3.5 rounded-2xl text-sm leading-relaxed shadow-sm ${n?"bg-primary/15 text-fg rounded-tr-none":"bg-surface/70 backdrop-blur-md text-fg rounded-tl-none"}`,children:h.jsx("div",{className:"markdown-body",children:h.jsx(Gp,{remarkPlugins:[pz],components:r,children:e.content})})}),h.jsx("span",{className:"text-[10px] text-fg/30 mt-1 px-1",children:new Date(e.created_at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]})]})})}function gz({sessionId:e,onContextUpdate:t,onNewSession:n,onSessionCreated:r}){const{t:s}=Ze(),[o,a]=R.useState([]),[c,u]=R.useState(""),[f,p]=R.useState(!1),[g,y]=R.useState(!1),v=R.useRef(null),b=R.useRef(null),w=R.useRef(!0),k=R.useRef(null);R.useEffect(()=>{e?C(e):(a([]),t([]))},[e,t]),R.useEffect(()=>{w.current&&v.current&&v.current.scrollIntoView({behavior:"smooth"})},[o,g]);const j=()=>{const N=b.current;if(!N)return;const A=N.scrollHeight-N.scrollTop-N.clientHeight;w.current=A<64},C=async N=>{try{const{data:{session:A}}=await oe.auth.getSession();if(!A)return;const $=await Qe.get(`/api/chat/sessions/${N}/messages`,{headers:{"x-user-id":A.user.id}});if($.data.success){a($.data.messages);const G=$.data.messages[$.data.messages.length-1];G&&G.role==="assistant"&&G.context_sources&&t(G.context_sources)}}catch(A){console.error("Failed to fetch messages",A)}},S=async N=>{if(N?.preventDefault(),!c.trim()||f)return;const A=c.trim();u(""),k.current&&(k.current.style.height="auto");const{data:{session:$}}=await oe.auth.getSession();if(!$)return;const G=$.user.id;p(!0),y(!0);try{let B=e;if(!B){const X=await Qe.post("/api/chat/sessions",{},{headers:{"x-user-id":G}});if(X.data.success)B=X.data.session.id,r(B);else throw new Error("Failed to create session")}const L={id:"temp-"+Date.now(),role:"user",content:A,created_at:new Date().toISOString()};a(X=>[...X,L]);const Y=await Qe.post("/api/chat/message",{sessionId:B,content:A},{headers:{"x-user-id":G}});if(Y.data.success){const X=Y.data.message;a(de=>[...de,X]),X.context_sources&&t(X.context_sources)}}catch(B){console.error("Message failed",B),a(L=>[...L,{id:"err-"+Date.now(),role:"assistant",content:s("chat.error_message"),created_at:new Date().toISOString()}])}finally{p(!1),y(!1)}},P=N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),S())};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:b,onScroll:j,className:"flex-1 overflow-y-auto p-5 space-y-6 scrollbar-on-hover",children:[o.length===0?h.jsxs("div",{className:"h-full flex flex-col items-center justify-center p-8 text-center opacity-70",children:[h.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-2xl flex items-center justify-center mb-4 text-primary animate-pulse",children:h.jsx(zj,{size:32})}),h.jsx("h3",{className:"text-xl font-bold mb-2",children:s("chat.title")}),h.jsx("p",{className:"text-sm max-w-md mx-auto mb-8",children:s("chat.desc")}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 max-w-lg w-full",children:[s("chat.suggestions.react"),s("chat.suggestions.ai"),s("chat.suggestions.finance"),s("chat.suggestions.performance")].map((N,A)=>h.jsx("button",{onClick:()=>u(N),className:"text-left p-3 text-xs bg-surface/30 hover:bg-surface/50 border border-border/30 rounded-xl transition-all hover:scale-[1.02]",children:N},A))})]}):h.jsxs(h.Fragment,{children:[o.map((N,A)=>h.jsx(mz,{message:N},N.id||A)),g&&h.jsx(Fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex justify-start w-full",children:h.jsxs("div",{className:"bg-surface/30 border border-border/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[h.jsxs("div",{className:"flex gap-1",children:[h.jsx("span",{className:"w-1.5 h-1.5 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0s"}}),h.jsx("span",{className:"w-1.5 h-1.5 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),h.jsx("span",{className:"w-1.5 h-1.5 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]}),h.jsx("span",{className:"text-xs text-fg/50 font-mono",children:s("chat.thinking")})]})})]}),h.jsx("div",{ref:v})]}),h.jsx("div",{className:"p-4 bg-surface/20 border-t border-border backdrop-blur-md",children:h.jsx("form",{onSubmit:S,className:"relative max-w-4xl mx-auto",children:h.jsxs("div",{className:"relative flex items-end gap-2 bg-surface/55 border border-border rounded-xl px-2 py-2 shadow-sm focus-within:ring-2 focus-within:ring-primary/30 focus-within:border-primary/30 transition-all",children:[h.jsx("textarea",{ref:k,value:c,onChange:N=>{u(N.target.value),N.target.style.height="auto",N.target.style.height=N.target.scrollHeight+"px"},onKeyDown:P,placeholder:s("chat.placeholder"),rows:1,className:"w-full bg-transparent border-none focus:ring-0 focus:outline-none py-2 pl-2 text-fg resize-none min-h-[24px] max-h-[200px] placeholder:text-fg/40",disabled:f}),h.jsx("button",{type:"submit",disabled:!c.trim()||f,className:"p-2 mb-0.5 bg-primary text-white rounded-xl shadow-lg hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-all shrink-0",children:f?h.jsx(Nc,{size:18,className:"animate-spin"}):h.jsx(Dj,{size:18})})]})})})]})}function yz({sources:e,onClose:t}){const{t:n}=Ze();return!e||e.length===0?null:h.jsxs(Fe.div,{initial:{opacity:0,x:20,width:0},animate:{opacity:1,x:0,width:300},exit:{opacity:0,x:20,width:0},className:"bg-surface/25 backdrop-blur-xl rounded-xl border border-border overflow-hidden flex flex-col",children:[h.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between bg-surface/15",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-fg/80",children:[h.jsx(d_,{size:16,className:"text-secondary"}),h.jsx("span",{children:n("chat.relevant_context")})]}),h.jsx("button",{onClick:t,className:"p-1 hover:bg-surface rounded-md text-fg/40 hover:text-fg transition-colors",children:h.jsx(Cn,{size:14})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-3",children:e.map((r,s)=>h.jsxs("div",{className:"p-3 bg-surface/20 hover:bg-surface/35 border border-border rounded-xl transition-all group",children:[h.jsxs("div",{className:"flex justify-between items-start mb-2",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"flex items-center justify-center w-4 h-4 bg-primary/10 text-primary text-[10px] font-bold rounded",children:s+1}),h.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded border ${r.score>=80?"bg-yellow-500/10 text-yellow-500 border-yellow-500/20":"bg-blue-500/10 text-blue-400 border-blue-500/20"}`,children:n("chat.match_score",{score:r.score})})]}),h.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"opacity-0 group-hover:opacity-100 focus-visible:opacity-100 text-fg/40 hover:text-primary transition-opacity focus-visible:ring-2 focus-visible:ring-primary/40 rounded",children:h.jsx(Ui,{size:12})})]}),h.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-fg/90 block mb-1 hover:text-primary transition-colors line-clamp-2",children:r.title}),h.jsx("p",{className:"text-[10px] text-fg/50 line-clamp-3 leading-relaxed",children:r.summary})]},s))}),h.jsx("div",{className:"p-3 border-t border-border bg-surface/20 text-[10px] text-center text-fg/30",children:n("chat.rag_attribution",{count:e.length})})]})}function xz(){const[e,t]=R.useState(null),[n,r]=R.useState([]),[s,o]=R.useState(!0);return h.jsxs("div",{className:"flex h-full gap-4 overflow-hidden",children:[h.jsx(HL,{activeSessionId:e,onSelectSession:t}),h.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-surface/60 rounded-xl overflow-hidden border border-border relative",children:h.jsx(gz,{sessionId:e,onContextUpdate:a=>{r(a),a.length>0&&o(!0)},onNewSession:()=>t(null),onSessionCreated:a=>t(a)})}),s&&h.jsx(yz,{sources:n,onClose:()=>o(!1)})]})}function vz({isOpen:e,onClose:t}){const{t:n}=Ze(),[r,s]=R.useState(""),[o,a]=R.useState(!0);R.useEffect(()=>{e&&c()},[e]);const c=async()=>{a(!0);try{const f=await(await fetch("/CHANGELOG.md")).text();s(f)}catch(u){console.error("Failed to load changelog:",u),s(`# ${n("common.error")}
|
|
133
133
|
|
|
134
|
-
${n("shell.changelog_error")}`)}finally{a(!1)}};return h.jsx(Pt,{children:e&&h.jsxs(h.Fragment,{children:[h.jsx(Fe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50"}),h.jsx(Fe.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{type:"spring",damping:25,stiffness:300},className:"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none",children:h.jsxs("div",{className:"glass w-full max-w-3xl max-h-[80vh] overflow-hidden pointer-events-auto shadow-2xl",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(d_,{size:24,className:"text-primary"}),h.jsx("h2",{className:"text-xl font-bold",children:n("shell.release_notes")})]}),h.jsx("button",{onClick:t,className:"p-2 hover:bg-surface rounded-lg transition-colors",children:h.jsx(Cn,{size:20,className:"text-fg/60"})})]}),h.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar max-h-[calc(80vh-88px)]",children:o?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent"})}):h.jsx(Gp,{components:{h1:({children:u})=>h.jsx("h1",{className:"text-2xl font-bold text-fg mb-6 mt-0",children:u}),h2:({children:u})=>h.jsx("h2",{className:"text-xl font-bold text-fg mt-8 mb-3 pb-2 border-b border-border first:mt-0",children:u}),h3:({children:u})=>h.jsx("h3",{className:"text-lg font-bold text-primary mt-6 mb-2",children:u}),p:({children:u})=>h.jsx("p",{className:"text-sm text-fg/70 mb-3 leading-relaxed",children:u}),ul:({children:u})=>h.jsx("ul",{className:"list-none space-y-1 mb-4 ml-0",children:u}),li:({children:u})=>h.jsx("li",{className:"text-sm text-fg/80 ml-4 mb-1 before:content-['•'] before:mr-2 before:text-primary",children:u}),a:({href:u,children:f})=>h.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline transition-colors",children:f}),code:({children:u})=>h.jsx("code",{className:"bg-surface/50 text-accent px-1.5 py-0.5 rounded text-xs font-mono border border-border",children:u}),strong:({children:u})=>h.jsx("strong",{className:"font-bold text-fg",children:u})},children:r})})]})})]})})}function _z({asset:e,onClose:t}){const{t:n}=Ze(),r=()=>{e.content&&navigator.clipboard.writeText(e.content)},s=()=>{if(!e.content)return;const o=new Blob([e.content],{type:"text/markdown"}),a=URL.createObjectURL(o),c=document.createElement("a");c.href=a,c.download=`${e.title.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.md`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(a)};return h.jsx(Pt,{children:e&&h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",children:h.jsxs(Fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-bg rounded-3xl shadow-2xl w-full max-w-4xl max-h-[85vh] flex flex-col overflow-hidden border border-border",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border bg-surface/50",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 rounded-2xl bg-primary/10 text-primary shadow-inner",children:e.type==="audio"?h.jsx(Uh,{className:"w-6 h-6"}):h.jsx(Li,{className:"w-6 h-6"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-black italic tracking-tighter uppercase text-xl text-fg",children:e.title}),h.jsxs("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest mt-0.5",children:[new Date(e.created_at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"})," • ",n("discovery.sources_count",{count:e.metadata?.source_signal_count||0})]})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:r,className:"p-2.5 text-fg/40 hover:text-primary hover:bg-primary/10 rounded-xl transition-all",title:"Copy Content",children:h.jsx(Df,{className:"w-5 h-5"})}),h.jsx("button",{onClick:s,className:"p-2.5 text-fg/40 hover:text-primary hover:bg-primary/10 rounded-xl transition-all",title:"Download File",children:h.jsx(Fh,{className:"w-5 h-5"})}),h.jsx("div",{className:"w-px h-8 bg-border mx-2"}),h.jsx("button",{onClick:t,className:"p-2.5 text-fg/40 hover:text-error hover:bg-error/10 rounded-xl transition-all",children:h.jsx(Cn,{className:"w-6 h-6"})})]})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-8 bg-bg custom-scrollbar",children:e.status&&e.status!=="completed"?h.jsxs("div",{className:"flex flex-col items-center justify-center h-80 gap-6",children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse"}),h.jsx(Rt,{className:"w-16 h-16 animate-spin text-primary relative z-10"})]}),h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("h4",{className:"text-xl font-black italic tracking-tighter uppercase text-fg",children:e.status==="processing"?n("transmute.generating_asset"):n("transmute.queued_desktop")}),h.jsx("p",{className:"text-xs text-fg/40 font-mono uppercase tracking-widest max-w-xs mx-auto",children:n("transmute.desktop_processing")})]})]}):e.type==="markdown"?h.jsx("div",{className:"prose prose-invert prose-headings:font-black prose-headings:italic prose-headings:tracking-tighter prose-headings:uppercase prose-p:text-fg/80 prose-li:text-fg/80 prose-strong:text-primary max-w-none",children:h.jsx(Gp,{children:e.content||""})}):e.type==="audio"?h.jsxs("div",{className:"flex flex-col items-center justify-center h-80 gap-8",children:[h.jsx("div",{className:"w-24 h-24 rounded-3xl bg-primary/10 flex items-center justify-center animate-pulse shadow-xl border border-primary/20",children:h.jsx(Uh,{className:"w-10 h-10 text-primary"})}),h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-xs text-fg/40 font-mono uppercase tracking-widest mb-6",children:n("transmute.unsupported_type")}),h.jsxs("audio",{controls:!0,className:"w-80 h-12 rounded-xl bg-surface border border-border",children:[h.jsx("source",{src:e.content||"",type:"audio/mpeg"}),"Your browser does not support the audio element."]})]})]}):h.jsx("div",{className:"text-fg/20 text-center py-20 font-mono italic",children:"Unsupported asset type"})})]})})})}function i_({engine:e,onClose:t,onSave:n,onDelete:r}){const{t:s}=Ze(),{showToast:o}=Wc(),[a,c]=R.useState({title:"",type:"newsletter",status:"active",config:{schedule:"",min_score:70,categories:[],custom_prompt:"",max_signals:10,execution_mode:"local"}}),[u,f]=R.useState(!1);R.useEffect(()=>{e&&c({title:e.title,type:e.type,status:e.status,config:{schedule:e.config.schedule||"",min_score:e.config.filters?.min_score||70,categories:Array.isArray(e.config.category)?e.config.category:e.config.category?[e.config.category]:[],custom_prompt:e.config.custom_prompt||"",max_signals:e.config.max_signals||10,execution_mode:e.config.execution_mode||"local"}})},[e]);const p=async()=>{try{const v={title:a.title,type:a.type,status:a.status,config:{schedule:a.config.schedule,filters:{min_score:a.config.min_score,category:a.config.category},custom_prompt:a.config.custom_prompt,max_signals:a.config.max_signals,execution_mode:a.config.execution_mode}};if(e){const{data:b,error:w}=await oe.from("engines").update(v).eq("id",e.id).select().single();if(w)throw w;n(b),o("Engine updated successfully","success")}else{const{data:{user:b}}=await oe.auth.getUser();if(!b)throw new Error("Not authenticated");const{data:w,error:k}=await oe.from("engines").insert({...v,user_id:b.id}).select().single();if(k)throw k;n(w),o("Engine created successfully","success")}t()}catch(v){console.error("Save error:",v),o(v.message||"Failed to save engine","error")}},g=async()=>{if(!(!e||!r))try{const{error:v}=await oe.from("engines").delete().eq("id",e.id);if(v)throw v;r(e.id),o("Engine deleted","success"),t()}catch(v){o(v.message||"Failed to delete engine","error")}},y=()=>{f(!1),t()};return!e&&!t?null:h.jsx(Pt,{children:h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",children:h.jsxs(Fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-bg rounded-3xl shadow-2xl w-full max-w-2xl max-h-[85vh] flex flex-col overflow-hidden border border-border",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border bg-surface/50",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-xl font-black italic tracking-tighter uppercase text-fg",children:s(e?"transmute.edit_engine":"transmute.create_engine")}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-[0.2em]",children:s("transmute.configure_pipeline")})]}),h.jsx("button",{onClick:y,className:"p-2 text-fg/40 hover:text-error hover:bg-error/10 rounded-xl transition-all",children:h.jsx(Cn,{className:"w-6 h-6"})})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-8 custom-scrollbar",children:[h.jsxs("div",{className:"space-y-6",children:[h.jsx(vr,{label:s("transmute.engine_name"),children:h.jsx("input",{type:"text",value:a.title,onChange:v=>c({...a,title:v.target.value}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg placeholder:text-fg/20 focus:border-primary/50 outline-none transition-all text-sm",placeholder:"e.g., Daily Tech Brief"})}),h.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[h.jsx(vr,{label:s("transmute.type"),children:h.jsxs("select",{value:a.type,onChange:v=>c({...a,type:v.target.value}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm appearance-none cursor-pointer",children:[h.jsx("option",{value:"newsletter",children:s("transmute.newsletter")}),h.jsx("option",{value:"thread",children:s("transmute.thread")}),h.jsx("option",{value:"audio",children:"Audio Brief"}),h.jsx("option",{value:"report",children:"Report"})]})}),h.jsx(vr,{label:s("transmute.status"),children:h.jsxs("select",{value:a.status,onChange:v=>c({...a,status:v.target.value}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm appearance-none cursor-pointer",children:[h.jsx("option",{value:"active",children:s("common.status_active")}),h.jsx("option",{value:"paused",children:s("common.status_paused")}),h.jsx("option",{value:"draft",children:"Draft"})]})})]}),h.jsxs(vr,{label:s("transmute.execution_env"),children:[h.jsxs("select",{value:a.config.execution_mode,onChange:v=>c({...a,config:{...a.config,execution_mode:v.target.value}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm appearance-none cursor-pointer",children:[h.jsx("option",{value:"local",children:s("transmute.local_llm")}),h.jsx("option",{value:"desktop",children:s("transmute.desktop_swarm")})]}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono uppercase mt-2 leading-relaxed",children:a.config.execution_mode==="desktop"?s("transmute.env_desc_desktop"):s("transmute.env_desc_local")})]})]}),h.jsxs("div",{className:"space-y-6 pt-6 border-t border-border/10",children:[h.jsx("h4",{className:"text-xs font-bold uppercase tracking-[0.2em] text-primary/60",children:"Signal Filters"}),h.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[h.jsx(vr,{label:s("transmute.min_score"),children:h.jsx("input",{type:"number",min:"0",max:"100",value:a.config.min_score,onChange:v=>c({...a,config:{...a.config,min_score:parseInt(v.target.value)||0}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm"})}),h.jsx(vr,{label:s("transmute.max_signals"),children:h.jsx("input",{type:"number",min:"1",max:"50",value:a.config.max_signals,onChange:v=>c({...a,config:{...a.config,max_signals:parseInt(v.target.value)||10}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm"})})]}),h.jsxs(vr,{label:s("transmute.category_filter"),children:[h.jsxs("select",{multiple:!0,value:a.config.categories,onChange:v=>{const b=Array.from(v.target.selectedOptions,w=>w.value);c({...a,config:{...a.config,categories:b}})},className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm min-h-[120px] custom-scrollbar",children:[h.jsx("option",{value:"AI & ML",children:"AI & ML"}),h.jsx("option",{value:"Technology",children:"Technology"}),h.jsx("option",{value:"Business",children:"Business"}),h.jsx("option",{value:"Finance",children:"Finance"}),h.jsx("option",{value:"Science",children:"Science"}),h.jsx("option",{value:"Politics",children:"Politics"})]}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono mt-2",children:s("transmute.multi_select_hint")})]})]}),h.jsx("div",{className:"pt-6 border-t border-border/10",children:h.jsxs(vr,{label:`${s("transmute.schedule")} (${s("common.optional")})`,children:[h.jsx("input",{type:"text",value:a.config.schedule,onChange:v=>c({...a,config:{...a.config,schedule:v.target.value}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg placeholder:text-fg/20 focus:border-primary/50 outline-none transition-all text-sm",placeholder:"e.g., Daily @ 9am, Manual"}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono mt-2",children:s("transmute.schedule_hint")})]})}),h.jsx("div",{className:"pt-6 border-t border-border/10",children:h.jsx(vr,{label:s("transmute.prompt_override"),children:h.jsx("textarea",{value:a.config.custom_prompt,onChange:v=>c({...a,config:{...a.config,custom_prompt:v.target.value}}),rows:5,className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg placeholder:text-fg/20 focus:border-primary/50 outline-none transition-all text-sm resize-none custom-scrollbar",placeholder:s("transmute.prompt_placeholder")})})})]}),h.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-border bg-surface/50",children:[e&&r?u?h.jsxs("div",{className:"flex items-center gap-4 bg-error/5 border border-error/20 px-4 py-2 rounded-2xl animate-in fade-in slide-in-from-left-2 transition-all",children:[h.jsx("span",{className:"text-xs text-error font-bold uppercase tracking-widest",children:s("transmute.delete_confirm")}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:g,className:"px-4 py-2 bg-error text-white text-[10px] font-bold uppercase tracking-widest rounded-xl hover:bg-error/80 transition-all shadow-lg shadow-error/20",children:s("transmute.confirm")}),h.jsx("button",{onClick:()=>f(!1),className:"px-4 py-2 bg-surface border border-border text-fg/40 text-[10px] font-bold uppercase tracking-widest rounded-xl hover:bg-bg transition-all",children:s("common.cancel")})]})]}):h.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-2 px-6 py-3 text-error/60 hover:text-error hover:bg-error/10 rounded-2xl transition-all font-bold text-xs uppercase tracking-widest",children:[h.jsx(Ff,{className:"w-5 h-5"}),s("common.delete")]}):h.jsx("div",{}),h.jsxs("div",{className:"flex gap-4",children:[h.jsx("button",{onClick:y,className:"px-6 py-3 text-fg/40 font-bold text-xs uppercase tracking-widest hover:text-fg hover:bg-surface rounded-2xl transition-all",children:s("common.cancel")}),h.jsxs("button",{onClick:p,className:"flex items-center gap-2 px-8 py-3 bg-gradient-to-r from-primary to-accent text-white rounded-2xl font-bold text-xs uppercase tracking-widest hover:scale-105 active:scale-95 transition-all shadow-lg glow-primary",children:[h.jsx(br,{className:"w-5 h-5"}),s("common.save")]})]})]})]})})})}function vr({label:e,children:t}){return h.jsxs("div",{className:"space-y-2",children:[h.jsx("label",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-fg/30 ml-1",children:e}),t]})}const bz=({engine:e,onRun:t,onEdit:n,onToggle:r,onViewBrief:s,isLoading:o})=>{const{t:a}=Ze(),c=!!e.config.tag,u={newsletter:c?h.jsx(Mf,{className:"w-5 h-5 text-blue-500"}):h.jsx(Li,{className:"w-5 h-5 text-emerald-500"}),thread:h.jsx(nn,{className:"w-5 h-5 text-blue-500"}),audio:h.jsx(Uh,{className:"w-5 h-5 text-purple-500"}),report:h.jsx(oc,{className:"w-5 h-5 text-orange-500"})};return h.jsxs(Fe.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:`p-5 rounded-2xl border transition-all hover:shadow-lg group ${e.status==="active"?"bg-surface border-border shadow-sm":"bg-surface/30 border-dashed border-border opacity-70"}`,children:[h.jsxs("div",{className:"flex justify-between items-start mb-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"p-2 rounded-xl bg-bg border border-border/10",children:u[e.type]||h.jsx(Li,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-bold text-fg tracking-tight",children:e.title}),h.jsxs("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest",children:[c?a("transmute.topic"):a(`transmute.${e.type}`,e.type)," ",a("transmute.pipeline")]})]})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx("button",{onClick:()=>r(e.id,e.status),className:"p-1.5 rounded-lg hover:bg-bg text-fg/40 hover:text-fg transition-colors",children:e.status==="active"?h.jsx(Oj,{className:"w-4 h-4"}):h.jsx(Gy,{className:"w-4 h-4"})}),h.jsx("button",{onClick:()=>s(e.id),title:a("transmute.view_json"),className:"p-1.5 rounded-lg hover:bg-bg text-fg/40 hover:text-fg transition-colors",children:h.jsx(p_,{className:"w-4 h-4"})}),h.jsx("button",{onClick:()=>n(e.id),className:"p-1.5 rounded-lg hover:bg-bg text-fg/40 hover:text-fg transition-colors",children:h.jsx(oc,{className:"w-4 h-4"})})]})]}),h.jsxs("div",{className:"space-y-2 mb-4",children:[h.jsxs("div",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest flex justify-between",children:[h.jsx("span",{children:a("transmute.last_run")}),h.jsx("span",{className:"text-fg/60",children:e.last_run_at?new Date(e.last_run_at).toLocaleDateString(a("common.locale_code")):a("transmute.never")})]}),h.jsxs("div",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest flex justify-between",children:[h.jsx("span",{children:a("transmute.schedule")}),h.jsx("span",{className:"text-fg/60",children:e.config.schedule||a("transmute.manual")})]})]}),h.jsxs("button",{onClick:()=>t(e.id),disabled:o||e.status!=="active",className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl bg-gradient-to-r from-primary to-primary/80 text-white font-bold shadow-lg glow-primary hover:scale-[1.02] active:scale-95 disabled:opacity-50 disabled:hover:scale-100 transition-all text-sm uppercase tracking-widest",children:[o?h.jsx(Rt,{className:"w-4 h-4 animate-spin"}):h.jsx(Gy,{className:"w-4 h-4"}),a(o?"transmute.running":"transmute.run_engine")]})]})};function wz(){const{t:e}=Ze(),[t,n]=R.useState([]),[r,s]=R.useState(!0),[o,a]=R.useState(new Set),[c,u]=R.useState(null),[f,p]=R.useState(null),[g,y]=R.useState(!1),[v,b]=R.useState(null),[w,k]=R.useState(!1),[j,C]=R.useState(!1),{showToast:S}=Wc();R.useEffect(()=>{(async()=>N())();const K=oe.channel("asset-updates").on("postgres_changes",{event:"UPDATE",schema:"public",table:"assets"},te=>{const ne=te.new;u(J=>J?.id===ne.id?ne:J),ne.status==="completed"&&te.old.status!=="completed"&&S(e("transmute.asset_ready",{title:ne.title}),"success")}).subscribe();return()=>{oe.removeChannel(K)}},[]);const P=async()=>{if(!j)try{C(!0),S(e("transmute.scanning"),"info");const{data:{session:H}}=await oe.auth.getSession(),K=Ps(),te={"Content-Type":"application/json","x-user-id":H?.user?.id||""};if(H?.access_token&&(te.Authorization=`Bearer ${H.access_token}`),K&&(te["x-supabase-url"]=K.url,te["x-supabase-key"]=K.anonKey),!(await fetch("/api/engines/ensure-defaults",{method:"POST",headers:te})).ok)throw new Error("Failed to generate engines");S(e("transmute.discovery_complete"),"success"),await N()}catch(H){console.error("Failed to generate engines:",H),S(e("transmute.discovery_failed"),"error")}finally{C(!1)}},N=async()=>{try{s(!0);const{data:{user:H}}=await oe.auth.getUser();if(!H)return;const{data:K,error:te}=await oe.from("engines").select("*").eq("user_id",H.id).order("created_at",{ascending:!1});if(te)throw te;n(K)}catch(H){console.error("Error fetching engines:",H),S(e("transmute.load_failed"),"error")}finally{s(!1)}},A=async H=>{if(!o.has(H))try{a(D=>new Set(D).add(H)),S(e("transmute.starting_run"),"info");const{data:{session:K}}=await oe.auth.getSession(),te=K?.access_token,ne=Ps(),J={"Content-Type":"application/json","x-user-id":K?.user?.id||""};te&&(J.Authorization=`Bearer ${te}`),ne&&(J["x-supabase-url"]=ne.url,J["x-supabase-key"]=ne.anonKey);const le=await fetch(`/api/engines/${H}/run`,{method:"POST",headers:J});if(!le.ok){const D=await le.json();throw new Error(D.error||"Run failed")}const T=await le.json();T.status==="completed"?S(e("transmute.run_complete",{title:T.title}),"success"):S(e("transmute.run_started_desktop",{id:T.id}),"info"),u(T),n(D=>D.map(W=>W.id===H?{...W,last_run_at:new Date().toISOString()}:W))}catch(K){console.error("Engine run error:",K),S(K.message||e("transmute.run_failed"),"error")}finally{a(K=>{const te=new Set(K);return te.delete(H),te})}},$=async H=>{try{y(!0);const{data:{session:K}}=await oe.auth.getSession(),te=Ps(),ne={"Content-Type":"application/json","x-user-id":K?.user?.id||""};K?.access_token&&(ne.Authorization=`Bearer ${K.access_token}`),te&&(ne["x-supabase-url"]=te.url,ne["x-supabase-key"]=te.anonKey);const J=await fetch(`/api/engines/${H}/brief`,{headers:ne});if(!J.ok)throw new Error("Failed to fetch brief");const le=await J.json();p(le)}catch{S(e("transmute.brief_failed"),"error")}finally{y(!1)}},G=async(H,K)=>{const te=K==="active"?"paused":"active";n(ne=>ne.map(J=>J.id===H?{...J,status:te}:J));try{const{error:ne}=await oe.from("engines").update({status:te}).eq("id",H);if(ne)throw ne;S(e("transmute.status_updated",{status:te}),"success")}catch{n(J=>J.map(le=>le.id===H?{...le,status:K}:le)),S(e("common.error"),"error")}},B=()=>{k(!0)},L=H=>{const K=t.find(te=>te.id===H);K&&b(K)},Y=H=>{n(K=>K.find(ne=>ne.id===H.id)?K.map(ne=>ne.id===H.id?H:ne):[H,...K])},X=H=>{n(K=>K.filter(te=>te.id!==H))},de=()=>{b(null),k(!1)};return h.jsxs("div",{className:"h-full flex flex-col bg-bg",children:[h.jsx("div",{className:"flex-none p-6 border-b border-border bg-bg/50 backdrop-blur-sm z-10 sticky top-0",children:h.jsxs("div",{className:"flex justify-between items-center max-w-7xl mx-auto w-full",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-2xl font-black italic tracking-tighter bg-clip-text text-transparent bg-gradient-to-r from-primary to-accent",children:e("transmute.title")}),h.jsx("p",{className:"text-xs text-fg/40 font-mono uppercase tracking-widest mt-1",children:e("transmute.desc")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("button",{onClick:P,disabled:j,className:"flex items-center gap-2 px-4 py-2.5 bg-primary/10 text-primary border border-primary/20 rounded-xl font-bold text-xs uppercase tracking-widest hover:bg-primary/20 transition-all disabled:opacity-50",children:[j?h.jsx(Rt,{className:"w-4 h-4 animate-spin"}):h.jsx(nn,{className:"w-4 h-4"}),e("transmute.generate_engines")]}),h.jsxs("button",{onClick:B,className:"flex items-center gap-2 px-4 py-2.5 bg-gradient-to-r from-primary to-accent text-white rounded-xl font-bold text-xs uppercase tracking-widest hover:scale-105 transition-all shadow-lg glow-primary",children:[h.jsx(zf,{className:"w-4 h-4"}),e("transmute.new_engine")]})]})]})}),h.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:h.jsx("div",{className:"max-w-7xl mx-auto w-full",children:r?h.jsx("div",{className:"flex items-center justify-center h-64",children:h.jsx(Rt,{className:"w-8 h-8 animate-spin text-purple-500"})}):t.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center h-96 text-center",children:[h.jsx("div",{className:"w-16 h-16 rounded-3xl bg-surface border border-border flex items-center justify-center mb-6 shadow-xl",children:h.jsx(nn,{className:"w-8 h-8 text-fg/20"})}),h.jsx("h3",{className:"text-xl font-black italic tracking-tighter uppercase text-fg",children:e("transmute.no_engines")}),h.jsx("p",{className:"text-xs text-fg/40 font-mono tracking-widest uppercase max-w-sm mt-2 mb-8",children:e("transmute.no_engines_desc")}),h.jsx("button",{onClick:B,className:"px-8 py-3 rounded-xl border border-border bg-surface hover:bg-bg text-xs font-bold uppercase tracking-widest transition-all shadow-sm",children:e("transmute.create_engine")})]}):h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:h.jsx(Pt,{children:t.map(H=>h.jsx(bz,{engine:H,onRun:A,onEdit:L,onToggle:G,onViewBrief:$,isLoading:o.has(H.id)},H.id))})})})}),h.jsx(Pt,{children:f&&h.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",children:h.jsxs(Fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-bg rounded-3xl shadow-2xl w-full max-w-4xl max-h-[85vh] flex flex-col overflow-hidden border border-border",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border bg-surface/50",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 rounded-2xl bg-primary/10 text-primary",children:h.jsx(p_,{className:"w-6 h-6"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-black italic tracking-tighter uppercase text-lg text-fg",children:e("transmute.view_json")}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest",children:e("transmute.json_contract")})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),S(e("transmute.copied_json"),"info")},className:"p-2 text-fg/40 hover:text-primary hover:bg-primary/10 rounded-xl transition-all",children:h.jsx(Df,{className:"w-4 h-4"})}),h.jsx("button",{onClick:()=>p(null),className:"p-2 text-fg/40 hover:text-error hover:bg-error/10 rounded-xl transition-all",children:h.jsx(Cn,{className:"w-5 h-5"})})]})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-6 bg-surface/30 font-mono text-sm custom-scrollbar",children:h.jsx("pre",{className:"text-primary leading-relaxed",children:JSON.stringify(f,null,2)})}),h.jsx("div",{className:"p-4 border-t border-border bg-surface/50 text-[9px] text-fg/30 font-mono uppercase tracking-[0.2em] text-center",children:e("transmute.json_footer")})]})})}),g&&h.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/20 backdrop-blur-sm",children:h.jsx(Rt,{className:"w-10 h-10 animate-spin text-white"})}),h.jsx(_z,{asset:c,onClose:()=>u(null)}),v&&h.jsx(i_,{engine:v,onClose:de,onSave:Y,onDelete:X}),w&&h.jsx(i_,{engine:null,onClose:de,onSave:Y})]})}class kz{audioContext=null;enabled=!0;constructor(){}getAudioContext(){return this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.audioContext}setEnabled(t){this.enabled=t}isEnabled(){return this.enabled}playTone(t,n,r=.3){if(this.enabled)try{const s=this.getAudioContext(),o=s.createOscillator(),a=s.createGain();o.connect(a),a.connect(s.destination),o.frequency.value=t,o.type="sine",a.gain.setValueAtTime(r,s.currentTime),a.gain.exponentialRampToValueAtTime(.01,s.currentTime+n),o.start(s.currentTime),o.stop(s.currentTime+n)}catch(s){console.warn("[Sound] Failed to play tone:",s)}}playSequence(t,n=.3){if(!this.enabled)return;let r=0;t.forEach(s=>{setTimeout(()=>{this.playTone(s.freq,s.duration,n)},r),r+=s.delay})}syncStart(){this.playSequence([{freq:261.63,duration:.15,delay:0},{freq:329.63,duration:.15,delay:100},{freq:392,duration:.2,delay:100}],.2)}signalFound(){this.playSequence([{freq:392,duration:.1,delay:0},{freq:523.25,duration:.15,delay:80}],.25)}syncComplete(){this.playSequence([{freq:261.63,duration:.12,delay:0},{freq:329.63,duration:.12,delay:80},{freq:392,duration:.12,delay:80},{freq:523.25,duration:.2,delay:80}],.2)}error(){this.playSequence([{freq:329.63,duration:.15,delay:0},{freq:261.63,duration:.2,delay:100}],.3)}click(){this.playTone(440,.05,.15)}}const Fo=new kz;function Sz(){const{t:e}=Ze(),[t,n]=R.useState([]),[r,s]=R.useState([]),[o,a]=R.useState("discovery"),[c,u]=R.useState(!1),[f,p]=R.useState(null),[g,y]=R.useState(!0),[v,b]=R.useState(!m0),[w,k]=R.useState(!0),[j,C]=R.useState(!1),[S,P]=R.useState(!1),[N,A]=R.useState(null),[$,G]=R.useState(!1),[B,L]=R.useState(!1),[Y,X]=R.useState(!1),[de,H]=R.useState(!0),[K,te]=R.useState(()=>localStorage.getItem("theme")||"dark"),[ne,J]=R.useState(null),le=R.useRef(null);R.useMemo(()=>{const pe=r.length;let ge=0,Te=0,fe=null;for(const _t of r){ge+=_t.score,_t.score>Te&&(Te=_t.score);const Yn=new Date(_t.date);(!fe||Yn>new Date(fe.date))&&(fe=_t)}const $e=pe?Math.round(ge/pe):0,rt=fe?new Date(fe.date):null;return{total:pe,average:$e,top:Te,latestTimestamp:rt,latestTitle:fe?.title??fe?.category??null}},[r]),R.useEffect(()=>{(async()=>{if(!m0){b(!0),y(!1);return}try{const{data:Te,error:fe}=await oe.from("init_state").select("is_initialized").single();fe?(console.warn("[App] Init check error (might be fresh DB):",fe),fe.code==="42P01"&&k(!1)):k(Te.is_initialized>0);const{data:{session:$e}}=await oe.auth.getSession();p($e?.user??null)}catch(Te){console.error("[App] Status check failed:",Te)}finally{y(!1)}})();const{data:{subscription:ge}}=oe.auth.onAuthStateChange((Te,fe)=>{p(fe?.user??null)});return()=>ge.unsubscribe()},[]),R.useEffect(()=>{document.documentElement.setAttribute("data-theme",K),localStorage.setItem("theme",K)},[K]);const[T,D]=R.useState({});R.useEffect(()=>{(async()=>{if(!f)return;const{data:ge}=await oe.from("alchemy_settings").select("sync_start_date, last_sync_checkpoint").eq("user_id",f.id).maybeSingle();ge&&D(ge)})()},[f,$]),R.useEffect(()=>{if(!f)return;(async()=>{const{data:Te}=await oe.from("alchemy_settings").select("sound_enabled").eq("user_id",f.id).maybeSingle();if(Te){const fe=Te.sound_enabled??!0;H(fe),Fo.setEnabled(fe)}})();const ge=oe.channel("processing_events").on("postgres_changes",{event:"INSERT",schema:"public",table:"processing_events",filter:`user_id=eq.${f.id}`},Te=>{const fe=Te.new;fe.agent_state==="Mining"&&!B&&(L(!0),X(!0),de&&Fo.syncStart()),fe.agent_state==="Signal"&&de&&Fo.signalFound(),fe.agent_state==="Completed"&&(L(!1),de&&(fe.metadata?.errors>0?Fo.error():Fo.syncComplete()),setTimeout(()=>{X(!1)},5e3),W())}).subscribe();return()=>{oe.removeChannel(ge)}},[f,B,de]),R.useEffect(()=>{const pe=new EventSource("/events");return pe.onmessage=ge=>{const Te=JSON.parse(ge.data);Te.type==="history"?n(fe=>[...Te.data,...fe].slice(0,100)):n(fe=>[Te,...fe].slice(0,100))},W(),()=>pe.close()},[f]),R.useEffect(()=>{le.current&&le.current.scrollIntoView({behavior:"smooth"})},[t]);const W=async()=>{try{if(f){const{data:ge,error:Te}=await oe.from("signals").select("*").order("created_at",{ascending:!1});if(!Te&&ge){s(ge.map(fe=>({id:fe.id,title:fe.title,score:fe.score,summary:fe.summary,date:fe.created_at,category:fe.category,entities:fe.entities})));return}}const pe=await Qe.get("/api/signals");s(pe.data)}catch(pe){console.error("Failed to fetch signals",pe)}},O=async()=>{u(!0);try{await Qe.post("/api/mine"),W()}catch(pe){console.error("Mining failed:",pe)}finally{u(!1)}},ve=(pe,ge)=>{pe==="logs"?(J(ge),a("logs")):a(pe)};return g?h.jsx("div",{className:"flex items-center justify-center h-screen bg-bg",children:h.jsx("div",{className:"w-12 h-12 border-4 border-primary/20 border-t-primary rounded-full animate-spin"})}):v?h.jsx(Uw,{onComplete:()=>b(!1)}):f?h.jsx(gL,{children:h.jsx(_L,{children:h.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-bg text-fg",children:[h.jsxs(Fe.aside,{animate:{width:j?72:240},className:"glass m-4 mr-0 flex flex-col relative",children:[h.jsxs("div",{className:`px-4 py-3 pb-4 flex items-center gap-3 ${j?"justify-center":""}`,children:[h.jsx("div",{className:"w-10 h-10 min-w-[40px] bg-gradient-to-br from-primary to-accent rounded-xl flex items-center justify-center shadow-lg glow-primary",children:h.jsx(nn,{className:"text-white fill-current",size:24})}),!j&&h.jsx(Fe.h1,{initial:{opacity:0},animate:{opacity:1},className:"text-xl font-bold tracking-tight",children:"Alchemist"})]}),h.jsxs("nav",{className:"flex-1 flex flex-col gap-1 px-3",children:[h.jsx(xi,{active:o==="discovery",onClick:()=>a("discovery"),icon:h.jsx(Cj,{size:20}),label:e("tabs.discovery"),collapsed:j}),h.jsx(xi,{active:o==="chat",onClick:()=>a("chat"),icon:h.jsx($h,{size:20}),label:e("tabs.chat"),collapsed:j}),h.jsx(xi,{active:o==="transmute",onClick:()=>a("transmute"),icon:h.jsx(nn,{size:20}),label:e("tabs.transmute"),collapsed:j}),h.jsx(xi,{active:o==="engine",onClick:()=>a("engine"),icon:h.jsx(oc,{size:20}),label:e("common.settings"),collapsed:j}),h.jsx(xi,{active:o==="logs",onClick:()=>a("logs"),icon:h.jsx(ac,{size:20}),label:e("tabs.logs"),collapsed:j}),h.jsx(xi,{active:o==="account",onClick:()=>a("account"),icon:h.jsx(Ac,{size:20}),label:e("common.account"),collapsed:j})]}),h.jsx("div",{className:"px-3 pb-2 border-t border-white/5 pt-4 mt-2 relative z-[100]",children:h.jsx("div",{className:j?"flex justify-center":"px-1",children:h.jsx(Ap,{collapsed:j,position:"top"})})}),h.jsx("div",{className:"px-3 pb-2",children:h.jsxs("button",{onClick:()=>te(K==="dark"?"light":"dark"),className:`w-full flex items-center ${j?"justify-center":"gap-3"} px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium`,title:j?e(K==="dark"?"shell.switch_light":"shell.switch_dark"):"",children:[h.jsx("div",{className:"min-w-[20px] flex justify-center",children:K==="dark"?h.jsx($j,{size:18}):h.jsx(Pj,{size:18})}),!j&&h.jsx(Fe.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"whitespace-nowrap",children:e(K==="dark"?"common.light_mode":"common.dark_mode")})]})}),h.jsxs("div",{className:"px-3 pb-3",children:[h.jsx("button",{onClick:()=>C(!j),className:`w-full flex items-center px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium ${j?"justify-center":"gap-3"}`,children:j?h.jsx(yj,{size:20}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"min-w-[20px] flex justify-center",children:h.jsx(gj,{size:20})}),h.jsx("span",{children:e("common.collapse")})]})}),h.jsxs("button",{onClick:()=>P(!0),className:"w-full flex items-center justify-center gap-2 px-3 py-2 mt-2 text-[10px] font-mono text-fg/30 hover:text-primary hover:bg-surface/30 rounded-lg transition-all group",title:e("shell.view_changelog"),children:[!j&&h.jsxs(h.Fragment,{children:[h.jsx(Bh,{size:12,className:"group-hover:text-primary transition-colors"}),h.jsxs("span",{children:["v","1.0.66"]})]}),j&&h.jsx(Bh,{size:14,className:"group-hover:text-primary transition-colors"})]})]})]}),h.jsxs("main",{className:"flex-1 flex flex-col p-4 gap-4 overflow-hidden relative",children:[o==="discovery"&&h.jsxs(h.Fragment,{children:[h.jsxs("header",{className:"flex justify-between items-center px-4 py-2",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-2xl font-bold",children:e("tabs.discovery")}),h.jsx("p",{className:"text-sm text-fg/50",children:e("setup.welcome_desc")})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("button",{onClick:()=>G(!0),className:"px-6 py-3 glass hover:bg-surface transition-colors flex items-center gap-2 text-sm font-medium",children:[h.jsx(oc,{size:16}),h.jsxs("div",{className:"flex flex-col items-start",children:[h.jsx("span",{children:e("discovery.sync_settings")}),h.jsx("span",{className:"text-[10px] text-fg/40 font-mono",children:T.sync_start_date?`${e("discovery.from")}: ${new Date(T.sync_start_date).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:T.last_sync_checkpoint?`${e("discovery.checkpoint")}: ${new Date(T.last_sync_checkpoint).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:e("discovery.all_time")})]})]}),h.jsxs("button",{onClick:O,disabled:B,className:"px-6 py-3 bg-gradient-to-r from-primary to-accent text-white font-bold rounded-xl shadow-lg glow-primary hover:scale-105 active:scale-95 transition-all flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:[h.jsx(Nc,{size:18,className:B?"animate-spin":""}),e(B?"discovery.syncing":"discovery.sync_history")]})]})]}),h.jsx(qL,{onOpenUrl:pe=>window.open(pe,"_blank","noopener,noreferrer"),onCopyText:pe=>{navigator.clipboard.writeText(pe)}})]}),o==="chat"&&h.jsx(xz,{}),o==="transmute"&&h.jsx(wz,{}),o==="engine"&&h.jsx(vL,{}),o==="account"&&h.jsx(EL,{}),o==="logs"&&h.jsx(DL,{initialState:ne}),h.jsx(wL,{isExpanded:Y,onToggle:()=>X(!Y),onNavigate:ve,liftUp:o==="chat"})]}),h.jsx(AL,{signal:N,onClose:()=>A(null)}),h.jsx(RL,{isOpen:$,onClose:()=>G(!1)}),h.jsx(vz,{isOpen:S,onClose:()=>P(!1)})]})})}):h.jsx(hL,{onAuthSuccess:()=>W(),isInitialized:w})}function xi({active:e,icon:t,label:n,onClick:r,collapsed:s}){return h.jsx("button",{onClick:r,title:s?n:"",className:`w-full flex items-center ${s?"justify-center":"gap-3"} px-4 py-3 rounded-xl transition-all ${e?"bg-primary/10 text-primary shadow-sm":"text-fg/60 hover:bg-surface hover:text-fg"}`,children:s?ta.cloneElement(t,{className:e?"text-primary":""}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"min-w-[20px] flex justify-center",children:ta.cloneElement(t,{className:e?"text-primary":""})}),h.jsx(Fe.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"font-semibold text-sm whitespace-nowrap",children:n})]})})}function jz(){Qe.interceptors.request.use(async e=>{try{const{data:{session:t}}=await oe.auth.getSession();t?.access_token&&(e.headers.Authorization=`Bearer ${t.access_token}`);const n=Ps();n&&(e.headers["x-supabase-url"]=n.url,e.headers["x-supabase-key"]=n.anonKey)}catch(t){console.error("[Axios] Error injecting headers:",t)}return e})}const{slice:Ez,forEach:Cz}=[];function Tz(e){return Cz.call(Ez.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Nz(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const o_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Az=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!o_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!o_.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},a_={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=Az(e,t,s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Rz={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return a_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&a_.create(n,e,r,s,o)}},Pz={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const c=o[a].indexOf("=");c>0&&o[a].substring(0,c)===t&&(n=o[a].substring(c+1))}}return n}},Oz={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(t){const a=o.split("&");for(let c=0;c<a.length;c++){const u=a[c].indexOf("=");u>0&&a[c].substring(0,u)===t&&(r=a[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let vi=null;const l_=()=>{if(vi!==null)return vi;try{if(vi=typeof window<"u"&&window.localStorage!==null,!vi)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{vi=!1}return vi};var Lz={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&l_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&l_()&&window.localStorage.setItem(n,e)}};let _i=null;const c_=()=>{if(_i!==null)return _i;try{if(_i=typeof window<"u"&&window.sessionStorage!==null,!_i)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{_i=!1}return _i};var Iz={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&c_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&c_()&&window.sessionStorage.setItem(n,e)}},Dz={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},Mz={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},zz={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Fz={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Qk=!1;try{document.cookie,Qk=!0}catch{}const Zk=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Qk||Zk.splice(1,1);const $z=()=>({order:Zk,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class e1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Tz(n,this.options||{},$z()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Rz),this.addDetector(Pz),this.addDetector(Lz),this.addDetector(Iz),this.addDetector(Dz),this.addDetector(Mz),this.addDetector(zz),this.addDetector(Fz),this.addDetector(Oz)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!Nz(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}e1.type="languageDetector";const Uz={save:"Save",cancel:"Cancel",loading:"Loading...",error:"Error",success:"Success",settings:"Settings",search:"Search",back:"Back",all:"All",delete:"Delete",update:"Update",edit:"Edit",close:"Close",complete:"Complete",skip:"Skip",begin:"Begin",connection:"Connection",setup:"Setup",project:"Project",account:"Account",logout:"Logout",welcome:"Welcome",dark_mode:"Dark Mode",light_mode:"Light Mode",collapse:"Collapse",just_now:"Just now",enabled:"Enabled",disabled:"Disabled",quick:"Quick (5)",balanced:"Balanced (50)",thorough:"Thorough (200)",resetting:"Resetting...",saving:"Saving...",locale_code:"en-US",categories:{ai_ml:"AI & ML",business:"Business",politics:"Politics",technology:"Technology",finance:"Finance",crypto:"Crypto",science:"Science",other:"Other"}},Bz={discovery:"Discovery",chat:"Chat",transmute:"Transmute",logs:"System Logs",history:"History"},Vz={welcome_title:"Assemble Your Engine",welcome_desc:"Alchemy requires a Supabase essence to store signal fragments and intelligence patterns.",requirements:"Requirements:",project_url:"Supabase Project URL",anon_key:"Anon Public API Key",db_password:"Database Password",project_url_placeholder:"https://xxx.supabase.co or project-id",anon_key_placeholder:"eyJ...",project_id_placeholder:"abcdefghijklm",access_token_placeholder:"sbp_...",begin_init:"BEGIN INITIALIZATION",connect_essence:"CONNECT ESSENCE",credentials_title:"Essence Coordinates",credentials_desc:"Link the alchemist engine to your cloud database",validating:"Validating Link",resonance:"Synchronizing Resonance...",init_schema:"Initialize Schema",schema_desc:"Run database migrations to set up required tables and functions.",project_id:"Project ID",access_token:"Access Token",run_migrations:"RUN MIGRATIONS",running_migrations:"Running Migrations",take_minute:"This may take a minute...",engine_aligned:"Engine Aligned",restarting:"Restarting Alchemist Subsystems...",forge_project:"Forge Project at Supabase",project_id_help:"Found in Supabase Dashboard → Project Settings → General",access_token_help:"Generate at",access_token_link:"supabase.com/dashboard/account/tokens",project_id_required:"Project ID is required",access_token_required:"Access token is required",migration_failed_logs:"Migration failed. Check logs for details.",stream_error:"Failed to read migration stream",back:"BACK",retry:"RETRY"},qz={title_init:"INITIALIZE MASTER",title_join:"JOIN THE CIRCLE",title_mystic:"MYSTIC ACCESS",title_login:"ALCHEMIST LOGIN",desc_init:"Forge the prime alchemist account",desc_mystic_email:"Enter your essence email",desc_mystic_code:"Transmute the sacred code",desc_login:"Transmute your data into intelligence",first_name:"First Name",last_name:"Last Name",first_name_placeholder:"Zosimos",last_name_placeholder:"Panopolis",email_address:"Email Address",email_placeholder:"alchemist@example.com",complexity_key:"Complexity Key",password_placeholder:"••••••••",init_account:"INITIALIZE ACCOUNT",send_code:"SEND CODE",unseal_engine:"UNSEAL ENGINE",verify_code:"VERIFY CODE",change_email:"Change email address",sign_in_code:"Sign in with Code",sign_in_password:"Sign in with Password",already_alchemist:"Already an Alchemist?",new_to_alchemy:"New to Alchemy?",login_instead:"Login instead",create_account:"Create an account",session_failed:"Failed to create session",invalid_code:"Invalid code"},Hz={filters:"Filters",category:"Category",intelligence_score:"Intelligence Score",no_signals_in_category:"No signals in {{category}} yet.",no_categories:"No categories yet.",discovery_hint:"Signals will be organized here once discovered.",loading_signals:"Loading signals...",dismiss_hint:"Dismiss (Not Interested)",signal_count_one:"{{count}} signal",signal_count_other:"{{count}} signals",time_min_ago:"{{count}}m ago",time_hour_ago:"{{count}}h ago",time_day_ago:"{{count}}d ago",add_note_title:"Add Note",target:"Target",note_placeholder:"Enter your thoughts, ideas, or action items regarding this signal...",save_note:"Save Note",view_all_sources:"View all sources",source_count_one:"{{count}} source",source_count_other:"{{count}} sources",source_found_in:"Found in {{count}} different sources",high_confidence:"High confidence - found in {{count}} sources",new_signals:"New Signals",smart_summary:"Smart Summary",entities:"Entities",sources:"Sources",last_sync:"Last Sync",syncnow:"Sync Now",all_time:"All time",checkpoint:"Checkpoint",from:"From",score_high:"HIGH",score_medium:"MEDIUM",score_low:"LOW",sources_count:"{{count}} sources",open_source:"Open",add_note:"Note",boost_topic:"Boost Topic",boosted:"Boosted",dismissed:"Dismissed",remove_favourite:"Remove from favourites",add_favourite:"Add to favourites",sync_history:"Sync History",syncing:"Syncing...",sync_settings:"Sync Settings",discovered:"Discovered",original_source:"Original Source",ai_summary:"AI Summary",full_content:"Full Content",copied:"Copied!",open_link:"Open",detail_title:"Signal Details",sync_from:"Sync From (Optional)",urls_per_sync:"URLs per Sync",sync_from_hint:"Leave empty to sync only new URLs since last sync (incremental). Set a date to process URLs from that point forward.",reset_checkpoint:"Reset Checkpoint",reset_checkpoint_hint:'Clear the sync checkpoint to force a full re-sync from your "Sync From" date',sync_info:'The Alchemist tracks your progress automatically. Use "Sync From" to backfill history or "Reset Checkpoint" to start fresh.',save_settings:"Save Settings",sync_saved:"Sync settings saved successfully",checkpoint_reset:"Checkpoint reset successfully",login_to_save:"Please log in to save settings",login_to_reset:"Please log in to reset checkpoint",status_updated:"Engine status updated to {{status}}",asset_ready:'Asset "{{title}}" is ready!',scanning:"Scanning for new categories and topics...",discovery_complete:"Engine discovery complete!",discovery_failed:"Discovery failed. Check settings.",load_failed:"Failed to load engines",starting_run:"Starting engine run...",run_complete:"Engine run complete! Created: {{title}}",run_started_desktop:"Engine run started on Desktop. Tracking as: {{id}}",run_failed:"Failed to run engine",brief_failed:"Failed to generate production brief",topic:"Topic",pipeline:"Pipeline"},Kz={history:"History",ask_anything:"Ask anything about your browsing history...",sources:"Sources",processing:"Processing your query...",new_chat:"New Chat",no_messages:"No messages yet. Start a conversation!",no_history:"No chat history yet.",title:"Ask Alchemist",desc:"I can help you recall information, summarize topics, and find insights from your browsing history.",thinking:"Exploring memory...",placeholder:"Ask about your history...",error_message:"Sorry, I encountered an error processing your request.",relevant_context:"Relevant Context",match_score:"{{score}}% Match",rag_attribution:"Alchemist used these {{count}} signals to answer",suggestions:{react:"What have I read about React recently?",ai:"Summarize the latest AI news I visited.",finance:"Do I have any notes on Finance?",performance:"Find articles about 'Performance'"}},Wz={engines:"Alchemist Engines",assets:"Generated Assets",newsletter:"Newsletter",thread:"Thread",audio:"Audio",report:"Report",title:"Transmute Engine",desc:"Active Generation Pipelines & Assets",generate:"Generate",processing_desktop:"Processing on Desktop...",ensure_defaults:"Ensure Default Engines",create_engine:"Create Engine",no_assets:"No assets generated yet.",generate_engines:"Generate Engines",new_engine:"New Engine",no_engines:"No Engines Configured",no_engines_desc:"Create your first pipeline to automatically turn signals into newsletters, threads, or audio briefs.",run_engine:"Run Engine",running:"Running...",last_run:"Last Run",never:"Never",schedule:"Schedule",manual:"Manual",topic:"Topic",pipeline:"Pipeline",pause:"Pause",resume:"Resume",view_json:"View Production Brief JSON",json_contract:"Stateless & Self-Contained Contract",json_desc:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio.",generating_asset:"Generating Asset...",queued_desktop:"Queued for Desktop...",desktop_processing:"The RealTimeX Desktop app is processing this request. This modal will update automatically once finished.",unsupported_type:"Unsupported asset type",edit_engine:"Edit Engine",engine_name:"Engine Name",type:"Type",status:"Status",execution_env:"Execution Environment",local_llm:"Local (Alchemy LLM)",desktop_swarm:"RealTimeX Desktop (Agent Swarm)",env_desc_desktop:"Delegates heavy tasks like Audio/Video to the desktop app.",env_desc_local:"Runs simple Markdown tasks directly in Alchemy.",min_score:"Min Score",max_signals:"Max Signals",category_filter:"Category Filter (multi-select)",multi_select_hint:"Hold Cmd/Ctrl to select multiple categories",schedule_hint:"Note: Scheduling is not yet automated",prompt_override:"Custom Prompt Override (optional)",prompt_placeholder:"Override the default prompt for this engine type...",delete_confirm:"Really delete?",confirm:"Confirm",copied_json:"JSON copied to clipboard",json_footer:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio."},Gz={title:"Account Configuration",desc:"Manage your Alchemist profile and essence links.",profile:"Profile",security:"Security",supabase:"Supabase",first_name:"First Name",last_name:"Last Name",email_locked:"Email Address (Locked)",sound_effects:"Sound Effects",sound_desc:"Enable audio feedback for sync events and signal discoveries.",sign_out:"Sign Out",logout_desc:"End your current session and return to the login screen.",preserve_profile:"Preserve Profile",security_title:"Update Entropy Key",new_password:"New Password",confirm_password:"Confirm Password",password_mismatch:"Complexity keys do not match.",password_too_short:"Entropy too low. Minimum 8 characters.",password_rotate_success:"Key rotation successful.",rotate_key:"Rotate Key",essence_resonance:"Essence Resonance",byok_desc:"Bring Your Own Keys (BYOK) for intelligence persistence.",established_link:"Established Link",env_notice:"Active from environment variables. UI override enabled.",realign_link:"Realign Link",sever_link:"Sever Link",sever_confirm:"Sever connection to this essence? This will reset local resonance.",anon_secret_fragment:"Anon Secret Fragment",no_resonance:"No Essence Resonance",no_resonance_desc:"The Alchemist requires a cloud core to store intelligence fragments.",initiate_link:"Initiate Link",test_connection:"Test Connection"},Jz={title:"System Logs",desc:"Detailed history of sync runs, sources, and URL processing",blacklist_suggestion:"Potential Blacklist",blacklist_desc:"Candidates for blocking",recent_errors:"Recent Errors",errors_desc:"Failed URL processes",total_signals:"Total Signals",signals_desc:"Successfully mined",blacklist_modal_title:"Blacklist Suggestions",blacklist_modal_desc:"Review domains suggested for blacklisting based on low scores.",no_suggestions:"No suggestions right now",quality_good:"Your signal quality looks good!",signals_count:"{{count}} signals",avg_score:"Avg Score: {{score}}",low_quality:"Consistently Low Quality",repetitive:"Repetitive Pattern",blacklist_domain:"Blacklist Domain",errors_modal_title:"Recent Errors",errors_modal_desc:"Log of recent failures and issues.",no_recent_errors:"No recent errors found.",signals_modal_title:"Found Signals",signals_modal_desc:"Browse and manage your mined signals history.",search_placeholder:"Search signals...",any_score:"Any Score",high_score:"High (80%+)",medium_score:"Medium (50-79%)",low_score:"Low (<50%)",all_categories:"All Categories",page_x:"Page {{page}}"},Xz={title:"Alchemist Engine",live:"LIVE",clear:"Clear",idle:"Idle. Awaiting signal mining events...",run_completed:"Mining Run Completed",signals:"Signals",urls:"URLs",skipped:"Skipped",failed_to_process:"{{count}} URLs failed to process",view_logs:"View Logs",hide_details:"Hide Details",view_details:"View Details",engine_log:"Live Engine Log",state_reading:"Reading",state_thinking:"Thinking",state_signal:"Signal",state_skipped:"Skipped",state_error:"Error",state_completed:"Completed",msg_reading:"Reading content from: {{url}}",msg_thinking:"Analyzing relevance of: {{title}}",msg_found_signal:"Found signal: {{summary}} ({{score}}%)",msg_low_signal:"Low signal stored for review ({{score}}%): {{title}}",msg_failed:"Analysis failed for {{title}}: {{error}}",msg_sync_completed:"Sync completed: {{signals}} signals found, {{skipped}} skipped, {{errors}} errors"},Yz={switch_light:"Switch to Light Mode",switch_dark:"Switch to Dark Mode",view_changelog:"View Changelog",release_notes:"Release Notes",changelog_error:"Failed to load changelog."},Qz={title:"Signal Pulse",mining:"Mining",standing_by:"Standing by",idle:"Idle",tracked:"Signals tracked",avg_score:"Average score",top_signal:"Top signal",latest:"Latest",awaiting:"Awaiting mining",no_signals:"No signals yet"},Zz={title:"Intelligence Engine",subtitle:"Fine-tune the Alchemist's cognitive parameters and provider links.",configuration:"AI Configuration",test_connection:"Test Connection",save_config:"Save Configuration",llm_provider:"LLM Provider",embedding_provider:"Embedding Provider",sdk_connected:"SDK Connected",sdk_not_available:"SDK Not Available",provider:"Provider",intelligence_model:"Intelligence Model",embedding_model:"Embedding Model",loading_providers:"Loading providers...",sdk_info_success:"✓ Using RealTimeX configured provider",sdk_info_fail:"⚠️ RealTimeX SDK not detected. Configure in RealTimeX Desktop.",embedding_info_success:"✓ Embeddings are generated using your RealTimeX configured provider",embedding_info_fail:"⚠️ RealTimeX SDK not detected. Configure providers in RealTimeX Desktop.",persona_title:"Persona Memory",save_memory:"Save Memory",interests_title:"Active Interests",interests_priority:"High Priority",interests_desc:"The Alchemist prioritizes content matching these topics. Updated automatically based on Favorites & Boosts.",interests_placeholder:"e.g. User focuses on React performance, Rust backend systems, and AI Agent architecture...",antipatterns_title:"Anti-Patterns",antipatterns_priority:"Avoid",antipatterns_desc:"The Alchemist filters out or scores down content matching these patterns. Updated via Dismissals.",antipatterns_placeholder:"e.g. Dislikes marketing fluff, generic listicles, and crypto hype...",browser_sources:"Browser History Sources",save_browser:"Save Browser Sources",blacklist_title:"Blacklist Domains",blacklist_desc:"URLs containing these patterns will be skipped during mining. Enter one pattern per line.",blacklist_label:"Domain Patterns (one per line)",blacklist_placeholder:`google.com/search
|
|
134
|
+
${n("shell.changelog_error")}`)}finally{a(!1)}};return h.jsx(Pt,{children:e&&h.jsxs(h.Fragment,{children:[h.jsx(Fe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50"}),h.jsx(Fe.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{type:"spring",damping:25,stiffness:300},className:"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none",children:h.jsxs("div",{className:"glass w-full max-w-3xl max-h-[80vh] overflow-hidden pointer-events-auto shadow-2xl",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(d_,{size:24,className:"text-primary"}),h.jsx("h2",{className:"text-xl font-bold",children:n("shell.release_notes")})]}),h.jsx("button",{onClick:t,className:"p-2 hover:bg-surface rounded-lg transition-colors",children:h.jsx(Cn,{size:20,className:"text-fg/60"})})]}),h.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar max-h-[calc(80vh-88px)]",children:o?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent"})}):h.jsx(Gp,{components:{h1:({children:u})=>h.jsx("h1",{className:"text-2xl font-bold text-fg mb-6 mt-0",children:u}),h2:({children:u})=>h.jsx("h2",{className:"text-xl font-bold text-fg mt-8 mb-3 pb-2 border-b border-border first:mt-0",children:u}),h3:({children:u})=>h.jsx("h3",{className:"text-lg font-bold text-primary mt-6 mb-2",children:u}),p:({children:u})=>h.jsx("p",{className:"text-sm text-fg/70 mb-3 leading-relaxed",children:u}),ul:({children:u})=>h.jsx("ul",{className:"list-none space-y-1 mb-4 ml-0",children:u}),li:({children:u})=>h.jsx("li",{className:"text-sm text-fg/80 ml-4 mb-1 before:content-['•'] before:mr-2 before:text-primary",children:u}),a:({href:u,children:f})=>h.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline transition-colors",children:f}),code:({children:u})=>h.jsx("code",{className:"bg-surface/50 text-accent px-1.5 py-0.5 rounded text-xs font-mono border border-border",children:u}),strong:({children:u})=>h.jsx("strong",{className:"font-bold text-fg",children:u})},children:r})})]})})]})})}function _z({asset:e,onClose:t}){const{t:n}=Ze(),r=()=>{e.content&&navigator.clipboard.writeText(e.content)},s=()=>{if(!e.content)return;const o=new Blob([e.content],{type:"text/markdown"}),a=URL.createObjectURL(o),c=document.createElement("a");c.href=a,c.download=`${e.title.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.md`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(a)};return h.jsx(Pt,{children:e&&h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",children:h.jsxs(Fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-bg rounded-3xl shadow-2xl w-full max-w-4xl max-h-[85vh] flex flex-col overflow-hidden border border-border",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border bg-surface/50",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 rounded-2xl bg-primary/10 text-primary shadow-inner",children:e.type==="audio"?h.jsx(Uh,{className:"w-6 h-6"}):h.jsx(Li,{className:"w-6 h-6"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-black italic tracking-tighter uppercase text-xl text-fg",children:e.title}),h.jsxs("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest mt-0.5",children:[new Date(e.created_at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"})," • ",n("discovery.sources_count",{count:e.metadata?.source_signal_count||0})]})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:r,className:"p-2.5 text-fg/40 hover:text-primary hover:bg-primary/10 rounded-xl transition-all",title:"Copy Content",children:h.jsx(Df,{className:"w-5 h-5"})}),h.jsx("button",{onClick:s,className:"p-2.5 text-fg/40 hover:text-primary hover:bg-primary/10 rounded-xl transition-all",title:"Download File",children:h.jsx(Fh,{className:"w-5 h-5"})}),h.jsx("div",{className:"w-px h-8 bg-border mx-2"}),h.jsx("button",{onClick:t,className:"p-2.5 text-fg/40 hover:text-error hover:bg-error/10 rounded-xl transition-all",children:h.jsx(Cn,{className:"w-6 h-6"})})]})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-8 bg-bg custom-scrollbar",children:e.status&&e.status!=="completed"?h.jsxs("div",{className:"flex flex-col items-center justify-center h-80 gap-6",children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse"}),h.jsx(Rt,{className:"w-16 h-16 animate-spin text-primary relative z-10"})]}),h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("h4",{className:"text-xl font-black italic tracking-tighter uppercase text-fg",children:e.status==="processing"?n("transmute.generating_asset"):n("transmute.queued_desktop")}),h.jsx("p",{className:"text-xs text-fg/40 font-mono uppercase tracking-widest max-w-xs mx-auto",children:n("transmute.desktop_processing")})]})]}):e.type==="markdown"?h.jsx("div",{className:"prose prose-invert prose-headings:font-black prose-headings:italic prose-headings:tracking-tighter prose-headings:uppercase prose-p:text-fg/80 prose-li:text-fg/80 prose-strong:text-primary max-w-none",children:h.jsx(Gp,{children:e.content||""})}):e.type==="audio"?h.jsxs("div",{className:"flex flex-col items-center justify-center h-80 gap-8",children:[h.jsx("div",{className:"w-24 h-24 rounded-3xl bg-primary/10 flex items-center justify-center animate-pulse shadow-xl border border-primary/20",children:h.jsx(Uh,{className:"w-10 h-10 text-primary"})}),h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-xs text-fg/40 font-mono uppercase tracking-widest mb-6",children:n("transmute.unsupported_type")}),h.jsxs("audio",{controls:!0,className:"w-80 h-12 rounded-xl bg-surface border border-border",children:[h.jsx("source",{src:e.content||"",type:"audio/mpeg"}),"Your browser does not support the audio element."]})]})]}):h.jsx("div",{className:"text-fg/20 text-center py-20 font-mono italic",children:"Unsupported asset type"})})]})})})}function i_({engine:e,onClose:t,onSave:n,onDelete:r}){const{t:s}=Ze(),{showToast:o}=Wc(),[a,c]=R.useState({title:"",type:"newsletter",status:"active",config:{schedule:"",min_score:70,categories:[],custom_prompt:"",max_signals:10,execution_mode:"local"}}),[u,f]=R.useState(!1);R.useEffect(()=>{e&&c({title:e.title,type:e.type,status:e.status,config:{schedule:e.config.schedule||"",min_score:e.config.filters?.min_score||70,categories:Array.isArray(e.config.category)?e.config.category:e.config.category?[e.config.category]:[],custom_prompt:e.config.custom_prompt||"",max_signals:e.config.max_signals||10,execution_mode:e.config.execution_mode||"local"}})},[e]);const p=async()=>{try{const v={title:a.title,type:a.type,status:a.status,config:{schedule:a.config.schedule,filters:{min_score:a.config.min_score,category:a.config.category},custom_prompt:a.config.custom_prompt,max_signals:a.config.max_signals,execution_mode:a.config.execution_mode}};if(e){const{data:b,error:w}=await oe.from("engines").update(v).eq("id",e.id).select().single();if(w)throw w;n(b),o("Engine updated successfully","success")}else{const{data:{user:b}}=await oe.auth.getUser();if(!b)throw new Error("Not authenticated");const{data:w,error:k}=await oe.from("engines").insert({...v,user_id:b.id}).select().single();if(k)throw k;n(w),o("Engine created successfully","success")}t()}catch(v){console.error("Save error:",v),o(v.message||"Failed to save engine","error")}},g=async()=>{if(!(!e||!r))try{const{error:v}=await oe.from("engines").delete().eq("id",e.id);if(v)throw v;r(e.id),o("Engine deleted","success"),t()}catch(v){o(v.message||"Failed to delete engine","error")}},y=()=>{f(!1),t()};return!e&&!t?null:h.jsx(Pt,{children:h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",children:h.jsxs(Fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-bg rounded-3xl shadow-2xl w-full max-w-2xl max-h-[85vh] flex flex-col overflow-hidden border border-border",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border bg-surface/50",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-xl font-black italic tracking-tighter uppercase text-fg",children:s(e?"transmute.edit_engine":"transmute.create_engine")}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-[0.2em]",children:s("transmute.configure_pipeline")})]}),h.jsx("button",{onClick:y,className:"p-2 text-fg/40 hover:text-error hover:bg-error/10 rounded-xl transition-all",children:h.jsx(Cn,{className:"w-6 h-6"})})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-8 custom-scrollbar",children:[h.jsxs("div",{className:"space-y-6",children:[h.jsx(vr,{label:s("transmute.engine_name"),children:h.jsx("input",{type:"text",value:a.title,onChange:v=>c({...a,title:v.target.value}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg placeholder:text-fg/20 focus:border-primary/50 outline-none transition-all text-sm",placeholder:"e.g., Daily Tech Brief"})}),h.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[h.jsx(vr,{label:s("transmute.type"),children:h.jsxs("select",{value:a.type,onChange:v=>c({...a,type:v.target.value}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm appearance-none cursor-pointer",children:[h.jsx("option",{value:"newsletter",children:s("transmute.newsletter")}),h.jsx("option",{value:"thread",children:s("transmute.thread")}),h.jsx("option",{value:"audio",children:"Audio Brief"}),h.jsx("option",{value:"report",children:"Report"})]})}),h.jsx(vr,{label:s("transmute.status"),children:h.jsxs("select",{value:a.status,onChange:v=>c({...a,status:v.target.value}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm appearance-none cursor-pointer",children:[h.jsx("option",{value:"active",children:s("common.status_active")}),h.jsx("option",{value:"paused",children:s("common.status_paused")}),h.jsx("option",{value:"draft",children:"Draft"})]})})]}),h.jsxs(vr,{label:s("transmute.execution_env"),children:[h.jsxs("select",{value:a.config.execution_mode,onChange:v=>c({...a,config:{...a.config,execution_mode:v.target.value}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm appearance-none cursor-pointer",children:[h.jsx("option",{value:"local",children:s("transmute.local_llm")}),h.jsx("option",{value:"desktop",children:s("transmute.desktop_swarm")})]}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono uppercase mt-2 leading-relaxed",children:a.config.execution_mode==="desktop"?s("transmute.env_desc_desktop"):s("transmute.env_desc_local")})]})]}),h.jsxs("div",{className:"space-y-6 pt-6 border-t border-border/10",children:[h.jsx("h4",{className:"text-xs font-bold uppercase tracking-[0.2em] text-primary/60",children:"Signal Filters"}),h.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[h.jsx(vr,{label:s("transmute.min_score"),children:h.jsx("input",{type:"number",min:"0",max:"100",value:a.config.min_score,onChange:v=>c({...a,config:{...a.config,min_score:parseInt(v.target.value)||0}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm"})}),h.jsx(vr,{label:s("transmute.max_signals"),children:h.jsx("input",{type:"number",min:"1",max:"50",value:a.config.max_signals,onChange:v=>c({...a,config:{...a.config,max_signals:parseInt(v.target.value)||10}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm"})})]}),h.jsxs(vr,{label:s("transmute.category_filter"),children:[h.jsxs("select",{multiple:!0,value:a.config.categories,onChange:v=>{const b=Array.from(v.target.selectedOptions,w=>w.value);c({...a,config:{...a.config,categories:b}})},className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg focus:border-primary/50 outline-none transition-all text-sm min-h-[120px] custom-scrollbar",children:[h.jsx("option",{value:"AI & ML",children:"AI & ML"}),h.jsx("option",{value:"Technology",children:"Technology"}),h.jsx("option",{value:"Business",children:"Business"}),h.jsx("option",{value:"Finance",children:"Finance"}),h.jsx("option",{value:"Science",children:"Science"}),h.jsx("option",{value:"Politics",children:"Politics"})]}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono mt-2",children:s("transmute.multi_select_hint")})]})]}),h.jsx("div",{className:"pt-6 border-t border-border/10",children:h.jsxs(vr,{label:`${s("transmute.schedule")} (${s("common.optional")})`,children:[h.jsx("input",{type:"text",value:a.config.schedule,onChange:v=>c({...a,config:{...a.config,schedule:v.target.value}}),className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg placeholder:text-fg/20 focus:border-primary/50 outline-none transition-all text-sm",placeholder:"e.g., Daily @ 9am, Manual"}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono mt-2",children:s("transmute.schedule_hint")})]})}),h.jsx("div",{className:"pt-6 border-t border-border/10",children:h.jsx(vr,{label:s("transmute.prompt_override"),children:h.jsx("textarea",{value:a.config.custom_prompt,onChange:v=>c({...a,config:{...a.config,custom_prompt:v.target.value}}),rows:5,className:"w-full px-4 py-3 rounded-xl border border-border bg-surface text-fg placeholder:text-fg/20 focus:border-primary/50 outline-none transition-all text-sm resize-none custom-scrollbar",placeholder:s("transmute.prompt_placeholder")})})})]}),h.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-border bg-surface/50",children:[e&&r?u?h.jsxs("div",{className:"flex items-center gap-4 bg-error/5 border border-error/20 px-4 py-2 rounded-2xl animate-in fade-in slide-in-from-left-2 transition-all",children:[h.jsx("span",{className:"text-xs text-error font-bold uppercase tracking-widest",children:s("transmute.delete_confirm")}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:g,className:"px-4 py-2 bg-error text-white text-[10px] font-bold uppercase tracking-widest rounded-xl hover:bg-error/80 transition-all shadow-lg shadow-error/20",children:s("transmute.confirm")}),h.jsx("button",{onClick:()=>f(!1),className:"px-4 py-2 bg-surface border border-border text-fg/40 text-[10px] font-bold uppercase tracking-widest rounded-xl hover:bg-bg transition-all",children:s("common.cancel")})]})]}):h.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-2 px-6 py-3 text-error/60 hover:text-error hover:bg-error/10 rounded-2xl transition-all font-bold text-xs uppercase tracking-widest",children:[h.jsx(Ff,{className:"w-5 h-5"}),s("common.delete")]}):h.jsx("div",{}),h.jsxs("div",{className:"flex gap-4",children:[h.jsx("button",{onClick:y,className:"px-6 py-3 text-fg/40 font-bold text-xs uppercase tracking-widest hover:text-fg hover:bg-surface rounded-2xl transition-all",children:s("common.cancel")}),h.jsxs("button",{onClick:p,className:"flex items-center gap-2 px-8 py-3 bg-gradient-to-r from-primary to-accent text-white rounded-2xl font-bold text-xs uppercase tracking-widest hover:scale-105 active:scale-95 transition-all shadow-lg glow-primary",children:[h.jsx(br,{className:"w-5 h-5"}),s("common.save")]})]})]})]})})})}function vr({label:e,children:t}){return h.jsxs("div",{className:"space-y-2",children:[h.jsx("label",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-fg/30 ml-1",children:e}),t]})}const bz=({engine:e,onRun:t,onEdit:n,onToggle:r,onViewBrief:s,isLoading:o})=>{const{t:a}=Ze(),c=!!e.config.tag,u={newsletter:c?h.jsx(Mf,{className:"w-5 h-5 text-blue-500"}):h.jsx(Li,{className:"w-5 h-5 text-emerald-500"}),thread:h.jsx(nn,{className:"w-5 h-5 text-blue-500"}),audio:h.jsx(Uh,{className:"w-5 h-5 text-purple-500"}),report:h.jsx(oc,{className:"w-5 h-5 text-orange-500"})};return h.jsxs(Fe.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:`p-5 rounded-2xl border transition-all hover:shadow-lg group ${e.status==="active"?"bg-surface border-border shadow-sm":"bg-surface/30 border-dashed border-border opacity-70"}`,children:[h.jsxs("div",{className:"flex justify-between items-start mb-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"p-2 rounded-xl bg-bg border border-border/10",children:u[e.type]||h.jsx(Li,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-bold text-fg tracking-tight",children:e.title}),h.jsxs("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest",children:[c?a("transmute.topic"):a(`transmute.${e.type}`,e.type)," ",a("transmute.pipeline")]})]})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx("button",{onClick:()=>r(e.id,e.status),className:"p-1.5 rounded-lg hover:bg-bg text-fg/40 hover:text-fg transition-colors",children:e.status==="active"?h.jsx(Oj,{className:"w-4 h-4"}):h.jsx(Gy,{className:"w-4 h-4"})}),h.jsx("button",{onClick:()=>s(e.id),title:a("transmute.view_json"),className:"p-1.5 rounded-lg hover:bg-bg text-fg/40 hover:text-fg transition-colors",children:h.jsx(p_,{className:"w-4 h-4"})}),h.jsx("button",{onClick:()=>n(e.id),className:"p-1.5 rounded-lg hover:bg-bg text-fg/40 hover:text-fg transition-colors",children:h.jsx(oc,{className:"w-4 h-4"})})]})]}),h.jsxs("div",{className:"space-y-2 mb-4",children:[h.jsxs("div",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest flex justify-between",children:[h.jsx("span",{children:a("transmute.last_run")}),h.jsx("span",{className:"text-fg/60",children:e.last_run_at?new Date(e.last_run_at).toLocaleDateString(a("common.locale_code")):a("transmute.never")})]}),h.jsxs("div",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest flex justify-between",children:[h.jsx("span",{children:a("transmute.schedule")}),h.jsx("span",{className:"text-fg/60",children:e.config.schedule||a("transmute.manual")})]})]}),h.jsxs("button",{onClick:()=>t(e.id),disabled:o||e.status!=="active",className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl bg-gradient-to-r from-primary to-primary/80 text-white font-bold shadow-lg glow-primary hover:scale-[1.02] active:scale-95 disabled:opacity-50 disabled:hover:scale-100 transition-all text-sm uppercase tracking-widest",children:[o?h.jsx(Rt,{className:"w-4 h-4 animate-spin"}):h.jsx(Gy,{className:"w-4 h-4"}),a(o?"transmute.running":"transmute.run_engine")]})]})};function wz(){const{t:e}=Ze(),[t,n]=R.useState([]),[r,s]=R.useState(!0),[o,a]=R.useState(new Set),[c,u]=R.useState(null),[f,p]=R.useState(null),[g,y]=R.useState(!1),[v,b]=R.useState(null),[w,k]=R.useState(!1),[j,C]=R.useState(!1),{showToast:S}=Wc();R.useEffect(()=>{(async()=>N())();const K=oe.channel("asset-updates").on("postgres_changes",{event:"UPDATE",schema:"public",table:"assets"},te=>{const ne=te.new;u(J=>J?.id===ne.id?ne:J),ne.status==="completed"&&te.old.status!=="completed"&&S(e("transmute.asset_ready",{title:ne.title}),"success")}).subscribe();return()=>{oe.removeChannel(K)}},[]);const P=async()=>{if(!j)try{C(!0),S(e("transmute.scanning"),"info");const{data:{session:H}}=await oe.auth.getSession(),K=Ps(),te={"Content-Type":"application/json","x-user-id":H?.user?.id||""};if(H?.access_token&&(te.Authorization=`Bearer ${H.access_token}`),K&&(te["x-supabase-url"]=K.url,te["x-supabase-key"]=K.anonKey),!(await fetch("/api/engines/ensure-defaults",{method:"POST",headers:te})).ok)throw new Error("Failed to generate engines");S(e("transmute.discovery_complete"),"success"),await N()}catch(H){console.error("Failed to generate engines:",H),S(e("transmute.discovery_failed"),"error")}finally{C(!1)}},N=async()=>{try{s(!0);const{data:{user:H}}=await oe.auth.getUser();if(!H)return;const{data:K,error:te}=await oe.from("engines").select("*").eq("user_id",H.id).order("created_at",{ascending:!1});if(te)throw te;n(K)}catch(H){console.error("Error fetching engines:",H),S(e("transmute.load_failed"),"error")}finally{s(!1)}},A=async H=>{if(!o.has(H))try{a(D=>new Set(D).add(H)),S(e("transmute.starting_run"),"info");const{data:{session:K}}=await oe.auth.getSession(),te=K?.access_token,ne=Ps(),J={"Content-Type":"application/json","x-user-id":K?.user?.id||""};te&&(J.Authorization=`Bearer ${te}`),ne&&(J["x-supabase-url"]=ne.url,J["x-supabase-key"]=ne.anonKey);const le=await fetch(`/api/engines/${H}/run`,{method:"POST",headers:J});if(!le.ok){const D=await le.json();throw new Error(D.error||"Run failed")}const T=await le.json();T.status==="completed"?S(e("transmute.run_complete",{title:T.title}),"success"):S(e("transmute.run_started_desktop",{id:T.id}),"info"),u(T),n(D=>D.map(W=>W.id===H?{...W,last_run_at:new Date().toISOString()}:W))}catch(K){console.error("Engine run error:",K),S(K.message||e("transmute.run_failed"),"error")}finally{a(K=>{const te=new Set(K);return te.delete(H),te})}},$=async H=>{try{y(!0);const{data:{session:K}}=await oe.auth.getSession(),te=Ps(),ne={"Content-Type":"application/json","x-user-id":K?.user?.id||""};K?.access_token&&(ne.Authorization=`Bearer ${K.access_token}`),te&&(ne["x-supabase-url"]=te.url,ne["x-supabase-key"]=te.anonKey);const J=await fetch(`/api/engines/${H}/brief`,{headers:ne});if(!J.ok)throw new Error("Failed to fetch brief");const le=await J.json();p(le)}catch{S(e("transmute.brief_failed"),"error")}finally{y(!1)}},G=async(H,K)=>{const te=K==="active"?"paused":"active";n(ne=>ne.map(J=>J.id===H?{...J,status:te}:J));try{const{error:ne}=await oe.from("engines").update({status:te}).eq("id",H);if(ne)throw ne;S(e("transmute.status_updated",{status:te}),"success")}catch{n(J=>J.map(le=>le.id===H?{...le,status:K}:le)),S(e("common.error"),"error")}},B=()=>{k(!0)},L=H=>{const K=t.find(te=>te.id===H);K&&b(K)},Y=H=>{n(K=>K.find(ne=>ne.id===H.id)?K.map(ne=>ne.id===H.id?H:ne):[H,...K])},X=H=>{n(K=>K.filter(te=>te.id!==H))},de=()=>{b(null),k(!1)};return h.jsxs("div",{className:"h-full flex flex-col bg-bg",children:[h.jsx("div",{className:"flex-none p-6 border-b border-border bg-bg/50 backdrop-blur-sm z-10 sticky top-0",children:h.jsxs("div",{className:"flex justify-between items-center max-w-7xl mx-auto w-full",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-2xl font-black italic tracking-tighter bg-clip-text text-transparent bg-gradient-to-r from-primary to-accent",children:e("transmute.title")}),h.jsx("p",{className:"text-xs text-fg/40 font-mono uppercase tracking-widest mt-1",children:e("transmute.desc")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("button",{onClick:P,disabled:j,className:"flex items-center gap-2 px-4 py-2.5 bg-primary/10 text-primary border border-primary/20 rounded-xl font-bold text-xs uppercase tracking-widest hover:bg-primary/20 transition-all disabled:opacity-50",children:[j?h.jsx(Rt,{className:"w-4 h-4 animate-spin"}):h.jsx(nn,{className:"w-4 h-4"}),e("transmute.generate_engines")]}),h.jsxs("button",{onClick:B,className:"flex items-center gap-2 px-4 py-2.5 bg-gradient-to-r from-primary to-accent text-white rounded-xl font-bold text-xs uppercase tracking-widest hover:scale-105 transition-all shadow-lg glow-primary",children:[h.jsx(zf,{className:"w-4 h-4"}),e("transmute.new_engine")]})]})]})}),h.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:h.jsx("div",{className:"max-w-7xl mx-auto w-full",children:r?h.jsx("div",{className:"flex items-center justify-center h-64",children:h.jsx(Rt,{className:"w-8 h-8 animate-spin text-purple-500"})}):t.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center h-96 text-center",children:[h.jsx("div",{className:"w-16 h-16 rounded-3xl bg-surface border border-border flex items-center justify-center mb-6 shadow-xl",children:h.jsx(nn,{className:"w-8 h-8 text-fg/20"})}),h.jsx("h3",{className:"text-xl font-black italic tracking-tighter uppercase text-fg",children:e("transmute.no_engines")}),h.jsx("p",{className:"text-xs text-fg/40 font-mono tracking-widest uppercase max-w-sm mt-2 mb-8",children:e("transmute.no_engines_desc")}),h.jsx("button",{onClick:B,className:"px-8 py-3 rounded-xl border border-border bg-surface hover:bg-bg text-xs font-bold uppercase tracking-widest transition-all shadow-sm",children:e("transmute.create_engine")})]}):h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:h.jsx(Pt,{children:t.map(H=>h.jsx(bz,{engine:H,onRun:A,onEdit:L,onToggle:G,onViewBrief:$,isLoading:o.has(H.id)},H.id))})})})}),h.jsx(Pt,{children:f&&h.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-md",children:h.jsxs(Fe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-bg rounded-3xl shadow-2xl w-full max-w-4xl max-h-[85vh] flex flex-col overflow-hidden border border-border",children:[h.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border bg-surface/50",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"p-3 rounded-2xl bg-primary/10 text-primary",children:h.jsx(p_,{className:"w-6 h-6"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-black italic tracking-tighter uppercase text-lg text-fg",children:e("transmute.view_json")}),h.jsx("p",{className:"text-[10px] text-fg/40 font-mono uppercase tracking-widest",children:e("transmute.json_contract")})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),S(e("transmute.copied_json"),"info")},className:"p-2 text-fg/40 hover:text-primary hover:bg-primary/10 rounded-xl transition-all",children:h.jsx(Df,{className:"w-4 h-4"})}),h.jsx("button",{onClick:()=>p(null),className:"p-2 text-fg/40 hover:text-error hover:bg-error/10 rounded-xl transition-all",children:h.jsx(Cn,{className:"w-5 h-5"})})]})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-6 bg-surface/30 font-mono text-sm custom-scrollbar",children:h.jsx("pre",{className:"text-primary leading-relaxed",children:JSON.stringify(f,null,2)})}),h.jsx("div",{className:"p-4 border-t border-border bg-surface/50 text-[9px] text-fg/30 font-mono uppercase tracking-[0.2em] text-center",children:e("transmute.json_footer")})]})})}),g&&h.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/20 backdrop-blur-sm",children:h.jsx(Rt,{className:"w-10 h-10 animate-spin text-white"})}),h.jsx(_z,{asset:c,onClose:()=>u(null)}),v&&h.jsx(i_,{engine:v,onClose:de,onSave:Y,onDelete:X}),w&&h.jsx(i_,{engine:null,onClose:de,onSave:Y})]})}class kz{audioContext=null;enabled=!0;constructor(){}getAudioContext(){return this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.audioContext}setEnabled(t){this.enabled=t}isEnabled(){return this.enabled}playTone(t,n,r=.3){if(this.enabled)try{const s=this.getAudioContext(),o=s.createOscillator(),a=s.createGain();o.connect(a),a.connect(s.destination),o.frequency.value=t,o.type="sine",a.gain.setValueAtTime(r,s.currentTime),a.gain.exponentialRampToValueAtTime(.01,s.currentTime+n),o.start(s.currentTime),o.stop(s.currentTime+n)}catch(s){console.warn("[Sound] Failed to play tone:",s)}}playSequence(t,n=.3){if(!this.enabled)return;let r=0;t.forEach(s=>{setTimeout(()=>{this.playTone(s.freq,s.duration,n)},r),r+=s.delay})}syncStart(){this.playSequence([{freq:261.63,duration:.15,delay:0},{freq:329.63,duration:.15,delay:100},{freq:392,duration:.2,delay:100}],.2)}signalFound(){this.playSequence([{freq:392,duration:.1,delay:0},{freq:523.25,duration:.15,delay:80}],.25)}syncComplete(){this.playSequence([{freq:261.63,duration:.12,delay:0},{freq:329.63,duration:.12,delay:80},{freq:392,duration:.12,delay:80},{freq:523.25,duration:.2,delay:80}],.2)}error(){this.playSequence([{freq:329.63,duration:.15,delay:0},{freq:261.63,duration:.2,delay:100}],.3)}click(){this.playTone(440,.05,.15)}}const Fo=new kz;function Sz(){const{t:e}=Ze(),[t,n]=R.useState([]),[r,s]=R.useState([]),[o,a]=R.useState("discovery"),[c,u]=R.useState(!1),[f,p]=R.useState(null),[g,y]=R.useState(!0),[v,b]=R.useState(!m0),[w,k]=R.useState(!0),[j,C]=R.useState(!1),[S,P]=R.useState(!1),[N,A]=R.useState(null),[$,G]=R.useState(!1),[B,L]=R.useState(!1),[Y,X]=R.useState(!1),[de,H]=R.useState(!0),[K,te]=R.useState(()=>localStorage.getItem("theme")||"dark"),[ne,J]=R.useState(null),le=R.useRef(null);R.useMemo(()=>{const pe=r.length;let ge=0,Te=0,fe=null;for(const _t of r){ge+=_t.score,_t.score>Te&&(Te=_t.score);const Yn=new Date(_t.date);(!fe||Yn>new Date(fe.date))&&(fe=_t)}const $e=pe?Math.round(ge/pe):0,rt=fe?new Date(fe.date):null;return{total:pe,average:$e,top:Te,latestTimestamp:rt,latestTitle:fe?.title??fe?.category??null}},[r]),R.useEffect(()=>{(async()=>{if(!m0){b(!0),y(!1);return}try{const{data:Te,error:fe}=await oe.from("init_state").select("is_initialized").single();fe?(console.warn("[App] Init check error (might be fresh DB):",fe),fe.code==="42P01"&&k(!1)):k(Te.is_initialized>0);const{data:{session:$e}}=await oe.auth.getSession();p($e?.user??null)}catch(Te){console.error("[App] Status check failed:",Te)}finally{y(!1)}})();const{data:{subscription:ge}}=oe.auth.onAuthStateChange((Te,fe)=>{p(fe?.user??null)});return()=>ge.unsubscribe()},[]),R.useEffect(()=>{document.documentElement.setAttribute("data-theme",K),localStorage.setItem("theme",K)},[K]);const[T,D]=R.useState({});R.useEffect(()=>{(async()=>{if(!f)return;const{data:ge}=await oe.from("alchemy_settings").select("sync_start_date, last_sync_checkpoint").eq("user_id",f.id).maybeSingle();ge&&D(ge)})()},[f,$]),R.useEffect(()=>{if(!f)return;(async()=>{const{data:Te}=await oe.from("alchemy_settings").select("sound_enabled").eq("user_id",f.id).maybeSingle();if(Te){const fe=Te.sound_enabled??!0;H(fe),Fo.setEnabled(fe)}})();const ge=oe.channel("processing_events").on("postgres_changes",{event:"INSERT",schema:"public",table:"processing_events",filter:`user_id=eq.${f.id}`},Te=>{const fe=Te.new;fe.agent_state==="Mining"&&!B&&(L(!0),X(!0),de&&Fo.syncStart()),fe.agent_state==="Signal"&&de&&Fo.signalFound(),fe.agent_state==="Completed"&&(L(!1),de&&(fe.metadata?.errors>0?Fo.error():Fo.syncComplete()),setTimeout(()=>{X(!1)},5e3),W())}).subscribe();return()=>{oe.removeChannel(ge)}},[f,B,de]),R.useEffect(()=>{const pe=new EventSource("/events");return pe.onmessage=ge=>{const Te=JSON.parse(ge.data);Te.type==="history"?n(fe=>[...Te.data,...fe].slice(0,100)):n(fe=>[Te,...fe].slice(0,100))},W(),()=>pe.close()},[f]),R.useEffect(()=>{le.current&&le.current.scrollIntoView({behavior:"smooth"})},[t]);const W=async()=>{try{if(f){const{data:ge,error:Te}=await oe.from("signals").select("*").order("created_at",{ascending:!1});if(!Te&&ge){s(ge.map(fe=>({id:fe.id,title:fe.title,score:fe.score,summary:fe.summary,date:fe.created_at,category:fe.category,entities:fe.entities})));return}}const pe=await Qe.get("/api/signals");s(pe.data)}catch(pe){console.error("Failed to fetch signals",pe)}},O=async()=>{u(!0);try{await Qe.post("/api/mine"),W()}catch(pe){console.error("Mining failed:",pe)}finally{u(!1)}},ve=(pe,ge)=>{pe==="logs"?(J(ge),a("logs")):a(pe)};return g?h.jsx("div",{className:"flex items-center justify-center h-screen bg-bg",children:h.jsx("div",{className:"w-12 h-12 border-4 border-primary/20 border-t-primary rounded-full animate-spin"})}):v?h.jsx(Uw,{onComplete:()=>b(!1)}):f?h.jsx(gL,{children:h.jsx(_L,{children:h.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-bg text-fg",children:[h.jsxs(Fe.aside,{animate:{width:j?72:240},className:"glass m-4 mr-0 flex flex-col relative",children:[h.jsxs("div",{className:`px-4 py-3 pb-4 flex items-center gap-3 ${j?"justify-center":""}`,children:[h.jsx("div",{className:"w-10 h-10 min-w-[40px] bg-gradient-to-br from-primary to-accent rounded-xl flex items-center justify-center shadow-lg glow-primary",children:h.jsx(nn,{className:"text-white fill-current",size:24})}),!j&&h.jsx(Fe.h1,{initial:{opacity:0},animate:{opacity:1},className:"text-xl font-bold tracking-tight",children:"Alchemist"})]}),h.jsxs("nav",{className:"flex-1 flex flex-col gap-1 px-3",children:[h.jsx(xi,{active:o==="discovery",onClick:()=>a("discovery"),icon:h.jsx(Cj,{size:20}),label:e("tabs.discovery"),collapsed:j}),h.jsx(xi,{active:o==="chat",onClick:()=>a("chat"),icon:h.jsx($h,{size:20}),label:e("tabs.chat"),collapsed:j}),h.jsx(xi,{active:o==="transmute",onClick:()=>a("transmute"),icon:h.jsx(nn,{size:20}),label:e("tabs.transmute"),collapsed:j}),h.jsx(xi,{active:o==="engine",onClick:()=>a("engine"),icon:h.jsx(oc,{size:20}),label:e("common.settings"),collapsed:j}),h.jsx(xi,{active:o==="logs",onClick:()=>a("logs"),icon:h.jsx(ac,{size:20}),label:e("tabs.logs"),collapsed:j}),h.jsx(xi,{active:o==="account",onClick:()=>a("account"),icon:h.jsx(Ac,{size:20}),label:e("common.account"),collapsed:j})]}),h.jsx("div",{className:"px-3 pb-2 border-t border-white/5 pt-4 mt-2 relative z-[100]",children:h.jsx("div",{className:j?"flex justify-center":"px-1",children:h.jsx(Ap,{collapsed:j,position:"top"})})}),h.jsx("div",{className:"px-3 pb-2",children:h.jsxs("button",{onClick:()=>te(K==="dark"?"light":"dark"),className:`w-full flex items-center ${j?"justify-center":"gap-3"} px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium`,title:j?e(K==="dark"?"shell.switch_light":"shell.switch_dark"):"",children:[h.jsx("div",{className:"min-w-[20px] flex justify-center",children:K==="dark"?h.jsx($j,{size:18}):h.jsx(Pj,{size:18})}),!j&&h.jsx(Fe.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"whitespace-nowrap",children:e(K==="dark"?"common.light_mode":"common.dark_mode")})]})}),h.jsxs("div",{className:"px-3 pb-3",children:[h.jsx("button",{onClick:()=>C(!j),className:`w-full flex items-center px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium ${j?"justify-center":"gap-3"}`,children:j?h.jsx(yj,{size:20}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"min-w-[20px] flex justify-center",children:h.jsx(gj,{size:20})}),h.jsx("span",{children:e("common.collapse")})]})}),h.jsxs("button",{onClick:()=>P(!0),className:"w-full flex items-center justify-center gap-2 px-3 py-2 mt-2 text-[10px] font-mono text-fg/30 hover:text-primary hover:bg-surface/30 rounded-lg transition-all group",title:e("shell.view_changelog"),children:[!j&&h.jsxs(h.Fragment,{children:[h.jsx(Bh,{size:12,className:"group-hover:text-primary transition-colors"}),h.jsxs("span",{children:["v","1.0.67"]})]}),j&&h.jsx(Bh,{size:14,className:"group-hover:text-primary transition-colors"})]})]})]}),h.jsxs("main",{className:"flex-1 flex flex-col p-4 gap-4 overflow-hidden relative",children:[o==="discovery"&&h.jsxs(h.Fragment,{children:[h.jsxs("header",{className:"flex justify-between items-center px-4 py-2",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-2xl font-bold",children:e("tabs.discovery")}),h.jsx("p",{className:"text-sm text-fg/50",children:e("setup.welcome_desc")})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("button",{onClick:()=>G(!0),className:"px-6 py-3 glass hover:bg-surface transition-colors flex items-center gap-2 text-sm font-medium",children:[h.jsx(oc,{size:16}),h.jsxs("div",{className:"flex flex-col items-start",children:[h.jsx("span",{children:e("discovery.sync_settings")}),h.jsx("span",{className:"text-[10px] text-fg/40 font-mono",children:T.sync_start_date?`${e("discovery.from")}: ${new Date(T.sync_start_date).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:T.last_sync_checkpoint?`${e("discovery.checkpoint")}: ${new Date(T.last_sync_checkpoint).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:e("discovery.all_time")})]})]}),h.jsxs("button",{onClick:O,disabled:B,className:"px-6 py-3 bg-gradient-to-r from-primary to-accent text-white font-bold rounded-xl shadow-lg glow-primary hover:scale-105 active:scale-95 transition-all flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:[h.jsx(Nc,{size:18,className:B?"animate-spin":""}),e(B?"discovery.syncing":"discovery.sync_history")]})]})]}),h.jsx(qL,{onOpenUrl:pe=>window.open(pe,"_blank","noopener,noreferrer"),onCopyText:pe=>{navigator.clipboard.writeText(pe)}})]}),o==="chat"&&h.jsx(xz,{}),o==="transmute"&&h.jsx(wz,{}),o==="engine"&&h.jsx(vL,{}),o==="account"&&h.jsx(EL,{}),o==="logs"&&h.jsx(DL,{initialState:ne}),h.jsx(wL,{isExpanded:Y,onToggle:()=>X(!Y),onNavigate:ve,liftUp:o==="chat"})]}),h.jsx(AL,{signal:N,onClose:()=>A(null)}),h.jsx(RL,{isOpen:$,onClose:()=>G(!1)}),h.jsx(vz,{isOpen:S,onClose:()=>P(!1)})]})})}):h.jsx(hL,{onAuthSuccess:()=>W(),isInitialized:w})}function xi({active:e,icon:t,label:n,onClick:r,collapsed:s}){return h.jsx("button",{onClick:r,title:s?n:"",className:`w-full flex items-center ${s?"justify-center":"gap-3"} px-4 py-3 rounded-xl transition-all ${e?"bg-primary/10 text-primary shadow-sm":"text-fg/60 hover:bg-surface hover:text-fg"}`,children:s?ta.cloneElement(t,{className:e?"text-primary":""}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"min-w-[20px] flex justify-center",children:ta.cloneElement(t,{className:e?"text-primary":""})}),h.jsx(Fe.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"font-semibold text-sm whitespace-nowrap",children:n})]})})}function jz(){Qe.interceptors.request.use(async e=>{try{const{data:{session:t}}=await oe.auth.getSession();t?.access_token&&(e.headers.Authorization=`Bearer ${t.access_token}`);const n=Ps();n&&(e.headers["x-supabase-url"]=n.url,e.headers["x-supabase-key"]=n.anonKey)}catch(t){console.error("[Axios] Error injecting headers:",t)}return e})}const{slice:Ez,forEach:Cz}=[];function Tz(e){return Cz.call(Ez.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Nz(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const o_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Az=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!o_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!o_.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},a_={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=Az(e,t,s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Rz={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return a_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&a_.create(n,e,r,s,o)}},Pz={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const c=o[a].indexOf("=");c>0&&o[a].substring(0,c)===t&&(n=o[a].substring(c+1))}}return n}},Oz={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(t){const a=o.split("&");for(let c=0;c<a.length;c++){const u=a[c].indexOf("=");u>0&&a[c].substring(0,u)===t&&(r=a[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let vi=null;const l_=()=>{if(vi!==null)return vi;try{if(vi=typeof window<"u"&&window.localStorage!==null,!vi)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{vi=!1}return vi};var Lz={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&l_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&l_()&&window.localStorage.setItem(n,e)}};let _i=null;const c_=()=>{if(_i!==null)return _i;try{if(_i=typeof window<"u"&&window.sessionStorage!==null,!_i)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{_i=!1}return _i};var Iz={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&c_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&c_()&&window.sessionStorage.setItem(n,e)}},Dz={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},Mz={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},zz={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Fz={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Qk=!1;try{document.cookie,Qk=!0}catch{}const Zk=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Qk||Zk.splice(1,1);const $z=()=>({order:Zk,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class e1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Tz(n,this.options||{},$z()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Rz),this.addDetector(Pz),this.addDetector(Lz),this.addDetector(Iz),this.addDetector(Dz),this.addDetector(Mz),this.addDetector(zz),this.addDetector(Fz),this.addDetector(Oz)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!Nz(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}e1.type="languageDetector";const Uz={save:"Save",cancel:"Cancel",loading:"Loading...",error:"Error",success:"Success",settings:"Settings",search:"Search",back:"Back",all:"All",delete:"Delete",update:"Update",edit:"Edit",close:"Close",complete:"Complete",skip:"Skip",begin:"Begin",connection:"Connection",setup:"Setup",project:"Project",account:"Account",logout:"Logout",welcome:"Welcome",dark_mode:"Dark Mode",light_mode:"Light Mode",collapse:"Collapse",just_now:"Just now",enabled:"Enabled",disabled:"Disabled",quick:"Quick (5)",balanced:"Balanced (50)",thorough:"Thorough (200)",resetting:"Resetting...",saving:"Saving...",locale_code:"en-US",categories:{ai_ml:"AI & ML",business:"Business",politics:"Politics",technology:"Technology",finance:"Finance",crypto:"Crypto",science:"Science",other:"Other"}},Bz={discovery:"Discovery",chat:"Chat",transmute:"Transmute",logs:"System Logs",history:"History"},Vz={welcome_title:"Assemble Your Engine",welcome_desc:"Alchemy requires a Supabase essence to store signal fragments and intelligence patterns.",requirements:"Requirements:",project_url:"Supabase Project URL",anon_key:"Anon Public API Key",db_password:"Database Password",project_url_placeholder:"https://xxx.supabase.co or project-id",anon_key_placeholder:"eyJ...",project_id_placeholder:"abcdefghijklm",access_token_placeholder:"sbp_...",begin_init:"BEGIN INITIALIZATION",connect_essence:"CONNECT ESSENCE",credentials_title:"Essence Coordinates",credentials_desc:"Link the alchemist engine to your cloud database",validating:"Validating Link",resonance:"Synchronizing Resonance...",init_schema:"Initialize Schema",schema_desc:"Run database migrations to set up required tables and functions.",project_id:"Project ID",access_token:"Access Token",run_migrations:"RUN MIGRATIONS",running_migrations:"Running Migrations",take_minute:"This may take a minute...",engine_aligned:"Engine Aligned",restarting:"Restarting Alchemist Subsystems...",forge_project:"Forge Project at Supabase",project_id_help:"Found in Supabase Dashboard → Project Settings → General",access_token_help:"Generate at",access_token_link:"supabase.com/dashboard/account/tokens",project_id_required:"Project ID is required",access_token_required:"Access token is required",migration_failed_logs:"Migration failed. Check logs for details.",stream_error:"Failed to read migration stream",back:"BACK",retry:"RETRY"},qz={title_init:"INITIALIZE MASTER",title_join:"JOIN THE CIRCLE",title_mystic:"MYSTIC ACCESS",title_login:"ALCHEMIST LOGIN",desc_init:"Forge the prime alchemist account",desc_mystic_email:"Enter your essence email",desc_mystic_code:"Transmute the sacred code",desc_login:"Transmute your data into intelligence",first_name:"First Name",last_name:"Last Name",first_name_placeholder:"Zosimos",last_name_placeholder:"Panopolis",email_address:"Email Address",email_placeholder:"alchemist@example.com",complexity_key:"Complexity Key",password_placeholder:"••••••••",init_account:"INITIALIZE ACCOUNT",send_code:"SEND CODE",unseal_engine:"UNSEAL ENGINE",verify_code:"VERIFY CODE",change_email:"Change email address",sign_in_code:"Sign in with Code",sign_in_password:"Sign in with Password",already_alchemist:"Already an Alchemist?",new_to_alchemy:"New to Alchemy?",login_instead:"Login instead",create_account:"Create an account",session_failed:"Failed to create session",invalid_code:"Invalid code"},Hz={filters:"Filters",category:"Category",intelligence_score:"Intelligence Score",no_signals_in_category:"No signals in {{category}} yet.",no_categories:"No categories yet.",discovery_hint:"Signals will be organized here once discovered.",loading_signals:"Loading signals...",dismiss_hint:"Dismiss (Not Interested)",signal_count_one:"{{count}} signal",signal_count_other:"{{count}} signals",time_min_ago:"{{count}}m ago",time_hour_ago:"{{count}}h ago",time_day_ago:"{{count}}d ago",add_note_title:"Add Note",target:"Target",note_placeholder:"Enter your thoughts, ideas, or action items regarding this signal...",save_note:"Save Note",view_all_sources:"View all sources",source_count_one:"{{count}} source",source_count_other:"{{count}} sources",source_found_in:"Found in {{count}} different sources",high_confidence:"High confidence - found in {{count}} sources",new_signals:"New Signals",smart_summary:"Smart Summary",entities:"Entities",sources:"Sources",last_sync:"Last Sync",syncnow:"Sync Now",all_time:"All time",checkpoint:"Checkpoint",from:"From",score_high:"HIGH",score_medium:"MEDIUM",score_low:"LOW",sources_count:"{{count}} sources",open_source:"Open",add_note:"Note",boost_topic:"Boost Topic",boosted:"Boosted",dismissed:"Dismissed",remove_favourite:"Remove from favourites",add_favourite:"Add to favourites",sync_history:"Sync History",syncing:"Syncing...",sync_settings:"Sync Settings",discovered:"Discovered",original_source:"Original Source",ai_summary:"AI Summary",full_content:"Full Content",copied:"Copied!",open_link:"Open",detail_title:"Signal Details",sync_from:"Sync From (Optional)",urls_per_sync:"URLs per Sync",sync_from_hint:"Leave empty to sync only new URLs since last sync (incremental). Set a date to process URLs from that point forward.",reset_checkpoint:"Reset Checkpoint",reset_checkpoint_hint:'Clear the sync checkpoint to force a full re-sync from your "Sync From" date',sync_info:'The Alchemist tracks your progress automatically. Use "Sync From" to backfill history or "Reset Checkpoint" to start fresh.',save_settings:"Save Settings",sync_saved:"Sync settings saved successfully",checkpoint_reset:"Checkpoint reset successfully",login_to_save:"Please log in to save settings",login_to_reset:"Please log in to reset checkpoint",status_updated:"Engine status updated to {{status}}",asset_ready:'Asset "{{title}}" is ready!',scanning:"Scanning for new categories and topics...",discovery_complete:"Engine discovery complete!",discovery_failed:"Discovery failed. Check settings.",load_failed:"Failed to load engines",starting_run:"Starting engine run...",run_complete:"Engine run complete! Created: {{title}}",run_started_desktop:"Engine run started on Desktop. Tracking as: {{id}}",run_failed:"Failed to run engine",brief_failed:"Failed to generate production brief",topic:"Topic",pipeline:"Pipeline"},Kz={history:"History",ask_anything:"Ask anything about your browsing history...",sources:"Sources",processing:"Processing your query...",new_chat:"New Chat",no_messages:"No messages yet. Start a conversation!",no_history:"No chat history yet.",title:"Ask Alchemist",desc:"I can help you recall information, summarize topics, and find insights from your browsing history.",thinking:"Exploring memory...",placeholder:"Ask about your history...",error_message:"Sorry, I encountered an error processing your request.",relevant_context:"Relevant Context",match_score:"{{score}}% Match",rag_attribution:"Alchemist used these {{count}} signals to answer",suggestions:{react:"What have I read about React recently?",ai:"Summarize the latest AI news I visited.",finance:"Do I have any notes on Finance?",performance:"Find articles about 'Performance'"}},Wz={engines:"Alchemist Engines",assets:"Generated Assets",newsletter:"Newsletter",thread:"Thread",audio:"Audio",report:"Report",title:"Transmute Engine",desc:"Active Generation Pipelines & Assets",generate:"Generate",processing_desktop:"Processing on Desktop...",ensure_defaults:"Ensure Default Engines",create_engine:"Create Engine",no_assets:"No assets generated yet.",generate_engines:"Generate Engines",new_engine:"New Engine",no_engines:"No Engines Configured",no_engines_desc:"Create your first pipeline to automatically turn signals into newsletters, threads, or audio briefs.",run_engine:"Run Engine",running:"Running...",last_run:"Last Run",never:"Never",schedule:"Schedule",manual:"Manual",topic:"Topic",pipeline:"Pipeline",pause:"Pause",resume:"Resume",view_json:"View Production Brief JSON",json_contract:"Stateless & Self-Contained Contract",json_desc:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio.",generating_asset:"Generating Asset...",queued_desktop:"Queued for Desktop...",desktop_processing:"The RealTimeX Desktop app is processing this request. This modal will update automatically once finished.",unsupported_type:"Unsupported asset type",edit_engine:"Edit Engine",engine_name:"Engine Name",type:"Type",status:"Status",execution_env:"Execution Environment",local_llm:"Local (Alchemy LLM)",desktop_swarm:"RealTimeX Desktop (Agent Swarm)",env_desc_desktop:"Delegates heavy tasks like Audio/Video to the desktop app.",env_desc_local:"Runs simple Markdown tasks directly in Alchemy.",min_score:"Min Score",max_signals:"Max Signals",category_filter:"Category Filter (multi-select)",multi_select_hint:"Hold Cmd/Ctrl to select multiple categories",schedule_hint:"Note: Scheduling is not yet automated",prompt_override:"Custom Prompt Override (optional)",prompt_placeholder:"Override the default prompt for this engine type...",delete_confirm:"Really delete?",confirm:"Confirm",copied_json:"JSON copied to clipboard",json_footer:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio."},Gz={title:"Account Configuration",desc:"Manage your Alchemist profile and essence links.",profile:"Profile",security:"Security",supabase:"Supabase",first_name:"First Name",last_name:"Last Name",email_locked:"Email Address (Locked)",sound_effects:"Sound Effects",sound_desc:"Enable audio feedback for sync events and signal discoveries.",sign_out:"Sign Out",logout_desc:"End your current session and return to the login screen.",preserve_profile:"Preserve Profile",security_title:"Update Entropy Key",new_password:"New Password",confirm_password:"Confirm Password",password_mismatch:"Complexity keys do not match.",password_too_short:"Entropy too low. Minimum 8 characters.",password_rotate_success:"Key rotation successful.",rotate_key:"Rotate Key",essence_resonance:"Essence Resonance",byok_desc:"Bring Your Own Keys (BYOK) for intelligence persistence.",established_link:"Established Link",env_notice:"Active from environment variables. UI override enabled.",realign_link:"Realign Link",sever_link:"Sever Link",sever_confirm:"Sever connection to this essence? This will reset local resonance.",anon_secret_fragment:"Anon Secret Fragment",no_resonance:"No Essence Resonance",no_resonance_desc:"The Alchemist requires a cloud core to store intelligence fragments.",initiate_link:"Initiate Link",test_connection:"Test Connection"},Jz={title:"System Logs",desc:"Detailed history of sync runs, sources, and URL processing",blacklist_suggestion:"Potential Blacklist",blacklist_desc:"Candidates for blocking",recent_errors:"Recent Errors",errors_desc:"Failed URL processes",total_signals:"Total Signals",signals_desc:"Successfully mined",blacklist_modal_title:"Blacklist Suggestions",blacklist_modal_desc:"Review domains suggested for blacklisting based on low scores.",no_suggestions:"No suggestions right now",quality_good:"Your signal quality looks good!",signals_count:"{{count}} signals",avg_score:"Avg Score: {{score}}",low_quality:"Consistently Low Quality",repetitive:"Repetitive Pattern",blacklist_domain:"Blacklist Domain",errors_modal_title:"Recent Errors",errors_modal_desc:"Log of recent failures and issues.",no_recent_errors:"No recent errors found.",signals_modal_title:"Found Signals",signals_modal_desc:"Browse and manage your mined signals history.",search_placeholder:"Search signals...",any_score:"Any Score",high_score:"High (80%+)",medium_score:"Medium (50-79%)",low_score:"Low (<50%)",all_categories:"All Categories",page_x:"Page {{page}}"},Xz={title:"Alchemist Engine",live:"LIVE",clear:"Clear",idle:"Idle. Awaiting signal mining events...",run_completed:"Mining Run Completed",signals:"Signals",urls:"URLs",skipped:"Skipped",failed_to_process:"{{count}} URLs failed to process",view_logs:"View Logs",hide_details:"Hide Details",view_details:"View Details",engine_log:"Live Engine Log",state_reading:"Reading",state_thinking:"Thinking",state_signal:"Signal",state_skipped:"Skipped",state_error:"Error",state_completed:"Completed",msg_reading:"Reading content from: {{url}}",msg_thinking:"Analyzing relevance of: {{title}}",msg_found_signal:"Found signal: {{summary}} ({{score}}%)",msg_low_signal:"Low signal stored for review ({{score}}%): {{title}}",msg_failed:"Analysis failed for {{title}}: {{error}}",msg_sync_completed:"Sync completed: {{signals}} signals found, {{skipped}} skipped, {{errors}} errors"},Yz={switch_light:"Switch to Light Mode",switch_dark:"Switch to Dark Mode",view_changelog:"View Changelog",release_notes:"Release Notes",changelog_error:"Failed to load changelog."},Qz={title:"Signal Pulse",mining:"Mining",standing_by:"Standing by",idle:"Idle",tracked:"Signals tracked",avg_score:"Average score",top_signal:"Top signal",latest:"Latest",awaiting:"Awaiting mining",no_signals:"No signals yet"},Zz={title:"Intelligence Engine",subtitle:"Fine-tune the Alchemist's cognitive parameters and provider links.",configuration:"AI Configuration",test_connection:"Test Connection",save_config:"Save Configuration",llm_provider:"LLM Provider",embedding_provider:"Embedding Provider",sdk_connected:"SDK Connected",sdk_not_available:"SDK Not Available",provider:"Provider",intelligence_model:"Intelligence Model",embedding_model:"Embedding Model",loading_providers:"Loading providers...",sdk_info_success:"✓ Using RealTimeX configured provider",sdk_info_fail:"⚠️ RealTimeX SDK not detected. Configure in RealTimeX Desktop.",embedding_info_success:"✓ Embeddings are generated using your RealTimeX configured provider",embedding_info_fail:"⚠️ RealTimeX SDK not detected. Configure providers in RealTimeX Desktop.",persona_title:"Persona Memory",save_memory:"Save Memory",interests_title:"Active Interests",interests_priority:"High Priority",interests_desc:"The Alchemist prioritizes content matching these topics. Updated automatically based on Favorites & Boosts.",interests_placeholder:"e.g. User focuses on React performance, Rust backend systems, and AI Agent architecture...",antipatterns_title:"Anti-Patterns",antipatterns_priority:"Avoid",antipatterns_desc:"The Alchemist filters out or scores down content matching these patterns. Updated via Dismissals.",antipatterns_placeholder:"e.g. Dislikes marketing fluff, generic listicles, and crypto hype...",browser_sources:"Browser History Sources",save_browser:"Save Browser Sources",blacklist_title:"Blacklist Domains",blacklist_desc:"URLs containing these patterns will be skipped during mining. Enter one pattern per line.",blacklist_label:"Domain Patterns (one per line)",blacklist_placeholder:`google.com/search
|
|
135
135
|
localhost:
|
|
136
136
|
127.0.0.1
|
|
137
137
|
facebook.com
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Outfit,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body{background-color:var(--bg);color:var(--fg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Outfit,system-ui,sans-serif}::-moz-selection{background-color:var(--selection-bg)}::selection{background-color:var(--selection-bg)}.glass{background-color:var(--glass-bg);border-radius:1rem;border-width:1px;border-color:var(--border);--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.glow-primary{box-shadow:0 0 20px var(--glow-color)}.custom-scrollbar::-webkit-scrollbar{width:6px}.custom-scrollbar::-webkit-scrollbar-track{background-color:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--border)}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#f7f8ff33}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--surface) inset!important;-webkit-text-fill-color:var(--fg)!important;caret-color:var(--fg)!important}.scrollbar-on-hover::-webkit-scrollbar{width:6px;height:6px}.scrollbar-on-hover::-webkit-scrollbar-track{background-color:transparent}.scrollbar-on-hover::-webkit-scrollbar-thumb{background-color:transparent;-webkit-transition:background-color .2s;transition:background-color .2s}.scrollbar-on-hover:hover::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--border)}.scrollbar-on-hover:hover::-webkit-scrollbar-thumb:hover{background-color:#f7f8ff33}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-32{bottom:8rem}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-12{top:3rem}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-full{top:100%}.z-0{z-index:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2 / span 2}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[85vh\]{height:85vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[200px\]{max-height:200px}.max-h-\[280px\]{max-height:280px}.max-h-\[600px\]{max-height:600px}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(80vh-88px\)\]{max-height:calc(80vh - 88px)}.min-h-\[120px\]{min-height:120px}.min-h-\[24px\]{min-height:24px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[120px\]{width:120px}.w-\[450px\]{width:450px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[20px\]{min-width:20px}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-\[240px\]{max-width:240px}.max-w-\[85\%\]{max-width:85%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\[2\]{flex:2}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-tl-none{border-top-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-500\/10{border-color:#f59e0b1a}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-blue-400\/30{border-color:#60a5fa4d}.border-blue-500\/20{border-color:#3b82f633}.border-blue-500\/30{border-color:#3b82f64d}.border-border{border-color:var(--border)}.border-cyan-500\/30{border-color:#06b6d44d}.border-emerald-500\/20{border-color:#10b98133}.border-gray-400\/30{border-color:#9ca3af4d}.border-gray-500\/30{border-color:#6b72804d}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500\/20{border-color:#f9731633}.border-orange-500\/30{border-color:#f973164d}.border-primary{border-color:var(--primary)}.border-purple-500\/30{border-color:#a855f74d}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-teal-500\/30{border-color:#14b8a64d}.border-white\/10{border-color:#ffffff1a}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-400\/30{border-color:#facc154d}.border-yellow-500\/20{border-color:#eab30833}.border-yellow-500\/30{border-color:#eab3084d}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:transparent}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-bg{background-color:var(--bg)}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/5{background-color:#0000000d}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-blue-400\/20{background-color:#60a5fa33}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{background-color:var(--border)}.bg-cyan-500\/20{background-color:#06b6d433}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/20{background-color:#10b98133}.bg-emerald-500\/5{background-color:#10b9810d}.bg-error{background-color:var(--error)}.bg-gray-400\/20{background-color:#9ca3af33}.bg-gray-500\/20{background-color:#6b728033}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-500\/10{background-color:#f973161a}.bg-orange-500\/20{background-color:#f9731633}.bg-primary{background-color:var(--primary)}.bg-purple-500\/20{background-color:#a855f733}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-surface{background-color:var(--surface)}.bg-teal-500\/20{background-color:#14b8a633}.bg-transparent{background-color:transparent}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400\/20{background-color:#facc1533}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/5{background-color:#eab3080d}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-accent{--tw-gradient-from: var(--accent) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg{--tw-gradient-from: var(--bg) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from: #f97316 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: var(--primary) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent{--tw-gradient-to: var(--accent) var(--tw-gradient-to-position)}.to-primary{--tw-gradient-to: var(--primary) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-red-500{--tw-gradient-to: #ef4444 var(--tw-gradient-to-position)}.to-red-600{--tw-gradient-to: #dc2626 var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent{color:var(--accent)}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-current{color:currentColor}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-error{color:var(--error)}.text-fg{color:var(--fg)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-primary{color:var(--primary)}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-success{color:var(--success)}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.accent-primary{accent-color:var(--primary)}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(239\,68\,68\,0\.1\)\]{--tw-shadow: 0 0 15px rgba(239,68,68,.1);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(234\,179\,8\,0\.1\)\]{--tw-shadow: 0 0 20px rgba(234,179,8,.1);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_8px_24px_rgba\(0\,0\,0\,0\.16\)\]{--tw-shadow: 0 8px 24px rgba(0,0,0,.16);--tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-md{--tw-blur: blur(12px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-xl{--tw-blur: blur(24px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}:root{--bg: oklch(15% .02 280);--fg: oklch(98% .01 280);--primary: oklch(65% .25 280);--accent: oklch(85% .2 90);--surface: oklch(20% .02 280);--border: oklch(42% .04 280 / .5);--success: oklch(75% .15 150);--error: oklch(65% .2 25);--glass-bg: oklch(25% .03 280 / .4);--glow-color: oklch(65% .25 280 / .3);--selection-bg: oklch(65% .25 280 / .3);--border-hover: oklch(50% .15 280 / .8)}:root[data-theme=light]{--bg: oklch(98% .003 280);--fg: oklch(15% .02 280);--primary: oklch(50% .25 280);--accent: oklch(60% .2 50);--surface: oklch(99% .002 280);--border: oklch(75% .03 280 / .6);--success: oklch(45% .15 150);--error: oklch(50% .2 25);--glass-bg: oklch(99% .002 280 / .75);--glow-color: oklch(50% .25 280 / .2);--selection-bg: oklch(50% .25 280 / .25);--border-hover: oklch(60% .15 280 / .9)}@keyframes pulse-gold{0%{box-shadow:0 0 #fac70066;box-shadow:0 0 oklch(85% .2 90 / .4)}70%{box-shadow:0 0 0 10px #fac70000;box-shadow:0 0 0 10px oklch(85% .2 90 / 0)}to{box-shadow:0 0 #fac70000;box-shadow:0 0 oklch(85% .2 90 / 0)}}.animate-pulse-gold{animation:pulse-gold 2s infinite}h1,h2,h3,h4{letter-spacing:-.025em}.font-mono{font-family:JetBrains Mono,monospace}.before\:mr-2:before{content:var(--tw-content);margin-right:.5rem}.before\:text-primary:before{content:var(--tw-content);color:var(--primary)}.before\:content-\[\'•\'\]:before{--tw-content: "•";content:var(--tw-content)}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}.autofill\:bg-surface:-webkit-autofill{background-color:var(--surface)}.autofill\:bg-surface:autofill{background-color:var(--surface)}.autofill\:text-fg:-webkit-autofill{color:var(--fg)}.autofill\:text-fg:autofill{color:var(--fg)}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:z-10:hover{z-index:10}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.01\]:hover{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.02\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-\[var\(--border-hover\)\]:hover{border-color:var(--border-hover)}.hover\:bg-bg:hover{background-color:var(--bg)}.hover\:bg-black\/10:hover{background-color:#0000001a}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-error:hover{background-color:var(--error)}.hover\:bg-orange-500:hover{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:bg-yellow-500\/20:hover{background-color:#eab30833}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-error:hover{color:var(--error)}.hover\:text-fg:hover{color:var(--fg)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-\[var\(--border-hover\)\]:focus{border-color:var(--border-hover)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-green-500\/30:focus{--tw-ring-color: rgb(34 197 94 / .3)}.focus\:ring-red-500\/30:focus{--tw-ring-color: rgb(239 68 68 / .3)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-red-500\/40:focus-visible{--tw-ring-color: rgb(239 68 68 / .4)}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:grayscale:disabled{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:hover\:scale-100:hover:disabled{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:block{display:block}.group\/btn:hover .group-hover\/btn\:translate-x-0\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-accent{color:var(--accent)}.group:hover .group-hover\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-primary{color:var(--primary)}.group:hover .group-hover\:opacity-100{opacity:1}@media(min-width:640px){.sm\:inline{display:inline}.sm\:h-12{height:3rem}.sm\:w-12{width:3rem}}@media(min-width:768px){.md\:w-2\/3{width:66.666667%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1024px){.lg\:w-1\/2{width:50%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Outfit,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body{background-color:var(--bg);color:var(--fg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Outfit,system-ui,sans-serif}::-moz-selection{background-color:var(--selection-bg)}::selection{background-color:var(--selection-bg)}.glass{background-color:var(--glass-bg);border-radius:1rem;border-width:1px;border-color:var(--border);--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.glow-primary{box-shadow:0 0 20px var(--glow-color)}.custom-scrollbar::-webkit-scrollbar{width:6px}.custom-scrollbar::-webkit-scrollbar-track{background-color:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--border)}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#f7f8ff33}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--surface) inset!important;-webkit-text-fill-color:var(--fg)!important;caret-color:var(--fg)!important}.scrollbar-on-hover::-webkit-scrollbar{width:6px;height:6px}.scrollbar-on-hover::-webkit-scrollbar-track{background-color:transparent}.scrollbar-on-hover::-webkit-scrollbar-thumb{background-color:transparent;-webkit-transition:background-color .2s;transition:background-color .2s}.scrollbar-on-hover:hover::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--border)}.scrollbar-on-hover:hover::-webkit-scrollbar-thumb:hover{background-color:#f7f8ff33}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-32{bottom:8rem}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-12{top:3rem}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-full{top:100%}.z-0{z-index:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2 / span 2}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[85vh\]{height:85vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[200px\]{max-height:200px}.max-h-\[280px\]{max-height:280px}.max-h-\[600px\]{max-height:600px}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(80vh-88px\)\]{max-height:calc(80vh - 88px)}.min-h-\[120px\]{min-height:120px}.min-h-\[24px\]{min-height:24px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[120px\]{width:120px}.w-\[450px\]{width:450px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[20px\]{min-width:20px}.min-w-\[300px\]{min-width:300px}.min-w-\[40px\]{min-width:40px}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-\[240px\]{max-width:240px}.max-w-\[85\%\]{max-width:85%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\[2\]{flex:2}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-tl-none{border-top-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-500\/10{border-color:#f59e0b1a}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-blue-400\/30{border-color:#60a5fa4d}.border-blue-500\/20{border-color:#3b82f633}.border-blue-500\/30{border-color:#3b82f64d}.border-border{border-color:var(--border)}.border-cyan-500\/30{border-color:#06b6d44d}.border-emerald-500\/20{border-color:#10b98133}.border-gray-400\/30{border-color:#9ca3af4d}.border-gray-500\/30{border-color:#6b72804d}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500\/20{border-color:#f9731633}.border-orange-500\/30{border-color:#f973164d}.border-primary{border-color:var(--primary)}.border-purple-500\/30{border-color:#a855f74d}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-teal-500\/30{border-color:#14b8a64d}.border-white\/10{border-color:#ffffff1a}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-400\/30{border-color:#facc154d}.border-yellow-500\/20{border-color:#eab30833}.border-yellow-500\/30{border-color:#eab3084d}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:transparent}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-bg{background-color:var(--bg)}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/5{background-color:#0000000d}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-blue-400\/20{background-color:#60a5fa33}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{background-color:var(--border)}.bg-cyan-500\/20{background-color:#06b6d433}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/20{background-color:#10b98133}.bg-emerald-500\/5{background-color:#10b9810d}.bg-error{background-color:var(--error)}.bg-gray-400\/20{background-color:#9ca3af33}.bg-gray-500\/20{background-color:#6b728033}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-500\/10{background-color:#f973161a}.bg-orange-500\/20{background-color:#f9731633}.bg-primary{background-color:var(--primary)}.bg-purple-500\/20{background-color:#a855f733}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-surface{background-color:var(--surface)}.bg-teal-500\/20{background-color:#14b8a633}.bg-transparent{background-color:transparent}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400\/20{background-color:#facc1533}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/5{background-color:#eab3080d}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-accent{--tw-gradient-from: var(--accent) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg{--tw-gradient-from: var(--bg) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from: #f97316 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: var(--primary) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent{--tw-gradient-to: var(--accent) var(--tw-gradient-to-position)}.to-primary{--tw-gradient-to: var(--primary) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-red-500{--tw-gradient-to: #ef4444 var(--tw-gradient-to-position)}.to-red-600{--tw-gradient-to: #dc2626 var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent{color:var(--accent)}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-current{color:currentColor}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-error{color:var(--error)}.text-fg{color:var(--fg)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-primary{color:var(--primary)}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-success{color:var(--success)}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.accent-primary{accent-color:var(--primary)}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(239\,68\,68\,0\.1\)\]{--tw-shadow: 0 0 15px rgba(239,68,68,.1);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(234\,179\,8\,0\.1\)\]{--tw-shadow: 0 0 20px rgba(234,179,8,.1);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-md{--tw-blur: blur(12px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-xl{--tw-blur: blur(24px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}:root{--bg: oklch(15% .02 280);--fg: oklch(98% .01 280);--primary: oklch(65% .25 280);--accent: oklch(85% .2 90);--surface: oklch(20% .02 280);--border: oklch(42% .04 280 / .5);--success: oklch(75% .15 150);--error: oklch(65% .2 25);--glass-bg: oklch(25% .03 280 / .4);--glow-color: oklch(65% .25 280 / .3);--selection-bg: oklch(65% .25 280 / .3);--border-hover: oklch(50% .15 280 / .8)}:root[data-theme=light]{--bg: oklch(98% .003 280);--fg: oklch(15% .02 280);--primary: oklch(50% .25 280);--accent: oklch(60% .2 50);--surface: oklch(99% .002 280);--border: oklch(75% .03 280 / .6);--success: oklch(45% .15 150);--error: oklch(50% .2 25);--glass-bg: oklch(99% .002 280 / .75);--glow-color: oklch(50% .25 280 / .2);--selection-bg: oklch(50% .25 280 / .25);--border-hover: oklch(60% .15 280 / .9)}@keyframes pulse-gold{0%{box-shadow:0 0 #fac70066;box-shadow:0 0 oklch(85% .2 90 / .4)}70%{box-shadow:0 0 0 10px #fac70000;box-shadow:0 0 0 10px oklch(85% .2 90 / 0)}to{box-shadow:0 0 #fac70000;box-shadow:0 0 oklch(85% .2 90 / 0)}}.animate-pulse-gold{animation:pulse-gold 2s infinite}h1,h2,h3,h4{letter-spacing:-.025em}.font-mono{font-family:JetBrains Mono,monospace}.before\:mr-2:before{content:var(--tw-content);margin-right:.5rem}.before\:text-primary:before{content:var(--tw-content);color:var(--primary)}.before\:content-\[\'•\'\]:before{--tw-content: "•";content:var(--tw-content)}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}.autofill\:bg-surface:-webkit-autofill{background-color:var(--surface)}.autofill\:bg-surface:autofill{background-color:var(--surface)}.autofill\:text-fg:-webkit-autofill{color:var(--fg)}.autofill\:text-fg:autofill{color:var(--fg)}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:z-10:hover{z-index:10}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.01\]:hover{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.02\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-\[var\(--border-hover\)\]:hover{border-color:var(--border-hover)}.hover\:bg-bg:hover{background-color:var(--bg)}.hover\:bg-black\/10:hover{background-color:#0000001a}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-error:hover{background-color:var(--error)}.hover\:bg-orange-500:hover{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:bg-yellow-500\/20:hover{background-color:#eab30833}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-error:hover{color:var(--error)}.hover\:text-fg:hover{color:var(--fg)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-\[var\(--border-hover\)\]:focus{border-color:var(--border-hover)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-green-500\/30:focus{--tw-ring-color: rgb(34 197 94 / .3)}.focus\:ring-red-500\/30:focus{--tw-ring-color: rgb(239 68 68 / .3)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-red-500\/40:focus-visible{--tw-ring-color: rgb(239 68 68 / .4)}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:grayscale:disabled{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:hover\:scale-100:hover:disabled{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:block{display:block}.group\/btn:hover .group-hover\/btn\:translate-x-0\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-accent{color:var(--accent)}.group:hover .group-hover\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-primary{color:var(--primary)}.group:hover .group-hover\:opacity-100{opacity:1}@media(min-width:640px){.sm\:inline{display:inline}.sm\:h-12{height:3rem}.sm\:w-12{width:3rem}}@media(min-width:768px){.md\:w-2\/3{width:66.666667%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1024px){.lg\:w-1\/2{width:50%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
|
package/dist/index.html
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
10
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
11
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-AYQszJOF.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-zXQR5Qvg.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="root"></div>
|
package/package.json
CHANGED