dexto 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +476 -0
- package/dist/analytics/constants.d.ts +19 -0
- package/dist/analytics/constants.d.ts.map +1 -0
- package/dist/analytics/constants.js +24 -0
- package/dist/analytics/events.d.ts +112 -0
- package/dist/analytics/events.d.ts.map +1 -0
- package/dist/analytics/events.js +6 -0
- package/dist/analytics/index.d.ts +37 -0
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js +145 -0
- package/dist/analytics/state.d.ts +23 -0
- package/dist/analytics/state.d.ts.map +1 -0
- package/dist/analytics/state.js +74 -0
- package/dist/analytics/wrapper.d.ts +11 -0
- package/dist/analytics/wrapper.d.ts.map +1 -0
- package/dist/analytics/wrapper.js +125 -0
- package/dist/cli/cli.d.ts +5 -0
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +10 -4
- package/dist/cli/commands/{interactive-commands/session/helpers → helpers}/formatters.d.ts +1 -1
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -0
- package/dist/cli/commands/{interactive-commands/session/helpers → helpers}/formatters.js +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +56 -2
- package/dist/cli/commands/interactive-commands/session/index.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/index.js +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +10 -76
- package/dist/cli/commands/list-agents.d.ts +2 -2
- package/dist/cli/commands/session-commands.d.ts +28 -0
- package/dist/cli/commands/session-commands.d.ts.map +1 -0
- package/dist/cli/commands/session-commands.js +184 -0
- package/dist/cli/commands/setup.d.ts +2 -2
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +9 -0
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +42 -1
- package/dist/cli/utils/api-key-setup.js +1 -1
- package/dist/index.js +271 -75
- package/dist/webui/.next/standalone/.next/static/chunks/854-2a6d5a5297a15d52.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/{layout-615a56c6184a488f.js → layout-dde711766eda096b.js} +1 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/{page-24123c97236d46cb.js → page-655c5da45b79231a.js} +1 -1
- package/dist/webui/.next/{static/css/75b11629ebbc461a.css → standalone/.next/static/css/daca29b49478cfbe.css} +1 -1
- package/dist/webui/.next/standalone/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/webui/.next/standalone/package.json +2 -1
- package/dist/webui/.next/standalone/packages/webui/.next/BUILD_ID +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/app-build-manifest.json +5 -7
- package/dist/webui/.next/standalone/packages/webui/.next/build-manifest.json +2 -2
- package/dist/webui/.next/standalone/packages/webui/.next/prerender-manifest.json +3 -3
- package/dist/webui/.next/standalone/packages/webui/.next/required-server-files.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/_not-found/page.js +2 -2
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page.js +3 -3
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/playground/page.js +3 -3
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/playground/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/playground/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/43.js +1 -4
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/619.js +30 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/next-font-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/next-font-manifest.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/pages/500.html +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/pages/_error.js +2 -2
- package/dist/webui/.next/standalone/packages/webui/.next/server/server-reference-manifest.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/854-2a6d5a5297a15d52.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/{layout-615a56c6184a488f.js → layout-dde711766eda096b.js} +1 -1
- package/dist/webui/.next/{static/chunks/app/page-24123c97236d46cb.js → standalone/packages/webui/.next/static/chunks/app/page-655c5da45b79231a.js} +1 -1
- package/dist/webui/.next/standalone/{.next/static/css/75b11629ebbc461a.css → packages/webui/.next/static/css/daca29b49478cfbe.css} +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/webui/.next/standalone/packages/webui/package.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/server.js +1 -1
- package/dist/webui/.next/static/chunks/854-2a6d5a5297a15d52.js +1 -0
- package/dist/webui/.next/static/chunks/app/{layout-615a56c6184a488f.js → layout-dde711766eda096b.js} +1 -1
- package/dist/webui/.next/{standalone/packages/webui/.next/static/chunks/app/page-24123c97236d46cb.js → static/chunks/app/page-655c5da45b79231a.js} +1 -1
- package/dist/webui/.next/{standalone/packages/webui/.next/static/css/75b11629ebbc461a.css → static/css/daca29b49478cfbe.css} +1 -1
- package/dist/webui/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/webui/package.json +1 -1
- package/package.json +7 -4
- package/dist/cli/commands/interactive-commands/session/helpers/formatters.d.ts.map +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/221-608218ab04068cb2.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/854-47418382efcea1d4.js +0 -1
- package/dist/webui/.next/standalone/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/387.js +0 -14
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/392.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/450.js +0 -139
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/514.js +0 -2
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/531.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/723.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/737.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/767.js +0 -20
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/89.js +0 -95
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/221-608218ab04068cb2.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/854-47418382efcea1d4.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
- package/dist/webui/.next/static/chunks/221-608218ab04068cb2.js +0 -1
- package/dist/webui/.next/static/chunks/854-47418382efcea1d4.js +0 -1
- package/dist/webui/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
- /package/dist/webui/.next/standalone/.next/static/{abgua6ybDH7yT2b5rvLlU → wcYVcRLx1mruRrV5-XkIK}/_buildManifest.js +0 -0
- /package/dist/webui/.next/standalone/.next/static/{abgua6ybDH7yT2b5rvLlU → wcYVcRLx1mruRrV5-XkIK}/_ssgManifest.js +0 -0
- /package/dist/webui/.next/standalone/packages/webui/.next/static/{abgua6ybDH7yT2b5rvLlU → wcYVcRLx1mruRrV5-XkIK}/_buildManifest.js +0 -0
- /package/dist/webui/.next/standalone/packages/webui/.next/static/{abgua6ybDH7yT2b5rvLlU → wcYVcRLx1mruRrV5-XkIK}/_ssgManifest.js +0 -0
- /package/dist/webui/.next/static/{abgua6ybDH7yT2b5rvLlU → wcYVcRLx1mruRrV5-XkIK}/_buildManifest.js +0 -0
- /package/dist/webui/.next/static/{abgua6ybDH7yT2b5rvLlU → wcYVcRLx1mruRrV5-XkIK}/_ssgManifest.js +0 -0
|
@@ -1,4 +1 @@
|
|
|
1
|
-
exports.id=43,exports.ids=[43],exports.modules={17387:(a,b,c)=>{"use strict";c.d(b,{Ec:()=>aK,Nz:()=>aM,Rc:()=>aL,_N:()=>aO,uf:()=>aN,vF:()=>aJ});var d,e=c(42711),f=c(33873),g=c(29021),h=c(21820),i=c(8086),j=c(61379),k=c(19771),l=c(83997),m=(0,e.P$)({"../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(a,b){(0,e.e1)();var c={};function d(a){return a.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}void 0===b?window.eastasianwidth=c:b.exports=c,c.eastAsianWidth=function(a){var b=a.charCodeAt(0),c=2==a.length?a.charCodeAt(1):0,d=b;return(55296<=b&&b<=56319&&56320<=c&&c<=57343&&(b&=1023,c&=1023,d=(b<<10|c)+65536),12288==d||65281<=d&&d<=65376||65504<=d&&d<=65510)?"F":8361==d||65377<=d&&d<=65470||65474<=d&&d<=65479||65482<=d&&d<=65487||65490<=d&&d<=65495||65498<=d&&d<=65500||65512<=d&&d<=65518?"H":4352<=d&&d<=4447||4515<=d&&d<=4519||4602<=d&&d<=4607||9001<=d&&d<=9002||11904<=d&&d<=11929||11931<=d&&d<=12019||12032<=d&&d<=12245||12272<=d&&d<=12283||12289<=d&&d<=12350||12353<=d&&d<=12438||12441<=d&&d<=12543||12549<=d&&d<=12589||12593<=d&&d<=12686||12688<=d&&d<=12730||12736<=d&&d<=12771||12784<=d&&d<=12830||12832<=d&&d<=12871||12880<=d&&d<=13054||13056<=d&&d<=19903||19968<=d&&d<=42124||42128<=d&&d<=42182||43360<=d&&d<=43388||44032<=d&&d<=55203||55216<=d&&d<=55238||55243<=d&&d<=55291||63744<=d&&d<=64255||65040<=d&&d<=65049||65072<=d&&d<=65106||65108<=d&&d<=65126||65128<=d&&d<=65131||110592<=d&&d<=110593||127488<=d&&d<=127490||127504<=d&&d<=127546||127552<=d&&d<=127560||127568<=d&&d<=127569||131072<=d&&d<=194367||177984<=d&&d<=196605||196608<=d&&d<=262141?"W":32<=d&&d<=126||162<=d&&d<=163||165<=d&&d<=166||172==d||175==d||10214<=d&&d<=10221||10629<=d&&d<=10630?"Na":161==d||164==d||167<=d&&d<=168||170==d||173<=d&&d<=174||176<=d&&d<=180||182<=d&&d<=186||188<=d&&d<=191||198==d||208==d||215<=d&&d<=216||222<=d&&d<=225||230==d||232<=d&&d<=234||236<=d&&d<=237||240==d||242<=d&&d<=243||247<=d&&d<=250||252==d||254==d||257==d||273==d||275==d||283==d||294<=d&&d<=295||299==d||305<=d&&d<=307||312==d||319<=d&&d<=322||324==d||328<=d&&d<=331||333==d||338<=d&&d<=339||358<=d&&d<=359||363==d||462==d||464==d||466==d||468==d||470==d||472==d||474==d||476==d||593==d||609==d||708==d||711==d||713<=d&&d<=715||717==d||720==d||728<=d&&d<=731||733==d||735==d||768<=d&&d<=879||913<=d&&d<=929||931<=d&&d<=937||945<=d&&d<=961||963<=d&&d<=969||1025==d||1040<=d&&d<=1103||1105==d||8208==d||8211<=d&&d<=8214||8216<=d&&d<=8217||8220<=d&&d<=8221||8224<=d&&d<=8226||8228<=d&&d<=8231||8240==d||8242<=d&&d<=8243||8245==d||8251==d||8254==d||8308==d||8319==d||8321<=d&&d<=8324||8364==d||8451==d||8453==d||8457==d||8467==d||8470==d||8481<=d&&d<=8482||8486==d||8491==d||8531<=d&&d<=8532||8539<=d&&d<=8542||8544<=d&&d<=8555||8560<=d&&d<=8569||8585==d||8592<=d&&d<=8601||8632<=d&&d<=8633||8658==d||8660==d||8679==d||8704==d||8706<=d&&d<=8707||8711<=d&&d<=8712||8715==d||8719==d||8721==d||8725==d||8730==d||8733<=d&&d<=8736||8739==d||8741==d||8743<=d&&d<=8748||8750==d||8756<=d&&d<=8759||8764<=d&&d<=8765||8776==d||8780==d||8786==d||8800<=d&&d<=8801||8804<=d&&d<=8807||8810<=d&&d<=8811||8814<=d&&d<=8815||8834<=d&&d<=8835||8838<=d&&d<=8839||8853==d||8857==d||8869==d||8895==d||8978==d||9312<=d&&d<=9449||9451<=d&&d<=9547||9552<=d&&d<=9587||9600<=d&&d<=9615||9618<=d&&d<=9621||9632<=d&&d<=9633||9635<=d&&d<=9641||9650<=d&&d<=9651||9654<=d&&d<=9655||9660<=d&&d<=9661||9664<=d&&d<=9665||9670<=d&&d<=9672||9675==d||9678<=d&&d<=9681||9698<=d&&d<=9701||9711==d||9733<=d&&d<=9734||9737==d||9742<=d&&d<=9743||9748<=d&&d<=9749||9756==d||9758==d||9792==d||9794==d||9824<=d&&d<=9825||9827<=d&&d<=9829||9831<=d&&d<=9834||9836<=d&&d<=9837||9839==d||9886<=d&&d<=9887||9918<=d&&d<=9919||9924<=d&&d<=9933||9935<=d&&d<=9953||9955==d||9960<=d&&d<=9983||10045==d||10071==d||10102<=d&&d<=10111||11093<=d&&d<=11097||12872<=d&&d<=12879||57344<=d&&d<=63743||65024<=d&&d<=65039||65533==d||127232<=d&&d<=127242||127248<=d&&d<=127277||127280<=d&&d<=127337||127344<=d&&d<=127386||917760<=d&&d<=917999||983040<=d&&d<=1048573||1048576<=d&&d<=1114109?"A":"N"},c.characterLength=function(a){var b=this.eastAsianWidth(a);return"F"==b||"W"==b||"A"==b?2:1},c.length=function(a){for(var b=d(a),c=0,e=0;e<b.length;e++)c+=this.characterLength(b[e]);return c},c.slice=function(a,b,e){textLen=c.length(a),e=e||1,(b=b||0)<0&&(b=textLen+b),e<0&&(e=textLen+e);for(var f="",g=0,h=d(a),i=0;i<h.length;i++){var j=h[i],k=c.length(j);if(g>=b-(2==k))if(g+k<=e)f+=j;else break;g+=k}return f}}}),n=(0,e.P$)({"../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js"(a,b){(0,e.e1)(),b.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}}}),o=(0,e.P$)({"../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json"(a,b){b.exports={single:{topLeft:"┌",top:"─",topRight:"┐",right:"│",bottomRight:"┘",bottom:"─",bottomLeft:"└",left:"│"},double:{topLeft:"╔",top:"═",topRight:"╗",right:"║",bottomRight:"╝",bottom:"═",bottomLeft:"╚",left:"║"},round:{topLeft:"╭",top:"─",topRight:"╮",right:"│",bottomRight:"╯",bottom:"─",bottomLeft:"╰",left:"│"},bold:{topLeft:"┏",top:"━",topRight:"┓",right:"┃",bottomRight:"┛",bottom:"━",bottomLeft:"┗",left:"┃"},singleDouble:{topLeft:"╓",top:"─",topRight:"╖",right:"║",bottomRight:"╜",bottom:"─",bottomLeft:"╙",left:"║"},doubleSingle:{topLeft:"╒",top:"═",topRight:"╕",right:"│",bottomRight:"╛",bottom:"═",bottomLeft:"╘",left:"│"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"↘",top:"↓",topRight:"↙",right:"←",bottomRight:"↖",bottom:"↑",bottomLeft:"↗",left:"→"}}}}),p=(0,e.P$)({"../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js"(a,b){(0,e.e1)();var c=o();b.exports=c,b.exports.default=c}}),q=(0,e.P$)({"../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(a,b){(0,e.e1)(),b.exports=({onlyFirst:a=!1}={})=>RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))",a?void 0:"g")}}),r=(0,e.P$)({"../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(a,b){(0,e.e1)();var c=q();b.exports=a=>"string"==typeof a?a.replace(c(),""):a}}),s=(0,e.P$)({"../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(a,b){(0,e.e1)();var c=a=>!Number.isNaN(a)&&(a>=4352&&(a<=4447||9001===a||9002===a||11904<=a&&a<=12871&&12351!==a||12880<=a&&a<=19903||19968<=a&&a<=42182||43360<=a&&a<=43388||44032<=a&&a<=55203||63744<=a&&a<=64255||65040<=a&&a<=65049||65072<=a&&a<=65131||65281<=a&&a<=65376||65504<=a&&a<=65510||110592<=a&&a<=110593||127488<=a&&a<=127569||131072<=a&&a<=262141)||!1);b.exports=c,b.exports.default=c}}),t=(0,e.P$)({"../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(a,b){(0,e.e1)(),b.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}}}),u=(0,e.P$)({"../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(a,b){(0,e.e1)();var c=r(),d=s(),f=t(),g=a=>{if("string"!=typeof a||0===a.length||0===(a=c(a)).length)return 0;a=a.replace(f()," ");let b=0;for(let c=0;c<a.length;c++){let e=a.codePointAt(c);e<=31||e>=127&&e<=159||e>=768&&e<=879||(e>65535&&c++,b+=d(e)?2:1)}return b};b.exports=g,b.exports.default=g}}),v=(0,e.P$)({"../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js"(a,b){(0,e.e1)();var c=u();function d(a,b){let d;if(!a)return a;let e=(b=b||{}).align||"center";if("left"===e)return a;let h=b.split||"\n",i=b.pad||" ",j="right"!==e?f:g,k=!1;Array.isArray(a)||(k=!0,a=String(a).split(h));let l=0;return a=a.map(function(a){return l=Math.max(d=c(a=String(a)),l),{str:a,width:d}}).map(function(a){return Array(j(l,a.width)+1).join(i)+a.str}),k?a.join(h):a}function f(a,b){return Math.floor((a-b)/2)}function g(a,b){return a-b}d.left=function(a){return d(a,{align:"left"})},d.center=function(a){return d(a,{align:"center"})},d.right=function(a){return d(a,{align:"right"})},b.exports=d}});function w(a,b){let c=f.resolve(a),d=f.parse(c).root;for(;;){if(b(c))return c;if(c===d)break;let a=f.dirname(c);if(a===c)break;c=a}return null}function x(a){let b=f.join(a,"package.json");try{let a=JSON.parse((0,g.readFileSync)(b,"utf-8"));return"dexto-monorepo"===a.name}catch{return!1}}function y(a){let b=f.join(a,"package.json");try{let a=JSON.parse((0,g.readFileSync)(b,"utf-8"));if("dexto"===a.name||"@dexto/core"===a.name||"@dexto/webui"===a.name)return!1;let c={...a.dependencies??{},...a.devDependencies??{},...a.peerDependencies??{}};return"dexto"in c||"@dexto/core"in c}catch{return!1}}function z(a=process.cwd()){return w(a,x)}function A(a=process.cwd()){return w(a,y)}(0,e.e1)(),(0,e.e1)(),(0,e.e1)(),(0,e.e1)(),(0,e.e1)(),(0,e.e1)();var B=(a=0)=>b=>`\x1b[${b+a}m`,C=(a=0)=>b=>`\x1b[${38+a};5;${b}m`,D=(a=0)=>(b,c,d)=>`\x1b[${38+a};2;${b};${c};${d}m`,E={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(E.modifier),[...Object.keys(E.color),...Object.keys(E.bgColor)];var F=function(){let a=new Map;for(let[b,c]of Object.entries(E)){for(let[b,d]of Object.entries(c))E[b]={open:`\x1b[${d[0]}m`,close:`\x1b[${d[1]}m`},c[b]=E[b],a.set(d[0],d[1]);Object.defineProperty(E,b,{value:c,enumerable:!1})}return Object.defineProperty(E,"codes",{value:a,enumerable:!1}),E.color.close="\x1b[39m",E.bgColor.close="\x1b[49m",E.color.ansi=B(),E.color.ansi256=C(),E.color.ansi16m=D(),E.bgColor.ansi=B(10),E.bgColor.ansi256=C(10),E.bgColor.ansi16m=D(10),Object.defineProperties(E,{rgbToAnsi256:{value:(a,b,c)=>a===b&&b===c?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(b/255*5)+Math.round(c/255*5),enumerable:!1},hexToRgb:{value(a){let b=/[a-f\d]{6}|[a-f\d]{3}/i.exec(a.toString(16));if(!b)return[0,0,0];let[c]=b;3===c.length&&(c=[...c].map(a=>a+a).join(""));let d=Number.parseInt(c,16);return[d>>16&255,d>>8&255,255&d]},enumerable:!1},hexToAnsi256:{value:a=>E.rgbToAnsi256(...E.hexToRgb(a)),enumerable:!1},ansi256ToAnsi:{value(a){let b,c,d;if(a<8)return 30+a;if(a<16)return 90+(a-8);if(a>=232)c=b=((a-232)*10+8)/255,d=b;else{let e=(a-=16)%36;b=Math.floor(a/36)/5,c=Math.floor(e/6)/5,d=e%6/5}let e=2*Math.max(b,c,d);if(0===e)return 30;let f=30+(Math.round(d)<<2|Math.round(c)<<1|Math.round(b));return 2===e&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(a,b,c)=>E.ansi256ToAnsi(E.rgbToAnsi256(a,b,c)),enumerable:!1},hexToAnsi:{value:a=>E.ansi256ToAnsi(E.hexToAnsi256(a)),enumerable:!1}}),E}();function G(a,b=globalThis.Deno?globalThis.Deno.args:k.argv){let c=a.startsWith("-")?"":1===a.length?"-":"--",d=b.indexOf(c+a),e=b.indexOf("--");return -1!==d&&(-1===e||d<e)}(0,e.e1)();var{env:H}=k;function I(a,b={}){var c;return 0!==(c=function(a,{streamIsTTY:b,sniffFlags:c=!0}={}){let e=function(){if("FORCE_COLOR"in H)return"true"===H.FORCE_COLOR?1:"false"===H.FORCE_COLOR?0:0===H.FORCE_COLOR.length?1:Math.min(Number.parseInt(H.FORCE_COLOR,10),3)}();void 0!==e&&(d=e);let f=c?d:e;if(0===f)return 0;if(c){if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2}if("TF_BUILD"in H&&"AGENT_NAME"in H)return 1;if(a&&!b&&void 0===f)return 0;let g=f||0;if("dumb"===H.TERM)return g;if("win32"===k.platform){let a=h.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in H)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in H)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in H)||"codeship"===H.CI_NAME?1:g;if("TEAMCITY_VERSION"in H)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(H.TEAMCITY_VERSION);if("truecolor"===H.COLORTERM||"xterm-kitty"===H.TERM||"xterm-ghostty"===H.TERM||"wezterm"===H.TERM)return 3;if("TERM_PROGRAM"in H){let a=Number.parseInt((H.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(H.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(H.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(H.TERM)||"COLORTERM"in H?1:g}(a,{streamIsTTY:a&&a.isTTY,...b}))&&{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}G("no-color")||G("no-colors")||G("color=false")||G("color=never")?d=0:(G("color")||G("colors")||G("color=true")||G("color=always"))&&(d=1);var J={stdout:I({isTTY:l.isatty(1)}),stderr:I({isTTY:l.isatty(2)})};(0,e.e1)();var{stdout:K,stderr:L}=J,M=Symbol("GENERATOR"),N=Symbol("STYLER"),O=Symbol("IS_EMPTY"),P=["ansi","ansi","ansi256","ansi16m"],Q=Object.create(null);function R(a){let b=(...a)=>a.join(" ");return((a,b={})=>{if(b.level&&!(Number.isInteger(b.level)&&b.level>=0&&b.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let c=K?K.level:0;a.level=void 0===b.level?c:b.level})(b,a),Object.setPrototypeOf(b,R.prototype),b}for(let[a,b]of(Object.setPrototypeOf(R.prototype,Function.prototype),Object.entries(F)))Q[a]={get(){let c=V(this,U(b.open,b.close,this[N]),this[O]);return Object.defineProperty(this,a,{value:c}),c}};Q.visible={get(){let a=V(this,this[N],!0);return Object.defineProperty(this,"visible",{value:a}),a}};var S=(a,b,c,...d)=>"rgb"===a?"ansi16m"===b?F[c].ansi16m(...d):"ansi256"===b?F[c].ansi256(F.rgbToAnsi256(...d)):F[c].ansi(F.rgbToAnsi(...d)):"hex"===a?S("rgb",b,c,...F.hexToRgb(...d)):F[c][a](...d);for(let a of["rgb","hex","ansi256"])Q[a]={get(){let{level:b}=this;return function(...c){return V(this,U(S(a,P[b],"color",...c),F.color.close,this[N]),this[O])}}},Q["bg"+a[0].toUpperCase()+a.slice(1)]={get(){let{level:b}=this;return function(...c){return V(this,U(S(a,P[b],"bgColor",...c),F.bgColor.close,this[N]),this[O])}}};var T=Object.defineProperties(()=>{},{...Q,level:{enumerable:!0,get(){return this[M].level},set(a){this[M].level=a}}}),U=(a,b,c)=>{let d,e;return void 0===c?(d=a,e=b):(d=c.openAll+a,e=b+c.closeAll),{open:a,close:b,openAll:d,closeAll:e,parent:c}},V=(a,b,c)=>{let d=(...a)=>W(d,1===a.length?""+a[0]:a.join(" "));return Object.setPrototypeOf(d,T),d[M]=a,d[N]=b,d[O]=c,d},W=(a,b)=>{if(a.level<=0||!b)return a[O]?"":b;let c=a[N];if(void 0===c)return b;let{openAll:d,closeAll:e}=c;if(b.includes("\x1b"))for(;void 0!==c;)b=function(a,b,c){let d=a.indexOf(b);if(-1===d)return a;let e=b.length,f=0,g="";do g+=a.slice(f,d)+b+c,f=d+e,d=a.indexOf(b,f);while(-1!==d);return g+a.slice(f)}(b,c.close,c.open),c=c.parent;let f=b.indexOf("\n");return -1!==f&&(b=function(a,b,c,d){let e=0,f="";do{let g="\r"===a[d-1];f+=a.slice(e,g?d-1:d)+b+(g?"\r\n":"\n")+c,e=d+1,d=a.indexOf("\n",e)}while(-1!==d);return f+a.slice(e)}(b,e,d,f)),d+b+e};Object.defineProperties(R.prototype,Q);var X=R();R({level:L?L.level:0}),(0,e.e1)(),(0,e.e1)(),(0,e.e1)(),(0,e.e1)();var Y=function({onlyFirst:a=!1}={}){let b=`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))`;return RegExp(`${b}|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,a?void 0:"g")}();function Z(a){if("string"!=typeof a)throw TypeError(`Expected a \`string\`, got \`${typeof a}\``);return a.replace(Y,"")}var $=(0,e.f1)(m(),1),_=(0,e.f1)(n(),1);function aa(a,b={}){if("string"!=typeof a||0===a.length||(b={ambiguousIsNarrow:!0,...b},0===(a=Z(a)).length))return 0;a=a.replace((0,_.default)()," ");let c=b.ambiguousIsNarrow?1:2,d=0;for(let b of a){let a=b.codePointAt(0);if(!(a<=31)&&(!(a>=127)||!(a<=159))&&(!(a>=768)||!(a<=879)))switch($.default.eastAsianWidth(b)){case"F":case"W":d+=2;break;case"A":d+=c;break;default:d+=1}}return d}function ab(a){let b=0;for(let c of a.split("\n"))b=Math.max(b,aa(c));return b}(0,e.e1)();var ac=(0,e.f1)(p(),1);(0,e.e1)();var ad=/[\p{Lu}]/u,ae=/[\p{Ll}]/u,af=/^[\p{Lu}](?![\p{Lu}])/gu,ag=/([\p{Alpha}\p{N}_]|$)/u,ah=/[_.\- ]+/,ai=RegExp("^"+ah.source),aj=RegExp(ah.source+ag.source,"gu"),ak=RegExp("\\d+"+ag.source,"gu"),al=(0,e.f1)(v(),1);(0,e.e1)(),(0,e.e1)();var am=(a=0)=>b=>`\x1b[${b+a}m`,an=(a=0)=>b=>`\x1b[${38+a};5;${b}m`,ao=(a=0)=>(b,c,d)=>`\x1b[${38+a};2;${b};${c};${d}m`,ap={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ap.modifier),[...Object.keys(ap.color),...Object.keys(ap.bgColor)];var aq=function(){let a=new Map;for(let[b,c]of Object.entries(ap)){for(let[b,d]of Object.entries(c))ap[b]={open:`\x1b[${d[0]}m`,close:`\x1b[${d[1]}m`},c[b]=ap[b],a.set(d[0],d[1]);Object.defineProperty(ap,b,{value:c,enumerable:!1})}return Object.defineProperty(ap,"codes",{value:a,enumerable:!1}),ap.color.close="\x1b[39m",ap.bgColor.close="\x1b[49m",ap.color.ansi=am(),ap.color.ansi256=an(),ap.color.ansi16m=ao(),ap.bgColor.ansi=am(10),ap.bgColor.ansi256=an(10),ap.bgColor.ansi16m=ao(10),Object.defineProperties(ap,{rgbToAnsi256:{value:(a,b,c)=>a===b&&b===c?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(b/255*5)+Math.round(c/255*5),enumerable:!1},hexToRgb:{value:a=>{let b=/[a-f\d]{6}|[a-f\d]{3}/i.exec(a.toString(16));if(!b)return[0,0,0];let[c]=b;3===c.length&&(c=[...c].map(a=>a+a).join(""));let d=Number.parseInt(c,16);return[d>>16&255,d>>8&255,255&d]},enumerable:!1},hexToAnsi256:{value:a=>ap.rgbToAnsi256(...ap.hexToRgb(a)),enumerable:!1},ansi256ToAnsi:{value:a=>{let b,c,d;if(a<8)return 30+a;if(a<16)return 90+(a-8);if(a>=232)c=b=((a-232)*10+8)/255,d=b;else{let e=(a-=16)%36;b=Math.floor(a/36)/5,c=Math.floor(e/6)/5,d=e%6/5}let e=2*Math.max(b,c,d);if(0===e)return 30;let f=30+(Math.round(d)<<2|Math.round(c)<<1|Math.round(b));return 2===e&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(a,b,c)=>ap.ansi256ToAnsi(ap.rgbToAnsi256(a,b,c)),enumerable:!1},hexToAnsi:{value:a=>ap.ansi256ToAnsi(ap.hexToAnsi256(a)),enumerable:!1}}),ap}(),ar=new Set(["\x1b","\x9b"]),as="]8;;",at=a=>`${ar.values().next().value}[${a}m`,au=a=>`${ar.values().next().value}${as}${a}\x07`,av=(a,b,c)=>{let d=[...b],e=!1,f=!1,g=aa(Z(a[a.length-1]));for(let[b,h]of d.entries()){let i=aa(h);if(g+i<=c?a[a.length-1]+=h:(a.push(h),g=0),ar.has(h)&&(e=!0,f=d.slice(b+1).join("").startsWith(as)),e){f?"\x07"===h&&(e=!1,f=!1):"m"===h&&(e=!1);continue}(g+=i)===c&&b<d.length-1&&(a.push(""),g=0)}!g&&a[a.length-1].length>0&&a.length>1&&(a[a.length-2]+=a.pop())};function aw(a,b,c){return String(a).normalize().replace(/\r\n/g,"\n").split("\n").map(a=>((a,b,c={})=>{let d,e;if(!1!==c.trim&&""===a.trim())return"";let f="",g=a.split(" ").map(a=>aa(a)),h=[""];for(let[d,e]of a.split(" ").entries()){!1!==c.trim&&(h[h.length-1]=h[h.length-1].trimStart());let a=aa(h[h.length-1]);if(0!==d&&(a>=b&&(!1===c.wordWrap||!1===c.trim)&&(h.push(""),a=0),(a>0||!1===c.trim)&&(h[h.length-1]+=" ",a++)),c.hard&&g[d]>b){let c=b-a,f=1+Math.floor((g[d]-c-1)/b);Math.floor((g[d]-1)/b)<f&&h.push(""),av(h,e,b);continue}if(a+g[d]>b&&a>0&&g[d]>0){if(!1===c.wordWrap&&a<b){av(h,e,b);continue}h.push("")}if(a+g[d]>b&&!1===c.wordWrap){av(h,e,b);continue}h[h.length-1]+=e}!1!==c.trim&&(h=h.map(a=>(a=>{let b=a.split(" "),c=b.length;for(;c>0&&!(aa(b[c-1])>0);)c--;return c===b.length?a:b.slice(0,c).join(" ")+b.slice(c).join("")})(a)));let i=[...h.join("\n")];for(let[a,b]of i.entries()){if(f+=b,ar.has(b)){let{groups:b}=RegExp(`(?:\\[(?<code>\\d+)m|\\${as}(?<uri>.*)\x07)`).exec(i.slice(a).join(""))||{groups:{}};if(void 0!==b.code){let a=Number.parseFloat(b.code);d=39===a?void 0:a}else void 0!==b.uri&&(e=0===b.uri.length?void 0:b.uri)}let c=aq.codes.get(Number(d));"\n"===i[a+1]?(e&&(f+=au("")),d&&c&&(f+=at(c))):"\n"===b&&(d&&c&&(f+=at(d)),e&&(f+=au(e)))}return f})(a,b,c)).join("\n")}(0,e.f1)(p(),1);var ax="none",ay=()=>{let{env:a,stdout:b,stderr:c}=k;return b?.columns?b.columns:c?.columns?c.columns:a.COLUMNS?Number.parseInt(a.COLUMNS,10):80},az=a=>"number"==typeof a?{top:a,right:3*a,bottom:a,left:3*a}:{top:0,right:0,bottom:0,left:0,...a},aA=(a,b)=>b===ax?a:` ${a} `,aB=a=>a.match(/^#(?:[0-f]{3}){1,2}$/i),aC=a=>"string"==typeof a&&(X[a]??aB(a));function aD(a,b){if((b={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...b}).align&&(b.textAlignment=b.align),b.borderColor&&!aC(b.borderColor))throw Error(`${b.borderColor} is not a valid borderColor`);if(b.backgroundColor&&!aC(b.backgroundColor))throw Error(`${b.backgroundColor} is not a valid backgroundColor`);return b.padding=az(b.padding),b.margin=az(b.margin),b=((a,b)=>{let c=void 0!==(b=(a=>{if(a.fullscreen&&k?.stdout){let b=[k.stdout.columns,k.stdout.rows];"function"==typeof a.fullscreen&&(b=a.fullscreen(...b)),a.width||(a.width=b[0]),a.height||(a.height=b[1])}return a.width&&(a.width=Math.max(1,a.width-2*(a.borderStyle!==ax))),a.height&&(a.height=Math.max(1,a.height-2*(a.borderStyle!==ax))),a})(b)).width,d=ay(),e=2*(b.borderStyle!==ax),f=d-b.margin.left-b.margin.right-e,g=ab(aw(a,d-e,{hard:!0,trim:!1}))+b.padding.left+b.padding.right;if(b.title&&c?(b.title=b.title.slice(0,Math.max(0,b.width-2)),b.title&&(b.title=aA(b.title,b.borderStyle))):b.title&&(b.title=b.title.slice(0,Math.max(0,f-2)),b.title&&(b.title=aA(b.title,b.borderStyle),aa(b.title)>g&&(b.width=aa(b.title)))),b.width=b.width?b.width:g,!c){if(b.margin.left&&b.margin.right&&b.width>f){let a=(d-b.width-e)/(b.margin.left+b.margin.right);b.margin.left=Math.max(0,Math.floor(b.margin.left*a)),b.margin.right=Math.max(0,Math.floor(b.margin.right*a))}b.width=Math.min(b.width,d-e-b.margin.left-b.margin.right)}return b.width-(b.padding.left+b.padding.right)<=0&&(b.padding.left=0,b.padding.right=0),b.height&&b.height-(b.padding.top+b.padding.bottom)<=0&&(b.padding.top=0,b.padding.bottom=0),b})(a,b),((a,b,c)=>{let d=a=>{let b,d=c.borderColor?(aB(b=c.borderColor)?X.hex(b):X[b])(a):a;return c.dimBorder?X.dim(d):d},e=(a=>{let b,c=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"];if(a===ax)for(let b of(a={},c))a[b]="";if("string"==typeof a){if(!(b=ac.default[a]))throw TypeError(`Invalid border style: ${a}`)}else{for(let b of("string"==typeof a?.vertical&&(a.left=a.vertical,a.right=a.vertical),"string"==typeof a?.horizontal&&(a.top=a.horizontal,a.bottom=a.horizontal),c))if(null===a[b]||"string"!=typeof a[b])throw TypeError(`Invalid border style: ${b}`);b=a}return b})(c.borderStyle),f=ay(),g=" ".repeat(c.margin.left);if("center"===c.float){let a=Math.max((f-b-2*(c.borderStyle!==ax))/2,0);g=" ".repeat(a)}else if("right"===c.float){let a=Math.max(f-b-c.margin.right-2*(c.borderStyle!==ax),0);g=" ".repeat(a)}let h="";return c.margin.top&&(h+="\n".repeat(c.margin.top)),(c.borderStyle!==ax||c.title)&&(h+=d(g+e.topLeft+(c.title?((a,b,c)=>{let d="",e=aa(a);switch(c){case"left":d=a+b.slice(e);break;case"right":d=b.slice(e)+a;break;default:d=(b=b.slice(e)).length%2==1?(b=b.slice(Math.floor(b.length/2))).slice(1)+a+b:(b=b.slice(b.length/2))+a+b}return d})(c.title,e.top.repeat(b),c.titleAlignment):e.top.repeat(b))+e.topRight)+"\n"),h+=a.split("\n").map(a=>{var b;let f;return g+d(e.left)+(b=a,c.backgroundColor?(aB(f=c.backgroundColor)?X.bgHex(f):X[function(a,b){var c,d;if(!("string"==typeof a||Array.isArray(a)))throw TypeError("Expected the input to be `string | string[]`");if(b={pascalCase:!1,preserveConsecutiveUppercase:!1,...b},0===(a=Array.isArray(a)?a.map(a=>a.trim()).filter(a=>a.length).join("-"):a.trim()).length)return"";let e=!1===b.locale?a=>a.toLowerCase():a=>a.toLocaleLowerCase(b.locale),f=!1===b.locale?a=>a.toUpperCase():a=>a.toLocaleUpperCase(b.locale);return 1===a.length?ah.test(a)?"":b.pascalCase?f(a):e(a):(a!==e(a)&&(a=((a,b,c,d)=>{let e=!1,f=!1,g=!1,h=!1;for(let i=0;i<a.length;i++){let j=a[i];h=!(i>2)||"-"===a[i-3],e&&ad.test(j)?(a=a.slice(0,i)+"-"+a.slice(i),e=!1,g=f,f=!0,i++):f&&g&&ae.test(j)&&(!h||d)?(a=a.slice(0,i-1)+"-"+a.slice(i-1),g=f,f=!1,e=!0):(e=b(j)===j&&c(j)!==j,g=f,f=c(j)===j&&b(j)!==j)}return a})(a,e,f,b.preserveConsecutiveUppercase)),a=a.replace(ai,""),a=b.preserveConsecutiveUppercase?(c=a,af.lastIndex=0,c.replace(af,a=>e(a))):e(a),b.pascalCase&&(a=f(a.charAt(0))+a.slice(1)),d=a,aj.lastIndex=0,ak.lastIndex=0,d.replace(aj,(a,b)=>f(b)).replace(ak,a=>f(a)))}(["bg",f])])(b):b)+d(e.right)}).join("\n"),c.borderStyle!==ax&&(h+="\n"+d(g+e.bottomLeft+e.bottom.repeat(b)+e.bottomRight)),c.margin.bottom&&(h+="\n".repeat(c.margin.bottom)),h})(a=((a,{padding:b,width:c,textAlignment:d,height:e})=>{let f=(a=(0,al.default)(a,{align:d})).split("\n"),g=ab(a),h=c-b.left-b.right;if(g>h){let a=[];for(let b of f){let c=aw(b,h,{hard:!0}),e=(0,al.default)(c,{align:d}).split("\n"),f=Math.max(...e.map(a=>aa(a)));for(let b of e){let c;switch(d){case"center":c=" ".repeat((h-f)/2)+b;break;case"right":c=" ".repeat(h-f)+b;break;default:c=b}a.push(c)}}f=a}"center"===d&&g<h?f=f.map(a=>" ".repeat((h-g)/2)+a):"right"===d&&g<h&&(f=f.map(a=>" ".repeat(h-g)+a));let i=" ".repeat(b.left),j=" ".repeat(b.right);return f=(f=f.map(a=>i+a+j)).map(a=>c-aa(a)>0?a+" ".repeat(c-aa(a)):a),b.top>0&&(f=[...Array.from({length:b.top}).fill(" ".repeat(c)),...f]),b.bottom>0&&(f=[...f,...Array.from({length:b.bottom}).fill(" ".repeat(c))]),e&&f.length>e?f=f.slice(0,e):e&&f.length<e&&(f=[...f,...Array.from({length:e-f.length}).fill(" ".repeat(c))]),f.join("\n")})(a,b),b.width,b)}var aE={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},aF=j.format.printf(({level:a,message:b,timestamp:c,color:d})=>{let e={error:X.red,warn:X.yellow,info:X.blue,http:X.cyan,verbose:X.magenta,debug:X.gray,silly:X.gray.dim}[a]||X.white,f=d&&"string"==typeof d&&X[d]?X[d](b):b;return`${X.dim(c)} ${e(a.toUpperCase())}: ${f}`}),aG="false"!==process.env.REDACT_SECRETS,aH=RegExp("(apiKey|password|secret|token)([\"']?\\s*[:=]\\s*)([\"'])?.*?\\3","gi"),aI=j.format(a=>(aG&&"string"==typeof a.message&&(a.message=a.message.replace(aH,"$1$2$3[REDACTED]$3")),a)),aJ=new class{constructor(a={}){this.isSilent=!1,this.logFilePath=null,this.logToConsole=!1,this.isSilent=a.silent||!1,this.initializeTransports(a),this.logger=j.createLogger({levels:aE,level:a.level||(()=>{let a=process.env.DEXTO_LOG_LEVEL;return a&&Object.keys(aE).includes(a.toLowerCase())?a.toLowerCase():"info"})(),silent:a.silent||!1,format:j.format.combine(j.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),aI(),j.format.errors({stack:!0}),j.format.splat(),j.format.json()),transports:this.createTransports(a)})}initializeTransports(a){let b=a.logToConsole??"true"===process.env.DEXTO_LOG_TO_CONSOLE;this.logToConsole=b,a.customLogPath?this.logFilePath=a.customLogPath:this.logFilePath=aK("logs","dexto.log")}createTransports(a){let b=[];this.logToConsole&&b.push(new j.transports.Console({format:j.format.combine(j.format.timestamp({format:"HH:mm:ss"}),aI(),aF)}));try{if(this.logFilePath){let a=f.dirname(this.logFilePath);g.mkdirSync(a,{recursive:!0}),b.push(new j.transports.File({filename:this.logFilePath,format:j.format.combine(j.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),aI(),j.format.errors({stack:!0}),j.format.json()),maxsize:0xa00000,maxFiles:7,tailable:!0}))}}catch(a){console.error(`Failed to initialize file logging: ${a}. Falling back to console.`),this.logToConsole||(this.logToConsole=!0,b.push(new j.transports.Console({format:j.format.combine(j.format.timestamp({format:"HH:mm:ss"}),aI(),aF)})))}return b}error(a,b,c){this.logger.error(a,{...b,color:c})}warn(a,b,c){this.logger.warn(a,{...b,color:c})}info(a,b,c){this.logger.info(a,{...b,color:c})}http(a,b,c){this.logger.http(a,{...b,color:c})}verbose(a,b,c){this.logger.verbose(a,{...b,color:c})}debug(a,b,c){let d="string"==typeof a?a:JSON.stringify(a,null,2);this.logger.debug(d,{...b,color:c})}silly(a,b,c){this.logger.silly(a,{...b,color:c})}displayAIResponse(a){this.isSilent||(a.content?console.log(aD(X.white(a.content),{padding:1,borderColor:"yellow",title:"\uD83E\uDD16 AI Response",titleAlignment:"center"})):console.log(X.yellow("AI is thinking...")))}toolCall(a,b){this.isSilent||console.log(aD(`${X.cyan("Tool Call")}: ${X.yellow(a)}
|
|
2
|
-
${X.dim("Arguments")}:
|
|
3
|
-
${X.white(JSON.stringify(b,null,2))}`,{padding:1,borderColor:"blue",title:"\uD83D\uDD27 Tool Call",titleAlignment:"center"}))}toolResult(a){if(this.isSilent)return;let b="",c=!1,d="green",e="✅ Tool Result";if((a?.error||a?.isError)&&(c=!0,d="yellow",e="⚠️ Tool Result (Error)"),a?.content&&Array.isArray(a.content))a.content.forEach(a=>{"text"===a.type?b+=a.text:"image"===a.type&&a.url?b+=`[Image URL: ${a.url}]`:"image"===a.type?b+=`[Image Data: ${a.mimeType||"unknown type"}]`:"markdown"===a.type?b+=a.markdown:b+=`[Unsupported content type: ${a.type}]`,b+="\n"});else if(a?.message)b=a.message,c=!0,d="red",e="❌ Tool Error";else if("string"==typeof a)b=a.length>1e3?`${a.slice(0,500)}... [${a.length-500} chars omitted]`:a;else try{let c=JSON.stringify(a,null,2);b=c.length>2e3?`${c.slice(0,1e3)}... [${c.length-1e3} chars omitted]`:c}catch{b=`[Unparseable result: ${typeof a}]`}b&&""!==b.trim()||(b="[Empty result]"),console.log(aD((c?X.yellow:X.green)(b),{padding:1,borderColor:d,title:e,titleAlignment:"center"}))}setLevel(a){Object.keys(aE).includes(a.toLowerCase())?(this.logger.level=a.toLowerCase(),this.isSilent||console.log(`Log level set to: ${a}`)):this.error(`Invalid log level: ${a}. Using current level: ${this.logger.level}`)}getLogFilePath(){return this.logFilePath}getLevel(){return this.logger.level}displayStartupInfo(a){if(!this.isSilent){if(console.log(""),a.model&&a.provider&&console.log(`\u{1F916} ${X.bold("Current Model:")} ${X.cyan(a.model)} ${X.dim(`(${a.provider})`)}`),a.connectedServers)if(a.connectedServers.count>0){let b=a.connectedServers.names.join(", ");console.log(`\u{1F517} ${X.bold("Connected Servers:")} ${X.green(a.connectedServers.count)} ${X.dim(`(${b})`)}`)}else console.log(`\u{1F517} ${X.bold("Connected Servers:")} ${X.yellow("0")} ${X.dim("(no MCP servers connected)")}`);if(a.failedConnections&&Object.keys(a.failedConnections).length>0){let b=Object.keys(a.failedConnections);for(let[c,d]of(console.log(`\u274C ${X.bold("Failed Connections:")} ${X.red(b.length)} ${X.dim(`(${b.join(", ")})`)}`),Object.entries(a.failedConnections)))console.log(` ${X.red("•")} ${X.dim(c)}: ${X.red(d)}`)}a.toolStats&&console.log(`\u{1F6E0}\uFE0F ${X.bold("Available Tools:")} ${X.green(a.toolStats.total)} total ${X.dim(`(${a.toolStats.mcp} MCP, ${a.toolStats.internal} internal)`)}`),a.sessionId&&console.log(`\u{1F4AC} ${X.bold("Session:")} ${X.blue(a.sessionId)}`),a.logLevel&&a.logFile&&console.log(`\u{1F4CB} ${X.bold("Log Level:")} ${X.cyan(a.logLevel)} ${X.dim(`(file: ${a.logFile})`)}`)}}displayError(a,b){if(this.isSilent)return;let c="debug"===this.getLevel();console.log(aD(b?.stack&&c?`${X.red("Error")}: ${X.red(a)}
|
|
4
|
-
${X.dim(b.stack)}`:`${X.red("Error")}: ${X.red(a)}`,{padding:1,borderColor:"red",title:"❌ Error",titleAlignment:"center"}))}};function aK(a,b,c){let d,e=function(a=process.cwd()){return z(a)?"dexto-source":A(a)?"dexto-project":"global-cli"}(c);switch(e){case"dexto-source":{let b=z(c);if(!b)throw Error("Not in dexto source context");d=f.join(b,".dexto",a);break}case"dexto-project":{let b=A(c);if(!b)throw Error("Not in dexto project context");d=f.join(b,".dexto",a);break}case"global-cli":d=f.join((0,h.homedir)(),".dexto",a);break;default:throw Error(`Unknown execution context: ${e}`)}return b?f.join(d,b):d}function aL(a,b){let c=f.join((0,h.homedir)(),".dexto",a);return b?f.join(c,b):c}async function aM(a,b){for(let c of(await g.promises.mkdir(b,{recursive:!0}),await g.promises.readdir(a,{withFileTypes:!0}))){let d=f.join(a,c.name),e=f.join(b,c.name);c.isDirectory()?await aM(d,e):await g.promises.copyFile(d,e)}}function aN(a){return!!(f.isAbsolute(a)||/[\\/]/.test(a)||/\.(ya?ml|json)$/i.test(a))}function aO(a){let b=a.startsWith("dist/")?[a,a.replace(/^dist\//,"")]:[`dist/${a}`,a];try{let a=(0,i.createRequire)("file:///home/runner/work/dexto/dexto/packages/core/dist/chunk-D62MHQBE.js").resolve("dexto/package.json"),c=f.dirname(a);for(let a of b){let b=f.resolve(c,a);if((0,g.existsSync)(b))return b}}catch{}let c=function(a=process.cwd()){return w(a,a=>{let b=f.join(a,"package.json");return(0,g.existsSync)(b)})}();if(c)for(let a of b){let b=f.resolve(c,a);if((0,g.existsSync)(b))return b}throw Error(`Bundled script not found: ${a} (tried: ${b.join(", ")})`)}},21842:()=>{},21870:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,97452,23)),Promise.resolve().then(c.t.bind(c,41143,23)),Promise.resolve().then(c.t.bind(c,96731,23)),Promise.resolve().then(c.t.bind(c,61742,23)),Promise.resolve().then(c.t.bind(c,202,23)),Promise.resolve().then(c.t.bind(c,43598,23)),Promise.resolve().then(c.t.bind(c,30670,23)),Promise.resolve().then(c.t.bind(c,68299,23)),Promise.resolve().then(c.t.bind(c,10190,23))},24599:(a,b,c)=>{Promise.resolve().then(c.bind(c,34820)),Promise.resolve().then(c.bind(c,27359))},27359:(a,b,c)=>{"use strict";c.d(b,{SpeechReset:()=>d});let d=(0,c(95364).registerClientReference)(function(){throw Error("Attempted to call SpeechReset() from the server but SpeechReset is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/dexto/dexto/packages/webui/components/ui/speech-reset.tsx","SpeechReset")},33647:(a,b,c)=>{"use strict";c.d(b,{gB:()=>C,VC:()=>n,$$:()=>o,Fy:()=>A,Sd:()=>B,iG:()=>D,hy:()=>w,dL:()=>r,Hh:()=>q,pH:()=>y,Ay:()=>x,FG:()=>s,aW:()=>L,h2:()=>v,Bo:()=>u,Fb:()=>N});var d=c(53592),e=c(42711);(0,e.e1)();var f=class a extends d.G8{constructor(b){super(a.formatMessage(b)),this.name="DextoValidationError",this.issues=b}static formatMessage(a){if(0===a.length)return"Validation failed";if(1===a.length)return a[0].message;let b=a.filter(a=>"error"===a.severity),c=a.filter(a=>"warning"===a.severity),d=[];return b.length>0&&d.push(`${b.length} error${b.length>1?"s":""}`),c.length>0&&d.push(`${c.length} warning${c.length>1?"s":""}`),`Validation failed with ${d.join(" and ")}`}get errors(){return this.issues.filter(a=>"error"===a.severity)}get warnings(){return this.issues.filter(a=>"warning"===a.severity)}hasErrors(){return this.errors.length>0}hasWarnings(){return this.warnings.length>0}get firstError(){return this.errors[0]}get firstWarning(){return this.warnings[0]}format(){return{errors:this.errors.map(a=>`[${a.code}] ${a.message}`),warnings:this.warnings.map(a=>`[${a.code}] ${a.message}`)}}toJSON(){return{name:this.name,message:this.message,issues:this.issues,traceId:this.traceId,errorCount:this.errors.length,warningCount:this.warnings.length}}};(0,e.e1)(),(0,e.e1)();var g=c(17387),h=c(29021),i=c(94428),j=c(61804),k=c(2946);(0,e.e1)(),(0,e.e1)(),(0,e.e1)(),(0,e.e1)(),(0,e.e1)();var l=(a=>(a.API_KEY_MISSING="llm_api_key_missing",a.API_KEY_INVALID="llm_api_key_invalid",a.API_KEY_CANDIDATE_MISSING="llm_api_key_candidate_missing",a.BASE_URL_MISSING="llm_base_url_missing",a.BASE_URL_INVALID="llm_base_url_invalid",a.MODEL_INCOMPATIBLE="llm_model_incompatible",a.MODEL_UNKNOWN="llm_model_unknown",a.PROVIDER_UNSUPPORTED="llm_provider_unsupported",a.ROUTER_UNSUPPORTED="llm_router_unsupported",a.INPUT_FILE_UNSUPPORTED="llm_input_file_unsupported",a.INPUT_IMAGE_UNSUPPORTED="llm_input_image_unsupported",a.INPUT_TEXT_INVALID="llm_input_text_invalid",a.TOKENS_EXCEEDED="llm_tokens_exceeded",a.RATE_LIMIT_EXCEEDED="llm_rate_limit_exceeded",a.SWITCH_FAILED="llm_switch_failed",a.GENERATION_FAILED="llm_generation_failed",a.SWITCH_INPUT_MISSING="llm_switch_input_missing",a.REQUEST_INVALID_SCHEMA="llm_request_invalid_schema",a))(l||{}),m=class{static unknownModel(a,b){return new d.RK("llm_model_unknown","llm","user",`Unknown model '${b}' for provider '${a}'`,{provider:a,model:b})}static baseUrlMissing(a){return new d.RK("llm_base_url_missing","llm","user",`Provider '${a}' requires a baseURL (set config.baseURL or OPENAI_BASE_URL environment variable)`,{provider:a})}static modelProviderUnknown(a){let b=[...n];return new d.RK("llm_model_unknown","llm","user",`Unknown model '${a}' - could not infer provider. Available providers: ${b.join(", ")}`,{model:a,availableProviders:b},"Specify the provider explicitly or use a recognized model name")}static unsupportedRouter(a,b){let c=t(b).map(a=>a);return new d.RK("llm_router_unsupported","llm","user",`Router '${a}' not supported for provider '${b}'. Supported: ${c.join(", ")}`,{router:a,provider:b,supportedRouters:c})}static rateLimitExceeded(a,b){return new d.RK("llm_rate_limit_exceeded","llm","rate_limit",`Rate limit exceeded for ${a}`,{details:{provider:a,retryAfter:b},recovery:b?`Wait ${b} seconds before retrying`:"Wait before retrying or upgrade your plan"})}static generationFailed(a,b,c){return new d.RK("llm_generation_failed","llm","third_party",`Generation failed: ${a}`,{details:{error:a,provider:b,model:c}})}static switchInputMissing(){return new d.RK("llm_switch_input_missing","llm","user","At least model or provider must be specified for LLM switch",{},"Provide either a model name, provider, or both")}};(0,e.e1)();var n=["openai","openai-compatible","anthropic","google","groq","xai","cohere"],o=["vercel","in-built"],p={openai:{models:[{name:"gpt-5",displayName:"GPT-5",maxInputTokens:4e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:1.25,outputPerM:10,cacheReadPerM:.125,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-5-mini",displayName:"GPT-5 Mini",maxInputTokens:4e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:.25,outputPerM:2,cacheReadPerM:.025,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-5-nano",displayName:"GPT-5 Nano",maxInputTokens:4e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:.05,outputPerM:.4,cacheReadPerM:.005,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-4.1",displayName:"GPT-4.1",maxInputTokens:1048576,supportedFileTypes:["pdf","image"],pricing:{inputPerM:2,outputPerM:8,cacheReadPerM:.5,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-4.1-mini",displayName:"GPT-4.1 Mini",maxInputTokens:1048576,default:!0,supportedFileTypes:["pdf","image"],pricing:{inputPerM:.4,outputPerM:1.6,cacheReadPerM:.1,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-4.1-nano",displayName:"GPT-4.1 Nano",maxInputTokens:1048576,supportedFileTypes:["pdf","image"],pricing:{inputPerM:.1,outputPerM:.4,cacheReadPerM:.025,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-4o",displayName:"GPT-4o",maxInputTokens:128e3,supportedFileTypes:["pdf","image"],pricing:{inputPerM:2.5,outputPerM:10,cacheReadPerM:1.25,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-4o-mini",displayName:"GPT-4o Mini",maxInputTokens:128e3,supportedFileTypes:["pdf","image"],pricing:{inputPerM:.15,outputPerM:.6,cacheReadPerM:.075,currency:"USD",unit:"per_million_tokens"}},{name:"gpt-4o-audio-preview",displayName:"GPT-4o Audio Preview",maxInputTokens:128e3,supportedFileTypes:["audio"],pricing:{inputPerM:2.5,outputPerM:10,currency:"USD",unit:"per_million_tokens"}},{name:"o4-mini",displayName:"O4 Mini",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:1.1,outputPerM:4.4,cacheReadPerM:.275,currency:"USD",unit:"per_million_tokens"}},{name:"o3",displayName:"O3",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:2,outputPerM:8,cacheReadPerM:.5,currency:"USD",unit:"per_million_tokens"}},{name:"o3-mini",displayName:"O3 Mini",maxInputTokens:2e5,supportedFileTypes:[],pricing:{inputPerM:1.1,outputPerM:4.4,cacheReadPerM:.55,currency:"USD",unit:"per_million_tokens"}},{name:"o1",displayName:"O1",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:15,outputPerM:60,cacheReadPerM:7.5,currency:"USD",unit:"per_million_tokens"}}],supportedRouters:["vercel","in-built"],baseURLSupport:"none",supportedFileTypes:[]},"openai-compatible":{models:[],supportedRouters:["vercel","in-built"],baseURLSupport:"required",supportedFileTypes:["pdf","image","audio"]},anthropic:{models:[{name:"claude-opus-4-1-20250805",displayName:"Claude 4.1 Opus",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:15,outputPerM:75,cacheWritePerM:18.75,cacheReadPerM:1.5,currency:"USD",unit:"per_million_tokens"}},{name:"claude-4-opus-20250514",displayName:"Claude 4 Opus",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:15,outputPerM:75,cacheWritePerM:18.75,cacheReadPerM:1.5,currency:"USD",unit:"per_million_tokens"}},{name:"claude-4-sonnet-20250514",displayName:"Claude 4 Sonnet",maxInputTokens:2e5,default:!0,supportedFileTypes:["pdf","image"],pricing:{inputPerM:3,outputPerM:15,cacheWritePerM:3.75,cacheReadPerM:.3,currency:"USD",unit:"per_million_tokens"}},{name:"claude-3-7-sonnet-20250219",displayName:"Claude 3.7 Sonnet",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:3,outputPerM:15,cacheWritePerM:3.75,cacheReadPerM:.3,currency:"USD",unit:"per_million_tokens"}},{name:"claude-3-5-sonnet-20240620",displayName:"Claude 3.5 Sonnet",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:3,outputPerM:15,cacheWritePerM:3.75,cacheReadPerM:.3,currency:"USD",unit:"per_million_tokens"}},{name:"claude-3-5-haiku-20241022",displayName:"Claude 3.5 Haiku",maxInputTokens:2e5,supportedFileTypes:["pdf","image"],pricing:{inputPerM:.8,outputPerM:4,cacheWritePerM:1,cacheReadPerM:.08,currency:"USD",unit:"per_million_tokens"}}],supportedRouters:["vercel","in-built"],baseURLSupport:"none",supportedFileTypes:[]},google:{models:[{name:"gemini-2.5-pro",displayName:"Gemini 2.5 Pro",maxInputTokens:1048576,default:!0,supportedFileTypes:["pdf","image","audio"],pricing:{inputPerM:1.25,outputPerM:10,cacheReadPerM:.31,currency:"USD",unit:"per_million_tokens"}},{name:"gemini-2.5-flash",displayName:"Gemini 2.5 Flash",maxInputTokens:1048576,supportedFileTypes:["pdf","image","audio"],pricing:{inputPerM:.3,outputPerM:2.5,currency:"USD",unit:"per_million_tokens"}},{name:"gemini-2.5-flash-lite",displayName:"Gemini 2.5 Flash Lite",maxInputTokens:1048576,supportedFileTypes:["pdf","image","audio"],pricing:{inputPerM:.1,outputPerM:.4,cacheReadPerM:.025,currency:"USD",unit:"per_million_tokens"}},{name:"gemini-2.0-flash",displayName:"Gemini 2.0 Flash",maxInputTokens:1048576,supportedFileTypes:["pdf","image","audio"],pricing:{inputPerM:.15,outputPerM:.6,cacheReadPerM:.025,cacheWritePerM:1,currency:"USD",unit:"per_million_tokens"}},{name:"gemini-2.0-flash-lite",displayName:"Gemini 2.0 Flash Lite",maxInputTokens:1048576,supportedFileTypes:["pdf","image","audio"],pricing:{inputPerM:.075,outputPerM:.3,currency:"USD",unit:"per_million_tokens"}}],supportedRouters:["vercel"],baseURLSupport:"none",supportedFileTypes:[]},groq:{models:[{name:"gemma-2-9b-it",displayName:"Gemma 2 9B Instruct",maxInputTokens:8192,supportedFileTypes:[],pricing:{inputPerM:.2,outputPerM:.2,currency:"USD",unit:"per_million_tokens"}},{name:"openai/gpt-oss-20b",displayName:"GPT OSS 20B 128k",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.1,outputPerM:.5,currency:"USD",unit:"per_million_tokens"}},{name:"openai/gpt-oss-120b",displayName:"GPT OSS 120B 128k",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.15,outputPerM:.75,currency:"USD",unit:"per_million_tokens"}},{name:"moonshotai/kimi-k2-instruct",displayName:"Kimi K2 1T 128k",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:1,outputPerM:3,currency:"USD",unit:"per_million_tokens"}},{name:"meta-llama/llama-4-scout-17b-16e-instruct",displayName:"Llama 4 Scout (17Bx16E) 128k",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.11,outputPerM:.34,currency:"USD",unit:"per_million_tokens"}},{name:"meta-llama/llama-4-maverick-17b-128e-instruct",displayName:"Llama 4 Maverick (17Bx128E) 128k",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.2,outputPerM:.6,currency:"USD",unit:"per_million_tokens"}},{name:"deepseek-r1-distill-llama-70b",displayName:"DeepSeek R1 Distill Llama 70B 128k",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.75,outputPerM:.9,currency:"USD",unit:"per_million_tokens"}},{name:"qwen/qwen3-32b",displayName:"Qwen3 32B 131k",maxInputTokens:131e3,supportedFileTypes:[],pricing:{inputPerM:.29,outputPerM:.59,currency:"USD",unit:"per_million_tokens"}},{name:"llama-3.3-70b-versatile",displayName:"Llama 3.3 70B Versatile",maxInputTokens:128e3,default:!0,supportedFileTypes:[],pricing:{inputPerM:.59,outputPerM:.79,currency:"USD",unit:"per_million_tokens"}}],supportedRouters:["vercel"],baseURLSupport:"none",supportedFileTypes:[]},xai:{models:[{name:"grok-4",displayName:"Grok 4",maxInputTokens:256e3,default:!0,supportedFileTypes:["image"],pricing:{inputPerM:3,outputPerM:15,cacheReadPerM:.75,currency:"USD",unit:"per_million_tokens"}},{name:"grok-3",displayName:"Grok 3",maxInputTokens:131072,supportedFileTypes:["image"],pricing:{inputPerM:3,outputPerM:15,cacheReadPerM:.75,currency:"USD",unit:"per_million_tokens"}},{name:"grok-3-mini",displayName:"Grok 3 Mini",maxInputTokens:131072,supportedFileTypes:["image"],pricing:{inputPerM:.3,outputPerM:.5,cacheReadPerM:.075,currency:"USD",unit:"per_million_tokens"}},{name:"grok-code-fast-1",displayName:"Grok Code Fast",maxInputTokens:131072,supportedFileTypes:[],pricing:{inputPerM:.2,outputPerM:1.5,cacheReadPerM:.02,currency:"USD",unit:"per_million_tokens"}}],supportedRouters:["vercel"],baseURLSupport:"none",supportedFileTypes:[]},cohere:{models:[{name:"command-a-03-2025",displayName:"Command A (03-2025)",maxInputTokens:256e3,default:!0,supportedFileTypes:[],pricing:{inputPerM:2.5,outputPerM:10,currency:"USD",unit:"per_million_tokens"}},{name:"command-r-plus",displayName:"Command R+",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:2.5,outputPerM:10,currency:"USD",unit:"per_million_tokens"}},{name:"command-r",displayName:"Command R",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.15,outputPerM:.6,currency:"USD",unit:"per_million_tokens"}},{name:"command-r7b",displayName:"Command R7B",maxInputTokens:128e3,supportedFileTypes:[],pricing:{inputPerM:.0375,outputPerM:.15,currency:"USD",unit:"per_million_tokens"}}],supportedRouters:["vercel"],baseURLSupport:"none",supportedFileTypes:[]}};function q(a){return p[a].models.map(a=>a.name)}function r(a,b){let c=p[a].models.find(a=>a.name.toLowerCase()===b.toLowerCase());if(!c){let c=q(a).join(", ");throw g.vF.error(`Model '${b}' not found for provider '${a}' in LLM registry. Supported models: ${c}`),m.unknownModel(a,b)}return g.vF.debug(`Found max tokens for ${a}/${b}: ${c.maxInputTokens}`),c.maxInputTokens}function s(a,b){return p[a].models.some(a=>a.name.toLowerCase()===b.toLowerCase())}function t(a){return p[a].supportedRouters}function u(a){return"none"!==p[a].baseURLSupport}function v(a){return"required"===p[a].baseURLSupport}function w(a){return 0===p[a].models.length}function x(a,b,c){let d=p[a].models.find(a=>a.name.toLowerCase()===b.toLowerCase());return d&&d.supportedRouters?d.supportedRouters.includes(c):z(a,c)}function y(a,b){let c=p[a].models.find(a=>a.name.toLowerCase()===b.toLowerCase());return c&&c.supportedRouters?c.supportedRouters:t(a)}function z(a,b){return t(a).includes(b)}(0,e.e1)();var A=j.Yj().transform(a=>a.trim()).refine(a=>a.length>0,{message:"Required"}),B=j.Yj().transform(a=>a.trim()).refine(a=>""===a||function(a){try{let b=new URL(a);return"http:"===b.protocol||"https:"===b.protocol}catch{return!1}}(a),{message:"Invalid URL"}).transform(a=>""===a?void 0:a).optional(),C=a=>j.Yj().transform(b=>{if("string"!=typeof b)return"";let c=a??process.env;return b.replace(/\$([A-Z_][A-Z0-9_]*)|\${([A-Z_][A-Z0-9_]*)}/gi,(a,b,d)=>c[b||d]??"").trim()}),D=a=>C(a).refine(a=>{try{let b=new URL(a);return"http:"===b.protocol||"https:"===b.protocol}catch{return!1}},{message:"Invalid URL"});(0,e.e1)();var E=(a=>(a.FILE_NOT_FOUND="preference_file_not_found",a.FILE_READ_ERROR="preference_file_read_error",a.FILE_WRITE_ERROR="preference_file_write_error",a.VALIDATION_ERROR="preference_validation_error",a.MODEL_INCOMPATIBLE="preference_model_incompatible",a))(E||{}),F=j.Ik({provider:j.k5(n).describe("LLM provider (openai, anthropic, google, etc.)"),model:A.describe("Model name for the provider"),apiKey:j.Yj().regex(/^\$[A-Z_][A-Z0-9_]*$/,"Must be environment variable reference (e.g., $OPENAI_API_KEY)").describe("Environment variable reference for API key")}).strict().superRefine((a,b)=>{if(!s(a.provider,a.model)){let c=q(a.provider);b.addIssue({code:k.eq.custom,path:["model"],message:`Model '${a.model}' is not supported by provider '${a.provider}'. Supported models: ${c.join(", ")}`,params:{code:"preference_model_incompatible",scope:"preference",type:"user"}})}}),G=j.Ik({defaultAgent:j.Yj().min(1).describe("Default agent name for global CLI usage (required)")}).strict(),H=j.Ik({completed:j.zM().default(!1).describe("Whether initial setup has been completed")}).strict(),I=j.Ik({llm:F.describe("LLM configuration preferences"),defaults:G.describe("Default behavior preferences (required)"),setup:H.default({completed:!1}).describe("Setup completion tracking")}).strict();(0,e.e1)();var J="preferences.yml";(0,e.e1)();var K=class{static fileNotFound(a){return new d.RK("preference_file_not_found","preference","user",`Preferences file not found: ${a}`,{preferencesPath:a},"Run `dexto setup` to create preferences")}static fileReadError(a,b){return new d.RK("preference_file_read_error","preference","system",`Failed to read preferences: ${b}`,{preferencesPath:a,cause:b},"Check file permissions and ensure the file is not corrupted")}static fileWriteError(a,b){return new d.RK("preference_file_write_error","preference","system",`Failed to save preferences: ${b}`,{preferencesPath:a,cause:b},"Check file permissions and available disk space")}static validationFailed(a){return new f(a.issues.map(a=>({code:"preference_validation_error",message:`${a.path.join(".")}: ${a.message}`,scope:"preference",type:"user",severity:"error"})))}};async function L(){let a=(0,g.Rc)(J);if(!(0,h.existsSync)(a))throw K.fileNotFound(a);try{let b=await h.promises.readFile(a,"utf-8"),c=(0,i.qg)(b),d=I.safeParse(c);if(!d.success)throw K.validationFailed(d.error);return g.vF.debug(`Loaded global preferences from: ${a}`),d.data}catch(b){if(b instanceof f||b instanceof d.RK)throw b;throw K.fileReadError(a,b instanceof Error?b.message:String(b))}}async function M(a){let b=(0,g.Rc)(J),c=I.safeParse(a);if(!c.success)throw K.validationFailed(c.error);try{g.vF.info(`Saving global preferences to: ${b}`);let c=(0,g.Rc)("");await h.promises.mkdir(c,{recursive:!0});let d=(0,i.As)(a,{indent:2,lineWidth:100,minContentWidth:20});await h.promises.writeFile(b,d,"utf-8"),g.vF.info(`\u2713 Saved global preferences ${JSON.stringify(a)} to: ${b}`)}catch(a){throw K.fileWriteError(b,a instanceof Error?a.message:String(a))}}async function N(a){let b=await L(),c={...b,...a,llm:a.llm||b.llm,defaults:a.defaults?{...b.defaults,...a.defaults}:b.defaults,setup:a.setup?{...b.setup,...a.setup}:b.setup},d=I.safeParse(c);if(!d.success)throw K.validationFailed(d.error);return await M(d.data),d.data}},34820:(a,b,c)=>{"use strict";c.d(b,{ChatProvider:()=>e});var d=c(95364);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call ChatProvider() from the server but ChatProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/dexto/dexto/packages/webui/components/hooks/ChatContext.tsx","ChatProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useChatContext() from the server but useChatContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/dexto/dexto/packages/webui/components/hooks/ChatContext.tsx","useChatContext")},42711:(a,b,c)=>{"use strict";c.d(b,{P$:()=>j,e1:()=>l,f1:()=>k}),c(33873),c(79551);var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b)=>function(){return b||(0,a[g(a)[0]])((b={exports:{}}).exports,b),b.exports},k=(a,b,c)=>(c=null!=a?d(h(a)):{},((a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let c of g(b))i.call(a,c)||void 0===c||e(a,c,{get:()=>b[c],enumerable:!(d=f(b,c))||d.enumerable});return a})(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l=((a,b)=>function(){return a&&(b=(0,a[g(a)[0]])(a=0)),b})({"../../node_modules/.pnpm/tsup@8.5.0_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js"(){}})},52623:(a,b,c)=>{Promise.resolve().then(c.bind(c,64516)),Promise.resolve().then(c.bind(c,63501))},53592:(a,b,c)=>{"use strict";c.d(b,{G8:()=>f,RK:()=>g});var d=c(42711),e=c(55511);(0,d.e1)();var f=class extends Error{constructor(a,b){super(a),this.traceId=b||(0,e.randomUUID)(),this.name=this.constructor.name}};(0,d.e1)();var g=class extends f{constructor(a,b,c,d,e,f,g){super(d,g),this.code=a,this.scope=b,this.type=c,this.context=e,this.recovery=f,this.name="DextoRuntimeError"}toJSON(){return{code:this.code,message:this.message,scope:this.scope,type:this.type,context:this.context,recovery:this.recovery,traceId:this.traceId}}};(0,d.e1)();var h=(a=>(a.LLM="llm",a.AGENT="agent",a.CONFIG="config",a.CONTEXT="context",a.SESSION="session",a.MCP="mcp",a.TOOLS="tools",a.STORAGE="storage",a.SYSTEM_PROMPT="system_prompt",a.PREFERENCE="preference",a.AGENT_REGISTRY="agent_registry",a))(h||{}),i=(a=>(a.USER="user",a.NOT_FOUND="not_found",a.FORBIDDEN="forbidden",a.TIMEOUT="timeout",a.RATE_LIMIT="rate_limit",a.SYSTEM="system",a.THIRD_PARTY="third_party",a.UNKNOWN="unknown",a))(i||{})},61622:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,28710,23)),Promise.resolve().then(c.t.bind(c,11865,23)),Promise.resolve().then(c.t.bind(c,54401,23)),Promise.resolve().then(c.t.bind(c,11096,23)),Promise.resolve().then(c.t.bind(c,55368,23)),Promise.resolve().then(c.t.bind(c,53612,23)),Promise.resolve().then(c.t.bind(c,88572,23)),Promise.resolve().then(c.t.bind(c,47629,23)),Promise.resolve().then(c.bind(c,74476))},63501:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{SpeechReset:()=>d}),c(4039)},64516:(a,b,c)=>{"use strict";c.d(b,{ChatProvider:()=>h,v:()=>i});var d=c(35270),e=c(4039),f=c(86728);let g=(0,e.createContext)(void 0);function h({children:a}){let b=process.env.NEXT_PUBLIC_WS_URL||"ws://localhost:3001",[c,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!0),[k,l]=(0,e.useState)(!0),{messages:m,sendMessage:n,status:o,reset:p,setMessages:q,websocket:r,activeError:s,clearError:t,processing:u,cancel:v}=(0,f.Y_)(b,()=>c),[w,x]=(0,e.useState)(null),y=(0,e.useCallback)(async a=>{try{let b=void 0!==a?a:c,d=b?`/api/llm/current?sessionId=${b}`:"/api/llm/current",e=await fetch(d);if(e.ok){let a=await e.json(),b=a.config||a;x({provider:b.provider,model:b.model,displayName:b.displayName,router:b.router,baseURL:b.baseURL})}}catch{}},[c]),{greeting:z}=function(a){let[b,c]=(0,e.useState)(null),[d,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)(null);return{greeting:b,isLoading:d,error:g}}(0),A=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!a.ok)throw Error("Failed to create session");return(await a.json()).session.id}catch(a){return console.error("Error creating auto session:",a),`chat-${Date.now()}`}},[]),B=(0,e.useCallback)(async(a,b,d)=>{let e=c;!e&&i&&(h(e=await A()),j(!1),await y(e)),e?n(a,b,d,e,k):console.error("No session available for sending message")},[n,c,i,A,k]),C=(0,e.useCallback)(()=>{c&&p(c)},[p,c]),D=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/sessions/${a}/history`);if(!b.ok){if(404===b.status){if(!(await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:a})})).ok)throw Error("Failed to create session");q([]);return}throw Error("Failed to load session history")}let c=(await b.json()).history||[],d=[];for(let b=0;b<c.length;b++){let e=c[b],f={id:`session-${a}-${b}`,role:e.role,content:e.content,createdAt:Date.now()-(c.length-b)*1e3,sessionId:a,tokenUsage:e.tokenUsage,reasoning:e.reasoning,model:e.model,router:e.router,provider:e.provider};if("assistant"===e.role&&e.toolCalls&&e.toolCalls.length>0)e.content&&d.push(f),e.toolCalls.forEach((e,f)=>{let g,h=e.function?JSON.parse(e.function.arguments||"{}"):{},i=e.function?.name||"unknown";for(let a=b+1;a<c.length;a++){let b=c[a];if("tool"===b.role&&b.toolCallId===e.id){g=b.content;break}}d.push({id:`session-${a}-${b}-tool-${f}`,role:"tool",content:null,createdAt:Date.now()-(c.length-b)*1e3+f,sessionId:a,toolName:i,toolArgs:h,toolResult:g})});else{if("tool"===e.role)continue;d.push(f)}}q(d)}catch(a){console.error("Error loading session history:",a),q([])}},[q,y]),E=(0,e.useCallback)(async a=>{if(a!==c)try{h(a),j(!1),await D(a),await y(a)}catch(a){throw console.error("Error switching session:",a),a}},[c,D]),F=(0,e.useCallback)(()=>{h(null),j(!0),q([]),x(null)},[q]);return(0,d.jsx)(g.Provider,{value:{messages:m,sendMessage:B,status:o,reset:C,currentSessionId:c,switchSession:E,loadSessionHistory:D,isWelcomeState:i,returnToWelcome:F,isStreaming:k,setStreaming:l,websocket:r,currentLLM:w,refreshCurrentLLM:y,processing:u,cancel:v,activeError:s,clearError:t,greeting:z},children:a})}function i(){let a=(0,e.useContext)(g);if(!a)throw Error("useChatContext must be used within a ChatProvider");return a}},86728:(a,b,c)=>{"use strict";c.d(b,{kz:()=>ag,EQ:()=>ah,j0:()=>af,PI:()=>ae,P2:()=>ad,KU:()=>ac,Y_:()=>aj});var d=c(4039),e=c(33647),f=c(17387),g=c(53592),h=c(42711);c(8086),c(54542),c(29072);var i=c(94735);c(55511);var j=c(61804),k=c(2946),l=c(78407),m=c(52028),n=c(36906),o=c(18206),p=c(34003);c(79748),c(33873),c(29021),c(94428),c(21820),c(96155),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var q=(a=>(a.SESSION_NOT_FOUND="session_not_found",a.SESSION_INITIALIZATION_FAILED="session_initialization_failed",a.SESSION_MAX_SESSIONS_EXCEEDED="session_max_sessions_exceeded",a.SESSION_STORAGE_FAILED="session_storage_failed",a.SESSION_RESET_FAILED="session_reset_failed",a))(q||{});(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var r=["dexto:conversationReset","dexto:mcpServerConnected","dexto:availableToolsUpdated","dexto:llmSwitched","dexto:stateChanged","dexto:stateExported","dexto:stateReset","dexto:sessionOverrideSet","dexto:sessionOverrideCleared","dexto:mcpServerAdded","dexto:mcpServerRemoved","dexto:mcpServerUpdated","dexto:toolConfirmationRequest","dexto:toolConfirmationResponse"],s=["llmservice:thinking","llmservice:chunk","llmservice:response","llmservice:toolCall","llmservice:toolResult","llmservice:error","llmservice:switched","llmservice:unsupportedInput"],t=[...r,...s];Object.freeze([...r]),Object.freeze([...s]),Object.freeze([...t]);var u=class extends i.EventEmitter{emit(a,...b){return super.emit(a,...b)}on(a,b,c){if(c?.signal?.aborted)return this;if(super.on(a,b),c?.signal){let d=c.signal;this._abortListeners.has(d)||this._abortListeners.set(d,new Set),this._abortListeners.get(d).add({event:a,listener:b});let e=()=>{this.off(a,b);let c=this._abortListeners.get(d);c&&(c.delete({event:a,listener:b}),0===c.size&&this._abortListeners.delete(d))};d.addEventListener("abort",e,{once:!0})}return this}once(a,b,c){if(c?.signal?.aborted)return this;let d=(...e)=>{if(c?.signal){let b=this._abortListeners.get(c.signal);b&&(b.delete({event:a,listener:d}),0===b.size&&this._abortListeners.delete(c.signal))}b(...e)};if(super.once(a,d),c?.signal){let b=c.signal;this._abortListeners.has(b)||this._abortListeners.set(b,new Set),this._abortListeners.get(b).add({event:a,listener:d});let e=()=>{this.off(a,d);let c=this._abortListeners.get(b);c&&(c.delete({event:a,listener:d}),0===c.size&&this._abortListeners.delete(b))};b.addEventListener("abort",e,{once:!0})}return this}off(a,b){return super.off(a,b)}constructor(...a){super(...a),this._abortListeners=new WeakMap}};new class extends u{},(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var v={openai:["OPENAI_API_KEY","OPENAI_KEY"],"openai-compatible":["OPENAI_API_KEY","OPENAI_KEY"],anthropic:["ANTHROPIC_API_KEY","ANTHROPIC_KEY","CLAUDE_API_KEY"],google:["GOOGLE_GENERATIVE_AI_API_KEY","GOOGLE_API_KEY","GEMINI_API_KEY"],groq:["GROQ_API_KEY"],cohere:["COHERE_API_KEY"],xai:["XAI_API_KEY","X_AI_API_KEY"]},w={provider:j.k5(e.VC).describe("LLM provider (e.g., 'openai', 'anthropic', 'google', 'groq')"),model:e.Fy.describe("Specific model name for the selected provider"),apiKey:(0,e.gB)().describe("API key for provider; can be given directly or via $ENV reference"),maxIterations:j.au.number().int().positive().describe("Max iterations for agentic loops"),router:j.k5(e.$$).describe("Router to use (vercel | in-built)"),baseURL:e.Sd.describe("Base URL for provider (e.g., https://api.openai.com/v1). Only certain providers support this."),maxInputTokens:j.au.number().int().positive().optional().describe("Max input tokens for history; required for unknown models"),maxOutputTokens:j.au.number().int().positive().optional().describe("Max tokens for model output"),temperature:j.au.number().min(0).max(1).optional().describe("Randomness: 0 deterministic, 1 creative")},x=j.Ik({provider:w.provider,model:w.model,apiKey:w.apiKey,maxIterations:j.au.number().int().positive().default(50),router:j.k5(e.$$).default("vercel"),baseURL:w.baseURL,maxInputTokens:w.maxInputTokens,maxOutputTokens:w.maxOutputTokens,temperature:w.temperature}).strict().superRefine((a,b)=>{let c=null!=a.baseURL&&""!==a.baseURL.trim(),d=null!=a.maxInputTokens;if(!a.apiKey?.trim()){let c=function(a){let b=v[a];return b?.[0]||`${a.toUpperCase()}_API_KEY`}(a.provider);b.addIssue({code:k.eq.custom,path:["apiKey"],message:`Missing API key for provider '${a.provider}' \u2013 set $${c}`,params:{code:"llm_api_key_missing",scope:"llm",type:"user",provider:a.provider,envVar:c}})}if(c)(0,e.Bo)(a.provider)||b.addIssue({code:k.eq.custom,path:["provider"],message:`Provider '${a.provider}' does not support baseURL. Use an 'openai-compatible' provider if you need a custom base URL.`,params:{code:"llm_base_url_invalid",scope:"llm",type:"user"}});else if((0,e.h2)(a.provider))b.addIssue({code:k.eq.custom,path:["baseURL"],message:`Provider '${a.provider}' requires a 'baseURL'.`,params:{code:"llm_base_url_missing",scope:"llm",type:"user"}});else{if(!(0,e.hy)(a.provider)){let c=(0,e.Hh)(a.provider);(0,e.FG)(a.provider,a.model)||b.addIssue({code:k.eq.custom,path:["model"],message:`Model '${a.model}' is not supported for provider '${a.provider}'. Supported: ${c.join(", ")}`,params:{code:"llm_model_incompatible",scope:"llm",type:"user"}})}if(d&&!(0,e.hy)(a.provider))try{let c=(0,e.dL)(a.provider,a.model);a.maxInputTokens>c&&b.addIssue({code:k.eq.custom,path:["maxInputTokens"],message:`Max input tokens for model '${a.model}' is ${c}. You provided ${a.maxInputTokens}`,params:{code:"llm_tokens_exceeded",scope:"llm",type:"user"}})}catch(a){if(a instanceof g.RK&&"llm_model_unknown"===a.code)b.addIssue({code:k.eq.custom,path:["model"],message:a.message,params:{code:a.code,scope:a.scope,type:a.type}});else{let c=a instanceof Error?a.message:"Unknown error occurred";b.addIssue({code:k.eq.custom,path:["model"],message:c,params:{code:"llm_request_invalid_schema",scope:"llm",type:"system"}})}}}if(!(0,e.Ay)(a.provider,a.model,a.router)){let c=(0,e.pH)(a.provider,a.model);b.addIssue({code:k.eq.custom,path:["router"],message:`Model '${a.model}' (${a.provider}) does not support router '${a.router}'. Supported: ${c.join(", ")}`,params:{code:"llm_router_unsupported",scope:"llm",type:"user"}})}}).brand();j.Ik({...w}).partial().strict().superRefine((a,b)=>{a.model||a.provider||a.router||b.addIssue({code:k.eq.custom,message:"At least model, provider, or router must be specified for LLM switch",path:[]})}),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var y=(a=>(a.NOT_STARTED="agent_not_started",a.ALREADY_STARTED="agent_already_started",a.STOPPED="agent_stopped",a.INITIALIZATION_FAILED="agent_initialization_failed",a.API_VALIDATION_ERROR="agent_api_validation_error",a))(y||{});(0,h.e1)(),(0,h.e1)();var z=(a=>(a.SCHEMA_VALIDATION="mcp_schema_validation",a.COMMAND_MISSING="mcp_command_missing",a.DUPLICATE_NAME="mcp_duplicate_name",a.CONNECTION_FAILED="mcp_connection_failed",a.PROTOCOL_ERROR="mcp_protocol_error",a.TOOL_NOT_FOUND="mcp_tool_not_found",a.PROMPT_NOT_FOUND="mcp_prompt_not_found",a.RESOURCE_NOT_FOUND="mcp_resource_not_found",a))(z||{}),A=class{static connectionFailed(a,b){return new g.RK("mcp_connection_failed","mcp","third_party",`Failed to connect to MCP server '${a}': ${b}`,{serverName:a,reason:b},"Check that the MCP server is running and accessible")}static protocolError(a,b){return new g.RK("mcp_protocol_error","mcp","third_party",`MCP protocol error: ${a}`,b,"Check MCP server compatibility and protocol version")}static duplicateName(a,b){return new g.RK("mcp_duplicate_name","mcp","user",`Server name '${a}' conflicts with existing '${b}'`,{name:a,existingName:b},"Use a unique name for each MCP server")}static toolNotFound(a){return new g.RK("mcp_tool_not_found","mcp","not_found",`No MCP tool found: ${a}`,{toolName:a})}static promptNotFound(a){return new g.RK("mcp_prompt_not_found","mcp","not_found",`No client found for prompt: ${a}`,{promptName:a})}static resourceNotFound(a){return new g.RK("mcp_resource_not_found","mcp","not_found",`No client found for resource: ${a}`,{resourceUri:a})}static clientNotConnected(a){return new g.RK("mcp_connection_failed","mcp","system",`MCP client is not connected${a?`: ${a}`:""}`,{context:a})}static invalidToolSchema(a,b){return new g.RK("mcp_protocol_error","mcp","third_party",`Tool '${a}' has invalid schema: ${b}`,{toolName:a,reason:b})}};(0,h.e1)(),(0,h.e1)();var B=j.Ik({type:j.eu("stdio"),command:(0,e.gB)().superRefine((a,b)=>{0===a.length&&b.addIssue({code:k.eq.custom,message:"Stdio server requires a non-empty command",params:{code:"mcp_command_missing",scope:"mcp",type:"user"},path:["command"]})}),args:j.YO((0,e.gB)()).default([]).describe("Array of arguments for the command (e.g., ['script.js'])"),env:j.g1((0,e.gB)()).default({}).describe("Optional environment variables for the server process"),timeout:j.au.number().int().positive().default(3e4),connectionMode:j.k5(["strict","lenient"]).default("lenient")}).strict(),C=j.Ik({type:j.eu("sse"),url:(0,e.iG)(process.env).describe("URL for the SSE server endpoint"),headers:j.g1((0,e.gB)()).default({}),timeout:j.au.number().int().positive().default(3e4),connectionMode:j.k5(["strict","lenient"]).default("lenient")}).strict(),D=j.Ik({type:j.eu("http"),url:(0,e.iG)(process.env).describe("URL for the HTTP server"),headers:j.g1((0,e.gB)()).default({}),timeout:j.au.number().int().positive().default(3e4),connectionMode:j.k5(["strict","lenient"]).default("lenient")}).strict(),E=j.gM("type",[B,C,D]).superRefine((a,b)=>{}).brand(),F=j.g1(E).describe("A dictionary of server configurations, keyed by server name").brand();(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var G=class{async connect(a,b){if(this.timeout=a.timeout??3e4,"stdio"===a.type){let c=a.command;return"win32"===process.platform&&"npx"===c&&(c="C:\\Program Files\\nodejs\\npx.cmd"),this.connectViaStdio(c,a.args,a.env,b)}if("sse"===a.type)return this.connectViaSSE(a.url,a.headers,b);if("http"===a.type)return this.connectViaHttp(a.url,a.headers||{},b);throw A.protocolError(`Unsupported server type: ${JSON.stringify(a)}`)}async connectViaStdio(a,b=[],c,d){if(this.serverCommand=a,this.originalArgs=[...b],this.resolvedArgs=[...this.originalArgs],this.serverEnv=c||null,this.serverAlias=d||null,"node"===a&&this.resolvedArgs&&this.resolvedArgs.length>0&&this.resolvedArgs[0]?.startsWith("dist/"))try{let a=this.resolvedArgs[0];this.resolvedArgs[0]=(0,f._N)(a),f.vF.debug(`Resolved bundled script path: ${a} -> ${this.resolvedArgs[0]}`)}catch(a){f.vF.warn(`Failed to resolve path for bundled script ${this.resolvedArgs[0]}: ${JSON.stringify(a,null,2)}`)}f.vF.info("======================================="),f.vF.info(`MCP SERVER: ${a} ${this.resolvedArgs.join(" ")}`,null,"magenta"),c&&(f.vF.info("Environment:"),Object.entries(c).forEach(([a,b])=>{f.vF.info(` ${a}= [value hidden]`)})),f.vF.info("=======================================\n");let e=this.serverAlias?`"${this.serverAlias}" (${a} ${this.resolvedArgs.join(" ")})`:`${a} ${this.resolvedArgs.join(" ")}`;f.vF.info(`Connecting to MCP server: ${e}`);let g={...process.env,...c||{}};this.transport=new m.oQ({command:a,args:this.resolvedArgs,env:g}),this.client=new l.K({name:"Dexto-stdio-mcp-client",version:"1.0.0"},{capabilities:{tools:{}}});try{return f.vF.info("Establishing connection..."),await this.client.connect(this.transport),this.serverSpawned=!0,f.vF.info(`\u2705 Stdio SERVER ${e} SPAWNED`),f.vF.info("Connection established!\n\n"),this.isConnected=!0,this.client}catch(a){throw f.vF.error(`Failed to connect to MCP server ${e}: ${JSON.stringify(a.message,null,2)}`),a}}async connectViaSSE(a,b={},c){f.vF.debug(`Connecting to SSE MCP server at url: ${a}`),this.transport=new n.A(new URL(a),{requestInit:{headers:b}}),f.vF.debug(`[connectViaSSE] SSE transport: ${JSON.stringify(this.transport,null,2)}`),this.client=new l.K({name:"Dexto-sse-mcp-client",version:"1.0.0"},{capabilities:{tools:{}}});try{return f.vF.info("Establishing connection..."),await this.client.connect(this.transport),this.serverSpawned=!0,f.vF.info(`\u2705 ${c} SSE SERVER SPAWNED`),f.vF.info("Connection established!\n\n"),this.isConnected=!0,this.client}catch(b){throw f.vF.error(`Failed to connect to SSE MCP server ${a}: ${JSON.stringify(b.message,null,2)}`),b}}async connectViaHttp(a,b={},c){f.vF.info(`Connecting to HTTP MCP server at ${a}`),this.transport=new o.j(new URL(a),{requestInit:{headers:b||{}}}),this.client=new l.K({name:"Dexto-http-mcp-client",version:"1.0.0"},{capabilities:{tools:{}}});try{return f.vF.info("Establishing HTTP connection..."),await this.client.connect(this.transport),this.isConnected=!0,f.vF.info(`\u2705 HTTP SERVER ${c??a} CONNECTED`),this.client}catch(b){throw f.vF.error(`Failed to connect to HTTP MCP server ${a}: ${JSON.stringify(b.message,null,2)}`),b}}async disconnect(){if(this.transport&&"function"==typeof this.transport.close)try{await this.transport.close(),this.isConnected=!1,this.serverSpawned=!1,f.vF.info("Disconnected from MCP server")}catch(a){f.vF.error(`Error disconnecting from MCP server: ${JSON.stringify(a.message,null,2)}`)}}async callTool(a,b){this.ensureConnected();try{f.vF.debug(`Calling tool '${a}' with args: ${JSON.stringify(b,null,2)}`);let c=b;if("string"==typeof b)try{c=JSON.parse(b)}catch{c={input:b}}f.vF.debug(`Using timeout: ${this.timeout}`);let d=await this.client.callTool({name:a,arguments:c},void 0,{timeout:this.timeout}),e=JSON.stringify(d,(a,b)=>"data"===a&&"string"==typeof b&&b.length>100?`[Base64 data: ${b.length} chars]`:b,2);if(f.vF.debug(`Tool '${a}' result: ${e}`),null==d)return"Tool executed successfully with no result data.";return d}catch(b){return f.vF.error(`Tool call '${a}' failed: ${JSON.stringify(b,null,2)}`),`Error executing tool '${a}': ${b instanceof Error?b.message:String(b)}`}}async getTools(){this.ensureConnected();let a={};try{let b=await this.client.listTools({});if(f.vF.silly(`listTools result: ${JSON.stringify(b,null,2)}`),b&&b.tools)b.tools.forEach(b=>{if(b.description||f.vF.warn(`Tool '${b.name}' is missing a description`),!b.inputSchema)throw A.invalidToolSchema(b.name,"missing input schema");a[b.name]={description:b.description??"",parameters:b.inputSchema}});else throw A.protocolError("listTools did not return the expected structure: missing tools")}catch(a){f.vF.warn(`Failed to get tools from MCP server, proceeding with zero tools: ${JSON.stringify(a,null,2)}`)}return a}async listPrompts(){this.ensureConnected();try{let a=await this.client.listPrompts();return f.vF.debug(`listPrompts response: ${JSON.stringify(a,null,2)}`),a.prompts.map(a=>a.name)}catch(a){return f.vF.debug(`Failed to list prompts from MCP server (optional feature), skipping: ${JSON.stringify(a,null,2)}`),[]}}async getPrompt(a,b){this.ensureConnected();try{f.vF.debug(`Getting prompt '${a}' with args: ${JSON.stringify(b,null,2)}`);let c=await this.client.getPrompt({name:a,arguments:b},{timeout:this.timeout});return f.vF.debug(`getPrompt '${a}' response: ${JSON.stringify(c,null,2)}`),c}catch(b){throw f.vF.debug(`Failed to get prompt '${a}' from MCP server: ${JSON.stringify(b,null,2)}`),A.protocolError(`Error getting prompt '${a}': ${b instanceof Error?b.message:String(b)}`)}}async listResources(){this.ensureConnected();try{let a=await this.client.listResources();return f.vF.debug(`listResources response: ${JSON.stringify(a,null,2)}`),a.resources.map(a=>a.uri)}catch(a){return f.vF.debug(`Failed to list resources from MCP server (optional feature), skipping: ${JSON.stringify(a,null,2)}`),[]}}async readResource(a){this.ensureConnected();try{f.vF.debug(`Reading resource '${a}'`);let b=await this.client.readResource({uri:a},{timeout:this.timeout});return f.vF.debug(`readResource '${a}' response: ${JSON.stringify(b,null,2)}`),b}catch(b){throw f.vF.debug(`Failed to read resource '${a}' from MCP server: ${JSON.stringify(b,null,2)}`),A.protocolError(`Error reading resource '${a}': ${b instanceof Error?b.message:String(b)}`)}}getConnectionStatus(){return this.isConnected}getClient(){return this.client}getServerInfo(){return{spawned:this.serverSpawned,pid:this.serverPid,command:this.serverCommand,originalArgs:this.originalArgs,resolvedArgs:this.resolvedArgs,env:this.serverEnv,alias:this.serverAlias}}async getConnectedClient(){if(!this.client||!this.isConnected)throw A.clientNotConnected();return this.client}ensureConnected(){if(!this.isConnected||!this.client)throw A.clientNotConnected("Please call connect() first")}constructor(){this.client=null,this.transport=null,this.isConnected=!1,this.serverCommand=null,this.originalArgs=null,this.resolvedArgs=null,this.serverEnv=null,this.serverSpawned=!1,this.serverPid=null,this.serverAlias=null,this.timeout=6e4}};(class a{static{this.SERVER_DELIMITER="--"}constructor(){this.clients=new Map,this.connectionErrors={},this.toolToClientMap=new Map,this.serverToolsMap=new Map,this.toolConflicts=new Set,this.promptToClientMap=new Map,this.resourceToClientMap=new Map,this.sanitizedNameToServerMap=new Map}registerClient(a,b){this.clients.has(a)&&f.vF.warn(`Client '${a}' already registered. Overwriting.`),this.clearClientCache(a);let c=this.sanitizeServerName(a),d=this.sanitizedNameToServerMap.get(c);if(d&&d!==a)throw A.duplicateName(a,d);this.clients.set(a,b),this.sanitizedNameToServerMap.set(c,a),f.vF.info(`Registered client: ${a}`),delete this.connectionErrors[a]}clearClientCache(a){let b=this.clients.get(a);if(!b)return;let c=this.serverToolsMap.has(a);this.serverToolsMap.delete(a);let d=this.sanitizeServerName(a);this.sanitizedNameToServerMap.get(d)===a&&this.sanitizedNameToServerMap.delete(d),[this.toolToClientMap,this.promptToClientMap,this.resourceToClientMap].forEach(a=>{for(let[c,d]of Array.from(a.entries()))d===b&&a.delete(c)}),c&&this.rebuildToolConflicts(),f.vF.debug(`Cleared cache for client: ${a}`)}rebuildToolConflicts(){this.toolConflicts.clear();let a=new Map;for(let b of this.serverToolsMap.values())for(let c of b.keys())a.set(c,(a.get(c)||0)+1);for(let[b,c]of a.entries())c>1&&(this.toolConflicts.add(b),this.toolToClientMap.delete(b));for(let[a,b]of this.serverToolsMap.entries())for(let[a,c]of b.entries())this.toolConflicts.has(a)||this.toolToClientMap.set(a,c)}sanitizeServerName(a){return a.replace(/[^a-zA-Z0-9_-]/g,"_")}async updateClientCache(a,b){let c=new Map;this.serverToolsMap.set(a,c);try{let d=await b.getTools();for(let e in f.vF.debug(`\u{1F527} Discovered ${Object.keys(d).length} tools from server '${a}': [${Object.keys(d).join(", ")}]`),d){c.set(e,b);let d=this.toolToClientMap.get(e);d&&d!==b?(this.toolConflicts.add(e),this.toolToClientMap.delete(e),f.vF.warn(`\u26A0\uFE0F Tool conflict detected for '${e}' - will use server prefix`)):this.toolConflicts.has(e)||(this.toolToClientMap.set(e,b),f.vF.debug(`\u2705 Tool '${e}' mapped to ${a}`))}f.vF.debug(`\u2705 Successfully cached ${Object.keys(d).length} tools for client: ${a}`)}catch(b){f.vF.error(`\u274C Error retrieving tools for client ${a}: ${b instanceof Error?b.message:String(b)}`);return}try{(await b.listPrompts()).forEach(a=>{this.promptToClientMap.set(a,b)}),f.vF.debug(`Cached prompts for client: ${a}`)}catch(b){f.vF.debug(`Skipping prompts for client ${a}: ${b}`)}try{(await b.listResources()).forEach(a=>{this.resourceToClientMap.set(a,b)}),f.vF.debug(`Cached resources for client: ${a}`)}catch(b){f.vF.debug(`Skipping resources for client ${a}: ${b}`)}}async getAllTools(){let b={},c=new Map,d=async a=>{if(!c.has(a)){let b=await a.getTools();c.set(a,b)}return c.get(a)};for(let[a,c]of Array.from(this.toolToClientMap.entries())){let e=(await d(c))[a];e&&(b[a]=e)}for(let[c,e]of this.serverToolsMap.entries())for(let[f,g]of e.entries())if(this.toolConflicts.has(f)){let e=this.sanitizeServerName(c),h=`${e}${a.SERVER_DELIMITER}${f}`,i=(await d(g))[f];i&&(b[h]={...i,description:i.description?`${i.description} (via ${c})`:`Tool from ${c}`})}return f.vF.debug(`\u{1F527} MCP tool discovery: ${Object.keys(b).length} total tools, ${this.toolConflicts.size} conflicts, connected servers: ${Array.from(this.serverToolsMap.keys()).join(", ")}`),"debug"===f.vF.getLevel()&&Object.keys(b).forEach(b=>{b.includes(a.SERVER_DELIMITER)?f.vF.debug(` - ${b} (qualified)`):f.vF.debug(` - ${b}`)}),f.vF.silly(`MCP tools: ${JSON.stringify(b,null,2)}`),b}parseQualifiedToolName(b){let c=b.lastIndexOf(a.SERVER_DELIMITER);if(-1===c)return null;let d=b.substring(0,c),e=b.substring(c+a.SERVER_DELIMITER.length),f=this.sanitizedNameToServerMap.get(d);return f&&this.serverToolsMap.get(f)?.has(e)?{serverName:f,toolName:e}:null}getToolClient(a){let b=this.parseQualifiedToolName(a);if(b){let a=this.serverToolsMap.get(b.serverName);return a?.get(b.toolName)}return this.toolToClientMap.get(a)}async executeTool(a,b,c){let d=this.getToolClient(a);if(!d)throw f.vF.error(`\u274C No MCP tool found: ${a}`),f.vF.debug(`Available MCP tools: ${Array.from(this.toolToClientMap.keys()).join(", ")}`),f.vF.debug(`Conflicted tools: ${Array.from(this.toolConflicts).join(", ")}`),f.vF.debug(`Server tools map keys: ${Array.from(this.serverToolsMap.keys()).join(", ")}`),A.toolNotFound(a);let e=this.parseQualifiedToolName(a),g=e?e.toolName:a,h=e?e.serverName:"direct";f.vF.debug(`\u25B6\uFE0F Executing MCP tool '${g}' on server '${h}'...`);try{return await d.callTool(g,b)}catch(a){throw f.vF.error(`\u274C MCP tool execution failed: '${g}' - ${a instanceof Error?a.message:String(a)}`),a}}async listAllPrompts(){return Array.from(this.promptToClientMap.keys())}getPromptClient(a){return this.promptToClientMap.get(a)}async getPrompt(a,b){let c=this.getPromptClient(a);if(!c)throw A.promptNotFound(a);return await c.getPrompt(a,b)}async listAllResources(){return Array.from(this.resourceToClientMap.keys())}getResourceClient(a){return this.resourceToClientMap.get(a)}async readResource(a){let b=this.getResourceClient(a);if(!b)throw A.resourceNotFound(a);return await b.readResource(a)}async initializeFromConfig(a){if(0===Object.keys(a).length)return void f.vF.info("No MCP servers configured - running without external tools");let b=[],c=[],d=[],e=[];for(let[g,h]of Object.entries(a)){"strict"===(h.connectionMode||"lenient")?d.push(g):e.push(g);let a=this.connectServer(g,h).then(()=>{b.push(g)}).catch(a=>{f.vF.debug(`Handled connection error for '${g}' during initialization: ${a.message}`)});c.push(a)}await Promise.all(c);let g=d.filter(a=>!b.includes(a));if(g.length>0){let a=g.map(a=>`${a}: ${this.connectionErrors[a]||"Unknown error"}`).join("; ");throw A.connectionFailed("strict servers",a)}}async connectServer(a,b){if(this.clients.has(a))return void f.vF.warn(`Client '${a}' is already connected or registered.`);let c=new G;try{f.vF.info(`Attempting to connect to new server '${a}'...`),await c.connect(b,a),this.registerClient(a,c),await this.updateClientCache(a,c),f.vF.info(`Successfully connected and cached new server '${a}'`)}catch(c){let b=c instanceof Error?c.message:String(c);throw this.connectionErrors[a]=b,f.vF.error(`Failed to connect to new server '${a}': ${b}`),this.clients.delete(a),A.connectionFailed(a,b)}}getClients(){return this.clients}getFailedConnections(){return this.connectionErrors}async removeClient(a){let b=this.clients.get(a);if(b){if("function"==typeof b.disconnect)try{await b.disconnect(),f.vF.info(`Successfully disconnected client: ${a}`)}catch(b){f.vF.error(`Error disconnecting client '${a}': ${b instanceof Error?b.message:String(b)}`)}this.clearClientCache(a),this.clients.delete(a),f.vF.info(`Removed client from manager: ${a}`)}this.connectionErrors[a]&&(delete this.connectionErrors[a],f.vF.info(`Cleared connection error for removed client: ${a}`))}async disconnectAll(){let a=[];for(let[b,c]of Array.from(this.clients.entries()))c.disconnect&&a.push(c.disconnect().then(()=>f.vF.info(`Disconnected client: ${b}`)).catch(a=>f.vF.error(`Failed to disconnect client '${b}': ${a}`)));await Promise.all(a),this.clients.clear(),this.connectionErrors={},this.toolToClientMap.clear(),this.serverToolsMap.clear(),this.toolConflicts.clear(),this.promptToClientMap.clear(),this.resourceToClientMap.clear(),this.sanitizedNameToServerMap.clear(),f.vF.info("Disconnected all clients and cleared caches.")}}),(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var H=class{static notFound(a){return new g.RK("tools_tool_not_found","tools","not_found",`Tool '${a}' not found`,{toolName:a})}static executionFailed(a,b,c){return new g.RK("tools_execution_failed","tools","system",`Tool '${a}' execution failed: ${b}`,{toolName:a,reason:b,sessionId:c})}static executionDenied(a,b){return new g.RK("tools_execution_denied","tools","forbidden",`Tool '${a}' execution was denied by the user`,{toolName:a,sessionId:b})}static executionTimeout(a,b,c){return new g.RK("tools_execution_timeout","tools","timeout",`Tool '${a}' execution timed out after ${b}ms`,{toolName:a,timeoutMs:b,sessionId:c})}static unauthorized(a,b){return new g.RK("tools_unauthorized","tools","forbidden",`Unauthorized access to tool '${a}'`,{toolName:a,sessionId:b})}static confirmationHandlerMissing(a){return new g.RK("tools_confirmation_handler_missing","tools","system",`Confirmation handler missing for tool '${a}'`,{toolName:a})}static confirmationTimeout(a,b,c){return new g.RK("tools_confirmation_timeout","tools","timeout",`Tool '${a}' confirmation timed out after ${b}ms`,{toolName:a,timeoutMs:b,sessionId:c})}static invalidName(a,b){return new g.RK("tools_invalid_args","tools","user",`Invalid tool name '${a}': ${b}`,{toolName:a,reason:b})}static internalToolsNotInitialized(a){return new g.RK("tools_execution_failed","tools","system",`Internal tools not initialized, cannot execute: ${a}`,{toolName:a})}static configInvalid(a){return new g.RK("tools_config_invalid","tools","user",a,{})}static confirmationCancelled(a,b){return new g.RK("tools_confirmation_cancelled","tools","user",`Tool confirmation for '${a}' was cancelled: ${b}`,{toolName:a,reason:b})}};(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var I=j.Ik({query:j.Yj().describe("The search query to find in conversation history"),mode:j.k5(["messages","sessions"]).describe('Search mode: "messages" searches for individual messages, "sessions" finds sessions containing the query'),sessionId:j.Yj().optional().describe('Optional: limit search to a specific session (only for mode="messages")'),role:j.k5(["user","assistant","system","tool"]).optional().describe('Optional: filter by message role (only for mode="messages")'),limit:j.ai().optional().default(20).describe('Optional: maximum number of results to return (default: 20, only for mode="messages")'),offset:j.ai().optional().default(0).describe('Optional: offset for pagination (default: 0, only for mode="messages")')}),J=["search_history"],K={search_history:{factory:a=>(function(a){return{id:"search_history",description:'Search through conversation history across sessions. Use mode="messages" to search for specific messages, or mode="sessions" to find sessions containing the query. For message search, you can filter by sessionId (specific session), role (user/assistant/system/tool), limit results, and set pagination offset.',inputSchema:I,execute:async(b,c)=>{let{query:d,mode:e,sessionId:f,role:g,limit:h,offset:i}=b;if("messages"!==e)return await a.searchSessions(d);{let b={};return void 0!==f&&(b.sessionId=f),void 0!==g&&(b.role=g),void 0!==h&&(b.limit=h),void 0!==i&&(b.offset=i),await a.searchMessages(d,b)}}}})(a.searchService),requiredServices:["searchService"]}},L=class{constructor(a,b,c=[]){this.tools=new Map,this.services=a,this.confirmationProvider=b,this.config=c,f.vF.debug("InternalToolsProvider initialized with config:",c)}async initialize(){f.vF.info("Initializing InternalToolsProvider...");try{if(0===this.config.length)return void f.vF.info("No internal tools enabled by configuration");this.registerInternalTools();let a=this.tools.size;f.vF.info(`InternalToolsProvider initialized with ${a} internal tools`)}catch(a){throw f.vF.error(`Failed to initialize InternalToolsProvider: ${a instanceof Error?a.message:String(a)}`),a}}registerInternalTools(){for(let a of this.config){let b=K[a],c=b.requiredServices.filter(a=>!this.services[a]);if(c.length>0){f.vF.debug(`Skipping ${a} internal tool - missing services: ${c.join(", ")}`);continue}try{let c=b.factory(this.services);this.tools.set(a,c),f.vF.debug(`Registered ${a} internal tool`)}catch(b){f.vF.error(`Failed to register ${a} internal tool: ${b instanceof Error?b.message:String(b)}`)}}}isToolEnabled(a){return this.config.includes(a)}hasTool(a){return this.tools.has(a)}async executeTool(a,b,c){let d=this.tools.get(a);if(!d)throw f.vF.error(`\u274C No internal tool found: ${a}`),f.vF.debug(`Available internal tools: ${Array.from(this.tools.keys()).join(", ")}`),H.notFound(a);let e=d.inputSchema.safeParse(b);if(!e.success)throw f.vF.error(`\u274C Invalid arguments for tool ${a}:`,e.error.message),H.invalidName(a,`Invalid arguments: ${e.error.message}`);try{return await d.execute(e.data,{sessionId:c})}catch(b){throw f.vF.error(`\u274C Internal tool execution failed: ${a}`,b),b}}getAllTools(){let a={};for(let[b,c]of this.tools)a[b]={name:c.id,description:c.description,parameters:function(a){try{return(0,p.Ik)(a)}catch(a){return f.vF.warn(`Failed to convert Zod schema to JSON Schema: ${a instanceof Error?a.message:String(a)}`),{type:"object",properties:{}}}}(c.inputSchema)};return a}getToolNames(){return Array.from(this.tools.keys())}getToolCount(){return this.tools.size}};(class a{static{this.MCP_TOOL_PREFIX="mcp--"}static{this.INTERNAL_TOOL_PREFIX="internal--"}constructor(a,b,c){this.toolsCache={},this.cacheValid=!1,this.mcpManager=a,this.confirmationProvider=b,c?.internalToolsConfig&&c.internalToolsConfig.length>0&&(this.internalToolsProvider=new L(c.internalToolsServices||{},b,c.internalToolsConfig)),f.vF.debug("ToolManager initialized")}async initialize(){this.internalToolsProvider&&await this.internalToolsProvider.initialize(),f.vF.debug("ToolManager initialization complete")}invalidateCache(){this.cacheValid=!1,this.toolsCache={}}getMcpManager(){return this.mcpManager}async getMcpTools(){return await this.mcpManager.getAllTools()}async buildAllTools(){let b={},c={},d={};try{c=await this.mcpManager.getAllTools()}catch(a){f.vF.error(`Failed to get MCP tools: ${a instanceof Error?a.message:String(a)}`),c={}}try{d=this.internalToolsProvider?.getAllTools()||{}}catch(a){f.vF.error(`Failed to get internal tools: ${a instanceof Error?a.message:String(a)}`),d={}}for(let[c,e]of Object.entries(d)){let d=`${a.INTERNAL_TOOL_PREFIX}${c}`;b[d]={...e,name:d,description:`${e.description||"No description provided"} (internal tool)`}}for(let[d,e]of Object.entries(c)){let c=`${a.MCP_TOOL_PREFIX}${d}`;b[c]={...e,name:c,description:`${e.description||"No description provided"} (via MCP servers)`}}let e=Object.keys(b).length,g=Object.keys(c).length,h=Object.keys(d).length;return f.vF.debug(`\u{1F527} Unified tool discovery: ${e} total tools (${g} MCP \u2192 ${a.MCP_TOOL_PREFIX}*, ${h} internal \u2192 ${a.INTERNAL_TOOL_PREFIX}*)`),b}async getAllTools(){return this.cacheValid||(this.toolsCache=await this.buildAllTools(),this.cacheValid=!0),this.toolsCache}async executeTool(b,c,d){if(f.vF.debug(`\u{1F527} Tool execution requested: '${b}'`),f.vF.debug(`Tool args: ${JSON.stringify(c,null,2)}`),!await this.confirmationProvider.requestConfirmation({toolName:b,args:c,...d&&{sessionId:d}}))throw f.vF.debug(`\u{1F6AB} Tool execution denied: ${b}`),H.executionDenied(b,d);f.vF.debug(`\u2705 Tool execution approved: ${b}`),f.vF.info(`\u{1F527} Tool execution started for ${b}, sessionId: ${d??"global"}`);let e=Date.now();try{let g;if(b.startsWith(a.MCP_TOOL_PREFIX)){f.vF.debug(`\u{1F527} Detected MCP tool: '${b}'`);let e=b.substring(a.MCP_TOOL_PREFIX.length);if(0===e.length)throw H.invalidName(b,"tool name cannot be empty after prefix");f.vF.debug(`\u{1F3AF} MCP routing: '${b}' -> '${e}'`),g=await this.mcpManager.executeTool(e,c,d)}else if(b.startsWith(a.INTERNAL_TOOL_PREFIX)){f.vF.debug(`\u{1F527} Detected internal tool: '${b}'`);let e=b.substring(a.INTERNAL_TOOL_PREFIX.length);if(0===e.length)throw H.invalidName(b,"tool name cannot be empty after prefix");if(!this.internalToolsProvider)throw H.internalToolsNotInitialized(b);f.vF.debug(`\u{1F3AF} Internal routing: '${b}' -> '${e}'`),g=await this.internalToolsProvider.executeTool(e,c,d)}else{f.vF.debug(`\u{1F527} Detected tool without proper prefix: '${b}'`);let c=await this.getToolStats();throw f.vF.error(`\u274C Tool missing source prefix: '${b}' (expected '${a.MCP_TOOL_PREFIX}*' or '${a.INTERNAL_TOOL_PREFIX}*')`),f.vF.debug(`Available: ${c.mcp} MCP tools, ${c.internal} internal tools`),H.notFound(b)}let h=Date.now()-e;return f.vF.debug(`\u{1F3AF} Tool execution completed in ${h}ms: '${b}'`),f.vF.info(`\u2705 Tool execution completed successfully for ${b} in ${h}ms, sessionId: ${d??"global"}`),g}catch(c){let a=Date.now()-e;throw f.vF.error(`\u274C Tool execution failed for ${b} after ${a}ms, sessionId: ${d??"global"}: ${c instanceof Error?c.message:String(c)}`),c}}async hasTool(b){if(b.startsWith(a.MCP_TOOL_PREFIX)){let c=b.substring(a.MCP_TOOL_PREFIX.length);return void 0!==this.mcpManager.getToolClient(c)}if(b.startsWith(a.INTERNAL_TOOL_PREFIX)){let c=b.substring(a.INTERNAL_TOOL_PREFIX.length);return this.internalToolsProvider?.hasTool(c)??!1}return!1}async getToolStats(){let a={},b={};try{a=await this.mcpManager.getAllTools()}catch(b){f.vF.error(`Failed to get MCP tools for stats: ${b instanceof Error?b.message:String(b)}`),a={}}try{b=this.internalToolsProvider?.getAllTools()||{}}catch(a){f.vF.error(`Failed to get internal tools for stats: ${a instanceof Error?a.message:String(a)}`),b={}}let c=Object.keys(a).length,d=Object.keys(b).length;return{total:c+d,mcp:c,internal:d}}getToolSource(b){return b.startsWith(a.MCP_TOOL_PREFIX)&&b.length>a.MCP_TOOL_PREFIX.length?"mcp":b.startsWith(a.INTERNAL_TOOL_PREFIX)&&b.length>a.INTERNAL_TOOL_PREFIX.length?"internal":"unknown"}async refresh(){this.invalidateCache(),f.vF.debug("ToolManager refreshed")}}),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)();var M=j.Ik({maxSessions:j.ai().int().positive().default(100).describe("Maximum number of concurrent sessions allowed, defaults to 100"),sessionTTL:j.ai().int().positive().default(36e5).describe("Session time-to-live in milliseconds, defaults to 3600000ms (1 hour)")}).strict().describe("Session management configuration");(0,h.e1)();var N=j.Ik({maxConnections:j.ai().int().positive().optional().describe("Maximum connections"),idleTimeoutMillis:j.ai().int().positive().optional().describe("Idle timeout in milliseconds"),connectionTimeoutMillis:j.ai().int().positive().optional().describe("Connection timeout in milliseconds"),options:j.g1(j.bz()).optional().describe("Backend-specific options")}),O=N.extend({type:j.eu("in-memory")}).strict(),P=N.extend({type:j.eu("redis"),url:j.Yj().optional().describe("Redis connection URL (redis://...)"),host:j.Yj().optional().describe("Redis host"),port:j.ai().int().positive().optional().describe("Redis port"),password:j.Yj().optional().describe("Redis password"),database:j.ai().int().nonnegative().optional().describe("Redis database number")}).strict(),Q=N.extend({type:j.eu("sqlite"),path:j.Yj().optional().describe("SQLite database file path (optional, will auto-detect using path resolver if not provided)"),database:j.Yj().optional().describe("Database filename (default: dexto.db)")}).strict(),R=N.extend({type:j.eu("postgres"),url:j.Yj().optional().describe("PostgreSQL connection URL (postgresql://...)"),connectionString:j.Yj().optional().describe("PostgreSQL connection string"),host:j.Yj().optional().describe("PostgreSQL host"),port:j.ai().int().positive().optional().describe("PostgreSQL port"),database:j.Yj().optional().describe("PostgreSQL database name"),password:j.Yj().optional().describe("PostgreSQL password")}).strict(),S=j.gM("type",[O,P,Q,R],{errorMap:(a,b)=>a.code===k.eq.invalid_union_discriminator?{message:"Invalid backend type. Expected 'in-memory', 'redis', 'sqlite', or 'postgres'."}:{message:b.defaultError}}).describe("Backend configuration for storage system").superRefine((a,b)=>{"redis"!==a.type||a.url||a.host||b.addIssue({code:k.eq.custom,message:"Redis backend requires either 'url' or 'host' to be specified",path:["url"],params:{code:"storage_connection_config_missing",scope:"storage",type:"user"}}),"postgres"!==a.type||a.url||a.connectionString||a.host||b.addIssue({code:k.eq.custom,message:"PostgreSQL backend requires one of 'url', 'connectionString', or 'host' to be specified",path:["url"],params:{code:"storage_connection_config_missing",scope:"storage",type:"user"}})}),T=j.Ik({cache:S.describe("Cache backend configuration (fast, ephemeral)"),database:S.describe("Database backend configuration (persistent, reliable)")}).strict().describe("Storage configuration with cache and database backends").brand();(0,h.e1)();var U=j.Ik({id:j.Yj().describe("Unique identifier for the contributor"),priority:j.ai().int().nonnegative().describe("Execution priority of the contributor (lower numbers run first)"),enabled:j.zM().optional().default(!0).describe("Whether this contributor is currently active")}).strict(),V=U.extend({type:j.eu("static"),content:j.Yj().describe("Static content for the contributor (REQUIRED for 'static')")}).strict(),W=U.extend({type:j.eu("dynamic"),source:j.k5(["dateTime","memorySummary","resources"]).describe("Source identifier for dynamic content (REQUIRED for 'dynamic')")}).strict(),X=U.extend({type:j.eu("file"),files:j.YO(j.Yj()).min(1).describe("Array of file paths to include as context (.md and .txt files)"),options:j.Ik({includeFilenames:j.zM().optional().default(!0).describe("Whether to include the filename as a header for each file"),separator:j.Yj().optional().default("\n\n---\n\n").describe("Separator to use between multiple files"),errorHandling:j.k5(["skip","error"]).optional().default("skip").describe("How to handle missing or unreadable files: skip (ignore) or error (throw)"),maxFileSize:j.ai().int().positive().optional().default(1e5).describe("Maximum file size in bytes (default: 100KB)"),includeMetadata:j.zM().optional().default(!1).describe("Whether to include file metadata (size, modification time) in the context")}).strict().optional().default({})}).strict(),Y=j.gM("type",[V,W,X],{errorMap:(a,b)=>a.code===k.eq.invalid_union_discriminator?{message:"Invalid contributor type. Expected 'static', 'dynamic', or 'file'."}:{message:b.defaultError}}).describe("Configuration for a system prompt contributor. Type 'static' requires 'content', type 'dynamic' requires 'source', type 'file' requires 'files'."),Z=j.Ik({contributors:j.YO(Y).min(1).default([{id:"dateTime",type:"dynamic",priority:10,source:"dateTime",enabled:!0},{id:"resources",type:"dynamic",priority:20,source:"resources",enabled:!1}]).describe("An array of contributor configurations that make up the system prompt")}).strict(),$=j.KC([j.Yj().transform(a=>({contributors:[{id:"inline",type:"static",content:a,priority:0,enabled:!0}]})),Z]).describe("Plain string or structured contributors object").brand();(0,h.e1)();var _=j.YO(j.k5(J).describe("Available internal tool names")).default([]).describe(`Array of internal tool names to enable. Empty array = disabled. Available tools: ${J.join(", ")}`),aa=j.Ik({mode:j.k5(["event-based","auto-approve","auto-deny"]).default("event-based").describe("Tool confirmation mode: event-based (interactive), auto-approve (all tools), auto-deny (no tools)"),timeout:j.ai().int().positive().default(12e4).describe("Timeout for tool confirmation requests in milliseconds, defaults to 120000ms (2 mins)"),allowedToolsStorage:j.k5(["memory","storage"]).default("storage").describe("Storage type for remembered tool approvals: memory (session-only) or storage (persistent)")}).strict().describe("Tool confirmation and approval configuration"),ab=j.Ik({name:j.Yj(),description:j.Yj().default("Dexto is an AI assistant capable of chat and task delegation, accessible via multiple protocols."),url:j.Yj().url(),provider:j.Ik({organization:j.Yj(),url:j.Yj().url()}).optional(),version:j.Yj(),documentationUrl:j.Yj().url().optional(),capabilities:j.Ik({streaming:j.zM().optional().default(!0),pushNotifications:j.zM().optional(),stateTransitionHistory:j.zM().optional().default(!1)}).strict().default({}),authentication:j.Ik({schemes:j.YO(j.Yj()).default([]),credentials:j.Yj().optional()}).strict().default({}),defaultInputModes:j.YO(j.Yj()).default(["application/json","text/plain"]),defaultOutputModes:j.YO(j.Yj()).default(["application/json","text/event-stream","text/plain"]),skills:j.YO(j.Ik({id:j.Yj(),name:j.Yj(),description:j.Yj(),tags:j.YO(j.Yj()),examples:j.YO(j.Yj()).optional(),inputModes:j.YO(j.Yj()).optional().default(["text/plain"]),outputModes:j.YO(j.Yj()).optional().default(["text/plain"])})).default([{id:"chat_with_agent",name:"chat_with_agent",description:"Allows you to chat with an AI agent. Send a message to interact.",tags:["chat","AI","assistant","mcp","natural language"],examples:['Send a JSON-RPC request to /mcp with method: "chat_with_agent" and params: {"message":"Your query..."}',"Alternatively, use a compatible MCP client library."]}])}).strict();function ac(a){return"object"==typeof a&&null!==a&&"error"in a}function ad(a){return"object"==typeof a&&null!==a&&"content"in a&&Array.isArray(a.content)}function ae(a){return"object"==typeof a&&null!==a&&"type"in a&&"text"===a.type}function af(a){return"object"==typeof a&&null!==a&&"type"in a&&"image"===a.type}function ag(a){return"object"==typeof a&&null!==a&&"type"in a&&"audio"===a.type}function ah(a){return"object"==typeof a&&null!==a&&"type"in a&&"file"===a.type}j.Ik({agentCard:ab.describe("Configuration for the agent card").optional(),greeting:j.Yj().max(500).optional().describe("Default greeting text to show when a chat starts (for UI consumption)"),systemPrompt:$.describe("System prompt: string shorthand or structured config"),mcpServers:F.default({}).describe("Configurations for MCP (Model Context Protocol) servers used by the agent"),internalTools:_,llm:x.describe("Core LLM configuration for the agent"),storage:T.default({cache:{type:"in-memory"},database:{type:"in-memory"}}).describe("Storage configuration for the agent using cache and database backends"),sessions:M.default({}).describe("Session management configuration"),toolConfirmation:aa.default({}).describe("Tool confirmation and approval configuration")}).strict().describe("Main configuration for an agent, including its LLM and server connections").brand(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)(),(0,h.e1)();let ai=()=>`msg-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;function aj(a,b){let c=(0,d.useRef)(null),[e,f]=(0,d.useState)([]),g=(0,d.useRef)(null),[h,i]=(0,d.useState)("connecting"),[j,k]=(0,d.useState)(!1),[l,m]=(0,d.useState)(null),n=(0,d.useRef)(!1),o=(0,d.useRef)(b);(0,d.useCallback)(a=>{if(!a)return!1;let b=o.current,c=b?b():null;return!!c&&a===c},[]);let p=(0,d.useCallback)((a,b,d,e,h=!1)=>{if(c.current?.readyState===globalThis.WebSocket.OPEN){c.current.send(JSON.stringify({type:"message",content:a,imageData:b,fileData:d,sessionId:e,stream:h})),k(!0);let i=ai();g.current=i,f(c=>[...c,{id:i,role:"user",content:a,createdAt:Date.now(),sessionId:e,imageData:b,fileData:d}])}else m({id:ai(),message:"Cannot send message: connection is not open",timestamp:Date.now(),context:"websocket",recoverable:!0})},[]),q=(0,d.useCallback)(a=>{c.current?.readyState===globalThis.WebSocket.OPEN&&c.current.send(JSON.stringify({type:"reset",sessionId:a})),f([]),m(null),g.current=null,k(!1)},[]),r=(0,d.useCallback)(a=>{c.current?.readyState===globalThis.WebSocket.OPEN&&c.current.send(JSON.stringify({type:"cancel",sessionId:a})),k(!1),n.current=!0},[]),s=(0,d.useCallback)(()=>{m(null)},[]);return{messages:e,status:h,sendMessage:p,reset:q,setMessages:f,websocket:c.current,processing:j,cancel:r,activeError:l,clearError:s}}},90981:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>m,metadata:()=>l});var d=c(21824),e=c(99741),f=c.n(e),g=c(42829),h=c.n(g);c(21842);var i=c(34820),j=c(27359),k=c(85972);let l={title:{default:"Dexto Web UI",template:"%s \xb7 Dexto"},description:"Interactive playground for testing MCP tools and talking to AI agents",icons:{icon:[{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png",sizes:"32x32"},{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png",sizes:"16x16"}],shortcut:[{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png"}],apple:[{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png"}]},openGraph:{title:"Dexto",description:"Interactive playground for testing MCP tools and talking to AI agents",type:"website"},twitter:{card:"summary",title:"Dexto",description:"Interactive playground for testing MCP tools and talking to AI agents"}};async function m({children:a}){let b=await (0,k.UL)(),c=b.get("theme")?.value;return(0,d.jsx)("html",{lang:"en",className:c&&"dark"!==c?"":"dark",children:(0,d.jsx)("body",{className:`${f().variable} ${h().variable} antialiased bg-background text-foreground`,children:(0,d.jsxs)(i.ChatProvider,{children:[(0,d.jsx)(j.SpeechReset,{}),(0,d.jsx)("div",{className:"flex h-screen w-screen flex-col",children:a})]})})})}}};
|
|
1
|
+
exports.id=43,exports.ids=[43],exports.modules={21842:()=>{},21870:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,97452,23)),Promise.resolve().then(c.t.bind(c,41143,23)),Promise.resolve().then(c.t.bind(c,96731,23)),Promise.resolve().then(c.t.bind(c,61742,23)),Promise.resolve().then(c.t.bind(c,202,23)),Promise.resolve().then(c.t.bind(c,43598,23)),Promise.resolve().then(c.t.bind(c,30670,23)),Promise.resolve().then(c.t.bind(c,68299,23)),Promise.resolve().then(c.t.bind(c,10190,23))},24599:(a,b,c)=>{Promise.resolve().then(c.bind(c,34820)),Promise.resolve().then(c.bind(c,27359))},27359:(a,b,c)=>{"use strict";c.d(b,{SpeechReset:()=>d});let d=(0,c(95364).registerClientReference)(function(){throw Error("Attempted to call SpeechReset() from the server but SpeechReset is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/dexto/dexto/packages/webui/components/ui/speech-reset.tsx","SpeechReset")},34820:(a,b,c)=>{"use strict";c.d(b,{ChatProvider:()=>e});var d=c(95364);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call ChatProvider() from the server but ChatProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/dexto/dexto/packages/webui/components/hooks/ChatContext.tsx","ChatProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useChatContext() from the server but useChatContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/dexto/dexto/packages/webui/components/hooks/ChatContext.tsx","useChatContext")},52623:(a,b,c)=>{Promise.resolve().then(c.bind(c,64516)),Promise.resolve().then(c.bind(c,63501))},61622:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,28710,23)),Promise.resolve().then(c.t.bind(c,11865,23)),Promise.resolve().then(c.t.bind(c,54401,23)),Promise.resolve().then(c.t.bind(c,11096,23)),Promise.resolve().then(c.t.bind(c,55368,23)),Promise.resolve().then(c.t.bind(c,53612,23)),Promise.resolve().then(c.t.bind(c,88572,23)),Promise.resolve().then(c.t.bind(c,47629,23)),Promise.resolve().then(c.bind(c,74476))},63501:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{SpeechReset:()=>d}),c(4039)},64516:(a,b,c)=>{"use strict";c.d(b,{ChatProvider:()=>h,v:()=>i});var d=c(35270),e=c(4039),f=c(70702);let g=(0,e.createContext)(void 0);function h({children:a}){let b=process.env.NEXT_PUBLIC_WS_URL||"ws://localhost:3001",[c,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!0),[k,l]=(0,e.useState)(!0),{messages:m,sendMessage:n,status:o,reset:p,setMessages:q,websocket:r,activeError:s,clearError:t,processing:u,cancel:v}=(0,f.Y_)(b,()=>c),[w,x]=(0,e.useState)(null),y=(0,e.useCallback)(async a=>{try{let b=void 0!==a?a:c,d=b?`/api/llm/current?sessionId=${b}`:"/api/llm/current",e=await fetch(d);if(e.ok){let a=await e.json(),b=a.config||a;x({provider:b.provider,model:b.model,displayName:b.displayName,router:b.router,baseURL:b.baseURL})}}catch{}},[c]),{greeting:z}=function(a){let[b,c]=(0,e.useState)(null),[d,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)(null);return{greeting:b,isLoading:d,error:g}}(0),A=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!a.ok)throw Error("Failed to create session");return(await a.json()).session.id}catch(a){return console.error("Error creating auto session:",a),`chat-${Date.now()}`}},[]),B=(0,e.useCallback)(async(a,b,d)=>{let e=c;!e&&i&&(h(e=await A()),j(!1),await y(e)),e?n(a,b,d,e,k):console.error("No session available for sending message")},[n,c,i,A,k]),C=(0,e.useCallback)(()=>{c&&p(c)},[p,c]),D=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/sessions/${a}/history`);if(!b.ok){if(404===b.status){if(!(await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:a})})).ok)throw Error("Failed to create session");q([]);return}throw Error("Failed to load session history")}let c=(await b.json()).history||[],d=[];for(let b=0;b<c.length;b++){let e=c[b],f={id:`session-${a}-${b}`,role:e.role,content:e.content,createdAt:Date.now()-(c.length-b)*1e3,sessionId:a,tokenUsage:e.tokenUsage,reasoning:e.reasoning,model:e.model,router:e.router,provider:e.provider};if("assistant"===e.role&&e.toolCalls&&e.toolCalls.length>0)e.content&&d.push(f),e.toolCalls.forEach((e,f)=>{let g,h=e.function?JSON.parse(e.function.arguments||"{}"):{},i=e.function?.name||"unknown";for(let a=b+1;a<c.length;a++){let b=c[a];if("tool"===b.role&&b.toolCallId===e.id){g=b.content;break}}d.push({id:`session-${a}-${b}-tool-${f}`,role:"tool",content:null,createdAt:Date.now()-(c.length-b)*1e3+f,sessionId:a,toolName:i,toolArgs:h,toolResult:g})});else{if("tool"===e.role)continue;d.push(f)}}q(d)}catch(a){console.error("Error loading session history:",a),q([])}},[q,y]),E=(0,e.useCallback)(async a=>{if(a!==c)try{h(a),j(!1),await D(a),await y(a)}catch(a){throw console.error("Error switching session:",a),a}},[c,D]),F=(0,e.useCallback)(()=>{h(null),j(!0),q([]),x(null)},[q]);return(0,d.jsx)(g.Provider,{value:{messages:m,sendMessage:B,status:o,reset:C,currentSessionId:c,switchSession:E,loadSessionHistory:D,isWelcomeState:i,returnToWelcome:F,isStreaming:k,setStreaming:l,websocket:r,currentLLM:w,refreshCurrentLLM:y,processing:u,cancel:v,activeError:s,clearError:t,greeting:z},children:a})}function i(){let a=(0,e.useContext)(g);if(!a)throw Error("useChatContext must be used within a ChatProvider");return a}},70702:(a,b,c)=>{"use strict";c.d(b,{kz:()=>i,EQ:()=>j,j0:()=>h,PI:()=>g,P2:()=>f,KU:()=>e,Y_:()=>l});var d=c(4039);function e(a){return"object"==typeof a&&null!==a&&"error"in a}function f(a){return"object"==typeof a&&null!==a&&"content"in a&&Array.isArray(a.content)}function g(a){return"object"==typeof a&&null!==a&&"type"in a&&"text"===a.type}function h(a){return"object"==typeof a&&null!==a&&"type"in a&&"image"===a.type}function i(a){return"object"==typeof a&&null!==a&&"type"in a&&"audio"===a.type}function j(a){return"object"==typeof a&&null!==a&&"type"in a&&"file"===a.type}let k=()=>`msg-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;function l(a,b){let c=(0,d.useRef)(null),[e,f]=(0,d.useState)([]),g=(0,d.useRef)(null),[h,i]=(0,d.useState)("connecting"),[j,l]=(0,d.useState)(!1),[m,n]=(0,d.useState)(null),o=(0,d.useRef)(!1),p=(0,d.useRef)(b);(0,d.useCallback)(a=>{if(!a)return!1;let b=p.current,c=b?b():null;return!!c&&a===c},[]);let q=(0,d.useCallback)((a,b,d,e,h=!1)=>{if(c.current?.readyState===globalThis.WebSocket.OPEN){c.current.send(JSON.stringify({type:"message",content:a,imageData:b,fileData:d,sessionId:e,stream:h})),l(!0);let i=k();g.current=i,f(c=>[...c,{id:i,role:"user",content:a,createdAt:Date.now(),sessionId:e,imageData:b,fileData:d}])}else n({id:k(),message:"Cannot send message: connection is not open",timestamp:Date.now(),context:"websocket",recoverable:!0})},[]),r=(0,d.useCallback)(a=>{c.current?.readyState===globalThis.WebSocket.OPEN&&c.current.send(JSON.stringify({type:"reset",sessionId:a})),f([]),n(null),g.current=null,l(!1)},[]),s=(0,d.useCallback)(a=>{c.current?.readyState===globalThis.WebSocket.OPEN&&c.current.send(JSON.stringify({type:"cancel",sessionId:a})),l(!1),o.current=!0},[]),t=(0,d.useCallback)(()=>{n(null)},[]);return{messages:e,status:h,sendMessage:q,reset:r,setMessages:f,websocket:c.current,processing:j,cancel:s,activeError:m,clearError:t}}},90981:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>m,metadata:()=>l});var d=c(21824),e=c(99741),f=c.n(e),g=c(42829),h=c.n(g);c(21842);var i=c(34820),j=c(27359),k=c(85972);let l={title:{default:"Dexto Web UI",template:"%s \xb7 Dexto"},description:"Interactive playground for testing MCP tools and talking to AI agents",icons:{icon:[{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png",sizes:"32x32"},{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png",sizes:"16x16"}],shortcut:[{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png"}],apple:[{url:"/logos/dexto_logo_no_text.png?v=2",type:"image/png"}]},openGraph:{title:"Dexto",description:"Interactive playground for testing MCP tools and talking to AI agents",type:"website"},twitter:{card:"summary",title:"Dexto",description:"Interactive playground for testing MCP tools and talking to AI agents"}};async function m({children:a}){let b=await (0,k.UL)(),c=b.get("theme")?.value;return(0,d.jsx)("html",{lang:"en",className:c&&"dark"!==c?"":"dark",children:(0,d.jsx)("body",{className:`${f().variable} ${h().variable} antialiased bg-background text-foreground`,children:(0,d.jsxs)(i.ChatProvider,{children:[(0,d.jsx)(j.SpeechReset,{}),(0,d.jsx)("div",{className:"flex h-screen w-screen flex-col",children:a})]})})})}}};
|