libre-webui 0.2.7 → 0.2.8
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/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +15 -1
- package/backend/dist/index.js.map +1 -1
- package/frontend/dist/assets/{index-B7--cAul.js → index-CE4fvnod.js} +2 -2
- package/frontend/dist/index.html +1 -1
- package/frontend/dist/js/{ArtifactContainer-JjegrQBU.js → ArtifactContainer-BoHnMmlC.js} +1 -1
- package/frontend/dist/js/{ArtifactDemoPage-a78SI-li.js → ArtifactDemoPage-Cg6PD9Cv.js} +1 -1
- package/frontend/dist/js/{ChatPage-B2zgVHii.js → ChatPage-Bwc5n8Z3.js} +1 -1
- package/frontend/dist/js/{ModelsPage-DT3HCDq0.js → ModelsPage-2HtOH51G.js} +1 -1
- package/frontend/dist/js/{PersonasPage-CB_YxSs7.js → PersonasPage-BESJgtJW.js} +1 -1
- package/frontend/dist/js/{UserManagementPage-DkARO8y3.js → UserManagementPage-DQaE_2Mt.js} +1 -1
- package/package.json +1 -1
package/frontend/dist/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta name="description" content="A modern, minimalist WebUI for interacting with local LLMs through Ollama API" />
|
|
10
10
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-CE4fvnod.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/js/react-vendor-N--QU9DW.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/js/router-vendor-B-t91v39.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/js/markdown-vendor-D-79K2xZ.js">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,a as J}from"./markdown-vendor-D-79K2xZ.js";import{r as p}from"./router-vendor-B-t91v39.js";import{u as O,c as T,B as t}from"../assets/index-B7--cAul.js";import{v as w,a2 as v,C as y,J as j,d as C,au as S,av as N,E as U,a3 as z,a6 as R,y as V,H as M}from"./ui-vendor-VxSCY_bv.js";const _={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},$={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},q={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"none",fontFamily:"'JetBrains Mono', Consolas, Monaco, 'Andale Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",tabSize:4,hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#1a1b26",textShadow:"none",fontFamily:"'JetBrains Mono', Consolas, Monaco, 'Andale Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",tabSize:4,hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.5rem"},comment:{color:"#6272a4"},prolog:{color:"#6272a4"},doctype:{color:"#6272a4"},cdata:{color:"#6272a4"},punctuation:{color:"#f8f8f2"},property:{color:"#ff79c6"},tag:{color:"#ff79c6"},boolean:{color:"#bd93f9"},number:{color:"#bd93f9"},constant:{color:"#bd93f9"},symbol:{color:"#bd93f9"},deleted:{color:"#ff5555"},selector:{color:"#50fa7b"},"attr-name":{color:"#50fa7b"},string:{color:"#f1fa8c"},char:{color:"#f1fa8c"},builtin:{color:"#8be9fd"},inserted:{color:"#50fa7b"},operator:{color:"#ff79c6"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#8be9fd"},".language-css .token.string":{color:"#f1fa8c"},".style .token.string":{color:"#f1fa8c"},atrule:{color:"#ff79c6"},"attr-value":{color:"#f1fa8c"},keyword:{color:"#ff79c6"},function:{color:"#50fa7b"},"class-name":{color:"#8be9fd"},regex:{color:"#f1fa8c"},important:{color:"#ff5555",fontWeight:"bold"},variable:{color:"#f8f8f2"}},I={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",c:"cpp","c++":"cpp"},P=["javascript","typescript","python","java","cpp","bash","json","markdown","css","html","jsx","xml"],H=({children:o,language:i,isDark:n=!1,className:a=""})=>{const{theme:c}=O(),l=c.mode==="ophelia",s=I[i.toLowerCase()]||i.toLowerCase();if(!P.includes(s))return e.jsx("pre",{className:`bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1b26] p-3 rounded-lg overflow-x-auto text-sm font-mono ${a}`,children:e.jsx("code",{className:"ophelia:text-[#f8f8f2]",children:o})});const d=l?q:n?_:$;return e.jsx(J,{language:s,style:d,className:a,customStyle:{margin:0,padding:"0.75rem",borderRadius:"0.5rem",fontSize:"0.875rem",...l&&{background:"#1a1b26"}},showLineNumbers:!1,children:o})},G=({artifact:o,className:i,isFullscreen:n=!1,onFullscreenToggle:a})=>{const[c,l]=p.useState(!1),[s,d]=p.useState("preview"),F=p.useRef(null),{theme:m}=O(),b=async r=>{try{await navigator.clipboard.writeText(r),l(!0),setTimeout(()=>l(!1),2e3)}catch(h){console.error("Failed to copy:",h)}},u=()=>{const r=new Blob([o.content],{type:A(o.type)}),h=URL.createObjectURL(r),g=document.createElement("a");g.href=h,g.download=`${o.title}.${B(o.type)}`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(h)},A=r=>{switch(r){case"html":return"text/html";case"react":return"text/javascript";case"svg":return"image/svg+xml";case"css":return"text/css";case"json":return"application/json";default:return"text/plain"}},B=r=>{switch(r){case"html":return"html";case"react":return"jsx";case"svg":return"svg";case"css":return"css";case"json":return"json";default:return"txt"}},k=()=>{switch(o.type){case"html":return e.jsx(V,{className:"h-4 w-4"});case"react":return e.jsx(R,{className:"h-4 w-4"});case"svg":return e.jsx(z,{className:"h-4 w-4"});case"code":return e.jsx(R,{className:"h-4 w-4"});default:return e.jsx(z,{className:"h-4 w-4"})}},L=()=>{const r=`
|
|
1
|
+
import{j as e,a as J}from"./markdown-vendor-D-79K2xZ.js";import{r as p}from"./router-vendor-B-t91v39.js";import{u as O,c as T,B as t}from"../assets/index-CE4fvnod.js";import{v as w,a2 as v,C as y,J as j,d as C,au as S,av as N,E as U,a3 as z,a6 as R,y as V,H as M}from"./ui-vendor-VxSCY_bv.js";const _={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},$={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},q={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"none",fontFamily:"'JetBrains Mono', Consolas, Monaco, 'Andale Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",tabSize:4,hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#1a1b26",textShadow:"none",fontFamily:"'JetBrains Mono', Consolas, Monaco, 'Andale Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",tabSize:4,hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.5rem"},comment:{color:"#6272a4"},prolog:{color:"#6272a4"},doctype:{color:"#6272a4"},cdata:{color:"#6272a4"},punctuation:{color:"#f8f8f2"},property:{color:"#ff79c6"},tag:{color:"#ff79c6"},boolean:{color:"#bd93f9"},number:{color:"#bd93f9"},constant:{color:"#bd93f9"},symbol:{color:"#bd93f9"},deleted:{color:"#ff5555"},selector:{color:"#50fa7b"},"attr-name":{color:"#50fa7b"},string:{color:"#f1fa8c"},char:{color:"#f1fa8c"},builtin:{color:"#8be9fd"},inserted:{color:"#50fa7b"},operator:{color:"#ff79c6"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#8be9fd"},".language-css .token.string":{color:"#f1fa8c"},".style .token.string":{color:"#f1fa8c"},atrule:{color:"#ff79c6"},"attr-value":{color:"#f1fa8c"},keyword:{color:"#ff79c6"},function:{color:"#50fa7b"},"class-name":{color:"#8be9fd"},regex:{color:"#f1fa8c"},important:{color:"#ff5555",fontWeight:"bold"},variable:{color:"#f8f8f2"}},I={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",c:"cpp","c++":"cpp"},P=["javascript","typescript","python","java","cpp","bash","json","markdown","css","html","jsx","xml"],H=({children:o,language:i,isDark:n=!1,className:a=""})=>{const{theme:c}=O(),l=c.mode==="ophelia",s=I[i.toLowerCase()]||i.toLowerCase();if(!P.includes(s))return e.jsx("pre",{className:`bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1b26] p-3 rounded-lg overflow-x-auto text-sm font-mono ${a}`,children:e.jsx("code",{className:"ophelia:text-[#f8f8f2]",children:o})});const d=l?q:n?_:$;return e.jsx(J,{language:s,style:d,className:a,customStyle:{margin:0,padding:"0.75rem",borderRadius:"0.5rem",fontSize:"0.875rem",...l&&{background:"#1a1b26"}},showLineNumbers:!1,children:o})},G=({artifact:o,className:i,isFullscreen:n=!1,onFullscreenToggle:a})=>{const[c,l]=p.useState(!1),[s,d]=p.useState("preview"),F=p.useRef(null),{theme:m}=O(),b=async r=>{try{await navigator.clipboard.writeText(r),l(!0),setTimeout(()=>l(!1),2e3)}catch(h){console.error("Failed to copy:",h)}},u=()=>{const r=new Blob([o.content],{type:A(o.type)}),h=URL.createObjectURL(r),g=document.createElement("a");g.href=h,g.download=`${o.title}.${B(o.type)}`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(h)},A=r=>{switch(r){case"html":return"text/html";case"react":return"text/javascript";case"svg":return"image/svg+xml";case"css":return"text/css";case"json":return"application/json";default:return"text/plain"}},B=r=>{switch(r){case"html":return"html";case"react":return"jsx";case"svg":return"svg";case"css":return"css";case"json":return"json";default:return"txt"}},k=()=>{switch(o.type){case"html":return e.jsx(V,{className:"h-4 w-4"});case"react":return e.jsx(R,{className:"h-4 w-4"});case"svg":return e.jsx(z,{className:"h-4 w-4"});case"code":return e.jsx(R,{className:"h-4 w-4"});default:return e.jsx(z,{className:"h-4 w-4"})}},L=()=>{const r=`
|
|
2
2
|
<!DOCTYPE html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./markdown-vendor-D-79K2xZ.js";import{r as d}from"./router-vendor-B-t91v39.js";import{A as c}from"./ArtifactContainer-
|
|
1
|
+
import{j as e}from"./markdown-vendor-D-79K2xZ.js";import{r as d}from"./router-vendor-B-t91v39.js";import{A as c}from"./ArtifactContainer-BoHnMmlC.js";import{B as l}from"../assets/index-CE4fvnod.js";import"./react-vendor-N--QU9DW.js";import"./ui-vendor-VxSCY_bv.js";import"./utils-vendor-DNzxLBGx.js";const i=[{id:"demo-html-1",type:"html",title:"Interactive Button Demo",description:"A simple HTML page with interactive elements",content:`<div style="text-align: center; padding: 20px;">
|
|
2
2
|
<h1 style="color: #333; font-family: Arial, sans-serif;">Welcome to Libre WebUI!</h1>
|
|
3
3
|
<p style="color: #666; font-size: 16px;">This is an interactive HTML artifact.</p>
|
|
4
4
|
<button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as k0,f as q0,m as u0,s as Cn,h as jn,c as Dn,v as Bn,S as In,j as d,M as En}from"./markdown-vendor-D-79K2xZ.js";import{R as Bt,r as R,c as Xt,b as Fn,a as qn,u as Rn}from"./router-vendor-B-t91v39.js";import{u as g0,c as K,t as Yt,a as pa,b as be,p as br,f as On,d as It,S as Ln,T as Pn,B as Ve,e as yr,g as J0,w as ge,h as wr}from"../assets/index-
|
|
1
|
+
import{o as k0,f as q0,m as u0,s as Cn,h as jn,c as Dn,v as Bn,S as In,j as d,M as En}from"./markdown-vendor-D-79K2xZ.js";import{R as Bt,r as R,c as Xt,b as Fn,a as qn,u as Rn}from"./router-vendor-B-t91v39.js";import{u as g0,c as K,t as Yt,a as pa,b as be,p as br,f as On,d as It,S as Ln,T as Pn,B as Ve,e as yr,g as J0,w as ge,h as wr}from"../assets/index-CE4fvnod.js";import{O as Hn,A as $n}from"./ArtifactContainer-BoHnMmlC.js";import{C as nt,J as fa,b as Gn,O as z0,m as Vn,L as ga,e as va,Q as Un,V as Wn,k as Et,W as Xn,p as xa,Y as Yn,X as v0,o as Kn,_ as kr,$ as Z0,a0 as Jn,a1 as Zn,a2 as Qn,U as ba,a3 as ya,a4 as _n,z as de,a5 as es,a6 as ts,B as ft,Z as Ft,g as rs,j as wa,a7 as ka,a8 as Sa,n as Ma,a9 as Na,t as R0,aa as as,c as ns,I as ss}from"./ui-vendor-VxSCY_bv.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DNzxLBGx.js";function is(r,e){const t=String(r);let a=t.indexOf(e),n=a,s=0,l=0;for(;a!==-1;)a===n?++s>l&&(l=s):s=1,n=a+e.length,a=t.indexOf(e,n);return l}function ls(){return{enter:{mathFlow:r,mathFlowFenceMeta:e,mathText:s},exit:{mathFlow:n,mathFlowFence:a,mathFlowFenceMeta:t,mathFlowValue:u,mathText:l,mathTextData:u}};function r(c){const p={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[p]}},c)}function e(){this.buffer()}function t(){const c=this.resume(),p=this.stack[this.stack.length-1];k0(p.type==="math"),p.meta=c}function a(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function n(c){const p=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];k0(f.type==="math"),this.exit(c),f.value=p;const g=f.data.hChildren[0];k0(g.type==="element"),k0(g.tagName==="code"),g.children.push({type:"text",value:p}),this.data.mathFlowInside=void 0}function s(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function l(c){const p=this.resume(),f=this.stack[this.stack.length-1];k0(f.type==="inlineMath"),this.exit(c),f.value=p,f.data.hChildren.push({type:"text",value:p})}function u(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function os(r){let e=(r||{}).singleDollarTextMath;return e==null&&(e=!0),a.peek=n,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
2
2
|
`,inConstruct:"mathFlowMeta"},{character:"$",after:e?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:a}};function t(s,l,u,c){const p=s.value||"",f=u.createTracker(c),g="$".repeat(Math.max(is(p,"$")+1,2)),b=u.enter("mathFlow");let w=f.move(g);if(s.meta){const M=u.enter("mathFlowMeta");w+=f.move(u.safe(s.meta,{after:`
|
|
3
3
|
`,before:w,encode:["$"],...f.current()})),M()}return w+=f.move(`
|
|
4
4
|
`),p&&(w+=f.move(p+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"./markdown-vendor-D-79K2xZ.js";import{r as s,c as _}from"./router-vendor-B-t91v39.js";import{c as t,B as n,o as c}from"../assets/index-B7--cAul.js";import{W as m,ab as Ye,ac as C,ad as Ze,ae as ge,d as T,_ as I,O,af as me,X as S,E as Je,ag as Ke,ah as Qe,C as Xe,ai as ea,Z as aa,g as ta,aj as ra,ak as sa,b as la,J,T as ia,p as da,al as pe,am as be,an as oa,z as l}from"./ui-vendor-VxSCY_bv.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DNzxLBGx.js";const na=()=>{const[x,fe]=s.useState([]),[h,ue]=s.useState([]),[$,ye]=s.useState([]),[G,K]=s.useState(!1),[H,ke]=s.useState("all"),[z,je]=s.useState(""),[ve,Q]=s.useState(!1),[k,E]=s.useState(""),[b,j]=s.useState(!1),[o,f]=s.useState(null),[X,v]=s.useState(null),[i,Ne]=s.useState(null),[we,Me]=s.useState(""),[Ce,V]=s.useState(!1),[Se,ee]=s.useState(!1),[ze,N]=s.useState(!1),[P,q]=s.useState(""),[w,ae]=s.useState(""),[W,te]=s.useState(!1),[Ee,F]=s.useState(!1),[M,re]=s.useState(""),[L,se]=s.useState(""),[U,le]=s.useState(!1),[Pe,Y]=s.useState(!1),[D,Fe]=s.useState(""),[R,Le]=s.useState(""),[A,ie]=s.useState(null),[Z,de]=s.useState(!1),[oe,De]=s.useState(null),[ne,B]=s.useState(null),[g,Re]=s.useState(new Set(["pull","local"])),u=a=>{Re(r=>{const d=new Set(r);return d.has(a)?d.delete(a):d.add(a),d})},y=async()=>{Q(!0);try{const[a,r,d,Ue]=await Promise.all([c.getModels(),c.listRunningModels(),c.getVersion(),c.checkHealth()]);a.success&&fe(a.data||[]),r.success&&ue(Array.isArray(r.data)?r.data:[]),d.success&&d.data&&De(d.data.version),B(Ue.success)}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to load models: "+r),B(!1)}finally{Q(!1)}},ce=async()=>{K(!0);try{const a=await c.getLibraryModels();a.success&&a.data&&ye(a.data)}catch(a){console.error("Failed to load library models:",a)}finally{K(!1)}};s.useEffect(()=>{y(),ce()},[]);const xe=async()=>{if(!k.trim()){l.error("Please enter a model name");return}j(!0),f({status:"starting"});try{const a=c.pullModelStream(k.trim(),r=>{f(r)},()=>{f(null),j(!1),v(null),l.success(`Model ${k} pulled successfully`),E(""),y()},r=>{f(null),j(!1),v(null),l.error("Failed to pull model: "+r)});v(()=>a)}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to pull model: "+r),f(null),j(!1),v(null)}},Ae=()=>{X&&(X(),v(null),j(!1),f(null),l.success("Model pull cancelled"))},Be=async a=>{if(confirm(`Are you sure you want to delete model "${a}"?`))try{await c.deleteModel(a),l.success(`Model ${a} deleted successfully`),await y()}catch(r){const d=r instanceof Error?r.message:String(r);l.error("Failed to delete model: "+d)}},_e=async a=>{ee(!0),Me(a),V(!0);try{const r=await c.showModel(a,!0);r.success&&r.data?Ne(r.data):l.error("Failed to load model details")}catch(r){const d=r instanceof Error?r.message:String(r);l.error("Failed to get model info: "+d)}finally{ee(!1)}},Te=async()=>{if(!P.trim()||!w.trim()){l.error("Please enter both source and destination names");return}te(!0);try{await c.copyModel(P.trim(),w.trim()),l.success(`Model copied to ${w}`),N(!1),q(""),ae(""),await y()}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to copy model: "+r)}finally{te(!1)}},Ie=async()=>{if(!M.trim()||!L.trim()){l.error("Please enter model name and Modelfile content");return}le(!0);try{await c.createModel({model:M.trim(),modelfile:L.trim()}),l.success(`Model ${M} created successfully`),F(!1),re(""),se(""),await y()}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to create model: "+r)}finally{le(!1)}},Oe=async()=>{if(!D.trim()||!R.trim()){l.error("Please select a model and enter text");return}de(!0),ie(null);try{const a=await c.generateEmbeddings({model:D.trim(),input:R.trim()});if(a.success&&a.data){const r=a.data.embeddings?.[0]||[];ie(r),l.success(`Generated ${r.length}-dimensional embedding vector`)}}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to generate embeddings: "+r)}finally{de(!1)}},p=a=>{const r=a/1073741824;return r>=1?`${r.toFixed(2)} GB`:`${(a/(1024*1024)).toFixed(1)} MB`},$e=a=>Array.isArray(h)&&h.some(r=>r.name===a),Ge=()=>x.reduce((a,r)=>a+r.size,0),He=()=>h.reduce((a,r)=>a+(r.size_vram||0),0),Ve=a=>x.some(r=>r.name===a||r.name.startsWith(a+":")),he=$.filter(a=>{const r=H==="all"||a.category===H,d=!z||a.name.toLowerCase().includes(z.toLowerCase())||a.description.toLowerCase().includes(z.toLowerCase());return r&&d}),qe=["all",...new Set($.map(a=>a.category))],We=[{name:"deepseek-r1",category:"reasoning",size:"7B"},{name:"llama3.2",category:"general",size:"3B"},{name:"gemma3",category:"general",size:"4B"},{name:"qwen2.5",category:"general",size:"7B"},{name:"mistral",category:"general",size:"7B"},{name:"codellama",category:"coding",size:"7B"},{name:"nomic-embed-text",category:"embedding",size:"137M"},{name:"llava",category:"vision",size:"7B"},{name:"phi3",category:"general",size:"3.8B"},{name:"gemma2",category:"general",size:"9B"}];return ve?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsxs("div",{className:"flex items-center gap-3 text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3]",children:[e.jsx(m,{className:"h-5 w-5 animate-spin"}),"Loading models..."]})}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:t("rounded-xl p-4 border","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:t("w-2.5 h-2.5 rounded-full",ne?"bg-green-500 ophelia:bg-[#4ade80]":"bg-red-500 ophelia:bg-[#f87171]")}),e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]",children:ne?"Ollama Online":"Ollama Offline"})]}),oe&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(Ye,{className:"h-4 w-4"}),e.jsxs("span",{children:["v",oe]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(C,{className:"h-4 w-4"}),e.jsxs("span",{children:[x.length," model",x.length!==1?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(Ze,{className:"h-4 w-4"}),e.jsx("span",{children:p(Ge())})]}),h.length>0&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400 ophelia:text-[#4ade80]",children:[e.jsx(ge,{className:"h-4 w-4"}),e.jsxs("span",{children:[h.length," running (",p(He())," ","VRAM)"]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(n,{onClick:y,variant:"outline",size:"sm",className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(m,{className:"h-3.5 w-3.5"}),"Refresh"]})})]})}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("pull"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-primary-100 dark:bg-primary-900/30 ophelia:bg-[#9333ea]/20"),children:e.jsx(T,{className:"h-5 w-5 text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Pull New Model"})]}),g.has("pull")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("pull")&&e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(me,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsx("input",{type:"text",value:k,onChange:a=>E(a.target.value),placeholder:"Enter model name (e.g., llama3.2:3b, deepseek-r1:14b)",className:t("w-full pl-10 pr-4 py-2.5 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-dark-700 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#525252]","focus:outline-none focus:ring-2 focus:ring-primary-500/20 ophelia:focus:ring-[#9333ea]/20","focus:border-primary-500 ophelia:focus:border-[#9333ea]"),disabled:b,onKeyDown:a=>a.key==="Enter"&&!b&&xe()})]}),b?e.jsxs(n,{onClick:Ae,variant:"outline",className:t("px-4 py-2.5 gap-2","text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300","ophelia:text-[#f87171] ophelia:hover:text-[#fca5a5]","ophelia:border-[#262626] ophelia:hover:bg-[#1a1a1a]"),children:[e.jsx(S,{className:"h-4 w-4"}),"Cancel"]}):e.jsxs(n,{onClick:xe,disabled:!k.trim(),className:t("px-4 py-2.5 gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[e.jsx(T,{className:"h-4 w-4"}),"Pull"]})]}),b&&o&&e.jsxs("div",{className:t("p-4 rounded-lg border","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]"),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-dark-700 ophelia:text-[#e5e5e5]",children:o.status==="starting"?"Initializing...":o.status==="pulling"?"Downloading model...":o.status==="verifying sha256"?"Verifying integrity...":o.status==="writing manifest"?"Writing manifest...":o.status==="removing any unused layers"?"Cleaning up...":o.status}),o.percent!==void 0&&e.jsxs("span",{className:"text-sm font-mono text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3]",children:[o.percent,"%"]})]}),o.percent!==void 0&&e.jsx("div",{className:"w-full bg-gray-200 dark:bg-dark-400 ophelia:bg-[#262626] rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:t("h-2 rounded-full transition-all duration-300","bg-primary-500 dark:bg-primary-400 ophelia:bg-[#9333ea]"),style:{width:`${o.percent}%`}})}),o.total&&o.completed&&e.jsxs("div",{className:"mt-2 text-xs text-gray-600 dark:text-dark-600 ophelia:text-[#737373]",children:[p(o.completed)," /"," ",p(o.total)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 ophelia:text-[#737373] mb-2",children:"Popular models:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:We.map(a=>e.jsxs("button",{onClick:()=>E(a.name),disabled:b,className:t("px-3 py-1.5 rounded-full text-xs font-medium transition-colors","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3]","hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","disabled:opacity-50 disabled:cursor-not-allowed"),children:[a.name,e.jsx("span",{className:"ml-1 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]",children:a.size})]},a.name))})]}),e.jsxs("a",{href:"https://ollama.com/library",target:"_blank",rel:"noopener noreferrer",className:t("inline-flex items-center gap-1.5 text-xs","text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]","hover:underline"),children:[e.jsx(Je,{className:"h-3 w-3"}),"Browse all models on ollama.com"]})]})]}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("library"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-cyan-100 dark:bg-cyan-900/30 ophelia:bg-[#06b6d4]/20"),children:e.jsx(Ke,{className:"h-5 w-5 text-cyan-600 dark:text-cyan-400 ophelia:text-[#22d3ee]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Browse Library"}),e.jsxs("span",{className:t("px-2 py-0.5 rounded-full text-xs font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:[$.length," available"]})]}),g.has("library")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("library")&&e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(me,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsx("input",{type:"text",value:z,onChange:a=>je(a.target.value),placeholder:"Search models...",className:t("w-full pl-10 pr-4 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-dark-700 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#525252]","focus:outline-none focus:ring-2 focus:ring-primary-500/20 ophelia:focus:ring-[#9333ea]/20","focus:border-primary-500 ophelia:focus:border-[#9333ea]")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Qe,{className:"h-4 w-4 text-gray-400 ophelia:text-[#525252]"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:qe.map(a=>e.jsx("button",{onClick:()=>ke(a),className:t("px-2.5 py-1 rounded-full text-xs font-medium transition-colors",H===a?"bg-primary-100 dark:bg-primary-900/30 ophelia:bg-[#9333ea]/20 text-primary-700 dark:text-primary-400 ophelia:text-[#a855f7]":"bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a] text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3] hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]"),children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]})]}),G?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(m,{className:"h-5 w-5 animate-spin text-gray-400 ophelia:text-[#737373]"})}):he.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 ophelia:text-[#737373]",children:"No models found matching your criteria"}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:he.map(a=>{const r=Ve(a.name);return e.jsxs("div",{className:t("p-4 rounded-lg border transition-all","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]",r?"border-green-200 dark:border-green-800/50 ophelia:border-[#22c55e]/30":"border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","hover:shadow-md hover:border-gray-300 dark:hover:border-dark-400 ophelia:hover:border-[#262626]"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("h4",{className:"font-medium text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:a.name}),r&&e.jsxs("span",{className:t("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx(Xe,{className:"h-3 w-3"}),"Installed"]})]}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] mb-3 line-clamp-2",children:a.description}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[a.sizes.slice(0,4).map(d=>e.jsx("span",{className:t("px-1.5 py-0.5 rounded text-xs","bg-gray-200 dark:bg-dark-300 ophelia:bg-[#262626]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:d},d)),a.sizes.length>4&&e.jsxs("span",{className:"text-xs text-gray-400 ophelia:text-[#737373]",children:["+",a.sizes.length-4," more"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 ophelia:text-[#737373]",children:[a.pulls&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(T,{className:"h-3 w-3"}),a.pulls]}),e.jsx("span",{className:t("px-1.5 py-0.5 rounded capitalize","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]"),children:a.category})]}),e.jsxs(n,{onClick:()=>{E(a.name),u("pull"),g.has("pull")||u("pull")},variant:"outline",size:"sm",disabled:b,className:t("gap-1 text-xs","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(T,{className:"h-3 w-3"}),"Pull"]})]})]},a.name)})}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(n,{onClick:ce,variant:"outline",size:"sm",disabled:G,className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(m,{className:t("h-3.5 w-3.5",G&&"animate-spin")}),"Refresh Library"]})})]})]}),Array.isArray(h)&&h.length>0&&e.jsxs("div",{className:t("rounded-xl p-4 border","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20"),children:e.jsx(ge,{className:"h-5 w-5 text-green-600 dark:text-green-400 ophelia:text-[#4ade80]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Running Models"}),e.jsxs("span",{className:t("ml-auto px-2 py-0.5 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[h.length," active"]})]}),e.jsx("div",{className:"space-y-2",children:h.map(a=>e.jsxs("div",{className:t("flex items-center justify-between p-4 rounded-lg border","bg-green-50 dark:bg-green-900/10 ophelia:bg-[#22c55e]/5","border-green-200 dark:border-green-800/50 ophelia:border-[#22c55e]/20"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("w-2 h-2 rounded-full animate-pulse","bg-green-500 ophelia:bg-[#4ade80]")}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-green-800 dark:text-green-400 ophelia:text-[#4ade80]",children:a.name}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-green-600 dark:text-green-500 ophelia:text-[#22c55e]/80",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ea,{className:"h-3 w-3"}),"VRAM: ",p(a.size_vram||0)]}),a.size&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"h-3 w-3"}),"Size: ",p(a.size)]})]})]})]}),e.jsxs("div",{className:t("flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/10","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx(aa,{className:"h-3 w-3"}),"Active"]})]},a.name))})]}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("local"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-blue-100 dark:bg-blue-900/30 ophelia:bg-[#a855f7]/20"),children:e.jsx(C,{className:"h-5 w-5 text-blue-600 dark:text-blue-400 ophelia:text-[#a855f7]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Local Models"}),e.jsxs("span",{className:t("px-2 py-0.5 rounded-full text-xs font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:[x.length," installed"]})]}),g.has("local")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("local")&&e.jsx("div",{className:"p-4 pt-0",children:x.length===0?e.jsxs("div",{className:t("text-center py-12 rounded-lg border-2 border-dashed","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]"),children:[e.jsx(C,{className:"h-12 w-12 mx-auto mb-3 text-gray-300 dark:text-gray-600 ophelia:text-[#525252]"}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#737373] mb-2",children:"No models installed yet"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 ophelia:text-[#525252]",children:"Pull a model above to get started"})]}):e.jsx("div",{className:"space-y-3",children:x.map(a=>e.jsx("div",{className:t("p-4 rounded-lg border transition-colors","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h4",{className:"font-medium text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:a.name}),$e(a.name)&&e.jsxs("span",{className:t("inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 ophelia:bg-[#4ade80] animate-pulse"}),"Running"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"h-3.5 w-3.5"}),p(a.size)]}),a.details?.parameter_size&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ta,{className:"h-3.5 w-3.5"}),a.details.parameter_size]}),a.details?.quantization_level&&e.jsx("span",{className:t("px-1.5 py-0.5 rounded text-xs","bg-gray-200 dark:bg-dark-300 ophelia:bg-[#262626]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:a.details.quantization_level}),a.details?.family&&e.jsx("span",{className:"text-gray-500 dark:text-gray-500 ophelia:text-[#737373]",children:a.details.family})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-400 dark:text-dark-500 ophelia:text-[#525252] mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ra,{className:"h-3 w-3"}),new Date(a.modified_at).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1 font-mono truncate max-w-[200px]",title:a.digest,children:[e.jsx(sa,{className:"h-3 w-3"}),a.digest.slice(0,12),"..."]})]})]}),e.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[e.jsxs(n,{onClick:()=>_e(a.name),variant:"outline",size:"sm",className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(la,{className:"h-3.5 w-3.5"}),"Info"]}),e.jsxs(n,{onClick:()=>{q(a.name),N(!0)},variant:"outline",size:"sm",className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(J,{className:"h-3.5 w-3.5"}),"Copy"]}),e.jsxs(n,{onClick:()=>Be(a.name),variant:"outline",size:"sm",className:t("gap-1.5","text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300","ophelia:text-[#f87171] ophelia:hover:text-[#fca5a5]","ophelia:border-[#262626] ophelia:hover:bg-[#1a1a1a]"),children:[e.jsx(ia,{className:"h-3.5 w-3.5"}),"Delete"]})]})]})},a.name))})})]}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("advanced"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-amber-100 dark:bg-amber-900/30 ophelia:bg-[#f59e0b]/20"),children:e.jsx(da,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 ophelia:text-[#fbbf24]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Advanced Actions"})]}),g.has("advanced")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("advanced")&&e.jsx("div",{className:"p-4 pt-0",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs(n,{onClick:()=>F(!0),variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(pe,{className:"h-5 w-5 text-purple-500 ophelia:text-[#a855f7]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Create Model"}),e.jsx("div",{className:"text-xs opacity-70",children:"From Modelfile"})]})]}),e.jsxs(n,{onClick:()=>N(!0),variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(J,{className:"h-5 w-5 text-blue-500 ophelia:text-[#60a5fa]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Copy Model"}),e.jsx("div",{className:"text-xs opacity-70",children:"Duplicate existing"})]})]}),e.jsxs(n,{onClick:()=>Y(!0),variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(be,{className:"h-5 w-5 text-green-500 ophelia:text-[#4ade80]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Test Embeddings"}),e.jsx("div",{className:"text-xs opacity-70",children:"Generate vectors"})]})]}),e.jsxs(n,{onClick:async()=>{try{(await c.checkHealth()).success&&(B(!0),l.success("Ollama is healthy!"))}catch{B(!1),l.error("Ollama health check failed")}},variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(oa,{className:"h-5 w-5 text-rose-500 ophelia:text-[#fb7185]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Health Check"}),e.jsx("div",{className:"text-xs opacity-70",children:"Test connection"})]})]})]})})]}),Ce&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>V(!1)}),e.jsxs("div",{className:t("relative w-full max-w-2xl max-h-[85vh] overflow-hidden rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:["Model Details: ",we]}),e.jsx("button",{onClick:()=>V(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(85vh-60px)] p-4 space-y-4",children:Se?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(m,{className:"h-6 w-6 animate-spin text-gray-400 ophelia:text-[#737373]"})}):i?e.jsxs(e.Fragment,{children:[i.details&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Model Information"}),e.jsx("div",{className:t("p-3 rounded-lg text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]"),children:e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.details.family&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Family:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.family})]}),i.details.parameter_size&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Parameters:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.parameter_size})]}),i.details.quantization_level&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Quantization:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.quantization_level})]}),i.details.format&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Format:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.format})]})]})})]}),i.system&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"System Prompt"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.system})]}),i.template&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Template"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-40","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.template})]}),i.parameters&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Parameters"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.parameters})]}),i.license&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"License"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-32","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.license})]}),i.modelfile&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Modelfile"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-60","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.modelfile})]})]}):e.jsx("p",{className:"text-center text-gray-500 ophelia:text-[#737373]",children:"No details available"})})]})]}),document.body),ze&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>N(!1)}),e.jsxs("div",{className:t("relative w-full max-w-md rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:"Copy Model"}),e.jsx("button",{onClick:()=>N(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Source Model"}),e.jsxs("select",{value:P,onChange:a=>q(a.target.value),className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]"),children:[e.jsx("option",{value:"",children:"Select a model..."}),x.map(a=>e.jsx("option",{value:a.name,children:a.name},a.name))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"New Model Name"}),e.jsx("input",{type:"text",value:w,onChange:a=>ae(a.target.value),placeholder:"e.g., my-custom-model",className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]")})]}),e.jsxs(n,{onClick:Te,disabled:!P.trim()||!w.trim()||W,className:t("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[W?e.jsx(m,{className:"h-4 w-4 animate-spin"}):e.jsx(J,{className:"h-4 w-4"}),W?"Copying...":"Copy Model"]})]})]})]}),document.body),Ee&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>F(!1)}),e.jsxs("div",{className:t("relative w-full max-w-lg rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:"Create Custom Model"}),e.jsx("button",{onClick:()=>F(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Model Name"}),e.jsx("input",{type:"text",value:M,onChange:a=>re(a.target.value),placeholder:"e.g., my-assistant",className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Modelfile"}),e.jsx("textarea",{value:L,onChange:a=>se(a.target.value),placeholder:`FROM llama3.2
|
|
1
|
+
import{j as e}from"./markdown-vendor-D-79K2xZ.js";import{r as s,c as _}from"./router-vendor-B-t91v39.js";import{c as t,B as n,o as c}from"../assets/index-CE4fvnod.js";import{W as m,ab as Ye,ac as C,ad as Ze,ae as ge,d as T,_ as I,O,af as me,X as S,E as Je,ag as Ke,ah as Qe,C as Xe,ai as ea,Z as aa,g as ta,aj as ra,ak as sa,b as la,J,T as ia,p as da,al as pe,am as be,an as oa,z as l}from"./ui-vendor-VxSCY_bv.js";import"./react-vendor-N--QU9DW.js";import"./utils-vendor-DNzxLBGx.js";const na=()=>{const[x,fe]=s.useState([]),[h,ue]=s.useState([]),[$,ye]=s.useState([]),[G,K]=s.useState(!1),[H,ke]=s.useState("all"),[z,je]=s.useState(""),[ve,Q]=s.useState(!1),[k,E]=s.useState(""),[b,j]=s.useState(!1),[o,f]=s.useState(null),[X,v]=s.useState(null),[i,Ne]=s.useState(null),[we,Me]=s.useState(""),[Ce,V]=s.useState(!1),[Se,ee]=s.useState(!1),[ze,N]=s.useState(!1),[P,q]=s.useState(""),[w,ae]=s.useState(""),[W,te]=s.useState(!1),[Ee,F]=s.useState(!1),[M,re]=s.useState(""),[L,se]=s.useState(""),[U,le]=s.useState(!1),[Pe,Y]=s.useState(!1),[D,Fe]=s.useState(""),[R,Le]=s.useState(""),[A,ie]=s.useState(null),[Z,de]=s.useState(!1),[oe,De]=s.useState(null),[ne,B]=s.useState(null),[g,Re]=s.useState(new Set(["pull","local"])),u=a=>{Re(r=>{const d=new Set(r);return d.has(a)?d.delete(a):d.add(a),d})},y=async()=>{Q(!0);try{const[a,r,d,Ue]=await Promise.all([c.getModels(),c.listRunningModels(),c.getVersion(),c.checkHealth()]);a.success&&fe(a.data||[]),r.success&&ue(Array.isArray(r.data)?r.data:[]),d.success&&d.data&&De(d.data.version),B(Ue.success)}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to load models: "+r),B(!1)}finally{Q(!1)}},ce=async()=>{K(!0);try{const a=await c.getLibraryModels();a.success&&a.data&&ye(a.data)}catch(a){console.error("Failed to load library models:",a)}finally{K(!1)}};s.useEffect(()=>{y(),ce()},[]);const xe=async()=>{if(!k.trim()){l.error("Please enter a model name");return}j(!0),f({status:"starting"});try{const a=c.pullModelStream(k.trim(),r=>{f(r)},()=>{f(null),j(!1),v(null),l.success(`Model ${k} pulled successfully`),E(""),y()},r=>{f(null),j(!1),v(null),l.error("Failed to pull model: "+r)});v(()=>a)}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to pull model: "+r),f(null),j(!1),v(null)}},Ae=()=>{X&&(X(),v(null),j(!1),f(null),l.success("Model pull cancelled"))},Be=async a=>{if(confirm(`Are you sure you want to delete model "${a}"?`))try{await c.deleteModel(a),l.success(`Model ${a} deleted successfully`),await y()}catch(r){const d=r instanceof Error?r.message:String(r);l.error("Failed to delete model: "+d)}},_e=async a=>{ee(!0),Me(a),V(!0);try{const r=await c.showModel(a,!0);r.success&&r.data?Ne(r.data):l.error("Failed to load model details")}catch(r){const d=r instanceof Error?r.message:String(r);l.error("Failed to get model info: "+d)}finally{ee(!1)}},Te=async()=>{if(!P.trim()||!w.trim()){l.error("Please enter both source and destination names");return}te(!0);try{await c.copyModel(P.trim(),w.trim()),l.success(`Model copied to ${w}`),N(!1),q(""),ae(""),await y()}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to copy model: "+r)}finally{te(!1)}},Ie=async()=>{if(!M.trim()||!L.trim()){l.error("Please enter model name and Modelfile content");return}le(!0);try{await c.createModel({model:M.trim(),modelfile:L.trim()}),l.success(`Model ${M} created successfully`),F(!1),re(""),se(""),await y()}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to create model: "+r)}finally{le(!1)}},Oe=async()=>{if(!D.trim()||!R.trim()){l.error("Please select a model and enter text");return}de(!0),ie(null);try{const a=await c.generateEmbeddings({model:D.trim(),input:R.trim()});if(a.success&&a.data){const r=a.data.embeddings?.[0]||[];ie(r),l.success(`Generated ${r.length}-dimensional embedding vector`)}}catch(a){const r=a instanceof Error?a.message:String(a);l.error("Failed to generate embeddings: "+r)}finally{de(!1)}},p=a=>{const r=a/1073741824;return r>=1?`${r.toFixed(2)} GB`:`${(a/(1024*1024)).toFixed(1)} MB`},$e=a=>Array.isArray(h)&&h.some(r=>r.name===a),Ge=()=>x.reduce((a,r)=>a+r.size,0),He=()=>h.reduce((a,r)=>a+(r.size_vram||0),0),Ve=a=>x.some(r=>r.name===a||r.name.startsWith(a+":")),he=$.filter(a=>{const r=H==="all"||a.category===H,d=!z||a.name.toLowerCase().includes(z.toLowerCase())||a.description.toLowerCase().includes(z.toLowerCase());return r&&d}),qe=["all",...new Set($.map(a=>a.category))],We=[{name:"deepseek-r1",category:"reasoning",size:"7B"},{name:"llama3.2",category:"general",size:"3B"},{name:"gemma3",category:"general",size:"4B"},{name:"qwen2.5",category:"general",size:"7B"},{name:"mistral",category:"general",size:"7B"},{name:"codellama",category:"coding",size:"7B"},{name:"nomic-embed-text",category:"embedding",size:"137M"},{name:"llava",category:"vision",size:"7B"},{name:"phi3",category:"general",size:"3.8B"},{name:"gemma2",category:"general",size:"9B"}];return ve?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsxs("div",{className:"flex items-center gap-3 text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3]",children:[e.jsx(m,{className:"h-5 w-5 animate-spin"}),"Loading models..."]})}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:t("rounded-xl p-4 border","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:t("w-2.5 h-2.5 rounded-full",ne?"bg-green-500 ophelia:bg-[#4ade80]":"bg-red-500 ophelia:bg-[#f87171]")}),e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]",children:ne?"Ollama Online":"Ollama Offline"})]}),oe&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(Ye,{className:"h-4 w-4"}),e.jsxs("span",{children:["v",oe]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(C,{className:"h-4 w-4"}),e.jsxs("span",{children:[x.length," model",x.length!==1?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]",children:[e.jsx(Ze,{className:"h-4 w-4"}),e.jsx("span",{children:p(Ge())})]}),h.length>0&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400 ophelia:text-[#4ade80]",children:[e.jsx(ge,{className:"h-4 w-4"}),e.jsxs("span",{children:[h.length," running (",p(He())," ","VRAM)"]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(n,{onClick:y,variant:"outline",size:"sm",className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(m,{className:"h-3.5 w-3.5"}),"Refresh"]})})]})}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("pull"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-primary-100 dark:bg-primary-900/30 ophelia:bg-[#9333ea]/20"),children:e.jsx(T,{className:"h-5 w-5 text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Pull New Model"})]}),g.has("pull")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("pull")&&e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(me,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsx("input",{type:"text",value:k,onChange:a=>E(a.target.value),placeholder:"Enter model name (e.g., llama3.2:3b, deepseek-r1:14b)",className:t("w-full pl-10 pr-4 py-2.5 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-dark-700 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#525252]","focus:outline-none focus:ring-2 focus:ring-primary-500/20 ophelia:focus:ring-[#9333ea]/20","focus:border-primary-500 ophelia:focus:border-[#9333ea]"),disabled:b,onKeyDown:a=>a.key==="Enter"&&!b&&xe()})]}),b?e.jsxs(n,{onClick:Ae,variant:"outline",className:t("px-4 py-2.5 gap-2","text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300","ophelia:text-[#f87171] ophelia:hover:text-[#fca5a5]","ophelia:border-[#262626] ophelia:hover:bg-[#1a1a1a]"),children:[e.jsx(S,{className:"h-4 w-4"}),"Cancel"]}):e.jsxs(n,{onClick:xe,disabled:!k.trim(),className:t("px-4 py-2.5 gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[e.jsx(T,{className:"h-4 w-4"}),"Pull"]})]}),b&&o&&e.jsxs("div",{className:t("p-4 rounded-lg border","bg-gray-50 dark:bg-dark-200 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]"),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-dark-700 ophelia:text-[#e5e5e5]",children:o.status==="starting"?"Initializing...":o.status==="pulling"?"Downloading model...":o.status==="verifying sha256"?"Verifying integrity...":o.status==="writing manifest"?"Writing manifest...":o.status==="removing any unused layers"?"Cleaning up...":o.status}),o.percent!==void 0&&e.jsxs("span",{className:"text-sm font-mono text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3]",children:[o.percent,"%"]})]}),o.percent!==void 0&&e.jsx("div",{className:"w-full bg-gray-200 dark:bg-dark-400 ophelia:bg-[#262626] rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:t("h-2 rounded-full transition-all duration-300","bg-primary-500 dark:bg-primary-400 ophelia:bg-[#9333ea]"),style:{width:`${o.percent}%`}})}),o.total&&o.completed&&e.jsxs("div",{className:"mt-2 text-xs text-gray-600 dark:text-dark-600 ophelia:text-[#737373]",children:[p(o.completed)," /"," ",p(o.total)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 ophelia:text-[#737373] mb-2",children:"Popular models:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:We.map(a=>e.jsxs("button",{onClick:()=>E(a.name),disabled:b,className:t("px-3 py-1.5 rounded-full text-xs font-medium transition-colors","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3]","hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]","border border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","disabled:opacity-50 disabled:cursor-not-allowed"),children:[a.name,e.jsx("span",{className:"ml-1 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]",children:a.size})]},a.name))})]}),e.jsxs("a",{href:"https://ollama.com/library",target:"_blank",rel:"noopener noreferrer",className:t("inline-flex items-center gap-1.5 text-xs","text-primary-600 dark:text-primary-400 ophelia:text-[#a855f7]","hover:underline"),children:[e.jsx(Je,{className:"h-3 w-3"}),"Browse all models on ollama.com"]})]})]}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("library"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-cyan-100 dark:bg-cyan-900/30 ophelia:bg-[#06b6d4]/20"),children:e.jsx(Ke,{className:"h-5 w-5 text-cyan-600 dark:text-cyan-400 ophelia:text-[#22d3ee]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Browse Library"}),e.jsxs("span",{className:t("px-2 py-0.5 rounded-full text-xs font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:[$.length," available"]})]}),g.has("library")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("library")&&e.jsxs("div",{className:"p-4 pt-0 space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(me,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 dark:text-gray-500 ophelia:text-[#525252]"}),e.jsx("input",{type:"text",value:z,onChange:a=>je(a.target.value),placeholder:"Search models...",className:t("w-full pl-10 pr-4 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-dark-700 ophelia:text-[#fafafa]","placeholder-gray-500 dark:placeholder-gray-400 ophelia:placeholder-[#525252]","focus:outline-none focus:ring-2 focus:ring-primary-500/20 ophelia:focus:ring-[#9333ea]/20","focus:border-primary-500 ophelia:focus:border-[#9333ea]")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Qe,{className:"h-4 w-4 text-gray-400 ophelia:text-[#525252]"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:qe.map(a=>e.jsx("button",{onClick:()=>ke(a),className:t("px-2.5 py-1 rounded-full text-xs font-medium transition-colors",H===a?"bg-primary-100 dark:bg-primary-900/30 ophelia:bg-[#9333ea]/20 text-primary-700 dark:text-primary-400 ophelia:text-[#a855f7]":"bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a] text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3] hover:bg-gray-200 dark:hover:bg-dark-300 ophelia:hover:bg-[#262626]"),children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]})]}),G?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(m,{className:"h-5 w-5 animate-spin text-gray-400 ophelia:text-[#737373]"})}):he.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 ophelia:text-[#737373]",children:"No models found matching your criteria"}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:he.map(a=>{const r=Ve(a.name);return e.jsxs("div",{className:t("p-4 rounded-lg border transition-all","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]",r?"border-green-200 dark:border-green-800/50 ophelia:border-[#22c55e]/30":"border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","hover:shadow-md hover:border-gray-300 dark:hover:border-dark-400 ophelia:hover:border-[#262626]"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("h4",{className:"font-medium text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:a.name}),r&&e.jsxs("span",{className:t("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx(Xe,{className:"h-3 w-3"}),"Installed"]})]}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] mb-3 line-clamp-2",children:a.description}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[a.sizes.slice(0,4).map(d=>e.jsx("span",{className:t("px-1.5 py-0.5 rounded text-xs","bg-gray-200 dark:bg-dark-300 ophelia:bg-[#262626]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:d},d)),a.sizes.length>4&&e.jsxs("span",{className:"text-xs text-gray-400 ophelia:text-[#737373]",children:["+",a.sizes.length-4," more"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 ophelia:text-[#737373]",children:[a.pulls&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(T,{className:"h-3 w-3"}),a.pulls]}),e.jsx("span",{className:t("px-1.5 py-0.5 rounded capitalize","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]"),children:a.category})]}),e.jsxs(n,{onClick:()=>{E(a.name),u("pull"),g.has("pull")||u("pull")},variant:"outline",size:"sm",disabled:b,className:t("gap-1 text-xs","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(T,{className:"h-3 w-3"}),"Pull"]})]})]},a.name)})}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(n,{onClick:ce,variant:"outline",size:"sm",disabled:G,className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(m,{className:t("h-3.5 w-3.5",G&&"animate-spin")}),"Refresh Library"]})})]})]}),Array.isArray(h)&&h.length>0&&e.jsxs("div",{className:t("rounded-xl p-4 border","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20"),children:e.jsx(ge,{className:"h-5 w-5 text-green-600 dark:text-green-400 ophelia:text-[#4ade80]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Running Models"}),e.jsxs("span",{className:t("ml-auto px-2 py-0.5 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[h.length," active"]})]}),e.jsx("div",{className:"space-y-2",children:h.map(a=>e.jsxs("div",{className:t("flex items-center justify-between p-4 rounded-lg border","bg-green-50 dark:bg-green-900/10 ophelia:bg-[#22c55e]/5","border-green-200 dark:border-green-800/50 ophelia:border-[#22c55e]/20"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("w-2 h-2 rounded-full animate-pulse","bg-green-500 ophelia:bg-[#4ade80]")}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-green-800 dark:text-green-400 ophelia:text-[#4ade80]",children:a.name}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-green-600 dark:text-green-500 ophelia:text-[#22c55e]/80",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ea,{className:"h-3 w-3"}),"VRAM: ",p(a.size_vram||0)]}),a.size&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"h-3 w-3"}),"Size: ",p(a.size)]})]})]})]}),e.jsxs("div",{className:t("flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/10","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx(aa,{className:"h-3 w-3"}),"Active"]})]},a.name))})]}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("local"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-blue-100 dark:bg-blue-900/30 ophelia:bg-[#a855f7]/20"),children:e.jsx(C,{className:"h-5 w-5 text-blue-600 dark:text-blue-400 ophelia:text-[#a855f7]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Local Models"}),e.jsxs("span",{className:t("px-2 py-0.5 rounded-full text-xs font-medium","bg-gray-100 dark:bg-dark-200 ophelia:bg-[#1a1a1a]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:[x.length," installed"]})]}),g.has("local")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("local")&&e.jsx("div",{className:"p-4 pt-0",children:x.length===0?e.jsxs("div",{className:t("text-center py-12 rounded-lg border-2 border-dashed","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]"),children:[e.jsx(C,{className:"h-12 w-12 mx-auto mb-3 text-gray-300 dark:text-gray-600 ophelia:text-[#525252]"}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#737373] mb-2",children:"No models installed yet"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 ophelia:text-[#525252]",children:"Pull a model above to get started"})]}):e.jsx("div",{className:"space-y-3",children:x.map(a=>e.jsx("div",{className:t("p-4 rounded-lg border transition-colors","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]","hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h4",{className:"font-medium text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:a.name}),$e(a.name)&&e.jsxs("span",{className:t("inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium","bg-green-100 dark:bg-green-900/30 ophelia:bg-[#22c55e]/20","text-green-700 dark:text-green-400 ophelia:text-[#4ade80]"),children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 ophelia:bg-[#4ade80] animate-pulse"}),"Running"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(C,{className:"h-3.5 w-3.5"}),p(a.size)]}),a.details?.parameter_size&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ta,{className:"h-3.5 w-3.5"}),a.details.parameter_size]}),a.details?.quantization_level&&e.jsx("span",{className:t("px-1.5 py-0.5 rounded text-xs","bg-gray-200 dark:bg-dark-300 ophelia:bg-[#262626]","text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3]"),children:a.details.quantization_level}),a.details?.family&&e.jsx("span",{className:"text-gray-500 dark:text-gray-500 ophelia:text-[#737373]",children:a.details.family})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-400 dark:text-dark-500 ophelia:text-[#525252] mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ra,{className:"h-3 w-3"}),new Date(a.modified_at).toLocaleDateString()]}),e.jsxs("span",{className:"flex items-center gap-1 font-mono truncate max-w-[200px]",title:a.digest,children:[e.jsx(sa,{className:"h-3 w-3"}),a.digest.slice(0,12),"..."]})]})]}),e.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[e.jsxs(n,{onClick:()=>_e(a.name),variant:"outline",size:"sm",className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(la,{className:"h-3.5 w-3.5"}),"Info"]}),e.jsxs(n,{onClick:()=>{q(a.name),N(!0)},variant:"outline",size:"sm",className:t("gap-1.5","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(J,{className:"h-3.5 w-3.5"}),"Copy"]}),e.jsxs(n,{onClick:()=>Be(a.name),variant:"outline",size:"sm",className:t("gap-1.5","text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300","ophelia:text-[#f87171] ophelia:hover:text-[#fca5a5]","ophelia:border-[#262626] ophelia:hover:bg-[#1a1a1a]"),children:[e.jsx(ia,{className:"h-3.5 w-3.5"}),"Delete"]})]})]})},a.name))})})]}),e.jsxs("div",{className:t("rounded-xl border overflow-hidden","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("button",{onClick:()=>u("advanced"),className:t("w-full flex items-center justify-between p-4","hover:bg-gray-50 dark:hover:bg-dark-50 ophelia:hover:bg-[#121212]","transition-colors"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:t("p-2 rounded-lg","bg-amber-100 dark:bg-amber-900/30 ophelia:bg-[#f59e0b]/20"),children:e.jsx(da,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 ophelia:text-[#fbbf24]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa]",children:"Advanced Actions"})]}),g.has("advanced")?e.jsx(I,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"}):e.jsx(O,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})]}),g.has("advanced")&&e.jsx("div",{className:"p-4 pt-0",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs(n,{onClick:()=>F(!0),variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(pe,{className:"h-5 w-5 text-purple-500 ophelia:text-[#a855f7]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Create Model"}),e.jsx("div",{className:"text-xs opacity-70",children:"From Modelfile"})]})]}),e.jsxs(n,{onClick:()=>N(!0),variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(J,{className:"h-5 w-5 text-blue-500 ophelia:text-[#60a5fa]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Copy Model"}),e.jsx("div",{className:"text-xs opacity-70",children:"Duplicate existing"})]})]}),e.jsxs(n,{onClick:()=>Y(!0),variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(be,{className:"h-5 w-5 text-green-500 ophelia:text-[#4ade80]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Test Embeddings"}),e.jsx("div",{className:"text-xs opacity-70",children:"Generate vectors"})]})]}),e.jsxs(n,{onClick:async()=>{try{(await c.checkHealth()).success&&(B(!0),l.success("Ollama is healthy!"))}catch{B(!1),l.error("Ollama health check failed")}},variant:"outline",className:t("w-full gap-2 justify-start h-auto py-3 px-4","ophelia:border-[#262626] ophelia:text-[#a3a3a3]","ophelia:hover:bg-[#1a1a1a] ophelia:hover:text-[#fafafa]"),children:[e.jsx(oa,{className:"h-5 w-5 text-rose-500 ophelia:text-[#fb7185]"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-medium",children:"Health Check"}),e.jsx("div",{className:"text-xs opacity-70",children:"Test connection"})]})]})]})})]}),Ce&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>V(!1)}),e.jsxs("div",{className:t("relative w-full max-w-2xl max-h-[85vh] overflow-hidden rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:["Model Details: ",we]}),e.jsx("button",{onClick:()=>V(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(85vh-60px)] p-4 space-y-4",children:Se?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(m,{className:"h-6 w-6 animate-spin text-gray-400 ophelia:text-[#737373]"})}):i?e.jsxs(e.Fragment,{children:[i.details&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Model Information"}),e.jsx("div",{className:t("p-3 rounded-lg text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]"),children:e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.details.family&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Family:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.family})]}),i.details.parameter_size&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Parameters:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.parameter_size})]}),i.details.quantization_level&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Quantization:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.quantization_level})]}),i.details.format&&e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-500 ophelia:text-[#737373]",children:"Format:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:i.details.format})]})]})})]}),i.system&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"System Prompt"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.system})]}),i.template&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Template"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-40","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.template})]}),i.parameters&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Parameters"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.parameters})]}),i.license&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"License"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-32","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.license})]}),i.modelfile&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-2",children:"Modelfile"}),e.jsx("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-60","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:i.modelfile})]})]}):e.jsx("p",{className:"text-center text-gray-500 ophelia:text-[#737373]",children:"No details available"})})]})]}),document.body),ze&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>N(!1)}),e.jsxs("div",{className:t("relative w-full max-w-md rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:"Copy Model"}),e.jsx("button",{onClick:()=>N(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Source Model"}),e.jsxs("select",{value:P,onChange:a=>q(a.target.value),className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]"),children:[e.jsx("option",{value:"",children:"Select a model..."}),x.map(a=>e.jsx("option",{value:a.name,children:a.name},a.name))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"New Model Name"}),e.jsx("input",{type:"text",value:w,onChange:a=>ae(a.target.value),placeholder:"e.g., my-custom-model",className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]")})]}),e.jsxs(n,{onClick:Te,disabled:!P.trim()||!w.trim()||W,className:t("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[W?e.jsx(m,{className:"h-4 w-4 animate-spin"}):e.jsx(J,{className:"h-4 w-4"}),W?"Copying...":"Copy Model"]})]})]})]}),document.body),Ee&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>F(!1)}),e.jsxs("div",{className:t("relative w-full max-w-lg rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:"Create Custom Model"}),e.jsx("button",{onClick:()=>F(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Model Name"}),e.jsx("input",{type:"text",value:M,onChange:a=>re(a.target.value),placeholder:"e.g., my-assistant",className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Modelfile"}),e.jsx("textarea",{value:L,onChange:a=>se(a.target.value),placeholder:`FROM llama3.2
|
|
2
2
|
SYSTEM You are a helpful assistant.`,rows:8,className:t("w-full px-3 py-2 rounded-lg border text-sm font-mono","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]","resize-none")}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 ophelia:text-[#737373]",children:["See"," ",e.jsx("a",{href:"https://github.com/ollama/ollama/blob/main/docs/modelfile.md",target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 ophelia:text-[#a855f7] hover:underline",children:"Modelfile docs"})," ","for syntax reference"]})]}),e.jsxs(n,{onClick:Ie,disabled:!M.trim()||!L.trim()||U,className:t("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[U?e.jsx(m,{className:"h-4 w-4 animate-spin"}):e.jsx(pe,{className:"h-4 w-4"}),U?"Creating...":"Create Model"]})]})]})]}),document.body),Pe&&_.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>Y(!1)}),e.jsxs("div",{className:t("relative w-full max-w-lg rounded-xl border shadow-2xl","bg-white dark:bg-dark-100 ophelia:bg-[#0a0a0a]","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsxs("div",{className:t("flex items-center justify-between p-4 border-b","border-gray-200 dark:border-dark-300 ophelia:border-[#1a1a1a]"),children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]",children:"Test Embeddings"}),e.jsx("button",{onClick:()=>Y(!1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#1a1a1a]",children:e.jsx(S,{className:"h-5 w-5 text-gray-500 ophelia:text-[#737373]"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Embedding Model"}),e.jsxs("select",{value:D,onChange:a=>Fe(a.target.value),className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]"),children:[e.jsx("option",{value:"",children:"Select a model..."}),x.map(a=>e.jsx("option",{value:a.name,children:a.name},a.name))]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 ophelia:text-[#737373]",children:"Recommended: nomic-embed-text, mxbai-embed-large"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:"Input Text"}),e.jsx("textarea",{value:R,onChange:a=>Le(a.target.value),placeholder:"Enter text to generate embeddings for...",rows:3,className:t("w-full px-3 py-2 rounded-lg border text-sm","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","border-gray-200 dark:border-dark-300 ophelia:border-[#262626]","text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa]","placeholder-gray-500 ophelia:placeholder-[#525252]","resize-none")})]}),e.jsxs(n,{onClick:Oe,disabled:!D.trim()||!R.trim()||Z,className:t("w-full gap-2","ophelia:bg-[#9333ea] ophelia:hover:bg-[#7c3aed] ophelia:text-white"),children:[Z?e.jsx(m,{className:"h-4 w-4 animate-spin"}):e.jsx(be,{className:"h-4 w-4"}),Z?"Generating...":"Generate Embeddings"]}),A&&e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 ophelia:text-[#a3a3a3] mb-1",children:["Result (",A.length," dimensions)"]}),e.jsxs("pre",{className:t("p-3 rounded-lg text-xs overflow-x-auto max-h-32","bg-gray-50 dark:bg-dark-50 ophelia:bg-[#121212]","text-gray-700 dark:text-gray-300 ophelia:text-[#e5e5e5]"),children:["[",A.slice(0,10).join(", "),A.length>10&&", ..."," ]"]})]})]})]})]}),document.body)]})},ba=()=>e.jsx("div",{className:"h-full overflow-auto",children:e.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[e.jsxs("div",{className:"text-center max-w-md mx-auto mb-8",children:[e.jsx("h2",{className:"libre-brand text-4xl sm:text-5xl font-normal text-gray-900 dark:text-dark-800 ophelia:text-[#fafafa] mb-3",style:{fontWeight:300,letterSpacing:"0.01em"},children:"Models"}),e.jsx("p",{className:"text-gray-600 dark:text-dark-600 ophelia:text-[#a3a3a3] leading-relaxed",children:"Pull, manage, and monitor your Ollama models"})]}),e.jsx(na,{})]})});export{ba as ModelsPage,ba as default};
|