agent-usage-all-in-one 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/README.zh-CN.md +2 -2
- package/dist/cli.js +37 -11
- package/dist/cli.js.map +1 -1
- package/dist/web/_app/immutable/chunks/BxFVQ2kE.js +1 -0
- package/dist/web/_app/immutable/entry/{app.Cum34GuE.js → app.DoE5iRPD.js} +2 -2
- package/dist/web/_app/immutable/entry/start.-kFQj1Re.js +1 -0
- package/dist/web/_app/immutable/nodes/{1.DfK51mq1.js → 1.CO2k9heq.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.C49HhYIP.js +28 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/chunks/D5pAC-T7.js +0 -1
- package/dist/web/_app/immutable/entry/start.C5EjL_LL.js +0 -1
- package/dist/web/_app/immutable/nodes/2.DJI_veG-.js +0 -28
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,D as r,E as i,G as a,I as o,J as s,K as c,L as l,M as u,N as d,O as f,P as p,R as m,T as h,V as g,W as _,X as v,Y as y,Z as b,_ as x,a as S,at as C,b as w,c as T,ct as E,d as D,et as O,f as k,g as A,h as j,j as M,k as N,l as P,lt as F,m as I,n as L,nt as ee,o as R,ot as te,p as ne,q as re,r as ie,rt as ae,s as oe,tt as z,u as B,ut as se,v as ce,w as le,x as ue,y as de,z as fe}from"../chunks/CkDl_J6h.js";import"../chunks/YtE49JQT.js";import"../chunks/xihTtKlq.js";E();function pe(e,t){let n=`${e} ${t}`.toLowerCase();return/missing|binary|not[ -]?installed/.test(n)?`missing-binary`:/not[ -]?configured|credential.*missing|key.*missing/.test(n)?`not-configured`:/unauthori[sz]ed|permission|forbidden|\b401\b|\b403\b/.test(n)?`unauthorized`:/unsupported|capability/.test(n)?`unsupported`:/schema|shape|parse/.test(n)?`schema-mismatch`:/rate[ -]?limit|\b429\b/.test(n)?`rate-limited`:/timeout|timed out/.test(n)?`timeout`:/stale/.test(n)?`stale`:`unavailable`}var me=new Set([`stale`,`timeout`,`unavailable`]),he=new Set([...me,`rate-limited`]);function ge(e){return e!==null&&he.has(e)}function _e(e){return e?pe(e,``):null}function ve(e,t){return`${e}:${t}`}function ye(e,t,n){return!n&&(t===`stale`||t===`unavailable`)?[`${e}:freshness:${t}`]:[]}function be(e,t){let n=_e(t);return n&&me.has(n)?[`${e}:health:${n}`]:[]}function xe(e,t){let n=new Set((t?.connectors??[]).filter(e=>e.category===`rate-limited`&&e.billingDomainId===null).map(e=>e.providerId)),r=new Set((t?.connectors??[]).filter(e=>e.category===`rate-limited`&&e.billingDomainId!==null).map(e=>ve(e.providerId,e.billingDomainId??``)));for(let t of e.providers){_e(t.health.errorCode)===`rate-limited`&&(t.summaryBillingDomainId?r.add(ve(t.id,t.summaryBillingDomainId)):n.add(t.id));for(let e of t.billingDomains)e.health&&_e(e.health.errorCode)===`rate-limited`&&r.add(ve(t.id,e.id))}let i=e.providers.flatMap(e=>{let t=n.has(e.id)||(e.summaryBillingDomainId?r.has(ve(e.id,e.summaryBillingDomainId)):!1),i=[...ye(`provider:${e.id}`,e.freshness.status,t)];t||i.push(...be(`provider:${e.id}`,e.health.errorCode));let a=e.billingDomains.flatMap(t=>{let i=t.freshness??e.freshness,a=t.health??e.health,o=n.has(e.id)||r.has(ve(e.id,t.id))||_e(a.errorCode)===`rate-limited`;return[...ye(`domain:${e.id}:${t.id}`,i.status,o),...o?[]:be(`domain:${e.id}:${t.id}`,a.errorCode)]});return[...i,...a]}),a=(t?.connectors??[]).filter(e=>e.category!==null&&me.has(e.category)&&!n.has(e.providerId)&&!(e.billingDomainId&&r.has(ve(e.providerId,e.billingDomainId)))).map(e=>`diagnostic:${e.id}:${e.billingDomainId??`provider`}:${e.category}`),o=[...new Set([...i,...a])].sort();return o.length>0?o.join(`|`):null}function Se(e){let t=null,n=null,r=!1;return{schedule(i,a,o){if(r)return;let s=xe(i,a);if(!s){n=null,t&&clearTimeout(t),t=null;return}if(!t){if(o){n=s;return}s!==n&&(n=s,t=setTimeout(()=>{t=null,!r&&e()},0))}},dispose(){r=!0,t&&clearTimeout(t),t=null}}}var Ce={en:{eyebrow:`LOCAL USAGE CENTER`,title:`Agent Usage`,bannerAlt:`Agent Usage — one local view for quota, tokens, and equivalent API cost`,metaDescription:`A private local dashboard for coding-agent quota, token, and cost usage.`,subtitle:`Quota, tokens, and freshness in one private local view.`,mainViews:`Main views`,agentUsageTab:`Agent usage`,tokenModelCostsTab:`Tokens & model costs`,refresh:`Refresh`,refreshing:`Refreshing…`,settings:`Settings`,closeSettings:`Close settings`,settingsSubtitle:`Connections, automation, diagnostics, and local data controls.`,themeSystem:`System`,themeLight:`Light`,themeDark:`Dark`,themeToggleAria:`Toggle color theme (system, light, dark)`,reviewInSettings:`Review in settings`,connectorsUnavailable:`Connection settings are unavailable.`,monitoringUnavailable:`Monitoring settings are unavailable.`,diagnosticsUnavailable:`Diagnostics are unavailable.`,retentionUnavailable:`Retention data is unavailable.`,privacyActionUnavailable:`The local data action could not be completed.`,refreshUnavailable:`Refresh failed. Existing usage is still shown.`,loading:`Loading provider usage…`,loadingAgentUsage:`Loading cached agent usage…`,loadingModelCosts:`Loading cached token and model cost data…`,updating:`Updating`,updatingModelCosts:`Updating token and model cost calculations in the background. Cached results remain available.`,error:`Usage data could not be loaded.`,updatedNow:`Updated just now`,updated:`Updated`,unavailable:`Never updated`,quota:`Quota windows`,noQuotaWindow:`No quota window`,noQuotaWindowDetail:`This Provider meters each request instead of an allowance. Its Tokens and API retail equivalent are in Tokens & model costs.`,noQuotaReported:`No quota window reported yet. Only the official client states this allowance; Tokens and cost stay complete without it.`,quotaTimelineTitle:`Quota timeline`,quotaTimelineCurrentRange:`current`,quotaTimelineWeekly:`Weekly`,quotaTimelineFiveHour:`5 hour`,quotaTimelinePrevious:`Previous period`,quotaTimelineNext:`Next period`,quotaTimelineToday:`Today`,quotaTimelineModes:`Quota timeline range`,quotaTimelineElapsed:`Elapsed window`,quotaTimelineCurrent:`Current window`,quotaTimelineUpcoming:`Upcoming window`,quotaTimelineEmpty:`No provider reports a five-hour quota window.`,quotaTimelineData:`Quota timeline data`,quotaTimelineAccount:`Account / billing domain`,tokens:`Tokens`,total:`Total`,input:`Input`,output:`Output`,reasoning:`Reasoning`,cacheRead:`Cache read`,cacheWrite:`Cache write`,classified:`Classified`,unclassified:`Unclassified`,semantics:`Semantics`,includedInOutput:`Included in output`,includedInInput:`Included in input`,separateCategory:`Separate`,precisionHour:`Hour`,precisionDay:`Day`,aggregationTemporality:`Aggregation`,temporalityDelta:`Delta`,temporalityCumulative:`Cumulative`,temporalityUnknown:`Unknown`,used:`used`,resets:`Resets`,source:`Source`,scope:`Scope`,plan:`Plan`,accountWide:`Account-wide`,localOnly:`This Mac only`,limit:`Limit`,fallback:`Use balance`,unknown:`Unknown`,noProviders:`No providers have reported usage yet.`,providersLabel:`Providers`,billingDomainTabs:`billing domains`,connections:`Connections`,connectionsSubtitle:`Discover local clients, review access, and connect each provider independently.`,connect:`Connect`,skip:`Skip`,retry:`Retry`,experimental:`Experimental`,stable:`Stable`,officialClient:`Official client`,managedSecret:`Agent Usage Keychain`,noCredential:`No credential required`,installed:`Installed`,notInstalled:`Not installed`,notChecked:`Not checked`,discovered:`Ready to connect`,connected:`Connected`,manageConnection:`Manage connection`,connectionSetup:`Connection setup`,skipped:`Skipped`,connectionError:`Discovery failed`,coverageLabel:`Expected coverage`,managementKey:`Management API key`,replaceCredential:`Replace credential`,tokenBreakdown:`Token breakdown`,billing:`Billing`,actualCost:`Actual cost`,prepaid:`Prepaid balance`,spendingLimit:`Spending limit`,currentInvoice:`Current invoice`,invoices:`Invoices`,history:`History`,recordedTokens:`Recorded tokens`,unpricedTokens:`unpriced Tokens`,latestData:`Latest observed data`,generatedAt:`Summary generated`,noObservations:`No token observations in this window`,notAvailable:`Unavailable`,domainContributions:`Token contributions by billing domain`,separateFromHeadline:`Separate domain · not included in headline`,headlineShareNotApplicable:`Not applicable to headline`,topModels:`Top models`,topDays:`Top days`,nativeAmount:`Native`,comparison:`Comparison`,rateUnavailable:`Rate unavailable`,unknownAmount:`Unknown amount`,priceVersion:`Price version`,exchangeRate:`Exchange rate`,tokenMoneyWorkbench:`Tokens & model costs`,workbenchSubtitle:`Token consumption and API-equivalent cost by model for the selected time range.`,usage:`Usage`,usageOverview:`Usage overview`,providerShare:`Provider share`,providerShareSubtitle:`Distribution within the selected headline metric`,cost:`Cost`,model:`Model`,breakdown:`Breakdown`,breakdownView:`Breakdown view`,list:`List`,treemap:`Treemap`,trendStacked:`Stacked trend`,modelTrendStacked:`Stacked model trend`,usageTotals:`Totals`,costTrend:`Cost over time`,tokenTrend:`Tokens over time`,displayCurrency:`Display currency`,trendMetric:`Trend metric`,recordedTokenTrend:`Recorded Token trend`,retailEquivalentTrend:`API retail equivalent trend`,trendData:`Trend data`,trendSummary:`Selected window and Provider series, including gaps and time precision`,timeAxisControls:`Time axis controls`,zoomInTimeAxis:`Zoom in time axis`,zoomOutTimeAxis:`Zoom out time axis`,resetTimeAxis:`Reset time axis`,interactiveTrend:`Interactive usage trend`,trendInteractionHint:`Scroll to zoom · drag to pan`,interval:`Interval`,gap:`Gap`,amountCoverage:`Amount coverage`,conversionEvidence:`Conversion evidence`,noConversionNeeded:`Native currency; no conversion required`,modelRankingSubtitle:`Known models stay separate by Provider and billing domain. Select a row to audit its evidence.`,modelBreakdownTreemap:`Model breakdown treemap`,treemapHint:`Block area shows the share of the selected metric. Click a block to audit a model.`,sortByTokens:`Sort by recorded Tokens`,sortByRetailEquivalent:`Sort by API retail equivalent`,tokenShare:`Token share`,costShare:`Cost share`,modelDetail:`Model detail`,closeModelDetail:`Close model detail`,activityOverview:`Activity overview`,observations:`Observations`,evidenceSummary:`Evidence summary`,auditDetails:`Audit details`,priceSnapshot:`Price snapshot`,ratePerMillion:`Rate / 1M`,derivationSourceReported:`Source-reported`,derivationReconciledRemainder:`Reconciled remainder`,derivationCategorized:`Categorized fields`,derivationLegacyTotal:`Legacy total`,recordedTotal:`Recorded total`,sourceReportedTotal:`Source-reported total`,totalDerivation:`Total derivation`,priceLineItems:`Price line items`,priceEffective:`Price effective`,modelTrend:`Model trend`,calculatedAt:`Calculated`,noPriceEvidence:`No eligible retail price evidence`,mostConstrained:`Most constrained`,recommendation:`Recommended agent`,remaining:`remaining`,predictedExhaustion:`Predicted exhaustion`,lastsUntilReset:`Expected to last until reset`,exhaustsBeforeReset:`Expected to exhaust before reset`,readOnlyAdvice:`Advice only · never switches agents`,highestSafeCapacity:`Highest safe capacity among fresh providers`,forecastSupports:`Forecast lasts through the next reset`,samples:`samples`,monitoring:`Monitoring`,backgroundCollection:`Collect every 5 minutes`,notifications:`Local notifications`,startAtLogin:`Start at login`,monitoringSubtitle:`Opt-in local controls; provider backoff is always respected.`,diagnostics:`Diagnostics`,diagnosticsSubtitle:`Connector and billing-domain health with actionable recovery.`,healthy:`Healthy`,providerDegraded:`Provider data is degraded`,providerRecovery:`Run doctor, check this provider connection, and refresh.`,coverageComplete:`Complete`,coveragePartial:`Partial`,coverageUnavailable:`Unavailable`,authorityOfficialAccount:`Official account`,authorityOfficialClient:`Official client`,authorityLocalObservation:`Local observation`,authorityEstimate:`Estimate`,authorityUnavailable:`Unavailable`,authorityMixed:`Mixed sources`,confidenceHigh:`High confidence`,confidenceMedium:`Medium confidence`,costActual:`Actual`,costSubscription:`Subscription`,costReportedEstimate:`Reported estimate`,costRetailEquivalent:`API retail equivalent`,costLegacyUnknown:`Legacy purpose unknown`,enabled:`Enabled`,disabled:`Disabled`,onboardingEyebrow:`ONBOARDING`,automationEyebrow:`LOCAL AUTOMATION`,healthEyebrow:`LOCAL HEALTH`,privacyEyebrow:`LOCAL PRIVACY`,codexPermission:`Read quota and usage through the installed official Codex client.`,claudePermission:`Read opt-in telemetry and usage exposed by the official Claude client.`,openCodePermission:`Read account quota and local exports through official OpenCode surfaces.`,grokPermission:`Read opt-in Grok Build telemetry and official client billing capability.`,xaiPermission:`Store a dedicated management key for official xAI billing data.`,dshPermission:`Read local dsh session logs for token history. No credential file is opened.`,diagnosticMissingBinary:`Missing binary`,diagnosticNotConfigured:`Not configured`,diagnosticUnauthorized:`Unauthorized`,diagnosticUnsupported:`Unsupported`,diagnosticSchemaMismatch:`Schema mismatch`,diagnosticRateLimited:`Rate limited`,diagnosticTimeout:`Timeout`,diagnosticStale:`Automatic refresh pending`,diagnosticUnavailable:`Unavailable`,recoveryMissingBinary:`Install the official client, then retry discovery.`,recoveryNotConfigured:`Connect this provider in onboarding, then refresh.`,recoveryUnauthorized:`Sign in again or replace the credential, then refresh.`,recoveryUnsupported:`Upgrade the official client or disable this unsupported capability.`,recoverySchemaMismatch:`Upgrade Agent Usage or the official client, then retry.`,recoveryRateLimited:`Wait for the provider backoff, then retry.`,recoveryTimeout:`Check the client process and network, then retry.`,recoveryStale:`Agent Usage will retry this connector automatically.`,recoveryUnavailable:`Run doctor, check the connector, and retry refresh.`,planValue:`Subscription value`,planValueSubtitle:`What each plan costs for this window against the API retail equivalent of the Tokens it produced.`,planValueChartLabel:`Subscription value map`,planValueRankingLabel:`Value multiple ranking`,planValueRatio:`Value multiple`,planValueBreakEven:`Break-even 1x`,planValuePaid:`Prorated plan cost`,planValueWorth:`Retail equivalent`,planValueAtLeast:`at least`,planValueEffectiveUnitPrice:`Your unit price`,planValueRetailUnitPrice:`Market unit price`,planValueSavings:`Saved`,planValueOverpaid:`Overpaid`,planValuePerMillion:`per million Tokens`,planValueWindowNote:`Plan price prorated to the selected window`,planValuePartial:`Some Tokens are unpriced, so this multiple is a lower bound.`,planValueEmpty:`No plan price is set yet.`,planValueEmptyAction:`Set your plan price in settings`,planValueMetered:`Metered billing · no plan price`,planValueUnconfigured:`No plan price set`,planValueUnavailable:`Value multiple unavailable`,planPeriodLabel:`This billing period`,planPeriodDays:`days`,planPeriodEarnedBack:`Earned back`,planPeriodOnPace:`On pace to pay for itself`,planPeriodBehindPace:`Behind the pace to pay for itself`,planPeriodUnknown:`Add a renewal date to read this billing period`,planAnchorDate:`Renewal date`,planAnchorHint:`Any past or future renewal date. It sets the billing period boundaries.`,plans:`Subscription plans`,plansSubtitle:`Declare what each plan costs. The price stays on this Mac, is never collected, and is only compared with the API retail equivalent.`,plansUnavailable:`Subscription plan settings are unavailable.`,planPreset:`Plan`,planCustom:`Custom price`,planNone:`Not set`,planAmount:`Price`,planCurrency:`Currency`,planPeriod:`Billing period`,planPeriodMonthly:`Monthly`,planPeriodAnnual:`Annual`,planSave:`Save`,planClear:`Clear`,planPresetSource:`Preset price · confirm it against your invoice`,planUserEntered:`Price you entered`,customRates:`Custom model rates`,customRatesSubtitle:`Configure per-million token rates for custom endpoint models. Custom rates take precedence over the built-in catalog and automatically backfill unpriced history.`,customRatesUnavailable:`Custom model rates are unavailable.`,customRateProvider:`Provider`,customRateDomain:`Billing domain`,customRateDomainWildcard:`All routes (wildcard)`,customRateModel:`Model`,customRateInput:`Input ($/M)`,customRateOutput:`Output ($/M)`,customRateCacheRead:`Cache read ($/M)`,customRateAdd:`Add custom rate`,customRateSave:`Save rate`,customRateEdit:`Edit`,customRateCancel:`Cancel`,customRateUpdating:`Saving…`,customRateDelete:`Delete`,customRateDeleting:`Deleting…`,customRateRefresh:`Refresh`,customRateRefreshTitle:`Refresh custom rates`,customRateProviderOther:`Other provider…`,customRateProviderCustomPlaceholder:`Enter provider ID`,customRateDeleteConfirm:`Delete this rate?`,customRateUpdated:`Updated`,setCustomRateForModel:`Set custom rate`,customRatesNav:`Rates`,customRateEmpty:`No custom model rates configured.`,privacy:`Privacy & data`,privacySubtitle:`Exports omit account identifiers and secrets. Raw data stays local.`,retentionDays:`day raw retention`,rawObservations:`raw observations`,dailyAggregates:`daily aggregates`,exportJson:`Export JSON`,exportCsv:`Export CSV`,includeAccountIdentifiers:`Include available account identifiers`,deleteProductSecrets:`Also delete product Keychain entries`,clearData:`Clear local usage`,clearing:`Clearing…`,clearConfirmation:`Clear all local usage history? Official-client credentials are preserved.`,hardRebuild:`Hard rebuild all data`,hardRebuilding:`Hard rebuild running…`,hardRebuildWarning:`High-cost operation: ignores scan and pricing caches. It can take a long time, but the dashboard remains usable.`,hardRebuildConfirmation:`Hard rebuild all local usage and cost data? This ignores caches, is resource-intensive, and may take a long time.`},"zh-CN":{eyebrow:`本地用量中心`,title:`Agent Usage`,bannerAlt:`Agent Usage——在一个本地视图中查看额度、Token 和 API 对等费用`,metaDescription:`在本地私密查看编程 Agent 的额度、Token 和费用用量。`,subtitle:`在一个私密的本地视图中查看额度、Token 与数据新鲜度。`,mainViews:`主要视图`,agentUsageTab:`Agent 用量`,tokenModelCostsTab:`Token 与模型费用`,refresh:`刷新`,refreshing:`刷新中…`,settings:`设置`,closeSettings:`关闭设置`,settingsSubtitle:`连接、自动化、诊断与本地数据控制。`,themeSystem:`跟随系统`,themeLight:`浅色`,themeDark:`深色`,themeToggleAria:`切换颜色主题(跟随系统、浅色、深色)`,reviewInSettings:`在设置中查看`,connectorsUnavailable:`连接设置暂不可用。`,monitoringUnavailable:`监控设置暂不可用。`,diagnosticsUnavailable:`诊断信息暂不可用。`,retentionUnavailable:`保留策略数据暂不可用。`,privacyActionUnavailable:`无法完成本地数据操作。`,refreshUnavailable:`刷新失败,继续显示已有用量。`,loading:`正在加载 provider 用量…`,loadingAgentUsage:`正在加载已缓存的 Agent 用量…`,loadingModelCosts:`正在加载已缓存的 Token 与模型费用…`,updating:`更新中`,updatingModelCosts:`正在后台更新 Token 与模型费用,已缓存的结果仍可查看。`,error:`无法加载用量数据。`,updatedNow:`刚刚更新`,updated:`更新于`,unavailable:`从未更新`,quota:`额度窗口`,noQuotaWindow:`没有额度窗口`,noQuotaWindowDetail:`该 Provider 按请求计量,没有额度。Token 与 API 对等零售价见「Token 与模型费用」。`,noQuotaReported:`暂未获取到额度窗口。只有官方客户端会给出该额度;即使拿不到,Token 与费用依然完整。`,quotaTimelineTitle:`额度时序`,quotaTimelineCurrentRange:`当前`,quotaTimelineWeekly:`按周`,quotaTimelineFiveHour:`5 小时`,quotaTimelinePrevious:`上一周期`,quotaTimelineNext:`下一周期`,quotaTimelineToday:`今天`,quotaTimelineModes:`额度时序范围`,quotaTimelineElapsed:`已结束窗口`,quotaTimelineCurrent:`当前窗口`,quotaTimelineUpcoming:`后续窗口`,quotaTimelineEmpty:`当前没有 Provider 提供 5 小时额度窗口。`,quotaTimelineData:`额度时序数据`,quotaTimelineAccount:`账户 / 计费域`,tokens:`Token`,total:`总计`,input:`输入`,output:`输出`,reasoning:`推理`,cacheRead:`缓存读取`,cacheWrite:`缓存写入`,classified:`已分类`,unclassified:`未分类`,semantics:`Token 语义`,includedInOutput:`包含在输出中`,includedInInput:`包含在输入中`,separateCategory:`独立计算`,precisionHour:`小时级`,precisionDay:`日级`,aggregationTemporality:`聚合方式`,temporalityDelta:`增量`,temporalityCumulative:`累计`,temporalityUnknown:`未知`,used:`已使用`,resets:`刷新于`,source:`来源`,scope:`范围`,plan:`计划`,accountWide:`账户全局`,localOnly:`仅此 Mac`,limit:`额度`,fallback:`超额使用余额`,unknown:`未知`,noProviders:`尚无 provider 上报用量。`,providersLabel:`Provider`,billingDomainTabs:`计费域`,connections:`连接`,connectionsSubtitle:`发现本地客户端、检查访问权限,并独立连接每个 provider。`,connect:`连接`,skip:`跳过`,retry:`重试`,experimental:`实验性`,stable:`稳定`,officialClient:`官方客户端`,managedSecret:`Agent Usage 钥匙串`,noCredential:`无需凭据`,installed:`已安装`,notInstalled:`未安装`,notChecked:`尚未检查`,discovered:`可以连接`,connected:`已连接`,manageConnection:`管理连接`,connectionSetup:`连接设置`,skipped:`已跳过`,connectionError:`发现失败`,coverageLabel:`预期覆盖`,managementKey:`Management API 密钥`,replaceCredential:`替换凭据`,tokenBreakdown:`Token 分类明细`,billing:`计费`,actualCost:`实际费用`,prepaid:`预付余额`,spendingLimit:`消费上限`,currentInvoice:`当前账单`,invoices:`历史账单`,history:`历史`,recordedTokens:`已记录 Token`,unpricedTokens:`未定价 Token`,latestData:`最新观测数据`,generatedAt:`摘要生成时间`,noObservations:`当前时间范围内没有 Token 观测`,notAvailable:`不可用`,domainContributions:`按计费域划分的 Token 贡献`,separateFromHeadline:`独立计费域 · 不计入摘要总量`,headlineShareNotApplicable:`不适用于摘要占比`,topModels:`模型排行`,topDays:`日期排行`,nativeAmount:`原币`,comparison:`对比币种`,rateUnavailable:`汇率不可用`,unknownAmount:`金额未知`,priceVersion:`价格版本`,exchangeRate:`汇率`,tokenMoneyWorkbench:`Token 与模型费用`,workbenchSubtitle:`按所选时间范围查看各模型的 Token 消耗与 API 对等费用。`,usage:`用量`,usageOverview:`用量总览`,providerShare:`Provider 占比`,providerShareSubtitle:`按当前摘要指标展示所选范围内的分布`,cost:`费用`,model:`模型`,breakdown:`明细`,breakdownView:`明细视图`,list:`列表`,treemap:`矩形树图`,trendStacked:`趋势堆叠`,modelTrendStacked:`模型趋势堆叠图`,usageTotals:`汇总`,costTrend:`费用趋势`,tokenTrend:`Token 趋势`,displayCurrency:`显示币种`,trendMetric:`趋势指标`,recordedTokenTrend:`已记录 Token 趋势`,retailEquivalentTrend:`API 等价零售价趋势`,trendData:`趋势数据`,trendSummary:`选中时间范围与 Provider 序列,包含数据缺口和时间精度`,timeAxisControls:`时间轴控制`,zoomInTimeAxis:`放大时间轴`,zoomOutTimeAxis:`缩小时间轴`,resetTimeAxis:`重置时间轴`,interactiveTrend:`交互式用量趋势`,trendInteractionHint:`滚轮缩放 · 拖拽平移`,interval:`区间`,gap:`数据缺口`,amountCoverage:`金额覆盖率`,conversionEvidence:`换算证据`,noConversionNeeded:`原币显示,无需换算`,modelRankingSubtitle:`已知模型按 Provider 与计费域分开;选择一行可审计完整证据。`,modelBreakdownTreemap:`模型明细矩形树图`,treemapHint:`色块面积表示所选指标的占比。点击色块可查看该模型的详情。`,sortByTokens:`按已记录 Token 排序`,sortByRetailEquivalent:`按 API 等价零售价排序`,tokenShare:`Token 占比`,costShare:`费用占比`,modelDetail:`模型详情`,closeModelDetail:`关闭模型详情`,activityOverview:`活动概览`,observations:`观测次数`,evidenceSummary:`证据摘要`,auditDetails:`审计详情`,priceSnapshot:`价格快照`,ratePerMillion:`每百万 Token 单价`,derivationSourceReported:`来源报告`,derivationReconciledRemainder:`对账余量`,derivationCategorized:`分类字段汇总`,derivationLegacyTotal:`旧版总量`,recordedTotal:`已记录总量`,sourceReportedTotal:`来源报告总量`,totalDerivation:`总量推导`,priceLineItems:`价格行项目`,priceEffective:`价格生效`,modelTrend:`模型趋势`,calculatedAt:`计算时间`,noPriceEvidence:`没有符合条件的零售价格证据`,mostConstrained:`最紧张额度`,recommendation:`推荐使用`,remaining:`剩余`,predictedExhaustion:`预计耗尽`,lastsUntilReset:`预计可坚持到刷新`,exhaustsBeforeReset:`预计会在刷新前耗尽`,readOnlyAdvice:`仅提供建议 · 永不自动切换 agent`,highestSafeCapacity:`新鲜数据中安全余量最高`,forecastSupports:`预测可坚持到下一次刷新`,samples:`个样本`,monitoring:`持续监控`,backgroundCollection:`每 5 分钟采集`,notifications:`本机通知`,startAtLogin:`登录时启动`,monitoringSubtitle:`本地显式控制;始终遵守 provider 退避。`,diagnostics:`诊断与恢复`,diagnosticsSubtitle:`连接器与计费域健康状态,以及可执行的恢复建议。`,healthy:`健康`,providerDegraded:`Provider 数据已降级`,providerRecovery:`运行 doctor、检查该 provider 连接,然后刷新。`,coverageComplete:`完整`,coveragePartial:`部分`,coverageUnavailable:`不可用`,authorityOfficialAccount:`官方账户`,authorityOfficialClient:`官方客户端`,authorityLocalObservation:`本机观测`,authorityEstimate:`估算`,authorityUnavailable:`不可用`,authorityMixed:`混合来源`,confidenceHigh:`高置信度`,confidenceMedium:`中等置信度`,costActual:`实际费用`,costSubscription:`订阅费用`,costReportedEstimate:`来源报告估算`,costRetailEquivalent:`API 等价零售价`,costLegacyUnknown:`旧数据用途未知`,enabled:`已启用`,disabled:`已停用`,onboardingEyebrow:`连接引导`,automationEyebrow:`本地自动化`,healthEyebrow:`本地健康状态`,privacyEyebrow:`本地隐私`,codexPermission:`通过已安装的官方 Codex 客户端读取额度与用量。`,claudePermission:`读取用户主动开启的 telemetry 与官方 Claude 客户端提供的用量。`,openCodePermission:`通过 OpenCode 官方入口读取账户额度与本机导出。`,grokPermission:`读取用户主动开启的 Grok Build telemetry 与官方客户端计费能力。`,xaiPermission:`保存独立 Management key,用于读取官方 xAI 计费数据。`,dshPermission:`读取本机 dsh 会话日志中的 Token 历史,不会打开任何凭据文件。`,diagnosticMissingBinary:`缺少客户端`,diagnosticNotConfigured:`尚未配置`,diagnosticUnauthorized:`授权失效`,diagnosticUnsupported:`能力不支持`,diagnosticSchemaMismatch:`数据格式不兼容`,diagnosticRateLimited:`请求受限`,diagnosticTimeout:`请求超时`,diagnosticStale:`等待自动刷新`,diagnosticUnavailable:`不可用`,recoveryMissingBinary:`安装官方客户端,然后重新发现。`,recoveryNotConfigured:`在连接引导中连接该 provider,然后刷新。`,recoveryUnauthorized:`重新登录或替换凭据,然后刷新。`,recoveryUnsupported:`升级官方客户端,或停用当前不支持的能力。`,recoverySchemaMismatch:`升级 Agent Usage 或官方客户端,然后重试。`,recoveryRateLimited:`等待 provider 退避结束,然后重试。`,recoveryTimeout:`检查客户端进程与网络,然后重试。`,recoveryStale:`Agent Usage 将自动重试该连接。`,recoveryUnavailable:`运行 doctor、检查 connector,然后重试刷新。`,planValue:`订阅性价比`,planValueSubtitle:`本窗口内每个订阅摊销了多少钱,对比它产出的 Token 的 API 对等市场价。`,planValueChartLabel:`订阅性价比图谱`,planValueRankingLabel:`价值倍数排行`,planValueRatio:`价值倍数`,planValueBreakEven:`保本线 1x`,planValuePaid:`摊销订阅费`,planValueWorth:`对等市场价`,planValueAtLeast:`至少`,planValueEffectiveUnitPrice:`你的实际单价`,planValueRetailUnitPrice:`市场单价`,planValueSavings:`节省`,planValueOverpaid:`多付`,planValuePerMillion:`每百万 Token`,planValueWindowNote:`订阅价已按当前时间窗摊销`,planValuePartial:`部分 Token 未定价,因此该倍数是下限。`,planValueEmpty:`还没有设置订阅价格。`,planValueEmptyAction:`在设置中填写订阅价格`,planValueMetered:`按量计费 · 无订阅价`,planValueUnconfigured:`未设置订阅价`,planValueUnavailable:`无法计算价值倍数`,planPeriodLabel:`本计费周期`,planPeriodDays:`天`,planPeriodEarnedBack:`已回本`,planPeriodOnPace:`按当前进度可以回本`,planPeriodBehindPace:`按当前进度回不了本`,planPeriodUnknown:`填写续费日后可查看本计费周期`,planAnchorDate:`续费日`,planAnchorHint:`填任意一次续费日期,过去或将来都可以,用于确定计费周期的起止。`,plans:`订阅计划`,plansSubtitle:`填写每个订阅的价格。价格只保存在本机,不会被采集,只用于和 API 对等市场价做对比。`,plansUnavailable:`订阅计划设置不可用。`,planPreset:`档位`,planCustom:`自定义价格`,planNone:`未设置`,planAmount:`价格`,planCurrency:`币种`,planPeriod:`计费周期`,planPeriodMonthly:`按月`,planPeriodAnnual:`按年`,planSave:`保存`,planClear:`清除`,planPresetSource:`预置价格 · 请对照账单确认`,planUserEntered:`你填写的价格`,customRates:`自定义模型费率`,customRatesSubtitle:`为自定义端点模型设置每百万 Token 单价(美元)。自定义费率优先于官方目录,并自动重新计算历史未定价会话。`,customRatesUnavailable:`自定义模型费率不可用。`,customRateProvider:`Provider`,customRateDomain:`计费域 / 路由`,customRateDomainWildcard:`全部路由(通配)`,customRateModel:`模型名称`,customRateInput:`输入单价 ($/M)`,customRateOutput:`输出单价 ($/M)`,customRateCacheRead:`缓存读单价 ($/M)`,customRateAdd:`添加自定义费率`,customRateSave:`保存费率`,customRateEdit:`编辑`,customRateCancel:`取消`,customRateUpdating:`保存中…`,customRateDelete:`删除`,customRateDeleting:`删除中…`,customRateRefresh:`刷新`,customRateRefreshTitle:`刷新自定义费率`,customRateProviderOther:`其他 Provider…`,customRateProviderCustomPlaceholder:`输入 Provider ID`,customRateDeleteConfirm:`确定删除此费率?`,customRateUpdated:`更新于`,setCustomRateForModel:`设置自定义费率`,customRatesNav:`自定义费率`,customRateEmpty:`暂未配置任何自定义模型费率。`,privacy:`隐私与数据`,privacySubtitle:`导出会移除账户标识与密钥;原始数据只保存在本机。`,retentionDays:`天原始数据保留期`,rawObservations:`条原始记录`,dailyAggregates:`条每日聚合`,exportJson:`导出 JSON`,exportCsv:`导出 CSV`,includeAccountIdentifiers:`导出可得的账户标识`,deleteProductSecrets:`同时删除产品 Keychain 条目`,clearData:`清除本地用量`,clearing:`清除中…`,clearConfirmation:`清除全部本地用量历史?官方客户端凭据会保留。`,hardRebuild:`硬重算全部数据`,hardRebuilding:`硬重算进行中…`,hardRebuildWarning:`高代价操作:忽略扫描与定价缓存,可能等待很久,但不会阻塞页面使用。`,hardRebuildConfirmation:`确定硬重算全部本地用量与费用数据吗?该操作会忽略缓存、消耗较多资源,并且可能需要等待很长时间。`}};function we(e){return e.toLowerCase().startsWith(`zh`)?`zh-CN`:`en`}function Te(e,t){return Ce[e][t]}var Ee=`agent-usage:theme-changed`,De=`agent-usage:theme`,Oe=`(prefers-color-scheme: dark)`;function ke(){if(typeof window>`u`)return`system`;try{let e=window.localStorage.getItem(De);return e===`light`||e===`dark`||e===`system`?e:`system`}catch{return`system`}}function Ae(){if(typeof window>`u`)return!1;try{return window.matchMedia(Oe).matches}catch{return!1}}function je(e){return e===`light`||e===`dark`?e:Ae()?`dark`:`light`}var Me=ae(ke()),Ne=ae(`light`),Pe=Me,Fe=Ne,Ie=ke(),Le=!1;function Re(e){if(typeof window>`u`)return;let t=window.document.documentElement;t.dataset.theme=e;try{t.style.colorScheme=e}catch{}}function ze(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(Ee,{detail:{theme:e}}))}function Be(){let e=je(Ie);Me.set(Ie),Ne.set(e),Re(e)}function Ve(){Le||typeof window>`u`||(Le=!0,window.matchMedia(Oe).addEventListener(`change`,()=>{if(Ie!==`system`)return;let e=je(`system`);Ne.set(e),Re(e),ze(e)}))}function He(){Ie=ke(),Be(),Ve()}function Ue(e){if(Ie=e,typeof window<`u`)try{window.localStorage.setItem(De,e)}catch{}Be(),ze(je(e))}var We=function(e,t){return We=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},We(e,t)};function V(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);We(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ge=`12px sans-serif`,Ke=20,qe=100,Je=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Ye(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Ke)/qe}return t}var Xe=Ye(Je),Ze={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ze.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Xe[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},Qe=bt([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),$e=bt([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),et=Object.prototype.toString,tt=Array.prototype,nt=tt.forEach,rt=tt.filter,it=tt.slice,at=tt.map,ot=function(){}.constructor,st=ot?ot.prototype:null,ct=`__proto__`,lt=2311,ut=2**53-1;function dt(){return lt>=ut&&(lt=0),lt++}function ft(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function pt(e){if(typeof e!=`object`||!e)return e;var t=e,n=et.call(e);if(n===`[object Array]`){if(!Ut(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=pt(e[r])}}else if($e[n]){if(!Ut(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Qe[n]&&!Ut(e)&&!Mt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==ct&&(t[o]=pt(e[o]));return t}function H(e,t,n){if(!J(t)||!J(e))return n?pt(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==ct){var i=e[r],a=t[r];J(a)&&J(i)&&!K(a)&&!K(i)&&!Mt(a)&&!Mt(i)&&!At(a)&&!At(i)&&!Ut(a)&&!Ut(i)?H(i,a,n):(n||!(r in e))&&(e[r]=pt(t[r]))}return e}function U(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==ct&&(e[n]=t[n]);return e}function mt(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function ht(e,t,n){for(var r=Ct(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ze.createCanvas;function gt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function _t(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function vt(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else ht(e,t,n)}function yt(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function W(e,t,n){if(e&&t){if(e.forEach&&e.forEach===nt)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function G(e,t,n){if(!e)return[];if(!t)return Lt(e);if(e.map&&e.map===at)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function bt(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function xt(e,t,n){if(!e)return[];if(!t)return Lt(e);if(e.filter&&e.filter===rt)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function St(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function Ct(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function wt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(it.call(arguments)))}}var Tt=st&&Dt(st.bind)?st.call.bind(st.bind):wt;function Et(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(it.call(arguments)))}}function K(e){return Array.isArray?Array.isArray(e):et.call(e)===`[object Array]`}function Dt(e){return typeof e==`function`}function q(e){return typeof e==`string`}function Ot(e){return et.call(e)===`[object String]`}function kt(e){return typeof e==`number`}function J(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function At(e){return!!Qe[et.call(e)]}function jt(e){return!!$e[et.call(e)]}function Mt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Nt(e){return e.colorStops!=null}function Pt(e){return e.image!=null}function Ft(e){return e!==e}function Y(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function X(e,t){return e??t}function It(e,t,n){return e??t??n}function Lt(e){var t=[...arguments].slice(1);return it.apply(e,t)}function Rt(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function zt(e,t){if(!e)throw Error(t)}function Bt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Vt=`__ec_primitive__`;function Ht(e){e[Vt]=!0}function Ut(e){return e[Vt]}var Wt=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Ct(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Gt=typeof Map==`function`;function Kt(){return Gt?new Map:new Wt}var qt=function(){function e(t){var n=K(t);this.data=Kt();var r=this;t instanceof e?t.each(i):t&&W(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Gt?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Jt(e){return new qt(e)}function Yt(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Xt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&U(n,t),n}function Zt(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Z(e,t){return e.hasOwnProperty(t)}function Qt(){}var $t=180/Math.PI,en=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),tn=new(function(){function e(){this.browser=new en,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(tn.wxa=!0,tn.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?tn.worker=!0:!tn.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(tn.node=!0,tn.svgSupported=!0):nn(navigator.userAgent,tn);function nn(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var rn=`.`,an=`___EC__COMPONENT__CONTAINER___`,on=`___EC__EXTENDED_CLASS___`;function sn(e){var t={main:``,sub:``};if(e){var n=e.split(rn);t.main=n[0]||``,t.sub=n[1]||``}return t}function cn(e){zt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function ln(e){return!!(e&&e[on])}function un(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return dn(t)?n=function(e){V(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},_t(n,this)),U(n.prototype,e),n[on]=!0,n.extend=this.extend,n.superCall=hn,n.superApply=gn,n.superClass=t,n}}function dn(e){return Dt(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function fn(e,t){e.extend=t.extend}var pn=Math.round(Math.random()*10);function mn(e){var t=[`__\0is_clz`,pn++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function hn(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function gn(e,t,n){return this.superClass.prototype[t].apply(e,n)}function _n(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){cn(r),e.prototype.type=r;var i=sn(r);if(!i.sub)t[i.main]=e;else if(i.sub!==an){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[an]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=sn(e),r=[],i=t[n.main];return i&&i[an]?W(i,function(e,t){t!==an&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[sn(e).main]},e.getAllClassMainTypes=function(){var e=[];return W(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[sn(e).main];return n&&n[an]};function n(e){var n=t[e.main];return(!n||!n[an])&&(n=t[e.main]={},n[an]=!0),n}}function vn(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&>(r,s)>=0||i&>(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var yn=vn([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),bn=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return yn(this,e,t)},e}(),xn=function(){function e(e){this.value=e}return e}(),Sn=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new xn(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Cn=function(){function e(e){this._list=new Sn,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new xn(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),wn=new Cn(50);function Tn(e){if(typeof e==`string`){var t=wn.get(e);return t&&t.image}return e}function En(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=wn.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!On(t)&&a.pending.push(o)):(t=Ze.loadImage(e,Dn,Dn),t.__zrImageSrc=e,wn.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function Dn(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function On(e){return e&&e.width&&e.height}function kn(){return[1,0,0,1,0,0]}function An(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function jn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Mn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Nn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Pn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Fn(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function In(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Ln(e,t){return e??=0,t??=0,[e,t]}function Rn(e,t){return e[0]=t[0],e[1]=t[1],e}function zn(e){return[e[0],e[1]]}function Bn(e,t,n){return e[0]=t,e[1]=n,e}function Vn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Hn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Un(e){return Math.sqrt(Wn(e))}function Wn(e){return e[0]*e[0]+e[1]*e[1]}function Gn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Kn(e,t){var n=Un(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function qn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Jn=qn;function Yn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Xn=Yn;function Zn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Qn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function $n(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function er(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var tr=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),nr=Math.min,rr=Math.max,ir=Math.abs,ar=[`x`,`y`],or=[`width`,`height`],sr=new tr,cr=new tr,lr=new tr,ur=new tr,dr=Er(),fr=dr.minTv,pr=dr.maxTv,mr=[0,0],hr=function(){function e(e,t,n,r){_r(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=nr(e.x,this.x),n=nr(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?rr(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?rr(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return yr(kn(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&tr.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=_r(Sr,t.x,t.y,t.width,t.height)),n instanceof e||(n=_r(Cr,n.x,n.y,n.width,n.height));var s=!!r;dr.reset(i,s);var c=dr.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(mr[0]=1/0,mr[1]=0,Tr(l,u,p,m,0,s,a,o),Tr(d,f,h,g,1,s,a,o),s&&tr.copy(r,_?dr.useDir?dr.dirMinTv:fr:pr)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){vr(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&vr(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}sr.x=lr.x=t.x,sr.y=ur.y=t.y,cr.x=ur.x=t.x+t.width,cr.y=lr.y=t.y+t.height,sr.transform(n),ur.transform(n),cr.transform(n),lr.transform(n),e.x=nr(sr.x,cr.x,lr.x,ur.x),e.y=nr(sr.y,cr.y,lr.y,ur.y);var s=rr(sr.x,cr.x,lr.x,ur.x),c=rr(sr.y,cr.y,lr.y,ur.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=An(e||[]),Nn(e,e,Bn(wr,-t.x,-t.y)),Fn(e,e,Bn(wr,r,i)),Nn(e,e,Bn(wr,n.x,n.y)),e},e}(),gr=hr.create,_r=hr.set,vr=hr.copy,yr=hr.calculateTransform,br=hr.applyTransform,xr=hr.contain,Sr=new hr(0,0,0,0),Cr=new hr(0,0,0,0),wr=[];function Tr(e,t,n,r,i,a,o,s){var c=ir(t-n),l=ir(r-e),u=nr(c,l),d=ar[i],f=ar[1-i],p=or[i];t<n||r<e?c<l?(a&&(pr[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(pr[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=rr(e,n),o[p]=nr(t,r)-o[d]),a&&(u<mr[0]||dr.useDir)&&(mr[0]=nr(u,mr[0]),(c<l||!dr.bidirectional)&&(fr[d]=c,fr[f]=0,dr.useDir&&dr.calcDirMTV()),(c>=l||!dr.bidirectional)&&(fr[d]=-l,fr[f]=0,dr.useDir&&dr.calcDirMTV())))}function Er(){var e=0,t=new tr,n=new tr,r={minTv:new tr,maxTv:new tr,useDir:!1,dirMinTv:new tr,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=rr(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return ir(e)<1e-10}return r}function Dr(e){Or||=new Cn(100),e||=`12px sans-serif`;var t=Or.get(e);return t||(t={font:e,strWidthCache:new Cn(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ze.measureText(`国`,e).width,asciiCharWidth:Ze.measureText(`a`,e).width},Or.put(e,t)),t}var Or;function kr(e){if(!(Ar>=jr)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ze.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Ar=jr:i>2&&Ar++,t}}var Ar=0,jr=5;function Mr(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=kr(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Nr(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ze.measureText(t,e.font).width,n.put(t,r)),r}function Pr(e,t,n,r){var i=Nr(Dr(t),e),a=Rr(t);return new hr(Ir(0,i,n),Lr(0,a,r),i,a)}function Fr(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
-
`);if(i.length===1)return Pr(i[0],t,n,r);for(var a=new hr(0,0,0,0),o=0;o<i.length;o++){var s=Pr(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Ir(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Lr(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Rr(e){return Dr(e).stWideCharWidth}function zr(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Br(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=zr(r[0],n.width),l+=zr(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Vr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Hr(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
3
|
-
`);a=Ur(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Wr(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
|
-
`),e.isTruncated=s}function Ur(e,t,n,r){r||={};var i=U({},r);n=X(n,`...`),i.maxIterations=X(r.maxIterations,2);var a=i.minChar=X(r.minChar,0),o=i.fontMeasureInfo=Dr(t),s=o.asciiCharWidth;i.placeholder=X(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=Nr(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Wr(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Nr(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Gr(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Nr(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Gr(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Mr(n,e.charCodeAt(i));return i}function Kr(e,t,n,r){var i=ai(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Rr(l),f=X(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?ti(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
5
|
-
`):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Ur(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Wr(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=Dr(l),S=0;S<_.length;S++)w=Math.max(Nr(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var qr=function(){function e(){}return e}(),Jr=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Yr=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Xr(e,t,n,r,i){var a=new Yr,o=ai(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Vr.lastIndex=0,h;(h=Vr.exec(o))!=null;){var g=h.index;g>m&&Zr(a,o.substring(m,g),t,p),Zr(a,h[2],t,p,h[1]),m=Vr.lastIndex}m<o.length&&Zr(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,M=j?j[1]+j[3]:0,N=k.font=A.font||t.font;k.contentHeight=Rr(N);var P=X(A.height,k.contentHeight);if(k.innerHeight=P,j&&(P+=j[0]+j[2]),k.height=P,k.lineHeight=It(A.lineHeight,t.lineHeight,P),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var F=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<F;break outer}var I=A.width,L=I==null||I===`auto`;if(typeof I==`string`&&I.charAt(I.length-1)===`%`)k.percentWidth=I,_.push(k),k.contentWidth=Nr(Dr(N),k.text);else{if(L){var ee=A.backgroundColor,R=ee&&ee.image;R&&(R=Tn(R),On(R)&&(k.width=Math.max(k.width,R.width*P/R.height)))}var te=b&&u!=null?u-D:null;te!=null&&te<k.width?!L||te<M?(k.text=``,k.width=k.contentWidth=0):(Hr(S,k.text,te-M,N,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=Nr(Dr(N),k.text)):k.contentWidth=Nr(Dr(N),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=X(u,y),a.outerHeight=a.height=X(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],ne=k.percentWidth;k.width=parseInt(ne,10)/100*a.width}return a}function Zr(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=zr(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
6
|
-
`),l=!0),r.accumWidth=m}else{var h=ti(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
|
|
7
|
-
`);for(var g=Dr(c),_=0;_<u.length;_++){var v=u[_],y=new qr;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:Nr(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new Jr)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new Jr([y]))}}function Qr(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var $r=bt(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function ei(e){return!Qr(e)||!!$r[e]}function ti(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=Dr(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
|
|
8
|
-
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var m=Mr(d,p.charCodeAt(0)),h=!r&&!ei(p);if(a.length?u+m>n:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function ni(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;hr.set(ri,Ir(n,o,i),Lr(r,s,a),o,s),hr.intersect(t,ri,null,ii);var c=ii.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=Ir(c.x,c.width,i,!0),e.baseY=Lr(c.y,c.height,a,!0)}}var ri=new hr(0,0,0,0),ii={outIntersectRect:{},clamp:!0};function ai(e){return e==null?e=``:e+=``}function oi(e){var t=ai(e.text),n=e.font;return si(e,Nr(Dr(n),t),Rr(n),null)}function si(e,t,n,r){var i=new hr(Ir(e.x||0,t,e.textAlign),Lr(e.y||0,n,e.textBaseline),t,n),a=r??(ci(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function ci(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var li=An,ui=5e-5;function di(e){return e>ui||e<-ui}var fi=[],pi=[],mi=kn(),hi=Math.abs,gi=function(){function e(){}return e.prototype.getLocalTransform=function(e){return _i(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return di(this.rotation)||di(this.x)||di(this.y)||di(this.scaleX-1)||di(this.scaleY-1)||di(this.skewX)||di(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(li(n),this.invTransform=null);return}n||=kn(),t?this.getLocalTransform(n):li(n),e&&(t?Mn(n,e,n):jn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||kn(),In(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(fi);var n=fi[0]<0?-1:1,r=fi[1]<0?-1:1,i=((fi[0]-n)*t+n)/fi[0]||0,a=((fi[1]-r)*t+r)/fi[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||kn(),Mn(pi,e.invTransform,t),t=pi);var n=this.originX,r=this.originY;(n||r)&&(mi[4]=n,mi[5]=r,Mn(pi,t,mi),pi[4]-=n,pi[5]-=r,t=pi),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Qn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Qn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&hi(e[0]-1)>1e-10&&hi(e[3]-1)>1e-10?Math.sqrt(hi(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){bi(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Pn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),_i=gi.getLocalTransform;function vi(){return new gi}var yi=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function bi(e,t){return mt(e,t,yi)}var xi={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-xi.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?xi.bounceIn(e*2)*.5:xi.bounceOut(e*2-1)*.5+.5}},Si=Math.pow,Ci=Math.sqrt,wi=1e-8,Ti=1e-4,Ei=Ci(3),Di=1/3,Oi=Ln(),ki=Ln(),Ai=Ln();function ji(e){return e>-wi&&e<wi}function Mi(e){return e>wi||e<-wi}function Ni(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Pi(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Fi(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(ji(u)&&ji(d)){if(ji(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(ji(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Ci(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Si(-y,Di):Si(y,Di),b=b<0?-Si(-b,Di):Si(b,Di);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Ci(u*u*u)),S=Math.acos(x)/3,C=Ci(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Ei*Math.sin(S)))/(3*o),T=(-s+C*(w-Ei*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Ii(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(ji(o)){if(Mi(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(ji(u))i[0]=-a/(2*o);else if(u>0){var d=Ci(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Li(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Ri(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Oi[0]=c,Oi[1]=l;for(var v=0;v<1;v+=.05)ki[0]=Ni(e,n,i,o,v),ki[1]=Ni(t,r,a,s,v),g=Xn(Oi,ki),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Ti);y++)m=d-f,h=d+f,ki[0]=Ni(e,n,i,o,m),ki[1]=Ni(t,r,a,s,m),g=Xn(ki,Oi),m>=0&&g<p?(d=m,p=g):(Ai[0]=Ni(e,n,i,o,h),Ai[1]=Ni(t,r,a,s,h),_=Xn(Ai,Oi),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Ni(e,n,i,o,d),u[1]=Ni(t,r,a,s,d)),Ci(p)}function zi(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Ni(e,n,i,o,m),g=Ni(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Bi(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Vi(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Hi(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(ji(a)){if(Mi(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(ji(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Ci(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Ui(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Wi(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Gi(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Oi[0]=o,Oi[1]=s;for(var f=0;f<1;f+=.05){ki[0]=Bi(e,n,i,f),ki[1]=Bi(t,r,a,f);var p=Xn(Oi,ki);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Ti);m++){var h=l-u,g=l+u;ki[0]=Bi(e,n,i,h),ki[1]=Bi(t,r,a,h);var p=Xn(ki,Oi);if(h>=0&&p<d)l=h,d=p;else{Ai[0]=Bi(e,n,i,g),Ai[1]=Bi(t,r,a,g);var _=Xn(Ai,Oi);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Bi(e,n,i,l),c[1]=Bi(t,r,a,l)),Ci(d)}function Ki(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=Bi(e,n,i,f),m=Bi(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var qi=/cubic-bezier\(([0-9,\.e ]+)\)/;function Ji(e){var t=e&&qi.exec(e);if(t){var n=t[1].split(`,`),r=+Bt(n[0]),i=+Bt(n[1]),a=+Bt(n[2]),o=+Bt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Fi(0,r,a,1,e,s)&&Ni(0,i,o,1,s[0])}}}var Yi=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Qt,this.ondestroy=e.ondestroy||Qt,this.onrestart=e.onrestart||Qt,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Dt(e)?e:xi[e]||Ji(e)},e}(),Xi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Zi(e){return e=Math.round(e),e<0?0:e>255?255:e}function Qi(e){return e=Math.round(e),e<0?0:e>360?360:e}function $i(e){return e<0?0:e>1?1:e}function ea(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Zi(parseFloat(t)/100*255):Zi(parseInt(t,10))}function ta(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?$i(parseFloat(t)/100):$i(parseFloat(t))}function na(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ra(e,t,n){return e+(t-e)*n}function ia(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function aa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var oa=new Cn(20),sa=null;function ca(e,t){sa&&aa(sa,t),sa=oa.put(e,sa||t.slice())}function la(e,t){if(e){t||=[];var n=oa.get(e);if(n)return aa(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Xi)return aa(t,Xi[r]),ca(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){ia(t,0,0,0,1);return}return ia(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),ca(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){ia(t,0,0,0,1);return}return ia(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),ca(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?ia(t,+l[0],+l[1],+l[2],1):ia(t,0,0,0,1);u=ta(l.pop());case`rgb`:if(l.length>=3)return ia(t,ea(l[0]),ea(l[1]),ea(l[2]),l.length===3?u:ta(l[3])),ca(e,t),t;ia(t,0,0,0,1);return;case`hsla`:if(l.length!==4){ia(t,0,0,0,1);return}return l[3]=ta(l[3]),ua(l,t),ca(e,t),t;case`hsl`:if(l.length!==3){ia(t,0,0,0,1);return}return ua(l,t),ca(e,t),t;default:return}}ia(t,0,0,0,1)}}function ua(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=ta(e[1]),i=ta(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],ia(t,Zi(na(o,a,n+1/3)*255),Zi(na(o,a,n)*255),Zi(na(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function da(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function fa(e,t){var n=la(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return _a(n,n.length===4?`rgba`:`rgb`)}}function pa(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Zi(ra(o[0],s[0],c)),n[1]=Zi(ra(o[1],s[1],c)),n[2]=Zi(ra(o[2],s[2],c)),n[3]=$i(ra(o[3],s[3],c)),n}}function ma(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=la(t[i]),s=la(t[a]),c=r-i,l=_a([Zi(ra(o[0],s[0],c)),Zi(ra(o[1],s[1],c)),Zi(ra(o[2],s[2],c)),$i(ra(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function ha(e,t,n,r){var i=la(e);if(e)return i=da(i),t!=null&&(i[0]=Qi(Dt(t)?t(i[0]):t)),n!=null&&(i[1]=ta(Dt(n)?n(i[1]):n)),r!=null&&(i[2]=ta(Dt(r)?r(i[2]):r)),_a(ua(i),`rgba`)}function ga(e,t){var n=la(e);if(n&&t!=null)return n[3]=$i(t),_a(n,`rgba`)}function _a(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function va(e,t){var n=la(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ya=new Cn(100);function ba(e){if(q(e)){var t=ya.get(e);return t||(t=fa(e,-.1),ya.put(e,t)),t}if(Nt(e)){var n=U({},e);return n.colorStops=G(e.colorStops,function(e){return{offset:e.offset,color:fa(e.color,-.1)}}),n}return e}function xa(e){return e.type===`linear`}function Sa(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var Ca=Array.prototype.slice;function wa(e,t,n){return(t-e)*n+e}function Ta(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=wa(t[a],n[a],r);return e}function Ea(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=wa(t[o][s],n[o][s],r)}return e}function Da(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Oa(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function ka(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function Aa(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Ca.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ja(e){if(yt(e)){var t=e.length;if(yt(e[0])){for(var n=[],r=0;r<t;r++)n.push(Ca.call(e[r]));return n}return Ca.call(e)}return e}function Ma(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Na(e){return yt(e&&e[0])?2:1}var Pa=0,Fa=1,Ia=2,La=3,Ra=4,za=5,Ba=6;function Va(e){return e===Ra||e===za}function Ha(e){return e===Fa||e===Ia}var Ua=[0,0,0,0],Wa=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Ba,s=t;if(yt(t)){var c=Na(t);o=c,(c===1&&!kt(t[0])||c===2&&!kt(t[0][0]))&&(a=!0)}else if(kt(t)&&!Ft(t))o=Pa;else if(q(t)){if(!isNaN(+t))o=Pa;else{var l=la(t);l&&(s=l,o=La)}}else if(Nt(t)){var u=U({},s);u.colorStops=G(t.colorStops,function(e){return{offset:e.offset,color:la(e.color)}}),xa(t)?o=Ra:Sa(t)&&(o=za),s=u}i===0?this.valType=o:(o!==this.valType||o===Ba)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Dt(n)?n:xi[n]||Ji(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Ha(r),c=Va(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?Aa(d,f,r):c&&ka(d.colorStops,f.colorStops))}if(!o&&r!==za&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Pa?n[l].additiveValue=n[l].value-p:r===La?n[l].additiveValue=Da([],n[l].value,p,-1):Ha(r)&&(n[l].additiveValue=r===Fa?Da([],n[l].value,p,-1):Oa([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===La,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ua:e[s];if((Ha(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ha(i))i===Fa?Ta(g,f[r],p[r],h):Ea(g,f[r],p[r],h);else if(Va(i)){var _=f[r],v=p[r],y=i===Ra;e[s]={type:y?`linear`:`radial`,x:wa(_.x,v.x,h),y:wa(_.y,v.y,h),colorStops:G(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:wa(e.offset,n.offset,h),color:Ma(Ta([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=wa(_.x2,v.x2,h),e[s].y2=wa(_.y2,v.y2,h)):e[s].r=wa(_.r,v.r,h)}else if(c)Ta(g,f[r],p[r],h),n||(e[s]=Ma(g));else{var b=wa(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Pa?e[n]=e[n]+r:t===La?(la(e[n],Ua),Da(Ua,Ua,r,1),e[n]=Ma(Ua)):t===Fa?Da(e[n],e[n],r,1):t===Ia&&Oa(e[n],e[n],r,1)},e}(),Ga=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){ft(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Ct(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Wa(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===La&&c&&(c=Ma(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ja(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ja(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Yi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return G(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ja(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Ct(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ka=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),qa=1;tn.hasGlobalWindow&&(qa=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ja=qa,Ya=.4,Xa=`#333`,Za=`#ccc`,Qa=`#eee`,$a=`__zr_normal__`,eo=yi.concat([`ignore`]),to=bt(yi,function(e,t){return e[t]=!0,e},{ignore:!1}),no={},ro=new hr(0,0,0,0),io=[],ao=function(){function e(e){this.id=dt(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=ro,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(no,n,d):Br(no,n,d),i.x=no.x,i.y=no.y,a=no.align,o=no.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=zr(f[0],d.width),m=zr(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new hr(0,0,0,0);i.getLocalTransform(io),In(io,io),hr.copy(_,d),_.applyTransform(io)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Za:Xa},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&la(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,_a(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},U(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=Ct(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,eo)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState($a,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===$a;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(gt(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){ft(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=mo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,go(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=mo(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,go(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=gt(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=gt(r,e),a=gt(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];U(t,i),i.textConfig&&(n||={},U(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=U({},r?this.textConfig:n.textConfig),U(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<eo.length;l++){var u=eo[l],d=i&&to[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new gi,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},U(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Ga(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=gt(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){oo(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){oo(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=oo(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();vt(ao,Ka),vt(ao,gi);function oo(e,t,n,r,i){n||={};var a=[];po(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function so(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function co(e){return yt(e[0])}function lo(e,t,n){if(yt(t[n])){if(yt(e[n])||(e[n]=[]),jt(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),so(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(co(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?so(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else so(a,i,o);a.length=i.length}}else e[n]=t[n]}function uo(e,t){return e===t||yt(e)&&yt(t)&&fo(e,t)}function fo(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function po(e,t,n,r,i,a,o,s){for(var c=Ct(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!J(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(J(v)&&!yt(v)&&!Nt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}po(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=gt(m,x);m.splice(S,1)}}if(i.force||(h=xt(h,function(e){return!uo(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=ja(n[_]),lo(n,r,_)}}var x=new Ga(n,!1,!1,d?xt(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function mo(e,t,n,r){return!(n&&n.hoverLayer||r)||ho(e)||t&&ho(t)?0:1}function ho(e){return e.type===`text`||e.type===`tspan`}function go(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var _o=`__zr_style_`+Math.round(Math.random()*10),vo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},yo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};vo[_o]=!0;var bo=[`z`,`z2`,`invisible`],xo=[`invisible`],So=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Ct(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&To(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new hr(0,0,0,0),t?hr.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new hr(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:U(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Xt(vo,e)},t.prototype.useStyle=function(e){e[_o]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[_o]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,bo)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l){if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=Ct(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=Ct(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l)}if(!c)for(var h=this.__inHover?xo:bo,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return U(e,t),e},t.prototype.getAnimationStyleProps=function(){return yo},t.initDefaultProps=(function(){var e=t.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}(ao),Co=new hr(0,0,0,0),wo=new hr(0,0,0,0);function To(e,t,n){return Co.copy(e.getBoundingRect()),e.transform&&Co.applyTransform(e.transform),wo.width=t,wo.height=n,!Co.intersect(wo)}var Eo=Math.min,Do=Math.max,Oo=Math.sin,ko=Math.cos,Ao=Math.PI*2,jo=Ln(),Mo=Ln(),No=Ln();function Po(e,t,n,r,i,a){i[0]=Eo(e,n),i[1]=Eo(t,r),a[0]=Do(e,n),a[1]=Do(t,r)}var Fo=[],Io=[];function Lo(e,t,n,r,i,a,o,s,c,l){var u=Ii,d=Ni,f=u(e,n,i,o,Fo);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,Fo[p]);c[0]=Eo(m,c[0]),l[0]=Do(m,l[0])}f=u(t,r,a,s,Io);for(var p=0;p<f;p++){var h=d(t,r,a,s,Io[p]);c[1]=Eo(h,c[1]),l[1]=Do(h,l[1])}c[0]=Eo(e,c[0]),l[0]=Do(e,l[0]),c[0]=Eo(o,c[0]),l[0]=Do(o,l[0]),c[1]=Eo(t,c[1]),l[1]=Do(t,l[1]),c[1]=Eo(s,c[1]),l[1]=Do(s,l[1])}function Ro(e,t,n,r,i,a,o,s){var c=Ui,l=Bi,u=Do(Eo(c(e,n,i),1),0),d=Do(Eo(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Eo(e,i,f),o[1]=Eo(t,a,p),s[0]=Do(e,i,f),s[1]=Do(t,a,p)}function zo(e,t,n,r,i,a,o,s,c){var l=$n,u=er,d=Math.abs(i-a);if(d%Ao<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(jo[0]=ko(i)*n+e,jo[1]=Oo(i)*r+t,Mo[0]=ko(a)*n+e,Mo[1]=Oo(a)*r+t,l(s,jo,Mo),u(c,jo,Mo),i%=Ao,i<0&&(i+=Ao),a%=Ao,a<0&&(a+=Ao),i>a&&!o?a+=Ao:i<a&&o&&(i+=Ao),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(No[0]=ko(p)*n+e,No[1]=Oo(p)*r+t,l(s,No,s),u(c,No,c))}var Bo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Vo=[],Ho=[],Uo=[],Wo=[],Go=[],Ko=[],qo=Math.min,Jo=Math.max,Yo=Math.cos,Xo=Math.sin,Zo=Math.abs,Qo=Math.PI,$o=Qo*2,es=typeof Float32Array<`u`,ts=[];function ns(e){return Math.round(e/Qo*1e8)/1e8%2*Qo}function rs(e,t){var n=ns(e[0]);n<0&&(n+=$o);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=$o?i=n+$o:t&&n-i>=$o?i=n-$o:!t&&n>i?i=n+($o-ns(n-i)):t&&n<i&&(i=n-($o-ns(i-n))),e[0]=n,e[1]=i}var is=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=Zo(n/Ja/e)||0,this._uy=Zo(n/Ja/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Bo.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Zo(e-this._xi),r=Zo(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Bo.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Bo.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Bo.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),ts[0]=r,ts[1]=i,rs(ts,a),r=ts[0],i=ts[1];var o=i-r;return this.addData(Bo.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Yo(i)*n+e,this._yi=Xo(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Bo.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Bo.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&es&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(es&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,es&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Uo[0]=Uo[1]=Go[0]=Go[1]=Number.MAX_VALUE,Wo[0]=Wo[1]=Ko[0]=Ko[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case Bo.M:t=r=e[a++],n=i=e[a++],Go[0]=r,Go[1]=i,Ko[0]=r,Ko[1]=i;break;case Bo.L:Po(t,n,e[a],e[a+1],Go,Ko),t=e[a++],n=e[a++];break;case Bo.C:Lo(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Go,Ko),t=e[a++],n=e[a++];break;case Bo.Q:Ro(t,n,e[a++],e[a++],e[a],e[a+1],Go,Ko),t=e[a++],n=e[a++];break;case Bo.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=Yo(f)*u+c,i=Xo(f)*d+l),zo(c,l,u,d,f,p,m,Go,Ko),t=Yo(p)*u+c,n=Xo(p)*d+l;break;case Bo.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Po(r,i,r+h,i+g,Go,Ko);break;case Bo.Z:t=r,n=i}$n(Uo,Uo,Go),er(Wo,Wo,Ko)}return a===0&&(Uo[0]=Uo[1]=Wo[0]=Wo[1]=0),new hr(Uo[0],Uo[1],Wo[0]-Uo[0],Wo[1]-Uo[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case Bo.M:i=o=e[d++],a=s=e[d++];break;case Bo.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Zo(_)>n||Zo(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Bo.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=zi(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Bo.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Ki(i,a,y,b,h,g,10),i=h,a=g;break;case Bo.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Yo(D)*T+C,s=Xo(D)*E+w),m=Jo(T,E)*qo($o,Math.abs(O)),i=Yo(k)*T+C,a=Xo(k)*E+w;break;case Bo.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Bo.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==Bo.L&&v>0&&(e.lineTo(y,b),v=0),S){case Bo.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Bo.L:u=n[x++],d=n[x++];var w=Zo(u-c),T=Zo(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Bo.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Li(c,k,j,N,D,Vo),Li(l,A,M,P,D,Ho),e.bezierCurveTo(Vo[1],Ho[1],Vo[2],Ho[2],Vo[3],Ho[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Bo.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Wi(c,k,j,D,Vo),Wi(l,A,M,D,Ho),e.quadraticCurveTo(Vo[1],Ho[1],Vo[2],Ho[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Bo.A:var F=n[x++],I=n[x++],L=n[x++],ee=n[x++],R=n[x++],te=n[x++],ne=n[x++],re=!n[x++],ie=L>ee?L:ee,ae=Zo(L-ee)>.001,oe=R+te,z=!1;if(f){var E=p[g++];h+E>_&&(oe=R+te*(_-h)/E,z=!0),h+=E}if(ae&&e.ellipse?e.ellipse(F,I,L,ee,ne,R,oe,re):e.arc(F,I,ie,R,oe,re),z)break lo;C&&(o=Yo(R)*L+F,s=Xo(R)*ee+I),c=Yo(oe)*L+F,l=Xo(oe)*ee+I;break;case Bo.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var B=n[x++],se=n[x++];if(f){var E=p[g++];if(h+E>_){var ce=_-h;e.moveTo(u,d),e.lineTo(u+qo(ce,B),d),ce-=B,ce>0&&e.lineTo(u+B,d+qo(ce,se)),ce-=se,ce>0&&e.lineTo(u+Jo(B-ce,0),d+se),ce-=B,ce>0&&e.lineTo(u,d+Jo(se-ce,0));break lo}h+=E}e.rect(u,d,B,se);break;case Bo.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Bo,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function as(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function os(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:Ri(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function ss(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:Gi(e,t,n,r,i,a,s,c,null)<=l/2}var cs=Math.PI*2;function ls(e){return e%=cs,e<0&&(e+=cs),e}var us=Math.PI*2;function ds(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%us<1e-4)return!0;if(a){var d=r;r=ls(i),i=ls(d)}else r=ls(r),i=ls(i);r>i&&(i+=us);var f=Math.atan2(c,s);return f<0&&(f+=us),f>=r&&f<=i||f+us>=r&&f+us<=i}function fs(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var ps=is.CMD,ms=Math.PI*2,hs=1e-4;function gs(e,t){return Math.abs(e-t)<hs}var _s=[-1,-1,-1],vs=[-1,-1];function ys(){var e=vs[0];vs[0]=vs[1],vs[1]=e}function bs(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;var u=Fi(t,r,a,s,l,_s);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=_s[h],_=g===0||g===1?.5:1;Ni(e,n,i,o,g)<c||(f<0&&(f=Ii(t,r,a,s,vs),vs[1]<vs[0]&&f>1&&ys(),p=Ni(t,r,a,s,vs[0]),f>1&&(m=Ni(t,r,a,s,vs[1]))),f===2?g<vs[0]?d+=p<t?_:-_:g<vs[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<vs[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function xs(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=Hi(t,r,a,s,_s);if(c===0)return 0;var l=Ui(t,r,a);if(l>=0&&l<=1){for(var u=0,d=Bi(t,r,a,l),f=0;f<c;f++){var p=_s[f]===0||_s[f]===1?.5:1,m=Bi(e,n,i,_s[f]);m<o||(_s[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=_s[0]===0||_s[0]===1?.5:1,m=Bi(e,n,i,_s[0]);return m<o?0:a<t?p:-p}function Ss(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);_s[0]=-c,_s[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=ms-1e-4){r=0,i=ms;var u=a?1:-1;return o>=_s[0]+e&&o<=_s[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=ms,i+=ms);for(var f=0,p=0;p<2;p++){var m=_s[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=ms+h),(h>=r&&h<=i||h+ms>=r&&h+ms<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function Cs(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===ps.M&&m>1&&(n||(s+=fs(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ps.M:u=a[m++],d=a[m++],c=u,l=d;break;case ps.L:if(n){if(as(c,l,a[m],a[m+1],t,r,i))return!0}else s+=fs(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ps.C:if(n){if(os(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=bs(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ps.Q:if(n){if(ss(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=xs(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ps.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=fs(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(ds(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Ss(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ps.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(as(u,d,f,d,t,r,i)||as(f,d,f,p,t,r,i)||as(f,p,u,p,t,r,i)||as(u,p,u,d,t,r,i))return!0}else s+=fs(f,d,f,p,r,i),s+=fs(u,p,u,d,r,i);break;case ps.Z:if(n){if(as(c,l,u,d,t,r,i))return!0}else s+=fs(c,l,u,d,r,i);c=u,l=d}}return!n&&!gs(l,d)&&(s+=fs(c,l,u,d,r,i)||0),s!==0}function ws(e,t,n){return Cs(e,0,!1,t,n)}function Ts(e,t,n,r){return Cs(e,t,!0,n,r)}var Es=ht({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},vo),Ds={style:ht({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},yo.style)},Os=yi.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),ks=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<Os.length;++s)i[Os[s]]=this[Os[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Ct(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?U(this.style,o):this.useStyle(o):a===`shape`?U(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(q(e)){var t=va(e,0);return t>.5?Xa:t>.2?Qa:Za}if(e)return Za}return Xa},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==va(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new is(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Ts(a,o/s,e,t)))return!0}if(this.hasFill())return ws(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:U(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Xt(Es,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=U({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=U({},r.shape),U(c,n.shape)):(c=U({},i?this.shape:r.shape),U(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=U({},this.shape);for(var l={},u=Ct(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return Ds},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){V(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return pt(e.style)},n.prototype.getDefaultShape=function(){return pt(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(So),As=ht({strokeFirst:!0,font:Ge,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Es),js=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return ci(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Xt(As,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=oi(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(So);js.prototype.type=`tspan`;var Ms=ht({x:0,y:0},vo),Ns={style:ht({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},yo.style)};function Ps(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Fs=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Xt(Ms,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=Ps(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return Ns},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new hr(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(So);Fs.prototype.type=`image`;function Is(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Ls=Math.round;function Rs(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Ls(r*2)===Ls(i*2)&&(e.x1=e.x2=Bs(r,s,!0)),Ls(a*2)===Ls(o*2)&&(e.y1=e.y2=Bs(a,s,!0)),e):e}}function zs(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Bs(r,s,!0),e.y=Bs(i,s,!0),e.width=Math.max(Bs(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Bs(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Bs(e,t,n){if(!t)return e;var r=Ls(e*2);return(r+Ls(t))%2==0?r/2:(r+(n?1:-1))/2}var Vs=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Hs={},Us=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Vs},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=zs(Hs,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Is(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ks);Us.prototype.type=`rect`;var Ws={fill:`#000`},Gs=2,Ks={},qs={style:ht({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},yo.style)},Js=function(e){V(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Ws,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,tc(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new hr(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Ws},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return U(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=Ct(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},U(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return qs},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return(!t||!(t instanceof e))&&(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;ni(Ks,r.overflowRect,i,a,o,s),i=Ks.baseX,a=Ks.baseY;var c=Kr(oc(e),e,Ks.outerWidth,Ks.outerHeight),l=sc(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Lr(a,c.contentHeight,s);if(l||n){var _=Ir(i,f,o),v=Lr(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=ac(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=ic(`fill`in e?e.fill:(x=!0,r.fill)),C=rc(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Gs,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(js),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,$s(D,e),g+=m,E.setBoundingRect(si(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;ni(Ks,t.overflowRect,i,a,n,r),i=Ks.baseX,a=Ks.baseY;var o=Xr(oc(e),e,Ks.outerWidth,Ks.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=Ir(i,c,n),f=Lr(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;sc(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&sc(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=ac(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(js),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ic(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=rc(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Gs,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=It(s.opacity,t.opacity,1),$s(p,s),y&&(p.lineWidth=It(s.lineWidth,t.lineWidth,g),p.lineDash=X(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(si(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Us),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=X(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Fs),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=X(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=It(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ec(e)&&(t=[e.fontStyle,e.fontWeight,Qs(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Bt(t)||e.textFont||e.font},t}(So),Ys={left:!0,right:1,center:1},Xs={top:1,bottom:1,middle:1},Zs=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Qs(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function $s(e,t){for(var n=0;n<Zs.length;n++){var r=Zs[n],i=t[r];i!=null&&(e[r]=i)}}function ec(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function tc(e){return nc(e),W(e.rich,nc),e}function nc(e){if(e){e.font=Js.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Ys[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Xs[n]?n:`top`,e.padding&&=Rt(e.padding)}}function rc(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function ic(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ac(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function oc(e){var t=e.text;return t!=null&&(t+=``),t}function sc(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var cc=1e-4,lc=20;function uc(e){return e.replace(/^\s+|\s+$/g,``)}var dc=Math.min,fc=Math.max,pc=Math.abs,mc=Math.round,hc=Math.floor,gc=Math.ceil,_c=Math.pow,vc=Math.log,yc=Math.LN10,bc=Math.PI,xc=Math.random;function Sc(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Cc=wc;function wc(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Tc(e,t,n)}function Tc(e,t,n){return q(e)?Ec(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Ec(e){return!!uc(e).match(/%$/)}function Dc(e,t,n){return isNaN(t)?n?``+e:+e:(t=dc(fc(0,t),lc),e=(+e).toFixed(t),n?e:+e)}function Oc(e){return e.sort(function(e,t){return e-t}),e}function kc(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(mc(e*t)/t===e)return n}return Ac(e)}function Ac(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return fc(0,(a<0?0:i-1-a)-r)}function jc(e,t,n){var r=pc(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=vc(2*pc(n||1)*pc(r))/yc,a=vc(pc(t))/yc,o=fc(0,gc(-i+a));return isFinite(o)||(o=NaN),o}function Mc(e,t){var n=bt(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=_c(10,t),i=G(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=G(i,function(e){return hc(e)}),s=bt(o,function(e,t){return e+t},0),c=G(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return G(o,function(e){return e/r})}function Nc(e,t){var n=fc(kc(e),kc(t)),r=e+t;return n>lc?r:Dc(r,n)}var Pc=_c(2,53)-1;function Fc(e){var t=bc*2;return(e%t+t)%t}function Ic(e){return e>-cc&&e<cc}var Lc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Rc(e){if(e instanceof Date)return e;if(q(e)){var t=Lc.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(mc(e))}function zc(e){return _c(10,Bc(e))}function Bc(e){if(e===0)return 0;var t=hc(vc(e)/yc);return e/_c(10,t)>=10&&t++,t}function Vc(e,t){var n=Bc(e),r=_c(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Dc(e,-n)}function Hc(e){var t=parseFloat(e);return t==e&&(t!==0||!q(e)||e.indexOf(`x`)<=0)?t:NaN}function Uc(e){return!isNaN(Hc(e))}function Wc(){return mc(xc()*9)}function Gc(e,t){return t===0?e:Gc(t,e%t)}function Kc(e,t){return e==null?t:t==null?e:e*t/Gc(e,t)}function qc(e){return e!=null&&isFinite(e)}var Jc=`[ECharts] `,Yc={},Xc=typeof console<`u`&&console.warn&&console.log;function Zc(e,t,n){if(Xc){if(n){if(Yc[t])return;Yc[t]=!0}console[e](Jc+t)}}function Qc(e,t){Zc(`error`,e,t)}function $c(e){throw Error(e)}function el(e,t,n){return(t-e)*n+e}var tl=`series\0`,nl=`\0_ec_\0`;function rl(e){return e instanceof Array?e:e==null?[]:[e]}function il(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var al=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function ol(e){return J(e)&&!K(e)&&!(e instanceof Date)?e.value:e}function sl(e){return J(e)&&!(e instanceof Array)}function cl(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Jt();W(t,function(e,n){if(!J(e)){t[n]=null;return}});var s=ll(e,o,n);return(r||i)&&ul(s,e,o,t),r&&dl(s,t),r||i?fl(s,t,i):a&&pl(s,t),ml(s),s}function ll(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||yl(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function ul(e,t,n,r){W(r,function(i,a){if(!(!i||i.id==null)){var o=gl(i.id),s=n.get(o);if(s!=null){var c=e[s];zt(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function dl(e,t){W(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!yl(n)&&!yl(a)&&hl(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function fl(e,t,n){W(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||yl(r.existing)||r.existing&&t.id!=null&&!hl(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function pl(e,t){W(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function ml(e){var t=Jt();W(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),W(e,function(e){var n=e.newOption;zt(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),W(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(J(i)){if(a.name=i.name==null?r?r.name:tl+n:gl(i.name),r)a.id=gl(r.id);else if(i.id!=null)a.id=gl(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function hl(e,t,n){var r=_l(t[e],null),i=_l(n[e],null);return r!=null&&i!=null&&r===i}function gl(e){return _l(e,``)}function _l(e,t){return e==null?t:q(e)?e:kt(e)||Ot(e)?e+``:t}function vl(e){var t=e.name;return!!(t&&t.indexOf(tl))}function yl(e){return e&&e.id!=null&&gl(e.id).indexOf(nl)===0}function bl(e,t,n){W(e,function(e){var r=e.newOption;J(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=xl(t,r,e.existing,n))})}function xl(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Sl(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return K(t.dataIndex)?G(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return K(t.name)?G(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Cl(){var e=`__ec_inner_`+wl++;return function(t){return t[e]||(t[e]={})}}var wl=Wc();function Tl(e,t,n){var r=El(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=Ol(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function El(e,t){var n;if(q(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Jt(),a={},o=!1;return W(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&>(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Dl={useDefault:!0,enableAll:!1,enableNone:!1};function Ol(e,t,n,r){r||=Dl;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function kl(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Al(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function jl(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Ml(e){return e===`auto`?tn.domSupported?`html`:`richText`:e||`html`}function Nl(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(kt(r)){var o=el(n||0,r,i);return Dc(o,a?Math.max(kc(n||0),kc(r)):t)}if(q(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=el(p,m,i);s[d]=Dc(o,a?Math.max(kc(p),kc(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Pl(){return[1/0,-1/0]}function Fl(e,t){zl(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Il(e,t){zl(t)&&t<e[0]&&(e[0]=t)}function Ll(e,t){zl(t)&&t>e[1]&&(e[1]=t)}function Rl(e,t){Bl(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function zl(e){return e!=null&&isFinite(e)}function Bl(e,t){return zl(e)&&zl(t)&&e<=t}function Vl(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Hl(e){Bl(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Ul(){var e=`__ec_once_`+Wl++;return function(t,n){Z(t,e)||(t[e]=1,n())}}var Wl=Wc();function Gl(e,t,n){var r=Jt(),i=0;W(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Kl(e){return e.value+``}function ql(e){return e+``}function Jl(e,t){return X(t,!0)?e.seriesIndex+2:0}function Yl(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Xl(e,t){return{seriesType:e,overallReset:t}}function Zl(e){return{overallReset:e}}var Ql=Cl(),$l=function(e,t,n,r){if(r){var i=Ql(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Ql(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},eu=Jt([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),tu=`original`,nu=`arrayRows`,ru=`objectRows`,iu=`keyedColumns`,au=`typedArray`,ou=`unknown`,su=`column`,cu=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],lu=function(){function e(e){W(cu,function(t){this[t]=Tt(e[t],e)},this)}return e}();function uu(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var du=1,fu={},pu=Cl(),mu=Cl(),hu=[`emphasis`,`blur`,`select`],gu=[`normal`,`emphasis`,`blur`,`select`],_u=`highlight`,vu=`downplay`,yu=`select`,bu=`unselect`,xu=`toggleSelect`,Su=`selectchanged`;function Cu(e){return e!=null&&e!==`none`}function wu(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Tu(e){wu(e,`emphasis`,2)}function Eu(e){e.hoverState===2&&wu(e,`normal`,0)}function Du(e){wu(e,`blur`,1)}function Ou(e){e.hoverState===1&&wu(e,`normal`,0)}function ku(e){e.selected=!0}function Au(e){e.selected=!1}function ju(e,t,n){t(e,n)}function Mu(e,t,n){ju(e,t,n),e.isGroup&&e.traverse(function(e){ju(e,t,n)})}function Nu(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Pu(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function Fu(e,t,n,r){var i=n&>(n,`select`)>=0,a=!1;if(e instanceof ks){var o=pu(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Cu(s)||Cu(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=U({},r),l=U({},l),l.fill=s):!Cu(l.fill)&&Cu(s)?(a=!0,r=U({},r),l=U({},l),l.fill=ba(s)):!Cu(l.stroke)&&Cu(c)&&(a||(r=U({},r),l=U({},l)),l.stroke=ba(c)),r.style=l}}if(r&&r.z2==null){a||(r=U({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Iu(e,t,n){if(n&&n.z2==null){n=U({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Lu(e,t,n){var r=gt(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Pu(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=U({},n),o=U({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Ru(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Fu(this,e,t,n);if(e===`blur`)return Lu(this,e,n);if(e===`select`)return Iu(this,e,n)}return n}function zu(e){e.stateProxy=Ru;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Ru),n&&(n.stateProxy=Ru)}function Bu(e,t){!Ju(e,t)&&!e.__highByOuter&&Mu(e,Tu)}function Vu(e,t){!Ju(e,t)&&!e.__highByOuter&&Mu(e,Eu)}function Hu(e,t){e.__highByOuter|=1<<(t||0),Mu(e,Tu)}function Uu(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mu(e,Eu)}function Wu(e){Mu(e,Du)}function Gu(e){Mu(e,Ou)}function Ku(e){Mu(e,ku)}function qu(e){Mu(e,Au)}function Ju(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Yu(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=mu(i),o=uu(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Ou(e)}),s&&n.push(i)),a.isBlured=!1}),W(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Xu(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Gu(r)}}if(e!=null&&!(!t||t===`none`)){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||Du(e)}),yt(t))a(e.getData(),t);else if(J(t))for(var u=Ct(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),mu(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function Zu(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){mu(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){Du(e)})}}}function Qu(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Sl(i,t);a=(K(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=Ql(o);Xu(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Xu(r,u,d,n)}}}function $u(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if(Ql(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function ed(e,t,n){var r=Ql(e),i=$u(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Zu(r.componentMainType,r.componentIndex,n),W(a,function(e){return Bu(e,t)})):(Xu(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Zu(r.componentMainType,r.componentIndex,n),Bu(e,t))}function td(e,t,n){Yu(n);var r=Ql(e),i=$u(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?W(i,function(e){return Vu(e,t)}):Vu(e,t)}function nd(e,t,n){if(hd(t)){var r=t.dataType,i=Sl(e.getData(r),t);K(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function rd(e){W(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Ku(t):qu(t)})})}function id(e){var t=[];return e.eachSeries(function(e){W(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ad(e,t,n){fd(e,!0),Mu(e,zu),cd(e,t,n)}function od(e){fd(e,!1)}function sd(e,t,n,r){r?od(e):ad(e,t,n)}function cd(e,t,n){var r=Ql(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var ld=[`emphasis`,`blur`,`select`],ud={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function dd(e,t,n,r){n||=`itemStyle`;for(var i=0;i<ld.length;i++){var a=ld[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[ud[n]]()}}function fd(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function pd(e){return!!(e&&e.__highDownDispatcher)}function md(e){var t=fu[e];return t==null&&du<=32&&(t=fu[e]=du++),t}function hd(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function gd(e){var t=e.type;return t===`highlight`||t===`downplay`}function _d(e){var t=pu(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var vd=is.CMD,yd=[[],[],[]],bd=Math.sqrt,xd=Math.atan2;function Sd(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=vd.M,d=vd.C,f=vd.L,p=vd.R,m=vd.A,h=vd.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:var g=t[4],_=t[5],v=bd(t[0]*t[0]+t[1]*t[1]),y=bd(t[2]*t[2]+t[3]*t[3]),b=xd(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],Qn(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],Qn(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=yd[c];x[0]=n[o++],x[1]=n[o++],Qn(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Cd=Math.sqrt,wd=Math.sin,Td=Math.cos,Ed=Math.PI;function Dd(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Od(e,t){return(e[0]*t[0]+e[1]*t[1])/(Dd(e)*Dd(t))}function kd(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Od(e,t))}function Ad(e,t,n,r,i,a,o,s,c,l,u){var d=Ed/180*c,f=Td(d)*(e-n)/2+wd(d)*(t-r)/2,p=-1*wd(d)*(e-n)/2+Td(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Cd(m),s*=Cd(m));var h=(i===a?-1:1)*Cd((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Td(d)*g-wd(d)*_,y=(t+r)/2+wd(d)*g+Td(d)*_,b=kd([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=kd(x,S);if(Od(x,S)<=-1&&(C=Ed),Od(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Ed*1e6)/1e6;C=Ed*2+w%2*Ed}u.addData(l,v,y,o,s,b,C,d,a)}var jd=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Md=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Nd(e){var t=new is;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=is.CMD,c=e.match(jd);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(Md)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,Ad(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,Ad(w,T,n,r,S,C,y,b,x,f,t)}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var Pd=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(ks);function Fd(e){return e.setData!=null}function Id(e,t){var n=Nd(e),r=U({},t);return r.buildPath=function(e){var t=Fd(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){Sd(n,e),this.dirtyShape()},r}function Ld(e,t){return new Pd(Id(e,t))}function Rd(e,t){var n=Id(e,t);return function(e){V(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Pd)}function zd(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new ks(t);return o.createPathProxy(),o.buildPath=function(e){if(Fd(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Bd=function(e){V(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=gt(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=gt(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new hr(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(hr.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(ao);Bd.prototype.type=`group`;var Vd=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Hd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Vd},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(ks);Hd.prototype.type=`circle`;var Ud=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Wd=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Ud},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()},t}(ks);Wd.prototype.type=`ellipse`;var Gd=Math.PI,Kd=Gd*2,qd=Math.sin,Jd=Math.cos,Yd=Math.acos,Xd=Math.atan2,Zd=Math.abs,Qd=Math.sqrt,$d=Math.max,ef=Math.min,tf=1e-4;function nf(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<tf))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function rf(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Qd(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Qd($d(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function af(e){var t;if(K(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function of(e,t){var n,r=$d(t.r,0),i=$d(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Zd(c-s),p=f>Kd&&f%Kd;if(p>tf&&(f=p),!(r>tf))e.moveTo(l,u);else if(f>Kd-tf)e.moveTo(l+r*Jd(s),u+r*qd(s)),e.arc(l,u,r,s,c,!d),i>tf&&(e.moveTo(l+i*Jd(c),u+i*qd(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Jd(s),j=r*qd(s),M=i*Jd(c),N=i*qd(c),P=f>tf;if(P){var F=t.cornerRadius;F&&(n=af(F),m=n[0],h=n[1],g=n[2],_=n[3]);var I=Zd(r-i)/2;if(v=ef(I,g),y=ef(I,_),b=ef(I,m),x=ef(I,h),w=S=$d(v,y),T=C=$d(b,x),(S>tf||C>tf)&&(E=r*Jd(c),D=r*qd(c),O=i*Jd(s),k=i*qd(s),f<Gd)){var L=nf(A,j,O,k,E,D,M,N);if(L){var ee=A-L[0],R=j-L[1],te=E-L[0],ne=D-L[1],re=1/qd(Yd((ee*te+R*ne)/(Qd(ee*ee+R*R)*Qd(te*te+ne*ne)))/2),ie=Qd(L[0]*L[0]+L[1]*L[1]);w=ef(S,(r-ie)/(re+1)),T=ef(C,(i-ie)/(re-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>tf){var ae=ef(g,w),oe=ef(_,w),z=rf(O,k,A,j,r,ae,d),B=rf(E,D,M,N,r,oe,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w<S&&ae===oe?e.arc(l+z.cx,u+z.cy,w,Xd(z.y0,z.x0),Xd(B.y0,B.x0),!d):(ae>0&&e.arc(l+z.cx,u+z.cy,ae,Xd(z.y0,z.x0),Xd(z.y1,z.x1),!d),e.arc(l,u,r,Xd(z.cy+z.y1,z.cx+z.x1),Xd(B.cy+B.y1,B.cx+B.x1),!d),oe>0&&e.arc(l+B.cx,u+B.cy,oe,Xd(B.y1,B.x1),Xd(B.y0,B.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>tf)||!P)e.lineTo(l+M,u+N);else if(T>tf){var ae=ef(m,T),oe=ef(h,T),z=rf(M,N,E,D,i,-oe,d),B=rf(A,j,O,k,i,-ae,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T<C&&ae===oe?e.arc(l+z.cx,u+z.cy,T,Xd(z.y0,z.x0),Xd(B.y0,B.x0),!d):(oe>0&&e.arc(l+z.cx,u+z.cy,oe,Xd(z.y0,z.x0),Xd(z.y1,z.x1),!d),e.arc(l,u,i,Xd(z.cy+z.y1,z.cx+z.x1),Xd(B.cy+B.y1,B.cx+B.x1),d),ae>0&&e.arc(l+B.cx,u+B.cy,ae,Xd(B.y1,B.x1),Xd(B.y0,B.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var sf=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),cf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new sf},t.prototype.buildPath=function(e,t){of(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(ks);cf.prototype.type=`sector`;var lf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),uf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new lf},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(ks);uf.prototype.type=`ring`;function df(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)$n(u,u,e[f]),er(d,d,e[f]);$n(u,u,r[0]),er(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(zn(e[f]));continue}else c=e[f-1],l=e[f+1];Hn(a,l,c),Gn(a,a,t);var h=qn(m,c),g=qn(m,l),_=h+g;_!==0&&(h/=_,g/=_),Gn(o,a,-h),Gn(s,a,g);var v=Vn([],m,o),y=Vn([],m,s);r&&(er(v,v,u),$n(v,v,d),er(y,y,u),$n(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function ff(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=df(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var pf=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),mf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new pf},t.prototype.buildPath=function(e,t){ff(e,t,!0)},t}(ks);mf.prototype.type=`polygon`;var hf=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),gf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new hf},t.prototype.buildPath=function(e,t){ff(e,t,!1)},t}(ks);gf.prototype.type=`polyline`;var _f={},vf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),yf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new vf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Rs(_f,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(ks);yf.prototype.type=`line`;var bf=[],xf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function Sf(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?Pi:Ni)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Pi:Ni)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Vi:Bi)(e.x1,e.cpx1,e.x2,t),(n?Vi:Bi)(e.y1,e.cpy1,e.y2,t)]}var Cf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new xf},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(Wi(n,o,i,u,bf),o=bf[1],i=bf[2],Wi(r,s,a,u,bf),s=bf[1],a=bf[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(Li(n,o,c,i,u,bf),o=bf[1],c=bf[2],i=bf[3],Li(r,s,l,a,u,bf),s=bf[1],l=bf[2],a=bf[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Sf(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Sf(this.shape,e,!0);return Kn(t,t)},t}(ks);Cf.prototype.type=`bezier-curve`;var wf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Tf=function(e){V(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new wf},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)},t}(ks);Tf.prototype.type=`arc`;var Ef=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ks.prototype.getBoundingRect.call(this)},t}(ks),Df=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Of=function(e){V(t,e);function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return t}(Df),kf=function(e){V(t,e);function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return t}(Df),Af=Math.min,jf=Math.max,Mf=Math.abs,Nf=[0,0],Pf=[0,0],Ff=Er(),If=Ff.minTv,Lf=Ff.maxTv,Rf=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new tr;for(var n=0;n<2;n++)this._axes[n]=new tr;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var c=0;c<4;c++)n[c].transform(t);tr.sub(r[0],n[1],n[0]),tr.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&tr.set(t,0,0),Ff.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Ff.negativeSize&&tr.copy(t,r?Ff.useDir?Ff.dirMinTv:If:Lf),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,Nf),e._getProjMinMaxOnAxis(a,t._corners,Pf),Ff.negativeSize||Nf[1]<Pf[0]||Nf[0]>Pf[1]){if(i=!1,Ff.negativeSize||n)return i;var s=Mf(Pf[0]-Nf[1]),c=Mf(Nf[0]-Pf[1]);Af(s,c)>Lf.len()&&(s<c?tr.scale(Lf,o,-s*r):tr.scale(Lf,o,c*r))}else if(!n){var s=Mf(Pf[0]-Nf[1]),c=Mf(Nf[0]-Pf[1]);(Ff.useDir||Af(s,c)<If.len())&&((s<c||!Ff.bidirectional)&&(tr.scale(If,o,s*r),Ff.useDir&&Ff.calcDirMTV()),(s>=c||!Ff.bidirectional)&&(tr.scale(If,o,-c*r),Ff.useDir&&Ff.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=Af(l,o),s=jf(l,s)}n[0]=o+Ff.touchThreshold,n[1]=s-Ff.touchThreshold,Ff.negativeSize=n[1]<n[0]},e}(),zf=[],Bf=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new hr(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(zf)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(So),Vf=Cl();function Hf(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=X(r.duration,200),u=X(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),Dt(d)&&(d=d(n,i)),Dt(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Uf(e,t,n,r,i,a,o){var s=!1,c;Dt(i)?(o=a,a=i,i=null):J(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=Hf(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Wf(e,t,n,r,i,a){Uf(`update`,e,t,n,r,i,a)}function Gf(e,t,n,r,i,a){Uf(`enter`,e,t,n,r,i,a)}function Kf(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function qf(e,t,n,r,i,a){Kf(e)||Uf(`leave`,e,t,n,r,i,a)}function Jf(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),qf(e,{style:{opacity:0}},t,n,r)}function Yf(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Jf(e,t,n,r)}):Jf(e,t,n,r)}function Xf(e){Vf(e).oldStyle=e.style}var Zf=se({Arc:()=>Tf,BezierCurve:()=>Cf,BoundingRect:()=>hr,Circle:()=>Hd,CompoundPath:()=>Ef,Ellipse:()=>Wd,Group:()=>Bd,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Fs,IncrementalDisplayable:()=>Bf,Line:()=>yf,LinearGradient:()=>Of,OrientedBoundingRect:()=>Rf,Path:()=>ks,Point:()=>tr,Polygon:()=>mf,Polyline:()=>gf,RadialGradient:()=>kf,Rect:()=>Us,Ring:()=>uf,Sector:()=>cf,Text:()=>Js,WH:()=>ep,XY:()=>$f,applyTransform:()=>hp,calcZ2Range:()=>Rp,clipPointsByRect:()=>bp,clipRectByRect:()=>xp,createIcon:()=>Sp,decomposeTransform:()=>Hp,ensureCopyRect:()=>Fp,ensureCopyTransform:()=>Ip,expandOrShrinkRect:()=>Dp,extendPath:()=>rp,extendShape:()=>tp,getCurrentCanvasPainter:()=>Wp,getShapeClass:()=>ap,getTransform:()=>mp,groupTransition:()=>yp,initProps:()=>Gf,isBoundingRectAxisAligned:()=>Np,isElementRemoved:()=>Kf,lineLineIntersect:()=>wp,linePolygonIntersect:()=>Cp,makeImage:()=>sp,makePath:()=>op,mergePath:()=>lp,payloadDisableAnimation:()=>Vp,registerShape:()=>ip,removeElement:()=>qf,removeElementWithFadeOut:()=>Yf,resizePath:()=>up,retrieveZInfo:()=>Lp,setTooltipConfig:()=>Ap,subPixelOptimize:()=>pp,subPixelOptimizeLine:()=>dp,subPixelOptimizeRect:()=>fp,transformDirection:()=>gp,traverseElements:()=>Mp,traverseUpdateZ:()=>zp,updateProps:()=>Wf}),Qf={},$f=[`x`,`y`],ep=[`width`,`height`];function tp(e){return ks.extend(e)}var np=Rd;function rp(e,t){return np(e,t)}function ip(e,t){Qf[e]=t}function ap(e){if(Qf.hasOwnProperty(e))return Qf[e]}function op(e,t,n,r){var i=Ld(e,t);return n&&(r===`center`&&(n=cp(n,i.getBoundingRect())),up(i,n)),i}function sp(e,t,n){var r=new Fs({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(cp(t,i))}}});return r}function cp(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var lp=zd;function up(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function dp(e,t){return Rs(e,e,{lineWidth:t}),e}function fp(e,t){return zs(e,e,t),e}var pp=Bs;function mp(e,t){for(var n=An([]);e&&e!==t;)Mn(n,e.getLocalTransform(),n),e=e.parent;return n}function hp(e,t,n){return t&&!yt(t)&&(t=gi.getLocalTransform(t)),n&&(t=In([],t)),Qn([],e,t)}function gp(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:pc(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:pc(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=hp(a,t,n),pc(a[0])>pc(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function _p(e){return!e.isGroup}function vp(e){return e.shape!=null}function yp(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){_p(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return vp(e)&&(t.shape=pt(e.shape)),t}var a=r(e);t.traverse(function(e){if(_p(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Wf(e,r,n,Ql(e).dataIndex)}}})}function bp(e,t){return G(e,function(e){var n=e[0];n=fc(n,t.x),n=dc(n,t.x+t.width);var r=e[1];return r=fc(r,t.y),r=dc(r,t.y+t.height),[n,r]})}function xp(e,t){var n=fc(e.x,t.x),r=dc(e.x+e.width,t.x+t.width),i=fc(e.y,t.y),a=dc(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function Sp(e,t,n){var r=U({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),ht(i,n),new Fs(r)):op(e.replace(`path://`,``),r,n,`center`)}function Cp(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(wp(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function wp(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Tp(u,d,c,l);if(Ep(f))return!1;var p=e-i,m=t-a,h=Tp(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Tp(p,m,u,d)/f;return!(g<0||g>1)}function Tp(e,t,n,r){return e*r-n*t}function Ep(e){return e<=1e-6&&e>=-1e-6}function Dp(e,t,n,r,i){return t==null?e:(kt(t)?Op[0]=Op[1]=Op[2]=Op[3]=t:(Op[0]=t[0],Op[1]=t[1],Op[2]=t[2],Op[3]=t[3]),r&&(Op[0]=fc(0,Op[0]),Op[1]=fc(0,Op[1]),Op[2]=fc(0,Op[2]),Op[3]=fc(0,Op[3])),n&&(Op[0]=-Op[0],Op[1]=-Op[1],Op[2]=-Op[2],Op[3]=-Op[3]),kp(e,Op,`x`,`width`,3,1,i&&i[0]||0),kp(e,Op,`y`,`height`,0,2,i&&i[1]||0),e)}var Op=[0,0,0,0];function kp(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=fc(0,dc(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:pc(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Ap(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&W(Ct(c),function(e){Z(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Ql(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:ht({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function jp(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Mp(e,t){if(e){if(K(e))for(var n=0;n<e.length;n++)jp(e[n],t);else jp(e,t)}}function Np(e){return!e||pc(e[1])<Pp&&pc(e[2])<Pp||pc(e[0])<Pp&&pc(e[3])<Pp}var Pp=1e-5;function Fp(e,t){return e?hr.copy(e,t):t.clone()}function Ip(e,t){return t?jn(e||kn(),t):void 0}function Lp(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Rp(e){var t=-1/0,n=1/0;jp(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(!(!e||e.isGroup)){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function zp(e,t,n){Bp(e,t,n,-1/0)}function Bp(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=fc(Bp(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=fc(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function Vp(e){return e.animation={duration:0},e}function Hp(e,t){return t?jn(Up.transform,t):An(Up.transform),Up.decomposeTransform(),bi(e,Up),e}var Up=new gi;Up.transform=kn();function Wp(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}ip(`circle`,Hd),ip(`ellipse`,Wd),ip(`sector`,cf),ip(`ring`,uf),ip(`polygon`,mf),ip(`polyline`,gf),ip(`rect`,Us),ip(`line`,yf),ip(`bezierCurve`,Cf),ip(`arc`,Tf);var Gp={};function Kp(e,t){for(var n=0;n<hu.length;n++){var r=hu[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function qp(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s??=Dt(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<hu.length;l++){var u=hu[l],d=t[u];c[u]=X(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Jp(e,t,n,r){n||=Gp;for(var i=e instanceof Js,a=!1,o=0;o<gu.length;o++){var s=t[gu[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Js,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=qp(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Xp(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Zp(u,n,!1));for(var o=0;o<hu.length;o++){var p=hu[o],s=t[p];if(s){var m=c.ensureState(p),h=!!X(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Xp(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Zp(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(am(c).setLabelText=function(e){var r=qp(n,t,e);Kp(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Yp(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<hu.length;r++){var i=hu[r];n[i]=e.getModel([i,t])}return n}function Xp(e,t,n,r,i){var a={};return Qp(a,e,n,r,i),t&&U(a,t),a}function Zp(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=X(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function Qp(e,t,n,r,i){n||=Gp;var a=t.ecModel,o=a&&a.option.textStyle,s=$p(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=X(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);rm(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=kt(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=sm.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=Rt(_),h.__marginType=sm.textMargin)}rm(e,t,o,null,null,n,r,i,!0,!1)}function $p(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Gp).rich;if(n){t||={};for(var r=Ct(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var em=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],tm=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],nm=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function rm(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Gp;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=X(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=X(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=X(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=X(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<em.length;_++){var v=em[_],y=i!==!1&&r?It(t.getShallow(v),r.getShallow(v),n[v]):X(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<tm.length;_++){var v=tm[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<nm.length;_++){var v=nm[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function im(e,t){var n=t&&t.getModel(`textStyle`);return Bt([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}var am=Cl();function om(e,t,n,r){if(e){var i=am(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}var sm={minMargin:1,textMargin:2},cm=[`textStyle`,`color`],lm=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],um=new Js,dm=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(cm):null)},e.prototype.getFont=function(){return im({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<lm.length;n++)t[lm[n]]=this.getShallow(lm[n]);return um.useStyle(t),um.update(),um.getBoundingRect()},e}(),fm=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],pm=vn(fm),mm=function(){function e(){}return e.prototype.getLineStyle=function(e){return pm(this,e)},e}(),hm=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],gm=vn(hm),_m=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return gm(this,e,t)},e}(),vm=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){H(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(pt(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!tn.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();un(vm),mn(vm),vt(vm,mm),vt(vm,_m),vt(vm,bn),vt(vm,dm);function ym(e){return e==null?0:e.length||1}function bm(e){return e}var xm=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||bm,this._newKeyGetter=r||bm,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=ym(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=ym(c),d=ym(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=ym(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=ym(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Sm={Must:1,Might:2,Not:3},Cm=Cl();function wm(e){Cm(e).datasetMap=Jt()}function Tm(e,t,n){var r={},i=Dm(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Cm(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),W(e,function(t,n){var i=J(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});W(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function Em(e,t,n){var r={};if(!Dm(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&W(a,function(e,t){(J(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=Am(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Sm.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Sm.Not)&&(e.n=c),f(e)&&s[e.n]!==Sm.Not)return e;d||(u===Sm.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function Dm(e){if(!e.get(`data`,!0))return Ol(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Dl).models[0]}function Om(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Ol(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Dl).models}function km(e,t){return Am(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Am(e,t,n,r,i,a){var o,s=5;if(jt(e))return Sm.Not;var c,l;if(r){var u=r[a];J(u)?(c=u.name,l=u.type):q(u)&&(c=u)}if(l!=null)return l===`ordinal`?Sm.Must:Sm.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return Sm.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return Sm.Not;var f=_[c];if(!f||jt(f))return Sm.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=ol(g);if(!K(y))return Sm.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=q(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?Sm.Might:Sm.Not;if(t&&e!==`-`)return Sm.Must}return Sm.Not}var jm=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&km(this,n)===Sm.Must&&(r.type=`ordinal`)}}return e}();function Mm(e){return e instanceof jm}function Nm(e,t,n){n||=Im(e);var r=t.seriesLayoutBy,i=Lm(e,n,r,t.sourceHeader,t.dimensions);return new jm({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:pt(t)})}function Pm(e){return new jm({data:e,sourceFormat:jt(e)?au:tu})}function Fm(e){return new jm({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:pt(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Im(e){var t=ou;if(jt(e))t=au;else if(K(e)){e.length===0&&(t=nu);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(K(i)||jt(i)){t=nu;break}if(J(i)){t=ru;break}}}}else if(J(e)){for(var a in e)if(Z(e,a)&&yt(e[a])){t=iu;break}}return t}function Lm(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:zm(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Bm(function(e){e!=null&&e!==`-`&&(q(e)?o??=1:o=0)},n,s,10):o=kt(r)?r:+!!r,!i&&o===1&&(i=[],Bm(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=Rm(e);else if(t===`keyedColumns`)i||(i=[],W(e,function(e,t){i.push(t)}));else if(t===`original`){var c=ol(e[0]);a=K(c)&&c.length||1}return{startIndex:o,dimensionsDefine:zm(i),dimensionsDetectedCount:a}}function Rm(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return Ct(n)}function zm(e){if(e){var t=Jt();return G(e,function(e,n){e=J(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function Bm(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function Vm(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Hm,Um,Wm,Gm,Km,qm,Jm=function(){function e(e,t){var n=Mm(e)?e:Pm(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),qm(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;qm=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=Km[ah(o,s)];U(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=Tt(Qm(o,s),null,i,c,l),e.count=Tt(th(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Km=(e={},e[nu+`_`+su]={pure:!0,appendData:i},e[nu+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[ru]={pure:!0,appendData:i},e[iu]={pure:!0,appendData:function(e){var t=this._data;W(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[tu]={appendData:i},e[au]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),Ym=function(e){K(e)||Qc(`series.data or dataset.source must be an array.`)};Hm={},Hm[nu+`_`+su]=Ym,Hm[nu+`_row`]=Ym,Hm[ru]=Ym,Hm[iu]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Qc(`dimension name must not be null/undefined.`)},Hm[tu]=Ym;var Xm=function(e,t,n,r){return e[r]},Zm=(Um={},Um[nu+`_`+su]=function(e,t,n,r){return e[r+t]},Um[nu+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},Um[ru]=Xm,Um[iu]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},Um[tu]=Xm,Um);function Qm(e,t){return Zm[ah(e,t)]}var $m=function(e,t,n){return e.length},eh=(Wm={},Wm[nu+`_`+su]=function(e,t,n){return Math.max(0,e.length-t)},Wm[nu+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Wm[ru]=$m,Wm[iu]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Wm[tu]=$m,Wm);function th(e,t){return eh[ah(e,t)]}var nh=function(e,t,n){return e[t]},rh=(Gm={},Gm[nu]=nh,Gm[ru]=function(e,t,n){return e[n]},Gm[iu]=nh,Gm[tu]=function(e,t,n){var r=ol(e);return r instanceof Array?r[t]:r},Gm[au]=nh,Gm);function ih(e){return rh[e]}function ah(e,t){return e===`arrayRows`?e+`_`+t:e}function oh(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return ih(a)(r,o,s)}var c=r;return a===`original`&&(c=ol(r)),c}}}var sh=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function ch(e,t){var n={},r=n.encode={},i=Jt(),a=[],o=[],s={};W(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;lh(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),dh(n.type)&&(a[0]=t),lh(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}eu.each(function(e,t){var i=lh(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=G(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new sh(s,t),n}function lh(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function uh(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function dh(e){return e!==`ordinal`&&e!==`time`}var fh=function(){function e(e){this.otherDims={},e!=null&&U(this,e)}return e}();function ph(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!kt(e)&&e!=null&&e!==`-`&&(e=+Rc(e)),e==null||e===``?NaN:Number(e))}Jt({number:function(e){return parseFloat(e)},time:function(e){return+Rc(e)},trim:function(e){return q(e)?Bt(e):e}});var mh={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function e(e,t){kt(t)||$c(``),this._opFn=mh[e],this._rvalFloat=Hc(t)}return e.prototype.evaluate=function(e){return kt(e)?this._opFn(e,this._rvalFloat):this._opFn(Hc(e),this._rvalFloat)},e})();var hh=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=kt(e)?e:Hc(e),r=kt(t)?t:Hc(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Hc(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Hc(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function gh(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function _h(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var vh=typeof Uint32Array>`u`?Array:Uint32Array,yh=typeof Uint16Array>`u`?Array:Uint16Array,bh=typeof Int32Array>`u`?Array:Int32Array,xh=typeof Float64Array>`u`?Array:Float64Array,Sh={float:xh,int:bh,ordinal:Array,number:Array,time:xh},Ch;function wh(e){return e>65535?vh:yh}function Th(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Eh(e,t,n,r,i){var a=Sh[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var Dh=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Jt()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=Ch[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Vm(r),this._dimensions=G(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Sh[t||`float`](this._rawCount),this._rawExtent[i]=Pl(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=Pl());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];Eh(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=Ch.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=G(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=Pl()),Eh(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),Oc(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=wh(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(wh(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=Ct(e),i=r.length;if(!i)return this;var a=t.count(),o=new(wh(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=Pl();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(wh(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];if(isNaN(y)){T++,w<0&&(w=v);continue}l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v)}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(wh(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=Pl(),d=new(wh(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++){var h=this.getRawIndex(p+m);o[m]=c[h]}var g=n(o),_=this.getRawIndex(Math.min(p+r(o,g)||0,l-1));c[_]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=Pl();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=gh(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||_h(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&bt(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Th(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=pt(this._extent),e._rawExtent=pt(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return ph(e[r],this._dimensions[r])}Ch={arrayRows:e,objectRows:function(e,t,n,r){return ph(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return ph(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Oh=Cl(),kh={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Ah=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Nh(this.source))},e.prototype.getSourceDimensionIndex=function(e){return X(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Vm(this.source),n=!Ph(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),t&&s!=null&&(!u||!u.isCalculationCoord)&&(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=kh[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function jh(e){return e instanceof Ah}function Mh(e){for(var t=Jt(),n=0;n<(e||[]).length;n++){var r=e[n],i=J(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Nh(e){var t=Oh(e);return t.dimNameMap||=Mh(e.dimensionsDefine)}function Ph(e){return e>30}var Fh=J,Ih=G,Lh=typeof Int32Array>`u`?Array:Int32Array,Rh=`e\0\0`,zh=-1,Bh=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Vh=[`_approximateExtent`],Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;jh(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=q(u)?new fh({name:u}):u instanceof fh?u:new fh(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=Jt();W(a,function(e){m.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(kt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof Dh&&(i=e),!i){var a=this.dimensions,o=Mm(e)||yt(e)?new Jm(e,a.length):e;i=new Dh;var s=Ih(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=ch(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&Jh(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&sl(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=_l(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=_l(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Jh(this,o);Hh(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Fh(e)?U(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Wh(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Uh(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return K(e)?r.getValues(Ih(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?zh:r},e.prototype.each=function(e,t,n){Dt(e)&&(n=t,t=e,e=[]);var r=n||this,i=Ih(Gh(e),this._getStoreDimIndex,this);this._store.each(i,r?Tt(t,r):t)},e.prototype.filterSelf=function(e,t,n){Dt(e)&&(n=t,t=e,e=[]);var r=n||this,i=Ih(Gh(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Tt(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=Ct(e),i=[];return W(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Dt(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=Ih(Gh(e),this._getStoreDimIndex,this),o=qh(this);return o._store=this._store.map(a,i?Tt(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=Ih(Gh(e),this._getStoreDimIndex,this);this._store.modify(a,i?Tt(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=qh(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=qh(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=qh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new vm(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new xm(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Uh(e,t)},function(e){return Uh(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Fh(e)?U(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),K(i)?i=i.slice():Fh(i)&&(i=U({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Fh(t)?U(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Fh(e)?U(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?U(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){$l(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){W(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Ih(this.dimensions,this._getDimInfo,this),this.hostModel),Kh(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Dt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Lt(arguments)))})},e.internalField=function(){Hh=function(e){var t=e._invertedIndicesMap;W(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Lh(a.categories.length);for(var s=0;s<n.length;s++)n[s]=zh;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Wh=function(e,t,n){return _l(e._getCategory(t,n),null)},Uh=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Wh(e,e._idDimIdx,t)),n??=Rh+t,n},Gh=function(e){return K(e)||(e=e==null?[]:[e]),e},qh=function(t){var n=new e(t._schema?t._schema:Ih(t.dimensions,t._getDimInfo,t),t.hostModel);return Kh(n,t),n},Kh=function(e,t){W(Bh.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,W(Vh,function(n){e[n]=pt(t[n])}),e._calculationInfo=U({},t._calculationInfo)},Jh=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=Wh(e,i,t)),s==null&&a!=null&&(r[t]=s=Wh(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Xh(e,t){Mm(e)||(e=Pm(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Jt(),a=[],o=Zh(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Ph(o),c=r===e.dimensionsDefine,l=c?Nh(e):Mh(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Jt(u),f=new bh(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=J(n)?n:{name:n},o=new fh,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=rl(e).slice();if(n.length===1&&!q(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);W(n,function(e,n){var i=q(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})});var h=0;W(n,function(e){var t,n,r,i;if(q(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=U({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=rl(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}W(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(ht(o,i),t,a),o.name==null&&n){var s=n[a];!J(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&ht(o.otherDims,r)})}});function g(e,t,n){eu.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)W(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=Qh(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(km(e,S)===Sm.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Gl(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Ah({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Zh(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return W(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Qh(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var $h={},eg={},tg=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n($h,!0),this._normalMasterList=n(eg,!1);function n(n,r){var i=[];return W(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){W(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){$h[e]=t;return}eg[e]=t},e.get=function(e){return eg[e]||$h[e]},e}();function ng(e){return!!$h[e]}function rg(e){ig.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var ig=Jt();function ag(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ig.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function og(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!ng(n)&&(i=0))}return{coordSysType:n,kind:i}}function sg(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=og(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var cg=function(){function e(e){this.coordSysDims=[],this.axisMap=Jt(),this.categoryAxisMap=Jt(),this.coordSysName=e}return e}();function lg(e){var t=e.get(`coordinateSystem`),n=new cg(t),r=ug[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ug={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Dl).models[0],a=e.getReferringComponents(`yAxis`,Dl).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),dg(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),dg(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Dl).models[0];t.coordSysDims=[`single`],n.set(`single`,i),dg(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Dl).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),dg(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),dg(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();W(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),dg(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Dl).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function dg(e){return e.get(`type`)===`category`}function fg(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;pg(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(W(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),W(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;W(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function pg(e){return!jh(e.schema)}function mg(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function hg(e,t){return mg(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function gg(e,t){var n=e.get(`coordinateSystem`),r=tg.get(n),i;return t&&t.coordSysDims&&(i=G(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=uh(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function _g(e,t,n){var r,i;return n&&W(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function vg(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Pm(e)):(i=r.getSource(),a=i.sourceFormat===tu);var o=lg(t),s=gg(t,o),c=n.useEncodeDefaulter,l=Dt(c)?c:c?Et(Tm,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Xh(i,u),f=_g(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=fg(t,{schema:d,store:p}),h=new Yh(d,t);h.setCalculationInfo(m);var g=f!=null&&yg(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function yg(e){if(e.sourceFormat===`original`)return!K(ol(bg(e.data||[])))}function bg(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var xg=Math.round(Math.random()*10);function Sg(e){return[e||``,xg++].join(`_`)}function Cg(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=sn(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=sn(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function wg(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(W(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),W(u.successor,d?p:f)}W(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return W(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),W(c,function(e){gt(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);gt(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){var n=[];return W(e,function(e){gt(t,e)>=0&&n.push(e)}),n}}function Tg(e,t){return H(H({},e,!0),t,!0)}var Eg=Math.log(2);function Dg(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Eg);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Dg(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Og(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Dg(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Dg(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var kg=`___zrEVENTSAVED`,Ag=[];function jg(e,t,n,r,i){return Ng(Ag,t,r,i,!0)&&Ng(e,n,Ag[0],Ag[1])}function Mg(e,t){e&&n(e),t&&n(t);function n(e){var t=e[kg];t&&(t.clearMarkers&&t.clearMarkers(),delete e[kg])}}function Ng(e,t,n,r,i){if(t.getBoundingClientRect&&tn.domSupported&&!Ig(t)){var a=t[kg]||(t[kg]={}),o=Fg(Pg(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Pg(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){W(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Fg(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Og(s,o):Og(o,s))}function Ig(e){return e.nodeName.toUpperCase()===`CANVAS`}var Lg=/([&<>"'])/g,Rg={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function zg(e){return e==null?``:(e+``).replace(Lg,function(e,t){return Rg[t]})}var Bg={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Vg={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Hg=`ZH`,Ug=`EN`,Wg=Ug,Gg={},Kg={},qg=tn.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Wg).toUpperCase().indexOf(Hg)>-1?Hg:Wg}():Wg;function Jg(e,t){e=e.toUpperCase(),Kg[e]=new vm(t),Gg[e]=t}function Yg(e){if(q(e)){var t=Gg[e.toUpperCase()]||{};return e===Hg||e===Ug?pt(t):H(pt(t),pt(Gg[Wg]),!1)}return H(pt(e),pt(Gg[Wg]),!1)}function Xg(e){return Kg[e]}function Zg(){return Kg[Wg]}Jg(Ug,Bg),Jg(Hg,Vg);var Qg=null;function $g(){return Qg}function e_(e,t){var n=$g(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function t_(e){var t=e.brk;return t?t.breaks:[]}function n_(e){var t=e.brk;return t?t.hasBreaks():!1}var r_=1e3,i_=r_*60,a_=i_*60,o_=a_*24,s_=o_*365,c_={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},l_={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},u_=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,d_=`{yyyy}-{MM}-{dd}`,f_={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:d_,hour:d_+` `+l_.hour,minute:d_+` `+l_.minute,second:d_+` `+l_.second,millisecond:u_},p_=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],m_=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function h_(e){return!q(e)&&!Dt(e)?g_(e):e}function g_(e){e||={};var t={},n=!0;return W(p_,function(t){n&&=e[t]==null}),W(p_,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=p_[s],l=J(a)&&!K(a)?a[c]:a,u=void 0;K(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=l_[r]:c_[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function __(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function v_(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function y_(e){return e===v_(e)}function b_(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function x_(e,t,n,r){var i=Rc(e),a=i[T_(n)](),o=i[E_(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[D_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[O_(n)](),d=(u-1)%12+1,f=i[k_(n)](),p=i[A_(n)](),m=i[j_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof vm?r:Xg(r||qg)||Zg()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,__(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,__(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,__(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,__(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,__(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,__(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,__(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,__(m,3)).replace(/{S}/g,m+``)}function S_(e,t,n,r,i){var a=null;if(q(n))a=n;else if(Dt(n)){var o={time:e.time,level:e.time?e.time.level:0},s=$g();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=C_(e.value,i);a=n[u][u][0]}}return x_(new Date(e.value),a,i,r)}function C_(e,t){var n=Rc(e),r=n[E_(t)]()+1,i=n[D_(t)](),a=n[O_(t)](),o=n[k_(t)](),s=n[A_(t)](),c=n[j_(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function w_(e,t,n){switch(t){case`year`:e[N_(n)](0);case`month`:e[P_(n)](1);case`day`:e[F_(n)](0);case`hour`:e[I_(n)](0);case`minute`:e[L_(n)](0);case`second`:e[R_(n)](0)}return e}function T_(e){return e?`getUTCFullYear`:`getFullYear`}function E_(e){return e?`getUTCMonth`:`getMonth`}function D_(e){return e?`getUTCDate`:`getDate`}function O_(e){return e?`getUTCHours`:`getHours`}function k_(e){return e?`getUTCMinutes`:`getMinutes`}function A_(e){return e?`getUTCSeconds`:`getSeconds`}function j_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function M_(e){return e?`setUTCFullYear`:`setFullYear`}function N_(e){return e?`setUTCMonth`:`setMonth`}function P_(e){return e?`setUTCDate`:`setDate`}function F_(e){return e?`setUTCHours`:`setHours`}function I_(e){return e?`setUTCMinutes`:`setMinutes`}function L_(e){return e?`setUTCSeconds`:`setSeconds`}function R_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function z_(e){if(!Uc(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function B_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var V_=Rt;function H_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Bt(e)?e:`-`}function a(e){return qc(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Rc(e):e;if(!isNaN(+c))return x_(c,r,n);if(s)return`-`}if(t===`ordinal`)return Ot(e)?i(e):kt(e)&&a(e)?e+``:`-`;var l=Hc(e);return a(l)?z_(l):Ot(e)?i(e):typeof e==`boolean`?e+``:`-`}var U_=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],W_=function(e,t){return`{`+e+(t??``)+`}`};function G_(e,t,n){K(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=U_[a];e=e.replace(W_(o),W_(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(W_(U_[c],s),n?zg(l):l)}return e}function K_(e,t){var n=q(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||`html`;return r?a===`html`?i===`subItem`?`<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:`+zg(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+zg(r)+`;`+(t||``)+`"></span>`:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function q_(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function J_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Y_=W,X_=[`left`,`right`,`top`,`bottom`,`width`,`height`],Z_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Q_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var $_=Q_;Et(Q_,`vertical`),Et(Q_,`horizontal`);function ev(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function tv(e,t){var n=av(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===iv.point)a=n.refPoint,i=rv(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=K(o)?o:[o,o];i=rv(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[Cc(s[0],i.width)+i.x,Cc(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function nv(e,t){var n=tv(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);K(a)||(a=[0,a]);var o=Cc(r.width,t.getWidth()),s=Cc(r.height,t.getHeight()),c=Math.min(o,s),l=Cc(a[0],c/2),u=Cc(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function rv(e,t,n){n=V_(n||0);var r=t.width,i=t.height,a=Cc(e.left,r),o=Cc(e.top,i),s=Cc(e.right,r),c=Cc(e.bottom,i),l=Cc(e.width,r),u=Cc(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new hr((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var iv={rect:1,point:2};function av(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=ag(e),l=c.coord,u=c.from;if(o.dataToLayout){a=iv.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=iv.point,s=u,i=o.dataToPoint(l))}return a??=iv.rect,a===iv.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function ov(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new hr(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=rv(ht({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function sv(e){var t=e.layoutMode||e.constructor.layoutMode;return J(t)?t:t?{type:t}:null}function cv(e,t,n){var r=n&&n.ignoreSize;!K(r)&&(r=[r,r]);var i=o(Z_[0],0),a=o(Z_[1],1);c(Z_[0],e,i),c(Z_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Y_(n,function(t){c[t]=e[t]}),Y_(n,function(e){Z(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!Z(a,f)&&Z(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){Y_(e,function(e){t[e]=n[e]})}}function lv(e){return uv({},e)}function uv(e,t){return t&&e&&Y_(X_,function(n){Z(t,n)&&(e[n]=t[n])}),e}var dv=Cl(),fv=function(e){V(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Sg(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=sv(this),r=n?lv(e):{};H(e,t.getTheme().get(this.mainType)),H(e,this.getDefaultOption()),n&&cv(e,r,n)},t.prototype.mergeOption=function(e,t){H(this.option,e,!0);var n=sv(this);n&&cv(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!ln(e))return e.defaultOption;var t=dv(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=H(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Ol(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return ev(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(vm);fn(fv,vm),_n(fv),Cg(fv),wg(fv,pv);function pv(e){var t=[];return W(fv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=G(t,function(e){return sn(e).main}),e!==`dataset`&>(t,`dataset`)<=0&&t.unshift(`dataset`),t}var mv=Cl(),hv=Cl(),gv=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=rl(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return yv(this,mv,r,i,e,t,n)},e.prototype.clearColorPalette=function(){bv(this,mv)},e}();function _v(e,t,n,r){return yv(e,hv,rl(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function vv(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function yv(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:vv(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function bv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var xv=/\{@(.+?)\}/g,Sv=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&K(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),Dt(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return G_(i,s).replace(xv,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=oh(o,e,i);if(a&&K(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return oh(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Cv(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function wv(e){return new Tv(e)}var Tv=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(K(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){Ev.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Ev.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),K(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Ev=function(){var e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}(),Dv=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return ph(e,t)},e}();function Ov(e,t){var n=new Dv,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&$c(``);var o=[],s={},c=e.dimensionsDefine;if(c)W(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Z(s,n)&&$c(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=Qm(i,su);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=Tt(kv,null,e)),n.cloneRawData=Tt(Av,null,e),n.count=Tt(th(i,su),null,r,a,o);var d=ih(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=Tt(jv,null,o,s),n.cloneAllDimensionInfo=Tt(Mv,null,o),n}function kv(e){var t=e.sourceFormat;return Lv(t)||$c(``),e.data}function Av(e){var t=e.sourceFormat,n=e.data;if(Lv(t)||$c(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(U({},n[i]));return r}}function jv(e,t,n){if(n!=null){if(kt(n)||!isNaN(n)&&!Z(t,n))return e[n];if(Z(t,n))return t[n]}}function Mv(e){return pt(e)}var Nv=Jt();function Pv(e){e=pt(e);var t=e.type,n=``;t||$c(n);var r=t.split(`:`);r.length!==2&&$c(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,Nv.set(t,e)}function Fv(e,t,n){var r=rl(e),i=r.length;i||$c(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=Iv(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function Iv(e,t,n,r){var i=``;t.length||$c(i),J(e)||$c(i);var a=e.type,o=Nv.get(a);o||$c(i);var s=G(t,function(e){return Ov(e,o)});return G(rl(o.transform({upstream:s[0],upstreamList:s,config:pt(e.config)})),function(e,n){var r=``;J(e)||$c(r),e.data||$c(r),Lv(Im(e.data))||$c(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:su,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:su,sourceHeader:0,dimensions:e.dimensions};return Nm(e.data,i,null)})}function Lv(e){return e===`arrayRows`||e===`objectRows`}var Rv=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(zv(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=jt(o)?au:tu,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=X(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=X(u.sourceHeader,d.sourceHeader),m=X(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Nm(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Nm(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&Bv(``);var i,a=[],o=[];return W(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Bv(``),a.push(t),o.push(e._getVersionSign())}),n?i=Fv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Fm(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];zv(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Dh,o.initData(new Jm(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(zv(e)){var t=Dm(e);return t?[t.getSourceManager()]:[]}return G(Om(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(zv(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},e}();function zv(e){return e.mainType===`series`}function Bv(e){throw Error(e)}var Q={color:{},darkColor:{},size:{}},Vv=Q.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var Hv in U(Vv,{primary:Vv.neutral80,secondary:Vv.neutral70,tertiary:Vv.neutral60,quaternary:Vv.neutral50,disabled:Vv.neutral20,border:Vv.neutral30,borderTint:Vv.neutral20,borderShade:Vv.neutral40,background:Vv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Vv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Vv.neutral70,axisLineTint:Vv.neutral40,axisTick:Vv.neutral70,axisTickMinor:Vv.neutral60,axisLabel:Vv.neutral70,axisSplitLine:Vv.neutral15,axisMinorSplitLine:Vv.neutral05}),Vv)if(Vv.hasOwnProperty(Hv)){var Uv=Vv[Hv];Hv===`theme`?Q.darkColor.theme=Vv.theme.slice():Hv===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:Hv.indexOf(`accent`)===0?Q.darkColor[Hv]=ha(Uv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[Hv]=ha(Uv,null,function(e){return e*.9},function(e){return 1-e**1.5})}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Wv=`line-height:1`;function Gv(e){var t=e.lineHeight;return t==null?Wv:`line-height:`+zg(t+``)+`px`}function Kv(e,t){var n=e.color||Q.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Q.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+zg(r+``)+`px;color:`+zg(n)+`;font-weight:`+zg(i+``),valueStyle:`font-size:`+zg(o+``)+`px;color:`+zg(a)+`;font-weight:`+zg(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var qv=[0,10,20,30],Jv=[``,`
|
|
9
|
-
`,`
|
|
10
|
-
|
|
11
|
-
`,`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`];function Yv(e,t){return t.type=e,t}function Xv(e){return e.type===`section`}function Zv(e){return Xv(e)?$v:ey}function Qv(e){if(Xv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return W(e.blocks,function(e){var n=Qv(e);n>=t&&(t=n+ +(r&&(!n||Xv(e)&&!e.noHeader)))}),t}return 0}function $v(e,t,n,r){var i=t.noHeader,a=ny(Qv(t)),o=[],s=t.blocks||[];zt(!s||K(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Z(l,c)){var u=new hh(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}W(s,function(n,i){var s=t.valueFormatter,c=Zv(n)(s?U(U({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):ry(r,o.join(``),i?n:a.html);if(i)return d;var f=H_(t.header,`ordinal`,e.useUTC),p=Kv(r,e.renderMode).nameStyle,m=Gv(r);return e.renderMode===`richText`?oy(e,f,p)+a.richText+d:ry(r,`<div style="`+p+`;`+m+`;">`+zg(f)+`</div>`+d,n)}function ey(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=K(e)?e:[e],G(e,function(e,t){return H_(e,K(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:H_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=Kv(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:oy(e,f,v))+(o?``:sy(e,m,h,g,y)):ry(r,(s?``:d)+(a?``:iy(f,!s,v))+(o?``:ay(m,h,g,y)),n)}}function ty(e,t,n,r,i,a){if(e)return Zv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function ny(e){return{html:qv[e],richText:Jv[e]}}function ry(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Gv(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function iy(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+zg(e)+`</span>`}function ay(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=K(e)?e:[e],`<span style="`+i+`;`+r+`">`+G(e,function(e){return zg(e)}).join(` `)+`</span>`}function oy(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function sy(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(K(t)?t.join(` `):t,a)}function cy(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return q_(n)}function ly(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var uy=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Wc()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=K_({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};K(t)?W(t,function(e){return U(n,e)}):U(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function dy(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=K(s),l=cy(t,n),u,d,f,p;if(o>1||c&&!o){var m=fy(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=oh(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=vl(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Yv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Yv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Bt(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function fy(e,t,n,r,i){var a=t.getData(),o=bt(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?W(r,function(e){u(oh(a,n,e),e)}):W(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Yv(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var py=Cl();function my(e,t){return e.getName(t)||e.getId(t)}var hy=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=wv({count:vy,reset:yy}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(py(this).sourceManager=new Rv(this)).prepareSource();var r=this.getInitialData(e,n);xy(r,this),this.dataTask.context.data=r,py(this).dataBeforeProcessed=r,gy(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=sv(this),r=n?lv(e):{},i=this.subType;fv.hasClass(i)&&(i+=`Series`),H(e,t.getTheme().get(this.subType)),H(e,this.getDefaultOption()),il(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&cv(e,r,n)},t.prototype.mergeOption=function(e,t){e=H(this.option,e,!0),this.fillDataTextStyle(e.data);var n=sv(this);n&&cv(this.option,e,n);var r=py(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);xy(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,py(this).dataBeforeProcessed=i,gy(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!jt(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&il(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=Cy(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return py(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=Cy(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}py(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return Jt(e)},t.prototype.getSourceManager=function(){return py(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return py(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return dy({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(tn.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=gv.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<e.length;a++){var o=e[a],s=my(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Ct(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[my(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=my(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=my(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return fv.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(fv);vt(hy,Sv),vt(hy,gv),fn(hy,fv);function gy(e){var t=e.name;vl(e)||(e.name=_y(e)||t)}function _y(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return W(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function vy(e){return e.model.getRawData().count()}function yy(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),by}function by(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function xy(e,t){W(Yt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Et(Sy,t))})}function Sy(e,t){var n=Cy(e);return n&&n.setOutputEnd((t||this).count()),t}function Cy(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var wy=ks.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Ty={line:yf,rect:Us,roundRect:Us,square:Us,circle:Hd,diamond:ks.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:ks.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:ks.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:wy},Ey={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Dy={};W(Ty,function(e,t){Dy[t]=new e});var Oy=ks.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Br(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Dy[r];i||=(r=`rect`,Dy[r]),Ey[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function ky(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Ay(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?sp(e.slice(8),new hr(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?op(e.slice(7),{},new hr(t,n,r,i),o?`center`:`cover`):new Oy({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=ky,a&&c.setColor(a),c}function jy(e){return K(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function My(e,t){if(e!=null)return K(e)||(e=[e,e]),[Cc(e[0],t[0])||0,Cc(X(e[1],e[0]),t[1])||0]}var Ny=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return vg(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Bd,n=Ay(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Ay(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(hy);function Py(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=oh(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(oh(e,t,n[o]));return a.join(` `)}}function Fy(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!K(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Iy=function(e){V(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Ay(e,-1,-1,2,2,null,a);o.attr({z2:X(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Ly,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Hu(this.childAt(0))},t.prototype.downplay=function(){Uu(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Wf(f,p,o,n),Xf(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Gf(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Yp(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=My(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Fs){var S=a.style;a.useStyle(U({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(U({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Jp(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Py(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),sd(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Ql(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&qf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();qf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return jy(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Bd);function Ly(e,t){this.parent.drift(e,t)}function Ry(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function zy(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function By(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Yp(t),cursorStyle:t.get(`cursor`)}}function Vy(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Hy=function(){function e(e){this.group=new Bd,this._SymbolCtor=e||Iy}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=zy(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=By(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Ry(e,i,r,t)&&Vy(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Ry(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Wf(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);Ry(t,s,i,e)?(o||=Vy(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=By(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=zy(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(Ry(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){Mp(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function Uy(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Wy(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=G(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return mg(t,d[0])&&(f=!0,d[0]=p),mg(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Wy(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:kt(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Gy(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Ky(e,t){return!isFinite(e)||!isFinite(t)}var qy=typeof Float32Array<`u`?Float32Array:void 0,Jy=typeof Float64Array<`u`?Float64Array:void 0;function Yy(e){return Xy({ctor:qy},e).arr}function Xy(e,t){var n=e.arr,r=e.ctor;if(t>Pc&&(t=Pc),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function Zy(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function Qy(e,t,n,r,i,a,o,s){for(var c=Zy(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Uy(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Gy(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,N=Yy(M),P=Yy(M),F=Yy(M),I=Yy(M),L=[],y=0;y<m.length;y++){var ee=m[y],R=y*2,te=ee*2;N[R]=l[te],N[R+1]=l[te+1],P[R]=u[te],P[R+1]=u[te+1],F[R]=d[te],F[R+1]=d[te+1],I[R]=f[te],I[R+1]=f[te+1],L[y]=p[ee]}return{current:N,next:P,stackedOnCurrent:F,stackedOnNext:I,status:L}}var $y=Math.min,eb=Math.max;function tb(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(Ky(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;Ky(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||Ky(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,F=void 0;if(s===`x`){P=Math.abs(A),F=Math.abs(j);var I=E>0?1:-1;p=_-I*P*o,m=v,O=_+I*F*o,k=v}else if(s===`y`){P=Math.abs(M),F=Math.abs(N);var L=D>0?1:-1;p=_,m=v-L*P*o,O=_,k=v+L*F*o}else P=Math.sqrt(A*A+M*M),F=Math.sqrt(j*j+N*N),T=F/(F+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=$y(O,eb(S,_)),k=$y(k,eb(C,v)),O=eb(O,$y(S,_)),k=eb(k,$y(C,v)),E=O-_,D=k-v,p=_-E*P/F,m=v-D*P/F,p=$y(p,eb(l,_)),m=$y(m,eb(u,v)),p=eb(p,$y(l,_)),m=eb(m,$y(u,v)),E=_-p,D=v-m,O=_+E*F/P,k=v+D*F/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var nb=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),rb=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new nb},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Ky(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Ky(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=tb(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=is.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?Fi(i,u,f,m,e,s):Fi(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?Ni(a,d,p,h,b):Ni(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(ks),ib=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nb),ab=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ib},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Ky(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Ky(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=tb(e,n,i,a,a,1,t.smooth,o,t.connectNulls);tb(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(ks);function ob(){var e=Cl();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var sb=Cl(),cb=ob(),lb=function(){function e(){this.group=new Bd,this.uid=Sg(`viewChart`),this.renderTask=wv({plan:fb,reset:pb}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&db(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&db(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Mp(this.group,e)},e.markUpdateMethod=function(e,t){sb(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function ub(e,t,n){e&&pd(e)&&(t===`emphasis`?Hu:Uu)(e,n)}function db(e,t,n){var r=Sl(e,t),i=t&&t.highlightKey!=null?md(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){ub(e,n,i)}):W(rl(r),function(t){ub(e.getItemGraphicEl(t),n,i)})}un(lb,[`dispose`]),_n(lb);function fb(e){return cb(e.model)}function pb(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&sb(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),mb[c]}var mb={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function hb(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new Us({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=Dt(i)?function(e){i(e,d)}:null;Gf(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function gb(e,t,n){var r=e.getArea(),i=Dc(r.r0,1),a=Dc(r.r,1),o=new cf({shape:{cx:Dc(e.cx,1),cy:Dc(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Gf(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function _b(e,t,n,r,i){return e?e.type===`polar`?gb(e,t,n):e.type===`cartesian2d`?hb(e,t,n,r,i):null:null}function vb(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function yb(e,t){return e.type===t}function bb(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Z(e,`text`)))}function xb(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},Z(r,`text`)&&(o.text=r.text),Z(r,`rich`)&&(o.rich=r.rich),Z(r,`textFill`)&&(o.fill=r.textFill),Z(r,`textStroke`)&&(o.stroke=r.textStroke),Z(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),Z(r,`fontSize`)&&(o.fontSize=r.fontSize),Z(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),Z(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=Z(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),Z(r,`textPosition`)&&(i.position=r.textPosition),Z(r,`textOffset`)&&(i.offset=r.textOffset),Z(r,`textRotation`)&&(i.rotation=r.textRotation),Z(r,`textDistance`)&&(i.distance=r.textDistance)}return Sb(o,e),W(o.rich,function(e){Sb(e,e)}),{textConfig:i,textContent:a}}function Sb(e,t){t&&(t.font=t.textFont||t.font,Z(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),Z(t,`textAlign`)&&(e.align=t.textAlign),Z(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),Z(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),Z(t,`textWidth`)&&(e.width=t.textWidth),Z(t,`textHeight`)&&(e.height=t.textHeight),Z(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),Z(t,`textPadding`)&&(e.padding=t.textPadding),Z(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),Z(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),Z(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),Z(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),Z(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),Z(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Z(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function Cb(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||`inside`,n.offset!=null&&(r.textOffset=n.offset),n.rotation!=null&&(r.textRotation=n.rotation),n.distance!=null&&(r.textDistance=n.distance);var i=r.textPosition.indexOf(`inside`)>=0,a=e.fill||Q.color.neutral99;wb(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Q.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Q.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,W(t.rich,function(e){wb(e,e)}),r}function wb(e,t){t&&(Z(t,`fill`)&&(e.textFill=t.fill),Z(t,`stroke`)&&(e.textStroke=t.fill),Z(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),Z(t,`font`)&&(e.font=t.font),Z(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),Z(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),Z(t,`fontSize`)&&(e.fontSize=t.fontSize),Z(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),Z(t,`align`)&&(e.textAlign=t.align),Z(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),Z(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),Z(t,`width`)&&(e.textWidth=t.width),Z(t,`height`)&&(e.textHeight=t.height),Z(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),Z(t,`padding`)&&(e.textPadding=t.padding),Z(t,`borderColor`)&&(e.textBorderColor=t.borderColor),Z(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),Z(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),Z(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),Z(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),Z(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Z(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Z(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),Z(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),Z(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),Z(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}var Tb=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();_n(Tb);var Eb=0,Db=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Eb,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&G(r,Ob);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!q(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=Jt(this.categories)},e}();function Ob(e){return J(e)&&e.value!=null?e.value:e+``}var kb=Ct({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function Ab(e,t,n){var r;e||={};var i=$g();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(W(kb,function(t){a[t]&&(e[t]=Tt(a[t],a))}),r=a)}return r??Lb(e,n),{brk:r,mapper:e}}function jb(e,t){W(kb,function(n){e[n]=t[n]})}function Mb(e,t){e.freeze=Qt}function Nb(e){return e.getExtentUnsafe(0,2)}function Pb(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Fb(e){var t=Pb(e,3);return t[1]-t[0]}function Ib(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Lb(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Pl(),U(n,Rb),n}var Rb={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=Pb(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){zb(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),zb(r,e,t,n)},freeze:function(){}};function zb(e,t,n,r){Bl(n,r)&&(e[t][0]=n,e[t][1]=r)}function Bb(e){return Vb(e)||Ub(e)}function Vb(e){return e.type===`interval`}function Hb(e){return e.type===`time`}function Ub(e){return e.type===`log`}function Wb(e){return e.type===`ordinal`}function Gb(e){var t=Bc(e),n=_c(10,t),r=mc(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Dc(r*n,-t)}function Kb(e){return kc(e)+2}function qb(e,t){return vc(e)/vc(t)}function Jb(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return _c(t,e)}function Yb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=pc(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!zl(r[0])||!zl(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function Xb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function Zb(e,t){return e||=t,mc(fc(e,1))}function Qb(e,t,n){var r=Nb(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var $b=function(e){V(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,jb(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Db({}),K(i)&&(i=new Db({categories:G(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=Ab(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Mb(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=mc(e),e},t.prototype.getTicks=function(){var e=[];return Qb(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=dc(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Nb(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(mc(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(Tb);Tb.registerClass($b);function ex(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=Kb(f);u<t-1;){var m=Dc(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=$g();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var tx=function(e){V(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Ab(r,e_(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return pt(this._cfg)},t.prototype.setConfig=function(e){var t=Nb(this);this._cfg=e=pt(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Kb(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Nb(this),i=t.niceExtent,a=t.intervalPrecision,o=$g(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?Dc(i[0]-n,a):r[0]});for(var d=function(e,t){return mc((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=dc(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Dc(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Dc(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Dc(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return ex(this,e,t_(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=kc(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),z_(Dc(e.value,n,!0))},t.type=`interval`,t}(Tb);Tb.registerClass(tx);var nx=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},rx=function(e){V(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Ab(r,e_(r,n),null).brk,r}return t.prototype.getLabel=function(e){return x_(e.value,f_[b_(v_(this._minLevelUnit))]||f_.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return S_(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Nb(this),r=$g(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return $g().addBreaksToTicks(o,i.breaks,n),o;o=px(this._minLevelUnit,this._approxInterval,s,n,Ib(this),i);var c=p_.length-1,l=0;return W(o,function(e){e.time&&(c=Math.min(c,gt(p_,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&$g().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&$g().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(gt(p_,C_(e.vmin,s)),gt(p_,C_(e.vmax,s))),n=0,r=0;r<p_.length;r++)if(!ax(p_[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:p_[Math.max(i,t)],upperTimeUnit:p_[i]}}),o},t.prototype.getMinorTicks=function(e){return ex(this,e,t_(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return kt(e)?Math.round(e):+Rc(e)},t.type=`time`,t}(Tb),ix=[[`second`,r_],[`minute`,i_],[`hour`,a_],[`quarter-day`,a_*6],[`half-day`,a_*12],[`day`,o_*1.2],[`half-week`,o_*3.5],[`week`,o_*7],[`month`,o_*31],[`quarter`,o_*95],[`half-year`,s_/2],[`year`,s_]];function ax(e,t,n,r){return w_(new Date(t),e,r).getTime()===w_(new Date(n),e,r).getTime()}function ox(e,t){return e/=o_,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function sx(e){var t=30*o_;return e/=t,e>6?6:e>3?3:e>2?2:1}function cx(e){return e/=a_,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function lx(e,t){return e/=t?i_:r_,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function ux(e){return fc(Vc(e,!0),1)}function dx(e,t,n){var r=Math.max(0,gt(p_,t)-1);return w_(new Date(e),p_[r],n).getTime()}function fx(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function px(e,t,n,r,i,a){var o=m_,s=0;function c(e,t,n,i,o,c,l){for(var u=fx(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!ax(v_(e),r[0],r[1],n)){s&&(i=[{value:dx(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,d=i[l+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/o_/365)),p=T_(n),m=M_(n);break;case`half-year`:case`quarter`:case`month`:f=sx(t),p=E_(n),m=N_(n);break;case`week`:case`half-week`:case`day`:f=ox(t,31),p=D_(n),m=P_(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=cx(t),p=O_(n),m=F_(n);break;case`minute`:f=lx(t,!0),p=k_(n),m=I_(n);break;case`second`:f=lx(t,!1),p=A_(n),m=L_(n);break;case`millisecond`:f=ux(t),p=j_(n),m=R_(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=v_(o[m]);if(y_(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?v_(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=xt(G(u,function(e){return xt(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=C_(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Gl(S,Kl,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=C_(r[0],n),k=C_(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}var mx=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=o_,n[1]+=o_),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-o_}e.setExtent(n[0],n[1]);var i=Zb(t.splitNumber,10),a=Ib(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=ix.length,l=Math.min(nx(ix,a,0,c),c-1),u=ix[l][1],d=ix[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Tb.registerClass(rx);var hx=0,gx=1,_x=2,vx=function(e){V(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=tx.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[hx]=i[gx]=a[hx]=a[gx]=NaN,jb(r,t.mapperMethods);var s=$g(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},_x,l),r.powStub=new tx({breakParsed:l.original}),r.intervalStub=new tx({breakParsed:l.transformed}),Mb(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=$g(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return G(i.getTicks(e||{}),function(e){var i=e.value,o=Jb(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,t_(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return ex(this,e,t_(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(qb(e,this.base))},scale:function(e){return Jb(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=qb(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return yx.depth=n,bx.lookup=this._lookup,Jb(n===2?e:this.intervalStub.transformOut(e,yx),this.base,bx)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Bl(t,n)||t<=0||n<=0)){var r=xx,i=xx;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[hx]=t,r[gx]=n);var o=this.base;this.intervalStub.setExtent2(e,i[hx]=qb(t,o),i[gx]=qb(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Bl(t[0],t[1])&&qc(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(Tb);Tb.registerClass(vx);var yx={},bx={},xx=[],Sx={value:1,category:1,time:1,log:1},Cx=Cl();function Tx(e){var t=e.get(`type`);return(t==null||!Z(Sx,t)&&!Tb.getClass(t))&&(t=`value`),t}function Ex(e,t,n){var r=$g(),i;switch(r&&(i=Lx(e,t,n)),t){case`category`:return new $b({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Pl()});case`time`:return new rx({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new vx({logBase:e.get(`logBase`),breakOption:i});case`value`:return new tx({breakOption:i});default:return new((Tb.getClass(t))||tx)({})}}function Dx(e,t,n){var r=n?Pb(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Bl(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Ox(e){Cx(e).noOnMyZero=!0}function kx(e){return Cx(e).noOnMyZero}function Ax(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=h_(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(Dt(t)){if(e.type===`category`)return function(n,r){return t(jx(e,n),n.value-e.scale.getExtent()[0],null)};var r=$g();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(jx(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function jx(e,t){var n=e.scale;return Wb(n)?n.getLabel(t):t.value}function Mx(e){return e.get(`interval`)??`auto`}function Nx(e){return e.type===`category`&&Mx(e.getLabelModel())===0}function Px(e,t){var n={};return W(e.mapDimensionsAll(t),function(t){n[hg(e,t)]=!0}),Ct(n)}function Fx(e){return e===`middle`||e===`center`}function Ix(e){return e.getShallow(`show`)}function Lx(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!$g()||!n||!Rx(t)?void 0:r}function Rx(e){return e!==`category`}function zx(e,t,n,r,i,a){var o=Ub(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Xb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Bx(e,t){return Wb(e)?e.getRawOrdinalNumber(t.value):t.value}function Vx(e,t){return Wb(e)&&!!t.get(`boundaryGap`)}function Hx(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Ux(e){for(var t=Pl(),n=Pl(),r=0;r<e.length;){var i=e[r++],a=e[r++];Ky(i,a)||(Fl(t,i),Fl(n,a))}return[t,n]}function Wx(e,t){var n=Ux(e),r=n[0],i=n[1],a=Ux(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function Gx(e){return kt(e)?e:e?.5:0}function Kx(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=Yy(r*2),a=0;a<r;a++){var o=Gy(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function qx(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;Ky(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Jx(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:ma((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Yx(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=G(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Jx(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;W(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new Of(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Xx(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Zx(a,t))){var o=t.mapDimension(a.dim),s={};return W(a.getViewLabels(),function(e){e.tick.offInterval||(s[Bx(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Zx(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Iy.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function Qx(e){for(var t=e.length/2;t>0&&Ky(e[t*2-2],e[t*2-1]);t--);return t-1}function $x(e,t){return[e[t*2],e[t*2+1]]}function eS(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!Ky(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function tS(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<hu.length;t++)if(e.get([hu[t],`endLabel`,`show`]))return!0;return!1}function nS(e,t,n,r){if(yb(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=tS(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=hb(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return gb(t,n,r)}function rS(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var iS=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Bd,t=new Hy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Tt(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=Uy(r,a,_),y=g&&Kx(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Xx(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Yx(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=qx(y,c,r,w,x),c=qx(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,q_(E)),m.setClipPath(nS(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,q_(E));var D=m.getClipPath();D?Gf(D,{shape:nS(this,r,!1,e).shape},e):m.setClipPath(nS(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Hx(this._stackedOnPoints,y)||!Hx(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=qx(y,c,r,w,x),c=qx(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(ht(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),dd(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Ql(f).seriesIndex=e.seriesIndex,sd(f,k,A,j);var N=Gx(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var F=a.getCalculationInfo(`stackedOnSeries`),I=0;p.useStyle(ht(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),F&&(I=Gx(F.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:I,smoothMonotone:P,connectNulls:x}),dd(p,e,`areaStyle`),Ql(p).seriesIndex=e.seriesIndex,sd(p,k,A,j)}var L=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=L)}),this._polyline.onHoverStateChange=L,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ee=e.get(`triggerEvent`),R=e.get(`triggerLineEvent`),te=R===!0||ee===!0||ee===`line`,ne=R===!0||ee===!0||ee===`area`;this.packEventData(e,f,te),p&&this.packEventData(e,p,ne)},t.prototype.packEventData=function(e,t,n){Ql(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Sl(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Ky(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Iy(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else lb.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Sl(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else lb.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Nu(this._polyline,e),t&&Nu(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new rb({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ab({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);Dt(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=Dt(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=Dt(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(tS(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Js({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=Qx(o);c>=0&&(Jp(a,Yp(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Py(i,e):Fy(i,n)},enableTextSetter:!0},rS(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=eS(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=$x(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Nl(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=$x(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=am(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Qy(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=qx(u.stackedOnCurrent,u.current,n,i,o),d=qx(u.current,null,n,i,o),m=qx(u.stackedOnNext,u.next,n,i,o),p=qx(u.next,null,n,i,o)),Wx(d,p)>3e3||c&&Wx(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Wf(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Wf(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(lb);function aS(e,t){return{seriesType:e,plan:ob(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=G(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);mg(n,o[0])&&(o[0]=c),mg(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&Yy(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var oS={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},sS=function(e){return Math.round(e.length/2)};function cS(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=oS[i]:Dt(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,sS))}}}}}function lS(e){e.registerChartView(iS),e.registerSeriesModel(Ny),e.registerLayout(aS(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,cS(`line`))}var uS=Cl(),dS=Cl(),fS={estimate:1,determine:2};function pS(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function mS(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:G(gS(n,r),function(t,n){return{formattedLabel:Ax(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?_S(e,t):bS(e)}function hS(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:gS(i,r)}:e.type===`category`?yS(e,t):{ticks:r.getTicks(n)}}function gS(e,t){var n=t.getExtent(),r=[];return W(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Gl(r,ql,null),Oc(r),G(r,function(e){return{value:e}})}function _S(e,t){var n=e.getLabelModel(),r=vS(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function vS(e,t,n){var r=SS(e),i=Mx(t),a=n.kind===fS.estimate;if(!a){var o=wS(r,i);if(o)return o}var s,c;Dt(i)?s=jS(e,i,!1):(c=i===`auto`?ES(e,n):i,s=jS(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return TS(r,i,l),!0}):TS(r,i,l),l}function yS(e,t){var n=xS(e),r=Mx(t),i=wS(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),Dt(r))a=jS(e,r,!0);else if(r===`auto`){var s=vS(e,e.getLabelModel(),pS(fS.determine));o=s.labelCategoryInterval,a=G(s.labels,function(e){return e.tick})}else o=r,a=jS(e,o,!0);return TS(n,r,{ticks:a,tickCategoryInterval:o})}function bS(e){var t=e.scale.getTicks(),n=Ax(e);return{labels:G(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var xS=CS(`axisTick`),SS=CS(`axisLabel`);function CS(e){return function(t){return dS(t)[e]||(dS(t)[e]={list:[]})}}function wS(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function TS(e,t,n){return e.list.push({key:t,value:n}),n}function ES(e,t){if(t.kind===fS.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return dS(e).autoInterval=n,!0}),n}return dS(e).autoInterval??(dS(e).autoInterval=e.calculateCategoryInterval(t))}function DS(e,t){var n=t.kind,r=AS(e),i=Ax(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Fr(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===fS.estimate?(t.out.noPxChangeTryDetermine.push(Tt(OS,null,e,S,c)),S):kS(e,S,c)??S}function OS(e,t,n){return kS(e,t,n)==null}function kS(e,t,n){var r=uS(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function AS(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function jS(e,t,n){var r=Ax(e),i=e.scale,a=[],o=Dt(t);return Qb(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var MS=Cl();function NS(e){MS(e).prepare={}}function PS(e){MS(e).fullUpdate={}}function FS(e){return MS(e).prepare}function IS(e){return MS(e).fullUpdate}var LS=Ul(),RS=Cl(),zS=Cl();function BS(e,t){var n=e.model,r=RS(IS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function VS(e,t){return WS(BS(e,t))}function HS(e,t){var n=[];return US(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(WS(e))}),n}function US(e,t){var n=RS(IS(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function WS(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function GS(e,t){var n=e.model.ecModel,r=RS(IS(n)).axSer;r&&qS(n,r.get(e.model.uid),t)}function KS(e,t,n){var r=BS(e,t);r&&qS(e.model.ecModel,r.sers,n)}function qS(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function JS(e,t,n){var r=RS(IS(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function YS(e,t){var n=e.model,r=RS(IS(n.ecModel)).keys;r&&W(r.get(n.uid),function(e){t(e)})}function XS(e){var t=zS(FS(e)),n=t.keyed||=Jt();US(e,function(t,r,i){var a=n.get(r)||n.set(r,Jt()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&QS.liPosMinGap(e,t,o)})}function ZS(e,t){QS[e]=t}var QS={};function $S(e,t,n){if(e){var r=t.ecModel,i=RS(IS(r)),a=e.model.uid,o=i.axSer||=Jt();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=nC.get(eC(s,c,n))||nC.get(eC(s,c,null));if(l){var u=i.keyed||=Jt(),d=i.keys||=Jt(),f=l.key,p=u.get(f)||u.set(f,Jt()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function eC(e,t,n){return e+`|&`+X(t,!0)+`|&`+(n||``)}function tC(e,t){var n=eC(t.seriesType,t.baseAxis,t.coordSysType);nC.set(n,t),LS(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:XS})})}var nC=Jt(),rC=.8;function iC(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Fb(r);qc(o)||(o=NaN);var s=e.getExtent(),c=pc(s[1]-s[0]);return Wb(r)?aC(n,e,o,c):i&&oC(n,e,o,c,i),a!=null&&(n.w=qc(n.w)?fc(a,n.w):a),n}function aC(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function oC(e,t,n,r,i){var a=!1,o=-1/0;W(i.key?[VS(t,i.key)]:HS(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),qc(n)&&n>0&&qc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*rC,e.w2=e.w*n/r)}var sC=[0,1],cC=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),Sc(e,sC,lC(this),t)},e.prototype.coordToData=function(e,t){var n=Sc(e,lC(this),sC,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=G(hS(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Bx(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=uC(this,n,r);return G(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Wb(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),G(this.scale.getMinorTicks(e),function(e){return G(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=pS(fS.determine),mS(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return iC(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=pS(fS.determine),DS(this,e)},e}();function lC(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function uC(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=iC(e).w;if(!i)return!1;W(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var dC=function(e){V(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(cC),fC=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],pC=1,mC=2,hC=pC|mC;function gC(e,t,n){n||=hC,t?e.dirty|=n:e.dirty&=~n}function _C(e,t){return t||=hC,e.dirty==null||!!(e.dirty&t)}function vC(e){if(e)return _C(e)&&yC(e,e.label,e),e}function yC(e,t,n){var r=t.getComputedTransform();e.transform=Ip(e.transform,r);var i=e.localRect=Fp(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=sm.textMargin);for(var d=0;d<4;d++)bC[d]=u===sm.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===sm.textMargin&&Dp(i,bC,!1,!1);var f=e.rect=Fp(e.rect,i);return r&&f.applyTransform(r),u===sm.minMargin&&Dp(f,bC,!1,!1),e.axisAligned=Np(r),(e.label=e.label||{}).ignore=t.ignore,gC(e,!1),gC(e,!0,mC),e}var bC=[0,0,0,0];function xC(e,t,n){return e.transform=Ip(e.transform,n),e.localRect=Fp(e.localRect,t),e.rect=Fp(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Np(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function SC(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function CC(e,t){for(var n=0;n<fC.length;n++){var r=fC[n];e[r]??(e[r]=t[r])}return vC(e)}function wC(e){var t=e.obb;return(!t||_C(e,mC))&&(e.obb=t||=new Rf,t.fromBoundingRect(e.localRect,e.transform),gC(e,!1,mC)),t}function TC(e,t,n,r,i){var a=e.length,o=$f[t],s=ep[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function EC(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=vC(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(DC(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function DC(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:wC(e).intersect(wC(t),n,r)}var OC=null;function kC(){return OC}var AC=`expandAxisBreak`,jC=Math.PI,MC=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],NC=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],PC=Cl(),FC=Cl(),IC=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function LC(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=sw(e.axisName)&&Fx(e.nameLocation);W(r,function(e){var t=vC(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?In(RC,n.transform):An(RC),t.transform&&Mn(RC,RC,t.transform),hr.copy(zC,t.localRect),zC.applyTransform(RC),s?s.union(zC):hr.copy(s=new hr(0,0,0,0),zC))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new hr(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var RC=kn(),zC=new hr(0,0,0,0),BC=function(e,t,n,r,i,a){if(Fx(e.nameLocation)){var o=a.stOccupiedRect;o&&VC(xC({},o,a.transGroup.transform),r,i)}else HC(a.labelInfoList,a.dirVec,r,i)};function VC(e,t,n){var r=new tr;DC(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&SC(t,r)}function HC(e,t,n,r){for(var i=tr.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||VC(s,n,r)}}var UC=function(){function e(e,t,n,r){this.group=new Bd,this._axisModel=e,this._api=t,this._local={},this._shared=r||new IC(BC),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=X(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=X(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:X(e.nameDirection,1),tickDirection:X(e.tickDirection,1),labelDirection:X(e.labelDirection,1),labelOffset:X(e.labelOffset,0),silent:X(e.silent,!0),axisName:r,nameLocation:It(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:sw(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Bd({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new tr(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},W(WC,function(r){e[r]&&GC[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=Fc(t-e),i,a;return Ic(r)?(a=n>0?`top`:`bottom`,i=`center`):Ic(r-jC)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<jC?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),WC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],GC={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Qn(u,u,l),Qn(d,d,l));var p=U({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&n_(r.axis.scale))kC().buildAxisBreakLine(r,i,a,m);else{var h=new yf(U({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));dp(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||kt(_))&&(_=[_,_]);var v=My(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];W([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Ay(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){ew(t,i,s)&&KC(e,t,n,r,i,a,o,fS.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){ew(t,i,s)&&KC(e,t,n,r,i,a,o,fS.determine);var c=QC(e,i,a,r);YC(e,t.labelLayoutList,c),$C(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(sw(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new tr(0,0),_=new tr(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=kn();_.transform(Pn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*jC/180);var b,x;Fx(u)?b=UC.innerTextLayout(e.rotation,y??e.rotation,d):(b=qC(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Y(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Js({x:g.x,y:g.y,rotation:b.rotation,silent:UC.isLabelSilent(r),style:Xp(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Ap({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=UC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Ql(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=vC({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Fx(u)?MC[E]:NC[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function KC(e,t,n,r,i,a,o,s){nw(t)||tw(e,t,i,s,r,o);var c=t.labelLayoutList;iw(e,r,c,a),lw(r,e.rotation,c);var l=e.optionHideOverlap;JC(r,c,l),l&&EC(xt(c,function(e){return e&&!e.label.ignore})),LC(e,n,r,c)}function qC(e,t,n,r){var i=Fc(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ic(i-jC/2)?(o=c?`bottom`:`top`,a=`center`):Ic(i-jC*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<jC*1.5&&i>jC/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function JC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Nx(r))return;function a(e,a,o){var s=vC(t[a]),c=vC(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=PC(s.label).labelInfo.tick;if(Hb(l)&&u.notNice||Wb(l)&&u.offInterval){XC(s.label);return}}if(e===!1||s.suggestIgnore){XC(s.label);return}if(c.suggestIgnore){XC(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=CC({marginForce:f},s),c=CC({marginForce:f},c)}DC(s,c,null,{touchThreshold:d})&&XC(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function YC(e,t,n){e.showMinorTicks||W(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=FC(r),a=PC(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){XC(r);return}}})}function XC(e){e&&(e.ignore=!0)}function ZC(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(Qn(o,o,t),Qn(s,s,t));var u=new yf({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});dp(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=FC(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function QC(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=ZC(i.getTicksCoords(),n.transform,c,ht(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function $C(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=ht(c.getLineStyle(),ht(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=ZC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function ew(e,t,n){if(nw(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),rw(e,null,null,null))}return!0}function tw(e,t,n,r,i,a){var o=i.axis,s=Y(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Bd;n.add(c);var l=pS(r);if(!s||o.scale.isBlank()){rw(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(Y(e.raw.labelRotate,u.get(`rotate`))||0)*jC/180,p=UC.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;W(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Bx(o.scale,n);if(m&&m[f]){var y=m[f];J(y)&&y.textStyle&&(l=new vm(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=X(l.getShallow(`alignMinLabel`,!0),x),C=X(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=X(l.getShallow(`verticalAlignMinLabel`,!0),w),E=X(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Js({x:0,y:0,rotation:0,silent:UC.isLabelSilent(i),z2:D,style:Xp(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:Dt(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=PC(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,Ap({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=UC.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),Ql(O).eventData=A,j&&cw(i,a,O,j)}h.push(O),c.add(O)}),rw(t,G(h,function(e){return{label:e,priority:PC(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function nw(e){return!!e.labelLayoutList}function rw(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function iw(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);W(n,function(n,a){var o=vC(n);if(o){var s=o.label,c=PC(s);o.suggestIgnore=s.ignore,s.ignore=!1,bi(aw,ow);var l=t.axis;aw.x=l.dataToCoord(Bx(l.scale,c.labelInfo.tick)),aw.y=e.labelOffset+e.labelDirection*i,aw.rotation=c.layoutRotation,r.add(aw),aw.updateTransform(),r.remove(aw),aw.decomposeTransform(),bi(s,aw),s.markRedraw(),gC(o,!0),vC(o)}})}var aw=new Us,ow=new Us;function sw(e){return!!e}function cw(e,t,n,r){n.on(`click`,function(n){var i={type:AC,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function lw(e,t,n){var r=$g();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&PC(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&W(i,function(r){kC().adjustBreakLabelPair(e.axis.inverse,t,[vC(n[r[0]]),vC(n[r[1]])])})}}function uw(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),Y(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function dw(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function fw(e){var t={xAxisModel:null,yAxisModel:null};return W(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Dl).models[0]}),t}function pw(e,t,n,r,i,a){for(var o=uw(e,n),s=!1,c=!1,l=0;l<t.length;l++)Bb(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new UC(n,r,o,i)}function mw(e,t,n){var r=uw(t,n);e.updateCfg(r)}var hw=Cl(),gw=3,_w=function(){function e(e,t,n,r,i){var a=Wb(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Vb(e)||Ub(e)||Hb(e))&&(Il(l,yw(e,t.get(`dataMin`,!0))),Ll(l,yw(e,t.get(`dataMax`,!0)))),Vl(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=yw(e,Dt(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=yw(e,Dt(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=bw(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!zl(u[0])&&(u[0]=NaN),!zl(u[1])&&(u[1]=NaN);var g=s||Ft(u[0])||Ft(u[1])||a&&!o,_=Vb(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=yw(e,t.get(`startValue`,!0)),x=b!=null;!qc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),qc(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),vw(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),vw(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function vw(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Hl(t))}function yw(e,t){return t==null?null:Ft(t)?NaN:e.parse(t)}function bw(e,t){var n;if(Wb(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=K(r)?r:[r,r]}return[xw(n[0]),xw(n[1])]}function xw(e){return zr(typeof e==`boolean`?0:e,1)||0}function Sw(e){var t=hw(e.scale);return t.extent||=Pl(),t}function Cw(e,t){Sw(e).dimIdxInCoord=t.get(e.dim)}function ww(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Tw(n,e,i,r,t)}function Tw(e,t,n,r,i){var a=Sw(t),o=a.extent,s=!1;GS(t,function(r){if(r.boxCoordinateSystem){var i=ag(r).coord,c=a.dimIdxInCoord;if(c>=0&&K(i)){var l=i[c];l!=null&&!K(l)&&Fl(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;W(Px(u,n),function(e){Rl(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=jw(e,t,r);Dw(e,new _w(e,r,o,s,c),i),a.extent=null}function Ew(e,t){var n=e.scale;Dw(n,new _w(n,e.model,t,!1,!1),gw)}function Dw(e,t,n){e.rawExtentInfo=t,t.from=n}function Ow(e,t){kw.set(e,t)}var kw=Jt();function Aw(e,t,n,r,i){e.rawExtentInfo||Ew({scale:e,model:t},i||Pl());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function jw(e,t,n){var r=Vx(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return YS(t,function(e){a=!!kw.get(e)||a}),a}function Mw(e,t,n,r){if(n.ctnShp){var i;if(YS(e,function(t){var n=kw.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Il(i,a[0]),Ll(i,a[1]),Ox(e))}}),i){var a=t.getExtent();if(Wb(t))e.onBand||t.setExtent2(1,dc(a[0],a[0]+i[0]),fc(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=dc(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=fc(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Nw(){ZS(`liPosMinGap`,Pw)}function Pw(e,t,n){var r=Jt(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=gh(u);function f(n){qS(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Xy(Fw,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||_h(d,a))&&(l&&(a=c.transformIn(a,null)),Fw.arr[m++]=a)}});var h=Fw.typed?Fw.arr.subarray(0,m):(Fw.arr.length=m,Fw.arr);Fw.typed?h.sort():Oc(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=qc(g)?g:m>0?-2:-1,n.serUids=r}var Fw=Xy({ctor:Jy},50);function Iw(e){return function(t,n){var r=iC(t,{fromStat:{key:e}});if(qc(r.w2))return[-r.w2/2,r.w2/2]}}function Lw(e,t){return e+`|&`+t}function Rw(e){return Nw(),{liPosMinGap:!Wb(e.scale)}}function zw(e,t,n,r){tC(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Rw})}function Bw(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Vw={left:0,right:0,top:0,bottom:0},Hw=[`25%`,`25%`],Uw=`cartesian2d`,Ww=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=lv(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&cv(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&cv(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Vw,outerBoundsContain:`all`,outerBoundsClampWidth:Hw[0],outerBoundsClampHeight:Hw[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(fv),Gw=Ul(),Kw=`__ec_stack_`;function qw(e){return e.get(`stack`)||Kw+e.seriesIndex}function Jw(e){if(Wb(e.axis.scale)){for(var t=iC(e.axis),n=[],r=0;r<e.count;r++)n.push(ht({stackId:Kw+r},e));for(var i=Zw({bandWidthResult:t,seriesInfo:n}),a=[],r=0;r<e.count;r++){var o=i[Kw+r];o.offsetCenter=o.offset+o.width/2,a.push(o)}return a}}function Yw(e,t){var n=Xw(e,t);return n.columnMap=Zw(n),n}function Xw(e,t){var n=Lw(t,Uw),r=[],i=iC(e,{fromStat:{key:n},min:1});return KS(e,n,function(e){r.push({barWidth:Cc(e.get(`barWidth`),i.w),barMaxWidth:Cc(e.get(`barMaxWidth`),i.w),barMinWidth:Cc(e.get(`barMinWidth`)||(eT(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:qw(e)})}),{bandWidthResult:i,seriesInfo:r}}function Zw(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};W(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Z(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=dc(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=fc(35-o.length*4,15)+`%`;var c=Cc(i,t),l=Cc(a,1),u=(n-c)/(r+(r-1)*l);u=fc(u,0),W(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=dc(o,i)),a&&(o=fc(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=dc(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=fc(u,0);var d=0,f;W(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return W(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Qw(e){return{seriesType:e,overallReset:function(t){var n=Lw(e,Uw);JS(t,n,function(t){var r=Yw(t,e);KS(t,n,function(e){var t=r.columnMap[qw(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function $w(e){return{seriesType:e,plan:ob(),reset:function(e){if(dw(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=mg(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Bw(i))),p=eT(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Yy(r*3),c=p&&s&&Yy(r*3),l=p&&Yy(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,pc(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,pc(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function eT(e){return e.pipelineContext&&e.pipelineContext.large}function tT(e){return Iw(Lw(e,Uw))}function nT(e){Gw(e,function(){function t(t){var n=Lw(t,Uw);zw(e,n,t,Uw),Ow(n,tT(t))}t(`bar`),t(`pictorialBar`)})}var rT=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return vg(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)W(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(hy);hy.registerClass(rT);var iT=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return vg(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Yl(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Tg(rT.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(rT),aT=`\0__throttleOriginMethod`,oT=`\0__throttleRate`,sT=`\0__throttleType`;function cT(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function lT(e,t,n,r){var i=e[t];if(i){var a=i[aT]||i,o=i[sT];if(i[oT]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=cT(a,n,r===`debounce`),i[aT]=a,i[sT]=r,i[oT]=n}return i}}function uT(e,t){var n=e[t];n&&n[aT]&&(n.clear&&n.clear(),e[t]=n[aT])}var dT=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),fT=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new dT},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(ks);function pT(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Br(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+hT(m,s+_,!1),x=u+p*y(m)+gT(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+hT(m,-s+_,!1),x=u+p*y(m)+gT(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+hT(h,s+_,!0),x=u+p*y(h)+gT(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+hT(h,-s+_,!0),x=u+p*y(h)+gT(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Br(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function mT(e,t,n,r){if(kt(r)){e.setTextConfig({rotation:r});return}if(K(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function hT(e,t,n){return t*Math.sin(e)*(n?-1:1)}function gT(e,t,n){return t*Math.cos(e)*(n?1:-1)}function _T(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;K(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:G(r,function(e){return zr(e,i)})}}var vT=Math.max,yT=Math.min,bT=function(e){V(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Mp(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=CT(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=kT[s.type](a,e);if(!t)return null;var n=BT(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=kT[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!OT[s.type](r)))){var o=!1;f&&(o=xT[s.type](p,r));var g=ST[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),MT(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?wT(d,u,g,r,t,l,!1,!1):Gf(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=kT[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=kT[s.type](a,t),E=zT(l,T,s);Wf(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!OT[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=xT[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Yf(D,e,n),D=null),D?Xf(D):D=ST[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=am(k);A.prevValue!=null&&(A.prevValue=A.value)}}else MT(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?wT(d,u,D,C,t,l,!0,x):Wf(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Yf(n,e,t)}).execute();var C=this._backgroundGroup||=new Bd;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),IT(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),IT(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&_b(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:G(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Yf(t,e,Ql(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(lb),xT={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=vT(t.x,e.x),s=yT(t.x+t.width,i),c=vT(t.y,e.y),l=yT(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=yT(t.r,e.r),a=vT(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},ST={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Us({shape:U({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?fT:cf,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=pT(jT(i),{isRoundCap:l===fT}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Wf:Gf)(u,{shape:p},a)}return u}};function CT(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function wT(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Wf:Gf)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Wf:Gf)(n,{shape:l},u,i)}function TT(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var ET=[`x`,`y`,`width`,`height`],DT=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],OT={cartesian2d:function(e){return!TT(e,ET)},polar:function(e){return!TT(e,DT)}},kT={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?NT(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function AT(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function jT(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function MT(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;U(u,_T(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?VT(i,a.coordinateSystem):HT(i,a.coordinateSystem),p=Yp(r);Jp(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Py(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,mT(e,h===`outside`?f:h,jT(o),r.get([`label`,`rotate`]))}om(m,p,a.getRawValue(n),function(e){return Fy(t,e)});var g=r.getModel([`emphasis`]);sd(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),dd(e,r),AT(i)&&(e.style.fill=`none`,e.style.stroke=`none`,W(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function NT(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var PT=function(){function e(){}return e}(),FT=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new PT},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(ks);function IT(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Jl(e):0;if(l){var d=new FT({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new FT({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,Ql(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,LT),f.on(`mousemove`,LT)),n&&n.push(f)}var LT=cT(function(e){var t=this,n=RT(t,e.offsetX,e.offsetY);Ql(t).dataIndex=n>=0?n:null},30,!1);function RT(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function zT(e,t,n){if(yb(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function BT(e,t,n){return new(e.type===`polar`?cf:Us)({shape:zT(t,n,e),silent:!0,z2:0})}function VT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function HT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function UT(e){e.registerChartView(bT),e.registerSeriesModel(iT),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Qw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$w(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,cS(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),nT(e)}function WT(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}W([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=U({},t),i.dispatchAction(U(t,{type:e[1],seriesIndex:n(r,t)}))})})}function GT(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=Sl(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:K(l)?c.getName(l[0]):c.getName(l),selected:q(r)?r:U({},r)})}})}function KT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(GT(`map`,`selectchanged`,t,r,e),GT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(GT(`map`,`selected`,t,r,e),GT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(GT(`map`,`unselected`,t,r,e),GT(`pie`,`unselected`,t,r,e))})}function qT(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function JT(e,t,n){t=K(t)&&{coordDimensions:t}||U({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Xh(r,t).dimensions,a=new Yh(i,e);return a.initData(r,n),a}var YT=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),XT=Cl(),ZT=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new YT(Tt(this.getData,this),Tt(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return JT(this,{coordDimensions:[`value`],encodeDefaulter:Et(Em,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=XT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Mc(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){il(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(hy);rg({fullType:ZT.type,getCoord2:function(e){return e.getShallow(`center`)}}),Math.PI*2,is.CMD;function QT(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}var $T=new tr,eE=new tr,tE=new tr,nE=new tr,rE=new tr,iE=[],aE=new tr;function oE(e,t){if(t<=180&&t>0){t=t/180*Math.PI,$T.fromArray(e[0]),eE.fromArray(e[1]),tE.fromArray(e[2]),tr.sub(nE,$T,eE),tr.sub(rE,tE,eE);var n=nE.len(),r=rE.len();if(!(n<.001||r<.001)){nE.scale(1/n),rE.scale(1/r);var i=nE.dot(rE);if(Math.cos(t)<i){var a=QT(eE.x,eE.y,tE.x,tE.y,$T.x,$T.y,iE,!1);aE.fromArray(iE),aE.scaleAndAdd(rE,a/Math.tan(Math.PI-t));var o=tE.x===eE.x?(aE.y-eE.y)/(tE.y-eE.y):(aE.x-eE.x)/(tE.x-eE.x);if(isNaN(o))return;o<0?tr.copy(aE,eE):o>1&&tr.copy(aE,tE),aE.toArray(e[1])}}}}function sE(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,$T.fromArray(e[0]),eE.fromArray(e[1]),tE.fromArray(e[2]),tr.sub(nE,eE,$T),tr.sub(rE,tE,eE);var r=nE.len(),i=rE.len();if(!(r<.001||i<.001)&&(nE.scale(1/r),rE.scale(1/i),nE.dot(t)<Math.cos(n))){var a=QT(eE.x,eE.y,tE.x,tE.y,$T.x,$T.y,iE,!1);aE.fromArray(iE);var o=Math.PI/2,s=o+Math.acos(rE.dot(t))-n;if(s>=o)tr.copy(aE,tE);else{aE.scaleAndAdd(rE,a/Math.tan(Math.PI/2-s));var c=tE.x===eE.x?(aE.y-eE.y)/(tE.y-eE.y):(aE.x-eE.x)/(tE.x-eE.x);if(isNaN(c))return;c<0?tr.copy(aE,eE):c>1&&tr.copy(aE,tE)}aE.toArray(e[1])}}}function cE(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function lE(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Jn(r[0],r[1]),a=Jn(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Zn([],r[1],r[0],o/i),c=Zn([],r[1],r[2],o/a),l=Zn([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function uE(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<gu.length;c++){var l=gu[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:X(i.states[l]&&i.states[l].ignore,s))||!X(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&cE(r,!0,l,u);continue}r||(r=new gf,e.setTextGuideLine(r),!d&&(s||!o)&&cE(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),cE(r,!1,l,u)}}if(r){ht(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=lE}}function dE(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<hu.length;r++){var i=hu[r];n[i]=e.getModel([i,t])}return n}var fE=Math.PI/180;function pE(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;hE(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}TC(e,1,c,c+o)&&d(e)}function mE(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;yE(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!yE(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,hE(m,g,!1)}}pE(l,t,n,r,1,i,a,o,s,d),pE(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!yE(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function hE(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}gE(a,r)}}}function gE(e,t){vE.rect=e,yC(vE,t,_E)}var _E={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},vE={};function yE(e){return e.position===`center`}function bE(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*fE,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=Cc(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=Cc(T,l);var E=w.get(`length2`);if(E=Cc(E,l),Math.abs(d.endAngle-d.startAngle)<o){W(h.states,p),h.ignore=!0,g&&(W(g.states,p),g.ignore=!0);return}if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,M,N;r=d.cx,i=d.cy;var P=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,N=`center`;else{var F=(P?(d.r+d.r0)/2*O:d.r*O)+r,I=(P?(d.r+d.r0)/2*k:d.r*k)+i;if(A=F+O*3,j=I+k*3,!P){var L=F+O*(T+c-d.r),ee=I+k*(T+c-d.r),R=L+(O<0?-1:1)*E,te=ee;A=x===`edge`?O<0?u+S:u+l-S:R+(O<0?-b:b),j=te,M=[[F,I],[L,ee],[R,te]]}N=P?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var ne=Math.PI,re=0,ie=v.get(`rotate`);if(kt(ie))re=ne/180*ie;else if(y===`center`)re=0;else if(ie===`radial`||ie===!0)re=O<0?-D+ne:-D;else if(ie===`tangential`||ie===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var ae=Math.atan2(O,k);ae<0&&(ae=ne*2+ae),k>0&&ie!==`tangential-noflip`&&(ae=ne+ae),re=ae-ne}if(a=!!re,h.x=A,h.y=j,h.rotation=re,h.setStyle({verticalAlign:`middle`}),P){h.setStyle({align:N});var oe=h.states.select;oe&&(oe.x+=h.x,oe.y+=h.y)}else{var z=new hr(0,0,0,0);gE(z,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new tr(O,k),linePoints:M,textAlign:N,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:z,unconstrainedWidth:z.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:P})}}),!a&&e.get(`avoidLabelOverlap`)&&mE(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(W(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(W(v.states,p),v.ignore=!0):(oE(x,g.minTurnAngle),sE(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new tr(x[0][0],x[0][1])})}}}var xE=Math.PI*2,SE=Math.PI/180,CE=Xl(`pie`,wE);function wE(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=nv(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*SE,d=e.get(`endAngle`),f=e.get(`padAngle`)*SE;d=d===`auto`?u-xE:-d*SE;var p=e.get(`minAngle`)*SE+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;rs(S,!_),u=S[0],d=S[1];var w=TE(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e)){n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?Sc(e,b,[c,s]):s}),O=i}),E<xE&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}var TE=Cl(),EE=function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Js;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=U(_T(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Gf(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Gf(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Wf(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Gf(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Xf(i),Wf(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),dd(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=U({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},_T(s.getModel(`itemStyle`),c)),U(i.ensureState(`select`),{x:p,y:m,shape:_T(o.getModel([`select`,`itemStyle`]),c)}),U(i.ensureState(`blur`),{shape:_T(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&U(g.ensureState(`select`),{x:p,y:m}),U(_.ensureState(`select`),{x:p,y:m}),sd(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Jp(r,Yp(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new gf,this.setTextGuideLine(d)),uE(this,dE(i),{stroke:s,opacity:It(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(cf),DE=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new cf({shape:pt(TE(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new EE(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Yf(a.getItemGraphicEl(t),e,t)}).execute(),bE(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(lb);function OE(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(kt(r)&&!isNaN(r)&&r<0)})}}}function kE(e){e.registerChartView(DE),e.registerSeriesModel(ZT),WT(`pie`,e.registerAction),e.registerLayout(CE),e.registerProcessor(qT(`pie`)),e.registerProcessor(OE(`pie`))}var AE=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),jE=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new AE(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new AE(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new AE(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new AE(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new AE(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new AE(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ME=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,NE=[],PE=tn.browser.firefox&&+tn.browser.version.split(`.`)[0]<39;function FE(e,t,n,r){return n||={},r?IE(e,t,n):PE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?IE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function IE(e,t,n){if(tn.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Ig(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ng(NE,e,r,i)){n.zrX=NE[0],n.zrY=NE[1];return}}n.zrX=n.zrY=0}function LE(e){return e||window.event}function RE(e,t,n){if(t=LE(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&FE(e,i,t,n)}else{FE(e,t,t,n);var a=zE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&ME.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function zE(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function BE(e,t,n,r){e.addEventListener(t,n,r)}function VE(e,t,n,r){e.removeEventListener(t,n,r)}var HE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function UE(e){return e.which===2||e.which===3}var WE=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=FE(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in qE)if(qE.hasOwnProperty(t)){var n=qE[t](this._track,e);if(n)return n}},e}();function GE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function KE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var qE={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=GE(r)/GE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=KE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},JE=`silent`;function YE(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:XE}}function XE(){HE(this.event)}var ZE=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ka),QE=function(){function e(e,t){this.x=e,this.y=t}return e}(),$E=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],eD=new hr(0,0,0,0),tD=function(e){V(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new QE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new ZE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new jE(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(W($E,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=iD(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new QE(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new QE(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=YE(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new QE(e,t);if(rD(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new hr(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(eD.copy(u.getBoundingRect()),u.transform&&eD.applyTransform(u.transform),eD.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(rD(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new WE;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new QE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Ka);W([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){tD.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=iD(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Jn(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function nD(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||JE}return!1}function rD(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=nD(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==JE)){t.target=o;break}}}function iD(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var aD=32,oD=7;function sD(e){for(var t=0;e>=aD;)t|=e&1,e>>=1;return e+t}function cD(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;lD(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function lD(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function uD(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function dD(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function fD(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function pD(e,t){var n=oD,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=fD(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=dD(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=fD(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=dD(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=oD||m>=oD);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-fD(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-dD(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=oD||g>=oD);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function mD(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<aD){a=cD(e,n,r,t),uD(e,n,r,n+a,t);return}var o=pD(e,t),s=sD(i);do{if(a=cD(e,n,r,t),a<s){var c=i;c>s&&(c=s),uD(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var hD=!1;function gD(){hD||(hD=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function _D(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var vD=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=_D}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,mD(n,_D)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(gD(),p.z=0),isNaN(p.z2)&&(gD(),p.z2=0),isNaN(p.zlevel)&&(gD(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=gt(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),yD=tn.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function bD(){return new Date().getTime()}var xD=function(e){V(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=bD()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(yD(t),!e._paused&&e.update())}yD(t)},t.prototype.start=function(){this._running||(this._time=bD(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=bD(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=bD()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ga(e,t.loop);return this.addAnimator(n),n},t}(Ka),SD=300,CD=tn.domSupported,wD=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:G(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),TD={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ED=!1;function DD(e){var t=e.pointerType;return t===`pen`||t===`touch`}function OD(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function kD(e){e&&(e.zrByTouch=!0)}function AD(e,t){return RE(e.dom,new MD(e,t),!0)}function jD(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var MD=function(){function e(e,t){this.stopPropagation=Qt,this.stopImmediatePropagation=Qt,this.preventDefault=Qt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),ND={mousedown:function(e){e=RE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=RE(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=RE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=RE(this.dom,e);var t=e.toElement||e.relatedTarget;jD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ED=!0,e=RE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ED||(e=RE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=RE(this.dom,e),kD(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),ND.mousemove.call(this,e),ND.mousedown.call(this,e)},touchmove:function(e){e=RE(this.dom,e),kD(e),this.handler.processGesture(e,`change`),ND.mousemove.call(this,e)},touchend:function(e){e=RE(this.dom,e),kD(e),this.handler.processGesture(e,`end`),ND.mouseup.call(this,e),+new Date-this.__lastTouchMoment<SD&&ND.click.call(this,e)},pointerdown:function(e){ND.mousedown.call(this,e)},pointermove:function(e){DD(e)||ND.mousemove.call(this,e)},pointerup:function(e){ND.mouseup.call(this,e)},pointerout:function(e){DD(e)||ND.mouseout.call(this,e)}};W([`click`,`dblclick`,`contextmenu`],function(e){ND[e]=function(t){t=RE(this.dom,t),this.trigger(e,t)}});var PD={pointermove:function(e){DD(e)||PD.mousemove.call(this,e)},pointerup:function(e){PD.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function FD(e,t){var n=t.domHandlers;tn.pointerEventsSupported?W(wD.pointer,function(r){LD(t,r,function(t){n[r].call(e,t)})}):(tn.touchEventsSupported&&W(wD.touch,function(r){LD(t,r,function(i){n[r].call(e,i),OD(t)})}),W(wD.mouse,function(r){LD(t,r,function(i){i=LE(i),t.touching||n[r].call(e,i)})}))}function ID(e,t){tn.pointerEventsSupported?W(TD.pointer,n):tn.touchEventsSupported||W(TD.mouse,n);function n(n){function r(r){r=LE(r),jD(e,r.target)||(r=AD(e,r),t.domHandlers[n].call(e,r))}LD(t,n,r,{capture:!0})}}function LD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,BE(e.domTarget,t,n,r)}function RD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&VE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var zD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),BD=function(e){V(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new zD(t,ND),CD&&(r._globalHandlerScope=new zD(document,PD)),FD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){RD(this._localHandlerScope),CD&&RD(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,CD&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ID(this,t):RD(t)}},t}(Ka),VD={},HD={};function UD(e){delete HD[e]}function WD(e){if(!e)return!1;if(typeof e==`string`)return va(e,1)<Ya;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=va(t[i].color,1);return n/=r,n<Ya}return!1}var GD=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new vD,a=n.renderer||`canvas`;VD[a]||(a=Ct(VD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new VD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!tn.node&&!tn.worker&&!s?new BD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?tn.touchEventsSupported:!!l,d=44,f;u&&(f=X(n.pointerSize,d)),this.handler=new tD(i,o,c,o.root,f),this.animation=new xD({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=WD(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=bD(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=bD();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Bd&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,UD(this.id))},e}();function KD(e,t){var n=new GD(dt(),e,t);return HD[n.id]=n,n}function qD(e,t){VD[e]=t}var JD=``;typeof navigator<`u`&&(JD=navigator.platform||``);var YD=`rgba(0, 0, 0, 0.2)`,XD=Q.color.theme[0],ZD=ha(XD,null,null,.9),QD={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[ZD,XD],aria:{decal:{decals:[{color:YD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:YD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:YD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:YD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:YD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:YD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:JD.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},$D=Jt();function eO(e,t,n){var r=$D.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var tO,nO,rO,iO=`\0_ec_inner`,aO=1,oO=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new vm(r),this._locale=new vm(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=dO(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,dO(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?rO(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&W(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=Jt(),s=t&&t.replaceMergeMainTypeMap;wm(this),W(e,function(e,t){e!=null&&(fv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?pt(e):H(n[t],e,!0))}),s&&s.each(function(e,t){fv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),fv.topologicalTravel(a,fv.getAllClassMainTypes(),c,this);function c(t){var a=eO(this,t,rl(e[t])),o=r.get(t),c=cl(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);bl(c,t,fv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;W(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=fv.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=U({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),U(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&tO(this)}this._seriesIndices||tO(this)},t.prototype.getOption=function(){var e=pt(this.option);return W(e,function(t,n){if(fv.hasClass(n)){for(var r=rl(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!yl(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[iO],e},t.prototype.setTheme=function(e){this._theme=new vm(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?xt(a,function(e){return!!e}):lO(`name`,i,a):lO(`id`,r,a):(o=[],W(rl(n),function(e){a[e]&&o.push(a[e])})),uO(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(uO(r?this.queryComponents(r):xt(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?xt(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Dt(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=q(e)?r.get(e):J(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=_l(e,null);return xt(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return xt(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return xt(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){nO(this),W(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){W(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){nO(this),W(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return W(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return nO(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){nO(this);var n=[];W(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=Jt(n)},t.prototype.restoreData=function(e){tO(this);var t=this._componentsMap,n=[];t.each(function(e,t){fv.hasClass(t)&&n.push(t)}),fv.topologicalTravel(n,fv.getAllClassMainTypes(),function(n){W(t.get(n),function(t){t&&(n!==`series`||!sO(t,e))&&t.restoreData()})})},t.internalField=function(){tO=function(e){var t=e._seriesIndices=[];W(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Jt(t)},nO=function(e){},rO=function(e,t){e.option={},e.option[iO]=aO,e._componentsMap=Jt({series:[]}),e._componentsCount=Jt();var n=t.aria;J(n)&&n.enabled==null&&(n.enabled=!0),cO(t,e._theme.option),H(t,QD,!1),e._mergeOption(t,null)}}(),t}(vm);function sO(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function cO(e,t){var n=e.color&&!e.colorLayer;W(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||fv.hasClass(r)||(typeof t==`object`?e[r]=e[r]?H(e[r],t,!1):pt(t):e[r]??(e[r]=t))})}function lO(e,t,n){if(K(t)){var r=Jt();return W(t,function(e){e!=null&&_l(e,null)!=null&&r.set(e,!0)}),xt(n,function(t){return t&&r.get(t[e])})}var i=_l(t,null);return xt(n,function(t){return t&&i!=null&&t[e]===i})}function uO(e,t){return t.hasOwnProperty(`subType`)?xt(e,function(e){return e&&e.subType===t.subType}):e}function dO(e){var t=Jt();return e&&W(rl(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}vt(oO,gv);var fO=/^(min|max)?(.+)$/,pO=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(W(rl(e.series),function(e){e&&e.data&&jt(e.data)&&Ht(e.data)}),W(rl(e.dataset),function(e){e&&e.source&&jt(e.source)&&Ht(e.source)})),e=pt(e);var r=this._optionBackup,i=mO(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],pt(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=pt(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)hO(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!_O(a,this._currentMediaIndices)&&(o=G(a,function(e){return pt(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function mO(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&K(l)&&W(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),W(c,function(e){return f(e)}),W(r,function(e){return f(e.option)});function f(e){W(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function hO(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return W(e,function(e,t){var n=t.match(fO);if(!(!n||!n[1]||!n[2])){var a=n[1];gO(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function gO(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function _O(e,t){return e.join(`,`)===t.join(`,`)}var vO=W,yO=J,bO=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function xO(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=bO.length;n<r;n++){var i=bO[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?H(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?H(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function SO(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,ht(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function CO(e){SO(e,`itemStyle`),SO(e,`lineStyle`),SO(e,`areaStyle`),SO(e,`label`),SO(e,`labelLine`),SO(e,`upperLabel`),SO(e,`edgeLabel`)}function wO(e,t){var n=yO(e)&&e[t],r=yO(n)&&n.textStyle;if(r)for(var i=0,a=al.length;i<a;i++){var o=al[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function TO(e){e&&(CO(e),wO(e,`label`),e.emphasis&&wO(e.emphasis,`label`))}function EO(e){if(yO(e)){xO(e),CO(e),wO(e,`label`),wO(e,`upperLabel`),wO(e,`edgeLabel`),e.emphasis&&(wO(e.emphasis,`label`),wO(e.emphasis,`upperLabel`),wO(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(xO(t),TO(t));var n=e.markLine;n&&(xO(n),TO(n));var r=e.markArea;r&&TO(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!jt(a))for(var o=0;o<a.length;o++)TO(a[o]);W(e.categories,function(e){CO(e)})}if(i&&!jt(i))for(var o=0;o<i.length;o++)TO(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)TO(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)K(c[o])?(TO(c[o][0]),TO(c[o][1])):TO(c[o]);e.type===`gauge`?(wO(e,`axisLabel`),wO(e,`title`),wO(e,`detail`)):e.type===`treemap`?(SO(e.breadcrumb,`itemStyle`),W(e.levels,function(e){CO(e)})):e.type===`tree`&&CO(e.leaves)}}function DO(e){return K(e)?e:e?[e]:[]}function OO(e){return(K(e)?e[0]:e)||{}}function kO(e,t){vO(DO(e.series),function(e){yO(e)&&EO(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),vO(n,function(t){vO(DO(e[t]),function(e){e&&(wO(e,`axisLabel`),wO(e.axisPointer,`label`))})}),vO(DO(e.parallel),function(e){var t=e&&e.parallelAxisDefault;wO(t,`axisLabel`),wO(t&&t.axisPointer,`label`)}),vO(DO(e.calendar),function(e){SO(e,`itemStyle`),wO(e,`dayLabel`),wO(e,`monthLabel`),wO(e,`yearLabel`)}),vO(DO(e.radar),function(e){wO(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),vO(DO(e.geo),function(e){yO(e)&&(TO(e),vO(DO(e.regions),function(e){TO(e)}))}),vO(DO(e.timeline),function(e){TO(e),SO(e,`label`),SO(e,`itemStyle`),SO(e,`controlStyle`,!0);var t=e.data;K(t)&&W(t,function(e){J(e)&&(SO(e,`label`),SO(e,`itemStyle`))})}),vO(DO(e.toolbox),function(e){SO(e,`iconStyle`),vO(e.feature,function(e){SO(e,`iconStyle`)})}),wO(OO(e.axisPointer),`label`),wO(OO(e.tooltip).axisPointer,`label`)}function AO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function jO(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function MO(e){e&&W(NO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var NO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],PO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],FO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function IO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<FO.length;n++){var r=FO[n][1],i=FO[n][0];t[r]!=null&&(t[i]=t[r])}}function LO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function RO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function zO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function BO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&BO(e[n].children,t)}function VO(e,t){kO(e,t),e.series=rl(e.series),W(e.series,function(e){if(J(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),LO(e.label);var n=e.data;if(n&&!jt(n))for(var r=0;r<n.length;r++)LO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=AO(e,`pointer.color`);i!=null&&jO(e,`itemStyle.color`,i)}else if(t===`bar`){IO(e),IO(e.backgroundStyle),IO(e.emphasis);var n=e.data;if(n&&!jt(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(IO(n[r]),IO(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),RO(e),BO(e.data,RO)}else t===`graph`||t===`sankey`?zO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&ht(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),MO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),W(PO,function(t){var n=e[t];n&&(K(n)||(n=[n]),W(n,function(e){MO(e)}))})}var HO=Zl(UO);function UO(e){var t=Jt();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),W(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),WO(e))})}function WO(e){W(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Nc(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var GO=function(){function e(){this.group=new Bd,this.uid=Sg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();un(GO),_n(GO);var KO=Cl(),qO={itemStyle:vn(hm,!0),lineStyle:vn(fm,!0)},JO={lineStyle:`stroke`,itemStyle:`fill`};function YO(e,t){return e.visualStyleMapper||qO[t]||(console.warn(`Unknown style type '`+t+`'.`),qO.itemStyle)}function XO(e,t){return e.visualDrawType||JO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var ZO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=YO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=XO(e,r),c=a[s],l=Dt(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||Dt(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||Dt(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=U({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},QO=new vm,$O={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=YO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){QO.option=n[r];var o=i(QO);U(e.ensureUniqueItemVisual(t,`style`),o),QO.option.decal&&(e.setItemVisual(t,`decal`,QO.option.decal),QO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},ek={performRawSeries:!0,overallReset:function(e){var t=Jt();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();KO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=KO(e).scope,a=XO(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},tk=Math.PI;function nk(e,t){t||={},ht(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Bd,r=new Us({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Js({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Us({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Tf({shape:{startAngle:-tk/2,endAngle:-tk/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:tk*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:tk*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var rk=function(){function e(e,t,n,r){this._stageTaskMap=Jt(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Yl(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Jt();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;W(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});zt(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;W(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Jt(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||wv({plan:ck,reset:lk,count:fk}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||wv({reset:ik});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Jt(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;zt(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):W(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,wv({reset:ak,onDirty:sk})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Dt(e)&&(e={overallReset:e,seriesType:pk(e)}),e.uid=Sg(`stageHandler`),t&&(e.visualType=t),e},e}();function ik(e){e.overallReset(e.ecModel,e.api,e.payload)}function ak(e){return e.dirtyOnOverallProgress&&ok}function ok(){this.agent.dirty(),this.getDownstream().dirty()}function sk(){this.agent&&this.agent.dirty()}function ck(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function lk(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=rl(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?G(t,function(e,t){return dk(t)}):uk}var uk=dk(0);function dk(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function fk(e){return e.data.count()}function pk(e){gk=null;try{e(mk,hk)}catch{}return gk}var mk={},hk={},gk;_k(mk,oO),_k(hk,lu),mk.eachSeriesByType=mk.eachRawSeriesByType=function(e){gk=e},mk.eachComponent=function(e){e.mainType===`series`&&e.subType&&(gk=e.subType)};function _k(e,t){for(var n in t.prototype)e[n]=Qt}var $=Q.darkColor,vk=$.background,yk=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},bk={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},xk={darkMode:!0,color:$.theme,backgroundColor:vk,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50},feature:{dataView:{backgroundColor:vk,textColor:$.primary,textareaColor:$.background,textareaBorderColor:$.border,buttonColor:$.accent50,buttonTextColor:$.neutral00}}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:bk,y:bk,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:yk(),logAxis:yk(),valueAxis:yk(),categoryAxis:yk(),line:{symbol:`circle`},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:$.background}},radar:function(){var e=yk();return e.axisName={color:$.axisLabel},e.axisLine.lineStyle.color=$.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};xk.categoryAxis.splitLine.show=!1;var Sk=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(q(e)){var i=sn(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};W(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Ck=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],wk=Ck.concat([`symbolKeepAspect`]),Tk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<Ck.length;o++){var s=Ck[o],c=e.get(s);Dt(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(U({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=Ct(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},Ek={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<wk.length;r++){var i=wk[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function Dk(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function Ok(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function kk(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var Ak=new Ka,jk={};function Mk(e,t){jk[e]=t}function Nk(e){return jk[e]}var Pk={};function Fk(e,t){Pk[e]=t}function Ik(e){return Pk[e]}var Lk=Math.round(Math.random()*9),Rk=typeof Object.defineProperty==`function`,zk=function(){function e(){this._id=`__ec_inner_`+Lk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return Rk?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function Bk(e){return isFinite(e)}function Vk(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=Bk(r)?r:0,i=Bk(i)?i:1,a=Bk(a)?a:0,o=Bk(o)?o:0,e.createLinearGradient(r,a,i,o)}function Hk(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=Bk(o)?o:.5,s=Bk(s)?s:.5,c=c>=0&&Bk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Uk(e,t,n){for(var r=t.type===`radial`?Hk(e,t,n):Vk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Wk(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function Gk(e){return parseInt(e,10)}function Kk(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Gk(s[r])||Gk(e.style[r]))-(Gk(s[a])||0)-(Gk(s[o])||0)||0}function qk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:kt(e)?[e]:K(e)?e:null}function Jk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&qk(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=G(n,function(e){return e/i}),r/=i)}return[n,r]}var Yk=new is(!0);function Xk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Zk(e){return typeof e==`string`&&e!==`none`}function Qk(e){var t=e.fill;return t!=null&&t!==`none`}function $k(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function eA(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function tA(e,t,n){var r=En(t.image,t.__image,n);if(On(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*$t),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function nA(e,t,n,r,i){var a,o=Xk(n),s=Qk(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Yk,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Uk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Uk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?tA(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?tA(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Jk(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&eA(e,n),s&&$k(e,n)):(s&&$k(e,n),o&&eA(e,n)),T&&e.setLineDash([])}function rA(e,t,n){var r=t.__image=En(n.image,t.__image,t,t.onload);if(!(!r||!On(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function iA(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Jk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Xk(n)&&e.strokeText(i,n.x,n.y),Qk(n)&&e.fillText(i,n.x,n.y)):(Qk(n)&&e.fillText(i,n.x,n.y),Xk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var aA=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],oA=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function sA(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){vA(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?vo.opacity:o}(r||t.blend!==n.blend)&&(a||=(vA(e,i),!0),e.globalCompositeOperation=t.blend||vo.blend);for(var s=0;s<aA.length;s++){var c=aA[s];(r||t[c]!==n[c])&&(a||=(vA(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(vA(e,i),!0),e.shadowColor=t.shadowColor||vo.shadowColor),a}function cA(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=sA(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(vA(e,i),!0),Zk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(vA(e,i),!0),Zk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(vA(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(vA(e,i),!0),e.lineWidth=c)}for(var l=0;l<oA.length;l++){var u=oA[l],d=u[0];(r||a[d]!==o[d])&&(s||=(vA(e,i),!0),e[d]=a[d]||u[1])}return s}function lA(e,t,n,r,i){return sA(e,t.style,n&&n.style,r,i)}function uA(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function dA(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),uA(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function fA(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var pA=1,mA=2,hA=3,gA=4;function _A(e){var t=Qk(e),n=Xk(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function vA(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function yA(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};bA(e,t,n),xA(e,n)}function bA(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||Wk(i,a))&&(a&&(vA(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(vA(e,n),e.save(),dA(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped){t.__dirty&=-2,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof ks&&t.autoBatch&&_A(o);s||fA(r,l.transform)?(vA(e,n),uA(e,t)):u||vA(e,n),t instanceof ks?(n.lastDrawType!==pA&&(c=!0,n.lastDrawType=pA),cA(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),nA(e,t,o,u,n)):t instanceof js?(n.lastDrawType!==hA&&(c=!0,n.lastDrawType=hA),cA(e,t,l,c,n),iA(e,t,o)):t instanceof Fs?(n.lastDrawType!==mA&&(c=!0,n.lastDrawType=mA),lA(e,t,l,c,n),rA(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==gA&&(c=!0,n.lastDrawType=gA),SA(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&vA(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function xA(e,t){vA(e,t),t.prevElClipPaths&&e.restore()}function SA(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),bA(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}xA(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),bA(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}xA(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var CA=new zk,wA=new Cn(100),TA=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function EA(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&CA.delete(e);var a=CA.get(e);if(a)return a;var o=ht(e,{symbol:`rect`,symbolSize:1,symbolKeepAspect:!0,color:`rgba(0, 0, 0, 0.2)`,backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor===`none`&&(o.backgroundColor=null);var s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,CA.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<TA.length;++s){var c=o[TA[s]];if(c!=null&&!K(c)&&!q(c)&&!kt(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=wA.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=OA(o.dashArrayX),f=kA(o.dashArrayY),p=DA(o.symbol),m=AA(d),h=jA(f),g=!i&&Ze.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=b(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),x(),a&&wA.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function b(){for(var e=1,t=0,n=m.length;t<n;++t)e=Kc(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=Kc(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;k(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=Ay(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&_.children.push(d)}else yA(y,u)}}}}function DA(e){if(!e||e.length===0)return[[`rect`]];if(q(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!q(e[n])){t=!1;break}if(t)return DA([e]);for(var r=[],n=0;n<e.length;++n)q(e[n])?r.push([e[n]]):r.push(e[n]);return r}function OA(e){if(!e||e.length===0)return[[0,0]];if(kt(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!kt(e[r])){n=!1;break}if(n)return OA([e]);for(var i=[],r=0;r<e.length;++r)if(kt(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=G(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function kA(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(kt(e)){var t=Math.ceil(e);return[t,t]}var n=G(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function AA(e){return G(e,function(e){return jA(e)})}function jA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var MA=Zl(NA);function NA(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=EA(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=EA(i,t)}}})}var PA=1,FA=800,IA=900,LA=920,RA=1e3,zA=2e3,BA=5e3,VA=1e3,HA=1100,UA=2e3,WA=3e3,GA=4e3,KA=4500,qA=4600,JA=5e3,YA=6e3,XA=7e3,ZA={PROCESSOR:{SERIES_FILTER:FA,AXIS_STATISTICS:LA,FILTER:RA,STATISTIC:BA,STATISTICS:BA},VISUAL:{LAYOUT:VA,PROGRESSIVE_LAYOUT:HA,GLOBAL:UA,CHART:WA,POST_CHART_LAYOUT:qA,COMPONENT:GA,BRUSH:JA,CHART_ITEM:KA,ARIA:YA,DECAL:XA}},QA=`__flagInMainProcess`,$A=`__mainProcessVersion`,ej=`__pendingUpdate`,tj=`__needsUpdateStatus`,nj=/^[a-zA-Z0-9_]+$/,rj=`__connectUpdateStatus`,ij=0,aj=1,oj=2;function sj(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return lj(this,e,t)}}function cj(e){return function(){var t=[...arguments];return lj(this,e,t)}}function lj(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Ka.prototype[t].apply(e,n)}var uj=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ka),dj=uj.prototype;dj.on=cj(`on`),dj.off=cj(`off`);var fj,pj,mj,hj,gj,_j,vj,yj,bj,xj,Sj,Cj,wj,Tj,Ej,Dj,Oj,kj,Aj,jj=function(e){V(t,e);function t(t,n,r){var i=e.call(this,new Sk)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[$A]=1,r.ssr;var c=i._zr=KD(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:X(r.useDirtyRect,s),useCoarsePointer:X(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=cT(Tt(c.flush,c),17),i._updateTheme(n),i._locale=Yg(r.locale||qg),i._coordSysMgr=new tg;var l=i._api=Ej(i);function u(e,t){return e.__prio-t.__prio}return mD(zj,u),mD(Lj,u),i._scheduler=new rk(i,l,Lj,zj),i._messageCenter=new uj,i._initEvents(),i.resize=Tt(i.resize,i),c.animation.on(`frame`,i._onframe,i),xj(c,i),Sj(c,i),Ht(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(kj(this),this[ej]){var r=this[ej].silent;this[QA]=!0,Aj(this);try{fj(this),hj.update.call(this,null,this[ej].updateParams)}catch(e){throw this[QA]=!1,this[ej]=null,e}this._zr.flush(),this[QA]=!1,this[ej]=null,yj.call(this,r),bj.call(this,r)}else if(e.unfinished){var i=PA;do{e.unfinished=!1;var a=Ze.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),_j(this,t),e.performVisualTasks(t),Tj(this,this._model,n,`remain`,{}),i-=Ze.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[QA]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[QA]=!0,Aj(this),!this._model||t){var o=new pO(this._api),s=this._theme,c=this._model=new oO;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},Rj);var l={seriesTransition:a,optionChanged:!0};if(n)this[ej]={silent:r,updateParams:l},this[QA]=!1,this.getZr().wakeUp();else{try{fj(this),hj.update.call(this,null,l)}catch(e){throw this[ej]=null,this[QA]=!1,e}this._ssr||this._zr.flush(),this[ej]=null,this[QA]=!1,yj.call(this,r),bj.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[QA]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[ej]&&(r??=this[ej].silent,i=this[ej].updateParams,this[ej]=null),this[QA]=!0,Aj(this);try{this._updateTheme(e),n.setTheme(this._theme),fj(this),hj.update.call(this,{type:`setTheme`},i)}catch(e){throw this[QA]=!1,e}this[QA]=!1,yj.call(this,r),bj.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=Bj[e]),e&&(e=pt(e),e&&VO(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||tn.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return W(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;W(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return W(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Uj[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();W(Hj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(pt(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Ze.createCanvas(),h=KD(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return W(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Us({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),W(u,function(e){var t=new Fs({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return gj(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return gj(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return gj(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return W(Tl(n,e),function(e,n){n.indexOf(`Models`)>=0&&W(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Tl(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?Ok(i,t):Dk(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;W(Nj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&kk(i,function(e){var t=Ql(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=U({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;W(Ij,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),KT(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Al(this.getDom(),Gj,``);var e=this,t=e._api,n=e._model;W(e._componentsViews,function(e){e.dispose(n,t)}),W(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Hj[e.id]},t.prototype.resize=function(e){if(!this[QA]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[ej]&&(r??=this[ej].silent,n=!0,this[ej]=null),this[QA]=!0,Aj(this);try{n&&fj(this),hj.update.call(this,{type:`resize`,animation:U({duration:0},e&&e.animation)})}catch(e){throw this[QA]=!1,e}this[QA]=!1,yj.call(this,r),bj.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Vj[e]){var n=Vj[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=U({},e);return t.type=Fj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),Pj[e.type]&&this._model){if(this[QA]){this._pendingActions.push(e);return}var n=t.silent;vj.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&tn.browser.weChat&&this._throttledZrFlush(),yj.call(this,n),bj.call(this,n)}},t.prototype.updateLabelLayout=function(){Ak.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){fj=function(e){NS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),pj(e,!0),pj(e,!1),t.plan()},pj=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=sn(e.type);u=new(t?GO.getClass(d.main,d.sub):lb.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},mj=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){W([].concat(e._componentsViews,e._chartsViews),l);return}var o=kl(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=Jt(),W(rl(s),function(e){var t=_l(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(gd(n)){if(t instanceof hy)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&Qu(t,n,e._api);else{var r=$u(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Zu(t.mainType,t.componentIndex,e._api),a&&W(a,function(e){n.type===`highlight`?Hu(e):Uu(e)})}}else hd(n)&&t instanceof hy&&(nd(t,n,e._api),rd(t),Oj(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},hj={prepareAndUpdate:function(e){fj(this),hj.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){PS(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),Ak.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),_j(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),Cj(this,r,i,e,n),Ak.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=Jt();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),Tj(t,n,r,e,{},a),Ak.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),lb.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),Cj(this,n,this._api,e,{}),Ak.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),lb.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),Ak.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){hj.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){e.id;return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=Tl(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}gj=e,_j=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},vj=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=Pj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&sn(s[0]);this[QA]=!0,Aj(this);var u=[e],d=!1;e.batch&&(d=!0,u=G(e.batch,function(t){return t=ht(U({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=hd(e),_=gd(e);if(_&&Yu(this._api),W(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=U({},t),p.type=h,f.push(p),_){var a=El(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;mj(n,c,t,u),Oj(n)}else g?(mj(n,c,t,`series`),Oj(n)):l&&mj(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[ej]?(fj(this),hj.update.call(this,e),this[ej]=null):hj[c].call(this,e)}catch(e){throw this[QA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[QA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;zt(J(y)),v=ht({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},yj=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();vj.call(this,n,e)}},bj=function(e){!e&&this.trigger(`updated`)},xj=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[ej]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},Sj=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=kk(n,pd);r&&(ed(r,e,t._api),Oj(t))}).on(`mouseout`,function(e){var n=e.target,r=kk(n,pd);r&&(td(r,e,t._api),Oj(t))}).on(`click`,function(e){var n=e.target,r=kk(n,function(e){return Ql(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=Ql(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;mD(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),W(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}Cj=function(e,t,r,i,a){n(t),wj(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive=!1}),Tj(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},wj=function(e,t,n,r,i,a){W(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},Tj=function(e,t,n,r,l,u){var d=e._scheduler;l=U(l||{},{updatedSeries:t.getSeries()}),Ak.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),rd(t)}),d.unfinished=f||d.unfinished,Ak.trigger(`series:layoutlabels`,t,n,l),Ak.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),Ak.trigger(`series:afterupdate`,t,n,l)},Oj=function(e){e[tj]=!0,e.getZr().wakeUp()},Aj=function(e){e[$A]=(e[$A]+1)%1e6},kj=function(e){e[tj]&&(e.getZr().storage.traverse(function(e){Kf(e)||r(e)}),e[tj]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function i(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>X(t.get(`hoverLayerThreshold`),QD.hoverLayerThreshold)&&!tn.node&&!tn.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Lp(e);t.eachRendered(function(e){return zp(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Kf(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Kf(e))return;if(e instanceof ks&&_d(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Ej=function(e){return new(function(t){V(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Hu(t,n),Oj(e)},n.prototype.leaveEmphasis=function(t,n){Uu(t,n),Oj(e)},n.prototype.enterBlur=function(t){Wu(t),Oj(e)},n.prototype.leaveBlur=function(t){Gu(t),Oj(e)},n.prototype.enterSelect=function(t){Ku(t),Oj(e)},n.prototype.leaveSelect=function(t){qu(t),Oj(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[$A]},n.prototype.usingTHL=function(){return e._usingTHL},n}(lu))(e)},Dj=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[rj]=t}}W(Fj,function(n,r){e._messageCenter.on(r,function(n){if(Uj[e.group]&&e[rj]!==ij){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];W(Hj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,ij),W(i,function(e){e[rj]!==aj&&e.dispatchAction(r)}),t(i,oj)}})})}}(),t}(Ka),Mj=jj.prototype;Mj.on=sj(`on`),Mj.off=sj(`off`),Mj.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var Nj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],Pj={},Fj={},Ij={},Lj=[],Rj=[],zj=[],Bj={},Vj={},Hj={},Uj={},Wj=new Date-0;new Date-0;var Gj=`_echarts_instance_`;function Kj(e,t,n){var r=!(n&&n.ssr);if(r){var i=qj(e);if(i)return i}var a=new jj(e,t,n);return a.id=`ec_`+Wj++,Hj[a.id]=a,r&&Al(e,Gj,a.id),Dj(a),Ak.trigger(`afterinit`,a),a}function qj(e){return Hj[jl(e,Gj)]}function Jj(e,t){Bj[e]=t}function Yj(e){gt(Rj,e)<0&&Rj.push(e)}function Xj(e,t){aM(Lj,e,t,zA)}function Zj(e){$j(`afterinit`,e)}function Qj(e){$j(`afterupdate`,e)}function $j(e,t){Ak.on(e,t)}function eM(e,t,n){var r,i,a,o,s;Dt(t)&&(n=t,t=``),J(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;Pj[r]||(zt(nj.test(r)&&nj.test(i)),a&&zt(i!==r),Pj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},Ij[i]=1,a&&s&&(Ij[l]=1),Fj[l]=r)}function tM(e,t){tg.register(e,t)}function nM(e,t){aM(zj,e,t,VA,`layout`,!0)}function rM(e,t){aM(zj,e,t,WA,`visual`,!0)}var iM=[];function aM(e,t,n,r,i,a){if((Dt(t)||J(t))&&(n=t,t=r),!(gt(iM,n)>=0)){iM.push(n);var o=rk.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function oM(e,t){Vj[e]=t}function sM(e,t,n){var r=Nk(`registerMap`);r&&r(e,t,n)}var cM=Pv;rM(UA,ZO),rM(KA,$O),rM(KA,ek),rM(UA,Tk),rM(KA,Ek),rM(XA,MA),Yj(VO),Xj(IA,HO),oM(`default`,nk),eM({type:_u,event:_u,update:_u},Qt),eM({type:vu,event:vu,update:vu},Qt),eM({type:yu,event:Su,update:yu,action:Qt,refineEvent:lM,publishNonRefinedEvent:!0}),eM({type:bu,event:Su,update:bu,action:Qt,refineEvent:lM,publishNonRefinedEvent:!0}),eM({type:xu,event:Su,update:xu,action:Qt,refineEvent:lM,publishNonRefinedEvent:!0});function lM(e,t,n,r){return{eventContent:{selected:id(n),isFromClick:t.isFromClick||!1}}}Jj(`default`,{}),Jj(`dark`,xk);var uM=[],dM={registerPreprocessor:Yj,registerProcessor:Xj,registerPostInit:Zj,registerPostUpdate:Qj,registerUpdateLifecycle:$j,registerAction:eM,registerCoordinateSystem:tM,registerLayout:nM,registerVisual:rM,registerTransform:cM,registerLoading:oM,registerMap:sM,registerImpl:Mk,PRIORITY:ZA,ComponentModel:fv,ComponentView:GO,SeriesModel:hy,ChartView:lb,registerComponentModel:function(e){fv.registerClass(e)},registerComponentView:function(e){GO.registerClass(e)},registerSeriesModel:function(e){hy.registerClass(e)},registerChartView:function(e){lb.registerClass(e)},registerCustomSeries:function(e,t){Fk(e,t)},registerSubTypeDefaulter:function(e,t){fv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){qD(e,t)}};function fM(e){if(K(e)){W(e,function(e){fM(e)});return}gt(uM,e)>=0||(uM.push(e),Dt(e)&&(e={install:e}),e.install(dM))}var pM=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return vg(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Q.color.primary}},universalTransition:{divideShape:`clone`}},t}(hy),mM=4,hM=function(){function e(){}return e}(),gM=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new hM},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<mM,c=this.softClipShape,l;if(s){this._ctx=o;return}for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||c&&!c.contain(u,d)||(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||i&&!i.contain(o,s)||r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new hr(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(ks),_M=function(){function e(){this.group=new Bd}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new gM({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=Ay(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<mM;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=Ql(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),vM=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,yM(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Jl(t),yM(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=aS(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(yM(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new _M:new Hy,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(lb);function yM(e){return{clipShape:vb(e)}}var bM=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),xM=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Dl).models[0]},t.type=`cartesian2dAxis`,t}(fv);vt(xM,bM);var SM={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},CM=H({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},SM),wM=H({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},SM),TM={category:CM,value:wM,time:H({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},wM),log:ht({logBase:10},wM)};function EM(e,t,n,r){W(Sx,function(i,a){var o=H(H({},TM[a],!0),r,!0),s=function(e){V(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=sv(this),r=n?lv(e):{};H(e,t.getTheme().get(a+`Axis`)),H(e,this.getDefaultOption()),e.type=DM(e),n&&cv(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Db.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=kC();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,DM)}function DM(e){return e.type||(e.data?`category`:`value`)}var OM=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),xt(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),kM=[`x`,`y`];function AM(e){return(e.type===`interval`||e.type===`time`)&&!n_(e)}var jM=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Uw,t.dimensions=kM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!AM(e)||!AM(t))){var n=Pb(e,null),r=Pb(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=In([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new hr(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Qn(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Qn(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new hr(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(OM);function MM(e,t){var n=e.scale,r=e.model,i=Aw(n,r,r.ecModel,e,null),a=Ub(n),o=Ub(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=pc(l[0].value-l[1].value),g=pc(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=Yb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*fc(c,2):Gb(E),D=Kb(E)}function j(){w=Dc(k-E*f,D)}function M(){T=Dc(O+E*p,D)}function N(){k=f?Dc(w+E*f,D):w}function P(){O=p?Dc(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var F=e.getExtent(),I=pc(F[1]-F[0]);D=jc([T,w],I,.5/m),N(),P(),qc(D)&&(E=Dc(E,D))}else{var L=C[1]-C[0];E=a?fc(zc(L),1):Vc(L/m,2),D=Kb(E),b[0]?(w=C[0],A(function(){if(N(),O=Dc(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=Dc(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Dc(gc(C[0]/E)*E,D),O=Dc(hc(C[1]/E)*E,D);var e=mc((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=hc(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Dc(k-E*n[0],D),O=Dc(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}zx(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function NM(e,t){var n=Ub(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Yb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?FM(r,t):PM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Kb(d)),i[0]||(s[0]=Dc(hc(s[0]/u)*u,l)),i[1]||(s[1]=Dc(gc(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),zx(e,i,o,s,a,c)}function PM(e,t){var n=Zb(t.splitNumber,5),r=Ib(e),i=t.minInterval,a=t.maxInterval,o=Vc(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Kb(o),c=e.getExtent(),l=[Dc(gc(c[0]/o)*o,s),Dc(hc(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function FM(e,t){var n=Zb(t.splitNumber,10),r=e.getExtent(),i=Ib(e),a=fc(zc(i),1);n/i*a<=.5&&(a*=10);var o=Kb(a),s=[Dc(gc(r[0]/a)*a,o),Dc(hc(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function IM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;LM(t,n,r,i,null)}function LM(e,t,n,r,i){var a=Aw(e,t,r,n,i),o=Vb(e)||Hb(e);RM(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Mw(n,e,a,r)}function RM(e,t){zM[e.type](e,t)}var zM={interval:NM,log:NM,time:mx,ordinal:Qt},BM=[[3,1],[0,2]],VM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=kM,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;W(this._axesList,function(e){ww(e,1);var t=e.scale;Wb(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Ct(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):IM(i)}W(n,function(e){KM(e,e.__alignTo)?IM(e):MM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};W(n.x,function(e){UM(n,`y`,e,i)}),W(n.y,function(e){UM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=av(e,t),i=this._rect=rv(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(JM(a,i),!n){var c=QM(i,o,a,s,t),l=void 0;if(s)XM?(XM(this._axesList,i),JM(a,i)):l=ZM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=eN(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=ZM(d,f,p,i,a,c,r))}$M(i,a,fS.determine,null,l,r),W(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Dl).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Dl).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,gt(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,W(o.x,function(t,n){W(o.y,function(i,a){var o=`x`+n+`y`+a,s=new jM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),GM(o.x),GM(o.y);function c(t){return function(n,r){if(HM(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Tx(n),u=new dC(t,Ex(n,l,!0),[0,0],l,c);u.onBand=Vx(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return W(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);gt(t,i)<0&&t.push(i),gt(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),W(o._axesList,function(t){Cw(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;sg({targetModel:e,coordSysType:Uw,coordSysProvider:r});function r(){var r=fw(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&($S(t,e,Uw),$S(n,e,Uw))},this),r},e.dimensions=kM,e.dimIdxMap=Mh(kM),e}();function HM(e,t){return e.getCoordSysModel()===t}function UM(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)WM(s,i[c])&&(a=i[c]);else for(var l in i)if(Z(i,l)&&WM(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function WM(e,t){if(!t)return!1;var n=t.scale,r=Dx(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&kx(t)&&(i=!1),i}function GM(e){for(var t=Ct(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Bb(a.scale)&&Lx(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&W(r,function(e){e.__alignTo=n})}function KM(e,t){return n_(e.scale)||n_(t.scale)||t.scale.getTicks().length<2}function qM(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function JM(e,t){W(e.x,function(e){return YM(e,t.x,t.width)}),W(e.y,function(e){return YM(e,t.y,t.height)})}function YM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),qM(e,t)}var XM;function ZM(e,t,n,r,i,a,o){$M(r,i,fS.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=St(s,function(e){return e>0})==null;return Dp(r,s,!0,!0,n),JM(i,r),c;function l(e){W(i[$f[e]],function(t){if(Ix(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Bx(t.scale,PC(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Fx(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[$f[n]]-t[$f[n]],a=t[ep[n]]+t[$f[n]]-(e[ep[n]]+e[$f[n]]);i=d(i,1-r),a=d(a,r);var o=BM[n][0],c=BM[n][1];s[o]=fc(s[o],i),s[c]=fc(s[c],a)}function d(e,t){return e>0&&!Ft(t)&&t>1e-4&&(e/=t),e}}function QM(e,t,n,r,i){var a=new IC(tN);return W(n,function(n){return W(n,function(n){if(Ix(n.model)){var o=!r;n.axisBuilder=pw(e,t,n.model,i,a,o)}})}),a}function $M(e,t,n,r,i,a){var o=n===fS.determine;W(t,function(t){return W(t,function(t){Ix(t.model)&&(mw(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[$f[1-t]]=e[ep[t]]<=a.refContainer[ep[t]]*.5?0:1-t==1?2:1}W(t,function(e,t){return W(e,function(e){Ix(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function eN(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=rv(e.get(`outerBounds`,!0)||Vw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||gt([`all`,`axisLabel`],a)<0?`all`:a,s=[Tc(X(e.get(`outerBoundsClampWidth`,!0),Hw[0]),t.width),Tc(X(e.get(`outerBoundsClampHeight`,!0),Hw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var tN=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;BC(e,t,n,r,i,a),Fx(e.nameLocation)||W(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&HC(e.labelInfoList,e.dirVec,r,i)})};function nN(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return rN(n,e,t),n.seriesInvolved&&aN(n,e),n}function rN(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];W(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=fN(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(W(n.getAxes(),Et(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&W(f.baseAxes,Et(p,!d||`cross`,u)),d&&W(f.otherAxes,Et(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!dN(d))){s??=d.get(`triggerTooltip`),d=r?iN(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=fN(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:dN(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=oN(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function iN(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};W(s,function(e){c[e]=pt(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&ht(l,u.textStyle)}return e.model.getModel(`axisPointer`,new vm(c,n,r))}function aN(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||W(e.coordSysAxesInfo[fN(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function oN(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(sN(a[r+`AxisId`],n.id)||sN(a[r+`AxisIndex`],n.componentIndex)||sN(a[r+`AxisName`],n.name))return i}}function sN(e,t){return e===`all`||K(e)&>(e,t)>=0||e===t}function cN(e){var t=lN(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=dN(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function lN(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[fN(e)]}function uN(e){var t=lN(e);return t&&t.axisPointerModel}function dN(e){return!!e.get([`handle`,`show`])}function fN(e){return e.type+`||`+e.id}var pN={},mN=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&cN(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=uN(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){pN[e]=t},t.getAxisPointerClass=function(e){return e&&pN[e]},t.type=`axis`,t}(GO),hN=Cl();function gN(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=hN(e).splitAreaColors,f=Jt(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=K(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new Us({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:ht({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}hN(e).splitAreaColors=f}}}function _N(e){hN(e).splitAreaColors=null}var vN=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],yN=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Bd,this.group.add(this._axisGroup),Ix(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),W(vN,function(e){t.get([e,`show`])&&bN[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||yp(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){_N(this)},t.type=`cartesianAxis`,t}(mN),bN={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=K(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new yf({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:ht({stroke:c[x]},_),silent:!0});dp(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new yf({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});dp(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){gN(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=kC(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},xN=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(yN),SN=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=xN.type,t}return t.type=`yAxis`,t}(yN),CN=function(e){V(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Us({shape:e.coordinateSystem.getRect(),style:ht({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(GO),wN={offset:0};function TN(e){e.registerComponentView(CN),e.registerComponentModel(Ww),e.registerCoordinateSystem(`cartesian2d`,VM),EM(e,`x`,xM,wN),EM(e,`y`,xM,wN),e.registerComponentView(xN),e.registerComponentView(SN),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function EN(e){fM(TN),e.registerSeriesModel(pM),e.registerChartView(vM),e.registerLayout(aS(`scatter`))}var DN=Cl();function ON(e,t){return!!DN(e)[t]}eM({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Qt);var kN={axisPointer:1,tooltip:1,brush:1};function AN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||kN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Lp(r),o=Lp(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var jN=function(e){V(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=Tt(n._mousedownHandler,n),i=Tt(n._mousemoveHandler,n),a=Tt(n._mouseupHandler,n),o=Tt(n._mousewheelHandler,n),s=Tt(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Lp(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:X(c.z2,-1/0)},p=U({},n.triggerInfo);this._opt=ht(U({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(FN(t,`mousedown`,r,f),FN(t,`mousemove`,i,f),FN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(FN(t,`mousewheel`,o,f),FN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,IN(t,`mousedown`,r),IN(t,`mousemove`,i),IN(t,`mouseup`,a),IN(t,`mousewheel`,o),IN(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(AN(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(UE(e)||MN(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||ON(t,`globalPan`)||MN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!BN(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&HE(e.event),e.__ecRoamConsumed=!0,zN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!MN(e)){var t=this._zr;if(!UE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!MN(e)){var t=BN(`zoomOnMouseWheel`,e,this._opt),n=BN(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(ON(this._zr,`globalPan`)||MN(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(HE(r.event),r.__ecRoamConsumed=!0,zN(e,t,n,r,i))},t}(Ka);function MN(e){return e.__ecRoamConsumed}var NN=Cl();function PN(e){var t=NN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function FN(e,t,n,r){for(var i=PN(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),LN(e,t)}function IN(e,t,n){for(var r=PN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||RN(e,t);return}}function LN(e,t){var n=PN(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function RN(e,t){var n=PN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function zN(e,t,n,r,i){i.isAvailableBehavior=Tt(BN,null,n,r),e.trigger(t,i)}function BN(e,t,n){var r=n[e];return!e||r&&(!q(r)||t.event[r+`Key`])}function VN(e){return e}var HN=`view`;(function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=HN,i.dimensions=[`x`,`y`];var a=VN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=vi(),o[1]=vi(),o[2]=vi(),a.mtRaw=kn(),a.mtRawInv=kn(),a.mtOverall=kn(),a.mtOverallInv=kn(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return GN(null,this)},t.prototype.getViewRect=function(){return KN(null,this)},t.prototype.getRoamTransform=function(){return _i(VN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?VN(this).mtRaw:VN(this).mtOverall;return n||=[],r?Qn(n,e,r):Rn(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=VN(this).mtOverallInv;return r?Qn(n,e,r):Rn(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=qN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=qN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=VN(this);return vr(UN,t.dataRect),br(UN,UN,t.mtOverall),xr(UN,e[0],e[1])},t.dimensions=[`x`,`y`],t})(gi);var UN=gr();function WN(e){return VN(e).zoom}function GN(e,t){return vr(e||gr(),VN(t).dataRect)}function KN(e,t){return vr(e||gr(),VN(t).viewRect)}gr();function qN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}vi(),vi();function JN(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}var YN=Cl();function XN(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,rP(t,n,e),W(n,function(n){W(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Et(ZN,e))})}),t.wrapMethod(`cloneShallow`,Et($N,e)),W(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Et(QN,e))}),zt(n[t.dataType]===t)}function ZN(e,t){if(nP(this)){var n=U({},YN(this).datas);n[this.dataType]=t,rP(t,n,e)}else iP(t,this.dataType,YN(this).mainData,e);return t}function QN(e,t){return e.struct&&e.struct.update(),t}function $N(e,t){return W(YN(t).datas,function(n,r){n!==t&&iP(n.cloneShallow(),r,t,e)}),t}function eP(e){var t=YN(this).mainData;return e==null||t==null?t:YN(t).datas[e]}function tP(){var e=YN(this).mainData;return e==null?[{data:e}]:G(Ct(YN(e).datas),function(t){return{type:t,data:YN(e).datas[t]}})}function nP(e){return YN(e).mainData===e}function rP(e,t,n){YN(e).datas={},W(t,function(t,r){iP(t,r,e,n)})}function iP(e,t,n,r){YN(n).datas[t]=e,YN(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=eP,e.getLinkedDataAll=tP}var aP=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){Dt(e)&&(n=t,t=e,e=null),e||={},q(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),oP=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,K(n)?n.length:1),a.push(e);var r=new aP(_l(e.name,``),i);t?sP(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=Xh(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Yh(c,n);return l.initData(a),r&&r(l),XN({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function sP(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function cP(e,t,n){if(e&>(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(q(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function lP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function uP(e,t){return gt(lP(e),t)>=0}function dP(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var fP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function pP(e){for(var t=0;t<fP.length;t++)e.registerAction({type:fP[t],update:`updateView`},Qt);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=cP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=uP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function mP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=_v(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var hP=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};gP(n);var r=e.levels||[],i=new vm({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=_P(r,t);var a=G(r||[],function(e){return new vm(e,i,t)},this),o=oP.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Yv(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=dP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Jt(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){mP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Q.size.l,top:Q.size.xxxl,right:Q.size.l,bottom:Q.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Q.size.m,emptyItemWidth:25,itemStyle:{color:Q.color.backgroundShade,textStyle:{color:Q.color.secondary}},emphasis:{itemStyle:{color:Q.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Q.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(hy);function gP(e){var t=0;W(e.children,function(e){gP(e);var n=e.value;K(n)&&(n=n[0]),t+=n});var n=e.value;K(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),K(e.value)?e.value[0]=n:e.value=n}function _P(e,t){var n=rl(t.get(`color`)),r=rl(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;W(e,function(e){var t=new vm(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var vP=8,yP=8,bP=5,xP=function(){function e(e){this.group=new Bd,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=av(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=rv(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),ov(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=_l(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+vP*2,t.emptyItemWidth);t.totalWidth+=o+yP,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new mf({shape:{points:SP(c,0,_,u,m===f.length-1,m===0)},style:ht(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Js({style:Xp(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:Et(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Xp(o,{text:v}),y.ensureState(`emphasis`).style=p,sd(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),CP(y,e,g),c+=_+yP}},e.prototype.remove=function(){this.group.removeAll()},e}();function SP(e,t,n,r,i,a){var o=[[i?e:e-bP,t],[e+n,t],[e+n,t+r],[i?e:e-bP,t+r]];return!a&&o.splice(2,0,[e+n+bP,t+r/2]),!i&&o.push([e,t+r/2]),o}function CP(e,t,n){Ql(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&dP(n,t)}}var wP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function TP(){return new wP}var EP=Math.max,DP=Math.min,OP=W,kP=[`itemStyle`,`borderWidth`],AP=[`itemStyle`,`gapWidth`],jP=[`upperLabel`,`show`],MP=[`upperLabel`,`height`],NP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=av(e,n).refContainer,o=rv(e.getBoxLayoutParams(),a),s=r&&r.type,c=cP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=lP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,VP(e,c,u,o)):l?(f=!0,U({},l)):U({},o);if(f){var m=GP(o,p);m=KP(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),PP(u,g,!1,0),_=u.getLayout(),OP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(U({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(HP(o,l,c),!0),e.setLayoutInfo(o),UP(v,new hr(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function PP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(kP),l=s.get(AP)/2,u=WP(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=EP(i-2*f,0),a=EP(a-f-p,0);var m=i*a,h=FP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=DP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=zP(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,BP(y,_,g,l,!1),_=DP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&BP(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)PP(h[b],t,n,r+1)}}}function FP(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=xt(o,function(e){return!e.isRemoved()}),LP(o,s);var l=RP(t,o,s);if(l.sum===0||(l.sum=IP(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function IP(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function LP(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function RP(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=Pl(),OP(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function zP(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?EP(l*r/c,c/(l*i)):1/0}function BP(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=EP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=EP(v-2*r,0);m[s[o]]=n[s[o]]+DP(r,g/2),m[s[a]]=l+DP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function VP(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=U({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(kP),v=Math.max(_,WP(g));u+=4*_*_+(3*_+v)*u**.5,u>Pc&&(u=Pc),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function HP(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function UP(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new hr(t.x-a.x,t.y-a.y,t.width,t.height);OP(e.viewChildren||[],function(e){UP(e,c,n,r,i+1)})}}function WP(e){return e.get(jP)?e.get(MP):0}function GP(e,t){return t.width/e.width||t.height/e.height||1}function KP(e,t){return JN(e,t.get(`scaleLimit`,!0))}var qP=Bd,JP=Us,YP=3,XP=`label`,ZP=`upperLabel`,QP=100,$P=20,eF=30,tF=vn([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),nF=function(e){var t=tF(e);return t.stroke=t.fill=t.lineWidth=null,t},rF=Cl(),iF=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=aF(),n}return t.prototype.render=function(e,t,n,r){if(!(gt(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=cP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new qP,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=aF(),o=aF(),s=this._storage,c=[];function l(e,r,i,l){return oF(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,W(e,function(e,t){!e.isRemoved()&&o(t,t)})):new xm(t,e,a,a).add(o).update(o).remove(Et(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=aF();return e&&W(e,function(e,n){var r=t[n];W(e,function(e){e&&(r.push(e),rF(e).willDelete=!0)})}),t}function p(){W(u,function(e){W(e,function(e){e.parent&&e.parent.remove(e)})}),W(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(Dt(i)?0:i)||0,s=(Dt(a)?null:a)||`cubicOut`,c=TP();W(t.willDeleteEls,function(e,t){W(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=rF(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),W(this._storage,function(e,n){W(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof Bd?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=U({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(Tt(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new jN(e.getZr()),r.on(`pan`,Tt(this._onPan,this)),r.on(`zoom`,Tt(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>YP||Math.abs(e.dy)>YP)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new hr(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=GP(c,o),u=l*r;u=KP(u,i);var d=u/l;t-=c.x,n-=c.y;var f=kn();Nn(f,f,[-t,-n]),Fn(f,f,[d,d]),Nn(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&J_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new xP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(uP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=aF(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(lb);function aF(){return{nodeGroup:[],background:[],content:[]}}function oF(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=ne(`nodeGroup`,qP);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),rF(D).nodeWidth=p,rF(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=ne(`background`,JP,l,$P);O&&I(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),M=k.get(`disabled`),N=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)pd(D)&&fd(D,!1),O&&(fd(O,!M),d.setItemGraphicEl(o.dataIndex,O),cd(O,N,j));else{var P=ne(`content`,JP,l,eF);P&&L(D,P),O.disableMorphing=!0,O&&pd(O)&&fd(O,!1),fd(D,!M),d.setItemGraphicEl(o.dataIndex,D);var F=f.getShallow(`cursor`);F&&P.attr(`cursor`,F),cd(D,N,j)}return D;function I(t,n,r){var i=Ql(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)ee(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=nF(S);c.fill=s;var l=tF(C);l.fill=C.get(`borderColor`);var u=tF(w);u.fill=w.get(`borderColor`);var d=tF(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;R(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,zu(n)}t.add(n)}function L(t,n){var r=Ql(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)ee(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=nF(S);l.fill=c,l.decal=s.decal;var u=tF(C),d=tF(w),f=tF(T);R(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,zu(n)}t.add(n)}function ee(e){!e.invisible&&a.push(e)}function R(t,n,r,i){var a=f.getModel(i?ZP:XP),s=_l(f.get(`name`),null),c=a.getShallow(`show`);Jp(t,Yp(f,i?ZP:XP),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Rt(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,te(d,i,u);var m=l.getState(`emphasis`);te(m?m.style:null,i,u)}}function te(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function ne(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,re(c,s)):g||(s=new r,s instanceof So&&(s.z2=sF(a,o)),ie(c,s)),t[e][_]=s}function re(e,t){var n=e[_]={};t instanceof qP?(n.oldX=t.x,n.oldY=t.y):n.oldShape=U({},t.shape)}function ie(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Bd;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function sF(e,t){return e*QP+t}var cF=W,lF=J,uF=-1,dF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=pt(t);this.type=r,this.mappingMethod=n,this._normalizeData=CF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(mF(i),fF(i)):n===`category`?i.categories?pF(i):mF(i,!0):(zt(n!==`linear`||i.dataExtent),mF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Tt(this._normalizeData,this)},e.listVisualTypes=function(){return Ct(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?W(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=K(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&cF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(K(e))e=e.slice();else if(lF(e)){var t=[];cF(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||q(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(wF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(wF(u[0],l[0],e))return a}else if(wF(u[0],l[0],e)&&wF(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:_F(`color`),getColorMapper:function(){var e=this.option;return Tt(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),vF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=pa(t,e.parsedVisual,r),i?r:_a(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return _a(pa(e,this.option.parsedVisual),`rgba`)},category:vF,piecewise:function(e,t){var n=xF.call(this,t);return n??=_a(pa(e,this.option.parsedVisual),`rgba`),n},fixed:yF}},colorHue:hF(function(e,t){return ha(e,t)}),colorSaturation:hF(function(e,t){return ha(e,null,t)}),colorLightness:hF(function(e,t){return ha(e,null,null,t)}),colorAlpha:hF(function(e,t){return ga(e,t)}),decal:{applyVisual:_F(`decal`),_normalizedToVisual:{linear:null,category:vF,piecewise:null,fixed:null}},opacity:{applyVisual:_F(`opacity`),_normalizedToVisual:bF([0,1])},liftZ:{applyVisual:_F(`liftZ`),_normalizedToVisual:{linear:yF,category:yF,piecewise:yF,fixed:yF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:gF,category:vF,piecewise:function(e,t){var n=xF.call(this,t);return n??=gF.call(this,e),n},fixed:yF}},symbolSize:{applyVisual:_F(`symbolSize`),_normalizedToVisual:bF([0,1])}},e}();function fF(e){var t=e.pieceList;e.hasSpecialVisual=!1,W(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function pF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(cF(t,function(e,t){n[e]=t}),!K(r)){var i=[];J(r)?cF(r,function(e,t){var r=n[t];i[r??uF]=e}):i[uF]=r,r=SF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function mF(e,t){var n=e.visual,r=[];J(n)?cF(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),SF(e,r)}function hF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:bF([0,1])}}function gF(e){var t=this.option.visual;return t[Math.round(Sc(e,[0,1],[0,t.length-1],!0))]||{}}function _F(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function vF(e){var t=this.option.visual;return t[this.option.loop&&e!==uF?e%t.length:e]}function yF(){return this.option.visual[0]}function bF(e){return{linear:function(t){return Sc(t,e,this.option.visual,!0)},category:vF,piecewise:function(t,n){var r=xF.call(this,n);return r??=Sc(t,e,this.option.visual,!0),r},fixed:yF}}function xF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[dF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function SF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=G(t,function(e){return la(e)||[0,0,0,1]})),t}var CF={linear:function(e){return Sc(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=dF.findPieceIndex(e,t,!0);if(n!=null)return Sc(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??uF},fixed:Qt};function wF(e,t,n){return e?t<=n:t<n}var TF=`itemStyle`,EF=Cl(),DF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||OF(t,{},e.getViewRoot().getAncestors(),e)}};function OF(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(TF),c=kF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=AF(c),u=jF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=AF(c),l.fill=f;else{var m=NF(e,i,a,s,c,p);W(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&OF(e,FF(i,c,e,t,m,r),n,r)})}}}function kF(e,t,n){var r=U({},t),i=n.designatedVisualItemStyle;return W([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function AF(e){var t=MF(e,`color`);if(t){var n=MF(e,`colorAlpha`),r=MF(e,`colorSaturation`);return r&&(t=ha(t,null,null,r)),n&&(t=ga(t,n)),t}}function jF(e,t){return t==null?null:ha(t,null,null,e)}function MF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function NF(e,t,n,r,i,a){if(!(!a||!a.length)){var o=PF(t,`color`)||i.color!=null&&i.color!==`none`&&(PF(t,`colorAlpha`)||PF(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new dF(d);return EF(f).drColorMappingBy=u,f}}}function PF(e,t){var n=e.get(t);return K(n)&&n.length?{name:t,range:n}:null}function FF(e,t,n,r,i,a){var o=U({},t);if(i){var s=i.type,c=s===`color`&&EF(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function IF(e){e.registerSeriesModel(hP),e.registerChartView(iF),e.registerVisual(DF),e.registerLayout(NP),pP(e)}var LF=yf.prototype,RF=Cf.prototype,zF=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(zF);function BF(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var VF=function(e){V(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new zF},t.prototype.buildPath=function(e,t){BF(t)?LF.buildPath.call(this,e,t):RF.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return BF(this.shape)?LF.pointAt.call(this,e):RF.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=BF(t)?[t.x2-t.x1,t.y2-t.y1]:RF.tangentAt.call(this,e);return Kn(n,n)},t}(ks),HF=[`fromSymbol`,`toSymbol`];function UF(e){return`_`+e+`Type`}function WF(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=jy(i),l=My(o||0,c);return r+c+l+(a||``)+(s||``)}function GF(e,t,n){var r=t.getItemVisual(n,e);if(!(!r||r===`none`)){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=jy(i),l=My(o||0,c),u=Ay(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,u.name=e,u}}function KF(e){var t=new VF({name:`line`,subPixelOptimize:!0});return qF(t.shape,e),t}function qF(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var JF=function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=KF(i);o.shape.percent=0,Gf(o,{z2:X(a,0),shape:{percent:1}},r,t),this.add(o),W(HF,function(n){var r=GF(n,e,t);this.add(r),this[UF(n)]=WF(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};qF(o.shape,a),Wf(i,o,r,t),W(HF,function(n){var r=WF(n,e,t),i=UF(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=GF(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Yp(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,W(HF,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<hu.length;n++){var r=hu[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);Jp(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Q.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?Dc(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);K(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),sd(this,u,d,l)},t.prototype.highlight=function(){Hu(this)},t.prototype.downplay=function(){Uu(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);qF(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=Hn([],l,c);Kn(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Bd),YF=function(){function e(e){this.group=new Bd,this._LineCtor=e||JF}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=ZF(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=ZF(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!XF(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if($F(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){Mp(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if($F(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!$F(t.getItemLayout(r))){this.group.remove(a);return}a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)},e}();function XF(e){return e.animators&&e.animators.length>0}function ZF(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Yp(t)}}function QF(e){return isNaN(e[0])||isNaN(e[1])}function $F(e){return e&&!QF(e[0])&&!QF(e[1])}var eI={color:`fill`,borderColor:`stroke`},tI={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},nI=Cl(),rI=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get(`zlevel`,!0),this.currentZ=this.get(`z`,!0)},t.prototype.getInitialData=function(e,t){return vg(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=nI(r).info),i},t.type=`series.custom`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,clip:!1},t}(hy);function iI(e,t){return t||=[0,0],G([`x`,`y`],function(n,r){var i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?iC(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function aI(e){var t=e.master.getRect();return{coordSys:{type:`cartesian2d`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Tt(iI,e)}}}function oI(e,t){return t||=[0,0],G([0,1],function(n){var r=t[n],i=e[n]/2,a=[],o=[];return a[n]=r-i,o[n]=r+i,a[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(o)[n])},this)}function sI(e){var t=e.view,n=t.getBoundingRect();return{coordSys:{type:`geo`,x:n.x,y:n.y,width:n.width,height:n.height,zoom:WN(t)},api:{coord:function(t){return e.dataToPoint(t)},size:Tt(oI,e)}}}function cI(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return n.type===`category`?iC(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function lI(e){var t=e.getRect();return{coordSys:{type:`singleAxis`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Tt(cI,e)}}}function uI(e,t){return t||=[0,0],G([`Radius`,`Angle`],function(n,r){var i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?iC(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function dI(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:Tt(uI,e)}}}function fI(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function pI(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var mI={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},hI=Ct(mI);bt(yi,function(e,t){return e[t]=1,e},{}),yi.join(`, `);var gI=[``,`style`,`shape`,`extra`],_I=Cl();function vI(e,t,n,r,i){var a=e+`Animation`,o=Hf(e,r,i)||{},s=_I(t).userDuring;return o.duration>0&&(o.during=s?Tt(OI,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),U(o,n[a]),o}function yI(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=_I(e),l=t.style;c.userDuring=t.during;var u={},d={};if(MI(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];AI(`shape`,h,f[m])}else AI(`shape`,t,d),AI(`extra`,t,d);if(!a&&s&&(jI(e,t,u),kI(`shape`,e,t,u),kI(`extra`,e,t,u),NI(e,t,l,u)),d.style=l,CI(e,d,o),TI(e,t),s){if(a){var g={};W(gI,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),U(e?g[e]:g,n.enterFrom))});var _=vI(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else wI(e,t,i||0,n,u)}bI(e,t),l?e.dirty():e.markRedraw()}function bI(e,t){for(var n=_I(e).leaveToProps,r=0;r<gI.length;r++){var i=gI[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=_I(e).leaveToProps={},i&&(n[i]=n[i]||{}),U(i?n[i]:n,a.leaveTo))}}function xI(e,t,n,r){if(e){var i=e.parent,a=_I(e).leaveToProps;if(a){var o=vI(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function SI(e){return e===`all`}function CI(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function wI(e,t,n,r,i){if(i){var a=vI(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function TI(e,t){Z(t,`silent`)&&(e.silent=t.silent),Z(t,`ignore`)&&(e.ignore=t.ignore),e instanceof So&&Z(t,`invisible`)&&(e.invisible=t.invisible),e instanceof ks&&Z(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var EI={},DI={setTransform:function(e,t){return EI.el[e]=t,this},getTransform:function(e){return EI.el[e]},setShape:function(e,t){var n=EI.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=EI.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=EI.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=EI.el.style;if(t)return t[e]},setExtra:function(e,t){var n=EI.el.extra||(EI.el.extra={});return n[e]=t,this},getExtra:function(e){var t=EI.el.extra;if(t)return t[e]}};function OI(){var e=this,t=e.el;if(t){var n=_I(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}EI.el=t,r(DI)}}function kI(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c){if(!o&&(o=r[e]={}),SI(c))U(o,a);else for(var l=rl(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(SI(s)||gt(s,e)>=0){!o&&(o=r[e]={});for(var p=Ct(a),u=0;u<p.length;u++){var d=p[u],f=a[d];PI(i[d],f)&&(o[d]=f)}}}}}function AI(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=Ct(r),o=0;o<a.length;o++){var s=a[o];i[s]=ja(r[s])}}function jI(e,t,n){for(var r=t.transition,i=SI(r)?yi:rl(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function MI(e,t,n){for(var r=0;r<hI.length;r++){var i=hI[r],a=mI[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<yi.length;r++){var s=yi[r];t[s]!=null&&(n[s]=t[s])}}function NI(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!SI(o)){var c=rl(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(SI(s)||SI(o)||gt(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Ct(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function PI(e,t){return yt(e)?e!==t:e!=null&&isFinite(e)}var FI=Cl(),II=[`percent`,`easing`,`shape`,`style`,`extra`];function LI(e){e.stopAnimation(`keyframe`),e.attr(FI(e))}function RI(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(K(t)){W(t,function(t){RI(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Hf(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=FI(e);W(gI,function(n){if(!(n&&!e[n])){var a;r.sort(function(e,t){return e.percent-t.percent}),W(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=Ct(c);if(n||(l=xt(l,function(e){return gt(II,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;W(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}var zI=`emphasis`,BI=`normal`,VI=`blur`,HI=`select`,UI=[BI,zI,VI,HI],WI={normal:[`itemStyle`],emphasis:[zI,`itemStyle`],blur:[VI,`itemStyle`],select:[HI,`itemStyle`]},GI={normal:[`label`],emphasis:[zI,`label`],blur:[VI,`label`],select:[HI,`label`]},KI=[`x`,`y`],qI=`e\0\0`,JI={normal:{},emphasis:{},blur:{},select:{}},YI={cartesian2d:aI,geo:sI,single:lI,polar:dI,calendar:fI,matrix:pI};function XI(e){return e instanceof ks}function ZI(e){return e instanceof So}function QI(e,t){t.copyTransform(e),ZI(t)&&ZI(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,XI(t)&&XI(e)&&t.setShape(e.shape))}var $I=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,a=e.getData(),o=this.group,s=aL(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){sL(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&xI(n,nI(n).option,e)}).update(function(t,c){sL(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?_b(e.coordinateSystem,!1,e):null;c?o.setClipPath(c):o.removeClipPath(),this._data=a},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var a=t.getData(),o=aL(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=Jl(t),e.ensureState(`emphasis`).hoverLayer=2)}for(var l=e.start;l<e.end;l++){var u=sL(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){Mp(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(i==null||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type=`custom`,t}(lb);function eL(e){var t=e.type,n;if(t===`path`){var r=e.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,a=xL(r);n=op(a,null,i,r.layout||`center`),nI(n).customPathData=a}else if(t===`image`)n=new Fs({}),nI(n).customImagePath=e.style.image;else if(t===`text`)n=new Js({});else if(t===`group`)n=new Bd;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;$c(o)}n=new Ef({shape:{paths:G(r.paths,function(e){if(e.type===`path`)return op(e.shape.pathData,e,null);var t=ap(e.type);return t||$c(``),new t})}})}else{var s=ap(t);if(!s){var o=``;$c(o)}n=new s}return nI(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function tL(e,t,n,r,i,a,o){LI(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=KI);var c=r&&r.style;if(c){if(t.type===`text`){var l=c;Z(l,`textFill`)&&(l.fill=l.textFill),Z(l,`textStroke`)&&(l.stroke=l.textStroke)}var u=void 0,d=XI(t)?c.decal:null;e&&d&&(d.dirty=!0,u=EA(d,e)),c.__decalPattern=u}if(ZI(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}yI(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),RI(t,r.keyframeAnimation,a)}function nL(e,t,n,r,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(r===!1){var c=a.getState(e);c&&(c.style=null)}else s.style=r||null;o&&(s.textConfig=o),zu(a)}}function rL(e,t,n){if(!e.isGroup){var r=e,i=n.currentZ,a=n.currentZLevel;r.z=i,r.zlevel=a;var o=t.z2;o!=null&&(r.z2=o||0);for(var s=0;s<UI.length;s++)iL(r,t,UI[s])}}function iL(e,t,n){var r=n===BI,i=r?t:pL(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function aL(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=Ik(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):YI[o.type](o));for(var c=ht({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:C,ordinalRawValue:S,styleEmphasis:w,visual:D,barLayout:O,currentSeriesIndices:k,font:A},s.api||{}),l={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:oL(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<UI.length;g++){var _=UI[g];m[_]=e.getModel(WI[_]),h[_]=e.getModel(GI[_])}function v(e){return e===u?d||=t.getItemModel(e):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===u?f[n]||(f[n]=v(e).getModel(WI[n])):v(e).getModel(WI[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(GI[n])):v(e).getModel(GI[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(ht({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},l),c)};function x(e,n){return n??=u,t.getStore().get(t.getDimensionIndex(e||0),n)}function S(e,n){n??=u,e||=0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,BI).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:q(a)?a:Q.color.neutral99},l=b(r,BI),d=Xp(l,null,c,!1,!0);d.text=l.getShallow(`show`)?X(e.getFormattedLabel(r,BI),Py(t,r)):null;var f=Zp(l,c,!1);return E(n,s),s=Cb(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,zI).getItemStyle(),a=b(r,zI),o=Xp(a,null,null,!0,!0);o.text=a.getShallow(`show`)?It(e.getFormattedLabel(r,zI),e.getFormattedLabel(r,BI),Py(t,r)):null;var s=Zp(a,null,!0);return E(n,i),i=Cb(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)Z(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,Z(eI,e)){var r=t.getItemVisual(n,`style`);return r?r[eI[e]]:null}if(Z(tI,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return Jw(ht({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return im(e,n)}}function oL(e){var t={};return W(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function sL(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=cL(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&sd(s,r.focus,r.blurScope,r.emphasisDisabled),s}function cL(e,t,n,r,i,a){var o=-1,s=t;t&&lL(t,r,i)&&(o=gt(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=eL(r),s&&QI(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&(l.disableMorphing=!1),r.tooltipDisabled&&(l.tooltipDisabled=!0),JI.normal.cfg=JI.normal.conOpt=JI.emphasis.cfg=JI.emphasis.conOpt=JI.blur.cfg=JI.blur.conOpt=JI.select.cfg=JI.select.conOpt=null,JI.isLegacy=!1,dL(l,n,r,i,c,JI),uL(l,n,r,i,c),tL(e,l,n,r,JI,i,c),Z(r,`info`)&&(nI(l).info=r.info);for(var u=0;u<UI.length;u++){var d=UI[u];if(d!==BI){var f=pL(r,d),p=mL(r,f,d);nL(d,l,f,p,JI)}}return rL(l,r,i),r.type===`group`&&hL(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function lL(e,t,n){var r=nI(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&SL(a)&&xL(a)!==r.customPathData||i===`image`&&Z(o,`image`)&&o.image!==r.customImagePath}function uL(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&lL(o,a,r)&&(o=null),o||(o=eL(a),e.setClipPath(o)),tL(null,o,t,a,null,r,i)}}function dL(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){fL(n,null,a),fL(n,zI,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=eL(o),e.setTextContent(u)),tL(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<UI.length;f++){var p=UI[f];if(p!==BI){var m=a[p].conOpt;nL(p,u,m,mL(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function fL(e,t,n){var r=t?pL(e,t):e,i=t?mL(e,r,zI):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?pL(s,t):s:null;if(i&&(n.isLegacy||bb(i,a,!!o,!!c))){n.isLegacy=!0;var l=xb(i,a,!t);!o&&l.textConfig&&(o=l.textConfig),!c&&l.textContent&&(c=l.textContent)}if(!t&&c){var u=c;!u.type&&(u.type=`text`)}var d=t?n[t]:n.normal;d.cfg=o,d.conOpt=c}function pL(e,t){return t?e?e[t]:null:e}function mL(e,t,n){var r=t&&t.style;return r==null&&n===zI&&e&&(r=e.styleEmphasis),r}function hL(e,t,n,r,i){var a=r.children,o=a?a.length:0,s=r.$mergeChildren,c=s===`byName`||r.diffChildrenByName,l=s===!1;if(!(!o&&!c&&!l)){if(c){_L({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:n,seriesModel:i,group:t});return}l&&t.removeAll();for(var u=0;u<o;u++){var d=a[u],f=t.childAt(u);d?(d.ignore??=!1,cL(e,f,n,d,i,t)):f.ignore=!0}for(var p=t.childCount()-1;p>=u;p--)gL(t,t.childAt(p),i)}}function gL(e,t,n){t&&xI(t,nI(e).option,n)}function _L(e){new xm(e.oldChildren,e.newChildren,vL,vL,e).add(yL).update(yL).remove(bL).execute()}function vL(e,t){return(e&&e.name)??qI+t}function yL(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];cL(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function bL(e){var t=this.context,n=t.oldChildren[e];n&&xI(n,nI(n).option,t.seriesModel)}function xL(e){return e&&(e.pathData||e.d)}function SL(e){return e&&(Z(e,`pathData`)||Z(e,`d`))}function CL(e){e.registerChartView($I),e.registerSeriesModel(rI)}var wL=Cl(),TL=pt,EL=Tt,DL=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Bd,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Et(OL,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}ML(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&iC(r).w>o)return!0;if(a){var s=lN(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=wL(e).pointerEl=new Zf[i.type](TL(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=wL(e).labelEl=new Js(TL(t.label));e.add(i),AL(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=wL(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=wL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),AL(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=Sp(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){HE(e.event)},onmousedown:EL(this._onHandleDragMove,this,0,0),drift:EL(this._onHandleDragMove,this),ondragend:EL(this._onHandleDragEnd,this)}),n.add(r)),ML(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);K(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,lT(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){OL(this._axisPointerModel,!t&&this._moveAnimation,this._handle,jL(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(jL(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(jL(r)),wL(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),uT(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function OL(e,t,n,r){kL(wL(n).lastProp,r)||(wL(n).lastProp=r,t?Wf(n,r,e):(n.stopAnimation(),n.attr(r)))}function kL(e,t){if(J(e)&&J(t)){var n=!0;return W(t,function(t,r){n&&=kL(e[r],t)}),!!n}return e===t}function AL(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function jL(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function ML(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function NL(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function PL(e,t,n,r,i){var a=IL(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=V_(o.get(`padding`)||0),c=o.getFont(),l=Fr(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),FL(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Xp(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function FL(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function IL(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:jx(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};W(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):Dt(o)&&(a=o(s))}return a}function LL(e,t,n){var r=kn();return Pn(r,r,n.rotation),Nn(r,r,n.position),hp([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function RL(e,t,n,r,i,a){var o=UC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),PL(t,r,i,a,{position:LL(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function zL(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function BL(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function VL(e,t,n){return iC(e,{fromStat:{sers:G(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function HL(e,t,n){return[fc(dc(t[0],t[1]),e-n/2),dc(e+n/2,fc(t[0],t[1]))]}var UL=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=WL(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=NL(r),f=GL[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}RL(t,e,uw(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=uw(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=LL(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=WL(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=dc(o[1],l[c]),l[c]=fc(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(DL);function WL(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var GL={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:zL([t,r[0]],[t,r[1]],KL(e))}},shadow:function(e,t,n,r,i,a){var o=VL(e,i,a),s=r[1]-r[0],c=HL(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:BL([l,r[0]],[u-l,s],KL(e))}}};function KL(e){return e.dim===`x`?0:1}var qL=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(fv),JL=Cl(),YL=W;function XL(e,t,n){if(!tn.node){var r=t.getZr();JL(r).records||(JL(r).records={}),ZL(r,t);var i=JL(r).records[e]||(JL(r).records[e]={});i.handler=n}}function ZL(e,t){if(JL(e).initialized)return;JL(e).initialized=!0,n(`click`,Et(eR,`click`)),n(`mousemove`,Et(eR,`mousemove`)),n(`mousewheel`,Et(eR,`mousewheel`)),n(`globalout`,$L);function n(n,r){e.on(n,function(n){var i=tR(t);YL(JL(e).records,function(e){e&&r(e,n,i.dispatchAction)}),QL(i.pendings,t)})}}function QL(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function $L(e,t,n){e.handler(`leave`,null,n)}function eR(e,t,n,r){t.handler(e,n,r)}function tR(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function nR(e,t){if(!tn.node){var n=t.getZr();(JL(n).records||{})[e]&&(JL(n).records[e]=null)}}var rR=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;XL(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){nR(`axisPointer`,t)},t.prototype.dispose=function(e,t){nR(`axisPointer`,t)},t.type=`axisPointer`,t}(GO);function iR(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Sl(a,e);if(o==null||o<0||K(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(G(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var aR=Cl();function oR(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Tt(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){gR(i)&&(i=iR({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=gR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||gR(i),f={},p={},m={list:[],map:{}},h={showPointer:Et(lR,p),showTooltip:Et(uR,m)};W(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);W(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=mR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&sR(e,o,h,!1,f)}})});var g={};return W(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&W(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,hR(t),hR(e)))),g[e.key]=a}})}),W(g,function(e,t){sR(u[t],e,h,!0,f)}),dR(p,u,f),fR(m,i,e,o),pR(u,o,n),f}}function sR(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=cR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&U(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function cR(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return W(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(qc(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),W(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function lR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function uR(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=fN(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function dR(e,t,n){var r=n.axesInfo=[];W(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function fR(e,t,n,r){if(gR(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function pR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=aR(r)[i]||{},o=aR(r)[i]={};W(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&W(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}W(a,function(e,t){!o[t]&&c.push(l(e))}),W(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function mR(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function hR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function gR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function _R(e){mN.registerAxisPointerClass(`CartesianAxisPointer`,UL),e.registerComponentModel(qL),e.registerComponentView(rR),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!K(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=nN(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},oR)}function vR(e){fM(TN),fM(_R)}function yR(e,t){var n=V_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Us({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var bR=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(fv);function xR(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function SR(e){if(tn.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var CR=SR([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),wR=SR([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function TR(e,t){if(!e)return t;t=B_(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function ER(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var DR=TR(wR,`transition`),OR=TR(CR,`transform`),kR=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(tn.transform3dSupported?`will-change:transform;`:``);function AR(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function jR(e,t,n){if(!q(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=q_(t);var a=AR(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=OR+`:`,l;gt([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function MR(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(tn.transformSupported?``+OR+i:`,left`+i+`,top`+i)),DR+`:`+a}function NR(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!tn.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=tn.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+OR+`:`+o+`;`:[[`top`,0],[`left`,0],[CR,o]]}function PR(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=X(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),W([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function FR(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=ly(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(MR(a,n,r)),o&&i.push(`background-color:`+o),W([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=B_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(PR(d)),f!=null&&i.push(`padding:`+V_(f).join(`px `)+`px`),i.join(`;`)+`;`}function IR(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&jg(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var LR=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,tn.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):Mt(i)?i:Dt(i)&&i(e.getDom()));IR(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;RE(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=ER(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=kR+FR(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+NR(i[0],i[1],!0)+(`border-color:`+q_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!xR(n)&&(o=jR(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,K(e)||(e=[e]);for(var s=0;s<e.length;s++)Mt(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(IR(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;W(NR(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,tn.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Tt(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Mg(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),RR=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),VR(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;J(e)&&$c(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Js({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:ly(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),W([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),W([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=BR(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;VR(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=zR(i.borderWidth||0),o=BR(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Tt(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function zR(e){return Math.max(0,e)}function BR(e){var t=zR(e.shadowBlur||0),n=zR(e.shadowOffsetX||0),r=zR(e.shadowOffsetY||0);return{left:zR(t-n),right:zR(t+n),top:zR(t-r),bottom:zR(t+r)}}function VR(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var HR=new Us({shape:{x:-1,y:-1,width:2,height:2}}),UR=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(tn.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=Ml(n.get(`renderMode`));this._tooltipContent=r===`richText`?new RR(t):new LR(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(tn.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?lT(this,`_updatePosition`,50,`fixRate`):uT(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);XL(`itemTooltip`,this._api,Tt(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||tn.node||!n.getDom())){var i=GR(r,n);this._ticket=``;var a=r.dataByCoordSys,o=XR(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=HR;c.x=r.x,c.y=r.y,c.update(),Ql(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=iR(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(GR(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&WR([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Ql(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;kk(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Ql(e).dataIndex==null?Ql(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=Tt(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=WR([t.tooltipOption],r),o=this._renderMode,s=[],c=Yv(`section`,{blocks:[],noHeader:!0}),l=[],u=new uy;W(e,function(e){W(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=IL(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Yv(`section`,{header:f,noHeader:!Bt(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),W(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=jx(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,q_(m.color),o);var h=Cv(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=WR([a],r).get(`valueFormatter`);p.blocks.push(_?U({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ty(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
15
|
-
|
|
16
|
-
`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Ql(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=WR([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new uy;h.marker=g.makeTooltipMarker(`item`,q_(h.color),d);var _=Cv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ty(y?U({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Ql(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=pt(a),a.content=zg(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=WR(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new uy;this._showOrMove(d,function(){var n=pt(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=K(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=x_(m.axisValue,d,p)),d=G_(d,n,!0)}else if(Dt(u)){var g=Tt(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||K(t))return{color:r||i};if(!K(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),Dt(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),K(t))n=Cc(t[0],s),r=Cc(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=rv(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=JR(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=KR(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=YR(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=YR(d)?l[1]/2:d===`bottom`?l[1]:0),xR(e)){var h=qR(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&W(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&W(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&W(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&W(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){tn.node||!t.getDom()||(uT(this,`_updatePosition`),this._tooltipContent.dispose(),nR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(GO);function WR(e,t,n){var r=t.ecModel,i;n?(i=new vm(n,r,r),i=new vm(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof vm&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new vm(o,i,r)))}return i}function GR(e,t){return e.dispatchAction||Tt(t.dispatchAction,t)}function KR(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function qR(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function JR(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function YR(e){return e===`center`||e===`middle`}function XR(e,t,n){var r=El(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Ol(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Ql(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function ZR(e){fM(_R),e.registerComponentModel(bR),e.registerComponentView(UR),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Qt),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Qt)}var QR=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(fv),$R=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=X(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Js({style:Xp(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Js({style:Xp(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){J_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){J_(p,`_`+e.get(`subtarget`))}),Ql(c).eventData=Ql(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=rv(g,av(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Us({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(GO);function ez(e){e.registerComponentModel(QR),e.registerComponentView($R)}function tz(e,t){if(!e)return!1;for(var n=K(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function nz(e){il(e,`label`,[`show`])}var rz=Cl(),iz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(tn.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=rz(e)[i];if(!n||!n.data){rz(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&nz(n),W(n.data,function(e){e instanceof Array?(nz(e[0]),nz(e[1])):nz(e)}),a=this.createMarkerModelFromSeries(n,this,t),U(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),rz(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Yv(`section`,{header:this.name,blocks:[Yv(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=Sv.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return rz(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(fv);vt(iz,Sv.prototype);function az(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function oz(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function sz(e,t,n,r,i,a,o){var s=[],c=mg(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=mz(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=kc(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var cz={min:Et(sz,`min`),max:Et(sz,`max`),average:Et(sz,`average`),median:Et(sz,`median`)};function lz(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!oz(t)&&!K(t.coord)&&K(i)){var a=uz(t,n,r,e);if(t=pt(t),t.type&&cz[t.type]&&a.baseAxis&&a.valueAxis){var o=gt(i,a.baseAxis.dim),s=gt(i,a.valueAxis.dim),c=cz[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!K(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&cz[t.type]){var u=r.getOtherAxis(l);u&&(t.value=mz(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)cz[d[f]]&&(d[f]=mz(n,n.mapDimension(i[f]),d[f]));return t}}function uz(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(dz(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function dz(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function fz(e,t){return e&&e.containData&&t.coord&&!az(t)?e.containData(t.coord):!0}function pz(e,t){return e?function(e,n,r,i){return ph(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return ph(e.value,t[i])}}function mz(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var hz=Cl(),gz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=Jt()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){hz(e).keep=!1}),t.eachSeries(function(e){var i=iz.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!hz(e).keep&&r.group.remove(e.group)}),_z(t,i,this.type)},t.prototype.markKeep=function(e){hz(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;W(e,function(e){var r=iz.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Wu(e):Gu(e))})})},t.type=`marker`,t}(GO);function _z(e,t,n){e.eachSeries(function(e){var r=iz.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Lp(r),o=a.z,s=a.zlevel;zp(i.group,o,s)}})}var vz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(iz),yz=Cl(),bz=function(e,t,n,r){var i=e.getData(),a;if(K(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Y(r.yAxis,r.xAxis);else{var l=uz(r,i,t,e);s=l.valueAxis,c=mz(i,hg(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=pt(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&kt(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[lz(e,a[0]),lz(e,a[1]),U({},a[2])];return h[2].type=h[2].type||null,H(h[2],h[0]),H(h[2],h[1]),h};function xz(e){return!isNaN(e)&&!isFinite(e)}function Sz(e,t,n,r){var i=1-e,a=r.dimensions[e];return xz(t[i])&&xz(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function Cz(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(Sz(1,n,r,e)||Sz(0,n,r,e)))return!0}return fz(e,t[0])&&fz(e,t[1])}function wz(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=Cc(o.get(`x`),i.getWidth()),l=Cc(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(yb(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;xz(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):xz(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var Tz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=iz.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=yz(t).from,a=yz(t).to;i.each(function(t){wz(i,t,!0,e,n),wz(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new YF);this.group.add(c.group);var l=Ez(i,e,t),u=l.from,d=l.to,f=l.line;yz(t).from=u,yz(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);K(p)||(p=[p,p]),K(m)||(m=[m,m]),K(h)||(h=[h,h]),K(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:X(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Ql(e).dataModel=t,e.traverse(function(e){Ql(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);wz(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=Ok(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:X(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:X(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:X(a.get(`symbolSize`),m[+!i]),symbol:X(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(gz);function Ez(e,t,n){var r=e?G(e&&e.dimensions,function(e){var n=t.getData();return U(U({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Yh(r,n),a=new Yh(r,n),o=new Yh([],n),s=G(n.get(`data`),Et(bz,t,e,n));e&&(s=xt(s,Et(Cz,e)));var c=pz(!!e,r);return i.initData(G(s,function(e){return e[0]}),null,c),a.initData(G(s,function(e){return e[1]}),null,c),o.initData(G(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Dz(e){e.registerComponentModel(vz),e.registerComponentView(Tz),e.registerPreprocessor(function(e){tz(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var Oz=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},kz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),K(t)&&W(t,function(e,r){q(e)&&(e={type:e}),t[r]=H(e,Oz(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&vl(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=Jt(),a=G(r,function(e){return(q(e)||kt(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new vm(e,this,this.ecModel))},this);this._data=xt(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;W(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;W(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;W(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&>(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(fv),Az=Et,jz=W,Mz=Bd,Nz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new Mz),this.group.add(this._selectorGroup=new Mz),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=av(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=rv(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=rv(ht({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=yR(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Jt(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),jz(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
-
`)){var p=new Mz;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,Az(Iz,f,null,r,d)).on(`mouseover`,Az(Lz,m.name,null,r,d)).on(`mouseout`,Az(Rz,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Ql(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=la(h.fill);_&&_[3]===0&&(_[3]=.2,h=U(U({},h),{fill:_a(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,Az(Iz,null,f,r,d)).on(`mouseover`,Az(Lz,null,f,r,d)).on(`mouseout`,Az(Rz,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Ql(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Ql(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();jz(e,function(e){var r=e.type,i=new Js({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Jp(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ad(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=Pz(c,r,o,s,d,m,u),y=new Mz,b=r.getModel(`textStyle`);if(Dt(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(Fz({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):Dt(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Js({style:Xp(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Us({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Ap({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ad(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();$_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){$_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(GO);function Pz(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),jz(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:EA(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function Fz(e){var t=e.icon||`roundRect`,n=Ay(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function Iz(e,t,n,r){Rz(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),Lz(e,t,n,r)}function Lz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function Rz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function zz(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),Bz(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){W(i,function(t,n){e[t?`select`:`unSelect`](n)}),Bz(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Bz(e,t){var n=t||{};return W(e.getData(),function(t){var r=t.get(`name`);if(r!==`
|
|
18
|
-
`&&r!==``){var i=e.isSelected(r);n[r]=Z(n,r)?n[r]&&i:i}}),n}function Vz(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Et(zz,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Et(zz,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Et(zz,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Et(zz,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Et(zz,`unSelect`))}var Hz=Zl(Uz);function Uz(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function Wz(e){e.registerComponentModel(kz),e.registerComponentView(Nz),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Hz),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),Vz(e)}var Gz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=lv(t);e.prototype.init.call(this,t,n,r),Kz(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Kz(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Tg(kz.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(kz);function Kz(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,cv(t,n,{type:`box`,ignoreSize:!!i})}var qz=Bd,Jz=[`width`,`height`],Yz=[`x`,`y`],Xz=function(e){V(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new qz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new qz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=K(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Js({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=Sp(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:Tt(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=Jz[s],l=Yz[s],u=Jz[1-s],d=Yz[1-s];i&&$_(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=pt(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;$_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),$_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=X(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Us({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Wf(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;W([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=Jz[i],o=Yz[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(Nz);function Zz(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function Qz(e){fM(Wz),e.registerComponentModel(Gz),e.registerComponentView(Xz),Zz(e)}function $z(e){fM(Wz),fM(Qz)}var eB={label:{enabled:!0},decal:{show:!1}},tB=Cl(),nB=Cl(),rB=Zl(iB);function iB(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=nB(e).scope||(nB(e).scope={}),i=pt(eB);H(i.label,e.getLocaleModel().get(`aria`),!1),H(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Jt();e.eachSeries(function(e){e.isColorBySeries()||(tB(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(Dt(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=_v(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=tB(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=_v(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?U(U({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=ht(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=o>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?xt(i.getValues(_),function(e,t){return gt(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(s(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}function s(e,t){if(!q(e))return e;var n=e;return W(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function c(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function l(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function aB(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},W([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function oB(e){e.registerPreprocessor(aB),e.registerVisual(e.PRIORITY.VISUAL.ARIA,rB)}function sB(e,t,n){var r=Ze.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function cB(e){return!e.__cursors.get(0)}function lB(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var uB=function(e){V(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ja,typeof t==`string`?a=sB(t,n,r):J(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Zt(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=lB(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=sB(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new hr(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new hr(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new hr(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new hr(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=lB(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;Nt(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||Uk(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Pt(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=tA(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&W(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Ka),dB=1e5,fB=314159,pB=void 0,mB=1,hB=2;function gB(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function _B(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function vB(e,t,n,r){var i=new uB(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,yB(i),i}function yB(e){e.__cursorStack=[],e.__cursors=Jt()}function bB(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function xB(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,bB({key:r})))}function SB(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function CB(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function wB(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&TB)||s.__builtin__)&&(!(n&EB)||!s.__builtin__)&&(!(n&DB)||s!==e.hoverlayer))&&t(s,a,o,i)}}var TB=1,EB=2,DB=4,OB=TB|DB,kB=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=U({},n||{}),this.dpr=n.devicePixelRatio||Ja,this._singleCanvas=i,this.root=e,e.style&&(Zt(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=vB(a,this,fB,0);c.initContext(),this._insertLayer(c,fB,0,!0),this._domRoot=e}else{this._width=Kk(e,0,n),this._height=Kk(e,1,n);var l=this._domRoot=_B(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!J(e)?{paintAll:!!e}:e||{},n=X(t.refresh,!0),r=X(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=hB),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return wB(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},EB),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=pB,n!==pB&&(!t&&n===hB&&(t=this._i.hoverlayer=this._ensureLayer(dB)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),bA(i,s,r),c&&(s.style=l)}}i&&(xA(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(dB)},e.prototype.paintOne=function(e,t){yA(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)wB(this._i,function(e){e.afterBrush&&e.afterBrush()},OB),this._paintHoverList(e);else{var i=this;yD(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(fB).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),wB(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},TB)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return wB(this._i,function(i){var a=!1;if(SB(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!cB(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}SB(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},OB),tn.wxa&&wB(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=cB(e),c=s&&Ze.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=hB),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(bA(o,f,a),f.setPrevPaintRect(p))}else bA(o,f,a);if(s&&Ze.getTime()-c>15){d++;break}}}xA(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=fB,t=0);var i=CB(this._i,e)[t];return i||(i=vB(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&H(i,this._layerConfig[e],!0),(n||r&&e!==fB)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&gB(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=CB(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),CB(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return wB(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return wB(this._i,function(n,r){e.call(t,n,r)},TB)},e.prototype.eachOtherLayer=function(e,t){return wB(this._i,function(n,r){e.call(t,n,r)},EB)},e.prototype.getLayers=function(){var e={};return wB(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}wB(n._i,function(e){e.__dirty=!1,SB(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},OB);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){ft(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=xB(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}wB(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(cB(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(SB(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===pB&&(n._hoverLayerDirty=mB))},OB)},e.prototype.clear=function(){return wB(this._i,function(e){e.clear(),yB(e)},TB),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,wB(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?H(n[e],t,!0):n[e]=t,wB(this._i,function(e,t){H(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=Kk(i,0,r),t=Kk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,wB(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(fB).resize(e,t)}return this},e.prototype.clearLayer=function(e){W(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[fB][0].dom;var t=new uB(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;wB(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];bA(n,l,a)}xA(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function AB(e){e.registerPainter(`canvas`,kB)}var jB=t(`<tr><td> </td><td> </td></tr>`),MB=t(`<tr><td> </td><td> </td><td> </td></tr>`),NB=t(`<div data-testid="model-detail-visual" data-chart-engine="echarts"></div> <div class="model-detail-data svelte-1i3n9mf"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table> <table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div>`,1);function PB(t,i){te(i,!1);let a=y(),o=y(),u=`agent-usage:theme-changed`;fM([kE,lS,vR,ZR,$z,ez,oB,AB]);let m=S(i,`compositionTotals`,8),h=S(i,`unclassifiedTokens`,8),_=S(i,`trend`,8),v=S(i,`trendEvidence`,8),x=S(i,`locale`,8),w=S(i,`formatNumber`,8),E=S(i,`formatMoney`,8),D=y(null),O=y(null),A=null,j=0,M=0,N=0,P=y(!1),I=y(!1),L=y({text:`#10131a`,muted:`#697386`,surface:`#ffffff`,border:`#dce1e9`,primary:`#647cf0`,cost:`#9b7cf4`}),ee=[{key:`input`,label:`input`,color:`#6f8ff7`},{key:`output`,label:`output`,color:`#e19a6c`},{key:`reasoning`,label:`reasoning`,color:`#9b7cf4`},{key:`cacheRead`,label:`cacheRead`,color:`#52c5a4`},{key:`cacheWrite`,label:`cacheWrite`,color:`#e0b84f`}];function ne(e){return Te(x(),e)}function ae(e){let{composition:t,trend:n,trendEvidence:r,compact:i,colors:a,locale:o,formatNumber:s,formatMoney:c}=e,l=e=>Te(o,e),u=l(`recordedTotal`),d=l(`cost`),f=r.find(e=>e.costAmount!==null)?.costCurrency??`USD`;return{animation:!B(),animationDuration:320,aria:{enabled:!0,decal:{show:!1}},title:[{text:l(`tokenBreakdown`),left:i?16:`3%`,top:i?8:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}},{text:l(`modelTrend`),left:i?16:`47%`,top:i?`53%`:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}}],legend:[{type:`scroll`,orient:`horizontal`,left:i?12:`2%`,right:i?12:`55%`,...i?{top:224}:{bottom:12},data:t.map(e=>e.name),textStyle:{color:a.muted,fontSize:9},itemWidth:9,itemHeight:9},{left:i?12:`47%`,top:i?`62%`:50,data:[u,d],textStyle:{color:a.muted,fontSize:9},itemWidth:14,itemHeight:8}],tooltip:{trigger:`item`,confine:!0,renderMode:`richText`,backgroundColor:a.surface,borderColor:a.border,borderWidth:1,padding:[9,11],textStyle:{color:a.text,fontSize:11},formatter:e=>{let t=Array.isArray(e)?e[0]:e,i=typeof t.dataIndex==`number`?t.dataIndex:-1,a=typeof t.value==`number`?t.value:0;if(t.seriesType===`pie`)return`${t.name}\n${s(a)} ${l(`tokens`)}`;let o=n[i],u=r[i];return!o||!u?`${s(a)} ${l(`tokens`)}`:t.seriesName===d?`${o.label}\n${c(u.costAmount,u.costCurrency)}`:`${o.label}\n${s(a)} ${l(`tokens`)}`}},grid:{left:i?48:`47%`,right:48,top:i?`68%`:82,bottom:i?34:38,containLabel:!0},xAxis:{type:`category`,boundaryGap:!1,data:n.map(e=>e.label),axisLine:{lineStyle:{color:a.border}},axisTick:{show:!1},axisLabel:{color:a.muted,fontSize:9,hideOverlap:!0,interval:`auto`}},yAxis:[{type:`value`,min:0,splitNumber:3,axisLabel:{color:a.muted,fontSize:9,formatter:e=>oe(e,o)},splitLine:{lineStyle:{color:a.border,opacity:.65}}},{type:`value`,min:0,position:`right`,splitNumber:3,axisLabel:{color:a.cost,fontSize:9,formatter:e=>z(e,f,o)},splitLine:{show:!1}}],series:[{name:l(`tokenBreakdown`),type:`pie`,center:i?[`50%`,`27%`]:[`23%`,`50%`],radius:i?[`20%`,`34%`]:[`34%`,`54%`],avoidLabelOverlap:!0,itemStyle:{borderColor:a.surface,borderWidth:3,borderRadius:4},label:{show:!1},emphasis:{focus:`self`,scaleSize:5},data:t},{name:u,type:`line`,yAxisIndex:0,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.recordedTokens),lineStyle:{width:2.5,color:a.primary},itemStyle:{color:a.primary},areaStyle:{color:a.primary,opacity:.12},emphasis:{focus:`series`}},{name:d,type:`line`,yAxisIndex:1,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.costAmount),lineStyle:{width:2,type:`dashed`,color:a.cost},itemStyle:{color:a.cost},emphasis:{focus:`series`}}]}}function oe(e,t){return new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:1}).format(e)}function z(e,t,n){return new Intl.NumberFormat(n,{style:`currency`,currency:t,notation:`compact`,maximumFractionDigits:1}).format(e)}function B(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function se(e,t){return p(D)&&getComputedStyle(p(D)).getPropertyValue(e).trim()||t}function ce(){b(L,{text:se(`--text-strong`,p(L).text),muted:se(`--muted`,p(L).muted),surface:se(`--surface`,p(L).surface),border:se(`--border`,p(L).border),primary:se(`--primary`,p(L).primary),cost:se(`--warning`,p(L).cost)})}function ue(e){p(O)?.setOption(e,{notMerge:!0,lazyUpdate:!1})}ie(()=>{if(p(D))return M=requestAnimationFrame(()=>{N=requestAnimationFrame(()=>{p(D)&&(ce(),b(I,p(D).clientWidth<660),b(O,Kj(p(D),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(O).getDom().setAttribute(`aria-hidden`,`true`),ue(p(o)),A=new ResizeObserver(([e])=>{let t=e.contentRect.width<660;t!==p(I)&&b(I,t),cancelAnimationFrame(j),j=requestAnimationFrame(()=>p(O)?.resize())}),A.observe(p(D)),b(P,!0))})}),window.addEventListener(u,ce),()=>{window.removeEventListener(u,ce),cancelAnimationFrame(M),cancelAnimationFrame(N),cancelAnimationFrame(j),A?.disconnect(),p(O)?.dispose(),b(O,null)}}),fe(()=>(d(m()),d(h())),()=>{b(a,ee.map(e=>({name:ne(e.label),value:m()[e.key],itemStyle:{color:e.color}})).filter(e=>e.value>0).concat(h()>0?[{name:ne(`unclassified`),value:h(),itemStyle:{color:`#8b94a5`}}]:[]))}),fe(()=>(p(a),d(_()),d(v()),p(I),p(L),d(x()),d(w()),d(E())),()=>{b(o,ae({composition:p(a),trend:_(),trendEvidence:v(),compact:p(I),colors:p(L),locale:x(),formatNumber:w(),formatMoney:E()}))}),fe(()=>(p(O),p(o)),()=>{p(O)&&ue(p(o))}),n(),R();var pe=NB(),me=re(pe);let he;T(me,e=>b(D,e),()=>p(D));var ge=s(me,2),_e=c(ge),ve=c(_e),ye=c(ve),be=c(ye),xe=c(be,!0);F(be);var Se=s(be),Ce=c(Se,!0);F(Se),F(ye),F(ve);var we=s(ve);le(we,5,()=>p(a),e=>e.name,(e,t)=>{var n=jB(),i=c(n),a=c(i,!0);F(i);var o=s(i),u=c(o,!0);F(o),F(n),g(e=>{r(a,(p(t),l(()=>p(t).name))),r(u,e)},[()=>(d(w()),p(t),l(()=>w()(p(t).value)))]),f(e,n)}),F(we),F(_e);var Ee=s(_e,2),De=c(Ee),Oe=c(De),ke=c(Oe),Ae=c(ke,!0);F(ke);var je=s(ke),Me=c(je,!0);F(je);var Ne=s(je),Pe=c(Ne,!0);F(Ne),F(Oe),F(De);var Fe=s(De);le(Fe,7,_,e=>e.start,(t,n,i)=>{let a=e(()=>(d(v()),d(p(i)),l(()=>v()[p(i)])));var o=MB(),u=c(o),m=c(u,!0);F(u);var h=s(u),_=c(h,!0);F(h);var y=s(h),b=c(y,!0);F(y),F(o),g((e,t)=>{r(m,(p(n),l(()=>p(n).label))),r(_,e),r(b,t)},[()=>(p(n),d(p(a)),d(w()),l(()=>p(n).gap||p(a)?.recordedTokens===null?ne(`gap`):w()(p(a).recordedTokens))),()=>(d(p(a)),d(E()),l(()=>p(a)?.costAmount===null?ne(`notAvailable`):E()(p(a).costAmount,p(a).costCurrency)))]),f(t,o)}),F(Fe),F(Ee),F(ge),g((e,t,n,i,a,o,s,c)=>{he=de(me,1,`model-detail-visual svelte-1i3n9mf`,null,he,{"chart-pending":!p(P)}),k(me,`aria-busy`,!p(P)),k(me,`aria-label`,e),k(_e,`aria-label`,t),r(xe,n),r(Ce,i),k(Ee,`aria-label`,a),r(Ae,o),r(Me,s),r(Pe,c)},[()=>l(()=>`${ne(`tokenBreakdown`)} · ${ne(`modelTrend`)}`),()=>l(()=>ne(`tokenBreakdown`)),()=>l(()=>ne(`tokens`)),()=>l(()=>ne(`total`)),()=>l(()=>ne(`modelTrend`)),()=>l(()=>ne(`interval`)),()=>l(()=>ne(`tokens`)),()=>l(()=>ne(`cost`))]),f(t,pe),C()}function FB(e){return e.retailEquivalent.amount===null?e.reportedEstimate.amount:e.retailEquivalent.amount}function IB(e,t,n,r,i){let a=e.flatMap(e=>{let n=t===`tokens`?e.tokenTotals.total:FB(e);return n===null||n<=0?[]:[{modelId:e.id,model:e,value:n,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline}]}),o=a.reduce((e,t)=>e+t.value,0)||1,s=new Map;for(let e of a)s.set(e.model.model,(s.get(e.model.model)??0)+1);let c=new Set,l=e=>{if((s.get(e.model)??0)===1)return e.model;let t=`${e.model} · ${e.providerDisplayName}`;if(!c.has(t))return t;let n=`${e.model} · ${e.providerDisplayName} · ${e.billingDomainDisplayName}`;if(!c.has(n))return n;let r=2,i=`${n} #${r}`;for(;c.has(i);)i=`${n} #${++r}`;return i};return a.map(e=>{let t=l(e.model);return c.add(t),{modelId:e.model.id,name:t,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,value:e.value,share:e.value/o,color:n(e.model.providerId,e.model.billingDomainId),formattedValue:r(e.value),formattedShare:i(e.value/o)}})}function LB(e,t,n={notAvailable:`Unavailable`,separateFromHeadline:`Separate domain · not included in headline`},r=!0){return{animation:r,animationDuration:r?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.notAvailable,left:`center`,top:`46%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`model-breakdown-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>zB(e,t,n,n.notAvailable)},series:[{type:`treemap`,top:0,left:0,right:0,bottom:0,roam:!1,nodeClick:!1,squareRatio:1,gapWidth:2,breadcrumb:{show:!1},upperLabel:{show:!1},label:{show:!0,color:t.text,fontSize:11,fontWeight:600,lineHeight:16,overflow:`truncate`,ellipsis:`…`,formatter:e=>RB(e)},itemStyle:{borderColor:t.surface,borderWidth:2,gapWidth:2},emphasis:{label:{show:!0,fontWeight:700},itemStyle:{borderColor:t.border,borderWidth:3}},data:e.map(e=>({name:e.name,value:e.value,modelId:e.modelId,formattedValue:e.formattedValue,formattedShare:e.formattedShare,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,itemStyle:{color:e.color}}))}]}}function RB(e){if(!e||typeof e!=`object`||!(`data`in e))return``;let t=e.data;return!t||typeof t!=`object`?``:[t.name,t.formattedValue].filter(e=>typeof e==`string`).join(`
|
|
19
|
-
`)}function zB(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return r;let i=e.data;if(!i||typeof i!=`object`)return r;let a=i,o=[`<strong>${BB(a.name)}</strong>`,`<span style="color:${BB(t.muted)}">${BB(a.providerDisplayName)} · ${BB(a.billingDomainDisplayName)}</span>`,`<span>${BB(a.formattedValue)} · ${BB(a.formattedShare)}</span>`];return a.includedInHeadline||o.push(`<span style="color:${BB(t.muted)}">${BB(n.separateFromHeadline)}</span>`),o.join(`<br>`)}function BB(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var VB=2.5,HB=[10,7],UB=`rgba(122, 136, 164, 0.16)`,WB=`#697386`,GB=`Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,KB={codex:`#78a7ff`,"claude-code":`#d69b73`,opencode:`#55c89d`,"opencode-go":`#73d4b2`,"grok:grok-build-subscription":`#b28cff`,"grok:custom":`#d480ff`,"grok:xai-api":`#f07f9a`,dsh:`#e3c85c`};function qB(e,t){return KB[`${e}:${t}`]??KB[e]??`#9aa5b8`}function JB(e,t=0,n=null){if(e<=0)return{start:0,size:0};let r=Math.max(Math.min(4,e),Math.min(n??e,e));return{start:Math.max(0,Math.min(t,e-r)),size:r}}function YB(e,t,n,r,i=.5){if(e<=1)return{start:t,size:n};let a=JB(e,t,n),o=r===`in`?Math.max(Math.min(4,e),Math.round(a.size*.7)):Math.min(e,Math.ceil(a.size/.7));if(o===a.size)return{start:a.start,size:o===e?null:o};let s=Math.max(0,Math.min(1,i)),c=a.start+s*Math.max(0,a.size-1);return{start:Math.max(0,Math.min(e-o,Math.round(c-s*Math.max(0,o-1)))),size:o===e?null:o}}function XB(e,t,n,r){let i=JB(e,t,n);return Math.max(0,Math.min(e-i.size,i.start+r))}function ZB(e,t){let n=e.flatMap(e=>e.segments),r=t===`tokens`?n.map(e=>({...e,costPurpose:null})):n.flatMap(e=>[...e.retailEquivalent.amount===null?[]:[{...e,costPurpose:`retail-equivalent`}],...e.reportedEstimate?.amount==null?[]:[{...e,costPurpose:`reported-estimate`}]]);return[...new Map(r.map(e=>[`${e.providerId}:${e.billingDomainId}:${e.costPurpose??`tokens`}`,{providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainId:e.billingDomainId,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,costPurpose:e.costPurpose}])).values()]}function QB(e,t,n){return e?t===`tokens`?e.recordedTokens:n===`reported-estimate`?e.reportedEstimate?.amount??null:e.retailEquivalent.amount:null}function $B(e,t){return ZB(e,t).map(n=>({...n,key:`${n.providerId}:${n.billingDomainId}:${n.costPurpose??`tokens`}`,values:e.map(e=>e.gap?null:QB(e.segments.find(e=>e.providerId===n.providerId&&e.billingDomainId===n.billingDomainId),t,n.costPurpose))}))}function eV(e){let t=e.flatMap(e=>e.values.filter(e=>e!==null));return t.length>0?Math.max(...t):null}function tV(e,t){return e[t]!=null&&e[t-1]==null&&e[t+1]==null}function nV(e,t){return t<=1?50:Math.max(8,Math.min(92,e/(t-1)*100))}function rV(e){let t=qB(e.providerId,e.billingDomainId),n=e.costPurpose===`reported-estimate`;return{id:e.key,name:e.key,type:`line`,data:e.values,connectNulls:!1,silent:!0,showSymbol:e.values.some((t,n)=>tV(e.values,n)),symbol:`circle`,symbolSize:(t,n)=>tV(e.values,n.dataIndex)?8:0,lineStyle:{width:VB,color:t,type:n?HB:`solid`,cap:`round`,join:`round`},itemStyle:n?{color:`transparent`,borderColor:t,borderWidth:2}:{color:t,borderColor:t,borderWidth:0},areaStyle:n?void 0:{color:{type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${t}3d`},{offset:1,color:`${t}00`}]}},emphasis:{disabled:!0},z:n?3:2,clip:!0}}function iV(e,t,n,r,i,a=e=>String(e)){let o=Math.max(1,n??0),s={color:r.label,fontFamily:GB,fontSize:10};return{animation:i,animationDuration:i?240:0,backgroundColor:`transparent`,grid:{left:12,right:16,top:16,bottom:12,containLabel:!0},xAxis:{type:`category`,data:e,boundaryGap:!1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...s,show:!0,hideOverlap:!0,margin:10},splitLine:{show:!1}},yAxis:{type:`value`,min:0,max:o,interval:o/2,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...s,show:!0,margin:8,formatter:a},splitLine:{show:!0,lineStyle:{color:r.gridLine,width:1}}},series:t.map(rV)}}var aV=t(`<div class="model-breakdown-treemap-root svelte-1nr4hcl"><div class="model-breakdown-echarts svelte-1nr4hcl" data-testid="model-breakdown-treemap" data-chart-engine="echarts"></div></div>`);function oV(e,t){te(t,!1);let r=y(),i=y();fM([IF,ZR,ez,oB,AB]);let a=S(t,`models`,8),s=S(t,`metric`,8),u=S(t,`currency`,8),m=S(t,`locale`,24,()=>we(``)),h=S(t,`formatUsageMetric`,8),_=S(t,`formatPercent`,8),v=S(t,`onSelect`,8),x=y(null),w=y(null),E=y(null),D=null,O=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function A(e){return Te(m(),e)}function j(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function N(){let e=p(w)??p(x);e&&b(O,{text:M(e,`--text-strong`,p(O).text),muted:M(e,`--muted`,p(O).muted),surface:M(e,`--surface`,p(O).surface),border:M(e,`--border`,p(O).border)})}async function P(e){p(E)&&(p(E).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(E).resize())}ie(()=>{if(p(x))return N(),b(E,Kj(p(x),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(E).on(`click`,e=>{let t=e?.data,n=t&&typeof t==`object`?t.modelId:null;typeof n==`string`&&v()(n)}),D=new ResizeObserver(()=>p(E)?.resize()),D.observe(p(x)),window.addEventListener(Ee,N),()=>{window.removeEventListener(Ee,N),D?.disconnect(),D=null,p(E)?.dispose(),b(E,null)}}),fe(()=>(d(a()),d(s()),d(h()),d(u()),d(_())),()=>{b(r,IB(a(),s(),qB,e=>h()(e,u(),s()),_()))}),fe(()=>(p(r),p(O)),()=>{b(i,LB(p(r),p(O),{notAvailable:A(`notAvailable`),separateFromHeadline:A(`separateFromHeadline`)},!j()))}),fe(()=>(p(E),p(i)),()=>{p(E)&&P(p(i))}),n(),R();var I=aV(),L=c(I);T(L,e=>b(x,e),()=>p(x)),F(I),T(I,e=>b(w,e),()=>p(w)),g(e=>k(L,`aria-label`,e),[()=>l(()=>A(`modelBreakdownTreemap`))]),f(e,I),C()}var sV=t(`<div class="model-trend-stacked-root svelte-kd7ncs" data-testid="model-trend-stacked"></div>`);function cV(e,t){te(t,!1);let r=y(),i=y(),a=y();fM([UT,vR,ZR,$z,oB,AB]);let o=S(t,`models`,8),s=S(t,`metric`,8),c=S(t,`currency`,8),u=S(t,`locale`,24,()=>we(``)),m=S(t,`formatUsageMetric`,8),h=S(t,`onSelect`,8),_=y(null),v=y(null),x=null;function w(e){return Te(u(),e)}function E(e){let t={};for(let n of e)t[n.model]=(t[n.model]??0)+1;return e.map(e=>(t[e.model]??0)>1?`${e.model} · ${e.providerDisplayName}`:e.model)}function D(e,t){let n=e.trend[t];return!n||n.gap?null:s()===`tokens`?n.tokenTotals.total:n.retailEquivalent.amount}function O(e,t,n){let r=e.map((e,r)=>({name:t[r],type:`bar`,stack:`total`,barMaxWidth:34,emphasis:{focus:`series`},itemStyle:{color:qB(e.providerId,e.billingDomainId)},data:n.map((t,n)=>D(e,n))}));return{animation:!A(),animationDuration:280,aria:{enabled:!0,decal:{show:!1}},legend:{type:`scroll`,bottom:4,left:8,right:8,textStyle:{color:`#697386`,fontSize:9},data:t},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},confine:!0,formatter:e=>{let t=Array.isArray(e)?e:[e],n=t[0];return[typeof n?.axisValue==`string`?n.axisValue:``,...t.flatMap(e=>{let t=typeof e.value==`number`?e.value:null;return t===null?[]:`${e.marker??``} ${e.seriesName}: ${m()(t,c(),s())}`})].join(`<br/>`)}},grid:{left:48,right:48,top:18,bottom:46,containLabel:!0},xAxis:{type:`category`,data:n,axisTick:{show:!1},axisLine:{lineStyle:{color:`#dce1e9`}},axisLabel:{color:`#697386`,fontSize:9,hideOverlap:!0}},yAxis:{type:`value`,min:0,axisLabel:{color:`#697386`,fontSize:9,formatter:e=>m()(e,c(),s())},splitLine:{lineStyle:{color:`#dce1e9`,opacity:.65}}},series:r}}function A(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}ie(()=>{if(p(_))return b(v,Kj(p(_),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(v).on(`click`,e=>{let t=typeof e.seriesIndex==`number`?e.seriesIndex:-1,n=o()[t];n&&h()(n.id)}),x=new ResizeObserver(()=>p(v)?.resize()),x.observe(p(_)),()=>{x?.disconnect(),p(v)?.dispose(),b(v,null)}}),fe(()=>d(o()),()=>{b(r,o()[0]?.trend.map(e=>e.label)??[])}),fe(()=>d(o()),()=>{b(i,E(o()))}),fe(()=>(d(o()),p(i),p(r)),()=>{b(a,O(o(),p(i),p(r)))}),fe(()=>(p(v),p(a)),()=>{p(v)&&p(v).setOption(p(a),{notMerge:!0,lazyUpdate:!1})}),n(),R();var j=sV();T(j,e=>b(_,e),()=>p(_)),g(e=>k(j,`aria-label`,e),[()=>l(()=>w(`modelTrendStacked`))]),f(e,j),C()}function lV(e,t){if(!e)return null;let n=e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null,r=Math.min(100,Math.max(0,e.progress*100)),i=e.breakEvenRatio===null?0:Math.min(100,Math.max(0,e.breakEvenRatio*100));return{start:e.start,end:e.end,elapsedDays:e.elapsedDays,totalDays:e.totalDays,elapsedPercent:r,earnedPercent:i,onPace:e.breakEvenRatio!==null&&e.breakEvenRatio>=e.progress,earnedLabel:t.money(n),periodCostLabel:t.money(e.periodCost.amount),bound:e.ratioBound}}var uV=[1,2,5,10,20,50],dV=14;function fV(e){let t=new Map;for(let n of e)t.set(n.providerDisplayName,(t.get(n.providerDisplayName)??0)+1);return new Map(e.map(e=>[`${e.providerId}:${e.billingDomainId}`,(t.get(e.providerDisplayName)??0)>1?pV(e):e.providerDisplayName]))}function pV(e){return e.providerDisplayName===e.billingDomainDisplayName?e.providerDisplayName:`${e.providerDisplayName} · ${e.billingDomainDisplayName}`}function mV(e,t){return e.plan.displayName||t}function hV(e,t,n){let r=fV(e.entries);return e.entries.flatMap(e=>{let i=e.windowPlanCost.amount,a=e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null;return i===null||a===null?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:pV(e),shortName:r.get(`${e.providerId}:${e.billingDomainId}`)??pV(e),planLabel:mV(e,n),color:t(e.providerId,e.billingDomainId),paid:i,worth:a,tokens:e.recordedTokens??0,ratio:e.valueRatio,bound:e.ratioBound,effectiveUnitPrice:e.effectiveUnitPrice,retailUnitPrice:e.retailUnitPrice}]})}function gV(e,t){return t<=0||e<=0?dV:dV+32*Math.sqrt(e/t)}function _V(e,t){if(e<=0||t<=0)return[];let n=n=>{let r=Math.min(e,t/n);return{ratio:n,points:[[0,0],[r,r*n]]}},r=uV.filter(e=>e!==1).map(n).filter(t=>t.points[1][0]>=e*.2).slice(-3);return[n(1),...r]}function vV(e,t,n,r,i=!0){let a=Math.max(...e.map(e=>e.paid),0)*1.25,o=Math.max(...e.map(e=>e.worth),0)*1.25,s=Math.max(...e.map(e=>e.tokens),0),c=_V(a,o);return{animation:i,animationDuration:i?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.empty,left:`center`,top:`44%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},grid:{top:34,right:26,bottom:46,left:62,containLabel:!0},xAxis:{type:`value`,show:e.length>0,min:0,max:a||void 0,name:n.paid,nameLocation:`middle`,nameGap:30,nameTextStyle:{color:t.muted,fontSize:11},axisLabel:{color:t.muted,fontSize:10,formatter:e=>r.money(e)},axisLine:{lineStyle:{color:t.border}},splitLine:{lineStyle:{color:t.border,opacity:.35}}},yAxis:{type:`value`,show:e.length>0,min:0,max:o||void 0,name:n.worth,nameLocation:`end`,nameGap:14,nameTextStyle:{color:t.muted,fontSize:11,align:`left`},axisLabel:{color:t.muted,fontSize:10,formatter:e=>r.money(e)},axisLine:{lineStyle:{color:t.border}},splitLine:{lineStyle:{color:t.border,opacity:.35}}},tooltip:{show:e.length>0,trigger:`item`,renderMode:`html`,confine:!0,className:`plan-value-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>yV(e,t,n,r)},series:[...c.map(e=>({type:`line`,silent:!0,symbol:`none`,data:e.points,lineStyle:{color:t.muted,width:e.ratio===1?1.4:1,type:e.ratio===1?`dashed`:`dotted`,opacity:e.ratio===1?.85:.45},endLabel:{show:!0,color:t.muted,fontSize:10,formatter:()=>`${e.ratio}x`},emphasis:{disabled:!0},animation:!1,z:1})),{type:`scatter`,z:3,symbolSize:(e,t)=>gV(t.data?.tokens??0,s),label:{show:!0,position:`top`,distance:6,color:t.text,fontSize:10,fontWeight:600,formatter:e=>e.data?.shortName??``},emphasis:{scale:1.08,focus:`self`},data:e.map(e=>({value:[e.paid,e.worth],name:e.name,shortName:e.shortName,planLabel:e.planLabel,tokens:e.tokens,ratio:e.ratio,bound:e.bound,effectiveUnitPrice:e.effectiveUnitPrice,retailUnitPrice:e.retailUnitPrice,itemStyle:{color:e.color,opacity:.85,borderColor:t.surface,borderWidth:1.5}}))}]}}function yV(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return n.empty;let i=e.data;if(!i||typeof i!=`object`)return n.empty;let a=i,o=[`<strong>${xV(a.name??``)}</strong>`,`<span style="color:${xV(t.muted)}">${xV(a.planLabel??``)}</span>`,`<span>${xV(n.ratio)} · ${xV(r.ratio(a.ratio??null,a.bound??`unavailable`))}</span>`,`<span>${xV(n.paid)} · ${xV(r.money(a.value?.[0]??null))}</span>`,`<span>${xV(n.worth)} · ${xV(r.money(a.value?.[1]??null))}</span>`,`<span>${xV(n.tokens)} · ${xV(r.tokens(a.tokens??null))}</span>`,`<span>${xV(n.effectiveUnitPrice)} · ${xV(r.money(a.effectiveUnitPrice??null))} ${xV(n.perMillion)}</span>`,`<span>${xV(n.retailUnitPrice)} · ${xV(r.money(a.retailUnitPrice??null))} ${xV(n.perMillion)}</span>`];return a.bound===`lower`&&o.push(`<span style="color:${xV(t.muted)}">${xV(n.partial)}</span>`),o.join(`<br>`)}function bV(e,t,n,r){let i=e.entries.map(e=>e.valueRatio).filter(e=>e!==null),a=Math.max(...i,1);return e.entries.map(e=>{let i=e.retailUnitPrice!==null&&e.effectiveUnitPrice!==null?e.retailUnitPrice-e.effectiveUnitPrice:null;return{key:`${e.providerId}:${e.billingDomainId}`,name:pV(e),planLabel:mV(e,r),color:t(e.providerId,e.billingDomainId),ratio:e.valueRatio,bound:e.ratioBound,ratioLabel:n.ratio(e.valueRatio,e.ratioBound),meterPercent:e.valueRatio===null?0:Math.min(100,e.valueRatio/a*100),breakEvenPercent:Math.min(100,1/a*100),beatsBreakEven:e.valueRatio!==null&&e.valueRatio>=1,paidLabel:n.money(e.windowPlanCost.amount),worthLabel:n.money(e.retailEquivalent.status===`available`?e.retailEquivalent.amount:null),tokensLabel:n.tokens(e.recordedTokens),effectiveUnitPriceLabel:n.money(e.effectiveUnitPrice),retailUnitPriceLabel:n.money(e.retailUnitPrice),savingsLabel:i===null?null:n.money(Math.abs(i)),savingsIsLoss:i!==null&&i<0,period:lV(e.billingPeriod,n)}})}function xV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var SV=t(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),CV=t(`<div class="plan-value-chart-root svelte-jg0yd3"><div class="plan-value-echarts svelte-jg0yd3" data-testid="plan-value-chart" data-chart-engine="echarts"></div> <div class="plan-value-data svelte-jg0yd3"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function wV(e,t){te(t,!1);let i=y(),a=y();fM([EN,lS,vR,ZR,ez,oB,AB]);let u=S(t,`planValue`,8),m=S(t,`locale`,24,()=>we(``)),h=S(t,`formatters`,8),_=y(null),v=y(null),x=y(null),w=null,E=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function D(e){return Te(m(),e)}function O(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function A(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function j(){let e=p(v)??p(_);e&&b(E,{text:A(e,`--text-strong`,p(E).text),muted:A(e,`--muted`,p(E).muted),surface:A(e,`--surface-subtle`,p(E).surface),border:A(e,`--border`,p(E).border)})}async function M(e){p(x)&&(p(x).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(x).resize())}ie(()=>{if(p(_))return j(),b(x,Kj(p(_),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(x).getDom().setAttribute(`aria-hidden`,`true`),w=new ResizeObserver(()=>p(x)?.resize()),w.observe(p(_)),window.addEventListener(Ee,j),()=>{window.removeEventListener(Ee,j),w?.disconnect(),w=null,p(x)?.dispose(),b(x,null)}}),fe(()=>(d(u()),qB),()=>{b(i,hV(u(),qB,D(`planCustom`)))}),fe(()=>(p(i),p(E),d(h())),()=>{b(a,vV(p(i),p(E),{paid:D(`planValuePaid`),worth:D(`planValueWorth`),ratio:D(`planValueRatio`),tokens:D(`tokens`),effectiveUnitPrice:D(`planValueEffectiveUnitPrice`),retailUnitPrice:D(`planValueRetailUnitPrice`),perMillion:D(`planValuePerMillion`),partial:D(`planValuePartial`),empty:D(`planValueEmpty`)},h(),!O()))}),fe(()=>(p(x),p(a)),()=>{p(x)&&M(p(a))}),n(),R();var N=CV(),P=c(N);T(P,e=>b(_,e),()=>p(_));var I=s(P,2),L=c(I),ee=c(L),ne=c(ee),re=c(ne),ae=c(re,!0);F(re);var oe=s(re),z=c(oe,!0);F(oe);var B=s(oe),se=c(B,!0);F(B);var ce=s(B),ue=c(ce,!0);F(ce);var de=s(ce),pe=c(de,!0);F(de),F(ne),F(ee);var me=s(ee);le(me,5,()=>p(i),e=>e.key,(e,t)=>{var n=SV(),i=c(n),a=c(i);F(i);var o=s(i),u=c(o,!0);F(o);var m=s(o),_=c(m,!0);F(m);var v=s(m),y=c(v,!0);F(v);var b=s(v),x=c(b,!0);F(b),F(n),g((e,n,i,o)=>{r(a,`${p(t),l(()=>p(t).name)??``} · ${p(t),l(()=>p(t).planLabel)??``}`),r(u,e),r(_,n),r(y,i),r(x,o)},[()=>(d(h()),p(t),l(()=>h().money(p(t).paid))),()=>(d(h()),p(t),l(()=>h().money(p(t).worth))),()=>(d(h()),p(t),l(()=>h().ratio(p(t).ratio,p(t).bound))),()=>(d(h()),p(t),l(()=>h().tokens(p(t).tokens)))]),f(e,n)}),F(me),F(L),F(I),F(N),T(N,e=>b(v,e),()=>p(v)),g((e,t,n,i,a,o)=>{k(L,`aria-label`,e),r(ae,t),r(z,n),r(se,i),r(ue,a),r(pe,o)},[()=>l(()=>D(`planValueChartLabel`)),()=>l(()=>D(`plans`)),()=>l(()=>D(`planValuePaid`)),()=>l(()=>D(`planValueWorth`)),()=>l(()=>D(`planValueRatio`)),()=>l(()=>D(`tokens`))]),f(e,N),C()}function TV(e,t,n,r,i){return e.flatMap(e=>{let a=t===`tokens`?e.recordedTokens:e.retailEquivalent.amount,o=t===`tokens`?e.tokenShare:e.retailShare;return e.includedInHeadline===!1||a===null||o===null||a<=0||o<=0?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,value:a,share:o,color:n(e.providerId,e.billingDomainId),formattedValue:r(a),formattedShare:i(o)}]})}function EV(e,t,n=`Unavailable`,r=!0){return{animation:r,animationDuration:r?360:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n,left:`center`,top:`38%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},legend:{show:e.length>0,type:`scroll`,left:`center`,right:`center`,bottom:0,orient:`horizontal`,icon:`circle`,itemWidth:8,itemHeight:8,itemGap:16,pageButtonGap:7,pageIconSize:9,pageIconColor:t.text,pageIconInactiveColor:t.border,pageTextStyle:{color:t.muted,fontSize:10},textStyle:{color:t.muted,fontSize:11},formatter:e=>e.length>18?`${e.slice(0,17)}…`:e,tooltip:{show:!0,formatter:r=>kV(OV(r,e),t,n)}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`provider-share-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>kV(DV(e),t,n)},series:[{type:`pie`,radius:[`48%`,`70%`],center:[`50%`,`42%`],minAngle:2,avoidLabelOverlap:!0,padAngle:1.5,itemStyle:{borderColor:t.surface,borderWidth:3,borderRadius:5},label:{show:!1},labelLine:{show:!1},emphasis:{scale:!0,scaleSize:7,itemStyle:{shadowBlur:14,shadowColor:`rgba(0, 0, 0, 0.22)`}},data:e.map(e=>({...e,itemStyle:{color:e.color}}))}]}}function DV(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`?null:t}function OV(e,t){if(!e||typeof e!=`object`||!(`name`in e))return null;let n=e.name;return typeof n==`string`?t.find(e=>e.name===n)??null:null}function kV(e,t,n){return e?[`<strong>${AV(e.name)}</strong>`,`<span style="color:${AV(t.muted)}">${AV(e.billingDomainDisplayName)}</span>`,`<span>${AV(e.formattedValue)} · ${AV(e.formattedShare)}</span>`].join(`<br>`):n}function AV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var jV=t(`<tr><td> </td><td> </td><td> </td></tr>`),MV=t(`<div class="provider-share-chart-root svelte-15bk8av"><div class="provider-share-echarts svelte-15bk8av" data-testid="provider-share-chart" data-chart-engine="echarts"></div> <div class="provider-share-data svelte-15bk8av"><table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function NV(e,t){te(t,!1);let i=y(),a=y();fM([kE,$z,ZR,ez,oB,AB]);let u=S(t,`providers`,8),m=S(t,`metric`,8),h=S(t,`currency`,8),_=S(t,`locale`,24,()=>we(``)),v=S(t,`formatUsageMetric`,8),x=S(t,`formatPercent`,8),w=y(null),E=y(null),D=y(null),O=null,A=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function j(e){return Te(_(),e)}function M(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function N(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function P(){let e=p(E)??p(w);e&&b(A,{text:N(e,`--text-strong`,p(A).text),muted:N(e,`--muted`,p(A).muted),surface:N(e,`--surface-subtle`,p(A).surface),border:N(e,`--border`,p(A).border)})}async function I(e){p(D)&&(p(D).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(D).resize())}ie(()=>{if(p(w))return P(),b(D,Kj(p(w),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(D).getDom().setAttribute(`aria-hidden`,`true`),O=new ResizeObserver(()=>p(D)?.resize()),O.observe(p(w)),window.addEventListener(Ee,P),()=>{window.removeEventListener(Ee,P),O?.disconnect(),O=null,p(D)?.dispose(),b(D,null)}}),fe(()=>(d(u()),d(m()),d(v()),d(h()),d(x())),()=>{b(i,TV(u(),m(),qB,e=>v()(e,h(),m()),x()))}),fe(()=>(p(i),p(A)),()=>{b(a,EV(p(i),p(A),j(`notAvailable`),!M()))}),fe(()=>(p(D),p(a)),()=>{p(D)&&I(p(a))}),n(),R();var L=MV(),ee=c(L);T(ee,e=>b(w,e),()=>p(w));var ne=s(ee,2),re=c(ne),ae=c(re),oe=c(ae),z=c(oe),B=c(z,!0);F(z);var se=s(z),ce=c(se,!0);F(se);var ue=s(se),de=c(ue,!0);F(ue),F(oe),F(ae);var pe=s(ae);le(pe,5,()=>p(i),e=>e.key,(e,t)=>{var n=jV(),i=c(n),a=c(i);F(i);var o=s(i),u=c(o,!0);F(o);var d=s(o),m=c(d,!0);F(d),F(n),g(()=>{r(a,`${p(t),l(()=>p(t).name)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``}`),r(u,(p(t),l(()=>p(t).formattedValue))),r(m,(p(t),l(()=>p(t).formattedShare)))}),f(e,n)}),F(pe),F(re),F(ne),F(L),T(L,e=>b(E,e),()=>p(E)),g((e,t,n,i)=>{k(re,`aria-label`,e),r(B,t),r(ce,n),r(de,i)},[()=>l(()=>j(`providerShare`)),()=>l(()=>j(`providersLabel`)),()=>(d(m()),l(()=>m()===`tokens`?j(`tokens`):j(`cost`))),()=>(d(m()),l(()=>m()===`tokens`?j(`tokenShare`):j(`costShare`)))]),f(e,L),C()}var PV=6e4,FV=300,IV=1440,LV=20160;function RV(e){if(typeof e.windowDurationMinutes==`number`&&Number.isFinite(e.windowDurationMinutes)&&e.windowDurationMinutes>0)return e.windowDurationMinutes;let t=e.label.trim().toLowerCase();if(/\b5[- ]?hours?\b/.test(t))return FV;if(/\bweeks?\b|\bweekly\b/.test(t))return 10080;if(/\bmonths?\b|\bmonthly\b/.test(t))return 43200;let n=t.match(/\b(\d+(?:\.\d+)?)\s*(minutes?|hours?|days?)\b/);if(!n)return null;let r=Number(n[1]);return!Number.isFinite(r)||r<=0?null:n[2].startsWith(`day`)?r*24*60:n[2].startsWith(`hour`)?r*60:r}function zV(e,t,n,r,i=`UTC`){let a=BV(t,n,r,i),o=e.flatMap(e=>{let n=GV(e,t);return!n||!n.bucket.resetsAt?[]:[{id:`${e.providerId}:${e.billingDomainId}`,providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainId:e.billingDomainId,billingDomainDisplayName:e.billingDomainDisplayName,selectedLabel:n.bucket.label,durationMinutes:n.durationMinutes,usedPercent:n.bucket.usedPercent,resetsAt:n.bucket.resetsAt,authority:n.bucket.authority,observedAt:n.bucket.observedAt??e.observedAt}]});return{mode:t,range:a,lanes:o,windows:o.flatMap(e=>qV(e,a,r)),nowMs:r}}function BV(e,t,n,r=`UTC`){let i=VV(n,r);if(e===`session`){let e=HV(i,t),n=HV(e,3);return{startMs:UV(e,r),endMs:UV(n,r)}}let a=HV(i,-new Date(Date.UTC(i.year,i.month-1,i.day)).getUTCDay()+t*7),o=HV(a,14);return{startMs:UV(a,r),endMs:UV(o,r)}}function VV(e,t){let n=new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(e),r=e=>Number(n.find(t=>t.type===e)?.value);return{year:r(`year`),month:r(`month`),day:r(`day`)}}function HV(e,t){let n=new Date(Date.UTC(e.year,e.month-1,e.day+t));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate()}}function UV(e,t){let n=Date.UTC(e.year,e.month-1,e.day),r=n;for(let e=0;e<2;e+=1){let e=WV(r,t),i=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second);r+=n-i}return r}function WV(e,t){let n=new Intl.DateTimeFormat(`en-GB`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`}).formatToParts(e),r=e=>Number(n.find(t=>t.type===e)?.value);return{year:r(`year`),month:r(`month`),day:r(`day`),hour:r(`hour`),minute:r(`minute`),second:r(`second`)}}function GV(e,t){return e.quotaBuckets.flatMap(e=>{let n=RV(e),r=e.resetsAt?Date.parse(e.resetsAt):NaN;return!n||!Number.isFinite(r)||t===`session`&&n!==FV||t===`weekly`&&(n<IV||n>LV)?[]:[{bucket:e,durationMinutes:n}]}).sort((e,t)=>{let n=t.durationMinutes-e.durationMinutes;if(n!==0)return n;let r=KV(e.bucket)-KV(t.bucket);return r===0?e.bucket.id.localeCompare(t.bucket.id):r})[0]??null}function KV(e){let t=e.label.toLowerCase();return/all models|^week$|^weekly limit$/.test(t)?0:/fable|spark|model/.test(t)?2:1}function qV(e,t,n){let r=Date.parse(e.resetsAt),i=e.durationMinutes*PV;if(!Number.isFinite(r)||!(i>0)||t.endMs<=t.startMs||Math.ceil((t.endMs-t.startMs)/i)+2>1e3)return[];let a=r+Math.ceil((t.startMs-r)/i)*i,o=[];for(;a-i<t.endMs;){let s=a-i,c=Math.max(s,t.startMs),l=Math.min(a,t.endMs);if(l>c){let t=a<=n?`elapsed`:s<=n?`current`:`upcoming`,i=t===`current`&&a===r;o.push({laneId:e.id,providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,label:e.selectedLabel,startMs:s,endMs:a,visibleStartMs:c,visibleEndMs:l,state:t,usedPercent:i?e.usedPercent:null,authority:i?e.authority:`estimate`,observedAt:e.observedAt})}a+=i}return o}var JV=t(`<p class="quota-timeline-empty svelte-1oyi7sq" role="status"> </p>`),YV=t(`<div class="quota-timeline-scroll svelte-1oyi7sq"><div class="quota-timeline-chart svelte-1oyi7sq"></div></div>`),XV=t(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),ZV=t(`<section class="quota-timeline svelte-1oyi7sq" data-testid="quota-timeline" data-chart-engine="echarts" aria-labelledby="quota-timeline-heading"><header class="svelte-1oyi7sq"><div><h2 id="quota-timeline-heading" class="svelte-1oyi7sq"> </h2> <p class="quota-timeline-range svelte-1oyi7sq"> </p></div> <div class="quota-timeline-controls svelte-1oyi7sq"><div class="quota-timeline-navigation svelte-1oyi7sq"><button type="button" class="svelte-1oyi7sq">‹</button> <button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq">›</button></div> <div class="quota-timeline-modes svelte-1oyi7sq" role="group"><button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq"> </button></div></div></header> <div class="quota-timeline-legend svelte-1oyi7sq" aria-hidden="true"><ul class="quota-timeline-legend-items svelte-1oyi7sq"><li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-solid svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-outline svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-dashed svelte-1oyi7sq"></span> </li></ul></div> <!> <div class="quota-timeline-data svelte-1oyi7sq"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></section>`);function QV(e,t){te(t,!1);let a=y(),m=y(),h=y(),_=y(),v=y(),x=`agent-usage:theme-changed`;fM([CL,vR,Dz,ZR,oB,AB]);let E=S(t,`providers`,8),D=S(t,`locale`,24,()=>we(``)),O=S(t,`timeZone`,8,`UTC`),A=S(t,`now`,24,()=>Date.now()),j=y(null),M=y(null),P=y(null),I=null,L=y(`weekly`),ee=y(0),ne=y({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`,grid:`rgba(122, 136, 164, 0.16)`});function ie(e){return Te(D(),e)}function ae(e,t){let n=new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,timeZone:O()});return`${n.format(e)} – ${n.format(t-1)}`}function oe(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:O()}).format(e)}function z(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,...p(L)===`session`?{hour:`2-digit`}:{},hour12:!1,timeZone:O()}).format(e)}function B(e){return ie({elapsed:`quotaTimelineElapsed`,current:`quotaTimelineCurrent`,upcoming:`quotaTimelineUpcoming`}[e])}function se(e){return ie({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`}[e])}function ue(e){b(L,e),b(ee,0)}function de(e){return e===`current`?.34:e===`upcoming`?.12:.08}function pe(e,t,n,r,i,a){let o=e.windows.map(t=>{let n=e.lanes.findIndex(e=>e.id===t.laneId);return{value:[n,t.visibleStartMs,t.visibleEndMs],window:t,color:qB(t.providerId,e.lanes[n].billingDomainId)}}),s=a>=e.range.startMs&&a<e.range.endMs;return{animation:!ve(),animationDuration:ve()?0:320,aria:{enabled:!0,decal:{show:!1}},grid:{left:156,right:18,top:42,bottom:14},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`quota-timeline-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter(e){let t=me(e);if(!t)return``;let n=t.usedPercent===null?``:`<br/><strong>${he(t.usedPercent)}% ${_e(ie(`used`))}</strong>`,r=t.observedAt?oe(Date.parse(t.observedAt)):`—`;return`<strong>${_e(t.providerDisplayName)}</strong> · ${_e(t.billingDomainDisplayName)}<br/>${_e(t.label)} · ${_e(B(t.state))}<br/>${_e(oe(t.startMs))} → ${_e(oe(t.endMs))}${n}<br/>${_e(ie(`source`))}: ${_e(se(t.authority))} · ${_e(ie(`updated`))}: ${_e(r)}`}},xAxis:{type:`time`,position:`top`,min:e.range.startMs,max:e.range.endMs,splitNumber:i===`weekly`?14:12,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:10,formatter:z},splitLine:{show:!0,lineStyle:{color:t.grid}}},yAxis:{type:`category`,inverse:!0,data:e.lanes.map(e=>`${e.providerDisplayName}\n${e.billingDomainDisplayName}`),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:(n,r)=>{let i=e.lanes[r];return i?qB(i.providerId,i.billingDomainId):t.text},fontSize:12,fontWeight:600,width:136,overflow:`truncate`,lineHeight:16,formatter:e=>`● ${e}`},splitLine:{show:!0,lineStyle:{color:t.grid}}},series:[{type:`custom`,name:ie(`quotaTimelineTitle`),encode:{x:[1,2],y:0},data:o,renderItem(e,n){let r=o[e.dataIndex]??null,i=Number(n.value(0)),a=n.coord([n.value(1),i]),s=n.coord([n.value(2),i]),c=Math.max(18,Math.min(26,n.size([0,1])[1]*.46)),l=Math.max(1,s[0]-a[0]),u=r??o.find(e=>e.value[0]===i&&e.value[1]===n.value(1));if(!u)return null;let d=[{type:`rect`,shape:{x:a[0],y:a[1]-c/2,width:l,height:c,r:8},style:{fill:ge(u.color,de(u.window.state)),stroke:ge(u.color,u.window.state===`current`?.72:.38),lineWidth:1,lineDash:u.window.state===`upcoming`?[4,3]:void 0}}];return u.window.usedPercent!==null&&d.push({type:`rect`,shape:{x:a[0],y:a[1]-c/2,width:l*Math.min(100,Math.max(0,u.window.usedPercent))/100,height:c,r:8},style:{fill:ge(u.color,.58)}}),l>86&&u.window.state===`current`&&d.push({type:`text`,style:{x:a[0]+8,y:a[1],text:`${he(u.window.usedPercent)}% · ${oe(u.window.endMs)}`,fill:t.text,font:`600 10px Inter, system-ui, sans-serif`,verticalAlign:`middle`,width:Math.max(0,l-16),overflow:`truncate`}}),{type:`group`,children:d}},markLine:s?{silent:!0,symbol:`none`,lineStyle:{color:t.muted,width:1,opacity:.72},label:{show:!1},data:[{xAxis:a}]}:void 0}]}}function me(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`||!(`window`in t)?null:t.window}function he(e){return e===null?`—`:new Intl.NumberFormat(D(),{maximumFractionDigits:1}).format(e)}function ge(e,t){let n=e.replace(`#`,``);return/^[0-9a-f]{6}$/i.test(n)?`rgba(${Number.parseInt(n.slice(0,2),16)}, ${Number.parseInt(n.slice(2,4),16)}, ${Number.parseInt(n.slice(4,6),16)}, ${t})`:e}function _e(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function ve(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function ye(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function be(){let e=p(M)??p(j);e&&b(ne,{text:ye(e,`--text-strong`,p(ne).text),muted:ye(e,`--muted`,p(ne).muted),surface:ye(e,`--surface-subtle`,p(ne).surface),border:ye(e,`--border`,p(ne).border),grid:ye(e,`--border-soft`,p(ne).grid)})}async function xe(e){p(P)&&(p(P).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(P).resize())}function Se(e){return b(j,e),be(),b(P,Kj(e,void 0,{renderer:`canvas`,useDirtyRect:!0})),p(P).getDom().setAttribute(`aria-hidden`,`true`),I=new ResizeObserver(()=>p(P)?.resize()),I.observe(e),window.addEventListener(x,be),xe(p(v)),{destroy(){window.removeEventListener(x,be),I?.disconnect(),I=null,p(P)?.dispose(),b(P,null),p(j)===e&&b(j,null)}}}fe(()=>(d(E()),d(A()),d(O())),()=>{b(a,zV(E(),`weekly`,0,A(),O()))}),fe(()=>(d(E()),p(L),p(ee),d(A()),d(O())),()=>{b(m,zV(E(),p(L),p(ee),A(),O()))}),fe(()=>p(m),()=>{b(h,ae(p(m).range.startMs,p(m).range.endMs))}),fe(()=>p(m),()=>{b(_,Math.max(188,70+p(m).lanes.length*48))}),fe(()=>(p(m),p(ne),d(D()),d(O()),p(L),d(A())),()=>{b(v,pe(p(m),p(ne),D(),O(),p(L),A()))}),fe(()=>(p(P),p(v)),()=>{p(P)&&xe(p(v))}),n(),R();var Ce=N(),Ee=re(Ce),De=e=>{var t=ZV(),n=c(t),a=c(n),o=c(a),d=c(o,!0);F(o);var v=s(o,2),y=c(v);F(v),F(a);var x=s(a,2),S=c(x),C=c(S),E=s(C,2),D=c(E,!0);F(E);var O=s(E,2);F(S);var A=s(S,2),N=c(A),P=c(N,!0);F(N);var I=s(N,2),R=c(I,!0);F(I),F(A),F(x),F(n);var te=s(n,2),ne=c(te),re=c(ne),ae=s(c(re));F(re);var z=s(re,2),B=s(c(z));F(z);var de=s(z,2),fe=s(c(de));F(de),F(ne),F(te);var pe=s(te,2),me=e=>{var t=JV(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>ie(`quotaTimelineEmpty`))]),f(e,t)},ge=e=>{var t=YV(),n=c(t);T(n,e=>b(j,e),()=>p(j)),w(n,e=>Se?.(e)),F(t),g(()=>ce(n,`height: ${p(_)}px`)),f(e,t)};i(pe,e=>{p(m),l(()=>p(m).lanes.length===0)?e(me):e(ge,-1)});var _e=s(pe,2),ve=c(_e),ye=c(ve),be=c(ye),xe=c(be),Ce=c(xe,!0);F(xe);var we=s(xe),Te=c(we,!0);F(we);var Ee=s(we),De=c(Ee,!0);F(Ee);var Oe=s(Ee),ke=c(Oe,!0);F(Oe);var Ae=s(Oe),je=c(Ae,!0);F(Ae);var Me=s(Ae),Ne=c(Me,!0);F(Me);var Pe=s(Me),Fe=c(Pe,!0);F(Pe),F(be),F(ye);var Ie=s(ye);le(Ie,5,()=>(p(m),l(()=>p(m).lanes)),e=>e.id,(e,t)=>{var n=XV(),i=c(n),a=c(i,!0);F(i);var o=s(i),u=c(o,!0);F(o);var d=s(o),m=c(d,!0);F(d);var h=s(d),_=c(h,!0);F(h);var v=s(h),y=c(v,!0);F(v);var b=s(v),x=c(b,!0);F(b);var S=s(b),C=c(S,!0);F(S),F(n),g((e,n,i,o)=>{r(a,(p(t),l(()=>p(t).providerDisplayName))),r(u,(p(t),l(()=>p(t).billingDomainDisplayName))),r(m,(p(t),l(()=>p(t).selectedLabel))),r(_,e),r(y,n),r(x,i),r(C,o)},[()=>(p(t),l(()=>p(t).usedPercent===null?`—`:`${he(p(t).usedPercent)}%`)),()=>(p(t),l(()=>oe(Date.parse(p(t).resetsAt)))),()=>(p(t),l(()=>se(p(t).authority))),()=>(p(t),l(()=>p(t).observedAt?oe(Date.parse(p(t).observedAt)):`—`))]),f(e,n)}),F(Ie),F(ve),F(_e),F(t),T(t,e=>b(M,e),()=>p(M)),g((e,n,i,a,o,s,c,u,f,g,_,v,b,x,S,w,T,j,M,F)=>{k(t,`data-lane-count`,(p(m),l(()=>p(m).lanes.length))),r(d,e),r(y,`${p(h)??``} · ${n??``}`),k(C,`aria-label`,i),E.disabled=p(ee)===0,k(E,`aria-label`,a),r(D,o),k(O,`aria-label`,s),k(A,`aria-label`,c),k(N,`aria-pressed`,p(L)===`weekly`),r(P,u),k(I,`aria-pressed`,p(L)===`session`),r(R,f),r(ae,` ${g??``}`),r(B,` ${_??``}`),r(fe,` ${v??``}`),k(ve,`aria-label`,b),r(Ce,x),r(Te,S),r(De,w),r(ke,T),r(je,j),r(Ne,M),r(Fe,F)},[()=>l(()=>ie(`quotaTimelineTitle`)),()=>l(()=>ie(`quotaTimelineCurrentRange`)),()=>l(()=>ie(`quotaTimelinePrevious`)),()=>l(()=>ie(`quotaTimelineToday`)),()=>l(()=>ie(`quotaTimelineToday`)),()=>l(()=>ie(`quotaTimelineNext`)),()=>l(()=>ie(`quotaTimelineModes`)),()=>l(()=>ie(`quotaTimelineWeekly`)),()=>l(()=>ie(`quotaTimelineFiveHour`)),()=>l(()=>ie(`quotaTimelineCurrent`)),()=>l(()=>ie(`quotaTimelineElapsed`)),()=>l(()=>ie(`quotaTimelineUpcoming`)),()=>l(()=>ie(`quotaTimelineData`)),()=>l(()=>ie(`providersLabel`)),()=>l(()=>ie(`quotaTimelineAccount`)),()=>l(()=>ie(`quota`)),()=>l(()=>ie(`used`)),()=>l(()=>ie(`resets`)),()=>l(()=>ie(`source`)),()=>l(()=>ie(`updated`))]),u(`click`,C,()=>b(ee,p(ee)-1)),u(`click`,E,()=>b(ee,0)),u(`click`,O,()=>b(ee,p(ee)+1)),u(`click`,N,()=>ue(`weekly`)),u(`click`,I,()=>ue(`session`)),f(e,t)};i(Ee,e=>{p(a),l(()=>p(a).lanes.length>0)&&e(De)}),f(e,Ce),C()}var $V=t(`<span></span>`),eH=t(`<div class="trend-hover-line svelte-1axsv0d"></div>`),tH=t(`<span class="svelte-1axsv0d"> </span>`),nH=t(`<span class="svelte-1axsv0d"><b class="svelte-1axsv0d"> </b> <small class="svelte-1axsv0d"> </small></span>`),rH=t(`<div class="trend-tooltip svelte-1axsv0d" data-testid="trend-tooltip" role="tooltip"><strong class="svelte-1axsv0d"> </strong> <!></div>`),iH=t(`<span class="svelte-1axsv0d"><i class="svelte-1axsv0d"></i> <!></span>`),aH=t(`<tr><td> </td><td> </td></tr>`),oH=t(`<article class="workbench-trend svelte-1axsv0d"><div class="trend-heading svelte-1axsv0d"><div class="svelte-1axsv0d"><span class="svelte-1axsv0d"> </span> <strong class="svelte-1axsv0d"> </strong></div> <div class="trend-interactions svelte-1axsv0d"><span class="svelte-1axsv0d"> </span> <div class="trend-zoom-controls svelte-1axsv0d" role="group"><button type="button" class="svelte-1axsv0d">−</button> <button type="button" class="svelte-1axsv0d">+</button> <button type="button" class="svelte-1axsv0d">↺</button></div></div></div> <div class="trend-chart svelte-1axsv0d" data-testid="usage-trend-chart"><div data-testid="trend-plot" role="slider" aria-valuemin="0" tabindex="0"><div class="trend-echarts svelte-1axsv0d"></div> <div class="trend-series-markers svelte-1axsv0d" aria-hidden="true"></div> <!> <!></div></div> <div class="trend-legend svelte-1axsv0d" aria-hidden="true"></div> <div class="trend-data svelte-1axsv0d"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table></div></article>`);function sH(e,t){te(t,!1);let a=y(),m=y(),h=y(),_=y(),v=y(),x=y(),w=y();fM([lS,vR,AB]);let E=S(t,`buckets`,8),D=S(t,`metric`,8),O=S(t,`currency`,8),A=S(t,`locale`,24,()=>we(``)),j=S(t,`selectedWindow`,8),P=S(t,`timeZone`,8),I=S(t,`granularity`,8),L=S(t,`rangeLabel`,8),ee=S(t,`formatUsageMetric`,8),ne=S(t,`describeSegment`,8),ae=y(null),z=y(null),B=y(null),se=null,ue=y(0),pe=y(null),me=y(null),he=y(null),ge=y(!1),_e=y(UB),ve=y(WB);function ye(e){return Te(A(),e)}function be(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function xe(e,t){let n=document.createElement(`span`);n.style.color=t,n.style.position=`absolute`,n.style.visibility=`hidden`,e.appendChild(n);let r=getComputedStyle(n).color;return n.remove(),r}function Se(){let e=p(z)??p(ae);if(!e)return;let t=getComputedStyle(e).getPropertyValue(`--trend-grid-line`).trim(),n=getComputedStyle(e).getPropertyValue(`--muted`).trim(),r=t?xe(e,t):``,i=n?xe(e,n):``;b(_e,r&&r!==`rgba(0, 0, 0, 0)`?r:UB),b(ve,i&&i!==`rgba(0, 0, 0, 0)`?i:WB)}function Ce(e){if(p(B)){let t=p(B).convertToPixel({xAxisIndex:0},e),n=p(B).convertToPixel({yAxisIndex:0},Math.max(1,p(_)??1)),r=p(B).convertToPixel({yAxisIndex:0},0);if(Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(r))return`left: ${t}px; top: ${n}px; height: ${Math.max(0,r-n)}px`}return`left: ${nV(e,p(m).length)}%; top: 16px; bottom: 28px`}function De(){b(ue,0),b(pe,null),b(me,null),b(he,null),b(ge,!1)}function Oe(e,t=.5){let n=YB(E().length,p(ue),p(pe),e,t);b(ue,n.start),b(pe,n.size),b(me,null)}function ke(e){if(e.deltaY===0)return;let t=e.currentTarget instanceof HTMLElement?e.currentTarget.getBoundingClientRect():null,n=t?.width?(e.clientX-t.left)/t.width:.5;Oe(e.deltaY<0?`in`:`out`,n)}function Ae(e){if(!(e.currentTarget instanceof HTMLElement)||p(m).length===0)return;let t=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));b(me,Math.round(n*Math.max(0,p(m).length-1)))}function je(e){!(e.currentTarget instanceof HTMLElement)||p(a).size>=E().length||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),b(he,{clientX:e.clientX,viewportStart:p(a).start}),b(ge,!0))}function Me(e){if(Ae(e),!p(he)||!(e.currentTarget instanceof HTMLElement))return;let t=e.currentTarget.getBoundingClientRect(),n=Math.round((p(he).clientX-e.clientX)/t.width*p(a).size);b(ue,Math.max(0,Math.min(E().length-p(a).size,p(he).viewportStart+n)))}function Ne(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),b(he,null),b(ge,!1)}function Pe(e){b(ue,XB(E().length,p(ue),p(pe),e)),b(me,null)}function Fe(e){if(e.key===`+`||e.key===`=`)Oe(`in`);else if(e.key===`-`)Oe(`out`);else if(e.key===`ArrowLeft`)Pe(-1);else if(e.key===`ArrowRight`)Pe(1);else if(e.key===`Home`)De();else return;e.preventDefault()}async function Ie(e){p(B)&&(p(B).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(B).resize())}ie(()=>{if(p(ae))return Se(),b(B,Kj(p(ae),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(B).getDom().setAttribute(`aria-hidden`,`true`),se=new ResizeObserver(()=>p(B)?.resize()),se.observe(p(ae)),window.addEventListener(Ee,Se),()=>{window.removeEventListener(Ee,Se),se?.disconnect(),se=null,p(B)?.dispose(),b(B,null)}}),fe(()=>(d(E()),p(ue),p(pe)),()=>{b(a,JB(E().length,p(ue),p(pe)))}),fe(()=>(d(E()),p(a)),()=>{b(m,E().slice(p(a).start,p(a).start+p(a).size))}),fe(()=>(p(m),d(D())),()=>{b(h,$B(p(m),D()))}),fe(()=>p(h),()=>{b(_,eV(p(h)))}),fe(()=>p(h),()=>{b(v,p(h).filter((e,t)=>p(h).findIndex(t=>t.providerId===e.providerId&&t.billingDomainId===e.billingDomainId)===t))}),fe(()=>(p(me),p(m)),()=>{b(x,p(me)===null?null:p(m)[p(me)])}),fe(()=>(p(m),p(h),p(_),p(_e),p(ve),p(ge),d(ee()),d(O()),d(D())),()=>{b(w,iV(p(m).map(e=>e.label),p(h),p(_),{gridLine:p(_e),label:p(ve)},!p(ge)&&!be(),e=>ee()(e,O(),D())))}),fe(()=>(p(B),p(w)),()=>{p(B)&&Ie(p(w))}),n(),R();var Le=oH(),Re=c(Le),ze=c(Re),Be=c(ze),Ve=c(Be,!0);F(Be);var He=s(Be,2),Ue=c(He,!0);F(He),F(ze);var We=s(ze,2),V=c(We),Ge=c(V,!0);F(V);var Ke=s(V,2),qe=c(Ke),Je=s(qe,2),Ye=s(Je,2);F(Ke),F(We),F(Re);var Xe=s(Re,2),Ze=c(Xe);let Qe;var $e=c(Ze);T($e,e=>b(ae,e),()=>p(ae));var et=s($e,2);le(et,5,()=>p(h),e=>e.key,(e,t)=>{var n=$V();g(e=>{k(n,`data-cost-purpose`,(p(t),l(()=>p(t).costPurpose??`tokens`))),ce(n,e)},[()=>(p(t),d(qB),l(()=>p(t).costPurpose===`reported-estimate`?`fill: transparent; stroke: ${qB(p(t).providerId,p(t).billingDomainId)}`:`fill: ${qB(p(t).providerId,p(t).billingDomainId)}`))]),f(e,n)}),F(et);var tt=s(et,2),nt=e=>{var t=eH();g(e=>ce(t,e),[()=>(p(me),l(()=>Ce(p(me))))]),f(e,t)};i(tt,e=>{p(me),p(m),l(()=>p(me)!==null&&p(m).length>0)&&e(nt)});var rt=s(tt,2),it=e=>{var t=rH(),n=c(t),a=c(n,!0);F(n);var o=s(n,2),u=e=>{var t=tH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>ye(`gap`))]),f(e,t)},h=e=>{var t=N(),n=re(t);le(n,1,()=>(p(x),l(()=>p(x).segments)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var n=nH(),i=c(n),a=c(i,!0);F(i);var o=s(i,2),u=c(o,!0);F(o),F(n),g(e=>{r(a,(p(t),l(()=>p(t).providerDisplayName))),r(u,e)},[()=>(d(ne()),p(t),d(D()),l(()=>ne()(p(t),D())))]),f(e,n)}),f(e,t)};i(o,e=>{p(x),l(()=>p(x).gap||p(x).segments.length===0)?e(u):e(h,-1)}),F(t),g(e=>{ce(t,e),r(a,(p(x),l(()=>p(x).label)))},[()=>(d(nV),p(me),p(m),l(()=>`left: ${nV(p(me)??0,p(m).length)}%`))]),f(e,t)};i(rt,e=>{p(x)&&e(it)}),F(Ze),F(Xe);var at=s(Xe,2);le(at,5,()=>p(v),e=>e.key,(e,t)=>{var n=iH(),a=c(n),o=s(a),u=s(o),m=e=>{var t=M();g(e=>r(t,`· ${e??``}`),[()=>l(()=>ye(`separateFromHeadline`))]),f(e,t)};i(u,e=>{p(t),l(()=>p(t).includedInHeadline===!1)&&e(m)}),F(n),g(e=>{ce(a,e),r(o,` ${p(t),l(()=>p(t).providerDisplayName)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``} `)},[()=>(d(qB),p(t),l(()=>`background: ${qB(p(t).providerId,p(t).billingDomainId)}`))]),f(e,n)}),F(at);var ot=s(at,2),st=c(ot),ct=c(st),lt=c(ct),ut=c(lt),dt=c(ut,!0);F(ut);var ft=s(ut),pt=c(ft,!0);F(ft),F(lt),F(ct);var H=s(ct);le(H,5,E,e=>e.start,(e,t)=>{var n=aH(),i=c(n),a=c(i,!0);F(i);var o=s(i),u=c(o,!0);F(o),F(n),g(e=>{r(a,(p(t),l(()=>p(t).label))),r(u,e)},[()=>(p(t),d(ne()),d(D()),l(()=>p(t).gap?ye(`gap`):p(t).segments.map(e=>ne()(e,D())).join(`; `)))]),f(e,n)}),F(H),F(st),F(ot),F(Le),T(Le,e=>b(z,e),()=>p(z)),g((e,t,n,i,o,s,c,u,f,m,h,g,_)=>{r(Ve,e),r(Ue,L()),r(Ge,t),k(Ke,`aria-label`,n),k(qe,`aria-label`,i),qe.disabled=p(pe)===null,k(Je,`aria-label`,o),Je.disabled=s,k(Ye,`aria-label`,c),Ye.disabled=p(pe)===null&&p(ue)===0,Qe=de(Ze,1,`trend-plot svelte-1axsv0d`,null,Qe,{"trend-panning":p(ge)}),k(Ze,`data-total-buckets`,(d(E()),l(()=>E().length))),k(Ze,`data-visible-buckets`,(p(a),l(()=>p(a).size))),k(Ze,`data-viewport-start`,(p(a),l(()=>p(a).start))),k(Ze,`aria-label`,u),k(Ze,`aria-valuemax`,f),k(Ze,`aria-valuenow`,(p(a),l(()=>p(a).start))),k(Ze,`aria-valuetext`,m),k(st,`aria-label`,h),r(dt,g),r(pt,_)},[()=>(d(D()),l(()=>D()===`tokens`?ye(`tokenTrend`):ye(`costTrend`))),()=>l(()=>ye(`trendInteractionHint`)),()=>l(()=>ye(`timeAxisControls`)),()=>l(()=>ye(`zoomOutTimeAxis`)),()=>l(()=>ye(`zoomInTimeAxis`)),()=>(p(pe),d(E()),d(4),l(()=>(p(pe)??E().length)<=Math.min(4,E().length))),()=>l(()=>ye(`resetTimeAxis`)),()=>l(()=>ye(`interactiveTrend`)),()=>(d(E()),p(a),l(()=>Math.max(0,E().length-p(a).size))),()=>(p(m),l(()=>`${p(m)[0]?.label??`—`} – ${p(m).at(-1)?.label??`—`}`)),()=>(d(j()),d(P()),d(I()),l(()=>`${ye(`trendData`)} · ${j()} · ${P()} · ${I()===`hour`?ye(`precisionHour`):ye(`precisionDay`)} · ${ye(`trendSummary`)}`)),()=>l(()=>ye(`interval`)),()=>(d(D()),l(()=>D()===`tokens`?ye(`tokens`):ye(`cost`)))]),u(`click`,qe,()=>Oe(`out`)),u(`click`,Je,()=>Oe(`in`)),u(`click`,Ye,()=>De()),u(`wheel`,Ze,oe(ke)),u(`pointerdown`,Ze,je),u(`pointermove`,Ze,Me),u(`pointerup`,Ze,Ne),u(`pointercancel`,Ze,Ne),u(`pointerleave`,Ze,()=>{p(he)||b(me,null)}),u(`keydown`,Ze,Fe),f(e,Le),C()}var cH=t(`<link rel="icon" href="/brand/agent-usage-logo.svg"/> <meta name="description"/>`,1),lH=t(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab" aria-busy="true"><section class="token-money-workbench initial-workbench-loading svelte-1uha8ag"><p class="module-progress svelte-1uha8ag" role="status" data-testid="model-costs-initial-status"> </p></section></div>`),uH=t(`<div class="state error svelte-1uha8ag" role="alert"> </div>`),dH=t(`<div class="inline-error svelte-1uha8ag" role="status"> </div>`),fH=t(`<div class="state compact svelte-1uha8ag"> </div>`),pH=t(`<div class="agent-skeleton-quota-row svelte-1uha8ag"><div class="agent-skeleton-quota-copy svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i> <i class="agent-skeleton-block svelte-1uha8ag"></i></div> <i class="agent-skeleton-block agent-skeleton-progress svelte-1uha8ag"></i> <i class="agent-skeleton-block agent-skeleton-meta svelte-1uha8ag"></i></div>`),mH=t(`<div class="agent-card-skeleton-overlay svelte-1uha8ag" aria-hidden="true"><div class="agent-card-skeleton-content svelte-1uha8ag"><div class="agent-skeleton-section-label svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i></div> <div class="agent-skeleton-quota-list svelte-1uha8ag"></div></div></div>`),hH=t(`<img class="provider-logo svelte-1uha8ag" alt=""/>`),gH=t(`<span class="connection-chip svelte-1uha8ag"><span class="visually-hidden svelte-1uha8ag"> </span> <button class="svelte-1uha8ag"><span aria-hidden="true">⚙</span></button></span>`),_H=t(`<button type="button" role="tab" class="svelte-1uha8ag"> </button>`),vH=t(`<div class="domain-tabs svelte-1uha8ag" role="tablist"></div>`),yH=t(`<small class="svelte-1uha8ag"> </small>`),bH=t(`<label class="secret-field svelte-1uha8ag"><span> </span> <input type="password" autocomplete="off" class="svelte-1uha8ag"/></label>`),xH=t(`<button class="primary-action svelte-1uha8ag"> </button>`),SH=t(`<button class="svelte-1uha8ag"> </button>`),CH=t(`<details open=""><summary class="svelte-1uha8ag"><span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> </summary> <div class="inline-connection-body svelte-1uha8ag"><p class="permission svelte-1uha8ag"> </p> <div class="connection-meta svelte-1uha8ag"><span> </span> <span> </span></div> <div class="coverage-list svelte-1uha8ag"><span> </span> <strong class="svelte-1uha8ag"> </strong></div> <!> <div class="connection-actions svelte-1uha8ag"><!> <!> <!></div></div></details>`),wH=t(`<p class="quota-absent svelte-1uha8ag"> </p>`),TH=t(`<div class="quota-row svelte-1uha8ag"><div class="quota-copy svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span class="svelte-1uha8ag"> </span></div> <div role="progressbar" aria-valuemin="0" aria-valuemax="100"><span class="svelte-1uha8ag"></span></div> <span hidden=""> </span> <div class="quota-meta svelte-1uha8ag"><span> </span></div></div>`),EH=t(`<!> <div class="section-label svelte-1uha8ag"> </div> <!> <div class="quotas svelte-1uha8ag"></div>`,1),DH=t(`<article><!> <div class="provider-heading svelte-1uha8ag"><!> <div class="provider-heading-copy svelte-1uha8ag"><div class="provider-heading-top svelte-1uha8ag"><h2 class="svelte-1uha8ag"> </h2> <div class="provider-status svelte-1uha8ag"><div class="coverage svelte-1uha8ag"> </div> <!></div></div> <p class="freshness svelte-1uha8ag"><span class="svelte-1uha8ag"></span> <!></p></div></div> <!> <!></article>`),OH=t(`<div id="agent-usage-panel" data-testid="agent-usage-panel" role="tabpanel" aria-labelledby="agent-usage-tab"><section class="providers svelte-1uha8ag"></section> <!></div>`),kH=t(`<button type="button" class="svelte-1uha8ag"> </button>`),AH=t(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-summary-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),jH=t(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-analysis-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),MH=t(`<div class="plan-value-empty svelte-1uha8ag" data-testid="plan-value-empty"><p class="svelte-1uha8ag"> </p> <button type="button" class="svelte-1uha8ag"> </button></div>`),NH=t(`<div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div>`),PH=t(`<div class="plan-value-period svelte-1uha8ag" data-testid="plan-value-period"><div class="plan-value-period-heading svelte-1uha8ag"><span> </span> <span data-testid="plan-value-period-progress"> </span></div> <div class="plan-value-meter plan-value-period-meter svelte-1uha8ag" role="img"><span class="plan-value-meter-fill svelte-1uha8ag"></span> <span class="plan-value-pace svelte-1uha8ag"></span></div> <small> </small></div>`),FH=t(`<p class="plan-value-caveat svelte-1uha8ag"> </p>`),IH=t(`<li data-testid="plan-value-row" class="svelte-1uha8ag"><div class="plan-value-row-heading svelte-1uha8ag"><span class="plan-value-name svelte-1uha8ag"><span class="plan-value-swatch svelte-1uha8ag"></span> <strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></span> <span data-testid="plan-value-ratio"> </span></div> <div class="plan-value-meter svelte-1uha8ag" role="img"><span class="plan-value-meter-fill svelte-1uha8ag"></span> <span class="plan-value-break-even svelte-1uha8ag"></span></div> <dl class="plan-value-facts svelte-1uha8ag"><div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <!></dl> <!> <!></li>`),LH=t(`<div class="plan-value-body svelte-1uha8ag"><!> <ol class="plan-value-ranking svelte-1uha8ag" data-testid="plan-value-ranking"></ol></div> <p class="plan-value-note svelte-1uha8ag"> </p>`,1),RH=t(`<li class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span> </span> <span> </span></li>`),zH=t(`<li class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span> </span> <button type="button" class="svelte-1uha8ag"> </button></li>`),BH=t(`<ul class="plan-value-aside svelte-1uha8ag" data-testid="plan-value-aside"><!> <!></ul>`),VH=t(`<section class="plan-value svelte-1uha8ag" data-testid="plan-value" aria-labelledby="plan-value-heading"><div class="plan-value-heading svelte-1uha8ag"><h3 id="plan-value-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!> <!></section>`),HH=t(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-breakdown-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),UH=t(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!> <p class="treemap-hint svelte-1uha8ag"> </p></div>`),WH=t(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!></div>`),GH=t(`<img class="ranking-logo svelte-1uha8ag" alt=""/>`),KH=t(`<span class="model-share-track svelte-1uha8ag" data-testid="model-share-meter" role="meter" aria-valuemin="0" aria-valuemax="100"><i class="svelte-1uha8ag"></i></span>`),qH=t(`<li><button type="button" data-testid="model-ranking-row" class="svelte-1uha8ag"><span class="ranking-identity svelte-1uha8ag"><!> <span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small> <!></span></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span> <span class="ranking-value ranking-share-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span></button></li>`),JH=t(`<div role="tabpanel"><ol class="ranking-list svelte-1uha8ag"></ol></div>`),YH=t(`<section class="token-money-workbench svelte-1uha8ag" data-testid="token-money-workbench" aria-labelledby="token-money-workbench-heading"><div class="usage-toolbar svelte-1uha8ag"><div><h2 id="token-money-workbench-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong><span class="svelte-1uha8ag">/</span> </p></div> <div class="workbench-controls svelte-1uha8ag"><div class="segmented-control svelte-1uha8ag" role="group"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div> <div class="history-toolbar svelte-1uha8ag"></div> <div class="segmented-control svelte-1uha8ag" role="group"></div></div></div> <section class="usage-summary-board svelte-1uha8ag" data-testid="usage-summary-board"><!> <div class="usage-headline svelte-1uha8ag" data-testid="usage-headline"><strong class="svelte-1uha8ag"> </strong></div> <div class="usage-totals svelte-1uha8ag" data-testid="usage-totals" aria-labelledby="usage-totals-heading"><h3 id="usage-totals-heading" class="svelte-1uha8ag"> </h3> <dl class="svelte-1uha8ag"><div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div> <div class="svelte-1uha8ag"><dt class="svelte-1uha8ag"> </dt> <dd class="svelte-1uha8ag"> </dd></div></dl></div></section> <div class="usage-overview-grid svelte-1uha8ag" data-testid="usage-analysis-grid"><!> <section class="usage-summary svelte-1uha8ag" aria-labelledby="provider-share-heading"><div class="provider-share-heading svelte-1uha8ag"><h3 id="provider-share-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!></section> <!></div> <!> <section class="model-ranking svelte-1uha8ag" data-testid="usage-breakdown" aria-labelledby="model-ranking-heading"><!> <div class="ranking-heading svelte-1uha8ag"><div><h3 id="model-ranking-heading" class="svelte-1uha8ag"> </h3></div> <div class="segmented-control svelte-1uha8ag" role="tablist" data-testid="breakdown-view-tabs"><button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button></div></div> <div class="breakdown-header svelte-1uha8ag" aria-hidden="true"><span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span></div> <!></section></section>`),XH=t(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab"><!></div>`),ZH=t(`<!> <!> <!>`,1),QH=t(`<p class="settings-error svelte-1uha8ag" role="status"> </p>`),$H=t(`<article tabindex="-1"><div class="settings-connector-title svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <p class="svelte-1uha8ag"> </p> <small class="svelte-1uha8ag"> </small> <!> <div class="connection-actions svelte-1uha8ag"><!> <!> <!> <!></div></article>`),eU=t(`<option> </option>`),tU=t(`<div class="plan-settings-price svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.01" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="text" maxlength="3" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><option> </option><option> </option></select></label></div> <label class="svelte-1uha8ag"><span> </span> <input type="date" class="svelte-1uha8ag"/> <small class="svelte-1uha8ag"> </small></label>`,1),nU=t(`<label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><option> </option><!><option> </option></select></label> <!> <div class="plan-settings-actions svelte-1uha8ag"><button type="button" class="svelte-1uha8ag"> </button> <!></div>`,1),rU=t(`<article class="svelte-1uha8ag"><div class="plan-settings-heading svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></div> <!></article>`),iU=t(`<div class="plan-settings svelte-1uha8ag"></div>`),aU=t(`<label class="svelte-1uha8ag"><span> </span> <input type="text" required="" class="svelte-1uha8ag"/></label>`),oU=t(`<small class="custom-rate-empty svelte-1uha8ag"> </small>`),sU=t(`<form class="custom-rate-edit-form svelte-1uha8ag"><div class="custom-rate-edit-header svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></div> <div class="custom-rate-edit-fields svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <input type="text" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" class="svelte-1uha8ag"/></label></div> <div class="custom-rate-edit-actions svelte-1uha8ag"><button type="submit" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div></form>`),cU=t(`<div class="custom-rate-header svelte-1uha8ag"><div class="custom-rate-title-row svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span class="custom-rate-provider-badge svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small></div> <div class="custom-rate-details svelte-1uha8ag"><div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div> <div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div> <div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div></div> <div class="custom-rate-footer svelte-1uha8ag"><small class="custom-rate-updated-time svelte-1uha8ag"> </small> <div class="custom-rate-card-actions svelte-1uha8ag"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div></div>`,1),lU=t(`<article class="custom-rate-card svelte-1uha8ag"><!></article>`),uU=t(`<div class="custom-rates-list svelte-1uha8ag"></div>`),dU=t(`<div class="monitoring-controls svelte-1uha8ag"><label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label></div>`),fU=t(`<p class="svelte-1uha8ag"> </p>`),pU=t(`<code class="svelte-1uha8ag"> </code>`),mU=t(`<article tabindex="-1"><div class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small> <!> <!></article>`),hU=t(`<div class="diagnostics-grid svelte-1uha8ag"></div>`),gU=t(`<div class="settings-backdrop svelte-1uha8ag" role="presentation"><div class="settings-drawer svelte-1uha8ag" role="dialog" aria-modal="true" aria-labelledby="settings-heading" tabindex="-1"><div class="settings-header svelte-1uha8ag"><div class="svelte-1uha8ag"><p class="eyebrow svelte-1uha8ag"> </p> <h2 id="settings-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <button class="settings-close svelte-1uha8ag">×</button></div> <nav class="settings-nav svelte-1uha8ag"><button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button></nav> <div class="settings-content svelte-1uha8ag"><section aria-labelledby="settings-connections-heading" data-settings-target="connections" tabindex="-1" class="svelte-1uha8ag"><div class="settings-section-heading svelte-1uha8ag"><h2 id="settings-connections-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <div class="settings-connections svelte-1uha8ag"></div></section> <section aria-labelledby="plans-heading" data-settings-target="plans" data-testid="settings-plans" tabindex="-1"><div class="settings-section-heading svelte-1uha8ag"><h2 id="plans-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section aria-labelledby="rates-heading" data-settings-target="rates" data-testid="settings-rates" tabindex="-1"><div class="settings-section-heading svelte-1uha8ag"><div class="heading-with-action svelte-1uha8ag"><h2 id="rates-heading" class="svelte-1uha8ag"> </h2> <button type="button" class="rates-refresh-button svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div> <p class="svelte-1uha8ag"> </p></div> <!> <div class="custom-rates-container svelte-1uha8ag"><form class="custom-rate-form svelte-1uha8ag"><div class="custom-rate-inputs svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><!><option> </option></select></label> <!> <label class="svelte-1uha8ag"><span> </span> <input type="text" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="text" placeholder="e.g. gpt-4o, qwen-max" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="2.0" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="8.0" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="0.5" class="svelte-1uha8ag"/></label></div> <div class="custom-rate-actions svelte-1uha8ag"><button type="submit" class="svelte-1uha8ag"> </button></div></form> <!></div></section> <section class="monitoring-section svelte-1uha8ag" aria-labelledby="monitoring-heading"><div class="settings-section-heading svelte-1uha8ag"><h2 id="monitoring-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section class="diagnostics-section svelte-1uha8ag" aria-labelledby="diagnostics-heading"><div class="settings-section-heading svelte-1uha8ag"><h2 id="diagnostics-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!></section> <section class="privacy-section svelte-1uha8ag" aria-labelledby="privacy-heading"><div class="settings-section-heading svelte-1uha8ag"><h2 id="privacy-heading" class="svelte-1uha8ag"> </h2> <p class="svelte-1uha8ag"> </p></div> <!> <!> <div class="privacy-actions svelte-1uha8ag"><button class="svelte-1uha8ag"> </button> <button class="svelte-1uha8ag"> </button> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <button class="danger-action svelte-1uha8ag"> </button> <small class="svelte-1uha8ag"> </small> <button class="danger-action svelte-1uha8ag"> </button></div></section></div></div></div>`),_U=t(`<div class="model-custom-rate-prompt svelte-1uha8ag"><button type="button" class="configure-rate-button svelte-1uha8ag"> </button></div>`),vU=t(`<span class="model-price-source svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span>`),yU=t(`<div class="model-detail-backdrop svelte-1uha8ag" role="presentation"><div class="model-detail-drawer svelte-1uha8ag" role="dialog" aria-modal="true" tabindex="-1"><div class="model-detail-header svelte-1uha8ag"><div><p class="eyebrow svelte-1uha8ag"> </p> <h2 class="svelte-1uha8ag"> </h2> <!></div> <button class="svelte-1uha8ag">×</button></div> <div class="model-detail-content svelte-1uha8ag"><div class="model-detail-summary svelte-1uha8ag" data-testid="model-detail-summary"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span></div> <!> <section class="model-activity svelte-1uha8ag" aria-labelledby="model-activity-heading"><h3 id="model-activity-heading" class="svelte-1uha8ag"> </h3> <!></section> <section class="model-evidence-summary svelte-1uha8ag" data-testid="model-evidence-summary" aria-labelledby="model-evidence-heading"><h3 id="model-evidence-heading" class="svelte-1uha8ag"> </h3> <div class="svelte-1uha8ag"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <!></div></section></div></div></div>`),bU=t(`<main class="shell svelte-1uha8ag"><header class="product-header svelte-1uha8ag"><img class="product-logo svelte-1uha8ag" src="/brand/agent-usage-logo.svg"/> <h1 class="visually-hidden svelte-1uha8ag"> </h1> <div class="dashboard-tabs svelte-1uha8ag" role="tablist"><button id="agent-usage-tab" type="button" role="tab" aria-controls="agent-usage-panel" class="svelte-1uha8ag"> </button> <button id="token-model-costs-tab" type="button" role="tab" aria-controls="token-model-costs-panel" class="svelte-1uha8ag"> </button></div> <div class="header-actions svelte-1uha8ag"><button class="settings-toggle svelte-1uha8ag"> </button> <button class="theme-toggle svelte-1uha8ag"><span class="theme-icon svelte-1uha8ag" aria-hidden="true"> </span> </button> <button class="locale-toggle svelte-1uha8ag"> </button> <button class="refresh svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div></header> <!></main> <!> <!>`,1);function xU(t,S){te(S,!1);let w=()=>ee(Pe,`$themePreference`,ae),E=()=>ee(Fe,`$activeTheme`,ae),[ae,se]=z(),pe=y(),me=y(),he=y(),_e=y(),ve=y(),ye=y(),be=y(),xe=[{id:`codex`,displayName:`Codex`},{id:`claude-code`,displayName:`Claude Code`},{id:`opencode-go`,displayName:`OpenCode Go`},{id:`grok`,displayName:`Grok`},{id:`antigravity`,displayName:`Antigravity`}],Ce=new Set(xe.map(e=>e.id)),Ee=y(`en`),De=y(),Oe=y(null),ke=y(xe),Ae=y({}),je=y(Object.fromEntries(xe.map(e=>[e.id,!0]))),Me=new Set,Ne=y(!0),Ie=y(!1),Le=y(!1),Re=y(!1),ze=y(!1),Be=y(!1),Ve=y(!1),We=y(!1),V=y(!1),Ge=y([]),Ke=y(null),qe=y({}),Je=y({}),Ye=y(`agents`),Xe=y(`7d`),Ze=y(`CNY`),Qe=y(`retail-equivalent`),$e=y(`list`),et=y(null),tt=null,nt=y(null),rt=y(`UTC`),it=y(null),at=y(null),ot=y(!1),st=y({}),ct=y(null),lt=[{id:`grok`,label:`Grok`},{id:`dsh`,label:`DeepSeek (dsh)`},{id:`claude-code`,label:`Claude Code`},{id:`codex`,label:`Codex`},{id:`opencode-go`,label:`OpenCode Go`},{id:`opencode`,label:`OpenCode`},{id:`antigravity`,label:`Antigravity`}],ut=y(`grok`),dt=y([]),ft=y(!1),pt=y(!1),H=y({providerId:`grok`,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:`0`}),U=y(!1),mt=y(null),ht=y({id:``,providerId:``,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:``}),gt=y(!1),_t=y(null),vt=y(null),yt=!1,W=y(null),G=y(!1),bt=y(!1),xt=y(!1),St=y(!1),Ct=y(!1),wt=y(null),Tt=null,Et=y(!1),K=y(null),Dt=y(null),q=null,Ot=y(null),kt=y(),J=y(),At=y(),jt=!1,Mt=0,Nt={},Pt=0,Ft=Se(()=>Wt());ie(async()=>{He(),b(Ee,we(navigator.language)),document.documentElement.lang=p(Ee),b(rt,Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`),b(Xe,Kn()),b(Ze,qn()),await Promise.all([Bt(),Vt(),qt(),Jt(),Yt(),$t(),ln(),un()]),p(vt)||await cn(),fn();let e=new URL(window.location.href).searchParams.get(`settings`);e&&await yn(e,!1)}),L(()=>{jt=!0,Tt&&clearInterval(Tt),Ft.dispose()});function Y(e){return Te(p(Ee),e)}function X(){return p(Qe)===`tokens`?Y(`tokenShare`):Y(`costShare`)}function It(){b(Ee,p(Ee)===`en`?`zh-CN`:`en`),document.documentElement.lang=p(Ee)}let Lt=[`system`,`light`,`dark`];function Rt(){let e=Lt[(Lt.indexOf(w())+1)%Lt.length];Ue(e)}function zt(e){return Y({system:`themeSystem`,light:`themeLight`,dark:`themeDark`}[e])}async function Bt(){let e=++Mt,t=p(Xe),n=p(Ze);try{let r=new URLSearchParams({window:t,timeZone:p(rt),currency:n}),i=await fetch(`/api/overview?${r}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json();if(jt||e!==Mt)return;b(Oe,a),b(Le,!1),Kt()}catch{e===Mt&&b(Le,!0)}}async function Vt(){b(Ne,!0);let e=new Set([...Ce,...Me]),t=[...e].map(e=>Ht(e));try{let n=await fetch(`/api/overview/providers`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(jt)return;let i=r.providers.filter(e=>e.id!==`opencode`&&e.id!==`dsh`),a=new Map(i.map(e=>[e.id,e]));Me=new Set(a.keys()),b(ke,[...xe.map(e=>a.get(e.id)??e),...i.filter(e=>!Ce.has(e.id))]),b(Ne,!1);let o=i.filter(t=>!e.has(t.id)).map(e=>Ht(e.id));await Promise.all([...t,...o])}catch{jt||b(Ne,!1),await Promise.all(t)}}async function Ht(e){let t=(Nt[e]??0)+1;Nt={...Nt,[e]:t},b(je,{...p(je),[e]:!0});try{let n=new URLSearchParams({window:p(Xe),timeZone:p(rt),currency:p(Ze)}),r=await fetch(`/api/overview/providers/${encodeURIComponent(e)}?${n}`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(jt||Nt[e]!==t)return;b(Ae,{...p(Ae),[e]:i})}catch{}finally{!jt&&Nt[e]===t&&b(je,{...p(je),[e]:!1})}}async function Ut(){await Gt(`manual`)}async function Wt(){await Gt(`automatic`)}async function Gt(e){b(Ie,!0);try{let t=await fetch(e===`automatic`?`/api/refresh?mode=automatic&background=true`:`/api/refresh?background=true`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await Promise.all([Bt(),Vt(),cn()]),await un(),fn(),b(Re,!1)}catch{b(Re,!0)}finally{jt||(b(Ie,!1),Kt())}}function Kt(){jt||!p(Oe)||!yt||Ft.schedule(p(Oe),p(vt),p(Ie))}async function qt(){try{let e=await fetch(`/api/connectors`);if(!e.ok)throw Error(`HTTP ${e.status}`);b(Ge,await e.json()),b(ze,!1)}catch{b(ze,!0)}}async function Jt(){try{let e=await fetch(`/api/monitoring`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();b(it,t.settings),b(Be,!1)}catch{b(Be,!0)}}async function Yt(){try{let e=await fetch(`/api/plans`);if(!e.ok)throw Error(`HTTP ${e.status}`);b(at,await e.json()),b(st,Zt(p(at))),b(ot,!1)}catch{b(ot,!0)}}function Xt(e,t){return`${e}:${t}`}function Zt(e){let t=new Map(e.subscriptions.map(e=>[Xt(e.providerId,e.billingDomainId),e]));return Object.fromEntries(e.domains.map(e=>{let n=Xt(e.providerId,e.billingDomainId),r=t.get(n);return[n,{selection:r?r.priceSource===`catalog-preset`&&r.planId||`custom`:`none`,amount:r?String(r.amount):``,currency:r?.currency??`USD`,billingPeriod:r?.billingPeriod??`monthly`,anchorDate:r?.anchorDate??``}]}))}function Z(e,t){let n=p(st)[e];if(!n)return;let r={...n,...t};if(t.selection&&t.selection!==`custom`&&t.selection!==`none`){let e=p(at)?.domains.flatMap(e=>e.presets).find(e=>e.id===t.selection);e&&(r.amount=String(e.amount),r.currency=e.currency,r.billingPeriod=e.billingPeriod)}b(st,{...p(st),[e]:r})}async function Qt(e,t){let n=Xt(e,t),r=p(st)[n];if(!r)return;let i=Number(r.amount),a=r.selection===`none`?null:{planId:r.selection===`custom`?null:r.selection,amount:Number.isFinite(i)&&i>0?i:void 0,currency:r.currency,billingPeriod:r.billingPeriod,anchorDate:r.anchorDate===``?null:r.anchorDate};b(ct,n);try{let n=await fetch(`/api/plans`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:e,billingDomainId:t,plan:a})});if(!n.ok)throw Error(`HTTP ${n.status}`);b(at,await n.json()),b(st,Zt(p(at))),b(ot,!1),await Bt()}catch{b(ot,!0)}finally{b(ct,null)}}async function $t(){b(pt,!0);try{let e=await fetch(`/api/custom-rates`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();b(dt,t.rates),b(ft,!1)}catch{b(ft,!0)}finally{b(pt,!1)}}function en(){p(ut)===`custom`?v(H,p(H).providerId=``):v(H,p(H).providerId=p(ut))}async function tn(){let e=p(ut)===`custom`?p(H).providerId.trim():p(ut);if(!(!e||!p(H).model.trim()||p(U))){b(U,!0);try{let t=await fetch(`/api/custom-rates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:e,billingDomainId:p(H).billingDomainId.trim()||null,model:p(H).model.trim(),inputRate:parseFloat(p(H).inputRate)||0,outputRate:parseFloat(p(H).outputRate)||0,cacheReadRate:parseFloat(p(H).cacheReadRate)||0})});if(!t.ok)throw Error(`HTTP ${t.status}`);b(H,{providerId:e,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:`0`}),await $t(),await Bt()}catch(e){console.error(e)}finally{b(U,!1)}}}function nn(e){b(mt,e.id),b(ht,{id:e.id,providerId:e.providerId,billingDomainId:e.billingDomainId??``,model:e.model,inputRate:String(e.ratesPerMillion.input),outputRate:String(e.ratesPerMillion.output),cacheReadRate:String(e.ratesPerMillion.cacheRead)})}function rn(){b(mt,null)}async function an(){if(!(!p(mt)||p(gt))){b(gt,!0);try{let e=await fetch(`/api/custom-rates/${encodeURIComponent(p(mt))}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:p(ht).providerId.trim(),billingDomainId:p(ht).billingDomainId.trim()||null,model:p(ht).model.trim(),inputRate:parseFloat(p(ht).inputRate)||0,outputRate:parseFloat(p(ht).outputRate)||0,cacheReadRate:parseFloat(p(ht).cacheReadRate)||0})});if(!e.ok)throw Error(`HTTP ${e.status}`);b(mt,null),await $t(),await Bt()}catch(e){console.error(e)}finally{b(gt,!1)}}}async function on(e){b(_t,e);try{let t=await fetch(`/api/custom-rates/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);p(mt)===e&&b(mt,null),await $t(),await Bt()}catch(e){console.error(e)}finally{b(_t,null)}}function sn(e,t,n){vr(),b(ut,lt.some(t=>t.id===e)?e:`custom`),v(H,p(H).providerId=e),v(H,p(H).billingDomainId=!t||t===`*`?``:t),v(H,p(H).model=n),yn(`rates`)}async function cn(){try{let e=await fetch(`/api/doctor`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(jt)return;b(vt,t),b(Ve,!1)}catch{b(Ve,!0)}finally{jt||(yt=!0,Kt())}}async function ln(){try{let e=await fetch(`/api/retention`);if(!e.ok)throw Error(`HTTP ${e.status}`);b(W,await e.json()),b(We,!1)}catch{b(We,!0)}}async function un(){try{let e=await fetch(`/api/processing`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),n=p(wt);b(wt,t),dn(n,t,`discovery`)&&qt(),dn(n,t,`usage`)&&(Vt(),Bt()),dn(n,t,`pricing`)&&Bt(),dn(n,t,`retention`)&&ln(),b(St,t.hardRebuild&&Object.values(t.modules).some(e=>e.state===`pending`||e.state===`running`)),Tt&&Object.values(t.modules).every(e=>e.state===`ready`||e.state===`failed`)&&(clearInterval(Tt),Tt=null)}catch{}}function dn(e,t,n){return e!==null&&e.modules[n].state!==`ready`&&t.modules[n].state===`ready`}function fn(){Tt||p(wt)&&Object.values(p(wt).modules).every(e=>e.state===`ready`||e.state===`failed`)||(Tt=setInterval(()=>void un(),1e3))}async function pn(){if(window.confirm(Y(`hardRebuildConfirmation`))){b(St,!0);try{let e=await fetch(`/api/rebuild`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({confirmExpensiveOperation:!0})});if(e.status!==202)throw Error(`HTTP ${e.status}`);await un(),fn(),b(V,!1)}catch{b(St,!1),b(V,!0)}}}function mn(e){return`/api/export?${new URLSearchParams({format:e,window:p(Xe),timeZone:p(rt),currency:p(Ze),includeAccountIdentifiers:String(p(bt))})}`}async function hn(e){try{let t=await fetch(mn(e));if(!t.ok)throw Error(`HTTP ${t.status}`);let n=URL.createObjectURL(await t.blob()),r=document.createElement(`a`);r.href=n,r.download=`agent-usage-${p(Xe)}.${e}`,r.click(),URL.revokeObjectURL(n),b(V,!1)}catch{b(V,!0)}}async function gn(){if(window.confirm(Y(`clearConfirmation`))){b(xt,!0);try{let e=await fetch(`/api/data`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({deleteProductSecrets:p(G)})});if(!e.ok)throw Error(`HTTP ${e.status}`);b(G,!1),await Promise.all([Bt(),Vt(),qt(),cn(),ln()]),b(V,!1)}catch{b(V,!0)}finally{b(xt,!1)}}}async function _n(e){try{let t=await fetch(`/api/monitoring/settings`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`HTTP ${t.status}`);b(it,await t.json()),b(Be,!1)}catch{b(Be,!0)}}async function vn(e,t){b(Ke,e);try{let n=await fetch(`/api/connectors/${encodeURIComponent(e)}/action`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t,...t===`connect`&&p(qe)[e]?{secret:p(qe)[e]}:{}})});if(!n.ok)throw Error(`HTTP ${n.status}`);await n.json(),b(qe,{...p(qe),[e]:``}),await Promise.all([qt(),Bt(),Vt(),cn()])}catch{b(ze,!0)}finally{b(Ke,null)}}async function yn(e=null,t=!0){if(!p(Et)){let e=document.activeElement;q=e instanceof HTMLElement&&e!==document.body?e:null}if(b(Et,!0),b(K,e),$t(),t){let t=new URL(window.location.href);e?t.searchParams.set(`settings`,e):t.searchParams.set(`settings`,`root`),window.history.replaceState(null,``,t)}await o();let n=e?[...document.querySelectorAll(`[data-settings-target]`)].find(t=>t.dataset.settingsTarget===e):null;n?.scrollIntoView?.({behavior:`smooth`,block:`start`}),(n??p(Ot))?.focus()}async function bn(){let e=q;b(Et,!1),b(K,null),q=null;let t=new URL(window.location.href);t.searchParams.delete(`settings`),window.history.replaceState(null,``,t),await o(),(e?.isConnected?e:p(Dt))?.focus()}function xn(e){let t=p(et)?p(nt):p(Et)?p(Ot):null;e.key===`Tab`&&t?Sn(e,t):p(et)&&e.key===`Escape`?vr():p(Et)&&e.key===`Escape`&&bn()}function Sn(e,t){let n=[...t.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])`)].filter(e=>!e.hidden&&e.getAttribute(`aria-hidden`)!==`true`);if(n.length===0){e.preventDefault(),t.focus();return}let r=n[0],i=n.at(-1),a=document.activeElement;e.shiftKey&&(a===t||a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function Cn(e){if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;let t=[...e.currentTarget.parentElement.querySelectorAll(`[role="tab"]`)],n=t.indexOf(e.currentTarget),r=e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowRight`?1:-1)+t.length)%t.length;e.preventDefault(),t[r]?.focus(),t[r]?.click()}function wn(e){return Y({"not-checked":`notChecked`,"not-installed":`notInstalled`,discovered:`discovered`,connected:`connected`,skipped:`skipped`,error:`connectionError`}[e])}function Tn(e){return Y(e===`official-client`?`officialClient`:e===`agent-usage`?`managedSecret`:`noCredential`)}function En(e){let t={codex:`codexPermission`,"claude-code":`claudePermission`,"opencode-go":`openCodePermission`,grok:`grokPermission`,"xai-api":`xaiPermission`,dsh:`dshPermission`}[e.id];return t?Y(t):e.permissionDescription}function Dn(e){return e.status===`healthy`?Y(`healthy`):e.category?Y({"missing-binary":`diagnosticMissingBinary`,"not-configured":`diagnosticNotConfigured`,unauthorized:`diagnosticUnauthorized`,unsupported:`diagnosticUnsupported`,"schema-mismatch":`diagnosticSchemaMismatch`,"rate-limited":`diagnosticRateLimited`,timeout:`diagnosticTimeout`,stale:`diagnosticStale`,unavailable:`diagnosticUnavailable`}[e.category]):Y(`diagnosticUnavailable`)}function On(e){return!e.recovery||p(Ee)===`en`?e.recovery:e.category?Y({"missing-binary":`recoveryMissingBinary`,"not-configured":`recoveryNotConfigured`,unauthorized:`recoveryUnauthorized`,unsupported:`recoveryUnsupported`,"schema-mismatch":`recoverySchemaMismatch`,"rate-limited":`recoveryRateLimited`,timeout:`recoveryTimeout`,stale:`recoveryStale`,unavailable:`recoveryUnavailable`}[e.category]):Y(`recoveryUnavailable`)}function kn(e){return new Intl.NumberFormat(p(Ee)).format(e)}function An(e){return Math.abs(e)<1e4?kn(e):new Intl.NumberFormat(p(Ee),{compactDisplay:`short`,maximumFractionDigits:1,notation:`compact`}).format(e)}function jn(e){return`${kn(e)} ${Y(`tokens`)}`}function Mn(e){return e===null?Y(`notAvailable`):new Intl.NumberFormat(p(Ee),{style:`percent`,maximumFractionDigits:1}).format(e)}function Nn(e){return e?new Intl.DateTimeFormat(p(Ee),{hour:`2-digit`,minute:`2-digit`,month:`short`,day:`numeric`}).format(new Date(e)):`—`}function Pn(e){if(!e)return`—`;let t=new Date(e).getTime()-Date.now(),n=Math.abs(t),[r,i]=n>=864e5?[864e5,`day`]:n>=36e5?[36e5,`hour`]:n>=6e4?[6e4,`minute`]:[1e3,`second`];return new Intl.RelativeTimeFormat(p(Ee),{numeric:`auto`}).format(Math.round(t/r),i)}function Fn(e){return Y({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`,mixed:`authorityMixed`}[e])}function In(e){return!e||e.expectedCoverage.includes(`quota`)}function Ln(e){return Y({complete:`coverageComplete`,partial:`coveragePartial`,unavailable:`coverageUnavailable`}[e])}function Rn(e){return Y(e===`account-wide`?`accountWide`:e===`this-mac`?`localOnly`:`unknown`)}function zn(e){return e.trend.map(e=>{let t=e.retailEquivalent.status!==`unavailable`&&e.retailEquivalent.amount!==null?e.retailEquivalent:e.reportedEstimate??e.retailEquivalent;return{recordedTokens:e.gap?null:e.recordedTokens??0,costAmount:t.amount,costCurrency:t.comparisonCurrency}})}function Bn(e){return Y({"source-reported":`derivationSourceReported`,"reconciled-remainder":`derivationReconciledRemainder`,categorized:`derivationCategorized`,"legacy-total":`derivationLegacyTotal`}[e]??`unknown`)}function Vn(e){return Y({quota:`quota`,tokens:`tokens`,"actual-cost":`actualCost`,history:`history`}[e])}function Hn(e,t){let n=e.billingDomains??[];return n.find(e=>e.id===t)??n[0]??{id:`combined`,displayName:e.displayName,freshness:e.freshness,health:e.health,coverage:e.coverage,quotaBuckets:e.quotaBuckets,tokenTotals:e.tokenTotals,tokenEvidence:e.tokenEvidence,tokenAuthority:e.tokenAuthority,costs:[],lastCostObservedAt:null,balances:[],invoices:[],history:Un(e.tokenTotals,[],e.tokenAuthority,e.tokenEvidence),forecasts:[],forecastCoverage:e.forecastCoverage}}function Un(e,t,n,r=sr()){return{window:p(Xe),start:``,end:``,timeZone:p(rt),tokenTotals:e,tokenEvidence:r,models:[],unclassified:{tokenTotals:or(),tokenEvidence:sr(),authorities:[],lastObservedAt:null},days:[],intervals:[],costs:t.map(e=>({kind:e.kind,currency:e.currency,amount:e.amount,convertedAmount:null,comparisonCurrency:`CNY`,conversionUnavailableReason:e.amount===null?`unknown-native-amount`:`missing-rate`,priceSnapshots:e.priceSnapshot?[e.priceSnapshot]:[],authorities:[e.authority],observedAt:e.observedAt})),exchangeRates:[],authorities:n===`mixed`?void 0:n?[n]:[],lastObservedAt:null}}async function Wn(e){if(p(Xe)===e&&!p(Ct))return;b(Xe,e);try{localStorage.setItem(`agent-usage:history-window`,e)}catch{}let t=++Pt;b(Ct,!0);try{await Bt()}finally{t===Pt&&b(Ct,!1)}}async function Gn(e){if(p(Ze)===e)return;b(Ze,e);try{localStorage.setItem(`agent-usage:comparison-currency`,e)}catch{}let t=++Pt;b(Ct,!0);try{await Bt()}finally{t===Pt&&b(Ct,!1)}}function Kn(){try{let e=localStorage.getItem(`agent-usage:history-window`);return e===`24h`||e===`7d`||e===`30d`?e:`7d`}catch{return`7d`}}function qn(){try{let e=localStorage.getItem(`agent-usage:comparison-currency`);return e===`USD`||e===`CNY`?e:`CNY`}catch{return`CNY`}}function Jn(e,t){b(Je,{...p(Je),[e]:t})}function Yn(e,t,n){return e.find(e=>e.target.provider.id===t&&e.target.billingDomain.id===n)}function Xn(e){return{codex:{dark:`/brands/openai.svg`,light:`/brands/openai.svg`},"claude-code":{dark:`/brands/claude.svg`,light:`/brands/claude.svg`},"opencode-go":{dark:`/brands/opencode-dark.svg`,light:`/brands/opencode-light.svg`},opencode:{dark:`/brands/opencode-dark.svg`,light:`/brands/opencode-light.svg`},grok:{dark:`/brands/grok-light.svg`,light:`/brands/grok-dark.svg`},dsh:{dark:`/brands/deepseek.svg`,light:`/brands/deepseek.svg`},antigravity:{dark:`/brands/antigravity.svg`,light:`/brands/antigravity.svg`}}[e]??null}function Zn(e,t){return t===`dark`?e.dark:e.light}function Qn(e,t){return e===`grok`?t.filter(e=>e.id===`grok-build-subscription`):t}function $n(e,t,n=[]){let r=e.providers.filter(e=>e.id!==`opencode`&&e.id!==`dsh`).map(e=>({...e,billingDomains:Qn(e.id,[...e.billingDomains??[]])}));for(let e of t){let{provider:t,billingDomain:n}=e.target;if(t.id===`opencode`||t.id===`dsh`||t.id===`grok`&&n.id!==`grok-build-subscription`)continue;let i=r.find(e=>e.id===t.id);i||(i=ir(t.id,t.displayName),r.push(i)),i.billingDomains.some(e=>e.id===n.id)||i.billingDomains.push(ar(n.id,n.displayName))}for(let t of n){if(t.id===`opencode`||t.id===`dsh`)continue;let n=r.find(e=>e.id===t.id);n?e.providers.some(e=>e.id===n.id)||(n.displayName=t.displayName):r.push(ir(t.id,t.displayName))}let i={codex:0,"claude-code":1,"opencode-go":2,grok:3};return r.sort((e,t)=>(i[e.id]??100)-(i[t.id]??100)||e.displayName.localeCompare(t.displayName))}function er(e){return/\b5\s*hours?\b/i.test(e)?0:/\b(?:week|weekly)\b/i.test(e)?1:/\b(?:month|monthly)\b/i.test(e)?2:3}function tr(e){return e.split(` · `).filter(e=>er(e)===3).join(` · `)}function nr(e){let t=e.map((e,t)=>({bucket:e,sourceIndex:t})).sort((e,t)=>er(e.bucket.label)-er(t.bucket.label)||e.sourceIndex-t.sourceIndex),n=[];for(let{bucket:e}of t){let t=tr(e.label);n.includes(t)||n.push(t)}return t.sort((e,t)=>n.indexOf(tr(e.bucket.label))-n.indexOf(tr(t.bucket.label))).map(({bucket:e})=>e)}function rr(e,t){return $n(e,t,p(ke)).flatMap(e=>(e.billingDomains.length>0?e.billingDomains:[Hn(e,void 0)]).flatMap(t=>{let n=nr(t.quotaBuckets);return n.length===0?[]:[{providerId:e.id,providerDisplayName:e.displayName,billingDomainId:t.id,billingDomainDisplayName:t.displayName,observedAt:t.freshness?.lastSuccessAt??e.freshness.lastSuccessAt,quotaBuckets:n}]}))}function ir(e,t){return{id:e,displayName:t,summaryBillingDomainId:null,freshness:{status:`unavailable`,lastSuccessAt:null},health:{status:`healthy`,errorCode:null,message:null,recovery:null},coverage:{quota:`unavailable`,tokens:`unavailable`,actualCost:`unavailable`,history:`unavailable`},quotaBuckets:[],tokenTotals:or(),tokenEvidence:sr(),tokenAuthority:null,billingDomains:[],forecasts:[],forecastCoverage:`insufficient`}}function ar(e,t){let n=or();return{id:e,displayName:t,freshness:{status:`unavailable`,lastSuccessAt:null},health:{status:`healthy`,errorCode:null,message:null,recovery:null},coverage:{quota:`unavailable`,tokens:`unavailable`,actualCost:`unavailable`,history:`unavailable`},quotaBuckets:[],tokenTotals:n,tokenEvidence:sr(),tokenAuthority:null,costs:[],lastCostObservedAt:null,balances:[],invoices:[],history:Un(n,[],null),forecasts:[],forecastCoverage:`insufficient`}}function or(){return{total:0,input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0}}function sr(){return{recordedTokens:0,sourceReportedTokens:0,sourceReportedObservationCount:0,observationCount:0,unclassifiedTokens:0,classifiedTokens:0,classificationCoverage:null,totalDerivations:[],timePrecisions:[],usageScopes:[],aggregationTemporalities:[]}}function cr(e,t){return e===null?`—`:new Intl.NumberFormat(p(Ee),{style:`currency`,currency:t,currencyDisplay:`narrowSymbol`,minimumFractionDigits:2,maximumFractionDigits:Math.abs(e)>0&&Math.abs(e)<.01?8:2}).format(e)}function lr(e,t){let n=new Intl.DateTimeFormat(p(Ee),{month:`short`,day:`numeric`});return`${n.format(new Date(e))} – ${n.format(new Date(t))}`}function ur(e,t){return{money:t=>t===null?Y(`notAvailable`):cr(t,e),tokens:e=>e===null?Y(`notAvailable`):`${An(e)} ${Y(`tokens`)}`,ratio:(e,n)=>{if(e===null)return Y(`notAvailable`);let r=`${new Intl.NumberFormat(t,{maximumFractionDigits:+(e<10)}).format(e)}x`;return n===`lower`?`≥ ${r}`:r}}}function dr(e){b(Qe,e)}function fr(e){let t=new Intl.DateTimeFormat(p(Ee),{month:`short`,day:`numeric`,timeZone:e.timeZone});return`${t.format(new Date(e.start))} – ${t.format(new Date(e.end))}`}function pr(e,t,n){return e===null?Y(`notAvailable`):n===`tokens`?`${An(e)} ${Y(`tokens`)}`:cr(e,t)}function mr(e,t){return e.includedInHeadline===!1?null:t===`tokens`?e.tokenShare:e.retailEquivalent.amount===null&&e.reportedEstimate.amount!==null?e.reportedShare:e.retailShare}function hr(e,t){let n=e.retailEquivalent.amount===null?e.reportedEstimate:e.retailEquivalent,r=t===`tokens`?`${kn(e.recordedTokens)} ${Y(`tokens`)}`:n?.amount==null?Y(`notAvailable`):cr(n.amount,n.currency),i=e.includedInHeadline===!1?` · ${Y(`separateFromHeadline`)}`:``;return`${e.providerDisplayName} · ${e.billingDomainDisplayName}${i}: ${r}`}function gr(e,t){return(t===`tokens`?e.modelRanking.byTokens:e.modelRanking.byCost).flatMap(t=>{let n=e.modelRanking.entries.find(e=>e.id===t);return n?[n]:[]})}async function _r(e,t){b(et,e),tt=t,await o(),p(nt)?.focus()}async function vr(){b(et,null),await o(),tt?.focus()}fe(()=>p(Ee),()=>{b(De,Te(p(Ee),`metaDescription`))}),fe(()=>(p(Oe),p(et)),()=>{b(kt,p(Oe)?.workbench?.modelRanking.entries.find(e=>e.id===p(et))??null)}),fe(()=>(p(Ne),p(ke),p(Ae)),()=>{b(J,p(Ne)&&p(ke).length===0?null:{generatedAt:new Date().toISOString(),providers:Object.values(p(Ae))})}),fe(()=>(p(Ye),p(J),p(Oe)),()=>{b(At,p(Ye)===`agents`?p(J):p(Oe))}),fe(()=>p(wt),()=>{b(pe,p(wt)?Object.values(p(wt).modules).some(e=>e.state===`pending`||e.state===`running`):!1)}),fe(()=>(p(Ct),p(Ie),p(pe)),()=>{b(me,p(Ct)||p(Ie)||p(pe))}),fe(()=>(p(At),p(Ze)),()=>{b(he,p(At)?.workbench?.comparisonCurrency??p(Ze))}),fe(()=>(p(he),p(Ee)),()=>{b(_e,ur(p(he),p(Ee)))}),fe(()=>p(at),()=>{b(ve,new Set((p(at)?.domains??[]).map(e=>Xt(e.providerId,e.billingDomainId))))}),fe(()=>(p(At),p(ve)),()=>{b(ye,(p(At)?.workbench?.planValue?.unconfiguredDomains??[]).filter(e=>p(ve).has(Xt(e.providerId,e.billingDomainId))))}),fe(()=>(p(At),p(_e)),()=>{b(be,p(At)?.workbench?.planValue?bV(p(At).workbench.planValue,qB,p(_e),Y(`planCustom`)):[])}),n(),R();var yr=N();ue(`1uha8ag`,e=>{var t=cH(),n=s(re(t),2);g(()=>k(n,`content`,p(De))),m(()=>{_.title=`Agent Usage`}),f(e,t)}),u(`keydown`,a,xn);var br=re(yr);h(br,()=>p(Ee),t=>{var n=bU(),a=re(n),o=c(a),m=c(o),_=s(m,2),y=c(_,!0);F(_);var S=s(_,2),C=c(S),N=c(C,!0);F(C);var L=s(C,2),ee=c(L,!0);F(L),F(S);var R=s(S,2),te=c(R),ie=c(te,!0);F(te),T(te,e=>b(Dt,e),()=>p(Dt));var ae=s(te,2),z=c(ae),se=c(z,!0);F(z);var ue=s(z);F(ae);var fe=s(ae,2),pe=c(fe,!0);F(fe);var he=s(fe,2),ve=c(he);let xe;var Se=s(ve);F(he),F(R),F(o);var Ce=s(o,2),we=e=>{var t=lH(),n=c(t),i=c(n),a=c(i,!0);F(i),F(n),F(t),g(e=>r(a,e),[()=>l(()=>Y(`loadingModelCosts`))]),f(e,t)},Te=e=>{var t=uH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`error`))]),f(e,t)},De=t=>{var n=ZH(),a=re(n),o=e=>{var t=dH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`refreshUnavailable`))]),f(e,t)};i(a,e=>{p(Re)&&e(o)});var m=s(a,2),_=e=>{var t=fH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`noProviders`))]),f(e,t)};i(m,e=>{p(Ye),p(Ne),p(ke),p(Ge),l(()=>p(Ye)===`agents`&&!p(Ne)&&p(ke).length===0&&p(Ge).length===0)&&e(_)});var v=s(m,2),y=t=>{var n=OH(),a=c(n);le(a,5,()=>(p(At),p(Ge),p(ke),l(()=>$n(p(At),p(Ge),p(ke)))),e=>e.id,(t,n)=>{let a=e(()=>(p(n),l(()=>Xn(p(n).id)))),o=e(()=>(p(Ae),p(n),l(()=>!!p(Ae)[p(n).id]))),m=e(()=>(p(je),p(n),d(p(o)),l(()=>p(je)[p(n).id]&&!p(o)))),h=e(()=>(p(je),p(n),d(p(o)),l(()=>p(je)[p(n).id]&&p(o)))),_=e(()=>(p(n),p(Je),l(()=>Hn(p(n),p(Je)[p(n).id])))),v=e(()=>(d(p(_)),p(n),l(()=>p(_).freshness??p(n).freshness))),y=e(()=>(d(p(_)),p(n),l(()=>p(_).coverage??p(n).coverage))),x=e(()=>(p(Ge),p(n),d(p(_)),l(()=>Yn(p(Ge),p(n).id,p(_).id))));var S=DH();let C;var w=c(S),T=e=>{var t=mH(),r=c(t),i=s(c(r),2);le(i,4,()=>[0,1,2],e=>e,(e,t)=>{var n=pH();f(e,n)}),F(i),F(r),F(t),g(()=>k(t,`data-testid`,(p(n),l(()=>`agent-provider-skeleton-${p(n).id}`)))),f(e,t)};i(w,e=>{p(m)&&e(T)});var A=s(w,2),j=c(A),N=e=>{var t=hH();g(e=>{k(t,`data-provider-logo`,(p(n),l(()=>p(n).id))),k(t,`src`,e)},[()=>(d(p(a)),E(),l(()=>Zn(p(a),E())))]),f(e,t)};i(j,e=>{p(a)&&e(N)});var P=s(j,2),L=c(P),ee=c(L),R=c(ee,!0);F(ee);var te=s(ee,2),ne=c(te),ie=c(ne,!0);F(ne);var ae=s(ne,2),oe=e=>{var t=gH(),n=c(t),i=c(n,!0);F(n);var a=s(n,2);F(t),g((e,n,o)=>{k(t,`data-testid`,(d(p(x)),l(()=>`connector-${p(x).id}`))),r(i,e),k(a,`title`,n),k(a,`aria-label`,o)},[()=>(d(p(x)),l(()=>wn(p(x).state))),()=>(d(p(x)),l(()=>`${wn(p(x).state)} · ${Y(`manageConnection`)}`)),()=>l(()=>Y(`manageConnection`))]),u(`click`,a,()=>yn(`connector:${p(x).id}`)),f(e,t)};i(ae,e=>{d(p(x)),l(()=>p(x)?.state===`connected`)&&e(oe)}),F(te),F(L);var z=s(L,2),B=s(c(z),2),se=e=>{var t=M();g(e=>r(t,e),[()=>l(()=>Y(`updating`))]),f(e,t)},ue=e=>{var t=M();g((e,n)=>r(t,`${e??``}
|
|
20
|
-
${n??``}`),[()=>(d(p(v)),l(()=>p(v).status===`fresh`?Y(`updatedNow`):p(v).lastSuccessAt?Y(`updated`):Y(`unavailable`))),()=>(d(p(v)),l(()=>p(v).lastSuccessAt?` · ${Nn(p(v).lastSuccessAt)}`:``))]),f(e,t)};i(B,e=>{p(h)?e(se):e(ue,-1)}),F(z),F(P),F(A);var fe=s(A,2),pe=t=>{var i=vH();le(i,5,()=>(p(n),l(()=>p(n).billingDomains)),e=>e.id,(t,i)=>{let a=e(()=>(d(p(_)),p(i),l(()=>p(_).id===p(i).id)));var o=_H(),s=c(o,!0);F(o),g(()=>{k(o,`aria-selected`,p(a)),k(o,`tabindex`,p(a)?0:-1),r(s,(p(i),l(()=>p(i).displayName)))}),u(`click`,o,()=>Jn(p(n).id,p(i).id)),u(`keydown`,o,Cn),f(t,o)}),F(i),g(e=>k(i,`aria-label`,e),[()=>(p(n),l(()=>`${p(n).displayName} ${Y(`billingDomainTabs`)}`))]),f(t,i)};i(fe,e=>{p(n),l(()=>(p(n).billingDomains?.length??0)>1)&&e(pe)});var me=s(fe,2);le(me,1,()=>[p(_)],e=>e.id,(t,a)=>{let o=e(()=>(p(Ge),p(n),p(a),l(()=>Yn(p(Ge),p(n).id,p(a).id))));var m=EH(),h=re(m),_=e=>{var t=CH();let n;var a=c(t),m=c(a),h=c(m),_=c(h,!0);F(h);var v=s(h,2),y=e=>{var t=yH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`experimental`))]),f(e,t)};i(v,e=>{d(p(o)),l(()=>p(o).experimental)&&e(y)}),F(m);var x=s(m);F(a);var S=s(a,2),C=c(S),w=c(C,!0);F(C);var T=s(C,2),E=c(T),O=c(E,!0);F(E);var A=s(E,2),j=c(A,!0);F(A),F(T);var M=s(T,2),N=c(M),P=c(N,!0);F(N);var L=s(N,2),ee=c(L,!0);F(L),F(M);var R=s(M,2),te=e=>{var t=bH(),n=c(t),i=c(n,!0);F(n);var a=s(n,2);D(a),F(t),g((e,t)=>{r(i,e),k(a,`aria-label`,t),I(a,(p(qe),d(p(o)),l(()=>p(qe)[p(o).id]??``)))},[()=>l(()=>Y(`managementKey`)),()=>(d(p(o)),l(()=>`${p(o).displayName} ${Y(`managementKey`)}`))]),u(`input`,a,e=>b(qe,{...p(qe),[p(o).id]:e.currentTarget.value})),f(e,t)};i(R,e=>{d(p(o)),l(()=>p(o).credentialOwner===`agent-usage`)&&e(te)});var ne=s(R,2),re=c(ne),ie=e=>{var t=xH(),n=c(t,!0);F(t),g(e=>{t.disabled=(d(p(o)),p(Ke),p(qe),l(()=>!p(o).installed||p(Ke)===p(o).id||p(o).credentialOwner===`agent-usage`&&!p(qe)[p(o).id])),r(n,e)},[()=>l(()=>Y(`connect`))]),u(`click`,t,()=>vn(p(o).id,`connect`)),f(e,t)};i(re,e=>{d(p(o)),l(()=>p(o).state===`discovered`||p(o).state===`skipped`)&&e(ie)});var ae=s(re,2),oe=e=>{var t=SH(),n=c(t,!0);F(t),g(e=>{t.disabled=(p(Ke),d(p(o)),l(()=>p(Ke)===p(o).id)),r(n,e)},[()=>l(()=>Y(`retry`))]),u(`click`,t,()=>vn(p(o).id,`retry`)),f(e,t)};i(ae,e=>{d(p(o)),l(()=>p(o).state===`error`||p(o).state===`not-installed`)&&e(oe)});var z=s(ae,2),B=e=>{var t=SH(),n=c(t,!0);F(t),g(e=>{t.disabled=(p(Ke),d(p(o)),l(()=>p(Ke)===p(o).id)),r(n,e)},[()=>l(()=>Y(`skip`))]),u(`click`,t,()=>vn(p(o).id,`skip`)),f(e,t)};i(z,e=>{d(p(o)),l(()=>p(o).state!==`skipped`)&&e(B)}),F(ne),F(S),F(t),g((e,i,a,s,c,u,f)=>{n=de(t,1,`inline-connection svelte-1uha8ag`,null,n,{"connection-pending":p(Ke)===p(o).id}),k(t,`data-testid`,(d(p(o)),l(()=>`connector-${p(o).id}`))),k(t,`aria-busy`,(p(Ke),d(p(o)),l(()=>p(Ke)===p(o).id))),r(_,e),r(x,` ${i??``}`),r(w,a),r(O,s),r(j,c),r(P,u),r(ee,f)},[()=>(d(p(o)),l(()=>wn(p(o).state))),()=>l(()=>Y(`connectionSetup`)),()=>(d(p(o)),l(()=>En(p(o)))),()=>(d(p(o)),l(()=>p(o).installed?Y(`installed`):Y(`notInstalled`))),()=>(d(p(o)),l(()=>Tn(p(o).credentialOwner))),()=>l(()=>Y(`coverageLabel`)),()=>(d(p(o)),l(()=>p(o).expectedCoverage.map(Vn).join(` · `)))]),f(e,t)};i(h,e=>{d(p(o)),l(()=>p(o)&&p(o).state!==`connected`)&&e(_)});var v=s(h,2),y=c(v,!0);F(v);var x=s(v,2),S=e=>{var t=wH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`noQuotaWindowDetail`))]),f(e,t)},C=O(()=>(d(p(o)),l(()=>!In(p(o))))),w=e=>{var t=wH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`noQuotaReported`))]),f(e,t)};i(x,e=>{p(C)?e(S):(p(a),l(()=>p(a).quotaBuckets.length===0)&&e(w,1))});var T=s(x,2);le(T,5,()=>(p(a),l(()=>nr(p(a).quotaBuckets))),e=>e.id,(e,t)=>{var i=TH(),o=c(i),u=c(o),d=c(u,!0);F(u);var m=s(u,2),h=c(m);F(m),F(o);var _=s(o,2);let v;var y=c(_);F(_);var b=s(_,2),x=c(b);F(b);var S=s(b,2),C=c(S),w=c(C);F(C),F(S),F(i),g((e,i,o,s,c,u,f,m,g)=>{r(d,(p(t),l(()=>p(t).label))),r(h,`${p(t),l(()=>p(t).usedPercent??`—`)??``}% ${e??``}`),v=de(_,1,`progress svelte-1uha8ag`,null,v,{"progress-warning":(p(t).usedPercent??0)>=70&&(p(t).usedPercent??0)<90,"progress-critical":(p(t).usedPercent??0)>=90}),k(_,`aria-label`,(p(t),l(()=>p(t).label))),k(_,`aria-valuenow`,(p(t),l(()=>p(t).usedPercent??void 0))),k(_,`aria-valuetext`,i),k(_,`aria-describedby`,(p(n),p(a),p(t),l(()=>`quota-evidence-${p(n).id}-${p(a).id}-${p(t).id}`))),ce(y,o),k(b,`id`,(p(n),p(a),p(t),l(()=>`quota-evidence-${p(n).id}-${p(a).id}-${p(t).id}`))),r(x,`${s??``}: ${c??``} ·
|
|
21
|
-
${u??``}`),r(w,`${f??``}
|
|
22
|
-
${m??``} · ${g??``}`)},[()=>l(()=>Y(`used`)),()=>(p(t),l(()=>p(t).usedPercent===null?Y(`notAvailable`):`${kn(p(t).usedPercent)}% ${Y(`used`)}`)),()=>(p(t),l(()=>`width: ${Math.min(100,Math.max(0,p(t).usedPercent??0))}%`)),()=>l(()=>Y(`source`)),()=>(p(t),l(()=>Fn(p(t).authority))),()=>(p(t),p(a),p(n),l(()=>Nn(p(t).observedAt??p(a).freshness?.lastSuccessAt??p(n).freshness.lastSuccessAt))),()=>l(()=>Y(`resets`)),()=>(p(t),l(()=>Nn(p(t).resetsAt))),()=>(p(t),l(()=>Pn(p(t).resetsAt)))]),f(e,i)}),F(T),g(e=>r(y,e),[()=>l(()=>Y(`quota`))]),f(t,m)}),F(S),g(e=>{C=de(S,1,`provider-card svelte-1uha8ag`,null,C,{"provider-card-loading":p(m)}),k(S,`aria-busy`,(p(je),p(n),l(()=>p(je)[p(n).id]))),k(ee,`data-provider-logo`,(d(p(a)),p(n),l(()=>p(a)?void 0:p(n).id))),r(R,(p(n),l(()=>p(n).displayName))),r(ie,e),k(z,`data-status`,(d(p(h)),d(p(v)),l(()=>p(h)?`updating`:p(v).status===`unavailable`?`unavailable`:`available`))),k(z,`role`,p(h)?`status`:void 0),k(z,`data-testid`,(d(p(h)),p(n),l(()=>p(h)?`agent-provider-update-${p(n).id}`:void 0)))},[()=>(d(p(x)),d(p(y)),l(()=>In(p(x))?Ln(p(y).quota):Y(`noQuotaWindow`)))]),f(t,S)}),F(a);var o=s(a,2);{let t=e(()=>(p(At),p(Ge),l(()=>rr(p(At),p(Ge))))),n=e(()=>(p(At),l(()=>Date.parse(p(At).generatedAt))));QV(o,{get providers(){return p(t)},get locale(){return p(Ee)},get timeZone(){return p(rt)},get now(){return p(n)}})}F(n),g(e=>k(a,`aria-label`,e),[()=>l(()=>Y(`providersLabel`))]),f(t,n)},x=t=>{var n=XH(),a=c(n),o=t=>{let n=e(()=>(p(At),l(()=>p(At).workbench)));var a=YH(),o=c(a),m=c(o),_=c(m),v=c(_,!0);F(_);var y=s(_,2),x=c(y),S=c(x,!0);F(x);var C=s(x,2,!0);F(y),F(m);var w=s(m,2),T=c(w),D=c(T),O=c(D,!0);F(D);var A=s(D,2),j=c(A,!0);F(A),F(T);var M=s(T,2);le(M,4,()=>[`24h`,`7d`,`30d`],e=>e,(e,t)=>{var n=kH(),i=c(n,!0);F(n),g(()=>{k(n,`aria-pressed`,p(Xe)===t),r(i,t)}),u(`click`,n,()=>Wn(t)),f(e,n)}),F(M);var N=s(M,2);le(N,4,()=>[`CNY`,`USD`],e=>e,(e,t)=>{var n=kH(),i=c(n,!0);F(n),g(()=>{k(n,`aria-pressed`,p(Ze)===t),r(i,t)}),u(`click`,n,()=>Gn(t)),f(e,n)}),F(N),F(w),F(o);var P=s(o,2),I=c(P),L=e=>{var t=AH(),n=c(t),i=c(n,!0);F(n),F(t),g(e=>r(i,e),[()=>l(()=>Y(`updatingModelCosts`))]),f(e,t)};i(I,e=>{p(me)&&e(L)});var ee=s(I,2),R=c(ee),te=c(R,!0);F(R),F(ee);var ne=s(ee,2),ie=c(ne),ae=c(ie,!0);F(ie);var oe=s(ie,2),z=c(oe),B=c(z),se=c(B,!0);F(B);var ue=s(B,2),fe=c(ue,!0);F(ue),F(z);var pe=s(z,2),he=c(pe),ge=c(he,!0);F(he);var ve=s(he,2),xe=c(ve,!0);F(ve),F(pe);var Se=s(pe,2),Ce=c(Se),we=c(Ce,!0);F(Ce);var Te=s(Ce,2),De=c(Te,!0);F(Te),F(Se);var Oe=s(Se,2),ke=c(Oe),Ae=c(ke,!0);F(ke);var je=s(ke,2),Me=c(je,!0);F(je),F(Oe);var Ne=s(Oe,2),Pe=c(Ne),Fe=c(Pe,!0);F(Pe);var Ie=s(Pe,2),Le=c(Ie,!0);F(Ie),F(Ne);var Re=s(Ne,2),ze=c(Re),Be=c(ze,!0);F(ze);var Ve=s(ze,2),He=c(Ve,!0);F(Ve),F(Re),F(oe),F(ne),F(P);var Ue=s(P,2),We=c(Ue),V=e=>{var t=jH(),n=c(t),i=c(n,!0);F(n),F(t),g(e=>r(i,e),[()=>l(()=>Y(`updatingModelCosts`))]),f(e,t)};i(We,e=>{p(me)&&e(V)});var Ge=s(We,2),Ke=c(Ge),qe=c(Ke),Je=c(qe,!0);F(qe);var Ye=s(qe,2),et=c(Ye,!0);F(Ye),F(Ke),NV(s(Ke,2),{get providers(){return d(p(n)),l(()=>p(n).providerSummary)},get metric(){return p(Qe)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(Ee)},formatUsageMetric:pr,formatPercent:Mn}),F(Ge);var tt=s(Ge,2);h(tt,()=>p(Xe),t=>{{let r=e(()=>(d(p(n)),l(()=>fr(p(n)))));sH(t,{get buckets(){return d(p(n)),l(()=>p(n).trend.buckets)},get metric(){return p(Qe)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(Ee)},get selectedWindow(){return p(Xe)},get timeZone(){return d(p(n)),l(()=>p(n).timeZone)},get granularity(){return d(p(n)),l(()=>p(n).trend.granularity)},get rangeLabel(){return p(r)},formatUsageMetric:pr,describeSegment:hr})}}),F(Ue);var nt=s(Ue,2),rt=e=>{var t=VH(),a=c(t),o=c(a),m=c(o,!0);F(o);var h=s(o,2),_=c(h,!0);F(h),F(a);var v=s(a,2),y=e=>{var t=MH(),n=c(t),i=c(n,!0);F(n);var a=s(n,2),o=c(a,!0);F(a),F(t),g((e,t)=>{r(i,e),r(o,t)},[()=>l(()=>Y(`planValueEmpty`)),()=>l(()=>Y(`planValueEmptyAction`))]),u(`click`,a,()=>yn(`plans`)),f(e,t)},b=e=>{var t=LH(),a=re(t),o=c(a);wV(o,{get planValue(){return d(p(n)),l(()=>p(n).planValue)},get locale(){return p(Ee)},get formatters(){return p(_e)}});var u=s(o,2);le(u,5,()=>p(be),e=>e.key,(e,t)=>{var n=IH(),a=c(n),o=c(a),u=c(o),d=s(u,2),m=c(d,!0);F(d);var h=s(d,2),_=c(h,!0);F(h),F(o);var v=s(o,2);let y;var b=c(v,!0);F(v),F(a);var x=s(a,2),S=c(x),C=s(S,2);F(x);var w=s(x,2),T=c(w),E=c(T),D=c(E,!0);F(E);var O=s(E,2),A=c(O,!0);F(O),F(T);var j=s(T,2),M=c(j),N=c(M,!0);F(M);var P=s(M,2),I=c(P,!0);F(P),F(j);var L=s(j,2),ee=c(L),R=c(ee,!0);F(ee);var te=s(ee,2),ne=c(te,!0);F(te),F(L);var re=s(L,2),ie=c(re),ae=c(ie,!0);F(ie);var oe=s(ie,2),z=c(oe,!0);F(oe),F(re);var B=s(re,2),se=e=>{var n=NH(),i=c(n),a=c(i,!0);F(i);var o=s(i,2),u=c(o);F(o),F(n),g((e,n)=>{r(a,e),r(u,`${p(t),l(()=>p(t).savingsLabel)??``} · ${n??``}`)},[()=>(p(t),l(()=>p(t).savingsIsLoss?Y(`planValueOverpaid`):Y(`planValueSavings`))),()=>l(()=>Y(`planValuePerMillion`))]),f(e,n)};i(B,e=>{p(t),l(()=>p(t).savingsLabel)&&e(se)}),F(w);var le=s(w,2),ue=e=>{var n=PH(),i=c(n),a=c(i),o=c(a);F(a);var u=s(a,2),d=c(u);F(u),F(i);var m=s(i,2),h=c(m),_=s(h,2);F(m);var v=s(m,2);let y;var b=c(v);F(v),F(n),g((e,n,i,a,s,c,u,f,g)=>{r(o,`${e??``} · ${n??``}`),r(d,`${i??``}/${a??``}
|
|
23
|
-
${s??``}`),k(m,`aria-label`,c),ce(h,(p(t),l(()=>`width:${p(t).period.earnedPercent}%;background:${p(t).color}`))),ce(_,(p(t),l(()=>`left:${p(t).period.elapsedPercent}%`))),k(_,`title`,u),y=de(v,1,`svelte-1uha8ag`,null,y,{"plan-value-behind":!p(t).period.onPace}),r(b,`${f??``}
|
|
24
|
-
${p(t),l(()=>p(t).period.earnedLabel)??``} / ${p(t),l(()=>p(t).period.periodCostLabel)??``} · ${g??``}`)},[()=>l(()=>Y(`planPeriodLabel`)),()=>(p(t),l(()=>lr(p(t).period.start,p(t).period.end))),()=>(p(t),l(()=>Math.floor(p(t).period.elapsedDays))),()=>(p(t),l(()=>Math.round(p(t).period.totalDays))),()=>l(()=>Y(`planPeriodDays`)),()=>(p(t),l(()=>`${Y(`planPeriodEarnedBack`)} ${p(t).period.earnedLabel} / ${p(t).period.periodCostLabel}`)),()=>(p(t),l(()=>p(t).period.onPace?Y(`planPeriodOnPace`):Y(`planPeriodBehindPace`))),()=>l(()=>Y(`planPeriodEarnedBack`)),()=>(p(t),l(()=>p(t).period.onPace?Y(`planPeriodOnPace`):Y(`planPeriodBehindPace`)))]),f(e,n)};i(le,e=>{p(t),l(()=>p(t).period)&&e(ue)});var fe=s(le,2),pe=e=>{var t=FH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`planValuePartial`))]),f(e,t)},me=e=>{var t=FH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`planValueUnavailable`))]),f(e,t)};i(fe,e=>{p(t),l(()=>p(t).bound===`lower`)?e(pe):(p(t),l(()=>p(t).bound===`unavailable`)&&e(me,1))}),F(n),g((e,n,i,a,o,s)=>{ce(u,(p(t),l(()=>`background:${p(t).color}`))),r(m,(p(t),l(()=>p(t).name))),r(_,(p(t),l(()=>p(t).planLabel))),y=de(v,1,`plan-value-ratio svelte-1uha8ag`,null,y,{"plan-value-below":p(t).ratio!==null&&!p(t).beatsBreakEven}),r(b,(p(t),l(()=>p(t).ratioLabel))),k(x,`aria-label`,e),ce(S,(p(t),l(()=>`width:${p(t).meterPercent}%;background:${p(t).color}`))),ce(C,(p(t),l(()=>`left:${p(t).breakEvenPercent}%`))),k(C,`title`,n),r(D,i),r(A,(p(t),l(()=>p(t).paidLabel))),r(N,a),r(I,(p(t),l(()=>p(t).worthLabel))),r(R,o),r(ne,(p(t),l(()=>p(t).effectiveUnitPriceLabel))),r(ae,s),r(z,(p(t),l(()=>p(t).retailUnitPriceLabel)))},[()=>(p(t),l(()=>`${Y(`planValueRatio`)} ${p(t).ratioLabel}`)),()=>l(()=>Y(`planValueBreakEven`)),()=>l(()=>Y(`planValuePaid`)),()=>l(()=>Y(`planValueWorth`)),()=>l(()=>Y(`planValueEffectiveUnitPrice`)),()=>l(()=>Y(`planValueRetailUnitPrice`))]),f(e,n)}),F(u),F(a);var m=s(a,2),h=c(m,!0);F(m),g(e=>r(h,e),[()=>l(()=>Y(`planValueWindowNote`))]),f(e,t)};i(v,e=>{d(p(n)),l(()=>p(n).planValue.entries.length===0)?e(y):e(b,-1)});var x=s(v,2),S=e=>{var t=BH(),i=c(t);le(i,1,()=>(d(p(n)),l(()=>p(n).planValue.meteredDomains)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var i=RH(),a=c(i),o=c(a);F(a);var u=s(a,2),m=c(u,!0);F(u);var h=s(u,2),_=c(h);F(h),F(i),g((e,n,i)=>{r(o,`${p(t),l(()=>p(t).providerDisplayName)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``}`),r(m,e),r(_,`${n??``} · ${i??``}`)},[()=>l(()=>Y(`planValueMetered`)),()=>l(()=>Y(`actualCost`)),()=>(p(t),d(p(n)),l(()=>cr(p(t).actualCost.amount,p(n).comparisonCurrency)))]),f(e,i)});var a=s(i,2);le(a,1,()=>p(ye),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var n=zH(),i=c(n),a=c(i);F(i);var o=s(i,2),d=c(o,!0);F(o);var m=s(o,2),h=c(m,!0);F(m),F(n),g((e,n)=>{r(a,`${p(t),l(()=>p(t).providerDisplayName)??``} · ${p(t),l(()=>p(t).billingDomainDisplayName)??``}`),r(d,e),r(h,n)},[()=>l(()=>Y(`planValueUnconfigured`)),()=>l(()=>Y(`planValueEmptyAction`))]),u(`click`,m,()=>yn(`plans`)),f(e,n)}),F(t),f(e,t)};i(x,e=>{d(p(n)),p(ye),l(()=>p(n).planValue.meteredDomains.length>0||p(ye).length>0)&&e(S)}),F(t),g((e,n)=>{k(t,`aria-busy`,p(me)),r(m,e),r(_,n)},[()=>l(()=>Y(`planValue`)),()=>l(()=>Y(`planValueSubtitle`))]),f(e,t)};i(nt,e=>{d(p(n)),l(()=>p(n).planValue)&&e(rt)});var it=s(nt,2),at=c(it),ot=e=>{var t=HH(),n=c(t),i=c(n,!0);F(n),F(t),g(e=>r(i,e),[()=>l(()=>Y(`updatingModelCosts`))]),f(e,t)};i(at,e=>{p(me)&&e(ot)});var st=s(at,2),ct=c(st),lt=c(ct),ut=c(lt,!0);F(lt),F(ct);var dt=s(ct,2),ft=c(dt),pt=c(ft,!0);F(ft);var H=s(ft,2),U=c(H,!0);F(H);var mt=s(H,2),ht=c(mt,!0);F(mt),F(dt),F(st);var gt=s(st,2),_t=c(gt),vt=c(_t,!0);F(_t);var yt=s(_t,2),W=c(yt,!0);F(yt);var G=s(yt,2),bt=c(G,!0);F(G);var xt=s(G,2),St=c(xt,!0);F(xt),F(gt);var Ct=s(gt,2),wt=t=>{var i=UH(),a=c(i);{let t=e(()=>(d(p(n)),p(Qe),l(()=>gr(p(n),p(Qe)))));oV(a,{get models(){return p(t)},get metric(){return p(Qe)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(Ee)},formatUsageMetric:pr,formatPercent:Mn,onSelect:e=>void _r(e,null)})}var o=s(a,2),u=c(o,!0);F(o),F(i),g(e=>r(u,e),[()=>l(()=>Y(`treemapHint`))]),f(t,i)},Tt=t=>{var r=WH(),i=c(r);{let t=e(()=>(d(p(n)),p(Qe),l(()=>gr(p(n),p(Qe)))));cV(i,{get models(){return p(t)},get metric(){return p(Qe)},get currency(){return d(p(n)),l(()=>p(n).comparisonCurrency)},get locale(){return p(Ee)},formatUsageMetric:pr,onSelect:e=>void _r(e,null)})}F(r),f(t,r)},Et=t=>{var a=JH(),o=c(a);le(o,5,()=>(d(p(n)),p(Qe),l(()=>gr(p(n),p(Qe)))),e=>e.id,(t,n)=>{let a=e(()=>(p(n),l(()=>Xn(p(n).providerId)))),o=e(()=>(p(n),l(()=>p(n).retailEquivalent.amount===null?p(n).reportedEstimate??p(n).retailEquivalent:p(n).retailEquivalent))),m=e(()=>(p(n),p(Qe),l(()=>mr(p(n),p(Qe)))));var h=qH(),_=c(h),v=c(_),y=c(v),b=e=>{var t=GH();g(e=>{k(t,`data-provider-logo`,(p(n),l(()=>p(n).providerId))),k(t,`src`,e)},[()=>(d(p(a)),E(),l(()=>Zn(p(a),E())))]),f(e,t)};i(y,e=>{p(a)&&e(b)});var x=s(y,2),S=c(x),C=c(S,!0);F(S);var w=s(S,2),T=c(w);F(w);var D=s(w,2),O=e=>{var t=yH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`separateFromHeadline`))]),f(e,t)};i(D,e=>{p(n),l(()=>p(n).includedInHeadline===!1)&&e(O)}),F(x),F(v);var A=s(v,2),j=c(A),M=c(j,!0);F(j),F(A);var N=s(A,2),P=c(N),I=c(P,!0);F(P);var L=s(P,2),ee=e=>{var t=KH(),r=c(t);F(t),g((e,n,i)=>{k(t,`aria-label`,e),k(t,`aria-valuenow`,n),ce(r,i)},[()=>(p(n),l(()=>`${p(n).model} ${X()}`)),()=>(d(p(m)),l(()=>Math.round(p(m)*1e3)/10)),()=>(d(p(m)),l(()=>`width: ${Math.max(2,Math.min(100,p(m)*100))}%`))]),f(e,t)};i(L,e=>{p(m)!==null&&e(ee)}),F(N);var R=s(N,2),te=c(R),ne=c(te,!0);F(te),F(R),F(_),F(h),g((e,t,i,a,o,s,c)=>{r(C,(p(n),l(()=>p(n).model))),r(T,`${p(n),l(()=>p(n).providerDisplayName)??``} · ${p(n),l(()=>p(n).billingDomainDisplayName)??``}`),k(A,`data-label`,e),r(M,t),k(N,`data-label`,i),r(I,a),k(R,`data-label`,o),k(te,`aria-label`,s),r(ne,c)},[()=>l(()=>Y(`cost`)),()=>(d(p(o)),l(()=>p(o).amount===null?Y(`notAvailable`):cr(p(o).amount,p(o).comparisonCurrency))),()=>l(X),()=>(p(n),d(p(m)),l(()=>p(n).includedInHeadline===!1?Y(`headlineShareNotApplicable`):Mn(p(m)))),()=>l(()=>Y(`tokens`)),()=>(p(n),l(()=>jn(p(n).tokenTotals.total))),()=>(p(n),l(()=>An(p(n).tokenTotals.total)))]),u(`click`,_,e=>_r(p(n).id,e.currentTarget)),u(`keydown`,_,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_r(p(n).id,e.currentTarget))}),f(t,h)}),F(o),F(a),f(t,a)};i(Ct,e=>{p($e)===`treemap`?e(wt):p($e)===`trend`?e(Tt,1):e(Et,-1)}),F(it),F(a),g((e,t,n,i,a,o,s,c,l,u,d,f,m,h,g,_,y,b,x,w,E,F,I,L,ee,ne,re,ie,oe,z,B,ce,le,ue,de)=>{r(v,e),r(S,t),r(C,n),k(T,`aria-label`,i),k(D,`aria-pressed`,p(Qe)===`retail-equivalent`),r(O,a),k(A,`aria-pressed`,p(Qe)===`tokens`),r(j,o),k(M,`aria-label`,s),k(N,`aria-label`,c),k(P,`aria-label`,l),k(P,`aria-busy`,p(me)),k(R,`aria-label`,u),r(te,d),r(ae,f),r(se,m),r(fe,h),r(ge,g),r(xe,_),r(we,y),r(De,b),r(Ae,x),r(Me,w),r(Fe,E),r(Le,F),r(Be,I),r(He,L),k(Ue,`aria-busy`,p(me)),r(Je,ee),r(et,ne),k(it,`aria-busy`,p(me)),r(ut,re),k(dt,`aria-label`,ie),k(ft,`aria-selected`,p($e)===`list`),r(pt,oe),k(H,`aria-selected`,p($e)===`treemap`),r(U,z),k(mt,`aria-selected`,p($e)===`trend`),r(ht,B),r(vt,ce),r(W,le),r(bt,ue),r(St,de)},[()=>l(()=>Y(`tokenMoneyWorkbench`)),()=>l(()=>Y(`usage`)),()=>(d(p(n)),l(()=>fr(p(n)))),()=>l(()=>Y(`trendMetric`)),()=>l(()=>Y(`cost`)),()=>l(()=>Y(`tokens`)),()=>l(()=>Y(`history`)),()=>l(()=>Y(`displayCurrency`)),()=>l(()=>Y(`usageOverview`)),()=>(p(Qe),d(p(n)),l(()=>p(Qe)===`tokens`?p(n).recordedTokens===null?Y(`notAvailable`):jn(p(n).recordedTokens):cr(p(n).costs.retailEquivalent.amount,p(n).comparisonCurrency))),()=>(p(Qe),d(p(n)),l(()=>p(Qe)===`tokens`?p(n).recordedTokens===null?Y(`notAvailable`):An(p(n).recordedTokens):cr(p(n).costs.retailEquivalent.amount,p(n).comparisonCurrency))),()=>l(()=>Y(`usageTotals`)),()=>l(()=>Y(`recordedTokens`)),()=>(d(p(n)),l(()=>p(n).recordedTokens===null?Y(`notAvailable`):An(p(n).recordedTokens))),()=>l(()=>Y(`input`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):An(p(n).tokenBreakdown.tokenTotals.input))),()=>l(()=>Y(`output`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):An(p(n).tokenBreakdown.tokenTotals.output))),()=>l(()=>Y(`reasoning`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):An(p(n).tokenBreakdown.tokenTotals.reasoning))),()=>l(()=>Y(`cacheRead`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):An(p(n).tokenBreakdown.tokenTotals.cacheRead))),()=>l(()=>Y(`cacheWrite`)),()=>(d(p(n)),l(()=>p(n).tokenBreakdown.status===`unavailable`?Y(`notAvailable`):An(p(n).tokenBreakdown.tokenTotals.cacheWrite))),()=>l(()=>Y(`providerShare`)),()=>l(()=>Y(`providerShareSubtitle`)),()=>l(()=>Y(`breakdown`)),()=>l(()=>Y(`breakdownView`)),()=>l(()=>Y(`list`)),()=>l(()=>Y(`treemap`)),()=>l(()=>Y(`trendStacked`)),()=>l(()=>Y(`model`)),()=>l(()=>Y(`cost`)),()=>l(X),()=>l(()=>Y(`tokens`))]),u(`click`,D,()=>dr(`retail-equivalent`)),u(`click`,A,()=>dr(`tokens`)),u(`click`,ft,()=>b($e,`list`)),u(`click`,H,()=>b($e,`treemap`)),u(`click`,mt,()=>b($e,`trend`)),f(t,a)};i(a,e=>{p(At),l(()=>p(At).workbench)&&e(o)}),F(n),f(t,n)};i(v,e=>{p(Ye)===`agents`?e(y):e(x,-1)}),f(t,n)};i(Ce,e=>{p(At)?p(Ye)===`models`&&p(Le)&&!p(Oe)?e(Te,1):p(At)&&e(De,2):e(we)}),F(a);var Me=s(a,2),Pe=t=>{var n=gU(),a=c(n),o=c(a),m=c(o),h=c(m),_=c(h,!0);F(h);var y=s(h,2),S=c(y,!0);F(y);var C=s(y,2),w=c(C,!0);F(C),F(m);var E=s(m,2);F(o);var M=s(o,2),N=c(M);let L;var ee=c(N,!0);F(N);var R=s(N,2);let te;var ie=c(R,!0);F(R);var ae=s(R,2);let z;var se=c(ae);F(ae);var ce=s(ae,2);let ue;var fe=c(ce,!0);F(ce);var pe=s(ce,2);let me;var he=c(pe,!0);F(pe),F(M);var _e=s(M,2),ve=c(_e),ye=c(ve),be=c(ye),xe=c(be,!0);F(be);var Se=s(be,2),Ce=c(Se,!0);F(Se),F(ye);var we=s(ye,2),Te=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`connectorsUnavailable`))]),f(e,t)};i(we,e=>{p(ze)&&e(Te)});var Ee=s(we,2);le(Ee,5,()=>p(Ge),e=>e.id,(e,t)=>{var n=$H();let a;var o=c(n),d=c(o),m=c(d,!0);F(d);var h=s(d,2),_=c(h,!0);F(h),F(o);var v=s(o,2),y=c(v,!0);F(v);var x=s(v,2),S=c(x);F(x);var C=s(x,2),w=e=>{var n=bH(),i=c(n),a=c(i,!0);F(i);var o=s(i,2);D(o),F(n),g((e,n)=>{r(a,e),k(o,`aria-label`,n),I(o,(p(qe),p(t),l(()=>p(qe)[p(t).id]??``)))},[()=>l(()=>Y(`managementKey`)),()=>(p(t),l(()=>`${p(t).displayName} ${Y(`managementKey`)}`))]),u(`input`,o,e=>b(qe,{...p(qe),[p(t).id]:e.currentTarget.value})),f(e,n)};i(C,e=>{p(t),l(()=>p(t).credentialOwner===`agent-usage`)&&e(w)});var T=s(C,2),E=c(T),O=e=>{var n=xH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(Ke),p(t),p(qe),l(()=>p(Ke)===p(t).id||!p(qe)[p(t).id])),r(i,e)},[()=>l(()=>Y(`replaceCredential`))]),u(`click`,n,()=>vn(p(t).id,`connect`)),f(e,n)};i(E,e=>{p(t),l(()=>p(t).state===`connected`&&p(t).credentialOwner===`agent-usage`)&&e(O)});var A=s(E,2),j=e=>{var n=xH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(t),p(Ke),p(qe),l(()=>!p(t).installed||p(Ke)===p(t).id||p(t).credentialOwner===`agent-usage`&&!p(qe)[p(t).id])),r(i,e)},[()=>l(()=>Y(`connect`))]),u(`click`,n,()=>vn(p(t).id,`connect`)),f(e,n)};i(A,e=>{p(t),l(()=>p(t).state===`discovered`||p(t).state===`skipped`)&&e(j)});var M=s(A,2),N=e=>{var n=SH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(Ke),p(t),l(()=>p(Ke)===p(t).id)),r(i,e)},[()=>l(()=>Y(`retry`))]),u(`click`,n,()=>vn(p(t).id,`retry`)),f(e,n)};i(M,e=>{p(t),l(()=>p(t).state===`error`||p(t).state===`not-installed`||p(t).state===`connected`)&&e(N)});var P=s(M,2),L=e=>{var n=SH(),i=c(n,!0);F(n),g(e=>{n.disabled=(p(Ke),p(t),l(()=>p(Ke)===p(t).id)),r(i,e)},[()=>l(()=>Y(`skip`))]),u(`click`,n,()=>vn(p(t).id,`skip`)),f(e,n)};i(P,e=>{p(t),l(()=>p(t).state!==`skipped`)&&e(L)}),F(T),F(n),g((e,i,o)=>{k(n,`data-settings-target`,(p(t),l(()=>`connector:${p(t).id}`))),k(n,`data-testid`,(p(t),l(()=>`settings-connector-${p(t).id}`))),a=de(n,1,`svelte-1uha8ag`,null,a,{"settings-target-active":p(K)===`connector:${p(t).id}`}),r(m,(p(t),l(()=>p(t).displayName))),r(_,e),r(y,i),r(S,`${o??``} · ${p(t),l(()=>p(t).target.billingDomain.displayName)??``}`)},[()=>(p(t),l(()=>wn(p(t).state))),()=>(p(t),l(()=>En(p(t)))),()=>(p(t),l(()=>Tn(p(t).credentialOwner)))]),f(e,n)}),F(Ee),F(ve);var De=s(ve,2);let Oe;var ke=c(De),Ae=c(ke),je=c(Ae,!0);F(Ae);var Me=s(Ae,2),Ne=c(Me,!0);F(Me),F(ke);var Pe=s(ke,2),Fe=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`plansUnavailable`))]),f(e,t)};i(Pe,e=>{p(ot)&&e(Fe)});var Ie=s(Pe,2),Le=t=>{var n=iU();le(n,5,()=>(p(at),l(()=>p(at).domains)),e=>`${e.providerId}:${e.billingDomainId}`,(t,n)=>{let a=e(()=>(p(n),l(()=>Xt(p(n).providerId,p(n).billingDomainId)))),o=e(()=>(p(st),d(p(a)),l(()=>p(st)[p(a)]))),m=e(()=>(p(at),p(n),l(()=>p(at).subscriptions.find(e=>e.providerId===p(n).providerId&&e.billingDomainId===p(n).billingDomainId))));var h=rU(),_=c(h),v=c(_),y=c(v,!0);F(v);var b=s(v,2),S=c(b,!0);F(b),F(_);var C=s(_,2),w=e=>{var t=nU(),h=re(t),_=c(h),v=c(_,!0);F(_);var y=s(_,2),b=c(y),S=c(b,!0);F(b),b.value=b.__value=`none`;var C=s(b);le(C,1,()=>(p(n),l(()=>p(n).presets)),e=>e.id,(e,t)=>{var n=eU(),i=c(n,!0);F(n);var a={};g(()=>{r(i,(p(t),l(()=>p(t).displayName))),a!==(a=(p(t),l(()=>p(t).id)))&&(n.value=(n.__value=(p(t),l(()=>p(t).id)))??``)}),f(e,n)});var w=s(C),T=c(w,!0);F(w),w.value=w.__value=`custom`,F(y);var E;A(y),F(h);var O=s(h,2),k=e=>{var t=tU(),n=re(t),i=c(n),m=c(i),h=c(m,!0);F(m);var _=s(m,2);D(_),F(i);var v=s(i,2),y=c(v),b=c(y,!0);F(y);var S=s(y,2);D(S),F(v);var C=s(v,2),w=c(C),T=c(w,!0);F(w);var E=s(w,2),O=c(E),k=c(O,!0);F(O),O.value=O.__value=`monthly`;var j=s(O),M=c(j,!0);F(j),j.value=j.__value=`annual`,F(E);var N;A(E),F(C),F(n);var P=s(n,2),L=c(P),ee=c(L,!0);F(L);var R=s(L,2);D(R);var te=s(R,2),ne=c(te,!0);F(te),F(P),g((e,t,n,i,a,s,c)=>{r(h,e),I(_,(d(p(o)),l(()=>p(o).amount))),r(b,t),I(S,(d(p(o)),l(()=>p(o).currency))),r(T,n),r(k,i),r(M,a),N!==(N=(d(p(o)),l(()=>p(o).billingPeriod)))&&(E.value=(E.__value=(d(p(o)),l(()=>p(o).billingPeriod)))??``,x(E,(d(p(o)),l(()=>p(o).billingPeriod)))),r(ee,s),I(R,(d(p(o)),l(()=>p(o).anchorDate))),r(ne,c)},[()=>l(()=>Y(`planAmount`)),()=>l(()=>Y(`planCurrency`)),()=>l(()=>Y(`planPeriod`)),()=>l(()=>Y(`planPeriodMonthly`)),()=>l(()=>Y(`planPeriodAnnual`)),()=>l(()=>Y(`planAnchorDate`)),()=>l(()=>Y(`planAnchorHint`))]),u(`input`,_,e=>Z(p(a),{amount:e.currentTarget.value})),u(`input`,S,e=>Z(p(a),{currency:e.currentTarget.value.toUpperCase()})),u(`change`,E,e=>Z(p(a),{billingPeriod:e.currentTarget.value})),u(`input`,R,e=>Z(p(a),{anchorDate:e.currentTarget.value})),f(e,t)};i(O,e=>{d(p(o)),l(()=>p(o).selection!==`none`)&&e(k)});var j=s(O,2),M=c(j),N=c(M,!0);F(M);var P=s(M,2),L=e=>{var t=yH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>(d(p(m)),l(()=>p(m).priceSource===`catalog-preset`?Y(`planPresetSource`):Y(`planUserEntered`)))]),f(e,t)};i(P,e=>{p(m)&&e(L)}),F(j),g((e,t,n,i)=>{r(v,e),r(S,t),r(T,n),E!==(E=(d(p(o)),l(()=>p(o).selection)))&&(y.value=(y.__value=(d(p(o)),l(()=>p(o).selection)))??``,x(y,(d(p(o)),l(()=>p(o).selection)))),M.disabled=p(ct)===p(a),r(N,i)},[()=>l(()=>Y(`planPreset`)),()=>l(()=>Y(`planNone`)),()=>l(()=>Y(`planCustom`)),()=>(d(p(o)),l(()=>p(o).selection===`none`?Y(`planClear`):Y(`planSave`)))]),u(`change`,y,e=>Z(p(a),{selection:e.currentTarget.value})),u(`click`,M,()=>Qt(p(n).providerId,p(n).billingDomainId)),f(e,t)};i(C,e=>{p(o)&&e(w)}),F(h),g(()=>{k(h,`data-testid`,(p(n),l(()=>`plan-domain-${p(n).providerId}-${p(n).billingDomainId}`))),r(y,(p(n),l(()=>p(n).providerDisplayName))),r(S,(p(n),l(()=>p(n).billingDomainDisplayName)))}),f(t,h)}),F(n),f(t,n)};i(Ie,e=>{p(at)&&e(Le)}),F(De);var Re=s(De,2);let He;var Ue=c(Re),Je=c(Ue),Ye=c(Je),Xe=c(Ye,!0);F(Ye);var Ze=s(Ye,2),Qe=c(Ze);let $e;var et=s(Qe);F(Ze),F(Je);var tt=s(Je,2),nt=c(tt,!0);F(tt),F(Ue);var rt=s(Ue,2),yt=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`customRatesUnavailable`))]),f(e,t)};i(rt,e=>{p(ft)&&e(yt)});var Ct=s(rt,2),wt=c(Ct),Tt=c(wt),Et=c(Tt),Dt=c(Et),q=c(Dt,!0);F(Dt);var kt=s(Dt,2),J=c(kt);le(J,1,()=>lt,e=>e.id,(e,t)=>{var n=eU(),i=c(n);F(n);var a={};g(()=>{r(i,`${p(t),l(()=>p(t).label)??``} (${p(t),l(()=>p(t).id)??``})`),a!==(a=(p(t),l(()=>p(t).id)))&&(n.value=(n.__value=(p(t),l(()=>p(t).id)))??``)}),f(e,n)});var At=s(J),jt=c(At,!0);F(At),At.value=At.__value=`custom`,F(kt),F(Et);var Mt=s(Et,2),Nt=e=>{var t=aU(),n=c(t),i=c(n);F(n);var a=s(n,2);D(a),F(t),g((e,t)=>{r(i,`${e??``} ID`),k(a,`placeholder`,t)},[()=>l(()=>Y(`customRateProvider`)),()=>l(()=>Y(`customRateProviderCustomPlaceholder`))]),B(a,()=>p(H).providerId,e=>v(H,p(H).providerId=e)),f(e,t)};i(Mt,e=>{p(ut)===`custom`&&e(Nt)});var Pt=s(Mt,2),Ft=c(Pt),X=c(Ft,!0);F(Ft);var It=s(Ft,2);D(It),F(Pt);var Lt=s(Pt,2),Rt=c(Lt),zt=c(Rt,!0);F(Rt);var Bt=s(Rt,2);D(Bt),F(Lt);var Vt=s(Lt,2),Ht=c(Vt),Ut=c(Ht,!0);F(Ht);var Wt=s(Ht,2);D(Wt),F(Vt);var Gt=s(Vt,2),Kt=c(Gt),qt=c(Kt,!0);F(Kt);var Jt=s(Kt,2);D(Jt),F(Gt);var Yt=s(Gt,2),Zt=c(Yt),sn=c(Zt,!0);F(Zt);var cn=s(Zt,2);D(cn),F(Yt),F(Tt);var ln=s(Tt,2),un=c(ln),dn=c(un,!0);F(un),F(ln),F(wt);var fn=s(wt,2),mn=e=>{var t=oU(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`loading`))]),f(e,t)},xn=e=>{var t=oU(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`customRateEmpty`))]),f(e,t)},Sn=e=>{var t=uU();le(t,5,()=>p(dt),e=>e.id,(e,t)=>{var n=lU(),a=c(n),o=e=>{var n=sU(),i=c(n),a=c(i),o=c(a,!0);F(a);var d=s(a,2),m=c(d);F(d),F(i);var h=s(i,2),_=c(h),y=c(_),b=c(y,!0);F(y);var x=s(y,2);D(x),F(_);var S=s(_,2),C=c(S),w=c(C,!0);F(C);var T=s(C,2);D(T),F(S);var E=s(S,2),O=c(E),A=c(O,!0);F(O);var j=s(O,2);D(j),F(E);var M=s(E,2),N=c(M),P=c(N,!0);F(N);var I=s(N,2);D(I),F(M),F(h);var L=s(h,2),ee=c(L),R=c(ee,!0);F(ee);var te=s(ee,2),ne=c(te,!0);F(te),F(L),F(n),g((e,n,i,a,s,c,u,d)=>{r(o,(p(t),l(()=>p(t).model))),r(m,`${p(t),l(()=>p(t).providerId)??``} · ${e??``}`),r(b,n),k(x,`placeholder`,i),r(w,a),r(A,s),r(P,c),ee.disabled=p(gt),r(R,u),te.disabled=p(gt),r(ne,d)},[()=>(p(t),l(()=>p(t).billingDomainId??Y(`customRateDomainWildcard`))),()=>l(()=>Y(`customRateDomain`)),()=>l(()=>Y(`customRateDomainWildcard`)),()=>l(()=>Y(`customRateInput`)),()=>l(()=>Y(`customRateOutput`)),()=>l(()=>Y(`customRateCacheRead`)),()=>(p(gt),l(()=>p(gt)?Y(`customRateUpdating`):Y(`customRateSave`))),()=>l(()=>Y(`customRateCancel`))]),B(x,()=>p(ht).billingDomainId,e=>v(ht,p(ht).billingDomainId=e)),B(T,()=>p(ht).inputRate,e=>v(ht,p(ht).inputRate=e)),B(j,()=>p(ht).outputRate,e=>v(ht,p(ht).outputRate=e)),B(I,()=>p(ht).cacheReadRate,e=>v(ht,p(ht).cacheReadRate=e)),u(`click`,te,rn),u(`submit`,n,oe(an)),f(e,n)},d=e=>{var n=cU(),i=re(n),a=c(i),o=c(a),d=c(o,!0);F(o);var m=s(o,2),h=c(m,!0);F(m),F(a);var _=s(a,2),v=c(_);F(_),F(i);var y=s(i,2),b=c(y),x=c(b),S=c(x);F(x);var C=s(x,2),w=c(C);F(C),F(b);var T=s(b,2),E=c(T),D=c(E);F(E);var O=s(E,2),k=c(O);F(O),F(T);var A=s(T,2),j=c(A),M=c(j);F(j);var N=s(j,2),P=c(N);F(N),F(A),F(y);var I=s(y,2),L=c(I),ee=c(L);F(L);var R=s(L,2),te=c(R),ne=c(te,!0);F(te);var ie=s(te,2),ae=c(ie,!0);F(ie),F(R),F(I),g((e,n,i,a,o,s,c,u)=>{r(d,(p(t),l(()=>p(t).model))),r(h,(p(t),l(()=>p(t).providerId))),r(v,`${p(t),l(()=>p(t).providerId)??``} · ${e??``}`),r(S,`${n??``}:`),r(w,`$${p(t),l(()=>p(t).ratesPerMillion.input)??``}/M`),r(D,`${i??``}:`),r(k,`$${p(t),l(()=>p(t).ratesPerMillion.output)??``}/M`),r(M,`${a??``}:`),r(P,`$${p(t),l(()=>p(t).ratesPerMillion.cacheRead)??``}/M`),r(ee,`${o??``}
|
|
25
|
-
${s??``}`),r(ne,c),ie.disabled=(p(_t),p(t),l(()=>p(_t)===p(t).id)),r(ae,u)},[()=>(p(t),l(()=>p(t).billingDomainId??Y(`customRateDomainWildcard`))),()=>l(()=>Y(`customRateInput`)),()=>l(()=>Y(`customRateOutput`)),()=>l(()=>Y(`customRateCacheRead`)),()=>l(()=>Y(`customRateUpdated`)),()=>(p(t),l(()=>Nn(p(t).updatedAt))),()=>l(()=>Y(`customRateEdit`)),()=>(p(_t),p(t),l(()=>p(_t)===p(t).id?Y(`customRateDeleting`):Y(`customRateDelete`)))]),u(`click`,te,()=>nn(p(t))),u(`click`,ie,()=>on(p(t).id)),f(e,n)};i(a,e=>{p(mt),p(t),l(()=>p(mt)===p(t).id)?e(o):e(d,-1)}),F(n),g(()=>k(n,`data-testid`,(p(t),l(()=>`custom-rate-${p(t).id}`)))),f(e,n)}),F(t),f(e,t)};i(fn,e=>{p(pt),p(dt),l(()=>p(pt)&&p(dt).length===0)?e(mn):(p(dt),l(()=>p(dt).length===0)?e(xn,1):e(Sn,-1))}),F(Ct),F(Re);var Cn=s(Re,2),kn=c(Cn),An=c(kn),jn=c(An,!0);F(An);var Mn=s(An,2),Pn=c(Mn,!0);F(Mn),F(kn);var Fn=s(kn,2),In=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`monitoringUnavailable`))]),f(e,t)};i(Fn,e=>{p(Be)&&e(In)});var Ln=s(Fn,2),Rn=e=>{var t=dU(),n=c(t),i=c(n);D(i);var a=s(i);F(n);var o=s(n,2),d=c(o);D(d);var m=s(d);F(o);var h=s(o,2),_=c(h);D(_);var v=s(_);F(h),F(t),g((e,t,n)=>{ne(i,(p(it),l(()=>p(it).backgroundCollectionEnabled))),r(a,` ${e??``}`),ne(d,(p(it),l(()=>p(it).notificationsEnabled))),r(m,` ${t??``}`),ne(_,(p(it),l(()=>p(it).startAtLogin))),r(v,` ${n??``}`)},[()=>l(()=>Y(`backgroundCollection`)),()=>l(()=>Y(`notifications`)),()=>l(()=>Y(`startAtLogin`))]),u(`change`,i,e=>_n({backgroundCollectionEnabled:e.currentTarget.checked})),u(`change`,d,e=>_n({notificationsEnabled:e.currentTarget.checked})),u(`change`,_,e=>_n({startAtLogin:e.currentTarget.checked})),f(e,t)};i(Ln,e=>{p(it)&&e(Rn)}),F(Cn);var zn=s(Cn,2),Bn=c(zn),Hn=c(Bn),Un=c(Hn,!0);F(Hn);var Wn=s(Hn,2),Gn=c(Wn,!0);F(Wn),F(Bn);var Kn=s(Bn,2),qn=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`diagnosticsUnavailable`))]),f(e,t)};i(Kn,e=>{p(Ve)&&e(qn)});var Jn=s(Kn,2),Yn=e=>{var t=hU();le(t,5,()=>(p(vt),d(ge),l(()=>p(vt).connectors.filter(e=>!ge(e.category)))),e=>e.id,(e,t)=>{var n=mU();let a;var o=c(n),u=c(o),d=c(u,!0);F(u);var m=s(u,2),h=c(m,!0);F(m),F(o);var _=s(o,2),v=c(_,!0);F(_);var y=s(_,2),b=e=>{var n=fU(),i=c(n,!0);F(n),g(e=>r(i,e),[()=>(p(t),l(()=>p(t).affectedCoverage.map(Vn).join(` · `)))]),f(e,n)};i(y,e=>{p(t),l(()=>p(t).affectedCoverage.length>0)&&e(b)});var x=s(y,2),S=e=>{var n=pU(),i=c(n,!0);F(n),g(e=>r(i,e),[()=>(p(t),l(()=>On(p(t))))]),f(e,n)},C=O(()=>(p(t),l(()=>On(p(t)))));i(x,e=>{p(C)&&e(S)}),F(n),g((e,i)=>{k(n,`data-settings-target`,(p(t),l(()=>`diagnostic:${p(t).id}`))),k(n,`data-testid`,(p(t),l(()=>`settings-diagnostic-${p(t).id}`))),a=de(n,1,`svelte-1uha8ag`,null,a,{"diagnostic-degraded":p(t).status===`degraded`,"settings-target-active":p(K)===`diagnostic:${p(t).id}`}),r(d,(p(t),l(()=>p(t).id))),r(h,e),r(v,i)},[()=>(p(t),l(()=>Dn(p(t)))),()=>(p(t),l(()=>p(t).billingDomainId??Y(`unknown`)))]),f(e,n)}),F(t),f(e,t)};i(Jn,e=>{p(vt)&&e(Yn)}),F(zn);var Xn=s(zn,2),Zn=c(Xn),Qn=c(Zn),$n=c(Qn,!0);F(Qn);var er=s(Qn,2),tr=c(er,!0);F(er),F(Zn);var nr=s(Zn,2),rr=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`retentionUnavailable`))]),f(e,t)},ir=e=>{var t=yH(),n=c(t);F(t),g((e,t,i)=>r(n,`${p(W),l(()=>p(W).rawRetentionDays)??``}
|
|
26
|
-
${e??``} · ${p(W),l(()=>p(W).rawObservations)??``}
|
|
27
|
-
${t??``} · ${p(W),l(()=>p(W).dailyAggregates)??``}
|
|
28
|
-
${i??``}`),[()=>l(()=>Y(`retentionDays`)),()=>l(()=>Y(`rawObservations`)),()=>l(()=>Y(`dailyAggregates`))]),f(e,t)};i(nr,e=>{p(We)?e(rr):p(W)&&e(ir,1)});var ar=s(nr,2),or=e=>{var t=QH(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`privacyActionUnavailable`))]),f(e,t)};i(ar,e=>{p(V)&&e(or)});var sr=s(ar,2),cr=c(sr),lr=c(cr,!0);F(cr);var ur=s(cr,2),dr=c(ur,!0);F(ur);var fr=s(ur,2),pr=c(fr);D(pr);var mr=s(pr);F(fr);var hr=s(fr,2),gr=c(hr);D(gr);var _r=s(gr);F(hr);var vr=s(hr,2),yr=c(vr,!0);F(vr);var br=s(vr,2),xr=c(br,!0);F(br);var Sr=s(br,2),Cr=c(Sr,!0);F(Sr),F(sr),F(Xn),F(_e),F(a),T(a,e=>b(Ot,e),()=>p(Ot)),F(n),g((e,t,n,i,a,o,s,c,u,d,f,m,h,g,v,y,b,x,C,T,D,O,A,j,P,F,I,ne,re,oe,B,le,ge,_e,ve,ye,be,Se,we,Te,Ee,ke)=>{r(_,e),r(S,t),r(w,n),k(E,`aria-label`,i),k(M,`aria-label`,a),L=de(N,1,`svelte-1uha8ag`,null,L,o),r(ee,s),te=de(R,1,`svelte-1uha8ag`,null,te,{active:p(K)===`plans`}),r(ie,c),z=de(ae,1,`svelte-1uha8ag`,null,z,{active:p(K)===`rates`}),r(se,`${u??``} (${p(dt),l(()=>p(dt).length)??``})`),ue=de(ce,1,`svelte-1uha8ag`,null,ue,{active:p(K)===`monitoring`}),r(fe,d),me=de(pe,1,`svelte-1uha8ag`,null,me,{active:p(K)===`privacy`}),r(he,f),r(xe,m),r(Ce,h),Oe=de(De,1,`plans-section svelte-1uha8ag`,null,Oe,{"settings-target-active":p(K)===`plans`}),r(je,g),r(Ne,v),He=de(Re,1,`svelte-1uha8ag`,null,He,{"settings-target-active":p(K)===`rates`}),r(Xe,y),k(Ze,`title`,b),k(Ze,`aria-label`,x),Ze.disabled=p(pt),$e=de(Qe,1,`svelte-1uha8ag`,null,$e,{spin:p(pt)}),r(et,` ${C??``}`),r(nt,T),r(q,D),r(jt,O),r(X,A),k(It,`placeholder`,j),r(zt,P),r(Ut,F),r(qt,I),r(sn,ne),un.disabled=p(U),r(dn,re),r(jn,oe),r(Pn,B),r(Un,le),r(Gn,ge),r($n,_e),r(tr,ve),r(lr,ye),r(dr,be),r(mr,` ${Se??``}`),r(_r,` ${we??``}`),vr.disabled=p(St),r(yr,Te),r(xr,Ee),Sr.disabled=p(xt),r(Cr,ke)},[()=>l(()=>Y(`settings`)),()=>l(()=>Y(`settings`)),()=>l(()=>Y(`settingsSubtitle`)),()=>l(()=>Y(`closeSettings`)),()=>l(()=>Y(`settings`)),()=>({active:p(K)===`connections`||p(K)?.startsWith(`connector`)}),()=>l(()=>Y(`connections`)),()=>l(()=>Y(`plans`)),()=>l(()=>Y(`customRatesNav`)),()=>l(()=>Y(`monitoring`)),()=>l(()=>Y(`privacy`)),()=>l(()=>Y(`connections`)),()=>l(()=>Y(`connectionsSubtitle`)),()=>l(()=>Y(`plans`)),()=>l(()=>Y(`plansSubtitle`)),()=>l(()=>Y(`customRates`)),()=>l(()=>Y(`customRateRefreshTitle`)),()=>l(()=>Y(`customRateRefreshTitle`)),()=>l(()=>Y(`customRateRefresh`)),()=>l(()=>Y(`customRatesSubtitle`)),()=>l(()=>Y(`customRateProvider`)),()=>l(()=>Y(`customRateProviderOther`)),()=>l(()=>Y(`customRateDomain`)),()=>l(()=>Y(`customRateDomainWildcard`)),()=>l(()=>Y(`customRateModel`)),()=>l(()=>Y(`customRateInput`)),()=>l(()=>Y(`customRateOutput`)),()=>l(()=>Y(`customRateCacheRead`)),()=>(p(U),l(()=>p(U)?Y(`customRateUpdating`):Y(`customRateAdd`))),()=>l(()=>Y(`monitoring`)),()=>l(()=>Y(`monitoringSubtitle`)),()=>l(()=>Y(`diagnostics`)),()=>l(()=>Y(`diagnosticsSubtitle`)),()=>l(()=>Y(`privacy`)),()=>l(()=>Y(`privacySubtitle`)),()=>l(()=>Y(`exportJson`)),()=>l(()=>Y(`exportCsv`)),()=>l(()=>Y(`includeAccountIdentifiers`)),()=>l(()=>Y(`deleteProductSecrets`)),()=>(p(St),l(()=>p(St)?Y(`hardRebuilding`):Y(`hardRebuild`))),()=>l(()=>Y(`hardRebuildWarning`)),()=>(p(xt),l(()=>p(xt)?Y(`clearing`):Y(`clearData`)))]),u(`click`,E,bn),u(`click`,N,()=>yn(`connections`,!1)),u(`click`,R,()=>yn(`plans`,!1)),u(`click`,ae,()=>yn(`rates`,!1)),u(`click`,ce,()=>yn(`monitoring`,!1)),u(`click`,pe,()=>yn(`privacy`,!1)),u(`click`,Ze,$t),j(kt,()=>p(ut),e=>b(ut,e)),u(`change`,kt,en),B(It,()=>p(H).billingDomainId,e=>v(H,p(H).billingDomainId=e)),B(Bt,()=>p(H).model,e=>v(H,p(H).model=e)),B(Wt,()=>p(H).inputRate,e=>v(H,p(H).inputRate=e)),B(Jt,()=>p(H).outputRate,e=>v(H,p(H).outputRate=e)),B(cn,()=>p(H).cacheReadRate,e=>v(H,p(H).cacheReadRate=e)),u(`submit`,wt,oe(tn)),u(`click`,cr,()=>hn(`json`)),u(`click`,ur,()=>hn(`csv`)),P(pr,()=>p(bt),e=>b(bt,e)),P(gr,()=>p(G),e=>b(G,e)),u(`click`,vr,pn),u(`click`,Sr,gn),f(t,n)};i(Me,e=>{p(Et)&&e(Pe)});var Fe=s(Me,2),He=t=>{let n=e(()=>p(kt)),a=e(()=>(d(p(n)),l(()=>p(n).retailEquivalent.status===`unavailable`?p(n).reportedEstimate:p(n).retailEquivalent))),o=e(()=>(d(p(n)),l(()=>p(n).priceSnapshots))),m=e(()=>(d(p(n)),l(()=>p(n).composition))),h=e(()=>(d(p(n)),l(()=>zn(p(n)))));var _=yU(),v=c(_),y=c(v),x=c(y),S=c(x),C=c(S);F(S);var w=s(S,2),E=c(w,!0);F(w);var D=s(w,2),O=e=>{var t=fU(),n=c(t,!0);F(t),g(e=>r(n,e),[()=>l(()=>Y(`separateFromHeadline`))]),f(e,t)};i(D,e=>{d(p(n)),l(()=>p(n).includedInHeadline===!1)&&e(O)}),F(x);var A=s(x,2);F(y);var j=s(y,2),M=c(j),N=c(M),P=c(N),I=c(P,!0);F(P);var L=s(P,2),ee=c(L,!0);F(L),F(N);var R=s(N,2),te=c(R),ne=c(te,!0);F(te);var re=s(te,2),ie=c(re,!0);F(re),F(R);var ae=s(R,2),oe=c(ae),z=c(oe,!0);F(oe);var B=s(oe,2),se=c(B,!0);F(B),F(ae),F(M);var ce=s(M,2),le=e=>{var t=_U(),i=c(t),a=c(i);F(i),F(t),g(e=>r(a,`+ ${e??``}`),[()=>l(()=>Y(`setCustomRateForModel`))]),u(`click`,i,()=>sn(p(n).providerId,p(n).billingDomainId,p(n).model)),f(e,t)};i(ce,e=>{d(p(a)),l(()=>p(a).status===`unavailable`)&&e(le)});var ue=s(ce,2),de=c(ue),fe=c(de,!0);F(de),PB(s(de,2),{get compositionTotals(){return p(m)},get unclassifiedTokens(){return d(p(n)),l(()=>p(n).tokenEvidence.unclassifiedTokens)},get trend(){return d(p(n)),l(()=>p(n).trend)},get trendEvidence(){return p(h)},get locale(){return p(Ee)},formatNumber:kn,formatMoney:cr}),F(ue);var pe=s(ue,2),me=c(pe),he=c(me,!0);F(me);var ge=s(me,2),_e=c(ge),ve=c(_e),ye=c(ve,!0);F(ve);var be=s(ve,2),xe=c(be,!0);F(be),F(_e);var Se=s(_e,2),Ce=c(Se),we=c(Ce,!0);F(Ce);var Te=s(Ce,2),De=c(Te,!0);F(Te),F(Se);var Oe=s(Se,2),ke=c(Oe),Ae=c(ke,!0);F(ke);var je=s(ke,2),Me=c(je,!0);F(je),F(Oe);var Ne=s(Oe,2),Pe=e=>{var t=vU(),n=c(t),i=c(n,!0);F(n);var a=s(n,2),u=c(a,!0);F(a),F(t),g((e,t)=>{r(i,e),r(u,t)},[()=>l(()=>Y(`priceSnapshot`)),()=>(d(p(o)),l(()=>p(o).map(e=>`${e.version} · ${e.source}`).join(` + `)))]),f(e,t)};i(Ne,e=>{d(p(o)),l(()=>p(o).length>0)&&e(Pe)}),F(ge),F(pe),F(j),F(v),T(v,e=>b(nt,e),()=>p(nt)),F(_),g((e,t,i,a,o,s,c,u,f,m,h,g,_,y,b,x)=>{k(v,`aria-label`,e),r(C,`${d(p(n)),l(()=>p(n).providerDisplayName)??``} · ${d(p(n)),l(()=>p(n).billingDomainDisplayName)??``}`),r(E,(d(p(n)),l(()=>p(n).model))),k(A,`aria-label`,t),r(I,i),r(ee,a),r(ne,o),r(ie,s),r(z,c),r(se,u),r(fe,f),r(he,m),r(ye,h),r(xe,g),r(we,_),r(De,y),r(Ae,b),r(Me,x)},[()=>(d(p(n)),l(()=>`${Y(`modelDetail`)}: ${p(n).model}`)),()=>l(()=>Y(`closeModelDetail`)),()=>l(()=>Y(`recordedTotal`)),()=>(d(p(n)),l(()=>kn(p(n).tokenEvidence.recordedTokens))),()=>l(()=>Y(`cost`)),()=>(d(p(a)),l(()=>p(a).status===`unavailable`?Y(`notAvailable`):cr(p(a).amount,p(a).comparisonCurrency))),()=>l(()=>Y(`observations`)),()=>(d(p(n)),l(()=>kn(p(n).tokenEvidence.observationCount))),()=>l(()=>Y(`activityOverview`)),()=>l(()=>Y(`evidenceSummary`)),()=>l(()=>Y(`scope`)),()=>(d(p(n)),l(()=>p(n).tokenEvidence.usageScopes.map(Rn).join(` + `)||Y(`unknown`))),()=>l(()=>Y(`totalDerivation`)),()=>(d(p(n)),l(()=>p(n).tokenEvidence.totalDerivations.map(Bn).join(` + `)||Y(`unknown`))),()=>l(()=>Y(`latestData`)),()=>(d(p(n)),l(()=>Nn(p(n).lastObservedAt)))]),u(`click`,A,vr),f(t,_)};i(Fe,e=>{p(kt)&&e(He)}),g((e,t,n,i,o,s,c,l,u)=>{a.inert=p(Et)||p(kt)!==null,k(m,`alt`,e),r(y,t),k(S,`aria-label`,n),k(C,`aria-selected`,p(Ye)===`agents`),k(C,`tabindex`,p(Ye)===`agents`?0:-1),r(N,i),k(L,`aria-selected`,p(Ye)===`models`),k(L,`tabindex`,p(Ye)===`models`?0:-1),r(ee,o),r(ie,s),k(ae,`aria-label`,c),r(se,w()===`system`?`◐`:E()===`dark`?`☾`:`☀`),r(ue,` ${l??``}`),r(pe,p(Ee)===`en`?`中文`:`EN`),he.disabled=p(Ie),xe=de(ve,1,`svelte-1uha8ag`,null,xe,{spin:p(Ie)}),r(Se,` ${u??``}`)},[()=>l(()=>Y(`bannerAlt`)),()=>l(()=>Y(`title`)),()=>l(()=>Y(`mainViews`)),()=>l(()=>Y(`agentUsageTab`)),()=>l(()=>Y(`tokenModelCostsTab`)),()=>l(()=>Y(`settings`)),()=>l(()=>Y(`themeToggleAria`)),()=>(w(),l(()=>zt(w()))),()=>(p(Ie),l(()=>p(Ie)?Y(`refreshing`):Y(`refresh`)))]),u(`click`,C,()=>b(Ye,`agents`)),u(`keydown`,C,Cn),u(`click`,L,()=>b(Ye,`models`)),u(`keydown`,L,Cn),u(`click`,te,()=>yn()),u(`click`,ae,Rt),u(`click`,fe,It),u(`click`,he,Ut),f(t,n)}),f(t,yr),C(),se()}export{xU as component};
|