@theoremjs/studio 0.3.5-next.958.gc25a02b → 0.3.5-next.960.g9f17ea5

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.
Files changed (46) hide show
  1. package/package.json +4 -4
  2. package/page/assets/{BottomSheet-B2HRxEIW.js → BottomSheet-B76bYV7l.js} +1 -1
  3. package/page/assets/{ConsoleFrame-ZWw8fT1L.js → ConsoleFrame-Br18-H-L.js} +1 -1
  4. package/page/assets/{ContextMenu-BX0XQSno.js → ContextMenu-CWCFt_A9.js} +2 -2
  5. package/page/assets/{DateInput-LdK7w6Z8.js → DateInput-CHgeGI72.js} +1 -1
  6. package/page/assets/{DropdownMenu-CIVGNz4h.js → DropdownMenu-B7qlpJMN.js} +2 -2
  7. package/page/assets/{Link-DoO_JJkN.js → Link-CoZ2PEEH.js} +1 -1
  8. package/page/assets/{MenuBottomSheet-AbFupoN4.js → MenuBottomSheet-DTWrKjqd.js} +1 -1
  9. package/page/assets/{PowerSearchBottomSheet-Djh2vYKT.js → PowerSearchBottomSheet-JEzrA2S1.js} +1 -1
  10. package/page/assets/{RankedBars-DtFnjHSy.js → RankedBars-B7JtgEd8.js} +1 -1
  11. package/page/assets/{SchemaFields-BeNkEqCZ.js → SchemaFields-rpQ2ndVm.js} +1 -1
  12. package/page/assets/{ShapedData-DqEg56yz.js → ShapedData-DANaXMJn.js} +1 -1
  13. package/page/assets/{TokenizerBottomSheet-BJzcosuD.js → TokenizerBottomSheet-DDSCJrAx.js} +1 -1
  14. package/page/assets/{ToolResultCharts-DapqhbaR.js → ToolResultCharts-Tw5-hBtI.js} +1 -1
  15. package/page/assets/{Toolbar-BvTOKTmV.js → Toolbar-DWnKfd9u.js} +1 -1
  16. package/page/assets/{TraceInspector-Ll5L22bv.js → TraceInspector-BWk5scIX.js} +2 -2
  17. package/page/assets/{TraceOverview-WRkKQGKd.js → TraceOverview-BWtz7u6z.js} +1 -1
  18. package/page/assets/{browser-connection-D4GqGCL4.js → browser-connection-i2GAg2Qq.js} +1 -1
  19. package/page/assets/{browser-engine-Dm5mv6ma.js → browser-engine-BXIwcNZY.js} +1 -1
  20. package/page/assets/{browser-transport-CUuUQaCA.js → browser-transport-D22c6aTk.js} +2 -2
  21. package/page/assets/{compile-BrFJrVih.js → compile-BJ0hioSk.js} +1 -1
  22. package/page/assets/{export-agent-CWYuNd7s.js → export-agent-GhQdRXOF.js} +1 -1
  23. package/page/assets/{getRadiusAndStrokeWidthFromDot-c760lgm5.js → getRadiusAndStrokeWidthFromDot-8x8WbODw.js} +1 -1
  24. package/page/assets/{guardrail-health-EPRVRCTx.js → guardrail-health-CoKlrXPK.js} +1 -1
  25. package/page/assets/{guardrail-tester-OiTfcTMa.js → guardrail-tester-BxATAiSd.js} +1 -1
  26. package/page/assets/{index-BinQWWK2.js → index-CIBF2GPN.js} +8 -8
  27. package/page/assets/{json-code-DqFKU0DV.js → json-code-BOR-Xpv5.js} +1 -1
  28. package/page/assets/{live-messages-GTomZISV.js → live-messages-BD2DHFi0.js} +1 -1
  29. package/page/assets/{prompt-row-CGB8aK59.js → prompt-row-jPg6xjte.js} +1 -1
  30. package/page/assets/{reader-HIVBwdJq.js → reader-C-rxg61s.js} +1 -1
  31. package/page/assets/{registry-DoOGDboH.js → registry-sNoz1vt0.js} +1 -1
  32. package/page/assets/schema-C6vwXzod.js +3 -0
  33. package/page/assets/{studio-code-pane-j0Qw1ly_.js → studio-code-pane-DeXQdsv-.js} +1 -1
  34. package/page/assets/{studio-console-DqA5jzTx.js → studio-console-BciG1nqS.js} +1 -1
  35. package/page/assets/{studio-decision-CGwJ_wmO.js → studio-decision-9z7f-u6K.js} +1 -1
  36. package/page/assets/{studio-embedding-JpbEill7.js → studio-embedding-CPwaBQN4.js} +1 -1
  37. package/page/assets/{studio-host-console-Bqcw3Brg.js → studio-host-console-C5r2jNwL.js} +2 -2
  38. package/page/assets/{studio-live-BQXqiWdL.js → studio-live-B9yfow3V.js} +1 -1
  39. package/page/assets/{studio-map-CZ1x10ev.js → studio-map-DQHxJMdR.js} +1 -1
  40. package/page/assets/{studio-media-BqmYQ2fb.js → studio-media-Cxt3K0AZ.js} +1 -1
  41. package/page/assets/{studio-trace-replay-fIvGv5x5.js → studio-trace-replay-B0TXgWAc.js} +1 -1
  42. package/page/assets/{turn-client-N1jwIzkQ.js → turn-client-D1-EN8SX.js} +1 -1
  43. package/page/assets/{use-one-call-BiYoLwop.js → use-one-call-BWrjmvLX.js} +1 -1
  44. package/page/assets/{useDismissSearchOnTouchDrag-DFWceyuJ.js → useDismissSearchOnTouchDrag-D8C62kG8.js} +1 -1
  45. package/page/index.html +13 -13
  46. package/page/assets/schema-BPBkpGlR.js +0 -3
