diff --git a/apps/storybook/stories/orama-chat.stories.tsx b/apps/storybook/stories/orama-chat.stories.tsx new file mode 100644 index 00000000..7f4f677d --- /dev/null +++ b/apps/storybook/stories/orama-chat.stories.tsx @@ -0,0 +1,19 @@ +import type { StoryObj, Meta } from '@storybook/web-components' + +const meta: Meta = { + title: 'Internal/OramaChat', + component: 'orama-chat' +} + +export default meta +type Story = StoryObj + +const Template = (args) => { + return `` +} + +// More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args +export const Primary: Story = { + render: Template, + args: {} +} diff --git a/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/components.ts b/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/components.ts index 3cedb150..5585f3b9 100644 --- a/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/components.ts +++ b/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/components.ts @@ -7,6 +7,27 @@ import { ProxyCmp } from './angular-component-lib/utils'; import { Components } from 'orama-ui'; +@ProxyCmp({ +}) +@Component({ + selector: 'orama-chat', + changeDetection: ChangeDetectionStrategy.OnPush, + template: '', + // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property + inputs: [], +}) +export class OramaChat { + protected el: HTMLElement; + constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) { + c.detach(); + this.el = r.nativeElement; + } +} + + +export declare interface OramaChat extends Components.OramaChat {} + + @ProxyCmp({ inputs: ['as'] }) diff --git a/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/index.ts b/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/index.ts index 40c281a9..cc1ab906 100644 --- a/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/index.ts +++ b/packages/ui-stencil-angular/projects/component-library/src/lib/stencil-generated/index.ts @@ -2,6 +2,7 @@ import * as d from './components'; export const DIRECTIVES = [ + d.OramaChat, d.OramaParagraph, d.SearchBox ]; diff --git a/packages/ui-stencil-react/src/components/stencil-generated/index.ts b/packages/ui-stencil-react/src/components/stencil-generated/index.ts index 2ff35b3f..6baefdd1 100644 --- a/packages/ui-stencil-react/src/components/stencil-generated/index.ts +++ b/packages/ui-stencil-react/src/components/stencil-generated/index.ts @@ -7,5 +7,6 @@ import type { JSX } from 'orama-ui'; +export const OramaChat = /*@__PURE__*/createReactComponent('orama-chat'); export const OramaParagraph = /*@__PURE__*/createReactComponent('orama-paragraph'); export const SearchBox = /*@__PURE__*/createReactComponent('search-box'); diff --git a/packages/ui-stencil-vue/lib/components.ts b/packages/ui-stencil-vue/lib/components.ts index a51bae19..c6163b6e 100644 --- a/packages/ui-stencil-vue/lib/components.ts +++ b/packages/ui-stencil-vue/lib/components.ts @@ -8,6 +8,9 @@ import type { JSX } from 'orama-ui'; +export const OramaChat = /*@__PURE__*/ defineContainer('orama-chat', undefined); + + export const OramaParagraph = /*@__PURE__*/ defineContainer('orama-paragraph', undefined, [ 'as' ]); diff --git a/packages/ui-stencil/package.json b/packages/ui-stencil/package.json index 98e298f0..2aec9df0 100644 --- a/packages/ui-stencil/package.json +++ b/packages/ui-stencil/package.json @@ -1,48 +1,47 @@ { - "name": "ui-stencil", - "version": "0.0.1", - "description": "Stencil Component Starter", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ionic-team/stencil-component-starter.git" - }, - "main": "dist/index.cjs.js", - "module": "dist/index.js", - "files": [ - "dist/", - "loader/" - ], - "scripts": { - "build": "stencil build --docs", - "clean": "rm -rf node_modules .turbo dist .stencil loader www", - "dev": "stencil build --watch", - "generate": "stencil generate", - "start": "stencil build --dev --watch --serve", - "test": "stencil test --spec --e2e", - "test.watch": "stencil test --spec --e2e --watchAll" - }, - "types": "dist/types/index.d.ts", - "dependencies": { - "@stencil/core": "^4.19.0", - "@stencil/store": "^2.0.16" - }, - "devDependencies": { - "@stencil-community/postcss": "^2.2.0", - "@stencil/angular-output-target": "^0.8.4", - "@stencil/react-output-target": "^0.5.3", - "@stencil/sass": "^3.0.12", - "@stencil/vue-output-target": "^0.8.8", - "@types/jest": "^29.5.12", - "@types/node": "^20.14.9", - "jest": "^29.7.0", - "jest-cli": "^29.7.0", - "puppeteer": "^22.12.1", - "sass-loader": "^14.2.1" - }, - "collection": "dist/collection/collection-manifest.json", - "collection:main": "dist/collection/index.js", - "es2015": "dist/esm/index.mjs", - "es2017": "dist/esm/index.mjs", - "unpkg": "dist/ui-stencil/ui-stencil.esm.js" + "name": "ui-stencil", + "version": "0.0.1", + "description": "Stencil Component Starter", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/stencil-component-starter.git" + }, + "main": "dist/index.cjs.js", + "module": "dist/index.js", + "files": ["dist/", "loader/"], + "scripts": { + "build": "stencil build --docs", + "clean": "rm -rf node_modules .turbo dist .stencil loader www", + "dev": "stencil build --watch", + "generate": "stencil generate", + "start": "stencil build --dev --watch --serve", + "test": "stencil test --spec --e2e", + "test.watch": "stencil test --spec --e2e --watchAll" + }, + "types": "dist/types/index.d.ts", + "dependencies": { + "@oramacloud/client": "1.3.2", + "@stencil/core": "^4.19.0", + "@stencil/store": "^2.0.16", + "sse.js": "^2.5.0" + }, + "devDependencies": { + "@stencil/store": "^2.0.16", + "@stencil/angular-output-target": "^0.8.4", + "@stencil/react-output-target": "^0.5.3", + "@stencil/vue-output-target": "^0.8.8", + "@stencil/sass": "^3.0.12", + "@types/jest": "^29.5.12", + "@types/node": "^20.14.9", + "jest": "^29.7.0", + "jest-cli": "^29.7.0", + "puppeteer": "^22.12.1", + "sass-loader": "^14.2.1" + }, + "collection": "dist/collection/collection-manifest.json", + "collection:main": "dist/collection/index.js", + "es2015": "dist/esm/index.mjs", + "es2017": "dist/esm/index.mjs", + "unpkg": "dist/ui-stencil/ui-stencil.esm.js" } diff --git a/packages/ui-stencil/src/components.d.ts b/packages/ui-stencil/src/components.d.ts index c5de3ca1..3b065d36 100644 --- a/packages/ui-stencil/src/components.d.ts +++ b/packages/ui-stencil/src/components.d.ts @@ -5,9 +5,13 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; +import { ParagraphProps } from "./components/internal/Typography/Paragraph"; +export { ParagraphProps } from "./components/internal/Typography/Paragraph"; export namespace Components { + interface OramaChat { + } interface OramaParagraph { - "as"?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + "as"?: ParagraphProps['as']; } interface SearchBox { "color": 'dark' | 'light' | 'system'; @@ -15,6 +19,12 @@ export namespace Components { } } declare global { + interface HTMLOramaChatElement extends Components.OramaChat, HTMLStencilElement { + } + var HTMLOramaChatElement: { + prototype: HTMLOramaChatElement; + new (): HTMLOramaChatElement; + }; interface HTMLOramaParagraphElement extends Components.OramaParagraph, HTMLStencilElement { } var HTMLOramaParagraphElement: { @@ -28,19 +38,23 @@ declare global { new (): HTMLSearchBoxElement; }; interface HTMLElementTagNameMap { + "orama-chat": HTMLOramaChatElement; "orama-paragraph": HTMLOramaParagraphElement; "search-box": HTMLSearchBoxElement; } } declare namespace LocalJSX { + interface OramaChat { + } interface OramaParagraph { - "as"?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + "as"?: ParagraphProps['as']; } interface SearchBox { "color"?: 'dark' | 'light' | 'system'; "themeConfig"?: { colors: { light: { primaryColor: string }; dark: { primaryColor: string } } }; } interface IntrinsicElements { + "orama-chat": OramaChat; "orama-paragraph": OramaParagraph; "search-box": SearchBox; } @@ -49,6 +63,7 @@ export { LocalJSX as JSX }; declare module "@stencil/core" { export namespace JSX { interface IntrinsicElements { + "orama-chat": LocalJSX.OramaChat & JSXBase.HTMLAttributes; "orama-paragraph": LocalJSX.OramaParagraph & JSXBase.HTMLAttributes; "search-box": LocalJSX.SearchBox & JSXBase.HTMLAttributes; } diff --git a/packages/ui-stencil/src/components/SearchBox/SearchBox.tsx b/packages/ui-stencil/src/components/SearchBox/SearchBox.tsx index 9c9c6e40..b92d7747 100644 --- a/packages/ui-stencil/src/components/SearchBox/SearchBox.tsx +++ b/packages/ui-stencil/src/components/SearchBox/SearchBox.tsx @@ -1,5 +1,5 @@ import { Component, Host, Prop, h } from '@stencil/core' -import { sassVariables } from '../../config/colors'; +import { sassVariables } from '../../config/colors' @Component({ tag: 'search-box', diff --git a/packages/ui-stencil/src/components/internal/Typography/Paragraph.tsx b/packages/ui-stencil/src/components/internal/Typography/Paragraph.tsx index 6c74a265..32e7a956 100644 --- a/packages/ui-stencil/src/components/internal/Typography/Paragraph.tsx +++ b/packages/ui-stencil/src/components/internal/Typography/Paragraph.tsx @@ -1,6 +1,6 @@ import { Component, Prop, h } from '@stencil/core'; export interface ParagraphProps { - as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + as?: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'small'; } @Component({ tag: 'orama-paragraph', @@ -8,7 +8,7 @@ export interface ParagraphProps { }) export class Paragraph implements ParagraphProps { - @Prop() as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + @Prop() as?: ParagraphProps['as'] render() { const Tag = this.as || 'p'; diff --git a/packages/ui-stencil/src/components/internal/Typography/readme.md b/packages/ui-stencil/src/components/internal/Typography/readme.md index 27c14b27..0db01e28 100644 --- a/packages/ui-stencil/src/components/internal/Typography/readme.md +++ b/packages/ui-stencil/src/components/internal/Typography/readme.md @@ -7,9 +7,9 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| -------- | --------- | ----------- | --------------------------------------------------------------- | ----------- | -| `as` | `as` | | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p" \| "span"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| -------- | --------- | ----------- | -------------------------------------------------------------------------- | ----------- | +| `as` | `as` | | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p" \| "small" \| "span"` | `undefined` | ## Dependencies diff --git a/packages/ui-stencil/src/components/internal/Typography/typography.scss b/packages/ui-stencil/src/components/internal/Typography/typography.scss index 2e7262b9..65de5fdd 100644 --- a/packages/ui-stencil/src/components/internal/Typography/typography.scss +++ b/packages/ui-stencil/src/components/internal/Typography/typography.scss @@ -1,10 +1,10 @@ .paragraph { color: var(--text-color-secondary, text-color('secondary')); font-size: var(--font-size-md, $font-size-md); - line-height: var(--font-line-height-m, 1.5); + line-height: var(--font-line-height-m, $font-line-height-m); &--bold { - font-weight: var(--font-weight-semibold, 600); + font-weight: var(--font-weight-semibold, $font-weight-semibold); } @media (--md-min) { @@ -15,10 +15,10 @@ .span { color: var(--text-color-tertiary, text-color('tertiary')); font-size: var(--font-size-sm, $font-size-sm); - line-height: var(--font-line-height-m, 1.25); + line-height: var(--font-line-height-s, $font-line-height-s); &--bold { - font-weight: var(--font-weight-semibold, 600); + font-weight: var(--font-weight-semibold, $font-weight-semibold); } @media (--md-min) { diff --git a/packages/ui-stencil/src/components/orama-chat/orama-chat.sass b/packages/ui-stencil/src/components/orama-chat/orama-chat.sass new file mode 100644 index 00000000..5c835ec9 --- /dev/null +++ b/packages/ui-stencil/src/components/orama-chat/orama-chat.sass @@ -0,0 +1,2 @@ +:host + display: block diff --git a/packages/ui-stencil/src/components/orama-chat/orama-chat.tsx b/packages/ui-stencil/src/components/orama-chat/orama-chat.tsx new file mode 100644 index 00000000..21a5ef3d --- /dev/null +++ b/packages/ui-stencil/src/components/orama-chat/orama-chat.tsx @@ -0,0 +1,70 @@ +import { Component, Host, State, h } from '@stencil/core' +import { OramaClient } from '@oramacloud/client' +import { ChatService } from '../../services/ChatService' +import { chatContext } from '../../context/chatContext' + +@Component({ + tag: 'orama-chat', + styleUrl: 'orama-chat.sass', + shadow: true +}) +export class OramaChat { + @State() inputValue = '' + + private chatService: ChatService + + componentWillLoad() { + // TODO: Should not be hardcoded + const oramaClient = new OramaClient({ + api_key: '6kHcoevr3zkbBmC2hHqlcNQrOgejS4ds', + endpoint: 'https://cloud.orama.run/v1/indexes/orama-docs-pgjign' + }) + + this.chatService = new ChatService(oramaClient) + } + + handleSubmit = (e: Event) => { + e.preventDefault() + + if (!this.chatService) { + throw new Error('Chat Service is not initialized') + } + + this.chatService.sendQuestion(this.inputValue) + this.inputValue = '' + } + + render() { + return ( + +
+
Is loading: {String(chatContext.isLoading)}
+
Is error: {String(chatContext.error)}
+
+ (this.inputValue = (e.target as HTMLInputElement).value)} + /> + +
+
+ {chatContext.messages.map((message, index) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: There is not other key available form SDK right now +
+ {/* TODO: We still do not have sources */} +
+ Content: {message.content} +
+
+ ))} +
+
+
+ ) + } +} diff --git a/packages/ui-stencil/src/components/orama-chat/readme.md b/packages/ui-stencil/src/components/orama-chat/readme.md new file mode 100644 index 00000000..36075e2d --- /dev/null +++ b/packages/ui-stencil/src/components/orama-chat/readme.md @@ -0,0 +1,10 @@ +# orama-chat + + + + + + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/packages/ui-stencil/src/context/chatContext.ts b/packages/ui-stencil/src/context/chatContext.ts new file mode 100644 index 00000000..ae8b213f --- /dev/null +++ b/packages/ui-stencil/src/context/chatContext.ts @@ -0,0 +1,23 @@ +import { createStore } from '@stencil/store' + +// TODO: Seems like there is no message type being exported from orama-client rn +// export type TChatMessageBlock = { +// type: 'text' | 'component' | 'sources' +// received?: boolean +// content: string +// } + +export type TChatMessage = { + role: 'user' | 'assistant' + content: string + // messageBlocks: TChatMessageBlock[] +} + +const { state: chatContext } = createStore({ + messages: [] as TChatMessage[], + isLoading: false, + // TODO: Evaluate if we need to have a error object/string instead of just a boolean + error: false +}) + +export { chatContext } diff --git a/packages/ui-stencil/src/context/index.ts b/packages/ui-stencil/src/context/index.ts new file mode 100644 index 00000000..e0e95b2c --- /dev/null +++ b/packages/ui-stencil/src/context/index.ts @@ -0,0 +1,18 @@ +import { createStore } from '@stencil/store' + +const { state } = createStore({ + open: false, + count: 0, + facets: null as Record< + string, + { + count: number + values: Record + } + > | null, + hits: [], + term: '', + highlightedIndex: -1 +}) + +export default state diff --git a/packages/ui-stencil/src/erros/OramaClientNotInitialized.ts b/packages/ui-stencil/src/erros/OramaClientNotInitialized.ts new file mode 100644 index 00000000..8c7f49e6 --- /dev/null +++ b/packages/ui-stencil/src/erros/OramaClientNotInitialized.ts @@ -0,0 +1,5 @@ +export class OramaClientNotInitializedError extends Error { + constructor() { + super('Orama Client is not initialized') + } +} diff --git a/packages/ui-stencil/src/services/ChatService.ts b/packages/ui-stencil/src/services/ChatService.ts new file mode 100644 index 00000000..66166c73 --- /dev/null +++ b/packages/ui-stencil/src/services/ChatService.ts @@ -0,0 +1,51 @@ +import type { OramaClient, AnswerSession } from '@oramacloud/client' +import { OramaClientNotInitializedError } from '../erros/OramaClientNotInitialized' +import { chatContext } from '../context/chatContext' + +export class ChatService { + oramaClient: OramaClient + answerSession: AnswerSession + + constructor(oramaClient: OramaClient) { + this.oramaClient = oramaClient + } + + sendQuestion = (term: string) => { + if (!this.oramaClient) { + throw new OramaClientNotInitializedError() + } + + if (!this.answerSession) { + this.answerSession = this.oramaClient.createAnswerSession({ + events: { + onMessageChange: (messages) => { + // TODO: Fix on Orama Client: message event supposed to be emitted as soon as a question is made. + // And at least user message should be available right away + chatContext.messages = [...messages] + }, + onMessageLoading: (loading) => (chatContext.isLoading = loading), + onSourceChange: (sources) => { + console.log(sources) + } + } + }) + } + + chatContext.isLoading = true + chatContext.error = false + return this.answerSession + .ask({ term: term }) + .catch((error) => { + chatContext.error = true + console.error(error) + }) + .finally(() => { + chatContext.isLoading = false + }) + } + + // TODO + resendLatest = () => { + throw new Error('Not implemented') + } +} diff --git a/packages/ui-stencil/src/styles/_colors.scss b/packages/ui-stencil/src/styles/_colors.scss index ac7fa4a7..fa96870b 100644 --- a/packages/ui-stencil/src/styles/_colors.scss +++ b/packages/ui-stencil/src/styles/_colors.scss @@ -24,9 +24,9 @@ $purple700: #6A4BB2; $palette: ( text: ( primary: $gray950, - secondary: $gray200, - tertiary: $gray600, - inactive: $gray500, + secondary: $gray900, + tertiary: $gray700, + inactive: $gray600, ), background: ( primary: $gray950, diff --git a/packages/ui-stencil/src/styles/_functions.scss b/packages/ui-stencil/src/styles/_functions.scss index e4774687..bb98703c 100644 --- a/packages/ui-stencil/src/styles/_functions.scss +++ b/packages/ui-stencil/src/styles/_functions.scss @@ -84,7 +84,6 @@ @if type-of($value) == "number" { /* Return rem value */ $val: #{calc($value / $rem-base)}rem; - @return #{calc($value / $rem-base)}rem; } /* Non-numeric value, just return */ diff --git a/packages/ui-stencil/src/styles/_mq.scss b/packages/ui-stencil/src/styles/_mq.scss index 24b772f3..dad02e34 100644 --- a/packages/ui-stencil/src/styles/_mq.scss +++ b/packages/ui-stencil/src/styles/_mq.scss @@ -30,7 +30,7 @@ $mediaquery: ( ); /* TABLET PORTRAIT */ -@custom-media --xs-min (width > var(--xs, #{$xs})); +@custom-media --xs-min (width > #{$xs}); @custom-media --xs-only (#{$xs} < width <= #{$sm}); @custom-media --xs-max (width <= #{$xs}); @@ -42,7 +42,7 @@ $mediaquery: ( @custom-media --md-only (#{$md} < width <= #{$lg}); @custom-media --md-max (width <= #{$md}); -@custom-media --lg-min (width > var(--lg, #{$lg})); +@custom-media --lg-min (width > #{$lg}); @custom-media --lg-only (#{$lg} < width <= #{$xl}); @custom-media --lg-max (width <= #{$lg}); diff --git a/packages/ui-stencil/src/styles/globals.scss b/packages/ui-stencil/src/styles/globals.scss index b8c56733..dcea9da7 100644 --- a/packages/ui-stencil/src/styles/globals.scss +++ b/packages/ui-stencil/src/styles/globals.scss @@ -1,5 +1,13 @@ :root { #orama-ui { @include spread-map($theme-light); + + &.theme-dark { + @include spread-map($theme-dark); + } } } + +html { + font-size: 62.5%; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d5155cfe..60605064 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -281,16 +281,19 @@ importers: packages/ui-stencil: dependencies: + '@oramacloud/client': + specifier: 1.3.2 + version: 1.3.2(typescript@5.5.2) '@stencil/core': specifier: ^4.19.0 version: 4.19.0 '@stencil/store': specifier: ^2.0.16 version: 2.0.16(@stencil/core@4.19.0) + sse.js: + specifier: ^2.5.0 + version: 2.5.0 devDependencies: - '@stencil-community/postcss': - specifier: ^2.2.0 - version: 2.2.0(@stencil/core@4.19.0) '@stencil/angular-output-target': specifier: ^0.8.4 version: 0.8.4(@stencil/core@4.19.0) @@ -5207,6 +5210,11 @@ packages: webpack: 5.91.0(esbuild@0.21.3) dev: true + /@noble/hashes@1.4.0: + resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} + engines: {node: '>= 16'} + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -5317,6 +5325,31 @@ packages: - supports-color dev: true + /@orama/orama@2.0.21: + resolution: {integrity: sha512-XZpyjyNw4Mcpg94+gUvxmyyiFTZAdXvJ1aFPqHABarofu86oNwZL5tQUIj84xa1lrQiaeSxNKNBw0w4y5We5Yg==} + engines: {node: '>= 16.0.0'} + dev: false + + /@oramacloud/client@1.3.2(typescript@5.5.2): + resolution: {integrity: sha512-veF5z2T8YTOYvHe2a9Ls9NneyND8KHq67ij5RUsKH+tmbri2SIIRJwJ/38YmZpTur60QVhbsHxxQ5Hh76ZkqvA==} + dependencies: + '@orama/orama': 2.0.21 + '@paralleldrive/cuid2': 2.2.2 + lodash: 4.17.21 + openai: 4.52.3 + react: 18.3.1 + vue: 3.4.30(typescript@5.5.2) + transitivePeerDependencies: + - encoding + - typescript + dev: false + + /@paralleldrive/cuid2@2.2.2: + resolution: {integrity: sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==} + dependencies: + '@noble/hashes': 1.4.0 + dev: false + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -5925,15 +5958,6 @@ packages: resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} dev: true - /@stencil-community/postcss@2.2.0(@stencil/core@4.19.0): - resolution: {integrity: sha512-PuPdjqgF6HdvSLwS6fpLf1TRzd3bd6zqpsICCUA0u9sxPnwrsIpx1xYyA/K9hSWrmyUg0WhHPvkX9k26N5DCnw==} - peerDependencies: - '@stencil/core': '>=2.0.0 || >=3.0.0 || >=4.0.0' - dependencies: - '@stencil/core': 4.19.0 - postcss: 8.4.39 - dev: true - /@stencil/angular-output-target@0.8.4(@stencil/core@4.19.0): resolution: {integrity: sha512-QvmHTueXXs5vB9W2L12uEzFmAuR8sqATJV2b+SCFmYsjJSaymiSqR3dKo2wnr0tZiTgU1t16BWaUKiSh3wPXpw==} peerDependencies: @@ -7600,6 +7624,13 @@ packages: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true + /@types/node-fetch@2.6.11: + resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} + dependencies: + '@types/node': 20.14.9 + form-data: 4.0.0 + dev: false + /@types/node-forge@1.3.11: resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} dependencies: @@ -7610,7 +7641,6 @@ packages: resolution: {integrity: sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==} dependencies: undici-types: 5.26.5 - dev: true /@types/node@20.14.9: resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==} @@ -8317,7 +8347,6 @@ packages: engines: {node: '>=6.5'} dependencies: event-target-shim: 5.0.1 - dev: true /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} @@ -8403,6 +8432,13 @@ packages: - supports-color dev: true + /agentkeepalive@4.5.0: + resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} + engines: {node: '>= 8.0.0'} + dependencies: + humanize-ms: 1.2.1 + dev: false + /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -8717,7 +8753,6 @@ packages: /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true /autoprefixer@10.4.19(postcss@8.4.38): resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==} @@ -9615,7 +9650,6 @@ packages: engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 - dev: true /commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} @@ -10270,7 +10304,6 @@ packages: /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - dev: true /depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} @@ -11451,7 +11484,6 @@ packages: /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} - dev: true /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -11892,6 +11924,10 @@ packages: webpack: 5.92.1(@swc/core@1.6.5)(esbuild@0.20.2) dev: true + /form-data-encoder@1.7.2: + resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} + dev: false + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -11899,7 +11935,14 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: true + + /formdata-node@4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} + engines: {node: '>= 12.20'} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 4.0.0-beta.3 + dev: false /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} @@ -12632,6 +12675,12 @@ packages: engines: {node: '>=16.17.0'} dev: true + /humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + dependencies: + ms: 2.1.3 + dev: false + /hyperdyperid@1.2.0: resolution: {integrity: sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==} engines: {node: '>=10.18'} @@ -14507,14 +14556,12 @@ packages: /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} - dev: true /mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 - dev: true /mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} @@ -14891,6 +14938,11 @@ packages: minimatch: 3.1.2 dev: true + /node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + dev: false + /node-fetch-native@1.6.4: resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} dev: true @@ -15326,6 +15378,22 @@ packages: is-wsl: 2.2.0 dev: true + /openai@4.52.3: + resolution: {integrity: sha512-IyQLYKGYoEEkUCEm2frPzwHDJ3Ym663KtivnY6pWCzuoi6/HgSIMMxpcuTRS81GH6tiULPYGmTxIvzXdmPIWOw==} + hasBin: true + dependencies: + '@types/node': 18.19.39 + '@types/node-fetch': 2.6.11 + abort-controller: 3.0.0 + agentkeepalive: 4.5.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0 + web-streams-polyfill: 3.3.3 + transitivePeerDependencies: + - encoding + dev: false + /optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -17353,6 +17421,10 @@ packages: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} dev: true + /sse.js@2.5.0: + resolution: {integrity: sha512-I7zYndqOOkNpz9KIdFZ8c8A7zs1YazNewBr8Nsi/tqThfJkVPuP1q7UE2h4B0RwoWZxbBYpd06uoW3NI3SaZXg==} + dev: false + /ssri@10.0.6: resolution: {integrity: sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -18732,6 +18804,16 @@ packages: resolution: {integrity: sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==} dev: true + /web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + dev: false + + /web-streams-polyfill@4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} + dev: false + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}