{"version":3,"file":"chatUi-h83WTpMS.js","sources":["../../node_modules/@studio/chat-ui/dist/index.mjs"],"sourcesContent":["var co = Object.defineProperty;\nvar lo = (e, t, r) => t in e ? co(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;\nvar ct = (e, t, r) => (lo(e, typeof t != \"symbol\" ? t + \"\" : t, r), r), or = (e, t, r) => {\n if (!t.has(e))\n throw TypeError(\"Cannot \" + r);\n};\nvar z = (e, t, r) => (or(e, t, \"read from private field\"), r ? r.call(e) : t.get(e)), ke = (e, t, r) => {\n if (t.has(e))\n throw TypeError(\"Cannot add the same private member more than once\");\n t instanceof WeakSet ? t.add(e) : t.set(e, r);\n}, Ye = (e, t, r, n) => (or(e, t, \"write to private field\"), n ? n.call(e, r) : t.set(e, r), r);\nvar Xe = (e, t, r) => (or(e, t, \"access private method\"), r);\nimport * as Be from \"react\";\nimport Ve, { useMemo as V, useState as pe, useCallback as we, useId as uo, useEffect as Ft, useRef as Er, useLayoutEffect as fo } from \"react\";\nimport { cn as me, CodeBlock as ho, Flex as q, Icon as qe, Button as Ie, Markdown as wr, Text as te, IconButton as Ue, CopyButton as Qn, Avatar as Ur, AlertBanner as xt, Link as po, FormField as mo, DropdownMenu as go, DropdownMenuItem as fn, FileAttachment as yo, PromptExampleCard as ir, Modal as Lt, Spinner as bo, Textarea as vo, DesignSystemProvider as Eo, fileTypeMappings as wo } from \"@studio/design-system\";\nimport { flushSync as xo } from \"react-dom\";\nvar _t = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {};\nfunction _o(e) {\n return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, \"default\") ? e.default : e;\n}\nvar xr = { exports: {} }, lt = {};\n/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar hn;\nfunction So() {\n if (hn)\n return lt;\n hn = 1;\n var e = Ve, t = Symbol.for(\"react.element\"), r = Symbol.for(\"react.fragment\"), n = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };\n function i(a, u, f) {\n var l, p = {}, m = null, w = null;\n f !== void 0 && (m = \"\" + f), u.key !== void 0 && (m = \"\" + u.key), u.ref !== void 0 && (w = u.ref);\n for (l in u)\n n.call(u, l) && !o.hasOwnProperty(l) && (p[l] = u[l]);\n if (a && a.defaultProps)\n for (l in u = a.defaultProps, u)\n p[l] === void 0 && (p[l] = u[l]);\n return { $$typeof: t, type: a, key: m, ref: w, props: p, _owner: s.current };\n }\n return lt.Fragment = r, lt.jsx = i, lt.jsxs = i, lt;\n}\nvar ut = {};\n/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar pn;\nfunction Co() {\n return pn || (pn = 1, process.env.NODE_ENV !== \"production\" && function() {\n var e = Ve, t = Symbol.for(\"react.element\"), r = Symbol.for(\"react.portal\"), n = Symbol.for(\"react.fragment\"), s = Symbol.for(\"react.strict_mode\"), o = Symbol.for(\"react.profiler\"), i = Symbol.for(\"react.provider\"), a = Symbol.for(\"react.context\"), u = Symbol.for(\"react.forward_ref\"), f = Symbol.for(\"react.suspense\"), l = Symbol.for(\"react.suspense_list\"), p = Symbol.for(\"react.memo\"), m = Symbol.for(\"react.lazy\"), w = Symbol.for(\"react.offscreen\"), g = Symbol.iterator, v = \"@@iterator\";\n function b(c) {\n if (c === null || typeof c != \"object\")\n return null;\n var y = g && c[g] || c[v];\n return typeof y == \"function\" ? y : null;\n }\n var _ = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n function x(c) {\n {\n for (var y = arguments.length, E = new Array(y > 1 ? y - 1 : 0), T = 1; T < y; T++)\n E[T - 1] = arguments[T];\n S(\"error\", c, E);\n }\n }\n function S(c, y, E) {\n {\n var T = _.ReactDebugCurrentFrame, k = T.getStackAddendum();\n k !== \"\" && (y += \"%s\", E = E.concat([k]));\n var B = E.map(function(D) {\n return String(D);\n });\n B.unshift(\"Warning: \" + y), Function.prototype.apply.call(console[c], console, B);\n }\n }\n var C = !1, j = !1, R = !1, P = !1, L = !1, H;\n H = Symbol.for(\"react.module.reference\");\n function xe(c) {\n return !!(typeof c == \"string\" || typeof c == \"function\" || c === n || c === o || L || c === s || c === f || c === l || P || c === w || C || j || R || typeof c == \"object\" && c !== null && (c.$$typeof === m || c.$$typeof === p || c.$$typeof === i || c.$$typeof === a || c.$$typeof === u || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n c.$$typeof === H || c.getModuleId !== void 0));\n }\n function Me(c, y, E) {\n var T = c.displayName;\n if (T)\n return T;\n var k = y.displayName || y.name || \"\";\n return k !== \"\" ? E + \"(\" + k + \")\" : E;\n }\n function be(c) {\n return c.displayName || \"Context\";\n }\n function X(c) {\n if (c == null)\n return null;\n if (typeof c.tag == \"number\" && x(\"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"), typeof c == \"function\")\n return c.displayName || c.name || null;\n if (typeof c == \"string\")\n return c;\n switch (c) {\n case n:\n return \"Fragment\";\n case r:\n return \"Portal\";\n case o:\n return \"Profiler\";\n case s:\n return \"StrictMode\";\n case f:\n return \"Suspense\";\n case l:\n return \"SuspenseList\";\n }\n if (typeof c == \"object\")\n switch (c.$$typeof) {\n case a:\n var y = c;\n return be(y) + \".Consumer\";\n case i:\n var E = c;\n return be(E._context) + \".Provider\";\n case u:\n return Me(c, c.render, \"ForwardRef\");\n case p:\n var T = c.displayName || null;\n return T !== null ? T : X(c.type) || \"Memo\";\n case m: {\n var k = c, B = k._payload, D = k._init;\n try {\n return X(D(B));\n } catch {\n return null;\n }\n }\n }\n return null;\n }\n var re = Object.assign, ve = 0, _e, ce, nt, Ce, bt, Te, Re;\n function st() {\n }\n st.__reactDisabledLog = !0;\n function vt() {\n {\n if (ve === 0) {\n _e = console.log, ce = console.info, nt = console.warn, Ce = console.error, bt = console.group, Te = console.groupCollapsed, Re = console.groupEnd;\n var c = {\n configurable: !0,\n enumerable: !0,\n value: st,\n writable: !0\n };\n Object.defineProperties(console, {\n info: c,\n log: c,\n warn: c,\n error: c,\n group: c,\n groupCollapsed: c,\n groupEnd: c\n });\n }\n ve++;\n }\n }\n function Ae() {\n {\n if (ve--, ve === 0) {\n var c = {\n configurable: !0,\n enumerable: !0,\n writable: !0\n };\n Object.defineProperties(console, {\n log: re({}, c, {\n value: _e\n }),\n info: re({}, c, {\n value: ce\n }),\n warn: re({}, c, {\n value: nt\n }),\n error: re({}, c, {\n value: Ce\n }),\n group: re({}, c, {\n value: bt\n }),\n groupCollapsed: re({}, c, {\n value: Te\n }),\n groupEnd: re({}, c, {\n value: Re\n })\n });\n }\n ve < 0 && x(\"disabledDepth fell below zero. This is a bug in React. Please file an issue.\");\n }\n }\n var W = _.ReactCurrentDispatcher, Oe;\n function We(c, y, E) {\n {\n if (Oe === void 0)\n try {\n throw Error();\n } catch (k) {\n var T = k.stack.trim().match(/\\n( *(at )?)/);\n Oe = T && T[1] || \"\";\n }\n return `\n` + Oe + c;\n }\n }\n var ot = !1, Je;\n {\n var Xt = typeof WeakMap == \"function\" ? WeakMap : Map;\n Je = new Xt();\n }\n function Et(c, y) {\n if (!c || ot)\n return \"\";\n {\n var E = Je.get(c);\n if (E !== void 0)\n return E;\n }\n var T;\n ot = !0;\n var k = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n var B;\n B = W.current, W.current = null, vt();\n try {\n if (y) {\n var D = function() {\n throw Error();\n };\n if (Object.defineProperty(D.prototype, \"props\", {\n set: function() {\n throw Error();\n }\n }), typeof Reflect == \"object\" && Reflect.construct) {\n try {\n Reflect.construct(D, []);\n } catch (se) {\n T = se;\n }\n Reflect.construct(c, [], D);\n } else {\n try {\n D.call();\n } catch (se) {\n T = se;\n }\n c.call(D.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (se) {\n T = se;\n }\n c();\n }\n } catch (se) {\n if (se && T && typeof se.stack == \"string\") {\n for (var M = se.stack.split(`\n`), ee = T.stack.split(`\n`), $ = M.length - 1, G = ee.length - 1; $ >= 1 && G >= 0 && M[$] !== ee[G]; )\n G--;\n for (; $ >= 1 && G >= 0; $--, G--)\n if (M[$] !== ee[G]) {\n if ($ !== 1 || G !== 1)\n do\n if ($--, G--, G < 0 || M[$] !== ee[G]) {\n var he = `\n` + M[$].replace(\" at new \", \" at \");\n return c.displayName && he.includes(\"\") && (he = he.replace(\"\", c.displayName)), typeof c == \"function\" && Je.set(c, he), he;\n }\n while ($ >= 1 && G >= 0);\n break;\n }\n }\n } finally {\n ot = !1, W.current = B, Ae(), Error.prepareStackTrace = k;\n }\n var Ke = c ? c.displayName || c.name : \"\", De = Ke ? We(Ke) : \"\";\n return typeof c == \"function\" && Je.set(c, De), De;\n }\n function Qt(c, y, E) {\n return Et(c, !1);\n }\n function I(c) {\n var y = c.prototype;\n return !!(y && y.isReactComponent);\n }\n function U(c, y, E) {\n if (c == null)\n return \"\";\n if (typeof c == \"function\")\n return Et(c, I(c));\n if (typeof c == \"string\")\n return We(c);\n switch (c) {\n case f:\n return We(\"Suspense\");\n case l:\n return We(\"SuspenseList\");\n }\n if (typeof c == \"object\")\n switch (c.$$typeof) {\n case u:\n return Qt(c.render);\n case p:\n return U(c.type, y, E);\n case m: {\n var T = c, k = T._payload, B = T._init;\n try {\n return U(B(k), y, E);\n } catch {\n }\n }\n }\n return \"\";\n }\n var N = Object.prototype.hasOwnProperty, J = {}, ne = _.ReactDebugCurrentFrame;\n function Q(c) {\n if (c) {\n var y = c._owner, E = U(c.type, c._source, y ? y.type : null);\n ne.setExtraStackFrame(E);\n } else\n ne.setExtraStackFrame(null);\n }\n function le(c, y, E, T, k) {\n {\n var B = Function.call.bind(N);\n for (var D in c)\n if (B(c, D)) {\n var M = void 0;\n try {\n if (typeof c[D] != \"function\") {\n var ee = Error((T || \"React class\") + \": \" + E + \" type `\" + D + \"` is invalid; it must be a function, usually from the `prop-types` package, but received `\" + typeof c[D] + \"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.\");\n throw ee.name = \"Invariant Violation\", ee;\n }\n M = c[D](y, D, T, E, null, \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\");\n } catch ($) {\n M = $;\n }\n M && !(M instanceof Error) && (Q(k), x(\"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).\", T || \"React class\", E, D, typeof M), Q(null)), M instanceof Error && !(M.message in J) && (J[M.message] = !0, Q(k), x(\"Failed %s type: %s\", E, M.message), Q(null));\n }\n }\n }\n var wt = Array.isArray;\n function it(c) {\n return wt(c);\n }\n function Zt(c) {\n {\n var y = typeof Symbol == \"function\" && Symbol.toStringTag, E = y && c[Symbol.toStringTag] || c.constructor.name || \"Object\";\n return E;\n }\n }\n function Hs(c) {\n try {\n return en(c), !1;\n } catch {\n return !0;\n }\n }\n function en(c) {\n return \"\" + c;\n }\n function tn(c) {\n if (Hs(c))\n return x(\"The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.\", Zt(c)), en(c);\n }\n var at = _.ReactCurrentOwner, $s = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n }, rn, nn, er;\n er = {};\n function Vs(c) {\n if (N.call(c, \"ref\")) {\n var y = Object.getOwnPropertyDescriptor(c, \"ref\").get;\n if (y && y.isReactWarning)\n return !1;\n }\n return c.ref !== void 0;\n }\n function Ws(c) {\n if (N.call(c, \"key\")) {\n var y = Object.getOwnPropertyDescriptor(c, \"key\").get;\n if (y && y.isReactWarning)\n return !1;\n }\n return c.key !== void 0;\n }\n function Js(c, y) {\n if (typeof c.ref == \"string\" && at.current && y && at.current.stateNode !== y) {\n var E = X(at.current.type);\n er[E] || (x('Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', X(at.current.type), c.ref), er[E] = !0);\n }\n }\n function Gs(c, y) {\n {\n var E = function() {\n rn || (rn = !0, x(\"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)\", y));\n };\n E.isReactWarning = !0, Object.defineProperty(c, \"key\", {\n get: E,\n configurable: !0\n });\n }\n }\n function Ks(c, y) {\n {\n var E = function() {\n nn || (nn = !0, x(\"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)\", y));\n };\n E.isReactWarning = !0, Object.defineProperty(c, \"ref\", {\n get: E,\n configurable: !0\n });\n }\n }\n var Ys = function(c, y, E, T, k, B, D) {\n var M = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: t,\n // Built-in properties that belong on the element\n type: c,\n key: y,\n ref: E,\n props: D,\n // Record the component responsible for creating this element.\n _owner: B\n };\n return M._store = {}, Object.defineProperty(M._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: !1\n }), Object.defineProperty(M, \"_self\", {\n configurable: !1,\n enumerable: !1,\n writable: !1,\n value: T\n }), Object.defineProperty(M, \"_source\", {\n configurable: !1,\n enumerable: !1,\n writable: !1,\n value: k\n }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;\n };\n function Xs(c, y, E, T, k) {\n {\n var B, D = {}, M = null, ee = null;\n E !== void 0 && (tn(E), M = \"\" + E), Ws(y) && (tn(y.key), M = \"\" + y.key), Vs(y) && (ee = y.ref, Js(y, k));\n for (B in y)\n N.call(y, B) && !$s.hasOwnProperty(B) && (D[B] = y[B]);\n if (c && c.defaultProps) {\n var $ = c.defaultProps;\n for (B in $)\n D[B] === void 0 && (D[B] = $[B]);\n }\n if (M || ee) {\n var G = typeof c == \"function\" ? c.displayName || c.name || \"Unknown\" : c;\n M && Gs(D, G), ee && Ks(D, G);\n }\n return Ys(c, M, ee, k, T, at.current, D);\n }\n }\n var tr = _.ReactCurrentOwner, sn = _.ReactDebugCurrentFrame;\n function Ge(c) {\n if (c) {\n var y = c._owner, E = U(c.type, c._source, y ? y.type : null);\n sn.setExtraStackFrame(E);\n } else\n sn.setExtraStackFrame(null);\n }\n var rr;\n rr = !1;\n function nr(c) {\n return typeof c == \"object\" && c !== null && c.$$typeof === t;\n }\n function on() {\n {\n if (tr.current) {\n var c = X(tr.current.type);\n if (c)\n return `\n\nCheck the render method of \\`` + c + \"`.\";\n }\n return \"\";\n }\n }\n function Qs(c) {\n {\n if (c !== void 0) {\n var y = c.fileName.replace(/^.*[\\\\\\/]/, \"\"), E = c.lineNumber;\n return `\n\nCheck your code at ` + y + \":\" + E + \".\";\n }\n return \"\";\n }\n }\n var an = {};\n function Zs(c) {\n {\n var y = on();\n if (!y) {\n var E = typeof c == \"string\" ? c : c.displayName || c.name;\n E && (y = `\n\nCheck the top-level render call using <` + E + \">.\");\n }\n return y;\n }\n }\n function cn(c, y) {\n {\n if (!c._store || c._store.validated || c.key != null)\n return;\n c._store.validated = !0;\n var E = Zs(y);\n if (an[E])\n return;\n an[E] = !0;\n var T = \"\";\n c && c._owner && c._owner !== tr.current && (T = \" It was passed a child from \" + X(c._owner.type) + \".\"), Ge(c), x('Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, T), Ge(null);\n }\n }\n function ln(c, y) {\n {\n if (typeof c != \"object\")\n return;\n if (it(c))\n for (var E = 0; E < c.length; E++) {\n var T = c[E];\n nr(T) && cn(T, y);\n }\n else if (nr(c))\n c._store && (c._store.validated = !0);\n else if (c) {\n var k = b(c);\n if (typeof k == \"function\" && k !== c.entries)\n for (var B = k.call(c), D; !(D = B.next()).done; )\n nr(D.value) && cn(D.value, y);\n }\n }\n }\n function eo(c) {\n {\n var y = c.type;\n if (y == null || typeof y == \"string\")\n return;\n var E;\n if (typeof y == \"function\")\n E = y.propTypes;\n else if (typeof y == \"object\" && (y.$$typeof === u || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n y.$$typeof === p))\n E = y.propTypes;\n else\n return;\n if (E) {\n var T = X(y);\n le(E, c.props, \"prop\", T, c);\n } else if (y.PropTypes !== void 0 && !rr) {\n rr = !0;\n var k = X(y);\n x(\"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?\", k || \"Unknown\");\n }\n typeof y.getDefaultProps == \"function\" && !y.getDefaultProps.isReactClassApproved && x(\"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.\");\n }\n }\n function to(c) {\n {\n for (var y = Object.keys(c.props), E = 0; E < y.length; E++) {\n var T = y[E];\n if (T !== \"children\" && T !== \"key\") {\n Ge(c), x(\"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.\", T), Ge(null);\n break;\n }\n }\n c.ref !== null && (Ge(c), x(\"Invalid attribute `ref` supplied to `React.Fragment`.\"), Ge(null));\n }\n }\n var un = {};\n function dn(c, y, E, T, k, B) {\n {\n var D = xe(c);\n if (!D) {\n var M = \"\";\n (c === void 0 || typeof c == \"object\" && c !== null && Object.keys(c).length === 0) && (M += \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\");\n var ee = Qs(k);\n ee ? M += ee : M += on();\n var $;\n c === null ? $ = \"null\" : it(c) ? $ = \"array\" : c !== void 0 && c.$$typeof === t ? ($ = \"<\" + (X(c.type) || \"Unknown\") + \" />\", M = \" Did you accidentally export a JSX literal instead of a component?\") : $ = typeof c, x(\"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s\", $, M);\n }\n var G = Xs(c, y, E, k, B);\n if (G == null)\n return G;\n if (D) {\n var he = y.children;\n if (he !== void 0)\n if (T)\n if (it(he)) {\n for (var Ke = 0; Ke < he.length; Ke++)\n ln(he[Ke], c);\n Object.freeze && Object.freeze(he);\n } else\n x(\"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\");\n else\n ln(he, c);\n }\n if (N.call(y, \"key\")) {\n var De = X(c), se = Object.keys(y).filter(function(ao) {\n return ao !== \"key\";\n }), sr = se.length > 0 ? \"{key: someKey, \" + se.join(\": ..., \") + \": ...}\" : \"{key: someKey}\";\n if (!un[De + sr]) {\n var io = se.length > 0 ? \"{\" + se.join(\": ..., \") + \": ...}\" : \"{}\";\n x(`A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />`, sr, De, io, De), un[De + sr] = !0;\n }\n }\n return c === n ? to(G) : eo(G), G;\n }\n }\n function ro(c, y, E) {\n return dn(c, y, E, !0);\n }\n function no(c, y, E) {\n return dn(c, y, E, !1);\n }\n var so = no, oo = ro;\n ut.Fragment = n, ut.jsx = so, ut.jsxs = oo;\n }()), ut;\n}\nprocess.env.NODE_ENV === \"production\" ? xr.exports = So() : xr.exports = Co();\nvar d = xr.exports;\nfunction Zn(e) {\n var t, r, n = \"\";\n if (typeof e == \"string\" || typeof e == \"number\")\n n += e;\n else if (typeof e == \"object\")\n if (Array.isArray(e)) {\n var s = e.length;\n for (t = 0; t < s; t++)\n e[t] && (r = Zn(e[t])) && (n && (n += \" \"), n += r);\n } else\n for (r in e)\n e[r] && (n && (n += \" \"), n += r);\n return n;\n}\nfunction F() {\n for (var e, t, r = 0, n = \"\", s = arguments.length; r < s; r++)\n (e = arguments[r]) && (t = Zn(e)) && (n && (n += \" \"), n += t);\n return n;\n}\nconst To = (e) => Math.round(e / 1e3 * 1e3) / 1e3, St = (e, t, r) => e <= 1 ? t : r || `${t}s`, O = {\n chatPage: {\n actions: {\n deleteDocument: \"Delete document\"\n },\n messagesFeed: {\n generatingLoaderMessage: \"Generating...\",\n regeneratingLoaderMessage: \"Re-generating...\",\n scrollToBottomCta: \"Scroll to bottom\"\n },\n toolbar: {\n clearChatButton: \"Clear\",\n clearChatTooltip: \"Clear chat\",\n viewSdkCodeButton: \"View code\",\n modelConfigButton: \"Configuration\"\n },\n input: {\n placeholder: \"Message...\",\n loadingPlaceholder: \"Generating...\",\n submitLabel: \"Submit\",\n clearLabel: \"Clear\",\n uploadDocument: \"Upload document\"\n },\n footer: {\n technologyDisclaimer: \"Jamba can make mistakes. Please verify information.\"\n },\n emptyChat: {\n header: {\n title: \"Chat Playground\",\n subtitle: \"Build with Jamba models\",\n bannerText: \"Unlock all features on desktop.\"\n },\n suggestionCards: [\n {\n title: \"Improve an email draft\",\n prompt: `You are a marketing expert with great writing skills. Can you take this email draft and improve it?\n\nI want it to look professional and be engaging and fun. This will be sent to our user-base mailing list\n\n \n\nSubject: New languages in Socialll\n\n \n\nHi there,\n\n \n\nI just wanted to let you know that we added some new languages to Socialll. Now it supports German, Swedish, and Korean. We worked hard on this, so I hope you find it useful.\n\n \n\nIf you have users who speak those languages, they can now use our tool in their native language. It should make things easier for them. I think that's it. Let me know if there are any problems.`\n },\n {\n title: \"Summarize text according to instructions\",\n prompt: `I need you to summarize the text below based on the instructions provided:\n\nThe latest generation of anti-obesity drugs mimic a hormone called glucagon-like peptide 1 (GLP-1), which is associated with appetite regulation. Semaglutide was approved by the US Food and Drug Administration in 2017, under the name Ozempic, to treat type 2 diabetes, and later, in 2021, as Wegovy, for the treatment of obesity. Tirzepatide, marketed as Mounjaro, was approved in 2022 to treat diabetes, but is also prescribed off-label for weight loss. A research letter published last week in JAMA looked at a sample of people with obesity in a large health-insurance database. The authors found that the incidence of pancreatitis — inflammation of the pancreas — was 4.6 times higher in people taking semaglutide than in people taking a weight-loss medication that does not mimic GLP-1. The study also found that semaglutide and liraglutide, another GLP-1 medication, were associated with an increased incidence of gastroparesis, a disorder that slows or stops the movement of food from the stomach to the intestine. Clinical trials had already shown an association between GLP-1 drugs and gastrointestinal side effects, including nausea, constipation and rare cases of pancreatitis. “What’s new is that, for all of them, we actually gave an incidence number,” says Mahyar Etminan, an epidemiologist at the University of British Columbia in Vancouver, Canada, and an author of the JAMA research. Jaime Almandoz, an endocrinologist at the University of Texas Southwestern Medical Center in Dallas, says that because clinical trials tend to exclude people who are at a higher risk of developing certain conditions, epidemiological studies can provide better insight into complications that might arise in the real world. But the study has an important limitation, says Daniel Drucker, an endocrinologist at the University of Toronto in Canada. It relies on diagnoses recorded on health-care claims, which might not always be accurate. “A doctor can write down pancreatitis and there it is on the health-care claim. There’s no additional scrutiny as to whether or not that’s correct,” he says. Marilyn Tan, an endocrinologist at Stanford University in California, says that she routinely counsels patients with diabetes about the potential for gastrointestinal side effects from GLP-1 medications. She notes, however, that as more providers who are not specialists in diabetes or obesity prescribe these medications, “it’s unclear if all patients are being fully informed about the potential risks.”\n\nThe summary must be:\n\n* in bullet point form\n\n* written in a professional tone\n\n* mention all anti-obesity drugs present in the text`\n },\n {\n title: \"Extract answers from text\",\n prompt: `I am required to find out the answer to the following questions from the given text.\n\n \n\nWe plotted four graphs from the data, as prescribed in the PSM procedure. Our graphing procedures yielded rounded, estimated dollar values rather than finding those values to the penny. In this way we created a reasonably solid graphical treatment of the \"value boundaries\" as perceived by our sample of planners. Because this is the first applica- tion of PSM to this market, we are not able to make categorical conclusions regarding the application of the value boundaries.\n\nThe graph in Exhibit 1 plots the cumulative distributions of responses for \"cheap\" and \"expensive.\" The intersection of these curves, $70, is the indifference price (IDP), or the point where an equal number of respondents fed the price is cheap as think it expensive. The indifference price percentage (IDP percentage) is the corresponding cumulative distribution percentage at the indifference price. A low IDP percentage indicates a high level of price consciousness, while a high IDP percentage indicates diffuse price consciousness. We determined the IDP percentage to be approximately 37 percent, a relatively low value that indicates a measure of price sensitivity.\n\nThe graph in Exhibit 2 depicts the optimal pricing point (OPP), or the point where purchase resistance due to price is at its lowest. We estimated the optimal pricing point for this sample at $52.00. Exhibit 3 combines the cumulative distributions of the planners' responses to four \\`questions regarding what is cheap, expensive, too cheap, and too expensive. We found that the optimal pricing point fell to the left of the indifference price. This finding indicates some stress in our market, since the optimal point is $18 lower than (on the \"cheap\" side of) the indifference price.\n\nThe key to the PSM technique is the reinterpretation of the data so that the distributions of \"cheap\" and \"expensive\" are reversed to depict the prices at which the room value is \"not cheap\" and \"not expensive.\" One of the reasons for handling the data in this way is that asking respondents to identify a price at which something is \"not cheap\" or \"not expensive\" is awkward and prone to error. Asking respondents to give a price that is \"cheap\" and then inferring that it is therefore \"not expensive\" provides a more reliable set of data. The resulting graph (Exhibit 4) combines the reversed cumulative distribution of \"cheap\" and \"expensive\" from Exhibit 1 with Exhibit 2's distributions of \"too cheap\" and \"too expensive.\" The resulting area indicates the range of acceptable prices (RAP), which is the distance between the points of marginal cheapness (PMC) and marginal expensiveness (PME). The smaller this range, the greater the sensitivity to price. In analyzing Exhibit 4, the point of marginal cheapness was found to be $38.00 and the point of marginal expensiveness to be $92.00, giving a range of acceptable prices of $54.00.\n\nApplicable. The results of this study show that the price-sensitivity-measurement technique can most likely be applied to the hotel industry. We have no basis for comparing or interpreting our re-suits, however. Although we have been able to ascertain an indifference point, an indifference percentage, an optimum pricing point, a stress level, and a range of acceptable prices, we have no lodging-industry benchmarks with which to compare those values. We can conclude that some meeting planners have in mind threshold prices outside of which price will inhibit their decision to purchase. At this point, however, we are unable to determine the degree to which our respondents are price sensitive (compared to other buyers). We learned that the range of acceptable prices was $54.00, but without more study we cannot conclude whether this is a large or a small range. These limitations could be overcome by further applications of the model to the lodging industry.\n\nAdditional research would provide more data with which we could compare these results.\n\n \n\nPlease describe the key to the PSM technique and provide the differentiating points between a Low and High IDP. Answer this in 2 paragraphs, always capitalize “PSM Technique” and avoid complicated words.`\n }\n ]\n },\n assistantMessage: {\n functionInput: {\n inputPlaceholder: \"Submit output\"\n }\n },\n modals: {\n fileUploadModal: {\n infoText: \"Upload one file at a time as context for this chat session.\"\n },\n viewCodeModal: {\n title: \"View code\",\n subtitle: \"Use the code below to integrate the API into your application. The current prompt and configuration are applied. You can find your API key in the account page.\",\n copyButton: \"Copy code\"\n },\n editMessageModal: {\n title: \"Edit message\",\n subtitle: \"Editing a message will clear all later messages in chat history. Earlier messages will be retained.\",\n submitButton: \"Submit\",\n cancelButton: \"Cancel\"\n },\n regenerateModal: {\n title: \"Re-generate\",\n message: \"Re-generating a message will clear all later messages in chat history. Earlier messages will be retained.\",\n submitButton: \"Re-generate\",\n cancelButton: \"Cancel\"\n },\n messageInfoModal: {\n title: \"Output information\",\n closeButton: \"Close\",\n modelParametersTitle: \"Model parameters used\",\n modelParam: \"Model\",\n temperatureParam: \"Temperature\",\n maxTokensParam: \"Max completion length\",\n topPParam: \"Top-P\",\n responseTokensCount: \"Tokens\",\n characters: \"Characters\",\n systemInstructions: \"System instructions\",\n responseLatency: \"Latency\"\n },\n messageSourcesModal: {\n title: \"Sources\",\n subtitle: (e) => `Based on ${e > 100 ? \"100+\" : e} doc${e > 1 ? \"s\" : \"\"}`,\n closeButton: \"Close\",\n sourceButton: \"MessageSourceFile\",\n backButton: \"Back\",\n copyAll: \"Copy all\",\n copy: \"Copy\"\n },\n chatFunctionModal: {\n addTitle: \"Add function\",\n addDescription: \"Add functions to Jamba to enhance your app’s capabilities. Jamba will choose to call these functions based on its understanding of the conversation.\",\n editTitle: \"Edit function\",\n editDescription: \"Add functions to Jamba to enhance your app’s capabilities. Jamba will choose to call these functions based on its understanding of the conversation.\",\n submitButton: \"Save function\",\n cancelButton: \"Cancel\",\n deleteButton: \"Delete\",\n templateButton: \"Examples\"\n }\n },\n errors: {\n outOfCredits: \"You're out of credits. To continue chatting, become a pro user.\",\n addCredits: \"Add credits\",\n generalMessage: \"Unable to complete the task at this time. Please try again in a few moments.\",\n trialEnded: \"Your free trial has come to an end. Upgrade your plan to continue building.\",\n upgrade: \"Upgrade plan\"\n }\n },\n ChatDrawer: {\n systemInstructions: {\n title: {\n text: \"System message\",\n tooltip: \"Provide any specific voice, tone, or role that the model should assume when generating responses (such as patient, experienced car mechanic, jolly pirate, patient language teacher).\"\n },\n textarea: {\n placeholder: \"You are helpful, respectful and honest AI assistant...\"\n }\n },\n modelParameters: {\n maxTokens: {\n label: \"Max completion length\",\n info: \"Set the maximum output size in characters.\"\n },\n temperature: {\n label: \"Temperature\",\n info: \"Higher temperature enables more variability in your answers. Zero will generate the same answer every time for the same input.\"\n },\n topP: {\n label: \"Top P\",\n info: \"Limit token choices to the most likely candidates, where 0 means only the most likely token and 1 means consider all tokens, even unlikely ones.\"\n },\n model: {\n label: \"Model\",\n info: \"Select the model to use for generating responses.\"\n },\n textFormat: {\n label: \"Response format\",\n info: \"Attempts to enforce that the response format is a valid JSON\"\n },\n functions: {\n label: \"Functions\",\n info: \"Create function calls to connect Jamba to your other tools. Jamba will choose to call these functions based on its understanding of the conversation.\",\n addButton: \"Add function\",\n actions: {\n edit: \"Edit\",\n delete: \"Delete\",\n template: \"Examples\"\n },\n templates: [\n `{\n \"name\": \"calculate\",\n \"description\": \"Perform basic arithmetic operations and some advanced mathematical functions\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"operation\": {\n \"type\": \"string\",\n \"enum\": [\n \"add\",\n \"subtract\",\n \"multiply\",\n \"divide\",\n \"power\"\n ],\n \"description\": \"The mathematical operation to perform\"\n },\n \"x\": {\n \"type\": \"number\",\n \"description\": \"The first number in the calculation\"\n },\n \"y\": {\n \"type\": \"number\",\n \"description\": \"The second number in the calculation\"\n }\n },\n \"required\": [\n \"operation\",\n \"x\",\n \"y\"\n ]\n }\n}`,\n `{\n \"name\": \"translate\",\n \"description\": \"Translate text from one language to another\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"type\": \"string\",\n \"description\": \"The text to be translated\"\n },\n \"source_language\": {\n \"type\": \"string\",\n \"description\": \"The language code of the source text (e.g., 'en' for English, 'es' for Spanish)\",\n \"default\": \"auto\"\n },\n \"target_language\": {\n \"type\": \"string\",\n \"description\": \"The language code of the desired translation (e.g., 'fr' for French, 'de' for German)\"\n }\n },\n \"required\": [\n \"text\",\n \"target_language\"\n ]\n }\n}`,\n `{\n \"name\": \"web_search\",\n \"description\": \"Perform a web search and return relevant results\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The search query\"\n },\n \"num_results\": {\n \"type\": \"integer\",\n \"description\": \"The number of search results to return\",\n \"default\": 5\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n}`\n ],\n toasts: {\n success: \"New function added successfully!\",\n fail: {\n uniqueName: \"Function name must be unique\",\n noNameField: \"Function must have a name\",\n emptyJson: \"Function mustn't be empty\",\n typeError: \"Function parameters should have only 'name', 'description' and 'parameters' fields\"\n }\n }\n }\n },\n actions: {\n menu: {\n label: \"Menu\",\n reset: {\n text: \"Reset all parameters\"\n }\n }\n }\n },\n modals: {\n deleteDocumentModal: {\n title: (e) => `Delete ${St(e, \"document\")}?`,\n deleteInProgress: (e) => `Deleting ${St(e, \"document\")}...`,\n firstMessagePart: (e) => `Are you sure you want to delete the ${e > 1 ? e : \"\"} selected ${St(e, \"document\")}`,\n secondMessagePart: \"? Models will no longer use this data to generate responses.\",\n submitButton: (e) => `Delete ${e} ${St(e, \"document\")}`,\n cancelButton: \"Cancel\"\n }\n }\n}, es = (e) => e ? \"sd-bg-[#292C33]\" : \"sd-bg-[#1F222A]\", Ro = [\"!sd-rounded-br-none\", \"!sd-rounded-bl-none\", \"!sd-mb-0\"], Ao = (e) => [\n \"sd-py-150\",\n \"sd-px-200\",\n \"sd-self-stretch\",\n \"sd-w-full\",\n \"sd-rounded-br-medium\",\n \"sd-rounded-bl-medium\",\n es(e),\n \"sd-transition-colors\",\n \"sd-duration-200\"\n], Oo = (e) => [\n \"ds-form-input\",\n \"focus:sd-border-0\",\n \"focus:sd-ring-0\",\n \"sd-p-0\",\n \"sd-border-0\",\n \"sd-placeholder-text-placeholder\",\n \"placeholder:sd-font-normal\",\n e ? \"sd-text-disabled-text\" : \"sd-text-text-contrast\",\n \"sd-grow\",\n \"sd-prose-body1-regular\",\n \"sd-font-bold\",\n es(e),\n \"sd-transition-colors\",\n \"sd-duration-200\"\n], mn = [\n \"sd-text-text-contrast\",\n \"sd-text-sm\",\n \"sd-flex-grow-0\",\n \"sd-animate-slideUp\",\n \"sd-duration-200\",\n \"sd-transition-all\"\n], Po = [\"sd-stroke-success-bg-active\"], jo = (e) => [\"sd-mr-150\", e ? \"sd-opacity-40\" : \"\"], Fo = [\"sd-mt-100\", \"sd-float-end\"], Io = ({\n functionSignature: e,\n value: t,\n setValue: r,\n inputDisabled: n\n}) => {\n const s = V(() => ({\n input: me(Oo(n)),\n inputContainer: me(Ao(n))\n }), [n]);\n return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [\n /* @__PURE__ */ d.jsx(ho, { code: e, language: \"json\", className: F(Ro) }),\n /* @__PURE__ */ d.jsxs(q, { alignItems: \"center\", className: s.inputContainer, \"aria-label\": \"text-field-input\", children: [\n /* @__PURE__ */ d.jsx(\n qe,\n {\n icon: \"ArrowUDownRight\",\n size: \"xSmall\",\n className: F(mn, jo(n))\n }\n ),\n /* @__PURE__ */ d.jsx(\n \"input\",\n {\n className: s.input,\n type: \"text\",\n placeholder: n ? \"\" : O.chatPage.assistantMessage.functionInput.inputPlaceholder,\n value: t || \"\",\n disabled: n,\n onChange: (o) => r(o.target.value)\n }\n ),\n (t == null ? void 0 : t.trim()) && /* @__PURE__ */ d.jsx(qe, { icon: \"CheckCircle\", className: F(mn, Po) })\n ] })\n ] });\n}, Mo = (e, t) => Array.from({ length: e }, () => t), Do = (e) => {\n const t = e.name, r = e.arguments, n = JSON.parse(r), s = JSON.stringify(n, null, 2);\n return `${t}(${s})`;\n}, ko = (e, t) => e.length === t.length ? t.every(\n (s) => s != null && s.trim().length > 0\n) : !1, No = ({ functionInputs: e, onSubmit: t }) => {\n const [r, n] = pe(Mo(e.length, \"\")), [s, o] = pe(!1), i = V(() => ko(e, r), [e, r]), a = we(() => {\n o(!0), t(r.map((f, l) => ({ toolCallId: e[l].id, content: f, role: \"tool\" })));\n }, [e, t, r]), u = we(\n (f, l) => {\n const p = [...r];\n p[f] = l, n(p);\n },\n [r]\n );\n return {\n userInputs: r,\n isSubmitted: s,\n hasValueForAllInputs: i,\n handleSubmit: a,\n handleUpdateInput: u\n };\n}, Bo = ({ functionInputs: e, onSubmit: t, disabled: r }) => {\n const { userInputs: n, isSubmitted: s, handleSubmit: o, handleUpdateInput: i, hasValueForAllInputs: a } = No({\n functionInputs: e,\n onSubmit: t\n });\n return /* @__PURE__ */ d.jsxs(\"div\", { children: [\n e.map((u, f) => /* @__PURE__ */ d.jsx(\n Io,\n {\n functionSignature: u.functionSignature,\n value: n[f],\n setValue: (l) => i(f, l),\n inputDisabled: s || r\n },\n u.id\n )),\n /* @__PURE__ */ d.jsx(\n Ie,\n {\n className: F(Fo),\n text: \"Run\",\n variant: \"contained\",\n color: \"success\",\n rightIcon: s ? \"Check\" : \"ReturnEnter\",\n disabled: r || !a || s,\n onClick: o\n }\n )\n ] });\n}, ts = (e, t) => e ? \"hidden\" : t ? \"visible\" : \"showOnHover\", qr = (e) => [\n \"sd-group\",\n \"sd-w-full\",\n \"sd-p-100\",\n \"sd-max-w-[730px]\",\n \"sd-min-w-[343px]\",\n \"sd-rounded-[20px]\",\n \"sd-flex-auto\",\n \"sd-border\",\n \"sd-border-solid\",\n \"sd-border-transparent\",\n \"sd-transition-all\",\n \"sd-duration-200\",\n !e && \"hover:sd-border-comp-completions-border-hover\",\n !e && \"hover:sd-bg-comp-completions-bg-hover\",\n e && \"sd-cursor-wait\",\n \"sd-animate-slideUp\"\n], zr = [\"sd-p-[4px]\", \"sd-pl-150\", \"sd-flex-1\", \"sd-max-w-full\", \"sd-overflow-auto\"], Hr = (e) => {\n const t = ts(e.isLoading ?? !1, e.isSticky);\n return [\n t === \"visible\" && \"sd-opacity-75 group-hover:sd-opacity-100\",\n t === \"hidden\" && \"sd-opacity-0\",\n t === \"showOnHover\" && \"sd-opacity-0 group-hover:sd-opacity-100\",\n \"sd-mt-025\",\n \"sd-self-end\",\n \"[&>button]:sd-ml-[2px]\",\n \"sd-transition-opacity\",\n \"sd-duration-300\"\n ];\n}, $r = (e) => {\n const t = ts(e.isLoading ?? !1, e.isSticky);\n return [\n t === \"visible\" && \"sd-opacity-75 group-hover:sd-opacity-100\",\n t === \"hidden\" && \"sd-opacity-0\",\n t === \"showOnHover\" && \"sd-opacity-0 group-hover:sd-opacity-100\",\n \"sd-mt-100\",\n \"sd-transition-opacity\",\n \"sd-duration-300\"\n ];\n}, Vr = (e) => [\n \"sd-flex\",\n \"sd-items-center\",\n \"group-hover:sd-underline\",\n e ? \"sd-cursor-wait\" : \"sd-cursor-pointer\",\n \"sd-decoration-text-tertiary\",\n \"sd-text-text-secondary\",\n \"sd-prose-body1-regular\"\n], Lo = [\"sd-self-center\", \"sd-mr-025\", \"sd-text-text-secondary\"], Uo = [\"sd-self-center\", \"sd-ml-025\", \"sd-text-text-secondary\"], Rt = {\n messageHeader: [\"sd-gap-125\"],\n assistantName: [\"sd-pb-050\"],\n loadingIcon: [\"sd-pb-025\"]\n}, qo = ({\n errorText: e,\n showLoader: t,\n loadingText: r,\n enableCodeSyntaxHighlighting: n,\n message: s,\n callbacks: o,\n functionToolCalls: i,\n disableToolCallsInput: a\n}) => e ? /* @__PURE__ */ d.jsx(wr, { markdownContent: e, testId: \"message-content-error\" }) : t ? /* @__PURE__ */ d.jsx(q, { direction: \"row\", testId: \"message-content-loading\", children: /* @__PURE__ */ d.jsx(te, { variant: \"body1\", color: \"tertiary\", userSelectable: !1, children: r }) }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [\n /* @__PURE__ */ d.jsx(\n wr,\n {\n className: \"amp-mask\",\n testId: \"message-content\",\n markdownContent: s || \"\",\n loaded: n,\n disableHightLimit: !0\n }\n ),\n i && /* @__PURE__ */ d.jsx(\n Bo,\n {\n functionInputs: i,\n onSubmit: o.onFunctionCallAnswer,\n disabled: a\n }\n )\n] }), zo = () => /* @__PURE__ */ d.jsxs(\n \"svg\",\n {\n width: \"28\",\n height: \"8\",\n viewBox: \"0 0 28 8\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n children: [\n /* @__PURE__ */ d.jsx(\"circle\", { opacity: \"0.3\", cx: \"3.87931\", cy: \"3.87931\", r: \"3.87931\", fill: \"#D4D4D4\", children: /* @__PURE__ */ d.jsx(\n \"animate\",\n {\n id: \"first\",\n attributeName: \"fill\",\n to: \"#D4D4D4\",\n from: \"#9B9B9B\",\n begin: \"0.3s;first.end+0.9s\",\n dur: \"0.3s\",\n fill: \"freeze\"\n }\n ) }),\n /* @__PURE__ */ d.jsx(\"circle\", { opacity: \"0.6\", cx: \"13.6376\", cy: \"3.87931\", r: \"3.87931\", fill: \"#D4D4D4\", children: /* @__PURE__ */ d.jsx(\n \"animate\",\n {\n id: \"second\",\n attributeName: \"fill\",\n from: \"#9B9B9B\",\n to: \"#D4D4D4\",\n begin: \"0.6s;second.end+0.9s\",\n dur: \"0.3s\",\n fill: \"freeze\"\n }\n ) }),\n /* @__PURE__ */ d.jsx(\"circle\", { cx: \"23.3964\", cy: \"3.87931\", r: \"3.87931\", fill: \"#D4D4D4\", children: /* @__PURE__ */ d.jsx(\n \"animate\",\n {\n id: \"third\",\n attributeName: \"fill\",\n from: \"#9B9B9B\",\n to: \"#D4D4D4\",\n begin: \"0.9s;third.end+0.9s\",\n dur: \"0.3s\",\n fill: \"freeze\"\n }\n ) })\n ]\n }\n), Ho = ({ assistantName: e, showLoader: t }) => {\n const r = V(() => ({\n messageHeader: me(Rt.messageHeader),\n assistantName: me(Rt.assistantName),\n loadingIcon: me(Rt.loadingIcon)\n }), []);\n return /* @__PURE__ */ d.jsxs(q, { direction: \"row\", testId: \"message-header\", alignItems: \"center\", className: r.messageHeader, children: [\n /* @__PURE__ */ d.jsx(te, { variant: \"body1\", weight: \"bold\", color: \"primary\", className: r.assistantName, userSelectable: !1, children: e }),\n t && /* @__PURE__ */ d.jsx(q, { className: r.loadingIcon, children: /* @__PURE__ */ d.jsx(zo, {}) })\n ] });\n}, Z = {\n chat: {\n drawer: {\n menu: \"ChatDrawerMenu\",\n closeButton: \"ChatDrawerCloseButton\"\n },\n modals: {\n editMessageModal: {\n cancel: \"ChatEditMessageModalCancel\",\n submit: \"ChatEditMessageModalSubmit\"\n },\n regenerateModal: {\n cancel: \"ChatRegenerateModalCancel\",\n regenerate: \"ChatRegenerateModalRegenerate\"\n },\n messageInfoModal: {\n closeButton: \"ChatMessageInfoModalClose\"\n },\n messageSourcesModal: {\n sourceButton: \"ChatMessageSourcesModalSourceButton\",\n backButton: \"ChatMessageSourcesModalBackButton\",\n copyAll: \"ChatMessageSourcesModalCopyAll\",\n copy: \"ChatMessageSourcesModalCopy\"\n },\n chatFunctionModal: {\n submit: \"chatFunctionModalSubmit\",\n cancel: \"chatFunctionModalCancel\",\n delete: \"chatFunctionModalDelete\"\n }\n },\n buttons: {\n configuration: \"ChatConfiguration\",\n viewCode: \"ChatViewCode\",\n clear: \"ChatClear\",\n edit: \"ChatEdit\",\n userMessageCopy: \"ChatUserMessageCopy\",\n assistantMessageCopy: \"ChatAssistantMessageCopy\",\n regenerate: \"ChatRegenerateMessage\",\n source: \"ChatMessageSource\",\n info: \"ChatMessageInfo\",\n goodFeedback: \"ChatGoodFeedback\",\n badFeedback: \"ChatBadFeedback\",\n clearInput: \"ChatClearInput\",\n submitMessage: \"ChatSubmitMessage\",\n promptCard: \"ChatPromptCard\",\n uploadDocument: \"UploadDocument\",\n deleteDocument: \"DeleteDocument\"\n }\n },\n ragEngine: {\n uploadDocumentsButton: \"DocsLibraryUploadDocument\"\n }\n}, $o = ({ onClick: e, numOfDocs: t, isLoading: r }) => {\n const n = V(() => ({\n sourcesButton: me(Vr(r)),\n fileIcon: me(Lo),\n chevronIcon: me(Uo)\n }), [r]), s = t > 0;\n return /* @__PURE__ */ d.jsxs(q, { children: [\n s && /* @__PURE__ */ d.jsx(qe, { icon: \"Files\", size: \"xSmall\", className: n.fileIcon, \"aria-hidden\": !0 }),\n /* @__PURE__ */ d.jsx(\"button\", { onClick: e, className: n.sourcesButton, children: s ? O.chatPage.modals.messageSourcesModal.subtitle(t) : \"\" }),\n s && /* @__PURE__ */ d.jsx(qe, { icon: \"CaretDown\", size: \"xSmall\", className: n.chevronIcon, \"aria-hidden\": !0 })\n ] });\n}, gn = ({\n chatMessageId: e,\n feedbackType: t,\n feedbackScore: r,\n tooltipText: n,\n onFeedback: s,\n onClick: o,\n disabled: i\n}) => {\n const a = r !== void 0, u = r === 10 ? \"good\" : \"bad\", f = !a || u === t, l = a && u === t;\n return f ? /* @__PURE__ */ d.jsx(\n Ue,\n {\n testId: t === \"good\" ? Z.chat.buttons.goodFeedback : Z.chat.buttons.badFeedback,\n size: \"small\",\n variant: l ? \"contained\" : \"text\",\n disabled: i || l,\n color: \"primary\",\n icon: t === \"good\" ? \"ThumbUp\" : \"ThumbDown\",\n label: n,\n onClick: o(() => s(e, t === \"good\" ? 10 : 0))\n }\n ) : null;\n}, Vo = ({\n id: e,\n numOfDocs: t = 0,\n message: r,\n callbacks: n,\n userFeedbackScore: s,\n goodFeedbackTooltipText: o,\n badFeedbackTooltipText: i,\n hideInfoModalAction: a = !1,\n showLoader: u = !1,\n stickyActions: f = !1,\n disableActions: l = !1\n}) => {\n const p = V(() => ({\n sourcesButton: me(Vr),\n actions: me(Hr({ isLoading: u, isSticky: f })),\n footer: me($r({ isLoading: u, isSticky: f }))\n }), [u, f]), m = we(() => {\n var w;\n (w = n.showSources) == null || w.call(n, e);\n }, [n, e]);\n return /* @__PURE__ */ d.jsxs(q, { justifyContent: \"space-between\", alignItems: \"center\", className: p.footer, children: [\n /* @__PURE__ */ d.jsx($o, { numOfDocs: t, onClick: m, isLoading: u }),\n /* @__PURE__ */ d.jsxs(q, { className: p.actions, children: [\n /* @__PURE__ */ d.jsx(\n Ue,\n {\n testId: Z.chat.buttons.regenerate,\n size: \"small\",\n variant: \"text\",\n color: \"primary\",\n icon: \"Refresh\",\n label: \"Re-generate\",\n onClick: n.onClickEvent(() => n.onRegenerate(e)),\n disabled: l\n }\n ),\n !!t && /* @__PURE__ */ d.jsx(\n Ue,\n {\n testId: Z.chat.buttons.source,\n size: \"small\",\n variant: \"text\",\n color: \"primary\",\n icon: \"Target\",\n label: \"Source\",\n onClick: n.onClickEvent(m),\n disabled: l\n }\n ),\n /* @__PURE__ */ d.jsx(\n gn,\n {\n chatMessageId: e,\n feedbackType: \"good\",\n feedbackScore: s,\n onFeedback: n.onFeedback,\n tooltipText: o,\n onClick: n.onClickEvent,\n disabled: l\n }\n ),\n /* @__PURE__ */ d.jsx(\n gn,\n {\n chatMessageId: e,\n feedbackType: \"bad\",\n feedbackScore: s,\n onFeedback: n.onFeedback,\n tooltipText: i,\n onClick: n.onClickEvent,\n disabled: l\n }\n ),\n r && /* @__PURE__ */ d.jsx(\n Qn,\n {\n testId: Z.chat.buttons.assistantMessageCopy,\n contentToCopy: r,\n kind: \"iconButton\",\n onClick: n.onClickEvent(),\n disabled: l\n }\n ),\n !a && /* @__PURE__ */ d.jsx(\n Ue,\n {\n testId: Z.chat.buttons.info,\n size: \"small\",\n variant: \"text\",\n color: \"primary\",\n icon: \"Info\",\n label: \"Information\",\n onClick: n.onClickEvent(() => n.showMessageInfo(e)),\n disabled: l\n }\n )\n ] })\n ] });\n}, rs = (e) => /* @__PURE__ */ d.jsxs(\n \"svg\",\n {\n width: e.width ?? 36,\n height: e.height ?? 36,\n viewBox: \"0 0 36 36\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n children: [\n /* @__PURE__ */ d.jsxs(\"g\", { clipPath: \"url(#clip0_8761_26663)\", children: [\n /* @__PURE__ */ d.jsx(\n \"path\",\n {\n d: \"M0 18C0 8.05887 8.05887 0 18 0V0C27.9411 0 36 8.05887 36 18V18C36 27.9411 27.9411 36 18 36V36C8.05887 36 0 27.9411 0 18V18Z\",\n fill: \"url(#paint0_linear_8761_26663)\"\n }\n ),\n /* @__PURE__ */ d.jsx(\n \"path\",\n {\n d: \"M0 18C0 8.05887 8.05887 0 18 0V0C27.9411 0 36 8.05887 36 18V18C36 27.9411 27.9411 36 18 36V36C8.05887 36 0 27.9411 0 18V18Z\",\n fill: \"url(#paint1_linear_8761_26663)\"\n }\n )\n ] }),\n /* @__PURE__ */ d.jsxs(\"defs\", { children: [\n /* @__PURE__ */ d.jsxs(\"linearGradient\", { id: \"paint0_linear_8761_26663\", x1: \"18\", y1: \"-10.2\", x2: \"18\", y2: \"36\", gradientUnits: \"userSpaceOnUse\", children: [\n /* @__PURE__ */ d.jsx(\"stop\", { stopColor: \"#FF68A5\" }),\n /* @__PURE__ */ d.jsx(\"stop\", { offset: \"1\", stopColor: \"#FFAE8C\" })\n ] }),\n /* @__PURE__ */ d.jsxs(\n \"linearGradient\",\n {\n id: \"paint1_linear_8761_26663\",\n x1: \"18\",\n y1: \"-5.4\",\n x2: \"18\",\n y2: \"40.2\",\n gradientUnits: \"userSpaceOnUse\",\n children: [\n /* @__PURE__ */ d.jsx(\"stop\", { stopColor: \"#FFF4E1\" }),\n /* @__PURE__ */ d.jsx(\"stop\", { offset: \"0.53\", stopColor: \"#FFBDB6\" }),\n /* @__PURE__ */ d.jsx(\"stop\", { offset: \"1\", stopColor: \"#FCD9EC\" })\n ]\n }\n ),\n /* @__PURE__ */ d.jsx(\"clipPath\", { id: \"clip0_8761_26663\", children: /* @__PURE__ */ d.jsx(\"rect\", { width: \"36\", height: \"36\", rx: \"18\", fill: \"white\" }) })\n ] })\n ]\n }\n), Wo = ({\n id: e,\n message: t,\n assistantName: r = \"Assistant\",\n badFeedbackTooltipText: n = \"Bad response\",\n goodFeedbackTooltipText: s = \"Good response\",\n loadingText: o = \"Generating...\",\n testId: i = \"assistant-chat-bubble\",\n className: a = \"\",\n relatedSourceDocsCount: u = 0,\n callbacks: f,\n functionToolCalls: l,\n errorText: p,\n icon: m = rs,\n userFeedbackScore: w,\n showLoader: g = !1,\n stickyActions: v = !1,\n disableActions: b = !1,\n enableCodeSyntaxHighlighting: _ = !1,\n disableToolCallsInput: x = !0,\n hideInfoModalAction: S = !1\n}) => {\n const C = V(() => ({\n root: F(qr(g), a),\n content: F(zr),\n sourcesButton: F(Vr),\n assistantName: F(Rt.assistantName)\n }), [a, g]);\n return /* @__PURE__ */ d.jsxs(q, { testId: i, className: C.root, children: [\n /* @__PURE__ */ d.jsx(Ur, { icon: m, size: \"medium\" }),\n /* @__PURE__ */ d.jsxs(q, { direction: \"column\", className: C.content, children: [\n /* @__PURE__ */ d.jsx(Ho, { assistantName: r, showLoader: g }),\n /* @__PURE__ */ d.jsx(\n qo,\n {\n showLoader: g,\n loadingText: o,\n functionToolCalls: l,\n callbacks: f,\n message: t,\n disableToolCallsInput: x,\n errorText: p,\n enableCodeSyntaxHighlighting: _\n }\n ),\n /* @__PURE__ */ d.jsx(\n Vo,\n {\n id: e,\n numOfDocs: u,\n message: t,\n userFeedbackScore: w,\n callbacks: f,\n goodFeedbackTooltipText: s,\n badFeedbackTooltipText: n,\n showLoader: g,\n stickyActions: v,\n disableActions: g || b,\n hideInfoModalAction: S\n }\n )\n ] })\n ] });\n}, Jo = (e) => {\n const {\n id: t,\n className: r,\n testId: n = \"user-chat-bubble\",\n message: s,\n userDisplayName: o = \"You\",\n userName: i,\n stickyActions: a = !1,\n callbacks: u\n } = e, [f, l] = pe(!1), p = V(() => ({\n root: F(qr(!1), r),\n content: F(zr),\n actions: F(Hr({ isSticky: a }), $r)\n }), [r, a]), m = () => {\n l(!0);\n }, w = () => {\n l(!1);\n };\n return /* @__PURE__ */ d.jsxs(\n q,\n {\n testId: n,\n className: p.root,\n onMouseEnter: m,\n onMouseLeave: w,\n onFocus: m,\n onBlur: w,\n children: [\n /* @__PURE__ */ d.jsx(Ur, { userName: i, size: \"medium\" }),\n /* @__PURE__ */ d.jsxs(q, { direction: \"column\", className: p.content, children: [\n /* @__PURE__ */ d.jsx(te, { variant: \"body1\", weight: \"bold\", color: \"primary\", className: \"sd-pb-[4px]\", userSelectable: !1, children: o }),\n /* @__PURE__ */ d.jsx(te, { variant: \"body1\", color: \"primary\", renderAs: \"div\", className: \"amp-mask\", children: s && /* @__PURE__ */ d.jsx(wr, { markdownContent: s, skipHtml: !1 }) }),\n /* @__PURE__ */ d.jsxs(q, { className: p.actions, children: [\n /* @__PURE__ */ d.jsx(\n Ue,\n {\n testId: Z.chat.buttons.edit,\n size: \"small\",\n variant: \"text\",\n color: \"primary\",\n icon: \"Edit\",\n label: \"Edit\",\n onClick: u.onClickEvent(() => u.onEdit(t)),\n disabled: !f\n }\n ),\n /* @__PURE__ */ d.jsx(\n Qn,\n {\n testId: Z.chat.buttons.userMessageCopy,\n contentToCopy: s,\n kind: \"iconButton\",\n onClick: u.onClickEvent(),\n disabled: !f\n }\n )\n ] })\n ] })\n ]\n }\n );\n};\n/**\n * @license\n * Copyright (c) 2018-present, Loomble Inc \n * Copyright (c) 2018-preset, Jay Rylan \n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * Included documentation uses material from the Wikipedia article\n * [List_of_HTTP_status_codes][List of HTTP status codes], which is released\n * under the [CC-BY-SA3][Creative Commons Attribution-Share-Alike License 3.0].\n *\n * [List_of_HTTP_status_codes]: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes\n * [CC-BY-SA3]: https://creativecommons.org/licenses/by-sa/3.0/\n */\nlet ft;\n(function(e) {\n e[e.ClientErrorBadRequest = 400] = \"ClientErrorBadRequest\", e[e.ClientErrorConflict = 409] = \"ClientErrorConflict\", e[e.ClientErrorExpectationFailed = 417] = \"ClientErrorExpectationFailed\", e[e.ClientErrorFailedDependency = 424] = \"ClientErrorFailedDependency\", e[e.ClientErrorForbidden = 403] = \"ClientErrorForbidden\", e[e.ClientErrorGone = 410] = \"ClientErrorGone\", e[e.ClientErrorImATeapot = 418] = \"ClientErrorImATeapot\", e[e.ClientErrorLengthRequired = 411] = \"ClientErrorLengthRequired\", e[e.ClientErrorLocked = 423] = \"ClientErrorLocked\", e[e.ClientErrorLoginTimeOut = 440] = \"ClientErrorLoginTimeOut\", e[e.ClientErrorMethodNotAllowed = 405] = \"ClientErrorMethodNotAllowed\", e[e.ClientErrorMisdirectedRequest = 421] = \"ClientErrorMisdirectedRequest\", e[e.ClientErrorNotAcceptable = 406] = \"ClientErrorNotAcceptable\", e[e.ClientErrorNotFound = 404] = \"ClientErrorNotFound\", e[e.ClientErrorPayloadTooLarge = 413] = \"ClientErrorPayloadTooLarge\", e[e.ClientErrorPaymentRequired = 402] = \"ClientErrorPaymentRequired\", e[e.ClientErrorPreconditionFailed = 412] = \"ClientErrorPreconditionFailed\", e[e.ClientErrorPreconditionRequired = 428] = \"ClientErrorPreconditionRequired\", e[e.ClientErrorProxyAuthRequired = 407] = \"ClientErrorProxyAuthRequired\", e[e.ClientErrorRangeNotSatisfiable = 416] = \"ClientErrorRangeNotSatisfiable\", e[e.ClientErrorRequestHeaderFieldsTooLarge = 431] = \"ClientErrorRequestHeaderFieldsTooLarge\", e[e.ClientErrorRequestTimeout = 408] = \"ClientErrorRequestTimeout\", e[e.ClientErrorRetryWith = 449] = \"ClientErrorRetryWith\", e[e.ClientErrorTooManyRequests = 429] = \"ClientErrorTooManyRequests\", e[e.ClientErrorUnauthorized = 401] = \"ClientErrorUnauthorized\", e[e.ClientErrorUnavailableForLegalReasons = 451] = \"ClientErrorUnavailableForLegalReasons\", e[e.ClientErrorUnprocessableEntity = 422] = \"ClientErrorUnprocessableEntity\", e[e.ClientErrorUnsupportedMediaType = 415] = \"ClientErrorUnsupportedMediaType\", e[e.ClientErrorUpgradeRequired = 426] = \"ClientErrorUpgradeRequired\", e[e.ClientErrorURITooLong = 414] = \"ClientErrorURITooLong\", e[e.InfoContinue = 100] = \"InfoContinue\", e[e.InfoProcessing = 102] = \"InfoProcessing\", e[e.InfoSwitchingProtocols = 101] = \"InfoSwitchingProtocols\", e[e.RedirectFound = 302] = \"RedirectFound\", e[e.RedirectMovedPermanently = 301] = \"RedirectMovedPermanently\", e[e.RedirectMultipleChoices = 300] = \"RedirectMultipleChoices\", e[e.RedirectNotModified = 304] = \"RedirectNotModified\", e[e.RedirectPermanent = 308] = \"RedirectPermanent\", e[e.RedirectSeeOther = 303] = \"RedirectSeeOther\", e[e.RedirectSwitchProxy = 306] = \"RedirectSwitchProxy\", e[e.RedirectTemp = 307] = \"RedirectTemp\", e[e.RedirectUseProxy = 305] = \"RedirectUseProxy\", e[e.ServerErrorBadGateway = 502] = \"ServerErrorBadGateway\", e[e.ServerErrorBandwidthLimitExceeded = 509] = \"ServerErrorBandwidthLimitExceeded\", e[e.ServerErrorGatewayTimeout = 504] = \"ServerErrorGatewayTimeout\", e[e.ServerErrorHTTPVersionNotSupported = 505] = \"ServerErrorHTTPVersionNotSupported\", e[e.ServerErrorInsufficientStorage = 507] = \"ServerErrorInsufficientStorage\", e[e.ServerErrorInternal = 500] = \"ServerErrorInternal\", e[e.ServerErrorLoopDetected = 508] = \"ServerErrorLoopDetected\", e[e.ServerErrorNetworkAuthRequired = 511] = \"ServerErrorNetworkAuthRequired\", e[e.ServerErrorNotExtended = 510] = \"ServerErrorNotExtended\", e[e.ServerErrorNotImplemented = 501] = \"ServerErrorNotImplemented\", e[e.ServerErrorServiceUnavailable = 503] = \"ServerErrorServiceUnavailable\", e[e.ServerErrorVariantAlsoNegotiates = 506] = \"ServerErrorVariantAlsoNegotiates\", e[e.SuccessAccepted = 202] = \"SuccessAccepted\", e[e.SuccessAlreadyReported = 208] = \"SuccessAlreadyReported\", e[e.SuccessCreated = 201] = \"SuccessCreated\", e[e.SuccessIMUsed = 229] = \"SuccessIMUsed\", e[e.SuccessMultiStatus = 207] = \"SuccessMultiStatus\", e[e.SuccessNoContent = 204] = \"SuccessNoContent\", e[e.SuccessNonAuthoritativeInfo = 203] = \"SuccessNonAuthoritativeInfo\", e[e.SuccessOK = 200] = \"SuccessOK\", e[e.SuccessPartialContent = 206] = \"SuccessPartialContent\", e[e.SuccessResetContent = 205] = \"SuccessResetContent\";\n})(ft || (ft = {}));\nconst Al = (e) => {\n var n, s, o, i;\n const { chatError: t, onDismiss: r } = e;\n return ((n = t.response) == null ? void 0 : n.status) === ft.ClientErrorForbidden && t.response.data.detail === \"Credit exceeded.\" ? /* @__PURE__ */ d.jsx(\n xt,\n {\n color: \"error\",\n text: O.chatPage.errors.outOfCredits,\n variant: \"inline\",\n className: \"sd-mb-150\",\n linkProps: { text: O.chatPage.errors.addCredits, to: `${window.location.origin}/account/plans-billing` }\n }\n ) : ((s = t.response) == null ? void 0 : s.status) === ft.ClientErrorPaymentRequired && t.response.data.detail === \"Trial ended.\" ? /* @__PURE__ */ d.jsx(\n xt,\n {\n color: \"error\",\n text: O.chatPage.errors.trialEnded,\n variant: \"inline\",\n className: \"sd-mb-150\",\n linkProps: { text: O.chatPage.errors.upgrade, to: `${window.location.origin}/account/plans-billing` }\n }\n ) : (o = t.response) != null && o.status && ((i = t.response) == null ? void 0 : i.status) >= ft.ServerErrorInternal ? /* @__PURE__ */ d.jsx(xt, { color: \"error\", text: O.chatPage.errors.generalMessage, variant: \"inline\", className: \"sd-mb-150\" }) : /* @__PURE__ */ d.jsx(xt, { color: \"error\", text: t == null ? void 0 : t.message, variant: \"inline\", onDismiss: r, className: \"sd-mb-150\" });\n}, Ol = ({ links: e, texts: { apiDocsText: t, disclaimer: r }, styles: n }) => /* @__PURE__ */ d.jsxs(q, { direction: \"row\", isFullWidth: !0, justifyContent: \"center\", alignItems: \"center\", children: [\n /* @__PURE__ */ d.jsx(\n te,\n {\n renderAs: \"span\",\n variant: \"body1\",\n align: \"center\",\n weight: \"regular\",\n color: \"quaternary\",\n className: F(n == null ? void 0 : n.disclaimer),\n children: r\n }\n ),\n \" \",\n t && /* @__PURE__ */ d.jsx(\n po,\n {\n text: t,\n to: e.apiDocsUrl,\n color: \"inherit\",\n className: F(\"sd-text-text-quaternary sd-prose-body1-regular\", n == null ? void 0 : n.apiDocsText),\n target: \"blank\"\n }\n )\n] }), Go = [\n \"sd-border\",\n \"sd-border-solid\",\n \"sd-border-primary-border-default\",\n \"sd-rounded-medium\",\n \"sd-p-150\",\n \"sd-gap-100\"\n], Ko = [\n \"hover:sd-bg-primitives-coal-50\",\n \"sd-rounded-medium\",\n \"sd-p-100\",\n \"sd-group\",\n \"sd-max-h-375\"\n], Yo = [\"sd-invisible\", \"group-hover:sd-visible\", \"sd-cursor-pointer\"], Xo = ({\n label: e,\n info: t,\n functions: r,\n callbacks: n,\n testId: s,\n className: o\n}) => {\n const i = uo(), a = V(() => ({\n root: F(Go, o),\n functionItem: F(Ko, o),\n menuIcon: F(Yo)\n }), [o]);\n return /* @__PURE__ */ d.jsx(q, { \"data-testid\": s || \"chat-functions\", direction: \"column\", className: \"sd-w-full\", children: /* @__PURE__ */ d.jsx(mo, { label: e, info: t, id: i, children: /* @__PURE__ */ d.jsxs(q, { direction: \"column\", className: a.root, children: [\n r.length > 0 && /* @__PURE__ */ d.jsx(q, { direction: \"column\", className: \"sd-gap-050\", children: r.map((u) => /* @__PURE__ */ d.jsxs(\n q,\n {\n direction: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n className: a.functionItem,\n children: [\n /* @__PURE__ */ d.jsxs(\n q,\n {\n direction: \"row\",\n justifyContent: \"start\",\n alignItems: \"center\",\n className: \"sd-gap-050 sd-text-neutral-main-default\",\n children: [\n /* @__PURE__ */ d.jsx(qe, { size: { width: 18, height: 18 }, icon: \"Function\" }),\n /* @__PURE__ */ d.jsx(\n te,\n {\n variant: \"body1\",\n color: \"inherit\",\n className: \" sd-cursor-default\",\n children: `${u.name}()`\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ d.jsxs(\n go,\n {\n trigger: /* @__PURE__ */ d.jsx(\n qe,\n {\n size: { width: 18, height: 18 },\n icon: \"DotsThreeVertical\",\n className: a.menuIcon\n }\n ),\n children: [\n /* @__PURE__ */ d.jsx(\n fn,\n {\n onClick: () => {\n n.onEdit(u.name);\n },\n text: O.ChatDrawer.modelParameters.functions.actions.edit\n }\n ),\n /* @__PURE__ */ d.jsx(\n fn,\n {\n onClick: () => {\n n.onDelete(u.name);\n },\n text: O.ChatDrawer.modelParameters.functions.actions.delete\n }\n )\n ]\n }\n )\n ]\n },\n u.name\n )) }),\n /* @__PURE__ */ d.jsx(\n Ie,\n {\n size: \"small\",\n leftIcon: \"Plus\",\n text: O.ChatDrawer.modelParameters.functions.addButton,\n onClick: n.toggleModal,\n color: \"neutral\",\n variant: \"shade\"\n }\n )\n ] }) }) });\n};\nXo.displayName = \"ChatFunctionField\";\nconst Qo = [\"md:sd-px-300\"], Zo = [\"sm:sd-px-150\"], ei = [\"sd-h-full\", \"sd-relative\", \"sd-overflow-hidden\", \"sd-w-full\"], ti = [\n \"sd-w-full\",\n \"sd-h-full\",\n \"sd-overflow-auto\",\n \"sd-contain-strict\"\n], ri = [\"sd-w-full\", \"sd-relative\"], ni = [\n \"sd-w-full\",\n \"sd-absolute\",\n \"sd-top-0\",\n \"sd-left-0\",\n \"sd-pb-200\"\n], si = [\"sd-mb-025\", \"last:sd-mb-0\"].concat(\n Zo,\n Qo\n), yn = {\n root: [\"sd-absolute\", \"sd-bottom-100\", \"sd-left-[50%]\", \"sd-z-50\", \"sd-opacity-80\"],\n button: [\"!sd-rounded-full\", \"sd-animate-spinAndSlideUp\"]\n}, oi = ({ onClick: e, shouldRender: t, label: r }) => {\n const n = V(() => ({\n root: F(yn.root),\n button: F(yn.button)\n }), []);\n return !t || !e ? null : /* @__PURE__ */ d.jsx(\"div\", { className: n.root, children: /* @__PURE__ */ d.jsx(Ue, { label: r, icon: \"ArrowDown\", size: \"small\", className: n.button, onClick: e }) });\n}, bn = (e, t) => e.current ? e.current.scrollHeight - e.current.scrollTop - e.current.clientHeight <= t : !1, ii = ({\n scrollableRef: e,\n internalRef: t,\n scrollBottomPixelThreshold: r = 30,\n enableAutoScroll: n = !1\n}) => {\n const [s, o] = pe(!0), i = we(() => {\n e.current && e.current.scrollTo({\n top: e.current.scrollHeight + r\n }), o(!0);\n }, [r, e, e.current]);\n return Ft(() => {\n const a = () => {\n if (!e.current)\n return;\n const u = bn(e, r);\n o(u);\n };\n return e.current && e.current.addEventListener(\"scroll\", a), () => {\n e.current && e.current.removeEventListener(\"scroll\", a);\n };\n }, [r, e, e.current, n]), Ft(() => {\n const a = new ResizeObserver(() => {\n if (n && s && t.current) {\n i();\n return;\n }\n const u = bn(e, r);\n o(u);\n });\n return t.current && a.observe(t.current), () => {\n t.current && a.unobserve(t.current);\n };\n }, [n, s, t, t.current]), { isAtBottom: s, scrollToBottom: i };\n}, ai = (e) => {\n const {\n id: t,\n fileName: r,\n fileType: n,\n className: s,\n isLoading: o = !1,\n testId: i = \"UserDocumentChatBubble\",\n stickyActions: a = !1,\n callbacks: u\n } = e, f = V(() => ({\n root: F(qr(!1), s),\n content: F(zr),\n actions: F(Hr({ isSticky: a }), $r)\n }), [s, a]);\n return /* @__PURE__ */ d.jsxs(q, { testId: i, className: f.root, children: [\n /* @__PURE__ */ d.jsx(\n Ur,\n {\n icon: () => /* @__PURE__ */ d.jsx(qe, { icon: \"Paperclip\" }),\n size: \"medium\",\n className: \"sd-border-solid sd-border sd-border-primary-border-default\"\n }\n ),\n /* @__PURE__ */ d.jsxs(q, { direction: \"column\", className: f.content, children: [\n /* @__PURE__ */ d.jsx(te, { variant: \"body1\", weight: \"bold\", color: \"primary\", className: \"sd-pb-[4px]\", userSelectable: !1, children: \"Attachment\" }),\n /* @__PURE__ */ d.jsx(yo, { fileName: r, fileType: n.toUpperCase(), isLoading: o }),\n /* @__PURE__ */ d.jsx(q, { className: `${f.actions} ${a && \"sd-opacity-100\"}`, children: /* @__PURE__ */ d.jsx(\n Ue,\n {\n disabled: o,\n className: o ? \"sd-opacity-0\" : \"\",\n testId: Z.chat.buttons.deleteDocument,\n size: \"small\",\n variant: \"text\",\n color: \"primary\",\n icon: \"Trash\",\n label: O.chatPage.actions.deleteDocument,\n onClick: u.onClickEvent(() => {\n var l;\n return (l = u.onDelete) == null ? void 0 : l.call(u, t);\n })\n }\n ) })\n ] })\n ] });\n}, ns = ({\n messageId: e,\n content: t,\n document: r,\n userName: n,\n callbacks: s\n}) => r ? /* @__PURE__ */ d.jsx(\n ai,\n {\n id: e,\n fileName: r.name,\n fileType: r.type,\n isLoading: r.isLoading,\n userName: n,\n callbacks: { onDelete: s.onDeleteDocument, onClickEvent: s.onClickEvent },\n stickyActions: !1\n }\n) : /* @__PURE__ */ d.jsx(\n Jo,\n {\n id: e,\n message: t || \"\",\n userName: n,\n callbacks: { onEdit: s.onEdit, onClickEvent: s.onClickEvent },\n stickyActions: !1\n }\n);\nns.displayName = \"FeedUserBubble\";\nconst ci = (e) => new Set(e.map((t) => t.file_id)).size, ss = ({\n messageId: e,\n content: t,\n feedbackScore: r,\n ragSources: n,\n callbacks: s,\n toolCalls: o,\n uiState: i,\n loaderText: a\n}) => {\n const u = V(() => o == null ? void 0 : o.map((l) => ({\n id: l.id,\n functionSignature: Do(l.function)\n })), [o]), f = n ? ci(n) : 0;\n return /* @__PURE__ */ d.jsx(\n Wo,\n {\n id: e,\n message: t,\n relatedSourceDocsCount: f,\n assistantName: \"Jamba\",\n callbacks: {\n onClickEvent: s.onClickEvent,\n onEdit: s.onEdit,\n onRegenerate: s.onRegenerate,\n onFeedback: s.onFeedback,\n onTypingEffectComplete: () => s.toggleAiTypingEffect(!1),\n showMessageInfo: s.showMessageInfo,\n showSources: s.showSources,\n onFunctionCallAnswer: s.onFunctionCallAnswer ? s.onFunctionCallAnswer : () => {\n console.warn(\"onFunctionCallAnswer is not provided\");\n }\n },\n stickyActions: i.isLastMessageInFeed,\n showLoader: i.showLoader,\n loadingText: a,\n userFeedbackScore: r,\n showTypingEffect: !1,\n disableToolCallsInput: !i.isLastMessageInFeed,\n functionToolCalls: u,\n enableCodeSyntaxHighlighting: i.isLastMessageInFeed ? !i.isGenerating : !0,\n disableActions: i.isLastMessageInFeed && i.isGenerating,\n hideInfoModalAction: i.hideMetadata\n }\n );\n};\nss.displayName = \"FeedAssistantBubble\";\nconst li = ({ message: e, callbacks: t, userName: r, uiState: n, loaderText: s }) => {\n var o, i;\n switch (e.role) {\n case \"user\":\n return /* @__PURE__ */ d.jsx(\n ns,\n {\n messageId: e.id,\n content: e.content,\n document: e.document,\n userName: r,\n callbacks: t\n }\n );\n case \"system\":\n case \"assistant\":\n return /* @__PURE__ */ d.jsx(\n ss,\n {\n messageId: e.id,\n content: e.content,\n feedbackScore: (o = e.metadata) == null ? void 0 : o.feedbackScore,\n ragSources: (i = e.metadata) == null ? void 0 : i.sources,\n toolCalls: e.tool_calls,\n callbacks: t,\n uiState: n,\n loaderText: s\n }\n );\n case \"tool\":\n default:\n return null;\n }\n};\nfunction Pl({\n className: e = \"\",\n testId: t = \"chat-messages-feed\",\n messages: r = [],\n callbacks: n,\n userName: s,\n loadingText: o = \"Generating...\",\n isGenerating: i = !1,\n enableAutoScrollingOnBottom: a = !0,\n scrollToBottomText: u = \"Scroll to bottom\",\n hideMetadata: f = !1\n}) {\n const l = Er(), p = Er(), m = V(\n () => ({\n root: F(ei),\n scrollContainer: F(ti, e),\n scrollContainerInnerWrapper: F(ri),\n scrollContainerInnerWrapperAbsolute: F(ni),\n scrollItem: F(si)\n }),\n [e]\n ), { scrollToBottom: w, isAtBottom: g } = ii({\n scrollableRef: l,\n internalRef: p,\n enableAutoScroll: a\n }), v = V(\n () => r.map((b, _) => {\n var x;\n return /* @__PURE__ */ d.jsx(\n q,\n {\n renderAs: \"div\",\n isFullWidth: !0,\n justifyContent: \"center\",\n \"data-index\": _,\n className: m.scrollItem,\n children: /* @__PURE__ */ d.jsx(\n li,\n {\n message: b,\n callbacks: n,\n userName: s,\n loaderText: o,\n uiState: {\n isGenerating: i,\n isLastMessageInFeed: _ === r.length - 1,\n showLoader: ((x = b == null ? void 0 : b.content) == null ? void 0 : x.length) === 0,\n hideMetadata: f\n }\n }\n )\n },\n b.id\n );\n }),\n [r, m.scrollItem, n, s, o, i, f]\n );\n return /* @__PURE__ */ d.jsxs(\"div\", { className: m.root, children: [\n /* @__PURE__ */ d.jsx(oi, { onClick: w, shouldRender: !g, label: u }),\n /* @__PURE__ */ d.jsx(\"div\", { className: m.scrollContainer, \"data-testid\": t, ref: l, children: /* @__PURE__ */ d.jsx(\"div\", { className: m.scrollContainerInnerWrapper, children: /* @__PURE__ */ d.jsx(\"div\", { className: m.scrollContainerInnerWrapperAbsolute, ref: p, children: v }) }) })\n ] });\n}\nconst ui = [\"lg:sd-flex-col\", \"lg:sd-w-full\", \"lg:sd-px-300\"], di = [\"lg:sd-w-full\", \"lg:sd-max-w-none\"], fi = [\"sd-max-w-[750px]\", \"sd-gap-150\"].concat(ui), hi = [\"sd-animate-slideUp\"].concat(di), jl = ({ onClick: e, className: t }) => {\n const r = V(() => ({\n root: F(fi, t),\n card: F(hi)\n }), [t]);\n return /* @__PURE__ */ d.jsxs(q, { direction: \"row\", justifyContent: \"center\", alignItems: \"center\", className: r.root, children: [\n /* @__PURE__ */ d.jsx(\n ir,\n {\n prompt: O.chatPage.emptyChat.suggestionCards[0].title,\n onClick: () => e(O.chatPage.emptyChat.suggestionCards[0].prompt),\n className: r.card,\n testId: Z.chat.buttons.promptCard\n }\n ),\n /* @__PURE__ */ d.jsx(\n ir,\n {\n prompt: O.chatPage.emptyChat.suggestionCards[1].title,\n onClick: () => e(O.chatPage.emptyChat.suggestionCards[1].prompt),\n className: r.card,\n testId: Z.chat.buttons.promptCard\n }\n ),\n /* @__PURE__ */ d.jsx(\n ir,\n {\n prompt: O.chatPage.emptyChat.suggestionCards[2].title,\n onClick: () => e(O.chatPage.emptyChat.suggestionCards[2].prompt),\n className: r.card,\n testId: Z.chat.buttons.promptCard\n }\n )\n ] });\n};\nvar pi = typeof _t == \"object\" && _t && _t.Object === Object && _t, mi = typeof self == \"object\" && self && self.Object === Object && self;\npi || mi || Function(\"return this\")();\nvar gi = typeof window < \"u\" ? fo : Ft, yi = typeof window > \"u\";\nfunction bi(e, {\n defaultValue: t = !1,\n initializeWithValue: r = !0\n} = {}) {\n const n = (a) => yi ? t : window.matchMedia(a).matches, [s, o] = pe(() => r ? n(e) : t);\n function i() {\n o(n(e));\n }\n return gi(() => {\n const a = window.matchMedia(e);\n return i(), a.addListener ? a.addListener(i) : a.addEventListener(\"change\", i), () => {\n a.removeListener ? a.removeListener(i) : a.removeEventListener(\"change\", i);\n };\n }, [e]), s;\n}\nconst vi = \"(max-width: 768px)\", Ei = [\"sm:sd-gap-[8px]\"], wi = [\"sm:sd-block\"], xi = [\"md:sd-block\"], _i = [\"sd-gap-100\", \"sd-w-full\", \"sd-flex-grow\", \"sd-animate-slideDown\"], Si = [\"sd-gap-150\"].concat(Ei), Ci = [\"sd-hidden\"].concat(wi, xi), Fl = ({ title: e, subtitle: t }) => {\n const r = V(() => ({\n root: F(_i),\n texts: F(Si),\n mobileTexts: F(Ci)\n }), []), n = bi(vi);\n return /* @__PURE__ */ d.jsxs(\n q,\n {\n testId: \"empty-chat-header\",\n direction: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n className: r.root,\n children: [\n /* @__PURE__ */ d.jsx(rs, { width: 32, height: 36 }),\n /* @__PURE__ */ d.jsxs(q, { direction: \"column\", alignItems: \"center\", justifyContent: \"center\", className: r.texts, children: [\n /* @__PURE__ */ d.jsx(te, { variant: \"h5\", weight: \"bold\", userSelectable: !1, children: e }),\n /* @__PURE__ */ d.jsx(te, { variant: n ? \"subtitle2\" : \"body1\", weight: \"regular\", userSelectable: !1, color: \"secondary\", children: t })\n ] })\n ]\n }\n );\n}, Il = ({\n isOpen: e,\n documentCount: t,\n fileName: r,\n onSubmit: n,\n onCancel: s,\n loading: o\n}) => {\n const i = !o && /* @__PURE__ */ d.jsx(\n Ie,\n {\n color: \"primary\",\n variant: \"contained\",\n text: O.modals.deleteDocumentModal.submitButton(t),\n \"aria-label\": O.modals.deleteDocumentModal.submitButton(t),\n onClick: () => n()\n }\n ), a = !o && /* @__PURE__ */ d.jsx(\n Ie,\n {\n variant: \"outline\",\n text: O.modals.deleteDocumentModal.cancelButton,\n \"aria-label\": O.modals.deleteDocumentModal.cancelButton,\n onClick: s\n }\n );\n return /* @__PURE__ */ d.jsx(\n Lt,\n {\n testId: \"DeleteDocumentModal\",\n open: e,\n mainAction: i,\n secondaryAction: a,\n title: o ? O.modals.deleteDocumentModal.deleteInProgress(t) : O.modals.deleteDocumentModal.title(t),\n hideCloseIcon: !0,\n children: o ? /* @__PURE__ */ d.jsx(bo, {}) : /* @__PURE__ */ d.jsxs(te, { children: [\n O.modals.deleteDocumentModal.firstMessagePart(t),\n t === 1 && /* @__PURE__ */ d.jsx(\"b\", { children: \" \" + r }),\n O.modals.deleteDocumentModal.secondMessagePart\n ] })\n }\n );\n}, Ti = [\"sd-w-full\", \"sd-h-full\"], Ml = ({ isOpen: e, content: t, onSubmit: r, onCancel: n, onClickEvent: s }) => {\n const [o, i] = pe(t), a = V(() => ({\n textareaClasses: F(Ti)\n }), []), u = (p) => {\n i(p.target.value);\n }, f = /* @__PURE__ */ d.jsx(\n Ie,\n {\n testId: Z.chat.modals.editMessageModal.submit,\n color: \"primary\",\n variant: \"contained\",\n text: O.chatPage.modals.editMessageModal.submitButton,\n \"aria-label\": O.chatPage.modals.editMessageModal.submitButton,\n disabled: !o || o === t,\n onClick: s(() => r(o))\n }\n ), l = /* @__PURE__ */ d.jsx(\n Ie,\n {\n testId: Z.chat.modals.editMessageModal.cancel,\n variant: \"outline\",\n text: O.chatPage.modals.editMessageModal.cancelButton,\n \"aria-label\": O.chatPage.modals.editMessageModal.cancelButton,\n onClick: s(n)\n }\n );\n return /* @__PURE__ */ d.jsx(\n Lt,\n {\n testId: \"edit-message-modal\",\n open: e,\n mainAction: f,\n secondaryAction: l,\n title: O.chatPage.modals.editMessageModal.title,\n subtitle: O.chatPage.modals.editMessageModal.subtitle,\n className: \"sd-h-[600px]\",\n size: \"lg\",\n hideCloseIcon: !0,\n children: /* @__PURE__ */ d.jsx(\n vo,\n {\n testId: \"edit-message-textarea\",\n className: a.textareaClasses,\n ariaLabel: O.chatPage.modals.editMessageModal.title,\n value: o,\n onInput: u\n }\n )\n }\n );\n}, Ri = [\n \"sd-rounded-medium\",\n \"sd-bg-disabled-background\",\n \"sd-border\",\n \"sd-border-solid\",\n \"sd-border-disabled-border\",\n \"sd-mt-075\",\n \"sd-mb-150\"\n], Ai = [\n \"sd-p-100\",\n \"sd-border-b\",\n \"sd-border-solid\",\n \"sd-border-disabled-border\",\n \"even:sd-bg-neutrals-almostWhite\",\n \"last:sd-border-none\",\n \"last:sd-rounded-medium\"\n], Oi = [\n \"sd-rounded-medium\",\n \"sd-bg-disabled-background\",\n \"sd-border\",\n \"sd-border-solid\",\n \"sd-border-disabled-border\",\n \"sd-mt-075\",\n \"sd-mb-150\",\n \"last:sd-mb-0\"\n], Pi = [\"sd-px-100\", \"sd-py-075\"], ji = ({ title: e, parameters: t }) => {\n const r = V(() => ({\n modelParameters: F(Ri),\n modelParameter: F(Ai)\n }), []), n = we(() => t.filter((s) => s.value).map((s) => /* @__PURE__ */ d.jsx(\n te,\n {\n variant: \"body1\",\n className: F(r.modelParameter),\n children: `${s.displayName}: ${s.value}`\n },\n s.key\n )), [t, r.modelParameter]);\n return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [\n /* @__PURE__ */ d.jsx(te, { variant: \"body1\", color: \"primary\", children: e }),\n /* @__PURE__ */ d.jsx(\"div\", { className: r.modelParameters, children: n() })\n ] });\n}, vn = ({ title: e, value: t }) => {\n const r = V(() => ({\n infoSection: F(Oi),\n infoSectionValue: F(Pi)\n }), []);\n return t ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [\n /* @__PURE__ */ d.jsx(te, { variant: \"body1\", color: \"primary\", children: e }),\n /* @__PURE__ */ d.jsx(\"div\", { className: r.infoSection, children: /* @__PURE__ */ d.jsx(te, { variant: \"body1\", className: r.infoSectionValue, children: `${t}` }) })\n ] }) : null;\n}, Dl = ({ isOpen: e, onOpenChanged: t, model: r, response: n, parameters: s }) => {\n const o = O.chatPage.modals.messageInfoModal, i = [\n { key: \"model\", displayName: o.modelParam, value: r },\n ...s\n ];\n return /* @__PURE__ */ d.jsxs(\n Lt,\n {\n testId: \"message-info-modal\",\n open: e,\n title: o.title,\n className: \"sd-h-auto\",\n size: \"lg\",\n onOpenChange: t,\n enableOutsideInteraction: !0,\n children: [\n /* @__PURE__ */ d.jsx(ji, { title: o.modelParametersTitle, parameters: i }),\n /* @__PURE__ */ d.jsx(vn, { title: o.responseTokensCount, value: n.responseTokensCount }),\n /* @__PURE__ */ d.jsx(vn, { title: o.responseLatency, value: n.responseLatency })\n ]\n }\n );\n}, kl = ({ isOpen: e, messageId: t, onCancel: r, onSubmit: n, onClickEvent: s }) => {\n const o = /* @__PURE__ */ d.jsx(\n Ie,\n {\n testId: Z.chat.modals.regenerateModal.regenerate,\n color: \"primary\",\n variant: \"contained\",\n onClick: s(() => n(t)),\n text: O.chatPage.modals.regenerateModal.submitButton,\n \"aria-label\": O.chatPage.modals.regenerateModal.submitButton\n }\n ), i = /* @__PURE__ */ d.jsx(\n Ie,\n {\n testId: Z.chat.modals.regenerateModal.cancel,\n variant: \"outline\",\n onClick: s(() => r(t)),\n text: O.chatPage.modals.regenerateModal.cancelButton,\n \"aria-label\": O.chatPage.modals.regenerateModal.cancelButton\n }\n );\n return /* @__PURE__ */ d.jsx(\n Lt,\n {\n testId: \"regenerate-message-modal\",\n open: e,\n mainAction: o,\n secondaryAction: i,\n title: O.chatPage.modals.regenerateModal.title,\n hideCloseIcon: !0,\n children: /* @__PURE__ */ d.jsx(te, { variant: \"body1\", color: \"primary\", children: O.chatPage.modals.regenerateModal.message })\n }\n );\n}, Nl = ({ children: e }) => /* @__PURE__ */ d.jsx(Eo, { children: e }), En = (e) => {\n let t;\n const r = /* @__PURE__ */ new Set(), n = (l, p) => {\n const m = typeof l == \"function\" ? l(t) : l;\n if (!Object.is(m, t)) {\n const w = t;\n t = p ?? (typeof m != \"object\" || m === null) ? m : Object.assign({}, t, m), r.forEach((g) => g(t, w));\n }\n }, s = () => t, u = { setState: n, getState: s, getInitialState: () => f, subscribe: (l) => (r.add(l), () => r.delete(l)), destroy: () => {\n r.clear();\n } }, f = t = e(n, s, u);\n return u;\n}, Fi = (e) => e ? En(e) : En;\nvar _r = { exports: {} }, ar = {}, Ct = { exports: {} }, cr = {};\n/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar wn;\nfunction Ii() {\n if (wn)\n return cr;\n wn = 1;\n var e = Ve;\n function t(p, m) {\n return p === m && (p !== 0 || 1 / p === 1 / m) || p !== p && m !== m;\n }\n var r = typeof Object.is == \"function\" ? Object.is : t, n = e.useState, s = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;\n function a(p, m) {\n var w = m(), g = n({ inst: { value: w, getSnapshot: m } }), v = g[0].inst, b = g[1];\n return o(function() {\n v.value = w, v.getSnapshot = m, u(v) && b({ inst: v });\n }, [p, w, m]), s(function() {\n return u(v) && b({ inst: v }), p(function() {\n u(v) && b({ inst: v });\n });\n }, [p]), i(w), w;\n }\n function u(p) {\n var m = p.getSnapshot;\n p = p.value;\n try {\n var w = m();\n return !r(p, w);\n } catch {\n return !0;\n }\n }\n function f(p, m) {\n return m();\n }\n var l = typeof window > \"u\" || typeof window.document > \"u\" || typeof window.document.createElement > \"u\" ? f : a;\n return cr.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : l, cr;\n}\nvar lr = {};\n/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar xn;\nfunction Mi() {\n return xn || (xn = 1, process.env.NODE_ENV !== \"production\" && function() {\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < \"u\" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == \"function\" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n var e = Ve, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n function r(S) {\n {\n for (var C = arguments.length, j = new Array(C > 1 ? C - 1 : 0), R = 1; R < C; R++)\n j[R - 1] = arguments[R];\n n(\"error\", S, j);\n }\n }\n function n(S, C, j) {\n {\n var R = t.ReactDebugCurrentFrame, P = R.getStackAddendum();\n P !== \"\" && (C += \"%s\", j = j.concat([P]));\n var L = j.map(function(H) {\n return String(H);\n });\n L.unshift(\"Warning: \" + C), Function.prototype.apply.call(console[S], console, L);\n }\n }\n function s(S, C) {\n return S === C && (S !== 0 || 1 / S === 1 / C) || S !== S && C !== C;\n }\n var o = typeof Object.is == \"function\" ? Object.is : s, i = e.useState, a = e.useEffect, u = e.useLayoutEffect, f = e.useDebugValue, l = !1, p = !1;\n function m(S, C, j) {\n l || e.startTransition !== void 0 && (l = !0, r(\"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"));\n var R = C();\n if (!p) {\n var P = C();\n o(R, P) || (r(\"The result of getSnapshot should be cached to avoid an infinite loop\"), p = !0);\n }\n var L = i({\n inst: {\n value: R,\n getSnapshot: C\n }\n }), H = L[0].inst, xe = L[1];\n return u(function() {\n H.value = R, H.getSnapshot = C, w(H) && xe({\n inst: H\n });\n }, [S, R, C]), a(function() {\n w(H) && xe({\n inst: H\n });\n var Me = function() {\n w(H) && xe({\n inst: H\n });\n };\n return S(Me);\n }, [S]), f(R), R;\n }\n function w(S) {\n var C = S.getSnapshot, j = S.value;\n try {\n var R = C();\n return !o(j, R);\n } catch {\n return !0;\n }\n }\n function g(S, C, j) {\n return C();\n }\n var v = typeof window < \"u\" && typeof window.document < \"u\" && typeof window.document.createElement < \"u\", b = !v, _ = b ? g : m, x = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : _;\n lr.useSyncExternalStore = x, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < \"u\" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == \"function\" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n }()), lr;\n}\nvar _n;\nfunction os() {\n return _n || (_n = 1, process.env.NODE_ENV === \"production\" ? Ct.exports = Ii() : Ct.exports = Mi()), Ct.exports;\n}\n/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar Sn;\nfunction Di() {\n if (Sn)\n return ar;\n Sn = 1;\n var e = Ve, t = os();\n function r(f, l) {\n return f === l && (f !== 0 || 1 / f === 1 / l) || f !== f && l !== l;\n }\n var n = typeof Object.is == \"function\" ? Object.is : r, s = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, a = e.useMemo, u = e.useDebugValue;\n return ar.useSyncExternalStoreWithSelector = function(f, l, p, m, w) {\n var g = o(null);\n if (g.current === null) {\n var v = { hasValue: !1, value: null };\n g.current = v;\n } else\n v = g.current;\n g = a(function() {\n function _(R) {\n if (!x) {\n if (x = !0, S = R, R = m(R), w !== void 0 && v.hasValue) {\n var P = v.value;\n if (w(P, R))\n return C = P;\n }\n return C = R;\n }\n if (P = C, n(S, R))\n return P;\n var L = m(R);\n return w !== void 0 && w(P, L) ? P : (S = R, C = L);\n }\n var x = !1, S, C, j = p === void 0 ? null : p;\n return [function() {\n return _(l());\n }, j === null ? void 0 : function() {\n return _(j());\n }];\n }, [l, p, m, w]);\n var b = s(f, g[0], g[1]);\n return i(function() {\n v.hasValue = !0, v.value = b;\n }, [b]), u(b), b;\n }, ar;\n}\nvar ur = {};\n/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar Cn;\nfunction ki() {\n return Cn || (Cn = 1, process.env.NODE_ENV !== \"production\" && function() {\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < \"u\" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == \"function\" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n var e = Ve, t = os();\n function r(l, p) {\n return l === p && (l !== 0 || 1 / l === 1 / p) || l !== l && p !== p;\n }\n var n = typeof Object.is == \"function\" ? Object.is : r, s = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, a = e.useMemo, u = e.useDebugValue;\n function f(l, p, m, w, g) {\n var v = o(null), b;\n v.current === null ? (b = {\n hasValue: !1,\n value: null\n }, v.current = b) : b = v.current;\n var _ = a(function() {\n var j = !1, R, P, L = function(be) {\n if (!j) {\n j = !0, R = be;\n var X = w(be);\n if (g !== void 0 && b.hasValue) {\n var re = b.value;\n if (g(re, X))\n return P = re, re;\n }\n return P = X, X;\n }\n var ve = R, _e = P;\n if (n(ve, be))\n return _e;\n var ce = w(be);\n return g !== void 0 && g(_e, ce) ? _e : (R = be, P = ce, ce);\n }, H = m === void 0 ? null : m, xe = function() {\n return L(p());\n }, Me = H === null ? void 0 : function() {\n return L(H());\n };\n return [xe, Me];\n }, [p, m, w, g]), x = _[0], S = _[1], C = s(l, x, S);\n return i(function() {\n b.hasValue = !0, b.value = C;\n }, [C]), u(C), C;\n }\n ur.useSyncExternalStoreWithSelector = f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < \"u\" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == \"function\" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n }()), ur;\n}\nprocess.env.NODE_ENV === \"production\" ? _r.exports = Di() : _r.exports = ki();\nvar Ni = _r.exports;\nconst Bi = /* @__PURE__ */ _o(Ni), { useDebugValue: Li } = Ve, { useSyncExternalStoreWithSelector: Ui } = Bi;\nconst qi = (e) => e;\nfunction zi(e, t = qi, r) {\n const n = Ui(\n e.subscribe,\n e.getState,\n e.getServerState || e.getInitialState,\n t,\n r\n );\n return Li(n), n;\n}\nconst Tn = (e) => {\n const t = typeof e == \"function\" ? Fi(e) : e, r = (n, s) => zi(t, n, s);\n return Object.assign(r, t), r;\n}, is = (e) => e ? Tn(e) : Tn;\nvar as = Symbol.for(\"immer-nothing\"), Rn = Symbol.for(\"immer-draftable\"), de = Symbol.for(\"immer-state\"), Hi = process.env.NODE_ENV !== \"production\" ? [\n // All error codes, starting by 0:\n function(e) {\n return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \\`enable${e}()\\` when initializing your application.`;\n },\n function(e) {\n return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`;\n },\n \"This object has been frozen and should not be mutated\",\n function(e) {\n return \"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + e;\n },\n \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",\n \"Immer forbids circular references\",\n \"The first or second argument to `produce` must be a function\",\n \"The third argument to `produce` must be a function or undefined\",\n \"First argument to `createDraft` must be a plain object, an array, or an immerable object\",\n \"First argument to `finishDraft` must be a draft returned by `createDraft`\",\n function(e) {\n return `'current' expects a draft, got: ${e}`;\n },\n \"Object.defineProperty() cannot be used on an Immer draft\",\n \"Object.setPrototypeOf() cannot be used on an Immer draft\",\n \"Immer only supports deleting array indices\",\n \"Immer only supports setting array indices and the 'length' property\",\n function(e) {\n return `'original' expects a draft, got: ${e}`;\n }\n // Note: if more errors are added, the errorOffset in Patches.ts should be increased\n // See Patches.ts for additional errors\n] : [];\nfunction ie(e, ...t) {\n if (process.env.NODE_ENV !== \"production\") {\n const r = Hi[e], n = typeof r == \"function\" ? r.apply(null, t) : r;\n throw new Error(`[Immer] ${n}`);\n }\n throw new Error(\n `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`\n );\n}\nvar Ze = Object.getPrototypeOf;\nfunction et(e) {\n return !!e && !!e[de];\n}\nfunction ze(e) {\n var t;\n return e ? cs(e) || Array.isArray(e) || !!e[Rn] || !!((t = e.constructor) != null && t[Rn]) || qt(e) || zt(e) : !1;\n}\nvar $i = Object.prototype.constructor.toString();\nfunction cs(e) {\n if (!e || typeof e != \"object\")\n return !1;\n const t = Ze(e);\n if (t === null)\n return !0;\n const r = Object.hasOwnProperty.call(t, \"constructor\") && t.constructor;\n return r === Object ? !0 : typeof r == \"function\" && Function.toString.call(r) === $i;\n}\nfunction It(e, t) {\n Ut(e) === 0 ? Reflect.ownKeys(e).forEach((r) => {\n t(r, e[r], e);\n }) : e.forEach((r, n) => t(n, r, e));\n}\nfunction Ut(e) {\n const t = e[de];\n return t ? t.type_ : Array.isArray(e) ? 1 : qt(e) ? 2 : zt(e) ? 3 : 0;\n}\nfunction Sr(e, t) {\n return Ut(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);\n}\nfunction ls(e, t, r) {\n const n = Ut(e);\n n === 2 ? e.set(t, r) : n === 3 ? e.add(r) : e[t] = r;\n}\nfunction Vi(e, t) {\n return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;\n}\nfunction qt(e) {\n return e instanceof Map;\n}\nfunction zt(e) {\n return e instanceof Set;\n}\nfunction Ne(e) {\n return e.copy_ || e.base_;\n}\nfunction Cr(e, t) {\n if (qt(e))\n return new Map(e);\n if (zt(e))\n return new Set(e);\n if (Array.isArray(e))\n return Array.prototype.slice.call(e);\n const r = cs(e);\n if (t === !0 || t === \"class_only\" && !r) {\n const n = Object.getOwnPropertyDescriptors(e);\n delete n[de];\n let s = Reflect.ownKeys(n);\n for (let o = 0; o < s.length; o++) {\n const i = s[o], a = n[i];\n a.writable === !1 && (a.writable = !0, a.configurable = !0), (a.get || a.set) && (n[i] = {\n configurable: !0,\n writable: !0,\n // could live with !!desc.set as well here...\n enumerable: a.enumerable,\n value: e[i]\n });\n }\n return Object.create(Ze(e), n);\n } else {\n const n = Ze(e);\n if (n !== null && r)\n return { ...e };\n const s = Object.create(n);\n return Object.assign(s, e);\n }\n}\nfunction Wr(e, t = !1) {\n return Ht(e) || et(e) || !ze(e) || (Ut(e) > 1 && (e.set = e.add = e.clear = e.delete = Wi), Object.freeze(e), t && Object.entries(e).forEach(([r, n]) => Wr(n, !0))), e;\n}\nfunction Wi() {\n ie(2);\n}\nfunction Ht(e) {\n return Object.isFrozen(e);\n}\nvar Ji = {};\nfunction He(e) {\n const t = Ji[e];\n return t || ie(0, e), t;\n}\nvar ht;\nfunction us() {\n return ht;\n}\nfunction Gi(e, t) {\n return {\n drafts_: [],\n parent_: e,\n immer_: t,\n // Whenever the modified draft contains a draft from another scope, we\n // need to prevent auto-freezing so the unowned draft can be finalized.\n canAutoFreeze_: !0,\n unfinalizedDrafts_: 0\n };\n}\nfunction An(e, t) {\n t && (He(\"Patches\"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);\n}\nfunction Tr(e) {\n Rr(e), e.drafts_.forEach(Ki), e.drafts_ = null;\n}\nfunction Rr(e) {\n e === ht && (ht = e.parent_);\n}\nfunction On(e) {\n return ht = Gi(ht, e);\n}\nfunction Ki(e) {\n const t = e[de];\n t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;\n}\nfunction Pn(e, t) {\n t.unfinalizedDrafts_ = t.drafts_.length;\n const r = t.drafts_[0];\n return e !== void 0 && e !== r ? (r[de].modified_ && (Tr(t), ie(4)), ze(e) && (e = Mt(t, e), t.parent_ || Dt(t, e)), t.patches_ && He(\"Patches\").generateReplacementPatches_(\n r[de].base_,\n e,\n t.patches_,\n t.inversePatches_\n )) : e = Mt(t, r, []), Tr(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== as ? e : void 0;\n}\nfunction Mt(e, t, r) {\n if (Ht(t))\n return t;\n const n = t[de];\n if (!n)\n return It(\n t,\n (s, o) => jn(e, n, t, s, o, r)\n ), t;\n if (n.scope_ !== e)\n return t;\n if (!n.modified_)\n return Dt(e, n.base_, !0), n.base_;\n if (!n.finalized_) {\n n.finalized_ = !0, n.scope_.unfinalizedDrafts_--;\n const s = n.copy_;\n let o = s, i = !1;\n n.type_ === 3 && (o = new Set(s), s.clear(), i = !0), It(\n o,\n (a, u) => jn(e, n, s, a, u, r, i)\n ), Dt(e, s, !1), r && e.patches_ && He(\"Patches\").generatePatches_(\n n,\n r,\n e.patches_,\n e.inversePatches_\n );\n }\n return n.copy_;\n}\nfunction jn(e, t, r, n, s, o, i) {\n if (process.env.NODE_ENV !== \"production\" && s === r && ie(5), et(s)) {\n const a = o && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.\n !Sr(t.assigned_, n) ? o.concat(n) : void 0, u = Mt(e, s, a);\n if (ls(r, n, u), et(u))\n e.canAutoFreeze_ = !1;\n else\n return;\n } else\n i && r.add(s);\n if (ze(s) && !Ht(s)) {\n if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)\n return;\n Mt(e, s), (!t || !t.scope_.parent_) && typeof n != \"symbol\" && Object.prototype.propertyIsEnumerable.call(r, n) && Dt(e, s);\n }\n}\nfunction Dt(e, t, r = !1) {\n !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && Wr(t, r);\n}\nfunction Yi(e, t) {\n const r = Array.isArray(e), n = {\n type_: r ? 1 : 0,\n // Track which produce call this is associated with.\n scope_: t ? t.scope_ : us(),\n // True for both shallow and deep changes.\n modified_: !1,\n // Used during finalization.\n finalized_: !1,\n // Track which properties have been assigned (true) or deleted (false).\n assigned_: {},\n // The parent draft state.\n parent_: t,\n // The base state.\n base_: e,\n // The base proxy.\n draft_: null,\n // set below\n // The base copy with any updated values.\n copy_: null,\n // Called by the `produce` function.\n revoke_: null,\n isManual_: !1\n };\n let s = n, o = Jr;\n r && (s = [n], o = pt);\n const { revoke: i, proxy: a } = Proxy.revocable(s, o);\n return n.draft_ = a, n.revoke_ = i, a;\n}\nvar Jr = {\n get(e, t) {\n if (t === de)\n return e;\n const r = Ne(e);\n if (!Sr(r, t))\n return Xi(e, r, t);\n const n = r[t];\n return e.finalized_ || !ze(n) ? n : n === dr(e.base_, t) ? (fr(e), e.copy_[t] = Or(n, e)) : n;\n },\n has(e, t) {\n return t in Ne(e);\n },\n ownKeys(e) {\n return Reflect.ownKeys(Ne(e));\n },\n set(e, t, r) {\n const n = ds(Ne(e), t);\n if (n != null && n.set)\n return n.set.call(e.draft_, r), !0;\n if (!e.modified_) {\n const s = dr(Ne(e), t), o = s == null ? void 0 : s[de];\n if (o && o.base_ === r)\n return e.copy_[t] = r, e.assigned_[t] = !1, !0;\n if (Vi(r, s) && (r !== void 0 || Sr(e.base_, t)))\n return !0;\n fr(e), Ar(e);\n }\n return e.copy_[t] === r && // special case: handle new props with value 'undefined'\n (r !== void 0 || t in e.copy_) || // special case: NaN\n Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_[t] = !0), !0;\n },\n deleteProperty(e, t) {\n return dr(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, fr(e), Ar(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;\n },\n // Note: We never coerce `desc.value` into an Immer draft, because we can't make\n // the same guarantee in ES5 mode.\n getOwnPropertyDescriptor(e, t) {\n const r = Ne(e), n = Reflect.getOwnPropertyDescriptor(r, t);\n return n && {\n writable: !0,\n configurable: e.type_ !== 1 || t !== \"length\",\n enumerable: n.enumerable,\n value: r[t]\n };\n },\n defineProperty() {\n ie(11);\n },\n getPrototypeOf(e) {\n return Ze(e.base_);\n },\n setPrototypeOf() {\n ie(12);\n }\n}, pt = {};\nIt(Jr, (e, t) => {\n pt[e] = function() {\n return arguments[0] = arguments[0][0], t.apply(this, arguments);\n };\n});\npt.deleteProperty = function(e, t) {\n return process.env.NODE_ENV !== \"production\" && isNaN(parseInt(t)) && ie(13), pt.set.call(this, e, t, void 0);\n};\npt.set = function(e, t, r) {\n return process.env.NODE_ENV !== \"production\" && t !== \"length\" && isNaN(parseInt(t)) && ie(14), Jr.set.call(this, e[0], t, r, e[0]);\n};\nfunction dr(e, t) {\n const r = e[de];\n return (r ? Ne(r) : e)[t];\n}\nfunction Xi(e, t, r) {\n var s;\n const n = ds(t, r);\n return n ? \"value\" in n ? n.value : (\n // This is a very special case, if the prop is a getter defined by the\n // prototype, we should invoke it with the draft as context!\n (s = n.get) == null ? void 0 : s.call(e.draft_)\n ) : void 0;\n}\nfunction ds(e, t) {\n if (!(t in e))\n return;\n let r = Ze(e);\n for (; r; ) {\n const n = Object.getOwnPropertyDescriptor(r, t);\n if (n)\n return n;\n r = Ze(r);\n }\n}\nfunction Ar(e) {\n e.modified_ || (e.modified_ = !0, e.parent_ && Ar(e.parent_));\n}\nfunction fr(e) {\n e.copy_ || (e.copy_ = Cr(\n e.base_,\n e.scope_.immer_.useStrictShallowCopy_\n ));\n}\nvar Qi = class {\n constructor(e) {\n this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (t, r, n) => {\n if (typeof t == \"function\" && typeof r != \"function\") {\n const o = r;\n r = t;\n const i = this;\n return function(u = o, ...f) {\n return i.produce(u, (l) => r.call(this, l, ...f));\n };\n }\n typeof r != \"function\" && ie(6), n !== void 0 && typeof n != \"function\" && ie(7);\n let s;\n if (ze(t)) {\n const o = On(this), i = Or(t, void 0);\n let a = !0;\n try {\n s = r(i), a = !1;\n } finally {\n a ? Tr(o) : Rr(o);\n }\n return An(o, n), Pn(s, o);\n } else if (!t || typeof t != \"object\") {\n if (s = r(t), s === void 0 && (s = t), s === as && (s = void 0), this.autoFreeze_ && Wr(s, !0), n) {\n const o = [], i = [];\n He(\"Patches\").generateReplacementPatches_(t, s, o, i), n(o, i);\n }\n return s;\n } else\n ie(1, t);\n }, this.produceWithPatches = (t, r) => {\n if (typeof t == \"function\")\n return (i, ...a) => this.produceWithPatches(i, (u) => t(u, ...a));\n let n, s;\n return [this.produce(t, r, (i, a) => {\n n = i, s = a;\n }), n, s];\n }, typeof (e == null ? void 0 : e.autoFreeze) == \"boolean\" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == \"boolean\" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);\n }\n createDraft(e) {\n ze(e) || ie(8), et(e) && (e = Zi(e));\n const t = On(this), r = Or(e, void 0);\n return r[de].isManual_ = !0, Rr(t), r;\n }\n finishDraft(e, t) {\n const r = e && e[de];\n (!r || !r.isManual_) && ie(9);\n const { scope_: n } = r;\n return An(n, t), Pn(void 0, n);\n }\n /**\n * Pass true to automatically freeze all copies created by Immer.\n *\n * By default, auto-freezing is enabled.\n */\n setAutoFreeze(e) {\n this.autoFreeze_ = e;\n }\n /**\n * Pass true to enable strict shallow copy.\n *\n * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.\n */\n setUseStrictShallowCopy(e) {\n this.useStrictShallowCopy_ = e;\n }\n applyPatches(e, t) {\n let r;\n for (r = t.length - 1; r >= 0; r--) {\n const s = t[r];\n if (s.path.length === 0 && s.op === \"replace\") {\n e = s.value;\n break;\n }\n }\n r > -1 && (t = t.slice(r + 1));\n const n = He(\"Patches\").applyPatches_;\n return et(e) ? n(e, t) : this.produce(\n e,\n (s) => n(s, t)\n );\n }\n};\nfunction Or(e, t) {\n const r = qt(e) ? He(\"MapSet\").proxyMap_(e, t) : zt(e) ? He(\"MapSet\").proxySet_(e, t) : Yi(e, t);\n return (t ? t.scope_ : us()).drafts_.push(r), r;\n}\nfunction Zi(e) {\n return et(e) || ie(10, e), fs(e);\n}\nfunction fs(e) {\n if (!ze(e) || Ht(e))\n return e;\n const t = e[de];\n let r;\n if (t) {\n if (!t.modified_)\n return t.base_;\n t.finalized_ = !0, r = Cr(e, t.scope_.immer_.useStrictShallowCopy_);\n } else\n r = Cr(e, !0);\n return It(r, (n, s) => {\n ls(r, n, fs(s));\n }), t && (t.finalized_ = !1), r;\n}\nvar fe = new Qi(), ea = fe.produce;\nfe.produceWithPatches.bind(\n fe\n);\nfe.setAutoFreeze.bind(fe);\nfe.setUseStrictShallowCopy.bind(fe);\nfe.applyPatches.bind(fe);\nfe.createDraft.bind(fe);\nfe.finishDraft.bind(fe);\nconst ta = (e) => (t, r, n) => (n.setState = (s, o, ...i) => {\n const a = typeof s == \"function\" ? ea(s) : s;\n return t(a, o, ...i);\n}, e(n.setState, r, n)), hs = ta, ps = is()(\n hs((e) => ({\n messages: [],\n setMessages: (t) => {\n e((r) => {\n r.messages = t;\n });\n },\n addMessageFeedback: (t, r, n = []) => {\n e((s) => {\n const o = s.messages.find((i) => i.id === t);\n o && (o.metadata || (o.metadata = {}), o.metadata.feedbackScore = r, o.metadata.feedbackReason = n);\n });\n },\n removeMessageFeedback: (t) => {\n e((r) => {\n const n = r.messages.find((s) => s.id === t);\n !n || !n.metadata || (delete n.metadata.feedbackScore, delete n.metadata.feedbackReason);\n });\n },\n clearAllMessages: () => {\n e((t) => {\n t.messages = [];\n });\n }\n }))\n);\nvar Ee = /* @__PURE__ */ ((e) => (e.JAMBA_INSTRUCT = \"jamba-instruct\", e.JAMBA_1_5 = \"jamba-mini-1.5\", e.JAMBA_LARGE = \"jamba-large-1.5\", e.JAMBA_1_6_MINI = \"jamba-mini-1.6\", e.JAMBA_1_6_LARGE = \"jamba-large-1.6\", e))(Ee || {});\nconst Pr = Ee.JAMBA_1_6_LARGE, ra = {\n n: 1,\n max_tokens: 1024,\n model: Pr,\n stop: [],\n temperature: 0.7,\n top_p: 1\n}, hr = \"/chat/completions\", Fn = \"/chat/files/convert\";\nEe.JAMBA_1_5, Ee.JAMBA_LARGE;\nconst pr = (e = Pr) => {\n switch (e) {\n case Ee.JAMBA_1_5:\n case Ee.JAMBA_LARGE:\n case Ee.JAMBA_1_6_LARGE:\n case Ee.JAMBA_1_6_MINI:\n return {\n maxTokens: 2048,\n temperature: 0.4,\n topP: 1,\n model: e,\n textFormat: \"text\"\n };\n case Ee.JAMBA_INSTRUCT:\n return {\n maxTokens: 1024,\n temperature: 0.7,\n topP: 1,\n model: e,\n textFormat: \"text\"\n };\n default:\n return {\n maxTokens: 2048,\n temperature: 0.4,\n topP: 1,\n model: Pr,\n textFormat: \"text\"\n };\n }\n}, na = is()(\n hs((e) => ({\n ...pr(),\n setSystemMessage: (t) => {\n e((r) => {\n r.systemMessage = t;\n });\n },\n setMaxTokens: (t) => {\n e((r) => {\n r.maxTokens = t;\n });\n },\n setModel: (t) => {\n e((r) => {\n r.model = t, r.temperature = pr(t).temperature;\n });\n },\n setTemperature: (t) => {\n e((r) => {\n r.temperature = t;\n });\n },\n setTopP: (t) => {\n e((r) => {\n r.topP = t;\n });\n },\n setTextFormat: (t) => {\n e((r) => {\n r.textFormat = t;\n });\n },\n resetToDefaultParameters: () => {\n e((t) => {\n const r = pr();\n t.maxTokens = r.maxTokens, t.temperature = r.temperature, t.topP = r.topP, t.systemMessage = void 0, t.model = r.model, t.functions = void 0;\n });\n },\n setFunctions: (t) => {\n e((r) => {\n r.functions = t;\n });\n },\n setFunctionToEdit: (t) => {\n e((r) => {\n r.functionToEdit = t;\n });\n }\n }))\n);\nvar sa = class {\n constructor() {\n this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);\n }\n subscribe(e) {\n return this.listeners.add(e), this.onSubscribe(), () => {\n this.listeners.delete(e), this.onUnsubscribe();\n };\n }\n hasListeners() {\n return this.listeners.size > 0;\n }\n onSubscribe() {\n }\n onUnsubscribe() {\n }\n};\nfunction In(e) {\n return JSON.stringify(\n e,\n (t, r) => ia(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r\n );\n}\nfunction oa(e, t) {\n if (!t || Object.keys(e).length !== Object.keys(t).length)\n return !1;\n for (const r in e)\n if (e[r] !== t[r])\n return !1;\n return !0;\n}\nfunction ia(e) {\n if (!Mn(e))\n return !1;\n const t = e.constructor;\n if (t === void 0)\n return !0;\n const r = t.prototype;\n return !(!Mn(r) || !r.hasOwnProperty(\"isPrototypeOf\") || Object.getPrototypeOf(e) !== Object.prototype);\n}\nfunction Mn(e) {\n return Object.prototype.toString.call(e) === \"[object Object]\";\n}\nfunction aa() {\n let e = [], t = 0, r = (a) => {\n a();\n }, n = (a) => {\n a();\n }, s = (a) => setTimeout(a, 0);\n const o = (a) => {\n t ? e.push(a) : s(() => {\n r(a);\n });\n }, i = () => {\n const a = e;\n e = [], a.length && s(() => {\n n(() => {\n a.forEach((u) => {\n r(u);\n });\n });\n });\n };\n return {\n batch: (a) => {\n let u;\n t++;\n try {\n u = a();\n } finally {\n t--, t || i();\n }\n return u;\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: (a) => (...u) => {\n o(() => {\n a(...u);\n });\n },\n schedule: o,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (a) => {\n r = a;\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (a) => {\n n = a;\n },\n setScheduler: (a) => {\n s = a;\n }\n };\n}\nvar ms = aa();\nfunction ca() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: !1,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nvar je, Fe, oe, Se, Qe, At, gt, jr, Xn, la = (Xn = class extends sa {\n constructor(t, r) {\n super();\n ke(this, Qe);\n ke(this, gt);\n ke(this, je, void 0);\n ke(this, Fe, void 0);\n ke(this, oe, void 0);\n ke(this, Se, void 0);\n Ye(this, je, t), this.setOptions(r), this.bindMethods(), Xe(this, Qe, At).call(this);\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);\n }\n setOptions(t) {\n var n;\n const r = this.options;\n this.options = z(this, je).defaultMutationOptions(t), oa(this.options, r) || z(this, je).getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: z(this, oe),\n observer: this\n }), r != null && r.mutationKey && this.options.mutationKey && In(r.mutationKey) !== In(this.options.mutationKey) ? this.reset() : ((n = z(this, oe)) == null ? void 0 : n.state.status) === \"pending\" && z(this, oe).setOptions(this.options);\n }\n onUnsubscribe() {\n var t;\n this.hasListeners() || (t = z(this, oe)) == null || t.removeObserver(this);\n }\n onMutationUpdate(t) {\n Xe(this, Qe, At).call(this), Xe(this, gt, jr).call(this, t);\n }\n getCurrentResult() {\n return z(this, Fe);\n }\n reset() {\n var t;\n (t = z(this, oe)) == null || t.removeObserver(this), Ye(this, oe, void 0), Xe(this, Qe, At).call(this), Xe(this, gt, jr).call(this);\n }\n mutate(t, r) {\n var n;\n return Ye(this, Se, r), (n = z(this, oe)) == null || n.removeObserver(this), Ye(this, oe, z(this, je).getMutationCache().build(z(this, je), this.options)), z(this, oe).addObserver(this), z(this, oe).execute(t);\n }\n}, je = new WeakMap(), Fe = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), Qe = new WeakSet(), At = function() {\n var r;\n const t = ((r = z(this, oe)) == null ? void 0 : r.state) ?? ca();\n Ye(this, Fe, {\n ...t,\n isPending: t.status === \"pending\",\n isSuccess: t.status === \"success\",\n isError: t.status === \"error\",\n isIdle: t.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n });\n}, gt = new WeakSet(), jr = function(t) {\n ms.batch(() => {\n var r, n, s, o, i, a, u, f;\n if (z(this, Se) && this.hasListeners()) {\n const l = z(this, Fe).variables, p = z(this, Fe).context;\n (t == null ? void 0 : t.type) === \"success\" ? ((n = (r = z(this, Se)).onSuccess) == null || n.call(r, t.data, l, p), (o = (s = z(this, Se)).onSettled) == null || o.call(s, t.data, null, l, p)) : (t == null ? void 0 : t.type) === \"error\" && ((a = (i = z(this, Se)).onError) == null || a.call(i, t.error, l, p), (f = (u = z(this, Se)).onSettled) == null || f.call(\n u,\n void 0,\n t.error,\n l,\n p\n ));\n }\n this.listeners.forEach((l) => {\n l(z(this, Fe));\n });\n });\n}, Xn), ua = Be.createContext(\n void 0\n), da = (e) => {\n const t = Be.useContext(ua);\n if (e)\n return e;\n if (!t)\n throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n return t;\n};\nfunction fa(e, t) {\n return typeof e == \"function\" ? e(...t) : !!e;\n}\nfunction ha() {\n}\nfunction Fr(e, t) {\n const r = da(t), [n] = Be.useState(\n () => new la(\n r,\n e\n )\n );\n Be.useEffect(() => {\n n.setOptions(e);\n }, [n, e]);\n const s = Be.useSyncExternalStore(\n Be.useCallback(\n (i) => n.subscribe(ms.batchCalls(i)),\n [n]\n ),\n () => n.getCurrentResult(),\n () => n.getCurrentResult()\n ), o = Be.useCallback(\n (i, a) => {\n n.mutate(i, a).catch(ha);\n },\n [n]\n );\n if (s.error && fa(n.options.throwOnError, [s.error]))\n throw s.error;\n return { ...s, mutate: o, mutateAsync: s.mutate };\n}\nconst mr = \"/experimental/feedback\", pa = ({\n httpService: e,\n onSubmitFeedbackSuccess: t,\n onSubmitFeedbackError: r,\n queryClient: n\n}) => {\n const s = e.getStudioApiClient(), { mutateAsync: o } = Fr(\n {\n mutationFn: async ({ feedbackScore: i, model: a, requestId: u, feedbackReason: f }) => {\n if (s)\n try {\n const { data: l } = await s.post(mr, {\n feedbackScore: i,\n model: a,\n requestId: u,\n feedbackReason: f\n });\n return t(mr, { feedbackScore: i, model: a, requestId: u, feedbackReason: f }), l;\n } catch (l) {\n throw r(\n mr,\n { feedbackScore: i, model: a, requestId: u, feedbackReason: f },\n l == null ? void 0 : l.message\n ), l;\n }\n }\n },\n n\n );\n return { sendMessageFeedback: o };\n}, ma = (e) => pa(e), ga = (e) => {\n if (!e)\n throw new Error(\"API client is not available\");\n};\nlet Tt;\nconst ya = new Uint8Array(16);\nfunction ba() {\n if (!Tt && (Tt = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Tt))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return Tt(ya);\n}\nconst Y = [];\nfor (let e = 0; e < 256; ++e)\n Y.push((e + 256).toString(16).slice(1));\nfunction va(e, t = 0) {\n return Y[e[t + 0]] + Y[e[t + 1]] + Y[e[t + 2]] + Y[e[t + 3]] + \"-\" + Y[e[t + 4]] + Y[e[t + 5]] + \"-\" + Y[e[t + 6]] + Y[e[t + 7]] + \"-\" + Y[e[t + 8]] + Y[e[t + 9]] + \"-\" + Y[e[t + 10]] + Y[e[t + 11]] + Y[e[t + 12]] + Y[e[t + 13]] + Y[e[t + 14]] + Y[e[t + 15]];\n}\nconst Ea = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Dn = {\n randomUUID: Ea\n};\nfunction $t(e, t, r) {\n if (Dn.randomUUID && !t && !e)\n return Dn.randomUUID();\n e = e || {};\n const n = e.random || (e.rng || ba)();\n if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, t) {\n r = r || 0;\n for (let s = 0; s < 16; ++s)\n t[r + s] = n[s];\n return t;\n }\n return va(n);\n}\nconst wa = (e) => ({\n id: $t(),\n content: e,\n role: \"user\"\n}), xa = (e) => {\n var r;\n const t = $t();\n return {\n id: t,\n document: { id: t, name: e.name, type: ((r = wo[e.type]) == null ? void 0 : r[0].slice(1)) || e.type, isLoading: !0 },\n content: \"\",\n role: \"user\"\n };\n}, _a = () => ({\n id: \"placeholder\",\n content: \"\",\n role: \"assistant\"\n}), Sa = (e) => ({\n id: $t(),\n content: e,\n role: \"system\"\n}), Ca = (e) => e.map((t) => ({\n type: \"function\",\n function: { name: t.name, description: t.description, parameters: t.parameters }\n})), Ta = (e, t) => ({\n id: $t(),\n role: \"tool\",\n tool_call_id: e,\n content: t\n}), Ra = (e, t) => {\n const r = [...t];\n return e.systemMessage && r.unshift(Sa(e.systemMessage)), r;\n}, Aa = (e, t, r, n, s, o, i) => {\n var l, p;\n const a = (p = (l = e.event) == null ? void 0 : l.target) == null ? void 0 : p.response;\n if (!a)\n return { finalMessage: r, lastChunkLength: t };\n const f = a.slice(t).split(`\n`);\n for (const m of f) {\n if (!Oa(m))\n continue;\n const w = Pa(m);\n if (w === \"[DONE]\") {\n r = ja(r, o, n, s);\n break;\n }\n try {\n const g = JSON.parse(w);\n r = Fa(g, r, n, s, i);\n } catch (g) {\n console.error(\"Error parsing JSON:\", g);\n }\n }\n return { finalMessage: r, lastChunkLength: a.length };\n}, Oa = (e) => e.trim() !== \"\" && e.startsWith(\"data:\"), Pa = (e) => e.slice(5).trim(), ja = (e, t, r, n) => {\n if (e != null && e.metadata) {\n const s = performance.now();\n e = {\n ...e,\n metadata: {\n ...e.metadata,\n latency: ka(s - t)\n }\n }, gs(r, e, n);\n }\n return e;\n}, Fa = (e, t, r, n, s) => {\n const { delta: o } = e.choices[0];\n return o.role && (t == null ? void 0 : t.id) === \"placeholder\" && (t = Da(e, s), n([...r, t])), o.content && (t = Ia(t, o.content, r, n)), e.usage && (t != null && t.metadata) && (t = Ma(t, e.usage.tokens)), t;\n}, Ia = (e, t, r, n) => (e && (e = { ...e, content: e.content + t }, gs(r, e, n)), e), Ma = (e, t) => ({\n ...e,\n metadata: {\n ...e.metadata,\n tokens: t\n }\n}), gs = (e, t, r) => {\n const n = [...e], s = n.findIndex((o) => o.id === (t == null ? void 0 : t.id));\n s !== -1 ? n[s] = t : n.push(t), xo(() => {\n r([...n]);\n });\n}, Da = (e, t) => ({\n id: e.id,\n content: \"\",\n role: e.choices[0].delta.role,\n tool_calls: void 0,\n parameters: {\n model: t.model,\n n: t.n,\n maxTokens: t.max_tokens,\n temperature: t.temperature,\n topP: t.top_p\n },\n metadata: {\n tokens: 0,\n latency: 0\n }\n}), ka = (e) => e / 1e3, Na = ({\n httpService: e,\n onChatError: t,\n onChatGenerated: r,\n onChatRequested: n,\n queryClient: s\n}) => {\n const { messages: o, setMessages: i } = ps(), a = e.getStudioApiClient(), u = Er(null), f = we(() => {\n const m = u.current;\n m && (m.abort(), u.current = null);\n }, []), { mutateAsync: l } = Fr(\n {\n mutationFn: async (m) => {\n var b;\n if (!a)\n return { message: null };\n const w = m.documents.filter((_) => !!_).map((_) => ({\n id: _.id,\n name: \"\",\n type: _.type\n })), g = {\n ...m,\n endpoint: hr,\n numOfMessages: m.messages.length,\n role: \"user\",\n messages: [],\n documents: w\n };\n n({ ...m, messages: [], documents: w });\n const v = performance.now();\n try {\n const x = await (async () => {\n let S = _a(), C = 0;\n u.current = new AbortController();\n const { signal: j } = u.current, R = await a.post(\n hr,\n { ...m },\n m.stream ? {\n signal: j,\n responseType: \"stream\",\n onDownloadProgress: (P) => {\n const L = Aa(\n P,\n C,\n S,\n o,\n i,\n v,\n m\n );\n S = L.finalMessage, C = L.lastChunkLength;\n }\n } : void 0\n );\n if (!m.stream && R.data) {\n const P = R.data;\n S = {\n id: P.id,\n content: P.choices[0].message.content,\n role: P.choices[0].message.role,\n tool_calls: P.choices[0].message.tool_calls,\n parameters: {\n model: m.model,\n n: m.n,\n maxTokens: m.max_tokens,\n temperature: m.temperature,\n topP: m.top_p\n },\n metadata: {\n tokens: P.usage.total_tokens,\n latency: To(performance.now() - v)\n }\n };\n }\n return S;\n })();\n if (!x)\n throw new Error(`${hr} returned no data`);\n return r(g, x.id, ((b = x == null ? void 0 : x.content) == null ? void 0 : b.length) || 0), { message: x };\n } catch (_) {\n if (_.name === \"CanceledError\" || _.name === \"AbortError\")\n return { message: null };\n throw t(_ == null ? void 0 : _.message), _;\n } finally {\n u.current = null;\n }\n }\n },\n s\n ), { mutateAsync: p } = Fr(\n {\n mutationFn: async (m) => {\n ga(a);\n try {\n const w = new FormData();\n m.forEach((b) => {\n w.append(\"files\", b);\n });\n const { data: g } = await a.post(\n Fn,\n w,\n {\n headers: {\n \"Content-Type\": \"multipart/form-data\"\n }\n }\n );\n if (!g)\n throw new Error(`${Fn} returned no data`);\n const v = g.converted_files;\n return {\n content: v[0].content,\n fileName: v[0].file_name\n };\n } catch (w) {\n throw new Error(`something went wrong: ${w.message}`);\n }\n }\n },\n s\n );\n return { submitMessages: l, convertDocument: p, stopStreaming: f };\n}, Bl = ({\n httpService: e,\n onChatError: t,\n onChatGenerated: r,\n onChatRequested: n,\n onSubmitFeedbackError: s,\n onSubmitFeedbackSuccess: o,\n queryClient: i\n}) => {\n const { messages: a, setMessages: u, addMessageFeedback: f, clearAllMessages: l } = ps(), {\n maxTokens: p,\n model: m,\n temperature: w,\n topP: g,\n systemMessage: v,\n setMaxTokens: b,\n setModel: _,\n setTemperature: x,\n setTopP: S,\n setSystemMessage: C,\n resetToDefaultParameters: j,\n setTextFormat: R,\n textFormat: P,\n functions: L,\n functionToEdit: H,\n setFunctions: xe,\n setFunctionToEdit: Me\n } = na(), { submitMessages: be, convertDocument: X, stopStreaming: re } = Na({\n onChatError: t,\n onChatGenerated: r,\n onChatRequested: n,\n queryClient: i,\n httpService: e\n }), { sendMessageFeedback: ve } = ma({\n onSubmitFeedbackError: s,\n onSubmitFeedbackSuccess: o,\n queryClient: i,\n httpService: e\n }), [_e, ce] = pe(!1), [nt, Ce] = pe(!1), [bt, Te] = pe(), [Re, st] = pe({}), [vt, Ae] = pe(!1), W = V(\n () => ({\n maxTokens: p,\n model: m,\n topP: g,\n temperature: w,\n systemMessage: v,\n textFormat: P,\n functions: L,\n functionToEdit: H\n // toolFunctions,\n }),\n [H, L, p, m, v, w, P, g]\n ), Oe = async (I, U, N) => {\n Te(void 0), ce(!0), U && Ce(!0);\n const J = I.filter((le) => le.document).map((le) => le.document), ne = I.filter((le) => !le.document);\n u([...I]);\n const Q = W.textFormat === \"json\" && W.model !== Ee.JAMBA_INSTRUCT;\n try {\n const le = I.some((Zt) => Zt.role === \"tool\") || L && L.length > 0;\n Ae(!0);\n const { message: wt } = await be({\n messages: Ra(W, ne),\n ...ra,\n stream: !le,\n max_tokens: W.maxTokens,\n temperature: W.temperature,\n model: W.model,\n top_p: W.topP,\n documents: J,\n ...Q ? { response_format: { type: \"json_object\" } } : {},\n ...W.functions ? { tools: Ca(W.functions) } : {}\n });\n if (!wt) {\n ce(!1), Ce(!1);\n return;\n }\n const it = {\n ...wt,\n parameters: {\n model: W.model,\n maxTokens: W.maxTokens,\n temperature: W.temperature,\n topP: W.topP\n }\n };\n u([...I, it]);\n } catch (le) {\n Ae(!1), Te(le), N ? u(N) : console.log(\"else condition entered \", a);\n }\n ce(!1), Ce(!1);\n }, We = async (I, U, N, { onSuccess: J, onError: ne } = {}) => {\n if (I.document) {\n Te(void 0), ce(!0), u([...U, I]);\n try {\n const { content: Q } = await X([N]);\n if (!Q)\n return;\n const le = {\n ...I,\n document: {\n ...I.document,\n isLoading: !1,\n content: Q\n }\n };\n Ae(!0), u([...U, le]), J == null || J({ documentType: N.type, documentId: null });\n } catch (Q) {\n u(U), Ae(!1), Te(Q), ne == null || ne({ reason: (Q instanceof Error ? Q.message : String(Q)) || \"Unknown error\" });\n }\n ce(!1), Ce(!1);\n }\n }, ot = we(() => {\n re(), ce(!1), Ce(!1), Ae(!1);\n }, [re]), Je = we(\n async (I, U, N) => {\n f(I, U, N);\n try {\n await ve({\n feedbackScore: U,\n model: W.model,\n requestId: I,\n feedbackReason: N\n });\n } catch (J) {\n st({\n ...Re,\n [I]: J\n });\n }\n },\n [f, W.model, Re, ve]\n ), Xt = we(() => Te(void 0), []), Et = we(\n async (I) => {\n const U = a.filter((N) => N.id !== I);\n u(U);\n },\n [a, u]\n ), Qt = V(\n () => ({\n isGeneratingMessage: _e,\n isRegeneratingMessage: nt,\n showAiTypingEffect: vt\n }),\n [_e, nt, vt]\n );\n return {\n messages: a,\n chatError: bt,\n uiState: Qt,\n feedbackErrors: Re,\n chatModelParameters: W,\n sendMessage: async (I) => {\n if (!I)\n return;\n const U = wa(I), N = [...a, U];\n await Oe(N, !1);\n },\n sendToolMessages: async (I) => {\n if (I.length === 0)\n return;\n const U = I.map((J) => Ta(\n J.toolCallId,\n J.content\n )), N = [...a, ...U];\n Oe(N, !1);\n },\n editMessage: async (I, U) => {\n if (!U)\n return;\n const N = [...a], J = a.findIndex((Q) => Q.id === I);\n if (J === -1)\n return;\n const ne = a.slice(0, J + 1);\n ne[J] = {\n ...a[J],\n content: U\n }, await Oe(ne, !1, N);\n },\n sendDocument: async (I, U) => {\n if (!I)\n return;\n const N = xa(I);\n await We(N, a, I, U);\n },\n deleteDocument: Et,\n regenerateMessage: async (I) => {\n const U = [...a], N = a.findIndex((ne) => ne.id === I);\n if (N === -1)\n return;\n const J = a.slice(0, N);\n await Oe(J, !0, U);\n },\n assignMessageFeedback: Je,\n clearMessages: l,\n clearChatError: Xt,\n clearChatFeedbackError: (I) => {\n delete Re[I], st({ ...Re });\n },\n toggleAiTypingEffect: (I) => {\n Ae(I);\n },\n stopGeneratingMessage: ot,\n updateMaxTokens: b,\n updateModel: _,\n updateSystemMessage: C,\n updateTemperature: x,\n updateTopP: S,\n resetToDefaultParameters: j,\n updateTextFormat: R,\n setFunctions: xe,\n setFunctionToEdit: Me\n };\n};\nfunction ys(e, t) {\n return function() {\n return e.apply(t, arguments);\n };\n}\nconst { toString: Ba } = Object.prototype, { getPrototypeOf: Gr } = Object, Vt = ((e) => (t) => {\n const r = Ba.call(t);\n return e[r] || (e[r] = r.slice(8, -1).toLowerCase());\n})(/* @__PURE__ */ Object.create(null)), ye = (e) => (e = e.toLowerCase(), (t) => Vt(t) === e), Wt = (e) => (t) => typeof t === e, { isArray: tt } = Array, mt = Wt(\"undefined\");\nfunction La(e) {\n return e !== null && !mt(e) && e.constructor !== null && !mt(e.constructor) && ue(e.constructor.isBuffer) && e.constructor.isBuffer(e);\n}\nconst bs = ye(\"ArrayBuffer\");\nfunction Ua(e) {\n let t;\n return typeof ArrayBuffer < \"u\" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && bs(e.buffer), t;\n}\nconst qa = Wt(\"string\"), ue = Wt(\"function\"), vs = Wt(\"number\"), Jt = (e) => e !== null && typeof e == \"object\", za = (e) => e === !0 || e === !1, Ot = (e) => {\n if (Vt(e) !== \"object\")\n return !1;\n const t = Gr(e);\n return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);\n}, Ha = ye(\"Date\"), $a = ye(\"File\"), Va = ye(\"Blob\"), Wa = ye(\"FileList\"), Ja = (e) => Jt(e) && ue(e.pipe), Ga = (e) => {\n let t;\n return e && (typeof FormData == \"function\" && e instanceof FormData || ue(e.append) && ((t = Vt(e)) === \"formdata\" || // detect form-data instance\n t === \"object\" && ue(e.toString) && e.toString() === \"[object FormData]\"));\n}, Ka = ye(\"URLSearchParams\"), [Ya, Xa, Qa, Za] = [\"ReadableStream\", \"Request\", \"Response\", \"Headers\"].map(ye), ec = (e) => e.trim ? e.trim() : e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\");\nfunction yt(e, t, { allOwnKeys: r = !1 } = {}) {\n if (e === null || typeof e > \"u\")\n return;\n let n, s;\n if (typeof e != \"object\" && (e = [e]), tt(e))\n for (n = 0, s = e.length; n < s; n++)\n t.call(null, e[n], n, e);\n else {\n const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;\n let a;\n for (n = 0; n < i; n++)\n a = o[n], t.call(null, e[a], a, e);\n }\n}\nfunction Es(e, t) {\n t = t.toLowerCase();\n const r = Object.keys(e);\n let n = r.length, s;\n for (; n-- > 0; )\n if (s = r[n], t === s.toLowerCase())\n return s;\n return null;\n}\nconst Le = (() => typeof globalThis < \"u\" ? globalThis : typeof self < \"u\" ? self : typeof window < \"u\" ? window : global)(), ws = (e) => !mt(e) && e !== Le;\nfunction Ir() {\n const { caseless: e } = ws(this) && this || {}, t = {}, r = (n, s) => {\n const o = e && Es(t, s) || s;\n Ot(t[o]) && Ot(n) ? t[o] = Ir(t[o], n) : Ot(n) ? t[o] = Ir({}, n) : tt(n) ? t[o] = n.slice() : t[o] = n;\n };\n for (let n = 0, s = arguments.length; n < s; n++)\n arguments[n] && yt(arguments[n], r);\n return t;\n}\nconst tc = (e, t, r, { allOwnKeys: n } = {}) => (yt(t, (s, o) => {\n r && ue(s) ? e[o] = ys(s, r) : e[o] = s;\n}, { allOwnKeys: n }), e), rc = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), nc = (e, t, r, n) => {\n e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, \"super\", {\n value: t.prototype\n }), r && Object.assign(e.prototype, r);\n}, sc = (e, t, r, n) => {\n let s, o, i;\n const a = {};\n if (t = t || {}, e == null)\n return t;\n do {\n for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )\n i = s[o], (!n || n(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);\n e = r !== !1 && Gr(e);\n } while (e && (!r || r(e, t)) && e !== Object.prototype);\n return t;\n}, oc = (e, t, r) => {\n e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;\n const n = e.indexOf(t, r);\n return n !== -1 && n === r;\n}, ic = (e) => {\n if (!e)\n return null;\n if (tt(e))\n return e;\n let t = e.length;\n if (!vs(t))\n return null;\n const r = new Array(t);\n for (; t-- > 0; )\n r[t] = e[t];\n return r;\n}, ac = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < \"u\" && Gr(Uint8Array)), cc = (e, t) => {\n const n = (e && e[Symbol.iterator]).call(e);\n let s;\n for (; (s = n.next()) && !s.done; ) {\n const o = s.value;\n t.call(e, o[0], o[1]);\n }\n}, lc = (e, t) => {\n let r;\n const n = [];\n for (; (r = e.exec(t)) !== null; )\n n.push(r);\n return n;\n}, uc = ye(\"HTMLFormElement\"), dc = (e) => e.toLowerCase().replace(\n /[-_\\s]([a-z\\d])(\\w*)/g,\n function(r, n, s) {\n return n.toUpperCase() + s;\n }\n), kn = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), fc = ye(\"RegExp\"), xs = (e, t) => {\n const r = Object.getOwnPropertyDescriptors(e), n = {};\n yt(r, (s, o) => {\n let i;\n (i = t(s, o, e)) !== !1 && (n[o] = i || s);\n }), Object.defineProperties(e, n);\n}, hc = (e) => {\n xs(e, (t, r) => {\n if (ue(e) && [\"arguments\", \"caller\", \"callee\"].indexOf(r) !== -1)\n return !1;\n const n = e[r];\n if (ue(n)) {\n if (t.enumerable = !1, \"writable\" in t) {\n t.writable = !1;\n return;\n }\n t.set || (t.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + r + \"'\");\n });\n }\n });\n}, pc = (e, t) => {\n const r = {}, n = (s) => {\n s.forEach((o) => {\n r[o] = !0;\n });\n };\n return tt(e) ? n(e) : n(String(e).split(t)), r;\n}, mc = () => {\n}, gc = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, gr = \"abcdefghijklmnopqrstuvwxyz\", Nn = \"0123456789\", _s = {\n DIGIT: Nn,\n ALPHA: gr,\n ALPHA_DIGIT: gr + gr.toUpperCase() + Nn\n}, yc = (e = 16, t = _s.ALPHA_DIGIT) => {\n let r = \"\";\n const { length: n } = t;\n for (; e--; )\n r += t[Math.random() * n | 0];\n return r;\n};\nfunction bc(e) {\n return !!(e && ue(e.append) && e[Symbol.toStringTag] === \"FormData\" && e[Symbol.iterator]);\n}\nconst vc = (e) => {\n const t = new Array(10), r = (n, s) => {\n if (Jt(n)) {\n if (t.indexOf(n) >= 0)\n return;\n if (!(\"toJSON\" in n)) {\n t[s] = n;\n const o = tt(n) ? [] : {};\n return yt(n, (i, a) => {\n const u = r(i, s + 1);\n !mt(u) && (o[a] = u);\n }), t[s] = void 0, o;\n }\n }\n return n;\n };\n return r(e, 0);\n}, Ec = ye(\"AsyncFunction\"), wc = (e) => e && (Jt(e) || ue(e)) && ue(e.then) && ue(e.catch), Ss = ((e, t) => e ? setImmediate : t ? ((r, n) => (Le.addEventListener(\"message\", ({ source: s, data: o }) => {\n s === Le && o === r && n.length && n.shift()();\n}, !1), (s) => {\n n.push(s), Le.postMessage(r, \"*\");\n}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(\n typeof setImmediate == \"function\",\n ue(Le.postMessage)\n), xc = typeof queueMicrotask < \"u\" ? queueMicrotask.bind(Le) : typeof process < \"u\" && process.nextTick || Ss, h = {\n isArray: tt,\n isArrayBuffer: bs,\n isBuffer: La,\n isFormData: Ga,\n isArrayBufferView: Ua,\n isString: qa,\n isNumber: vs,\n isBoolean: za,\n isObject: Jt,\n isPlainObject: Ot,\n isReadableStream: Ya,\n isRequest: Xa,\n isResponse: Qa,\n isHeaders: Za,\n isUndefined: mt,\n isDate: Ha,\n isFile: $a,\n isBlob: Va,\n isRegExp: fc,\n isFunction: ue,\n isStream: Ja,\n isURLSearchParams: Ka,\n isTypedArray: ac,\n isFileList: Wa,\n forEach: yt,\n merge: Ir,\n extend: tc,\n trim: ec,\n stripBOM: rc,\n inherits: nc,\n toFlatObject: sc,\n kindOf: Vt,\n kindOfTest: ye,\n endsWith: oc,\n toArray: ic,\n forEachEntry: cc,\n matchAll: lc,\n isHTMLForm: uc,\n hasOwnProperty: kn,\n hasOwnProp: kn,\n // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors: xs,\n freezeMethods: hc,\n toObjectSet: pc,\n toCamelCase: dc,\n noop: mc,\n toFiniteNumber: gc,\n findKey: Es,\n global: Le,\n isContextDefined: ws,\n ALPHABET: _s,\n generateString: yc,\n isSpecCompliantForm: bc,\n toJSONObject: vc,\n isAsyncFn: Ec,\n isThenable: wc,\n setImmediate: Ss,\n asap: xc\n};\nfunction A(e, t, r, n, s) {\n Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = \"AxiosError\", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);\n}\nh.inherits(A, Error, {\n toJSON: function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: h.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\nconst Cs = A.prototype, Ts = {};\n[\n \"ERR_BAD_OPTION_VALUE\",\n \"ERR_BAD_OPTION\",\n \"ECONNABORTED\",\n \"ETIMEDOUT\",\n \"ERR_NETWORK\",\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"ERR_DEPRECATED\",\n \"ERR_BAD_RESPONSE\",\n \"ERR_BAD_REQUEST\",\n \"ERR_CANCELED\",\n \"ERR_NOT_SUPPORT\",\n \"ERR_INVALID_URL\"\n // eslint-disable-next-line func-names\n].forEach((e) => {\n Ts[e] = { value: e };\n});\nObject.defineProperties(A, Ts);\nObject.defineProperty(Cs, \"isAxiosError\", { value: !0 });\nA.from = (e, t, r, n, s, o) => {\n const i = Object.create(Cs);\n return h.toFlatObject(e, i, function(u) {\n return u !== Error.prototype;\n }, (a) => a !== \"isAxiosError\"), A.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;\n};\nconst _c = null;\nfunction Mr(e) {\n return h.isPlainObject(e) || h.isArray(e);\n}\nfunction Rs(e) {\n return h.endsWith(e, \"[]\") ? e.slice(0, -2) : e;\n}\nfunction Bn(e, t, r) {\n return e ? e.concat(t).map(function(s, o) {\n return s = Rs(s), !r && o ? \"[\" + s + \"]\" : s;\n }).join(r ? \".\" : \"\") : t;\n}\nfunction Sc(e) {\n return h.isArray(e) && !e.some(Mr);\n}\nconst Cc = h.toFlatObject(h, {}, null, function(t) {\n return /^is[A-Z]/.test(t);\n});\nfunction Gt(e, t, r) {\n if (!h.isObject(e))\n throw new TypeError(\"target must be an object\");\n t = t || new FormData(), r = h.toFlatObject(r, {\n metaTokens: !0,\n dots: !1,\n indexes: !1\n }, !1, function(v, b) {\n return !h.isUndefined(b[v]);\n });\n const n = r.metaTokens, s = r.visitor || l, o = r.dots, i = r.indexes, u = (r.Blob || typeof Blob < \"u\" && Blob) && h.isSpecCompliantForm(t);\n if (!h.isFunction(s))\n throw new TypeError(\"visitor must be a function\");\n function f(g) {\n if (g === null)\n return \"\";\n if (h.isDate(g))\n return g.toISOString();\n if (!u && h.isBlob(g))\n throw new A(\"Blob is not supported. Use a Buffer instead.\");\n return h.isArrayBuffer(g) || h.isTypedArray(g) ? u && typeof Blob == \"function\" ? new Blob([g]) : Buffer.from(g) : g;\n }\n function l(g, v, b) {\n let _ = g;\n if (g && !b && typeof g == \"object\") {\n if (h.endsWith(v, \"{}\"))\n v = n ? v : v.slice(0, -2), g = JSON.stringify(g);\n else if (h.isArray(g) && Sc(g) || (h.isFileList(g) || h.endsWith(v, \"[]\")) && (_ = h.toArray(g)))\n return v = Rs(v), _.forEach(function(S, C) {\n !(h.isUndefined(S) || S === null) && t.append(\n // eslint-disable-next-line no-nested-ternary\n i === !0 ? Bn([v], C, o) : i === null ? v : v + \"[]\",\n f(S)\n );\n }), !1;\n }\n return Mr(g) ? !0 : (t.append(Bn(b, v, o), f(g)), !1);\n }\n const p = [], m = Object.assign(Cc, {\n defaultVisitor: l,\n convertValue: f,\n isVisitable: Mr\n });\n function w(g, v) {\n if (!h.isUndefined(g)) {\n if (p.indexOf(g) !== -1)\n throw Error(\"Circular reference detected in \" + v.join(\".\"));\n p.push(g), h.forEach(g, function(_, x) {\n (!(h.isUndefined(_) || _ === null) && s.call(\n t,\n _,\n h.isString(x) ? x.trim() : x,\n v,\n m\n )) === !0 && w(_, v ? v.concat(x) : [x]);\n }), p.pop();\n }\n }\n if (!h.isObject(e))\n throw new TypeError(\"data must be an object\");\n return w(e), t;\n}\nfunction Ln(e) {\n const t = {\n \"!\": \"%21\",\n \"'\": \"%27\",\n \"(\": \"%28\",\n \")\": \"%29\",\n \"~\": \"%7E\",\n \"%20\": \"+\",\n \"%00\": \"\\0\"\n };\n return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {\n return t[n];\n });\n}\nfunction Kr(e, t) {\n this._pairs = [], e && Gt(e, this, t);\n}\nconst As = Kr.prototype;\nAs.append = function(t, r) {\n this._pairs.push([t, r]);\n};\nAs.toString = function(t) {\n const r = t ? function(n) {\n return t.call(this, n, Ln);\n } : Ln;\n return this._pairs.map(function(s) {\n return r(s[0]) + \"=\" + r(s[1]);\n }, \"\").join(\"&\");\n};\nfunction Tc(e) {\n return encodeURIComponent(e).replace(/%3A/gi, \":\").replace(/%24/g, \"$\").replace(/%2C/gi, \",\").replace(/%20/g, \"+\").replace(/%5B/gi, \"[\").replace(/%5D/gi, \"]\");\n}\nfunction Os(e, t, r) {\n if (!t)\n return e;\n const n = r && r.encode || Tc, s = r && r.serialize;\n let o;\n if (s ? o = s(t, r) : o = h.isURLSearchParams(t) ? t.toString() : new Kr(t, r).toString(n), o) {\n const i = e.indexOf(\"#\");\n i !== -1 && (e = e.slice(0, i)), e += (e.indexOf(\"?\") === -1 ? \"?\" : \"&\") + o;\n }\n return e;\n}\nclass Rc {\n constructor() {\n this.handlers = [];\n }\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(t, r, n) {\n return this.handlers.push({\n fulfilled: t,\n rejected: r,\n synchronous: n ? n.synchronous : !1,\n runWhen: n ? n.runWhen : null\n }), this.handlers.length - 1;\n }\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(t) {\n this.handlers[t] && (this.handlers[t] = null);\n }\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n this.handlers && (this.handlers = []);\n }\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(t) {\n h.forEach(this.handlers, function(n) {\n n !== null && t(n);\n });\n }\n}\nconst Un = Rc, Ps = {\n silentJSONParsing: !0,\n forcedJSONParsing: !0,\n clarifyTimeoutError: !1\n}, Ac = typeof URLSearchParams < \"u\" ? URLSearchParams : Kr, Oc = typeof FormData < \"u\" ? FormData : null, Pc = typeof Blob < \"u\" ? Blob : null, jc = {\n isBrowser: !0,\n classes: {\n URLSearchParams: Ac,\n FormData: Oc,\n Blob: Pc\n },\n protocols: [\"http\", \"https\", \"file\", \"blob\", \"url\", \"data\"]\n}, Yr = typeof window < \"u\" && typeof document < \"u\", Dr = typeof navigator == \"object\" && navigator || void 0, Fc = Yr && (!Dr || [\"ReactNative\", \"NativeScript\", \"NS\"].indexOf(Dr.product) < 0), Ic = (() => typeof WorkerGlobalScope < \"u\" && // eslint-disable-next-line no-undef\nself instanceof WorkerGlobalScope && typeof self.importScripts == \"function\")(), Mc = Yr && window.location.href || \"http://localhost\", Dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n hasBrowserEnv: Yr,\n hasStandardBrowserEnv: Fc,\n hasStandardBrowserWebWorkerEnv: Ic,\n navigator: Dr,\n origin: Mc\n}, Symbol.toStringTag, { value: \"Module\" })), ae = {\n ...Dc,\n ...jc\n};\nfunction kc(e, t) {\n return Gt(e, new ae.classes.URLSearchParams(), Object.assign({\n visitor: function(r, n, s, o) {\n return ae.isNode && h.isBuffer(r) ? (this.append(n, r.toString(\"base64\")), !1) : o.defaultVisitor.apply(this, arguments);\n }\n }, t));\n}\nfunction Nc(e) {\n return h.matchAll(/\\w+|\\[(\\w*)]/g, e).map((t) => t[0] === \"[]\" ? \"\" : t[1] || t[0]);\n}\nfunction Bc(e) {\n const t = {}, r = Object.keys(e);\n let n;\n const s = r.length;\n let o;\n for (n = 0; n < s; n++)\n o = r[n], t[o] = e[o];\n return t;\n}\nfunction js(e) {\n function t(r, n, s, o) {\n let i = r[o++];\n if (i === \"__proto__\")\n return !0;\n const a = Number.isFinite(+i), u = o >= r.length;\n return i = !i && h.isArray(s) ? s.length : i, u ? (h.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !a) : ((!s[i] || !h.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && h.isArray(s[i]) && (s[i] = Bc(s[i])), !a);\n }\n if (h.isFormData(e) && h.isFunction(e.entries)) {\n const r = {};\n return h.forEachEntry(e, (n, s) => {\n t(Nc(n), s, r, 0);\n }), r;\n }\n return null;\n}\nfunction Lc(e, t, r) {\n if (h.isString(e))\n try {\n return (t || JSON.parse)(e), h.trim(e);\n } catch (n) {\n if (n.name !== \"SyntaxError\")\n throw n;\n }\n return (r || JSON.stringify)(e);\n}\nconst Xr = {\n transitional: Ps,\n adapter: [\"xhr\", \"http\", \"fetch\"],\n transformRequest: [function(t, r) {\n const n = r.getContentType() || \"\", s = n.indexOf(\"application/json\") > -1, o = h.isObject(t);\n if (o && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))\n return s ? JSON.stringify(js(t)) : t;\n if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))\n return t;\n if (h.isArrayBufferView(t))\n return t.buffer;\n if (h.isURLSearchParams(t))\n return r.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\", !1), t.toString();\n let a;\n if (o) {\n if (n.indexOf(\"application/x-www-form-urlencoded\") > -1)\n return kc(t, this.formSerializer).toString();\n if ((a = h.isFileList(t)) || n.indexOf(\"multipart/form-data\") > -1) {\n const u = this.env && this.env.FormData;\n return Gt(\n a ? { \"files[]\": t } : t,\n u && new u(),\n this.formSerializer\n );\n }\n }\n return o || s ? (r.setContentType(\"application/json\", !1), Lc(t)) : t;\n }],\n transformResponse: [function(t) {\n const r = this.transitional || Xr.transitional, n = r && r.forcedJSONParsing, s = this.responseType === \"json\";\n if (h.isResponse(t) || h.isReadableStream(t))\n return t;\n if (t && h.isString(t) && (n && !this.responseType || s)) {\n const i = !(r && r.silentJSONParsing) && s;\n try {\n return JSON.parse(t);\n } catch (a) {\n if (i)\n throw a.name === \"SyntaxError\" ? A.from(a, A.ERR_BAD_RESPONSE, this, null, this.response) : a;\n }\n }\n return t;\n }],\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n xsrfCookieName: \"XSRF-TOKEN\",\n xsrfHeaderName: \"X-XSRF-TOKEN\",\n maxContentLength: -1,\n maxBodyLength: -1,\n env: {\n FormData: ae.classes.FormData,\n Blob: ae.classes.Blob\n },\n validateStatus: function(t) {\n return t >= 200 && t < 300;\n },\n headers: {\n common: {\n Accept: \"application/json, text/plain, */*\",\n \"Content-Type\": void 0\n }\n }\n};\nh.forEach([\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\"], (e) => {\n Xr.headers[e] = {};\n});\nconst Qr = Xr, Uc = h.toObjectSet([\n \"age\",\n \"authorization\",\n \"content-length\",\n \"content-type\",\n \"etag\",\n \"expires\",\n \"from\",\n \"host\",\n \"if-modified-since\",\n \"if-unmodified-since\",\n \"last-modified\",\n \"location\",\n \"max-forwards\",\n \"proxy-authorization\",\n \"referer\",\n \"retry-after\",\n \"user-agent\"\n]), qc = (e) => {\n const t = {};\n let r, n, s;\n return e && e.split(`\n`).forEach(function(i) {\n s = i.indexOf(\":\"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && Uc[r]) && (r === \"set-cookie\" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + \", \" + n : n);\n }), t;\n}, qn = Symbol(\"internals\");\nfunction dt(e) {\n return e && String(e).trim().toLowerCase();\n}\nfunction Pt(e) {\n return e === !1 || e == null ? e : h.isArray(e) ? e.map(Pt) : String(e);\n}\nfunction zc(e) {\n const t = /* @__PURE__ */ Object.create(null), r = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let n;\n for (; n = r.exec(e); )\n t[n[1]] = n[2];\n return t;\n}\nconst Hc = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());\nfunction yr(e, t, r, n, s) {\n if (h.isFunction(n))\n return n.call(this, t, r);\n if (s && (t = r), !!h.isString(t)) {\n if (h.isString(n))\n return t.indexOf(n) !== -1;\n if (h.isRegExp(n))\n return n.test(t);\n }\n}\nfunction $c(e) {\n return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g, (t, r, n) => r.toUpperCase() + n);\n}\nfunction Vc(e, t) {\n const r = h.toCamelCase(\" \" + t);\n [\"get\", \"set\", \"has\"].forEach((n) => {\n Object.defineProperty(e, n + r, {\n value: function(s, o, i) {\n return this[n].call(this, t, s, o, i);\n },\n configurable: !0\n });\n });\n}\nlet Kt = class {\n constructor(t) {\n t && this.set(t);\n }\n set(t, r, n) {\n const s = this;\n function o(a, u, f) {\n const l = dt(u);\n if (!l)\n throw new Error(\"header name must be a non-empty string\");\n const p = h.findKey(s, l);\n (!p || s[p] === void 0 || f === !0 || f === void 0 && s[p] !== !1) && (s[p || u] = Pt(a));\n }\n const i = (a, u) => h.forEach(a, (f, l) => o(f, l, u));\n if (h.isPlainObject(t) || t instanceof this.constructor)\n i(t, r);\n else if (h.isString(t) && (t = t.trim()) && !Hc(t))\n i(qc(t), r);\n else if (h.isHeaders(t))\n for (const [a, u] of t.entries())\n o(u, a, n);\n else\n t != null && o(r, t, n);\n return this;\n }\n get(t, r) {\n if (t = dt(t), t) {\n const n = h.findKey(this, t);\n if (n) {\n const s = this[n];\n if (!r)\n return s;\n if (r === !0)\n return zc(s);\n if (h.isFunction(r))\n return r.call(this, s, n);\n if (h.isRegExp(r))\n return r.exec(s);\n throw new TypeError(\"parser must be boolean|regexp|function\");\n }\n }\n }\n has(t, r) {\n if (t = dt(t), t) {\n const n = h.findKey(this, t);\n return !!(n && this[n] !== void 0 && (!r || yr(this, this[n], n, r)));\n }\n return !1;\n }\n delete(t, r) {\n const n = this;\n let s = !1;\n function o(i) {\n if (i = dt(i), i) {\n const a = h.findKey(n, i);\n a && (!r || yr(n, n[a], a, r)) && (delete n[a], s = !0);\n }\n }\n return h.isArray(t) ? t.forEach(o) : o(t), s;\n }\n clear(t) {\n const r = Object.keys(this);\n let n = r.length, s = !1;\n for (; n--; ) {\n const o = r[n];\n (!t || yr(this, this[o], o, t, !0)) && (delete this[o], s = !0);\n }\n return s;\n }\n normalize(t) {\n const r = this, n = {};\n return h.forEach(this, (s, o) => {\n const i = h.findKey(n, o);\n if (i) {\n r[i] = Pt(s), delete r[o];\n return;\n }\n const a = t ? $c(o) : String(o).trim();\n a !== o && delete r[o], r[a] = Pt(s), n[a] = !0;\n }), this;\n }\n concat(...t) {\n return this.constructor.concat(this, ...t);\n }\n toJSON(t) {\n const r = /* @__PURE__ */ Object.create(null);\n return h.forEach(this, (n, s) => {\n n != null && n !== !1 && (r[s] = t && h.isArray(n) ? n.join(\", \") : n);\n }), r;\n }\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n toString() {\n return Object.entries(this.toJSON()).map(([t, r]) => t + \": \" + r).join(`\n`);\n }\n get [Symbol.toStringTag]() {\n return \"AxiosHeaders\";\n }\n static from(t) {\n return t instanceof this ? t : new this(t);\n }\n static concat(t, ...r) {\n const n = new this(t);\n return r.forEach((s) => n.set(s)), n;\n }\n static accessor(t) {\n const n = (this[qn] = this[qn] = {\n accessors: {}\n }).accessors, s = this.prototype;\n function o(i) {\n const a = dt(i);\n n[a] || (Vc(s, i), n[a] = !0);\n }\n return h.isArray(t) ? t.forEach(o) : o(t), this;\n }\n};\nKt.accessor([\"Content-Type\", \"Content-Length\", \"Accept\", \"Accept-Encoding\", \"User-Agent\", \"Authorization\"]);\nh.reduceDescriptors(Kt.prototype, ({ value: e }, t) => {\n let r = t[0].toUpperCase() + t.slice(1);\n return {\n get: () => e,\n set(n) {\n this[r] = n;\n }\n };\n});\nh.freezeMethods(Kt);\nconst ge = Kt;\nfunction br(e, t) {\n const r = this || Qr, n = t || r, s = ge.from(n.headers);\n let o = n.data;\n return h.forEach(e, function(a) {\n o = a.call(r, o, s.normalize(), t ? t.status : void 0);\n }), s.normalize(), o;\n}\nfunction Fs(e) {\n return !!(e && e.__CANCEL__);\n}\nfunction rt(e, t, r) {\n A.call(this, e ?? \"canceled\", A.ERR_CANCELED, t, r), this.name = \"CanceledError\";\n}\nh.inherits(rt, A, {\n __CANCEL__: !0\n});\nfunction Is(e, t, r) {\n const n = r.config.validateStatus;\n !r.status || !n || n(r.status) ? e(r) : t(new A(\n \"Request failed with status code \" + r.status,\n [A.ERR_BAD_REQUEST, A.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],\n r.config,\n r.request,\n r\n ));\n}\nfunction Wc(e) {\n const t = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);\n return t && t[1] || \"\";\n}\nfunction Jc(e, t) {\n e = e || 10;\n const r = new Array(e), n = new Array(e);\n let s = 0, o = 0, i;\n return t = t !== void 0 ? t : 1e3, function(u) {\n const f = Date.now(), l = n[o];\n i || (i = f), r[s] = u, n[s] = f;\n let p = o, m = 0;\n for (; p !== s; )\n m += r[p++], p = p % e;\n if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)\n return;\n const w = l && f - l;\n return w ? Math.round(m * 1e3 / w) : void 0;\n };\n}\nfunction Gc(e, t) {\n let r = 0, n = 1e3 / t, s, o;\n const i = (f, l = Date.now()) => {\n r = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, f);\n };\n return [(...f) => {\n const l = Date.now(), p = l - r;\n p >= n ? i(f, l) : (s = f, o || (o = setTimeout(() => {\n o = null, i(s);\n }, n - p)));\n }, () => s && i(s)];\n}\nconst kt = (e, t, r = 3) => {\n let n = 0;\n const s = Jc(50, 250);\n return Gc((o) => {\n const i = o.loaded, a = o.lengthComputable ? o.total : void 0, u = i - n, f = s(u), l = i <= a;\n n = i;\n const p = {\n loaded: i,\n total: a,\n progress: a ? i / a : void 0,\n bytes: u,\n rate: f || void 0,\n estimated: f && a && l ? (a - i) / f : void 0,\n event: o,\n lengthComputable: a != null,\n [t ? \"download\" : \"upload\"]: !0\n };\n e(p);\n }, r);\n}, zn = (e, t) => {\n const r = e != null;\n return [(n) => t[0]({\n lengthComputable: r,\n total: e,\n loaded: n\n }), t[1]];\n}, Hn = (e) => (...t) => h.asap(() => e(...t)), Kc = ae.hasStandardBrowserEnv ? (\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n function() {\n const t = ae.navigator && /(msie|trident)/i.test(ae.navigator.userAgent), r = document.createElement(\"a\");\n let n;\n function s(o) {\n let i = o;\n return t && (r.setAttribute(\"href\", i), i = r.href), r.setAttribute(\"href\", i), {\n href: r.href,\n protocol: r.protocol ? r.protocol.replace(/:$/, \"\") : \"\",\n host: r.host,\n search: r.search ? r.search.replace(/^\\?/, \"\") : \"\",\n hash: r.hash ? r.hash.replace(/^#/, \"\") : \"\",\n hostname: r.hostname,\n port: r.port,\n pathname: r.pathname.charAt(0) === \"/\" ? r.pathname : \"/\" + r.pathname\n };\n }\n return n = s(window.location.href), function(i) {\n const a = h.isString(i) ? s(i) : i;\n return a.protocol === n.protocol && a.host === n.host;\n };\n }()\n) : (\n // Non standard browser envs (web workers, react-native) lack needed support.\n function() {\n return function() {\n return !0;\n };\n }()\n), Yc = ae.hasStandardBrowserEnv ? (\n // Standard browser envs support document.cookie\n {\n write(e, t, r, n, s, o) {\n const i = [e + \"=\" + encodeURIComponent(t)];\n h.isNumber(r) && i.push(\"expires=\" + new Date(r).toGMTString()), h.isString(n) && i.push(\"path=\" + n), h.isString(s) && i.push(\"domain=\" + s), o === !0 && i.push(\"secure\"), document.cookie = i.join(\"; \");\n },\n read(e) {\n const t = document.cookie.match(new RegExp(\"(^|;\\\\s*)(\" + e + \")=([^;]*)\"));\n return t ? decodeURIComponent(t[3]) : null;\n },\n remove(e) {\n this.write(e, \"\", Date.now() - 864e5);\n }\n }\n) : (\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {\n },\n read() {\n return null;\n },\n remove() {\n }\n }\n);\nfunction Xc(e) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(e);\n}\nfunction Qc(e, t) {\n return t ? e.replace(/\\/?\\/$/, \"\") + \"/\" + t.replace(/^\\/+/, \"\") : e;\n}\nfunction Ms(e, t) {\n return e && !Xc(t) ? Qc(e, t) : t;\n}\nconst $n = (e) => e instanceof ge ? { ...e } : e;\nfunction $e(e, t) {\n t = t || {};\n const r = {};\n function n(f, l, p) {\n return h.isPlainObject(f) && h.isPlainObject(l) ? h.merge.call({ caseless: p }, f, l) : h.isPlainObject(l) ? h.merge({}, l) : h.isArray(l) ? l.slice() : l;\n }\n function s(f, l, p) {\n if (h.isUndefined(l)) {\n if (!h.isUndefined(f))\n return n(void 0, f, p);\n } else\n return n(f, l, p);\n }\n function o(f, l) {\n if (!h.isUndefined(l))\n return n(void 0, l);\n }\n function i(f, l) {\n if (h.isUndefined(l)) {\n if (!h.isUndefined(f))\n return n(void 0, f);\n } else\n return n(void 0, l);\n }\n function a(f, l, p) {\n if (p in t)\n return n(f, l);\n if (p in e)\n return n(void 0, f);\n }\n const u = {\n url: o,\n method: o,\n data: o,\n baseURL: i,\n transformRequest: i,\n transformResponse: i,\n paramsSerializer: i,\n timeout: i,\n timeoutMessage: i,\n withCredentials: i,\n withXSRFToken: i,\n adapter: i,\n responseType: i,\n xsrfCookieName: i,\n xsrfHeaderName: i,\n onUploadProgress: i,\n onDownloadProgress: i,\n decompress: i,\n maxContentLength: i,\n maxBodyLength: i,\n beforeRedirect: i,\n transport: i,\n httpAgent: i,\n httpsAgent: i,\n cancelToken: i,\n socketPath: i,\n responseEncoding: i,\n validateStatus: a,\n headers: (f, l) => s($n(f), $n(l), !0)\n };\n return h.forEach(Object.keys(Object.assign({}, e, t)), function(l) {\n const p = u[l] || s, m = p(e[l], t[l], l);\n h.isUndefined(m) && p !== a || (r[l] = m);\n }), r;\n}\nconst Ds = (e) => {\n const t = $e({}, e);\n let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = t;\n t.headers = i = ge.from(i), t.url = Os(Ms(t.baseURL, t.url), e.params, e.paramsSerializer), a && i.set(\n \"Authorization\",\n \"Basic \" + btoa((a.username || \"\") + \":\" + (a.password ? unescape(encodeURIComponent(a.password)) : \"\"))\n );\n let u;\n if (h.isFormData(r)) {\n if (ae.hasStandardBrowserEnv || ae.hasStandardBrowserWebWorkerEnv)\n i.setContentType(void 0);\n else if ((u = i.getContentType()) !== !1) {\n const [f, ...l] = u ? u.split(\";\").map((p) => p.trim()).filter(Boolean) : [];\n i.setContentType([f || \"multipart/form-data\", ...l].join(\"; \"));\n }\n }\n if (ae.hasStandardBrowserEnv && (n && h.isFunction(n) && (n = n(t)), n || n !== !1 && Kc(t.url))) {\n const f = s && o && Yc.read(o);\n f && i.set(s, f);\n }\n return t;\n}, Zc = typeof XMLHttpRequest < \"u\", el = Zc && function(e) {\n return new Promise(function(r, n) {\n const s = Ds(e);\n let o = s.data;\n const i = ge.from(s.headers).normalize();\n let { responseType: a, onUploadProgress: u, onDownloadProgress: f } = s, l, p, m, w, g;\n function v() {\n w && w(), g && g(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener(\"abort\", l);\n }\n let b = new XMLHttpRequest();\n b.open(s.method.toUpperCase(), s.url, !0), b.timeout = s.timeout;\n function _() {\n if (!b)\n return;\n const S = ge.from(\n \"getAllResponseHeaders\" in b && b.getAllResponseHeaders()\n ), j = {\n data: !a || a === \"text\" || a === \"json\" ? b.responseText : b.response,\n status: b.status,\n statusText: b.statusText,\n headers: S,\n config: e,\n request: b\n };\n Is(function(P) {\n r(P), v();\n }, function(P) {\n n(P), v();\n }, j), b = null;\n }\n \"onloadend\" in b ? b.onloadend = _ : b.onreadystatechange = function() {\n !b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.indexOf(\"file:\") === 0) || setTimeout(_);\n }, b.onabort = function() {\n b && (n(new A(\"Request aborted\", A.ECONNABORTED, e, b)), b = null);\n }, b.onerror = function() {\n n(new A(\"Network Error\", A.ERR_NETWORK, e, b)), b = null;\n }, b.ontimeout = function() {\n let C = s.timeout ? \"timeout of \" + s.timeout + \"ms exceeded\" : \"timeout exceeded\";\n const j = s.transitional || Ps;\n s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(new A(\n C,\n j.clarifyTimeoutError ? A.ETIMEDOUT : A.ECONNABORTED,\n e,\n b\n )), b = null;\n }, o === void 0 && i.setContentType(null), \"setRequestHeader\" in b && h.forEach(i.toJSON(), function(C, j) {\n b.setRequestHeader(j, C);\n }), h.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), a && a !== \"json\" && (b.responseType = s.responseType), f && ([m, g] = kt(f, !0), b.addEventListener(\"progress\", m)), u && b.upload && ([p, w] = kt(u), b.upload.addEventListener(\"progress\", p), b.upload.addEventListener(\"loadend\", w)), (s.cancelToken || s.signal) && (l = (S) => {\n b && (n(!S || S.type ? new rt(null, e, b) : S), b.abort(), b = null);\n }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener(\"abort\", l)));\n const x = Wc(s.url);\n if (x && ae.protocols.indexOf(x) === -1) {\n n(new A(\"Unsupported protocol \" + x + \":\", A.ERR_BAD_REQUEST, e));\n return;\n }\n b.send(o || null);\n });\n}, tl = (e, t) => {\n const { length: r } = e = e ? e.filter(Boolean) : [];\n if (t || r) {\n let n = new AbortController(), s;\n const o = function(f) {\n if (!s) {\n s = !0, a();\n const l = f instanceof Error ? f : this.reason;\n n.abort(l instanceof A ? l : new rt(l instanceof Error ? l.message : l));\n }\n };\n let i = t && setTimeout(() => {\n i = null, o(new A(`timeout ${t} of ms exceeded`, A.ETIMEDOUT));\n }, t);\n const a = () => {\n e && (i && clearTimeout(i), i = null, e.forEach((f) => {\n f.unsubscribe ? f.unsubscribe(o) : f.removeEventListener(\"abort\", o);\n }), e = null);\n };\n e.forEach((f) => f.addEventListener(\"abort\", o));\n const { signal: u } = n;\n return u.unsubscribe = () => h.asap(a), u;\n }\n}, rl = tl, nl = function* (e, t) {\n let r = e.byteLength;\n if (!t || r < t) {\n yield e;\n return;\n }\n let n = 0, s;\n for (; n < r; )\n s = n + t, yield e.slice(n, s), n = s;\n}, sl = async function* (e, t) {\n for await (const r of ol(e))\n yield* nl(r, t);\n}, ol = async function* (e) {\n if (e[Symbol.asyncIterator]) {\n yield* e;\n return;\n }\n const t = e.getReader();\n try {\n for (; ; ) {\n const { done: r, value: n } = await t.read();\n if (r)\n break;\n yield n;\n }\n } finally {\n await t.cancel();\n }\n}, Vn = (e, t, r, n) => {\n const s = sl(e, t);\n let o = 0, i, a = (u) => {\n i || (i = !0, n && n(u));\n };\n return new ReadableStream({\n async pull(u) {\n try {\n const { done: f, value: l } = await s.next();\n if (f) {\n a(), u.close();\n return;\n }\n let p = l.byteLength;\n if (r) {\n let m = o += p;\n r(m);\n }\n u.enqueue(new Uint8Array(l));\n } catch (f) {\n throw a(f), f;\n }\n },\n cancel(u) {\n return a(u), s.return();\n }\n }, {\n highWaterMark: 2\n });\n}, Yt = typeof fetch == \"function\" && typeof Request == \"function\" && typeof Response == \"function\", ks = Yt && typeof ReadableStream == \"function\", il = Yt && (typeof TextEncoder == \"function\" ? ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ns = (e, ...t) => {\n try {\n return !!e(...t);\n } catch {\n return !1;\n }\n}, al = ks && Ns(() => {\n let e = !1;\n const t = new Request(ae.origin, {\n body: new ReadableStream(),\n method: \"POST\",\n get duplex() {\n return e = !0, \"half\";\n }\n }).headers.has(\"Content-Type\");\n return e && !t;\n}), Wn = 64 * 1024, kr = ks && Ns(() => h.isReadableStream(new Response(\"\").body)), Nt = {\n stream: kr && ((e) => e.body)\n};\nYt && ((e) => {\n [\"text\", \"arrayBuffer\", \"blob\", \"formData\", \"stream\"].forEach((t) => {\n !Nt[t] && (Nt[t] = h.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {\n throw new A(`Response type '${t}' is not supported`, A.ERR_NOT_SUPPORT, n);\n });\n });\n})(new Response());\nconst cl = async (e) => {\n if (e == null)\n return 0;\n if (h.isBlob(e))\n return e.size;\n if (h.isSpecCompliantForm(e))\n return (await new Request(ae.origin, {\n method: \"POST\",\n body: e\n }).arrayBuffer()).byteLength;\n if (h.isArrayBufferView(e) || h.isArrayBuffer(e))\n return e.byteLength;\n if (h.isURLSearchParams(e) && (e = e + \"\"), h.isString(e))\n return (await il(e)).byteLength;\n}, ll = async (e, t) => {\n const r = h.toFiniteNumber(e.getContentLength());\n return r ?? cl(t);\n}, ul = Yt && (async (e) => {\n let {\n url: t,\n method: r,\n data: n,\n signal: s,\n cancelToken: o,\n timeout: i,\n onDownloadProgress: a,\n onUploadProgress: u,\n responseType: f,\n headers: l,\n withCredentials: p = \"same-origin\",\n fetchOptions: m\n } = Ds(e);\n f = f ? (f + \"\").toLowerCase() : \"text\";\n let w = rl([s, o && o.toAbortSignal()], i), g;\n const v = w && w.unsubscribe && (() => {\n w.unsubscribe();\n });\n let b;\n try {\n if (u && al && r !== \"get\" && r !== \"head\" && (b = await ll(l, n)) !== 0) {\n let j = new Request(t, {\n method: \"POST\",\n body: n,\n duplex: \"half\"\n }), R;\n if (h.isFormData(n) && (R = j.headers.get(\"content-type\")) && l.setContentType(R), j.body) {\n const [P, L] = zn(\n b,\n kt(Hn(u))\n );\n n = Vn(j.body, Wn, P, L);\n }\n }\n h.isString(p) || (p = p ? \"include\" : \"omit\");\n const _ = \"credentials\" in Request.prototype;\n g = new Request(t, {\n ...m,\n signal: w,\n method: r.toUpperCase(),\n headers: l.normalize().toJSON(),\n body: n,\n duplex: \"half\",\n credentials: _ ? p : void 0\n });\n let x = await fetch(g);\n const S = kr && (f === \"stream\" || f === \"response\");\n if (kr && (a || S && v)) {\n const j = {};\n [\"status\", \"statusText\", \"headers\"].forEach((H) => {\n j[H] = x[H];\n });\n const R = h.toFiniteNumber(x.headers.get(\"content-length\")), [P, L] = a && zn(\n R,\n kt(Hn(a), !0)\n ) || [];\n x = new Response(\n Vn(x.body, Wn, P, () => {\n L && L(), v && v();\n }),\n j\n );\n }\n f = f || \"text\";\n let C = await Nt[h.findKey(Nt, f) || \"text\"](x, e);\n return !S && v && v(), await new Promise((j, R) => {\n Is(j, R, {\n data: C,\n headers: ge.from(x.headers),\n status: x.status,\n statusText: x.statusText,\n config: e,\n request: g\n });\n });\n } catch (_) {\n throw v && v(), _ && _.name === \"TypeError\" && /fetch/i.test(_.message) ? Object.assign(\n new A(\"Network Error\", A.ERR_NETWORK, e, g),\n {\n cause: _.cause || _\n }\n ) : A.from(_, _ && _.code, e, g);\n }\n}), Nr = {\n http: _c,\n xhr: el,\n fetch: ul\n};\nh.forEach(Nr, (e, t) => {\n if (e) {\n try {\n Object.defineProperty(e, \"name\", { value: t });\n } catch {\n }\n Object.defineProperty(e, \"adapterName\", { value: t });\n }\n});\nconst Jn = (e) => `- ${e}`, dl = (e) => h.isFunction(e) || e === null || e === !1, Bs = {\n getAdapter: (e) => {\n e = h.isArray(e) ? e : [e];\n const { length: t } = e;\n let r, n;\n const s = {};\n for (let o = 0; o < t; o++) {\n r = e[o];\n let i;\n if (n = r, !dl(r) && (n = Nr[(i = String(r)).toLowerCase()], n === void 0))\n throw new A(`Unknown adapter '${i}'`);\n if (n)\n break;\n s[i || \"#\" + o] = n;\n }\n if (!n) {\n const o = Object.entries(s).map(\n ([a, u]) => `adapter ${a} ` + (u === !1 ? \"is not supported by the environment\" : \"is not available in the build\")\n );\n let i = t ? o.length > 1 ? `since :\n` + o.map(Jn).join(`\n`) : \" \" + Jn(o[0]) : \"as no adapter specified\";\n throw new A(\n \"There is no suitable adapter to dispatch the request \" + i,\n \"ERR_NOT_SUPPORT\"\n );\n }\n return n;\n },\n adapters: Nr\n};\nfunction vr(e) {\n if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)\n throw new rt(null, e);\n}\nfunction Gn(e) {\n return vr(e), e.headers = ge.from(e.headers), e.data = br.call(\n e,\n e.transformRequest\n ), [\"post\", \"put\", \"patch\"].indexOf(e.method) !== -1 && e.headers.setContentType(\"application/x-www-form-urlencoded\", !1), Bs.getAdapter(e.adapter || Qr.adapter)(e).then(function(n) {\n return vr(e), n.data = br.call(\n e,\n e.transformResponse,\n n\n ), n.headers = ge.from(n.headers), n;\n }, function(n) {\n return Fs(n) || (vr(e), n && n.response && (n.response.data = br.call(\n e,\n e.transformResponse,\n n.response\n ), n.response.headers = ge.from(n.response.headers))), Promise.reject(n);\n });\n}\nconst Ls = \"1.7.7\", Zr = {};\n[\"object\", \"boolean\", \"number\", \"function\", \"string\", \"symbol\"].forEach((e, t) => {\n Zr[e] = function(n) {\n return typeof n === e || \"a\" + (t < 1 ? \"n \" : \" \") + e;\n };\n});\nconst Kn = {};\nZr.transitional = function(t, r, n) {\n function s(o, i) {\n return \"[Axios v\" + Ls + \"] Transitional option '\" + o + \"'\" + i + (n ? \". \" + n : \"\");\n }\n return (o, i, a) => {\n if (t === !1)\n throw new A(\n s(i, \" has been removed\" + (r ? \" in \" + r : \"\")),\n A.ERR_DEPRECATED\n );\n return r && !Kn[i] && (Kn[i] = !0, console.warn(\n s(\n i,\n \" has been deprecated since v\" + r + \" and will be removed in the near future\"\n )\n )), t ? t(o, i, a) : !0;\n };\n};\nfunction fl(e, t, r) {\n if (typeof e != \"object\")\n throw new A(\"options must be an object\", A.ERR_BAD_OPTION_VALUE);\n const n = Object.keys(e);\n let s = n.length;\n for (; s-- > 0; ) {\n const o = n[s], i = t[o];\n if (i) {\n const a = e[o], u = a === void 0 || i(a, o, e);\n if (u !== !0)\n throw new A(\"option \" + o + \" must be \" + u, A.ERR_BAD_OPTION_VALUE);\n continue;\n }\n if (r !== !0)\n throw new A(\"Unknown option \" + o, A.ERR_BAD_OPTION);\n }\n}\nconst Br = {\n assertOptions: fl,\n validators: Zr\n}, Pe = Br.validators;\nlet Bt = class {\n constructor(t) {\n this.defaults = t, this.interceptors = {\n request: new Un(),\n response: new Un()\n };\n }\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(t, r) {\n try {\n return await this._request(t, r);\n } catch (n) {\n if (n instanceof Error) {\n let s;\n Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();\n const o = s.stack ? s.stack.replace(/^.+\\n/, \"\") : \"\";\n try {\n n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\\n.+\\n/, \"\")) && (n.stack += `\n` + o) : n.stack = o;\n } catch {\n }\n }\n throw n;\n }\n }\n _request(t, r) {\n typeof t == \"string\" ? (r = r || {}, r.url = t) : r = t || {}, r = $e(this.defaults, r);\n const { transitional: n, paramsSerializer: s, headers: o } = r;\n n !== void 0 && Br.assertOptions(n, {\n silentJSONParsing: Pe.transitional(Pe.boolean),\n forcedJSONParsing: Pe.transitional(Pe.boolean),\n clarifyTimeoutError: Pe.transitional(Pe.boolean)\n }, !1), s != null && (h.isFunction(s) ? r.paramsSerializer = {\n serialize: s\n } : Br.assertOptions(s, {\n encode: Pe.function,\n serialize: Pe.function\n }, !0)), r.method = (r.method || this.defaults.method || \"get\").toLowerCase();\n let i = o && h.merge(\n o.common,\n o[r.method]\n );\n o && h.forEach(\n [\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\", \"common\"],\n (g) => {\n delete o[g];\n }\n ), r.headers = ge.concat(i, o);\n const a = [];\n let u = !0;\n this.interceptors.request.forEach(function(v) {\n typeof v.runWhen == \"function\" && v.runWhen(r) === !1 || (u = u && v.synchronous, a.unshift(v.fulfilled, v.rejected));\n });\n const f = [];\n this.interceptors.response.forEach(function(v) {\n f.push(v.fulfilled, v.rejected);\n });\n let l, p = 0, m;\n if (!u) {\n const g = [Gn.bind(this), void 0];\n for (g.unshift.apply(g, a), g.push.apply(g, f), m = g.length, l = Promise.resolve(r); p < m; )\n l = l.then(g[p++], g[p++]);\n return l;\n }\n m = a.length;\n let w = r;\n for (p = 0; p < m; ) {\n const g = a[p++], v = a[p++];\n try {\n w = g(w);\n } catch (b) {\n v.call(this, b);\n break;\n }\n }\n try {\n l = Gn.call(this, w);\n } catch (g) {\n return Promise.reject(g);\n }\n for (p = 0, m = f.length; p < m; )\n l = l.then(f[p++], f[p++]);\n return l;\n }\n getUri(t) {\n t = $e(this.defaults, t);\n const r = Ms(t.baseURL, t.url);\n return Os(r, t.params, t.paramsSerializer);\n }\n};\nh.forEach([\"delete\", \"get\", \"head\", \"options\"], function(t) {\n Bt.prototype[t] = function(r, n) {\n return this.request($e(n || {}, {\n method: t,\n url: r,\n data: (n || {}).data\n }));\n };\n});\nh.forEach([\"post\", \"put\", \"patch\"], function(t) {\n function r(n) {\n return function(o, i, a) {\n return this.request($e(a || {}, {\n method: t,\n headers: n ? {\n \"Content-Type\": \"multipart/form-data\"\n } : {},\n url: o,\n data: i\n }));\n };\n }\n Bt.prototype[t] = r(), Bt.prototype[t + \"Form\"] = r(!0);\n});\nconst jt = Bt;\nlet hl = class Us {\n constructor(t) {\n if (typeof t != \"function\")\n throw new TypeError(\"executor must be a function.\");\n let r;\n this.promise = new Promise(function(o) {\n r = o;\n });\n const n = this;\n this.promise.then((s) => {\n if (!n._listeners)\n return;\n let o = n._listeners.length;\n for (; o-- > 0; )\n n._listeners[o](s);\n n._listeners = null;\n }), this.promise.then = (s) => {\n let o;\n const i = new Promise((a) => {\n n.subscribe(a), o = a;\n }).then(s);\n return i.cancel = function() {\n n.unsubscribe(o);\n }, i;\n }, t(function(o, i, a) {\n n.reason || (n.reason = new rt(o, i, a), r(n.reason));\n });\n }\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason)\n throw this.reason;\n }\n /**\n * Subscribe to the cancel signal\n */\n subscribe(t) {\n if (this.reason) {\n t(this.reason);\n return;\n }\n this._listeners ? this._listeners.push(t) : this._listeners = [t];\n }\n /**\n * Unsubscribe from the cancel signal\n */\n unsubscribe(t) {\n if (!this._listeners)\n return;\n const r = this._listeners.indexOf(t);\n r !== -1 && this._listeners.splice(r, 1);\n }\n toAbortSignal() {\n const t = new AbortController(), r = (n) => {\n t.abort(n);\n };\n return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;\n }\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let t;\n return {\n token: new Us(function(s) {\n t = s;\n }),\n cancel: t\n };\n }\n};\nconst pl = hl;\nfunction ml(e) {\n return function(r) {\n return e.apply(null, r);\n };\n}\nfunction gl(e) {\n return h.isObject(e) && e.isAxiosError === !0;\n}\nconst Lr = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511\n};\nObject.entries(Lr).forEach(([e, t]) => {\n Lr[t] = e;\n});\nconst yl = Lr;\nfunction qs(e) {\n const t = new jt(e), r = ys(jt.prototype.request, t);\n return h.extend(r, jt.prototype, t, { allOwnKeys: !0 }), h.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {\n return qs($e(e, s));\n }, r;\n}\nconst K = qs(Qr);\nK.Axios = jt;\nK.CanceledError = rt;\nK.CancelToken = pl;\nK.isCancel = Fs;\nK.VERSION = Ls;\nK.toFormData = Gt;\nK.AxiosError = A;\nK.Cancel = K.CanceledError;\nK.all = function(t) {\n return Promise.all(t);\n};\nK.spread = ml;\nK.isAxiosError = gl;\nK.mergeConfig = $e;\nK.AxiosHeaders = ge;\nK.formToJSON = (e) => js(h.isHTMLForm(e) ? new FormData(e) : e);\nK.getAdapter = Bs.getAdapter;\nK.HttpStatusCode = yl;\nK.default = K;\nconst zs = K, {\n Axios: ql,\n AxiosError: zl,\n CanceledError: Hl,\n isCancel: $l,\n CancelToken: Vl,\n VERSION: Wl,\n all: Jl,\n Cancel: Gl,\n isAxiosError: Kl,\n spread: Yl,\n toFormData: Xl,\n AxiosHeaders: Ql,\n HttpStatusCode: bl,\n formToJSON: Zl,\n getAdapter: eu,\n mergeConfig: tu\n} = zs, vl = (e, t) => ({ ...e, headers: { ...e.headers, ...t } }), El = (e, t) => ({ ...e, params: t }), wl = (e) => ({\n data: e.data,\n isSuccess: xl(e),\n status: e.status,\n statusText: e.statusText\n}), xl = (e) => e.status === bl.Ok;\nclass Yn {\n constructor({\n baseUrl: t,\n authHeader: r,\n withCredentials: n\n }) {\n ct(this, \"axiosInstance\");\n ct(this, \"authHeader\");\n this.axiosInstance = zs.create({\n baseURL: t,\n headers: { \"Content-Type\": \"application/json\" },\n withCredentials: n || !1\n }), this.authHeader = r || {};\n }\n async get(t, r = {}, n = {}, s = !0) {\n return this.request({ url: t, config: n, withAuth: s, method: \"get\", queryParams: r });\n }\n async post(t, r, n = {}, s = !0) {\n return this.request({ url: t, config: n, withAuth: s, payload: r, method: \"post\" });\n }\n async put(t, r, n = {}, s = !0) {\n return this.request({ url: t, config: n, withAuth: s, payload: r, method: \"put\" });\n }\n async delete(t, r = {}, n = {}, s = !0) {\n return this.request({ url: t, config: n, withAuth: s, method: \"delete\", queryParams: r });\n }\n async request(t) {\n const { method: r, url: n, payload: s, config: o, withAuth: i, queryParams: a } = t, u = i ? vl(o, this.authHeader) : o, f = a ? El(u, a) : u, l = s ? await this.axiosInstance[r](n, s, f) : await this.axiosInstance[r](n, f);\n return wl(l);\n }\n}\nclass _l {\n constructor(t, r) {\n ct(this, \"studioApiClient\");\n ct(this, \"identityClient\");\n this.studioApiUrl = t, this.identityApiUrl = r;\n }\n initialize(t = \"\") {\n this.studioApiClient = new Yn({\n baseUrl: this.studioApiUrl,\n authHeader: this.createStudioApiAuth(),\n withCredentials: !0\n }), this.identityClient = new Yn({\n baseUrl: this.identityApiUrl,\n authHeader: this.createIdentityAuth(t),\n withCredentials: !0\n });\n }\n getStudioApiClient() {\n return this.studioApiClient;\n }\n getIdentityClient() {\n return this.identityClient;\n }\n createIdentityAuth(t) {\n return { \"firebase-token\": t };\n }\n createStudioApiAuth() {\n return {};\n }\n}\nconst ru = ({ studioApiUrl: e, identityApiUrl: t, idToken: r }) => {\n const n = V(() => new _l(e, t), [e, t]);\n return Ft(() => {\n n.initialize(r);\n }, [r, n]), n;\n};\nexport {\n Wo as AssistantChatBubble,\n Al as ChatError,\n Ol as ChatFooter,\n Xo as ChatFunctionField,\n Pl as ChatMessageFeed,\n Ee as ChatModels,\n Nl as ChatUIProvider,\n Il as DeleteDocumentModal,\n Ml as EditMessageModal,\n jl as EmptyChatExampleCards,\n Fl as EmptyChatHeader,\n Io as FunctionInputTool,\n Bo as FunctionInputTools,\n Dl as MessageInfoModal,\n kl as RegenerateModal,\n Jo as UserChatBubble,\n ai as UserDocumentChatBubble,\n na as useChatModelParametersStore,\n Bl as useChatService,\n ps as useChatStore,\n ma as useFeedback,\n ru as useHttpService,\n Na as useSendChatMessages\n};\n"],"names":["co","lo","r","ct","or","z","ke","Ye","n","Xe","_t","_o","xr","lt","hn","So","Ve","i","a","u","f","l","m","w","Zn","F","To","St","O","es","Ro","Ao","Oo","mn","Po","jo","Fo","Io","V","me","ho","q","qe","Mo","Do","ko","s","No","pe","we","Bo","Ie","ts","qr","zr","Hr","$r","Vr","Lo","Uo","Rt","qo","wr","te","zo","Ho","Z","$o","gn","Ue","Vo","Qn","rs","Wo","g","v","b","_","x","S","C","Ur","Jo","ft","Al","o","t","xt","Ol","po","Qo","Zo","ei","ti","ri","ni","si","yn","oi","bn","ii","Ft","ai","yo","ns","ci","ss","li","Pl","Er","ui","di","fi","hi","jl","ir","pi","mi","gi","fo","yi","bi","vi","Ei","wi","xi","_i","Si","Ci","Fl","Il","Lt","bo","Ti","Ml","vo","Ri","Ai","Oi","Pi","ji","vn","Dl","kl","Nl","Eo","En","p","Fi","_r","ar","Ct","cr","wn","Ii","_n","os","Sn","Di","R","P","L","j","Ni","Bi","Li","Ui","qi","zi","Tn","is","as","Rn","de","ie","Ze","et","ze","cs","qt","zt","$i","It","Ut","Sr","ls","Vi","Ne","Cr","Wr","Ht","Wi","Ji","He","ht","us","Gi","An","Tr","Rr","Ki","On","Pn","Mt","Dt","jn","Yi","Jr","pt","Xi","dr","fr","Or","ds","Ar","Qi","Zi","fs","fe","ea","ta","hs","ps","Ee","Pr","ra","hr","Fn","pr","na","sa","In","ia","oa","Mn","aa","ms","ca","je","Fe","oe","Se","Qe","At","gt","jr","Xn","la","ua","Be.createContext","da","Be.useContext","fa","ha","Fr","Be.useState","Be.useEffect","Be.useSyncExternalStore","Be.useCallback","mr","pa","ma","ga","Tt","ya","ba","Y","va","Ea","Dn","$t","wa","xa","wo","_a","Sa","Ca","Ta","Ra","Aa","Oa","Pa","ja","Fa","ka","gs","Da","Ia","Ma","xo","Na","Bl","H","xe","Me","be","X","re","ve","_e","ce","nt","Ce","bt","Te","Re","st","vt","Ae","W","Oe","I","U","N","J","le","ne","Q","Zt","wt","it","We","ot","Je","Xt","Et","Qt","ys","Ba","Gr","Vt","ye","Wt","tt","mt","La","ue","bs","Ua","qa","vs","Jt","za","Ot","Ha","$a","Va","Wa","Ja","Ga","Ka","Ya","Xa","Qa","Za","ec","yt","Es","Le","ws","Ir","tc","rc","nc","sc","oc","ic","ac","cc","lc","uc","dc","kn","fc","xs","hc","pc","mc","gc","gr","Nn","_s","yc","bc","vc","Ec","wc","Ss","xc","A","Cs","Ts","_c","Mr","Rs","Bn","Sc","Cc","Gt","Ln","Kr","As","Tc","Os","Rc","Un","Ps","Ac","Oc","Pc","jc","Yr","Dr","Fc","Ic","Mc","Dc","ae","kc","Nc","Bc","js","Lc","Xr","Qr","Uc","qc","qn","dt","Pt","zc","Hc","yr","$c","Vc","Kt","ge","br","Fs","rt","Is","Wc","Jc","Gc","kt","zn","Hn","Kc","Yc","Xc","Qc","Ms","$n","$e","Ds","Zc","el","tl","rl","nl","sl","ol","Vn","Yt","ks","il","Ns","al","Wn","kr","Nt","cl","ll","ul","Nr","Jn","dl","Bs","vr","Gn","Ls","Zr","Kn","fl","Br","Pe","Bt","jt","hl","Us","pl","ml","gl","Lr","yl","qs","K","zs","ql","zl","Hl","$l","Vl","Wl","Jl","Gl","Kl","Yl","Xl","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