@next-bricks/ai 1.23.13 → 1.23.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +5 -2
- package/dist/chunks/{1122.875fef49.js → 1122.0d0eeba0.js} +2 -2
- package/dist/chunks/1122.0d0eeba0.js.map +1 -0
- package/dist/chunks/{114.4a5c3827.js → 114.31177ce6.js} +2 -2
- package/dist/chunks/{114.4a5c3827.js.map → 114.31177ce6.js.map} +1 -1
- package/dist/chunks/{1940.ce3d4836.js → 1940.de532591.js} +2 -2
- package/dist/chunks/{1940.ce3d4836.js.map → 1940.de532591.js.map} +1 -1
- package/dist/chunks/{2277.f1c3d460.js → 2277.33c71f3d.js} +2 -2
- package/dist/chunks/{2277.f1c3d460.js.map → 2277.33c71f3d.js.map} +1 -1
- package/dist/chunks/2605.45bdb682.js +2 -0
- package/dist/chunks/2605.45bdb682.js.map +1 -0
- package/dist/chunks/{3171.52c278f7.js → 3171.5ef107e0.js} +2 -2
- package/dist/chunks/{3171.52c278f7.js.map → 3171.5ef107e0.js.map} +1 -1
- package/dist/chunks/3533.159153f5.js +3 -0
- package/dist/chunks/3533.159153f5.js.map +1 -0
- package/dist/chunks/{3933.de5e46f7.js → 3933.f8607e06.js} +2 -2
- package/dist/chunks/{6314.529e5545.js.map → 3933.f8607e06.js.map} +1 -1
- package/dist/chunks/{4658.6a23a499.js → 4658.1f3df89d.js} +2 -2
- package/dist/chunks/{4658.6a23a499.js.map → 4658.1f3df89d.js.map} +1 -1
- package/dist/chunks/{4837.74abadc0.js → 4837.b37dbb53.js} +2 -2
- package/dist/chunks/{4837.74abadc0.js.map → 4837.b37dbb53.js.map} +1 -1
- package/dist/chunks/{5399.9d42a7ca.js → 5399.229220b5.js} +2 -2
- package/dist/chunks/{5399.9d42a7ca.js.map → 5399.229220b5.js.map} +1 -1
- package/dist/chunks/5425.a571701f.js +2 -0
- package/dist/chunks/5425.a571701f.js.map +1 -0
- package/dist/chunks/{5552.c235863f.js → 5552.afad62dd.js} +2 -2
- package/dist/chunks/{5552.c235863f.js.map → 5552.afad62dd.js.map} +1 -1
- package/dist/chunks/{5927.249f90a5.js → 5927.8dcd2de1.js} +3 -3
- package/dist/chunks/{5927.249f90a5.js.map → 5927.8dcd2de1.js.map} +1 -1
- package/dist/chunks/{6314.529e5545.js → 6314.5e44c91c.js} +2 -2
- package/dist/chunks/{3933.de5e46f7.js.map → 6314.5e44c91c.js.map} +1 -1
- package/dist/chunks/{7218.d4a00b3e.js → 7218.3fa896a1.js} +2 -2
- package/dist/chunks/{7218.d4a00b3e.js.map → 7218.3fa896a1.js.map} +1 -1
- package/dist/chunks/{7733.a27c4438.js → 7733.06a15fa1.js} +2 -2
- package/dist/chunks/{7733.a27c4438.js.map → 7733.06a15fa1.js.map} +1 -1
- package/dist/chunks/{9559.bf647ef7.js → 9559.8870b76d.js} +2 -2
- package/dist/chunks/{9559.bf647ef7.js.map → 9559.8870b76d.js.map} +1 -1
- package/dist/chunks/{chat-agent.b971090f.js → chat-agent.540b41db.js} +2 -2
- package/dist/chunks/{chat-agent.b971090f.js.map → chat-agent.540b41db.js.map} +1 -1
- package/dist/chunks/chat-view.e5f25597.js +2 -0
- package/dist/chunks/chat-view.e5f25597.js.map +1 -0
- package/dist/chunks/{main.6e72aca1.js → main.370450eb.js} +2 -2
- package/dist/chunks/{main.6e72aca1.js.map → main.370450eb.js.map} +1 -1
- package/dist/{index.89d6893a.js → index.fddef8c3.js} +2 -2
- package/dist/{index.89d6893a.js.map → index.fddef8c3.js.map} +1 -1
- package/dist-types/chat-view/ChatService.d.ts +3 -1
- package/dist-types/chat-view/ChatViewContext.d.ts +2 -1
- package/dist-types/chat-view/hooks/useChatViewInfo.d.ts +2 -1
- package/package.json +4 -4
- package/dist/chunks/1122.875fef49.js.map +0 -1
- package/dist/chunks/2605.8271284d.js +0 -2
- package/dist/chunks/2605.8271284d.js.map +0 -1
- package/dist/chunks/3533.8abb32d5.js +0 -3
- package/dist/chunks/3533.8abb32d5.js.map +0 -1
- package/dist/chunks/5425.108ee571.js +0 -2
- package/dist/chunks/5425.108ee571.js.map +0 -1
- package/dist/chunks/chat-view.efda5395.js +0 -2
- package/dist/chunks/chat-view.efda5395.js.map +0 -1
- /package/dist/chunks/{3533.8abb32d5.js.LICENSE.txt → 3533.159153f5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5927.249f90a5.js.LICENSE.txt → 5927.8dcd2de1.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/1122.875fef49.js","mappings":"6JACe,SAASA,EAAgBC,EAAKC,EAAKC,GAYhD,OAXAD,GAAM,OAAcA,MACTD,EACTG,OAAOC,eAAeJ,EAAKC,EAAK,CAC9BC,MAAOA,EACPG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZP,EAAIC,GAAOC,EAENF,CACT,C,gDCZe,SAASQ,EAAcC,GACpC,IAAIC,ECFS,SAAqBD,EAAGE,GACrC,GAAI,WAAY,OAAQF,KAAOA,EAAG,OAAOA,EACzC,IAAIG,EAAIH,EAAEI,OAAOC,aACjB,QAAI,IAAWF,EAAG,CAChB,IAAIF,EAAIE,EAAEG,KAAKN,EAAGE,UAClB,GAAI,WAAY,OAAQD,GAAI,OAAOA,EACnC,MAAM,IAAIM,UAAU,+CACtB,CACA,OAAyBC,OAAiBR,EAC5C,CDPUK,CAAYL,GACpB,MAAO,WAAY,OAAQC,GAAKA,EAAIA,EAAI,EAC1C,C,iBELe,SAASQ,EAAQC,GAG9B,OAAOD,EAAU,mBAAqBL,QAAU,iBAAmBA,OAAOO,SAAW,SAAUD,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAK,mBAAqBN,QAAUM,EAAEE,cAAgBR,QAAUM,IAAMN,OAAOS,UAAY,gBAAkBH,CACpH,EAAGD,EAAQC,EACb,C,8SCPO,IAAII,EAAoB,SAAUA,GAGvC,OAFAA,EAAKA,EAA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AAiC5E,GACtC,OAAO,IAAAuW,iBAAgBvW,EAAQ,CAC7ByV,QAAS,CAAC,SAAU,CAAC,mBAAoB,CACvCe,SAAU,aAEZX,eAAe,GAEnB,CCCqBY,CAAwBzW,GAK3C,MAAO,CACL4E,aACAuP,sBAN4BH,EAAQpP,EAAY,IAC7CjG,EACH+E,gBAAgB,IAKhB1D,SACAkM,OAAQkK,EAAM,GACdM,OAAQN,EAAM,GAElB,CACO,SAASO,GAAYzQ,GAC1B,MAAO,gBAAgBH,KAAKG,IAAQ,WAAWH,KAAKG,EACtD,CACO,SAAS0Q,GAAgC1Q,GAC9C,MAAO,YAAYH,KAAKG,EAC1B,CACO,SAAS2Q,GAAW3Q,GACzB,MAAO,YAAYH,KAAKG,IAAQ,WAAWH,KAAKG,EAClD,C","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///../../node_modules/@next-core/cook/dist/esm/ExecutionContext.js","webpack:///../../node_modules/@next-core/cook/dist/esm/traverse.js","webpack:///../../node_modules/@next-core/cook/dist/esm/context-free.js","webpack:///../../node_modules/@next-core/cook/dist/esm/sanitize.js","webpack:///../../node_modules/@next-core/cook/dist/esm/cook.js","webpack:///../../node_modules/@next-core/cook/dist/esm/AnalysisContext.js","webpack:///../../node_modules/@next-core/cook/dist/esm/precook.js","webpack:///../../node_modules/@next-core/cook/dist/esm/hasOwnProperty.js","webpack:///../../node_modules/@next-core/cook/dist/esm/precookFunction.js","webpack:///../../node_modules/@next-core/cook/dist/esm/parse.js","webpack:///../../node_modules/@next-core/cook/dist/esm/preevaluate.js"],"sourcesContent":["import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nexport let Mode = /*#__PURE__*/function (Mode) {\n Mode[Mode[\"LEXICAL\"] = 0] = \"LEXICAL\";\n Mode[Mode[\"STRICT\"] = 1] = \"STRICT\";\n return Mode;\n}({});\nexport const SourceNode = Symbol.for(\"SourceNode\");\nexport const FormalParameters = Symbol.for(\"FormalParameters\");\nexport const ECMAScriptCode = Symbol.for(\"ECMAScriptCode\");\nexport const Environment = Symbol.for(\"Environment\");\nexport const IsConstructor = Symbol.for(\"IsConstructor\");\nexport const ThisMode = Symbol.for(\"ThisMode\");\nexport const DebuggerCall = Symbol.for(\"$DebuggerCall$\");\nexport const DebuggerScope = Symbol.for(\"$DebuggerScope$\");\nexport const DebuggerNode = Symbol.for(\"$DebuggerNode$\");\nexport const DebuggerReturn = Symbol.for(\"$DebuggerReturn$\");\n\n// https://tc39.es/ecma262/#sec-execution-contexts\nexport class ExecutionContext {\n constructor() {\n _defineProperty(this, \"VariableEnvironment\", void 0);\n _defineProperty(this, \"LexicalEnvironment\", void 0);\n _defineProperty(this, \"Function\", void 0);\n }\n}\nexport let BindingStatus = /*#__PURE__*/function (BindingStatus) {\n BindingStatus[BindingStatus[\"UNINITIALIZED\"] = 0] = \"UNINITIALIZED\";\n BindingStatus[BindingStatus[\"LEXICAL\"] = 1] = \"LEXICAL\";\n BindingStatus[BindingStatus[\"INITIALIZED\"] = 2] = \"INITIALIZED\";\n return BindingStatus;\n}({});\n\n// https://tc39.es/ecma262/#sec-environment-records\nexport class EnvironmentRecord {\n constructor(outer) {\n _defineProperty(this, \"OuterEnv\", void 0);\n _defineProperty(this, \"bindingMap\", new Map());\n _defineProperty(this, \"ThisValue\", undefined);\n _defineProperty(this, \"ThisBindingStatus\", void 0);\n this.OuterEnv = outer;\n }\n HasBinding(name) {\n return this.bindingMap.has(name);\n }\n CreateMutableBinding(name, deletable) {\n // Assert: binding does not exist.\n this.bindingMap.set(name, {\n mutable: true,\n deletable\n });\n return NormalCompletion(undefined);\n }\n\n /**\n * Create an immutable binding.\n *\n * @param name - The binding name.\n * @param strict - For named function expressions, strict is false, otherwise it's true.\n * @returns CompletionRecord.\n */\n CreateImmutableBinding(name, strict) {\n // Assert: binding does not exist.\n this.bindingMap.set(name, {\n strict\n });\n return NormalCompletion(undefined);\n }\n InitializeBinding(name, value) {\n const binding = this.bindingMap.get(name);\n // Assert: binding exists and uninitialized.\n Object.assign(binding, {\n initialized: true,\n value\n });\n return NormalCompletion(undefined);\n }\n\n /**\n * Update a mutable binding value, including function declarations.\n *\n * @param name - The binding name.\n * @param value - The binding value.\n * @param strict - For functions, strict is always false, otherwise it depends on strict-mode.\n * @returns\n */\n SetMutableBinding(name, value, _strict) {\n const binding = this.bindingMap.get(name);\n // Assert: binding exists.\n if (!binding.initialized) {\n throw new ReferenceError(`${name} is not initialized`);\n } else if (binding.mutable) {\n binding.value = value;\n } else {\n throw new TypeError(`Assignment to constant variable`);\n }\n return NormalCompletion(undefined);\n }\n GetBindingValue(name, _strict) {\n const binding = this.bindingMap.get(name);\n // Assert: binding exists.\n if (!binding.initialized) {\n throw new ReferenceError(`${name} is not initialized`);\n }\n return binding.value;\n }\n HasThisBinding() {\n return false;\n }\n}\nexport class DeclarativeEnvironment extends EnvironmentRecord {}\nexport class FunctionEnvironment extends EnvironmentRecord {\n constructor(F) {\n super(F[Environment]);\n if (F[ThisMode] === Mode.LEXICAL) {\n this.ThisBindingStatus = BindingStatus.LEXICAL;\n } else {\n this.ThisBindingStatus = BindingStatus.UNINITIALIZED;\n }\n }\n HasThisBinding() {\n return this.ThisBindingStatus !== BindingStatus.LEXICAL;\n }\n BindThisValue(value) {\n // Assert: envRec.[[ThisBindingStatus]] is not LEXICAL.\n if (this.ThisBindingStatus === BindingStatus.INITIALIZED) {\n throw new Error(\"This binding has been initialized\");\n }\n this.ThisValue = value;\n this.ThisBindingStatus = BindingStatus.INITIALIZED;\n }\n GetThisBinding() {\n // Assert: envRec.[[ThisBindingStatus]] is not LEXICAL.\n if (this.ThisBindingStatus === BindingStatus.UNINITIALIZED) {\n throw new Error(\"This binding is not initialized\");\n }\n return this.ThisValue;\n }\n}\n// https://tc39.es/ecma262/#sec-reference-record-specification-type\nexport class ReferenceRecord {\n constructor(base, referenceName, strict) {\n _defineProperty(this, \"Base\", void 0);\n _defineProperty(this, \"ReferenceName\", void 0);\n /** Whether the reference is in strict mode. */\n _defineProperty(this, \"Strict\", void 0);\n this.Base = base;\n this.ReferenceName = referenceName;\n this.Strict = strict;\n }\n}\n\n// https://tc39.es/ecma262/#sec-completion-record-specification-type\nexport class CompletionRecord {\n constructor(type, value) {\n _defineProperty(this, \"Type\", void 0);\n _defineProperty(this, \"Value\", void 0);\n this.Type = type;\n this.Value = value;\n }\n}\n// https://tc39.es/ecma262/#sec-normalcompletion\nexport function NormalCompletion(value) {\n return new CompletionRecord(\"normal\", value);\n}\nexport const Empty = Symbol(\"empty completion\");\n//# sourceMappingURL=ExecutionContext.js.map","export function collectBoundNames(root) {\n const names = new Set();\n const collect = node => {\n if (Array.isArray(node)) {\n for (const n of node) {\n collect(n);\n }\n } else if (node) {\n // `node` maybe `null` in some cases.\n switch (node.type) {\n case \"Identifier\":\n names.add(node.name);\n return;\n case \"VariableDeclaration\":\n return collect(node.declarations);\n case \"VariableDeclarator\":\n return collect(node.id);\n case \"ArrayPattern\":\n return collect(node.elements);\n case \"AssignmentPattern\":\n return collect(node.left);\n case \"ObjectPattern\":\n return collect(node.properties);\n case \"Property\":\n return collect(node.value);\n case \"RestElement\":\n return collect(node.argument);\n case \"FunctionDeclaration\":\n return collect(node.id);\n }\n }\n };\n collect(root);\n return Array.from(names);\n}\nexport function containsExpression(root) {\n const collect = node => {\n if (Array.isArray(node)) {\n return node.some(collect);\n } else if (node) {\n // `node` maybe `null` in some cases.\n switch (node.type) {\n case \"ArrayPattern\":\n return collect(node.elements);\n case \"AssignmentPattern\":\n return true;\n case \"ObjectPattern\":\n return collect(node.properties);\n case \"Property\":\n return node.computed || collect(node.value);\n case \"RestElement\":\n return collect(node.argument);\n }\n }\n };\n return collect(root);\n}\nexport function collectScopedDeclarations(root, options) {\n const declarations = [];\n const nextOptions = {\n var: options.var\n };\n const collect = (node, options) => {\n if (Array.isArray(node)) {\n for (const n of node) {\n collect(n, options);\n }\n } else if (node) {\n // `node` maybe `null` in some cases.\n switch (node.type) {\n case \"FunctionDeclaration\":\n // At the top level of a function, or script, function declarations are\n // treated like var declarations rather than like lexical declarations.\n // See https://tc39.es/ecma262/#sec-static-semantics-toplevellexicallydeclarednames\n if (Number(!options.var) ^ Number(options.topLevel)) {\n declarations.push(node);\n }\n return;\n case \"VariableDeclaration\":\n if (Number(!options.var) ^ Number(node.kind === \"var\")) {\n declarations.push(node);\n }\n return;\n case \"SwitchCase\":\n collect(node.consequent, nextOptions);\n return;\n case \"CatchClause\":\n collect(node.body, nextOptions);\n return;\n }\n if (options.var) {\n switch (node.type) {\n case \"BlockStatement\":\n collect(node.body, nextOptions);\n return;\n case \"IfStatement\":\n collect(node.consequent, nextOptions);\n collect(node.alternate, nextOptions);\n return;\n case \"DoWhileStatement\":\n case \"WhileStatement\":\n collect(node.body, nextOptions);\n return;\n case \"ForStatement\":\n collect(node.init, nextOptions);\n collect(node.body, nextOptions);\n return;\n case \"ForInStatement\":\n case \"ForOfStatement\":\n collect(node.left, nextOptions);\n collect(node.body, nextOptions);\n return;\n case \"SwitchStatement\":\n collect(node.cases, nextOptions);\n return;\n case \"TryStatement\":\n collect(node.block, nextOptions);\n collect(node.handler, nextOptions);\n collect(node.finalizer, nextOptions);\n return;\n }\n }\n }\n };\n collect(root, options);\n return declarations;\n}\n//# sourceMappingURL=traverse.js.map","import { CompletionRecord, Empty, EnvironmentRecord, NormalCompletion, ReferenceRecord } from \"./ExecutionContext.js\";\nimport { collectBoundNames } from \"./traverse.js\";\n\n// https://tc39.es/ecma262/#sec-ispropertyreference\nexport function IsPropertyReference(V) {\n return V.Base !== \"unresolvable\" && !(V.Base instanceof EnvironmentRecord);\n}\n\n// https://tc39.es/ecma262/#sec-initializereferencedbinding\nexport function InitializeReferencedBinding(V, W) {\n const base = V.Base;\n return base.InitializeBinding(V.ReferenceName, W);\n}\n\n// https://tc39.es/ecma262/#sec-copydataproperties\nexport function CopyDataProperties(target, source, excludedItems) {\n if (source === undefined || source === null) {\n return target;\n }\n const keys = Object.getOwnPropertyNames(source).concat(Object.getOwnPropertySymbols(source));\n for (const nextKey of keys) {\n if (!excludedItems.has(nextKey)) {\n const desc = Object.getOwnPropertyDescriptor(source, nextKey);\n if (desc !== null && desc !== void 0 && desc.enumerable) {\n target[nextKey] = source[nextKey];\n }\n }\n }\n return target;\n}\n\n// https://tc39.es/ecma262/#sec-runtime-semantics-fordeclarationbindinginstantiation\nexport function ForDeclarationBindingInstantiation(forDeclaration, env) {\n const isConst = forDeclaration.kind === \"const\";\n for (const name of collectBoundNames(forDeclaration)) {\n if (isConst) {\n env.CreateImmutableBinding(name, true);\n } else {\n env.CreateMutableBinding(name, false);\n }\n }\n}\n\n// https://tc39.es/ecma262/#sec-loopcontinues\nexport function LoopContinues(completion) {\n return completion.Type === \"normal\" || completion.Type == \"continue\";\n}\n\n// https://tc39.es/ecma262/#sec-updateempty\nexport function UpdateEmpty(completion, value) {\n if (completion.Value !== Empty) {\n return completion;\n }\n return new CompletionRecord(completion.Type, value);\n}\n\n// https://tc39.es/ecma262/#sec-getvalue\nexport function GetValue(V) {\n if (V instanceof CompletionRecord) {\n // Assert: V.Type is normal.\n V = V.Value;\n }\n if (!(V instanceof ReferenceRecord)) {\n return V;\n }\n if (V.Base === \"unresolvable\") {\n throw new ReferenceError(`${V.ReferenceName} is not defined`);\n }\n if (V.Base instanceof EnvironmentRecord) {\n const base = V.Base;\n return base.GetBindingValue(V.ReferenceName, V.Strict);\n }\n return V.Base[V.ReferenceName];\n}\n\n// https://tc39.es/ecma262/#sec-topropertykey\nexport function ToPropertyKey(arg) {\n if (typeof arg === \"symbol\") {\n return arg;\n }\n return String(arg);\n}\n\n// https://tc39.es/ecma262/#sec-getv\nexport function GetV(V, P) {\n return V[P];\n}\n\n// https://tc39.es/ecma262/#sec-putvalue\nexport function PutValue(V, W) {\n // Assert: V is a ReferenceRecord.\n if (V.Base === \"unresolvable\") {\n throw new ReferenceError(`${V.ReferenceName} is not defined`);\n }\n if (V.Base instanceof EnvironmentRecord) {\n return V.Base.SetMutableBinding(V.ReferenceName, W, V.Strict);\n }\n V.Base[V.ReferenceName] = W;\n return NormalCompletion(undefined);\n}\n\n// https://tc39.es/ecma262/#sec-createlistiteratorRecord\nexport function CreateListIteratorRecord(args) {\n if (!isIterable(args)) {\n throw new TypeError(`${typeof args} is not iterable`);\n }\n return args[Symbol.iterator]();\n}\n\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nexport function RequireObjectCoercible(arg) {\n if (arg === null || arg === undefined) {\n throw new TypeError(\"Cannot destructure properties of undefined or null\");\n }\n}\n\n// https://tc39.es/ecma262/#sec-getidentifierreference\nexport function GetIdentifierReference(env, name, strict) {\n if (!env) {\n return new ReferenceRecord(\"unresolvable\", name, strict);\n }\n if (env.HasBinding(name)) {\n return new ReferenceRecord(env, name, strict);\n }\n return GetIdentifierReference(env.OuterEnv, name, strict);\n}\n\n// https://tc39.es/ecma262/#sec-applystringornumericbinaryoperator\nexport function ApplyStringOrNumericBinaryOperator(leftValue, operator, rightValue) {\n switch (operator) {\n case \"+\":\n return leftValue + rightValue;\n case \"-\":\n return leftValue - rightValue;\n case \"/\":\n return leftValue / rightValue;\n case \"%\":\n return leftValue % rightValue;\n case \"*\":\n return leftValue * rightValue;\n case \"**\":\n return leftValue ** rightValue;\n case \"==\":\n return leftValue == rightValue;\n case \"===\":\n return leftValue === rightValue;\n case \"!=\":\n return leftValue != rightValue;\n case \"!==\":\n return leftValue !== rightValue;\n case \">\":\n return leftValue > rightValue;\n case \"<\":\n return leftValue < rightValue;\n case \">=\":\n return leftValue >= rightValue;\n case \"<=\":\n return leftValue <= rightValue;\n case \"in\":\n return leftValue in rightValue;\n }\n throw new SyntaxError(`Unsupported binary operator \\`${operator}\\``);\n}\n\n// https://tc39.es/ecma262/#sec-assignment-operators\nexport function ApplyStringOrNumericAssignment(leftValue, operator, rightValue) {\n switch (operator) {\n case \"+=\":\n case \"-=\":\n case \"*=\":\n case \"/=\":\n case \"%=\":\n case \"**=\":\n return ApplyStringOrNumericBinaryOperator(leftValue, operator.substr(0, operator.length - 1), rightValue);\n }\n throw new SyntaxError(`Unsupported assignment operator \\`${operator}\\``);\n}\n\n// https://tc39.es/ecma262/#sec-unary-operators\nexport function ApplyUnaryOperator(target, operator) {\n switch (operator) {\n case \"!\":\n return !target;\n case \"+\":\n return +target;\n case \"-\":\n return -target;\n case \"void\":\n return undefined;\n }\n throw new SyntaxError(`Unsupported unary operator \\`${operator}\\``);\n}\nexport function isIterable(cooked) {\n if (Array.isArray(cooked)) {\n return true;\n }\n if (cooked === null || cooked === undefined) {\n return false;\n }\n return typeof cooked[Symbol.iterator] === \"function\";\n}\n//# sourceMappingURL=context-free.js.map","// Ref https://github.com/tc39/proposal-global\n// In addition, the es6-shim had to switch from Function('return this')()\n// due to CSP concerns, such that the current check to handle browsers,\n// node, web workers, and frames is:\n// istanbul ignore next\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction getGlobal() {\n // the only reliable means to get the global object is\n // `Function('return this')()`\n // However, this causes CSP violations in Chrome apps.\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n}\n\n/**\n * There are chances to construct a `Function` from a string, etc.\n * ```\n * ((a,b)=>a[b])(()=>1, 'constructor')('console.log(`yo`)')()\n * ```\n */\nconst reservedObjects = new WeakSet([\n// `Function(\"...\")` is considered *extremely vulnerable*.\nFunction,\n// `Object.assign()` is considered vulnerable.\nObject,\n// `prototype` is considered vulnerable.\nFunction.prototype, Object.prototype,\n// Global `window` is considered vulnerable, too.\ngetGlobal()]);\nexport function sanitize(cooked) {\n // eslint-disable-next-line @typescript-eslint/ban-types\n if (reservedObjects.has(cooked)) {\n throw new TypeError(\"Cannot access reserved objects such as `Function`.\");\n }\n}\nconst allowedConstructors = new WeakSet([Array, Map, Set, URLSearchParams, WeakMap, WeakSet, RegExp]);\nexport function isAllowedConstructor(constructor) {\n // `Date` maybe mocked when running tests for storyboard functions.\n return allowedConstructors.has(constructor) || constructor === Date;\n}\n//# sourceMappingURL=sanitize.js.map","import { ApplyStringOrNumericAssignment, CreateListIteratorRecord, ApplyStringOrNumericBinaryOperator, GetV, GetValue, InitializeReferencedBinding, IsPropertyReference, LoopContinues, PutValue, RequireObjectCoercible, ToPropertyKey, UpdateEmpty, ApplyUnaryOperator, GetIdentifierReference, ForDeclarationBindingInstantiation, CopyDataProperties } from \"./context-free.js\";\nimport { CompletionRecord, DebuggerCall, DebuggerNode, DebuggerReturn, DebuggerScope, DeclarativeEnvironment, ECMAScriptCode, Empty, Environment, ExecutionContext, FormalParameters, FunctionEnvironment, IsConstructor, NormalCompletion, ReferenceRecord, SourceNode, Mode, ThisMode } from \"./ExecutionContext.js\";\nimport { sanitize, isAllowedConstructor } from \"./sanitize.js\";\nimport { collectBoundNames, collectScopedDeclarations, containsExpression } from \"./traverse.js\";\nconst globalExecutionContextStack = [];\nexport function __dev_only_clearGlobalExecutionContextStack() {\n globalExecutionContextStack.length = 0;\n}\nexport function __dev_only_getGlobalExecutionContextStack() {\n return globalExecutionContextStack;\n}\n\n/** For next-core internal usage only. */\nexport function cook(rootAst, codeSource) {\n var _hooks$beforeEvaluate4;\n let {\n rules,\n debug,\n externalSourceForDebug,\n globalVariables = {},\n // Allow debugger to override Array constructor.\n ArrayConstructor = Array,\n hooks = {}\n } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const expressionOnly = rootAst.type !== \"FunctionDeclaration\";\n function doSanitize(cooked) {\n if (!externalSourceForDebug) {\n sanitize(cooked);\n }\n }\n const rootEnv = new DeclarativeEnvironment(null);\n const rootContext = new ExecutionContext();\n rootContext.VariableEnvironment = rootEnv;\n rootContext.LexicalEnvironment = rootEnv;\n const executionContextStack = [rootContext];\n for (const [key, value] of Object.entries(globalVariables)) {\n rootEnv.CreateImmutableBinding(key, true);\n rootEnv.InitializeBinding(key, value);\n }\n const TemplateMap = new WeakMap();\n\n // https://tc39.es/ecma262/#sec-gettemplateobject\n function GetTemplateObject(templateLiteral) {\n const memo = TemplateMap.get(templateLiteral);\n if (memo) {\n return memo;\n }\n const rawObj = templateLiteral.quasis.map(quasi => quasi.value.raw);\n const template = templateLiteral.quasis.map(quasi => quasi.value.cooked);\n Object.freeze(rawObj);\n Object.defineProperty(template, \"raw\", {\n value: rawObj,\n writable: false,\n enumerable: false,\n configurable: false\n });\n Object.freeze(template);\n TemplateMap.set(templateLiteral, template);\n return template;\n }\n let currentNode;\n function* Evaluate(node, optionalChainRef, forceYield) {\n var _hooks$beforeEvaluate, _hooks$beforeBranch2;\n (_hooks$beforeEvaluate = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate === void 0 || _hooks$beforeEvaluate.call(hooks, node);\n currentNode = node;\n if (debug && (forceYield || node.type.endsWith(\"Statement\") && !(node.type === \"ExpressionStatement\" && (node.expression.type === \"CallExpression\" || node.expression.type === \"TaggedTemplateExpression\")) && node.type !== \"TryStatement\" && node.type !== \"BlockStatement\" && node.type !== \"DoWhileStatement\" && node.type !== \"WhileStatement\" && node.type !== \"ForStatement\" && node.type !== \"ForInStatement\" && node.type !== \"ForOfStatement\")) {\n yield;\n }\n // Expressions:\n switch (node.type) {\n case \"ArrayExpression\":\n {\n // https://tc39.es/ecma262/#sec-array-initializer\n const array = new ArrayConstructor();\n for (const element of node.elements) {\n if (!element) {\n array.length += 1;\n } else if (element.type === \"SpreadElement\") {\n const spreadValues = GetValue(yield* Evaluate(element.argument));\n array.push(...spreadValues);\n } else {\n array.push(GetValue(yield* Evaluate(element)));\n }\n }\n return NormalCompletion(array);\n }\n case \"ArrowFunctionExpression\":\n {\n // https://tc39.es/ecma262/#sec-arrow-function-definitions\n ThrowIfFunctionIsInvalid(node);\n const closure = InstantiateArrowFunctionExpression(node);\n return NormalCompletion(closure);\n }\n case \"BinaryExpression\":\n {\n const leftRef = yield* Evaluate(node.left);\n const leftValue = GetValue(leftRef);\n const rightRef = yield* Evaluate(node.right);\n const rightValue = GetValue(rightRef);\n if (expressionOnly && node.operator === \"|>\") {\n // Minimal pipeline operator is supported only in expression-only mode.\n // See https://tc39.es/proposal-pipeline-operator\n // and https://github.com/tc39/proposal-pipeline-operator\n if (typeof rightValue !== \"function\") {\n const funcName = codeSource.substring(node.right.start, node.right.end);\n throw new TypeError(`${funcName} is not a function`);\n }\n let thisValue;\n if (rightRef instanceof ReferenceRecord) {\n if (IsPropertyReference(rightRef)) {\n thisValue = rightRef.Base;\n }\n }\n return NormalCompletion(rightValue.call(thisValue, leftValue));\n }\n // https://tc39.es/ecma262/#sec-additive-operators\n const result = ApplyStringOrNumericBinaryOperator(leftValue, node.operator, rightValue);\n return NormalCompletion(result);\n }\n case \"CallExpression\":\n {\n // https://tc39.es/ecma262/#sec-function-calls\n const ref = (yield* Evaluate(node.callee, optionalChainRef)).Value;\n const func = GetValue(ref);\n if ((func === undefined || func === null) && (node.optional || optionalChainRef !== null && optionalChainRef !== void 0 && optionalChainRef.skipped)) {\n optionalChainRef.skipped = true;\n return NormalCompletion(undefined);\n }\n doSanitize(func);\n if (debug) yield;\n return yield* EvaluateCall(func, ref, node.arguments, node.callee);\n }\n case \"ChainExpression\":\n // https://tc39.es/ecma262/#sec-optional-chains\n return yield* Evaluate(node.expression, {});\n case \"ConditionalExpression\":\n // https://tc39.es/ecma262/#sec-conditional-operator\n return NormalCompletion(GetValue(yield* Evaluate(GetValue(yield* Evaluate(node.test)) ? node.consequent : node.alternate)));\n case \"Identifier\":\n // https://tc39.es/ecma262/#sec-identifiers\n return NormalCompletion(ResolveBinding(node.name));\n case \"Literal\":\n {\n // https://tc39.es/ecma262/#sec-primary-expression-literals\n if (node.regex) {\n if (node.value === null) {\n // Invalid regular expression fails silently in @babel/parser.\n throw new SyntaxError(`Invalid regular expression: ${node.raw}`);\n }\n if (node.regex.flags.includes(\"u\")) {\n // Currently unicode flag is not fully supported across major browsers.\n throw new SyntaxError(`Unsupported unicode flag in regular expression: ${node.raw}`);\n }\n }\n return NormalCompletion(node.value);\n }\n case \"LogicalExpression\":\n {\n // https://tc39.es/ecma262/#sec-binary-logical-operators\n const leftValue = GetValue(yield* Evaluate(node.left));\n switch (node.operator) {\n case \"&&\":\n return NormalCompletion(leftValue && GetValue(yield* Evaluate(node.right)));\n case \"||\":\n return NormalCompletion(leftValue || GetValue(yield* Evaluate(node.right)));\n case \"??\":\n return NormalCompletion(leftValue ?? GetValue(yield* Evaluate(node.right)));\n // istanbul ignore next\n default:\n throw new SyntaxError(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore never reach here.\n `Unsupported logical operator '${node.operator}'`);\n }\n }\n case \"MemberExpression\":\n {\n // https://tc39.es/ecma262/#sec-property-accessors\n const baseReference = (yield* Evaluate(node.object, optionalChainRef)).Value;\n const baseValue = GetValue(baseReference);\n if ((baseValue === undefined || baseValue === null) && (node.optional || optionalChainRef !== null && optionalChainRef !== void 0 && optionalChainRef.skipped)) {\n optionalChainRef.skipped = true;\n return NormalCompletion(undefined);\n }\n doSanitize(baseValue);\n const result = node.computed ? yield* EvaluatePropertyAccessWithExpressionKey(baseValue, node.property, true) : EvaluatePropertyAccessWithIdentifierKey(baseValue, node.property, true);\n doSanitize(result);\n return NormalCompletion(result);\n }\n case \"NewExpression\":\n // https://tc39.es/ecma262/#sec-new-operator\n return yield* EvaluateNew(node.callee, node.arguments);\n case \"ObjectExpression\":\n {\n // https://tc39.es/ecma262/#sec-object-initializer\n const object = {};\n for (const prop of node.properties) {\n if (prop.type === \"SpreadElement\") {\n const fromValue = GetValue(yield* Evaluate(prop.argument));\n CopyDataProperties(object, fromValue, new Set());\n } else {\n if (prop.kind !== \"init\") {\n throw new SyntaxError(\"Unsupported object getter/setter\");\n }\n const propName = !prop.computed && prop.key.type === \"Identifier\" ? prop.key.name : yield* EvaluateComputedPropertyName(prop.key);\n if (propName === \"__proto__\") {\n throw new TypeError(\"Setting '__proto__' property is not allowed\");\n }\n const propValue = GetValue(yield* Evaluate(prop.value));\n if (prop.method && typeof propValue === \"function\") {\n SetFunctionName(propValue, propName);\n }\n object[propName] = propValue;\n }\n }\n return NormalCompletion(object);\n }\n case \"SequenceExpression\":\n {\n // https://tc39.es/ecma262/#sec-comma-operator\n let result;\n for (const expr of node.expressions) {\n result = NormalCompletion(GetValue(yield* Evaluate(expr)));\n }\n return result;\n }\n case \"TemplateLiteral\":\n {\n // https://tc39.es/ecma262/#sec-template-literals\n const chunks = [node.quasis[0].value.cooked];\n let index = 0;\n for (const expr of node.expressions) {\n const val = GetValue(yield* Evaluate(expr));\n chunks.push(String(val));\n chunks.push(node.quasis[index += 1].value.cooked);\n }\n return NormalCompletion(chunks.join(\"\"));\n }\n case \"TaggedTemplateExpression\":\n {\n // https://tc39.es/ecma262/#sec-tagged-templates\n const tagRef = (yield* Evaluate(node.tag)).Value;\n const tagFunc = GetValue(tagRef);\n doSanitize(tagFunc);\n if (debug) yield;\n return yield* EvaluateCall(tagFunc, tagRef, node.quasi, node.tag);\n }\n case \"UnaryExpression\":\n {\n // https://tc39.es/ecma262/#sec-unary-operators\n const ref = (yield* Evaluate(node.argument)).Value;\n if (!expressionOnly && node.operator === \"delete\") {\n // Delete operator is supported only in function mode.\n if (!(ref instanceof ReferenceRecord)) {\n return NormalCompletion(true);\n }\n // istanbul ignore else\n if (IsPropertyReference(ref)) {\n const deleteStatus = delete ref.Base[ref.ReferenceName];\n return NormalCompletion(deleteStatus);\n }\n // Should never reach here in strict mode.\n }\n if (node.operator === \"typeof\") {\n if (ref instanceof ReferenceRecord && ref.Base === \"unresolvable\") {\n return NormalCompletion(\"undefined\");\n }\n return NormalCompletion(typeof GetValue(ref));\n }\n return NormalCompletion(ApplyUnaryOperator(GetValue(ref), node.operator));\n }\n }\n if (!expressionOnly) {\n // Statements and assignments:\n switch (node.type) {\n case \"AssignmentExpression\":\n {\n // https://tc39.es/ecma262/#sec-assignment-operators\n if (node.operator === \"=\") {\n if (!(node.left.type === \"ArrayPattern\" || node.left.type === \"ObjectPattern\")) {\n const lref = (yield* Evaluate(node.left)).Value;\n let rval;\n if (IsAnonymousFunctionDefinition(node.right) && node.left.type === \"Identifier\") {\n rval = NamedEvaluation(node.right, node.left.name);\n } else {\n const rref = yield* Evaluate(node.right);\n rval = GetValue(rref);\n }\n PutValue(lref, rval);\n return NormalCompletion(rval);\n }\n const rref = yield* Evaluate(node.right);\n const rval = GetValue(rref);\n yield* DestructuringAssignmentEvaluation(node.left, rval);\n return NormalCompletion(rval);\n }\n // Operators other than `=`.\n const lref = (yield* Evaluate(node.left)).Value;\n const lval = GetValue(lref);\n const rref = yield* Evaluate(node.right);\n const rval = GetValue(rref);\n const r = ApplyStringOrNumericAssignment(lval, node.operator, rval);\n PutValue(lref, r);\n return NormalCompletion(r);\n }\n case \"BlockStatement\":\n {\n // https://tc39.es/ecma262/#sec-block\n if (!node.body.length) {\n return NormalCompletion(Empty);\n }\n const oldEnv = getRunningContext().LexicalEnvironment;\n const blockEnv = new DeclarativeEnvironment(oldEnv);\n BlockDeclarationInstantiation(node.body, blockEnv);\n getRunningContext().LexicalEnvironment = blockEnv;\n const blockValue = yield* EvaluateStatementList(node.body);\n getRunningContext().LexicalEnvironment = oldEnv;\n return blockValue;\n }\n case \"BreakStatement\":\n // https://tc39.es/ecma262/#sec-break-statement\n return new CompletionRecord(\"break\", Empty);\n case \"ContinueStatement\":\n // https://tc39.es/ecma262/#sec-continue-statement\n return new CompletionRecord(\"continue\", Empty);\n case \"EmptyStatement\":\n // https://tc39.es/ecma262/#sec-empty-statement\n return NormalCompletion(Empty);\n case \"DoWhileStatement\":\n // https://tc39.es/ecma262/#sec-do-while-statement\n return EvaluateBreakableStatement(yield* DoWhileLoopEvaluation(node));\n case \"ExpressionStatement\":\n case \"TSAsExpression\":\n // https://tc39.es/ecma262/#sec-expression-statement\n return yield* Evaluate(node.expression);\n case \"ForInStatement\":\n case \"ForOfStatement\":\n // https://tc39.es/ecma262/#sec-for-in-and-for-of-statements\n return EvaluateBreakableStatement(yield* ForInOfLoopEvaluation(node));\n case \"ForStatement\":\n // https://tc39.es/ecma262/#sec-for-statement\n return EvaluateBreakableStatement(yield* ForLoopEvaluation(node));\n case \"FunctionDeclaration\":\n // https://tc39.es/ecma262/#sec-function-definitions\n return NormalCompletion(Empty);\n case \"FunctionExpression\":\n // https://tc39.es/ecma262/#sec-function-defining-expressions\n ThrowIfFunctionIsInvalid(node);\n return NormalCompletion(InstantiateOrdinaryFunctionExpression(node));\n case \"IfStatement\":\n // https://tc39.es/ecma262/#sec-if-statement\n if (GetValue(yield* Evaluate(node.test))) {\n var _hooks$beforeBranch;\n (_hooks$beforeBranch = hooks.beforeBranch) === null || _hooks$beforeBranch === void 0 || _hooks$beforeBranch.call(hooks, node, \"if\");\n return UpdateEmpty(yield* Evaluate(node.consequent), undefined);\n }\n (_hooks$beforeBranch2 = hooks.beforeBranch) === null || _hooks$beforeBranch2 === void 0 || _hooks$beforeBranch2.call(hooks, node, \"else\");\n if (node.alternate) {\n return UpdateEmpty(yield* Evaluate(node.alternate), undefined);\n }\n return NormalCompletion(undefined);\n case \"ReturnStatement\":\n {\n // https://tc39.es/ecma262/#sec-return-statement\n let v;\n if (node.argument) {\n const exprRef = yield* Evaluate(node.argument);\n v = GetValue(exprRef);\n }\n return new CompletionRecord(\"return\", v);\n }\n case \"ThisExpression\":\n {\n if (!externalSourceForDebug) {\n break;\n }\n const envRec = GetThisEnvironment();\n return NormalCompletion(envRec.GetThisBinding());\n }\n case \"ThrowStatement\":\n // https://tc39.es/ecma262/#sec-throw-statement\n throw GetValue(yield* Evaluate(node.argument));\n case \"UpdateExpression\":\n {\n // https://tc39.es/ecma262/#sec-update-expressions\n const lhs = (yield* Evaluate(node.argument)).Value;\n const oldValue = Number(GetValue(lhs));\n const newValue = node.operator === \"++\" ? oldValue + 1 : oldValue - 1;\n PutValue(lhs, newValue);\n return NormalCompletion(node.prefix ? newValue : oldValue);\n }\n case \"SwitchCase\":\n return yield* EvaluateStatementList(node.consequent);\n case \"SwitchStatement\":\n {\n // https://tc39.es/ecma262/#sec-switch-statement\n const exprRef = yield* Evaluate(node.discriminant);\n const switchValue = GetValue(exprRef);\n const oldEnv = getRunningContext().LexicalEnvironment;\n const blockEnv = new DeclarativeEnvironment(oldEnv);\n BlockDeclarationInstantiation(node.cases, blockEnv);\n getRunningContext().LexicalEnvironment = blockEnv;\n const R = yield* CaseBlockEvaluation(node.cases, switchValue);\n getRunningContext().LexicalEnvironment = oldEnv;\n return EvaluateBreakableStatement(R);\n }\n case \"TryStatement\":\n {\n // https://tc39.es/ecma262/#sec-try-statement\n let R;\n try {\n R = yield* Evaluate(node.block);\n } catch (error) {\n if (node.handler) {\n var _hooks$beforeEvaluate2;\n currentNode = node.handler;\n (_hooks$beforeEvaluate2 = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate2 === void 0 || _hooks$beforeEvaluate2.call(hooks, node.handler);\n R = yield* CatchClauseEvaluation(node.handler, error);\n } else {\n throw error;\n }\n } finally {\n if (node.finalizer) {\n const F = yield* Evaluate(node.finalizer);\n if (F.Type !== \"normal\") {\n R = F;\n }\n }\n }\n return R;\n }\n case \"VariableDeclaration\":\n {\n // https://tc39.es/ecma262/#sec-declarations-and-the-variable-statement\n let result;\n for (const declarator of node.declarations) {\n currentNode = declarator;\n if (!declarator.init) {\n // Assert: a declarator without init is always an identifier.\n if (node.kind === \"var\") {\n result = NormalCompletion(Empty);\n } else {\n const lhs = ResolveBinding(declarator.id.name);\n result = InitializeReferencedBinding(lhs, undefined);\n }\n } else if (declarator.id.type === \"Identifier\") {\n currentNode = declarator.init;\n if (debug && currentNode.type !== \"CallExpression\" && currentNode.type !== \"TaggedTemplateExpression\") yield;\n const bindingId = declarator.id.name;\n const lhs = ResolveBinding(bindingId);\n let value;\n if (IsAnonymousFunctionDefinition(declarator.init)) {\n value = NamedEvaluation(declarator.init, bindingId);\n } else {\n const rhs = yield* Evaluate(declarator.init);\n value = GetValue(rhs);\n }\n result = node.kind === \"var\" ? PutValue(lhs, value) : InitializeReferencedBinding(lhs, value);\n } else {\n currentNode = declarator.init;\n if (debug && currentNode.type !== \"CallExpression\" && currentNode.type !== \"TaggedTemplateExpression\") yield;\n const rhs = yield* Evaluate(declarator.init);\n const rval = GetValue(rhs);\n result = yield* BindingInitialization(declarator.id, rval, node.kind === \"var\" ? undefined : getRunningContext().LexicalEnvironment);\n }\n }\n return result;\n }\n case \"WhileStatement\":\n // https://tc39.es/ecma262/#sec-while-statement\n return EvaluateBreakableStatement(yield* WhileLoopEvaluation(node));\n }\n }\n // eslint-disable-next-line no-console\n throw new SyntaxError(`Unsupported node type \\`${node.type}\\``);\n }\n\n // https://tc39.es/ecma262/#sec-execution-contexts\n function getRunningContext() {\n return executionContextStack[executionContextStack.length - 1];\n }\n\n // https://tc39.es/ecma262/#sec-resolvebinding\n function ResolveBinding(name, env) {\n if (!env) {\n env = getRunningContext().LexicalEnvironment;\n }\n return GetIdentifierReference(env, name, true);\n }\n\n // Try statements.\n // https://tc39.es/ecma262/#sec-runtime-semantics-catchclauseevaluation\n function* CatchClauseEvaluation(node, thrownValue) {\n if (!node.param) {\n return yield* Evaluate(node.body);\n }\n const oldEnv = getRunningContext().LexicalEnvironment;\n const catchEnv = new DeclarativeEnvironment(oldEnv);\n for (const argName of collectBoundNames(node.param)) {\n catchEnv.CreateMutableBinding(argName, false);\n }\n getRunningContext().LexicalEnvironment = catchEnv;\n yield* BindingInitialization(node.param, thrownValue, catchEnv);\n const B = yield* Evaluate(node.body);\n getRunningContext().LexicalEnvironment = oldEnv;\n return B;\n }\n\n // Iteration statements and switch statements.\n // https://tc39.es/ecma262/#prod-BreakableStatement\n function EvaluateBreakableStatement(stmtResult) {\n return stmtResult.Type === \"break\" ? stmtResult.Value === Empty ? NormalCompletion(undefined) : NormalCompletion(stmtResult.Value) : stmtResult;\n }\n\n // Switch statements.\n // https://tc39.es/ecma262/#sec-runtime-semantics-caseblockevaluation\n function* CaseBlockEvaluation(cases, input) {\n let V;\n const defaultCaseIndex = cases.findIndex(switchCase => !switchCase.test);\n const hasDefaultCase = defaultCaseIndex >= 0;\n const A = hasDefaultCase ? cases.slice(0, defaultCaseIndex) : cases;\n let found = false;\n for (const C of A) {\n if (!found) {\n found = yield* CaseClauseIsSelected(C, input);\n }\n if (found) {\n const R = yield* Evaluate(C);\n if (R.Value !== Empty) {\n V = R.Value;\n }\n if (R.Type !== \"normal\") {\n return UpdateEmpty(R, V);\n }\n }\n }\n if (!hasDefaultCase) {\n return NormalCompletion(V);\n }\n let foundInB = false;\n const B = cases.slice(defaultCaseIndex + 1);\n if (!found) {\n for (const C of B) {\n if (!foundInB) {\n foundInB = yield* CaseClauseIsSelected(C, input);\n }\n if (foundInB) {\n const R = yield* Evaluate(C);\n if (R.Value !== Empty) {\n V = R.Value;\n }\n if (R.Type !== \"normal\") {\n return UpdateEmpty(R, V);\n }\n }\n }\n }\n if (foundInB) {\n return NormalCompletion(V);\n }\n const R = yield* Evaluate(cases[defaultCaseIndex]);\n if (R.Value !== Empty) {\n V = R.Value;\n }\n if (R.Type !== \"normal\") {\n return UpdateEmpty(R, V);\n }\n\n // NOTE: The following is another complete iteration of the second CaseClauses.\n for (const C of B) {\n const R = yield* Evaluate(C);\n if (R.Value !== Empty) {\n V = R.Value;\n }\n if (R.Type !== \"normal\") {\n return UpdateEmpty(R, V);\n }\n }\n return NormalCompletion(V);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-caseclauseisselected\n function* CaseClauseIsSelected(C, input) {\n const clauseSelector = GetValue(yield* Evaluate(C.test));\n return input === clauseSelector;\n }\n\n // While statements.\n // https://tc39.es/ecma262/#sec-runtime-semantics-whileloopevaluation\n function* WhileLoopEvaluation(node) {\n let V;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const exprValue = GetValue(yield* Evaluate(node.test, undefined, true));\n if (!exprValue) {\n return NormalCompletion(V);\n }\n const stmtResult = yield* Evaluate(node.body);\n if (!LoopContinues(stmtResult)) {\n return UpdateEmpty(stmtResult, V);\n }\n if (stmtResult.Value !== Empty) {\n V = stmtResult.Value;\n }\n }\n }\n\n // Do-while Statements.\n // https://tc39.es/ecma262/#sec-runtime-semantics-dowhileloopevaluation\n function* DoWhileLoopEvaluation(node) {\n let V;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const stmtResult = yield* Evaluate(node.body);\n if (!LoopContinues(stmtResult)) {\n return UpdateEmpty(stmtResult, V);\n }\n if (stmtResult.Value !== Empty) {\n V = stmtResult.Value;\n }\n const exprValue = GetValue(yield* Evaluate(node.test, undefined, true));\n if (!exprValue) {\n return NormalCompletion(V);\n }\n }\n }\n\n // For in/of statements.\n // https://tc39.es/ecma262/#sec-runtime-semantics-forinofloopevaluation\n function* ForInOfLoopEvaluation(node) {\n const lhs = node.left;\n const isVariableDeclaration = lhs.type === \"VariableDeclaration\";\n const lhsKind = isVariableDeclaration ? lhs.kind === \"var\" ? \"varBinding\" : \"lexicalBinding\" : \"assignment\";\n const uninitializedBoundNames = lhsKind === \"lexicalBinding\" ? collectBoundNames(lhs) : [];\n const iterationKind = node.type === \"ForInStatement\" ? \"enumerate\" : \"iterate\";\n const keyResult = yield* ForInOfHeadEvaluation(uninitializedBoundNames, node.right, iterationKind);\n if (keyResult.Type !== \"normal\") {\n // When enumerate, if the target is nil, a break completion will be returned.\n return keyResult;\n }\n return yield* ForInOfBodyEvaluation(lhs, node.body, keyResult.Value, iterationKind, lhsKind);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-forinofheadevaluation\n function* ForInOfHeadEvaluation(uninitializedBoundNames, expr, iterationKind) {\n const runningContext = getRunningContext();\n const oldEnv = runningContext.LexicalEnvironment;\n if (uninitializedBoundNames.length > 0) {\n const newEnv = new DeclarativeEnvironment(oldEnv);\n for (const name of uninitializedBoundNames) {\n newEnv.CreateMutableBinding(name, false);\n }\n runningContext.LexicalEnvironment = newEnv;\n }\n const exprRef = yield* Evaluate(expr, undefined, true);\n runningContext.LexicalEnvironment = oldEnv;\n const exprValue = GetValue(exprRef);\n if (iterationKind === \"enumerate\") {\n if (exprValue === null || exprValue === undefined) {\n return new CompletionRecord(\"break\", Empty);\n }\n const iterator = EnumerateObjectProperties(exprValue);\n return NormalCompletion(iterator);\n }\n const iterator = CreateListIteratorRecord(exprValue);\n return NormalCompletion(iterator);\n }\n function* ForInOfBodyEvaluation(node, stmt, iteratorRecord, iterationKind, lhsKind) {\n const lhs = lhsKind === \"assignment\" ? node : node.declarations[0].id;\n const oldEnv = getRunningContext().LexicalEnvironment;\n let V;\n // When `destructuring` is false,\n // For `node` whose `kind` is assignment:\n // `lhs` is an `Identifier` or a `MemberExpression`,\n // Otherwise:\n // `lhs` is an `Identifier`.\n const destructuring = lhs.type === \"ObjectPattern\" || lhs.type === \"ArrayPattern\";\n // eslint-disable-next-line no-constant-condition\n while (true) {\n currentNode = lhs;\n const {\n done,\n value: nextValue\n } = iteratorRecord.next();\n if (done) {\n if (debug) yield;\n return NormalCompletion(V);\n }\n let lhsRef;\n let iterationEnv;\n if (lhsKind === \"lexicalBinding\") {\n iterationEnv = new DeclarativeEnvironment(oldEnv);\n ForDeclarationBindingInstantiation(node, iterationEnv);\n getRunningContext().LexicalEnvironment = iterationEnv;\n if (debug) yield;\n if (!destructuring) {\n const [lhsName] = collectBoundNames(lhs);\n lhsRef = ResolveBinding(lhsName);\n }\n } else {\n if (debug) yield;\n if (!destructuring) {\n lhsRef = (yield* Evaluate(lhs)).Value;\n }\n }\n destructuring ? lhsKind === \"assignment\" ? yield* DestructuringAssignmentEvaluation(lhs, nextValue) : lhsKind === \"varBinding\" ? yield* BindingInitialization(lhs, nextValue, undefined) : yield* BindingInitialization(lhs, nextValue, iterationEnv) : lhsKind === \"lexicalBinding\" ? InitializeReferencedBinding(lhsRef, nextValue) : PutValue(lhsRef, nextValue);\n const result = yield* Evaluate(stmt);\n getRunningContext().LexicalEnvironment = oldEnv;\n if (!LoopContinues(result)) {\n const status = UpdateEmpty(result, V);\n if (!(iterationKind === \"enumerate\" || iteratorRecord.return === undefined)) {\n // Perform *IteratorClose*\n // https://tc39.es/ecma262/#sec-iteratorclose\n const innerResult = iteratorRecord.return();\n if (!innerResult || ![\"object\", \"function\"].includes(typeof innerResult)) {\n throw new TypeError(`Iterator result is not an object`);\n }\n }\n return status;\n }\n if (result.Value !== Empty) {\n V = result.Value;\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-enumerate-object-properties\n function* EnumerateObjectProperties(value) {\n for (const key in value) {\n yield key;\n }\n }\n\n // For statements.\n // https://tc39.es/ecma262/#sec-runtime-semantics-forloopevaluation\n function* ForLoopEvaluation(node) {\n var _node$init;\n if (((_node$init = node.init) === null || _node$init === void 0 ? void 0 : _node$init.type) === \"VariableDeclaration\") {\n // `for (var … ; … ; … ) …`\n if (node.init.kind === \"var\") {\n yield* Evaluate(node.init);\n return yield* ForBodyEvaluation(node.test, node.update, node.body, []);\n }\n // `for (let/const … ; … ; … ) …`\n const oldEnv = getRunningContext().LexicalEnvironment;\n const loopEnv = new DeclarativeEnvironment(oldEnv);\n const isConst = node.init.kind === \"const\";\n const boundNames = collectBoundNames(node.init);\n for (const dn of boundNames) {\n if (isConst) {\n loopEnv.CreateImmutableBinding(dn, true);\n } else {\n loopEnv.CreateMutableBinding(dn, false);\n }\n }\n getRunningContext().LexicalEnvironment = loopEnv;\n yield* Evaluate(node.init);\n const perIterationLets = isConst ? [] : Array.from(boundNames);\n const bodyResult = yield* ForBodyEvaluation(node.test, node.update, node.body, perIterationLets);\n getRunningContext().LexicalEnvironment = oldEnv;\n return bodyResult;\n }\n // `for ( … ; … ; … ) …`\n if (node.init) {\n const exprRef = yield* Evaluate(node.init);\n GetValue(exprRef);\n }\n return yield* ForBodyEvaluation(node.test, node.update, node.body, []);\n }\n\n // https://tc39.es/ecma262/#sec-forbodyevaluation\n function* ForBodyEvaluation(test, increment, stmt, perIterationBindings) {\n CreatePerIterationEnvironment(perIterationBindings);\n let V;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (test) {\n const testRef = yield* Evaluate(test, undefined, true);\n const testValue = GetValue(testRef);\n if (!testValue) {\n return NormalCompletion(V);\n }\n }\n const result = yield* Evaluate(stmt);\n if (!LoopContinues(result)) {\n return UpdateEmpty(result, V);\n }\n if (result.Value) {\n V = result.Value;\n }\n CreatePerIterationEnvironment(perIterationBindings);\n if (increment) {\n const incRef = yield* Evaluate(increment, undefined, true);\n GetValue(incRef);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-createperiterationenvironment\n function CreatePerIterationEnvironment(perIterationBindings) {\n if (perIterationBindings.length === 0) {\n return;\n }\n const lastIterationEnv = getRunningContext().LexicalEnvironment;\n const outer = lastIterationEnv.OuterEnv;\n const thisIterationEnv = new DeclarativeEnvironment(outer);\n for (const bn of perIterationBindings) {\n thisIterationEnv.CreateMutableBinding(bn, false);\n const lastValue = lastIterationEnv.GetBindingValue(bn, false);\n thisIterationEnv.InitializeBinding(bn, lastValue);\n }\n getRunningContext().LexicalEnvironment = thisIterationEnv;\n }\n\n // Destructuring assignments.\n // https://tc39.es/ecma262/#sec-runtime-semantics-destructuringassignmentevaluation\n function* DestructuringAssignmentEvaluation(pattern, value) {\n if (pattern.type === \"ObjectPattern\") {\n RequireObjectCoercible(value);\n if (pattern.properties.length > 0) {\n yield* PropertyDestructuringAssignmentEvaluation(pattern.properties, value);\n }\n return NormalCompletion(Empty);\n }\n const iteratorRecord = CreateListIteratorRecord(value);\n return yield* IteratorDestructuringAssignmentEvaluation(pattern.elements, iteratorRecord);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-propertydestructuringassignmentevaluation\n function* PropertyDestructuringAssignmentEvaluation(properties, value) {\n const excludedNames = new Set();\n for (const prop of properties) {\n if (prop.type === \"Property\") {\n const propName = !prop.computed && prop.key.type === \"Identifier\" ? prop.key.name : yield* EvaluateComputedPropertyName(prop.key);\n const valueTarget = prop.value.type === \"AssignmentPattern\" ? prop.value.left : prop.value;\n if (valueTarget.type === \"Identifier\") {\n const lref = ResolveBinding(valueTarget.name);\n let v = GetV(value, propName);\n if (prop.value.type === \"AssignmentPattern\" && v === undefined) {\n if (IsAnonymousFunctionDefinition(prop.value.right)) {\n v = NamedEvaluation(prop.value.right, valueTarget.name);\n } else {\n const defaultValue = yield* Evaluate(prop.value.right);\n v = GetValue(defaultValue);\n }\n }\n PutValue(lref, v);\n excludedNames.add(propName);\n } else {\n yield* KeyedDestructuringAssignmentEvaluation(prop.value, value, propName);\n excludedNames.add(propName);\n }\n } else {\n yield* RestDestructuringAssignmentEvaluation(prop, value, excludedNames);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-keyeddestructuringassignmentevaluation\n function* KeyedDestructuringAssignmentEvaluation(node, value, propertyName) {\n const assignmentTarget = node.type === \"AssignmentPattern\" ? node.left : node;\n const isObjectOrArray = assignmentTarget.type === \"ArrayPattern\" || assignmentTarget.type === \"ObjectPattern\";\n let lref;\n if (!isObjectOrArray) {\n lref = (yield* Evaluate(assignmentTarget)).Value;\n }\n const v = GetV(value, propertyName);\n let rhsValue;\n if (node.type === \"AssignmentPattern\" && v === undefined) {\n // `assignmentTarget.type` is never \"Identifier\" here.\n const defaultValue = yield* Evaluate(node.right);\n rhsValue = GetValue(defaultValue);\n } else {\n rhsValue = v;\n }\n if (isObjectOrArray) {\n return yield* DestructuringAssignmentEvaluation(assignmentTarget, rhsValue);\n }\n return PutValue(lref, rhsValue);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-restdestructuringassignmentevaluation\n function* RestDestructuringAssignmentEvaluation(restProperty, value, excludedNames) {\n const lref = (yield* Evaluate(restProperty.argument)).Value;\n const restObj = CopyDataProperties({}, value, excludedNames);\n return PutValue(lref, restObj);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-iteratordestructuringassignmentevaluation\n function* IteratorDestructuringAssignmentEvaluation(elements, iteratorRecord) {\n let status = NormalCompletion(Empty);\n for (const element of elements) {\n if (!element) {\n iteratorRecord.next();\n status = NormalCompletion(Empty);\n continue;\n }\n const assignmentTarget = element.type === \"RestElement\" ? element.argument : element.type === \"AssignmentPattern\" ? element.left : element;\n const isObjectOrArray = assignmentTarget.type === \"ArrayPattern\" || assignmentTarget.type === \"ObjectPattern\";\n let lref;\n if (!isObjectOrArray) {\n lref = (yield* Evaluate(assignmentTarget)).Value;\n }\n let v;\n if (element.type !== \"RestElement\") {\n const {\n done,\n value: nextValue\n } = iteratorRecord.next();\n const value = done ? undefined : nextValue;\n if (element.type === \"AssignmentPattern\" && value === undefined) {\n if (IsAnonymousFunctionDefinition(element.right) && assignmentTarget.type === \"Identifier\") {\n v = NamedEvaluation(element.right, assignmentTarget.name);\n } else {\n const defaultValue = yield* Evaluate(element.right);\n v = GetValue(defaultValue);\n }\n } else {\n v = value;\n }\n } else {\n // RestElement\n v = new ArrayConstructor();\n let n = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const {\n done,\n value: nextValue\n } = iteratorRecord.next();\n if (done) {\n break;\n }\n v[n] = nextValue;\n n++;\n }\n }\n if (isObjectOrArray) {\n status = yield* DestructuringAssignmentEvaluation(assignmentTarget, v);\n } else {\n status = PutValue(lref, v);\n }\n }\n return status;\n }\n\n // Object expressions.\n // https://tc39.es/ecma262/#sec-evaluate-property-access-with-expression-key\n function* EvaluatePropertyAccessWithExpressionKey(baseValue, expression, strict) {\n const propertyNameReference = yield* Evaluate(expression);\n const propertyNameValue = GetValue(propertyNameReference);\n const propertyKey = ToPropertyKey(propertyNameValue);\n return new ReferenceRecord(baseValue, propertyKey, strict);\n }\n\n // https://tc39.es/ecma262/#sec-evaluate-property-access-with-identifier-key\n function EvaluatePropertyAccessWithIdentifierKey(baseValue, identifier, strict) {\n currentNode = identifier;\n const propertyNameString = identifier.name;\n return new ReferenceRecord(baseValue, propertyNameString, strict);\n }\n\n // Block statements.\n // https://tc39.es/ecma262/#sec-blockdeclarationinstantiation\n function BlockDeclarationInstantiation(code, env) {\n const declarations = collectScopedDeclarations(code, {\n var: false,\n topLevel: false\n });\n for (const d of declarations) {\n const IsConstantDeclaration = d.type === \"VariableDeclaration\" && d.kind === \"const\";\n for (const dn of collectBoundNames(d)) {\n if (IsConstantDeclaration) {\n env.CreateImmutableBinding(dn, true);\n } else {\n env.CreateMutableBinding(dn, false);\n }\n }\n if (d.type === \"FunctionDeclaration\") {\n const [fn] = collectBoundNames(d);\n const fo = InstantiateFunctionObject(d, env);\n env.InitializeBinding(fn, fo);\n }\n }\n }\n\n // Function declarations and expressions.\n // https://tc39.es/ecma262/#sec-evaluatecall\n function* EvaluateCall(func, ref, args, callee) {\n let thisValue;\n if (ref instanceof ReferenceRecord) {\n if (IsPropertyReference(ref)) {\n thisValue = ref.Base;\n }\n }\n const argList = yield* ArgumentListEvaluation(args);\n if (typeof func !== \"function\") {\n const funcName = codeSource.substring(callee.start, callee.end);\n throw new TypeError(`${funcName} is not a function`);\n }\n if (debug || externalSourceForDebug) {\n const debuggerCall = func[DebuggerCall];\n if (debuggerCall) {\n const result = yield* debuggerCall.apply(thisValue, argList);\n doSanitize(result);\n return NormalCompletion(result);\n }\n }\n const result = func.apply(thisValue, argList);\n doSanitize(result);\n return NormalCompletion(result);\n }\n\n // https://tc39.es/ecma262/#sec-evaluatenew\n function* EvaluateNew(constructExpr, args) {\n const ref = yield* Evaluate(constructExpr);\n const constructor = GetValue(ref);\n const argList = yield* ArgumentListEvaluation(args);\n if (typeof constructor !== \"function\" || constructor[IsConstructor] === false) {\n const constructorName = codeSource.substring(constructExpr.start, constructExpr.end);\n throw new TypeError(`${constructorName} is not a constructor`);\n }\n if (!externalSourceForDebug && !isAllowedConstructor(constructor) && constructor !== ArrayConstructor) {\n const constructorName = codeSource.substring(constructExpr.start, constructExpr.end);\n throw new TypeError(`${constructorName} is not an allowed constructor`);\n }\n return NormalCompletion(new constructor(...argList));\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-argumentlistevaluation\n function* ArgumentListEvaluation(args) {\n const array = [];\n if (Array.isArray(args)) {\n for (const arg of args) {\n if (arg.type === \"SpreadElement\") {\n const spreadValues = GetValue(yield* Evaluate(arg.argument));\n array.push(...spreadValues);\n } else {\n array.push(GetValue(yield* Evaluate(arg)));\n }\n }\n } else {\n array.push(GetTemplateObject(args));\n for (const expr of args.expressions) {\n array.push(GetValue(yield* Evaluate(expr)));\n }\n }\n return array;\n }\n\n // https://tc39.es/ecma262/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n function* CallFunction(closure, thisArgument, args) {\n var _hooks$beforeCall;\n (_hooks$beforeCall = hooks.beforeCall) === null || _hooks$beforeCall === void 0 || _hooks$beforeCall.call(hooks, closure[SourceNode]);\n const calleeContext = PrepareForOrdinaryCall(closure);\n OrdinaryCallBindThis(closure, calleeContext, thisArgument);\n const result = yield* OrdinaryCallEvaluateBody(closure, args);\n if (debug) {\n currentNode = {\n ...closure[SourceNode],\n [DebuggerReturn]: true\n };\n yield {\n type: \"return\",\n value: result.Type === \"return\" ? result.Value : undefined\n };\n }\n executionContextStack.pop();\n globalExecutionContextStack.pop();\n if (result.Type === \"return\") {\n return result.Value;\n }\n return undefined;\n }\n\n // https://tc39.es/ecma262/#sec-prepareforordinarycall\n function PrepareForOrdinaryCall(F) {\n const calleeContext = new ExecutionContext();\n calleeContext.Function = F;\n const localEnv = new FunctionEnvironment(F);\n calleeContext.VariableEnvironment = localEnv;\n calleeContext.LexicalEnvironment = localEnv;\n executionContextStack.push(calleeContext);\n globalExecutionContextStack.push(calleeContext);\n return calleeContext;\n }\n function OrdinaryCallBindThis(F, calleeContext, thisArgument) {\n if (F[ThisMode] === Mode.LEXICAL) {\n return;\n }\n const localEnv = calleeContext.LexicalEnvironment;\n localEnv === null || localEnv === void 0 || localEnv.BindThisValue(thisArgument);\n }\n\n // https://tc39.es/ecma262/#sec-ordinarycallevaluatebody\n function* OrdinaryCallEvaluateBody(F, args) {\n return yield* EvaluateFunctionBody(F[ECMAScriptCode], F, args);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-evaluatefunctionbody\n function* EvaluateFunctionBody(body, F, args) {\n yield* FunctionDeclarationInstantiation(F, args);\n if (Array.isArray(body)) {\n return yield* EvaluateStatementList(body);\n }\n return new CompletionRecord(\"return\", GetValue(yield* Evaluate(body)));\n }\n\n // https://tc39.es/ecma262/#sec-block-runtime-semantics-evaluation\n function* EvaluateStatementList(statements) {\n let result = NormalCompletion(Empty);\n for (const stmt of statements) {\n const s = yield* Evaluate(stmt);\n if (s.Type !== \"normal\") {\n return s;\n }\n result = UpdateEmpty(result, s.Value);\n }\n return result;\n }\n function GetThisEnvironment() {\n let env = getRunningContext().LexicalEnvironment;\n while (env) {\n if (env.HasThisBinding()) {\n return env;\n }\n env = env.OuterEnv;\n }\n throw new Error(\"Accessing global this is forbidden\");\n }\n\n // https://tc39.es/ecma262/#sec-isanonymousfunctiondefinition\n function IsAnonymousFunctionDefinition(node) {\n // No ParenthesizedExpression in ESTree.\n return node.type === \"FunctionExpression\" && !node.id || node.type === \"ArrowFunctionExpression\";\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-namedevaluation\n function NamedEvaluation(node, name) {\n var _hooks$beforeEvaluate3;\n (_hooks$beforeEvaluate3 = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate3 === void 0 || _hooks$beforeEvaluate3.call(hooks, node);\n // No ParenthesizedExpression in ESTree.\n switch (node.type) {\n case \"FunctionExpression\":\n return InstantiateOrdinaryFunctionExpression(node, name);\n case \"ArrowFunctionExpression\":\n return InstantiateArrowFunctionExpression(node, name);\n // istanbul ignore next: should never happen\n default:\n throw new Error(`Unexpected node type for NamedEvaluation: ${node.type}`);\n }\n }\n\n // https://tc39.es/ecma262/#sec-functiondeclarationinstantiation\n function* FunctionDeclarationInstantiation(func, args) {\n const calleeContext = getRunningContext();\n const code = func[ECMAScriptCode];\n const formals = func[FormalParameters];\n const parameterNames = collectBoundNames(formals);\n const hasParameterExpressions = containsExpression(formals);\n const varDeclarations = collectScopedDeclarations(code, {\n var: true,\n topLevel: true\n });\n const varNames = collectBoundNames(varDeclarations);\n\n // `functionNames` ∈ `varNames`\n // `functionsToInitialize` ≈ `functionNames`\n const functionNames = [];\n const functionsToInitialize = [];\n for (let i = varDeclarations.length - 1; i >= 0; i--) {\n const d = varDeclarations[i];\n if (d.type === \"FunctionDeclaration\") {\n ThrowIfFunctionIsInvalid(d);\n const [fn] = collectBoundNames(d);\n if (!functionNames.includes(fn)) {\n functionNames.unshift(fn);\n functionsToInitialize.unshift(d);\n }\n } else if (rules !== null && rules !== void 0 && rules.noVar) {\n throw new SyntaxError(\"Var declaration is not recommended, use `let` or `const` instead\");\n }\n }\n\n // let argumentsObjectNeeded = true;\n // if (func[ThisMode] === Mode.LEXICAL) {\n // // NOTE: Arrow functions never have an arguments object.\n // argumentsObjectNeeded = false;\n // } else if (parameterNames.includes(\"arguments\")) {\n // argumentsObjectNeeded = false;\n // } else if (!hasParameterExpressions && (\n // varNames.includes(\"arguments\") ||\n // collectBoundNames(collectScopedDeclarations(code, { var: false })).includes(\"arguments\")\n // )) {\n // argumentsObjectNeeded = false;\n // }\n // NOTE: In strict mode, no parameter/function/var/lexical names can be \"arguments\".\n const argumentsObjectNeeded = !!externalSourceForDebug && func[ThisMode] !== Mode.LEXICAL;\n const env = calleeContext.LexicalEnvironment;\n for (const paramName of parameterNames) {\n // In strict mode, it's guaranteed no duplicate params exist.\n env.CreateMutableBinding(paramName, false);\n }\n let parameterBindings = parameterNames;\n if (argumentsObjectNeeded) {\n const ao = CreateUnmappedArgumentsObject(args);\n env.CreateImmutableBinding(\"arguments\", false);\n env.InitializeBinding(\"arguments\", ao);\n parameterBindings = parameterNames.concat(\"arguments\");\n }\n const iteratorRecord = CreateListIteratorRecord(args);\n yield* IteratorBindingInitialization(formals, iteratorRecord, env);\n let varEnv;\n if (!hasParameterExpressions) {\n // NOTE: Only a single Environment Record is needed for the parameters\n // and top-level vars.\n // `varNames` are unique.\n const instantiatedVarNames = [...parameterBindings];\n for (const n of varNames) {\n if (!instantiatedVarNames.includes(n)) {\n instantiatedVarNames.push(n);\n env.CreateMutableBinding(n, false);\n env.InitializeBinding(n, undefined);\n }\n }\n varEnv = env;\n } else {\n // NOTE: A separate Environment Record is needed to ensure that closures\n // created by expressions in the formal parameter list do not have\n // visibility of declarations in the function body.\n varEnv = new DeclarativeEnvironment(env);\n calleeContext.VariableEnvironment = varEnv;\n // `varNames` are unique.\n const instantiatedVarNames = [];\n for (const n of varNames) {\n if (!instantiatedVarNames.includes(n)) {\n instantiatedVarNames.push(n);\n varEnv.CreateMutableBinding(n, false);\n let initialValue;\n if (parameterBindings.includes(n) && !functionNames.includes(n)) {\n initialValue = env.GetBindingValue(n, false);\n }\n varEnv.InitializeBinding(n, initialValue);\n // NOTE: A var with the same name as a formal parameter initially has\n // the same value as the corresponding initialized parameter.\n }\n }\n }\n const lexEnv = varEnv;\n calleeContext.LexicalEnvironment = lexEnv;\n const lexDeclarations = collectScopedDeclarations(code, {\n var: false,\n topLevel: true\n });\n for (const d of lexDeclarations) {\n for (const dn of collectBoundNames(d)) {\n // Only lexical VariableDeclaration here in top-level.\n if (d.kind === \"const\") {\n lexEnv.CreateImmutableBinding(dn, true);\n } else {\n lexEnv.CreateMutableBinding(dn, false);\n }\n }\n }\n for (const f of functionsToInitialize) {\n const [fn] = collectBoundNames(f);\n const fo = InstantiateFunctionObject(f, lexEnv);\n varEnv.SetMutableBinding(fn, fo, false);\n }\n }\n function CreateUnmappedArgumentsObject(args) {\n const argList = [...args];\n const argumentObject = {};\n Object.defineProperty(argumentObject, \"length\", {\n value: argList.length,\n writable: true,\n configurable: true\n });\n for (let index = 0; index < argList.length; index++) {\n argumentObject[String(index)] = argList[index];\n }\n Object.defineProperty(argumentObject, Symbol.iterator, {\n value: Array.prototype.values,\n writable: true,\n configurable: true\n });\n const ThrowTypeError = () => {\n throw new TypeError(\"'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them\");\n };\n Object.defineProperty(argumentObject, \"callee\", {\n get: ThrowTypeError,\n set: ThrowTypeError\n });\n return argumentObject;\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-instantiatefunctionobject\n function InstantiateFunctionObject(func, scope) {\n const F = OrdinaryFunctionCreate(func, scope, true, false);\n if (func.id) {\n SetFunctionName(F, func.id.name);\n }\n return F;\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-instantiateordinaryfunctionexpression\n function InstantiateOrdinaryFunctionExpression(functionExpression, name) {\n const scope = getRunningContext().LexicalEnvironment;\n if (functionExpression.id) {\n const name = functionExpression.id.name;\n const funcEnv = new DeclarativeEnvironment(scope);\n funcEnv.CreateImmutableBinding(name, false);\n const closure = OrdinaryFunctionCreate(functionExpression, funcEnv, true, false);\n SetFunctionName(closure, name);\n funcEnv.InitializeBinding(name, closure);\n return closure;\n } else {\n const closure = OrdinaryFunctionCreate(functionExpression, scope, true, false);\n SetFunctionName(closure, name ?? \"\");\n return closure;\n }\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-instantiatearrowfunctionexpression\n function InstantiateArrowFunctionExpression(arrowFunction, name) {\n const scope = getRunningContext().LexicalEnvironment;\n const closure = OrdinaryFunctionCreate(arrowFunction, scope, false, true);\n SetFunctionName(closure, name ?? \"\");\n return closure;\n }\n function SetFunctionName(F, name) {\n Object.defineProperty(F, \"name\", {\n value: name,\n configurable: true\n });\n }\n\n // https://tc39.es/ecma262/#sec-ordinaryfunctioncreate\n function OrdinaryFunctionCreate(sourceNode, scope, isConstructor, lexicalThis) {\n const F = function () {\n // eslint-disable-next-line prefer-rest-params\n return unwind(CallFunction(F, this, arguments));\n };\n Object.defineProperties(F, {\n [SourceNode]: {\n value: sourceNode\n },\n [FormalParameters]: {\n value: sourceNode.params\n },\n [ECMAScriptCode]: {\n value: sourceNode.body.type === \"BlockStatement\" ? sourceNode.body.body : sourceNode.body\n },\n [Environment]: {\n value: scope\n },\n [IsConstructor]: {\n value: isConstructor\n },\n [ThisMode]: {\n value: lexicalThis ? Mode.LEXICAL : Mode.STRICT\n }\n });\n if (debug || externalSourceForDebug) {\n Object.defineProperty(F, DebuggerCall, {\n value: function () {\n // eslint-disable-next-line prefer-rest-params\n return CallFunction(F, this, arguments);\n }\n });\n }\n return F;\n }\n\n // Patterns initialization.\n // https://tc39.es/ecma262/#sec-runtime-semantics-bindinginitialization\n function* BindingInitialization(node, value, environment) {\n switch (node.type) {\n case \"Identifier\":\n return InitializeBoundName(node.name, value, environment);\n case \"ObjectPattern\":\n RequireObjectCoercible(value);\n return yield* PropertyBindingInitialization(node.properties, value, environment);\n case \"ArrayPattern\":\n {\n const iteratorRecord = CreateListIteratorRecord(value);\n return yield* IteratorBindingInitialization(node.elements, iteratorRecord, environment);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-destructuring-binding-patterns-runtime-semantics-propertybindinginitialization\n function* PropertyBindingInitialization(properties, value, environment) {\n const excludedNames = new Set();\n for (const prop of properties) {\n if (prop.type === \"RestElement\") {\n return RestBindingInitialization(prop, value, environment, excludedNames);\n }\n if (!prop.computed && prop.key.type === \"Identifier\") {\n yield* KeyedBindingInitialization(prop.value, value, environment, prop.key.name);\n excludedNames.add(prop.key.name);\n } else {\n const P = yield* EvaluateComputedPropertyName(prop.key);\n yield* KeyedBindingInitialization(prop.value, value, environment, P);\n excludedNames.add(P);\n }\n }\n return NormalCompletion(Empty);\n }\n\n // https://tc39.es/ecma262/#prod-ComputedPropertyName\n function* EvaluateComputedPropertyName(node) {\n const propName = GetValue(yield* Evaluate(node));\n return ToPropertyKey(propName);\n }\n\n // https://tc39.es/ecma262/#sec-destructuring-binding-patterns-runtime-semantics-restbindinginitialization\n function RestBindingInitialization(restProperty, value, environment, excludedNames) {\n const lhs = ResolveBinding(restProperty.argument.name, environment);\n const restObj = CopyDataProperties({}, value, excludedNames);\n if (!environment) {\n return PutValue(lhs, restObj);\n }\n return InitializeReferencedBinding(lhs, restObj);\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-iteratorbindinginitialization\n function* IteratorBindingInitialization(elements, iteratorRecord, environment) {\n if (elements.length === 0) {\n return NormalCompletion(Empty);\n }\n let result;\n for (const node of elements) {\n if (!node) {\n // Elision element.\n iteratorRecord.next();\n result = NormalCompletion(Empty);\n } else if (node.type === \"RestElement\") {\n // Rest element.\n if (node.argument.type === \"Identifier\") {\n const lhs = ResolveBinding(node.argument.name, environment);\n const A = new ArrayConstructor();\n let n = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const {\n done,\n value\n } = iteratorRecord.next();\n if (done) {\n result = environment ? InitializeReferencedBinding(lhs, A) : PutValue(lhs, A);\n break;\n }\n A[n] = value;\n n++;\n }\n } else {\n const A = new ArrayConstructor();\n let n = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const {\n done,\n value\n } = iteratorRecord.next();\n if (done) {\n result = yield* BindingInitialization(node.argument, A, environment);\n break;\n }\n A[n] = value;\n n++;\n }\n }\n } else {\n // Normal element.\n const bindingElement = node.type === \"AssignmentPattern\" ? node.left : node;\n switch (bindingElement.type) {\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n {\n let v;\n const {\n done,\n value\n } = iteratorRecord.next();\n if (!done) {\n v = value;\n }\n if (node.type === \"AssignmentPattern\" && v === undefined) {\n const defaultValue = yield* Evaluate(node.right);\n v = GetValue(defaultValue);\n }\n result = yield* BindingInitialization(bindingElement, v, environment);\n break;\n }\n case \"Identifier\":\n {\n const bindingId = bindingElement.name;\n const lhs = ResolveBinding(bindingId, environment);\n let v;\n const {\n done,\n value\n } = iteratorRecord.next();\n if (!done) {\n v = value;\n }\n if (node.type === \"AssignmentPattern\" && v === undefined) {\n if (IsAnonymousFunctionDefinition(node.right)) {\n v = NamedEvaluation(node.right, bindingId);\n } else {\n const defaultValue = yield* Evaluate(node.right);\n v = GetValue(defaultValue);\n }\n }\n result = environment ? InitializeReferencedBinding(lhs, v) : PutValue(lhs, v);\n break;\n }\n }\n }\n }\n return result;\n }\n\n // https://tc39.es/ecma262/#sec-runtime-semantics-keyedbindinginitialization\n function* KeyedBindingInitialization(node, value, environment, propertyName) {\n const isIdentifier = node.type === \"Identifier\" || node.type === \"AssignmentPattern\" && node.left.type === \"Identifier\";\n if (isIdentifier) {\n const bindingId = node.type === \"Identifier\" ? node.name : node.left.name;\n const lhs = ResolveBinding(bindingId, environment);\n let v = GetV(value, propertyName);\n if (node.type === \"AssignmentPattern\" && v === undefined) {\n if (IsAnonymousFunctionDefinition(node.right)) {\n v = NamedEvaluation(node.right, bindingId);\n } else {\n const defaultValue = yield* Evaluate(node.right);\n v = GetValue(defaultValue);\n }\n }\n if (!environment) {\n return PutValue(lhs, v);\n }\n return InitializeReferencedBinding(lhs, v);\n }\n let v = GetV(value, propertyName);\n if (node.type === \"AssignmentPattern\" && v === undefined) {\n const defaultValue = yield* Evaluate(node.right);\n v = GetValue(defaultValue);\n }\n return yield* BindingInitialization(node.type === \"AssignmentPattern\" ? node.left : node, v, environment);\n }\n\n // https://tc39.es/ecma262/#sec-initializeboundname\n function InitializeBoundName(name, value, environment) {\n // Assert: environment is always present.\n environment.InitializeBinding(name, value);\n return NormalCompletion(Empty);\n }\n function ThrowIfFunctionIsInvalid(func) {\n if (func.async || func.generator) {\n throw new SyntaxError(`${func.async ? \"Async\" : \"Generator\"} function is not allowed`);\n }\n if (expressionOnly && !func.expression) {\n throw new SyntaxError(\"Only an `Expression` is allowed in `ArrowFunctionExpression`'s body\");\n }\n }\n if (expressionOnly) {\n return GetValue(unwind(Evaluate(rootAst)));\n }\n (_hooks$beforeEvaluate4 = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate4 === void 0 || _hooks$beforeEvaluate4.call(hooks, rootAst);\n ThrowIfFunctionIsInvalid(rootAst);\n const [fn] = collectBoundNames(rootAst);\n // Create an immutable binding for the root function.\n rootEnv.CreateImmutableBinding(fn, true);\n const fo = InstantiateFunctionObject(rootAst, rootEnv);\n rootEnv.InitializeBinding(fn, fo);\n if (debug) {\n Object.defineProperties(fo, {\n [DebuggerScope]: {\n value: function () {\n return getRunningContext().LexicalEnvironment;\n }\n },\n [DebuggerNode]: {\n value: function () {\n return currentNode;\n }\n }\n });\n }\n return fo;\n}\nfunction unwind(iterator) {\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const {\n done,\n value\n } = iterator.next();\n if (done) {\n return value;\n }\n }\n}\n//# sourceMappingURL=cook.js.map","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n// https://tc39.es/ecma262/#sec-execution-contexts\nexport class AnalysisContext {\n constructor() {\n _defineProperty(this, \"VariableEnvironment\", void 0);\n _defineProperty(this, \"LexicalEnvironment\", void 0);\n }\n}\n\n// https://tc39.es/ecma262/#sec-environment-records\nexport class AnalysisEnvironment {\n constructor(outer) {\n _defineProperty(this, \"OuterEnv\", void 0);\n _defineProperty(this, \"bindingSet\", new Set());\n this.OuterEnv = outer;\n }\n HasBinding(name) {\n return this.bindingSet.has(name);\n }\n CreateBinding(name) {\n this.bindingSet.add(name);\n }\n}\n//# sourceMappingURL=AnalysisContext.js.map","import { hasOwnProperty } from \"./hasOwnProperty.js\";\nimport { AnalysisContext, AnalysisEnvironment } from \"./AnalysisContext.js\";\nimport { collectBoundNames, collectScopedDeclarations, containsExpression } from \"./traverse.js\";\n/**\n * Analysis an AST of a storyboard function or an evaluation expression.\n *\n * @param rootAst - The root AST.\n * @param options - Analysis options.\n * @returns A set of global variables the root AST attempts to access.\n */\nexport function precook(rootAst) {\n let {\n expressionOnly,\n visitors,\n withParent,\n externalSourceForDebug,\n hooks = {}\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const attemptToVisitGlobals = new Set();\n const analysisContextStack = [];\n const rootEnv = new AnalysisEnvironment(null);\n const rootContext = new AnalysisContext();\n rootContext.VariableEnvironment = rootEnv;\n rootContext.LexicalEnvironment = rootEnv;\n analysisContextStack.push(rootContext);\n function getRunningContext() {\n return analysisContextStack[analysisContextStack.length - 1];\n }\n function visit(node) {\n if (visitors && hasOwnProperty(visitors, node.type)) {\n visitors[node.type](node);\n }\n }\n function EvaluateChildren(node, keys, parent) {\n for (const key of keys) {\n Evaluate(node[key], parent === null || parent === void 0 ? void 0 : parent.concat({\n node,\n key\n }));\n }\n }\n function Evaluate(node, parent) {\n if (Array.isArray(node)) {\n node.forEach((n, index) => {\n Evaluate(n, parent ? parent.slice(0, -1).concat({\n ...parent[parent.length - 1],\n index\n }) : parent);\n });\n } else if (node) {\n var _hooks$beforeVisit, _hooks$beforeVisitUnk;\n // `node` maybe `null` in some cases.\n (_hooks$beforeVisit = hooks.beforeVisit) === null || _hooks$beforeVisit === void 0 || _hooks$beforeVisit.call(hooks, node, parent);\n visit(node);\n // Expressions:\n switch (node.type) {\n case \"Identifier\":\n if (!ResolveBinding(node.name)) {\n var _hooks$beforeVisitGlo;\n (_hooks$beforeVisitGlo = hooks.beforeVisitGlobal) === null || _hooks$beforeVisitGlo === void 0 || _hooks$beforeVisitGlo.call(hooks, node, parent);\n attemptToVisitGlobals.add(node.name);\n }\n return;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n EvaluateChildren(node, [\"elements\"], parent);\n return;\n case \"ArrowFunctionExpression\":\n {\n const env = getRunningContext().LexicalEnvironment;\n const closure = OrdinaryFunctionCreate(node, env, true);\n CallFunction(closure, parent);\n return;\n }\n case \"AssignmentPattern\":\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n EvaluateChildren(node, [\"left\", \"right\"], parent);\n return;\n case \"CallExpression\":\n case \"NewExpression\":\n EvaluateChildren(node, [\"callee\", \"arguments\"], parent);\n return;\n case \"ChainExpression\":\n EvaluateChildren(node, [\"expression\"], parent);\n return;\n case \"ConditionalExpression\":\n EvaluateChildren(node, [\"test\", \"consequent\", \"alternate\"], parent);\n return;\n case \"MemberExpression\":\n EvaluateChildren(node, [\"object\"], parent);\n if (node.computed) {\n EvaluateChildren(node, [\"property\"], parent);\n }\n return;\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n EvaluateChildren(node, [\"properties\"], parent);\n return;\n case \"Property\":\n if (node.computed) {\n EvaluateChildren(node, [\"key\"], parent);\n }\n EvaluateChildren(node, [\"value\"], parent);\n return;\n case \"RestElement\":\n case \"SpreadElement\":\n case \"UnaryExpression\":\n EvaluateChildren(node, [\"argument\"], parent);\n return;\n case \"SequenceExpression\":\n case \"TemplateLiteral\":\n EvaluateChildren(node, [\"expressions\"], parent);\n return;\n case \"TaggedTemplateExpression\":\n EvaluateChildren(node, [\"tag\", \"quasi\"], parent);\n return;\n case \"Literal\":\n return;\n }\n if (!expressionOnly) {\n // Statements and assignments:\n switch (node.type) {\n case \"AssignmentExpression\":\n EvaluateChildren(node, [\"right\", \"left\"], parent);\n return;\n case \"BlockStatement\":\n {\n if (!node.body.length) {\n return;\n }\n const runningContext = getRunningContext();\n const oldEnv = runningContext.LexicalEnvironment;\n const blockEnv = new AnalysisEnvironment(oldEnv);\n BlockDeclarationInstantiation(node.body, blockEnv);\n runningContext.LexicalEnvironment = blockEnv;\n EvaluateChildren(node, [\"body\"], parent);\n runningContext.LexicalEnvironment = oldEnv;\n return;\n }\n case \"BreakStatement\":\n case \"ContinueStatement\":\n case \"EmptyStatement\":\n return;\n case \"CatchClause\":\n {\n const runningContext = getRunningContext();\n const oldEnv = runningContext.LexicalEnvironment;\n const catchEnv = new AnalysisEnvironment(oldEnv);\n BoundNamesInstantiation(node.param, catchEnv);\n runningContext.LexicalEnvironment = catchEnv;\n EvaluateChildren(node, [\"param\", \"body\"], parent);\n runningContext.LexicalEnvironment = oldEnv;\n return;\n }\n case \"DoWhileStatement\":\n EvaluateChildren(node, [\"body\", \"test\"], parent);\n return;\n case \"ExpressionStatement\":\n case \"TSAsExpression\":\n EvaluateChildren(node, [\"expression\"], parent);\n return;\n case \"ForInStatement\":\n case \"ForOfStatement\":\n {\n // ForIn/OfHeadEvaluation\n const lexicalBinding = node.left.type === \"VariableDeclaration\" && node.left.kind !== \"var\";\n const runningContext = getRunningContext();\n const oldEnv = runningContext.LexicalEnvironment;\n if (lexicalBinding) {\n const newEnv = new AnalysisEnvironment(oldEnv);\n BoundNamesInstantiation(node.left, newEnv);\n runningContext.LexicalEnvironment = newEnv;\n }\n EvaluateChildren(node, [\"right\"], parent);\n runningContext.LexicalEnvironment = oldEnv;\n\n // ForIn/OfBodyEvaluation\n if (lexicalBinding) {\n const iterationEnv = new AnalysisEnvironment(oldEnv);\n BoundNamesInstantiation(node.left, iterationEnv);\n runningContext.LexicalEnvironment = iterationEnv;\n }\n EvaluateChildren(node, [\"left\", \"body\"], parent);\n runningContext.LexicalEnvironment = oldEnv;\n return;\n }\n case \"ForStatement\":\n {\n var _node$init;\n const lexicalBinding = ((_node$init = node.init) === null || _node$init === void 0 ? void 0 : _node$init.type) === \"VariableDeclaration\" && node.init.kind !== \"var\";\n const runningContext = getRunningContext();\n const oldEnv = runningContext.LexicalEnvironment;\n if (lexicalBinding) {\n const loopEnv = new AnalysisEnvironment(oldEnv);\n BoundNamesInstantiation(node.init, loopEnv);\n runningContext.LexicalEnvironment = loopEnv;\n }\n EvaluateChildren(node, [\"init\", \"test\", \"body\", \"update\"], parent);\n runningContext.LexicalEnvironment = oldEnv;\n return;\n }\n case \"FunctionDeclaration\":\n {\n const [fn] = collectBoundNames(node);\n const env = getRunningContext().LexicalEnvironment;\n const fo = OrdinaryFunctionCreate(node, env);\n env.CreateBinding(fn);\n CallFunction(fo, parent);\n return;\n }\n case \"FunctionExpression\":\n {\n const closure = InstantiateOrdinaryFunctionExpression(node);\n CallFunction(closure, parent);\n return;\n }\n case \"IfStatement\":\n EvaluateChildren(node, [\"test\", \"consequent\", \"alternate\"], parent);\n return;\n case \"ReturnStatement\":\n case \"ThrowStatement\":\n case \"UpdateExpression\":\n EvaluateChildren(node, [\"argument\"], parent);\n return;\n case \"SwitchCase\":\n EvaluateChildren(node, [\"test\", \"consequent\"], parent);\n return;\n case \"SwitchStatement\":\n {\n EvaluateChildren(node, [\"discriminant\"], parent);\n const runningContext = getRunningContext();\n const oldEnv = runningContext.LexicalEnvironment;\n const blockEnv = new AnalysisEnvironment(oldEnv);\n BlockDeclarationInstantiation(node.cases, blockEnv);\n runningContext.LexicalEnvironment = blockEnv;\n EvaluateChildren(node, [\"cases\"], parent);\n runningContext.LexicalEnvironment = oldEnv;\n return;\n }\n case \"ThisExpression\":\n {\n if (!externalSourceForDebug) {\n break;\n }\n return;\n }\n case \"TryStatement\":\n EvaluateChildren(node, [\"block\", \"handler\", \"finalizer\"], parent);\n return;\n case \"VariableDeclaration\":\n EvaluateChildren(node, [\"declarations\"], parent);\n return;\n case \"VariableDeclarator\":\n EvaluateChildren(node, [\"id\", \"init\"], parent);\n return;\n case \"WhileStatement\":\n EvaluateChildren(node, [\"test\", \"body\"], parent);\n return;\n }\n }\n const silent = (_hooks$beforeVisitUnk = hooks.beforeVisitUnknown) === null || _hooks$beforeVisitUnk === void 0 ? void 0 : _hooks$beforeVisitUnk.call(hooks, node, parent);\n if (!silent) {\n // eslint-disable-next-line no-console\n console.warn(`Unsupported node type \\`${node.type}\\``);\n }\n }\n }\n function BoundNamesInstantiation(declarations, env) {\n for (const name of collectBoundNames(declarations)) {\n env.CreateBinding(name);\n }\n }\n function ResolveBinding(name) {\n const env = getRunningContext().LexicalEnvironment;\n return GetIdentifierReference(env, name);\n }\n function GetIdentifierReference(env, name) {\n return !!env && (env.HasBinding(name) || GetIdentifierReference(env.OuterEnv, name));\n }\n function BlockDeclarationInstantiation(code, env) {\n const declarations = collectScopedDeclarations(code, {\n var: false,\n topLevel: false\n });\n BoundNamesInstantiation(declarations, env);\n }\n function CallFunction(closure, parent) {\n PrepareOrdinaryCall(closure);\n FunctionDeclarationInstantiation(closure, parent);\n Evaluate(closure.ECMAScriptCode, parent === null || parent === void 0 ? void 0 : parent.concat({\n node: closure.Function,\n key: \"body\"\n }).concat(closure.Function.body.type === \"BlockStatement\" ? {\n node: closure.Function.body,\n key: \"body\"\n } : []));\n analysisContextStack.pop();\n }\n function PrepareOrdinaryCall(F) {\n const calleeContext = new AnalysisContext();\n const localEnv = new AnalysisEnvironment(F.Environment);\n calleeContext.VariableEnvironment = localEnv;\n calleeContext.LexicalEnvironment = localEnv;\n analysisContextStack.push(calleeContext);\n }\n function FunctionDeclarationInstantiation(func, parent) {\n const calleeContext = getRunningContext();\n const code = func.ECMAScriptCode;\n const formals = func.FormalParameters;\n const hasParameterExpressions = containsExpression(formals);\n const varDeclarations = collectScopedDeclarations(code, {\n var: true,\n topLevel: true\n });\n const varNames = collectBoundNames(varDeclarations);\n const argumentsObjectNeeded = !!externalSourceForDebug && func.ThisMode !== \"LEXICAL\";\n const env = calleeContext.LexicalEnvironment;\n BoundNamesInstantiation(formals, env);\n if (argumentsObjectNeeded) {\n env.CreateBinding(\"arguments\");\n }\n Evaluate(formals, parent === null || parent === void 0 ? void 0 : parent.concat({\n node: func.Function,\n key: \"params\"\n }));\n let varEnv;\n if (!hasParameterExpressions) {\n // NOTE: Only a single Environment Record is needed for the parameters\n // and top-level vars.\n for (const n of varNames) {\n env.CreateBinding(n);\n }\n varEnv = env;\n } else {\n // NOTE: A separate Environment Record is needed to ensure that closures\n // created by expressions in the formal parameter list do not have\n // visibility of declarations in the function body.\n varEnv = new AnalysisEnvironment(env);\n calleeContext.VariableEnvironment = varEnv;\n for (const n of varNames) {\n varEnv.CreateBinding(n);\n }\n }\n const lexEnv = varEnv;\n calleeContext.LexicalEnvironment = lexEnv;\n const lexDeclarations = collectScopedDeclarations(code, {\n var: false,\n topLevel: true\n });\n BoundNamesInstantiation(lexDeclarations, lexEnv);\n }\n function InstantiateOrdinaryFunctionExpression(functionExpression) {\n const scope = getRunningContext().LexicalEnvironment;\n if (!functionExpression.id) {\n return OrdinaryFunctionCreate(functionExpression, scope);\n }\n const name = functionExpression.id.name;\n const funcEnv = new AnalysisEnvironment(scope);\n funcEnv.CreateBinding(name);\n return OrdinaryFunctionCreate(functionExpression, funcEnv);\n }\n function OrdinaryFunctionCreate(func, scope, lexicalThis) {\n return {\n Function: func,\n FormalParameters: func.params,\n ECMAScriptCode: func.body.type === \"BlockStatement\" ? func.body.body : func.body,\n Environment: scope,\n ThisMode: lexicalThis ? \"LEXICAL\" : \"STRICT\"\n };\n }\n Evaluate(rootAst, withParent ? [] : undefined);\n return attemptToVisitGlobals;\n}\n//# sourceMappingURL=precook.js.map","export function hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n//# sourceMappingURL=hasOwnProperty.js.map","import { parseAsEstree } from \"./parse.js\";\nimport { precook } from \"./precook.js\";\nexport function precookFunction(source) {\n let {\n typescript,\n ...restOptions\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const func = parseAsEstree(source, {\n typescript\n });\n const attemptToVisitGlobals = precook(func, restOptions);\n return {\n function: func,\n attemptToVisitGlobals\n };\n}\n//# sourceMappingURL=precookFunction.js.map","import { parse, parseExpression } from \"@babel/parser\";\nexport function parseAsEstreeExpression(source) {\n return parseExpression(source, {\n plugins: [\"estree\", [\"pipelineOperator\", {\n proposal: \"minimal\"\n }]],\n attachComment: false\n });\n}\nexport function parseAsEstree(source) {\n let {\n typescript\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const file = parse(source, {\n plugins: [\"estree\", typescript && \"typescript\"].filter(Boolean),\n strictMode: true,\n attachComment: false\n });\n const body = file.program.body;\n const jsNodes = typescript ? [] : body;\n if (typescript) {\n for (const node of body) {\n if (node.type.startsWith(\"TS\")) {\n if (/Enum|Import|Export/.test(node.type)) {\n throw new SyntaxError(`Unsupported TypeScript syntax: ${node.type}`);\n }\n } else {\n jsNodes.push(node);\n }\n }\n }\n if (jsNodes.length === 0) {\n throw new SyntaxError(\"Function declaration not found\");\n }\n if (jsNodes.length > 1 || jsNodes[0].type !== \"FunctionDeclaration\") {\n throw new SyntaxError(`Expect a single function declaration at top level, but received: ${jsNodes.map(node => `\"${node.type}\"`).join(\", \")}`);\n }\n return jsNodes[0];\n}\n//# sourceMappingURL=parse.js.map","import { parseAsEstreeExpression } from \"./parse.js\";\nimport { precook } from \"./precook.js\";\n// `raw` should always be asserted by `isEvaluable`.\nexport function preevaluate(raw, options) {\n const fixes = [];\n const source = raw.replace(/^\\s*<%[~=]?\\s|\\s%>\\s*$/g, m => {\n fixes.push(m);\n return \"\";\n });\n const expression = parseAsEstreeExpression(source);\n const attemptToVisitGlobals = precook(expression, {\n ...options,\n expressionOnly: true\n });\n return {\n expression,\n attemptToVisitGlobals,\n source,\n prefix: fixes[0],\n suffix: fixes[1]\n };\n}\nexport function isEvaluable(raw) {\n return /^\\s*<%[~=]?\\s/.test(raw) && /\\s%>\\s*$/.test(raw);\n}\nexport function shouldAllowRecursiveEvaluations(raw) {\n return /^\\s*<%~\\s/.test(raw);\n}\nexport function isTrackAll(raw) {\n return /^\\s*<%=\\s/.test(raw) && /\\s%>\\s*$/.test(raw);\n}\n//# sourceMappingURL=preevaluate.js.map"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","toPropertyKey","t","i","r","e","Symbol","toPrimitive","call","TypeError","String","_typeof","o","iterator","constructor","prototype","Mode","SourceNode","for","FormalParameters","ECMAScriptCode","Environment","IsConstructor","ThisMode","DebuggerCall","DebuggerScope","DebuggerNode","DebuggerReturn","ExecutionContext","this","BindingStatus","EnvironmentRecord","outer","Map","undefined","OuterEnv","HasBinding","name","bindingMap","has","CreateMutableBinding","deletable","set","mutable","NormalCompletion","CreateImmutableBinding","strict","InitializeBinding","binding","get","assign","initialized","SetMutableBinding","_strict","ReferenceError","GetBindingValue","HasThisBinding","DeclarativeEnvironment","FunctionEnvironment","F","super","LEXICAL","ThisBindingStatus","UNINITIALIZED","BindThisValue","INITIALIZED","Error","ThisValue","GetThisBinding","ReferenceRecord","base","referenceName","Base","ReferenceName","Strict","CompletionRecord","type","Type","Value","Empty","collectBoundNames","root","names","Set","collect","node","Array","isArray","n","add","declarations","id","elements","left","properties","argument","from","containsExpression","some","computed","collectScopedDeclarations","options","nextOptions","var","Number","topLevel","push","kind","consequent","body","alternate","init","cases","block","handler","finalizer","IsPropertyReference","V","InitializeReferencedBinding","W","CopyDataProperties","target","source","excludedItems","keys","getOwnPropertyNames","concat","getOwnPropertySymbols","nextKey","desc","getOwnPropertyDescriptor","ForDeclarationBindingInstantiation","forDeclaration","env","isConst","LoopContinues","completion","UpdateEmpty","GetValue","ToPropertyKey","arg","GetV","P","PutValue","CreateListIteratorRecord","args","cooked","RequireObjectCoercible","GetIdentifierReference","ApplyStringOrNumericBinaryOperator","leftValue","operator","rightValue","SyntaxError","reservedObjects","WeakSet","Function","self","window","global","getGlobal","allowedConstructors","URLSearchParams","WeakMap","RegExp","globalExecutionContextStack","__dev_only_clearGlobalExecutionContextStack","length","__dev_only_getGlobalExecutionContextStack","cook","rootAst","codeSource","_hooks$beforeEvaluate4","rules","debug","externalSourceForDebug","globalVariables","ArrayConstructor","hooks","arguments","expressionOnly","doSanitize","sanitize","rootEnv","rootContext","VariableEnvironment","LexicalEnvironment","executionContextStack","entries","TemplateMap","currentNode","Evaluate","optionalChainRef","forceYield","_hooks$beforeEvaluate","_hooks$beforeBranch2","beforeEvaluate","endsWith","expression","array","element","spreadValues","ThrowIfFunctionIsInvalid","InstantiateArrowFunctionExpression","rightRef","right","funcName","substring","start","end","thisValue","ref","callee","func","optional","skipped","EvaluateCall","test","ResolveBinding","regex","raw","flags","includes","baseValue","object","result","propertyKey","EvaluatePropertyAccessWithExpressionKey","property","identifier","propertyNameString","EvaluatePropertyAccessWithIdentifierKey","constructExpr","argList","ArgumentListEvaluation","constructorName","Date","isAllowedConstructor","EvaluateNew","prop","propName","EvaluateComputedPropertyName","propValue","method","SetFunctionName","expr","expressions","chunks","quasis","index","val","join","tagRef","tag","tagFunc","quasi","ApplyUnaryOperator","lref","rval","IsAnonymousFunctionDefinition","NamedEvaluation","DestructuringAssignmentEvaluation","lval","substr","ApplyStringOrNumericAssignment","oldEnv","getRunningContext","blockEnv","BlockDeclarationInstantiation","blockValue","EvaluateStatementList","EvaluateBreakableStatement","stmtResult","DoWhileLoopEvaluation","lhs","lhsKind","uninitializedBoundNames","iterationKind","keyResult","runningContext","newEnv","exprRef","exprValue","EnumerateObjectProperties","ForInOfHeadEvaluation","stmt","iteratorRecord","destructuring","done","nextValue","next","lhsRef","iterationEnv","lhsName","BindingInitialization","status","return","innerResult","ForInOfBodyEvaluation","ForInOfLoopEvaluation","_node$init","ForBodyEvaluation","update","loopEnv","boundNames","dn","perIterationLets","bodyResult","ForLoopEvaluation","InstantiateOrdinaryFunctionExpression","_hooks$beforeBranch","beforeBranch","v","GetThisEnvironment","oldValue","newValue","prefix","switchValue","discriminant","R","input","defaultCaseIndex","findIndex","switchCase","hasDefaultCase","A","slice","found","C","CaseClauseIsSelected","foundInB","B","CaseBlockEvaluation","error","_hooks$beforeEvaluate2","thrownValue","param","catchEnv","argName","CatchClauseEvaluation","declarator","bindingId","WhileLoopEvaluation","increment","perIterationBindings","CreatePerIterationEnvironment","lastIterationEnv","thisIterationEnv","bn","lastValue","pattern","excludedNames","valueTarget","KeyedDestructuringAssignmentEvaluation","RestDestructuringAssignmentEvaluation","PropertyDestructuringAssignmentEvaluation","assignmentTarget","isObjectOrArray","IteratorDestructuringAssignmentEvaluation","propertyName","rhsValue","restProperty","code","d","IsConstantDeclaration","fn","fo","InstantiateFunctionObject","debuggerCall","apply","templateLiteral","memo","rawObj","map","template","freeze","GetTemplateObject","CallFunction","closure","thisArgument","_hooks$beforeCall","beforeCall","calleeContext","localEnv","OrdinaryCallBindThis","PrepareForOrdinaryCall","formals","parameterNames","hasParameterExpressions","varDeclarations","varNames","functionNames","functionsToInitialize","unshift","noVar","argumentsObjectNeeded","paramName","parameterBindings","ao","argumentObject","values","ThrowTypeError","CreateUnmappedArgumentsObject","varEnv","IteratorBindingInitialization","instantiatedVarNames","initialValue","lexEnv","lexDeclarations","f","FunctionDeclarationInstantiation","EvaluateFunctionBody","OrdinaryCallEvaluateBody","pop","statements","s","_hooks$beforeEvaluate3","scope","OrdinaryFunctionCreate","functionExpression","funcEnv","arrowFunction","sourceNode","isConstructor","lexicalThis","unwind","defineProperties","params","STRICT","environment","InitializeBoundName","RestBindingInitialization","KeyedBindingInitialization","PropertyBindingInitialization","restObj","bindingElement","async","generator","AnalysisContext","AnalysisEnvironment","bindingSet","CreateBinding","precook","visitors","withParent","attemptToVisitGlobals","analysisContextStack","EvaluateChildren","parent","forEach","_hooks$beforeVisit","_hooks$beforeVisitUnk","beforeVisit","hasOwnProperty","visit","_hooks$beforeVisitGlo","beforeVisitGlobal","BoundNamesInstantiation","lexicalBinding","beforeVisitUnknown","console","warn","PrepareOrdinaryCall","precookFunction","typescript","restOptions","parse","plugins","filter","Boolean","strictMode","attachComment","program","jsNodes","startsWith","parseAsEstree","function","preevaluate","fixes","replace","m","parseExpression","proposal","parseAsEstreeExpression","suffix","isEvaluable","shouldAllowRecursiveEvaluations","isTrackAll"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_ai=globalThis.webpackChunk_next_bricks_ai||[]).push([[2605],{15:(e,t,r)=>{r.d(t,{a:()=>s,t:()=>n});var o=r(8769);const n=(0,o.createContext)({}),s=()=>(0,o.useContext)(n)},1534:(e,t,r)=>{r.d(t,{CA:()=>a,g3:()=>l,mc:()=>i});var o=r(8769),n=r.n(o);const s=(0,r(4223).wrapBrick)("eo-icon");function a(){return n().createElement("div",{className:"message-list-loading-wrapper"})}function i(){return n().createElement("div",{className:"chart-item-loading-wrapper"},n().createElement("div",{className:"load"},n().createElement("div",null),n().createElement("div",null),n().createElement("div",null),n().createElement("div",null)))}function l(){return n().createElement("div",{className:"common-loading-wrapper"},n().createElement(s,{icon:"loading",lib:"antd",spinning:!0}))}},24:(e,t,r)=>{r.d(t,{M:()=>se});var o=r(8769),n=r.n(o),s=r(15),a=r(9575),i=r(4223);const l=(0,i.wrapBrick)("eo-icon");function c(e){let{role:t,agentId:r}=e;const i=(0,o.useMemo)((()=>"user"===t),[t]),{quickAnswerConfig:c}=(0,s.a)(),p=(0,o.useMemo)((()=>(null==c?void 0:c.list)??[]),[c]),d=(0,o.useMemo)((()=>p.find((e=>e.id===r))),[p,r]);return!i&&d?n().createElement(l,(0,a.A)({className:"avatar"},d.icon,{style:{color:`var(--theme-${d.icon.color}-color)`,background:`var(--theme-${d.icon.color}-background)`}})):n().createElement("div",{className:"avatar "+(i?"user":"robot")})}var p=r(3373),d=r.n(p),m=r(1534);const u=(0,i.wrapBrick)("eo-link");function h(e){let{text:t,prompts:r}=e;return n().createElement("div",{className:"guide-item"},t,n().createElement("div",{className:"prompts-list"},r?r.map(((e,t)=>n().createElement(u,{key:t},e))):null))}var w=r(5119),g=r(4001),b=r(536),f=r(4895),v=r(7534),x=r(2762),k=r(7268),y=r(3319);function E(e){let{text:t}=e;const r=(0,o.useMemo)((()=>t.replace(/\n[`]{0,3}$/,"")),[t]);return n().createElement("div",{className:"progress-text"},r)}const A=(0,o.createContext)({}),M=()=>(0,o.useContext)(A);var I=r(6484);function N(e){let{text:t,language:r}=e;const{commandBricks:a}=(0,s.a)(),{chatting:i,agentId:l,robotId:c,conversationId:p,taskId:d}=M(),{parseData:m,isError:u}=function(e){let{text:t,chatting:r}=e;const n=(0,o.useRef)(""),[s,a]=(0,o.useState)(!1),[i,l]=(0,o.useState)(!1),[c,p]=(0,o.useState)();return(0,o.useEffect)((()=>{if(n.current!==t){let e;n.current=t;try{e=JSON.parse(t)}catch{return void l(!0)}p(e)}}),[t]),(0,o.useEffect)((()=>{r?t.match(/\n[`]{0,3}$/)&&a(!0):a(!0)}),[t,r]),{parseData:c,isError:s&&i}}({text:t,chatting:!!i}),h=(0,o.useMemo)((()=>{const e=null==a?void 0:a[r];if(e){const t={data:m,agentId:l,robotId:c,conversationId:p,taskId:d};return{component:n().createElement(I.ReactUseMultipleBricks,{useBrick:e.useBrick,data:t}),...e}}return{component:null,showOriginData:!0}}),[a,r,m,l,c,p,d]);return n().createElement("div",{className:"custom-component-wrapper"},null!=h&&h.showOriginData?n().createElement(n().Fragment,null,n().createElement("div",{className:"params"},n().createElement("div",{className:"params-tip"},"【原始命令】: "),n().createElement("pre",null,n().createElement("code",null,t))),u?n().createElement("div",{className:"error-tip"},"【执行失败】"):n().createElement(n().Fragment,null,n().createElement("div",{className:"result-tip"},"【执行结果】:"),n().createElement("div",{className:"custom-component"},h.component))):h.component)}var C=r(5535),z=r(4214);const S=(0,i.wrapBrick)("eo-icon"),q={lib:"antd",icon:"copy",theme:"outlined"},P=()=>{const[e,t]=(0,o.useState)(""),{contentRef:r,node:i,view:l}=(0,y.e2)(),{commandBricks:c}=(0,s.a)(),[p,d]=C.Ay.useMessage(),m=async()=>{var e;const t=null===(e=i.content.firstChild)||void 0===e?void 0:e.text;try{t&&(await navigator.clipboard.writeText(t),p.success("复制成功"))}catch(e){console.error("Failed to copy: ",e),p.error("复制失败")}},u=(0,o.useMemo)((()=>n().createElement("div",{className:"default-container"},d,n().createElement("pre",{spellCheck:!1},n().createElement("code",{ref:r,style:{position:"relative"}},n().createElement("div",{className:"default-toolbar-container"},n().createElement(z.A,{title:"复制",color:"#474747",arrow:!1},n().createElement(S,(0,a.A)({},q,{onClick:m,style:{cursor:"pointer"}})))))))),[r]),h=(0,o.useMemo)((()=>{var t,r;if(null===(t=i.firstChild)||void 0===t||!t.text)return null;const o=null===(r=i.firstChild)||void 0===r?void 0:r.textContent;return c&&c[e]?(l.dom.classList.contains("prose")&&l.dom.classList.replace("prose","not-prose"),n().createElement(N,{text:o,language:e})):"easy_cmd_progress"===e?n().createElement(E,{text:o}):u}),[i,e,l,u,c]);return(0,o.useEffect)((()=>{if(!e){const{attrs:{language:e}}=i;e&&t(e)}}),[i,e]),h};function D(e){let{text:t}=e;return n().createElement("div",{className:"markdown-item"},n().createElement(g.pb,null,n().createElement(y.vo,null,n().createElement(L,{value:t}))))}function L(e){let{value:t}=e;const r=(0,y.$X)(),{get:s}=(0,g.hG)((e=>w.KE.make().config((r=>{r.set(w.k,e),r.update(w.QM,(e=>({...e,editable:()=>!1,handleClickOn:(e,t)=>((e,t)=>{const r=e.state.tr.doc.nodeAt(t);if(r&&r.marks.length>0){const e=r.marks.find((e=>"link"===e.type.name)),t=null==e?void 0:e.attrs.href;let n;n=(o=t).startsWith("http://")||o.startsWith("https://")||o.startsWith("file://")||o.startsWith("data:")||o.startsWith("ts://?ts")||o.startsWith("ts:?ts")?t:encodeURIComponent(t),window.open(n,"_blank")}var o;return!0})(e,t)}))),t&&r.set(w.CI,t),new MutationObserver((()=>{Array.from(e.querySelectorAll("a")).forEach((e=>{e.onclick=()=>!1}))})).observe(e,{childList:!0,subtree:!0})})).config(f.E).use(x.Wj).use(v.Te).use(b.PD).use((0,k.m5)(b.Ay.node,(()=>r({component:P}))))),[]);return(0,o.useEffect)((()=>{var e;void 0!==t&&(null===(e=s())||void 0===e||e.action((0,k.yh)(t)))}),[s,t]),n().createElement(g.y5,null)}function R(e){let{text:t}=e;return n().createElement("div",{className:"table-item"},t)}function Y(e){let{text:t}=e;return n().createElement("div",{className:"text-item"},t)}var _=r(8896),$=r(6916);const T=(0,i.wrapBrick)("eo-icon"),H=(0,i.wrapBrick)("eo-tooltip"),B=(0,_.unwrapProvider)("basic.copy-to-clipboard"),W=(0,_.unwrapProvider)("basic.show-notification");function O(e){let{role:t,content:r,chatting:a,taskId:i,tag:l}=e;const c=(0,o.useMemo)((()=>"assistant"===t&&"load"!==r.type),[t,r.type]),p=(0,o.useMemo)((()=>"user"===t),[t]),m=(0,o.useMemo)((()=>a),[a]),{showLike:u,chatting:h,showShare:w,readonly:g,handleIsLike:b,setSearchStr:f}=(0,s.a)(),{agentId:v,robotId:x,conversationId:k}=M(),y=(0,o.useCallback)((async e=>{const t=await b(i,e);W({message:`${e?"点赞":"操作"}${t?"成功":"失败"}`,type:t?"success":"error"})}),[i,b]);return c&&!m?n().createElement("div",{className:"message-toolbar"},u&&!g&&n().createElement(n().Fragment,null,n().createElement(H,{content:"点赞",hoist:!0},n().createElement(T,{className:d()("like",{active:!0===(null==l?void 0:l.isLike)}),lib:"easyops",icon:"like",onClick:()=>y(!0)})),n().createElement(H,{content:"还不够好",hoist:!0},n().createElement(T,{className:d()("unlike",{active:!1===(null==l?void 0:l.isLike)}),lib:"easyops",icon:"unlike",onClick:()=>y(!1)})),n().createElement("div",{className:"split"})),n().createElement(H,{content:"点击复制",hoist:!0},n().createElement(T,{lib:"antd",icon:"copy",onClick:()=>{B(r.text).then((()=>W({type:"success",message:"复制成功"}))).catch((()=>W({type:"error",message:"复制失败"})))}})),w&&n().createElement(H,{content:"点击分享",hoist:!0},n().createElement(T,{lib:"antd",icon:"share-alt",onClick:()=>{B(`${location.origin}${(0,$.getBasePath)()}ai-center/share?agentId=${v}&robotId=${x}&conversationId=${k}`).then((()=>W({type:"success",message:"会话链接已复制到剪贴板"}))).catch((()=>W({type:"error",message:"会话链接复制失败"})))}}))):g||!p||h?null:n().createElement("div",{className:"message-toolbar"},n().createElement(H,{content:"点击再次提问",hoist:!0},n().createElement(T,{lib:"antd",icon:"edit",onClick:()=>{f(r.text)}})))}var j=r(6238),F=r.n(j);function U(e){let{time:t}=e;return n().createElement("div",{className:"time"},t?"string"==typeof t?t:F()(t).format("YYYY-MM-DD HH:mm:ss"):null)}var X=r(2442);const J="no_agent";function G(e){const{content:t,created:r,role:a,agentId:i,type:l,chatting:c}=e,p=(0,o.useMemo)((()=>"user"===a),[a]),{quickAnswerConfig:d}=(0,s.a)(),u=(0,o.useCallback)((e=>{const{type:t,text:r,examplePrompts:o}=e;switch(t){case"guide":return n().createElement(h,{text:r,prompts:o});case"text":return n().createElement(Y,{text:r});case"table":return n().createElement(R,{text:r});case"load":return n().createElement(m.mc,null);default:return n().createElement(D,{text:r})}}),[]),w=(0,o.useMemo)((()=>u(t)),[t,u]),g=(0,o.useMemo)((()=>(null==d?void 0:d.list)??[]),[d]),b=(0,o.useMemo)((()=>g.find((e=>e.id===i))),[g,i]),f=(0,o.useCallback)((()=>{switch(l){case X.Dq:return n().createElement(n().Fragment,null,n().createElement("div",{className:"message-top"},n().createElement("div",{style:{color:"gray"}},"推荐提问")),n().createElement("div",{className:"message-content"},n().createElement("div",{className:"wrapper"},c?n().createElement("div",{className:"content"},n().createElement(m.mc,null)):n().createElement(n().Fragment,null,w))));case X.vY:default:return n().createElement(n().Fragment,null,n().createElement("div",{className:"message-top"},p?"我":i&&i!==J&&b?b.name:"AI助手",n().createElement(U,{time:r})),n().createElement("div",{className:"message-content"},n().createElement("div",{className:"wrapper"},n().createElement("div",{className:"content"},w),n().createElement(O,e))))}}),[l,p,i,b,r,c,w,e]);return n().createElement(A.Provider,{value:e},n().createElement("div",{className:"message-box"},f()))}const K=(0,i.wrapBrick)("eo-icon"),Q=(0,i.wrapBrick)("eo-link"),V=85,Z=24;function ee(e){let{name:t,description:r,icon:i,starterPrompts:l}=e;const{setSearchStr:c}=(0,s.a)(),p=(0,o.useMemo)((()=>(null==i?void 0:i.color)??"geekblue"),[i]);return n().createElement("div",{className:"quick-answer-card-item",style:{height:V,background:`linear-gradient(rgba(var(--theme-${p}-color-rgb-channel), 0.1), rgba(var(--theme-${p}-color-rgb-channel), 0.08))`},onClick:()=>{(null==l?void 0:l.length)&&c(l[0])}},n().createElement("div",{className:"left"},n().createElement(K,(0,a.A)({className:"icon"},i??{icon:"default-app",lib:"easyops",category:"app"},{style:{background:`rgba(var(--theme-${p}-color-rgb-channel), 0.5)`}}))),n().createElement("div",{className:"content"},n().createElement("div",{className:"title"},t),n().createElement("div",{className:"description"},r)))}function te(){const{quickAnswerConfig:e,msgList:t,loading:r}=(0,s.a)(),[i,l]=(0,o.useState)(!1),c=(0,o.useRef)(null),p=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{const e=c.current;if(e){const t=new ResizeObserver((e=>{for(const t of e)t.contentRect.height>3*V+2*Z?p.current||l(!0):l(!1)}));return t.observe(e),()=>t.disconnect()}}),[i,null==e?void 0:e.list]),null!=e&&e.list.length&&0===t.length&&!r?n().createElement("div",{className:"quick-answer-wrapper"},n().createElement("div",{className:"tip"},e.tip??"你好,我是运维数智人 — Murphy,我能为你提供以下服务:"),n().createElement("div",{className:"quick-answer-list",style:{...i?{maxHeight:3*V+2*Z+10,overflow:"hidden"}:{}},ref:c},e.list.map((e=>n().createElement(ee,(0,a.A)({key:e.instanceId},e))))),i?n().createElement("div",{className:"show-more-wrapper"},n().createElement(Q,{icon:{lib:"antd",icon:"down"},className:"show-more-btn",onClick:()=>{p.current=!0,l(!1)}},"显示更多")):null):null}const re=(0,i.wrapBrick)("eo-link");function oe(){const{stopChat:e}=(0,s.a)();return n().createElement("div",{className:"stop-responding-wrapper"},n().createElement(re,{className:"stop-btn",onClick:()=>{e()}},"停止生成"))}const ne=80;function se(e){let{showAvatar:t=!0}=e;const r=(0,o.useRef)(null),a=(0,o.useRef)(null),[i,l]=(0,o.useState)(0),p=(0,o.useRef)(!1),{msgLoading:u,msgEnd:h,msgList:w,loading:g,activeSessionId:b,chatting:f}=(0,s.a)(),v=(0,o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;switch(e.type){case X.Dq:return n().createElement("div",{className:d()("message-item"),style:{marginTop:"-36px",marginLeft:"44px"},key:r},n().createElement(G,e));case X.vY:default:return n().createElement("div",{className:d()("message-item",{user:"user"===e.role}),key:r},t&&n().createElement(c,{role:e.role,agentId:e.agentId}),n().createElement(G,e))}}),[t]),x=(0,o.useMemo)((()=>w.map(((e,t)=>e.chatting?n().createElement(n().Fragment,null,v(e,t),f&&t===w.length-1&&e.type!==X.Dq?n().createElement(oe,null):null):v(e,t)))),[w,f,v]);return(0,o.useEffect)((()=>{(f||b)&&(p.current=!1)}),[f,b]),(0,o.useEffect)((()=>{const e=a.current;if(e){const t=new ResizeObserver((e=>{let t=0;if(!p.current){for(const r of e)t=r.contentRect.height-ne;g||f||r.current.scroll({top:Number.MAX_SAFE_INTEGER}),t>i&&f&&(r.current.scroll({top:Number.MAX_SAFE_INTEGER}),l(Math.max(i,t)))}}));return t.observe(e),()=>t.disconnect()}}),[f,g,i]),n().createElement("div",{className:"chat-view",ref:r},n().createElement("div",{className:"message-list"},n().createElement("div",{className:"message-list-box",ref:a},h&&w.length?n().createElement("div",{className:"message-start-tip"},"会话开始"):null,u&&n().createElement(m.g3,null),n().createElement(te,null),x),g&&n().createElement(m.CA,null)))}},205:(e,t,r)=>{r.d(t,{D:()=>g});var o=r(9575),n=r(8769),s=r.n(n),a=r(4223);const i=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"];let l;var c=r(3373),p=r.n(c),d=r(15),m=r(6484);const u=(0,a.wrapBrick)("eo-tooltip"),h=(0,a.wrapBrick)("eo-icon");function w(e,t){const[r,a]=(0,n.useState)(""),[c,w]=(0,n.useState)(!1),[g,b]=(0,n.useState)(!1),[f,v]=(0,n.useState)(),[x,k]=(0,n.useState)(!1),[y,E]=(0,n.useState)(!1),[A,M]=(0,n.useState)([]),[I,N]=(0,n.useState)(0),[C,z]=(0,n.useState)(!1),[S,q]=(0,n.useState)(-1),[P,D]=(0,n.useState)([]),[L,R]=(0,n.useState)(0),Y=(0,n.useRef)(null),_=(0,n.useRef)(null),$=(0,n.useRef)(null),T=(0,n.useRef)(null),H=(0,n.useRef)(!1),B=(0,n.useRef)(!1),{chatting:W,loading:O,searchStr:j,quickAnswerConfig:F,createSession:U,setSearchStr:X,handleChat:J,setAgent:G,snippetList:K}=(0,d.a)(),Q=(0,n.useMemo)((()=>(null==F?void 0:F.list)??[]),[F]),V=(0,n.useMemo)((()=>!!r),[r]),Z=(0,n.useMemo)((()=>[1,5]),[]),ee=(0,n.useMemo)((()=>O||W),[W,O]),te=(0,n.useMemo)((()=>{const e=T.current;if(S>=0&&r){const t=e.selectionStart;let o="";for(let e=S+1;e<t;e++){if(!/[\u4e00-\u9fa5]|\w|\d/.test(r[e])&&!B.current)return q(-1),!1;o+=r[e]}return{start:S+1,end:t,word:o}}return!1}),[S,r]),re=(0,n.useCallback)((e=>{if(te){const{start:t,end:o}=te,n=r.split(""),s=e.name.replace(/\s+/g,"")+" ",i=t+s.length;n.splice(t,o-t,s),a(n.join("")),q(-1),setTimeout((()=>{T.current.selectionStart=i,T.current.selectionEnd=i,T.current.focus()}),0)}}),[te,r]),oe=(0,n.useCallback)((e=>{const t=/@([\u4e00-\u9fa5|\w|\d]+)/g,o=[];let n;for(;null!==(n=t.exec(r));)o.push(n[0]);o.length?a(o.join(" ")+" "+e.content):a(e.content),E(!1),N(0),setTimeout((()=>{T.current.focus()}),0)}),[r]),ne=(0,n.useMemo)((()=>P.length&&C),[P,C]),se=(0,n.useMemo)((()=>ne?s().createElement("div",{className:"mentions-list-wrapper",ref:Y},s().createElement("div",{className:"content"},s().createElement("div",{className:"mentions-title"},"技能"),s().createElement("div",{className:"mentions-list"},P.slice(0,10).map(((e,t)=>s().createElement("div",{className:p()("mentions-item",{active:t===L}),key:t,onClick:()=>re(e)},s().createElement(h,(0,o.A)({className:"icon"},e.icon,{style:{color:`var(--theme-${e.icon.color}-color)`,background:`var(--theme-${e.icon.color}-background)`}})),s().createElement("div",{className:"name"},e.name),s().createElement("div",{className:"description"},e.description))))))):null),[P,L,ne,re]),ae=(0,n.useMemo)((()=>!ne&&A.length&&y),[ne,A,y]),ie=(0,n.useMemo)((()=>ae?s().createElement("div",{className:"snippets-list-wrapper",ref:_},s().createElement("div",{className:"content"},s().createElement("div",{className:"snippets-title"},"常用语"),s().createElement("div",{className:"snippets-list"},A.slice(0,10).map(((e,t)=>s().createElement("div",{className:p()("snippets-item",{active:t===I}),key:t,onClick:()=>oe(e)},s().createElement("div",{className:"name"},e.name),s().createElement("div",{className:"description"},e.content))))))):null),[A,I,ae,oe]),le=(0,n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z;if(H.current&&g)return;const t=T.current;if(t){const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;l||(l=document.createElement("textarea"),l.setAttribute("tab-index","-1"),l.setAttribute("aria-hidden","true"),document.body.appendChild(l));const o=window.getComputedStyle(e),n=i.map((e=>`${e}:${o.getPropertyValue(e)}`)).join(";");let s,a;l.setAttribute("style",`${n};\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n padding: 10px !important;\n pointer-events: none !important;\n`),l.value=e.value||e.placeholder||"";let c=l.scrollHeight-20+2;if(null!==t||null!==r){l.value=" ";const e=l.scrollHeight-20;null!==t&&(s=e*t-20+2,c=Math.max(20,c)),null!==r&&(a=e*r-20+2,c=Math.min(a,c))}const p={height:c,overflowY:"scroll",resize:"none"};return s&&(p.minHeight=s),a&&(p.maxHeight=a),p}(t,e[0],e[1]);v(r)}H.current=g}),[Z,g]),ce=(0,n.useCallback)((e=>{const t="string"==typeof e?e:e.target.value;a(t),T.current.value=t;const r=t.replaceAll(/@([\u4e00-\u9fa5|\w|\d]+)\s/g,"").trim();if(r){const e=(null==K?void 0:K.filter((e=>e.name.includes(r))))??[];M(e),E(!!e.length)}else M([]),E(!1)}),[K]),pe=(0,n.useCallback)((()=>{b((e=>!e))}),[]),de=(0,n.useCallback)((e=>{const t=/@([\u4e00-\u9fa5|\w|\d]+)/g;let r;for(;null!==(r=t.exec(e));)if(r){const e=null==Q?void 0:Q.find((e=>e.name.replace(/\s+/g,"")===r[1]));if(e&&G(e.id),e)break}}),[Q,G]),me=(0,n.useCallback)((e=>{var t;de(e),J(e),w(!1),b(!1),ce(""),null===(t=T.current)||void 0===t||t.blur()}),[J,ce,de]),ue=(0,n.useCallback)((()=>{V&&T.current&&!ee&&me(r)}),[r,V,ee,me]),he=(0,n.useCallback)((e=>{"Enter"!==e.key||e.shiftKey||B.current||(e.preventDefault(),ne?re(P[L]):ae?oe(A[I]):ue()),ne?("ArrowUp"===e.key&&(e.preventDefault(),R((e=>Math.max(0,e-1)))),"ArrowDown"===e.key&&(e.preventDefault(),R((e=>Math.min(P.length-1,e+1))))):ae&&("ArrowUp"===e.key&&(e.preventDefault(),N((e=>Math.max(0,e-1)))),"ArrowDown"===e.key&&(e.preventDefault(),N((e=>Math.min(A.length-1,e+1)))))}),[ue,re,oe,ne,P,L,ae,A,I]),we=(0,n.useCallback)((e=>{const t=T.current,r=t.selectionStart,o=t.value[r-1],n=t.value.slice(0,r).lastIndexOf("@");"Escape"===e.key||!ne&&-1!==["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(e.key)?q(-1):q("@"===o?r-1:n)}),[ne]);return(0,n.useEffect)((()=>{var e;j&&(ce(j.trim()),null===(e=T.current)||void 0===e||e.focus(),X(""))}),[j,ee,X,ce]),(0,n.useEffect)((()=>{le(g?[20,20]:void 0)}),[r,g,le]),(0,n.useEffect)((()=>{const e=$.current;if(e){const t=new ResizeObserver((()=>{const{width:t}=e.getBoundingClientRect();k(t<900)}));return t.observe(e),()=>{t.disconnect()}}}),[]),(0,n.useEffect)((()=>{var e;!W&&T.current&&(null===(e=T.current)||void 0===e||e.focus())}),[W]),(0,n.useEffect)((()=>{if(null!=Q&&Q.length&&te){const e=""===te.word?Q:Q.filter((e=>e.name.includes(te.word)));D(e),R(0),z(!0)}else D([]),z(!1)}),[te,Q]),(0,n.useEffect)((()=>{if(L>=0&&Y.current){const e=Y.current.querySelector(".mentions-item.active");null==e||e.scrollIntoView({block:"nearest"})}}),[L]),(0,n.useEffect)((()=>{if(I>=0&&_.current){const e=_.current.querySelector(".snippets-item.active");null==e||e.scrollIntoView({block:"nearest"})}}),[I]),(0,n.useEffect)((()=>{const e=e=>{const t=Y.current;t&&!t.contains(e.composedPath()[0])&&z(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}),[]),(0,n.useImperativeHandle)(t,(()=>({handleInsertQuestion:e=>{me(e)},sendMsg:e=>{J(e)}}))),s().createElement("div",{className:p()("search-input-box",{"fill-content":x}),ref:$},se,ie,e.inputToolbarBrick&&s().createElement("div",{className:"input-toobar"},s().createElement(m.ReactUseMultipleBricks,e.inputToolbarBrick)),s().createElement("div",{className:p()("input-box",{active:c,disabled:ee,expand:g})},s().createElement("textarea",{value:r,ref:T,style:{...f,paddingRight:g?"50px":"140px"},placeholder:W?"回复中,请稍等...":"提出你的想法...",onFocus:()=>w(!0),onBlur:()=>w(!1),onChange:ce,onKeyDown:he,onKeyUpCapture:we,onCompositionStart:()=>{B.current=!0},onCompositionEnd:()=>{B.current=!1}}),s().createElement("span",{className:"suffix-icon"},s().createElement(u,{content:"新增会话"},s().createElement(h,{lib:"antd",icon:"plus-circle",onClick:()=>{U()}})),!g&&s().createElement(u,{content:"放大"},s().createElement(h,{lib:"antd",icon:"arrows-alt",onClick:pe})),s().createElement("div",{className:"submit-split"}),s().createElement(u,{content:"提交"},s().createElement(h,{className:p()("submit-btn",{active:V,disabled:!V||ee}),lib:W?"antd":"easyops",icon:W?"loading":"release-management-fill",category:W?"":"menu",spinning:W,onClick:ue}))),s().createElement("span",{className:"toolbar-icon"},g&&s().createElement(u,{content:"缩小"},s().createElement(h,{lib:"antd",icon:"shrink",onClick:pe})))),V&&s().createElement("div",{className:"search-input-toolbar"},s().createElement("div",{className:"input-tip"},"Shift + Enter 换行")))}const g=(0,n.forwardRef)(w)},3830:(e,t,r)=>{r.d(t,{Z:()=>v});var o=r(9575),n=r(8769),s=r.n(n),a=r(15),i=r(3373),l=r.n(i),c=r(2445),p=r(1534),d=r(4223),m=r(8896);const u=(0,m.unwrapProvider)("basic.show-notification"),h=(0,d.wrapBrick)("eo-icon"),w=(0,m.unwrapProvider)("basic.show-dialog"),g=42,b=5,f=100;function v(){const{sessionEnd:e,sessionLoading:t,sessionList:r,querySessionHistory:i}=(0,a.a)(),l=(0,n.useRef)(null),d=(0,n.useRef)(null);(0,n.useEffect)((()=>{let e=20;const t=l.current;t&&(e=Math.floor(t.clientHeight/g)+b),i(e)}),[]);const m=(0,n.useCallback)((()=>{if(t||e)return;const r=d.current;if(r){const{scrollTop:e,scrollHeight:t,clientHeight:o}=r;e+o+f>t&&i()}}),[i,t,e]),u=(0,c.debounce)(m,200);return s().createElement("div",{className:"session-list-wrapper",ref:l},s().createElement("div",{className:"session-title"},"历史对话"),s().createElement("div",{className:"session-list",ref:d,onScroll:u},r.map(((e,t)=>s().createElement(x,(0,o.A)({key:t},e)))),t&&s().createElement(p.g3,null)))}function x(e){let{title:t,conversationId:r}=e;const{activeSessionId:o,checkSession:i,deleteSession:c}=(0,a.a)(),p=(0,n.useCallback)((()=>{i(r,!0)}),[r,i]),d=(0,n.useCallback)((e=>{e.stopPropagation(),w({type:"confirm",title:"会话删除确认",content:"请输入 {{ expect }} 以确认删除",expect:t.replace(/\s+/g,"")}).then((async()=>{const e=await c([r]);u({message:"删除会话"+(e?"成功":"失败"),type:e?"success":"error"})}))}),[r,c,t]);return s().createElement("div",{key:t,className:l()("session-item",{active:r===o}),onClick:p},s().createElement("div",{className:"content"},s().createElement("div",{className:"title",title:t},t)),s().createElement("div",{className:"session-close-btn",onClick:d},s().createElement(h,{icon:"close",lib:"antd"})))}},2442:(e,t,r)=>{r.d(t,{vY:()=>$,Dq:()=>_,Fn:()=>T});var o=r(8769),n=r(6238),s=r.n(n),a=r(4635),i=r(918),l=r(2559),c=r(829),p=r(6121),d=r(2110),m=r(9455),u=r(6916),h=r(2445),w=r.n(h),g=new WeakMap,b=new WeakMap,f=new WeakMap,v=new WeakMap,x=new WeakMap,k=new WeakMap,y=new WeakMap,E=new WeakMap,A=new WeakMap,M=new WeakMap,I=new WeakMap,N=new WeakMap,C=new WeakMap,z=new WeakMap,S=new WeakMap,q=new WeakSet;class P{constructor(e){let{agentId:t,robotId:r,enterInterval:o=50,debug:n=!1,answerLanguage:s}=e;(0,a.A)(this,q),(0,i.A)(this,g,void 0),(0,i.A)(this,b,void 0),(0,i.A)(this,f,void 0),(0,i.A)(this,v,void 0),(0,i.A)(this,x,void 0),(0,i.A)(this,k,!1),(0,i.A)(this,y,!1),(0,i.A)(this,E,void 0),(0,i.A)(this,A,[]),(0,i.A)(this,M,{}),(0,i.A)(this,I,void 0),(0,i.A)(this,N,void 0),(0,i.A)(this,C,void 0),(0,i.A)(this,z,void 0),(0,i.A)(this,S,void 0),(0,p.A)(f,this,t),(0,p.A)(v,this,r),(0,p.A)(x,this,o),(0,p.A)(g,this,n),(0,p.A)(N,this,s)}enqueue(e){(0,c.A)(A,this).push(e),(0,l.A)(q,this,L).call(this)}dequeue(){return(0,c.A)(A,this).shift()}getMessageQueue(){return(0,c.A)(A,this)}subscribe(e,t){(0,c.A)(M,this)[e]||((0,c.A)(M,this)[e]=[]),(0,c.A)(M,this)[e].push(t)}unsubscribe(e,t){(0,c.A)(M,this)[e]&&((0,c.A)(M,this)[e]=(0,c.A)(M,this)[e].filter((e=>e!==t)))}notifySubscribers(e){const t=e.topic;(0,c.A)(M,this)[t]&&(0,c.A)(M,this)[t].forEach((t=>{t(null==e?void 0:e.message)}))}async setChatItemIsLike(e,t){let r=!1;try{const{code:o}=await m.http.request(`${(0,u.getBasePath)()}api/gateway/easyops.api.aiops_chat.conversation.CommentDialogue/conversation/comment`,{method:"POST",body:JSON.stringify({taskId:e,isLike:t})});0===o&&(r=!0)}catch{r=!1}return r}setAgentId(e){(0,p.A)(f,this,e)}setConversationId(e){(0,p.A)(I,this,e)}async getSessionHistory(e){e&&(0,p.A)(z,this,e);try{const{data:{conversations:e,next_token:t}}=await m.http.request(`${(0,u.getBasePath)()}api/gateway/easyops.api.aiops_chat.conversation.ListConversation/conversation/list`,{method:"POST",body:JSON.stringify({limit:(0,c.A)(z,this)??20,next_token:(0,c.A)(C,this)})});return(0,p.A)(C,this,t),t||this.notifySubscribers({topic:"session.fetch.end"}),e}catch{console.error("获取会话历史失败")}return[]}async getChatHistory(e){if(e&&(this.setConversationId(e),(0,p.A)(S,this,"")),!(0,c.A)(I,this))return[];try{const{data:{conversations:e,next_token:t}}=await m.http.request(`${(0,u.getBasePath)()}api/gateway/easyops.api.aiops_chat.conversation.GetAllDialogue/conversation/get/${(0,c.A)(I,this)}`,{method:"POST",body:JSON.stringify({limit:1e3,next_token:(0,c.A)(S,this)})});return(0,p.A)(S,this,t),t||this.notifySubscribers({topic:"message.fetch.end"}),e}catch{console.error("获取消息历史失败")}return[]}async deleteSession(e){if(!e.length)return!1;let t=!1;try{const{code:r}=await m.http.request(`${(0,u.getBasePath)()}api/gateway/easyops.api.aiops_chat.conversation.DeleteConversation/conversation/delete`,{method:"POST",body:JSON.stringify({conversationIds:e})});0===r&&(t=!0)}catch{t=!1}return t}splitWord(e){if(!e)return[];if((null==e?void 0:e.length)<5)return[e];const t=[];if(/^```easy_cmd_[\s\S]*?```[^`]*$/.test(e)&&!/easy_cmd_progress/.test(e))return[e];if(window.Intl){const r=new Intl.Segmenter("zh-Hans-CN",{granularity:"word"}).segment(e)[Symbol.iterator]();let o=r.next();for(;!o.done;)t.push(o.value.segment),o=r.next()}else{const r={[Symbol.split](e){let t=0;const r=[];let o="";for(;t<e.length;){const n=e.substring(t,t+1);/[\u4e00-\u9fa5]/.test(n)||/\s|[,。;《》?!,.:<>?!]]/.test(n)?(r.push(o+n),o=""):o+=n,t++}return o&&r.push(o),r}};e.split(r).forEach((e=>{t.push(e)}))}return t}async chat(e){(0,p.A)(b,this,new AbortController);let t=!1;(0,p.A)(k,this,!0),await(0,d.y)(`${(0,u.getBasePath)()}api/gateway/easyops.api.aiops_chat.manage.LLMChatProxy@1.0.0/api/aiops_chat/v1/chat/completions`,{method:"POST",signal:(0,c.A)(b,this).signal,openWhenHidden:!0,body:JSON.stringify({agentId:(0,c.A)(f,this),robotId:(0,c.A)(v,this),conversationId:(0,c.A)(I,this),stream:!0,config:{debug:(0,c.A)(g,this),...(0,c.A)(N,this)?{lang:(0,c.A)(N,this)}:{}},..."string"==typeof e?{input:e}:e}),headers:{"giraffe-contract-name":"easyops.api.aiops_chat.manage.LLMChatProxy"},onopen:async e=>{e.ok?console.log("open sse service success!"):console.log("open sse service fail!")},onmessage:e=>{const{data:r}=e;if(t=!0,"[DONE]"===r)return void(0,c.A)(b,this).abort();let o={};try{o=JSON.parse(r),(0,c.A)(I,this)||this.setConversationId(o.conversationId);const e=this.splitWord(o.delta.content);let t=e;const n=100;if(e.length>n){const r=50,o=Math.ceil(e.length/(Math.floor(Math.random()*(n-r+1))+r));t=w().chunk(e,o).map((e=>e.join("")))}t.forEach((e=>{this.enqueue({topic:"add",message:{...o,delta:{role:"assistant",content:e}}})}))}catch{return this.enqueue({topic:"add",message:{created:s()().format("YYYY-MM-DD HH:mm:ss"),delta:{role:"assistant",content:`\`【数据格式错误】:\` ${r}`},agentId:(0,c.A)(f,this),robotId:(0,c.A)(v,this)}}),void(0,c.A)(b,this).abort()}},onclose:()=>{console.log("close"),t||this.enqueue({topic:"add",message:{delta:{role:"assistant",content:"`无法识别`"},agentId:(0,c.A)(f,this),robotId:(0,c.A)(v,this),created:s()().format("YYYY-MM-DD HH:mm:ss")}}),(0,c.A)(b,this).abort()},onerror:e=>{throw e}}),(0,p.A)(k,this,!1)}stop(){var e;clearTimeout((0,c.A)(E,this)),(0,c.A)(b,this)&&(null===(e=(0,c.A)(b,this))||void 0===e||e.abort()),(0,p.A)(k,this,!1),(0,p.A)(E,this,void 0),(0,p.A)(y,this,!1),(0,l.A)(q,this,D).call(this),this.notifySubscribers({topic:"stop"})}}function D(){(0,c.A)(A,this).length=0}function L(){if((0,c.A)(y,this))return;(0,p.A)(y,this,!0);const e=()=>{if((0,c.A)(k,this)||(0,c.A)(A,this).length){const t=this.dequeue();t&&this.notifySubscribers(t),(0,p.A)(E,this,setTimeout(e,R((0,c.A)(x,this),(0,c.A)(A,this).length)))}else clearTimeout((0,c.A)(E,this)),(0,p.A)(E,this,void 0),(0,p.A)(y,this,!1),this.notifySubscribers({topic:"finish"})};(0,p.A)(E,this,setTimeout(e,R((0,c.A)(x,this),(0,c.A)(A,this).length)))}function R(e,t){return e>=0?e:t>50?16:Math.floor(11*Math.random())<9?50:Math.floor(251*Math.random())+50}const Y="new_session_id",_="RELATED_QUESTIONS",$="TEXT";function T(e){let{agentId:t,robotId:r,sessionId:n,enterInterval:a=50,debug:i,answerLanguage:l}=e;const[c,p]=(0,o.useState)(!1),[d,m]=(0,o.useState)(!1),[u,h]=(0,o.useState)(),[w,g]=(0,o.useState)(!1),[b,f]=(0,o.useState)(!1),[v,x]=(0,o.useState)([]),[k,y]=(0,o.useState)(!1),[E,A]=(0,o.useState)(!1),[M,I]=(0,o.useState)([]),[N,C]=(0,o.useState)(""),z=(0,o.useRef)(""),S=(0,o.useRef)(),q=(0,o.useMemo)((()=>new P({agentId:t,robotId:r,enterInterval:a,debug:i,answerLanguage:l})),[t,r,a,i,l]),D=(0,o.useMemo)((()=>({conversationId:Y,title:"新建会话"})),[]),L=(0,o.useCallback)((()=>{q.stop()}),[q]),R=(0,o.useCallback)((e=>{q.setAgentId(e)}),[q]),T=(0,o.useCallback)((async function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&e?(A(!1),y(!1),g(!0),I([]),h(e),b&&L()):y(!0),e===Y)return q.setConversationId(),A(!0),void g(!1);const t=await q.getChatHistory(e);I((e=>(e=>{const t=[];return e.forEach((e=>{t.unshift({agentId:e.agentId,robotId:e.robotId,taskId:e.taskId,conversationId:e.conversationId,role:"user",content:{type:"markdown",text:e.input},key:`user_${e.taskId}`,created:e.time,type:$},{agentId:e.agentId,taskId:e.taskId,conversationId:e.conversationId,role:"assistant",content:{type:"markdown",text:e.output},key:`assistant_${e.taskId}`,created:e.inputTime,tag:e.tag,type:$})})),t.filter((e=>e.content.text))})(t).concat(e))),y(!1),g(!1)}),[q,b,L]),H=(0,o.useCallback)((async e=>{const t=e.filter((e=>e!==Y)),r=await q.deleteSession(t);if(r){let e=!1;u&&t.includes(u)&&u!==Y&&(e=!0,q.setConversationId(),A(!1),y(!1),I([]),b&&L()),x((r=>{const o=r.filter((e=>!t.includes(e.conversationId)));if(e){const e=r.find((e=>e.conversationId===Y));return g(!1),h(Y),e?o:[D].concat(o)}return o}))}return r}),[u,q,b,D,L]),B=(0,o.useCallback)((async e=>{m(!0);const t=await q.getSessionHistory(e);u||h(Y),x((e=>u?e.concat(t):[D].concat([...e,...t]))),m(!1)}),[q,u,D]),W=(0,o.useCallback)((async e=>{const t="string"==typeof e?e:e.input;u===Y&&x((e=>e.map((e=>({...e,title:e.conversationId===Y?t:e.title}))))),f(!0),q.chat(e),I((e=>e.filter((e=>e.type!==_)).concat([{role:"user",content:{type:"markdown",text:t},created:s()().format("YYYY-MM-DD HH:mm:ss"),type:$},{role:"assistant",content:{type:"load",text:""},chatting:!0,created:"Now",type:$}])))}),[q,u]),O=(0,o.useCallback)((()=>{q.setConversationId(),I([]),h(Y),v.find((e=>e.conversationId===Y))||x((e=>[D].concat(e)))}),[q,v,D]),j=(0,o.useCallback)((async(e,t)=>{const r=await q.setChatItemIsLike(e,t);return r&&I((r=>r.map((r=>({...r,tag:e===r.taskId?{isLike:t}:r.tag}))))),r}),[q]);return(0,o.useEffect)((()=>{n&&T(n)}),[n]),(0,o.useEffect)((()=>{const e=()=>{p(!0)};return q.subscribe("session.fetch.end",e),()=>{q.subscribe("session.fetch.end",e)}}),[q]),(0,o.useEffect)((()=>{const e=e=>{var t,r,o,n,a;if(!e)return;const i={type:$,...e};u===Y&&i.conversationId&&(x((e=>e.map((e=>({...e,conversationId:e.conversationId===Y?i.conversationId:e.conversationId}))))),h(i.conversationId)),!S.current||i.type===(null===(t=S.current)||void 0===t?void 0:t.type)&&i.taskId===(null===(r=S.current)||void 0===r?void 0:r.taskId)?(z.current=z.current+i.delta.content,S.current={...i,role:"assistant",content:{type:"markdown",text:z.current},chatting:!0,created:s()(null==i?void 0:i.created).format("YYYY-MM-DD HH:mm:ss")},I((e=>(e.pop(),e.concat(S.current))))):i.type===(null===(o=S.current)||void 0===o?void 0:o.type)&&i.taskId!==(null===(n=S.current)||void 0===n?void 0:n.taskId)?(z.current=i.delta.content,S.current={...i,role:"assistant",content:{type:"markdown",text:z.current},chatting:!0,created:s()(null==i?void 0:i.created).format("YYYY-MM-DD HH:mm:ss")},I((e=>e.map((e=>({...e,chatting:!1}))).concat(S.current)))):i.type!==(null===(a=S.current)||void 0===a?void 0:a.type)&&(i.type,z.current=i.delta.content,S.current={...i,role:"assistant",content:{type:"markdown",text:z.current},chatting:!0,created:s()(null==i?void 0:i.created).format("YYYY-MM-DD HH:mm:ss")},I((e=>e.map((e=>({...e,chatting:!1}))).filter((e=>e.type!==_)).concat(S.current))))},t=()=>{z.current="",f(!1),g(!1),S.current=void 0},r=()=>{I((e=>e.map((e=>({...e,chatting:!1}))))),t()},o=()=>{A(!0)},n=()=>{if(S.current){const e={...S.current,content:{type:"markdown",text:S.current.content.text+" \\\n ` 对话被中断了 `"}};I((t=>(t.pop(),M.concat(e))))}else I((e=>e.filter((e=>"load"!==e.content.type))));t()};return q.subscribe("add",e),q.subscribe("finish",r),q.subscribe("stop",n),q.subscribe("message.fetch.end",o),()=>{q.unsubscribe("add",e),q.unsubscribe("finish",r),q.unsubscribe("stop",n),q.unsubscribe("message.fetch.end",o)}}),[q,u,M]),{sessionEnd:c,sessionLoading:d,loading:w,chatting:b,activeSessionId:u,sessionList:v,searchStr:N,msgEnd:E,msgLoading:k,msgList:M,setAgent:R,handleChat:W,stopChat:L,createSession:O,deleteSession:H,checkSession:T,setSearchStr:C,querySessionHistory:B,handleIsLike:j}}},2793:(e,t,r)=>{r.d(t,{A:()=>i});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s)()(n());a.push([e.id,'.progress-text{position:relative;margin-left:12px;font-size:12px;color:var(--palette-gray-7);line-height:22px;min-height:22px}.progress-text::before{content:"·";font-size:16px;position:absolute;left:-10px;top:-4px}.custom-component-wrapper .params{margin-top:6px;border-radius:3px}.custom-component-wrapper .params pre{margin:4px 0}.custom-component-wrapper .params-tip,\n .custom-component-wrapper .error-tip,\n .custom-component-wrapper .result-tip{font-size:0.875em;color:rgb(94 129 172)}.custom-component-wrapper .empty-tip{font-size:12px;color:var(--palette-gray-7)}.custom-component-wrapper .table-wrapper .table-container{position:relative;box-sizing:border-box;margin:0;padding:0;font-size:14px;clear:both;max-width:100%;overflow:hidden}.custom-component-wrapper .table-wrapper .table-container .table-content{overflow-x:auto}.custom-component-wrapper .table-wrapper .table-container .table-content table{margin:4px 0}.custom-component-wrapper .table-wrapper .table-container .table-content table tr td{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.custom-component-wrapper .table-wrapper .open-more{margin-top:4px;font-size:12px;display:flex;justify-content:end}.custom-component-wrapper .chart-wrapper{background:#fff;margin-top:12px}.default-container .default-toolbar-container{visibility:hidden;position:absolute;top:0;right:0}.default-container:hover .default-toolbar-container{visibility:visible}',""]);const i=a},4345:(e,t,r)=>{r.d(t,{A:()=>i});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s)()(n());a.push([e.id,'.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;font-variant-ligatures:none;font-feature-settings:"liga" 0,none}.ProseMirror pre{white-space:pre-wrap}.ProseMirror li{position:relative}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid #8cf;pointer-events:none}img.ProseMirror-separator{display:inline!important;border:none!important;margin:0!important}.ProseMirror .tableWrapper{overflow-x:auto}.ProseMirror table{border-collapse:collapse;table-layout:fixed;width:100%;overflow:hidden;background-color:white;margin:4px 0}.ProseMirror td,\n.ProseMirror th{vertical-align:top;box-sizing:border-box;position:relative}.ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;z-index:20;background-color:#adf;pointer-events:none}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.ProseMirror .selectedCell:after{z-index:2;position:absolute;content:"";left:0;right:0;top:0;bottom:0;background:rgba(200,200,255,0.4);pointer-events:none}.milkdown-theme-nord blockquote{border-left-width:4px;--tw-border-opacity:1;border-color:rgb(94 129 172/var(--tw-border-opacity));padding-left:1rem;font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:normal}.milkdown-theme-nord code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:400;--tw-text-opacity:1;color:rgb(94 129 172/var(--tw-text-opacity))}.milkdown-theme-nord pre code{color:inherit}.milkdown-theme-nord img{margin-top:0!important;margin-bottom:0!important;display:inline-block;max-width:100%}.milkdown-theme-nord.prose\n :where(blockquote):not(:where([class~="not-prose"] *)){font-weight:400}.milkdown-theme-nord.prose\n :where(ol > li):not(:where([class~="not-prose"] *))::marker,\n.milkdown-theme-nord.prose\n :where(ul > li):not(:where([class~="not-prose"] *))::marker{--tw-text-opacity:1;color:rgb(94 129 172/var(--tw-text-opacity))}.milkdown-theme-nord.prose\n :where(blockquote p:first-of-type):not(:where([class~="not-prose"] *)):before,\n.milkdown-theme-nord.prose\n :where(blockquote p:first-of-type):not(:where([class~="not-prose"] *)):after{content:""}.milkdown-theme-nord.prose\n :where(code):not(:where([class~="not-prose"] *)):before,\n.milkdown-theme-nord.prose\n :where(code):not(:where([class~="not-prose"] *)):after{content:""}.milkdown-theme-nord.prose .tableWrapper{position:relative;margin-bottom:0.5rem;overflow-x:auto}.milkdown-theme-nord.prose table{font-size:0.875rem;line-height:1.25rem;--tw-shadow:0 4px 6px -1px rgb(0 0 0/0.1),0 2px 4px -2px rgb(0 0 0/0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){.milkdown-theme-nord.prose table{border-radius:0.5rem}}.milkdown-theme-nord.prose td,\n.milkdown-theme-nord.prose th{padding:0.75rem 1.5rem!important}.milkdown-theme-nord.prose tr{border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.prose :where(tr:first-child){background-color:var(--antd-table-header-bg)}.dark .milkdown-theme-nord.prose tr{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.milkdown-theme-nord.prose :where(td, th) p{margin:0!important}.dark .milkdown-theme-nord.prose :where(td, th):nth-child(odd){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.milkdown-theme-nord.prose.ProseMirror .selectedCell:after{background-color:#88c0d04d}.milkdown-theme-nord.prose br[data-is-inline="true"],\n.milkdown-theme-nord.prose br[data-is-inline="true"]:after{content:" "}.prose{color:var(--color-normal-text)}.prose :where(p):not(:where([class~="not-prose"] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~="not-prose"] *)){color:var(--color-info);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~="not-prose"] *)){color:var(--color-strong-text);font-weight:600}.prose :where(a strong):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(thead th strong):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(ol):not(:where([class~="not-prose"] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)){list-style-type:upper-alpha}.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)){list-style-type:lower-alpha}.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)){list-style-type:upper-alpha}.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)){list-style-type:lower-alpha}.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)){list-style-type:upper-roman}.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)){list-style-type:lower-roman}.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)){list-style-type:upper-roman}.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~="not-prose"] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker{color:var(--tw-prose-bullets)}.prose :where(hr):not(:where([class~="not-prose"] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~="not-prose"] *)){font-weight:500;font-style:italic;color:var(--color-auxiliary-text);border-left-width:0.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\\201C" "\\201D" "\\2018" "\\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose\n :where(blockquote p:first-of-type):not(\n :where([class~="not-prose"] *)\n )::before{content:open-quote}.prose\n :where(blockquote p:last-of-type):not(:where([class~="not-prose"] *))::after{content:close-quote}.prose :where(h1):not(:where([class~="not-prose"] *)){color:var(--color-strong-text);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:0.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~="not-prose"] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~="not-prose"] *)){color:var(--color-strong-text);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~="not-prose"] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~="not-prose"] *)){color:var(--color-strong-text);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:0.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~="not-prose"] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~="not-prose"] *)){color:var(--color-strong-text);font-weight:600;margin-top:1.5em;margin-bottom:0.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~="not-prose"] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure > *):not(:where([class~="not-prose"] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~="not-prose"] *)){color:var(--tw-prose-captions);font-size:0.875em;line-height:1.4285714;margin-top:0.8571429em}.prose :where(code):not(:where([class~="not-prose"] *)){color:var(--tw-prose-code);font-weight:600;font-size:0.875em}.prose :where(code):not(:where([class~="not-prose"] *))::before{content:"`"}.prose :where(code):not(:where([class~="not-prose"] *))::after{content:"`"}.prose :where(a code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(h1 code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(h2 code):not(:where([class~="not-prose"] *)){color:inherit;font-size:0.875em}.prose :where(h3 code):not(:where([class~="not-prose"] *)){color:inherit;font-size:0.9em}.prose :where(h4 code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(blockquote code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(thead th code):not(:where([class~="not-prose"] *)){color:inherit}.prose :where(pre):not(:where([class~="not-prose"] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:0.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:0.375rem;padding-top:0.8571429em;padding-right:1.1428571em;padding-bottom:0.8571429em;padding-left:1.1428571em}.prose :where(pre code):not(:where([class~="not-prose"] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~="not-prose"] *))::before{content:none}.prose :where(pre code):not(:where([class~="not-prose"] *))::after{content:none}.prose :where(table):not(:where([class~="not-prose"] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:0.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~="not-prose"] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~="not-prose"] *)){color:var(--color-strong-text);font-weight:600;vertical-align:bottom;padding-right:0.5714286em;padding-bottom:0.5714286em;padding-left:0.5714286em}.prose :where(tbody tr):not(:where([class~="not-prose"] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~="not-prose"] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~="not-prose"] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~="not-prose"] *)){vertical-align:top}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgb(0 0 0/50%);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(video):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure):not(:where([class~="not-prose"] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~="not-prose"] *)){margin-top:0.5em;margin-bottom:0.5em}.prose :where(ol > li):not(:where([class~="not-prose"] *)){padding-left:0.375em}.prose :where(ul > li):not(:where([class~="not-prose"] *)){padding-left:0.375em}.prose :where(.prose > ul > li p):not(:where([class~="not-prose"] *)){margin-top:0.75em;margin-bottom:0.75em}.prose\n :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose\n :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose\n :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)){margin-top:1.25em}.prose\n :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)){margin-bottom:1.25em}.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"] *)){margin-top:0.75em;margin-bottom:0.75em}.prose :where(hr + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h2 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h3 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(h4 + *):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)){padding-right:0}.prose :where(tbody td, tfoot td):not(:where([class~="not-prose"] *)){padding-top:0.5714286em;padding-right:0.5714286em;padding-bottom:0.5714286em;padding-left:0.5714286em}.prose\n :where(tbody td:first-child, tfoot td:first-child):not(\n :where([class~="not-prose"] *)\n ){padding-left:0}.prose\n :where(tbody td:last-child, tfoot td:last-child):not(\n :where([class~="not-prose"] *)\n ){padding-right:0}.prose :where(.prose > :first-child):not(:where([class~="not-prose"] *)){margin-top:0}.prose :where(.prose > :last-child):not(:where([class~="not-prose"] *)){margin-bottom:0}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.isolate{isolation:isolate}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.flex-shrink{flex-shrink:1}.shrink{flex-shrink:1}.flex-grow{flex-grow:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.select-all{-webkit-user-select:all;user-select:all}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.break-all{word-break:break-all}.rounded{border-radius:0.25rem}.border{border-width:1px}.text-justify{text-align:justify}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure:lining-nums;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-feature-settings:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.ease-in{transition-timing-function:cubic-bezier(0.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(0.4,0,0.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,0.2,1)}.milkdown{border-radius:0.25rem;margin:0;padding:0}.editor{margin-left:auto;margin-right:auto}:is(.dark .dark\\:prose-invert){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}code[class*="language-"],\npre[class*="language-"]{color:#f8f8f2;background:none;font-family:"Fira Code",Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*="language-"]{padding:1em;margin:0.5em 0;overflow:auto;border-radius:0.3em}:not(pre) > code[class*="language-"],\npre[class*="language-"]{background:#2e3440}:not(pre) > code[class*="language-"]{padding:0.1em;border-radius:0.3em;white-space:normal}.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata{color:#636f88}.token.punctuation{color:#81a1c1}.namespace{opacity:0.7}.token.property,\n.token.tag,\n.token.constant,\n.token.symbol,\n.token.deleted{color:#81a1c1}.token.number{color:#b48ead}.token.boolean{color:#81a1c1}.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted{color:#a3be8c}.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string,\n.token.variable{color:#81a1c1}.token.atrule,\n.token.attr-value,\n.token.function,\n.token.class-name{color:#88c0d0}.token.keyword{color:#81a1c1}.token.regex,\n.token.important{color:#ebcb8b}.token.important,\n.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}',""]);const i=a},4218:(e,t,r)=>{r.d(t,{A:()=>i});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s)()(n());a.push([e.id,'.quick-answer-wrapper{margin-top:20px;border-radius:6px;border:1px solid var(--color-border-divider-line);padding:16px 24px}.quick-answer-wrapper .tip{font-size:18px;margin-bottom:30px}.quick-answer-wrapper .quick-answer-list{display:grid;gap:24px 16px;border-radius:3px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.quick-answer-wrapper .quick-answer-list .quick-answer-card-item{position:relative;padding:16px;border-radius:6px;cursor:pointer;display:flex;padding:10px 20px;gap:12px;width:auto;box-sizing:border-box}.quick-answer-wrapper .quick-answer-list .quick-answer-card-item:hover{box-shadow:var(--quick-answer-card-item-hover)}.quick-answer-wrapper .quick-answer-list .quick-answer-card-item .left .icon{font-size:20px;color:#fff;padding:8px;border-radius:6px;margin-top:4px}.quick-answer-wrapper .quick-answer-list .quick-answer-card-item .content{flex:1;min-width:0}.quick-answer-wrapper .quick-answer-list .quick-answer-card-item .content .title{font-size:16px;font-weight:bold;color:var(--color-normal-text);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.quick-answer-wrapper .quick-answer-list .quick-answer-card-item .content .description{color:var(--color-auxiliary-text);font-size:12px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.quick-answer-wrapper .show-more-wrapper{text-align:center;margin-top:20px}.quick-answer-wrapper .show-more-wrapper .show-more-btn{line-height:24px}.quick-answer-wrapper .show-more-wrapper .show-more-btn::after,\n .quick-answer-wrapper .show-more-wrapper .show-more-btn::before{content:"- - - - -";color:var(--color-text-divider-line);position:absolute}.quick-answer-wrapper .show-more-wrapper .show-more-btn::before{margin-left:-60px}.quick-answer-wrapper .show-more-wrapper .show-more-btn::after{margin-left:10px}',""]);const i=a},3613:(e,t,r)=>{r.d(t,{A:()=>m});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s),i=r(62),l=r.n(i),c=new URL(r(3101),r.b),p=a()(n()),d=l()(c);p.push([e.id,`.message-list-loading-wrapper{width:140px;height:140px;background-repeat:no-repeat;margin:auto;background-image:url(${d})}.chart-item-loading-wrapper{display:flex;padding:10px;font-size:40px;align-items:center;justify-content:center;color:#d2d3d4;border-radius:6px}.chart-item-loading-wrapper .load{display:inline-block;position:relative;width:64px;height:64px}.chart-item-loading-wrapper .load div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#aaa8a8;animation-timing-function:cubic-bezier(0,1,1,0)}.chart-item-loading-wrapper .load div:nth-child(1){left:6px;animation:load1 0.6s infinite}.chart-item-loading-wrapper .load div:nth-child(2){left:6px;animation:load2 0.6s infinite}.chart-item-loading-wrapper .load div:nth-child(3){left:26px;animation:load2 0.6s infinite}.chart-item-loading-wrapper .load div:nth-child(4){left:45px;animation:load3 0.6s infinite}@keyframes load1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes load2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}@keyframes load3{0%{transform:scale(1)}100%{transform:scale(0)}}.common-loading-wrapper{text-align:center;font-size:30px;color:#ddd}`,""]);const m=p},6870:(e,t,r)=>{r.d(t,{A:()=>i});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s)()(n());a.push([e.id,':root{--message-box-bg:#f1f3f4;--search-input-icon-hover:#ddd;--quick-answer-card-item-hover:0px 7px 8px 0px rgba(0,0,0,0.15)}html[data-theme="dark"],\nhtml[data-theme="dark-v2"]{--message-box-bg:rgba(255,255,255,0.16);--search-input-icon-hover:#383838;--quick-answer-card-item-hover:0px 7px 8px 0px rgba(0,0,0,0.24)}',""]);const i=a},5800:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s),i=r(7956),l=r(3613),c=r(4345),p=r(4218),d=r(2793),m=a()(n());m.i(i.A),m.i(l.A),m.i(c.A),m.i(p.A),m.i(d.A),m.push([e.id,"",""]);const u=m},7956:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(6758),n=r.n(o),s=r(935),a=r.n(s),i=r(62),l=r.n(i),c=new URL(r(7309),r.b),p=new URL(r(950),r.b),d=a()(n()),m=l()(c),u=l()(p);d.push([e.id,`:host{display:block;height:100%}:host([hidden]){display:none}@media only screen and (min-width: 1920px){.chat-view-container .chat-view-content .chat-view .message-list{width:1556px}.chat-view-container .chat-view-content .search-input-box{width:1556px}}@media only screen and (min-width: 1440px) and (max-width: 1920px){.chat-view-container .chat-view-content .chat-view .message-list{width:1156px}.chat-view-container .chat-view-content .search-input-box{width:1156px}}@media only screen and (min-width: 804px) and (max-width: 1440px){.chat-view-container .chat-view-content .chat-view .message-list{width:804px}.chat-view-container .chat-view-content .search-input-box{width:804px}}@media only screen and (max-width: 804px){.chat-view-container .chat-view-content .chat-view .message-list{width:100%}.chat-view-container .chat-view-content .search-input-box{width:100%}}.chat-view-container{display:flex;flex-direction:row;width:100%;height:100%}.chat-view-selector{width:200px;padding:14px;border-right:1px solid var(--color-border-divider-line)}.chat-view-content{flex:1;display:flex;flex-direction:column;width:100%;gap:8px}.chat-view-content .chat-view-toolbar{background:#e0e4e5;padding:18px;display:flex;justify-content:space-between;align-items:center}.chat-view-content .chat-view-toolbar .username{color:#333333;font-weight:500;line-height:22px;font-size:16px}.chat-view-content .chat-view{max-width:100%;position:relative;display:flex;flex:1;flex-direction:column;box-sizing:border-box;overflow-y:auto}.session-list-wrapper{display:flex;flex-direction:column;height:100%}.session-list-wrapper .session-title{font-size:16px;color:var(--color-header-text);margin-bottom:16px}.session-list-wrapper .session-list{overflow-y:auto}.session-list-wrapper .session-list .session-item{display:flex;justify-content:space-between;cursor:pointer;border-radius:var(--small-border-radius);background-color:var(--third-menu-default-bg);padding:6px 16px;color:var(--color-header-text);margin-top:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-list-wrapper .session-list .session-item .content{width:0;flex:1}.session-list-wrapper .session-list .session-item .content .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-list-wrapper .session-list .session-item:hover .session-close-btn eo-icon{display:block}.session-list-wrapper .session-list .session-item:first-child{margin-top:0px}.session-list-wrapper .session-list .session-item.active{background-color:var(--third-menu-item-selected-bg);color:var(--color-brand)}.session-list-wrapper .session-list .session-item:hover,\n .session-list-wrapper .session-list .session-item.active:hover{color:var(--color-header-text);background-color:var(--third-menu-item-hover-bg)}.session-list-wrapper .session-list .session-item .session-close-btn{display:flex;align-items:center;cursor:pointer;font-size:12px}.session-list-wrapper .session-list .session-item .session-close-btn:hover{color:var(--color-error)}.session-list-wrapper .session-list .session-item .session-close-btn eo-icon{display:none}.message-list{display:flex;flex-direction:column;padding-bottom:30px;padding:12px;flex:1;margin:0 auto;max-width:100%;box-sizing:border-box}.message-list .message-list-box{display:flex;flex-direction:column;position:relative;gap:36px}.message-list .message-list-box .message-item{display:flex;gap:8px;padding-right:40px}.message-list .message-list-box .message-item:last-child{margin-bottom:10px}.message-list .message-list-box .message-item.user{flex-direction:row-reverse;padding:0;padding-left:40px}.message-list .message-list-box .message-item.user .message-box{margin-bottom:0;overflow:hidden}.message-list .message-list-box .message-item.user .message-box .message-top{flex-direction:row-reverse}.message-list .message-list-box .message-item.user .message-box .message-content{justify-content:end}.message-list .message-list-box .message-item.user .message-box .message-content .wrapper .content{background-color:#606f7c;color:#fff}.message-list .message-list-box .message-item.user .message-box .message-content .wrapper .content .ProseMirror.prose{color:#fff}.message-list .message-list-box .message-item .avatar{width:36px;height:36px;margin-top:32px;border-radius:50%;font-size:20px;display:flex;align-items:center;justify-content:center}.message-list .message-list-box .message-item .avatar.user{background-image:url(${m})}.message-list .message-list-box .message-item .avatar.robot{background-image:url(${u})}.message-list .message-list-box .message-item .message-box{position:relative;flex:1;overflow:hidden}.message-list .message-list-box .message-item .message-box .message-content{display:flex;justify-content:start;position:relative}.message-list .message-list-box .message-item .message-box .message-content .wrapper{position:relative;overflow:hidden}.message-list .message-list-box .message-item .message-box .message-content .wrapper .content{position:relative;padding:14px;border-radius:6px;overflow:hidden;background:var(--message-box-bg)}.message-list .message-list-box .message-item .message-box .message-content .wrapper .content .text-item{white-space:pre-wrap}.message-list .message-list-box .message-item .message-box .message-content .wrapper .message-toolbar{display:flex;gap:12px;justify-content:end;margin-top:4px}.message-list .message-list-box .message-item .message-box .message-content .wrapper .message-toolbar eo-icon{cursor:pointer;color:#606f7c}.message-list .message-list-box .message-item .message-box .message-content .wrapper .message-toolbar eo-icon.active{color:var(--color-brand)}.message-list .message-list-box .message-item .message-box .message-content .wrapper .message-toolbar .split{width:1px;height:16px;background-color:#d9d9d9;margin-bottom:1px}.message-list .message-list-box .message-item .message-box .message-top{display:flex;margin-bottom:4px;color:#bec8ce;gap:8px}.message-list .message-list-box .message-item .message-box .message-top .time{min-height:22px}.message-list .message-list-box .stop-responding-wrapper{position:absolute;left:44px;bottom:-28px}.search-input-box{display:flex;flex-direction:column;height:87px;padding:12px;position:relative;margin:0 auto;max-width:100%;box-sizing:border-box}.search-input-box .input-toobar{position:absolute;bottom:71%;left:12px;right:12px}.search-input-box .mentions-list-wrapper{position:absolute;bottom:100%;left:12px;right:12px;z-index:1}.search-input-box .mentions-list-wrapper .content{background-color:var(--antd-input-bg);border-radius:6px;border:1px solid var(--palette-gray-4);padding:8px}.search-input-box .mentions-list-wrapper .content .mentions-title{font-size:14px;font-weight:bold;color:var(--color-strong-text);padding-bottom:8px}.search-input-box .mentions-list-wrapper .content .mentions-list{display:flex;flex-direction:column;gap:8px;max-height:300px;overflow-y:auto}.search-input-box .mentions-list-wrapper .content .mentions-list .mentions-item{display:flex;flex-direction:row;align-items:center;gap:12px;padding:8px;border-radius:6px;cursor:pointer}.search-input-box .mentions-list-wrapper .content .mentions-list .mentions-item .icon{font-size:18px;padding:8px;border-radius:50%}.search-input-box .mentions-list-wrapper .content .mentions-list .mentions-item .name{color:var(--color-normal-text)}.search-input-box .mentions-list-wrapper .content .mentions-list .mentions-item .description{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--color-disabled-text)}.search-input-box .mentions-list-wrapper .content .mentions-list .mentions-item:hover,\n .search-input-box .mentions-list-wrapper .content .mentions-list .mentions-item.active{background:var(--palette-gray-3)}.search-input-box .snippets-list-wrapper{position:absolute;bottom:100%;left:12px;right:12px;z-index:1}.search-input-box .snippets-list-wrapper .content{background-color:var(--antd-input-bg);border-radius:6px;border:1px solid var(--palette-gray-4);padding:8px}.search-input-box .snippets-list-wrapper .content .snippets-title{font-size:14px;font-weight:bold;color:var(--color-strong-text);padding-bottom:8px}.search-input-box .snippets-list-wrapper .content .snippets-list{display:flex;flex-direction:column;gap:8px;max-height:300px;overflow-y:auto}.search-input-box .snippets-list-wrapper .content .snippets-list .snippets-item{display:flex;flex-direction:row;align-items:center;gap:12px;padding:8px;border-radius:6px;cursor:pointer}.search-input-box .snippets-list-wrapper .content .snippets-list .snippets-item .icon{font-size:18px;padding:8px;border-radius:50%}.search-input-box .snippets-list-wrapper .content .snippets-list .snippets-item .name{color:var(--color-normal-text)}.search-input-box .snippets-list-wrapper .content .snippets-list .snippets-item .description{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--color-disabled-text)}.search-input-box .snippets-list-wrapper .content .snippets-list .snippets-item:hover,\n .search-input-box .snippets-list-wrapper .content .snippets-list .snippets-item.active{background:var(--palette-gray-3)}.search-input-box.fill-content{border-top:1px solid rgba(197,197,197,0.5)}.search-input-box .input-box{position:absolute;bottom:20px;left:12px;right:12px;display:inline-flex;padding:var(--input-affix-wrapper-padding);border-radius:var(--small-border-radius);height:-moz-fit-content;height:fit-content;color:var(--text-color-default);background-color:var(--antd-input-bg);border:1px solid var(--color-border-divider-line);transition:border-color 0.3s;overflow:visible}.search-input-box .input-box.active{border-color:var(--antd-input-focus-border-color)}.search-input-box .input-box.disabled{pointer-events:none;background:var(--input-outline-disabled);cursor:not-allowed}.search-input-box .input-box.expand textarea{padding-right:50px;margin-bottom:50px}.search-input-box .input-box textarea{width:100%;height:22px;font-size:18px;resize:none;padding:10px 50px 10px 10px;outline:none;border:none;line-height:20px;color:var(--color-normal-text);background-color:transparent;cursor:inherit;transition:all 300ms ease-out;box-sizing:content-box}.search-input-box .input-box textarea::placeholder{color:#b0b1b8}.search-input-box .input-box .suffix-icon{display:flex;align-items:center;gap:8px;position:absolute;right:12px;bottom:6px}.search-input-box .input-box .suffix-icon eo-tooltip{display:flex}.search-input-box .input-box .suffix-icon eo-icon{font-size:20px;cursor:pointer;padding:6px;border-radius:3px}.search-input-box .input-box .suffix-icon eo-icon:not(.disabled):hover{background:var(--search-input-icon-hover)}.search-input-box .input-box .suffix-icon .submit-split{width:1px;height:20px;background:#d1d1d1}.search-input-box .input-box .suffix-icon .submit-btn.active{color:var(--color-brand)}.search-input-box .input-box .suffix-icon .submit-btn.disabled{color:var(--color-disabled-text);cursor:not-allowed}.search-input-box .input-box .toolbar-icon{position:absolute;top:12px;right:14px}.search-input-box .input-box .toolbar-icon eo-icon{font-size:20px;cursor:pointer;padding:6px;border-radius:3px}.search-input-box .input-box .toolbar-icon eo-icon:hover{background:var(--search-input-icon-hover)}.search-input-box .search-input-toolbar{display:flex;justify-content:end;position:absolute;right:12px;bottom:0px}.search-input-box .search-input-toolbar .input-tip{font-size:12px;color:var(--color-secondary-text)}.message-start-tip,\n.session-end-tip{color:var(--color-disabled-text);font-size:12px;text-align:center;margin-top:12px;position:relative}.message-start-tip::after,\n .session-end-tip::after,\n .message-start-tip::before,\n .session-end-tip::before{content:"- - -";color:var(--color-disabled-text);position:absolute}.message-start-tip::before, .session-end-tip::before{margin-left:-35px}.message-start-tip::after, .session-end-tip::after{margin-left:10px}`,""]);const h=d},2896:(e,t,r)=>{var o=r(2591),n=r.n(o),s=r(1740),a=r.n(s),i=r(8128),l=r.n(i),c=r(855),p=r.n(c),d=r(3051),m=r.n(d),u=r(3656),h=r.n(u),w=r(6870),g={};g.styleTagTransform=h(),g.setAttributes=p(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=m(),n()(w.A,g),w.A&&w.A.locals&&w.A.locals},3262:(e,t,r)=>{var o=r(2591),n=r.n(o),s=r(1740),a=r.n(s),i=r(8128),l=r.n(i),c=r(855),p=r.n(c),d=r(3051),m=r.n(d),u=r(3656),h=r.n(u),w=r(5800),g={};g.styleTagTransform=h(),g.setAttributes=p(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=m(),n()(w.A,g),w.A&&w.A.locals&&w.A.locals},3101:(e,t,r)=>{e.exports=r.p+"images/863bc601.gif"},950:(e,t,r)=>{e.exports=r.p+"images/8c6e5bc3.png"},7309:(e,t,r)=>{e.exports=r.p+"images/6c9a569e.png"}}]);
|
|
2
|
-
//# sourceMappingURL=2605.8271284d.js.map
|