@exulu/frontend 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +153 -155
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/prerender-manifest.json +1 -1
- package/dist/.next/server/app/(application)/agents/edit/[id]/page.js +1 -1
- package/dist/.next/server/app/(application)/agents/edit/[id]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +8 -8
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/data/[[...query]]/page.js +4 -4
- package/dist/.next/server/app/(application)/data/[[...query]]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/page.js +1 -1
- package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/prompts/page.js +1 -1
- package/dist/.next/server/app/(application)/prompts/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/workflows/page.js +1 -1
- package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +5 -5
- package/dist/.next/server/chunks/1025.js +1 -0
- package/dist/.next/server/chunks/2270.js +18 -44
- package/dist/.next/server/chunks/3434.js +1 -1
- package/dist/.next/server/chunks/3503.js +1 -0
- package/dist/.next/server/chunks/5084.js +1 -0
- package/dist/.next/server/chunks/5192.js +1 -1
- package/dist/.next/server/chunks/5485.js +1 -1
- package/dist/.next/server/chunks/5600.js +1 -1
- package/dist/.next/server/chunks/5974.js +1 -0
- package/dist/.next/server/chunks/6590.js +1 -1
- package/dist/.next/server/chunks/7471.js +1 -1
- package/dist/.next/server/chunks/8286.js +1 -1
- package/dist/.next/server/chunks/{3679.js → 9874.js} +5 -5
- package/dist/.next/server/middleware-manifest.json +5 -5
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/1685-939396dad2f8f1e0.js +2 -0
- package/dist/.next/static/chunks/1685-939396dad2f8f1e0.js.map +1 -0
- package/dist/.next/static/chunks/{4811-316807e25b634f9f.js → 192-72d6868cd891ccc6.js} +8 -8
- package/dist/.next/static/chunks/192-72d6868cd891ccc6.js.map +1 -0
- package/dist/.next/static/chunks/1957-cf44b1d31a9c7d5c.js +2 -0
- package/dist/.next/static/chunks/1957-cf44b1d31a9c7d5c.js.map +1 -0
- package/dist/.next/static/chunks/342-d9c2d6ae9f9435cb.js +2 -0
- package/dist/.next/static/chunks/342-d9c2d6ae9f9435cb.js.map +1 -0
- package/dist/.next/static/chunks/3750-e3d1b2cccd265190.js +2 -0
- package/dist/.next/static/chunks/3750-e3d1b2cccd265190.js.map +1 -0
- package/dist/.next/static/chunks/{3832-417a5eeee712a793.js → 3832-d7782d6a2771ae6c.js} +1 -1
- package/dist/.next/static/chunks/{3832-417a5eeee712a793.js.map → 3832-d7782d6a2771ae6c.js.map} +1 -1
- package/dist/.next/static/chunks/552-39155a93c527ec6d.js +2 -0
- package/dist/.next/static/chunks/552-39155a93c527ec6d.js.map +1 -0
- package/dist/.next/static/chunks/6280-50b751f993f2fe4f.js +2 -0
- package/dist/.next/static/chunks/6280-50b751f993f2fe4f.js.map +1 -0
- package/dist/.next/static/chunks/6367-59655a85d75e19be.js +2 -0
- package/dist/.next/static/chunks/6367-59655a85d75e19be.js.map +1 -0
- package/dist/.next/static/chunks/6373-aef582adc575d3ca.js +2 -0
- package/dist/.next/static/chunks/6373-aef582adc575d3ca.js.map +1 -0
- package/dist/.next/static/chunks/8030-9c926ea4dfd3a54e.js +2 -0
- package/dist/.next/static/chunks/8030-9c926ea4dfd3a54e.js.map +1 -0
- package/dist/.next/static/chunks/{6805-792cc8008b165c07.js → 8293-ba5cd36594e6fde1.js} +10 -10
- package/dist/.next/static/chunks/8293-ba5cd36594e6fde1.js.map +1 -0
- package/dist/.next/static/chunks/9105-d8ff41060f7ffc85.js +2 -0
- package/dist/.next/static/chunks/9105-d8ff41060f7ffc85.js.map +1 -0
- package/dist/.next/static/chunks/9953-95900a236271a222.js +2 -0
- package/dist/.next/static/chunks/9953-95900a236271a222.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-e4a4693953329671.js +2 -0
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-e4a4693953329671.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-d59534ca19eee51f.js +2 -0
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-d59534ca19eee51f.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-0c7c1b0e1713bf60.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-0c7c1b0e1713bf60.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-7db6bfbf02606136.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-7db6bfbf02606136.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-a7728cf9b0524489.js +2 -0
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-a7728cf9b0524489.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/cases/{page-a39fef7444581565.js → page-827f50c6d1f150d0.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/evals/cases/{page-a39fef7444581565.js.map → page-827f50c6d1f150d0.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/explorer/{page-1d676c9dfe3ed58b.js → page-e6b1c034c07776e2.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/explorer/{page-1d676c9dfe3ed58b.js.map → page-e6b1c034c07776e2.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/[project]/page-f04fd5291a1ef7b1.js +2 -0
- package/dist/.next/static/chunks/app/(application)/projects/[project]/page-f04fd5291a1ef7b1.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/prompts/page-2c500e9898447506.js +2 -0
- package/dist/.next/static/chunks/app/(application)/prompts/page-2c500e9898447506.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/token/{page-3f74f711f3d04fce.js → page-3acc39cb8a718331.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/token/{page-3f74f711f3d04fce.js.map → page-3acc39cb8a718331.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/workflows/{page-47dedb88cec600d5.js → page-e38f9456120dab69.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/workflows/page-e38f9456120dab69.js.map +1 -0
- package/dist/.next/static/chunks/ba12c10f-85ed008ce7746dbe.js +2 -0
- package/dist/.next/static/chunks/ba12c10f-85ed008ce7746dbe.js.map +1 -0
- package/dist/.next/static/css/9c08ae5d990a6b14.css +4 -0
- package/dist/.next/static/css/9c08ae5d990a6b14.css.map +1 -0
- package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/.next/server/chunks/2948.js +0 -1
- package/dist/.next/server/chunks/38.js +0 -1
- package/dist/.next/server/chunks/7958.js +0 -1
- package/dist/.next/server/chunks/8050.js +0 -1
- package/dist/.next/static/chunks/1685-9cacdee7e3f0942f.js +0 -2
- package/dist/.next/static/chunks/1685-9cacdee7e3f0942f.js.map +0 -1
- package/dist/.next/static/chunks/1957-39a01a3915f246ab.js +0 -2
- package/dist/.next/static/chunks/1957-39a01a3915f246ab.js.map +0 -1
- package/dist/.next/static/chunks/3750-f45c59ef1cc79417.js +0 -2
- package/dist/.next/static/chunks/3750-f45c59ef1cc79417.js.map +0 -1
- package/dist/.next/static/chunks/4811-316807e25b634f9f.js.map +0 -1
- package/dist/.next/static/chunks/5282-68f9880f1f951f44.js +0 -2
- package/dist/.next/static/chunks/5282-68f9880f1f951f44.js.map +0 -1
- package/dist/.next/static/chunks/572-2940a399da1e3a3b.js +0 -2
- package/dist/.next/static/chunks/572-2940a399da1e3a3b.js.map +0 -1
- package/dist/.next/static/chunks/6367-59cef3c74213925b.js +0 -2
- package/dist/.next/static/chunks/6367-59cef3c74213925b.js.map +0 -1
- package/dist/.next/static/chunks/6373-4c5dffaf4193621c.js +0 -2
- package/dist/.next/static/chunks/6373-4c5dffaf4193621c.js.map +0 -1
- package/dist/.next/static/chunks/6805-792cc8008b165c07.js.map +0 -1
- package/dist/.next/static/chunks/8030-c1b6be46253076cb.js +0 -2
- package/dist/.next/static/chunks/8030-c1b6be46253076cb.js.map +0 -1
- package/dist/.next/static/chunks/9105-dfbce1bad8e3e8dd.js +0 -2
- package/dist/.next/static/chunks/9105-dfbce1bad8e3e8dd.js.map +0 -1
- package/dist/.next/static/chunks/9621-f81c4d7c0ecf5a67.js +0 -2
- package/dist/.next/static/chunks/9621-f81c4d7c0ecf5a67.js.map +0 -1
- package/dist/.next/static/chunks/9953-dfb5fc0e5b74ec09.js +0 -2
- package/dist/.next/static/chunks/9953-dfb5fc0e5b74ec09.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-4e7e02768ed1a72a.js +0 -2
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-4e7e02768ed1a72a.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-38f845d5ccdad76b.js +0 -2
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-38f845d5ccdad76b.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-2d47be0ee80dd89d.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-2d47be0ee80dd89d.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-a391b8407f74e9b4.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-a391b8407f74e9b4.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-cf6f8d2bd4e9c819.js +0 -2
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-cf6f8d2bd4e9c819.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/projects/[project]/page-bc859da58d8505f7.js +0 -2
- package/dist/.next/static/chunks/app/(application)/projects/[project]/page-bc859da58d8505f7.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/prompts/page-d2f36ff149385efd.js +0 -2
- package/dist/.next/static/chunks/app/(application)/prompts/page-d2f36ff149385efd.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/workflows/page-47dedb88cec600d5.js.map +0 -1
- package/dist/.next/static/chunks/ba12c10f-aaafcb074f608624.js +0 -2
- package/dist/.next/static/chunks/ba12c10f-aaafcb074f608624.js.map +0 -1
- package/dist/.next/static/css/c8c015815c72d053.css +0 -4
- package/dist/.next/static/css/c8c015815c72d053.css.map +0 -1
- /package/dist/.next/static/{GOwerAkBncYx0J8q1TqQb → 3j63p6b3zZZB_v1Hn8Mxp}/_buildManifest.js +0 -0
- /package/dist/.next/static/{GOwerAkBncYx0J8q1TqQb → 3j63p6b3zZZB_v1Hn8Mxp}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/chunks/9621-f81c4d7c0ecf5a67.js","mappings":"6IAaM,IAAAA,EAAcC,CAAAA,EAAAA,SAAAA,CAAAA,EAAiB,cAAe,CAClD,CAAC,SAAU,CAAEC,GAAI,KAAMC,GAAI,KAAMC,EAAG,KAAMC,IAAK,UAAU,CACz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MAAA,CAC9BwL,OAAA,OACAE,MAAA,MACA,EAAazP,SAAY,GAAAkb,EAAAla,GAAA,EAAI,OAAU,GAAAV,CAAA,CAAA8B,IAAAP,EAAApB,UAAA,CAAAT,SAAA,mBAAAA,EAAAA,EAAA6B,GAAA7B,CAAA,EAA4G,EACnJ","sources":["webpack://_N_E/../../../src/icons/alert-circle.ts","webpack://_N_E/../../../src/icons/arrow-left.ts","webpack://_N_E/../../../src/icons/book.ts","webpack://_N_E/../../../src/icons/check-circle-2.ts","webpack://_N_E/../../../src/icons/chevron-down.ts","webpack://_N_E/../../../src/icons/info.ts","webpack://_N_E/../../../src/icons/loader-2.ts","webpack://_N_E/../../../src/icons/message-square.ts","webpack://_N_E/../../../src/icons/pencil.ts","webpack://_N_E/../../../src/icons/refresh-ccw.ts","webpack://_N_E/../../../src/icons/x-circle.ts","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://_N_E/./node_modules/@radix-ui/number/dist/index.mjs","webpack://_N_E/../src/dialog.tsx","webpack://_N_E/../src/alert-dialog.tsx","webpack://_N_E/./node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/primitive/dist/index.mjs","webpack://_N_E/../src/presence.tsx","webpack://_N_E/../src/use-state-machine.tsx","webpack://_N_E/../src/collapsible.tsx","webpack://_N_E/./node_modules/date-fns/differenceInCalendarMonths.mjs","webpack://_N_E/./node_modules/date-fns/endOfMonth.mjs","webpack://_N_E/./node_modules/date-fns/constructNow.mjs","webpack://_N_E/./node_modules/date-fns/compareAsc.mjs","webpack://_N_E/./node_modules/date-fns/endOfDay.mjs","webpack://_N_E/./node_modules/date-fns/isLastDayOfMonth.mjs","webpack://_N_E/./node_modules/date-fns/differenceInMonths.mjs","webpack://_N_E/./node_modules/date-fns/_lib/getRoundingMethod.mjs","webpack://_N_E/./node_modules/date-fns/differenceInMilliseconds.mjs","webpack://_N_E/./node_modules/date-fns/differenceInSeconds.mjs","webpack://_N_E/./node_modules/date-fns/formatDistance.mjs","webpack://_N_E/./node_modules/date-fns/formatDistanceToNow.mjs","webpack://_N_E/./node_modules/use-stick-to-bottom/dist/useStickToBottom.js","webpack://_N_E/./node_modules/use-stick-to-bottom/dist/StickToBottom.js"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlertCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/alert-circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst AlertCircle = createLucideIcon('AlertCircle', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['line', { x1: '12', x2: '12', y1: '8', y2: '12', key: '1pkeuh' }],\n ['line', { x1: '12', x2: '12.01', y1: '16', y2: '16', key: '4dfq90' }],\n]);\n\nexport default AlertCircle;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/arrow-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowLeft = createLucideIcon('ArrowLeft', [\n ['path', { d: 'm12 19-7-7 7-7', key: '1l729n' }],\n ['path', { d: 'M19 12H5', key: 'x3x0zl' }],\n]);\n\nexport default ArrowLeft;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Book\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/book\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Book = createLucideIcon('Book', [\n ['path', { d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20', key: 't4utmx' }],\n]);\n\nexport default Book;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CheckCircle2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/check-circle-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CheckCircle2 = createLucideIcon('CheckCircle2', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm9 12 2 2 4-4', key: 'dzmm74' }],\n]);\n\nexport default CheckCircle2;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronDown = createLucideIcon('ChevronDown', [\n ['path', { d: 'm6 9 6 6 6-6', key: 'qrunsl' }],\n]);\n\nexport default ChevronDown;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Info\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/info\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Info = createLucideIcon('Info', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M12 16v-4', key: '1dtifu' }],\n ['path', { d: 'M12 8h.01', key: 'e9boi3' }],\n]);\n\nexport default Info;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Loader2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/loader-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Loader2 = createLucideIcon('Loader2', [\n ['path', { d: 'M21 12a9 9 0 1 1-6.219-8.56', key: '13zald' }],\n]);\n\nexport default Loader2;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MessageSquare\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/message-square\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MessageSquare = createLucideIcon('MessageSquare', [\n ['path', { d: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z', key: '1lielz' }],\n]);\n\nexport default MessageSquare;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pencil\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/pencil\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Pencil = createLucideIcon('Pencil', [\n ['path', { d: 'M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z', key: '5qss01' }],\n ['path', { d: 'm15 5 4 4', key: '1mk7zo' }],\n]);\n\nexport default Pencil;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RefreshCcw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/refresh-ccw\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RefreshCcw = createLucideIcon('RefreshCcw', [\n ['path', { d: 'M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8', key: '14sxne' }],\n ['path', { d: 'M3 3v5h5', key: '1xhq8a' }],\n ['path', { d: 'M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16', key: '1hlbsb' }],\n ['path', { d: 'M16 16h5v5', key: 'ccwih5' }],\n]);\n\nexport default RefreshCcw;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name XCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/x-circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst XCircle = createLucideIcon('XCircle', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm15 9-6 6', key: '1uzhvr' }],\n ['path', { d: 'm9 9 6 6', key: 'z0biqf' }],\n]);\n\nexport default XCircle;\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n {React.Children.map(children, (child) => (\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {child}\n </PortalPrimitive>\n </Presence>\n ))}\n </PortalProvider>\n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef<DialogOverlayElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n <Presence present={forceMount || context.open}>\n <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n </Presence>\n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst Slot = createSlot('DialogOverlay.RemoveScroll');\n\nconst DialogOverlayImpl = React.forwardRef<DialogOverlayImplElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom shards={[context.contentRef]}>\n <Primitive.div\n data-state={getState(context.open)}\n {...overlayProps}\n ref={forwardedRef}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n style={{ pointerEvents: 'auto', ...overlayProps.style }}\n />\n </RemoveScroll>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ComponentRef<typeof DismissableLayer>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ninterface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n role=\"dialog\"\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n />\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ComponentRef<typeof Primitive.h2>;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return <Primitive.h2 id={context.titleId} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ComponentRef<typeof Primitive.p>;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return <Primitive.p id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ComponentRef<typeof Primitive.button>;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<DialogContentElement | null>;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n","import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps<P> = P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;\ninterface AlertDialogProps extends Omit<DialogProps, 'modal'> {}\n\nconst AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ComponentRef<typeof DialogPrimitive.Trigger>;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n (props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC<AlertDialogPortalProps> = (\n props: ScopedProps<AlertDialogPortalProps>\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ComponentRef<typeof DialogPrimitive.Overlay>;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(\n (props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ComponentRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {}\n\nconst Slottable = createSlottable('AlertDialogContent');\n\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n (props: ScopedProps<AlertDialogContentProps>, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef<AlertDialogContentElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef<AlertDialogCancelElement | null>(null);\n\n return (\n <DialogPrimitive.WarningProvider\n contentName={CONTENT_NAME}\n titleName={TITLE_NAME}\n docsSlug=\"alert-dialog\"\n >\n <AlertDialogContentProvider scope={__scopeAlertDialog} cancelRef={cancelRef}>\n <DialogPrimitive.Content\n role=\"alertdialog\"\n {...dialogScope}\n {...contentProps}\n ref={composedRefs}\n onOpenAutoFocus={composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n <Slottable>{children}</Slottable>\n {process.env.NODE_ENV === 'development' && (\n <DescriptionWarning contentRef={contentRef} />\n )}\n </DialogPrimitive.Content>\n </AlertDialogContentProvider>\n </DialogPrimitive.WarningProvider>\n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ComponentRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props: ScopedProps<AlertDialogTitleProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Title {...dialogScope} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ComponentRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps<AlertDialogDescriptionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Description {...dialogScope} {...descriptionProps} ref={forwardedRef} />;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ComponentRef<typeof DialogPrimitive.Close>;\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n (props: ScopedProps<AlertDialogActionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Close {...dialogScope} {...actionProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ComponentRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n (props: ScopedProps<AlertDialogCancelProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return <DialogPrimitive.Close {...dialogScope} {...cancelProps} ref={ref} />;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<AlertDialogContentElement | null>;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n};\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useStateMachine } from './use-state-machine';\n\ninterface PresenceProps {\n children: React.ReactElement | ((props: { present: boolean }) => React.ReactElement);\n present: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n\n const child = (\n typeof children === 'function'\n ? children({ present: presence.isPresent })\n : React.Children.only(children)\n ) as React.ReactElement<{ ref?: React.Ref<HTMLElement> }>;\n\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;\n};\n\nPresence.displayName = 'Presence';\n\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/\n\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement>();\n const stylesRef = React.useRef<CSSStyleDeclaration | null>(null);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n });\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n useLayoutEffect(() => {\n if (node) {\n let timeoutId: number;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n // The event.animationName is unescaped for CSS syntax,\n // so we need to escape it to compare with the animationName computed from the style.\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n // With React 18 concurrency this update is applied a frame after the\n // animation ends, creating a flash of visible content. By setting the\n // animation fill mode to \"forwards\", we force the node to keep the\n // styles of the last keyframe, removing the flash.\n //\n // Previously we flushed the update via ReactDom.flushSync, but with\n // exit animations this resulted in the node being removed from the\n // DOM before the synthetic animationEnd event was dispatched, meaning\n // user-provided event handlers would not be called.\n // https://github.com/radix-ui/primitives/pull/1849\n send('ANIMATION_END');\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = 'forwards';\n // Reset the style after the node had time to unmount (for cases\n // where the component chooses not to unmount). Doing this any\n // sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n // still causes a flash.\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === 'forwards') {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n };\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }\n }, [node, send]);\n\n return {\n isPresent: ['mounted', 'unmountSuspended'].includes(state),\n ref: React.useCallback((node: HTMLElement) => {\n stylesRef.current = node ? getComputedStyle(node) : null;\n setNode(node);\n }, []),\n };\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getAnimationName(styles: CSSStyleDeclaration | null) {\n return styles?.animationName || 'none';\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement<{ ref?: React.Ref<unknown> }>) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n\n // Not DEV\n return element.props.ref || (element as any).ref;\n}\n\nconst Root = Presence;\n\nexport {\n Presence,\n //\n Root,\n};\nexport type { PresenceProps };\n","import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Collapsible\n * -----------------------------------------------------------------------------------------------*/\n\nconst COLLAPSIBLE_NAME = 'Collapsible';\n\ntype ScopedProps<P> = P & { __scopeCollapsible?: Scope };\nconst [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\n\ntype CollapsibleContextValue = {\n contentId: string;\n disabled?: boolean;\n open: boolean;\n onOpenToggle(): void;\n};\n\nconst [CollapsibleProvider, useCollapsibleContext] =\n createCollapsibleContext<CollapsibleContextValue>(COLLAPSIBLE_NAME);\n\ntype CollapsibleElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CollapsibleProps extends PrimitiveDivProps {\n defaultOpen?: boolean;\n open?: boolean;\n disabled?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst Collapsible = React.forwardRef<CollapsibleElement, CollapsibleProps>(\n (props: ScopedProps<CollapsibleProps>, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME,\n });\n\n return (\n <CollapsibleProvider\n scope={__scopeCollapsible}\n disabled={disabled}\n contentId={useId()}\n open={open}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n >\n <Primitive.div\n data-state={getState(open)}\n data-disabled={disabled ? '' : undefined}\n {...collapsibleProps}\n ref={forwardedRef}\n />\n </CollapsibleProvider>\n );\n }\n);\n\nCollapsible.displayName = COLLAPSIBLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CollapsibleTrigger';\n\ntype CollapsibleTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface CollapsibleTriggerProps extends PrimitiveButtonProps {}\n\nconst CollapsibleTrigger = React.forwardRef<CollapsibleTriggerElement, CollapsibleTriggerProps>(\n (props: ScopedProps<CollapsibleTriggerProps>, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return (\n <Primitive.button\n type=\"button\"\n aria-controls={context.contentId}\n aria-expanded={context.open || false}\n data-state={getState(context.open)}\n data-disabled={context.disabled ? '' : undefined}\n disabled={context.disabled}\n {...triggerProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nCollapsibleTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'CollapsibleContent';\n\ntype CollapsibleContentElement = CollapsibleContentImplElement;\ninterface CollapsibleContentProps extends Omit<CollapsibleContentImplProps, 'present'> {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n (props: ScopedProps<CollapsibleContentProps>, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return (\n <Presence present={forceMount || context.open}>\n {({ present }) => (\n <CollapsibleContentImpl {...contentProps} ref={forwardedRef} present={present} />\n )}\n </Presence>\n );\n }\n);\n\nCollapsibleContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype CollapsibleContentImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface CollapsibleContentImplProps extends PrimitiveDivProps {\n present: boolean;\n}\n\nconst CollapsibleContentImpl = React.forwardRef<\n CollapsibleContentImplElement,\n CollapsibleContentImplProps\n>((props: ScopedProps<CollapsibleContentImplProps>, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef<CollapsibleContentImplElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef<number | undefined>(0);\n const height = heightRef.current;\n const widthRef = React.useRef<number | undefined>(0);\n const width = widthRef.current;\n // when opening we want it to immediately open to retrieve dimensions\n // when closing we delay `present` to retrieve dimensions before closing\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef<Record<string, string>>(undefined);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName,\n };\n // block any animations/transitions so the element renders at its full dimensions\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // get width and height from full dimensions\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n\n // kick off any animations/transitions that were originally set up if it isn't the initial mount\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration!;\n node.style.animationName = originalStylesRef.current.animationName!;\n }\n\n setIsPresent(present);\n }\n /**\n * depends on `context.open` because it will change to `false`\n * when a close is triggered but `present` will be `false` on\n * animation end (so when close finishes). This allows us to\n * retrieve the dimensions *before* closing.\n */\n }, [context.open, present]);\n\n return (\n <Primitive.div\n data-state={getState(context.open)}\n data-disabled={context.disabled ? '' : undefined}\n id={context.contentId}\n hidden={!isOpen}\n {...contentProps}\n ref={composedRefs}\n style={{\n [`--radix-collapsible-content-height` as any]: height ? `${height}px` : undefined,\n [`--radix-collapsible-content-width` as any]: width ? `${width}px` : undefined,\n ...props.style,\n }}\n >\n {isOpen && children}\n </Primitive.div>\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open?: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Collapsible;\nconst Trigger = CollapsibleTrigger;\nconst Content = CollapsibleContent;\n\nexport {\n createCollapsibleScope,\n //\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n //\n Root,\n Trigger,\n Content,\n};\nexport type { CollapsibleProps, CollapsibleTriggerProps, CollapsibleContentProps };\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();\n const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();\n\n return yearDiff * 12 + monthDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name constructNow\n * @category Generic Helpers\n * @summary Constructs a new current date using the passed value constructor.\n * @pure false\n *\n * @description\n * The function constructs a new current date using the constructor from\n * the reference date. It helps to build generic functions that accept date\n * extensions and use the current date.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n *\n * @returns Current date initialized using the given date constructor\n *\n * @example\n * import { constructNow, isSameDay } from 'date-fns'\n *\n * function isToday<DateType extends Date>(\n * date: DateType | number | string,\n * ): boolean {\n * // If we were to use `new Date()` directly, the function would behave\n * // differently in different timezones and return false for the same date.\n * return isSameDay(date, constructNow(date));\n * }\n */\nexport function constructNow(date) {\n return constructFrom(date, Date.now());\n}\n\n// Fallback for modularized imports:\nexport default constructNow;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date) {\n const _date = toDate(date);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { endOfDay } from \"./endOfDay.mjs\";\nimport { endOfMonth } from \"./endOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date) {\n const _date = toDate(date);\n return +endOfDay(_date) === +endOfMonth(_date);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.mjs\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareAsc(_dateLeft, _dateRight);\n const difference = Math.abs(\n differenceInCalendarMonths(_dateLeft, _dateRight),\n );\n let result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (_dateLeft.getMonth() === 1 && _dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n _dateLeft.setDate(30);\n }\n\n _dateLeft.setMonth(_dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n let isLastMonthNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (\n isLastDayOfMonth(toDate(dateLeft)) &&\n difference === 1 &&\n compareAsc(dateLeft, _dateRight) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(dateLeft, dateRight) {\n return +toDate(dateLeft) - +toDate(dateRight);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.mjs\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.mjs\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(dateLeft, dateRight, options) {\n const diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { minutesInDay, minutesInMonth } from \"./constants.mjs\";\nimport { differenceInMonths } from \"./differenceInMonths.mjs\";\nimport { differenceInSeconds } from \"./differenceInSeconds.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport function formatDistance(date, baseDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(date, baseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n let dateLeft;\n let dateRight;\n if (comparison > 0) {\n dateLeft = toDate(baseDate);\n dateRight = toDate(date);\n } else {\n dateLeft = toDate(date);\n dateRight = toDate(baseDate);\n }\n\n const seconds = differenceInSeconds(dateRight, dateLeft);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(dateRight) -\n getTimezoneOffsetInMilliseconds(dateLeft)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n","import { constructNow } from \"./constructNow.mjs\";\nimport { formatDistance } from \"./formatDistance.mjs\";\n\n/**\n * The {@link formatDistanceToNow} function options.\n */\n\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n * @param options - The object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistanceToNow(date, options) {\n return formatDistance(date, constructNow(date), options);\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceToNow;\n","/*!---------------------------------------------------------------------------------------------\n * Copyright (c) StackBlitz. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { useCallback, useMemo, useRef, useState, } from \"react\";\nconst DEFAULT_SPRING_ANIMATION = {\n /**\n * A value from 0 to 1, on how much to damp the animation.\n * 0 means no damping, 1 means full damping.\n *\n * @default 0.7\n */\n damping: 0.7,\n /**\n * The stiffness of how fast/slow the animation gets up to speed.\n *\n * @default 0.05\n */\n stiffness: 0.05,\n /**\n * The inertial mass associated with the animation.\n * Higher numbers make the animation slower.\n *\n * @default 1.25\n */\n mass: 1.25,\n};\nconst STICK_TO_BOTTOM_OFFSET_PX = 70;\nconst SIXTY_FPS_INTERVAL_MS = 1000 / 60;\nconst RETAIN_ANIMATION_DURATION_MS = 350;\nlet mouseDown = false;\nglobalThis.document?.addEventListener(\"mousedown\", () => {\n mouseDown = true;\n});\nglobalThis.document?.addEventListener(\"mouseup\", () => {\n mouseDown = false;\n});\nglobalThis.document?.addEventListener(\"click\", () => {\n mouseDown = false;\n});\nexport const useStickToBottom = (options = {}) => {\n const [escapedFromLock, updateEscapedFromLock] = useState(false);\n const [isAtBottom, updateIsAtBottom] = useState(options.initial !== false);\n const [isNearBottom, setIsNearBottom] = useState(false);\n const optionsRef = useRef(null);\n optionsRef.current = options;\n const isSelecting = useCallback(() => {\n if (!mouseDown) {\n return false;\n }\n const selection = window.getSelection();\n if (!selection || !selection.rangeCount) {\n return false;\n }\n const range = selection.getRangeAt(0);\n return (range.commonAncestorContainer.contains(scrollRef.current) ||\n scrollRef.current?.contains(range.commonAncestorContainer));\n }, []);\n const setIsAtBottom = useCallback((isAtBottom) => {\n state.isAtBottom = isAtBottom;\n updateIsAtBottom(isAtBottom);\n }, []);\n const setEscapedFromLock = useCallback((escapedFromLock) => {\n state.escapedFromLock = escapedFromLock;\n updateEscapedFromLock(escapedFromLock);\n }, []);\n // biome-ignore lint/correctness/useExhaustiveDependencies: not needed\n const state = useMemo(() => {\n let lastCalculation;\n return {\n escapedFromLock,\n isAtBottom,\n resizeDifference: 0,\n accumulated: 0,\n velocity: 0,\n listeners: new Set(),\n get scrollTop() {\n return scrollRef.current?.scrollTop ?? 0;\n },\n set scrollTop(scrollTop) {\n if (scrollRef.current) {\n scrollRef.current.scrollTop = scrollTop;\n state.ignoreScrollToTop = scrollRef.current.scrollTop;\n }\n },\n get targetScrollTop() {\n if (!scrollRef.current || !contentRef.current) {\n return 0;\n }\n return (scrollRef.current.scrollHeight - 1 - scrollRef.current.clientHeight);\n },\n get calculatedTargetScrollTop() {\n if (!scrollRef.current || !contentRef.current) {\n return 0;\n }\n const { targetScrollTop } = this;\n if (!options.targetScrollTop) {\n return targetScrollTop;\n }\n if (lastCalculation?.targetScrollTop === targetScrollTop) {\n return lastCalculation.calculatedScrollTop;\n }\n const calculatedScrollTop = Math.max(Math.min(options.targetScrollTop(targetScrollTop, {\n scrollElement: scrollRef.current,\n contentElement: contentRef.current,\n }), targetScrollTop), 0);\n lastCalculation = { targetScrollTop, calculatedScrollTop };\n requestAnimationFrame(() => {\n lastCalculation = undefined;\n });\n return calculatedScrollTop;\n },\n get scrollDifference() {\n return this.calculatedTargetScrollTop - this.scrollTop;\n },\n get isNearBottom() {\n return this.scrollDifference <= STICK_TO_BOTTOM_OFFSET_PX;\n },\n };\n }, []);\n const scrollToBottom = useCallback((scrollOptions = {}) => {\n if (typeof scrollOptions === \"string\") {\n scrollOptions = { animation: scrollOptions };\n }\n if (!scrollOptions.preserveScrollPosition) {\n setIsAtBottom(true);\n }\n const waitElapsed = Date.now() + (Number(scrollOptions.wait) || 0);\n const behavior = mergeAnimations(optionsRef.current, scrollOptions.animation);\n const { ignoreEscapes = false } = scrollOptions;\n let durationElapsed;\n let startTarget = state.calculatedTargetScrollTop;\n if (scrollOptions.duration instanceof Promise) {\n scrollOptions.duration.finally(() => {\n durationElapsed = Date.now();\n });\n }\n else {\n durationElapsed = waitElapsed + (scrollOptions.duration ?? 0);\n }\n const next = async () => {\n const promise = new Promise(requestAnimationFrame).then(() => {\n if (!state.isAtBottom) {\n state.animation = undefined;\n return false;\n }\n const { scrollTop } = state;\n const tick = performance.now();\n const tickDelta = (tick - (state.lastTick ?? tick)) / SIXTY_FPS_INTERVAL_MS;\n state.animation || (state.animation = { behavior, promise, ignoreEscapes });\n if (state.animation.behavior === behavior) {\n state.lastTick = tick;\n }\n if (isSelecting()) {\n return next();\n }\n if (waitElapsed > Date.now()) {\n return next();\n }\n if (scrollTop < Math.min(startTarget, state.calculatedTargetScrollTop)) {\n if (state.animation?.behavior === behavior) {\n if (behavior === \"instant\") {\n state.scrollTop = state.calculatedTargetScrollTop;\n return next();\n }\n state.velocity =\n (behavior.damping * state.velocity +\n behavior.stiffness * state.scrollDifference) /\n behavior.mass;\n state.accumulated += state.velocity * tickDelta;\n state.scrollTop += state.accumulated;\n if (state.scrollTop !== scrollTop) {\n state.accumulated = 0;\n }\n }\n return next();\n }\n if (durationElapsed > Date.now()) {\n startTarget = state.calculatedTargetScrollTop;\n return next();\n }\n state.animation = undefined;\n /**\n * If we're still below the target, then queue\n * up another scroll to the bottom with the last\n * requested animatino.\n */\n if (state.scrollTop < state.calculatedTargetScrollTop) {\n return scrollToBottom({\n animation: mergeAnimations(optionsRef.current, optionsRef.current.resize),\n ignoreEscapes,\n duration: Math.max(0, durationElapsed - Date.now()) || undefined,\n });\n }\n return state.isAtBottom;\n });\n return promise.then((isAtBottom) => {\n requestAnimationFrame(() => {\n if (!state.animation) {\n state.lastTick = undefined;\n state.velocity = 0;\n }\n });\n return isAtBottom;\n });\n };\n if (scrollOptions.wait !== true) {\n state.animation = undefined;\n }\n if (state.animation?.behavior === behavior) {\n return state.animation.promise;\n }\n return next();\n }, [setIsAtBottom, isSelecting, state]);\n const stopScroll = useCallback(() => {\n setEscapedFromLock(true);\n setIsAtBottom(false);\n }, [setEscapedFromLock, setIsAtBottom]);\n const handleScroll = useCallback(({ target }) => {\n if (target !== scrollRef.current) {\n return;\n }\n const { scrollTop, ignoreScrollToTop } = state;\n let { lastScrollTop = scrollTop } = state;\n state.lastScrollTop = scrollTop;\n state.ignoreScrollToTop = undefined;\n if (ignoreScrollToTop && ignoreScrollToTop > scrollTop) {\n /**\n * When the user scrolls up while the animation plays, the `scrollTop` may\n * not come in separate events; if this happens, to make sure `isScrollingUp`\n * is correct, set the lastScrollTop to the ignored event.\n */\n lastScrollTop = ignoreScrollToTop;\n }\n setIsNearBottom(state.isNearBottom);\n /**\n * Scroll events may come before a ResizeObserver event,\n * so in order to ignore resize events correctly we use a\n * timeout.\n *\n * @see https://github.com/WICG/resize-observer/issues/25#issuecomment-248757228\n */\n setTimeout(() => {\n /**\n * When theres a resize difference ignore the resize event.\n */\n if (state.resizeDifference || scrollTop === ignoreScrollToTop) {\n return;\n }\n if (isSelecting()) {\n setEscapedFromLock(true);\n setIsAtBottom(false);\n return;\n }\n const isScrollingDown = scrollTop > lastScrollTop;\n const isScrollingUp = scrollTop < lastScrollTop;\n if (state.animation?.ignoreEscapes) {\n state.scrollTop = lastScrollTop;\n return;\n }\n if (isScrollingUp) {\n setEscapedFromLock(true);\n setIsAtBottom(false);\n }\n if (isScrollingDown) {\n setEscapedFromLock(false);\n }\n if (!state.escapedFromLock && state.isNearBottom) {\n setIsAtBottom(true);\n }\n }, 1);\n }, [setEscapedFromLock, setIsAtBottom, isSelecting, state]);\n const handleWheel = useCallback(({ target, deltaY }) => {\n let element = target;\n while (![\"scroll\", \"auto\"].includes(getComputedStyle(element).overflow)) {\n if (!element.parentElement) {\n return;\n }\n element = element.parentElement;\n }\n /**\n * The browser may cancel the scrolling from the mouse wheel\n * if we update it from the animation in meantime.\n * To prevent this, always escape when the wheel is scrolled up.\n */\n if (element === scrollRef.current &&\n deltaY < 0 &&\n scrollRef.current.scrollHeight > scrollRef.current.clientHeight &&\n !state.animation?.ignoreEscapes) {\n setEscapedFromLock(true);\n setIsAtBottom(false);\n }\n }, [setEscapedFromLock, setIsAtBottom, state]);\n const scrollRef = useRefCallback((scroll) => {\n scrollRef.current?.removeEventListener(\"scroll\", handleScroll);\n scrollRef.current?.removeEventListener(\"wheel\", handleWheel);\n scroll?.addEventListener(\"scroll\", handleScroll, { passive: true });\n scroll?.addEventListener(\"wheel\", handleWheel, { passive: true });\n }, []);\n const contentRef = useRefCallback((content) => {\n state.resizeObserver?.disconnect();\n if (!content) {\n return;\n }\n let previousHeight;\n state.resizeObserver = new ResizeObserver(([entry]) => {\n const { height } = entry.contentRect;\n const difference = height - (previousHeight ?? height);\n state.resizeDifference = difference;\n /**\n * Sometimes the browser can overscroll past the target,\n * so check for this and adjust appropriately.\n */\n if (state.scrollTop > state.targetScrollTop) {\n state.scrollTop = state.targetScrollTop;\n }\n setIsNearBottom(state.isNearBottom);\n if (difference >= 0) {\n /**\n * If it's a positive resize, scroll to the bottom when\n * we're already at the bottom.\n */\n const animation = mergeAnimations(optionsRef.current, previousHeight\n ? optionsRef.current.resize\n : optionsRef.current.initial);\n scrollToBottom({\n animation,\n wait: true,\n preserveScrollPosition: true,\n duration: animation === \"instant\" ? undefined : RETAIN_ANIMATION_DURATION_MS,\n });\n }\n else {\n /**\n * Else if it's a negative resize, check if we're near the bottom\n * if we are want to un-escape from the lock, because the resize\n * could have caused the container to be at the bottom.\n */\n if (state.isNearBottom) {\n setEscapedFromLock(false);\n setIsAtBottom(true);\n }\n }\n previousHeight = height;\n /**\n * Reset the resize difference after the scroll event\n * has fired. Requires a rAF to wait for the scroll event,\n * and a setTimeout to wait for the other timeout we have in\n * resizeObserver in case the scroll event happens after the\n * resize event.\n */\n requestAnimationFrame(() => {\n setTimeout(() => {\n if (state.resizeDifference === difference) {\n state.resizeDifference = 0;\n }\n }, 1);\n });\n });\n state.resizeObserver?.observe(content);\n }, []);\n return {\n contentRef,\n scrollRef,\n scrollToBottom,\n stopScroll,\n isAtBottom: isAtBottom || isNearBottom,\n isNearBottom,\n escapedFromLock,\n state,\n };\n};\nfunction useRefCallback(callback, deps) {\n // biome-ignore lint/correctness/useExhaustiveDependencies: not needed\n const result = useCallback((ref) => {\n result.current = ref;\n return callback(ref);\n }, deps);\n return result;\n}\nconst animationCache = new Map();\nfunction mergeAnimations(...animations) {\n const result = { ...DEFAULT_SPRING_ANIMATION };\n let instant = false;\n for (const animation of animations) {\n if (animation === \"instant\") {\n instant = true;\n continue;\n }\n if (typeof animation !== \"object\") {\n continue;\n }\n instant = false;\n result.damping = animation.damping ?? result.damping;\n result.stiffness = animation.stiffness ?? result.stiffness;\n result.mass = animation.mass ?? result.mass;\n }\n const key = JSON.stringify(result);\n if (!animationCache.has(key)) {\n animationCache.set(key, Object.freeze(result));\n }\n return instant ? \"instant\" : animationCache.get(key);\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/*!---------------------------------------------------------------------------------------------\n * Copyright (c) StackBlitz. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport { createContext, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, } from \"react\";\nimport { useStickToBottom, } from \"./useStickToBottom.js\";\nconst StickToBottomContext = createContext(null);\nconst useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\nexport function StickToBottom({ instance, children, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }) {\n const customTargetScrollTop = useRef(null);\n const targetScrollTop = React.useCallback((target, elements) => {\n const get = context?.targetScrollTop ?? currentTargetScrollTop;\n return get?.(target, elements) ?? target;\n }, [currentTargetScrollTop]);\n const defaultInstance = useStickToBottom({\n mass,\n damping,\n stiffness,\n resize,\n initial,\n targetScrollTop,\n });\n const { scrollRef, contentRef, scrollToBottom, stopScroll, isAtBottom, escapedFromLock, state, } = instance ?? defaultInstance;\n const context = useMemo(() => ({\n scrollToBottom,\n stopScroll,\n scrollRef,\n isAtBottom,\n escapedFromLock,\n contentRef,\n state,\n get targetScrollTop() {\n return customTargetScrollTop.current;\n },\n set targetScrollTop(targetScrollTop) {\n customTargetScrollTop.current = targetScrollTop;\n },\n }), [\n scrollToBottom,\n isAtBottom,\n contentRef,\n scrollRef,\n stopScroll,\n escapedFromLock,\n state,\n ]);\n useImperativeHandle(contextRef, () => context, [context]);\n useIsomorphicLayoutEffect(() => {\n if (!scrollRef.current) {\n return;\n }\n if (getComputedStyle(scrollRef.current).overflow === \"visible\") {\n scrollRef.current.style.overflow = \"auto\";\n }\n }, []);\n return (_jsx(StickToBottomContext.Provider, { value: context, children: _jsx(\"div\", { ...props, children: typeof children === \"function\" ? children(context) : children }) }));\n}\n(function (StickToBottom) {\n function Content({ children, ...props }) {\n const context = useStickToBottomContext();\n return (_jsx(\"div\", { ref: context.scrollRef, style: {\n height: \"100%\",\n width: \"100%\",\n }, children: _jsx(\"div\", { ...props, ref: context.contentRef, children: typeof children === \"function\" ? children(context) : children }) }));\n }\n StickToBottom.Content = Content;\n})(StickToBottom || (StickToBottom = {}));\n/**\n * Use this hook inside a <StickToBottom> component to gain access to whether the component is at the bottom of the scrollable area.\n */\nexport function useStickToBottomContext() {\n const context = useContext(StickToBottomContext);\n if (!context) {\n throw new Error(\"use-stick-to-bottom component context must be used within a StickToBottom component\");\n }\n return context;\n}\n"],"names":["AlertCircle","createLucideIcon","cx","cy","r","key","x1","x2","y1","y2","ArrowLeft","d","Book","CheckCircle2","ChevronDown","Info","Loader2","MessageSquare","Pencil","RefreshCcw","XCircle","_extends","Object","assign","bind","n","e","arguments","length","t","hasOwnProperty","call","apply","clamp","value","min","max","Math","DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","props","triggerRef","React","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","map","Presence","present","PortalPrimitive","asChild","child","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","Slot","createSlot","RemoveScroll","as","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","param","titleWarningContext","MESSAGE","concat","document","getElementById","console","error","descriptionWarningContext","describedById","getAttribute","warn","ROOT_NAME","createAlertDialogContext","createAlertDialogScope","useDialogScope","AlertDialog","__scopeAlertDialog","alertDialogProps","dialogScope","AlertDialogTrigger","AlertDialogPortal","portalProps","AlertDialogOverlay","AlertDialogContentProvider","useAlertDialogContentContext","Slottable","createSlottable","AlertDialogContent","cancelRef","DialogPrimitive","preventScroll","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","actionProps","CANCEL_NAME","AlertDialogCancel","cancelProps","Root","Trigger","Portal","Overlay","Content","Action","Cancel","Title","Description","window","createElement","getter","mayWarn","presence","usePresence","initialState","machine","node","setNode","React2","stylesRef","prevPresentRef","prevAnimationNameRef","state","send","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","nextState","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","handleAnimationEnd","isCurrentAnimation","includes","CSS","escape","animationName","currentFillMode","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","only","getOwnPropertyDescriptor","element","get","isReactWarning","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","CollapsibleProvider","useCollapsibleContext","Collapsible","__scopeCollapsible","disabled","collapsibleProps","CollapsibleTrigger","originalEventHandler","ourEventHandler","checkForDefaultPrevented","CollapsibleContent","CollapsibleContentImpl","setIsPresent","heightRef","height","widthRef","width","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","requestAnimationFrame","cancelAnimationFrame","transitionDuration","rect","getBoundingClientRect","hidden","differenceInCalendarMonths","dateLeft","dateRight","_dateLeft","toDate","_dateRight","yearDiff","getFullYear","getMonth","endOfMonth","date","_date","month","setFullYear","setHours","compareAsc","diff","getTime","formatDistanceToNow","options","formatDistance","baseDate","method","months","defaultOptions","getDefaultOptions","locale","defaultLocale","comparison","isNaN","localizeOptions","addSuffix","seconds","getRoundingMethod","roundingMethod","result","round","trunc","number","minutes","getTimezoneOffsetInMilliseconds","offsetInSeconds","includeSeconds","minutesInDay","minutesInMonth","days","differenceInMonths","sign","difference","abs","getDate","setDate","setMonth","isLastMonthNotFull","isLastDayOfMonth","endOfDay","Number","nearestMonth","monthsSinceStartOfYear","years","constructFrom","Date","now","DEFAULT_SPRING_ANIMATION","damping","stiffness","mass","SIXTY_FPS_INTERVAL_MS","mouseDown","globalThis","useStickToBottom","escapedFromLock","updateEscapedFromLock","react","useState","isAtBottom","updateIsAtBottom","initial","isNearBottom","setIsNearBottom","optionsRef","useRef","isSelecting","useCallback","selection","getSelection","rangeCount","range","getRangeAt","commonAncestorContainer","scrollRef","setIsAtBottom","setEscapedFromLock","useMemo","lastCalculation","resizeDifference","accumulated","velocity","listeners","Set","scrollTop","ignoreScrollToTop","targetScrollTop","scrollHeight","clientHeight","calculatedTargetScrollTop","calculatedScrollTop","scrollElement","contentElement","undefined","scrollDifference","scrollToBottom","scrollOptions","durationElapsed","animation","preserveScrollPosition","waitElapsed","wait","behavior","mergeAnimations","ignoreEscapes","startTarget","duration","Promise","finally","next","promise","then","tick","performance","tickDelta","lastTick","resize","stopScroll","handleScroll","lastScrollTop","isScrollingDown","isScrollingUp","handleWheel","deltaY","overflow","parentElement","useRefCallback","scroll","passive","previousHeight","resizeObserver","disconnect","ResizeObserver","entry","contentRect","observe","callback","deps","animationCache","Map","animations","instant","JSON","stringify","has","set","freeze","StickToBottomContext","useIsomorphicLayoutEffect","useEffect","StickToBottom","instance","currentTargetScrollTop","contextRef","customTargetScrollTop","defaultInstance","elements","useImperativeHandle","jsx_runtime","Provider","useStickToBottomContext","useContext"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9953],{69953:function(e,s,i){i.d(s,{f:function(){return en},Z:function(){return er}});var l=i(57437),a=i(7211),n=i(12199),t=i(13590),r=i(99376),d=i(2265),c=i(29501),o=i(67119),m=i(18930),x=i(62869),h=i(26110),u=i(95186),v=i(26815),j=i(10492);function p(e){let{deleteAgent:s,deleteAgentResult:i,agent:a}=e,n="delete this agent",[t,r]=(0,d.useState)("");return(0,l.jsxs)(h.Vq,{children:[(0,l.jsx)(h.hg,{asChild:!0,children:(0,l.jsx)(x.z,{disabled:!(null==a?void 0:a.id),variant:"destructive",children:(0,l.jsx)(m.Z,{className:"size-4"})})}),(0,l.jsxs)(h.cZ,{className:"sm:max-w-[475px]",children:[(0,l.jsx)(h.fK,{children:(0,l.jsx)(h.$N,{children:"Delete this agent"})}),(0,l.jsx)("div",{className:"grid gap-4 py-4",children:(0,l.jsxs)("div",{className:"grid gap-2",children:[(0,l.jsxs)(v._,{htmlFor:"name",children:['Type "',n,'" to confirm']}),(0,l.jsx)(u.I,{onChange:e=>{r(e.target.value)},id:"name",autoFocus:!0})]})}),(0,l.jsx)(h.cN,{children:(0,l.jsxs)(x.z,{disabled:t!==n||i.loading,onClick:()=>{s({variables:{id:a.id}})},variant:"destructive",type:"submit",children:["Delete ",i.loading&&(0,l.jsx)(j.g,{})]})})]})]})}var g=i(27689),f=i(66070),N=i(15681),b=i(6512),y=i(1828),w=i(12339),C=i(76818),z=i(13832),k=i(35974),Z=i(77992);function A(){return(0,l.jsx)("svg",{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M3.5 12.5003C2.72343 12.5003 2.33515 12.5003 2.02886 12.3735C1.62048 12.2043 1.29602 11.8798 1.12687 11.4715C1 11.1652 1 10.7769 1 10.0003V4.33366C1 3.40024 1 2.93353 1.18166 2.57701C1.34144 2.2634 1.59641 2.00844 1.91002 1.84865C2.26654 1.66699 2.73325 1.66699 3.66667 1.66699H9.33333C10.1099 1.66699 10.4982 1.66699 10.8045 1.79386C11.2129 1.96302 11.5373 2.28747 11.7065 2.69585C11.8333 3.00214 11.8333 3.39042 11.8333 4.16699M9.5 18.3337H15C15.9334 18.3337 16.4001 18.3337 16.7567 18.152C17.0703 17.9922 17.3252 17.7372 17.485 17.4236C17.6667 17.0671 17.6667 16.6004 17.6667 15.667V10.167C17.6667 9.23357 17.6667 8.76686 17.485 8.41034C17.3252 8.09674 17.0703 7.84177 16.7567 7.68198C16.4001 7.50033 15.9334 7.50033 15 7.50033H9.5C8.56658 7.50033 8.09987 7.50033 7.74335 7.68198C7.42975 7.84177 7.17478 8.09674 7.01499 8.41034C6.83333 8.76686 6.83333 9.23357 6.83333 10.167V15.667C6.83333 16.6004 6.83333 17.0671 7.01499 17.4236C7.17478 17.7372 7.42975 17.9922 7.74335 18.152C8.09987 18.3337 8.56658 18.3337 9.5 18.3337Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var S=i(53647),F=i(57054),_=i(23518),I=i(24156),D=i(30401),O=i(49137),R=i(53113),T=i(48736),M=i(81706),P=i(29374),J=i(99397),E=i(73247),V=i(32489),B=i(22252),G=i(98728),q=i(33245),Y=i(94508),L=i(8014),U=i(74928),W=i(81103),K=i(69304),Q=i(78361),X=i(92279),H=i(44045),$=i(68656),ee=i(76367),es=i(35283),ei=i(12194),el=i(35629);let ea=["marketing","sales","finance","hr","coding","support","research","knowledge","product"],en=e=>{let{configItem:s,currentValue:i,variables:a,onVariableSelect:n}=e,[t,r]=d.useState(!1),c=a.find(e=>e.name===i);return(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"text-sm",children:[(0,l.jsx)("div",{className:"font-medium capitalize",children:s.name}),(0,l.jsx)("div",{className:"text-muted-foreground text-xs capitalize",children:s.description})]}),(0,l.jsxs)(F.J2,{open:t,onOpenChange:r,modal:!0,children:[(0,l.jsx)(F.xo,{asChild:!0,children:(0,l.jsxs)(x.z,{variant:"outline",role:"combobox","aria-expanded":t,className:"w-full justify-between text-sm",children:[c?c.name:"Select variable...",(0,l.jsx)(I.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,l.jsx)(F.yk,{className:"w-full p-0",children:(0,l.jsxs)(_.mY,{children:[(0,l.jsx)(_.sZ,{placeholder:"Search variables..."}),(0,l.jsxs)(_.e8,{children:[(0,l.jsx)(_.rb,{children:"No variables found."}),(0,l.jsx)(_.fu,{children:a.map(e=>(0,l.jsxs)(_.di,{onSelect:()=>{n(e.name),console.log("variable",e),r(!1)},children:[(0,l.jsx)(D.Z,{className:(0,Y.cn)("mr-2 h-4 w-4",i===e.name?"opacity-100":"opacity-0")}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{children:e.name}),e.encrypted&&(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"\uD83D\uDD12 Encrypted"})]})]},e.id))})]})]})}),s.default&&(0,l.jsxs)(f.Zb,{children:[(0,l.jsx)(f.Ol,{children:(0,l.jsx)(f.ll,{className:"text-md",children:"Default value"})}),(0,l.jsx)(f.aY,{children:(0,l.jsx)($.J,{text:s.default,sliceLength:200})})]})]})]})},et=o.Ry({name:o.Z_().min(2,{message:"Agent name must be at least 2 characters."}).max(300,{message:"Agent name must not be longer than 300 characters."}),category:o.Z_().optional(),description:o.Z_().max(1e4,{message:"Agent description must not be longer than 10.000 characters."}).nullable().optional(),instructions:o.Z_().max(4e4,{message:"Agent instructions must not be longer than 40.000 characters."}).nullable().optional(),id:o.Z_().or(o.Rx()).nullable().optional(),active:o.Yj(),providerapikey:o.Z_().nullable().optional(),firewall:o.Ry({enabled:o.O7().optional(),scanners:o.Ry({promptGuard:o.O7().optional(),codeShield:o.O7().optional(),agentAlignment:o.O7().optional(),hiddenAscii:o.O7().optional(),piiDetection:o.O7().optional()}).optional()}).optional()});function er(e){var s,i,o,m,h,v,$,er,ed,ec,eo,em,ex,eh,eu,ev,ej,ep,eg,ef,eN,eb,ey,ew,eC,ez,ek,eZ,eA,eS,eF,e_,eI,eD,eO,eR,eT,eM,eP,eJ,eE;let{agent:eV,refetch:eB}=e,eG=(0,r.useRouter)(),{user:eq}=(0,d.useContext)(z.S),eY=(0,d.useContext)(H.E),[eL,eU]=(0,d.useState)(eV.tools?eV.tools:[]),[eW,eK]=(0,d.useState)(!1),[eQ,eX]=(0,d.useState)(""),[eH,e$]=(0,d.useState)("all"),[e0,e1]=(0,d.useState)(""),[e2,e3]=(0,d.useState)(new Set),[e4,e7]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=setTimeout(()=>{e1(eQ)},300);return()=>clearTimeout(e)},[eQ]);let[e6,e5]=(0,d.useState)(eV.providerapikey||""),[e9,e8]=(0,d.useState)((null===(s=eV.firewall)||void 0===s?void 0:s.enabled)||!1),[se,ss]=(0,d.useState)(eV.animation_idle||""),[si,sl]=(0,d.useState)(eV.animation_responding||""),[sa,sn]=(0,d.useState)({rights_mode:eV.rights_mode,users:null===(i=eV.RBAC)||void 0===i?void 0:i.users,roles:null===(o=eV.RBAC)||void 0===o?void 0:o.roles,projects:null===(m=eV.RBAC)||void 0===m?void 0:m.projects}),[st,sr]=(0,d.useState)({promptGuard:(null===(v=eV.firewall)||void 0===v?void 0:null===(h=v.scanners)||void 0===h?void 0:h.promptGuard)||!1,codeShield:(null===(er=eV.firewall)||void 0===er?void 0:null===($=er.scanners)||void 0===$?void 0:$.codeShield)||!1,agentAlignment:(null===(ec=eV.firewall)||void 0===ec?void 0:null===(ed=ec.scanners)||void 0===ed?void 0:ed.agentAlignment)||!1,hiddenAscii:(null===(em=eV.firewall)||void 0===em?void 0:null===(eo=em.scanners)||void 0===eo?void 0:eo.hiddenAscii)||!1,piiDetection:(null===(eh=eV.firewall)||void 0===eh?void 0:null===(ex=eh.scanners)||void 0===ex?void 0:ex.piiDetection)||!1}),{toast:sd}=(0,Z.pm)(),sc=(0,d.useMemo)(()=>({search:e0||void 0,category:"all"===eH?void 0:eH,limit:100,page:0}),[e0,eH]),{data:so,loading:sm}=(0,a.aM)(g.Ul,{variables:sc}),{data:sx}=(0,a.aM)(g.Az,{variables:{page:1,limit:100}}),{data:sh}=(0,a.aM)(g.Tp),su=(null==sx?void 0:null===(eu=sx.variablesPagination)||void 0===eu?void 0:eu.items)||[],{data:sv,loading:sj,refetch:sp}=(0,ei.Sh)({page:1,limit:100,filters:[{assigned_agents:{contains:eV.id}}]}),sg=(null==sv?void 0:null===(ev=sv.prompt_libraryPagination)||void 0===ev?void 0:ev.items)||[],sf=(0,d.useMemo)(()=>{var e,s;return(null==so?void 0:null===(s=so.tools)||void 0===s?void 0:null===(e=s.items)||void 0===e?void 0:e.filter(e=>e.id!==eV.id))||[]},[null==so?void 0:null===(ej=so.tools)||void 0===ej?void 0:ej.items,eV.id]),sN=(0,d.useMemo)(()=>sf.reduce((e,s)=>(e[s.category]||(e[s.category]=[]),e[s.category].push(s),e),{}),[sf]),sb=(null==sh?void 0:sh.toolCategories)||[];(0,d.useEffect)(()=>{sb.length>0&&e3(new Set(Object.keys(sN)))},[sN]);let sy=()=>{eX(""),e$("all")},sw=e=>{e3(s=>{let i=new Set(s);return i.has(e)?i.delete(e):i.add(e),i})},sC=async()=>{try{await navigator.clipboard.writeText(eV.id),sd({title:"Agent ID copied to clipboard"})}catch(e){sd({title:"Failed to copy Agent ID",variant:"destructive"})}},[sz,sk]=(0,n.D)(g.fG,{onCompleted:()=>{eG.push("/agents",{scroll:!1})}}),[sZ,sA]=(0,n.D)(g.Dt,{refetchQueries:[g.as,"GetAgentById"]}),sS=(0,c.cI)({resolver:(0,t.F)(et),defaultValues:null!=eV?eV:{name:"New agent",instructions:"",steps:[],firewall:{enabled:!1,scanners:{promptGuard:!1,codeShield:!1,agentAlignment:!1,hiddenAscii:!1,piiDetection:!1}}},mode:"onChange"}),[sF]=(0,n.D)(g.fB);return(0,l.jsxs)("div",{className:"h-full flex-col md:flex",children:[(0,l.jsx)("div",{className:"container flex flex-col items-start justify-between space-y-2 py-4 sm:flex-row sm:items-center sm:space-y-0 md:h-16",children:(0,l.jsxs)("div",{className:"ml-auto flex w-full space-x-2 sm:justify-end",children:[(null==eV?void 0:eV.id)&&(0,l.jsxs)(x.z,{onClick:sS.handleSubmit(async e=>{console.log("data",e),sZ({variables:{id:e.id,name:e.name,description:e.description,instructions:e.instructions,category:e.category,active:e.active,providerapikey:e6,animation_idle:se,animation_responding:si,rights_mode:sa.rights_mode,RBAC:{users:sa.users||[],roles:sa.roles||[],projects:sa.projects||[]},firewall:JSON.stringify({enabled:e9,scanners:st}),tools:JSON.stringify(eL)}}),eB()},e=>{console.error("form data invalid",e)}),disabled:sA.loading,variant:"secondary",type:"submit",children:["Save ",sA.loading&&(0,l.jsx)(j.g,{className:"ml-2"})]}),(0,l.jsx)(x.z,{onClick:()=>{eG.push("/agents",{scroll:!1})},variant:"secondary",type:"button",children:"Back"}),(0,l.jsx)(p,{agent:eV,deleteAgent:sz,deleteAgentResult:sk})]})}),(0,l.jsx)(b.Z,{}),(0,l.jsx)(w.mQ,{defaultValue:"complete",className:"flex-1",children:(0,l.jsx)("div",{className:"container py-6",children:(0,l.jsx)("div",{className:"grid items-stretch gap-6",children:(0,l.jsx)("div",{className:"md:order-1",children:(0,l.jsx)("div",{className:"flex flex-col space-y-4",children:(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(N.l0,{...sS,children:(0,l.jsx)("form",{className:"space-y-8",children:(0,l.jsxs)("div",{className:"grid grid-rows-1 grid-flow-col gap-6 lg:grid-cols-2",children:[(0,l.jsx)("div",{className:"col",children:(0,l.jsx)("div",{className:"flex flex-col space-y-4",children:(0,l.jsx)("div",{className:"flex flex-col space-y-2",children:(0,l.jsxs)(f.Zb,{children:[(0,l.jsx)(f.Ol,{children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[eV.image&&(0,l.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden flex-shrink-0",children:(0,l.jsx)("img",{src:eV.image,alt:"".concat(eV.name," profile"),className:"w-full h-full object-cover"})}),(0,l.jsx)(f.ll,{children:"Agent"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,l.jsxs)("span",{children:["ID: ",eV.id]}),(0,l.jsx)("button",{type:"button",onClick:sC,className:"p-1 hover:bg-muted rounded transition-colors text-muted-foreground",title:"Copy Agent ID",children:(0,l.jsx)(A,{})})]})]})}),(0,l.jsxs)(f.aY,{className:"grid gap-4",children:[(0,l.jsx)(N.Wi,{control:sS.control,name:"name",render:e=>{let{field:s}=e;return(0,l.jsxs)(N.xJ,{children:[(0,l.jsx)(N.lX,{children:"Name"}),(0,l.jsx)(N.NI,{children:(0,l.jsx)(u.I,{type:"text",className:"resize-none",...s})}),(0,l.jsx)(N.zG,{})]})}}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium mb-2",children:"Modalities"}),(0,l.jsxs)("p",{className:"text-sm text-muted-foreground mb-2",children:["This agent uses ",(0,l.jsx)("b",{children:eV.modelName})," from ",(0,l.jsx)("b",{children:eV.providerName})," and can use the following capabilities:"]}),(0,l.jsx)(W.pn,{children:(0,l.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[(0,l.jsx)("div",{className:"p-2 rounded-md ".concat((null===(ep=eV.capabilities)||void 0===ep?void 0:ep.text)?"bg-primary text-primary-foreground":"bg-gray-500 text-white"),children:(0,l.jsx)(O.Z,{className:"h-4 w-4"})}),(0,l.jsxs)(W.u,{children:[(0,l.jsx)(W.aJ,{asChild:!0,children:(0,l.jsx)("div",{className:"p-2 rounded-md ".concat((null===(ef=eV.capabilities)||void 0===ef?void 0:null===(eg=ef.images)||void 0===eg?void 0:eg.length)?"bg-primary text-primary-foreground":"bg-gray-500 text-white"),children:(0,l.jsx)(R.Z,{className:"h-4 w-4"})})}),(0,l.jsx)(W._v,{children:(0,l.jsxs)("p",{children:["Images: ",(null===(eb=eV.capabilities)||void 0===eb?void 0:null===(eN=eb.images)||void 0===eN?void 0:eN.length)?eV.capabilities.images.join(", "):"None"]})})]}),(0,l.jsxs)(W.u,{children:[(0,l.jsx)(W.aJ,{asChild:!0,children:(0,l.jsx)("div",{className:"p-2 rounded-md ".concat((null===(ew=eV.capabilities)||void 0===ew?void 0:null===(ey=ew.files)||void 0===ey?void 0:ey.length)?"bg-primary text-primary-foreground":"bg-gray-500 text-white"),children:(0,l.jsx)(T.Z,{className:"h-4 w-4"})})}),(0,l.jsx)(W._v,{children:(0,l.jsxs)("p",{children:["Files: ",(null===(ez=eV.capabilities)||void 0===ez?void 0:null===(eC=ez.files)||void 0===eC?void 0:eC.length)?eV.capabilities.files.join(", "):"None"]})})]}),(0,l.jsxs)(W.u,{children:[(0,l.jsx)(W.aJ,{asChild:!0,children:(0,l.jsx)("div",{className:"p-2 rounded-md ".concat((null===(eZ=eV.capabilities)||void 0===eZ?void 0:null===(ek=eZ.audio)||void 0===ek?void 0:ek.length)?"bg-primary text-primary-foreground":"bg-gray-500 text-white"),children:(0,l.jsx)(M.Z,{className:"h-4 w-4"})})}),(0,l.jsx)(W._v,{children:(0,l.jsxs)("p",{children:["Audio: ",(null===(eS=eV.capabilities)||void 0===eS?void 0:null===(eA=eS.audio)||void 0===eA?void 0:eA.length)?eV.capabilities.audio.join(", "):"None"]})})]}),(0,l.jsxs)(W.u,{children:[(0,l.jsx)(W.aJ,{asChild:!0,children:(0,l.jsx)("div",{className:"p-2 rounded-md ".concat((null===(e_=eV.capabilities)||void 0===e_?void 0:null===(eF=e_.video)||void 0===eF?void 0:eF.length)?"bg-primary text-primary-foreground":"bg-gray-500 text-white"),children:(0,l.jsx)(P.Z,{className:"h-4 w-4"})})}),(0,l.jsx)(W._v,{children:(0,l.jsxs)("p",{children:["Video: ",(null===(eD=eV.capabilities)||void 0===eD?void 0:null===(eI=eD.video)||void 0===eI?void 0:eI.length)?eV.capabilities.video.join(", "):"None"]})})]})]})})]}),(0,l.jsx)(N.Wi,{control:sS.control,name:"category",render:e=>{let{field:s}=e;return s.value||(s.value=""),(0,l.jsxs)(N.xJ,{children:[(0,l.jsx)(N.lX,{children:"Category"}),(0,l.jsx)(N.NI,{children:(0,l.jsxs)(S.Ph,{onValueChange:e=>{s.onChange(e)},children:[(0,l.jsx)(S.i4,{children:(0,l.jsx)(S.ki,{className:"capitalize",placeholder:s.value||"Select a category"})}),(0,l.jsx)(S.Bw,{children:ea.map(e=>(0,l.jsx)(S.Ql,{className:"capitalize",value:e,children:e},e))})]})}),(0,l.jsx)(N.zG,{})]})}}),(0,l.jsx)(N.Wi,{control:sS.control,name:"description",render:e=>{var s;let{field:i}=e;return i.value||(i.value=""),(0,l.jsxs)(N.xJ,{children:[(0,l.jsx)(N.lX,{children:"Description"}),(0,l.jsx)(N.NI,{children:(0,l.jsx)(C.g,{rows:2,className:"resize-none",...i,value:null!==(s=i.value)&&void 0!==s?s:""})}),(0,l.jsx)(N.zG,{})]})}}),(0,l.jsx)(N.Wi,{control:sS.control,name:"instructions",render:e=>{var s;let{field:i}=e;return i.value||(i.value=""),(0,l.jsxs)(N.xJ,{children:[(0,l.jsx)(N.lX,{children:"Instructions"}),(0,l.jsx)(N.NI,{children:(0,l.jsx)(C.g,{rows:5,className:"resize-none",...i,value:null!==(s=i.value)&&void 0!==s?s:""})}),(0,l.jsx)(N.zG,{})]})}}),(0,l.jsxs)("div",{className:"space-y-2 w-full overflow-x-hidden",children:[(0,l.jsxs)("div",{className:"text-sm",children:[(0,l.jsx)("div",{className:"font-medium",children:"Provider API Key"}),(0,l.jsx)("div",{className:"text-muted-foreground text-xs",children:"Select a variable containing the API key for the provider"}),eV.authenticationInformation&&(0,l.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,l.jsx)(el.H,{children:eV.authenticationInformation})})]}),(0,l.jsxs)(F.J2,{children:[(0,l.jsx)(F.xo,{asChild:!0,children:(0,l.jsxs)(x.z,{variant:"outline",role:"combobox",className:"w-full justify-between text-sm",children:[(null===(eO=su.find(e=>e.name===e6))||void 0===eO?void 0:eO.name)||"Select variable...",(0,l.jsx)(I.Z,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,l.jsx)(F.yk,{className:"w-full p-0 z-[9999]",children:(0,l.jsxs)(_.mY,{children:[(0,l.jsx)(_.sZ,{placeholder:"Search variables..."}),(0,l.jsxs)(_.e8,{children:[(0,l.jsx)(_.rb,{children:"No variables found."}),(0,l.jsx)(_.fu,{children:su.map(e=>(0,l.jsxs)(_.di,{onSelect:()=>{e5(e.name)},children:[(0,l.jsx)(D.Z,{className:(0,Y.cn)("mr-2 h-4 w-4",e6===e.name?"opacity-100":"opacity-0")}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{children:e.name}),e.encrypted&&(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"\uD83D\uDD12 Encrypted"})]})]},e.id))})]})]})})]})]}),(null==eY?void 0:null===(eR=eY.fileUploads)||void 0===eR?void 0:eR.s3endpoint)&&(0,l.jsx)(f.Zb,{className:"bg-transparent",children:(0,l.jsxs)(U.zF,{children:[(0,l.jsx)(f.Ol,{className:"p-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("p",{className:"text-base",children:"Custom visualizations"}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground mb-0",children:"Upload custom Lottie animations for idle and responding states."})]}),(0,l.jsx)(U.wy,{asChild:!0,children:(0,l.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[(0,l.jsx)(I.Z,{className:"size-4"}),(0,l.jsx)("span",{className:"sr-only",children:"Toggle"})]})})]})}),(0,l.jsx)(U.Fw,{className:"mt-5",children:(0,l.jsx)(f.aY,{className:"space-y-4",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium",children:"Idle Animation"}),(0,l.jsx)("div",{className:"text-xs text-muted-foreground",children:"Animation when agent is waiting"})]}),(0,l.jsxs)(Q.jF,{s3key:se,children:[(0,l.jsx)(Q.ZP,{id:"agent-idle-animation",allowedFileTypes:[".json"],selectionLimit:1,buttonText:"",dependencies:[eV.id],onConfirm:e=>{e.length>0&&ss(e[0])}}),se&&(0,l.jsxs)("div",{className:"mt-2 p-2 border rounded bg-muted/30",children:[(0,l.jsx)("div",{className:"text-xs text-muted-foreground mb-1",children:"Preview:"}),(0,l.jsx)("div",{className:"w-12 h-12 mx-auto",children:(0,l.jsx)(X.Z,{agent:{...eV,animation_idle:se},status:"ready"})})]})]})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium",children:"Responding Animation"}),(0,l.jsx)("div",{className:"text-xs text-muted-foreground",children:"Animation when agent is responding"})]}),(0,l.jsxs)(Q.jF,{s3key:si,children:[(0,l.jsx)(Q.ZP,{id:"agent-responding-animation",allowedFileTypes:[".json"],selectionLimit:1,buttonText:"",dependencies:[eV.id],onConfirm:e=>{e.length>0&&sl(e[0])}}),si&&(0,l.jsxs)("div",{className:"mt-2 p-2 border rounded bg-muted/30",children:[(0,l.jsx)("div",{className:"text-xs text-muted-foreground mb-1",children:"Preview:"}),(0,l.jsx)("div",{className:"w-12 h-12 mx-auto",children:(0,l.jsx)(X.Z,{agent:{...eV,animation_responding:si},status:"streaming"})})]})]})]})]})})})]})}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-sm font-medium mb-0",children:" You can test this agent using the Exulu UI without activating the agent if you are a super admin:"}),(0,l.jsx)(x.z,{className:"mt-0",onClick:async()=>{var e,s,i;console.log("agent",eV);let l=await sF({variables:{title:"New session",user:eq.id,agent:eV.id}});console.log("result",l);let a=null==l?void 0:null===(i=l.data)||void 0===i?void 0:null===(s=i.agent_sessionsCreateOne)||void 0===s?void 0:null===(e=s.item)||void 0===e?void 0:e.id;eG.push("/chat/".concat(eV.id,"/").concat(a))},type:"button",variant:"default",children:"Go to chat"})]})]})]})})})}),(0,l.jsx)("div",{className:"col",children:(0,l.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,l.jsx)(N.Wi,{control:sS.control,name:"active",render:e=>{let{field:s}=e;return(0,l.jsxs)(N.xJ,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[(0,l.jsxs)("div",{className:"space-y-0.5",children:[(0,l.jsx)(N.lX,{className:"text-base",children:"Is this agent active?"}),(0,l.jsx)(N.pf,{children:"When active this agent will be available via the Exulu UI and API endpoint."})]}),(0,l.jsx)(N.NI,{children:(0,l.jsx)(y.r,{checked:s.value,onCheckedChange:s.onChange})})]})}}),(0,l.jsx)(f.Zb,{className:"bg-transparent",children:(0,l.jsxs)(U.zF,{children:[(0,l.jsx)(f.Ol,{className:"p-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("p",{className:"text-base",children:"Access Control"}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground mb-0",children:"Control access to this agent."})]}),(0,l.jsx)(U.wy,{asChild:!0,children:(0,l.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[(0,l.jsx)(I.Z,{className:"size-4"}),(0,l.jsx)("span",{className:"sr-only",children:"Toggle"})]})})]})}),(0,l.jsx)(U.Fw,{className:"mt-5",children:(0,l.jsx)(f.aY,{className:"space-y-4",children:(0,l.jsx)(L.P,{initialRightsMode:eV.rights_mode,initialUsers:null===(eT=eV.RBAC)||void 0===eT?void 0:eT.users,initialRoles:null===(eM=eV.RBAC)||void 0===eM?void 0:eM.roles,initialProjects:null===(eP=eV.RBAC)||void 0===eP?void 0:eP.projects,onChange:(e,s,i,l)=>{sn({rights_mode:e,users:s,roles:i,projects:l})}})})})]})}),(0,l.jsx)(f.Zb,{className:"bg-transparent",children:(0,l.jsxs)(U.zF,{children:[(0,l.jsx)(f.Ol,{className:"p-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("p",{className:"text-base",children:"Prompt Templates"}),(0,l.jsxs)("p",{className:"text-sm text-muted-foreground mb-0",children:["Manage prompt templates assigned to this agent (",sg.length,")"]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(x.z,{type:"button",variant:"outline",size:"sm",onClick:()=>e7(!0),children:[(0,l.jsx)(J.Z,{className:"h-4 w-4 mr-2"}),"New Prompt"]}),(0,l.jsx)(U.wy,{asChild:!0,children:(0,l.jsxs)(x.z,{variant:"ghost",size:"icon",className:"size-8",children:[(0,l.jsx)(I.Z,{className:"size-4"}),(0,l.jsx)("span",{className:"sr-only",children:"Toggle"})]})})]})]})}),(0,l.jsx)(U.Fw,{className:"mt-5",children:(0,l.jsx)(f.aY,{className:"space-y-4",children:sj?(0,l.jsx)("div",{className:"text-sm text-muted-foreground",children:"Loading prompts..."}):0===sg.length?(0,l.jsxs)("div",{className:"text-center py-6 border-2 border-dashed rounded-lg",children:[(0,l.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"No prompts assigned to this agent yet"}),(0,l.jsxs)(x.z,{type:"button",variant:"outline",size:"sm",onClick:()=>e7(!0),children:[(0,l.jsx)(J.Z,{className:"h-4 w-4 mr-2"}),"Create First Prompt"]})]}):(0,l.jsx)("div",{className:"grid gap-4",children:sg.map(e=>(0,l.jsx)(ee.$,{prompt:e,user:eq,onUpdate:sp},e.id))})})})]})}),(0,l.jsxs)(f.Zb,{children:[(0,l.jsxs)(f.Ol,{children:[(0,l.jsxs)(f.ll,{className:"flex items-center gap-2",children:["Tools",sm&&(0,l.jsx)(j.g,{className:"h-4 w-4"})]}),(0,l.jsx)(f.SZ,{children:eL.length>0?"".concat(eL.length," tool").concat(1===eL.length?"":"s"," enabled for this agent"):"No tools enabled for this agent"})]}),(0,l.jsx)(f.aY,{children:(0,l.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsxs)("div",{className:"relative flex-1",children:[(0,l.jsx)(E.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,l.jsx)(u.I,{placeholder:"Search tools by name or description...",value:eQ,onChange:e=>eX(e.target.value),className:"pl-10 pr-10"}),eQ&&(0,l.jsx)(x.z,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0",onClick:()=>eX(""),children:(0,l.jsx)(V.Z,{className:"h-3 w-3"})})]})}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(S.Ph,{value:eH,onValueChange:e$,children:[(0,l.jsx)(S.i4,{className:"w-[200px]",children:(0,l.jsx)(S.ki,{placeholder:"Filter by category"})}),(0,l.jsxs)(S.Bw,{children:[(0,l.jsx)(S.Ql,{value:"all",children:"All categories"}),sb.map(e=>(0,l.jsx)(S.Ql,{value:e,className:"capitalize",children:e},e))]})]}),(eQ||"all"!==eH)&&(0,l.jsxs)(x.z,{variant:"outline",onClick:sy,children:[(0,l.jsx)(V.Z,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"sr-only",children:"Clear filters"})]}),(0,l.jsx)(x.z,{type:"button",variant:"outline",onClick:()=>{e3(new Set)},children:"Expand all"}),(0,l.jsx)(x.z,{type:"button",variant:"outline",onClick:()=>{e3(new Set(Object.keys(sN)))},children:"Collapse all"})]}),(0,l.jsxs)("div",{className:"ml-auto text-sm text-muted-foreground",children:[(null==so?void 0:null===(eJ=so.tools)||void 0===eJ?void 0:eJ.total)||0," tool",1!==((null==so?void 0:null===(eE=so.tools)||void 0===eE?void 0:eE.total)||0)?"s":"",e0||"all"!==eH?" found":" available","."]})]}),(0,l.jsxs)("div",{className:"space-y-6",children:["all"===eH?Object.entries(sN).map(e=>{let[s,i]=e,a=i.filter(e=>eL.some(s=>s.id===e.id)).length,n=e2.has(s);return(0,l.jsxs)(U.zF,{open:!n,onOpenChange:()=>sw(s),children:[(0,l.jsxs)("div",{className:"flex items-center justify-between p-3 border rounded-lg bg-muted/30",children:[(0,l.jsx)(U.wy,{asChild:!0,children:(0,l.jsxs)(x.z,{variant:"ghost",className:"flex items-center gap-2 p-0 h-auto font-medium",children:[(0,l.jsx)(I.Z,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"capitalize",children:s}),(0,l.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[a,"/",i.length]})]})}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>{let e=i.filter(e=>!eL.some(s=>s.id===e.id)).map(e=>{var s;return{id:e.id,type:e.type,config:(null===(s=e.config)||void 0===s?void 0:s.map(e=>({name:e.name,variable:""})))||[]}});eU([...eL,...e])},disabled:a===i.length,children:"Enable All"}),(0,l.jsx)(x.z,{variant:"outline",size:"sm",onClick:()=>{let e=i.map(e=>e.id);eU(eL.filter(s=>!e.includes(s.id)))},disabled:0===a,children:"Disable All"})]})]}),(0,l.jsx)(U.Fw,{className:"mt-2",children:(0,l.jsx)("div",{className:"space-y-2 pl-4",children:i.map(e=>{var s,i;let a=eL.some(s=>s.id===e.id),n=eL.find(s=>s.id===e.id),t=(null===(s=e.config)||void 0===s?void 0:s.length)||0,r=(null==n?void 0:null===(i=n.config)||void 0===i?void 0:i.filter(e=>e.variable&&""!==e.variable.trim()).length)||0,d=a&&t>0&&r<t;return(0,l.jsx)("div",{className:"rounded-lg border p-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"font-medium",children:null==e?void 0:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[t>0&&a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[r,"/",t]}),d&&(0,l.jsx)(B.Z,{className:"h-4 w-4 text-destructive"})]}),(0,l.jsx)(k.C,{variant:"outline",children:null==e?void 0:e.category})]})]}),(0,l.jsx)("div",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:null==e?void 0:e.description})]}),(0,l.jsxs)(K.yo,{open:eW===e.id,onOpenChange:()=>{eW===e.id?eK(!1):eK(e.id)},children:[t>0&&!a?(0,l.jsx)(K.aM,{asChild:!0,children:(0,l.jsx)(x.z,{variant:"ghost",size:"sm",children:(0,l.jsx)(G.Z,{className:"h-4 w-4"})})}):(0,l.jsx)(x.z,{type:"button",disabled:!0,variant:"ghost",size:"sm",children:(0,l.jsx)(G.Z,{className:"h-4 w-4"})}),(0,l.jsx)(K.aM,{asChild:!0,children:(0,l.jsx)(x.z,{className:"mr-2",variant:"ghost",size:"sm",children:(0,l.jsx)(q.Z,{className:"h-4 w-4"})})}),(0,l.jsxs)(K.ue,{className:"w-[400px] sm:w-[540px]",children:[(0,l.jsxs)(K.Tu,{children:[(0,l.jsx)(K.bC,{children:null==e?void 0:e.name}),(0,l.jsx)(K.Ei,{children:null==e?void 0:e.description})]}),(0,l.jsx)("div",{className:"py-6",children:(0,l.jsx)("div",{className:"space-y-4",children:e.config&&e.config.length>0&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)("div",{className:"text-md font-medium",children:"Configuration variables:"}),e.config.map((s,i)=>{var t;let r=(null==n?void 0:null===(t=n.config.find(e=>e.name===s.name))||void 0===t?void 0:t.variable)||"";return(0,l.jsx)("div",{className:"space-y-2",children:a?(0,l.jsx)(en,{configItem:s,currentValue:r,variables:su,onVariableSelect:i=>{let l=eL.map(l=>l.id===e.id?{...l,config:l.config.map(e=>e.name===s.name?{...e,variable:i}:e)}:l);console.log("updated",l),eU(l)}}):(0,l.jsx)("div",{className:"text-xs text-muted-foreground p-2 bg-muted rounded",children:"Enable this tool to configure"})},i)})]})})})]})]})]}),(0,l.jsx)(y.r,{checked:a,onCheckedChange:s=>{let i=[...eL];if(s){var l,a;i=[...eL,{id:e.id,type:e.type,config:(null===(l=e.config)||void 0===l?void 0:l.map(e=>({name:e.name,variable:""})))||[]}],(null===(a=e.config)||void 0===a?void 0:a.length)>0&&eK(e.id)}else i=eL.filter(s=>s.id!==e.id);eU(i)}})]})},null==e?void 0:e.id)})})})]},s)}):(0,l.jsx)("div",{className:"space-y-2",children:sf.map(e=>{var s,i;let a=eL.some(s=>s.id===e.id),n=eL.find(s=>s.id===e.id),t=(null===(s=e.config)||void 0===s?void 0:s.length)||0,r=(null==n?void 0:null===(i=n.config)||void 0===i?void 0:i.filter(e=>e.variable&&""!==e.variable.trim()).length)||0,d=a&&t>0&&r<t;return(0,l.jsx)("div",{className:"rounded-lg border p-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"font-medium",children:null==e?void 0:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[t>0&&a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(k.C,{variant:"secondary",className:"text-xs",children:[r,"/",t]}),d&&(0,l.jsx)(B.Z,{className:"h-4 w-4 text-destructive"})]}),(0,l.jsx)(k.C,{variant:"outline",children:null==e?void 0:e.category})]})]}),(0,l.jsx)("div",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:null==e?void 0:e.description})]}),(0,l.jsxs)(K.yo,{open:eW===e.id,onOpenChange:()=>{eW===e.id?eK(!1):eK(e.id)},children:[t>0&&!a?(0,l.jsx)(K.aM,{asChild:!0,children:(0,l.jsx)(x.z,{variant:"ghost",size:"sm",children:(0,l.jsx)(G.Z,{className:"h-4 w-4"})})}):(0,l.jsx)(x.z,{type:"button",disabled:!0,variant:"ghost",size:"sm",children:(0,l.jsx)(G.Z,{className:"h-4 w-4"})}),(0,l.jsx)(K.aM,{asChild:!0,children:(0,l.jsx)(x.z,{className:"mr-2",variant:"ghost",size:"sm",children:(0,l.jsx)(q.Z,{className:"h-4 w-4"})})}),(0,l.jsxs)(K.ue,{className:"w-[400px] sm:w-[540px]",children:[(0,l.jsxs)(K.Tu,{children:[(0,l.jsx)(K.bC,{children:null==e?void 0:e.name}),(0,l.jsx)(K.Ei,{children:null==e?void 0:e.description})]}),(0,l.jsx)("div",{className:"py-6",children:(0,l.jsx)("div",{className:"space-y-4",children:e.config&&e.config.length>0&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)("div",{className:"text-md font-medium",children:"Configuration variables:"}),e.config.map((s,i)=>{var t;let r=(null==n?void 0:null===(t=n.config.find(e=>e.name===s.name))||void 0===t?void 0:t.variable)||"";return(0,l.jsx)("div",{className:"space-y-2",children:a?(0,l.jsx)(en,{configItem:s,currentValue:r,variables:su,onVariableSelect:i=>{let l=eL.map(l=>l.id===e.id?{...l,config:l.config.map(e=>e.name===s.name?{...e,variable:i}:e)}:l);console.log("updated",l),eU(l)}}):(0,l.jsx)("div",{className:"text-xs text-muted-foreground p-2 bg-muted rounded",children:"Enable this tool to configure"})},i)})]})})})]})]})]}),(0,l.jsx)(y.r,{checked:a,onCheckedChange:s=>{let i=[...eL];if(s){var l,a;i=[...eL,{id:e.id,type:e.type,config:(null===(l=e.config)||void 0===l?void 0:l.map(e=>({name:e.name,variable:""})))||[]}],(null===(a=e.config)||void 0===a?void 0:a.length)>0&&eK(e.id)}else i=eL.filter(s=>s.id!==e.id);eU(i)}})]})},null==e?void 0:e.id)})}),0===sf.length&&(eQ||"all"!==eH)&&(0,l.jsxs)("div",{className:"text-center py-8",children:[(0,l.jsx)("div",{className:"text-muted-foreground",children:"No tools found matching your criteria."}),(0,l.jsx)(x.z,{variant:"outline",size:"sm",className:"mt-2",onClick:sy,children:"Clear filters"})]})]})]})})]})]})})]})})})})})})})})}),(0,l.jsx)(es.D,{open:e4,onOpenChange:e7,onSuccess:sp,user:eq,defaultAssignedAgents:[eV.id]})]})}},68656:function(e,s,i){i.d(s,{J:function(){return p}});var l=i(57437);i(2265);var a=i(26110),n=i(77992),t=i(35629),r=i(62869),d=i(81103),c=i(94508);let o=e=>{let{className:s,...i}=e;return(0,l.jsx)("div",{className:(0,c.cn)("flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",s),...i})},m=e=>{let{className:s,...i}=e;return(0,l.jsx)("div",{className:(0,c.cn)("flex items-center justify-between border-b bg-muted/50 px-4 py-3",s),...i})},x=e=>{let{className:s,...i}=e;return(0,l.jsx)("div",{className:(0,c.cn)("flex items-center gap-1",s),...i})},h=e=>{let{tooltip:s,label:i,icon:a,children:n,className:t,size:o="sm",variant:m="ghost",...x}=e,h=(0,l.jsxs)(r.z,{className:(0,c.cn)("size-8 p-0 text-muted-foreground hover:text-foreground",t),size:o,type:"button",variant:m,...x,children:[a?(0,l.jsx)(a,{className:"size-4"}):n,(0,l.jsx)("span",{className:"sr-only",children:i||s})]});return s?(0,l.jsx)(d.pn,{children:(0,l.jsxs)(d.u,{children:[(0,l.jsx)(d.aJ,{asChild:!0,children:h}),(0,l.jsx)(d._v,{children:(0,l.jsx)("p",{children:s})})]})}):h},u=e=>{let{className:s,...i}=e;return(0,l.jsx)("div",{className:(0,c.cn)("flex-1 overflow-auto p-4",s),...i})};var v=i(33245),j=i(78867);function p(e){let{text:s,sliceLength:i}=e,{toast:r}=(0,n.pm)();return(0,l.jsxs)(a.Vq,{children:[(0,l.jsx)(a.hg,{asChild:!0,children:(0,l.jsxs)("button",{className:"cursor-pointer text-sm text-left w-full hover:bg-accent/50 transition-colors rounded-md p-2 group",children:[(0,l.jsxs)("span",{className:"block",children:[null==s?void 0:s.slice(0,null!=i?i:200),i&&s.length>i?"...":""]}),(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-1 group-hover:text-foreground transition-colors",children:[(0,l.jsx)(v.Z,{className:"w-3 h-3"}),"Click to view full text"]})]})}),(0,l.jsx)(a.cZ,{className:"sm:max-w-[800px] max-h-[500px] overflow-y-scroll",children:(0,l.jsxs)(o,{children:[(0,l.jsx)(m,{children:(0,l.jsx)(x,{children:(0,l.jsx)(h,{icon:j.Z,label:"Copy",tooltip:"Copy to clipboard",onClick:async()=>{await navigator.clipboard.writeText(s),r({title:"Copied to clipboard"})}})})}),(0,l.jsx)(u,{children:(0,l.jsx)(t.H,{children:s})})]})})]})}},92279:function(e,s,i){var l=i(57437),a=i(7882),n=i(11713),t=i(78361);let r=e=>{let{agent:s,status:i,className:r}=e,{data:d}=(0,n.a)({queryKey:["defaultAnimation","idle"],queryFn:async()=>(await fetch("/agent-idle.json")).json(),staleTime:36e5,enabled:!s.animation_idle}),{data:c}=(0,n.a)({queryKey:["defaultAnimation","responding"],queryFn:async()=>(await fetch("/agent-responding.json")).json(),staleTime:36e5,enabled:!s.animation_responding}),{data:o}=(0,n.a)({queryKey:["customAnimation",s.animation_idle],queryFn:async()=>{if(!s.animation_idle)return null;let e=await (0,t.NF)(s.animation_idle);return(await fetch(e)).json()},enabled:!!s.animation_idle,staleTime:3e5}),{data:m}=(0,n.a)({queryKey:["customAnimation",s.animation_responding],queryFn:async()=>{if(!s.animation_responding)return null;let e=await (0,t.NF)(s.animation_responding);return(await fetch(e)).json()},enabled:!!s.animation_responding,staleTime:3e5}),{View:x}=(0,a.useLottie)((()=>{switch(i){case"submitted":case"ready":case"error":default:return{animationData:o||d,loop:!0,autoplay:!0};case"streaming":return{animationData:m||c,loop:!0,autoplay:!0}}})());return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"",children:(0,l.jsx)("div",{className:r,children:x})})})};s.Z=e=>{let{agent:s,status:i,className:a}=e;return(0,l.jsx)(r,{className:a,agent:s,status:i})}},15681:function(e,s,i){i.d(s,{NI:function(){return j},Wi:function(){return m},l0:function(){return c},lX:function(){return v},pf:function(){return p},xJ:function(){return u},zG:function(){return g}});var l=i(57437),a=i(37053),n=i(2265),t=i(29501),r=i(26815),d=i(94508);let c=t.RV,o=n.createContext({}),m=e=>{let{...s}=e;return(0,l.jsx)(o.Provider,{value:{name:s.name},children:(0,l.jsx)(t.Qr,{...s})})},x=()=>{let e=n.useContext(o),s=n.useContext(h),{getFieldState:i,formState:l}=(0,t.Gc)(),a=i(e.name,l);if(!e)throw Error("useFormField should be used within <FormField>");let{id:r}=s;return{id:r,name:e.name,formItemId:"".concat(r,"-form-item"),formDescriptionId:"".concat(r,"-form-item-description"),formMessageId:"".concat(r,"-form-item-message"),...a}},h=n.createContext({}),u=n.forwardRef((e,s)=>{let{className:i,...a}=e,t=n.useId();return(0,l.jsx)(h.Provider,{value:{id:t},children:(0,l.jsx)("div",{ref:s,className:(0,d.cn)("space-y-2",i),...a})})});u.displayName="FormItem";let v=n.forwardRef((e,s)=>{let{className:i,...a}=e,{error:n,formItemId:t}=x();return(0,l.jsx)(r._,{ref:s,className:(0,d.cn)(n&&"text-destructive",i),htmlFor:t,...a})});v.displayName="FormLabel";let j=n.forwardRef((e,s)=>{let{...i}=e,{error:n,formItemId:t,formDescriptionId:r,formMessageId:d}=x();return(0,l.jsx)(a.g7,{ref:s,id:t,"aria-describedby":n?"".concat(r," ").concat(d):"".concat(r),"aria-invalid":!!n,...i})});j.displayName="FormControl";let p=n.forwardRef((e,s)=>{let{className:i,...a}=e,{formDescriptionId:n}=x();return(0,l.jsx)("p",{ref:s,id:n,className:(0,d.cn)("text-sm text-muted-foreground",i),...a})});p.displayName="FormDescription";let g=n.forwardRef((e,s)=>{let{className:i,children:a,...n}=e,{error:t,formMessageId:r}=x(),c=t?String(null==t?void 0:t.message):a;return c?(0,l.jsx)("p",{ref:s,id:r,className:(0,d.cn)("text-sm font-medium text-destructive",i),...n,children:c}):null});g.displayName="FormMessage"},10492:function(e,s,i){i.d(s,{g:function(){return n}});var l=i(57437),a=i(94508);let n=e=>{let{className:s}=e;return(0,l.jsxs)("svg",{"aria-hidden":"true",role:"status",className:(0,a.cn)("inline w-4 h-4 text-white animate-spin fill-inherit",s),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",className:"fill-inherit opacity-20"}),(0,l.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",className:"fill-inherit"})]})}},1828:function(e,s,i){i.d(s,{r:function(){return r}});var l=i(57437),a=i(50721),n=i(2265),t=i(94508);let r=n.forwardRef((e,s)=>{let{className:i,...n}=e;return(0,l.jsx)(a.fC,{className:(0,t.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",i),...n,ref:s,children:(0,l.jsx)(a.bU,{className:(0,t.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})})});r.displayName=a.fC.displayName}}]);
|
|
2
|
-
//# sourceMappingURL=9953-dfb5fc0e5b74ec09.js.map
|