@@ -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{P as a}from"./useLayerDismissal-DwwLDEpO.js";import{t as o}from"./Icon-Cd9sDRzY.js";import{t as s}from"./Text-Cq4yqBpQ.js";import{t as c}from"./Button-Bwkht0RI.js";import{t as l}from"./Tooltip-Rh2iV9Vn.js";import{n as u,t as d}from"./Timestamp-CVGzbkGE.js";import{i as f,r as p,t as m}from"./row-keys-0Bn7ZyYy.js";import{C as h,D as g,S as _,do as v,hn as y,k as b}from"./shaped-data-6dHnx8Ju.js";import{n as x}from"./trace-record-D7r7Ay3S.js";import{l as S,n as C}from"./labels-provider-M5ttLlLm.js";import{t as w}from"./useLocale-CPtOawsd.js";import{t as T}from"./HStack-B00ufja5.js";import{t as E}from"./IconButton-BenRR-zK.js";import{t as D}from"./VStack-D1ZLA9g3.js";import{t as O}from"./Card-C6l0Ne1A.js";import{n as k,t as A}from"./MetadataListItem-D_UEO4Yo.js";import{D as j,It as M}from"./index-BinQWWK2.js";var N=[b,g,h,_],ee={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.`}},te={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.`}},ne={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 re(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 ie={...re(v.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.`}},ae=re(v.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`}),oe={...ae,provider_error:ie.provider_error,stream_incomplete:ie.stream_incomplete,grader_error:{label:`Grader failed`,doc:`The grader threw instead of returning a result.`}},se={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.`}},ce={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.`}},le=re(v.TOOL_PERMISSION,{auto:`Automatic`,session_consent:`Ask once`,always_confirm:`Always ask`}),ue={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.`}},de={code:{label:`Code`,doc:`A deterministic check over the trace.`},model:{label:`Model`,doc:`A judge profile read the transcript.`}},fe={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.`}},pe={budget:{label:`Cost ceiling`,doc:`The summed cost crossed the ceiling the host set.`}},me={capability:{label:`Capability`,doc:`Can the agent do this at all?`},regression:{label:`Regression`,doc:`Does the agent still do this?`}},he={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, such as 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.`}},ge={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.`}},_e=Object.fromEntries(N.map(e=>[e.traceName??e.id,{label:e.name,doc:e.description}])),ve={input:{label:`Input`,doc:`Tokens the model read.`},output:{label:`Output`,doc:`Tokens the model wrote.`}},ye={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.`}},be={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.`}},xe={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.`},end:{label:`Ended`,doc:`Ended the turn once the calls in its step settled.`}},Se={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.`}},Ce={"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.`}},we={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.`}},Te={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.`}},Ee={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.`}},De={info:{label:`Info`,doc:`Noted only.`},low:{label:`Low`,doc:`Low risk.`},medium:{label:`Medium`,doc:`Medium risk.`},high:{label:`High`,doc:`High risk.`}},Oe={query:{label:`Query`,doc:`The input is what a search looks for.`},document:{label:`Document`,doc:`The input is what a search looks through.`}},ke={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.`}},Ae={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.`}},je=re(v.COMPACTION_TIMINGS,{before:`Before the turn`,after:`After the turn`}),Me=re(v.COMPACTION_METERS,{history:`History`,input:`Whole input`}),Ne=re(v.COMPACTION_OUTCOMES,{compacted:`Compacted`,deferred:`Kept whole`,dropped:`Dropped`}),Pe={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.`}},Fe={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.`}},Ie={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 Le(e,t,n,r){return{label:t,doc:n,format:`object`,group:e,fields:r}}var Re={input:P(`request`,`Input`,`boolean`,`Transcribe the user's audio.`),output:P(`request`,`Output`,`boolean`,`Transcribe the model's audio.`)},ze={"gen_ai.operation.name":P(`agent`,`Operation`,`text`,`What this span did.`,he),"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.`,ie),"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.`,ue),"gen_ai.provider.name":{...P(`request`,`Provider`,`id`,`Who served the call; a local server by its declared name. Absent when unknown.`,_e),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.`,ge),"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":Le(`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":Le(`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":Le(`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":Le(`request`,`Live settings`,`The Live session setup, as sent.`,{voice:P(`request`,`Voice`,`text`,`The voice the model speaks in.`),vad:Le(`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:Le(`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:Le(`request`,`Transcription`,`Which audio the provider transcribes.`,Re),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 the provider counts for its own tools; already inside input tokens.`),"theorem.usage.grounding":Le(`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.`,ve),"theorem.usage.unknown_media":Le(`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.`,se),"theorem.tool.origin":P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,ce),"theorem.tool.permission":P(`tool`,`Permission`,`text`,`The tool's permission tier.`,le),"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.`,oe),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.`,Ie),"theorem.source":P(`part`,`Source`,`text`,`Where this text came from, when it is not the model’s own.`,ye),"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.`,Oe),"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.`,de),"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.`,fe),"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.`,pe),"vcs.ref.head.revision":P(`evaluation`,`Commit`,`id`,`The commit under test.`)},Be=/^(?:gen_ai|theorem)\.usage\.([a-z]+)\.(input|output)_tokens$/,Ve=/^http\.(request|response)\.header\.(.+)$/;function He(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ue(e){let t=ze[e];if(t)return t;let n=Be.exec(e);if(n){let[,e=``,t=``]=n;return P(`usage`,`${He(e)} ${t} tokens`,`tokens`,`${He(t)} tokens that were ${e}, as the provider reported them.`)}let r=Ve.exec(e);if(r){let[,e=``,t=``]=r;return P(`http`,`${He(e)} header ${t}`,`list`,`The ${e} header, as sent. A key, auth, cookie, secret, or token header is [redacted].`)}}var We=Le(`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.`,Ce),open:!0},severity:P(`error`,`Severity`,`text`,`How serious the rule says a match is.`,De),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.`)}),Ge={"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.`,be),affordance:P(`agent`,`Applied`,`list`,`What the hooks did; empty when they did nothing.`,xe),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.hook_failed":{label:`Hook failed`,doc:`A host hook threw, and the turn went on without its answer.`,attributes:{hook:P(`error`,`Hook`,`id`,`Which host hook threw.`),stage:P(`agent`,`Stage`,`text`,`The stage whose hook threw.`,be),error_kind:P(`error`,`Error`,`text`,`The kind of what it threw.`,ae),reason:P(`error`,`Reason`,`content`,`What it threw, in its own words.`)}},"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.`,we),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.`,Se),trust:P(`agent`,`Trust`,`text`,`How far that text is trusted.`,Te),action:P(`agent`,`Action`,`text`,`What the guardrail did.`,Ee),hits:We,provenance:Le(`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.`,ce),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.`,Ae)}},"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.`,je),meter:P(`agent`,`Counts`,`text`,`What the threshold counts.`,Me),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.`,Ne),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.`,ie),failure_error:P(`agent`,`Compactor error`,`text`,`The error the compactor failed with.`,ae),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`,`The provider's search suggestions, as HTML.`),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.`,ke),permission:P(`tool`,`Permission`,`text`,`The tool's permission tier.`,le),summary:P(`tool`,`Summary`,`content`,`What the user is asked to approve.`),auth:Le(`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.`,Pe),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.`,Fe),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`,`Whether the case asks for something new or guards something that works.`,me),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 Ke(e){return Ge[e]}function qe(e,t){return Ge[e]?.attributes[t]??Ue(t)}var Je={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 Ye(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function Xe(e,t){let n={type:e,...Je[e]};return t?{...n,subject:t}:n}function Ze(e){switch(Ye(e,`gen_ai.operation.name`)){case`invoke_agent`:return Xe(e.events.some(e=>e.name===`theorem.session`)?`session`:`turn`,Ye(e,`gen_ai.agent.name`));case`chat`:case`generate_content`:case`transcribe`:return Xe(`theorem.request.live`in e.attributes?`response`:`call`,Ye(e,`gen_ai.request.model`));case`execute_tool`:return Xe(`tool`,Ye(e,`gen_ai.tool.name`));case`decide`:return Xe(`decision`,Ye(e,`gen_ai.agent.name`));case`embeddings`:return Xe(`call`,Ye(e,`gen_ai.request.model`))}return`http.request.method`in e.attributes?Xe(`http`,Ye(e,`url.path`)):e.name===`cutout`?Xe(`cutout`,Ye(e,`url.path`)):e.name===`theorem.eval.trial`||e.name===`theorem.eval.run`?Xe(`evaluation`,Ye(e,`theorem.evaluation.suite`)):Xe(`host`,e.name)}var F=t(r()),Qe=a();function $e(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=$e(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=$e(e))&&(r&&(r+=` `),r+=t);return r}var et=`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 tt(e){return typeof e==`string`&&et.includes(e)}var nt=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 rt(e){return typeof e==`string`&&nt.has(e)}function it(e){return typeof e==`string`&&e.startsWith(`data-`)}function at(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(rt(n)||it(n))&&(t[n]=e[n]);return t}function ot(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return at(t)}return typeof e==`object`&&!Array.isArray(e)?at(e):null}function st(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(rt(n)||it(n)||tt(n))&&(t[n]=e[n]);return t}function ct(e){return e==null?null:(0,F.isValidElement)(e)?st(e.props):typeof e==`object`&&!Array.isArray(e)?st(e):null}var lt=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function ut(){return ut=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},ut.apply(null,arguments)}function dt(e,t){if(e==null)return{};var n,r,i=ft(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 ft(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 pt=(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=dt(e,lt),d=a||{width:r,height:i,x:0,y:0},f=I(`recharts-surface`,o);return F.createElement(`svg`,ut({},st(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)}),mt=[`children`,`className`];function ht(){return ht=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},ht.apply(null,arguments)}function gt(e,t){if(e==null)return{};var n,r,i=_t(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 _t(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 vt=F.forwardRef((e,t)=>{var n=e.children,r=e.className,i=gt(e,mt),a=I(`recharts-layer`,r);return F.createElement(`g`,ht({className:a},st(i),{ref:t}),n)});function yt(e){return e===`__proto__`}var bt=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function xt(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:bt.test(e);default:return!1}}function St(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ct(e){return typeof e==`symbol`||e instanceof Symbol}function wt(e){return e==null?``:Tt(e)}function Tt(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Tt).join(`,`);if(Ct(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Et(e){if(Array.isArray(e))return e.map(St);if(typeof e==`symbol`)return[e];e=wt(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 Dt(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(yt(t))return n;let r=e[t];return r===void 0?xt(t)&&!Object.hasOwn(e,t)?Dt(e,Et(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=St(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Ot(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),yt(t))return n;let r=e[t];return r===void 0?n:r}}}function Ot(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||yt(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var kt=4;function At(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function jt(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+At(i)+n},``)}var Mt=e=>e===0?0:e>0?1:-1,Nt=e=>typeof e==`number`&&e!=+e,Pt=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!Nt(e),Ft=e=>L(e)||typeof e==`string`,It=0,Lt=e=>{var t=++It;return`${e||``}${t}`},Rt=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(Pt(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Nt(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},zt=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 Bt(e,t,n){return L(e)&&L(t)?At(e+n*(t-e)):t}function Vt(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):Dt(e,t))===n)}var R=e=>e==null,Ht=e=>R(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ut(e){return e!=null}function Wt(){}function Gt(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 Kt(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 qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kt(Object(n),!0).forEach(function(t){Jt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jt(e,t,n){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e){var t=Xt(e,`string`);return typeof t==`symbol`?t:t+``}function Xt(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 Zt=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Gt(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`?qt({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?qt({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?qt({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?qt({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?qt({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?qt({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?qt({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?qt({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||Pt(n.x))&&(L(n.y)||Pt(n.y))?qt({x:c+Rt(n.x,g),y:l+Rt(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):qt({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Qt=[`top`,`left`,`right`,`bottom`];function $t(e){return e==null?!1:typeof e==`object`||Qt.includes(e)}var en=(0,F.createContext)(null);function z(e){return function(){return e}}var tn=Math.PI,nn=2*tn,rn=1e-6,an=nn-rn;function on(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function sn(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return on;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 cn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?on:sn(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>rn){if(!(Math.abs(u*s-c*l)>rn)||!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((tn-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>rn&&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)>rn||Math.abs(this._y1-l)>rn)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%nn+nn),d>an?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>rn&&this._append`A${n},${n},0,${+(d>=tn)},${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._}};cn.prototype;function ln(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 cn(t)}Array.prototype.slice;function un(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function dn(e){this._context=e}dn.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 fn(e){return new dn(e)}function pn(e){return e[0]}function mn(e){return e[1]}function hn(e,t){var n=z(!0),r=null,i=fn,a=null,o=ln(s);e=typeof e==`function`?e:e===void 0?pn:z(e),t=typeof t==`function`?t:t===void 0?mn:z(t);function s(s){var c,l=(s=un(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 gn(e,t,n){var r=null,i=z(!0),a=null,o=fn,s=null,c=ln(l);e=typeof e==`function`?e:e===void 0?pn:z(+e),t=typeof t==`function`?t:z(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?mn:z(+n);function l(l){var u,d,f,p=(l=un(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 hn().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 _n=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 vn(e){return new _n(e,!0)}function yn(e){return new _n(e,!1)}function bn(){}function xn(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 Sn(e){this._context=e}Sn.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:xn(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:xn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cn(e){return new Sn(e)}function wn(e){this._context=e}wn.prototype={areaStart:bn,areaEnd:bn,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:xn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tn(e){return new wn(e)}function En(e){this._context=e}En.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:xn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dn(e){return new En(e)}function On(e){this._context=e}On.prototype={areaStart:bn,areaEnd:bn,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 kn(e){return new On(e)}function An(e){return e<0?-1:1}function jn(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(An(a)+An(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Mn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nn(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 Pn(e){this._context=e}Pn.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:Nn(this,this._t0,Mn(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,Nn(this,Mn(this,n=jn(this,e,t)),n);break;default:Nn(this,this._t0,n=jn(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Fn(e){this._context=new In(e)}(Fn.prototype=Object.create(Pn.prototype)).point=function(e,t){Pn.prototype.point.call(this,t,e)};function In(e){this._context=e}In.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 Ln(e){return new Pn(e)}function Rn(e){return new Fn(e)}function zn(e){this._context=e}zn.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=Bn(e),i=Bn(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 Bn(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 Vn(e){return new zn(e)}function Hn(e,t){this._context=e,this._t=t}Hn.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 Un(e){return new Hn(e,.5)}function Wn(e){return new Hn(e,0)}function Gn(e){return new Hn(e,1)}function Kn(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 qn(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Jn(e,t){return e[t]}function Yn(e){let t=[];return t.key=e,t}function Xn(){var e=z([]),t=qn,n=Kn,r=Jn;function i(i){var a=Array.from(e.apply(this,arguments),Yn),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=un(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?qn:typeof e==`function`?e:z(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Kn,i):n},i}function Zn(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}Kn(e,t)}}function Qn(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}Kn(e,t)}}function $n(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,Kn(e,t)}}var er=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,tr=(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=>{tt(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},nr=(e,t,n)=>r=>(e(t,n,r),null),rr=(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];tt(i)&&typeof a==`function`&&(r||={},r[i]=nr(a,t,n))}),r};function ir(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 ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ir(Object(n),!0).forEach(function(t){or(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function or(e,t,n){return(t=sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e){var t=cr(e,`string`);return typeof t==`symbol`?t:t+``}function cr(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 lr(e,t){var n=ar({},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 ur(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 dr(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function fr(e){return e}function pr(e){return Number.isSafeInteger(e)&&e>=0}function mr(e){return e!=null&&typeof e!=`function`&&pr(e.length)}function hr(e){return function(t){return Dt(t,e)}}function gr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _r(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function yr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var br=`[object RegExp]`,xr=`[object String]`,Sr=`[object Number]`,Cr=`[object Boolean]`,wr=`[object Arguments]`,Tr=`[object Symbol]`,Er=`[object Date]`,Dr=`[object Map]`,Or=`[object Set]`,kr=`[object Array]`,Ar=`[object Function]`,jr=`[object ArrayBuffer]`,Mr=`[object Object]`,Nr=`[object Error]`,Pr=`[object DataView]`,Fr=`[object Uint8Array]`,Ir=`[object Uint8ClampedArray]`,Lr=`[object Uint16Array]`,Rr=`[object Uint32Array]`,zr=`[object BigUint64Array]`,Br=`[object Int8Array]`,Vr=`[object Int16Array]`,Hr=`[object Int32Array]`,Ur=`[object BigInt64Array]`,Wr=`[object Float32Array]`,Gr=`[object Float64Array]`,Kr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function qr(e){return Kr.Buffer!==void 0&&Kr.Buffer.isBuffer(e)}function Jr(e,t){return Yr(e,void 0,e,new Map,t)}function Yr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(gr(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]=Yr(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,Yr(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(Yr(a,void 0,n,r,i));return t}if(qr(e))return e.subarray();if(_r(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Yr(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),Xr(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),Xr(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),Xr(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,Xr(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Xr(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Xr(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Xr(t,e,n,r,i),t}if(typeof e==`object`&&Zr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Xr(t,e,n,r,i),t}return e}function Xr(e,t,n=e,r,i){let a=[...Object.keys(t),...vr(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Yr(t[s],s,n,r,i))}}function Zr(e){switch(yr(e)){case wr:case kr:case jr:case Pr:case Cr:case Er:case Wr:case Gr:case Br:case Vr:case Hr:case Dr:case Sr:case Mr:case br:case Or:case xr:case Tr:case Fr:case Ir:case Lr:case Rr:return!0;default:return!1}}function Qr(e){return Yr(e,void 0,e,new Map,void 0)}function $r(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function ei(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ti(e,t,n){return typeof n==`function`?ni(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?ni(t,r,e,s,!1):!!c},new Map,!0):ti(e,t,()=>void 0)}function ni(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ri(e,t,n,r,i);case`function`:return Object.keys(t).length>0?ni(e,{...t},n,r,i):$r(e,t);default:return ei(e)&&i?typeof t!=`string`||t===``:$r(e,t)}}function ri(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return ai(e,t,n,r);if(t instanceof Map)return ii(e,t,n,r);if(t instanceof Set)return oi(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)gr(e)&&(e=Object(e));else{let t=yr(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 ii(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 ai(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 oi(e,t,n,r){return t.size===0||e instanceof Set&&ai([...e],[...t],n,r)}function si(e,t){return ti(e,t,()=>void 0)}function ci(e){return e=Qr(e),t=>si(t,e)}function li(e,t){return Jr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(yr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Xr(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Sr:case xr:case Cr:{let t=new e.constructor(e?.valueOf());return Xr(t,e),t}case wr:{let t={};return Xr(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ui(e){return li(e)}var di=/^(?:0|[1-9]\d*)$/;function fi(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 di.test(e)}}function pi(e){return typeof e==`object`&&!!e&&yr(e)===`[object Arguments]`}function mi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xt(t)&&!(t in Object(e))?Et(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=St(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||pi(r))&&fi(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function hi(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=St(e)}return t=ui(t),function(n){let r=Dt(n,e);return r===void 0?mi(n,e):t===void 0?r===void 0:si(r,t)}}function gi(e){if(e==null)return fr;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?hi(e[0],e[1]):ci(e);default:return hr(e)}}function _i(e){return e===0?0:e}function vi(e,t=fr){return mr(e)?ur(Array.from(e),dr(gi(t),1)).map(_i):[]}function yi(e,t,n){return t===!0?vi(e,n):typeof t==`function`?vi(e,t):e}var bi=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})),xi=n(((e,t)=>{t.exports=bi()})),Si=n((e=>{var t=r(),n=xi();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}})),Ci=n(((e,t)=>{t.exports=Si()}))(),wi=(0,F.createContext)(null),Ti=e=>e,B=()=>{var e=(0,F.useContext)(wi);return e?e.store.dispatch:Ti},Ei=()=>{},Di=()=>Ei,Oi=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(wi),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:Ei,[t,e]);return(0,Ci.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Di,t?t.store.getState:Ei,t?t.store.getState:Ei,n,Oi)}function ki(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Ai(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 ji=e=>Array.isArray(e)?e:[e];function Mi(e){let t=Array.isArray(e[0])?e[0]:e;return Ai(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Ni(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Pi=class{constructor(e){this.value=e}deref(){return this.value}},Fi=typeof WeakRef>`u`?Pi:WeakRef,Ii=0,Li=1;function Ri(){return{s:Ii,v:void 0,o:null,p:null}}function zi(e){return e instanceof Fi?e.deref():e}function Bi(e,t={}){let n=Ri(),{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=Ri(),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=Ri(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Li)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=zi(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Fi(c):c}return s.s=Li,s.v=c,c}return o.clearCache=()=>{n=Ri(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Vi(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()),ki(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Bi,argsMemoizeOptions:u=[]}={...n,...a},d=ji(c),f=ji(u),p=Mi(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Ni(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=Vi(Bi);function Hi(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 Ui(e,t,n){return ei(n)&&(typeof t==`number`&&mr(n)&&fi(t)&&t<n.length||typeof t==`string`&&t in n)?$r(n[t],e):!1}function Wi(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Gi=(e,t,n)=>{if(e!==t){let r=Wi(e),i=Wi(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},Ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qi=/^\w*$/;function Ji(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Ct(e)?!0:typeof e==`string`&&(qi.test(e)||!Ki.test(e))||t!=null&&Object.hasOwn(t,e)}function Yi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=mr(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)||Ji(e)?e:{key:e,path:Et(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=Gi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Xi(e,...t){let n=t.length;return n>1&&Ui(e,t[0],t[1])?t=[]:n>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),Yi(e,Hi(t),[`asc`])}var Zi=e=>e.legend.settings,Qi=e=>e.legend.size;H([e=>e.legend.payload,Zi],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Xi(r,n):r});function $i(e,t){return ia(e)||ra(e,t)||ta(e,t)||ea()}function ea(){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{P as a}from"./useLayerDismissal-DwwLDEpO.js";import{t as o}from"./Icon-Cd9sDRzY.js";import{t as s}from"./Text-Cq4yqBpQ.js";import{t as c}from"./Button-Bwkht0RI.js";import{t as l}from"./Tooltip-Rh2iV9Vn.js";import{n as u,t as d}from"./Timestamp-CVGzbkGE.js";import{i as f,r as p,t as m}from"./row-keys-0Bn7ZyYy.js";import{C as h,D as g,S as _,do as v,hn as y,k as b}from"./shaped-data-6dHnx8Ju.js";import{n as x}from"./trace-record-D7r7Ay3S.js";import{l as S,n as C}from"./labels-provider-M5ttLlLm.js";import{t as w}from"./useLocale-CPtOawsd.js";import{t as T}from"./HStack-B00ufja5.js";import{t as E}from"./IconButton-BenRR-zK.js";import{t as D}from"./VStack-D1ZLA9g3.js";import{t as O}from"./Card-C6l0Ne1A.js";import{n as k,t as A}from"./MetadataListItem-D_UEO4Yo.js";import{D as j,It as M}from"./index-CIBF2GPN.js";var N=[b,g,h,_],ee={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.`}},te={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.`}},ne={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 re(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 ie={...re(v.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.`}},ae=re(v.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`}),oe={...ae,provider_error:ie.provider_error,stream_incomplete:ie.stream_incomplete,grader_error:{label:`Grader failed`,doc:`The grader threw instead of returning a result.`}},se={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.`}},ce={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.`}},le=re(v.TOOL_PERMISSION,{auto:`Automatic`,session_consent:`Ask once`,always_confirm:`Always ask`}),ue={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.`}},de={code:{label:`Code`,doc:`A deterministic check over the trace.`},model:{label:`Model`,doc:`A judge profile read the transcript.`}},fe={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.`}},pe={budget:{label:`Cost ceiling`,doc:`The summed cost crossed the ceiling the host set.`}},me={capability:{label:`Capability`,doc:`Can the agent do this at all?`},regression:{label:`Regression`,doc:`Does the agent still do this?`}},he={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, such as 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.`}},ge={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.`}},_e=Object.fromEntries(N.map(e=>[e.traceName??e.id,{label:e.name,doc:e.description}])),ve={input:{label:`Input`,doc:`Tokens the model read.`},output:{label:`Output`,doc:`Tokens the model wrote.`}},ye={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.`}},be={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.`}},xe={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.`},end:{label:`Ended`,doc:`Ended the turn once the calls in its step settled.`}},Se={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.`}},Ce={"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.`}},we={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.`}},Te={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.`}},Ee={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.`}},De={info:{label:`Info`,doc:`Noted only.`},low:{label:`Low`,doc:`Low risk.`},medium:{label:`Medium`,doc:`Medium risk.`},high:{label:`High`,doc:`High risk.`}},Oe={query:{label:`Query`,doc:`The input is what a search looks for.`},document:{label:`Document`,doc:`The input is what a search looks through.`}},ke={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.`}},Ae={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.`}},je=re(v.COMPACTION_TIMINGS,{before:`Before the turn`,after:`After the turn`}),Me=re(v.COMPACTION_METERS,{history:`History`,input:`Whole input`}),Ne=re(v.COMPACTION_OUTCOMES,{compacted:`Compacted`,deferred:`Kept whole`,dropped:`Dropped`}),Pe={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.`}},Fe={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.`}},Ie={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 Le(e,t,n,r){return{label:t,doc:n,format:`object`,group:e,fields:r}}var Re={input:P(`request`,`Input`,`boolean`,`Transcribe the user's audio.`),output:P(`request`,`Output`,`boolean`,`Transcribe the model's audio.`)},ze={"gen_ai.operation.name":P(`agent`,`Operation`,`text`,`What this span did.`,he),"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.`,ie),"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.`,ue),"gen_ai.provider.name":{...P(`request`,`Provider`,`id`,`Who served the call; a local server by its declared name. Absent when unknown.`,_e),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.`,ge),"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":Le(`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":Le(`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":Le(`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":Le(`request`,`Live settings`,`The Live session setup, as sent.`,{voice:P(`request`,`Voice`,`text`,`The voice the model speaks in.`),vad:Le(`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:Le(`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:Le(`request`,`Transcription`,`Which audio the provider transcribes.`,Re),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 the provider counts for its own tools; already inside input tokens.`),"theorem.usage.grounding":Le(`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.`,ve),"theorem.usage.unknown_media":Le(`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.`,se),"theorem.tool.origin":P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,ce),"theorem.tool.permission":P(`tool`,`Permission`,`text`,`The tool's permission tier.`,le),"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.`,oe),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.`,Ie),"theorem.source":P(`part`,`Source`,`text`,`Where this text came from, when it is not the model’s own.`,ye),"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.`,Oe),"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.`,de),"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.`,fe),"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.`,pe),"vcs.ref.head.revision":P(`evaluation`,`Commit`,`id`,`The commit under test.`)},Be=/^(?:gen_ai|theorem)\.usage\.([a-z]+)\.(input|output)_tokens$/,Ve=/^http\.(request|response)\.header\.(.+)$/;function He(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ue(e){let t=ze[e];if(t)return t;let n=Be.exec(e);if(n){let[,e=``,t=``]=n;return P(`usage`,`${He(e)} ${t} tokens`,`tokens`,`${He(t)} tokens that were ${e}, as the provider reported them.`)}let r=Ve.exec(e);if(r){let[,e=``,t=``]=r;return P(`http`,`${He(e)} header ${t}`,`list`,`The ${e} header, as sent. A key, auth, cookie, secret, or token header is [redacted].`)}}var We=Le(`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.`,Ce),open:!0},severity:P(`error`,`Severity`,`text`,`How serious the rule says a match is.`,De),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.`)}),Ge={"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.`,be),affordance:P(`agent`,`Applied`,`list`,`What the hooks did; empty when they did nothing.`,xe),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.hook_failed":{label:`Hook failed`,doc:`A host hook threw, and the turn went on without its answer.`,attributes:{hook:P(`error`,`Hook`,`id`,`Which host hook threw.`),stage:P(`agent`,`Stage`,`text`,`The stage whose hook threw.`,be),error_kind:P(`error`,`Error`,`text`,`The kind of what it threw.`,ae),reason:P(`error`,`Reason`,`content`,`What it threw, in its own words.`)}},"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.`,we),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.`,Se),trust:P(`agent`,`Trust`,`text`,`How far that text is trusted.`,Te),action:P(`agent`,`Action`,`text`,`What the guardrail did.`,Ee),hits:We,provenance:Le(`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.`,ce),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.`,Ae)}},"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.`,je),meter:P(`agent`,`Counts`,`text`,`What the threshold counts.`,Me),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.`,Ne),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.`,ie),failure_error:P(`agent`,`Compactor error`,`text`,`The error the compactor failed with.`,ae),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`,`The provider's search suggestions, as HTML.`),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.`,ke),permission:P(`tool`,`Permission`,`text`,`The tool's permission tier.`,le),summary:P(`tool`,`Summary`,`content`,`What the user is asked to approve.`),auth:Le(`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.`,Pe),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.`,Fe),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`,`Whether the case asks for something new or guards something that works.`,me),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 Ke(e){return Ge[e]}function qe(e,t){return Ge[e]?.attributes[t]??Ue(t)}var Je={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 Ye(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function Xe(e,t){let n={type:e,...Je[e]};return t?{...n,subject:t}:n}function Ze(e){switch(Ye(e,`gen_ai.operation.name`)){case`invoke_agent`:return Xe(e.events.some(e=>e.name===`theorem.session`)?`session`:`turn`,Ye(e,`gen_ai.agent.name`));case`chat`:case`generate_content`:case`transcribe`:return Xe(`theorem.request.live`in e.attributes?`response`:`call`,Ye(e,`gen_ai.request.model`));case`execute_tool`:return Xe(`tool`,Ye(e,`gen_ai.tool.name`));case`decide`:return Xe(`decision`,Ye(e,`gen_ai.agent.name`));case`embeddings`:return Xe(`call`,Ye(e,`gen_ai.request.model`))}return`http.request.method`in e.attributes?Xe(`http`,Ye(e,`url.path`)):e.name===`cutout`?Xe(`cutout`,Ye(e,`url.path`)):e.name===`theorem.eval.trial`||e.name===`theorem.eval.run`?Xe(`evaluation`,Ye(e,`theorem.evaluation.suite`)):Xe(`host`,e.name)}var F=t(r()),Qe=a();function $e(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=$e(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=$e(e))&&(r&&(r+=` `),r+=t);return r}var et=`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 tt(e){return typeof e==`string`&&et.includes(e)}var nt=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 rt(e){return typeof e==`string`&&nt.has(e)}function it(e){return typeof e==`string`&&e.startsWith(`data-`)}function at(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(rt(n)||it(n))&&(t[n]=e[n]);return t}function ot(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return at(t)}return typeof e==`object`&&!Array.isArray(e)?at(e):null}function st(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(rt(n)||it(n)||tt(n))&&(t[n]=e[n]);return t}function ct(e){return e==null?null:(0,F.isValidElement)(e)?st(e.props):typeof e==`object`&&!Array.isArray(e)?st(e):null}var lt=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function ut(){return ut=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},ut.apply(null,arguments)}function dt(e,t){if(e==null)return{};var n,r,i=ft(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 ft(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 pt=(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=dt(e,lt),d=a||{width:r,height:i,x:0,y:0},f=I(`recharts-surface`,o);return F.createElement(`svg`,ut({},st(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)}),mt=[`children`,`className`];function ht(){return ht=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},ht.apply(null,arguments)}function gt(e,t){if(e==null)return{};var n,r,i=_t(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 _t(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 vt=F.forwardRef((e,t)=>{var n=e.children,r=e.className,i=gt(e,mt),a=I(`recharts-layer`,r);return F.createElement(`g`,ht({className:a},st(i),{ref:t}),n)});function yt(e){return e===`__proto__`}var bt=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function xt(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:bt.test(e);default:return!1}}function St(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ct(e){return typeof e==`symbol`||e instanceof Symbol}function wt(e){return e==null?``:Tt(e)}function Tt(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Tt).join(`,`);if(Ct(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Et(e){if(Array.isArray(e))return e.map(St);if(typeof e==`symbol`)return[e];e=wt(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 Dt(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(yt(t))return n;let r=e[t];return r===void 0?xt(t)&&!Object.hasOwn(e,t)?Dt(e,Et(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=St(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Ot(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),yt(t))return n;let r=e[t];return r===void 0?n:r}}}function Ot(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||yt(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var kt=4;function At(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function jt(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+At(i)+n},``)}var Mt=e=>e===0?0:e>0?1:-1,Nt=e=>typeof e==`number`&&e!=+e,Pt=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!Nt(e),Ft=e=>L(e)||typeof e==`string`,It=0,Lt=e=>{var t=++It;return`${e||``}${t}`},Rt=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(Pt(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Nt(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},zt=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 Bt(e,t,n){return L(e)&&L(t)?At(e+n*(t-e)):t}function Vt(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):Dt(e,t))===n)}var R=e=>e==null,Ht=e=>R(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ut(e){return e!=null}function Wt(){}function Gt(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 Kt(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 qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kt(Object(n),!0).forEach(function(t){Jt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jt(e,t,n){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e){var t=Xt(e,`string`);return typeof t==`symbol`?t:t+``}function Xt(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 Zt=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Gt(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`?qt({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?qt({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?qt({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?qt({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?qt({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?qt({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?qt({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?qt({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||Pt(n.x))&&(L(n.y)||Pt(n.y))?qt({x:c+Rt(n.x,g),y:l+Rt(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):qt({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Qt=[`top`,`left`,`right`,`bottom`];function $t(e){return e==null?!1:typeof e==`object`||Qt.includes(e)}var en=(0,F.createContext)(null);function z(e){return function(){return e}}var tn=Math.PI,nn=2*tn,rn=1e-6,an=nn-rn;function on(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function sn(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return on;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 cn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?on:sn(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>rn){if(!(Math.abs(u*s-c*l)>rn)||!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((tn-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>rn&&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)>rn||Math.abs(this._y1-l)>rn)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%nn+nn),d>an?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>rn&&this._append`A${n},${n},0,${+(d>=tn)},${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._}};cn.prototype;function ln(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 cn(t)}Array.prototype.slice;function un(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function dn(e){this._context=e}dn.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 fn(e){return new dn(e)}function pn(e){return e[0]}function mn(e){return e[1]}function hn(e,t){var n=z(!0),r=null,i=fn,a=null,o=ln(s);e=typeof e==`function`?e:e===void 0?pn:z(e),t=typeof t==`function`?t:t===void 0?mn:z(t);function s(s){var c,l=(s=un(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 gn(e,t,n){var r=null,i=z(!0),a=null,o=fn,s=null,c=ln(l);e=typeof e==`function`?e:e===void 0?pn:z(+e),t=typeof t==`function`?t:z(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?mn:z(+n);function l(l){var u,d,f,p=(l=un(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 hn().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 _n=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 vn(e){return new _n(e,!0)}function yn(e){return new _n(e,!1)}function bn(){}function xn(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 Sn(e){this._context=e}Sn.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:xn(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:xn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cn(e){return new Sn(e)}function wn(e){this._context=e}wn.prototype={areaStart:bn,areaEnd:bn,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:xn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tn(e){return new wn(e)}function En(e){this._context=e}En.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:xn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dn(e){return new En(e)}function On(e){this._context=e}On.prototype={areaStart:bn,areaEnd:bn,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 kn(e){return new On(e)}function An(e){return e<0?-1:1}function jn(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(An(a)+An(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Mn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nn(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 Pn(e){this._context=e}Pn.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:Nn(this,this._t0,Mn(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,Nn(this,Mn(this,n=jn(this,e,t)),n);break;default:Nn(this,this._t0,n=jn(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Fn(e){this._context=new In(e)}(Fn.prototype=Object.create(Pn.prototype)).point=function(e,t){Pn.prototype.point.call(this,t,e)};function In(e){this._context=e}In.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 Ln(e){return new Pn(e)}function Rn(e){return new Fn(e)}function zn(e){this._context=e}zn.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=Bn(e),i=Bn(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 Bn(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 Vn(e){return new zn(e)}function Hn(e,t){this._context=e,this._t=t}Hn.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 Un(e){return new Hn(e,.5)}function Wn(e){return new Hn(e,0)}function Gn(e){return new Hn(e,1)}function Kn(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 qn(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Jn(e,t){return e[t]}function Yn(e){let t=[];return t.key=e,t}function Xn(){var e=z([]),t=qn,n=Kn,r=Jn;function i(i){var a=Array.from(e.apply(this,arguments),Yn),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=un(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?qn:typeof e==`function`?e:z(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Kn,i):n},i}function Zn(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}Kn(e,t)}}function Qn(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}Kn(e,t)}}function $n(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,Kn(e,t)}}var er=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,tr=(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=>{tt(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},nr=(e,t,n)=>r=>(e(t,n,r),null),rr=(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];tt(i)&&typeof a==`function`&&(r||={},r[i]=nr(a,t,n))}),r};function ir(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 ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ir(Object(n),!0).forEach(function(t){or(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function or(e,t,n){return(t=sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e){var t=cr(e,`string`);return typeof t==`symbol`?t:t+``}function cr(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 lr(e,t){var n=ar({},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 ur(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 dr(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function fr(e){return e}function pr(e){return Number.isSafeInteger(e)&&e>=0}function mr(e){return e!=null&&typeof e!=`function`&&pr(e.length)}function hr(e){return function(t){return Dt(t,e)}}function gr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _r(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function yr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var br=`[object RegExp]`,xr=`[object String]`,Sr=`[object Number]`,Cr=`[object Boolean]`,wr=`[object Arguments]`,Tr=`[object Symbol]`,Er=`[object Date]`,Dr=`[object Map]`,Or=`[object Set]`,kr=`[object Array]`,Ar=`[object Function]`,jr=`[object ArrayBuffer]`,Mr=`[object Object]`,Nr=`[object Error]`,Pr=`[object DataView]`,Fr=`[object Uint8Array]`,Ir=`[object Uint8ClampedArray]`,Lr=`[object Uint16Array]`,Rr=`[object Uint32Array]`,zr=`[object BigUint64Array]`,Br=`[object Int8Array]`,Vr=`[object Int16Array]`,Hr=`[object Int32Array]`,Ur=`[object BigInt64Array]`,Wr=`[object Float32Array]`,Gr=`[object Float64Array]`,Kr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function qr(e){return Kr.Buffer!==void 0&&Kr.Buffer.isBuffer(e)}function Jr(e,t){return Yr(e,void 0,e,new Map,t)}function Yr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(gr(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]=Yr(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,Yr(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(Yr(a,void 0,n,r,i));return t}if(qr(e))return e.subarray();if(_r(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Yr(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),Xr(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),Xr(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),Xr(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,Xr(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Xr(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Xr(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Xr(t,e,n,r,i),t}if(typeof e==`object`&&Zr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Xr(t,e,n,r,i),t}return e}function Xr(e,t,n=e,r,i){let a=[...Object.keys(t),...vr(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Yr(t[s],s,n,r,i))}}function Zr(e){switch(yr(e)){case wr:case kr:case jr:case Pr:case Cr:case Er:case Wr:case Gr:case Br:case Vr:case Hr:case Dr:case Sr:case Mr:case br:case Or:case xr:case Tr:case Fr:case Ir:case Lr:case Rr:return!0;default:return!1}}function Qr(e){return Yr(e,void 0,e,new Map,void 0)}function $r(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function ei(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ti(e,t,n){return typeof n==`function`?ni(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?ni(t,r,e,s,!1):!!c},new Map,!0):ti(e,t,()=>void 0)}function ni(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ri(e,t,n,r,i);case`function`:return Object.keys(t).length>0?ni(e,{...t},n,r,i):$r(e,t);default:return ei(e)&&i?typeof t!=`string`||t===``:$r(e,t)}}function ri(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return ai(e,t,n,r);if(t instanceof Map)return ii(e,t,n,r);if(t instanceof Set)return oi(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)gr(e)&&(e=Object(e));else{let t=yr(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 ii(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 ai(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 oi(e,t,n,r){return t.size===0||e instanceof Set&&ai([...e],[...t],n,r)}function si(e,t){return ti(e,t,()=>void 0)}function ci(e){return e=Qr(e),t=>si(t,e)}function li(e,t){return Jr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(yr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Xr(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Sr:case xr:case Cr:{let t=new e.constructor(e?.valueOf());return Xr(t,e),t}case wr:{let t={};return Xr(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ui(e){return li(e)}var di=/^(?:0|[1-9]\d*)$/;function fi(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 di.test(e)}}function pi(e){return typeof e==`object`&&!!e&&yr(e)===`[object Arguments]`}function mi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xt(t)&&!(t in Object(e))?Et(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=St(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||pi(r))&&fi(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function hi(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=St(e)}return t=ui(t),function(n){let r=Dt(n,e);return r===void 0?mi(n,e):t===void 0?r===void 0:si(r,t)}}function gi(e){if(e==null)return fr;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?hi(e[0],e[1]):ci(e);default:return hr(e)}}function _i(e){return e===0?0:e}function vi(e,t=fr){return mr(e)?ur(Array.from(e),dr(gi(t),1)).map(_i):[]}function yi(e,t,n){return t===!0?vi(e,n):typeof t==`function`?vi(e,t):e}var bi=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})),xi=n(((e,t)=>{t.exports=bi()})),Si=n((e=>{var t=r(),n=xi();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}})),Ci=n(((e,t)=>{t.exports=Si()}))(),wi=(0,F.createContext)(null),Ti=e=>e,B=()=>{var e=(0,F.useContext)(wi);return e?e.store.dispatch:Ti},Ei=()=>{},Di=()=>Ei,Oi=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(wi),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:Ei,[t,e]);return(0,Ci.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Di,t?t.store.getState:Ei,t?t.store.getState:Ei,n,Oi)}function ki(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Ai(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 ji=e=>Array.isArray(e)?e:[e];function Mi(e){let t=Array.isArray(e[0])?e[0]:e;return Ai(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Ni(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Pi=class{constructor(e){this.value=e}deref(){return this.value}},Fi=typeof WeakRef>`u`?Pi:WeakRef,Ii=0,Li=1;function Ri(){return{s:Ii,v:void 0,o:null,p:null}}function zi(e){return e instanceof Fi?e.deref():e}function Bi(e,t={}){let n=Ri(),{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=Ri(),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=Ri(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Li)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=zi(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Fi(c):c}return s.s=Li,s.v=c,c}return o.clearCache=()=>{n=Ri(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Vi(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()),ki(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Bi,argsMemoizeOptions:u=[]}={...n,...a},d=ji(c),f=ji(u),p=Mi(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Ni(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=Vi(Bi);function Hi(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 Ui(e,t,n){return ei(n)&&(typeof t==`number`&&mr(n)&&fi(t)&&t<n.length||typeof t==`string`&&t in n)?$r(n[t],e):!1}function Wi(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Gi=(e,t,n)=>{if(e!==t){let r=Wi(e),i=Wi(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},Ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qi=/^\w*$/;function Ji(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Ct(e)?!0:typeof e==`string`&&(qi.test(e)||!Ki.test(e))||t!=null&&Object.hasOwn(t,e)}function Yi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=mr(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)||Ji(e)?e:{key:e,path:Et(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=Gi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Xi(e,...t){let n=t.length;return n>1&&Ui(e,t[0],t[1])?t=[]:n>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),Yi(e,Hi(t),[`asc`])}var Zi=e=>e.legend.settings,Qi=e=>e.legend.size;H([e=>e.legend.payload,Zi],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Xi(r,n):r});function $i(e,t){return ia(e)||ra(e,t)||ta(e,t)||ea()}function ea(){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 ta(e,t){if(e){if(typeof e==`string`)return na(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)?na(e,t):void 0}}function na(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 ra(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 ia(e){if(Array.isArray(e))return e}var aa=1;function oa(e,t){return Math.abs(e.height-t.height)>aa||Math.abs(e.left-t.left)>aa||Math.abs(e.top-t.top)>aa||Math.abs(e.width-t.width)>aa}function sa(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ca(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=$i((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=sa(e);if(oa(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=sa(e);oa(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 la(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 ua=typeof Symbol==`function`&&Symbol.observable||`@@observable`,da=()=>Math.random().toString(36).substring(7).split(``).join(`.`),fa={INIT:`@@redux/INIT${da()}`,REPLACE:`@@redux/REPLACE${da()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${da()}`};function pa(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 ma(e,t,n){if(typeof e!=`function`)throw Error(la(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(la(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(la(1));return n(ma)(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(la(3));return i}function d(e){if(typeof e!=`function`)throw Error(la(4));if(c)throw Error(la(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(la(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!pa(e))throw Error(la(7));if(e.type===void 0)throw Error(la(8));if(typeof e.type!=`string`)throw Error(la(17));if(c)throw Error(la(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(la(10));r=e,f({type:fa.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(la(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[ua](){return this}}}return f({type:fa.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[ua]:m}}function ha(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:fa.INIT})===void 0)throw Error(la(12));if(n(void 0,{type:fa.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(la(13))})}function ga(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{ha(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(la(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function _a(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function va(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(la(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=_a(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function ya(e){return pa(e)&&`type`in e&&typeof e.type==`string`}var ba=Symbol.for(`immer-nothing`),xa=Symbol.for(`immer-draftable`),Sa=Symbol.for(`immer-state`);function Ca(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var wa=Object,Ta=wa.getPrototypeOf,Ea=`constructor`,Da=`prototype`,Oa=`configurable`,ka=`enumerable`,Aa=`writable`,ja=`value`,Ma=e=>!!e&&!!e[Sa];function Na(e){return e?Ia(e)||Ua(e)||!!e[xa]||!!e[Ea]?.[xa]||Wa(e)||Ga(e):!1}var Pa=wa[Da][Ea].toString(),Fa=new WeakMap;function Ia(e){if(!e||!Ka(e))return!1;let t=Ta(e);if(t===null||t===wa[Da])return!0;let n=wa.hasOwnProperty.call(t,Ea)&&t[Ea];if(n===Object)return!0;if(!qa(n))return!1;let r=Fa.get(n);return r===void 0&&(r=Function.toString.call(n),Fa.set(n,r)),r===Pa}function La(e,t,n=!0){Ra(e)===0?(n?Reflect.ownKeys(e):wa.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ra(e){let t=e[Sa];return t?t.type_:Ua(e)?1:Wa(e)?2:Ga(e)?3:0}var za=(e,t,n=Ra(e))=>n===2?e.has(t):wa[Da].hasOwnProperty.call(e,t),Ba=(e,t,n=Ra(e))=>n===2?e.get(t):e[t],Va=(e,t,n,r=Ra(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ha(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ua=Array.isArray,Wa=e=>e instanceof Map,Ga=e=>e instanceof Set,Ka=e=>typeof e==`object`,qa=e=>typeof e==`function`,Ja=e=>typeof e==`boolean`;function Ya(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Xa=e=>e.copy_||e.base_,Za=e=>e.modified_?e.copy_:e.base_;function Qa(e,t){if(Wa(e))return new Map(e);if(Ga(e))return new Set(e);if(Ua(e))return Array[Da].slice.call(e);let n=Ia(e);if(t===!0||t===`class_only`&&!n){let t=wa.getOwnPropertyDescriptors(e);delete t[Sa];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Aa]===!1&&(a[Aa]=!0,a[Oa]=!0),(a.get||a.set)&&(t[i]={[Oa]:!0,[Aa]:!0,[ka]:a[ka],[ja]:e[i]})}return wa.create(Ta(e),t)}{let t=Ta(e);if(t!==null&&n)return{...e};let r=wa.create(t);return wa.assign(r,e)}}function $a(e,t=!1){return no(e)||Ma(e)||!Na(e)||(Ra(e)>1&&wa.defineProperties(e,{set:to,add:to,clear:to,delete:to}),wa.freeze(e),t&&La(e,(e,t)=>{$a(t,!0)},!1)),e}function eo(){Ca(2)}var to={[ja]:eo};function no(e){return e===null||!Ka(e)||wa.isFrozen(e)}var ro=`MapSet`,io=`Patches`,ao=`ArrayMethods`,oo={};function so(e){let t=oo[e];return t||Ca(0,e),t}var co=e=>!!oo[e],lo,uo=()=>lo,fo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:co(ro)?so(ro):void 0,arrayMethodsPlugin_:co(ao)?so(ao):void 0});function po(e,t){t&&(e.patchPlugin_=so(io),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function mo(e){ho(e),e.drafts_.forEach(_o),e.drafts_=null}function ho(e){e===lo&&(lo=e.parent_)}var go=e=>lo=fo(lo,e);function _o(e){let t=e[Sa];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vo(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Sa].modified_&&(mo(t),Ca(4)),Na(e)&&(e=yo(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Sa].base_,e,t)}else e=yo(t,n);return bo(t,e,!0),mo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ba?void 0:e}function yo(e,t){if(no(t))return t;let n=t[Sa];if(!n)return Oo(t,e.handledSet_,e);if(!So(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);Eo(n,e)}return n.copy_}function bo(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$a(t,n)}function xo(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var So=(e,t)=>e.scope_===t,Co=[];function wo(e,t,n,r){let i=Xa(e),a=e.type_;if(r!==void 0&&Ba(i,r,a)===t){Va(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;La(i,(e,n)=>{if(Ma(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Co;for(let e of o)Va(i,e,n,a)}function To(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!So(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Za(i);wo(e,i.draft_??i,a,n),Eo(i,r)})}function Eo(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)}xo(e)}}function Do(e,t,n){let{scope_:r}=e;if(Ma(n)){let i=n[Sa];So(i,r)&&i.callbacks_.push(function(){Lo(e),wo(e,n,Za(i),t)})}else Na(n)&&e.callbacks_.push(function(){let i=Xa(e);e.type_===3?i.has(n)&&Oo(n,r.handledSet_,r):Ba(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Oo(Ba(e.copy_,t,e.type_),r.handledSet_,r)})}function Oo(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ma(e)||t.has(e)||!Na(e)||no(e)||(t.add(e),La(e,(r,i)=>{if(Ma(i)){let t=i[Sa];So(t,n)&&(Va(e,r,Za(t),e.type_),xo(t))}else Na(i)&&Oo(i,t,n)})),e}function ko(e,t){let n=Ua(e),r={type_:+!!n,scope_:t?t.scope_:uo(),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=Ao;n&&(i=[r],a=jo);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Ao={get(e,t){if(t===Sa)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=Xa(e);if(!za(i,t,e.type_))return Po(e,i,t);let a=i[t];if(e.finalized_||!Na(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ya(t))return a;if(a===Mo(e.base_,t)||No(e,t,a)){Lo(e);let n=e.type_===1?+t:t,r=zo(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Xa(e)},ownKeys(e){return Reflect.ownKeys(Xa(e))},set(e,t,n){let r=Fo(Xa(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Mo(Xa(e),t),i=r?.[Sa];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Ha(n,r)&&(n!==void 0||za(e.base_,t,e.type_)))return!0;Lo(e),Io(e)}return e.copy_[t]===n&&(n!==void 0||za(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Do(e,t,n)),!0},deleteProperty(e,t){return Lo(e),Mo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Io(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Xa(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Aa]:!0,[Oa]:e.type_!==1||t!==`length`,[ka]:r[ka],[ja]:n[t]}},defineProperty(){Ca(11)},getPrototypeOf(e){return Ta(e.base_)},setPrototypeOf(){Ca(12)}},jo={};for(let e in Ao){let t=Ao[e];jo[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}jo.deleteProperty=function(e,t){return jo.set.call(this,e,t,void 0)},jo.set=function(e,t,n){return Ao.set.call(this,e[0],t,n,e[0])};function Mo(e,t){let n=e[Sa];return(n?Xa(n):e)[t]}function No(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Na(n)||n[Sa]?!1:e.baseRefs_.has(n)}function Po(e,t,n){let r=Fo(t,n);return r?ja in r?r[ja]:r.get?.call(e.draft_):void 0}function Fo(e,t){if(!(t in e))return;let n=Ta(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ta(n)}}function Io(e){e.modified_||(e.modified_=!0,e.parent_&&Io(e.parent_))}function Lo(e){e.copy_||=(e.assigned_=new Map,Qa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ro=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(qa(e)&&!qa(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}qa(t)||Ca(6),n!==void 0&&!qa(n)&&Ca(7);let r;if(Na(e)){let i=go(this),a=zo(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?mo(i):ho(i)}return po(i,n),vo(r,i)}if(!e||!Ka(e)){if(r=t(e),r===void 0&&(r=e),r===ba&&(r=void 0),this.autoFreeze_&&$a(r,!0),n){let t=[],i=[];so(io).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Ca(1,e)},this.produceWithPatches=(e,t)=>{if(qa(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]},Ja(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ja(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ja(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Na(e)||Ca(8),Ma(e)&&(e=Bo(e));let t=go(this),n=zo(t,e,void 0);return n[Sa].isManual_=!0,ho(t),n}finishDraft(e,t){let n=e&&e[Sa];(!n||!n.isManual_)&&Ca(9);let{scope_:r}=n;return po(r,t),vo(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=so(io).applyPatches_;return Ma(e)?r(e,t):this.produce(e,e=>r(e,t))}};function zo(e,t,n,r){let[i,a]=Wa(t)?so(ro).proxyMap_(t,n):Ga(t)?so(ro).proxySet_(t,n):ko(t,n);return(n?.scope_??uo()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?To(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 Bo(e){return Ma(e)||Ca(10,e),Vo(e)}function Vo(e){if(!Na(e)||no(e))return e;let t=e[Sa],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Qa(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Qa(e,!0);return La(n,(e,t)=>{Va(n,e,Vo(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var Ho=new Ro().produce,U=e=>e;function Uo(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Wo=Uo(),Go=Uo,Ko=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?_a:_a.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function qo(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(tc(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=>ya(t)&&t.type===e,n}var Jo=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 Yo(e){return Na(e)?Ho(e,()=>{}):e}function Xo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Zo(e){return typeof e==`boolean`}var Qo=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Jo;return t&&(Zo(t)?a.push(Wo):a.push(Go(t.extraArgument))),a},$o=`RTK_autoBatch`,W=()=>e=>({payload:e,meta:{[$o]:!0}}),es=e=>t=>{setTimeout(t,e)},ts=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},ns=(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?ts(window.requestAnimationFrame,100):es(10):e.type===`callback`?e.queueNotification:es(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?.[$o],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},rs=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Jo(e);return n&&r.push(ns(typeof n==`object`?n:void 0)),r};function is(e){let t=Qo(),{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(pa(n))c=ga(n);else throw Error(tc(1));let l;l=typeof r==`function`?r(t):t();let u=_a;i&&(u=Ko({trace:!1,...typeof i==`object`&&i}));let d=rs(va(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return ma(c,o,p)}function as(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(tc(28));if(r in t)throw Error(tc(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 os(e){return typeof e==`function`}function ss(e,t){let[n,r,i]=as(t),a;if(os(e))a=()=>Yo(e());else{let t=Yo(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(Ma(e)){let r=n(e,t);return r===void 0?e:r}if(Na(e))return Ho(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 cs=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,ls=(e=21)=>{let t=``,n=e;for(;n--;)t+=cs[Math.random()*64|0];return t},us=Symbol.for(`rtk-slice-createasyncthunk`);function ds(e,t){return`${e}/${t}`}function fs({creators:e}={}){let t=e?.asyncThunk?.[us];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(tc(11));let i=(typeof e.reducers==`function`?e.reducers(hs()):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(tc(12));if(n in o.sliceCaseReducersByType)throw Error(tc(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:ds(n,r),createNotation:typeof e.reducers==`function`};_s(a)?ys(o,a,s,t):gs(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?as(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return ss(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=Xo(d,r,m)),i}function i(t=l){return Xo(Xo(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=ps(a,t,()=>Xo(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 ps(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 ms=fs();function hs(){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 gs({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!vs(r))throw Error(tc(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?qo(e,o):qo(e))}function _s(e){return e._reducerDefinitionType===`asyncThunk`}function vs(e){return e._reducerDefinitionType===`reducerWithPrepare`}function ys({type:e,reducerName:t},n,r,i){if(!i)throw Error(tc(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||bs,pending:s||bs,rejected:c||bs,settled:l||bs})}function bs(){}var xs=`task`,Ss=`listener`,Cs=`completed`,ws=`cancelled`,Ts=`task-${ws}`,Es=`task-${Cs}`,Ds=`${Ss}-${ws}`,Os=`${Ss}-${Cs}`,ks=class{constructor(e){this.code=e,this.message=`${xs} ${ws} (reason: ${e})`}code;name=`TaskAbortError`;message},As=(e,t)=>{if(typeof e!=`function`)throw TypeError(tc(32))},js=()=>{},Ms=(e,t=js)=>(e.catch(t),e),Ns=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Ps=e=>{if(e.aborted)throw new ks(e.reason)};function Fs(e,t){let n=js;return new Promise((r,i)=>{let a=()=>i(new ks(e.reason));e.aborted?a():(n=Ns(e,a),t.finally(()=>n()).then(r,i))}).finally(()=>{n=js})}var Is=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof ks?`cancelled`:`rejected`,error:e}}finally{t?.()}},Ls=e=>t=>Ms(Fs(e,t).then(t=>(Ps(e),t))),Rs=e=>{let t=Ls(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:zs}=Object,Bs={},Vs=`listenerMiddleware`,Hs=(e,t)=>{let n=t=>Ns(e,()=>t.abort(e.reason));return(r,i)=>{As(r,`taskExecutor`);let a=new AbortController;n(a);let o=Is(async()=>{Ps(e),Ps(a.signal);let t=await r({pause:Ls(a.signal),delay:Rs(a.signal),signal:a.signal});return Ps(a.signal),t},()=>a.abort(Es));return i?.autoJoin&&t.push(o.catch(js)),{result:Ls(e)(o),cancel(){a.abort(Ts)}}}},Us=(e,t)=>{let n=async(n,r)=>{Ps(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 Fs(t,Promise.race(a));return Ps(t),e}finally{i()}};return((e,t)=>Ms(n(e,t)))},Ws=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=qo(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(tc(21));return As(a,`options.listener`),{predicate:i,type:t,effect:a}},Gs=zs(e=>{let{type:t,predicate:n,effect:r}=Ws(e);return{id:ls(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(tc(22))}}},{withTypes:()=>Gs}),Ks=(e,t)=>{let{type:n,effect:r,predicate:i}=Ws(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},qs=e=>{e.pending.forEach(e=>{e.abort(Ds)})},Js=(e,t)=>()=>{for(let e of t.keys())qs(e);e.clear()},Ys=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Xs=zs(qo(`${Vs}/add`),{withTypes:()=>Xs}),Zs=qo(`${Vs}/removeAll`),Qs=zs(qo(`${Vs}/remove`),{withTypes:()=>Qs}),$s=(...e)=>{console.error(`${Vs}/error`,...e)},ec=(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=$s}=e;As(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&qs(e)}),c=(e=>{let n=Ks(t,e)??Gs(e);return s(n)});zs(c,{withTypes:()=>c});let l=e=>{let n=Ks(t,e);return n&&(n.unsubscribe(),e.cancelActive&&qs(n)),!!n};zs(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Us(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,zs({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Rs(u.signal),pause:Ls(u.signal),extra:a,signal:u.signal,fork:Hs(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(Ds),n.delete(e))})},cancel:()=>{u.abort(Ds),e.pending.delete(u)},throwIfCancelled:()=>{Ps(u.signal)}})))}catch(e){e instanceof ks||Ys(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(Os),i(e),e.pending.delete(u)}},d=Js(t,n);return{middleware:e=>n=>r=>{if(!ya(r))return n(r);if(Xs.match(r))return c(r.payload);if(Zs.match(r)){d();return}if(Qs.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Bs)throw Error(tc(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,Ys(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Bs}return s},startListening:c,stopListening:l,clearListeners:d}};function tc(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 nc=ms({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}}}),rc=nc.actions,ic=rc.setMargin,ac=rc.setLayout,oc=rc.setChartSize,sc=rc.setScale,cc=nc.reducer;function lc(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 uc(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function dc(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 fc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dc(Object(n),!0).forEach(function(t){pc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pc(e,t,n){return(t=mc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mc(e){var t=hc(e,`string`);return typeof t==`symbol`?t:t+``}function hc(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:Ft(t)?Dt(e,t,n):typeof t==`function`?t(e):n}var gc=(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($t(c)){if(c===`top`&&L(e.top))return fc(fc({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&L(e.bottom))return fc(fc({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&L(e.left))return fc(fc({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&L(e.right))return fc(fc({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&L(e[a]))return fc(fc({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&L(e[o]))return fc(fc({},e),{},{[o]:e[o]+(i||0)})}return e},_c=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,vc=(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},yc=(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?Mt(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(Ut):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(Ut):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(Ut):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(Ut)},bc=(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},xc={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=Nt(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Zn,none:Kn,silhouette:Qn,wiggle:$n,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=Nt(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},Sc=(e,t,n)=>{var r=xc[n]??Kn,i=Xn().keys(t).value((e,t)=>Number(K(e,t,0))).order(qn).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 Cc(e){return e==null?void 0:String(e)}function wc(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=Vt(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 Tc=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},Ec=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]},Dc=e=>{var t=e.flat(2).filter(L);return[Math.min(...t),Math.max(...t)]},Oc=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],kc=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return Oc(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=Dc(lc(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]))},Ac=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jc=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Mc=(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=Xi(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 Nc(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return fc(fc({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Pc(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Fc=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},Ic=(e,t)=>t===`centric`?e.angle:e.radius,Lc=e=>e.layout.width,Rc=e=>e.layout.height,zc=e=>e.layout.scale,Bc=e=>e.layout.margin,Vc=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Hc=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Uc=`data-recharts-item-index`;function Wc(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 Gc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wc(Object(n),!0).forEach(function(t){Kc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kc(e,t,n){return(t=qc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qc(e){var t=Jc(e,`string`);return typeof t==`symbol`?t:t+``}function Jc(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 Yc=e=>e.brush.height;function Xc(e){return Hc(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Zc(e){return Hc(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Qc(e){return Vc(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function $c(e){return Vc(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var el=H([Lc,Rc,Bc,Yc,Xc,Zc,Qc,$c,Zi,Qi],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Gc(Gc({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=gc(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Gc(Gc({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),tl=H(el,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),nl=H(Lc,Rc,(e,t)=>({x:0,y:0,width:e,height:t})),rl=(0,F.createContext)(null),il=()=>(0,F.useContext)(rl)!=null,al=e=>e.brush,ol=H([al,el,Bc],(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 sl(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 cl(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=sl(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 ll(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return cl(e,t,{leading:r,maxWait:t,trailing:i})}var ul=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++]))}}},dl={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},fl=(e,t,n)=>{var r=n.width,i=r===void 0?dl.width:r,a=n.height,o=a===void 0?dl.height:a,s=n.aspect,c=n.maxHeight,l=Pt(i)?e:Number(i),u=Pt(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}},pl={width:0,height:0,overflow:`visible`},ml={width:0,overflowX:`visible`},hl={height:0,overflowY:`visible`},gl={},_l=e=>{var t=e.width,n=e.height,r=Pt(t),i=Pt(n);return r&&i?pl:r?ml:i?hl:gl};function vl(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=dl.width,a=dl.height):i===void 0?i=r&&r>0?void 0:dl.width:a===void 0&&(a=r&&r>0?void 0:dl.height),{width:i,height:a}}var yl=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function bl(){return bl=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},bl.apply(null,arguments)}function xl(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 Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xl(Object(n),!0).forEach(function(t){Cl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cl(e,t,n){return(t=wl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wl(e){var t=Tl(e,`string`);return typeof t==`symbol`?t:t+``}function Tl(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 El(e,t){return jl(e)||Al(e,t)||Ol(e,t)||Dl()}function Dl(){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 Ol(e,t){if(e){if(typeof e==`string`)return kl(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)?kl(e,t):void 0}}function kl(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 Al(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 jl(e){if(Array.isArray(e))return e}function Ml(e,t){if(e==null)return{};var n,r,i=Nl(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 Nl(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 Pl=(0,F.createContext)(dl.initialDimension);function Fl(e){return uc(e.width)&&uc(e.height)}function Il(e){var t=e.children,n=e.width,r=e.height,i=(0,F.useMemo)(()=>({width:n,height:r}),[n,r]);return Fl(i)?F.createElement(Pl.Provider,{value:i},t):null}var Ll=()=>(0,F.useContext)(Pl),Rl=(0,F.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?dl.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,c=s===void 0?dl.minWidth:s,l=e.minHeight,u=e.maxHeight,d=e.children,f=e.debounce,p=f===void 0?dl.debounce:f,m=e.id,h=e.className,g=e.onResize,_=e.style,v=_===void 0?{}:_,y=Ml(e,yl),b=(0,F.useRef)(null),x=(0,F.useRef)();x.current=g,(0,F.useImperativeHandle)(t,()=>b.current);var S=El((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 Wt;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=ll(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;ul(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var O=fl(E,D,{width:a,height:o,aspect:n,maxHeight:u}),k=O.calculatedWidth,A=O.calculatedHeight;return ul(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),