khoj 1.26.5.dev15__py3-none-any.whl → 1.26.5.dev35__py3-none-any.whl
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.
- khoj/configure.py +2 -2
- khoj/database/adapters/__init__.py +41 -28
- khoj/database/admin.py +2 -0
- khoj/database/management/commands/change_default_model.py +182 -0
- khoj/database/migrations/0071_subscription_enabled_trial_at_and_more.py +32 -0
- khoj/database/migrations/0072_entry_search_model.py +24 -0
- khoj/database/models/__init__.py +4 -1
- khoj/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/1279-f37ee4a388ebf544.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1603-b9d95833e0e025e8.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1970-1d6d0c1b00b4f343.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{3423-aad88d6c1f029135.js → 3423-8e9c420574a9fbe3.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/394-6bcb8c429f168f21.js +3 -0
- khoj/interface/compiled/_next/static/chunks/4602-8eeb4b76385ad159.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5512-94c7c2bbcf58c19d.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7113-f2e114d7034a0835.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{3678-ef0d20e267e9f010.js → 7883-b1305ec254213afe.js} +2 -2
- khoj/interface/compiled/_next/static/chunks/9479-4b443fdcc99141c9.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/page-adbf3cd470da248f.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-1688dead2f21270d.js → page-d3edae545a1b5393.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-460d262a3ef77503.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/factchecker/{page-f544113d240423e9.js → page-c8e5bd563a8155eb.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-88139ac728fe3533.js → page-337bba1c554d0742.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-3ada11cda5050eeb.js → page-a5c277eff207959e.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-60097571dd9f9d37.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-97c4e60105009649.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{webpack-95652a0eef2b0aeb.js → webpack-35c06f544e18305f.js} +1 -1
- khoj/interface/compiled/_next/static/css/76d55eb435962b19.css +25 -0
- khoj/interface/compiled/_next/static/css/{f84cf008d5ff4161.css → afd3d45cc65d55d8.css} +1 -1
- khoj/interface/compiled/agents/index.html +1 -1
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +1 -1
- khoj/interface/compiled/automations/index.txt +2 -2
- khoj/interface/compiled/chat/index.html +1 -1
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/factchecker/index.html +1 -1
- khoj/interface/compiled/factchecker/index.txt +2 -2
- khoj/interface/compiled/index.html +1 -1
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +2 -2
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/processor/content/text_to_entries.py +4 -2
- khoj/processor/image/generate.py +3 -3
- khoj/routers/api.py +3 -2
- khoj/routers/api_agents.py +41 -20
- khoj/routers/api_model.py +0 -33
- khoj/routers/{subscription.py → api_subscription.py} +20 -2
- khoj/routers/helpers.py +10 -10
- khoj/search_type/text_search.py +6 -2
- {khoj-1.26.5.dev15.dist-info → khoj-1.26.5.dev35.dist-info}/METADATA +1 -1
- {khoj-1.26.5.dev15.dist-info → khoj-1.26.5.dev35.dist-info}/RECORD +61 -57
- khoj/interface/compiled/_next/static/chunks/121-7024f479c297aef0.js +0 -1
- khoj/interface/compiled/_next/static/chunks/1603-bfc0b26e32ad88e3.js +0 -1
- khoj/interface/compiled/_next/static/chunks/477-ec86e93db10571c1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/51-e8f5bdb69b5ea421.js +0 -1
- khoj/interface/compiled/_next/static/chunks/6327-18f0b45cc5a13afb.js +0 -3
- khoj/interface/compiled/_next/static/chunks/7762-79f2205740622b5c.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9479-fcce773453e472c4.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/page-997bf85681256672.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-027e61d082025c50.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-fa11cafaec7ab39f.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-511186e77624eaec.js +0 -1
- khoj/interface/compiled/_next/static/css/825406e5ebee86d3.css +0 -25
- /khoj/interface/compiled/_next/static/{l0c66lMus19JlWgScUQtj → GH1Wb7mTB8D7ZsHW6iRF6}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{l0c66lMus19JlWgScUQtj → GH1Wb7mTB8D7ZsHW6iRF6}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2697-37579bcc7593dd5c.js → 2697-61fcba89fd87eab4.js} +0 -0
- {khoj-1.26.5.dev15.dist-info → khoj-1.26.5.dev35.dist-info}/WHEEL +0 -0
- {khoj-1.26.5.dev15.dist-info → khoj-1.26.5.dev35.dist-info}/entry_points.txt +0 -0
- {khoj-1.26.5.dev15.dist-info → khoj-1.26.5.dev35.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7762],{95289:function(e,a,t){t.d(a,{X:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),r.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="ArrowLeft"},31784:function(e,a,t){t.d(a,{a:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M252,124a60.14,60.14,0,0,0-32-53.08,52,52,0,0,0-92-32.11A52,52,0,0,0,36,70.92a60,60,0,0,0,0,106.14,52,52,0,0,0,92,32.13,52,52,0,0,0,92-32.13A60.05,60.05,0,0,0,252,124ZM88,204a28,28,0,0,1-26.85-20.07c1,0,1.89.07,2.85.07h8a12,12,0,0,0,0-24H64A36,36,0,0,1,52,90.05a12,12,0,0,0,8-11.32V72a28,28,0,0,1,56,0v60.18a51.61,51.61,0,0,0-7.2-3.85,12,12,0,1,0-9.6,22A28,28,0,0,1,88,204Zm104-44h-8a12,12,0,0,0,0,24h8c1,0,1.9,0,2.85-.07a28,28,0,1,1-38-33.61,12,12,0,1,0-9.6-22,51.61,51.61,0,0,0-7.2,3.85V72a28,28,0,0,1,56,0v6.73a12,12,0,0,0,8,11.32,36,36,0,0,1-12,70Zm16-44a12,12,0,0,1-12,12,40,40,0,0,1-40-40V84a12,12,0,0,1,24,0v4a16,16,0,0,0,16,16A12,12,0,0,1,208,116ZM100,88a40,40,0,0,1-40,40,12,12,0,0,1,0-24A16,16,0,0,0,76,88V84a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,124a48,48,0,0,1-32,45.27h0V176a40,40,0,0,1-80,0,40,40,0,0,1-80,0v-6.73h0a48,48,0,0,1,0-90.54V72a40,40,0,0,1,80,0,40,40,0,0,1,80,0v6.73A48,48,0,0,1,240,124Z",opacity:"0.2"}),r.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212,76V72a44,44,0,0,0-74.86-31.31,3.93,3.93,0,0,0-1.14,2.8v88.72a4,4,0,0,0,6.2,3.33A47.67,47.67,0,0,1,167.68,128a8.18,8.18,0,0,1,8.31,7.58,8,8,0,0,1-8,8.42,32,32,0,0,0-32,32v33.88a4,4,0,0,0,1.49,3.12,47.92,47.92,0,0,0,74.21-17.16,4,4,0,0,0-4.49-5.56A68.06,68.06,0,0,1,192,192h-7.73a8.18,8.18,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h8a51.6,51.6,0,0,0,24-5.88v0A52,52,0,0,0,212,76Zm-12,36h-4a36,36,0,0,1-36-36V72a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4a8,8,0,0,1,0,16ZM88,28A44.05,44.05,0,0,0,44,72v4a52,52,0,0,0-4,94.12h0A51.6,51.6,0,0,0,64,176h7.73A8.18,8.18,0,0,1,80,183.47,8,8,0,0,1,72,192H64a67.48,67.48,0,0,1-15.21-1.73,4,4,0,0,0-4.5,5.55A47.93,47.93,0,0,0,118.51,213a4,4,0,0,0,1.49-3.12V176a32,32,0,0,0-32-32,8,8,0,0,1-8-8.42A8.18,8.18,0,0,1,88.32,128a47.67,47.67,0,0,1,25.48,7.54,4,4,0,0,0,6.2-3.33V43.49a4,4,0,0,0-1.14-2.81A43.85,43.85,0,0,0,88,28Zm8,48a36,36,0,0,1-36,36H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,76V72a8,8,0,0,1,16,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M246,124a54.13,54.13,0,0,0-32-49.33V72a46,46,0,0,0-86-22.67A46,46,0,0,0,42,72v2.67a54,54,0,0,0,0,98.63V176a46,46,0,0,0,86,22.67A46,46,0,0,0,214,176v-2.7A54.07,54.07,0,0,0,246,124ZM88,210a34,34,0,0,1-34-32.94A53.67,53.67,0,0,0,64,178h8a6,6,0,0,0,0-12H64A42,42,0,0,1,50,84.39a6,6,0,0,0,4-5.66V72a34,34,0,0,1,68,0v73.05A45.89,45.89,0,0,0,88,130a6,6,0,0,0,0,12,34,34,0,0,1,0,68Zm104-44h-8a6,6,0,0,0,0,12h8a53.67,53.67,0,0,0,10-.94A34,34,0,1,1,168,142a6,6,0,0,0,0-12,45.89,45.89,0,0,0-34,15.05V72a34,34,0,0,1,68,0v6.73a6,6,0,0,0,4,5.66A42,42,0,0,1,192,166Zm14-54a6,6,0,0,1-6,6h-4a34,34,0,0,1-34-34V80a6,6,0,0,1,12,0v4a22,22,0,0,0,22,22h4A6,6,0,0,1,206,112ZM60,118H56a6,6,0,0,1,0-12h4A22,22,0,0,0,82,84V80a6,6,0,0,1,12,0v4A34,34,0,0,1,60,118Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,124a52.1,52.1,0,0,0-32-48V72a44,44,0,0,0-84-18.3A44,44,0,0,0,44,72v4a52,52,0,0,0,0,96v4a44,44,0,0,0,84,18.3A44,44,0,0,0,212,176v-4A52.07,52.07,0,0,0,244,124ZM88,212a36,36,0,0,1-36-36v-1.41A52.13,52.13,0,0,0,64,176h8a4,4,0,0,0,0-8H64A44,44,0,0,1,49.33,82.5,4,4,0,0,0,52,78.73V72a36,36,0,0,1,72,0v78.75A44,44,0,0,0,88,132a4,4,0,0,0,0,8,36,36,0,0,1,0,72Zm104-44h-8a4,4,0,0,0,0,8h8a52.13,52.13,0,0,0,12-1.41V176a36,36,0,1,1-36-36,4,4,0,0,0,0-8,44,44,0,0,0-36,18.75V72a36,36,0,0,1,72,0v6.73a4,4,0,0,0,2.67,3.77A44,44,0,0,1,192,168Zm12-56a4,4,0,0,1-4,4h-4a32,32,0,0,1-32-32V80a4,4,0,0,1,8,0v4a24,24,0,0,0,24,24h4A4,4,0,0,1,204,112ZM92,84a32,32,0,0,1-32,32H56a4,4,0,0,1,0-8h4A24,24,0,0,0,84,84V80a4,4,0,0,1,8,0Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="Brain"},83632:function(e,a,t){t.d(a,{K:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M80,176h96l-48,48ZM128,32,80,80h96Z",opacity:"0.2"}),r.createElement("path",{d:"M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="CaretUpDown"},68131:function(e,a,t){t.d(a,{C:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="Circle"},26058:function(e,a,t){t.d(a,{B:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.14,69.17,186.83,33.86A19.86,19.86,0,0,0,172.69,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V83.31A19.86,19.86,0,0,0,222.14,69.17ZM164,204H92V160h72Zm40,0H188V156a20,20,0,0,0-20-20H88a20,20,0,0,0-20,20v48H52V52H171l33,33ZM164,84a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h56A12,12,0,0,1,164,84Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,83.31V208a8,8,0,0,1-8,8H176V152a8,8,0,0,0-8-8H88a8,8,0,0,0-8,8v64H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z",opacity:"0.2"}),r.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM208,208H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M217.9,73.42,182.58,38.1a13.9,13.9,0,0,0-9.89-4.1H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V83.31A13.9,13.9,0,0,0,217.9,73.42ZM170,210H86V152a2,2,0,0,1,2-2h80a2,2,0,0,1,2,2Zm40-2a2,2,0,0,1-2,2H182V152a14,14,0,0,0-14-14H88a14,14,0,0,0-14,14v58H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H172.69a2,2,0,0,1,1.41.58L209.42,81.9a2,2,0,0,1,.58,1.41ZM158,72a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h56A6,6,0,0,1,158,72Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,74.83,181.17,39.51A11.93,11.93,0,0,0,172.69,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V83.31A11.93,11.93,0,0,0,216.49,74.83ZM172,212H84V152a4,4,0,0,1,4-4h80a4,4,0,0,1,4,4Zm40-4a4,4,0,0,1-4,4H180V152a12,12,0,0,0-12-12H88a12,12,0,0,0-12,12v60H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H172.69a4,4,0,0,1,2.82,1.17l35.32,35.32A4,4,0,0,1,212,83.31ZM156,72a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h56A4,4,0,0,1,156,72Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="FloppyDisk"},68029:function(e,a,t){t.d(a,{k:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="Info"},58284:function(e,a,t){t.d(a,{H:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="Lock"},12275:function(e,a,t){t.d(a,{M:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,76H100V56a28,28,0,0,1,28-28c13.51,0,25.65,9.62,28.24,22.39a12,12,0,1,0,23.52-4.78C174.87,21.5,153.1,4,128,4A52.06,52.06,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76Zm-4,128H52V100H204Zm-92-52a16,16,0,1,1,16,16A16,16,0,0,1,112,152Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),r.createElement("path",{d:"M208,80H96V56a32,32,0,0,1,32-32c15.37,0,29.2,11,32.16,25.59a8,8,0,0,0,15.68-3.18C171.32,24.15,151.2,8,128,8A48.05,48.05,0,0,0,80,56V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm0,128H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H96V56a32,32,0,0,1,32-32c15.37,0,29.2,11,32.16,25.59a8,8,0,0,0,15.68-3.18C171.32,24.15,151.2,8,128,8A48.05,48.05,0,0,0,80,56V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,82H94V56a34,34,0,0,1,34-34c16.3,0,31,11.69,34.12,27.19a6,6,0,0,0,11.76-2.38C169.55,25.48,150.26,10,128,10A46.06,46.06,0,0,0,82,56V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82Zm2,126a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H96V56a32,32,0,0,1,32-32c15.37,0,29.2,11,32.16,25.59a8,8,0,0,0,15.68-3.18C171.32,24.15,151.2,8,128,8A48.05,48.05,0,0,0,80,56V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm0,128H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,84H92V56a36,36,0,0,1,36-36c17.24,0,32.75,12.38,36.08,28.8a4,4,0,1,0,7.84-1.6C167.78,26.81,149.31,12,128,12A44.05,44.05,0,0,0,84,56V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84Zm4,124a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="LockOpen"},57691:function(e,a,t){t.d(a,{g:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),r.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="PaperPlaneTilt"},15780:function(e,a,t){t.d(a,{f:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M120,136V96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,48a12,12,0,1,0-12-12A12,12,0,0,0,128,184ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40ZM120,96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M122,136V96a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm6,26a10,10,0,1,0,10,10A10,10,0,0,0,128,162ZM222,56v56c0,51.94-25.12,83.4-46.2,100.64-22.73,18.6-45.27,24.89-46.22,25.15a6,6,0,0,1-3.16,0c-1-.26-23.49-6.55-46.22-25.15C59.12,195.4,34,163.94,34,112V56A14,14,0,0,1,48,42H208A14,14,0,0,1,222,56Zm-12,0a2,2,0,0,0-2-2H48a2,2,0,0,0-2,2v56c0,37.75,13.94,68.39,41.44,91.06A130.94,130.94,0,0,0,128,225.72a131.17,131.17,0,0,0,40.56-22.66C196.06,180.39,210,149.75,210,112Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,136V96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,48a12,12,0,1,0-12-12A12,12,0,0,0,128,184ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M124,136V96a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm4,28a8,8,0,1,0,8,8A8,8,0,0,0,128,164ZM220,56v56c0,51.16-24.73,82.12-45.47,99.1-22.4,18.32-44.55,24.5-45.48,24.76a4,4,0,0,1-2.1,0c-.93-.26-23.08-6.44-45.48-24.76C60.73,194.12,36,163.16,36,112V56A12,12,0,0,1,48,44H208A12,12,0,0,1,220,56Zm-8,0a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4v56c0,38.44,14.23,69.63,42.29,92.71A132.23,132.23,0,0,0,128,227.82a132.45,132.45,0,0,0,41.71-23.11C197.77,181.63,212,150.44,212,112Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="ShieldWarning"},9950:function(e,a,t){t.d(a,{u:function(){return V}});var r=t(2265),l=t(52195);let n=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M60,96v64a12,12,0,0,1-24,0V96a12,12,0,0,1,24,0ZM88,20A12,12,0,0,0,76,32V224a12,12,0,0,0,24,0V32A12,12,0,0,0,88,20Zm40,32a12,12,0,0,0-12,12V192a12,12,0,0,0,24,0V64A12,12,0,0,0,128,52Zm40,32a12,12,0,0,0-12,12v64a12,12,0,0,0,24,0V96A12,12,0,0,0,168,84Zm40-16a12,12,0,0,0-12,12v96a12,12,0,0,0,24,0V80A12,12,0,0,0,208,68Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,96v64H48V96Z",opacity:"0.2"}),r.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM72,152a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,32a8,8,0,0,1-16,0V72a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V88a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,8a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M54,96v64a6,6,0,0,1-12,0V96a6,6,0,0,1,12,0ZM88,26a6,6,0,0,0-6,6V224a6,6,0,0,0,12,0V32A6,6,0,0,0,88,26Zm40,32a6,6,0,0,0-6,6V192a6,6,0,0,0,12,0V64A6,6,0,0,0,128,58Zm40,32a6,6,0,0,0-6,6v64a6,6,0,0,0,12,0V96A6,6,0,0,0,168,90Zm40-16a6,6,0,0,0-6,6v96a6,6,0,0,0,12,0V80A6,6,0,0,0,208,74Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M52,96v64a4,4,0,0,1-8,0V96a4,4,0,0,1,8,0ZM88,28a4,4,0,0,0-4,4V224a4,4,0,0,0,8,0V32A4,4,0,0,0,88,28Zm40,32a4,4,0,0,0-4,4V192a4,4,0,0,0,8,0V64A4,4,0,0,0,128,60Zm40,32a4,4,0,0,0-4,4v64a4,4,0,0,0,8,0V96A4,4,0,0,0,168,92Zm40-16a4,4,0,0,0-4,4v96a4,4,0,0,0,8,0V80A4,4,0,0,0,208,76Z"}))]]);var c=Object.defineProperty,m=Object.defineProperties,o=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,Z=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,u=(e,a)=>{for(var t in a||(a={}))i.call(a,t)&&Z(e,t,a[t]);if(p)for(var t of p(a))A.call(a,t)&&Z(e,t,a[t]);return e},d=(e,a)=>m(e,o(a));let V=(0,r.forwardRef)((e,a)=>r.createElement(l.Z,d(u({ref:a},e),{weights:n})));V.displayName="Waveform"},40882:function(e,a,t){t.d(a,{Fw:function(){return s},fC:function(){return y},wy:function(){return b}});var r=t(2265),l=t(78149),n=t(98324),c=t(91715),m=t(1336),o=t(1584),p=t(25171),i=t(31383),A=t(53201),Z=t(57437),u="Collapsible",[d,V]=(0,n.b)(u),[h,f]=d(u),E=r.forwardRef((e,a)=>{let{__scopeCollapsible:t,open:l,defaultOpen:n,disabled:m,onOpenChange:o,...i}=e,[u=!1,d]=(0,c.T)({prop:l,defaultProp:n,onChange:o});return(0,Z.jsx)(h,{scope:t,disabled:m,contentId:(0,A.M)(),open:u,onOpenToggle:r.useCallback(()=>d(e=>!e),[d]),children:(0,Z.jsx)(p.WV.div,{"data-state":g(u),"data-disabled":m?"":void 0,...i,ref:a})})});E.displayName=u;var H="CollapsibleTrigger",b=r.forwardRef((e,a)=>{let{__scopeCollapsible:t,...r}=e,n=f(H,t);return(0,Z.jsx)(p.WV.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":g(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:a,onClick:(0,l.M)(e.onClick,n.onOpenToggle)})});b.displayName=H;var v="CollapsibleContent",s=r.forwardRef((e,a)=>{let{forceMount:t,...r}=e,l=f(v,e.__scopeCollapsible);return(0,Z.jsx)(i.z,{present:t||l.open,children:e=>{let{present:t}=e;return(0,Z.jsx)(M,{...r,ref:a,present:t})}})});s.displayName=v;var M=r.forwardRef((e,a)=>{let{__scopeCollapsible:t,present:l,children:n,...c}=e,i=f(v,t),[A,u]=r.useState(l),d=r.useRef(null),V=(0,o.e)(a,d),h=r.useRef(0),E=h.current,H=r.useRef(0),b=H.current,s=i.open||A,M=r.useRef(s),y=r.useRef();return r.useEffect(()=>{let e=requestAnimationFrame(()=>M.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.b)(()=>{let e=d.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let a=e.getBoundingClientRect();h.current=a.height,H.current=a.width,M.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(l)}},[i.open,l]),(0,Z.jsx)(p.WV.div,{"data-state":g(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!s,...c,ref:V,style:{"--radix-collapsible-content-height":E?"".concat(E,"px"):void 0,"--radix-collapsible-content-width":b?"".concat(b,"px"):void 0,...e.style},children:s&&n})});function g(e){return e?"open":"closed"}var y=E}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9479],{59479:function(e,t,a){"use strict";a.d(t,{Z:function(){return eL}});var r=a(57437),n=a(37649),l=a.n(n),o=a(2265),s=a(11838),i=a.n(s);a(7395);var c=a(52195);let d=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M212.48,136.49l-82.06,82a60,60,0,0,1-84.85-84.88l98.16-97.89a40,40,0,0,1,56.56,56.59l-.17.16-95.8,92.22a12,12,0,1,1-16.64-17.3l95.71-92.12a16,16,0,0,0-22.7-22.56L62.53,150.57a36,36,0,0,0,50.93,50.91l82.06-82a12,12,0,0,1,17,17Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M180.75,104.75,204,128l-82.06,81.94a48,48,0,0,1-67.88-67.88L153.37,41.37a32,32,0,0,1,45.26,45.26Z",opacity:"0.2"}),o.createElement("path",{d:"M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,50.34a8,8,0,0,0-11.32,0L87.09,143A24,24,0,1,0,121,177l49.32-50.32a8,8,0,1,1,11.42,11.2l-49.37,50.38a40,40,0,1,1-56.62-56.51L143,63.09A24,24,0,1,1,177,97L109.71,165.6a8,8,0,1,1-11.42-11.2L165.6,85.71a8,8,0,0,0,.06-11.37Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208.25,123.76a6,6,0,0,1,0,8.49l-82.06,82a54,54,0,0,1-76.36-76.39L149.1,37.14a38,38,0,1,1,53.77,53.72L103.59,191.54a22,22,0,1,1-31.15-31.09l83.28-84.67a6,6,0,0,1,8.56,8.42L81,168.91a10,10,0,1,0,14.11,14.18L194.35,82.4a26,26,0,1,0-36.74-36.8L58.33,146.28a42,42,0,1,0,59.37,59.44l82.06-82A6,6,0,0,1,208.25,123.76Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M206.83,125.17a4,4,0,0,1,0,5.66l-82.06,82a52,52,0,0,1-73.54-73.55L150.52,38.55a36,36,0,1,1,50.94,50.9l-99.3,100.69a20,20,0,1,1-28.3-28.27l83.29-84.68a4,4,0,1,1,5.7,5.61L79.54,167.5a12,12,0,1,0,16.95,17L195.78,83.81A28,28,0,1,0,156.2,44.18L56.91,144.87a44,44,0,1,0,62.21,62.26l82-82A4,4,0,0,1,206.83,125.17Z"}))]]);var u=Object.defineProperty,m=Object.defineProperties,h=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,b=(e,t,a)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,x=(e,t)=>{for(var a in t||(t={}))f.call(t,a)&&b(e,a,t[a]);if(p)for(var a of p(t))g.call(t,a)&&b(e,a,t[a]);return e},j=(e,t)=>m(e,h(t));let v=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,j(x({ref:t},e),{weights:d})));v.displayName="Paperclip";let y=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),o.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]);var w=Object.defineProperty,E=Object.defineProperties,L=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,M=(e,t,a)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,V=(e,t)=>{for(var a in t||(t={}))Z.call(t,a)&&M(e,a,t[a]);if(A)for(var a of A(t))O.call(t,a)&&M(e,a,t[a]);return e},N=(e,t)=>E(e,L(t));let F=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,N(V({ref:t},e),{weights:y})));F.displayName="X";let H=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),o.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z"}))]]);var k=Object.defineProperty,C=Object.defineProperties,P=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,T=(e,t,a)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,I=(e,t)=>{for(var a in t||(t={}))S.call(t,a)&&T(e,a,t[a]);if(D)for(var a of D(t))R.call(t,a)&&T(e,a,t[a]);return e},z=(e,t)=>C(e,P(t));let _=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,z(I({ref:t},e),{weights:H})));_.displayName="Stop";let U=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),o.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]);var Y=Object.defineProperty,W=Object.defineProperties,$=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,X=(e,t,a)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,q=(e,t)=>{for(var a in t||(t={}))K.call(t,a)&&X(e,a,t[a]);if(J)for(var a of J(t))B.call(t,a)&&X(e,a,t[a]);return e},G=(e,t)=>W(e,$(t));let Q=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,G(q({ref:t},e),{weights:U})));Q.displayName="Microphone";let ee=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),o.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]);var et=Object.defineProperty,ea=Object.defineProperties,er=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,el=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,es=(e,t,a)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ei=(e,t)=>{for(var a in t||(t={}))el.call(t,a)&&es(e,a,t[a]);if(en)for(var a of en(t))eo.call(t,a)&&es(e,a,t[a]);return e},ec=(e,t)=>ea(e,er(t));let ed=(0,o.forwardRef)((e,t)=>o.createElement(c.Z,ec(ei({ref:t},e),{weights:ee})));ed.displayName="ArrowUp";var eu=a(42491),em=a(6780),eh=a(50495),ep=a(70571),ef=a(19573),eg=a(61485),eb=a(93146),ex=a(19666),ej=a(58575),ev=a(66820),ey=a(9557),ew=a(58485),eE=a(89417);function eL(e){let[t,a]=(0,o.useState)(""),n=(0,o.useRef)(null),[s,c]=(0,o.useState)(null),[d,u]=(0,o.useState)(null),[m,h]=(0,o.useState)(!1),[p,f]=(0,o.useState)(null),[g,b]=(0,o.useState)(!1),[x,j]=(0,o.useState)(!1),[y,w]=(0,o.useState)([]),[E,L]=(0,o.useState)([]),[A,Z]=(0,o.useState)(!1),[O,M]=(0,o.useState)(null),[V,N]=(0,o.useState)(0),[H,k]=(0,o.useState)(!1);function C(){if(x&&(j(!1),w([]),E.forEach(t=>e.sendImage(t))),t.trim()){if(!e.isLoggedIn){f("Hey there, you need to be signed in to send messages to Khoj AI"),b(!0);return}e.sendMessage(t.trim()),a("")}}function P(t){if(!e.isLoggedIn){f("Please login to chat with your files"),b(!0);return}let a=["jpg","jpeg","png","webp"],r=[];for(let e=0;e<t.length;e++){let n=t[e],l=n.name.split(".").pop();a.includes(l||"")&&r.push(i().sanitize(URL.createObjectURL(n)))}if(r.length>0){j(!0),w(e=>[...e,...r]);return}(0,ey.ko)(t,c,h,u,e.setUploadedFiles,e.conversationId)}async function D(){try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e,{mimeType:"audio/webm"}),r=[];t.ondataavailable=async e=>{r.push(e.data);let t=new Blob(r,{type:"audio/webm"}),n=new FormData;n.append("file",t);try{let e=await fetch("/api/transcribe",{method:"POST",body:n});if(!e.ok)throw Error("Network response was not ok");let t=await e.json();a(t.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},t.start(1500),t.onstop=async()=>{let e=new Blob(r,{type:"audio/webm"}),n=new FormData;n.append("file",e);try{let e=await fetch("/api/transcribe",{method:"POST",body:n});if(!e.ok)throw Error("Network response was not ok");let r=await e.json();t.stream.getTracks().forEach(e=>e.stop()),M(null),a(r.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},M(t)}catch(e){console.error("Error getting microphone",e)}}(0,o.useEffect)(()=>{if(m||N(0),m){let e=setInterval(()=>{N(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[m]),(0,o.useEffect)(()=>{async function e(){y.length>0&&L(await Promise.all(y.map(async e=>{let t=await fetch(e),a=await t.blob();return new Promise(e=>{let t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(a)})}))),h(!1)}h(!0),e()},[y]),(0,o.useEffect)(()=>{!A&&O&&O.stop(),A&&!O&&D()},[A,O]);let S=(0,o.useRef)(null);return(0,o.useEffect)(()=>{S.current&&(S.current.style.height="auto",S.current.style.height=Math.max(S.current.scrollHeight-24,64)+"px")},[t]),(0,r.jsxs)(r.Fragment,{children:[g&&p&&(0,r.jsx)(ev.Z,{onOpenChange:b,loginRedirectMessage:p}),m&&(0,r.jsx)(em.aR,{open:m,children:(0,r.jsxs)(em._T,{children:[(0,r.jsx)(em.fY,{children:(0,r.jsx)(em.f$,{children:"Uploading data. Please wait."})}),(0,r.jsx)(em.yT,{children:(0,r.jsx)(ep.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:V})}),(0,r.jsx)(em.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>h(!1),children:"Dismiss"})]})}),s&&(0,r.jsx)(em.aR,{open:null!==s,children:(0,r.jsxs)(em._T,{children:[(0,r.jsx)(em.fY,{children:(0,r.jsx)(em.f$,{children:"Data Upload Warning"})}),(0,r.jsx)(em.yT,{children:s}),(0,r.jsx)(em.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>c(null),children:"Close"})]})}),d&&(0,r.jsx)(em.aR,{open:null!==d,children:(0,r.jsxs)(em._T,{children:[(0,r.jsxs)(em.fY,{children:[(0,r.jsx)(em.f$,{children:"Oh no!"}),(0,r.jsx)(em.yT,{children:"Something went wrong while uploading your data"})]}),(0,r.jsx)(em.yT,{children:d}),(0,r.jsx)(em.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>u(null),children:"Close"})]})}),t.startsWith("/")&&1===t.split(" ").length&&(0,r.jsx)("div",{className:"flex justify-center text-center",children:(0,r.jsxs)(ef.J2,{open:t.startsWith("/"),children:[(0,r.jsx)(eg.xo,{className:"flex justify-center text-center"}),(0,r.jsx)(ef.yk,{onOpenAutoFocus:e=>e.preventDefault(),className:"".concat(e.isMobileWidth?"w-[100vw]":"w-full"," rounded-md"),children:(0,r.jsxs)(eu.mY,{className:"max-w-full",children:[(0,r.jsx)(eu.sZ,{placeholder:"Type a command or search...",value:t,className:"hidden"}),(0,r.jsxs)(eu.e8,{children:[(0,r.jsx)(eu.rb,{children:"No matching commands."}),(0,r.jsx)(eu.fu,{heading:"Agent Tools",children:e.chatOptionsData&&Object.entries(e.chatOptionsData).map(e=>{let[t,n]=e;return(0,r.jsx)(eu.di,{className:"text-md",onSelect:()=>{a("/".concat(t," "))},children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-1",children:[(0,r.jsxs)("div",{className:"font-bold flex items-center",children:[(0,eE.vH)(t,"h-4 w-4 mr-2"),"/",t]}),(0,r.jsx)("div",{children:n})]})},t)})}),(0,r.jsx)(eu.zz,{})]})]})})]})}),(0,r.jsxs)("div",{className:"".concat(l().actualInputArea," justify-between dark:bg-neutral-700 relative ").concat(H&&"animate-pulse"),onDragOver:function(e){e.preventDefault(),k(!0)},onDragLeave:function(e){e.preventDefault(),k(!1)},onDrop:function(e){e.preventDefault(),k(!1),e.dataTransfer.files&&P(e.dataTransfer.files)},children:[(0,r.jsx)("input",{type:"file",multiple:!0,ref:n,onChange:function(e){e.target.files&&P(e.target.files)},style:{display:"none"}}),(0,r.jsx)("div",{className:"flex items-end pb-4",children:(0,r.jsx)(eh.z,{variant:"ghost",className:"!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500",disabled:e.sendDisabled,onClick:function(){n.current&&n.current.click()},children:(0,r.jsx)(v,{className:"w-8 h-8"})})}),(0,r.jsxs)("div",{className:"flex-grow flex flex-col w-full gap-1.5 relative pb-2",children:[(0,r.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto",children:x&&y.map((e,t)=>(0,r.jsxs)("div",{className:"relative flex-shrink-0 pb-3 pt-2 group",children:[(0,r.jsx)("img",{src:e,alt:"img-".concat(t),className:"w-auto h-16 object-cover rounded-xl"}),(0,r.jsx)(eh.z,{variant:"ghost",size:"icon",className:"absolute -top-0 -right-2 h-5 w-5 rounded-full bg-neutral-200 dark:bg-neutral-600 hover:bg-neutral-300 dark:hover:bg-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{w(e=>e.filter((e,a)=>a!==t)),L(e=>e.filter((e,a)=>a!==t)),1===y.length&&j(!1)},children:(0,r.jsx)(F,{className:"h-3 w-3"})})]},t))}),(0,r.jsx)(eb.g,{ref:S,className:"border-none w-full h-16 min-h-16 max-h-[128px] md:py-4 rounded-lg resize-none dark:bg-neutral-700 ".concat(e.isMobileWidth?"text-md":"text-lg"),placeholder:"Type / to see a list of commands",id:"message",autoFocus:!0,value:t,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(j(!1),w([]),e.preventDefault(),C())},onChange:e=>a(e.target.value),disabled:e.sendDisabled||A})]}),(0,r.jsxs)("div",{className:"flex items-end pb-4",children:[A?(0,r.jsx)(ex.pn,{children:(0,r.jsxs)(ex.u,{children:[(0,r.jsx)(ex.aJ,{asChild:!0,children:(0,r.jsx)(eh.z,{variant:"default",className:"".concat(!A&&"hidden"," ").concat(e.agentColor?(0,ej.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{Z(!A)},disabled:e.sendDisabled,children:(0,r.jsx)(_,{weight:"fill",className:"w-6 h-6"})})}),(0,r.jsx)(ex._v,{children:"Click to stop recording and transcribe your voice."})]})}):O?(0,r.jsx)(ew.l,{}):(0,r.jsx)(ex.pn,{children:(0,r.jsxs)(ex.u,{children:[(0,r.jsx)(ex.aJ,{asChild:!0,children:(0,r.jsx)(eh.z,{variant:"default",className:"".concat(!t||A||"hidden"," ").concat(e.agentColor?(0,ej.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{a("Listening..."),Z(!A)},disabled:e.sendDisabled,children:(0,r.jsx)(Q,{weight:"fill",className:"w-6 h-6"})})}),(0,r.jsx)(ex._v,{children:"Click to transcribe your message with voice."})]})}),(0,r.jsx)(eh.z,{className:"".concat((!t||A)&&"hidden"," ").concat(e.agentColor?(0,ej.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:C,disabled:e.sendDisabled,children:(0,r.jsx)(ed,{className:"w-6 h-6",weight:"bold"})})]})]})]})}},66820:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var r=a(57437),n=a(6780),l=a(87138);function o(e){return(0,r.jsx)(n.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,r.jsxs)(n._T,{children:[(0,r.jsx)(n.fY,{children:(0,r.jsx)(n.f$,{children:"Sign in to Khoj to continue"})}),(0,r.jsxs)(n.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,r.jsx)(l.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,r.jsxs)(n.xo,{children:[(0,r.jsx)(n.le,{children:"Dismiss"}),(0,r.jsx)(n.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,r.jsxs)(l.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},70571:function(e,t,a){"use strict";a.d(t,{E:function(){return s}});var r=a(57437),n=a(2265),l=a(52431),o=a(37440);let s=n.forwardRef((e,t)=>{let{className:a,value:n,indicatorColor:s,...i}=e;return(0,r.jsx)(l.fC,{ref:t,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",a),...i,children:(0,r.jsx)(l.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(s),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});s.displayName=l.fC.displayName},93146:function(e,t,a){"use strict";a.d(t,{g:function(){return o}});var r=a(57437),n=a(2265),l=a(37440);let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("textarea",{className:(0,l.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...n})});o.displayName="Textarea"},19666:function(e,t,a){"use strict";a.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return s},u:function(){return i}});var r=a(57437),n=a(2265),l=a(27071),o=a(37440);let s=l.zt,i=l.fC,c=l.xz,d=n.forwardRef((e,t)=>{let{className:a,sideOffset:n=4,...s}=e;return(0,r.jsx)(l.VY,{ref:t,sideOffset:n,className:(0,o.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...s})});d.displayName=l.VY.displayName},37649:function(e){e.exports={actualInputArea:"chatInputArea_actualInputArea__Ha6cN"}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{1813:function(e,t,s){Promise.resolve().then(s.bind(s,45050))},45050:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return em}});var a=s(57437),l=s(15283),n=s.n(l),r=s(29039),i=s(2265),o=s(79306),c=s(50495),d=s(58284),u=s(5989),h=s(12275),m=s(18444),x=s(31784),f=s(20319),p=s(98750),g=s(55362),j=s(57691),v=s(68029),b=s(68131),N=s(83632),y=s(9950),w=s(35418),_=s(84120),C=s(95289),k=s(26100),S=s(26058),O=s(15780),z=s(64945),T=s(59772),I=s(36013),P=s(90837),R=s(66820),V=s(58485),M=s(48861),A=s(89417),E=s(58575),B=s(47412),Z=s(69591),q=s(32653),F=s(39343),L=s(83102),W=s(31014),D=s(93146),J=s(46294),X=s(13304),Y=s(40882);let G=Y.fC,U=Y.wy,K=Y.Fw;var $=s(37440),Q=s(42491),H=s(9557),ee=s(6780),et=s(70571),es=s(19573),ea=s(18642),el=s(19666);async function en(e,t){let s="/login?next=/agents?agent=".concat(e);if(!t){window.location.href=s;return}let a=await fetch("/api/chat/sessions?agent_slug=".concat(encodeURIComponent(e)),{method:"POST"}),l=await a.json();200==a.status?window.location.href="/chat?conversationId=".concat(l.conversation_id):403==a.status||401==a.status?window.location.href=s:alert("Failed to start chat session")}function er(e){var t;let s=(null===(t=e.text)||void 0===t?void 0:t.replace(/^\w/,e=>e.toUpperCase()))||"";return(0,a.jsx)(el.pn,{children:(0,a.jsxs)(el.u,{children:[(0,a.jsx)(el._v,{asChild:!0,children:(0,a.jsx)("div",{className:"text-sm",children:e.hoverText||s})}),(0,a.jsx)(el.aJ,{className:"cursor-text",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full border-accent-500 border p-1.5",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:e.icon}),s&&s.length>0&&(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:s})]})})]})})}let ei=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e)),eo=e=>fetch(e).then(e=>e.json());function ec(e){let[t,s]=(0,i.useState)(e.agentSlug===e.data.slug),[l,r]=(0,i.useState)(!1),[o,v]=(0,i.useState)(null),b=(0,a.jsx)(d.H,{}),N="Private agents are only visible to you.";"public"===e.data.privacy_level?(b=(0,a.jsx)(u.T,{}),N="Public agents are visible to everyone."):"protected"===e.data.privacy_level&&(b=(0,a.jsx)(h.M,{}),N="Protected agents are visible to anyone with a direct link.");let y=e.userProfile,w=(0,F.cI)({resolver:(0,W.F)(ed),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.data.chat_model,files:e.data.files,input_tools:e.data.input_tools,output_modes:e.data.output_modes}});(0,i.useEffect)(()=>{w.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.data.chat_model,files:e.data.files,input_tools:e.data.input_tools,output_modes:e.data.output_modes})},[e.data]),t&&window.history.pushState({},"Khoj AI - Agent ".concat(e.data.slug),"/agents?agent=".concat(e.data.slug));let _=(0,E.oz)(e.data.color);function C(){return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[e.editCard&&(0,a.jsx)(er,{icon:b,text:e.data.privacy_level,hoverText:N}),e.data.files&&e.data.files.length>0&&(0,a.jsx)(er,{icon:(0,a.jsx)(m.f,{}),text:"knowledge",hoverText:"The agent has a custom knowledge base with ".concat(e.data.files.length," documents. It can use them to give you answers.")}),(0,a.jsx)(er,{icon:(0,a.jsx)(x.a,{}),text:e.data.chat_model,hoverText:"The agent uses the ".concat(e.data.chat_model," model to chat with you.")}),e.data.output_modes.map(t=>(0,a.jsx)(er,{icon:(0,A.vH)(t),hoverText:"".concat(t,": ").concat(e.outputModeOptions[t])},t)),e.data.input_tools.map(t=>(0,a.jsx)(er,{icon:(0,A.vH)(t),hoverText:"".concat(t,": ").concat(e.inputToolOptions[t])},t))]})}return(0,a.jsxs)(I.Zb,{className:"shadow-sm bg-gradient-to-b from-white 20% to-".concat(e.data.color?e.data.color:"gray","-100/50 dark:from-[hsl(var(--background))] dark:to-").concat(e.data.color?e.data.color:"gray","-950/50 rounded-xl hover:shadow-md"),children:[l&&(0,a.jsx)(R.Z,{loginRedirectMessage:"Sign in to start chatting with ".concat(e.data.name),onOpenChange:r}),(0,a.jsx)(I.Ol,{children:(0,a.jsx)(I.ll,{children:(0,a.jsxs)(P.Vq,{open:t,onOpenChange:()=>{s(!t),window.history.pushState({},"Khoj AI - Agents","/agents")},children:[(0,a.jsx)(P.hg,{children:(0,a.jsxs)("div",{className:"flex items-center relative top-2",children:[(0,A.TI)(e.data.icon,e.data.color),e.data.name]})}),(0,a.jsxs)("div",{className:"flex float-right",children:[e.editCard&&(0,a.jsx)("div",{className:"float-right",children:(0,a.jsxs)(es.J2,{children:[(0,a.jsx)(es.xo,{children:(0,a.jsx)(c.z,{className:"bg-[hsl(var(--background))] w-10 h-10 p-0 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,a.jsx)(f.F,{className:"w-6 h-6 ".concat((0,E.oz)(e.data.color))})})}),(0,a.jsxs)(es.yk,{className:"w-fit grid p-1",side:"bottom",align:"end",children:[(0,a.jsxs)(c.z,{className:"items-center justify-start",variant:"ghost",onClick:()=>s(!0),children:[(0,a.jsx)(p.z,{className:"w-4 h-4 mr-2"}),"Edit"]}),e.editCard&&"private"!==e.data.privacy_level&&(0,a.jsx)(ea.Z,{buttonTitle:"Share",title:"Share Agent",description:"Share a link to this agent with others. They'll be able to chat with it, and ask questions to all of its knowledge base.",buttonVariant:"ghost",includeIcon:!0,url:"".concat(window.location.origin,"/agents?agent=").concat(e.data.slug)}),e.data.creator===(null==y?void 0:y.username)&&(0,a.jsxs)(c.z,{className:"items-center justify-start",variant:"destructive",onClick:()=>{fetch("/api/agents/".concat(e.data.slug),{method:"DELETE"}).then(()=>{e.setAgentChangeTriggered(!0)})},children:[(0,a.jsx)(g.r,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})}),(0,a.jsx)("div",{className:"float-right",children:e.userProfile?(0,a.jsx)(c.z,{className:"bg-[hsl(var(--background))] w-10 h-10 p-0 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>en(e.data.slug,y),children:(0,a.jsx)(j.g,{className:"w-6 h-6 ".concat((0,E.oz)(e.data.color))})}):(0,a.jsx)(c.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>r(!0),children:(0,a.jsx)(j.g,{className:"w-6 h-6 ".concat((0,E.oz)(e.data.color))})})})]}),e.editCard?(0,a.jsxs)(P.cZ,{className:"lg:max-w-screen-lg overflow-y-scroll max-h-screen",children:[(0,a.jsxs)(X.$N,{children:["Edit ",(0,a.jsx)("b",{children:e.data.name})]}),(0,a.jsx)(eu,{form:w,onSubmit:t=>{let a=e.editCard?"PATCH":"POST",l=t;e.editCard&&(l={...t,slug:e.data.slug}),fetch("/api/agents",{method:a,headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}).then(t=>{200===t.status?(w.reset(),s(!1),v(null),e.setAgentChangeTriggered(!0)):t.json().then(e=>{console.error(e),w.clearErrors(),e.error&&v(e.error)})}).catch(e=>{console.error("Error:",e),v(e),w.clearErrors()})},create:!1,errors:o,filesOptions:e.filesOptions,modelOptions:e.modelOptions,slug:e.data.slug,inputToolOptions:e.inputToolOptions,isSubscribed:e.isSubscribed,outputModeOptions:e.outputModeOptions})]}):(0,a.jsxs)(P.cZ,{className:"whitespace-pre-line max-h-[80vh] max-w-[90vw] rounded-lg",children:[(0,a.jsx)(P.fK,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,A.TI)(e.data.icon,e.data.color),(0,a.jsx)("p",{className:"font-bold text-lg",children:e.data.name})]})}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-scroll text-neutral-500 dark:text-white",children:e.data.persona}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1",children:C()}),(0,a.jsx)(P.cN,{children:(0,a.jsxs)(c.z,{className:"pt-6 pb-6 ".concat(_," bg-white dark:bg-[hsl(var(--background))] text-neutral-500 dark:text-white border-2 border-stone-100 shadow-sm rounded-xl hover:bg-stone-100 dark:hover:bg-neutral-900 dark:border-neutral-700"),onClick:()=>{en(e.data.slug,y),s(!1)},children:[(0,a.jsx)(j.g,{className:"w-6 h-6 m-2 ".concat((0,E.oz)(e.data.color))}),"Start Chatting"]})})]})]})})}),(0,a.jsx)(I.aY,{children:(0,a.jsx)("div",{className:n().agentPersonality,children:(0,a.jsx)("button",{className:"".concat(n().infoButton," text-neutral-500 dark:text-white"),onClick:()=>s(!0),children:(0,a.jsx)("p",{children:e.data.persona})})})}),(0,a.jsx)(I.eW,{children:(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1",children:C()})})]})}let ed=T.z.object({name:T.z.string({required_error:"Name is required"}).min(1,"Name is required"),persona:T.z.string({required_error:"Personality is required"}).min(1,"Personality is required"),color:T.z.string({required_error:"Color is required"}).min(1,"Color is required"),icon:T.z.string({required_error:"Icon is required"}).min(1,"Icon is required"),privacy_level:T.z.string({required_error:"Privacy level is required"}).min(1,"Privacy level is required"),chat_model:T.z.string({required_error:"Chat model is required"}).min(1,"Chat model is required"),files:T.z.array(T.z.string()).default([]).optional(),input_tools:T.z.array(T.z.string()).default([]).optional(),output_modes:T.z.array(T.z.string()).default([]).optional()});function eu(e){let[t,s]=(0,i.useState)(!1),l=(0,A.BI)(),n=E.xF,r=(0,E.oz)(e.form.getValues("color")),[o,d]=(0,i.useState)(!1),[u,h]=(0,i.useState)(null),[m,x]=(0,i.useState)(null),[f,p]=(0,i.useState)(!1),[g,j]=(0,i.useState)(0),[z,T]=(0,i.useState)([]),[I,P]=(0,i.useState)([]),[R,V]=(0,i.useState)(0),[M,Z]=(0,i.useState)(!0),F=["public","private","protected"],W=[{fields:[{name:"name",label:"Name"},{name:"persona",label:"Personality"}],label:"Basic Settings"},{fields:[{name:"color",label:"Color"},{name:"icon",label:"Icon"},{name:"chat_model",label:"Chat Model"},{name:"privacy_level",label:"Privacy Level"}],label:"Customization & Access"},{fields:[{name:"files",label:"Knowledge Base"},{name:"input_tools",label:"Input Tools"},{name:"output_modes",label:"Output Modes"}],label:"Advanced Settings"}],X=(0,i.useRef)(null);function Y(e){e.preventDefault(),d(!0)}function ea(e){e.preventDefault(),d(!1)}function el(e){e.preventDefault(),d(!1),e.dataTransfer.files&&en(e.dataTransfer.files)}function en(e){(0,H.ko)(e,h,p,x,T)}function er(){X&&X.current&&X.current.click()}function ei(e){e.target.files&&en(e.target.files)}(0,i.useEffect)(()=>{if(f||j(0),f){let e=setInterval(()=>{j(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[f]),(0,i.useEffect)(()=>{P(Array.from(new Set([...I,...e.form.getValues("files")||[],...e.filesOptions||[]])))},[]),(0,i.useEffect)(()=>{z.length>0&&(eo(z),P(e=>[...e,...z]))},[z]),(0,i.useEffect)(()=>{e.errors&&s(!1)},[e.errors]);let eo=t=>{for(let s of t){let t=e.form.getValues("files")||[],a=t.includes(s)?t.filter(e=>e!==s):[...t,s];e.form.setValue("files",a)}};if(!e.isSubscribed&&M)return(0,a.jsx)(ee.aR,{open:!0,children:(0,a.jsxs)(ee._T,{children:[(0,a.jsx)(ee.fY,{children:(0,a.jsx)(ee.f$,{children:"Upgrade to Futurist"})}),(0,a.jsxs)(ee.yT,{children:["You need to be a Futurist subscriber to create more agents."," ",(0,a.jsx)("a",{href:"/settings",children:"Upgrade now"}),"."]}),(0,a.jsxs)(ee.xo,{children:[(0,a.jsx)(ee.le,{onClick:()=>{Z(!1)},children:"Cancel"}),(0,a.jsx)(ee.OL,{onClick:()=>{window.location.href="/settings"},children:"Continue"})]})]})});let ec=t=>{switch(t){case"name":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"name",render:e=>{let{field:t}=e;return(0,a.jsxs)(q.xJ,{className:"space-y-0 grid gap-2",children:[(0,a.jsx)(q.lX,{children:"Name"}),(0,a.jsx)(q.pf,{children:"What should this agent be called? Pick something descriptive & memorable."}),(0,a.jsx)(q.NI,{children:(0,a.jsx)(L.I,{placeholder:"Biologist",...t})}),(0,a.jsx)(q.zG,{})]})}},t);case"chat_model":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"chat_model",render:t=>{let{field:s}=t;return(0,a.jsxs)(q.xJ,{className:"space-y-1 grid gap-2",children:[(0,a.jsx)(q.lX,{children:"Chat Model"}),(0,a.jsx)(q.pf,{children:"Which large language model should this agent use?"}),(0,a.jsxs)(J.Ph,{onValueChange:s.onChange,defaultValue:s.value,children:[(0,a.jsx)(q.NI,{children:(0,a.jsx)(J.i4,{className:"text-left",children:(0,a.jsx)(J.ki,{})})}),(0,a.jsx)(J.Bw,{className:"items-start space-y-1 inline-flex flex-col",children:e.modelOptions.map(e=>(0,a.jsx)(J.Ql,{value:e.name,children:(0,a.jsx)("div",{className:"flex items-center space-x-2",children:e.name})},e.id))})]}),(0,a.jsx)(q.zG,{})]})}},t);case"privacy_level":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"privacy_level",render:e=>{let{field:t}=e;return(0,a.jsxs)(q.xJ,{className:"space-y-1 grid gap-2",children:[(0,a.jsx)(q.lX,{children:(0,a.jsx)("div",{children:"Privacy Level"})}),(0,a.jsx)(q.pf,{children:(0,a.jsxs)(es.J2,{children:[(0,a.jsx)(es.xo,{asChild:!0,children:(0,a.jsx)(c.z,{variant:"ghost",className:"p-0 h-fit",children:(0,a.jsxs)("span",{className:"items-center flex gap-1 text-sm",children:[(0,a.jsx)(v.k,{className:"inline"}),(0,a.jsx)("p",{className:"text-sm",children:"Learn more"})]})})}),(0,a.jsxs)(es.yk,{children:[(0,a.jsx)("b",{children:"Private"}),": only visible to you.",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Protected"}),": visible to anyone with a link.",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Public"}),": visible to everyone.",(0,a.jsx)("br",{}),"All public agents will be reviewed by us before they are launched."]})]})}),(0,a.jsxs)(J.Ph,{onValueChange:t.onChange,defaultValue:t.value,children:[(0,a.jsx)(q.NI,{children:(0,a.jsx)(J.i4,{className:"w-[200px]",children:(0,a.jsx)(J.ki,{placeholder:"private"})})}),(0,a.jsx)(J.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:F.map(e=>(0,a.jsx)(J.Ql,{value:e,children:(0,a.jsx)("div",{className:"flex items-center space-x-2",children:e})},e))})]}),(0,a.jsx)(q.zG,{})]})}},t);case"color":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"color",render:e=>{let{field:t}=e;return(0,a.jsxs)(q.xJ,{className:"space-y-3",children:[(0,a.jsx)(q.lX,{children:"Color"}),(0,a.jsx)(q.pf,{children:"Choose a color for your agent."}),(0,a.jsxs)(J.Ph,{onValueChange:t.onChange,defaultValue:t.value,children:[(0,a.jsx)(q.NI,{children:(0,a.jsx)(J.i4,{className:"w-[200px]",children:(0,a.jsx)(J.ki,{placeholder:"Color"})})}),(0,a.jsx)(J.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:n.map(e=>(0,a.jsx)(J.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(b.C,{className:"w-6 h-6 mr-2 ".concat((0,E.oz)(e)),weight:"fill"}),e]})},e))})]}),(0,a.jsx)(q.zG,{})]})}},t);case"icon":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"icon",render:t=>{let{field:s}=t;return(0,a.jsxs)(q.xJ,{className:"space-y-3",children:[(0,a.jsx)(q.lX,{children:"Icon"}),(0,a.jsx)(q.pf,{children:"Choose an icon for your agent."}),(0,a.jsxs)(J.Ph,{onValueChange:s.onChange,defaultValue:s.value,children:[(0,a.jsx)(q.NI,{children:(0,a.jsx)(J.i4,{className:"w-[200px]",children:(0,a.jsx)(J.ki,{placeholder:"Icon"})})}),(0,a.jsx)(J.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:l.map(t=>(0,a.jsx)(J.Ql,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,A.TI)(t,e.form.getValues("color"),"w-6","h-6"),t]})},t))})]}),(0,a.jsx)(q.zG,{})]})}},t);case"persona":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"persona",render:e=>{let{field:t}=e;return(0,a.jsxs)(q.xJ,{className:"space-y-1 grid gap-2",children:[(0,a.jsx)(q.lX,{children:"Personality"}),(0,a.jsx)(q.pf,{children:"What is the personality, thought process, or tuning of this agent? Get creative; this is how you can influence the agent constitution."}),(0,a.jsx)(q.NI,{children:(0,a.jsx)(D.g,{placeholder:"You are an excellent biologist, at the top of your field in marine biology.",...t})}),(0,a.jsx)(q.zG,{})]})}},t);case"files":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"files",render:t=>{let{field:s}=t;return(0,a.jsxs)(q.xJ,{className:"flex flex-col gap-2",children:[(0,a.jsx)(q.lX,{children:"Knowledge Base"}),(0,a.jsxs)(q.pf,{children:["Which information should be part of its digital brain?"," ",(0,a.jsx)("a",{href:"/settings",children:"Manage data"}),"."]}),(0,a.jsxs)(G,{children:[(0,a.jsxs)(U,{className:"flex items-center justify-between text-sm gap-2",children:[(0,a.jsx)(N.K,{}),s.value&&s.value.length>0?"".concat(s.value.length," files selected"):"Select files"]}),(0,a.jsx)(K,{children:(0,a.jsxs)(Q.mY,{children:[(0,a.jsx)(ee.aR,{open:null!==u||null!=m,children:(0,a.jsxs)(ee._T,{children:[(0,a.jsx)(ee.fY,{children:(0,a.jsx)(ee.f$,{children:"Alert"})}),(0,a.jsx)(ee.yT,{children:u||m}),(0,a.jsx)(ee.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{h(null),x(null),p(!1)},children:"Close"})]})}),(0,a.jsxs)("div",{className:"flex flex-col h-full cursor-pointer",onDragOver:Y,onDragLeave:ea,onDrop:el,onClick:er,children:[(0,a.jsx)("input",{type:"file",multiple:!0,ref:X,style:{display:"none"},onChange:ei}),(0,a.jsx)("div",{className:"flex-none p-4",children:f&&(0,a.jsx)(et.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:g})}),(0,a.jsx)("div",{className:"flex-none p-4 bg-secondary border-b ".concat(o?"animate-pulse":""," rounded-lg"),children:(0,a.jsx)("div",{className:"flex items-center justify-center w-full h-16 border-2 border-dashed border-gray-300 rounded-lg",children:o?(0,a.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,a.jsx)(y.u,{className:"h-6 w-6 mr-2"}),(0,a.jsx)("span",{children:"Drop files to upload"})]}):(0,a.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,a.jsx)(w.v,{className:"h-6 w-6 mr-2"}),(0,a.jsx)("span",{children:"Drag and drop files here"})]})})})]}),(0,a.jsx)(Q.sZ,{placeholder:"Select files..."}),(0,a.jsxs)(Q.e8,{children:[(0,a.jsx)(Q.rb,{children:"No files found."}),(0,a.jsx)(Q.fu,{children:I.map(t=>(0,a.jsxs)(Q.di,{value:t,onSelect:()=>{let s=e.form.getValues("files")||[],a=s.includes(t)?s.filter(e=>e!==t):[...s,t];e.form.setValue("files",a)},children:[(0,a.jsx)(_.J,{className:(0,$.cn)("mr-2 h-4 w-4",s.value&&s.value.includes(t)?"opacity-100":"opacity-0")}),t]},t))})]})]})})]})]})}},t);case"input_tools":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"input_tools",render:t=>{let{field:s}=t;return(0,a.jsxs)(q.xJ,{className:"flex flex-col gap-2",children:[(0,a.jsx)(q.lX,{children:"Restrict Input Tools"}),(0,a.jsxs)(q.pf,{children:["Which knowledge retrieval tools should this agent be limited to?",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Default:"})," No limitations."]}),(0,a.jsxs)(G,{children:[(0,a.jsxs)(U,{className:"flex items-center justify-between text-sm gap-2",children:[(0,a.jsx)(N.K,{}),s.value&&s.value.length>0?"".concat(s.value.length," tools selected"):"All tools"]}),(0,a.jsx)(K,{children:(0,a.jsx)(Q.mY,{children:(0,a.jsx)(Q.e8,{children:(0,a.jsx)(Q.fu,{children:Object.entries(e.inputToolOptions).map(t=>{let[l,n]=t;return(0,a.jsxs)(Q.di,{value:l,onSelect:()=>{let t=e.form.getValues("input_tools")||[],s=t.includes(l)?t.filter(e=>e!==l):[...t,l];e.form.setValue("input_tools",s)},children:[(0,a.jsx)(_.J,{className:(0,$.cn)("mr-2 h-4 w-4",s.value&&s.value.includes(l)?"opacity-100":"opacity-0")}),(0,a.jsxs)("div",{className:(0,$.cn)("flex items-center space-x-2"),children:[(0,a.jsx)("p",{children:(0,a.jsx)("b",{children:l})}),(0,a.jsx)("p",{children:n})]})]},l)})})})})})]})]})}},t);case"output_modes":return(0,a.jsx)(q.Wi,{control:e.form.control,name:"output_modes",render:t=>{let{field:s}=t;return(0,a.jsxs)(q.xJ,{className:"flex flex-col gap-2",children:[(0,a.jsx)(q.lX,{children:"Restrict Output Modes"}),(0,a.jsxs)(q.pf,{children:["Which output modes should this agent be limited to?",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Default:"})," No limitations."]}),(0,a.jsxs)(G,{children:[(0,a.jsxs)(U,{className:"flex items-center justify-between text-sm gap-2",children:[(0,a.jsx)(N.K,{}),s.value&&s.value.length>0?"".concat(s.value.length," modes selected"):"All modes"]}),(0,a.jsx)(K,{children:(0,a.jsx)(Q.mY,{children:(0,a.jsx)(Q.e8,{children:(0,a.jsx)(Q.fu,{children:Object.entries(e.outputModeOptions).map(t=>{let[l,n]=t;return(0,a.jsxs)(Q.di,{value:l,onSelect:()=>{let t=e.form.getValues("output_modes")||[],s=t.includes(l)?t.filter(e=>e!==l):[...t,l];e.form.setValue("output_modes",s)},children:[(0,a.jsx)(_.J,{className:(0,$.cn)("mr-2 h-4 w-4",s.value&&s.value.includes(l)?"opacity-100":"opacity-0")}),(0,a.jsxs)("div",{className:(0,$.cn)("flex items-center space-x-2"),children:[(0,a.jsx)("p",{children:(0,a.jsx)("b",{children:l})}),(0,a.jsx)("p",{children:n})]})]},l)})})})})})]})]})}},t);default:return null}};return(0,a.jsx)(q.l0,{...e.form,children:(0,a.jsxs)("form",{onSubmit:e.form.handleSubmit(t=>{e.onSubmit(t),s(!0)}),className:"space-y-6",children:[(0,a.jsx)("div",{className:"space-y-6",children:W[R].label}),R<W.length&&W[R].fields.map(e=>ec(e.name)),(0,a.jsxs)("div",{className:"flex justify-between mt-4",children:[(0,a.jsxs)(c.z,{type:"button",variant:"outline",onClick:e=>{e.preventDefault(),R>0&&V(R-1)},disabled:0===R,className:"items-center ".concat(t?"bg-stone-100 dark:bg-neutral-900":""," text-white ").concat(r),children:[(0,a.jsx)(C.X,{className:"mr-2 h-4 w-4"}),"Previous"]}),R<W.length-1?(0,a.jsxs)(c.z,{type:"button",variant:"outline",onClick:e=>{e.preventDefault(),R<W.length-1&&V(R+1)},disabled:!(t=>{try{return ed.parse(e.form.getValues()),!0}catch(s){let e=s.errors.reduce((e,t)=>(e[t.path[0]]=t.message,e),{});for(let s of t.fields)if(e[s.name])return!1;return!0}})(W[R]),className:"items-center ".concat(t?"bg-stone-100 dark:bg-neutral-900":""," text-white ").concat(r),children:["Next",(0,a.jsx)(k.o,{className:"ml-2 h-4 w-4"})]}):(0,a.jsxs)(c.z,{type:"submit",variant:"outline",disabled:t||!e.isSubscribed,className:"items-center ".concat(t?"bg-stone-100 dark:bg-neutral-900":""," text-white ").concat(r),children:[(0,a.jsx)(S.B,{className:"h-4 w-4 mr-2"}),t?"Booting...":"Save"]})]}),e.errors&&(0,a.jsx)(B.bZ,{className:"bg-secondary border-none my-4",children:(0,a.jsxs)(B.X,{className:"flex items-center gap-1",children:[(0,a.jsx)(O.f,{weight:"fill",className:"h-4 w-4 text-yellow-400 inline"}),(0,a.jsx)("span",{children:e.errors})]})})]})})}function eh(e){let[t,s]=(0,i.useState)(!1),[l,n]=(0,i.useState)(null),[r,o]=(0,i.useState)(!0),c=(0,F.cI)({resolver:(0,W.F)(ed),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]}});return(0,i.useEffect)(()=>{c.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]})},[e.selectedChatModelOption,e.data]),(0,a.jsxs)(P.Vq,{open:t,onOpenChange:s,children:[(0,a.jsx)(P.hg,{children:(0,a.jsxs)("div",{className:"flex items-center text-md gap-2",children:[(0,a.jsx)(w.v,{}),"Create Agent"]})}),(0,a.jsxs)(P.cZ,{className:"lg:max-w-screen-lg overflow-y-scroll max-h-screen",children:[(0,a.jsx)(P.fK,{children:"Create Agent"}),!e.userProfile&&r&&(0,a.jsx)(R.Z,{loginRedirectMessage:"Sign in to start chatting with a specialized agent",onOpenChange:o}),(0,a.jsx)(eu,{form:c,onSubmit:t=>{fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(t=>{200===t.status?(c.reset(),s(!1),n(null),e.setAgentChangeTriggered(!0)):t.json().then(e=>{console.error(e),e.error&&n(e.error)})}).catch(e=>{console.error("Error:",e),n(e)})},create:!0,errors:l,filesOptions:e.filesOptions,modelOptions:e.modelOptions,inputToolOptions:e.inputToolOptions,outputModeOptions:e.outputModeOptions,isSubscribed:e.isSubscribed})]})]})}function em(){let{data:e,error:t,mutate:s}=(0,r.ZP)("agents",ei,{revalidateOnFocus:!1}),l=(0,o.GW)(),{userConfig:c}=(0,o.h2)(!0),[d,u]=(0,i.useState)(!1),h=(0,Z.IC)(),[m,x]=(0,i.useState)([]),[f,p]=(0,i.useState)([]),[g,j]=(0,i.useState)(null),{data:v,error:b}=(0,r.ZP)(c?"/api/content/computer":null,eo),{data:N,error:y}=(0,r.ZP)("/api/agents/options",eo),[w,_]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{w&&(s(),_(!1))},[w]),(0,i.useEffect)(()=>{if(e){x(e.filter(e=>e.creator===(null==l?void 0:l.username)));let t=e.filter(e=>"private"!==e.privacy_level&&e.creator!==(null==l?void 0:l.username));p(t);{let s=new URLSearchParams(window.location.search).get("agent");if(s){j(s);let a=e.find(e=>e.slug===s);a||(a=t.find(e=>e.slug===s)),a||fetch("/api/agents/".concat(s)).then(e=>{if(404===e.status)throw Error("Agent not found");return e.json()}).then(e=>{"protected"===e.privacy_level&&p(t=>[...t,e])})}}}},[e,l]),t)return(0,a.jsxs)("main",{className:n().main,children:[(0,a.jsx)("div",{className:"".concat(n().titleBar," text-5xl"),children:"Agents"}),(0,a.jsx)("div",{className:n().agentList,children:"Error loading agents"})]});if(!e)return(0,a.jsx)("main",{className:n().main,children:(0,a.jsxs)("div",{className:n().agentList,children:[(0,a.jsx)(V.l,{})," booting up your agents"]})});let C=(null==c?void 0:c.chat_model_options)||[],k=(null==c?void 0:c.selected_chat_model_config)||0,S=(null==c?void 0:c.subscription_state)&&[o.o9.SUBSCRIBED.valueOf(),o.o9.TRIAL.valueOf(),o.o9.UNSUBSCRIBED.valueOf()].includes(c.subscription_state)||!1,O=C.find(e=>e.id===k);return(0,a.jsx)("main",{className:"w-full mx-auto",children:(0,a.jsxs)("div",{className:"grid w-full mx-auto",children:[(0,a.jsx)("div",{className:"".concat(n().sidePanel," top-0"),children:(0,a.jsx)(M.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:h})}),(0,a.jsxs)("div",{className:"".concat(n().pageLayout," w-full"),children:[(0,a.jsxs)("div",{className:"pt-6 md:pt-8 flex justify-between",children:[(0,a.jsx)("h1",{className:"text-3xl flex items-center",children:"Agents"}),(0,a.jsx)("div",{className:"ml-auto float-right border p-2 pt-3 rounded-xl font-bold hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,a.jsx)(eh,{data:{slug:"",name:"",persona:"",color:"",icon:"",privacy_level:"private",managed_by_admin:!1,chat_model:"",input_tools:[],output_modes:[]},userProfile:l,isMobileWidth:h,filesOptions:v||[],modelOptions:(null==c?void 0:c.chat_model_options)||[],selectedChatModelOption:(null==O?void 0:O.name)||"",isSubscribed:S,setAgentChangeTriggered:_,inputToolOptions:(null==N?void 0:N.input_tools)||{},outputModeOptions:(null==N?void 0:N.output_modes)||{}})})]}),d&&(0,a.jsx)(R.Z,{loginRedirectMessage:"Sign in to start chatting with a specialized agent",onOpenChange:u}),(0,a.jsx)(B.bZ,{className:"bg-secondary border-none my-4",children:(0,a.jsxs)(B.X,{children:[(0,a.jsx)(z.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,a.jsx)("span",{className:"font-bold",children:"How it works"})," Use any of these specialized personas to tune your conversation to your needs."]})}),(0,a.jsx)("div",{className:"pt-6 md:pt-8",children:(0,a.jsx)("div",{className:"".concat(n().agentList),children:m.map(e=>(0,a.jsx)(ec,{data:e,userProfile:l,isMobileWidth:h,filesOptions:null!=v?v:[],selectedChatModelOption:(null==O?void 0:O.name)||"",isSubscribed:S,setAgentChangeTriggered:_,modelOptions:(null==c?void 0:c.chat_model_options)||[],editCard:!0,agentSlug:g||"",inputToolOptions:(null==N?void 0:N.input_tools)||{},outputModeOptions:(null==N?void 0:N.output_modes)||{}},e.slug))})}),(0,a.jsxs)("div",{className:"pt-6 md:pt-8",children:[(0,a.jsx)("h2",{className:"text-2xl",children:"Explore"}),(0,a.jsx)("div",{className:"".concat(n().agentList),children:f.map(e=>(0,a.jsx)(ec,{data:e,userProfile:l,isMobileWidth:h,editCard:!1,filesOptions:null!=v?v:[],selectedChatModelOption:(null==O?void 0:O.name)||"",isSubscribed:S,setAgentChangeTriggered:_,modelOptions:(null==c?void 0:c.chat_model_options)||[],agentSlug:g||"",inputToolOptions:(null==N?void 0:N.input_tools)||{},outputModeOptions:(null==N?void 0:N.output_modes)||{}},e.slug))})]})]})]})})}},66820:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var a=s(57437),l=s(6780),n=s(87138);function r(e){return(0,a.jsx)(l.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,a.jsxs)(l._T,{children:[(0,a.jsx)(l.fY,{children:(0,a.jsx)(l.f$,{children:"Sign in to Khoj to continue"})}),(0,a.jsxs)(l.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,a.jsx)(n.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,a.jsxs)(l.xo,{children:[(0,a.jsx)(l.le,{children:"Dismiss"}),(0,a.jsx)(l.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,a.jsxs)(n.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},18642:function(e,t,s){"use strict";s.d(t,{Z:function(){return c}});var a=s(57437),l=s(90837),n=s(50495),r=s(83102),i=s(67135),o=s(34797);function c(e){var t;return(0,a.jsxs)(l.Vq,{children:[(0,a.jsx)(l.hg,{asChild:!0,onClick:e.onShare,children:(0,a.jsxs)(n.z,{size:"sm",className:"".concat(e.buttonClassName||"px-3"),variant:null!==(t=e.buttonVariant)&&void 0!==t?t:"default",children:[e.includeIcon&&(0,a.jsx)(o.m,{className:"w-4 h-4 mr-2"}),e.buttonTitle]})}),(0,a.jsxs)(l.cZ,{children:[(0,a.jsxs)(l.fK,{children:[(0,a.jsx)(l.$N,{children:e.title}),(0,a.jsx)(l.Be,{children:e.description})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,a.jsx)(i._,{htmlFor:"link",className:"sr-only",children:"Link"}),(0,a.jsx)(r.I,{id:"link",defaultValue:e.url,readOnly:!0})]}),(0,a.jsx)(n.z,{type:"submit",size:"sm",className:"px-3",onClick:()=>(function(e){let t=navigator.clipboard;t&&t.writeText(e)})(e.url),children:(0,a.jsx)("span",{children:"Copy"})})]})]})]})}},47412:function(e,t,s){"use strict";s.d(t,{X:function(){return c},bZ:function(){return o}});var a=s(57437),l=s(2265),n=s(12218),r=s(37440);let i=(0,n.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=l.forwardRef((e,t)=>{let{className:s,variant:l,...n}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,r.cn)(i({variant:l}),s),...n})});o.displayName="Alert",l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)("h5",{ref:t,className:(0,r.cn)("mb-1 font-medium leading-none tracking-tight",s),...l})}).displayName="AlertTitle";let c=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",s),...l})});c.displayName="AlertDescription"},32653:function(e,t,s){"use strict";s.d(t,{NI:function(){return p},Wi:function(){return u},l0:function(){return c},lX:function(){return f},pf:function(){return g},xJ:function(){return x},zG:function(){return j}});var a=s(57437),l=s(2265),n=s(71538),r=s(39343),i=s(37440),o=s(67135);let c=r.RV,d=l.createContext({}),u=e=>{let{...t}=e;return(0,a.jsx)(d.Provider,{value:{name:t.name},children:(0,a.jsx)(r.Qr,{...t})})},h=()=>{let e=l.useContext(d),t=l.useContext(m),{getFieldState:s,formState:a}=(0,r.Gc)(),n=s(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...n}},m=l.createContext({}),x=l.forwardRef((e,t)=>{let{className:s,...n}=e,r=l.useId();return(0,a.jsx)(m.Provider,{value:{id:r},children:(0,a.jsx)("div",{ref:t,className:(0,i.cn)("space-y-2",s),...n})})});x.displayName="FormItem";let f=l.forwardRef((e,t)=>{let{className:s,...l}=e,{error:n,formItemId:r}=h();return(0,a.jsx)(o._,{ref:t,className:(0,i.cn)(n&&"text-destructive",s),htmlFor:r,...l})});f.displayName="FormLabel";let p=l.forwardRef((e,t)=>{let{...s}=e,{error:l,formItemId:r,formDescriptionId:i,formMessageId:o}=h();return(0,a.jsx)(n.g7,{ref:t,id:r,"aria-describedby":l?"".concat(i," ").concat(o):"".concat(i),"aria-invalid":!!l,...s})});p.displayName="FormControl";let g=l.forwardRef((e,t)=>{let{className:s,...l}=e,{formDescriptionId:n}=h();return(0,a.jsx)("p",{ref:t,id:n,className:(0,i.cn)("text-sm text-muted-foreground",s),...l})});g.displayName="FormDescription";let j=l.forwardRef((e,t)=>{let{className:s,children:l,...n}=e,{error:r,formMessageId:o}=h(),c=r?String(null==r?void 0:r.message):l;return c?(0,a.jsx)("p",{ref:t,id:o,className:(0,i.cn)("text-sm font-medium text-destructive",s),...n,children:c}):null});j.displayName="FormMessage"},67135:function(e,t,s){"use strict";s.d(t,{_:function(){return c}});var a=s(57437),l=s(2265),n=s(38364),r=s(12218),i=s(37440);let o=(0,r.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.f,{ref:t,className:(0,i.cn)(o(),s),...l})});c.displayName=n.f.displayName},70571:function(e,t,s){"use strict";s.d(t,{E:function(){return i}});var a=s(57437),l=s(2265),n=s(52431),r=s(37440);let i=l.forwardRef((e,t)=>{let{className:s,value:l,indicatorColor:i,...o}=e;return(0,a.jsx)(n.fC,{ref:t,className:(0,r.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",s),...o,children:(0,a.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(i),style:{transform:"translateX(-".concat(100-(l||0),"%)")}})})});i.displayName=n.fC.displayName},46294:function(e,t,s){"use strict";s.d(t,{Bw:function(){return f},Ph:function(){return d},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var a=s(57437),l=s(2265),n=s(77539),r=s(42421),i=s(14392),o=s(22468),c=s(37440);let d=n.fC;n.ZA;let u=n.B4,h=l.forwardRef((e,t)=>{let{className:s,children:l,...i}=e;return(0,a.jsxs)(n.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...i,children:[l,(0,a.jsx)(n.JO,{asChild:!0,children:(0,a.jsx)(r.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=n.xz.displayName;let m=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...l,children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})})});m.displayName=n.u_.displayName;let x=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...l,children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})});x.displayName=n.$G.displayName;let f=l.forwardRef((e,t)=>{let{className:s,children:l,position:r="popper",...i}=e;return(0,a.jsx)(n.h_,{children:(0,a.jsxs)(n.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:r,...i,children:[(0,a.jsx)(m,{}),(0,a.jsx)(n.l_,{className:(0,c.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),(0,a.jsx)(x,{})]})})});f.displayName=n.VY.displayName,l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...l})}).displayName=n.__.displayName;let p=l.forwardRef((e,t)=>{let{className:s,children:l,...r}=e;return(0,a.jsxs)(n.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...r,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(n.wU,{children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(n.eT,{children:l})]})});p.displayName=n.ck.displayName,l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",s),...l})}).displayName=n.Z0.displayName},93146:function(e,t,s){"use strict";s.d(t,{g:function(){return r}});var a=s(57437),l=s(2265),n=s(37440);let r=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...l})});r.displayName="Textarea"},19666:function(e,t,s){"use strict";s.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return i},u:function(){return o}});var a=s(57437),l=s(2265),n=s(27071),r=s(37440);let i=n.zt,o=n.fC,c=n.xz,d=l.forwardRef((e,t)=>{let{className:s,sideOffset:l=4,...i}=e;return(0,a.jsx)(n.VY,{ref:t,sideOffset:l,className:(0,r.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...i})});d.displayName=n.VY.displayName},15283:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",sidePanel:"agents_sidePanel__wGVGc",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}}},function(e){e.O(0,[9460,8918,9001,3062,8840,3110,51,7762,1603,9417,2971,7023,1744],function(){return e(e.s=1813)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,t,s){Promise.resolve().then(s.bind(s,38874))},38874:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(65104),n=s.n(o),i=s(2265),r=s(48861),c=s(82697),l=s(16463),d=s(58485),u=s(9557);s(7395);var h=s(69591),m=s(59479),g=s(79306);function f(e){let t=(0,l.useSearchParams)().get("conversationId"),[s,o]=(0,i.useState)(""),[r,d]=(0,i.useState)([]),[u,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),p=e.setQueryToProcess,x=e.onConversationIdChange,_=e.isMobileWidth?"w-full":"w-4/6";if((0,i.useEffect)(()=>{if(r.length>0){let t=r.map(e=>encodeURIComponent(e));e.setImages(t)}},[r,e.setImages]),(0,i.useEffect)(()=>{let t=localStorage.getItem("images");if(t){let s=JSON.parse(t);d(s);let a=s.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let s=localStorage.getItem("message");s&&(h(!0),p(s))},[p,e.setImages]),(0,i.useEffect)(()=>{s&&(h(!0),p(s))},[s,p]),(0,i.useEffect)(()=>{t&&(null==x||x(t))},[t,x]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(h(!1),d([])):o("")},[e.streamedMessages]),!t){window.location.href="/";return}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(c.Z,{conversationId:t,setTitle:e.setTitle,setAgent:f,pendingMessage:u?s:"",incomingMessages:e.streamedMessages,customClassName:_})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-t-2xl rounded-b-none md:rounded-xl h-fit ").concat(_," mr-auto ml-auto"),children:(0,a.jsx)(m.Z,{agentColor:null==g?void 0:g.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>o(e),sendImage:e=>d(t=>[...t,e]),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:t,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]})}function p(){let e="Khoj AI - Chat",[t,s]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[l,m]=(0,i.useState)(e),[p,x]=(0,i.useState)(null),[_,w]=(0,i.useState)([]),[y,I]=(0,i.useState)(""),[S,b]=(0,i.useState)(!1),[v,j]=(0,i.useState)([]),[B,C]=(0,i.useState)([]),E=(0,h.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},T=(0,g.GW)(),k=(0,h.IC)();async function M(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,a="␃\uD83D\uDD1A␗",o="",n=[],i={};for(;;){let e;let{done:r,value:c}=await t.read();if(r){I(""),b(!1),C([]);break}for(o+=s.decode(c,{stream:!0});-1!==(e=o.indexOf(a));){let t=o.slice(0,e);if(o=o.slice(e+a.length),t){let e=_.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:n,onlineContext:i}=(0,u.VK)(t,e,n,i)),w([..._])}}}}async function N(){if(localStorage.removeItem("message"),!y||!p)return;let e={q:y,conversation_id:p,stream:!0,...E&&{city:E.city,region:E.region,country:E.country,country_code:E.countryCode,timezone:E.timezone},...B.length>0&&{images:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await M(t)}catch(o){let e=await t.json();console.error(e);let s=_.find(e=>!e.completed);if(!s)return;let a=o.message;a.includes("Error in input stream")?s.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":429===t.status?"detail"in e?s.rawResponse="".concat(e.detail):s.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":s.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),s.completed=!0,w([..._]),I(""),b(!1)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{c(!1),e&&s(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,i.useEffect)(()=>{if(y){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:y||"",images:B};w(t=>[...t,e]),b(!0)}},[y]),(0,i.useEffect)(()=>{S&&N()},[S]),o)?(0,a.jsx)(d.Z,{}):(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(l&&l!==e?": ".concat(l):"")}),(0,a.jsx)("div",{children:(0,a.jsx)(r.ZP,{conversationId:p,uploadedFiles:v,isMobileWidth:k})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!k&&p&&(0,a.jsxs)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mr-8 pt-6 col-auto h-fit"),children:[l&&(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden",children:l}),(0,a.jsx)(r.En,{conversationId:p,setTitle:m,sizing:"md"})]}),(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(f,{isLoggedIn:null!==T,streamedMessages:_,chatOptionsData:t,setTitle:m,setQueryToProcess:I,setUploadedFiles:j,isMobileWidth:k,onConversationIdChange:e=>{x(e)},setImages:C})})]})})]})}},16463:function(e,t,s){"use strict";var a=s(71169);s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},65104:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq"}}},function(e){e.O(0,[8918,929,3954,9001,3062,8840,121,3110,6327,1603,9417,3423,9479,2697,2971,7023,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,s,t){Promise.resolve().then(t.bind(t,95982))},95982:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return eh}});var a,n,r=t(57437),l=t(55268),i=t.n(l);t(80541);var o=t(2265),c=t(35657),d=t(79306),h=t(69591),u=t(19748),m=t(50495),x=t(66431),p=t(32309),f=t(37440);let j=o.forwardRef((e,s)=>{let{className:t,containerClassName:a,...n}=e;return(0,r.jsx)(x.uZ,{ref:s,containerClassName:(0,f.cn)("flex items-center gap-2 has-[:disabled]:opacity-50",a),className:(0,f.cn)("disabled:cursor-not-allowed",t),...n})});j.displayName="InputOTP";let g=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,f.cn)("flex items-center",t),...a})});g.displayName="InputOTPGroup";let b=o.forwardRef((e,s)=>{let{index:t,className:a,...n}=e,{char:l,hasFakeCaret:i,isActive:c}=o.useContext(x.VM).slots[t];return(0,r.jsxs)("div",{ref:s,className:(0,f.cn)("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",c&&"z-10 ring-2 ring-ring ring-offset-background",a),...n,children:[l,i&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});b.displayName="InputOTPSlot",o.forwardRef((e,s)=>{let{...t}=e;return(0,r.jsx)("div",{ref:s,role:"separator",...t,children:(0,r.jsx)(p.Z,{})})}).displayName="InputOTPSeparator";var N=t(83102),y=t(36013),w=t(46910);let v=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:s,className:(0,f.cn)("w-full caption-bottom text-sm",t),...a})})});v.displayName="Table",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("thead",{ref:s,className:(0,f.cn)("[&_tr]:border-b",t),...a})}).displayName="TableHeader";let _=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("tbody",{ref:s,className:(0,f.cn)("[&_tr:last-child]:border-0",t),...a})});_.displayName="TableBody",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("tfoot",{ref:s,className:(0,f.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...a})}).displayName="TableFooter";let k=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("tr",{ref:s,className:(0,f.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...a})});k.displayName="TableRow",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("th",{ref:s,className:(0,f.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...a})}).displayName="TableHead";let S=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("td",{ref:s,className:(0,f.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...a})});S.displayName="TableCell",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("caption",{ref:s,className:(0,f.cn)("mt-4 text-sm text-muted-foreground",t),...a})}).displayName="TableCaption";var C=t(42491),T=t(9950),D=t(35418),E=t(15340),F=t(84120),P=t(55362),O=t(48252),I=t(60787),A=t(26058),z=t(95616),R=t(11961),Y=t(76782),Z=t(98325),K=t(96917),M=t(10813),W=t(56194),U=t(9476),B=t(43010),L=t(72151),V=t(53876),G=t(90445),H=t(17541),J=t(63205),$=t(49806),q=t(67722),X=t(57087),Q=t(27082),ee=t(26100),es=t(48861),et=t(58485),ea=t(47947),en=t(9557),er=t(6780),el=t(70571),ei=t(87138);let eo=e=>{let{onClose:s}=e,[t,a]=(0,o.useState)([]),[n,l]=(0,o.useState)([]),[i,c]=(0,o.useState)(""),[d,h]=(0,o.useState)(!1),[u,x]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[j,g]=(0,o.useState)(!1),[b,N]=(0,o.useState)(0),[y,w]=(0,o.useState)([]),v=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(j||N(0),j){let e=setInterval(()=>{N(e=>{let s=e+(Math.floor(5*Math.random())+1);return s<100?s:100})},800);return()=>clearInterval(e)}},[j]),(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/content/computer");if(!e.ok)throw Error("Failed to fetch files");let s=await e.json();Array.isArray(s)?a(s.toSorted()):console.error("Unexpected data format from API")}catch(e){console.error("Error fetching files:",e)}})()},[y]);let _=t.filter(e=>e.toLowerCase().includes(i.toLowerCase())),k=async()=>{let e=n.length>0?n:_;if(console.log("Delete selected files",e),0===e.length){console.log("No files to delete");return}try{if(!(await fetch("/api/content/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})})).ok)throw Error("Failed to delete files");a(s=>s.filter(s=>!e.includes(s))),l([]),console.log("Deleted files:",e)}catch(e){console.error("Error deleting files:",e)}},S=async e=>{console.log("Delete selected file",e);try{if(!(await fetch("/api/content/file?filename=".concat(encodeURIComponent(e)),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to delete file");a(s=>s.filter(s=>s!==e)),l(s=>s.filter(s=>s!==e)),console.log("Deleted file:",e)}catch(e){console.error("Error deleting file:",e)}};function O(e){(0,en.ko)(e,x,g,f,w)}return(0,r.jsxs)(C.m5,{open:!0,onOpenChange:s,children:[(0,r.jsx)(er.aR,{open:null!==u||null!=p,children:(0,r.jsxs)(er._T,{children:[(0,r.jsx)(er.fY,{children:(0,r.jsx)(er.f$,{children:"Alert"})}),(0,r.jsx)(er.yT,{children:u||p}),(0,r.jsx)(er.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{x(null),f(null),g(!1)},children:"Close"})]})}),(0,r.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),h(!0)},onDragLeave:function(e){e.preventDefault(),h(!1)},onDrop:function(e){e.preventDefault(),h(!1),e.dataTransfer.files&&O(e.dataTransfer.files)},onClick:function(){v&&v.current&&v.current.click()},children:[(0,r.jsx)("input",{type:"file",multiple:!0,ref:v,style:{display:"none"},onChange:function(e){e.target.files&&O(e.target.files)}}),(0,r.jsxs)("div",{className:"flex-none p-4",children:["Upload files",j&&(0,r.jsx)(el.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:b})]}),(0,r.jsx)("div",{className:"flex-none p-4 bg-secondary border-b ".concat(d?"animate-pulse":""," rounded-lg"),children:(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:d?(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(T.u,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drop files to upload"})]}):(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(D.v,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drag and drop files here"})]})})})]}),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-b",children:(0,r.jsx)(C.sZ,{placeholder:"Find synced files",value:i,onValueChange:c})}),(0,r.jsx)("div",{className:"flex-grow overflow-auto",children:(0,r.jsxs)(C.e8,{children:[(0,r.jsx)(C.rb,{children:0===t.length?(0,r.jsxs)("div",{className:"flex items-center justify-center",children:[(0,r.jsx)(E.C,{className:"h-4 w-4 mr-2",weight:"bold"}),"No files synced"]}):(0,r.jsxs)("div",{children:["Could not find a good match.",(0,r.jsx)(ei.default,{href:"/search",className:"block",children:"Need advanced search? Click here."})]})}),(0,r.jsx)(C.fu,{heading:"Synced files",children:_.map(e=>(0,r.jsx)(C.di,{value:e,onSelect:e=>{l(s=>s.includes(e)?s.filter(s=>s!==e):[...s,e])},children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,r.jsxs)("div",{className:"flex items-center ".concat(n.includes(e)?"font-semibold":""),children:[n.includes(e)&&(0,r.jsx)(F.J,{className:"h-4 w-4 mr-2"}),(0,r.jsx)("span",{className:"break-all",children:e})]}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>S(e),className:"ml-auto",children:(0,r.jsx)(P.r,{className:"h-4 w-4"})})]})},e))})]})}),(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-t",children:(0,r.jsx)("div",{className:"flex justify-between",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:k,className:"mr-2",children:[(0,r.jsx)(P.r,{className:"h-4 w-4 mr-2"}),n.length>0?"Delete Selected (".concat(n.length,")"):"Delete All"]})})})]})]})},ec=e=>{var s,t;let{items:a,selected:n,callbackFunc:l}=e,[i,c]=(0,o.useState)(null!==(t=null==n?void 0:n.toString())&&void 0!==t?t:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(w.h_,{children:[(0,r.jsx)(w.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(m.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(s=a.find(e=>e.id.toString()===i))||void 0===s?void 0:s.name," ",(0,r.jsx)(O.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(w.AW,{children:(0,r.jsx)(w._x,{value:i,onValueChange:async e=>{c(e),await l(e)},children:a.map(e=>(0,r.jsx)(w.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},ed=()=>{let[e,s]=(0,o.useState)([]),{toast:t}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),t=await e.json();s(e=>[...e,t])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),t({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&s(s=>s.filter(s=>s.token!==e))}catch(e){console.error("Error deleting API key:",e)}},l=async()=>{try{let e=await fetch("/auth/token"),t=await e.json();(null==t?void 0:t.length)>0&&s(t)}catch(e){console.error("Error listing API keys:",e)}};return(0,o.useEffect)(()=>{l()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function eh(){let[e,s]=(0,o.useState)("Settings"),{apiKeys:t,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:l}=ed(),{userConfig:x}=(0,d.h2)(!0),[p,f]=(0,o.useState)(null),[w,C]=(0,o.useState)(void 0),[F,O]=(0,o.useState)(null),[en,er]=(0,o.useState)(void 0),[el,ei]=(0,o.useState)(""),[eh,eu]=(0,o.useState)("verified"),[em,ex]=(0,o.useState)(!1),{toast:ep}=(0,c.pm)(),ef=(0,h.IC)(),ej="w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950";(0,o.useEffect)(()=>{var e;f(x),er(null==x?void 0:x.phone_number),eu((null==x?void 0:x.is_phone_number_verified)?"verified":(null==x?void 0:x.phone_number)?"otp":"setup"),C(null==x?void 0:x.given_name),O(null!==(e=null==x?void 0:x.notion_token)&&void 0!==e?e:null)},[x]);let eg=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(en),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");eu("verify")}catch(e){console.error("Error sending OTP:",e),ep({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},eb=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(el),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");eu("verified"),ep({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),ep({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},eN=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");er(void 0),eu("setup"),ep({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),ep({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},ey=async e=>{try{let s="/api/subscription?email=".concat(null==p?void 0:p.username,"&operation=").concat(e);if(!(await fetch(s,{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");p&&(p.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,f(p)),ep({title:"\uD83D\uDCB3 Subscription",description:(null==p?void 0:p.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(s){console.error("Error changing subscription:",s),ep({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},ew=async()=>{if(w)try{if(!(await fetch("/api/user/name?name=".concat(w),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");p&&(p.given_name=w,f(p)),ep({title:"✅ Updated Profile",description:"You name has been updated to ".concat(w)})}catch(e){console.error("Error updating name:",e),ep({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},ev=e=>async s=>{if(!(null==p?void 0:p.is_active)&&"search"!==e){ep({title:"Model Update",description:"You need to be subscribed to update ".concat(e," models"),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");ep({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(s){console.error("Failed to update ".concat(e," model:"),s),ep({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},e_=async()=>{if(F)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:F})})).ok)throw Error("Failed to save Notion API key");p&&(p.notion_token=F,f(p)),ep({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),ep({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ek=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));ep({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(s){console.error("Error syncing content:",s),ep({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eS=async e=>{try{if(!(await fetch("/api/content/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));p&&("computer"===e?p.enabled_content_source.computer=!1:"notion"===e?(p.enabled_content_source.notion=!1,p.notion_token=null,O(p.notion_token)):"github"===e&&(p.enabled_content_source.github=!1),f(p)),"computer"===e?ep({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):ep({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(s){console.error("Error disconnecting ".concat(e,":"),s),ep({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return p?(0,r.jsxs)("div",{className:i().page,children:[(0,r.jsx)("title",{children:e}),(0,r.jsx)("div",{className:i().sidePanel,children:(0,r.jsx)(es.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:ef})}),(0,r.jsx)("div",{className:i().content,children:(0,r.jsx)("div",{className:"".concat(i().contentBody," mx-10 my-2"),children:(0,r.jsx)(o.Suspense,{fallback:(0,r.jsx)(et.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(I.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(N.I,{type:"text",onChange:e=>C(e.target.value),value:w,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:ew,disabled:w===p.given_name,children:[(0,r.jsx)(A.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(y.Zb,{id:"subscription",className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(z.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(y.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a 14 day trial of the Khoj Futurist plan. Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"unsubscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"expired"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Free Plan"}),p.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>ey("cancel"),children:[(0,r.jsx)(R.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>ey("resubscribe"),children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(p.khoj_cloud_subscription_url,"?prefilled_email=").concat(p.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})})]})]})]}),em&&(0,r.jsx)(eo,{onClose:()=>ex(!1)}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(y.Zb,{id:"computer",className:ej,children:[(0,r.jsxs)(y.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(Z.I,{className:"h-8 w-8 mr-2"}),"Files",p.enabled_content_source.computer&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(y.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage your synced files"}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>ex(!0),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.computer||"hidden"),onClick:()=>eS("computer"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(y.Zb,{id:"github",className:"".concat(ej," hidden"),children:[(0,r.jsxs)(y.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(U.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(y.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",children:p.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(y.Zb,{id:"notion",className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(L.F,{className:"h-7 w-7 mr-2"}),"Notion",p.enabled_content_source.notion&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(y.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!p.notion_oauth_url&&(0,r.jsx)(N.I,{onChange:e=>O(e.target.value),value:F||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:[p.notion_oauth_url&&!p.enabled_content_source.notion?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>{window.open(p.notion_oauth_url)},children:[(0,r.jsx)(B.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):p.enabled_content_source.notion&&F===p.notion_token?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>ek("notion"),children:[(0,r.jsx)(V.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):p.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:e_,disabled:F===p.notion_token,children:[(0,r.jsx)(A.B,{className:"h-5 w-5 inline mr-1"}),p.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.notion_token||"hidden"),onClick:()=>eS("notion"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[p.chat_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(G.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(ec,{items:p.chat_model_options,selected:p.selected_chat_model_config,callbackFunc:ev("chat")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.search_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.r,{className:"h-7 w-7 mr-2"}),"Search"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the search model to find your documents"}),(0,r.jsx)(ec,{items:p.search_model_options,selected:p.selected_search_model_config,callbackFunc:ev("search")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4"})]}),p.paint_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(J.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(ec,{items:p.paint_model_options,selected:p.selected_paint_model_config,callbackFunc:ev("paint")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.voice_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(T.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(ec,{items:p.voice_model_options,selected:p.selected_voice_model_config,callbackFunc:ev("voice")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-8",children:[!p.anonymous_mode&&(0,r.jsxs)(y.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950",children:[(0,r.jsxs)(y.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)($.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(m.z,{variant:"secondary",className:"!mt-0",onClick:a,children:[(0,r.jsx)(D.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Desktop",target:"_blank",children:"Desktop"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Emacs",children:"Emacs"})," ","apps and more."]}),(0,r.jsx)(v,{children:(0,r.jsx)(_,{children:t.map(e=>(0,r.jsxs)(k,{children:[(0,r.jsx)(S,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(S,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{children:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[(0,r.jsx)(q.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{ep({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),n(e.token)}}),(0,r.jsx)(P.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{ep({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),l(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4"})]}),(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(X.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===eh&&(0,r.jsx)(K.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==eh&&(0,r.jsx)(E.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(y.aY,{className:"grid gap-4",children:[(0,r.jsxs)("p",{className:"text-gray-400",children:["Connect your number to chat with Khoj on WhatsApp. Learn more about the integration"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/whatsapp",children:"here"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(ea.Z,{initialValue:en||"",onChangeNumber:er,disabled:"verify"===eh,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(i().phoneInput)}}),"verify"===eh&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(en)}),(0,r.jsx)(j,{autoFocus:!0,maxLength:6,value:el||"",onChange:ei,onComplete:()=>eu("verify"),children:(0,r.jsxs)(g,{children:[(0,r.jsx)(b,{index:0}),(0,r.jsx)(b,{index:1}),(0,r.jsx)(b,{index:2}),(0,r.jsx)(b,{index:3}),(0,r.jsx)(b,{index:4}),(0,r.jsx)(b,{index:5})]})})]})]})]}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:["verify"===eh&&(0,r.jsx)(m.z,{variant:"outline",onClick:eb,children:"Verify"})||(0,r.jsx)(m.z,{variant:"outline",disabled:!en||en===p.phone_number&&"verified"===eh||!(0,u.y)(en),onClick:eg,children:p.phone_number?en&&(en!==p.phone_number||"verified"!==eh)&&(0,u.y)(en)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(ee.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Q.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===eh&&(0,r.jsxs)(m.z,{variant:"outline",onClick:()=>eN(),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]}):(0,r.jsx)(et.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},70571:function(e,s,t){"use strict";t.d(s,{E:function(){return i}});var a=t(57437),n=t(2265),r=t(52431),l=t(37440);let i=n.forwardRef((e,s)=>{let{className:t,value:n,indicatorColor:i,...o}=e;return(0,a.jsx)(r.fC,{ref:s,className:(0,l.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...o,children:(0,a.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(i),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});i.displayName=r.fC.displayName},35657:function(e,s,t){"use strict";t.d(s,{pm:function(){return u}});var a=t(2265);let n=0,r=new Map,l=e=>{if(r.has(e))return;let s=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,s)},i=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?l(t):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},o=[],c={toasts:[]};function d(e){c=i(c,e),o.forEach(e=>{e(c)})}function h(e){let{...s}=e,t=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...s,id:t,open:!0,onOpenChange:e=>{e||a()}}}),{id:t,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function u(){let[e,s]=a.useState(c);return a.useEffect(()=>(o.push(s),()=>{let e=o.indexOf(s);e>-1&&o.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},55268:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN",sidePanel:"settings_sidePanel__osdez"}}},function(e){e.O(0,[4229,8918,9001,3062,3678,1603,2971,7023,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,5506))},5506:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(11930),n=s.n(o),i=s(2265),r=s(48861),c=s(82697),l=s(58485);s(7395);var d=s(69591),h=s(79306),u=s(59479),g=s(9557);function m(e){let[t,s]=(0,i.useState)(""),[o,r]=(0,i.useState)([]),[l,d]=(0,i.useState)(!1),[h,g]=(0,i.useState)(null),m=e.setQueryToProcess,p=e.streamedMessages,f=e.isMobileWidth?"w-full":"w-4/6";return((0,i.useEffect)(()=>{if(o.length>0){let t=o.map(e=>encodeURIComponent(e));e.setImages(t)}},[o,e.setImages]),(0,i.useEffect)(()=>{let t=localStorage.getItem("images");if(t){let s=JSON.parse(t);r(s);let a=s.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let s=localStorage.getItem("message");s&&(d(!0),m(s))},[m,e.setImages]),(0,i.useEffect)(()=>{t&&(d(!0),m(t))},[t,m]),(0,i.useEffect)(()=>{p&&p.length>0&&p[p.length-1].completed?d(!1):s("")},[p]),e.publicConversationSlug||e.conversationId)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(c.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:g,setTitle:e.setTitle,pendingMessage:l?t:"",incomingMessages:e.streamedMessages,customClassName:f})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-t-2xl rounded-b-none md:rounded-xl h-fit ").concat(f," mr-auto ml-auto"),children:(0,a.jsx)(u.Z,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>r(t=>[...t,e]),sendDisabled:l,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==h?void 0:h.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}function p(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[c,u]=(0,i.useState)("Khoj AI - Chat"),[p,f]=(0,i.useState)(void 0),[x,_]=(0,i.useState)([]),[v,y]=(0,i.useState)(""),[S,b]=(0,i.useState)(!1),[C,I]=(0,i.useState)([]),[j,w]=(0,i.useState)(void 0),[B,N]=(0,i.useState)([]),O=(0,d.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},k=(0,h.GW)(),T=(0,d.IC)();async function E(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,a="␃\uD83D\uDD1A␗",o="";for(;;){let e;let{done:n,value:i}=await t.read();if(n){y(""),b(!1),N([]);break}for(o+=s.decode(i,{stream:!0});-1!==(e=o.indexOf(a));){let t=o.slice(0,e);if(o=o.slice(e+a.length),t){let e=x.find(e=>!e.completed);if(!e){console.error("No current message found");return}(0,g.VK)(t,e),_([...x])}}}}async function D(){if(!v||!p)return;let e={q:v,conversation_id:p,stream:!0,...O&&{region:O.region,country:O.country,city:O.city,country_code:O.countryCode,timezone:O.timezone},...B.length>0&&{image:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await E(t)}catch(e){console.error(e)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,d.EK)(),w(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{if(v&&!p){fetch("/api/chat/share/fork?public_conversation_slug=".concat(j),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{f(e.conversation_id)}).catch(e=>{console.error(e)});return}if(v){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:v||"",images:B};_(t=>[...t,e]),b(!0)}},[v,p,j]),(0,i.useEffect)(()=>{S&&D()},[S]),s)?(0,a.jsx)(l.Z,{}):j?(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:c}),(0,a.jsx)("div",{className:n().sidePanel,children:(0,a.jsx)(r.ZP,{conversationId:null!=p?p:null,uploadedFiles:C,isMobileWidth:T})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!T&&c&&(0,a.jsx)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mr-8 pt-6 col-auto h-fit"),children:c&&(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden",children:c})}),(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(l.Z,{}),children:(0,a.jsx)(m,{conversationId:p,streamedMessages:x,setQueryToProcess:y,isLoggedIn:null!==k,publicConversationSlug:j,chatOptionsData:e,setTitle:u,setUploadedFiles:I,isMobileWidth:T,setImages:N})})]})})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}},11930:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4"}}},function(e){e.O(0,[7849,8918,929,3954,9001,3062,8840,121,3110,6327,1603,9417,3423,9479,2697,2971,7023,1744],function(){return e(e.s=91955)}),_N_E=e.O()}]);
|