@theoremjs/studio 0.3.5-next.891.g7e61048 → 0.3.5-next.895.g31c2fc6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +4 -4
- package/page/assets/{BottomSheet-CleBLYN4.js → BottomSheet-BpIkGVRW.js} +1 -1
- package/page/assets/{ConsoleFrame-B6TyRjSp.js → ConsoleFrame-uCrOuYo8.js} +1 -1
- package/page/assets/{DateInput-6PemFsdh.js → DateInput-BiudCiza.js} +1 -1
- package/page/assets/{MenuBottomSheet-DVr9vPLM.js → MenuBottomSheet-CUyFLank.js} +1 -1
- package/page/assets/{RankedBars-SNL2RrEm.js → RankedBars-DY5cZ8V-.js} +1 -1
- package/page/assets/{SchemaFields-1xLTpwnf.js → SchemaFields-Cw4TkZmX.js} +1 -1
- package/page/assets/{TokenizerBottomSheet-ArhDtY8n.js → TokenizerBottomSheet-RKCZt5VH.js} +1 -1
- package/page/assets/{ToolResultCharts-CKzTLtCk.js → ToolResultCharts-KaIuLQ0F.js} +1 -1
- package/page/assets/{Toolbar-BVANuOCX.js → Toolbar-DmObqshK.js} +1 -1
- package/page/assets/{TraceInspector-DnSUKXsO.js → TraceInspector-L91NMJyj.js} +1 -1
- package/page/assets/{TraceOverview-B1JAcWIv.js → TraceOverview-zrVJHIvI.js} +1 -1
- package/page/assets/{_virtual_studio-type-sources-3JcB4Ygl.js → _virtual_studio-type-sources-B8A1uomP.js} +37 -3
- package/page/assets/browser-engine-CFNClHGj.js +16 -0
- package/page/assets/{browser-transport-BHDlv657.js → browser-transport-D2tzGlr_.js} +2 -2
- package/page/assets/{export-agent-CC9Rl8_F.js → export-agent-Byo1oiZE.js} +1 -1
- package/page/assets/{getRadiusAndStrokeWidthFromDot-pltYU0vu.js → getRadiusAndStrokeWidthFromDot-Vc-KyOHJ.js} +1 -1
- package/page/assets/{guardrail-health-auo9ipP4.js → guardrail-health-CU91Z_5B.js} +1 -1
- package/page/assets/{guardrail-tester-xNAtTqoK.js → guardrail-tester-D5fvQ5SR.js} +1 -1
- package/page/assets/{index-PWdvNvGu.js → index-BJCyi0_F.js} +10 -10
- package/page/assets/index-DoHtpQ_c.css +1 -0
- package/page/assets/{json-code-CFSzlHhK.js → json-code-CkluWrLH.js} +1 -1
- package/page/assets/{prompt-row-BJrXOhMi.css → prompt-row-CANwnRK5.css} +1 -1
- package/page/assets/{prompt-row-BtbHVjLp.js → prompt-row-Di8Q-qWv.js} +2 -2
- package/page/assets/{studio-code-pane-BV22DqOU.js → studio-code-pane-DzoL2OPl.js} +3 -3
- package/page/assets/{studio-console-RV4VH5z3.js → studio-console-C7e6wDDF.js} +1 -1
- package/page/assets/{studio-decision-pralbob2.js → studio-decision-uA-QM8Kn.js} +1 -1
- package/page/assets/{studio-embedding-DoZ77C7b.js → studio-embedding-BsKc3gQi.js} +1 -1
- package/page/assets/{studio-host-console-B9ngFpiy.js → studio-host-console-BnBYLBQY.js} +2 -2
- package/page/assets/{studio-labels-Bd3vyyfK.js → studio-labels-D1IM_dnZ.js} +1 -1
- package/page/assets/{studio-live-DT781AKv.js → studio-live-BTUYBSs5.js} +1 -1
- package/page/assets/{studio-map-BjM_Af8S.js → studio-map-B8M8SxJS.js} +1 -1
- package/page/assets/{studio-trace-replay-Cxpru5c7.js → studio-trace-replay-Cm6dN-pL.js} +1 -1
- package/page/assets/{studio-type-checker-DQeCwDJj.js → studio-type-checker-DGKAqzA7.js} +1 -1
- package/page/assets/{use-one-call-L8J_kkKb.js → use-one-call-nEe7RmPZ.js} +1 -1
- package/page/index.html +4 -4
- package/ui/profile-editor.js +7 -7
- package/ui/prompt-editor.css +46 -4
- package/ui/prompt-editor.js +46 -15
- package/ui/studio.css +36 -3
- package/page/assets/browser-engine-CcoHysvV.js +0 -16
- package/page/assets/index-CkGFbd4l.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{d as r,l as i}from"./themeProps-Bo2jNkIC.js";import{t as a}from"./Icon-C9dlIB4I.js";import{h as o}from"./useTooltip-NPYEayzZ.js";import{t as s}from"./Text-DfN1tSUL.js";import{t as c}from"./Button-Cb-mh6ml.js";import{t as l}from"./CodeBlock-B8SfIXyW.js";import{t as u}from"./Tooltip-BO0yrDVt.js";import{i as d,r as f,t as p}from"./row-keys-0Bn7ZyYy.js";import{C as m,D as h,S as g,Xa as _,k as v,on as y}from"./shaped-data-BlRLB3TY.js";import{n as b}from"./trace-record-C07Cf_EG.js";import{l as x,n as S}from"./labels-provider-Cdg61Tfx.js";import{t as C}from"./useLocale-DtI8SMic.js";import{t as w}from"./HStack-D3i0gAme.js";import{t as T}from"./IconButton-Crxt9XEq.js";import{t as E}from"./VStack-BGVV0uKl.js";import{t as D}from"./Card-BUIbjVIe.js";import{J as O,Q as k,Y as A,an as j,w as M}from"./index-PWdvNvGu.js";var N={agent:{label:`Agent`,doc:`Which agent ran, for which conversation, and how it ended.`},request:{label:`Request`,doc:`What theorem asked the provider for.`},response:{label:`Response`,doc:`What the provider said about its answer.`},messages:{label:`Messages`,doc:`What was read and written, stored by hash.`},usage:{label:`Usage`,doc:`Tokens and cost, as reported or estimated.`},tool:{label:`Tool`,doc:`The tool call, its arguments, and how it settled.`},http:{label:`HTTP`,doc:`One HTTP try: where it went and what came back.`},error:{label:`Error`,doc:`Why it failed.`},record:{label:`Record`,doc:`What this record kept and how it was taken.`},part:{label:`Part`,doc:`Facts about one message part.`},decision:{label:`Decision`,doc:`The state a decision read, the questions it answered, and its answers.`},evaluation:{label:`Evaluation`,doc:`How an eval graded this trace, and by which suite.`}},ee={OK:{label:`OK`,doc:`Finished as intended.`},ERROR:{label:`Error`,doc:`Failed; the error kind says why.`},UNSET:{label:`Stopped`,doc:`Stopped on purpose (cancelled, waiting for approval, paused) or ended with no verdict.`}},te={resource:{label:`Host resource`,doc:`Attributes the host set for its process (observability.resource), e.g. service.name.`},metadata:{label:`Request metadata`,doc:`The metadata the host passed on the request, untouched.`},span:{label:`Span`,doc:`One timed step of the trace.`},type:{label:`Type`,doc:`What the span is: a turn, a model call, a tool call, an HTTP try.`},children:{label:`Spans`,doc:`The spans inside this one, in start order: model calls, tool calls, HTTP tries.`},traceId:{label:`Trace ID`,doc:`Shared by every span of one trace.`},spanId:{label:`Span ID`,doc:`This span's id.`},status:{label:`Status`,doc:`How the span ended.`},start:{label:`Started`,doc:`When the span started.`},duration:{label:`Duration`,doc:`From start to end, on the clock the record names.`},events:{label:`Events`,doc:`What happened during the span, in order.`},links:{label:`Links`,doc:`Earlier traces this span follows.`}};function ne(e,t){let n=Object.entries(t).map(([t,n])=>{let r=e[t];if(!r)throw Error(`${t}: its list does not document it`);return[t,{label:n,doc:r}]});return Object.fromEntries(n)}var re={...ne(_.TURN_STOP_KINDS,{completed:`Completed`,length:`Hit output limit`,tool:`Handed tool to host`,gate:`Waiting for approval`,filtered:`Filtered`,provider_error:`Provider error`,cancelled:`Cancelled`,step_limit:`Ran out of steps`,answer_missing:`No answer`,stream_incomplete:`Stream cut off`,interrupted:`Interrupted`,generation_complete:`Generation complete`}),go_away:{label:`Closed by provider`,doc:`Live: the provider warned the session would end, then closed it.`}},ie=ne(_.ERROR_KINDS,{config:`Setup`,request:`Host request`,conflict:`Conflict`,not_found:`Not found`,input:`User input`,action:`Not allowed`,auth:`Credentials`,rate_limit:`Rate limit`,unsupported:`Unsupported`,busy:`Busy`,unavailable:`Unavailable`,bad_response:`Unusable response`,network:`Network`,timeout:`Timeout`,safety:`Safety`,blocked:`Blocked`,declined:`Declined`,failed:`Failed`,cancelled:`Cancelled`,internal:`Internal`}),ae={...ie,provider_error:re.provider_error,stream_incomplete:re.stream_incomplete,grader_error:{label:`Grader failed`,doc:`The grader threw instead of returning a result.`}},oe={ok:{label:`Succeeded`,doc:`The tool ran and returned a result.`},error:{label:`Failed`,doc:`The tool ran and failed, or could not run.`},denied:{label:`Denied`,doc:`A guardrail, a hook, or the user refused the call.`},gated:{label:`Waiting for approval`,doc:`The call needs confirmation, permission, or sign-in; it has not run.`},paused:{label:`Paused`,doc:`The call was handed back to the host to finish.`},cancelled:{label:`Cancelled`,doc:`The turn was stopped before the call settled.`}},se={local:{label:`Host code`,doc:`TypeScript the host registered, run in-process.`},builtin:{label:`Built-in`,doc:`A tool theorem ships.`},http:{label:`HTTP`,doc:`A remote HTTP endpoint.`},mcp:{label:`MCP`,doc:`A tool on an MCP server.`},delegated:{label:`Another agent`,doc:`A specialist agent the tool ran.`}},ce=ne(_.TOOL_PERMISSION,{auto:`Automatic`,session_consent:`Ask once`,always_confirm:`Always ask`}),le={resume:{label:`Resumes`,doc:`Picks up a call that stopped for approval.`},continue:{label:`Continues`,doc:`Continues an answer that stopped early.`},retry:{label:`Retries`,doc:`Runs a failed turn again.`},trial:{label:`Trial`,doc:`A graded trial of this eval run.`}},ue={code:{label:`Code`,doc:`A deterministic check over the trace.`},model:{label:`Model`,doc:`A judge profile read the transcript.`}},de={all:{label:`Every trial`,doc:`Passes only when every trial passed (pass^k).`},any:{label:`Any trial`,doc:`Passes when at least one trial passed (pass@k).`},at_least:{label:`At least n`,doc:`Passes when at least the stated number of trials passed.`}},fe={budget:{label:`Cost ceiling`,doc:`The summed cost crossed the ceiling the host set.`}},pe={capability:{label:`Capability`,doc:`Can the agent do this at all?`},regression:{label:`Regression`,doc:`Does the agent still do this?`}},me={invoke_agent:{label:`Run agent`,doc:`One turn of an agent, or one Live session.`},chat:{label:`Chat`,doc:`A model call to a chat-completions endpoint.`},generate_content:{label:`Generate content`,doc:`A model call that generates content other than over chat completions: Gemini, speech, or images.`},transcribe:{label:`Transcribe`,doc:`One transcription call: a voice clip in, text out.`},execute_tool:{label:`Run tool`,doc:`A tool call theorem ran.`},decide:{label:`Decide`,doc:`One model decision: typed answers to questions over JSON state.`},embeddings:{label:`Embed`,doc:`One embedding call: a vector for each input.`}},he={text:{label:`Text`,doc:`The model answers in text.`},json:{label:`JSON`,doc:`The model answers with structured JSON.`},image:{label:`Image`,doc:`The model answers with an image.`},speech:{label:`Speech`,doc:`The model answers in audio.`}},ge=Object.fromEntries([v,h,m,g].map(e=>[e.traceName??e.id,{label:e.name,doc:e.description}])),_e={input:{label:`Input`,doc:`Tokens the model read.`},output:{label:`Output`,doc:`Tokens the model wrote.`}},ve={input_transcription:{label:`What the provider heard`,doc:`The provider's transcript of the user's audio.`},output_transcription:{label:`Transcript of the reply`,doc:`The provider's transcript of the model's spoken answer.`}},ye={pre_turn:{label:`Before the turn`,doc:`Before the first model call.`},pre_tool:{label:`Before a tool`,doc:`Before a tool call runs.`},post_tool:{label:`After a tool`,doc:`After a tool call settles.`},before_end:{label:`Before the end`,doc:`Before the turn delivers its final answer.`},post_turn:{label:`After the turn`,doc:`After the turn has ended.`}},be={inject:{label:`Injected`,doc:`Added messages to the conversation.`},abort:{label:`Aborted`,doc:`Stopped the turn.`},deny:{label:`Denied`,doc:`Refused a tool call.`},confirm:{label:`Asked to confirm`,doc:`Required confirmation before a tool call.`},mutate:{label:`Changed`,doc:`Changed the tool call or its result.`},labelFailed:{label:`Labelled failed`,doc:`Showed the tool's failed label for a call that completed.`},waitFor:{label:`Waited`,doc:`Held a tool call until other calls in its step settled.`}},xe={input:{label:`User input`,doc:`Text the user sent.`},history:{label:`History`,doc:`Earlier messages sent back to the model.`},system:{label:`System instructions`,doc:`The profile's or host's instructions.`},attachment:{label:`Attachment`,doc:`A file the user attached.`},tool_call:{label:`Tool call`,doc:`Arguments the model sent to a tool.`},tool_result:{label:`Tool result`,doc:`What a tool returned.`},output_delta:{label:`Streaming output`,doc:`The answer as it streamed.`},output_final:{label:`Final output`,doc:`The whole answer.`},thought:{label:`Thinking`,doc:`The model's thoughts as they streamed.`},network:{label:`Network`,doc:`A URL the agent was about to reach.`},live_inbound:{label:`Live inbound`,doc:`What arrived from a Live session.`},live_outbound:{label:`Live outbound`,doc:`What was sent into a Live session.`},trace:{label:`Trace`,doc:`Text being written to the trace.`}},Se={"detect.ids":{label:`IDs`,doc:`A US SSN, ITIN, or EIN number. The decision names the boundary it was crossing and what was done with it.`},"detect.financial":{label:`Financial`,doc:`An IBAN or card number. The decision names the boundary it was crossing and what was done with it.`},"detect.network":{label:`Network`,doc:`An IPv4 or IPv6 address. The decision names the boundary it was crossing and what was done with it.`},"detect.credentials":{label:`Credentials`,doc:`An API key, token, password assignment, or private key. The decision names the boundary it was crossing and what was done with it.`},"detect.email":{label:`Email`,doc:`An email address. The decision names the boundary it was crossing and what was done with it.`},"detect.phone":{label:`Phone`,doc:`A phone number. The decision names the boundary it was crossing and what was done with it.`},"detect.bank_account":{label:`Bank account`,doc:`An account, routing, or sort-code number after a label that names it. The decision names the boundary it was crossing and what was done with it.`},"detect.injection":{label:`Injection`,doc:`Text that tries to override the agent's instructions, such as "ignore previous instructions". In what a tool returns, also a tool's text that instructed the agent: beside an address it named a tool the model can call, gave an order such as "you must now…", or claimed to speak for the user, the system, or an admin. Each such match says which in its signal. The decision names the boundary it was crossing and what was done with it.`},"detect.canary_leak":{label:`Canary leak`,doc:`The turn's canary, a secret marker planted in the instructions, so the model was repeating them. The decision names the boundary it was crossing and what was done with it.`},"detect.prompt_leak":{label:`Prompt leak`,doc:`12 or more words in a row of the private instructions. The decision names the boundary it was crossing and what was done with it.`},"detect.marker_leak":{label:`Marker leak`,doc:`The markers Theorem fences user data with, or the words of the canary note. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_images":{label:`Ungiven images`,doc:`An image whose address the model was not given, on a host the profile does not allow. Loading it could send data out. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_links":{label:`Ungiven links`,doc:`A link to an address the model was not given, on a host the profile does not allow. The decision names the boundary it was crossing and what was done with it.`},"detect.tool_leak":{label:`Tool leak`,doc:`The name of one of the profile's own tools, or of a tool's parameter written as a quoted key. The decision names the boundary it was crossing and what was done with it.`},"egress.provider-tool-leak":{label:`Instructions sent to a provider tool`,doc:`A provider's built-in tool, such as search, was sent the canary or the instructions. It ran before Theorem saw it, so the data had already left.`},"egress.unscannable":{label:`Reply could not be checked`,doc:`Structured output could not be turned into text to check, so it was treated as unsafe.`},"tool_call.tainted-turn":{label:`Change after remote content`,doc:`A tool that writes or deletes was called after the turn read remote content, which could have steered it.`},"tool_call.steered-turn":{label:`Change after a remote instruction`,doc:`A tool that writes or deletes was called after the turn read remote content that also looked like instructions to the agent.`},"tool_call.remote-destination":{label:`Destination from remote content`,doc:`A tool call's argument carried an address that only a remote tool's result named.`},"network.blocked":{label:`Address blocked`,doc:`A tool tried to reach a private, local, or disallowed address. The request was never made.`}},Ce={input:{label:`Input check`,doc:`Checked what the user sent before the model read it.`},egress:{label:`Output check`,doc:`Checked the whole answer before it was released.`},tool_arguments:{label:`Argument check`,doc:`Checked what the model sent to a tool.`},taint:{label:`Remote-content gate`,doc:`Checked whether a tool that writes or deletes was called after the turn read remote content.`},destination:{label:`Destination check`,doc:`Checked whether the call sends to an address that only a remote tool's result named.`},tool_result:{label:`Result check`,doc:`Checked what a tool returned before the model read it.`},tool_failure:{label:`Error check`,doc:`Checked a tool's error message before the model read it.`},network:{label:`Address check`,doc:`Checked the address a tool was about to reach.`},network_request:{label:`Lookup and redirect check`,doc:`Checked, during a tool's request, where its address resolved and every redirect it followed; includes the lookup when the host resolves names.`},output_stream:{label:`Streaming check`,doc:`Checked the answer piece by piece as it streamed, before the host saw each piece.`},stream_canary:{label:`Streamed leak check`,doc:`Checked each streamed tool call and other non-text output for the system prompt's canary.`},tool_draft:{label:`Tool call preview check`,doc:`Checked a tool call piece by piece as the model wrote it, before the host saw each piece.`},live_input:{label:`Live input check`,doc:`Checked text the host sent into a live session.`},live_output:{label:`Live output check`,doc:`Checked what the model said in a live session, batch by batch, before the host heard it.`}},we={trusted:{label:`Trusted`,doc:`The profile's own text, written at author time.`},assembled:{label:`Assembled`,doc:`Built by the host each turn; may carry user data.`},untrusted:{label:`Untrusted`,doc:`User input, tool results, attachments, or another agent.`}},Te={allow:{label:`Allowed`,doc:`Checked and let through unchanged.`},redact:{label:`Redacted`,doc:`The matched text was replaced.`},flag:{label:`Flagged`,doc:`Recorded; nothing was changed.`},block:{label:`Blocked`,doc:`The step was stopped.`}},Ee={info:{label:`Info`,doc:`Noted only.`},low:{label:`Low`,doc:`Low risk.`},medium:{label:`Medium`,doc:`Medium risk.`},high:{label:`High`,doc:`High risk.`}},De={query:{label:`Query`,doc:`The input is what a search looks for.`},document:{label:`Document`,doc:`The input is what a search looks through.`}},Oe={confirmation:{label:`Confirmation`,doc:`The user must confirm this call.`},permission:{label:`Permission`,doc:`The user must allow this tool.`},auth:{label:`Sign-in`,doc:`The tool needs a credential the user must provide.`},page:{label:`Page`,doc:`The call waits for the page that answers this tool.`}},ke={egress:{label:`Output guardrail`,doc:`The output guardrail sent the answer back to the model.`},validation:{label:`Invalid JSON`,doc:`The structured output did not match its schema.`}},Ae=ne(_.COMPACTION_TIMINGS,{before:`Before the turn`,after:`After the turn`}),je=ne(_.COMPACTION_METERS,{history:`History`,input:`Whole input`}),Me=ne(_.COMPACTION_OUTCOMES,{compacted:`Compacted`,deferred:`Kept whole`,dropped:`Dropped`}),Ne={closing_soon:{label:`Closing soon`,doc:`The provider warned the session will end.`},ended:{label:`Ended`,doc:`The provider ended the session after warning it would.`},waiting_for_input:{label:`Waiting for input`,doc:`The model is waiting for the user.`},working:{label:`Working`,doc:`The model is thinking or waiting on a tool.`},idle:{label:`Idle`,doc:`The model finished everything it was doing.`},voice_activity:{label:`Voice activity`,doc:`The provider heard speech start or stop.`},session_resumption:{label:`Resumption update`,doc:`The provider said whether the session can be resumed.`},setup_complete:{label:`Setup complete`,doc:`The provider accepted the session setup.`},key_fallback:{label:`Switched to fallback key`,doc:`The key was refused for quota at setup; the session reopened on the profile's fallback key.`},closed:{label:`Socket closed`,doc:`The session socket closed.`}},Pe={host:{label:`Host`,doc:`The host closed the session.`},provider:{label:`Provider`,doc:`The provider closed the socket.`},theorem:{label:`theorem`,doc:`theorem closed the socket.`}},Fe={io:{label:`Moves at I/O only`,doc:`Recorded in a Cloudflare Worker, whose clock only moves at I/O: time spent computing reads as zero.`}};function P(e,t,n,r,i){return i?{label:t,doc:r,format:n,group:e,options:i}:{label:t,doc:r,format:n,group:e}}function Ie(e,t,n,r){return{label:t,doc:n,format:`object`,group:e,fields:r}}var Le={input:P(`request`,`Input`,`boolean`,`Transcribe the user's audio.`),output:P(`request`,`Output`,`boolean`,`Transcribe the model's audio.`)},Re={"gen_ai.operation.name":P(`agent`,`Operation`,`text`,`What this span did.`,me),"gen_ai.agent.name":P(`agent`,`Agent`,`id`,`The profile that ran.`),"gen_ai.conversation.id":P(`agent`,`Conversation`,`id`,`The conversation id the host passed; absent when it passed none.`),"gen_ai.conversation.compacted":P(`agent`,`History compacted`,`boolean`,`Compaction summarized earlier messages in this turn.`),"theorem.stop.kind":P(`agent`,`Stop reason`,`text`,`Why it ended. Absent when it failed before any stop.`,re),"theorem.attempts":P(`agent`,`Attempts`,`number`,`Times the turn ran its model calls, counting a retry after a guardrail or invalid JSON.`),"theorem.steps":P(`agent`,`Model calls`,`number`,`Model calls made (Live: responses).`),"theorem.turn.time_to_first_text":P(`agent`,`Time to first visible text`,`seconds`,`From the start of the turn to the first reply text the host received, after every guardrail and held tail.`),"theorem.guardrail.stream_ms":P(`agent`,`Stream guardrail time`,`milliseconds`,"Time every check on this call's streamed output took, together; each check's own time is on its `theorem.guardrail` event."),"theorem.turn.system_lines":P(`agent`,`Prompt lines sent`,`list`,`Which of the profile's prompt lines fit this turn, by number from 1.`),"theorem.step":P(`agent`,`Step`,`number`,`Which model call of the turn this is, from 1.`),"theorem.attempt":P(`agent`,`Attempt`,`number`,`Which attempt of the turn made this call.`),"theorem.request.effort":P(`agent`,`Effort`,`text`,`The effort the host asked for.`),"theorem.request.model_select":P(`agent`,`Model asked for`,`id`,`The model the host asked for, by alias.`),"theorem.project.id":P(`agent`,`Project`,`id`,`The project id the host passed.`),"theorem.link.kind":P(`agent`,`Link`,`text`,`How this span follows an earlier trace.`,le),"gen_ai.provider.name":{...P(`request`,`Provider`,`id`,`Who served the call; a local server by its declared name. Absent when unknown.`,ge),open:!0},"gen_ai.request.model":P(`request`,`Model sent`,`id`,`The model id sent to the provider.`),"theorem.model.id":P(`request`,`Model alias`,`id`,`The profile's name for the model.`),"gen_ai.request.stream":P(`request`,`Streamed`,`boolean`,`The call streamed its answer. Absent means it did not.`),"gen_ai.request.temperature":P(`request`,`Temperature`,`number`,`As requested.`),"gen_ai.request.max_tokens":P(`request`,`Max output tokens`,`tokens`,`As requested.`),"gen_ai.request.reasoning.level":P(`request`,`Thinking level`,`text`,`As requested.`),"gen_ai.output.type":P(`request`,`Output type`,`text`,`What kind of answer was asked for.`,he),"theorem.key_slot":P(`request`,`API key`,`text`,`The vault key slot that finally answered, by the name the profile gave it.`),"theorem.request.builtins":P(`request`,`Provider tools`,`list`,`Tools the provider runs itself (search, maps, code), as requested.`),"theorem.request.store":P(`request`,`Stored by provider`,`boolean`,`Asked the provider to keep the response for a later continuation.`),"theorem.request.summaries":P(`request`,`Thought summaries`,`text`,`Asked for summaries of the model’s thinking.`),"theorem.request.structured":P(`request`,`Structured output`,`object`,`The JSON schema the answer must match.`),"theorem.request.session_id":P(`request`,`Session`,`id`,`The provider session this call ran in.`),"theorem.request.cache":Ie(`request`,`Cache`,`The prompt cache, as requested.`,{mode:P(`request`,`Mode`,`text`,`How the prompt cache is used.`),ttl:P(`request`,`Lifetime`,`text`,`How long a cache entry lives.`)}),"theorem.request.image":Ie(`request`,`Image settings`,`The image asked for.`,{mime_type:P(`request`,`Format`,`text`,`The image file type.`),aspect_ratio:P(`request`,`Aspect ratio`,`text`,`Width to height.`),resolution:P(`request`,`Resolution`,`text`,`How detailed the image is, such as 1K, 2K or 4K.`),include_text:P(`request`,`With text`,`boolean`,`Text may come back beside the image.`)}),"theorem.request.speech":Ie(`request`,`Speech settings`,`The audio asked for.`,{voice:P(`request`,`Voice`,`text`,`The voice.`),speed:P(`request`,`Speed`,`number`,`The speaking rate; 1 is the voice's own pace.`),format:P(`request`,`Format`,`text`,`The audio format.`)}),"theorem.request.live":Ie(`request`,`Live settings`,`The Live session setup, as sent.`,{voice:P(`request`,`Voice`,`text`,`The voice the model speaks in.`),vad:Ie(`request`,`Voice detection`,`How the provider hears speech start and stop.`,{activity_handling:P(`request`,`On speech`,`text`,`What the model does when the user starts speaking.`),start_sensitivity:P(`request`,`Start sensitivity`,`text`,`How readily speech counts as started.`),end_sensitivity:P(`request`,`End sensitivity`,`text`,`How readily speech counts as ended.`),prefix_padding_ms:P(`request`,`Lead-in`,`milliseconds`,`Speech needed before it counts as started.`),silence_duration_ms:P(`request`,`Silence to end`,`milliseconds`,`Silence needed before speech counts as ended.`)}),session_resumption:P(`request`,`Resumable`,`boolean`,`Asked for handles to resume the session later.`),context_compression:Ie(`request`,`Context compression`,`How the provider shrinks a long session.`,{mechanism:P(`request`,`Mechanism`,`text`,`How the context is shrunk.`),trigger_tokens:P(`request`,`Trigger`,`tokens`,`Context size that starts compression.`),target_tokens:P(`request`,`Keep`,`tokens`,`Context size kept after compressing.`)}),transcription:Ie(`request`,`Transcription`,`Which audio the provider transcribes.`,Le),resumed:P(`request`,`Resumed`,`boolean`,`The session resumed an earlier one. The resumption handle is a credential and is never recorded.`)}),"theorem.input.sent_from":P(`request`,`Sent from message`,`number`,`Where in the input messages the request body starts; earlier ones the provider already held.`),"gen_ai.response.id":P(`response`,`Response ID`,`id`,`The provider's id for its answer.`),"gen_ai.response.model":P(`response`,`Model that answered`,`id`,`The model the provider says answered.`),"gen_ai.response.finish_reasons":P(`response`,`Provider finish reason`,`list`,`The provider's own reason for stopping. Absent when the call was stopped.`),"gen_ai.response.status":P(`response`,`Provider status`,`text`,`The provider's own status for the answer. Absent when the call was stopped.`),"gen_ai.response.time_to_first_chunk":P(`response`,`Time to first chunk`,`seconds`,`From the start of the successful HTTP try, or of a Live response, to its first chunk; a buffered body is its one chunk.`),"theorem.response.time_to_first_text":P(`response`,`Time to first text`,`seconds`,`From the start of the call to its first reply text, before guardrails; reasoning and tool calls do not count.`),"gen_ai.system_instructions":P(`messages`,`System instructions`,`parts`,`The instructions the model read.`),"gen_ai.tool.definitions":P(`messages`,`Tool definitions`,`content`,`The tools offered to the model, as sent.`),"gen_ai.input.messages":P(`messages`,`Input`,`messages`,`On a turn: the user's new input. On a model call: everything the model read.`),"gen_ai.output.messages":P(`messages`,`Output`,`messages`,`On a turn: what the host received. On a model call: what the model produced.`),"theorem.output.delivered":P(`messages`,`Delivered`,`messages`,`What the host received of this Live response.`),"theorem.error.public":P(`error`,`Error the user saw`,`content`,`The worded error the caller received.`),"gen_ai.usage.input_tokens":P(`usage`,`Input tokens`,`tokens`,`Tokens the model read.`),"gen_ai.usage.output_tokens":P(`usage`,`Output tokens`,`tokens`,`Tokens the model wrote.`),"gen_ai.usage.reasoning.output_tokens":P(`usage`,`Thinking tokens`,`tokens`,`Output tokens spent thinking.`),"gen_ai.usage.cache_read.input_tokens":P(`usage`,`Cached input tokens`,`tokens`,`Input tokens read from the prompt cache.`),"gen_ai.usage.cache_write.input_tokens":P(`usage`,`Cache write tokens`,`tokens`,`Input tokens written to the prompt cache.`),"theorem.usage.tool_use.input_tokens":P(`usage`,`Tool-use input tokens`,`tokens`,`Input tokens Google counts for tool use; already inside input tokens.`),"theorem.usage.grounding":Ie(`usage`,`Grounding`,`Grounding tool uses, per tool.`,{type:P(`usage`,`Tool`,`id`,`The provider's name for the tool.`),count:P(`usage`,`Uses`,`number`,`Times the tool ran.`),search_query_count:P(`usage`,`Searches`,`number`,`Search queries it ran.`)}),"theorem.usage.cost_usd":P(`usage`,`Cost`,`usd`,`As the provider reported it, or priced from Jev's fixed price for a decision. Absent when no call reported a cost.`),"theorem.usage.upstream_cost_usd":P(`usage`,`Upstream cost`,`usd`,`The upstream provider's cost, as a gateway reported it.`),"theorem.usage.cost_partial":P(`usage`,`Cost is partial`,`boolean`,`Only some calls reported a cost.`),"theorem.usage.estimated":P(`usage`,`Estimated`,`list`,`Sides whose token counts theorem estimated rather than the provider reporting them.`,_e),"theorem.usage.unknown_media":Ie(`usage`,`Uncounted media`,`Media items no counting rule covered, so their tokens are missing from the estimate.`,{input:P(`usage`,`Input`,`number`,`Uncounted media the model read.`),output:P(`usage`,`Output`,`number`,`Uncounted media the model wrote.`)}),"gen_ai.tool.name":P(`tool`,`Tool`,`id`,`The tool called.`),"gen_ai.tool.call.id":P(`tool`,`Call ID`,`id`,`The call's id.`),"gen_ai.tool.type":P(`tool`,`Tool type`,`text`,`function for a registered tool.`),"gen_ai.tool.call.arguments":P(`tool`,`Arguments`,`content`,`The arguments exactly as the model sent them.`),"gen_ai.tool.call.result":P(`tool`,`Result`,`content`,`What the model reads back, after formatting and the tool-result guardrail.`),"theorem.tool.call.result.parts":P(`tool`,`Result media`,`parts`,`Media and other parts the result carried.`),"theorem.tool.data":P(`tool`,`Raw output`,`json`,`The tool's output before formatting.`),"theorem.tool.outcome":P(`tool`,`Outcome`,`text`,`How the call settled.`,oe),"theorem.tool.origin":P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,se),"theorem.tool.permission":P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ce),"theorem.tool.approved":P(`tool`,`Approved`,`boolean`,`The host resumed this call with approval.`),"theorem.tool.failure.code":P(`error`,`Failure code`,`id`,`The tool's code for the failure, e.g. malformed_arguments.`),"theorem.cutout.input.sha256":P(`tool`,`Input hash`,`id`,`The host's hash of what it sent to the cutout.`),"theorem.cutout.output.sha256":P(`tool`,`Output hash`,`id`,`The host's hash of what came back.`),"http.request.method":P(`http`,`Method`,`text`,`The HTTP method.`),"server.address":P(`http`,`Host`,`id`,`The server the try went to.`),"url.path":P(`http`,`Path`,`id`,`The URL path. The query is never recorded.`),"http.response.status_code":P(`http`,`Status code`,`number`,`The HTTP status returned.`),"http.request.resend_count":P(`http`,`Retry number`,`number`,`0 for the first try, then 1, 2, … for each retry.`),"theorem.retry.backoff_ms":P(`http`,`Wait before retry`,`milliseconds`,`How long theorem waited after the previous try.`),"error.type":{...P(`error`,`Error kind`,`text`,`Why it failed: an error kind, the failing stop, or on an HTTP try its status or exception name.`,ae),open:!0},"exception.type":P(`error`,`Exception`,`id`,`The class or kind of what was thrown.`),"exception.message":P(`error`,`Message`,`content`,`The exception message, scrubbed.`),"exception.stacktrace":P(`error`,`Stack`,`content`,`Where it was thrown, scrubbed.`),"theorem.record.include":P(`record`,`Included`,`list`,`What this record kept. A field left out because it was off reads as not recorded, never as did not happen.`),"theorem.record.scrub":P(`record`,`Scrubbed`,`list`,`What was removed from stored text before it was hashed.`),"theorem.clock":P(`record`,`Clock`,`text`,`How the times in this record were taken.`,Fe),"theorem.source":P(`part`,`Source`,`text`,`Where this text came from, when it is not the model’s own.`,ve),"theorem.interim":P(`part`,`Interim`,`boolean`,`An interim transcript, not the final one.`),"theorem.observed_end":P(`part`,`Seen at`,`time`,`When theorem saw this provider-run step whole.`),"theorem.partial":P(`part`,`Incomplete`,`boolean`,`The provider sent this step incomplete.`),"theorem.embedding.inputs":P(`request`,`Inputs`,`number`,`How many inputs the call embedded, one vector each.`),"theorem.embedding.task":P(`request`,`Task`,`text`,`Whether the inputs are queries or documents, as the request said.`,De),"theorem.decision.contract":P(`decision`,`Contract`,`id`,`The host's decision contract the profile names.`),"theorem.decision.state":P(`decision`,`State`,`json`,`The JSON state the decision read.`),"theorem.decision.questions":P(`decision`,`Questions`,`json`,`Each question by id: its kind, instructions, and criteria.`),"theorem.decision.assets":P(`decision`,`Images`,`json`,`Each image by reference: its type and size. The image itself is never recorded.`),"theorem.decision.answers":P(`decision`,`Answers`,`json`,`Each answer by question id: the choice, score, number or box, its confidence, and probabilities.`),"gen_ai.evaluation.name":P(`evaluation`,`Grader`,`id`,`The grader that produced this result.`),"gen_ai.evaluation.score.value":P(`evaluation`,`Score`,`number`,`The score, 0–1 unless the grader says otherwise.`),"gen_ai.evaluation.score.label":P(`evaluation`,`Label`,`text`,`The grader's label for this trial, one of the labels it declares.`),"gen_ai.evaluation.explanation":P(`evaluation`,`Explanation`,`content`,`Why, in the grader's words.`),"theorem.evaluation.source":P(`evaluation`,`Graded by`,`text`,`Who produced this result.`,ue),"theorem.evaluation.suite":P(`evaluation`,`Suite`,`id`,`The eval suite that ran.`),"theorem.evaluation.case":P(`evaluation`,`Case`,`id`,`The case this trial ran. Absent when a production trace was graded without one.`),"theorem.evaluation.trial":P(`evaluation`,`Trial`,`number`,`Which trial of the case this is, from 0.`),"theorem.evaluation.grader.version":P(`evaluation`,`Grader version`,`id`,`The sha256 of the grader's rubric or code identity, so a reader can tell which rubric scored this.`),"theorem.evaluation.passed":P(`evaluation`,`Passed`,`boolean`,`The grader's yes or no. Absent when the result informs but does not decide.`),"theorem.eval.repeat":P(`evaluation`,`Trials per case`,`number`,`How many times each case ran.`),"theorem.eval.pass_rule":P(`evaluation`,`Pass rule`,`text`,`How the trials of a case become its verdict.`,de),"theorem.eval.pass_at_least":P(`evaluation`,`Trials needed`,`number`,`Trials that must pass under the at-least rule.`),"theorem.eval.caseless":P(`evaluation`,`Caseless`,`boolean`,`Production traces were graded with no cases: only graders that need no expectation ran.`),"theorem.eval.stopped":P(`evaluation`,`Stopped early`,`text`,`Why the run stopped before its end.`,fe),"vcs.ref.head.revision":P(`evaluation`,`Commit`,`id`,`The commit under test.`)},ze=/^(?:gen_ai|theorem)\.usage\.([a-z]+)\.(input|output)_tokens$/,Be=/^http\.(request|response)\.header\.(.+)$/;function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function He(e){let t=Re[e];if(t)return t;let n=ze.exec(e);if(n){let[,e=``,t=``]=n;return P(`usage`,`${Ve(e)} ${t} tokens`,`tokens`,`${Ve(t)} tokens that were ${e}, as the provider reported them.`)}let r=Be.exec(e);if(r){let[,e=``,t=``]=r;return P(`http`,`${Ve(e)} header ${t}`,`list`,`The ${e} header, as sent. A key, auth, cookie, secret, or token header is [redacted].`)}}var Ue=Ie(`error`,`Hits`,`Each rule that matched.`,{rule:{...P(`error`,`Rule`,`id`,`The rule that matched: one of Theorem's own, or a host policy's, which names itself.`,Se),open:!0},severity:P(`error`,`Severity`,`text`,`How serious the rule says a match is.`,Ee),signal:P(`error`,`Signal`,`text`,"What made an `injection` match in what a tool returns one, or how a host detector's `find` failed: `find_threw` or `find_result`."),start:P(`error`,`From`,`number`,`Where the match starts in the checked text.`),end:P(`error`,`To`,`number`,`Where the match ends in the checked text.`),match:P(`error`,`Match`,`text`,`The matched text, exact. Kept only when the profile records match previews.`),label:P(`error`,`Rule name`,`text`,`A host rule's own name for what it catches.`),doc:P(`error`,`Why it matters`,`text`,`A host rule's own account of why a match matters.`)}),We={"theorem.stage":{label:`Hook`,doc:`A stage in the turn where host hooks could act.`,attributes:{stage:P(`agent`,`Stage`,`text`,`Where in the turn.`,ye),affordance:P(`agent`,`Applied`,`list`,`What the hooks did; empty when they did nothing.`,be),hook_ms:P(`agent`,`Hook time`,`milliseconds`,`Time the hooks took; absent when none ran.`),warnings:P(`error`,`Warnings`,`list`,`Warning codes the hooks raised.`)}},"theorem.guardrail":{label:`Guardrail`,doc:"A guardrail checked some text: what it did, or `allow` for a timed check that let the text through.",attributes:{check:P(`agent`,`Check`,`id`,`Which timed check ran.`,Ce),duration_ms:P(`agent`,`Check time`,`milliseconds`,`Time the check took; a check on streamed output, its total over the call.`),runs:P(`agent`,`Runs`,`number`,`How many times a check on streamed output ran on the call.`),stage:P(`agent`,`Checked`,`text`,`Which text was checked.`,xe),trust:P(`agent`,`Trust`,`text`,`How far that text is trusted.`,we),action:P(`agent`,`Action`,`text`,`What the guardrail did.`,Te),hits:Ue,provenance:Ie(`agent`,`Came from`,`Where the checked text came from.`,{origin:P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,se),tool:P(`tool`,`Tool`,`id`,`The tool that produced it.`),depth:P(`tool`,`Hops`,`number`,`Tool calls between the user's turn and this text: 1 for a direct call, more through another agent.`)}),error:P(`error`,`Detail`,`content`,`The guardrail's internal reason.`),error_summary:P(`error`,`Failure`,`text`,`Which host detector failed, how, and its error id, in the kernel's words only. The host stream's reason ends with the same id.`)}},"theorem.attempt.retry":{label:`Retry`,doc:`The turn ran its model calls again.`,attributes:{attempt:P(`agent`,`Attempt`,`number`,`The attempt that starts.`),reason:P(`agent`,`Reason`,`text`,`Why it retried.`,ke)}},"theorem.step.resume":{label:`Sent again`,doc:`A model call failed with no reply, and the turn sent it again.`,attributes:{step:P(`agent`,`Step`,`number`,`The step whose model call was sent again.`),resume:P(`agent`,`Re-send`,`number`,`How many calls the turn has sent again so far.`),stop:P(`agent`,`Stop`,`text`,`How the failed call ended.`),error:P(`error`,`Detail`,`content`,`The provider's internal reason.`)}},"theorem.step.media_refused":{label:`Sent without files`,doc:`The provider refused a model call that carried files, and the turn sent it without them.`,attributes:{step:P(`agent`,`Step`,`number`,`The step whose model call was refused.`),files:P(`agent`,`Files`,`number`,`How many files the call went without.`),error:P(`error`,`Detail`,`content`,`The provider's internal reason.`)}},"theorem.compaction":{label:`Compaction`,doc:`theorem decided whether to summarize earlier messages.`,attributes:{timing:P(`agent`,`Timing`,`text`,`When compaction runs.`,Ae),meter:P(`agent`,`Counts`,`text`,`What the threshold counts.`,je),budget:P(`usage`,`Budget`,`tokens`,`The token budget the threshold is a share of.`),threshold:P(`usage`,`Threshold`,`number`,`The share of the budget that triggers it.`),trigger:P(`agent`,`Trigger`,`text`,`custom when the host decides instead.`),tokens_before:P(`usage`,`Tokens counted`,`tokens`,`What the meter read.`),unknown_media:P(`usage`,`Uncounted media`,`number`,`Media items the count could not cover.`),needed:P(`agent`,`Needed`,`boolean`,`The count crossed the threshold.`),outcome:P(`agent`,`Outcome`,`text`,`What happened to the earlier messages.`,Me),messages_before:P(`messages`,`Messages before`,`number`,`History length before.`),messages_after:P(`messages`,`Messages after`,`number`,`History length after.`),dropped_media:P(`messages`,`Media left out`,`number`,`Media the compactor does not take, left out of what it read.`),failure_stop:P(`agent`,`Compactor stop`,`text`,`How the failed compactor stopped.`,re),failure_error:P(`agent`,`Compactor error`,`text`,`The error the compactor failed with.`,ie),failure_reason:P(`agent`,`Compactor reason`,`content`,`Why the compactor failed, in its own words.`),failure_empty:P(`agent`,`Empty summary`,`boolean`,`The compactor replied with nothing.`),failure_unreadable:P(`agent`,`Nothing to read`,`boolean`,`Everything to compact was media the compactor does not take, so it did not run.`),summary:P(`messages`,`Summary`,`content`,`The summary that replaced them.`)}},exception:{label:`Exception`,doc:`Something was thrown, or the provider reported an error.`,attributes:{}},"theorem.upstream.row":{label:`Provider data`,doc:`One row of data from the provider, at the time it arrived.`,attributes:{row:P(`response`,`Row`,`json`,`The row, scrubbed, with media and known text by hash.`)}},"theorem.wire.request":{label:`Request body`,doc:`The body sent to the provider.`,attributes:{body:P(`request`,`Body`,`json`,`The body, scrubbed, with media and known text by hash.`),body_kind:P(`request`,`Body type`,`text`,`What the body was, when it was not JSON.`)}},"theorem.grounding":{label:`Grounding`,doc:`Sources and citations the answer drew on.`,attributes:{provider:P(`response`,`Provider`,`id`,`Who supplied the evidence.`),sources:P(`response`,`Sources`,`json`,`The sources.`),search_html:P(`response`,`Search suggestions`,`content`,`Google's search widget.`),raw:P(`response`,`Raw`,`json`,`The provider's raw grounding payload.`)}},"theorem.gate":{label:`Approval needed`,doc:`The call stopped until the user answers.`,attributes:{kind:P(`tool`,`Needs`,`text`,`What the user must give.`,Oe),permission:P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ce),summary:P(`tool`,`Summary`,`content`,`What the user is asked to approve.`),auth:Ie(`tool`,`Sign-in`,`The credential asked for. The challenge state is a secret and is never recorded.`,{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),type:P(`tool`,`Type`,`text`,`The kind of credential.`),service:P(`tool`,`Service`,`text`,`The service the person signs in to.`),issuer:P(`tool`,`Issuer`,`id`,`Who issues it.`),resource:P(`tool`,`Resource`,`id`,`What it grants access to.`),required_scopes:P(`tool`,`Scopes`,`list`,`The scopes it must carry.`)})}},"theorem.auth.scope_refused":{label:`Access refused`,doc:`The service asked for access outside the scopes the tool declares, so no sign-in was offered.`,attributes:{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),requested:P(`tool`,`Asked for`,`list`,`The scopes the service asked for.`),declared:P(`tool`,`Declared`,`list`,`The scopes the tool declares.`)}},"theorem.tool.warning":{label:`Tool warning`,doc:`Something the tool flagged while it ran; the call went on.`,attributes:{code:P(`tool`,`Code`,`id`,`The warning, by name.`),message:P(`tool`,`Message`,`content`,`What the tool said.`),severity:P(`tool`,`Severity`,`text`,`How serious the tool says it is.`)}},"theorem.tool.cancel":{label:`Tool call cancelled`,doc:`The provider cancelled a tool call it had made.`,attributes:{}},"theorem.session":{label:`Session`,doc:`Something happened to the Live session.`,attributes:{kind:P(`agent`,`What happened`,`text`,`The session fact recorded.`,Ne),time_left_ms:P(`agent`,`Time left`,`milliseconds`,`How long the provider said the session had left.`),closed_after_ms:P(`agent`,`Closed after`,`milliseconds`,`How long after the warning the socket closed.`),cause:P(`agent`,`Cause`,`text`,`go_away when the provider had warned it would close.`),code:P(`http`,`Close code`,`number`,`The WebSocket close code.`),reason:P(`http`,`Close reason`,`text`,`The WebSocket close reason.`),initiator:P(`agent`,`Closed by`,`text`,`Who closed the socket.`,Pe),activity:P(`agent`,`Activity`,`text`,`The provider's voice activity signal.`),audio_offset:P(`agent`,`Audio offset`,`text`,`Where in the audio it was heard.`),resumable:P(`agent`,`Resumable`,`boolean`,`The session can be resumed now.`),handle_issued:P(`agent`,`Handle issued`,`boolean`,`The provider sent a resumption handle. The handle is a credential and is never recorded.`),key_slot:P(`request`,`From key`,`text`,`The key slot refused.`),to_key_slot:P(`request`,`To key`,`text`,`The profile's fallback key slot it reopened on.`),error:P(`error`,`Detail`,`text`,`The provider's refusal.`)}},"gen_ai.evaluation.result":{label:`Eval result`,doc:`One grader's reading of this trace. Its keys are span attributes of the evaluation group.`,attributes:{}},"theorem.eval.verdict":{label:`Verdict`,doc:`One case's pass or fail after its trials, by the suite's pass rule. Every case is here, zeros included.`,attributes:{case:P(`evaluation`,`Case`,`id`,`The case judged.`),kind:P(`evaluation`,`Kind`,`text`,`Anthropic's split of cases.`,pe),difficulty:P(`evaluation`,`Difficulty`,`number`,`The case’s 1–5 difficulty, when the suite set one.`),passed:P(`evaluation`,`Passed`,`boolean`,`The pass rule was met.`),trials:P(`evaluation`,`Trials`,`number`,`Trials run.`),trials_passed:P(`evaluation`,`Passed trials`,`number`,`Trials every deciding grader passed.`),trials_errored:P(`evaluation`,`Errored trials`,`number`,`Trials a grader could not score; they count as failed.`),trials_ungraded:P(`evaluation`,`Ungraded trials`,`number`,`Trials no grader decided.`)}}};function Ge(e){return We[e]}function Ke(e,t){return We[e]?.attributes[t]??He(t)}var qe={turn:{label:`Turn`,doc:`One exchange: the model calls and tool calls it took to answer.`},session:{label:`Live session`,doc:`A Live session, from setup to close.`},call:{label:`Model call`,doc:`One request to a model and its answer.`},response:{label:`Live response`,doc:`One spoken response in a Live session.`},tool:{label:`Tool call`,doc:`One tool call theorem ran, from its hooks to settlement.`},http:{label:`HTTP try`,doc:`One HTTP attempt of a model call.`},cutout:{label:`Cutout`,doc:`A side effect the host recorded after the turn.`},decision:{label:`Decision`,doc:`One typed decision over JSON state.`},evaluation:{label:`Evaluation`,doc:`An eval graded this trace, or a suite ran.`},host:{label:`Host span`,doc:`A step the host recorded itself.`}};function Je(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function Ye(e,t){let n={type:e,...qe[e]};return t?{...n,subject:t}:n}function Xe(e){switch(Je(e,`gen_ai.operation.name`)){case`invoke_agent`:return Ye(e.events.some(e=>e.name===`theorem.session`)?`session`:`turn`,Je(e,`gen_ai.agent.name`));case`chat`:case`generate_content`:case`transcribe`:return Ye(`theorem.request.live`in e.attributes?`response`:`call`,Je(e,`gen_ai.request.model`));case`execute_tool`:return Ye(`tool`,Je(e,`gen_ai.tool.name`));case`decide`:return Ye(`decision`,Je(e,`gen_ai.agent.name`));case`embeddings`:return Ye(`call`,Je(e,`gen_ai.request.model`))}return`http.request.method`in e.attributes?Ye(`http`,Je(e,`url.path`)):e.name===`cutout`?Ye(`cutout`,Je(e,`url.path`)):e.name===`theorem.eval.trial`||e.name===`theorem.eval.run`?Ye(`evaluation`,Je(e,`theorem.evaluation.suite`)):Ye(`host`,e.name)}var F=t(r()),Ze=o();function Qe(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qe(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function I(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qe(e))&&(r&&(r+=` `),r+=t);return r}var $e=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function et(e){return typeof e==`string`&&$e.includes(e)}var tt=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function nt(e){return typeof e==`string`&&tt.has(e)}function rt(e){return typeof e==`string`&&e.startsWith(`data-`)}function it(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(nt(n)||rt(n))&&(t[n]=e[n]);return t}function at(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return it(t)}return typeof e==`object`&&!Array.isArray(e)?it(e):null}function ot(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(nt(n)||rt(n)||et(n))&&(t[n]=e[n]);return t}function st(e){return e==null?null:(0,F.isValidElement)(e)?ot(e.props):typeof e==`object`&&!Array.isArray(e)?ot(e):null}var ct=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(null,arguments)}function ut(e,t){if(e==null)return{};var n,r,i=dt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ft=(0,F.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=ut(e,ct),d=a||{width:r,height:i,x:0,y:0},f=I(`recharts-surface`,o);return F.createElement(`svg`,lt({},ot(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),F.createElement(`title`,null,c),F.createElement(`desc`,null,l),n)}),pt=[`children`,`className`];function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(null,arguments)}function ht(e,t){if(e==null)return{};var n,r,i=gt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _t=F.forwardRef((e,t)=>{var n=e.children,r=e.className,i=ht(e,pt),a=I(`recharts-layer`,r);return F.createElement(`g`,mt({className:a},ot(i),{ref:t}),n)});function vt(e){return e===`__proto__`}var yt=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function bt(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:yt.test(e);default:return!1}}function xt(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function St(e){return typeof e==`symbol`||e instanceof Symbol}function Ct(e){return e==null?``:wt(e)}function wt(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(wt).join(`,`);if(St(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Tt(e){if(Array.isArray(e))return e.map(xt);if(typeof e==`symbol`)return[e];e=Ct(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function Et(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(vt(t))return n;let r=e[t];return r===void 0?bt(t)&&!Object.hasOwn(e,t)?Et(e,Tt(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=xt(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Dt(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),vt(t))return n;let r=e[t];return r===void 0?n:r}}}function Dt(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||vt(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var Ot=4;function kt(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ot),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function At(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+kt(i)+n},``)}var jt=e=>e===0?0:e>0?1:-1,Mt=e=>typeof e==`number`&&e!=+e,Nt=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!Mt(e),Pt=e=>L(e)||typeof e==`string`,Ft=0,It=e=>{var t=++Ft;return`${e||``}${t}`},Lt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!L(e)&&typeof e!=`string`)return n;var i;if(Nt(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Mt(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Rt=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function zt(e,t,n){return L(e)&&L(t)?kt(e+n*(t-e)):t}function Bt(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):Et(e,t))===n)}var R=e=>e==null,Vt=e=>R(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ht(e){return e!=null}function Ut(){}function Wt(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Gt(Object(n),!0).forEach(function(t){qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qt(e,t,n){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=Yt(e,`string`);return typeof t==`symbol`?t:t+``}function Yt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Xt=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Wt(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Kt({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Kt({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Kt({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Kt({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Kt({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Kt({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Kt({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Kt({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||Nt(n.x))&&(L(n.y)||Nt(n.y))?Kt({x:c+Lt(n.x,g),y:l+Lt(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Kt({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Zt=[`top`,`left`,`right`,`bottom`];function Qt(e){return e==null?!1:typeof e==`object`||Zt.includes(e)}var $t=(0,F.createContext)(null);function z(e){return function(){return e}}var en=Math.PI,tn=2*en,nn=1e-6,rn=tn-nn;function an(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function on(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return an;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var sn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?an:on(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>nn){if(!(Math.abs(u*s-c*l)>nn)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((en-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>nn&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>nn||Math.abs(this._y1-l)>nn)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%tn+tn),d>rn?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>nn&&this._append`A${n},${n},0,${+(d>=en)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};sn.prototype;function cn(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new sn(t)}Array.prototype.slice;function ln(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function un(e){this._context=e}un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function dn(e){return new un(e)}function fn(e){return e[0]}function pn(e){return e[1]}function mn(e,t){var n=z(!0),r=null,i=dn,a=null,o=cn(s);e=typeof e==`function`?e:e===void 0?fn:z(e),t=typeof t==`function`?t:t===void 0?pn:z(t);function s(s){var c,l=(s=ln(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:z(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function hn(e,t,n){var r=null,i=z(!0),a=null,o=dn,s=null,c=cn(l);e=typeof e==`function`?e:e===void 0?fn:z(+e),t=typeof t==`function`?t:z(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?pn:z(+n);function l(l){var u,d,f,p=(l=ln(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return mn().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:z(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:z(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:z(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var gn=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function _n(e){return new gn(e,!0)}function vn(e){return new gn(e,!1)}function yn(){}function bn(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xn(e){this._context=e}xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sn(e){return new xn(e)}function Cn(e){this._context=e}Cn.prototype={areaStart:yn,areaEnd:yn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wn(e){return new Cn(e)}function Tn(e){this._context=e}Tn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:bn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function En(e){return new Tn(e)}function Dn(e){this._context=e}Dn.prototype={areaStart:yn,areaEnd:yn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function On(e){return new Dn(e)}function kn(e){return e<0?-1:1}function An(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(kn(a)+kn(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function jn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mn(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Nn(e){this._context=e}Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mn(this,this._t0,jn(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Mn(this,jn(this,n=An(this,e,t)),n);break;default:Mn(this,this._t0,n=An(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pn(e){this._context=new Fn(e)}(Pn.prototype=Object.create(Nn.prototype)).point=function(e,t){Nn.prototype.point.call(this,t,e)};function Fn(e){this._context=e}Fn.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function In(e){return new Nn(e)}function Ln(e){return new Pn(e)}function Rn(e){this._context=e}Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=zn(e),i=zn(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function zn(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Bn(e){return new Rn(e)}function Vn(e,t){this._context=e,this._t=t}Vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Hn(e){return new Vn(e,.5)}function Un(e){return new Vn(e,0)}function Wn(e){return new Vn(e,1)}function Gn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Kn(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function qn(e,t){return e[t]}function Jn(e){let t=[];return t.key=e,t}function Yn(){var e=z([]),t=Kn,n=Gn,r=qn;function i(i){var a=Array.from(e.apply(this,arguments),Jn),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=ln(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:z(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:z(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Kn:typeof e==`function`?e:z(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Gn,i):n},i}function Xn(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Gn(e,t)}}function Zn(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Gn(e,t)}}function Qn(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Gn(e,t)}}var $n=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,er=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,F.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{et(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},tr=(e,t,n)=>r=>(e(t,n,r),null),nr=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];et(i)&&typeof a==`function`&&(r||={},r[i]=tr(a,t,n))}),r};function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rr(Object(n),!0).forEach(function(t){ar(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ar(e,t,n){return(t=or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e){var t=sr(e,`string`);return typeof t==`symbol`?t:t+``}function sr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cr(e,t){var n=ir({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function lr(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ur(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function dr(e){return e}function fr(e){return Number.isSafeInteger(e)&&e>=0}function pr(e){return e!=null&&typeof e!=`function`&&fr(e.length)}function mr(e){return function(t){return Et(t,e)}}function hr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function gr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _r(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function vr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var yr=`[object RegExp]`,br=`[object String]`,xr=`[object Number]`,Sr=`[object Boolean]`,Cr=`[object Arguments]`,wr=`[object Symbol]`,Tr=`[object Date]`,Er=`[object Map]`,Dr=`[object Set]`,Or=`[object Array]`,kr=`[object Function]`,Ar=`[object ArrayBuffer]`,jr=`[object Object]`,Mr=`[object Error]`,Nr=`[object DataView]`,Pr=`[object Uint8Array]`,Fr=`[object Uint8ClampedArray]`,Ir=`[object Uint16Array]`,Lr=`[object Uint32Array]`,Rr=`[object BigUint64Array]`,zr=`[object Int8Array]`,Br=`[object Int16Array]`,Vr=`[object Int32Array]`,Hr=`[object BigInt64Array]`,Ur=`[object Float32Array]`,Wr=`[object Float64Array]`,Gr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Kr(e){return Gr.Buffer!==void 0&&Gr.Buffer.isBuffer(e)}function qr(e,t){return Jr(e,void 0,e,new Map,t)}function Jr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(hr(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Jr(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Jr(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Jr(a,void 0,n,r,i));return t}if(Kr(e))return e.subarray();if(gr(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Jr(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Yr(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Yr(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Yr(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Yr(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Yr(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Yr(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Yr(t,e,n,r,i),t}if(typeof e==`object`&&Xr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Yr(t,e,n,r,i),t}return e}function Yr(e,t,n=e,r,i){let a=[...Object.keys(t),..._r(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Jr(t[s],s,n,r,i))}}function Xr(e){switch(vr(e)){case Cr:case Or:case Ar:case Nr:case Sr:case Tr:case Ur:case Wr:case zr:case Br:case Vr:case Er:case xr:case jr:case yr:case Dr:case br:case wr:case Pr:case Fr:case Ir:case Lr:return!0;default:return!1}}function Zr(e){return Jr(e,void 0,e,new Map,void 0)}function Qr(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function $r(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ei(e,t,n){return typeof n==`function`?ti(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?ti(t,r,e,s,!1):!!c},new Map,!0):ei(e,t,()=>void 0)}function ti(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ni(e,t,n,r,i);case`function`:return Object.keys(t).length>0?ti(e,{...t},n,r,i):Qr(e,t);default:return $r(e)&&i?typeof t!=`string`||t===``:Qr(e,t)}}function ni(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return ii(e,t,n,r);if(t instanceof Map)return ri(e,t,n,r);if(t instanceof Set)return ai(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)hr(e)&&(e=Object(e));else{let t=vr(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function ri(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function ii(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function ai(e,t,n,r){return t.size===0||e instanceof Set&&ii([...e],[...t],n,r)}function oi(e,t){return ei(e,t,()=>void 0)}function si(e){return e=Zr(e),t=>oi(t,e)}function ci(e,t){return qr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(vr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Yr(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case xr:case br:case Sr:{let t=new e.constructor(e?.valueOf());return Yr(t,e),t}case Cr:{let t={};return Yr(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function li(e){return ci(e)}var ui=/^(?:0|[1-9]\d*)$/;function di(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ui.test(e)}}function fi(e){return typeof e==`object`&&!!e&&vr(e)===`[object Arguments]`}function pi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&bt(t)&&!(t in Object(e))?Tt(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=xt(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||fi(r))&&di(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function mi(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=xt(e)}return t=li(t),function(n){let r=Et(n,e);return r===void 0?pi(n,e):t===void 0?r===void 0:oi(r,t)}}function hi(e){if(e==null)return dr;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?mi(e[0],e[1]):si(e);default:return mr(e)}}function gi(e){return e===0?0:e}function _i(e,t=dr){return pr(e)?lr(Array.from(e),ur(hi(t),1)).map(gi):[]}function vi(e,t,n){return t===!0?_i(e,n):typeof t==`function`?_i(e,t):e}var yi=n((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),bi=n(((e,t)=>{t.exports=yi()})),xi=n((e=>{var t=r(),n=bi();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Si=n(((e,t)=>{t.exports=xi()}))(),Ci=(0,F.createContext)(null),wi=e=>e,B=()=>{var e=(0,F.useContext)(Ci);return e?e.store.dispatch:wi},Ti=()=>{},Ei=()=>Ti,Di=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(Ci),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:Ti,[t,e]);return(0,Si.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Ei,t?t.store.getState:Ti,t?t.store.getState:Ti,n,Di)}function Oi(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function ki(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var Ai=e=>Array.isArray(e)?e:[e];function ji(e){let t=Array.isArray(e[0])?e[0]:e;return ki(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Mi(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Ni=class{constructor(e){this.value=e}deref(){return this.value}},Pi=typeof WeakRef>`u`?Ni:WeakRef,Fi=0,Ii=1;function Li(){return{s:Fi,v:void 0,o:null,p:null}}function Ri(e){return e instanceof Pi?e.deref():e}function zi(e,t={}){let n=Li(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Li(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Li(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Ii)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Ri(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Pi(c):c}return s.s=Ii,s.v=c,c}return o.clearCache=()=>{n=Li(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Bi(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Oi(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=zi,argsMemoizeOptions:u=[]}={...n,...a},d=Ai(c),f=Ai(u),p=ji(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Mi(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var H=Bi(zi);function Vi(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Hi(e,t,n){return $r(n)&&(typeof t==`number`&&pr(n)&&di(t)&&t<n.length||typeof t==`string`&&t in n)?Qr(n[t],e):!1}function Ui(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Wi=(e,t,n)=>{if(e!==t){let r=Ui(e),i=Ui(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Gi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ki=/^\w*$/;function qi(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||St(e)?!0:typeof e==`string`&&(Ki.test(e)||!Gi.test(e))||t!=null&&Object.hasOwn(t,e)}function Ji(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=pr(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||qi(e)?e:{key:e,path:Tt(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Wi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Yi(e,...t){let n=t.length;return n>1&&Hi(e,t[0],t[1])?t=[]:n>2&&Hi(t[0],t[1],t[2])&&(t=[t[0]]),Ji(e,Vi(t),[`asc`])}var Xi=e=>e.legend.settings,Zi=e=>e.legend.size;H([e=>e.legend.payload,Xi],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Yi(r,n):r});function Qi(e,t){return ra(e)||na(e,t)||ea(e,t)||$i()}function $i(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{d as r,l as i}from"./themeProps-Bo2jNkIC.js";import{t as a}from"./Icon-C9dlIB4I.js";import{h as o}from"./useTooltip-NPYEayzZ.js";import{t as s}from"./Text-DfN1tSUL.js";import{t as c}from"./Button-Cb-mh6ml.js";import{t as l}from"./CodeBlock-B8SfIXyW.js";import{t as u}from"./Tooltip-BO0yrDVt.js";import{i as d,r as f,t as p}from"./row-keys-0Bn7ZyYy.js";import{C as m,D as h,S as g,Xa as _,k as v,on as y}from"./shaped-data-BlRLB3TY.js";import{n as b}from"./trace-record-C07Cf_EG.js";import{l as x,n as S}from"./labels-provider-Cdg61Tfx.js";import{t as C}from"./useLocale-DtI8SMic.js";import{t as w}from"./HStack-D3i0gAme.js";import{t as T}from"./IconButton-Crxt9XEq.js";import{t as E}from"./VStack-BGVV0uKl.js";import{t as D}from"./Card-BUIbjVIe.js";import{J as O,Q as k,Y as A,an as j,w as M}from"./index-BJCyi0_F.js";var N={agent:{label:`Agent`,doc:`Which agent ran, for which conversation, and how it ended.`},request:{label:`Request`,doc:`What theorem asked the provider for.`},response:{label:`Response`,doc:`What the provider said about its answer.`},messages:{label:`Messages`,doc:`What was read and written, stored by hash.`},usage:{label:`Usage`,doc:`Tokens and cost, as reported or estimated.`},tool:{label:`Tool`,doc:`The tool call, its arguments, and how it settled.`},http:{label:`HTTP`,doc:`One HTTP try: where it went and what came back.`},error:{label:`Error`,doc:`Why it failed.`},record:{label:`Record`,doc:`What this record kept and how it was taken.`},part:{label:`Part`,doc:`Facts about one message part.`},decision:{label:`Decision`,doc:`The state a decision read, the questions it answered, and its answers.`},evaluation:{label:`Evaluation`,doc:`How an eval graded this trace, and by which suite.`}},ee={OK:{label:`OK`,doc:`Finished as intended.`},ERROR:{label:`Error`,doc:`Failed; the error kind says why.`},UNSET:{label:`Stopped`,doc:`Stopped on purpose (cancelled, waiting for approval, paused) or ended with no verdict.`}},te={resource:{label:`Host resource`,doc:`Attributes the host set for its process (observability.resource), e.g. service.name.`},metadata:{label:`Request metadata`,doc:`The metadata the host passed on the request, untouched.`},span:{label:`Span`,doc:`One timed step of the trace.`},type:{label:`Type`,doc:`What the span is: a turn, a model call, a tool call, an HTTP try.`},children:{label:`Spans`,doc:`The spans inside this one, in start order: model calls, tool calls, HTTP tries.`},traceId:{label:`Trace ID`,doc:`Shared by every span of one trace.`},spanId:{label:`Span ID`,doc:`This span's id.`},status:{label:`Status`,doc:`How the span ended.`},start:{label:`Started`,doc:`When the span started.`},duration:{label:`Duration`,doc:`From start to end, on the clock the record names.`},events:{label:`Events`,doc:`What happened during the span, in order.`},links:{label:`Links`,doc:`Earlier traces this span follows.`}};function ne(e,t){let n=Object.entries(t).map(([t,n])=>{let r=e[t];if(!r)throw Error(`${t}: its list does not document it`);return[t,{label:n,doc:r}]});return Object.fromEntries(n)}var re={...ne(_.TURN_STOP_KINDS,{completed:`Completed`,length:`Hit output limit`,tool:`Handed tool to host`,gate:`Waiting for approval`,filtered:`Filtered`,provider_error:`Provider error`,cancelled:`Cancelled`,step_limit:`Ran out of steps`,answer_missing:`No answer`,stream_incomplete:`Stream cut off`,interrupted:`Interrupted`,generation_complete:`Generation complete`}),go_away:{label:`Closed by provider`,doc:`Live: the provider warned the session would end, then closed it.`}},ie=ne(_.ERROR_KINDS,{config:`Setup`,request:`Host request`,conflict:`Conflict`,not_found:`Not found`,input:`User input`,action:`Not allowed`,auth:`Credentials`,rate_limit:`Rate limit`,unsupported:`Unsupported`,busy:`Busy`,unavailable:`Unavailable`,bad_response:`Unusable response`,network:`Network`,timeout:`Timeout`,safety:`Safety`,blocked:`Blocked`,declined:`Declined`,failed:`Failed`,cancelled:`Cancelled`,internal:`Internal`}),ae={...ie,provider_error:re.provider_error,stream_incomplete:re.stream_incomplete,grader_error:{label:`Grader failed`,doc:`The grader threw instead of returning a result.`}},oe={ok:{label:`Succeeded`,doc:`The tool ran and returned a result.`},error:{label:`Failed`,doc:`The tool ran and failed, or could not run.`},denied:{label:`Denied`,doc:`A guardrail, a hook, or the user refused the call.`},gated:{label:`Waiting for approval`,doc:`The call needs confirmation, permission, or sign-in; it has not run.`},paused:{label:`Paused`,doc:`The call was handed back to the host to finish.`},cancelled:{label:`Cancelled`,doc:`The turn was stopped before the call settled.`}},se={local:{label:`Host code`,doc:`TypeScript the host registered, run in-process.`},builtin:{label:`Built-in`,doc:`A tool theorem ships.`},http:{label:`HTTP`,doc:`A remote HTTP endpoint.`},mcp:{label:`MCP`,doc:`A tool on an MCP server.`},delegated:{label:`Another agent`,doc:`A specialist agent the tool ran.`}},ce=ne(_.TOOL_PERMISSION,{auto:`Automatic`,session_consent:`Ask once`,always_confirm:`Always ask`}),le={resume:{label:`Resumes`,doc:`Picks up a call that stopped for approval.`},continue:{label:`Continues`,doc:`Continues an answer that stopped early.`},retry:{label:`Retries`,doc:`Runs a failed turn again.`},trial:{label:`Trial`,doc:`A graded trial of this eval run.`}},ue={code:{label:`Code`,doc:`A deterministic check over the trace.`},model:{label:`Model`,doc:`A judge profile read the transcript.`}},de={all:{label:`Every trial`,doc:`Passes only when every trial passed (pass^k).`},any:{label:`Any trial`,doc:`Passes when at least one trial passed (pass@k).`},at_least:{label:`At least n`,doc:`Passes when at least the stated number of trials passed.`}},fe={budget:{label:`Cost ceiling`,doc:`The summed cost crossed the ceiling the host set.`}},pe={capability:{label:`Capability`,doc:`Can the agent do this at all?`},regression:{label:`Regression`,doc:`Does the agent still do this?`}},me={invoke_agent:{label:`Run agent`,doc:`One turn of an agent, or one Live session.`},chat:{label:`Chat`,doc:`A model call to a chat-completions endpoint.`},generate_content:{label:`Generate content`,doc:`A model call that generates content other than over chat completions: Gemini, speech, or images.`},transcribe:{label:`Transcribe`,doc:`One transcription call: a voice clip in, text out.`},execute_tool:{label:`Run tool`,doc:`A tool call theorem ran.`},decide:{label:`Decide`,doc:`One model decision: typed answers to questions over JSON state.`},embeddings:{label:`Embed`,doc:`One embedding call: a vector for each input.`}},he={text:{label:`Text`,doc:`The model answers in text.`},json:{label:`JSON`,doc:`The model answers with structured JSON.`},image:{label:`Image`,doc:`The model answers with an image.`},speech:{label:`Speech`,doc:`The model answers in audio.`}},ge=Object.fromEntries([v,h,m,g].map(e=>[e.traceName??e.id,{label:e.name,doc:e.description}])),_e={input:{label:`Input`,doc:`Tokens the model read.`},output:{label:`Output`,doc:`Tokens the model wrote.`}},ve={input_transcription:{label:`What the provider heard`,doc:`The provider's transcript of the user's audio.`},output_transcription:{label:`Transcript of the reply`,doc:`The provider's transcript of the model's spoken answer.`}},ye={pre_turn:{label:`Before the turn`,doc:`Before the first model call.`},pre_tool:{label:`Before a tool`,doc:`Before a tool call runs.`},post_tool:{label:`After a tool`,doc:`After a tool call settles.`},before_end:{label:`Before the end`,doc:`Before the turn delivers its final answer.`},post_turn:{label:`After the turn`,doc:`After the turn has ended.`}},be={inject:{label:`Injected`,doc:`Added messages to the conversation.`},abort:{label:`Aborted`,doc:`Stopped the turn.`},deny:{label:`Denied`,doc:`Refused a tool call.`},confirm:{label:`Asked to confirm`,doc:`Required confirmation before a tool call.`},mutate:{label:`Changed`,doc:`Changed the tool call or its result.`},labelFailed:{label:`Labelled failed`,doc:`Showed the tool's failed label for a call that completed.`},waitFor:{label:`Waited`,doc:`Held a tool call until other calls in its step settled.`}},xe={input:{label:`User input`,doc:`Text the user sent.`},history:{label:`History`,doc:`Earlier messages sent back to the model.`},system:{label:`System instructions`,doc:`The profile's or host's instructions.`},attachment:{label:`Attachment`,doc:`A file the user attached.`},tool_call:{label:`Tool call`,doc:`Arguments the model sent to a tool.`},tool_result:{label:`Tool result`,doc:`What a tool returned.`},output_delta:{label:`Streaming output`,doc:`The answer as it streamed.`},output_final:{label:`Final output`,doc:`The whole answer.`},thought:{label:`Thinking`,doc:`The model's thoughts as they streamed.`},network:{label:`Network`,doc:`A URL the agent was about to reach.`},live_inbound:{label:`Live inbound`,doc:`What arrived from a Live session.`},live_outbound:{label:`Live outbound`,doc:`What was sent into a Live session.`},trace:{label:`Trace`,doc:`Text being written to the trace.`}},Se={"detect.ids":{label:`IDs`,doc:`A US SSN, ITIN, or EIN number. The decision names the boundary it was crossing and what was done with it.`},"detect.financial":{label:`Financial`,doc:`An IBAN or card number. The decision names the boundary it was crossing and what was done with it.`},"detect.network":{label:`Network`,doc:`An IPv4 or IPv6 address. The decision names the boundary it was crossing and what was done with it.`},"detect.credentials":{label:`Credentials`,doc:`An API key, token, password assignment, or private key. The decision names the boundary it was crossing and what was done with it.`},"detect.email":{label:`Email`,doc:`An email address. The decision names the boundary it was crossing and what was done with it.`},"detect.phone":{label:`Phone`,doc:`A phone number. The decision names the boundary it was crossing and what was done with it.`},"detect.bank_account":{label:`Bank account`,doc:`An account, routing, or sort-code number after a label that names it. The decision names the boundary it was crossing and what was done with it.`},"detect.injection":{label:`Injection`,doc:`Text that tries to override the agent's instructions, such as "ignore previous instructions". In what a tool returns, also a tool's text that instructed the agent: beside an address it named a tool the model can call, gave an order such as "you must now…", or claimed to speak for the user, the system, or an admin. Each such match says which in its signal. The decision names the boundary it was crossing and what was done with it.`},"detect.canary_leak":{label:`Canary leak`,doc:`The turn's canary, a secret marker planted in the instructions, so the model was repeating them. The decision names the boundary it was crossing and what was done with it.`},"detect.prompt_leak":{label:`Prompt leak`,doc:`12 or more words in a row of the private instructions. The decision names the boundary it was crossing and what was done with it.`},"detect.marker_leak":{label:`Marker leak`,doc:`The markers Theorem fences user data with, or the words of the canary note. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_images":{label:`Ungiven images`,doc:`An image whose address the model was not given, on a host the profile does not allow. Loading it could send data out. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_links":{label:`Ungiven links`,doc:`A link to an address the model was not given, on a host the profile does not allow. The decision names the boundary it was crossing and what was done with it.`},"detect.tool_leak":{label:`Tool leak`,doc:`The name of one of the profile's own tools, or of a tool's parameter written as a quoted key. The decision names the boundary it was crossing and what was done with it.`},"egress.provider-tool-leak":{label:`Instructions sent to a provider tool`,doc:`A provider's built-in tool, such as search, was sent the canary or the instructions. It ran before Theorem saw it, so the data had already left.`},"egress.unscannable":{label:`Reply could not be checked`,doc:`Structured output could not be turned into text to check, so it was treated as unsafe.`},"tool_call.tainted-turn":{label:`Change after remote content`,doc:`A tool that writes or deletes was called after the turn read remote content, which could have steered it.`},"tool_call.steered-turn":{label:`Change after a remote instruction`,doc:`A tool that writes or deletes was called after the turn read remote content that also looked like instructions to the agent.`},"tool_call.remote-destination":{label:`Destination from remote content`,doc:`A tool call's argument carried an address that only a remote tool's result named.`},"network.blocked":{label:`Address blocked`,doc:`A tool tried to reach a private, local, or disallowed address. The request was never made.`}},Ce={input:{label:`Input check`,doc:`Checked what the user sent before the model read it.`},egress:{label:`Output check`,doc:`Checked the whole answer before it was released.`},tool_arguments:{label:`Argument check`,doc:`Checked what the model sent to a tool.`},taint:{label:`Remote-content gate`,doc:`Checked whether a tool that writes or deletes was called after the turn read remote content.`},destination:{label:`Destination check`,doc:`Checked whether the call sends to an address that only a remote tool's result named.`},tool_result:{label:`Result check`,doc:`Checked what a tool returned before the model read it.`},tool_failure:{label:`Error check`,doc:`Checked a tool's error message before the model read it.`},network:{label:`Address check`,doc:`Checked the address a tool was about to reach.`},network_request:{label:`Lookup and redirect check`,doc:`Checked, during a tool's request, where its address resolved and every redirect it followed; includes the lookup when the host resolves names.`},output_stream:{label:`Streaming check`,doc:`Checked the answer piece by piece as it streamed, before the host saw each piece.`},stream_canary:{label:`Streamed leak check`,doc:`Checked each streamed tool call and other non-text output for the system prompt's canary.`},tool_draft:{label:`Tool call preview check`,doc:`Checked a tool call piece by piece as the model wrote it, before the host saw each piece.`},live_input:{label:`Live input check`,doc:`Checked text the host sent into a live session.`},live_output:{label:`Live output check`,doc:`Checked what the model said in a live session, batch by batch, before the host heard it.`}},we={trusted:{label:`Trusted`,doc:`The profile's own text, written at author time.`},assembled:{label:`Assembled`,doc:`Built by the host each turn; may carry user data.`},untrusted:{label:`Untrusted`,doc:`User input, tool results, attachments, or another agent.`}},Te={allow:{label:`Allowed`,doc:`Checked and let through unchanged.`},redact:{label:`Redacted`,doc:`The matched text was replaced.`},flag:{label:`Flagged`,doc:`Recorded; nothing was changed.`},block:{label:`Blocked`,doc:`The step was stopped.`}},Ee={info:{label:`Info`,doc:`Noted only.`},low:{label:`Low`,doc:`Low risk.`},medium:{label:`Medium`,doc:`Medium risk.`},high:{label:`High`,doc:`High risk.`}},De={query:{label:`Query`,doc:`The input is what a search looks for.`},document:{label:`Document`,doc:`The input is what a search looks through.`}},Oe={confirmation:{label:`Confirmation`,doc:`The user must confirm this call.`},permission:{label:`Permission`,doc:`The user must allow this tool.`},auth:{label:`Sign-in`,doc:`The tool needs a credential the user must provide.`},page:{label:`Page`,doc:`The call waits for the page that answers this tool.`}},ke={egress:{label:`Output guardrail`,doc:`The output guardrail sent the answer back to the model.`},validation:{label:`Invalid JSON`,doc:`The structured output did not match its schema.`}},Ae=ne(_.COMPACTION_TIMINGS,{before:`Before the turn`,after:`After the turn`}),je=ne(_.COMPACTION_METERS,{history:`History`,input:`Whole input`}),Me=ne(_.COMPACTION_OUTCOMES,{compacted:`Compacted`,deferred:`Kept whole`,dropped:`Dropped`}),Ne={closing_soon:{label:`Closing soon`,doc:`The provider warned the session will end.`},ended:{label:`Ended`,doc:`The provider ended the session after warning it would.`},waiting_for_input:{label:`Waiting for input`,doc:`The model is waiting for the user.`},working:{label:`Working`,doc:`The model is thinking or waiting on a tool.`},idle:{label:`Idle`,doc:`The model finished everything it was doing.`},voice_activity:{label:`Voice activity`,doc:`The provider heard speech start or stop.`},session_resumption:{label:`Resumption update`,doc:`The provider said whether the session can be resumed.`},setup_complete:{label:`Setup complete`,doc:`The provider accepted the session setup.`},key_fallback:{label:`Switched to fallback key`,doc:`The key was refused for quota at setup; the session reopened on the profile's fallback key.`},closed:{label:`Socket closed`,doc:`The session socket closed.`}},Pe={host:{label:`Host`,doc:`The host closed the session.`},provider:{label:`Provider`,doc:`The provider closed the socket.`},theorem:{label:`theorem`,doc:`theorem closed the socket.`}},Fe={io:{label:`Moves at I/O only`,doc:`Recorded in a Cloudflare Worker, whose clock only moves at I/O: time spent computing reads as zero.`}};function P(e,t,n,r,i){return i?{label:t,doc:r,format:n,group:e,options:i}:{label:t,doc:r,format:n,group:e}}function Ie(e,t,n,r){return{label:t,doc:n,format:`object`,group:e,fields:r}}var Le={input:P(`request`,`Input`,`boolean`,`Transcribe the user's audio.`),output:P(`request`,`Output`,`boolean`,`Transcribe the model's audio.`)},Re={"gen_ai.operation.name":P(`agent`,`Operation`,`text`,`What this span did.`,me),"gen_ai.agent.name":P(`agent`,`Agent`,`id`,`The profile that ran.`),"gen_ai.conversation.id":P(`agent`,`Conversation`,`id`,`The conversation id the host passed; absent when it passed none.`),"gen_ai.conversation.compacted":P(`agent`,`History compacted`,`boolean`,`Compaction summarized earlier messages in this turn.`),"theorem.stop.kind":P(`agent`,`Stop reason`,`text`,`Why it ended. Absent when it failed before any stop.`,re),"theorem.attempts":P(`agent`,`Attempts`,`number`,`Times the turn ran its model calls, counting a retry after a guardrail or invalid JSON.`),"theorem.steps":P(`agent`,`Model calls`,`number`,`Model calls made (Live: responses).`),"theorem.turn.time_to_first_text":P(`agent`,`Time to first visible text`,`seconds`,`From the start of the turn to the first reply text the host received, after every guardrail and held tail.`),"theorem.guardrail.stream_ms":P(`agent`,`Stream guardrail time`,`milliseconds`,"Time every check on this call's streamed output took, together; each check's own time is on its `theorem.guardrail` event."),"theorem.turn.system_lines":P(`agent`,`Prompt lines sent`,`list`,`Which of the profile's prompt lines fit this turn, by number from 1.`),"theorem.step":P(`agent`,`Step`,`number`,`Which model call of the turn this is, from 1.`),"theorem.attempt":P(`agent`,`Attempt`,`number`,`Which attempt of the turn made this call.`),"theorem.request.effort":P(`agent`,`Effort`,`text`,`The effort the host asked for.`),"theorem.request.model_select":P(`agent`,`Model asked for`,`id`,`The model the host asked for, by alias.`),"theorem.project.id":P(`agent`,`Project`,`id`,`The project id the host passed.`),"theorem.link.kind":P(`agent`,`Link`,`text`,`How this span follows an earlier trace.`,le),"gen_ai.provider.name":{...P(`request`,`Provider`,`id`,`Who served the call; a local server by its declared name. Absent when unknown.`,ge),open:!0},"gen_ai.request.model":P(`request`,`Model sent`,`id`,`The model id sent to the provider.`),"theorem.model.id":P(`request`,`Model alias`,`id`,`The profile's name for the model.`),"gen_ai.request.stream":P(`request`,`Streamed`,`boolean`,`The call streamed its answer. Absent means it did not.`),"gen_ai.request.temperature":P(`request`,`Temperature`,`number`,`As requested.`),"gen_ai.request.max_tokens":P(`request`,`Max output tokens`,`tokens`,`As requested.`),"gen_ai.request.reasoning.level":P(`request`,`Thinking level`,`text`,`As requested.`),"gen_ai.output.type":P(`request`,`Output type`,`text`,`What kind of answer was asked for.`,he),"theorem.key_slot":P(`request`,`API key`,`text`,`The vault key slot that finally answered, by the name the profile gave it.`),"theorem.request.builtins":P(`request`,`Provider tools`,`list`,`Tools the provider runs itself (search, maps, code), as requested.`),"theorem.request.store":P(`request`,`Stored by provider`,`boolean`,`Asked the provider to keep the response for a later continuation.`),"theorem.request.summaries":P(`request`,`Thought summaries`,`text`,`Asked for summaries of the model’s thinking.`),"theorem.request.structured":P(`request`,`Structured output`,`object`,`The JSON schema the answer must match.`),"theorem.request.session_id":P(`request`,`Session`,`id`,`The provider session this call ran in.`),"theorem.request.cache":Ie(`request`,`Cache`,`The prompt cache, as requested.`,{mode:P(`request`,`Mode`,`text`,`How the prompt cache is used.`),ttl:P(`request`,`Lifetime`,`text`,`How long a cache entry lives.`)}),"theorem.request.image":Ie(`request`,`Image settings`,`The image asked for.`,{mime_type:P(`request`,`Format`,`text`,`The image file type.`),aspect_ratio:P(`request`,`Aspect ratio`,`text`,`Width to height.`),resolution:P(`request`,`Resolution`,`text`,`How detailed the image is, such as 1K, 2K or 4K.`),include_text:P(`request`,`With text`,`boolean`,`Text may come back beside the image.`)}),"theorem.request.speech":Ie(`request`,`Speech settings`,`The audio asked for.`,{voice:P(`request`,`Voice`,`text`,`The voice.`),speed:P(`request`,`Speed`,`number`,`The speaking rate; 1 is the voice's own pace.`),format:P(`request`,`Format`,`text`,`The audio format.`)}),"theorem.request.live":Ie(`request`,`Live settings`,`The Live session setup, as sent.`,{voice:P(`request`,`Voice`,`text`,`The voice the model speaks in.`),vad:Ie(`request`,`Voice detection`,`How the provider hears speech start and stop.`,{activity_handling:P(`request`,`On speech`,`text`,`What the model does when the user starts speaking.`),start_sensitivity:P(`request`,`Start sensitivity`,`text`,`How readily speech counts as started.`),end_sensitivity:P(`request`,`End sensitivity`,`text`,`How readily speech counts as ended.`),prefix_padding_ms:P(`request`,`Lead-in`,`milliseconds`,`Speech needed before it counts as started.`),silence_duration_ms:P(`request`,`Silence to end`,`milliseconds`,`Silence needed before speech counts as ended.`)}),session_resumption:P(`request`,`Resumable`,`boolean`,`Asked for handles to resume the session later.`),context_compression:Ie(`request`,`Context compression`,`How the provider shrinks a long session.`,{mechanism:P(`request`,`Mechanism`,`text`,`How the context is shrunk.`),trigger_tokens:P(`request`,`Trigger`,`tokens`,`Context size that starts compression.`),target_tokens:P(`request`,`Keep`,`tokens`,`Context size kept after compressing.`)}),transcription:Ie(`request`,`Transcription`,`Which audio the provider transcribes.`,Le),resumed:P(`request`,`Resumed`,`boolean`,`The session resumed an earlier one. The resumption handle is a credential and is never recorded.`)}),"theorem.input.sent_from":P(`request`,`Sent from message`,`number`,`Where in the input messages the request body starts; earlier ones the provider already held.`),"gen_ai.response.id":P(`response`,`Response ID`,`id`,`The provider's id for its answer.`),"gen_ai.response.model":P(`response`,`Model that answered`,`id`,`The model the provider says answered.`),"gen_ai.response.finish_reasons":P(`response`,`Provider finish reason`,`list`,`The provider's own reason for stopping. Absent when the call was stopped.`),"gen_ai.response.status":P(`response`,`Provider status`,`text`,`The provider's own status for the answer. Absent when the call was stopped.`),"gen_ai.response.time_to_first_chunk":P(`response`,`Time to first chunk`,`seconds`,`From the start of the successful HTTP try, or of a Live response, to its first chunk; a buffered body is its one chunk.`),"theorem.response.time_to_first_text":P(`response`,`Time to first text`,`seconds`,`From the start of the call to its first reply text, before guardrails; reasoning and tool calls do not count.`),"gen_ai.system_instructions":P(`messages`,`System instructions`,`parts`,`The instructions the model read.`),"gen_ai.tool.definitions":P(`messages`,`Tool definitions`,`content`,`The tools offered to the model, as sent.`),"gen_ai.input.messages":P(`messages`,`Input`,`messages`,`On a turn: the user's new input. On a model call: everything the model read.`),"gen_ai.output.messages":P(`messages`,`Output`,`messages`,`On a turn: what the host received. On a model call: what the model produced.`),"theorem.output.delivered":P(`messages`,`Delivered`,`messages`,`What the host received of this Live response.`),"theorem.error.public":P(`error`,`Error the user saw`,`content`,`The worded error the caller received.`),"gen_ai.usage.input_tokens":P(`usage`,`Input tokens`,`tokens`,`Tokens the model read.`),"gen_ai.usage.output_tokens":P(`usage`,`Output tokens`,`tokens`,`Tokens the model wrote.`),"gen_ai.usage.reasoning.output_tokens":P(`usage`,`Thinking tokens`,`tokens`,`Output tokens spent thinking.`),"gen_ai.usage.cache_read.input_tokens":P(`usage`,`Cached input tokens`,`tokens`,`Input tokens read from the prompt cache.`),"gen_ai.usage.cache_write.input_tokens":P(`usage`,`Cache write tokens`,`tokens`,`Input tokens written to the prompt cache.`),"theorem.usage.tool_use.input_tokens":P(`usage`,`Tool-use input tokens`,`tokens`,`Input tokens Google counts for tool use; already inside input tokens.`),"theorem.usage.grounding":Ie(`usage`,`Grounding`,`Grounding tool uses, per tool.`,{type:P(`usage`,`Tool`,`id`,`The provider's name for the tool.`),count:P(`usage`,`Uses`,`number`,`Times the tool ran.`),search_query_count:P(`usage`,`Searches`,`number`,`Search queries it ran.`)}),"theorem.usage.cost_usd":P(`usage`,`Cost`,`usd`,`As the provider reported it, or priced from Jev's fixed price for a decision. Absent when no call reported a cost.`),"theorem.usage.upstream_cost_usd":P(`usage`,`Upstream cost`,`usd`,`The upstream provider's cost, as a gateway reported it.`),"theorem.usage.cost_partial":P(`usage`,`Cost is partial`,`boolean`,`Only some calls reported a cost.`),"theorem.usage.estimated":P(`usage`,`Estimated`,`list`,`Sides whose token counts theorem estimated rather than the provider reporting them.`,_e),"theorem.usage.unknown_media":Ie(`usage`,`Uncounted media`,`Media items no counting rule covered, so their tokens are missing from the estimate.`,{input:P(`usage`,`Input`,`number`,`Uncounted media the model read.`),output:P(`usage`,`Output`,`number`,`Uncounted media the model wrote.`)}),"gen_ai.tool.name":P(`tool`,`Tool`,`id`,`The tool called.`),"gen_ai.tool.call.id":P(`tool`,`Call ID`,`id`,`The call's id.`),"gen_ai.tool.type":P(`tool`,`Tool type`,`text`,`function for a registered tool.`),"gen_ai.tool.call.arguments":P(`tool`,`Arguments`,`content`,`The arguments exactly as the model sent them.`),"gen_ai.tool.call.result":P(`tool`,`Result`,`content`,`What the model reads back, after formatting and the tool-result guardrail.`),"theorem.tool.call.result.parts":P(`tool`,`Result media`,`parts`,`Media and other parts the result carried.`),"theorem.tool.data":P(`tool`,`Raw output`,`json`,`The tool's output before formatting.`),"theorem.tool.outcome":P(`tool`,`Outcome`,`text`,`How the call settled.`,oe),"theorem.tool.origin":P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,se),"theorem.tool.permission":P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ce),"theorem.tool.approved":P(`tool`,`Approved`,`boolean`,`The host resumed this call with approval.`),"theorem.tool.failure.code":P(`error`,`Failure code`,`id`,`The tool's code for the failure, e.g. malformed_arguments.`),"theorem.cutout.input.sha256":P(`tool`,`Input hash`,`id`,`The host's hash of what it sent to the cutout.`),"theorem.cutout.output.sha256":P(`tool`,`Output hash`,`id`,`The host's hash of what came back.`),"http.request.method":P(`http`,`Method`,`text`,`The HTTP method.`),"server.address":P(`http`,`Host`,`id`,`The server the try went to.`),"url.path":P(`http`,`Path`,`id`,`The URL path. The query is never recorded.`),"http.response.status_code":P(`http`,`Status code`,`number`,`The HTTP status returned.`),"http.request.resend_count":P(`http`,`Retry number`,`number`,`0 for the first try, then 1, 2, … for each retry.`),"theorem.retry.backoff_ms":P(`http`,`Wait before retry`,`milliseconds`,`How long theorem waited after the previous try.`),"error.type":{...P(`error`,`Error kind`,`text`,`Why it failed: an error kind, the failing stop, or on an HTTP try its status or exception name.`,ae),open:!0},"exception.type":P(`error`,`Exception`,`id`,`The class or kind of what was thrown.`),"exception.message":P(`error`,`Message`,`content`,`The exception message, scrubbed.`),"exception.stacktrace":P(`error`,`Stack`,`content`,`Where it was thrown, scrubbed.`),"theorem.record.include":P(`record`,`Included`,`list`,`What this record kept. A field left out because it was off reads as not recorded, never as did not happen.`),"theorem.record.scrub":P(`record`,`Scrubbed`,`list`,`What was removed from stored text before it was hashed.`),"theorem.clock":P(`record`,`Clock`,`text`,`How the times in this record were taken.`,Fe),"theorem.source":P(`part`,`Source`,`text`,`Where this text came from, when it is not the model’s own.`,ve),"theorem.interim":P(`part`,`Interim`,`boolean`,`An interim transcript, not the final one.`),"theorem.observed_end":P(`part`,`Seen at`,`time`,`When theorem saw this provider-run step whole.`),"theorem.partial":P(`part`,`Incomplete`,`boolean`,`The provider sent this step incomplete.`),"theorem.embedding.inputs":P(`request`,`Inputs`,`number`,`How many inputs the call embedded, one vector each.`),"theorem.embedding.task":P(`request`,`Task`,`text`,`Whether the inputs are queries or documents, as the request said.`,De),"theorem.decision.contract":P(`decision`,`Contract`,`id`,`The host's decision contract the profile names.`),"theorem.decision.state":P(`decision`,`State`,`json`,`The JSON state the decision read.`),"theorem.decision.questions":P(`decision`,`Questions`,`json`,`Each question by id: its kind, instructions, and criteria.`),"theorem.decision.assets":P(`decision`,`Images`,`json`,`Each image by reference: its type and size. The image itself is never recorded.`),"theorem.decision.answers":P(`decision`,`Answers`,`json`,`Each answer by question id: the choice, score, number or box, its confidence, and probabilities.`),"gen_ai.evaluation.name":P(`evaluation`,`Grader`,`id`,`The grader that produced this result.`),"gen_ai.evaluation.score.value":P(`evaluation`,`Score`,`number`,`The score, 0–1 unless the grader says otherwise.`),"gen_ai.evaluation.score.label":P(`evaluation`,`Label`,`text`,`The grader's label for this trial, one of the labels it declares.`),"gen_ai.evaluation.explanation":P(`evaluation`,`Explanation`,`content`,`Why, in the grader's words.`),"theorem.evaluation.source":P(`evaluation`,`Graded by`,`text`,`Who produced this result.`,ue),"theorem.evaluation.suite":P(`evaluation`,`Suite`,`id`,`The eval suite that ran.`),"theorem.evaluation.case":P(`evaluation`,`Case`,`id`,`The case this trial ran. Absent when a production trace was graded without one.`),"theorem.evaluation.trial":P(`evaluation`,`Trial`,`number`,`Which trial of the case this is, from 0.`),"theorem.evaluation.grader.version":P(`evaluation`,`Grader version`,`id`,`The sha256 of the grader's rubric or code identity, so a reader can tell which rubric scored this.`),"theorem.evaluation.passed":P(`evaluation`,`Passed`,`boolean`,`The grader's yes or no. Absent when the result informs but does not decide.`),"theorem.eval.repeat":P(`evaluation`,`Trials per case`,`number`,`How many times each case ran.`),"theorem.eval.pass_rule":P(`evaluation`,`Pass rule`,`text`,`How the trials of a case become its verdict.`,de),"theorem.eval.pass_at_least":P(`evaluation`,`Trials needed`,`number`,`Trials that must pass under the at-least rule.`),"theorem.eval.caseless":P(`evaluation`,`Caseless`,`boolean`,`Production traces were graded with no cases: only graders that need no expectation ran.`),"theorem.eval.stopped":P(`evaluation`,`Stopped early`,`text`,`Why the run stopped before its end.`,fe),"vcs.ref.head.revision":P(`evaluation`,`Commit`,`id`,`The commit under test.`)},ze=/^(?:gen_ai|theorem)\.usage\.([a-z]+)\.(input|output)_tokens$/,Be=/^http\.(request|response)\.header\.(.+)$/;function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function He(e){let t=Re[e];if(t)return t;let n=ze.exec(e);if(n){let[,e=``,t=``]=n;return P(`usage`,`${Ve(e)} ${t} tokens`,`tokens`,`${Ve(t)} tokens that were ${e}, as the provider reported them.`)}let r=Be.exec(e);if(r){let[,e=``,t=``]=r;return P(`http`,`${Ve(e)} header ${t}`,`list`,`The ${e} header, as sent. A key, auth, cookie, secret, or token header is [redacted].`)}}var Ue=Ie(`error`,`Hits`,`Each rule that matched.`,{rule:{...P(`error`,`Rule`,`id`,`The rule that matched: one of Theorem's own, or a host policy's, which names itself.`,Se),open:!0},severity:P(`error`,`Severity`,`text`,`How serious the rule says a match is.`,Ee),signal:P(`error`,`Signal`,`text`,"What made an `injection` match in what a tool returns one, or how a host detector's `find` failed: `find_threw` or `find_result`."),start:P(`error`,`From`,`number`,`Where the match starts in the checked text.`),end:P(`error`,`To`,`number`,`Where the match ends in the checked text.`),match:P(`error`,`Match`,`text`,`The matched text, exact. Kept only when the profile records match previews.`),label:P(`error`,`Rule name`,`text`,`A host rule's own name for what it catches.`),doc:P(`error`,`Why it matters`,`text`,`A host rule's own account of why a match matters.`)}),We={"theorem.stage":{label:`Hook`,doc:`A stage in the turn where host hooks could act.`,attributes:{stage:P(`agent`,`Stage`,`text`,`Where in the turn.`,ye),affordance:P(`agent`,`Applied`,`list`,`What the hooks did; empty when they did nothing.`,be),hook_ms:P(`agent`,`Hook time`,`milliseconds`,`Time the hooks took; absent when none ran.`),warnings:P(`error`,`Warnings`,`list`,`Warning codes the hooks raised.`)}},"theorem.guardrail":{label:`Guardrail`,doc:"A guardrail checked some text: what it did, or `allow` for a timed check that let the text through.",attributes:{check:P(`agent`,`Check`,`id`,`Which timed check ran.`,Ce),duration_ms:P(`agent`,`Check time`,`milliseconds`,`Time the check took; a check on streamed output, its total over the call.`),runs:P(`agent`,`Runs`,`number`,`How many times a check on streamed output ran on the call.`),stage:P(`agent`,`Checked`,`text`,`Which text was checked.`,xe),trust:P(`agent`,`Trust`,`text`,`How far that text is trusted.`,we),action:P(`agent`,`Action`,`text`,`What the guardrail did.`,Te),hits:Ue,provenance:Ie(`agent`,`Came from`,`Where the checked text came from.`,{origin:P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,se),tool:P(`tool`,`Tool`,`id`,`The tool that produced it.`),depth:P(`tool`,`Hops`,`number`,`Tool calls between the user's turn and this text: 1 for a direct call, more through another agent.`)}),error:P(`error`,`Detail`,`content`,`The guardrail's internal reason.`),error_summary:P(`error`,`Failure`,`text`,`Which host detector failed, how, and its error id, in the kernel's words only. The host stream's reason ends with the same id.`)}},"theorem.attempt.retry":{label:`Retry`,doc:`The turn ran its model calls again.`,attributes:{attempt:P(`agent`,`Attempt`,`number`,`The attempt that starts.`),reason:P(`agent`,`Reason`,`text`,`Why it retried.`,ke)}},"theorem.step.resume":{label:`Sent again`,doc:`A model call failed with no reply, and the turn sent it again.`,attributes:{step:P(`agent`,`Step`,`number`,`The step whose model call was sent again.`),resume:P(`agent`,`Re-send`,`number`,`How many calls the turn has sent again so far.`),stop:P(`agent`,`Stop`,`text`,`How the failed call ended.`),error:P(`error`,`Detail`,`content`,`The provider's internal reason.`)}},"theorem.step.media_refused":{label:`Sent without files`,doc:`The provider refused a model call that carried files, and the turn sent it without them.`,attributes:{step:P(`agent`,`Step`,`number`,`The step whose model call was refused.`),files:P(`agent`,`Files`,`number`,`How many files the call went without.`),error:P(`error`,`Detail`,`content`,`The provider's internal reason.`)}},"theorem.compaction":{label:`Compaction`,doc:`theorem decided whether to summarize earlier messages.`,attributes:{timing:P(`agent`,`Timing`,`text`,`When compaction runs.`,Ae),meter:P(`agent`,`Counts`,`text`,`What the threshold counts.`,je),budget:P(`usage`,`Budget`,`tokens`,`The token budget the threshold is a share of.`),threshold:P(`usage`,`Threshold`,`number`,`The share of the budget that triggers it.`),trigger:P(`agent`,`Trigger`,`text`,`custom when the host decides instead.`),tokens_before:P(`usage`,`Tokens counted`,`tokens`,`What the meter read.`),unknown_media:P(`usage`,`Uncounted media`,`number`,`Media items the count could not cover.`),needed:P(`agent`,`Needed`,`boolean`,`The count crossed the threshold.`),outcome:P(`agent`,`Outcome`,`text`,`What happened to the earlier messages.`,Me),messages_before:P(`messages`,`Messages before`,`number`,`History length before.`),messages_after:P(`messages`,`Messages after`,`number`,`History length after.`),dropped_media:P(`messages`,`Media left out`,`number`,`Media the compactor does not take, left out of what it read.`),failure_stop:P(`agent`,`Compactor stop`,`text`,`How the failed compactor stopped.`,re),failure_error:P(`agent`,`Compactor error`,`text`,`The error the compactor failed with.`,ie),failure_reason:P(`agent`,`Compactor reason`,`content`,`Why the compactor failed, in its own words.`),failure_empty:P(`agent`,`Empty summary`,`boolean`,`The compactor replied with nothing.`),failure_unreadable:P(`agent`,`Nothing to read`,`boolean`,`Everything to compact was media the compactor does not take, so it did not run.`),summary:P(`messages`,`Summary`,`content`,`The summary that replaced them.`)}},exception:{label:`Exception`,doc:`Something was thrown, or the provider reported an error.`,attributes:{}},"theorem.upstream.row":{label:`Provider data`,doc:`One row of data from the provider, at the time it arrived.`,attributes:{row:P(`response`,`Row`,`json`,`The row, scrubbed, with media and known text by hash.`)}},"theorem.wire.request":{label:`Request body`,doc:`The body sent to the provider.`,attributes:{body:P(`request`,`Body`,`json`,`The body, scrubbed, with media and known text by hash.`),body_kind:P(`request`,`Body type`,`text`,`What the body was, when it was not JSON.`)}},"theorem.grounding":{label:`Grounding`,doc:`Sources and citations the answer drew on.`,attributes:{provider:P(`response`,`Provider`,`id`,`Who supplied the evidence.`),sources:P(`response`,`Sources`,`json`,`The sources.`),search_html:P(`response`,`Search suggestions`,`content`,`Google's search widget.`),raw:P(`response`,`Raw`,`json`,`The provider's raw grounding payload.`)}},"theorem.gate":{label:`Approval needed`,doc:`The call stopped until the user answers.`,attributes:{kind:P(`tool`,`Needs`,`text`,`What the user must give.`,Oe),permission:P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ce),summary:P(`tool`,`Summary`,`content`,`What the user is asked to approve.`),auth:Ie(`tool`,`Sign-in`,`The credential asked for. The challenge state is a secret and is never recorded.`,{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),type:P(`tool`,`Type`,`text`,`The kind of credential.`),service:P(`tool`,`Service`,`text`,`The service the person signs in to.`),issuer:P(`tool`,`Issuer`,`id`,`Who issues it.`),resource:P(`tool`,`Resource`,`id`,`What it grants access to.`),required_scopes:P(`tool`,`Scopes`,`list`,`The scopes it must carry.`)})}},"theorem.auth.scope_refused":{label:`Access refused`,doc:`The service asked for access outside the scopes the tool declares, so no sign-in was offered.`,attributes:{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),requested:P(`tool`,`Asked for`,`list`,`The scopes the service asked for.`),declared:P(`tool`,`Declared`,`list`,`The scopes the tool declares.`)}},"theorem.tool.warning":{label:`Tool warning`,doc:`Something the tool flagged while it ran; the call went on.`,attributes:{code:P(`tool`,`Code`,`id`,`The warning, by name.`),message:P(`tool`,`Message`,`content`,`What the tool said.`),severity:P(`tool`,`Severity`,`text`,`How serious the tool says it is.`)}},"theorem.tool.cancel":{label:`Tool call cancelled`,doc:`The provider cancelled a tool call it had made.`,attributes:{}},"theorem.session":{label:`Session`,doc:`Something happened to the Live session.`,attributes:{kind:P(`agent`,`What happened`,`text`,`The session fact recorded.`,Ne),time_left_ms:P(`agent`,`Time left`,`milliseconds`,`How long the provider said the session had left.`),closed_after_ms:P(`agent`,`Closed after`,`milliseconds`,`How long after the warning the socket closed.`),cause:P(`agent`,`Cause`,`text`,`go_away when the provider had warned it would close.`),code:P(`http`,`Close code`,`number`,`The WebSocket close code.`),reason:P(`http`,`Close reason`,`text`,`The WebSocket close reason.`),initiator:P(`agent`,`Closed by`,`text`,`Who closed the socket.`,Pe),activity:P(`agent`,`Activity`,`text`,`The provider's voice activity signal.`),audio_offset:P(`agent`,`Audio offset`,`text`,`Where in the audio it was heard.`),resumable:P(`agent`,`Resumable`,`boolean`,`The session can be resumed now.`),handle_issued:P(`agent`,`Handle issued`,`boolean`,`The provider sent a resumption handle. The handle is a credential and is never recorded.`),key_slot:P(`request`,`From key`,`text`,`The key slot refused.`),to_key_slot:P(`request`,`To key`,`text`,`The profile's fallback key slot it reopened on.`),error:P(`error`,`Detail`,`text`,`The provider's refusal.`)}},"gen_ai.evaluation.result":{label:`Eval result`,doc:`One grader's reading of this trace. Its keys are span attributes of the evaluation group.`,attributes:{}},"theorem.eval.verdict":{label:`Verdict`,doc:`One case's pass or fail after its trials, by the suite's pass rule. Every case is here, zeros included.`,attributes:{case:P(`evaluation`,`Case`,`id`,`The case judged.`),kind:P(`evaluation`,`Kind`,`text`,`Anthropic's split of cases.`,pe),difficulty:P(`evaluation`,`Difficulty`,`number`,`The case’s 1–5 difficulty, when the suite set one.`),passed:P(`evaluation`,`Passed`,`boolean`,`The pass rule was met.`),trials:P(`evaluation`,`Trials`,`number`,`Trials run.`),trials_passed:P(`evaluation`,`Passed trials`,`number`,`Trials every deciding grader passed.`),trials_errored:P(`evaluation`,`Errored trials`,`number`,`Trials a grader could not score; they count as failed.`),trials_ungraded:P(`evaluation`,`Ungraded trials`,`number`,`Trials no grader decided.`)}}};function Ge(e){return We[e]}function Ke(e,t){return We[e]?.attributes[t]??He(t)}var qe={turn:{label:`Turn`,doc:`One exchange: the model calls and tool calls it took to answer.`},session:{label:`Live session`,doc:`A Live session, from setup to close.`},call:{label:`Model call`,doc:`One request to a model and its answer.`},response:{label:`Live response`,doc:`One spoken response in a Live session.`},tool:{label:`Tool call`,doc:`One tool call theorem ran, from its hooks to settlement.`},http:{label:`HTTP try`,doc:`One HTTP attempt of a model call.`},cutout:{label:`Cutout`,doc:`A side effect the host recorded after the turn.`},decision:{label:`Decision`,doc:`One typed decision over JSON state.`},evaluation:{label:`Evaluation`,doc:`An eval graded this trace, or a suite ran.`},host:{label:`Host span`,doc:`A step the host recorded itself.`}};function Je(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function Ye(e,t){let n={type:e,...qe[e]};return t?{...n,subject:t}:n}function Xe(e){switch(Je(e,`gen_ai.operation.name`)){case`invoke_agent`:return Ye(e.events.some(e=>e.name===`theorem.session`)?`session`:`turn`,Je(e,`gen_ai.agent.name`));case`chat`:case`generate_content`:case`transcribe`:return Ye(`theorem.request.live`in e.attributes?`response`:`call`,Je(e,`gen_ai.request.model`));case`execute_tool`:return Ye(`tool`,Je(e,`gen_ai.tool.name`));case`decide`:return Ye(`decision`,Je(e,`gen_ai.agent.name`));case`embeddings`:return Ye(`call`,Je(e,`gen_ai.request.model`))}return`http.request.method`in e.attributes?Ye(`http`,Je(e,`url.path`)):e.name===`cutout`?Ye(`cutout`,Je(e,`url.path`)):e.name===`theorem.eval.trial`||e.name===`theorem.eval.run`?Ye(`evaluation`,Je(e,`theorem.evaluation.suite`)):Ye(`host`,e.name)}var F=t(r()),Ze=o();function Qe(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qe(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function I(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qe(e))&&(r&&(r+=` `),r+=t);return r}var $e=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function et(e){return typeof e==`string`&&$e.includes(e)}var tt=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function nt(e){return typeof e==`string`&&tt.has(e)}function rt(e){return typeof e==`string`&&e.startsWith(`data-`)}function it(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(nt(n)||rt(n))&&(t[n]=e[n]);return t}function at(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return it(t)}return typeof e==`object`&&!Array.isArray(e)?it(e):null}function ot(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(nt(n)||rt(n)||et(n))&&(t[n]=e[n]);return t}function st(e){return e==null?null:(0,F.isValidElement)(e)?ot(e.props):typeof e==`object`&&!Array.isArray(e)?ot(e):null}var ct=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(null,arguments)}function ut(e,t){if(e==null)return{};var n,r,i=dt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ft=(0,F.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=ut(e,ct),d=a||{width:r,height:i,x:0,y:0},f=I(`recharts-surface`,o);return F.createElement(`svg`,lt({},ot(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),F.createElement(`title`,null,c),F.createElement(`desc`,null,l),n)}),pt=[`children`,`className`];function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(null,arguments)}function ht(e,t){if(e==null)return{};var n,r,i=gt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _t=F.forwardRef((e,t)=>{var n=e.children,r=e.className,i=ht(e,pt),a=I(`recharts-layer`,r);return F.createElement(`g`,mt({className:a},ot(i),{ref:t}),n)});function vt(e){return e===`__proto__`}var yt=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function bt(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:yt.test(e);default:return!1}}function xt(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function St(e){return typeof e==`symbol`||e instanceof Symbol}function Ct(e){return e==null?``:wt(e)}function wt(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(wt).join(`,`);if(St(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Tt(e){if(Array.isArray(e))return e.map(xt);if(typeof e==`symbol`)return[e];e=Ct(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function Et(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(vt(t))return n;let r=e[t];return r===void 0?bt(t)&&!Object.hasOwn(e,t)?Et(e,Tt(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=xt(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Dt(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),vt(t))return n;let r=e[t];return r===void 0?n:r}}}function Dt(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||vt(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var Ot=4;function kt(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ot),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function At(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+kt(i)+n},``)}var jt=e=>e===0?0:e>0?1:-1,Mt=e=>typeof e==`number`&&e!=+e,Nt=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!Mt(e),Pt=e=>L(e)||typeof e==`string`,Ft=0,It=e=>{var t=++Ft;return`${e||``}${t}`},Lt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!L(e)&&typeof e!=`string`)return n;var i;if(Nt(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Mt(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Rt=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function zt(e,t,n){return L(e)&&L(t)?kt(e+n*(t-e)):t}function Bt(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):Et(e,t))===n)}var R=e=>e==null,Vt=e=>R(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ht(e){return e!=null}function Ut(){}function Wt(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Gt(Object(n),!0).forEach(function(t){qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qt(e,t,n){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=Yt(e,`string`);return typeof t==`symbol`?t:t+``}function Yt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Xt=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Wt(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Kt({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Kt({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Kt({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Kt({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Kt({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Kt({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Kt({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Kt({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||Nt(n.x))&&(L(n.y)||Nt(n.y))?Kt({x:c+Lt(n.x,g),y:l+Lt(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Kt({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Zt=[`top`,`left`,`right`,`bottom`];function Qt(e){return e==null?!1:typeof e==`object`||Zt.includes(e)}var $t=(0,F.createContext)(null);function z(e){return function(){return e}}var en=Math.PI,tn=2*en,nn=1e-6,rn=tn-nn;function an(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function on(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return an;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var sn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?an:on(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>nn){if(!(Math.abs(u*s-c*l)>nn)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((en-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>nn&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>nn||Math.abs(this._y1-l)>nn)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%tn+tn),d>rn?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>nn&&this._append`A${n},${n},0,${+(d>=en)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};sn.prototype;function cn(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new sn(t)}Array.prototype.slice;function ln(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function un(e){this._context=e}un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function dn(e){return new un(e)}function fn(e){return e[0]}function pn(e){return e[1]}function mn(e,t){var n=z(!0),r=null,i=dn,a=null,o=cn(s);e=typeof e==`function`?e:e===void 0?fn:z(e),t=typeof t==`function`?t:t===void 0?pn:z(t);function s(s){var c,l=(s=ln(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:z(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function hn(e,t,n){var r=null,i=z(!0),a=null,o=dn,s=null,c=cn(l);e=typeof e==`function`?e:e===void 0?fn:z(+e),t=typeof t==`function`?t:z(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?pn:z(+n);function l(l){var u,d,f,p=(l=ln(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return mn().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:z(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:z(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:z(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var gn=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function _n(e){return new gn(e,!0)}function vn(e){return new gn(e,!1)}function yn(){}function bn(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xn(e){this._context=e}xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sn(e){return new xn(e)}function Cn(e){this._context=e}Cn.prototype={areaStart:yn,areaEnd:yn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wn(e){return new Cn(e)}function Tn(e){this._context=e}Tn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:bn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function En(e){return new Tn(e)}function Dn(e){this._context=e}Dn.prototype={areaStart:yn,areaEnd:yn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function On(e){return new Dn(e)}function kn(e){return e<0?-1:1}function An(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(kn(a)+kn(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function jn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mn(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Nn(e){this._context=e}Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mn(this,this._t0,jn(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Mn(this,jn(this,n=An(this,e,t)),n);break;default:Mn(this,this._t0,n=An(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pn(e){this._context=new Fn(e)}(Pn.prototype=Object.create(Nn.prototype)).point=function(e,t){Nn.prototype.point.call(this,t,e)};function Fn(e){this._context=e}Fn.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function In(e){return new Nn(e)}function Ln(e){return new Pn(e)}function Rn(e){this._context=e}Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=zn(e),i=zn(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function zn(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Bn(e){return new Rn(e)}function Vn(e,t){this._context=e,this._t=t}Vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Hn(e){return new Vn(e,.5)}function Un(e){return new Vn(e,0)}function Wn(e){return new Vn(e,1)}function Gn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Kn(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function qn(e,t){return e[t]}function Jn(e){let t=[];return t.key=e,t}function Yn(){var e=z([]),t=Kn,n=Gn,r=qn;function i(i){var a=Array.from(e.apply(this,arguments),Jn),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=ln(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:z(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:z(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Kn:typeof e==`function`?e:z(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Gn,i):n},i}function Xn(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Gn(e,t)}}function Zn(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Gn(e,t)}}function Qn(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Gn(e,t)}}var $n=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,er=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,F.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{et(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},tr=(e,t,n)=>r=>(e(t,n,r),null),nr=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];et(i)&&typeof a==`function`&&(r||={},r[i]=tr(a,t,n))}),r};function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rr(Object(n),!0).forEach(function(t){ar(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ar(e,t,n){return(t=or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e){var t=sr(e,`string`);return typeof t==`symbol`?t:t+``}function sr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cr(e,t){var n=ir({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function lr(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ur(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function dr(e){return e}function fr(e){return Number.isSafeInteger(e)&&e>=0}function pr(e){return e!=null&&typeof e!=`function`&&fr(e.length)}function mr(e){return function(t){return Et(t,e)}}function hr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function gr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _r(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function vr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var yr=`[object RegExp]`,br=`[object String]`,xr=`[object Number]`,Sr=`[object Boolean]`,Cr=`[object Arguments]`,wr=`[object Symbol]`,Tr=`[object Date]`,Er=`[object Map]`,Dr=`[object Set]`,Or=`[object Array]`,kr=`[object Function]`,Ar=`[object ArrayBuffer]`,jr=`[object Object]`,Mr=`[object Error]`,Nr=`[object DataView]`,Pr=`[object Uint8Array]`,Fr=`[object Uint8ClampedArray]`,Ir=`[object Uint16Array]`,Lr=`[object Uint32Array]`,Rr=`[object BigUint64Array]`,zr=`[object Int8Array]`,Br=`[object Int16Array]`,Vr=`[object Int32Array]`,Hr=`[object BigInt64Array]`,Ur=`[object Float32Array]`,Wr=`[object Float64Array]`,Gr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Kr(e){return Gr.Buffer!==void 0&&Gr.Buffer.isBuffer(e)}function qr(e,t){return Jr(e,void 0,e,new Map,t)}function Jr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(hr(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Jr(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Jr(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Jr(a,void 0,n,r,i));return t}if(Kr(e))return e.subarray();if(gr(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Jr(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Yr(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Yr(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Yr(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Yr(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Yr(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Yr(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Yr(t,e,n,r,i),t}if(typeof e==`object`&&Xr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Yr(t,e,n,r,i),t}return e}function Yr(e,t,n=e,r,i){let a=[...Object.keys(t),..._r(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Jr(t[s],s,n,r,i))}}function Xr(e){switch(vr(e)){case Cr:case Or:case Ar:case Nr:case Sr:case Tr:case Ur:case Wr:case zr:case Br:case Vr:case Er:case xr:case jr:case yr:case Dr:case br:case wr:case Pr:case Fr:case Ir:case Lr:return!0;default:return!1}}function Zr(e){return Jr(e,void 0,e,new Map,void 0)}function Qr(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function $r(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ei(e,t,n){return typeof n==`function`?ti(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?ti(t,r,e,s,!1):!!c},new Map,!0):ei(e,t,()=>void 0)}function ti(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ni(e,t,n,r,i);case`function`:return Object.keys(t).length>0?ti(e,{...t},n,r,i):Qr(e,t);default:return $r(e)&&i?typeof t!=`string`||t===``:Qr(e,t)}}function ni(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return ii(e,t,n,r);if(t instanceof Map)return ri(e,t,n,r);if(t instanceof Set)return ai(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)hr(e)&&(e=Object(e));else{let t=vr(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function ri(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function ii(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function ai(e,t,n,r){return t.size===0||e instanceof Set&&ii([...e],[...t],n,r)}function oi(e,t){return ei(e,t,()=>void 0)}function si(e){return e=Zr(e),t=>oi(t,e)}function ci(e,t){return qr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(vr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Yr(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case xr:case br:case Sr:{let t=new e.constructor(e?.valueOf());return Yr(t,e),t}case Cr:{let t={};return Yr(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function li(e){return ci(e)}var ui=/^(?:0|[1-9]\d*)$/;function di(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ui.test(e)}}function fi(e){return typeof e==`object`&&!!e&&vr(e)===`[object Arguments]`}function pi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&bt(t)&&!(t in Object(e))?Tt(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=xt(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||fi(r))&&di(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function mi(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=xt(e)}return t=li(t),function(n){let r=Et(n,e);return r===void 0?pi(n,e):t===void 0?r===void 0:oi(r,t)}}function hi(e){if(e==null)return dr;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?mi(e[0],e[1]):si(e);default:return mr(e)}}function gi(e){return e===0?0:e}function _i(e,t=dr){return pr(e)?lr(Array.from(e),ur(hi(t),1)).map(gi):[]}function vi(e,t,n){return t===!0?_i(e,n):typeof t==`function`?_i(e,t):e}var yi=n((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),bi=n(((e,t)=>{t.exports=yi()})),xi=n((e=>{var t=r(),n=bi();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Si=n(((e,t)=>{t.exports=xi()}))(),Ci=(0,F.createContext)(null),wi=e=>e,B=()=>{var e=(0,F.useContext)(Ci);return e?e.store.dispatch:wi},Ti=()=>{},Ei=()=>Ti,Di=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(Ci),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:Ti,[t,e]);return(0,Si.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Ei,t?t.store.getState:Ti,t?t.store.getState:Ti,n,Di)}function Oi(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function ki(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var Ai=e=>Array.isArray(e)?e:[e];function ji(e){let t=Array.isArray(e[0])?e[0]:e;return ki(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Mi(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Ni=class{constructor(e){this.value=e}deref(){return this.value}},Pi=typeof WeakRef>`u`?Ni:WeakRef,Fi=0,Ii=1;function Li(){return{s:Fi,v:void 0,o:null,p:null}}function Ri(e){return e instanceof Pi?e.deref():e}function zi(e,t={}){let n=Li(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Li(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Li(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Ii)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Ri(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Pi(c):c}return s.s=Ii,s.v=c,c}return o.clearCache=()=>{n=Li(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Bi(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Oi(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=zi,argsMemoizeOptions:u=[]}={...n,...a},d=Ai(c),f=Ai(u),p=ji(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Mi(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var H=Bi(zi);function Vi(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Hi(e,t,n){return $r(n)&&(typeof t==`number`&&pr(n)&&di(t)&&t<n.length||typeof t==`string`&&t in n)?Qr(n[t],e):!1}function Ui(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Wi=(e,t,n)=>{if(e!==t){let r=Ui(e),i=Ui(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Gi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ki=/^\w*$/;function qi(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||St(e)?!0:typeof e==`string`&&(Ki.test(e)||!Gi.test(e))||t!=null&&Object.hasOwn(t,e)}function Ji(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=pr(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||qi(e)?e:{key:e,path:Tt(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Wi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Yi(e,...t){let n=t.length;return n>1&&Hi(e,t[0],t[1])?t=[]:n>2&&Hi(t[0],t[1],t[2])&&(t=[t[0]]),Ji(e,Vi(t),[`asc`])}var Xi=e=>e.legend.settings,Zi=e=>e.legend.size;H([e=>e.legend.payload,Xi],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Yi(r,n):r});function Qi(e,t){return ra(e)||na(e,t)||ea(e,t)||$i()}function $i(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ea(e,t){if(e){if(typeof e==`string`)return ta(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ta(e,t):void 0}}function ta(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function na(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ra(e){if(Array.isArray(e))return e}var ia=1;function aa(e,t){return Math.abs(e.height-t.height)>ia||Math.abs(e.left-t.left)>ia||Math.abs(e.top-t.top)>ia||Math.abs(e.width-t.width)>ia}function oa(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function sa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=Qi((0,F.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,F.useRef)(null),a=(0,F.useRef)(n);a.current=n;var o=(0,F.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=oa(e);if(aa(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=oa(e);aa(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,F.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function ca(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var la=typeof Symbol==`function`&&Symbol.observable||`@@observable`,ua=()=>Math.random().toString(36).substring(7).split(``).join(`.`),da={INIT:`@@redux/INIT${ua()}`,REPLACE:`@@redux/REPLACE${ua()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ua()}`};function fa(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function pa(e,t,n){if(typeof e!=`function`)throw Error(ca(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(ca(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(ca(1));return n(pa)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(ca(3));return i}function d(e){if(typeof e!=`function`)throw Error(ca(4));if(c)throw Error(ca(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(ca(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!fa(e))throw Error(ca(7));if(e.type===void 0)throw Error(ca(8));if(typeof e.type!=`string`)throw Error(ca(17));if(c)throw Error(ca(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(ca(10));r=e,f({type:da.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(ca(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[la](){return this}}}return f({type:da.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[la]:m}}function ma(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:da.INIT})===void 0)throw Error(ca(12));if(n(void 0,{type:da.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(ca(13))})}function ha(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{ma(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(ca(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function ga(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function _a(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(ca(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=ga(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function va(e){return fa(e)&&`type`in e&&typeof e.type==`string`}var ya=Symbol.for(`immer-nothing`),ba=Symbol.for(`immer-draftable`),xa=Symbol.for(`immer-state`);function Sa(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ca=Object,wa=Ca.getPrototypeOf,Ta=`constructor`,Ea=`prototype`,Da=`configurable`,Oa=`enumerable`,ka=`writable`,Aa=`value`,ja=e=>!!e&&!!e[xa];function Ma(e){return e?Fa(e)||Ha(e)||!!e[ba]||!!e[Ta]?.[ba]||Ua(e)||Wa(e):!1}var Na=Ca[Ea][Ta].toString(),Pa=new WeakMap;function Fa(e){if(!e||!Ga(e))return!1;let t=wa(e);if(t===null||t===Ca[Ea])return!0;let n=Ca.hasOwnProperty.call(t,Ta)&&t[Ta];if(n===Object)return!0;if(!Ka(n))return!1;let r=Pa.get(n);return r===void 0&&(r=Function.toString.call(n),Pa.set(n,r)),r===Na}function Ia(e,t,n=!0){La(e)===0?(n?Reflect.ownKeys(e):Ca.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function La(e){let t=e[xa];return t?t.type_:Ha(e)?1:Ua(e)?2:Wa(e)?3:0}var Ra=(e,t,n=La(e))=>n===2?e.has(t):Ca[Ea].hasOwnProperty.call(e,t),za=(e,t,n=La(e))=>n===2?e.get(t):e[t],Ba=(e,t,n,r=La(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Va(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ha=Array.isArray,Ua=e=>e instanceof Map,Wa=e=>e instanceof Set,Ga=e=>typeof e==`object`,Ka=e=>typeof e==`function`,qa=e=>typeof e==`boolean`;function Ja(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ya=e=>e.copy_||e.base_,Xa=e=>e.modified_?e.copy_:e.base_;function Za(e,t){if(Ua(e))return new Map(e);if(Wa(e))return new Set(e);if(Ha(e))return Array[Ea].slice.call(e);let n=Fa(e);if(t===!0||t===`class_only`&&!n){let t=Ca.getOwnPropertyDescriptors(e);delete t[xa];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[ka]===!1&&(a[ka]=!0,a[Da]=!0),(a.get||a.set)&&(t[i]={[Da]:!0,[ka]:!0,[Oa]:a[Oa],[Aa]:e[i]})}return Ca.create(wa(e),t)}{let t=wa(e);if(t!==null&&n)return{...e};let r=Ca.create(t);return Ca.assign(r,e)}}function Qa(e,t=!1){return to(e)||ja(e)||!Ma(e)||(La(e)>1&&Ca.defineProperties(e,{set:eo,add:eo,clear:eo,delete:eo}),Ca.freeze(e),t&&Ia(e,(e,t)=>{Qa(t,!0)},!1)),e}function $a(){Sa(2)}var eo={[Aa]:$a};function to(e){return e===null||!Ga(e)||Ca.isFrozen(e)}var no=`MapSet`,ro=`Patches`,io=`ArrayMethods`,ao={};function oo(e){let t=ao[e];return t||Sa(0,e),t}var so=e=>!!ao[e],co,lo=()=>co,uo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:so(no)?oo(no):void 0,arrayMethodsPlugin_:so(io)?oo(io):void 0});function fo(e,t){t&&(e.patchPlugin_=oo(ro),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function po(e){mo(e),e.drafts_.forEach(go),e.drafts_=null}function mo(e){e===co&&(co=e.parent_)}var ho=e=>co=uo(co,e);function go(e){let t=e[xa];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _o(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[xa].modified_&&(po(t),Sa(4)),Ma(e)&&(e=vo(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[xa].base_,e,t)}else e=vo(t,n);return yo(t,e,!0),po(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ya?void 0:e}function vo(e,t){if(to(t))return t;let n=t[xa];if(!n)return Do(t,e.handledSet_,e);if(!xo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);To(n,e)}return n.copy_}function yo(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qa(t,n)}function bo(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var xo=(e,t)=>e.scope_===t,So=[];function Co(e,t,n,r){let i=Ya(e),a=e.type_;if(r!==void 0&&za(i,r,a)===t){Ba(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ia(i,(e,n)=>{if(ja(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??So;for(let e of o)Ba(i,e,n,a)}function wo(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!xo(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Xa(i);Co(e,i.draft_??i,a,n),To(i,r)})}function To(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}bo(e)}}function Eo(e,t,n){let{scope_:r}=e;if(ja(n)){let i=n[xa];xo(i,r)&&i.callbacks_.push(function(){Io(e),Co(e,n,Xa(i),t)})}else Ma(n)&&e.callbacks_.push(function(){let i=Ya(e);e.type_===3?i.has(n)&&Do(n,r.handledSet_,r):za(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Do(za(e.copy_,t,e.type_),r.handledSet_,r)})}function Do(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ja(e)||t.has(e)||!Ma(e)||to(e)||(t.add(e),Ia(e,(r,i)=>{if(ja(i)){let t=i[xa];xo(t,n)&&(Ba(e,r,Xa(t),e.type_),bo(t))}else Ma(i)&&Do(i,t,n)})),e}function Oo(e,t){let n=Ha(e),r={type_:+!!n,scope_:t?t.scope_:lo(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=ko;n&&(i=[r],a=Ao);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var ko={get(e,t){if(t===xa)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Ya(e);if(!Ra(i,t,e.type_))return No(e,i,t);let a=i[t];if(e.finalized_||!Ma(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ja(t))return a;if(a===jo(e.base_,t)||Mo(e,t,a)){Io(e);let n=e.type_===1?+t:t,r=Ro(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ya(e)},ownKeys(e){return Reflect.ownKeys(Ya(e))},set(e,t,n){let r=Po(Ya(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=jo(Ya(e),t),i=r?.[xa];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Va(n,r)&&(n!==void 0||Ra(e.base_,t,e.type_)))return!0;Io(e),Fo(e)}return e.copy_[t]===n&&(n!==void 0||Ra(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Eo(e,t,n)),!0},deleteProperty(e,t){return Io(e),jo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Fo(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ya(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ka]:!0,[Da]:e.type_!==1||t!==`length`,[Oa]:r[Oa],[Aa]:n[t]}},defineProperty(){Sa(11)},getPrototypeOf(e){return wa(e.base_)},setPrototypeOf(){Sa(12)}},Ao={};for(let e in ko){let t=ko[e];Ao[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Ao.deleteProperty=function(e,t){return Ao.set.call(this,e,t,void 0)},Ao.set=function(e,t,n){return ko.set.call(this,e[0],t,n,e[0])};function jo(e,t){let n=e[xa];return(n?Ya(n):e)[t]}function Mo(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Ma(n)||n[xa]?!1:e.baseRefs_.has(n)}function No(e,t,n){let r=Po(t,n);return r?Aa in r?r[Aa]:r.get?.call(e.draft_):void 0}function Po(e,t){if(!(t in e))return;let n=wa(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=wa(n)}}function Fo(e){e.modified_||(e.modified_=!0,e.parent_&&Fo(e.parent_))}function Io(e){e.copy_||=(e.assigned_=new Map,Za(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Lo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ka(e)&&!Ka(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ka(t)||Sa(6),n!==void 0&&!Ka(n)&&Sa(7);let r;if(Ma(e)){let i=ho(this),a=Ro(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?po(i):mo(i)}return fo(i,n),_o(r,i)}if(!e||!Ga(e)){if(r=t(e),r===void 0&&(r=e),r===ya&&(r=void 0),this.autoFreeze_&&Qa(r,!0),n){let t=[],i=[];oo(ro).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Sa(1,e)},this.produceWithPatches=(e,t)=>{if(Ka(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},qa(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),qa(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),qa(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ma(e)||Sa(8),ja(e)&&(e=zo(e));let t=ho(this),n=Ro(t,e,void 0);return n[xa].isManual_=!0,mo(t),n}finishDraft(e,t){let n=e&&e[xa];(!n||!n.isManual_)&&Sa(9);let{scope_:r}=n;return fo(r,t),_o(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=oo(ro).applyPatches_;return ja(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Ro(e,t,n,r){let[i,a]=Ua(t)?oo(no).proxyMap_(t,n):Wa(t)?oo(no).proxySet_(t,n):Oo(t,n);return(n?.scope_??lo()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?wo(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function zo(e){return ja(e)||Sa(10,e),Bo(e)}function Bo(e){if(!Ma(e)||to(e))return e;let t=e[xa],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Za(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Za(e,!0);return Ia(n,(e,t)=>{Ba(n,e,Bo(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var Vo=new Lo().produce,U=e=>e;function Ho(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Uo=Ho(),Wo=Ho,Go=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?ga:ga.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Ko(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(ec(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>va(t)&&t.type===e,n}var qo=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Jo(e){return Ma(e)?Vo(e,()=>{}):e}function Yo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Xo(e){return typeof e==`boolean`}var Zo=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new qo;return t&&(Xo(t)?a.push(Uo):a.push(Wo(t.extraArgument))),a},Qo=`RTK_autoBatch`,W=()=>e=>({payload:e,meta:{[Qo]:!0}}),$o=e=>t=>{setTimeout(t,e)},es=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},ts=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?es(window.requestAnimationFrame,100):$o(10):e.type===`callback`?e.queueNotification:$o(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Qo],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},ns=e=>function(t){let{autoBatch:n=!0}=t??{},r=new qo(e);return n&&r.push(ts(typeof n==`object`?n:void 0)),r};function rs(e){let t=Zo(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(fa(n))c=ha(n);else throw Error(ec(1));let l;l=typeof r==`function`?r(t):t();let u=ga;i&&(u=Go({trace:!1,...typeof i==`object`&&i}));let d=ns(_a(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return pa(c,o,p)}function is(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(ec(28));if(r in t)throw Error(ec(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function as(e){return typeof e==`function`}function os(e,t){let[n,r,i]=is(t),a;if(as(e))a=()=>Jo(e());else{let t=Jo(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(ja(e)){let r=n(e,t);return r===void 0?e:r}if(Ma(e))return Vo(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var ss=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,cs=(e=21)=>{let t=``,n=e;for(;n--;)t+=ss[Math.random()*64|0];return t},ls=Symbol.for(`rtk-slice-createasyncthunk`);function us(e,t){return`${e}/${t}`}function ds({creators:e}={}){let t=e?.asyncThunk?.[ls];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(ec(11));let i=(typeof e.reducers==`function`?e.reducers(ms()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(ec(12));if(n in o.sliceCaseReducersByType)throw Error(ec(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:us(n,r),createNotation:typeof e.reducers==`function`};gs(a)?vs(o,a,s,t):hs(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?is(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return os(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=Yo(d,r,m)),i}function i(t=l){return Yo(Yo(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=fs(a,t,()=>Yo(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function fs(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var ps=ds();function ms(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function hs({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!_s(r))throw Error(ec(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Ko(e,o):Ko(e))}function gs(e){return e._reducerDefinitionType===`asyncThunk`}function _s(e){return e._reducerDefinitionType===`reducerWithPrepare`}function vs({type:e,reducerName:t},n,r,i){if(!i)throw Error(ec(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||ys,pending:s||ys,rejected:c||ys,settled:l||ys})}function ys(){}var bs=`task`,xs=`listener`,Ss=`completed`,Cs=`cancelled`,ws=`task-${Cs}`,Ts=`task-${Ss}`,Es=`${xs}-${Cs}`,Ds=`${xs}-${Ss}`,Os=class{constructor(e){this.code=e,this.message=`${bs} ${Cs} (reason: ${e})`}code;name=`TaskAbortError`;message},ks=(e,t)=>{if(typeof e!=`function`)throw TypeError(ec(32))},As=()=>{},js=(e,t=As)=>(e.catch(t),e),Ms=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Ns=e=>{if(e.aborted)throw new Os(e.reason)};function Ps(e,t){let n=As;return new Promise((r,i)=>{let a=()=>i(new Os(e.reason));e.aborted?a():(n=Ms(e,a),t.finally(()=>n()).then(r,i))}).finally(()=>{n=As})}var Fs=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof Os?`cancelled`:`rejected`,error:e}}finally{t?.()}},Is=e=>t=>js(Ps(e,t).then(t=>(Ns(e),t))),Ls=e=>{let t=Is(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Rs}=Object,zs={},Bs=`listenerMiddleware`,Vs=(e,t)=>{let n=t=>Ms(e,()=>t.abort(e.reason));return(r,i)=>{ks(r,`taskExecutor`);let a=new AbortController;n(a);let o=Fs(async()=>{Ns(e),Ns(a.signal);let t=await r({pause:Is(a.signal),delay:Ls(a.signal),signal:a.signal});return Ns(a.signal),t},()=>a.abort(Ts));return i?.autoJoin&&t.push(o.catch(As)),{result:Is(e)(o),cancel(){a.abort(ws)}}}},Hs=(e,t)=>{let n=async(n,r)=>{Ns(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await Ps(t,Promise.race(a));return Ns(t),e}finally{i()}};return((e,t)=>js(n(e,t)))},Us=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Ko(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(ec(21));return ks(a,`options.listener`),{predicate:i,type:t,effect:a}},Ws=Rs(e=>{let{type:t,predicate:n,effect:r}=Us(e);return{id:cs(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(ec(22))}}},{withTypes:()=>Ws}),Gs=(e,t)=>{let{type:n,effect:r,predicate:i}=Us(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Ks=e=>{e.pending.forEach(e=>{e.abort(Es)})},qs=(e,t)=>()=>{for(let e of t.keys())Ks(e);e.clear()},Js=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Ys=Rs(Ko(`${Bs}/add`),{withTypes:()=>Ys}),Xs=Ko(`${Bs}/removeAll`),Zs=Rs(Ko(`${Bs}/remove`),{withTypes:()=>Zs}),Qs=(...e)=>{console.error(`${Bs}/error`,...e)},$s=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Qs}=e;ks(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Ks(e)}),c=(e=>{let n=Gs(t,e)??Ws(e);return s(n)});Rs(c,{withTypes:()=>c});let l=e=>{let n=Gs(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Ks(n)),!!n};Rs(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Hs(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Rs({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Ls(u.signal),pause:Is(u.signal),extra:a,signal:u.signal,fork:Vs(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(Es),n.delete(e))})},cancel:()=>{u.abort(Es),e.pending.delete(u)},throwIfCancelled:()=>{Ns(u.signal)}})))}catch(e){e instanceof Os||Js(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(Ds),i(e),e.pending.delete(u)}},d=qs(t,n);return{middleware:e=>n=>r=>{if(!va(r))return n(r);if(Ys.match(r))return c(r.payload);if(Xs.match(r)){d();return}if(Zs.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===zs)throw Error(ec(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,Js(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=zs}return s},startListening:c,stopListening:l,clearListeners:d}};function ec(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tc=ps({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),nc=tc.actions,rc=nc.setMargin,ic=nc.setLayout,ac=nc.setChartSize,oc=nc.setScale,sc=tc.reducer;function cc(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function G(e){return Number.isFinite(e)}function lc(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uc(Object(n),!0).forEach(function(t){fc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fc(e,t,n){return(t=pc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(e){var t=mc(e,`string`);return typeof t==`symbol`?t:t+``}function mc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function K(e,t,n){return R(e)||R(t)?n:Pt(t)?Et(e,t,n):typeof t==`function`?t(e):n}var hc=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(Qt(c)){if(c===`top`&&L(e.top))return dc(dc({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&L(e.bottom))return dc(dc({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&L(e.left))return dc(dc({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&L(e.right))return dc(dc({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&L(e[a]))return dc(dc({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&L(e[o]))return dc(dc({},e),{},{[o]:e[o]+(i||0)})}return e},gc=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,_c=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},vc=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?jt(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return G(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(Ht):c&&l?l.map((e,t)=>{var n=o.map(e);return G(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ht):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return G(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ht):o.domain().map((e,t)=>{var n=o.map(e);return G(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(Ht)},yc=(e,t)=>{if(!t||t.length!==2||!L(t[0])||!L(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!L(e[0])||e[0]<n)&&(i[0]=n),(!L(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},bc={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=Mt(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Xn,none:Gn,silhouette:Zn,wiggle:Qn,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=Mt(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},xc=(e,t,n)=>{var r=bc[n]??Gn,i=Yn().keys(t).value((e,t)=>Number(K(e,t,0))).order(Kn).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=K(e[i],t[r],0);Array.isArray(a)&&a.length===2&&L(a[0])&&L(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function Sc(e){return e==null?void 0:String(e)}function Cc(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!R(i[t.dataKey])){var s=Bt(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=K(i,R(o)?t.dataKey:o),l=t.scale.map(c);return L(l)?l:null}var wc=e=>{var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=K(a,t.dataKey,t.scale.domain()[o]);if(R(s))return null;var c=t.scale.map(s);return L(c)?c-i/2+r:null},Tc=e=>{var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Ec=e=>{var t=e.flat(2).filter(L);return[Math.min(...t),Math.max(...t)]},Dc=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Oc=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return Dc(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=Ec(cc(r,t,n));return!G(i[0])||!G(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},kc=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ac=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jc=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Yi(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;s<c;s++){var l=(i[s]?.coordinate||0)-(i[s-1]?.coordinate||0);a.push(l),o=Math.max(l,o)}var u=o*1e-4,d=1/0;for(var f of a)f>u&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function Mc(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return dc(dc({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Nc(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Pc=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},Fc=(e,t)=>t===`centric`?e.angle:e.radius,Ic=e=>e.layout.width,Lc=e=>e.layout.height,Rc=e=>e.layout.scale,zc=e=>e.layout.margin,Bc=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Vc=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Hc=`data-recharts-item-index`;function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Uc(Object(n),!0).forEach(function(t){Gc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gc(e,t,n){return(t=Kc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kc(e){var t=qc(e,`string`);return typeof t==`symbol`?t:t+``}function qc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Jc=e=>e.brush.height;function Yc(e){return Vc(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Xc(e){return Vc(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Zc(e){return Bc(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function Qc(e){return Bc(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var $c=H([Ic,Lc,zc,Jc,Yc,Xc,Zc,Qc,Xi,Zi],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Wc(Wc({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=hc(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Wc(Wc({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),el=H($c,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),tl=H(Ic,Lc,(e,t)=>({x:0,y:0,width:e,height:t})),nl=(0,F.createContext)(null),rl=()=>(0,F.useContext)(nl)!=null,il=e=>e.brush,al=H([il,$c,zc],(e,t,n)=>({height:e.height,x:L(e.x)?e.x:t.left,y:L(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:L(e.width)?e.width:t.width}));function ol(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function sl(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=ol(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function cl(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return sl(e,t,{leading:r,maxWait:t,trailing:i})}var ll=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},ul={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},dl=(e,t,n)=>{var r=n.width,i=r===void 0?ul.width:r,a=n.height,o=a===void 0?ul.height:a,s=n.aspect,c=n.maxHeight,l=Nt(i)?e:Number(i),u=Nt(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},fl={width:0,height:0,overflow:`visible`},pl={width:0,overflowX:`visible`},ml={height:0,overflowY:`visible`},hl={},gl=e=>{var t=e.width,n=e.height,r=Nt(t),i=Nt(n);return r&&i?fl:r?pl:i?ml:hl};function _l(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=ul.width,a=ul.height):i===void 0?i=r&&r>0?void 0:ul.width:a===void 0&&(a=r&&r>0?void 0:ul.height),{width:i,height:a}}var vl=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function yl(){return yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yl.apply(null,arguments)}function bl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bl(Object(n),!0).forEach(function(t){Sl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sl(e,t,n){return(t=Cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cl(e){var t=wl(e,`string`);return typeof t==`symbol`?t:t+``}function wl(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Tl(e,t){return Al(e)||kl(e,t)||Dl(e,t)||El()}function El(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dl(e,t){if(e){if(typeof e==`string`)return Ol(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ol(e,t):void 0}}function Ol(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kl(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Al(e){if(Array.isArray(e))return e}function jl(e,t){if(e==null)return{};var n,r,i=Ml(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ml(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Nl=(0,F.createContext)(ul.initialDimension);function Pl(e){return lc(e.width)&&lc(e.height)}function Fl(e){var t=e.children,n=e.width,r=e.height,i=(0,F.useMemo)(()=>({width:n,height:r}),[n,r]);return Pl(i)?F.createElement(Nl.Provider,{value:i},t):null}var Il=()=>(0,F.useContext)(Nl),Ll=(0,F.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?ul.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,c=s===void 0?ul.minWidth:s,l=e.minHeight,u=e.maxHeight,d=e.children,f=e.debounce,p=f===void 0?ul.debounce:f,m=e.id,h=e.className,g=e.onResize,_=e.style,v=_===void 0?{}:_,y=jl(e,vl),b=(0,F.useRef)(null),x=(0,F.useRef)();x.current=g,(0,F.useImperativeHandle)(t,()=>b.current);var S=Tl((0,F.useState)({containerWidth:i.width,containerHeight:i.height}),2),C=S[0],w=S[1],T=(0,F.useCallback)((e,t)=>{w(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,F.useEffect)(()=>{if(b.current==null||typeof ResizeObserver>`u`)return Ut;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;T(i,a),(t=x.current)==null||t.call(x,i,a)}};p>0&&(e=cl(e,p,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=b.current.getBoundingClientRect(),r=n.width,i=n.height;return T(r,i),t.observe(b.current),()=>{t.disconnect()}},[T,p]);var E=C.containerWidth,D=C.containerHeight;ll(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var O=dl(E,D,{width:a,height:o,aspect:n,maxHeight:u}),k=O.calculatedWidth,A=O.calculatedHeight;return ll(E<0||D<0||k!=null&&k>0||A!=null&&A>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
4
4
|
please check the style of container, or the props width(%s) and height(%s),
|
|
@@ -4811,7 +4811,7 @@ export { validateDecisionRequest } from './src/kernel/engine/decision.js';
|
|
|
4811
4811
|
export { prepareLiveInboundText } from './src/kernel/engine/live-inbound.js';
|
|
4812
4812
|
export type { LiveIngressChannel } from './src/kernel/engine/live-ingress.js';
|
|
4813
4813
|
export { assertLiveIngress, assertLiveIngressConfigured, hasAnyLiveIngress, liveIngressChannelDefault, liveIngressEnabled, liveIngressEnabledFromSpec, } from './src/kernel/engine/live-ingress.js';
|
|
4814
|
-
export type { RunSessionOptions, SignInGatePolicy } from './src/kernel/engine/session/mod.js';
|
|
4814
|
+
export type { LiveLine, LiveLineRole, LiveLines, RunSessionOptions, SignInGatePolicy, } from './src/kernel/engine/session/mod.js';
|
|
4815
4815
|
export type { TokenCount, TokenEstimator, } from './src/kernel/engine/token-estimate.js';
|
|
4816
4816
|
export { loadTokenEstimator, TOKEN_TEXT_ENCODING, } from './src/kernel/engine/token-estimate.js';
|
|
4817
4817
|
export { sumTokens } from './src/kernel/engine/usage.js';
|
|
@@ -10254,9 +10254,10 @@ export interface AgentCall {
|
|
|
10254
10254
|
* \`host\` is what the called agent's tools read as \`ctx.host\`; omit it and they
|
|
10255
10255
|
* read none, because the caller's is not passed down. \`path\` is the path the
|
|
10256
10256
|
* called agent's turn runs on; omit it and its turn has none, so it gets only
|
|
10257
|
-
* tools on every path (\`'*'\`).
|
|
10257
|
+
* tools on every path (\`'*'\`). \`options\` fills the called profile's own
|
|
10258
|
+
* \`identity.options\`, for its \`when\` lines; the caller's are not passed down.
|
|
10258
10259
|
*/
|
|
10259
|
-
export interface AgentCallRequest extends Partial<Pick<TurnRequest, 'input' | 'speech' | 'effort' | 'builtInArgs' | 'metadata' | 'onStage' | 'conversationId' | 'host' | 'path'>> {
|
|
10260
|
+
export interface AgentCallRequest extends Partial<Pick<TurnRequest, 'input' | 'speech' | 'effort' | 'builtInArgs' | 'metadata' | 'onStage' | 'conversationId' | 'host' | 'path' | 'options'>> {
|
|
10260
10261
|
model?: ModelId;
|
|
10261
10262
|
provider?: import('../protocols/runtime.js').ProviderHostOptions;
|
|
10262
10263
|
}
|
|
@@ -13135,9 +13136,42 @@ export interface RunSessionOptions extends ProviderHostOptions {
|
|
|
13135
13136
|
* the call's next result; unanswered by then, the model reads that the sign-in expired.
|
|
13136
13137
|
*/
|
|
13137
13138
|
signInGate?: SignInGatePolicy;
|
|
13139
|
+
/**
|
|
13140
|
+
* Give each line of the call an id the model can cite, and hand each finished line to the
|
|
13141
|
+
* host. Unset, lines get no ids and the host reads them from \`events()\`.
|
|
13142
|
+
*/
|
|
13143
|
+
lines?: LiveLines;
|
|
13138
13144
|
}
|
|
13139
13145
|
/** How a sign-in gate behaves in a live session: \`hold\` waits for the decision, \`answer\` tells the model the sign-in is pending and releases the call. */
|
|
13140
13146
|
export type SignInGatePolicy = 'hold' | 'answer';
|
|
13147
|
+
/** Who said a line of the call. */
|
|
13148
|
+
export type LiveLineRole = 'user' | 'assistant';
|
|
13149
|
+
/** One finished line of the call: all the user said before the model acted on it, or all the model said in one turn. */
|
|
13150
|
+
export type LiveLine = {
|
|
13151
|
+
id: string;
|
|
13152
|
+
role: LiveLineRole;
|
|
13153
|
+
text: string;
|
|
13154
|
+
};
|
|
13155
|
+
/**
|
|
13156
|
+
* The host's ids and store for the lines of a live call. The model reads a user line's note
|
|
13157
|
+
* before the line (at the opening, then as each user line closes), so it can cite the line it
|
|
13158
|
+
* is hearing; it reads the model's own line's note after that line is kept.
|
|
13159
|
+
*/
|
|
13160
|
+
export interface LiveLines {
|
|
13161
|
+
/** A new id for a line still to come. A failure fails the open, or the line that needed it. */
|
|
13162
|
+
reserve(): Promise<string>;
|
|
13163
|
+
/** What the model reads to learn a line's id, in the host's words. */
|
|
13164
|
+
note(line: {
|
|
13165
|
+
id: string;
|
|
13166
|
+
role: LiveLineRole;
|
|
13167
|
+
}): string;
|
|
13168
|
+
/**
|
|
13169
|
+
* Take a finished line. The session waits for it before the model's next tool call reaches
|
|
13170
|
+
* the host, so resolve once the line is the host's (queued durably), not once it is stored
|
|
13171
|
+
* far away. A failure ends the session with that error.
|
|
13172
|
+
*/
|
|
13173
|
+
keep(line: LiveLine): Promise<void>;
|
|
13174
|
+
}
|
|
13141
13175
|
/**
|
|
13142
13176
|
* The session record is written however the session ends, including when opening fails. An unknown
|
|
13143
13177
|
* profile fails to open and is recorded under the standard observability policy.
|